summaryrefslogtreecommitdiff
path: root/mysql-test/t/symlink.test
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2011-07-02 22:08:51 +0200
committerSergei Golubchik <sergii@pisem.net>2011-07-02 22:08:51 +0200
commit9809f05199aeb0b67991fac41bd86f38730768dc (patch)
treefa2792ff86d0da014b535d743759810612338042 /mysql-test/t/symlink.test
parent0accbd0364e0333e0b119aa9ce93e34ded9df6cb (diff)
parent5a0e7394a5ae0c7b6a1ea35b7ea3a8985325987a (diff)
downloadmariadb-git-9809f05199aeb0b67991fac41bd86f38730768dc.tar.gz
5.5-merge
Diffstat (limited to 'mysql-test/t/symlink.test')
-rw-r--r--mysql-test/t/symlink.test40
1 files changed, 33 insertions, 7 deletions
diff --git a/mysql-test/t/symlink.test b/mysql-test/t/symlink.test
index 7472c9c0d26..02c3b219a06 100644
--- a/mysql-test/t/symlink.test
+++ b/mysql-test/t/symlink.test
@@ -39,7 +39,8 @@ drop table t2;
#
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
-eval create table t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam data directory="$MYSQLTEST_VARDIR/tmp" index directory="$MYSQLTEST_VARDIR/run";
+eval create table t9 (a int not null auto_increment, b char(16) not null, primary key (a))
+engine=myisam data directory="$MYSQLTEST_VARDIR/tmp" index directory="$MYSQLTEST_VARDIR/run";
insert into t9 select * from t1;
check table t9;
@@ -71,21 +72,25 @@ SHOW CREATE TABLE t9;
create database mysqltest;
--error 1,1
-create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="/this-dir-does-not-exist";
+create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a))
+engine=myisam index directory="/this-dir-does-not-exist";
# temporarily disabled as it returns different result in the embedded server
-# --error ER_WRONG_ARGUMENTS, ER_WRONG_ARGUMENTS
-# create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="not-hard-path";
+--error ER_WRONG_TABLE_NAME
+create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a))
+engine=myisam index directory="not-hard-path";
# Should fail becasue the file t9.MYI already exist in 'run'
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---error 1,156
-eval create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="$MYSQLTEST_VARDIR/run";
+--error 1,ER_UNKNOWN_ERROR
+eval create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a))
+engine=myisam index directory="$MYSQLTEST_VARDIR/run";
# Should fail becasue the file t9.MYD already exist in 'tmp'
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--error 1,1
-eval create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam data directory="$MYSQLTEST_VARDIR/tmp";
+eval create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a))
+engine=myisam data directory="$MYSQLTEST_VARDIR/tmp";
# Check moving table t9 from default database to mysqltest;
# In this case the symlinks should be removed.
@@ -272,3 +277,24 @@ SELECT * FROM mysql.user;
--remove_file $MYSQL_TMP_DIR/mysql
--echo End of 5.1 tests
+
+
+--echo #
+--echo # Test for bug #11759990 - "52354: 'CREATE TABLE .. LIKE ... '
+--echo # STATEMENTS FAIL".
+--echo #
+--disable_warnings
+drop table if exists t1, t2;
+--enable_warnings
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+eval create table t1 (a int primary key) engine=myisam
+ data directory="$MYSQLTEST_VARDIR/tmp"
+ index directory="$MYSQLTEST_VARDIR/run";
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+show create table t1;
+--echo # CREATE TABLE LIKE statement on table with INDEX/DATA DIRECTORY
+--echo # options should not fail. Per documentation newly created table
+--echo # should not inherit value of these options from the original table.
+create table t2 like t1;
+show create table t2;
+drop tables t1, t2;