| Bug #2925 | LIKE "string%" does not work correctly on VARHCAR with partial index in MERGE t | ||
|---|---|---|---|
| Submitted: | 23 Feb 2004 9:08 | Modified: | 23 Feb 2004 10:27 |
| Reporter: | SINISA MILIVOJEVIC | Email Updates: | |
| Status: | Not a Bug | Impact on me: | |
| Category: | MySQL Server | Severity: | S2 (Serious) |
| Version: | 4.0.18 | OS: | Any (any) |
| Assigned to: | Sergei Golubchik | CPU Architecture: | Any |
[23 Feb 2004 10:27]
Sergei Golubchik
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.mysql.com/documentation/ and the instructions on how to report a bug at http://bugs.mysql.com/how-to-report.php Additional info: MERGE table should have the same structure as underlying MyISAM tables. You have declared a column as CHAR in MERGE table and VARCHAR in MyISAM tables.

Description: Queries which contain LIKE "string%" in the WHERE clause do not work correctly on VARHCAR with partial index in MERGE tables. How to repeat: mysql> create table t1 (c varchar(192), key cc (c(10))); Query OK, 0 rows affected (0.01 sec) mysql> create table t2 (c varchar(192), key cc (c(10))); Query OK, 0 rows affected (0.01 sec) mysql> insert into t2 values ("sinisa@mysql.com"); Query OK, 1 row affected (0.02 sec) mysql> insert into t1 values ("sinisa@mysqlcom"); Query OK, 1 row affected (0.00 sec) mysql> create table t (c char(192), key cc (c(10))) type=mrg_myisam union=(t1,t2); Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> select * from t where c like "sinisa%"; Empty set (0.00 sec) mysql> select * from t1 where c like "sinisa%"; +----------------------+ | c | +----------------------+ | sinisa@mysql.com | +----------------------+ 1 row in set (0.00 sec) mysql> select * from t2 where c like "sinisa%"; +----------------------+ | c | +----------------------+ | sinisa@mysql.com | +----------------------+ 1 row in set (0.00 sec) mysql> select * from t where c like "sinisa%"; Empty set (0.00 sec)