MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:holyfoot Date:September 14 2007 3:58pm
Subject:bk commit into 5.1 tree (holyfoot:1.2579) BUG#30208
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of hf. When hf 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, 2007-09-14 20:58:00+05:00, holyfoot@stripped +4 -0
  Bug #30208 CREATE TABLE ...LIKE does not eccespt dbname.tablename:unknown database.
  
  CREATE TABLE LIKE supposed to create an exact copy of a table, and
  that is difficult to implement with a virtual table that INFORMATION
  SCHEMA tables.
  So CREATE TABLE LIKE is_table is disabled

  mysql-test/r/information_schema.result@stripped, 2007-09-14 20:54:31+05:00, holyfoot@stripped +2 -0
    Bug #30208 CREATE TABLE ...LIKE does not eccespt dbname.tablename:unknown database.
    test result

  mysql-test/t/information_schema.test@stripped, 2007-09-14 20:57:58+05:00, holyfoot@stripped +3 -0
    Bug #30208 CREATE TABLE ...LIKE does not eccespt dbname.tablename:unknown database.
    test case

  sql/share/errmsg.txt@stripped, 2007-09-14 20:57:58+05:00, holyfoot@stripped +3 -0
    Bug #30208 CREATE TABLE ...LIKE does not eccespt dbname.tablename:unknown database.
    
    error message added

  sql/sql_table.cc@stripped, 2007-09-14 20:57:58+05:00, holyfoot@stripped +5 -0
    Bug #30208 CREATE TABLE ...LIKE does not eccespt dbname.tablename:unknown database.
    
    error issued for CREATE TABLE LIKE schema_table

diff -Nrup a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result
--- a/mysql-test/r/information_schema.result	2007-07-17 00:31:32 +05:00
+++ b/mysql-test/r/information_schema.result	2007-09-14 20:54:31 +05:00
@@ -1445,4 +1445,6 @@ ABORTED_CONNECTS
 BINLOG_CACHE_DISK_USE
 DROP TABLE server_status;
 SET GLOBAL event_scheduler=0;
+CREATE TEMPORARY TABLE t1 LIKE information_schema.processlist;
+ERROR HY000: Information schema table `processlist` cannot be used in CREATE TABLE LIKE
 End of 5.1 tests.
diff -Nrup a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test
--- a/mysql-test/t/information_schema.test	2007-07-17 00:31:33 +05:00
+++ b/mysql-test/t/information_schema.test	2007-09-14 20:57:58 +05:00
@@ -1100,4 +1100,7 @@ SELECT variable_name FROM server_status;
 DROP TABLE server_status;
 SET GLOBAL event_scheduler=0;
 
+--error ER_SCHEMA_TABLE_CREATE_LIKE
+CREATE TEMPORARY TABLE t1 LIKE information_schema.processlist;
+
 --echo End of 5.1 tests.
diff -Nrup a/sql/share/errmsg.txt b/sql/share/errmsg.txt
--- a/sql/share/errmsg.txt	2007-07-18 00:36:41 +05:00
+++ b/sql/share/errmsg.txt	2007-09-14 20:57:58 +05:00
@@ -6105,3 +6105,6 @@ ER_EVENT_INVALID_CREATION_CTX
 
 ER_TRG_CANT_OPEN_TABLE
   eng "Cannot open table for trigger `%-.64s`.`%-.64s`"
+
+ER_SCHEMA_TABLE_CREATE_LIKE
+  eng "Information schema table `%-.64s` cannot be used in CREATE TABLE LIKE"
diff -Nrup a/sql/sql_table.cc b/sql/sql_table.cc
--- a/sql/sql_table.cc	2007-07-30 20:34:00 +05:00
+++ b/sql/sql_table.cc	2007-09-14 20:57:58 +05:00
@@ -4553,6 +4553,11 @@ bool mysql_create_like_table(THD* thd, T
   DBUG_ENTER("mysql_create_like_table");
 
 
+  if (src_table->schema_table)
+  {
+    my_error(ER_SCHEMA_TABLE_CREATE_LIKE,MYF(0),src_table->alias);
+    DBUG_RETURN(TRUE);
+  }
   /* CREATE TABLE ... LIKE is not allowed for views. */
   src_table->required_type= FRMTYPE_TABLE;
 
Thread
bk commit into 5.1 tree (holyfoot:1.2579) BUG#30208holyfoot14 Sep
  • Re: bk commit into 5.1 tree (holyfoot:1.2579) BUG#30208Sergei Golubchik28 Sep