List:Commits« Previous MessageNext Message »
From:Sergey Vojtovich Date:October 29 2008 12:41pm
Subject:bzr commit into mysql-6.0-falcon-team branch (svoj:2887) Bug#39708
View as plain text  
#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:
 			;
 		}

Thread
bzr commit into mysql-6.0-falcon-team branch (svoj:2887) Bug#39708Sergey Vojtovich29 Oct