#37671 [Csd->Opn]: MySQLi extension fails to recognize BIT colums
| From: | squasar at eternalviper dot net | Date: | Sun, 25 Jun 2006 10:25:32 +0000 |
| Subject: | #37671 [Csd->Opn]: MySQLi extension fails to recognize BIT colums | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-98745@lists.php.net to get a copy of this message | ||
ID: 37671
User updated by: squasar at eternalviper dot net
Reported By: squasar at eternalviper dot net
-Status: Closed
+Status: Open
Bug Type: MySQLi related
Operating System: *
-PHP Version: 5.1.4
+PHP Version: 5.2 CVS
Assigned To: iliaa
New Comment:
I updated to the latest 5.2 branch on CVS and run the exact
test code I submitted again. The result:
long(0) refcount(1)
long(0) refcount(1)
long(0) refcount(1)
long(0) refcount(1)
I don't know what one of us is doing wrong. Tested on both
big-endian and little-endian systems. Could it be a 32-bit
vs. 64-bit issue?
Previous Comments:
------------------------------------------------------------------------
[2006-06-20 20:54:29] iliaa@php.net
With latest CVS your code returns the following results:
long(1) refcount(1)
long(0) refcount(1)
long(1) refcount(1)
long(0) refcount(1)
------------------------------------------------------------------------
[2006-06-08 06:27:06] squasar at eternalviper dot net
That sample from the manual is irrelevant. Re-examine the
reproduce code I provided. It FAILS using the patch that was
applied to CVS; the result is always zero regardless of the
values in the column, even though it's a BIT(1).
------------------------------------------------------------------------
[2006-06-07 13:08:32] iliaa@php.net
BIT[(M)]
A bit-field type. M indicates the number of bits per value,
from 1 to 64. The default is 1 if M is omitted.
(From MySQL manual)
------------------------------------------------------------------------
[2006-06-07 04:43:39] squasar at eternalviper dot net
The patch applied to CVS does NOT fix the bug. The CVS patch
folds BIT handling into LONG types. This does not work; BIT
columns take a 64-bit type, NOT a 32-bit type. Please re-
examine the patch I supplied, which folds BIT handling into
LONGLONG types.
------------------------------------------------------------------------
[2006-06-04 14:57:14] iliaa@php.net
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/37671
--
Edit this bug report at http://bugs.php.net/?id=37671&edit=1