diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2010-03-20 15:01:47 +0300 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2010-03-20 15:01:47 +0300 |
commit | 7df026676b6d845cc0ed7a7437995c3019a5f42d (patch) | |
tree | dc051ac4712ac159b52fc2b48e5dd918cbc39799 /mysql-test/t/create.test | |
parent | f59d1dcf0acc12c482c28c902a0030f12ba263af (diff) | |
parent | f09ca00e088b316441bb76e97ba097bc9f3da7d3 (diff) | |
download | mariadb-git-7df026676b6d845cc0ed7a7437995c3019a5f42d.tar.gz |
Merge MariaDB-5.2 -> MariaDB 5.3
Diffstat (limited to 'mysql-test/t/create.test')
-rw-r--r-- | mysql-test/t/create.test | 72 |
1 files changed, 21 insertions, 51 deletions
diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index 63968caed94..f3cd48af543 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -721,16 +721,15 @@ drop table t1; # Base vs temporary tables dillema (a.k.a. bug#24508 "Inconsistent # results of CREATE TABLE ... SELECT when temporary table exists"). # In this situation we either have to create non-temporary table and -# insert data in it or insert data in temporary table without creation -# of permanent table. Since currently temporary tables always shadow -# permanent tables we adopt second approach. +# insert data in it or insert data in temporary table without creation of +# permanent table. After patch for Bug#47418, we create the base table and +# instert data into it, even though a temporary table exists with the same +# name. create temporary table t1 (j int); create table if not exists t1 select 1; select * from t1; drop temporary table t1; ---error ER_NO_SUCH_TABLE select * from t1; ---error ER_BAD_TABLE_ERROR drop table t1; @@ -1198,6 +1197,23 @@ CREATE TABLE IF NOT EXISTS t2 (a INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY) DROP TABLE t1, t2; +--echo # +--echo # BUG#46384 - mysqld segfault when trying to create table with same +--echo # name as existing view +--echo # + +CREATE TABLE t1 (a INT); +CREATE TABLE t2 (a INT); + +INSERT INTO t1 VALUES (1),(2),(3); +INSERT INTO t2 VALUES (1),(2),(3); + +CREATE VIEW v1 AS SELECT t1.a FROM t1, t2; +--error ER_TABLE_EXISTS_ERROR +CREATE TABLE v1 AS SELECT * FROM t1; + +DROP VIEW v1; +DROP TABLE t1,t2; --echo End of 5.0 tests @@ -1383,52 +1399,6 @@ drop table t1; --echo --echo # -- ---echo # -- Bug#21380: DEFAULT definition not always transfered by CREATE ---echo # -- TABLE/SELECT to the new table. ---echo # -- ---echo - - ---disable_warnings -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t2; ---enable_warnings - ---echo - -CREATE TABLE t1( - c1 INT DEFAULT 12 COMMENT 'column1', - c2 INT NULL COMMENT 'column2', - c3 INT NOT NULL COMMENT 'column3', - c4 VARCHAR(255) CHARACTER SET utf8 NOT NULL DEFAULT 'a', - c5 VARCHAR(255) COLLATE utf8_unicode_ci NULL DEFAULT 'b', - c6 VARCHAR(255)) - COLLATE latin1_bin; - ---echo - -SHOW CREATE TABLE t1; - ---echo - -CREATE TABLE t2 AS SELECT * FROM t1; - ---echo - -SHOW CREATE TABLE t2; - ---echo - -DROP TABLE t2; -DROP TABLE t1; - ---echo ---echo # -- End of test case for Bug#21380. - -########################################################################### - ---echo ---echo # -- --echo # -- Bug#18834: ALTER TABLE ADD INDEX on table with two timestamp fields --echo # -- --echo |