List:Commits« Previous MessageNext Message »
From:Ignacio Galarza Date:April 23 2007 5:51pm
Subject:bk commit into 5.1 tree (iggy:1.2598) BUG#25141
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of iggy. When iggy does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-04-23 13:50:34-04:00, iggy@recycle.(none) +7 -0
  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@stripped, 2007-04-23 13:50:32-04:00, iggy@recycle.(none) +0 -13
    Bug#25141 Crash Server on Partitioning command
    - Updated results

  mysql-test/r/partition_not_windows.result@stripped, 2007-04-23 13:50:32-04:00, iggy@recycle.(none) +27 -0
    Bug#25141 Crash Server on Partitioning command
    - Non-Windows results.

  mysql-test/r/partition_not_windows.result@stripped, 2007-04-23 13:50:32-04:00, iggy@recycle.(none) +0 -0

  mysql-test/r/partition_windows.result@stripped, 2007-04-23 13:50:32-04:00, iggy@recycle.(none) +14 -0
    Bug#25141 Crash Server on Partitioning command
    - Windows specific tests

  mysql-test/r/partition_windows.result@stripped, 2007-04-23 13:50:32-04:00, iggy@recycle.(none) +0 -0

  mysql-test/t/partition.test@stripped, 2007-04-23 13:50:32-04:00, iggy@recycle.(none) +0 -69
    Bug#25141 Crash Server on Partitioning command
    - Enable test on Windows.
    - Move failing Windows tests to partition_not_winodws test

  mysql-test/t/partition_not_windows.test@stripped, 2007-04-23 13:50:32-04:00, iggy@recycle.(none) +100 -0
    Bug#25141 Crash Server on Partitioning command
    - Non-Windows specific partition tests

  mysql-test/t/partition_not_windows.test@stripped, 2007-04-23 13:50:32-04:00, iggy@recycle.(none) +0 -0

  mysql-test/t/partition_windows.test@stripped, 2007-04-23 13:50:32-04:00, iggy@recycle.(none) +29 -0
    Bug#25141 Crash Server on Partitioning command
    - Windows specific partition tests.

  mysql-test/t/partition_windows.test@stripped, 2007-04-23 13:50:32-04:00, iggy@recycle.(none) +0 -0

  sql/sql_table.cc@stripped, 2007-04-23 13:50:32-04:00, iggy@recycle.(none) +2 -2
    Bug#25141 Crash Server on Partitioning command
    - Use OS specific path separator when building table_filename

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	iggy
# Host:	recycle.(none)
# Root:	/src/mysql-5.1-maint_25141

--- 1.407/sql/sql_table.cc	2007-04-11 17:42:22 -04:00
+++ 1.408/sql/sql_table.cc	2007-04-23 13:50:32 -04:00
@@ -182,8 +182,8 @@ uint build_table_filename(char *buff, si
     VOID(tablename_to_filename(table_name, tbbuff, sizeof(tbbuff)));
 
   VOID(tablename_to_filename(db, dbbuff, sizeof(dbbuff)));
-  length= strxnmov(buff, bufflen, mysql_data_home, "/", dbbuff,
-                   "/", tbbuff, ext, NullS) - buff;
+  length= strxnmov(buff, bufflen, mysql_data_home, FN_ROOTDIR, dbbuff,
+                   FN_ROOTDIR, tbbuff, ext, NullS) - buff;
   DBUG_PRINT("exit", ("buff: '%s'", buff));
   DBUG_RETURN(length);
 }
--- New file ---
+++ mysql-test/r/partition_not_windows.result	07/04/23 13:50:32
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)

--- New file ---
+++ mysql-test/r/partition_windows.result	07/04/23 13:50:32
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)

--- New file ---
+++ mysql-test/t/partition_not_windows.test	07/04/23 13:50:32
# Non-windows specific partition tests.
--source include/not_windows.inc
--source include/have_partition.inc

# partition.test used to contained the following note:
# This test is disabled on Windows due to BUG#19107
# All tests passed on Windows except the following which should be moved into
# partition.test once the bug has been resolved.

#
# 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

# End Windows specific test failures.

# These tests contain non-Windows specific directory/file format.

#
# Bug 25141: Crash Server on Partitioning command
#

--disable_warnings
DROP TABLE IF EXISTS `example`;
--enable_warnings

--disable_abort_on_error
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'
);
--enable_abort_on_error


--- New file ---
+++ mysql-test/t/partition_windows.test	07/04/23 13:50:32
# Windows-specific partition tests
--source include/windows.inc
--source include/have_partition.inc

# These tests contain Windows specific directory/file format.

#
# Bug 25141: Crash Server on Partitioning command
#

--disable_warnings
DROP TABLE IF EXISTS `example`;
--enable_warnings

--disable_abort_on_error
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'
);
--enable_abort_on_error



--- 1.60/mysql-test/r/partition.result	2007-03-29 09:42:25 -04:00
+++ 1.61/mysql-test/r/partition.result	2007-04-23 13:50:32 -04:00
@@ -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)

--- 1.54/mysql-test/t/partition.test	2007-03-29 09:42:25 -04:00
+++ 1.55/mysql-test/t/partition.test	2007-04-23 13:50:32 -04:00
@@ -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
@@ -1272,70 +1267,6 @@ partition by hash(a);
 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
Thread
bk commit into 5.1 tree (iggy:1.2598) BUG#25141Ignacio Galarza23 Apr