Below is the list of changes that have just been committed into a local
5.0 repository of mydev. When mydev does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1959 05/08/08 19:38:28 ingo@stripped +3 -0
Bug#10056 - PACK_KEYS option take values greater than 1 while creating table
Added a switch to reject illegal values for PACK_KEYS.
sql/sql_yacc.yy
1.411 05/08/08 19:38:22 ingo@stripped +21 -2
Bug#10056 - PACK_KEYS option take values greater than 1 while creating table
Added a switch to reject illegal values for PACK_KEYS.
mysql-test/t/myisam.test
1.47 05/08/08 19:38:22 ingo@stripped +10 -0
Bug#10056 - PACK_KEYS option take values greater than 1 while creating table
The test case.
mysql-test/r/myisam.result
1.64 05/08/08 19:38:22 ingo@stripped +6 -0
Bug#10056 - PACK_KEYS option take values greater than 1 while creating table
The test result.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: ingo
# Host: synthia.local
# Root: /home/mydev/mysql-5.0-5000
--- 1.410/sql/sql_yacc.yy 2005-07-19 18:52:55 +02:00
+++ 1.411/sql/sql_yacc.yy 2005-08-08 19:38:22 +02:00
@@ -2650,8 +2650,27 @@
| PASSWORD opt_equal TEXT_STRING_sys { Lex->create_info.password=$3.str; Lex->create_info.used_fields|= HA_CREATE_USED_PASSWORD; }
| COMMENT_SYM opt_equal TEXT_STRING_sys { Lex->create_info.comment=$3.str; Lex->create_info.used_fields|= HA_CREATE_USED_COMMENT; }
| AUTO_INC opt_equal ulonglong_num { Lex->create_info.auto_increment_value=$3; Lex->create_info.used_fields|= HA_CREATE_USED_AUTO;}
- | PACK_KEYS_SYM opt_equal ulong_num { Lex->create_info.table_options|= $3 ? HA_OPTION_PACK_KEYS : HA_OPTION_NO_PACK_KEYS; Lex->create_info.used_fields|= HA_CREATE_USED_PACK_KEYS;}
- | PACK_KEYS_SYM opt_equal DEFAULT { Lex->create_info.table_options&= ~(HA_OPTION_PACK_KEYS | HA_OPTION_NO_PACK_KEYS); Lex->create_info.used_fields|= HA_CREATE_USED_PACK_KEYS;}
+ | PACK_KEYS_SYM opt_equal ulong_num
+ {
+ switch($3) {
+ case 0:
+ Lex->create_info.table_options|= HA_OPTION_NO_PACK_KEYS;
+ break;
+ case 1:
+ Lex->create_info.table_options|= HA_OPTION_PACK_KEYS;
+ break;
+ default:
+ yyerror(ER(ER_SYNTAX_ERROR));
+ YYABORT;
+ }
+ Lex->create_info.used_fields|= HA_CREATE_USED_PACK_KEYS;
+ }
+ | PACK_KEYS_SYM opt_equal DEFAULT
+ {
+ Lex->create_info.table_options&=
+ ~(HA_OPTION_PACK_KEYS | HA_OPTION_NO_PACK_KEYS);
+ Lex->create_info.used_fields|= HA_CREATE_USED_PACK_KEYS;
+ }
| CHECKSUM_SYM opt_equal ulong_num { Lex->create_info.table_options|= $3 ? HA_OPTION_CHECKSUM : HA_OPTION_NO_CHECKSUM; Lex->create_info.used_fields|= HA_CREATE_USED_CHECKSUM; }
| DELAY_KEY_WRITE_SYM opt_equal ulong_num { Lex->create_info.table_options|= $3 ? HA_OPTION_DELAY_KEY_WRITE : HA_OPTION_NO_DELAY_KEY_WRITE; Lex->create_info.used_fields|= HA_CREATE_USED_DELAY_KEY_WRITE; }
| ROW_FORMAT_SYM opt_equal row_types { Lex->create_info.row_type= $3; Lex->create_info.used_fields|= HA_CREATE_USED_ROW_FORMAT; }
--- 1.63/mysql-test/r/myisam.result 2005-08-04 13:36:08 +02:00
+++ 1.64/mysql-test/r/myisam.result 2005-08-08 19:38:22 +02:00
@@ -1274,3 +1274,9 @@
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t1 1 a 1 a A 8 NULL NULL YES BTREE
drop table t1;
+create table t1 (c1 int) engine=myisam pack_keys=0;
+create table t2 (c1 int) engine=myisam pack_keys=1;
+create table t3 (c1 int) engine=myisam pack_keys=default;
+create table t4 (c1 int) engine=myisam pack_keys=2;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2' at line 1
+drop table t1, t2, t3;
--- 1.46/mysql-test/t/myisam.test 2005-08-04 13:36:08 +02:00
+++ 1.47/mysql-test/t/myisam.test 2005-08-08 19:38:22 +02:00
@@ -675,4 +675,14 @@
drop table t1;
+#
+# Bug#10056 - PACK_KEYS option take values greater than 1 while creating table
+#
+create table t1 (c1 int) engine=myisam pack_keys=0;
+create table t2 (c1 int) engine=myisam pack_keys=1;
+create table t3 (c1 int) engine=myisam pack_keys=default;
+--error 1064
+create table t4 (c1 int) engine=myisam pack_keys=2;
+drop table t1, t2, t3;
+
# End of 4.1 tests
| Thread |
|---|
| • bk commit into 5.0 tree (ingo:1.1959) BUG#10056 | ingo | 8 Aug |