summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <svoj@may.pils.ru>2006-06-27 22:22:43 +0500
committerunknown <svoj@may.pils.ru>2006-06-27 22:22:43 +0500
commitf4a07612efd66a559fe06810deee5e38cd96d03c (patch)
tree13ac1a9a7bfa8570b98f54958bec2a28eee498aa /sql
parent82d127b55bbbeaf7fa263122365143f7727b7f10 (diff)
downloadmariadb-git-f4a07612efd66a559fe06810deee5e38cd96d03c.tar.gz
BUG#1662 - ALTER TABLE LIKE ignores DATA/INDEX DIRECTPORY
Produce a warning if DATA/INDEX DIRECTORY is specified in ALTER TABLE statement. Ignoring of these options is documented in the symbolic links section of the manual. mysql-test/r/symlink.result: Modified test result according to fix for BUG#1662. sql/sql_parse.cc: Produce a warning if DATA/INDEX DIRECTORY is specified in ALTER TABLE statement.
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_parse.cc6
1 files changed, 6 insertions, 0 deletions
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))