mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 20:07:13 +02:00
Bug#25141 Crash Server on Partitioning command
- The function build_table_filename() builds up a string unconditionally using the forward slash as a path separator. Later, when the string is searched for FN_LIBCHAR by the set_up_table_before_create() function, a null pointer is returned that is finally used by strlen in the append_file_to_dir() function which causes the crash. mysql-test/r/partition.result: Bug#25141 Crash Server on Partitioning command - Updated results mysql-test/t/partition.test: Bug#25141 Crash Server on Partitioning command - Enable test on Windows. - Move failing Windows tests to partition_not_winodws test sql/sql_table.cc: Bug#25141 Crash Server on Partitioning command - Use OS specific path separator when building table_filename mysql-test/r/partition_not_windows.result: Bug#25141 Crash Server on Partitioning command - Non-Windows results. mysql-test/r/partition_windows.result: Bug#25141 Crash Server on Partitioning command - Windows specific tests mysql-test/t/partition_not_windows.test: Bug#25141 Crash Server on Partitioning command - Non-Windows specific partition tests mysql-test/t/partition_windows.test: Bug#25141 Crash Server on Partitioning command - Windows specific partition tests.
This commit is contained in:
parent
5ab8bf08b3
commit
6b573ac562
7 changed files with 172 additions and 84 deletions
|
|
@ -5,11 +5,6 @@
|
|||
#
|
||||
-- source include/have_partition.inc
|
||||
|
||||
#
|
||||
# This test is disabled on Windows due to BUG#19107
|
||||
#
|
||||
-- source include/not_windows.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
|
@ -1273,70 +1268,6 @@ insert into t1 values (1),(2);
|
|||
select * from t1 ORDER BY a DESC;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug 20770 Partitions: DATA DIRECTORY clause change in reorganize
|
||||
# doesn't remove old directory
|
||||
#
|
||||
--disable_query_log
|
||||
--exec mkdir $MYSQLTEST_VARDIR/master-data/tmpdata || true
|
||||
eval SET @data_dir = 'DATA DIRECTORY = ''$MYSQLTEST_VARDIR/master-data/tmpdata''';
|
||||
let $data_directory = `select @data_dir`;
|
||||
|
||||
--exec mkdir $MYSQLTEST_VARDIR/master-data/tmpinx || true
|
||||
eval SET @inx_dir = 'INDEX DIRECTORY = ''$MYSQLTEST_VARDIR/master-data/tmpinx''';
|
||||
let $inx_directory = `select @inx_dir`;
|
||||
--enable_query_log
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
eval create table t1 (a int) engine myisam
|
||||
partition by range (a)
|
||||
subpartition by hash (a)
|
||||
(partition p0 VALUES LESS THAN (1) $data_directory $inx_directory
|
||||
(SUBPARTITION subpart00, SUBPARTITION subpart01));
|
||||
|
||||
--echo Checking if file exists before alter
|
||||
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0#SP#subpart00.MYD
|
||||
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0#SP#subpart00.MYI
|
||||
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0#SP#subpart01.MYD
|
||||
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0#SP#subpart01.MYI
|
||||
--file_exists $MYSQLTEST_VARDIR/master-data/tmpdata/t1#P#p0#SP#subpart00.MYD
|
||||
--file_exists $MYSQLTEST_VARDIR/master-data/tmpdata/t1#P#p0#SP#subpart01.MYD
|
||||
--file_exists $MYSQLTEST_VARDIR/master-data/tmpinx/t1#P#p0#SP#subpart00.MYI
|
||||
--file_exists $MYSQLTEST_VARDIR/master-data/tmpinx/t1#P#p0#SP#subpart01.MYI
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
eval ALTER TABLE t1 REORGANIZE PARTITION p0 INTO
|
||||
(partition p1 VALUES LESS THAN (1) $data_directory $inx_directory
|
||||
(SUBPARTITION subpart10, SUBPARTITION subpart11),
|
||||
partition p2 VALUES LESS THAN (2) $data_directory $inx_directory
|
||||
(SUBPARTITION subpart20, SUBPARTITION subpart21));
|
||||
|
||||
--echo Checking if file exists after alter
|
||||
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1#SP#subpart10.MYD
|
||||
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1#SP#subpart10.MYI
|
||||
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1#SP#subpart11.MYD
|
||||
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1#SP#subpart11.MYI
|
||||
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p2#SP#subpart20.MYD
|
||||
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p2#SP#subpart20.MYI
|
||||
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p2#SP#subpart21.MYD
|
||||
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p2#SP#subpart21.MYI
|
||||
--file_exists $MYSQLTEST_VARDIR/master-data/tmpdata/t1#P#p1#SP#subpart10.MYD
|
||||
--file_exists $MYSQLTEST_VARDIR/master-data/tmpdata/t1#P#p1#SP#subpart11.MYD
|
||||
--file_exists $MYSQLTEST_VARDIR/master-data/tmpdata/t1#P#p2#SP#subpart20.MYD
|
||||
--file_exists $MYSQLTEST_VARDIR/master-data/tmpdata/t1#P#p2#SP#subpart21.MYD
|
||||
--file_exists $MYSQLTEST_VARDIR/master-data/tmpinx/t1#P#p1#SP#subpart10.MYI
|
||||
--file_exists $MYSQLTEST_VARDIR/master-data/tmpinx/t1#P#p1#SP#subpart11.MYI
|
||||
--file_exists $MYSQLTEST_VARDIR/master-data/tmpinx/t1#P#p2#SP#subpart20.MYI
|
||||
--file_exists $MYSQLTEST_VARDIR/master-data/tmpinx/t1#P#p2#SP#subpart21.MYI
|
||||
|
||||
drop table t1;
|
||||
--exec rmdir $MYSQLTEST_VARDIR/master-data/tmpdata || true
|
||||
--exec rmdir $MYSQLTEST_VARDIR/master-data/tmpinx || true
|
||||
|
||||
#
|
||||
# Bug 21388: Bigint fails to find record
|
||||
#
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue