From: Date: October 29 2008 12:41pm Subject: bzr commit into mysql-6.0-falcon-team branch (svoj:2887) Bug#39708 List-Archive: http://lists.mysql.com/commits/57304 X-Bug: 39708 Message-Id: <20081029114137.235E841CED0@june.myoffice.izhnet.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7BIT #At file:///home/svoj/devel/bzr-mysql/mysql-6.0-falcon-team-bug39708/ 2887 Sergey Vojtovich 2008-10-29 BUG#39708 - Falcon: non-descriptive error message when creating a big key When a table creation fails due to too long key, returned error message was very generic and unspecific. Return descriptive error message when table creation fails due to too long key. added: mysql-test/suite/falcon/r/falcon_bug_39708.result mysql-test/suite/falcon/t/falcon_bug_39708-master.opt mysql-test/suite/falcon/t/falcon_bug_39708.test modified: storage/falcon/ha_falcon.cpp per-file messages: mysql-test/suite/falcon/r/falcon_bug_39708.result A test case for BUG#39708. mysql-test/suite/falcon/t/falcon_bug_39708-master.opt A test case for BUG#39708. mysql-test/suite/falcon/t/falcon_bug_39708.test A test case for BUG#39708. storage/falcon/ha_falcon.cpp Return descriptive error message when table creation fails due to too long key. === added file 'mysql-test/suite/falcon/r/falcon_bug_39708.result' --- a/mysql-test/suite/falcon/r/falcon_bug_39708.result 1970-01-01 00:00:00 +0000 +++ b/mysql-test/suite/falcon/r/falcon_bug_39708.result 2008-10-29 11:41:14 +0000 @@ -0,0 +1,6 @@ +CREATE TABLE t1(a VARCHAR(140) CHARACTER SET utf8, KEY(a)) ENGINE=falcon; +ERROR 42000: Specified key was too long; max key length is 540 bytes +SHOW WARNINGS; +Level Code Message +Error 1071 Specified key was too long; max key length is 540 bytes +Error 1005 Can't create table 'test.t1' (errno: 213) === added file 'mysql-test/suite/falcon/t/falcon_bug_39708-master.opt' --- a/mysql-test/suite/falcon/t/falcon_bug_39708-master.opt 1970-01-01 00:00:00 +0000 +++ b/mysql-test/suite/falcon/t/falcon_bug_39708-master.opt 2008-10-29 11:41:14 +0000 @@ -0,0 +1 @@ +--falcon-page-size=2k === added file 'mysql-test/suite/falcon/t/falcon_bug_39708.test' --- a/mysql-test/suite/falcon/t/falcon_bug_39708.test 1970-01-01 00:00:00 +0000 +++ b/mysql-test/suite/falcon/t/falcon_bug_39708.test 2008-10-29 11:41:14 +0000 @@ -0,0 +1,5 @@ +--source include/have_falcon.inc + +--error ER_TOO_LONG_KEY +CREATE TABLE t1(a VARCHAR(140) CHARACTER SET utf8, KEY(a)) ENGINE=falcon; +SHOW WARNINGS; === modified file 'storage/falcon/ha_falcon.cpp' --- a/storage/falcon/ha_falcon.cpp 2008-10-26 08:45:22 +0000 +++ b/storage/falcon/ha_falcon.cpp 2008-10-29 11:41:14 +0000 @@ -1805,6 +1805,10 @@ int StorageInterface::error(int storageE "Falcon does not support READ UNCOMMITTED ISOLATION, using REPEATABLE READ instead."); break; + case StorageErrorIndexOverflow: + my_error(ER_TOO_LONG_KEY, MYF(0), max_key_length()); + break; + default: ; }