mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
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.
This commit is contained in:
@ -1219,4 +1219,17 @@ SELECT t2.id FROM t2 WHERE t2.id IN (SELECT id FROM t1 WHERE status = 'Verified'
|
|||||||
id
|
id
|
||||||
22589
|
22589
|
||||||
drop table t1, t2;
|
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
|
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;
|
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
|
--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++;
|
partition_element *part_elem= part_it++;
|
||||||
if (part_elem->engine_type == NULL)
|
if (part_elem->engine_type == NULL)
|
||||||
part_elem->engine_type= default_engine_type;
|
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 (!is_sub_partitioned())
|
||||||
{
|
{
|
||||||
if (check_table_name(part_elem->partition_name,
|
if (check_table_name(part_elem->partition_name,
|
||||||
|
Reference in New Issue
Block a user