summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mysql-test/r/symlink.result6
-rw-r--r--sql/sql_parse.cc6
2 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/r/symlink.result b/mysql-test/r/symlink.result
index caff53f8fd7..f6779689133 100644
--- a/mysql-test/r/symlink.result
+++ b/mysql-test/r/symlink.result
@@ -65,18 +65,24 @@ t9 CREATE TABLE `t9` (
) ENGINE=MyISAM AUTO_INCREMENT=16725 DEFAULT CHARSET=latin1 DATA DIRECTORY='TEST_DIR/var/tmp/' INDEX DIRECTORY='TEST_DIR/var/run/'
drop database mysqltest;
create table t1 (a int not null) engine=myisam;
+Warnings:
+Warning 0 DATA DIRECTORY option ignored
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL default '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
alter table t1 add b int;
+Warnings:
+Warning 0 DATA DIRECTORY option ignored
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL default '0',
`b` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
+Warnings:
+Warning 0 INDEX DIRECTORY option ignored
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 504339684ce..fbe36bfdc4a 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -2678,6 +2678,12 @@ unsent_create_error:
}
}
/* Don't yet allow changing of symlinks with ALTER TABLE */
+ 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;
/* ALTER TABLE ends previous transaction */
if (end_active_trans(thd))