Commit ab8039ca authored by unknown's avatar unknown

Merge bk-internal:/home/bk/mysql-5.1-new-maint

into  pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint

parents 67a9f239 6ed58d79
......@@ -5,7 +5,6 @@
*.bb
*.bbg
*.bin
*.cmake
*.core
*.d
*.da
......@@ -32,6 +31,7 @@
*.spec
*.user
*.vcproj
*.vcproj.cmake
*/*.dir/*
*/*_pure_*warnings
*/.deps
......@@ -394,6 +394,7 @@ client/tmp.diff
client_debug/*
client_release/*
client_test
cmake_install.cmake
cmd-line-utils/libedit/.deps/chared.Po
cmd-line-utils/libedit/.deps/common.Po
cmd-line-utils/libedit/.deps/el.Po
......
......@@ -134,6 +134,33 @@ ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR
ADD_DEFINITIONS("-D_WINDOWS -D__WIN__ -D _CRT_SECURE_NO_DEPRECATE")
IF(EMBED_MANIFESTS)
# Search for the Manifest tool. CMake will first search it's defaults
# (CMAKE_FRAMEWORK_PATH, CMAKE_APPBUNDLE_PATH, CMAKE_PROGRAM_PATH and
# the system PATH) followed by the listed paths which are the current
# possible defaults and should be updated when necessary. The custom
# manifests are designed to be compatible with all mt versions.
FIND_PROGRAM(HAVE_MANIFEST_TOOL NAMES mt
PATHS
"$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/VC/bin"
"$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/Common7/Tools/Bin"
"$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/SDK/v2.0/Bin")
IF(HAVE_MANIFEST_TOOL)
MESSAGE(STATUS "Found Mainfest Tool. Embedding custom manifests.")
ELSE(HAVE_MANIFEST_TOOL)
MESSAGE(FATAL_ERROR "Manifest tool, mt.exe, can't be found.")
ENDIF(HAVE_MANIFEST_TOOL)
# Disable automatic manifest generation.
STRING(REPLACE "/MANIFEST" "/MANIFEST:NO" CMAKE_EXE_LINKER_FLAGS
${CMAKE_EXE_LINKER_FLAGS})
# Set the processor architecture.
IF(CMAKE_GENERATOR MATCHES "Visual Studio 8 2005 Win64")
SET(PROCESSOR_ARCH "X64")
ELSE(CMAKE_GENERATOR MATCHES "Visual Studio 8 2005 Win64")
SET(PROCESSOR_ARCH "X86")
ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 8 2005 Win64")
ENDIF(EMBED_MANIFESTS)
ADD_SUBDIRECTORY(vio)
ADD_SUBDIRECTORY(dbug)
ADD_SUBDIRECTORY(strings)
......
......@@ -12,6 +12,7 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
INCLUDE("${PROJECT_SOURCE_DIR}/win/mysql_manifest.cmake")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
......@@ -101,3 +102,15 @@ TARGET_LINK_LIBRARIES(mysqlslap mysqlclient mysys yassl taocrypt zlib wsock32 db
ADD_EXECUTABLE(echo echo.c)
IF(EMBED_MANIFESTS)
MYSQL_EMBED_MANIFEST("mysql" "asInvoker")
MYSQL_EMBED_MANIFEST("mysqltest" "asInvoker")
MYSQL_EMBED_MANIFEST("mysqlcheck" "asInvoker")
MYSQL_EMBED_MANIFEST("mysqldump" "asInvoker")
MYSQL_EMBED_MANIFEST("mysqlimport" "asInvoker")
MYSQL_EMBED_MANIFEST("mysql_upgrade" "asInvoker")
MYSQL_EMBED_MANIFEST("mysqlshow" "asInvoker")
MYSQL_EMBED_MANIFEST("mysqlbinlog" "asInvoker")
MYSQL_EMBED_MANIFEST("mysqladmin" "asInvoker")
MYSQL_EMBED_MANIFEST("echo" "asInvoker")
ENDIF(EMBED_MANIFESTS)
......@@ -12,6 +12,7 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
INCLUDE("${PROJECT_SOURCE_DIR}/win/mysql_manifest.cmake")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
......@@ -45,3 +46,7 @@ TARGET_LINK_LIBRARIES(perror strings mysys dbug wsock32)
ADD_EXECUTABLE(replace replace.c)
TARGET_LINK_LIBRARIES(replace strings mysys dbug wsock32)
IF(EMBED_MANIFESTS)
MYSQL_EMBED_MANIFEST("myTest" "asInvoker")
ENDIF(EMBED_MANIFESTS)
......@@ -15,6 +15,8 @@
# Need to set USE_TLS, since __declspec(thread) approach to thread local
# storage does not work properly in DLLs.
INCLUDE("${PROJECT_SOURCE_DIR}/win/mysql_manifest.cmake")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_TLS")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_TLS")
......@@ -67,3 +69,7 @@ TARGET_LINK_LIBRARIES(libmysql mysys strings wsock32)
ADD_EXECUTABLE(myTest mytest.c)
TARGET_LINK_LIBRARIES(myTest libmysql)
IF(EMBED_MANIFESTS)
MYSQL_EMBED_MANIFEST("myTest" "asInvoker")
ENDIF(EMBED_MANIFESTS)
......@@ -660,6 +660,17 @@ delete from mysql.db where user='mysqltest1';
delete from mysql.tables_priv where user='mysqltest1';
flush privileges;
drop database mysqltest;
create database db27515;
use db27515;
create table t1 (a int);
grant alter on db27515.t1 to user27515@localhost;
grant insert, create on db27515.t2 to user27515@localhost;
rename table t1 to t2;
ERROR 42000: DROP command denied to user 'user27515'@'localhost' for table 't1'
revoke all privileges, grant option from user27515@localhost;
drop user user27515@localhost;
drop database db27515;
End of 4.1 tests
use test;
create table t1 (a int);
create table t2 as select * from mysql.user where user='';
......@@ -968,7 +979,7 @@ Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost'
GRANT SELECT ON `mysqltest1`.`t1` TO 'mysqltest_1'@'localhost'
RENAME TABLE t1 TO t2;
ERROR 42000: ALTER command denied to user 'mysqltest_1'@'localhost' for table 't1'
ERROR 42000: DROP,ALTER command denied to user 'mysqltest_1'@'localhost' for table 't1'
ALTER TABLE t1 RENAME TO t2;
ERROR 42000: DROP,ALTER command denied to user 'mysqltest_1'@'localhost' for table 't1'
GRANT DROP ON mysqltest1.t1 TO mysqltest_1@localhost;
......@@ -1009,11 +1020,12 @@ GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost'
GRANT SELECT, CREATE, ALTER ON `mysqltest1`.`t2` TO 'mysqltest_1'@'localhost'
GRANT SELECT, CREATE, ALTER ON `mysqltest1`.`t1` TO 'mysqltest_1'@'localhost'
RENAME TABLE t1 TO t2;
ERROR 42000: INSERT command denied to user 'mysqltest_1'@'localhost' for table 't2'
ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table 't1'
ALTER TABLE t1 RENAME TO t2;
ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table 't1'
DROP USER mysqltest_1@localhost;
DROP DATABASE mysqltest1;
USE test;
GRANT CREATE ON mysqltest.* TO 1234567890abcdefGHIKL@localhost;
ERROR HY000: String '1234567890abcdefGHIKL' is too long for user name (should be no longer than 16)
GRANT CREATE ON mysqltest.* TO some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY;
......
......@@ -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)
......
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)
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)
......@@ -542,7 +542,28 @@ delete from mysql.tables_priv where user='mysqltest1';
flush privileges;
drop database mysqltest;
# End of 4.1 tests
#
# Bug #27515: DROP previlege is not required for RENAME TABLE
#
connection master;
create database db27515;
use db27515;
create table t1 (a int);
grant alter on db27515.t1 to user27515@localhost;
grant insert, create on db27515.t2 to user27515@localhost;
connect (conn27515, localhost, user27515, , db27515);
connection conn27515;
--error 1142
rename table t1 to t2;
disconnect conn27515;
connection master;
revoke all privileges, grant option from user27515@localhost;
drop user user27515@localhost;
drop database db27515;
--echo End of 4.1 tests
#
# Bug #16297 In memory grant tables not flushed when users's hostname is ""
......@@ -899,6 +920,7 @@ ALTER TABLE t1 RENAME TO t2;
DROP USER mysqltest_1@localhost;
DROP DATABASE mysqltest1;
USE test;
# Working with database-level privileges.
......
......@@ -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
#
......
# 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
# 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
......@@ -12,6 +12,7 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
INCLUDE("${PROJECT_SOURCE_DIR}/win/mysql_manifest.cmake")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
......@@ -31,3 +32,7 @@ ADD_EXECUTABLE(mysqlmanager buffer.cc command.cc commands.cc guardian.cc instanc
ADD_DEPENDENCIES(mysqlmanager GenError)
TARGET_LINK_LIBRARIES(mysqlmanager dbug mysys strings taocrypt vio yassl zlib wsock32)
IF(EMBED_MANIFESTS)
MYSQL_EMBED_MANIFEST("mysqlmanager" "asInvoker")
ENDIF(EMBED_MANIFESTS)
......@@ -12,6 +12,7 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
INCLUDE("${PROJECT_SOURCE_DIR}/win/mysql_manifest.cmake")
SET(CMAKE_CXX_FLAGS_DEBUG
"${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_SYMDIR")
......@@ -82,6 +83,10 @@ ADD_EXECUTABLE(mysqld ../sql-common/client.c derror.cc des_key_file.cc
${PROJECT_SOURCE_DIR}/sql/lex_hash.h)
TARGET_LINK_LIBRARIES(mysqld heap myisam myisammrg mysys yassl zlib dbug yassl
taocrypt strings vio regex wsock32 ws2_32)
IF(EMBED_MANIFESTS)
MYSQL_EMBED_MANIFEST("mysqld" "requireAdministrator")
ENDIF(EMBED_MANIFESTS)
IF(WITH_ARCHIVE_STORAGE_ENGINE)
TARGET_LINK_LIBRARIES(mysqld archive)
ENDIF(WITH_ARCHIVE_STORAGE_ENGINE)
......
......@@ -6260,7 +6260,7 @@ bool Rows_log_event::write_data_body(IO_CACHE*file)
reinterpret_cast<byte*>(m_cols_ai.bitmap),
no_bytes_in_map(&m_cols_ai));
}
DBUG_DUMP("rows", m_rows_buf, data_size);
DBUG_DUMP("rows",(const char *) m_rows_buf, data_size);
res= res || my_b_safe_write(file, m_rows_buf, (uint) data_size);
return res;
......@@ -6979,7 +6979,7 @@ replace_record(THD *thd, TABLE *table,
auto_afree_ptr<char> key(NULL);
#ifndef DBUG_OFF
DBUG_DUMP("record[0]", table->record[0], table->s->reclength);
DBUG_DUMP("record[0]",(const char *) table->record[0], table->s->reclength);
DBUG_PRINT_BITSET("debug", "write_set = %s", table->write_set);
DBUG_PRINT_BITSET("debug", "read_set = %s", table->read_set);
#endif
......@@ -7221,7 +7221,7 @@ static int find_and_fetch_row(TABLE *table, byte *key)
DBUG_ASSERT(table->in_use != NULL);
DBUG_DUMP("record[0]", table->record[0], table->s->reclength);
DBUG_DUMP("record[0]",(const char *) table->record[0], table->s->reclength);
if ((table->file->ha_table_flags() & HA_PRIMARY_KEY_REQUIRED_FOR_POSITION) &&
table->s->primary_key < MAX_KEY)
......@@ -7365,8 +7365,8 @@ static int find_and_fetch_row(TABLE *table, byte *key)
{
error= table->file->rnd_next(table->record[1]);
DBUG_DUMP("record[0]", table->record[0], table->s->reclength);
DBUG_DUMP("record[1]", table->record[1], table->s->reclength);
DBUG_DUMP("record[0]",(const char *) table->record[0], table->s->reclength);
DBUG_DUMP("record[1]",(const char *) table->record[1], table->s->reclength);
switch (error)
{
......
......@@ -3622,8 +3622,9 @@ void decrement_handler_count()
{
pthread_mutex_lock(&LOCK_thread_count);
handler_count--;
pthread_mutex_unlock(&LOCK_thread_count);
pthread_cond_signal(&COND_handler_count);
pthread_mutex_unlock(&LOCK_thread_count);
my_thread_end();
}
#else
#define decrement_handler_count()
......
......@@ -2372,7 +2372,7 @@ mysql_execute_command(THD *thd)
*/
old_list= table[0];
new_list= table->next_local[0];
if (check_grant(thd, ALTER_ACL, &old_list, 0, 1, 0) ||
if (check_grant(thd, ALTER_ACL | DROP_ACL, &old_list, 0, 1, 0) ||
(!test_all_bits(table->next_local->grant.privilege,
INSERT_ACL | CREATE_ACL) &&
check_grant(thd, INSERT_ACL | CREATE_ACL, &new_list, 0, 1, 0)))
......
......@@ -182,8 +182,8 @@ uint build_table_filename(char *buff, size_t bufflen, const char *db,
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);
}
......
......@@ -12,6 +12,7 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
INCLUDE("${PROJECT_SOURCE_DIR}/win/mysql_manifest.cmake")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
......@@ -43,3 +44,10 @@ TARGET_LINK_LIBRARIES(myisamlog myisam mysys dbug strings zlib wsock32)
ADD_EXECUTABLE(myisampack myisampack.c)
TARGET_LINK_LIBRARIES(myisampack myisam mysys dbug strings zlib wsock32)
IF(EMBED_MANIFESTS)
MYSQL_EMBED_MANIFEST("myisam_ftdump" "asInvoker")
MYSQL_EMBED_MANIFEST("myisamchk" "asInvoker")
MYSQL_EMBED_MANIFEST("myisamlog" "asInvoker")
MYSQL_EMBED_MANIFEST("myisampack" "asInvoker")
ENDIF(EMBED_MANIFESTS)
......@@ -14,7 +14,8 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
## Process this file with automake to create Makefile.in
EXTRA_DIST = build-vs71.bat build-vs8.bat build-vs8_x64.bat configure.js README
EXTRA_DIST = build-vs71.bat build-vs8.bat build-vs8_x64.bat configure.js README \
mysql_manifest.cmake create_manifest.js
# Don't update the files from bitkeeper
%::SCCS/s.%
......@@ -58,7 +58,9 @@ The options right now are
MYSQL_SERVER_SUFFIX=<suffix> Server suffix, default none
COMPILATION_COMMENT=<comment> Server comment, default "Source distribution"
MYSQL_TCP_PORT=<port> Server port, default 3306
CYBOZU Default character set is UTF8
CYBOZU Default character set is UTF8
EMBED_MANIFESTS Embed custom manifests into final exes, otherwise VS
default will be used.
So the command line could look like:
......
......@@ -46,6 +46,7 @@ try
case "WITH_PARTITION_STORAGE_ENGINE":
case "__NT__":
case "CYBOZU":
case "EMBED_MANIFESTS":
configfile.WriteLine("SET (" + args.Item(i) + " TRUE)");
break;
case "MYSQL_SERVER_SUFFIX":
......
/*
manifest.js - Writes a custom XML manifest for each executable/library
6 command line options must be supplied:
name - Name of the executable/library into which the mainfest will be
embedded.
version - Version of the executable
arch - Architecture intended.
type - Application type.
exe_level - Application execution level.
[asInvoker|highestAvailable|requireAdministrator]
outfile - Final destination where mainfest will be written.
Example:
cscript manifest.js name=mysql version=5.0.32 arch=X86 type=win32
exe_level=asInvoker outfile=out.xml
*/
try
{
var args = WScript.Arguments
for (i=0; i < args.Count(); i++)
{
var parts = args.Item(i).split('=');
switch (parts[0])
{
case "name":
var app_name= parts[1];
break;
case "version":
var app_version= parts[1];
break;
case "arch":
var app_arch= parts[1];
break;
case "type":
var app_type= parts[1];
break;
case "exe_level":
var app_exe_level= parts[1];
break;
case "outfile":
var manifest_file= parts[1];
break;
default:
WScript.echo("Invalid argument supplied.");
}
}
if (i != 6)
throw new Error(1, "Incorrect number of arguments.");
var manifest_xml= "<?xml version=\'1.0\' encoding=\'UTF-8\' standalone=\'yes\'?>\r\n";
manifest_xml+= "<assembly xmlns=\'urn:schemas-microsoft-com:asm.v1\'";
manifest_xml+= " manifestVersion=\'1.0\'>\r\n";
// Application Information
manifest_xml+= "\t<assemblyIdentity name=\'" + app_name + "\'";
manifest_xml+= " version=\'" + app_version + "\'";
manifest_xml+= " processorArchitecture=\'" + app_arch + "\'";
// TOADD - Add publicKeyToken attribute once we have Authenticode key.
manifest_xml+= " type=\'" + app_type + "\' />\r\n";
// Identify the application security requirements.
manifest_xml+= "\t<trustInfo xmlns=\'urn:schemas-microsoft-com:asm.v2\'>\r\n";
manifest_xml+= "\t\t<security>\r\n\t\t\t<requestedPrivileges>\r\n\t\t\t\t";
manifest_xml+= "<requestedExecutionLevel level=\'" + app_exe_level + "\'";
manifest_xml+= " uiAccess=\'false\'/>\r\n";
manifest_xml+= "\t\t\t</requestedPrivileges>\r\n\t\t</security>\r\n";
manifest_xml+= "\t</trustInfo>\r\n</assembly>\r\n";
// Write the valid XML to it's final destination.
var outfileXML = WScript.CreateObject("Msxml2.DOMDocument.3.0");
outfileXML.async = false;
if (!outfileXML.loadXML(manifest_xml))
{
WScript.Echo(manifest_xml);
throw new Error(2, "Invalid XML");
}
outfileXML.save(manifest_file);
WScript.Echo("Success, created custom manifest!");
WScript.Quit(0);
}
catch (e)
{
WScript.Echo("Error: " + e.description);
WScript.Quit(1);
}
# - MYSQL_EMBED_MANIFEST(target_name required_privs)
# Create a manifest for target_name. Set the execution level to require_privs
#
# NOTE. PROCESSOR_ARCH must be defined before this MACRO is called.
MACRO(MYSQL_EMBED_MANIFEST _target_name _required_privs)
ADD_CUSTOM_COMMAND(
TARGET ${_target_name}
PRE_LINK
COMMAND cscript.exe
ARGS "${PROJECT_SOURCE_DIR}/win/create_manifest.js" name=$(ProjectName) version=${VERSION} arch=${PROCESSOR_ARCH} type=$(PlatformName) exe_level=${_required_privs} outfile=$(IntDir)\\$(TargetFileName).intermediate.manifest
COMMENT "Generates the contents of the manifest contents.")
ADD_CUSTOM_COMMAND(
TARGET ${_target_name}
POST_BUILD
COMMAND mt.exe
ARGS -nologo -manifest $(IntDir)\\$(TargetFileName).intermediate.manifest -outputresource:$(TargetPath)
COMMENT "Embeds the manifest contents.")
ENDMACRO(MYSQL_EMBED_MANIFEST)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment