summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorunknown <iggy@recycle.(none)>2007-04-23 13:50:34 -0400
committerunknown <iggy@recycle.(none)>2007-04-23 13:50:34 -0400
commit6b573ac56281b26ef24122c5c87df13c541207af (patch)
tree0a3feb59e46ca016b13793a94e4d12c161d9e4bd /mysql-test/r
parent5ab8bf08b386877b658810b204bcbf7f912a2268 (diff)
downloadmariadb-git-6b573ac56281b26ef24122c5c87df13c541207af.tar.gz
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.
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/partition.result13
-rw-r--r--mysql-test/r/partition_not_windows.result27
-rw-r--r--mysql-test/r/partition_windows.result14
3 files changed, 41 insertions, 13 deletions
diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result
index 2e5fa4b9195..8e0ae617a6b 100644
--- a/mysql-test/r/partition.result
+++ b/mysql-test/r/partition.result
@@ -1087,19 +1087,6 @@ a
2
1
drop table t1;
-create table t1 (a int) engine myisam
-partition by range (a)
-subpartition by hash (a)
-(partition p0 VALUES LESS THAN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpdata' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpinx'
-(SUBPARTITION subpart00, SUBPARTITION subpart01));
-Checking if file exists before alter
-ALTER TABLE t1 REORGANIZE PARTITION p0 INTO
-(partition p1 VALUES LESS THAN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpdata' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpinx'
-(SUBPARTITION subpart10, SUBPARTITION subpart11),
-partition p2 VALUES LESS THAN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpdata' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpinx'
-(SUBPARTITION subpart20, SUBPARTITION subpart21));
-Checking if file exists after alter
-drop table t1;
create table t1 (a bigint unsigned not null, primary key(a))
engine = myisam
partition by key (a)
diff --git a/mysql-test/r/partition_not_windows.result b/mysql-test/r/partition_not_windows.result
new file mode 100644
index 00000000000..31ea300e8ed
--- /dev/null
+++ b/mysql-test/r/partition_not_windows.result
@@ -0,0 +1,27 @@
+create table t1 (a int) engine myisam
+partition by range (a)
+subpartition by hash (a)
+(partition p0 VALUES LESS THAN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpdata' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpinx'
+(SUBPARTITION subpart00, SUBPARTITION subpart01));
+Checking if file exists before alter
+ALTER TABLE t1 REORGANIZE PARTITION p0 INTO
+(partition p1 VALUES LESS THAN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpdata' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpinx'
+(SUBPARTITION subpart10, SUBPARTITION subpart11),
+partition p2 VALUES LESS THAN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpdata' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpinx'
+(SUBPARTITION subpart20, SUBPARTITION subpart21));
+Checking if file exists after alter
+drop table t1;
+DROP TABLE IF EXISTS `example`;
+CREATE TABLE `example` (
+`ID_EXAMPLE` int(10) unsigned NOT NULL AUTO_INCREMENT,
+`DESCRIPTION` varchar(30) NOT NULL,
+`LEVEL` smallint(5) unsigned DEFAULT NULL,
+PRIMARY KEY (`ID_EXAMPLE`)
+) ENGINE = MYISAM
+PARTITION BY HASH(ID_EXAMPLE)(
+PARTITION p0 DATA DIRECTORY = '/build/5.1/data/partitiontest/p0Data',
+PARTITION p1 DATA DIRECTORY = '/build/5.1/data/partitiontest/p1Data',
+PARTITION p2 DATA DIRECTORY = '/build/5.1/data/partitiontest/p2Data',
+PARTITION p3 DATA DIRECTORY = '/build/5.1/data/partitiontest/p3Data'
+);
+ERROR HY000: Can't create/write to file '/build/5.1/data/partitiontest/p0Data/example#P#p0.MYD' (Errcode: 2)
diff --git a/mysql-test/r/partition_windows.result b/mysql-test/r/partition_windows.result
new file mode 100644
index 00000000000..1fc9e2ba254
--- /dev/null
+++ b/mysql-test/r/partition_windows.result
@@ -0,0 +1,14 @@
+DROP TABLE IF EXISTS `example`;
+CREATE TABLE `example` (
+`ID_EXAMPLE` int(10) unsigned NOT NULL AUTO_INCREMENT,
+`DESCRIPTION` varchar(30) NOT NULL,
+`LEVEL` smallint(5) unsigned DEFAULT NULL,
+PRIMARY KEY (`ID_EXAMPLE`)
+) ENGINE = MYISAM
+PARTITION BY HASH(ID_EXAMPLE)(
+PARTITION p0 DATA DIRECTORY = 'C:/build/5.1/data/partitiontest/p0Data',
+PARTITION p1 DATA DIRECTORY = 'C:/build/5.1/data/partitiontest/p1Data',
+PARTITION p2 DATA DIRECTORY = 'C:/build/5.1/data/partitiontest/p2Data',
+PARTITION p3 DATA DIRECTORY = 'C:/build/5.1/data/partitiontest/p3Data'
+);
+ERROR HY000: Can't create/write to file 'C:\build\5.1\data\partitiontest\p0Data\example#P#p0.MYD' (Errcode: 2)