Bug #30208 CREATE TABLE ...LIKE does not eccespt dbname.tablename:unknown database
Submitted: 2 Aug 2007 15:32 Modified: 9 Nov 2007 5:15
Reporter: Horst Hunger Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.1.21-beta-debug OS:Linux
Assigned to: Assigned Account CPU Architecture:Any

[2 Aug 2007 15:32] Horst Hunger
Description:
the following sequence of SQL statements stopped with 
error 1049: Unknown database 'priv_test'.

CREATE DATABASE priv_test;
use information_schema;
CREATE TABLE priv_test.t0 (c1 int, c2 int);
CREATE TABLE priv_test.t1 AS select * FROM processlist;
select * from priv_test.t1;
CREATE TEMPORARY TABLE priv_test.ti_processlist LIKE processlist;

How to repeat:
Put the attached test to mysql-test/t.
execute 
perl mysql-test-run.pl bug
[2 Aug 2007 16:43] MySQL Verification Team
Thank you for the bug report. Verified as described.
[14 Sep 2007 17:03] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/34289

ChangeSet@1.2579, 2007-09-14 20:58:00+05:00, holyfoot@mysql.com +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
[9 Nov 2007 5:15] Sergei Glukhov
duplicate of Bug#25629