List:Commits« Previous MessageNext Message »
From:Jon Olav Hauglid Date:May 8 2009 2:12pm
Subject:bzr push into mysql-6.0-runtime branch (jon.hauglid:2773)
View as plain text  
 2773 Jon Olav Hauglid	2009-05-08 [merge]
      manual merge

    modified:
      .bzr-mysql/default.conf
      mysql-test/r/drop_debug.result
      mysql-test/t/drop_debug.test
      sql/transaction.cc
      storage/myisam/CMakeLists.txt
=== modified file 'mysql-test/r/parser.result'
--- a/mysql-test/r/parser.result	2009-02-14 16:10:30 +0000
+++ b/mysql-test/r/parser.result	2009-05-08 13:34:08 +0000
@@ -627,3 +627,36 @@ BACKUP DATABASE *, test to 'broken.bak';
 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 ' test to 'broken.bak'' at line 1
 BACKUP DATABASE *, db1, db2, db3 to 'broken.bak';
 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 ' db1, db2, db3 to 'broken.bak'' at line 1
+# Should use myisam
+create logfile group ndb_lg1 add undofile 'ndb_undo1' initial_size=32M;
+ERROR HY000: Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
+create logfile group ndb_lg1 add undofile 'ndb_undo1' engine=myisam;
+ERROR HY000: Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
+create logfile group ndb_lg1 add undofile 'ndb_undo1';
+ERROR HY000: Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
+create tablespace ndb_ts1 add datafile 'ndb_ts1.dat' use logfile group ndb_lg1 engine=myisam initial_size=32M;
+ERROR HY000: Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
+create tablespace ndb_ts1 add datafile 'ndb_ts1.dat' use logfile group ndb_lg1 engine=myisam;
+ERROR HY000: Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
+create tablespace ndb_ts1 add datafile 'ndb_ts1.dat' use logfile group ndb_lg1;
+ERROR HY000: Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
+alter logfile group ndb_lg1 add undofile 'ndb_undo1' wait;
+ERROR HY000: Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
+alter logfile group ndb_lg1 add undofile 'ndb_undo1' engine=myisam;
+ERROR HY000: Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
+alter logfile group ndb_lg1 add undofile 'ndb_undo1';
+ERROR HY000: Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
+alter tablespace ndb_ts1 add datafile 'ndb_ts1.dat' initial_size=32M;
+ERROR HY000: Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
+alter tablespace ndb_ts1 add datafile 'ndb_ts1.dat' engine=myisam;
+ERROR HY000: Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
+alter tablespace ndb_ts1 add datafile 'ndb_ts1.dat';
+ERROR HY000: Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
+drop logfile group ndb_lg1 engine=myisam;
+ERROR HY000: Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
+drop logfile group ndb_lg1;
+ERROR HY000: Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
+drop tablespace ndb_ts1 engine=myisam;
+ERROR HY000: Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
+drop tablespace ndb_ts1;
+ERROR HY000: Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'

=== modified file 'mysql-test/t/parser.test'
--- a/mysql-test/t/parser.test	2008-07-21 03:01:19 +0000
+++ b/mysql-test/t/parser.test	2009-05-08 13:34:08 +0000
@@ -764,3 +764,46 @@ BACKUP DATABASE *, test to 'broken.bak';
 --error ER_PARSE_ERROR
 BACKUP DATABASE *, db1, db2, db3 to 'broken.bak';
 
+#
+# Bug#31293 - Incorrect parser errors for create/alter/drop logfile group/tablespace
+#
+
+--echo # Should use myisam
+
+-- error ER_ILLEGAL_HA_CREATE_OPTION
+create logfile group ndb_lg1 add undofile 'ndb_undo1' initial_size=32M; 
+-- error ER_ILLEGAL_HA_CREATE_OPTION
+create logfile group ndb_lg1 add undofile 'ndb_undo1' engine=myisam;
+-- error ER_ILLEGAL_HA_CREATE_OPTION
+create logfile group ndb_lg1 add undofile 'ndb_undo1';
+
+-- error ER_ILLEGAL_HA_CREATE_OPTION
+create tablespace ndb_ts1 add datafile 'ndb_ts1.dat' use logfile group ndb_lg1 engine=myisam initial_size=32M;
+-- error ER_ILLEGAL_HA_CREATE_OPTION
+create tablespace ndb_ts1 add datafile 'ndb_ts1.dat' use logfile group ndb_lg1 engine=myisam;
+-- error ER_ILLEGAL_HA_CREATE_OPTION
+create tablespace ndb_ts1 add datafile 'ndb_ts1.dat' use logfile group ndb_lg1;
+
+-- error ER_ILLEGAL_HA_CREATE_OPTION
+alter logfile group ndb_lg1 add undofile 'ndb_undo1' wait;
+-- error ER_ILLEGAL_HA_CREATE_OPTION
+alter logfile group ndb_lg1 add undofile 'ndb_undo1' engine=myisam;
+-- error ER_ILLEGAL_HA_CREATE_OPTION
+alter logfile group ndb_lg1 add undofile 'ndb_undo1';
+
+-- error ER_ILLEGAL_HA_CREATE_OPTION
+alter tablespace ndb_ts1 add datafile 'ndb_ts1.dat' initial_size=32M;
+-- error ER_ILLEGAL_HA_CREATE_OPTION
+alter tablespace ndb_ts1 add datafile 'ndb_ts1.dat' engine=myisam;
+-- error ER_ILLEGAL_HA_CREATE_OPTION
+alter tablespace ndb_ts1 add datafile 'ndb_ts1.dat';
+
+-- error ER_ILLEGAL_HA_CREATE_OPTION
+drop logfile group ndb_lg1 engine=myisam;
+-- error ER_ILLEGAL_HA_CREATE_OPTION
+drop logfile group ndb_lg1;
+
+-- error ER_ILLEGAL_HA_CREATE_OPTION
+drop tablespace ndb_ts1 engine=myisam;
+-- error ER_ILLEGAL_HA_CREATE_OPTION
+drop tablespace ndb_ts1;

=== modified file 'sql/sql_yacc.yy'
--- a/sql/sql_yacc.yy	2009-04-01 21:36:07 +0000
+++ b/sql/sql_yacc.yy	2009-05-08 13:34:08 +0000
@@ -3731,7 +3731,8 @@ change_ts_option:
         ;
 
 tablespace_option_list:
-        tablespace_options
+          /* empty */ 
+        | tablespace_options
         ;
 
 tablespace_options:
@@ -3752,7 +3753,8 @@ tablespace_option:
         ;
 
 alter_tablespace_option_list:
-        alter_tablespace_options
+          /* empty */
+        | alter_tablespace_options
         ;
 
 alter_tablespace_options:
@@ -3770,7 +3772,8 @@ alter_tablespace_option:
         ;
 
 logfile_group_option_list:
-        logfile_group_options
+          /* empty */ 
+        | logfile_group_options
         ;
 
 logfile_group_options:
@@ -3790,7 +3793,8 @@ logfile_group_option:
         ;
 
 alter_logfile_group_option_list:
-          alter_logfile_group_options
+          /* empty */ 
+        | alter_logfile_group_options
         ;
 
 alter_logfile_group_options:
@@ -3960,11 +3964,6 @@ opt_ts_engine:
           }
         ;
 
-opt_ts_wait:
-          /* empty */
-        | ts_wait
-        ;
-
 ts_wait:
           WAIT_SYM
           {
@@ -10111,12 +10110,12 @@ drop:
             lex->drop_if_exists= $3;
             lex->spname= $4;
           }
-        | DROP TABLESPACE tablespace_name opt_ts_engine opt_ts_wait
+        | DROP TABLESPACE tablespace_name drop_ts_options_list
           {
             LEX *lex= Lex;
             lex->alter_tablespace_info->ts_cmd_type= DROP_TABLESPACE;
           }
-        | DROP LOGFILE_SYM GROUP_SYM logfile_group_name opt_ts_engine opt_ts_wait
+        | DROP LOGFILE_SYM GROUP_SYM logfile_group_name drop_ts_options_list
           {
             LEX *lex= Lex;
             lex->alter_tablespace_info->ts_cmd_type= DROP_LOGFILE_GROUP;
@@ -10167,6 +10166,21 @@ opt_temporary:
           /* empty */ { $$= 0; }
         | TEMPORARY { $$= 1; }
         ;
+
+drop_ts_options_list:
+          /* empty */
+        | drop_ts_options
+
+drop_ts_options:
+          drop_ts_option
+        | drop_ts_options drop_ts_option
+        | drop_ts_options_list ',' drop_ts_option
+        ;
+
+drop_ts_option:
+          opt_ts_engine
+      	| ts_wait
+
 /*
 ** Insert : add new data to table
 */


Attachment: [text/bzr-bundle] bzr/jon.hauglid@sun.com-20090508141105-9clvr56bhqenmjee.bundle
Thread
bzr push into mysql-6.0-runtime branch (jon.hauglid:2773) Jon Olav Hauglid8 May