List:Commits« Previous MessageNext Message »
From:konstantin Date:April 16 2008 11:27pm
Subject:bk commit into 5.1 tree (kostja:1.2591)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of kostja.  When kostja 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@stripped, 2008-04-17 03:27:14+04:00, kostja@bodhi.(none) +2 -0
  Fix create.test in --ps-protocol broken by the previous push.

  sql/sql_table.cc@stripped, 2008-04-17 03:27:11+04:00, kostja@bodhi.(none) +0 -3
    Fix create.test in --ps-protocol broken by the previous push,
    that added prepared statement validation of CREATE TABLE LIKE:
    move assignment of src_table->required_type to the parser.

  sql/sql_yacc.yy@stripped, 2008-04-17 03:27:11+04:00, kostja@bodhi.(none) +12 -2
    Fix create.test in --ps-protocol broken by the previous push,
    that added prepared statement validation of CREATE TABLE LIKE:
    move assignment of src_table->required_type to the parser.

diff -Nrup a/sql/sql_table.cc b/sql/sql_table.cc
--- a/sql/sql_table.cc	2008-03-27 14:54:44 +03:00
+++ b/sql/sql_table.cc	2008-04-17 03:27:11 +04:00
@@ -4775,9 +4775,6 @@ bool mysql_create_like_table(THD* thd, T
   DBUG_ENTER("mysql_create_like_table");
 
 
-  /* CREATE TABLE ... LIKE is not allowed for views. */
-  src_table->required_type= FRMTYPE_TABLE;
-
   /*
     By opening source table we guarantee that it exists and no concurrent
     DDL operation will mess with it. Later we also take an exclusive
diff -Nrup a/sql/sql_yacc.yy b/sql/sql_yacc.yy
--- a/sql/sql_yacc.yy	2008-03-26 12:13:08 +03:00
+++ b/sql/sql_yacc.yy	2008-04-17 03:27:11 +04:00
@@ -3577,20 +3577,30 @@ create2:
         | LIKE table_ident
           {
             THD *thd= YYTHD;
+            TABLE_LIST *src_table;
             LEX *lex= thd->lex;
 
             lex->create_info.options|= HA_LEX_CREATE_TABLE_LIKE;
-            if (!lex->select_lex.add_table_to_list(thd, $2, NULL, 0, TL_READ))
+            src_table= lex->select_lex.add_table_to_list(thd, $2, NULL, 0,
+                                                         TL_READ);
+            if (! src_table)
               MYSQL_YYABORT;
+            /* CREATE TABLE ... LIKE is not allowed for views. */
+            src_table->required_type= FRMTYPE_TABLE;
           }
         | '(' LIKE table_ident ')'
           {
             THD *thd= YYTHD;
+            TABLE_LIST *src_table;
             LEX *lex= thd->lex;
 
             lex->create_info.options|= HA_LEX_CREATE_TABLE_LIKE;
-            if (!lex->select_lex.add_table_to_list(thd, $3, NULL, 0, TL_READ))
+            src_table= lex->select_lex.add_table_to_list(thd, $3, NULL, 0,
+                                                         TL_READ);
+            if (! src_table)
               MYSQL_YYABORT;
+            /* CREATE TABLE ... LIKE is not allowed for views. */
+            src_table->required_type= FRMTYPE_TABLE;
           }
         ;
 
Thread
bk commit into 5.1 tree (kostja:1.2591)konstantin17 Apr