List:Internals« Previous MessageNext Message »
From:Georg Richter Date:August 1 2005 11:54am
Subject:bk commit into 5.0 tree (georg:1.1912) BUG#6859
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of georg. When georg 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.1912 05/08/01 11:54:05 georg@stripped +1 -0
  fix for bug#6859 (Bogus error message on attempt to CREATE 
  TABLE t LIKE view)
  
  Added check to mysql_create_like_table which returns an error, if
  the specified table hasn't a valid table type (e.g. trigger or view)

  sql/sql_table.cc
    1.266 05/08/01 11:53:58 georg@stripped +9 -0
    fix for bug#6859 (Bogus error message on attempt to CREATE 
    TABLE t LIKE view)
    
    Added check to mysql_create_like_table which returns an error, if
    the specified table hasn't a valid table type (e.g. trigger or view)

# 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:	georg
# Host:	lmy002.wdf.sap.corp
# Root:	/home/georg/work/mysql/prod/mysql-5.0

--- 1.265/sql/sql_table.cc	2005-07-28 16:09:49 +02:00
+++ 1.266/sql/sql_table.cc	2005-08-01 11:53:58 +02:00
@@ -2629,6 +2629,15 @@
     }
   }
 
+  /* 
+     create like should be not allowed for Views, Triggers, ... 
+  */
+  if (get_table_type(thd,src_path) == DB_TYPE_UNKNOWN)
+  {
+    my_error(ER_NO_SUCH_TABLE, MYF(0), src_db, src_table);
+    DBUG_RETURN(-1);
+  }
+
   /*
     Validate the destination table
 
Thread
bk commit into 5.0 tree (georg:1.1912) BUG#6859Georg Richter1 Aug