diff options
author | Sergei Golubchik <sergii@pisem.net> | 2014-12-19 11:35:44 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2014-12-19 11:35:44 +0100 |
commit | a978bdda1e2de35c79e432f026869e163657a263 (patch) | |
tree | 73e36b02fe3b8515c1f05bf4d43ecfa0bbf7c420 /mysql-test/t | |
parent | 724dbaabc0d06c4446417eb217d8536f193461f9 (diff) | |
parent | 0773c7f422c426e5693fc901df9999092e56aef3 (diff) | |
download | mariadb-git-a978bdda1e2de35c79e432f026869e163657a263.tar.gz |
mysql-5.5.41 merge
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/lock_sync.test | 55 | ||||
-rw-r--r-- | mysql-test/t/windows.test | 16 |
2 files changed, 71 insertions, 0 deletions
diff --git a/mysql-test/t/lock_sync.test b/mysql-test/t/lock_sync.test index d5ad7becd7d..bcb78b5b600 100644 --- a/mysql-test/t/lock_sync.test +++ b/mysql-test/t/lock_sync.test @@ -1136,6 +1136,61 @@ DROP TABLE t1; disconnect con1; disconnect con2; +--echo # +--echo # Bug#19070633 - POSSIBLE ACCESS TO FREED MEMORY IN IS_FREE_LOCK() AND IS_USED_LOCK(). +--echo # + +--enable_connect_log + +--echo # Verifying issue for IS_FREE_LOCK() function. +SELECT GET_LOCK("lock_19070633", 600); + +connect (con1, localhost, root,,); +--echo # Waiting after getting user level lock info and releasing mutex. +SET DEBUG_SYNC= 'after_getting_user_level_lock_info SIGNAL parked WAIT_FOR go'; +--echo # Sending: SELECT IS_FREE_LOCK("lock_19070633"); +send SELECT IS_FREE_LOCK("lock_19070633"); + +connection default; +SET DEBUG_SYNC= 'now WAIT_FOR parked'; +SELECT RELEASE_LOCK("lock_19070633"); +--echo # Signaling connection con1 after releasing the lock. +--echo # Without fix, accessing user level lock info in con1 would result in +--echo # crash or valgrind issue invalid read is reported. +SET DEBUG_SYNC= 'now SIGNAL go'; + +connection con1; +--echo # Reaping: SELECT IS_FREE_LOCK("lock_19070633"); +--reap + +connection default; +--echo # Verifying issue for IS_USED_LOCK() function. +SELECT GET_LOCK("lock_19070633", 600); + +connection con1; +--echo # Waiting after getting user level lock info and releasing mutex. +SET DEBUG_SYNC= 'after_getting_user_level_lock_info SIGNAL parked WAIT_FOR go'; +--echo # Sending: SELECT IS_USED_LOCK("lock_19070633"); +send SELECT IS_USED_LOCK("lock_19070633"); + +connection default; +SET DEBUG_SYNC= 'now WAIT_FOR parked'; +SELECT RELEASE_LOCK("lock_19070633"); +--echo # Signaling connection con1 after releasing the lock. +--echo # Without fix, accessing user level lock info in con1 would result in +--echo # crash or valgrind issue invalid read is reported. +SET DEBUG_SYNC= 'now SIGNAL go'; + +connection con1; +--echo # Reaping: SELECT IS_USED_LOCK("lock_19070633"); +--replace_column 1 # +--reap + +connection default; +SET DEBUG_SYNC= 'RESET'; +disconnect con1; + +--disable_connect_log # Check that all connections opened by test cases in this file are really # gone so execution of other tests won't be affected by their presence. diff --git a/mysql-test/t/windows.test b/mysql-test/t/windows.test index b7d31948d23..617daba6b8e 100644 --- a/mysql-test/t/windows.test +++ b/mysql-test/t/windows.test @@ -98,3 +98,19 @@ deallocate prepare abc; SELECT VARIABLE_NAME FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME = 'socket'; + +--echo # +--echo # Bug#16581605: REPLACE.EXE UTILITY IS BROKEN IN 5.5 +--echo # + +# Creating a temporary text file. +--write_file $MYSQL_TMP_DIR/bug16581605.txt +abc +def +EOF + +#REPLACE.EXE UTILITY will work fine after the fix. +--exec $REPLACE abc xyz < $MYSQL_TMP_DIR/bug16581605.txt + +#Cleanup +remove_file $MYSQL_TMP_DIR/bug16581605.txt; |