summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <thek@kpdesk.mysql.com>2006-12-14 16:09:15 +0100
committerunknown <thek@kpdesk.mysql.com>2006-12-14 16:09:15 +0100
commit833b235b1804714fa3ef7bb58157eb3fec003dfe (patch)
tree593b1b6b441746c8b855976d4269222d11a89a5a
parentc4b2bee9a11b4408b9fa338309094bf192d0df5b (diff)
parente21242fef8b79b2c679614a1999e10775f04e91c (diff)
downloadmariadb-git-833b235b1804714fa3ef7bb58157eb3fec003dfe.tar.gz
Merge kpettersson@bk-internal:/home/bk/mysql-4.1-maint
into kpdesk.mysql.com:/home/thek/dev/mysql-4.1-maint
-rw-r--r--mysql-test/r/windows.result6
-rw-r--r--mysql-test/t/windows.test9
-rw-r--r--sql/sql_parse.cc6
3 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/r/windows.result b/mysql-test/r/windows.result
index 039c5b1476e..1702fd28c18 100644
--- a/mysql-test/r/windows.result
+++ b/mysql-test/r/windows.result
@@ -6,3 +6,9 @@ use prn;
ERROR 42000: Unknown database 'prn'
create table nu (a int);
drop table nu;
+drop table if exists t1;
+CREATE TABLE t1 ( `ID` int(6) ) data directory 'c:/tmp/' index directory 'c:/tmp/' engine=MyISAM;
+Warnings:
+Warning 0 DATA DIRECTORY option ignored
+Warning 0 INDEX DIRECTORY option ignored
+drop table t1;
diff --git a/mysql-test/t/windows.test b/mysql-test/t/windows.test
index d6bcfeb8cb3..b5377a9b9b0 100644
--- a/mysql-test/t/windows.test
+++ b/mysql-test/t/windows.test
@@ -17,4 +17,13 @@ use prn;
create table nu (a int);
drop table nu;
+#
+# Bug17489: ailed to put data file in custom directory use "data directory" option
+#
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+CREATE TABLE t1 ( `ID` int(6) ) data directory 'c:/tmp/' index directory 'c:/tmp/' engine=MyISAM;
+drop table t1;
+
# End of 4.1 tests
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index cb2fa0f7014..9f443fae215 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -2485,6 +2485,12 @@ mysql_execute_command(THD *thd)
goto unsent_create_error;
#ifndef HAVE_READLINK
+ if (lex->create_info.data_file_name)
+ push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0,
+ "DATA DIRECTORY option ignored");
+ if (lex->create_info.index_file_name)
+ push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0,
+ "INDEX DIRECTORY option ignored");
lex->create_info.data_file_name=lex->create_info.index_file_name=0;
#else
/* Fix names if symlinked tables */