Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.0b4

Bug #12971 Sequence emulation broken
Submitted: 2008-01-24 16:14 UTC
From: brack Assigned:
Status: Duplicate Package: MDB2_Driver_mssql (version 1.2.1)
PHP Version: 5.2.5 OS: Windows
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 31 + 12 = ?

 
 [2008-01-24 16:14 UTC] brack (Benjamin Rack)
Description: ------------ The sequence emulation for the mdb2 mssql driver is not working with MSSQL Server 2005 or above. The problem is described here: http://www.sql-server-performance.com/faq/error339_p1.aspx In revision 1.153 of the mdb2 mssql driver sequence emulation is working correctly: http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/mssql.php?r1=1.152&r2=1.153 In revision 1.154 the code was changed resulting in this bug: http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/mssql.php?r1=1.152&r2=1.153 Test script: --------------- require_once('MDB2.php'); require_once('Log.php'); $dsn = 'mssql://xxx:xxx@localhost/db_name; $mdb2 = MDB2::singleton($dsn); if (PEAR::isError($mdb2)) { echo $mdb2->getUserInfo(); } $conf = array('db' => $mdb2, 'sequence' => 'log_id'); $log = Log::singleton('mdb2', 'log_table', 'ident', $conf); $log->notice('Test notice'); $log->notice('Test notice'); $log->notice('Test notice'); Expected result: ---------------- The value of the sequence field in the sequence table is incremented by each call of $log->notice(). Actual result: -------------- The value of the sequence field in the sequence table is never incremented.

Comments

 [2008-01-25 06:49 UTC] brack (Benjamin Rack)
The link for the broken revision 1.154 was incorrect. The correct one must be: http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/mssql.php?r1=1.153&r2=1.154