Bug #1109 data inserts improperly
Description:
Want to report a bug in Mysql 4.1 alpha.
The problem is with inserting trailing spaces after an asterisk into
a varchar field;
Below is the create table statement, insert statement and select
statement. I first ran across this using DBI in perl, then replicated it in the mysql command line client.
How to repeat:
Want to report a bug in Mysql 4.1 alpha.
The problem is with inserting trailing spaces after an asterisk into
a varchar field;
Below is the create table statement, insert statement and select
statement. Sorry if this is the wrong method to contact you.
mysql> show create table categories;
+------------+----------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------------------------
--------------+
| Table | Create Table
|
+------------+----------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------------------------
--------------+
| categories | CREATE TABLE `categories` (
`categories_id` int(11) NOT NULL auto_increment,
`categories_image` varchar(64) default NULL,
`parent_id` int(11) NOT NULL default '0',
`sort_order` int(3) default NULL,
`date_added` datetime default NULL,
`last_modified` datetime default NULL,
`ingram_cat_code` varchar(10) NOT NULL default '',
`ingram_parent_cat` varchar(10) NOT NULL default '',
PRIMARY KEY (`categories_id`),
KEY `idx_categories_parent_id` (`parent_id`)
) TYPE=MyISAM CHARSET=latin1 |
+------------+----------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------------------------
--------------+
1 row in set (0.00 sec)
mysql> Insert into categories values('','','','','','','* ','00');
Query OK, 1 row affected (0.00 sec)
mysql> Select categories_id from categories where ingram_cat_code
like '* ' AND ingram_parent_cat like '00';
Empty set (0.00 sec)
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.040 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.
Description: Want to report a bug in Mysql 4.1 alpha. The problem is with inserting trailing spaces after an asterisk into a varchar field; Below is the create table statement, insert statement and select statement. I first ran across this using DBI in perl, then replicated it in the mysql command line client. How to repeat: Want to report a bug in Mysql 4.1 alpha. The problem is with inserting trailing spaces after an asterisk into a varchar field; Below is the create table statement, insert statement and select statement. Sorry if this is the wrong method to contact you. mysql> show create table categories; +------------+---------------------------------------------------------- ------------------------------------------------------------------------ ------------------------------------------------------------------------ ------------------------------------------------------------------------ ------------------------------------------------------------------------ ------------------------------------------------------------------------ ------------------------------------------------------------------------ --------------+ | Table | Create Table | +------------+---------------------------------------------------------- ------------------------------------------------------------------------ ------------------------------------------------------------------------ ------------------------------------------------------------------------ ------------------------------------------------------------------------ ------------------------------------------------------------------------ ------------------------------------------------------------------------ --------------+ | categories | CREATE TABLE `categories` ( `categories_id` int(11) NOT NULL auto_increment, `categories_image` varchar(64) default NULL, `parent_id` int(11) NOT NULL default '0', `sort_order` int(3) default NULL, `date_added` datetime default NULL, `last_modified` datetime default NULL, `ingram_cat_code` varchar(10) NOT NULL default '', `ingram_parent_cat` varchar(10) NOT NULL default '', PRIMARY KEY (`categories_id`), KEY `idx_categories_parent_id` (`parent_id`) ) TYPE=MyISAM CHARSET=latin1 | +------------+---------------------------------------------------------- ------------------------------------------------------------------------ ------------------------------------------------------------------------ ------------------------------------------------------------------------ ------------------------------------------------------------------------ ------------------------------------------------------------------------ ------------------------------------------------------------------------ --------------+ 1 row in set (0.00 sec) mysql> Insert into categories values('','','','','','','* ','00'); Query OK, 1 row affected (0.00 sec) mysql> Select categories_id from categories where ingram_cat_code like '* ' AND ingram_parent_cat like '00'; Empty set (0.00 sec)