"CREATE TABLE ... LIKE ..." fails if source table has a FK constraint
Bug #622465 reported by
Hartmut Holzgraefe
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Drizzle |
Fix Released
|
Medium
|
Brian Aker | ||
7.0 |
Fix Released
|
Medium
|
Brian Aker |
Bug Description
how to reproduce:
drop table if exists `t3`;
drop table if exists `t2`;
drop table if exists `t1`;
create table t1 (id int primary key);
create table `t2` like `t1`;
alter table `t2` add foreign key (`id`) references `t1`(`id`);
create table `t3` like `t2`;
last statement fails with
ERROR 1005 (HY000): Can't create table 'test.t3' (errno: 121)
Related branches
lp:~brianaker/drizzle/regression-622465
- Lee Bieber (community): Needs Fixing
-
Diff: 402 lines (+120/-77) (has conflicts)10 files modifieddrizzled/cursor.h (+5/-5)
drizzled/error.cc (+1/-0)
drizzled/error_t.h (+11/-0)
drizzled/sql_table.cc (+59/-59)
drizzled/sql_table.h (+3/-3)
drizzled/statement/create_table.cc (+4/-3)
tests/r/create.result (+5/-5)
tests/suite/regression/r/622465.result (+12/-0)
tests/suite/regression/t/622465.test (+10/-0)
tests/t/create.test (+10/-2)
description: | updated |
Changed in drizzle: | |
importance: | Undecided → Medium |
Changed in drizzle: | |
assignee: | nobody → Travis Davies (travisdaveez) |
Changed in drizzle: | |
assignee: | Travis Davies (travisdaveez) → nobody |
Changed in drizzle: | |
assignee: | nobody → Brian Aker (brianaker) |
To post a comment you must log in.
to run test in my linked branch do:
cd tests; ./test-run --suite=broken create- table-like- with-fk- bug-lp622465
the test *should* pass without error but fails with:
drizzletest: At line 18: query 'CREATE TABLE t3 LIKE t2' failed: 1005: Can't create table 'test.t3' (errno: 121)