Tianlin,
you are right. If InnoDB did a scan from a secondary index to an
empty table, then it returned an error code MySQL did not accept
in this context. I changed now the error code and it will be right
in the next release .38, if Monty has not yet gotten it out.
Regards,
Heikki
........................
I am running MySQL 3.23.37 compiled by myself on Linux platform.
Here is a repeatable example:
================================================================
mysql> create table test (id int not null,
-> KEY id (id)) type=InnoDB;
mysql> SELECT id FROM test WHERE id<1;
ERROR 1032: Can't find record in 'test'
I am expecting something like the following:
Empty set (0.00 sec)
================================================================
You need the following combination to repeat this bug:
(1) InnoDB table (MyISAM works OK)
(2) where clause (without WHERE clause works OK)
(3) < or <= comparison operator (= or > or >= work OK)
(4) NOT NULL in column definition (wothout NOT NULL works OK)
(5) KEY id (id) in column definition (otherwise it works OK)
I also noticed that in C API,
mysql_store_result() fails with query "ELECT id FROM test WHERE id<1".
Regards,
Tianlin WANG
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php