summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <Kristofer.Pettersson@naruto.>2006-12-14 16:02:43 +0100
committerunknown <Kristofer.Pettersson@naruto.>2006-12-14 16:02:43 +0100
commite21242fef8b79b2c679614a1999e10775f04e91c (patch)
treea66a953e3acafc6f24d20e3eaeaae53e1d4b2f42
parentddb182e53da6c1eae03d03f65c0fae5ea3c575c6 (diff)
parente78b4fc276f2d5caf8633d0906ebbc492f70ef8a (diff)
downloadmariadb-git-e21242fef8b79b2c679614a1999e10775f04e91c.tar.gz
Merge kpettersson@bk-internal:/home/bk/mysql-4.1-maint
into naruto.:C:/cpp/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 */