From:             martin dot dufka at atlas dot cz
Operating system: WIN2000
PHP version:      5.2.5
PHP Bug Type:     ODBC related
Bug description:  odbc_next_result - mysql procedure with multiple results

Description:
------------
problem with: odbc_next_result()
mysql-server: 5.0.51a (.45-the same problem)
odbc driver: Driver={MySQL ODBC 3.51 Driver}

when MySQL procedure returns 2 rowsets, after the second rowset
odbc_next_result() returns true. 

Reproduce code:
---------------
<?php
/*
mysql:
CREATE PROCEDURE `multiplerowsets`()
BEGIN
  select 'rs1';
  select 'rs2';
END;
*/
  $dsn="Driver={MySQL ODBC 3.51
Driver};Server=localhost;Port=3306;Database=db_name;";
  $conn=odbc_connect($dsn,'user','passwd');

  $query="call multiplerowsets";

    $result=odbc_exec($conn,$query);
    $row=odbc_fetch_array ($result); var_dump(odbc_next_result($result));
    $row=odbc_fetch_array ($result); var_dump(odbc_next_result($result));
    $row=odbc_fetch_array ($result); var_dump(odbc_next_result($result));
?>

Expected result:
----------------
bool(true) bool(false) bool(false)

Actual result:
--------------
bool(true) bool(true) 
Warning: odbc_fetch_array() [function.odbc-fetch-array]: No tuples
available at this result index in D:\Apache2.2\htdocs\test\x.php on line
19
bool(false)

-- 
Edit bug report at http://bugs.php.net/?id=44305&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=44305&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=44305&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=44305&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=44305&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=44305&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=44305&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=44305&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=44305&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=44305&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=44305&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=44305&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=44305&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=44305&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=44305&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=44305&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=44305&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=44305&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=44305&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=44305&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=44305&r=mysqlcfg

Reply via email to