Bug #24633 SQL MODE "NO_DIR_IN_CREATE" does not work with
partitioned tables" We have to ignore 'data directory' and 'index directory' parameters if NO_DIR_IN_CREATE set. mysql-test/r/partition.result: result fixed mysql-test/t/partition.test: testcase sql/partition_info.cc: clear data_field_name and index_field_name if NO_DIR_IN_CREATE set
This commit is contained in:
parent
84ceb01eb6
commit
32a19db380
@ -1219,4 +1219,17 @@ SELECT t2.id FROM t2 WHERE t2.id IN (SELECT id FROM t1 WHERE status = 'Verified'
|
||||
id
|
||||
22589
|
||||
drop table t1, t2;
|
||||
set @org_mode=@@sql_mode;
|
||||
set @@sql_mode='NO_DIR_IN_CREATE';
|
||||
select @@sql_mode;
|
||||
@@sql_mode
|
||||
NO_DIR_IN_CREATE
|
||||
create table t1 (i int )
|
||||
partition by range (i)
|
||||
(
|
||||
partition p01 values less than (1000)
|
||||
data directory='/not/existing'
|
||||
index directory='/not/existing'
|
||||
);
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
@ -1463,4 +1463,21 @@ SELECT t2.id FROM t2 WHERE t2.id IN (SELECT id FROM t1 WHERE status = 'Verified'
|
||||
|
||||
drop table t1, t2;
|
||||
|
||||
#
|
||||
# Bug #24633 SQL MODE "NO_DIR_IN_CREATE" does not work with partitioned tables
|
||||
#
|
||||
|
||||
set @org_mode=@@sql_mode;
|
||||
set @@sql_mode='NO_DIR_IN_CREATE';
|
||||
select @@sql_mode;
|
||||
create table t1 (i int )
|
||||
partition by range (i)
|
||||
(
|
||||
partition p01 values less than (1000)
|
||||
data directory='/not/existing'
|
||||
index directory='/not/existing'
|
||||
);
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
@ -776,6 +776,8 @@ bool partition_info::check_partition_info(THD *thd, handlerton **eng_type,
|
||||
partition_element *part_elem= part_it++;
|
||||
if (part_elem->engine_type == NULL)
|
||||
part_elem->engine_type= default_engine_type;
|
||||
if (thd->variables.sql_mode & MODE_NO_DIR_IN_CREATE)
|
||||
part_elem->data_file_name= part_elem->index_file_name= 0;
|
||||
if (!is_sub_partitioned())
|
||||
{
|
||||
if (check_table_name(part_elem->partition_name,
|
||||
|
Loading…
x
Reference in New Issue
Block a user