Issue Type: Improvement Created: 2008-09-23T10:09:41.000+0000 Last Updated: 2011-04-22T00:49:50.000+0000 Status: Open Fix version(s): Reporter: Matthew Turland (elazar) Assignee: Ralph Schindler (ralph) Tags: - Zend_Db
Related issues: Attachments:
At the moment, in order to represent values to be stored in a BIT column of a MySQL database table, use of Zend_Db_Expr is required. It would be a nice improvement if support for this was added, for example in Zend_Db_Table so that binary values are properly escaped for columns designated as using the BIT data type in the table schema. More information on the data type and syntax to escape it is available in Section 10.2 Numeric Types of the MySQL manual. Specific relevant passages are cited below.
"As of MySQL 5.0.3, a BIT data type is available for storing bit-field values. (Before 5.0.3, MySQL interprets BIT as TINYINT(1).) In MySQL 5.0.3, BIT is supported only for MyISAM. MySQL 5.0.5 extends BIT support to MEMORY, InnoDB, BDB, and NDBCLUSTER."
"As of MySQL 5.0.3, the BIT data type is used to store bit-field values. A type of BIT(M) allows for storage of M-bit values. M can range from 1 to 64.
To specify bit values, b'value' notation can be used. value is a binary value written using zeros and ones. For example, b'111' and b'10000000' represent 7 and 128, respectively. See Section 8.1.5, "Bit-Field Values".
If you assign a value to a BIT(M) column that is less than M bits long, the value is padded on the left with zeros. For example, assigning a value of b'101' to a BIT(6) column is, in effect, the same as assigning b'000101'. "
Posted by Andras Gyomrey (andras) on 2011-04-22T00:49:50.000+0000
Which is the status of this bug? I mean, may we expect it to be fixed in the near future?
Have you found an issue?
See the Overview section for more details.