CPAN::Forum
DBD-mysql - Returing a result set from a MySQL stored procedure - Commands out of sync error
| Posted on Sun Dec 10 01:00:24 2006 by platypus |
| Returing a result set from a MySQL stored procedure - Commands out of sync error |
|
Hi,
I've been able to successfully return a result set from a MySQL stored procedure using Perl DBI 1.56 and DBD for MYSQL version 3.0008 but only after adding the patch posted at
https://rt.cpan.org/Public/Bug/Display.html?id=12322
This patch allows passing of mysql_multi_statements parameter to the DBI . Patch was for an older version but I guess the code never made it into 3.0008
All good except that any sql statement following the call to the stored procedure results in the "Commands out of sync" error. I've tried most suggestions posted under this subject but to no avail
The test program with the patch itself also fails with this same error.
Anyone managed to get this to work ?
Results of make test
make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00base................ok
t/10dsnlist.............ok
t/20createdrop..........ok
t/30insertfetch.........ok
t/35limit...............ok
t/35prepare.............ok
t/40bindparam...........ok
t/40bindparam2..........ok
t/40blobs...............ok
t/40listfields..........ok
t/40nulls...............ok
t/40numrows.............ok
t/41bindparam...........ok
t/41blobs_prepare.......ok
t/42bindparam...........ok
t/50chopblanks..........ok
t/50commit..............ok
t/60leaks...............skipped
all skipped: $ENV{SLOW_TESTS} is not set or Proc::ProcessTable not installed
t/78multi_statements....Name "main::table" used only once: possible typo at t/78multi_statements.t line 67.
Name "main::ref" used only once: possible typo at t/78multi_statements.t line 15.
DBD::mysql::db do failed: Commands out of sync; you can't run this command now at t/78multi_statements.t line 157.
t/78multi_statements....FAILED test 9
Failed 1/10 tests, 90.00% okay
t/dbdadmin..............ok
t/insertid..............ok
t/param_values..........ok
t/prepare_noerror.......skipped
all skipped: test - will only run with MySQL 5.1 and above.
t/texecute..............ok
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/78multi_statements.t 10 1 10.00% 9
2 tests skipped.
Failed 1/24 test scripts, 95.83% okay. 1/450 subtests failed, 99.78% okay.
make: *** [test_dynamic] Error 2
|
| Write a response |
(4)
]