#36228 [Bgs]: Loosing connection to db while executing 2 Multi-Statements requests with PDO

2006-05-06 Thread antleclercq at online dot fr
 ID:   36228
 User updated by:  antleclercq at online dot fr
 Reported By:  antleclercq at online dot fr
 Status:   Bogus
 Bug Type: PDO related
 Operating System: Ubuntu Linux (breezy)
 PHP Version:  5.1.2
 Assigned To:  wez
 New Comment:

Thanks for your answer, but could you please post the way you would
execute those 2 queries ?
Thanks in advance,

Antoine


Previous Comments:


[2006-04-30 01:01:04] [EMAIL PROTECTED]

If you're executing multi-statement queries, you must use
PDO::prepare(), PDOStatement::execute() and PDOStatement::nextRowset().



[2006-03-01 12:57:02] antleclercq at online dot fr

Hi,

Any update ?

Thanks,

Antoine



[2006-01-31 17:03:24] antleclercq at online dot fr

Hello Tony,

It looks like it returns only the number of affected rows for the first
statement...
The affected rows for the next statements don't seem to be counted.

Also : if you have an error in your first statement, you get an error,
but if the error is in one of the next statements, these are not
reported.

Hmmm... I don't know really what I would expect to get as return value
from a multi-query... Certainly a sum of all the affected rows or
better... an array with that info on each statement.

Antoine



[2006-01-31 15:55:42] [EMAIL PROTECTED]

Just curious: what do you expect to get as the result of these
multi-statement?
PDO::exec returns number of rows expected. Since you're effectively
executing two queries - what do you expect to get?
What if one of the queries succeeds and another one fails?



[2006-01-31 15:12:57] antleclercq at online dot fr

Description:

Hello,

Executing 2 multi-statement queries gives you the following error : 
2013 - Lost connection to MySQL server during query

I reproduced this error using 5.1.0RC3 and 5.1.2.

My MySQL version is 4.1.12, and I have the right MySQL / PDO
connector.

Thanks,

Antoine

Reproduce code:
---
exec($qry);
//The folowing line displays : Array ( [0] => 0 )
print_r($dbh->errorInfo());

//This second exec statement produces the error : "Lost connection to
MySQL server during query"
$dbh->exec($qry);
//The following line displays : Array ( [0] => HY000 [1] => 2013 [2]
=> Lost connection to MySQL server during query )
   print_r($dbh->errorInfo());
   
} catch (PDOException $e) {
   print $e->getMessage();
   die();
}

?>

Expected result:

None of the exec should return an error.

Actual result:
--
The second exec returns a 2013 error (Lost connection...).

Array ( [0] => HY000 [1] => 2013 [2] => Lost connection to MySQL server
during query )





-- 
Edit this bug report at http://bugs.php.net/?id=36228&edit=1


#36228 [Asn]: Loosing connection to db while executing 2 Multi-Statements requests with PDO

2006-03-01 Thread antleclercq at online dot fr
 ID:   36228
 User updated by:  antleclercq at online dot fr
 Reported By:  antleclercq at online dot fr
 Status:   Assigned
 Bug Type: MySQL related
 Operating System: Ubuntu Linux (breezy)
 PHP Version:  5.1.2
 Assigned To:  wez
 New Comment:

Hi,

Any update ?

Thanks,

Antoine


Previous Comments:


[2006-01-31 17:03:24] antleclercq at online dot fr

Hello Tony,

It looks like it returns only the number of affected rows for the first
statement...
The affected rows for the next statements don't seem to be counted.

Also : if you have an error in your first statement, you get an error,
but if the error is in one of the next statements, these are not
reported.

Hmmm... I don't know really what I would expect to get as return value
from a multi-query... Certainly a sum of all the affected rows or
better... an array with that info on each statement.

Antoine



[2006-01-31 15:55:42] [EMAIL PROTECTED]

Just curious: what do you expect to get as the result of these
multi-statement?
PDO::exec returns number of rows expected. Since you're effectively
executing two queries - what do you expect to get?
What if one of the queries succeeds and another one fails?



[2006-01-31 15:12:57] antleclercq at online dot fr

Description:

Hello,

Executing 2 multi-statement queries gives you the following error : 
2013 - Lost connection to MySQL server during query

I reproduced this error using 5.1.0RC3 and 5.1.2.

My MySQL version is 4.1.12, and I have the right MySQL / PDO
connector.

Thanks,

Antoine

Reproduce code:
---
exec($qry);
//The folowing line displays : Array ( [0] => 0 )
print_r($dbh->errorInfo());

//This second exec statement produces the error : "Lost connection to
MySQL server during query"
$dbh->exec($qry);
//The following line displays : Array ( [0] => HY000 [1] => 2013 [2]
=> Lost connection to MySQL server during query )
   print_r($dbh->errorInfo());
   
} catch (PDOException $e) {
   print $e->getMessage();
   die();
}

?>

Expected result:

None of the exec should return an error.

Actual result:
--
The second exec returns a 2013 error (Lost connection...).

Array ( [0] => HY000 [1] => 2013 [2] => Lost connection to MySQL server
during query )





-- 
Edit this bug report at http://bugs.php.net/?id=36228&edit=1


#36228 [Fbk->Opn]: Loosing connection to db while executing 2 Multi-Statements requests with PDO

2006-01-31 Thread antleclercq at online dot fr
 ID:   36228
 User updated by:  antleclercq at online dot fr
 Reported By:  antleclercq at online dot fr
-Status:   Feedback
+Status:   Open
 Bug Type: MySQL related
 Operating System: Ubuntu Linux (breezy)
 PHP Version:  5.1.2
 New Comment:

Hello Tony,

It looks like it returns only the number of affected rows for the first
statement...
The affected rows for the next statements don't seem to be counted.

Also : if you have an error in your first statement, you get an error,
but if the error is in one of the next statements, these are not
reported.

Hmmm... I don't know really what I would expect to get as return value
from a multi-query... Certainly a sum of all the affected rows or
better... an array with that info on each statement.

Antoine


Previous Comments:


[2006-01-31 15:55:42] [EMAIL PROTECTED]

Just curious: what do you expect to get as the result of these
multi-statement?
PDO::exec returns number of rows expected. Since you're effectively
executing two queries - what do you expect to get?
What if one of the queries succeeds and another one fails?



[2006-01-31 15:12:57] antleclercq at online dot fr

Description:

Hello,

Executing 2 multi-statement queries gives you the following error : 
2013 - Lost connection to MySQL server during query

I reproduced this error using 5.1.0RC3 and 5.1.2.

My MySQL version is 4.1.12, and I have the right MySQL / PDO
connector.

Thanks,

Antoine

Reproduce code:
---
exec($qry);
//The folowing line displays : Array ( [0] => 0 )
print_r($dbh->errorInfo());

//This second exec statement produces the error : "Lost connection to
MySQL server during query"
$dbh->exec($qry);
//The following line displays : Array ( [0] => HY000 [1] => 2013 [2]
=> Lost connection to MySQL server during query )
   print_r($dbh->errorInfo());
   
} catch (PDOException $e) {
   print $e->getMessage();
   die();
}

?>

Expected result:

None of the exec should return an error.

Actual result:
--
The second exec returns a 2013 error (Lost connection...).

Array ( [0] => HY000 [1] => 2013 [2] => Lost connection to MySQL server
during query )





-- 
Edit this bug report at http://bugs.php.net/?id=36228&edit=1


#36228 [NEW]: Loosing connection to db while executing 2 Multi-Statements requests with PDO

2006-01-31 Thread antleclercq at online dot fr
From: antleclercq at online dot fr
Operating system: Ubuntu Linux (breezy)
PHP version:  5.1.2
PHP Bug Type: MySQL related
Bug description:  Loosing connection to db while executing 2 Multi-Statements 
requests with PDO

Description:

Hello,

Executing 2 multi-statement queries gives you the following error : 
2013 - Lost connection to MySQL server during query

I reproduced this error using 5.1.0RC3 and 5.1.2.

My MySQL version is 4.1.12, and I have the right MySQL / PDO connector.

Thanks,

Antoine

Reproduce code:
---
exec($qry);
//The folowing line displays : Array ( [0] => 0 )
print_r($dbh->errorInfo());

//This second exec statement produces the error : "Lost connection to
MySQL server during query"
$dbh->exec($qry);
//The following line displays : Array ( [0] => HY000 [1] => 2013 [2] =>
Lost connection to MySQL server during query )
   print_r($dbh->errorInfo());
   
} catch (PDOException $e) {
   print $e->getMessage();
   die();
}

?>

Expected result:

None of the exec should return an error.

Actual result:
--
The second exec returns a 2013 error (Lost connection...).

Array ( [0] => HY000 [1] => 2013 [2] => Lost connection to MySQL server
during query )

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


#35001 [NEW]: PDO unexpected crash on update

2005-10-27 Thread antleclercq at online dot fr
From: antleclercq at online dot fr
Operating system: Win2000
PHP version:  5CVS-2005-10-27 (snap)
PHP Bug Type: PDO related
Bug description:  PDO unexpected crash on update

Description:

Hi,

I get this stange bug with the following code. I thought it was fixed when
I read the bug report: bugs.php.net/?id=34861, but it seems only
partially.

Create the folowing table in a "test" db under mysql :
CREATE TABLE `test` (
  `id` int(11) NOT NULL default '0',
  `test1` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `test` VALUES (1, 'test', '');

Using the code below, try posting the following string :
x"'"x:a

(magic_quotes_gpc is on)

I took the latest snapshot for Win2000.

Info : that doesn't crash when using $db->exec($sql).

Antoine

Reproduce code:
---
prepare($sql);
$res->execute();
}
?>

" name="string">


Expected result:

It should update the record.

Actual result:
--
Warning: PDOStatement::execute() [function.execute]: SQLSTATE[HY093]:
Invalid parameter number: no parameters were bound in C:\Program
Files\Apache Group\Apache2\htdocs\test.php on line 16

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


#34873 [NEW]: Segmentation Fault on foreach in object (used by smarty)

2005-10-14 Thread antleclercq at online dot fr
From: antleclercq at online dot fr
Operating system: Ubuntu (breezy)
PHP version:  5CVS-2005-10-14 (CVS)
PHP Bug Type: Arrays related
Bug description:  Segmentation Fault on foreach in object (used by smarty)

Description:

Hello,

I'm running:
- PHP 5.1RC2 CVS200510141230

I've got a nice segfault with that simple piece of code. The problem is
that the code style showed below is used by Smarty (in the compile
system)...

That problem has been reproduced on several systems.

Thanks for your help,

Antoine

Reproduce code:
---
var = array();
}

function test (){
$cont = array();
$cont["mykey"] = "myvalue";

foreach ($cont as $this->var['key'] => $this->var['value'])
echo $this->var['value'];
}
}
$myPwa = new Pwa();
$myPwa->test();
?>

Expected result:

This code should display:
myvalue
and continue its execution.

Actual result:
--
[EMAIL PROTECTED]:/home/web/sandbox.local/html $ php pwa.php
myvalue*** glibc detected *** double free or corruption (fasttop):
0x085149c8 ***
Aborted


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