forked from percona/percona-server
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented PS-5937 (Merge MySQL 5.7.29 up to 67891b7) (merge with co…
…nflicts)
- Loading branch information
Showing
109 changed files
with
3,705 additions
and
486 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,12 @@ | ||
MYSQL_VERSION_MAJOR=5 | ||
MYSQL_VERSION_MINOR=7 | ||
<<<<<<< HEAD | ||
MYSQL_VERSION_PATCH=28 | ||
MYSQL_VERSION_EXTRA=-31 | ||
||||||| merged common ancestors | ||
MYSQL_VERSION_PATCH=28 | ||
MYSQL_VERSION_EXTRA= | ||
======= | ||
MYSQL_VERSION_PATCH=29 | ||
MYSQL_VERSION_EXTRA= | ||
>>>>>>> 67891b7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# ==== Purpose ==== | ||
# | ||
# Escape occurences of " or ' in a string, in order to be used inside | ||
# an SQL statement. | ||
# | ||
# ==== Usage ==== | ||
# | ||
# --let $escape_string= String | ||
# [--let $enclosing_char= "|' (default is ")] | ||
# --source include/escape_sql.inc | ||
# --echo $escape_string | ||
# | ||
# Parameters: | ||
# $escape_string | ||
# String to search for occurences of the $enclosing_char and | ||
# escape them according to SQL syntax. It is also the output | ||
# parameter. | ||
|
||
# $enclosing_char | ||
# The character that will be used to enclose $escape_string when | ||
# included in an SQL statement. | ||
# | ||
|
||
if (!$escape_string) | ||
{ | ||
--die Error: set $escape_string before sourcing escape_sql.inc | ||
} | ||
|
||
if ($escape_string != '') | ||
{ | ||
--let $_enclosing_char= " | ||
if ($enclosing_char) | ||
{ | ||
--let $_enclosing_char= $enclosing_char | ||
} | ||
--let $_output_filename= `SELECT UUID()` | ||
--let $_output_filename= $MYSQLTEST_VARDIR/tmp/$_output_filename | ||
--let full_output_filename= $_output_filename | ||
--let to_replace= $escape_string | ||
--let used_quote= $_enclosing_char | ||
perl; | ||
my $out= $ENV{'full_output_filename'}; | ||
my $to_replace= $ENV{'to_replace'}; | ||
my $quote= $ENV{'used_quote'}; | ||
$to_replace =~ s/$quote/$quote$quote/g; | ||
open(FILE, ">", $out) or die "Error $? opening $output_filename: $!"; | ||
print FILE $to_replace or die "Error $? writing to $output_filename: $!"; | ||
close FILE or die "Error $? closing $output_filename: $!"; | ||
chmod 0777, $out; | ||
EOF | ||
--let $escape_string= `SELECT LOAD_FILE('$_output_filename')` | ||
} | ||
# Cleanup | ||
--remove_file $_output_filename |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--let $mi_repo= `SELECT @@GLOBAL.master_info_repository='FILE'` | ||
--let $rli_repo= `SELECT @@GLOBAL.relay_log_info_repository='FILE'` | ||
|
||
if (`SELECT $mi_repo = 1 OR $rli_repo = 1`) | ||
{ | ||
--skip Test runs only when slave repository type = TABLE | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# | ||
# Test that $query correctly checks read_only flag even if this | ||
# flag is set while the query is blocked waiting for protection | ||
# global read lock. Used by test for bug#28438114 in read_only.test. | ||
# | ||
|
||
--enable_connect_log | ||
connection default; | ||
FLUSH TABLES WITH READ LOCK; | ||
|
||
connection con1; | ||
--echo # DDL statement will block waiting for GRL. | ||
--send_eval $query | ||
|
||
connection con2; | ||
--echo # Wait until statement is blocked waiting for GRL. | ||
let $wait_condition= | ||
SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST | ||
WHERE STATE = "Waiting for global read lock"; | ||
--source include/wait_condition.inc | ||
SET GLOBAL READ_ONLY= 1; | ||
|
||
connection default; | ||
--echo # Unblock the DDL statement. | ||
UNLOCK TABLES; | ||
|
||
connection con1; | ||
--echo # Without patch for BUG#28438114, the DDL statement will succeed even | ||
--echo # though read only mode was set. | ||
--error ER_OPTION_PREVENTS_STATEMENT | ||
--reap | ||
|
||
--echo # Clean up. | ||
connection default; | ||
SET GLOBAL READ_ONLY= 0; | ||
--disable_connect_log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; | ||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; | ||
CREATE TABLE t1(c1 VARCHAR(10) NOT NULL, c2 VARCHAR(10) NOT NULL, c3 VARCHAR(10) NOT NULL); | ||
INSERT INTO t1(c1, c2, c3) VALUES('A1','B1','IT1'), ('A2','B2','IT1'), ('A3','B3','IT1'), ('A4','B4','IT1'), ('A5','B5','IT1'), ('A6','B6','IT1'), ('A7','B7','IT1'); | ||
CREATE TABLE t2(c1 VARCHAR(10) NOT NULL, c2 VARCHAR(10) NOT NULL, c3 VARCHAR(10) NOT NULL); | ||
INSERT INTO t2(c1, c2, c3) VALUES ('A3','B3','IT2'), ('A2','B2','IT2'), ('A4','B4','IT2'), ('A5','B5','II2'); | ||
CREATE TABLE result(id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, c1 VARCHAR(10) NOT NULL, c2 VARCHAR(10), | ||
c3 VARCHAR(10), update_count INT DEFAULT 0, UNIQUE KEY uniq_idx (c1,c2), PRIMARY KEY (id)) ENGINE = innodb; | ||
SET DEBUG_SYNC = "ha_write_row_end WAIT_FOR flushed EXECUTE 1"; | ||
INSERT INTO result(c1, c2, c3) SELECT * FROM t1 ON DUPLICATE KEY UPDATE c2=t1.c2, c3='UT1', update_count=update_count+1; | ||
INSERT INTO result(c1, c2, c3) SELECT * FROM t2 ON DUPLICATE KEY UPDATE c2=t2.c2, c3='UT2', update_count=update_count+1; | ||
SET DEBUG_SYNC = "now SIGNAL flushed"; | ||
SELECT * FROM result; | ||
id c1 c2 c3 update_count | ||
1 A1 B1 IT1 0 | ||
2 A3 B3 UT1 1 | ||
3 A2 B2 UT1 1 | ||
4 A4 B4 UT1 1 | ||
5 A5 B5 UT1 1 | ||
9 A6 B6 IT1 0 | ||
10 A7 B7 IT1 0 | ||
DROP TABLE t1; | ||
DROP TABLE t2; | ||
DROP TABLE result; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.