Merge 10.5 into 10.6

This commit is contained in:
Marko Mäkelä 2025-01-08 08:48:21 +02:00
commit b251cb6a4f
42 changed files with 321 additions and 239 deletions

View file

@ -31,7 +31,7 @@ ENDIF()
# in RPM's: # in RPM's:
#set(CPACK_RPM_SPEC_MORE_DEFINE "%define __spec_install_post /bin/true") #set(CPACK_RPM_SPEC_MORE_DEFINE "%define __spec_install_post /bin/true")
FOREACH(p CMP0022 CMP0046 CMP0040 CMP0048 CMP0054 CMP0074 CMP0075 CMP0069 CMP0135) FOREACH(p CMP0022 CMP0046 CMP0040 CMP0048 CMP0054 CMP0067 CMP0074 CMP0075 CMP0069 CMP0135)
IF(POLICY ${p}) IF(POLICY ${p})
CMAKE_POLICY(SET ${p} NEW) CMAKE_POLICY(SET ${p} NEW)
ENDIF() ENDIF()

View file

@ -5159,6 +5159,9 @@ put_info(const char *str,INFO_TYPE info_type, uint error, const char *sqlstate)
} }
if (!opt_silent || info_type == INFO_ERROR) if (!opt_silent || info_type == INFO_ERROR)
{ {
report_progress_end();
fflush(stdout);
if (!inited) if (!inited)
{ {
#ifdef HAVE_SETUPTERM #ifdef HAVE_SETUPTERM

View file

@ -615,7 +615,7 @@ detect_mysql_capabilities_for_backup()
} }
if (opt_slave_info && have_multi_threaded_slave && if (opt_slave_info && have_multi_threaded_slave &&
!have_gtid_slave) { !have_gtid_slave && server_flavor != FLAVOR_MARIADB) {
msg("The --slave-info option requires GTID enabled for a " msg("The --slave-info option requires GTID enabled for a "
"multi-threaded slave."); "multi-threaded slave.");
return(false); return(false);

View file

@ -1,4 +1,3 @@
drop table if exists t1;
select floor(5.5),floor(-5.5); select floor(5.5),floor(-5.5);
floor(5.5) floor(-5.5) floor(5.5) floor(-5.5)
5 -6 5 -6
@ -3632,5 +3631,17 @@ SELECT(ASIN(-1)+ LN(-1)) % (ATAN(-1) MOD FLOOR(1)) * (TRUNCATE(EXP(-1.e-2),-1.e+
c1 c1
NULL NULL
# #
# End of 10.5 tests # MDEV-35651 NO_UNSIGNED_SUBTRACTION does not work for multiple unsigned integers
# #
set sql_mode=no_unsigned_subtraction;
select cast(0 as unsigned) - 1;
cast(0 as unsigned) - 1
-1
select 2-cast(3 as unsigned);
2-cast(3 as unsigned)
-1
select cast(1 as unsigned) - cast(2 as unsigned);
cast(1 as unsigned) - cast(2 as unsigned)
-1
set sql_mode=default;
# End of 10.5 tests

View file

@ -4,10 +4,6 @@
--source include/default_charset.inc --source include/default_charset.inc
--disable_warnings
drop table if exists t1;
--enable_warnings
select floor(5.5),floor(-5.5); select floor(5.5),floor(-5.5);
explain extended select floor(5.5),floor(-5.5); explain extended select floor(5.5),floor(-5.5);
select ceiling(5.5),ceiling(-5.5); select ceiling(5.5),ceiling(-5.5);
@ -1941,7 +1937,13 @@ SELECT (TRUNCATE(EXP(-1.e-2),-1.e+30) % RADIANS(-1)) AS c1;
SELECT (TRUNCATE(EXP(-1.e-2),-1.e+30) % RADIANS(-1)) * (LAST_DAY('1-03-30 1:29:12') MOD 1 + COS(-1)) AS c1; SELECT (TRUNCATE(EXP(-1.e-2),-1.e+30) % RADIANS(-1)) * (LAST_DAY('1-03-30 1:29:12') MOD 1 + COS(-1)) AS c1;
SELECT(ASIN(-1)+ LN(-1)) % (ATAN(-1) MOD FLOOR(1)) * (TRUNCATE(EXP(-1.e-2),-1.e+30) % RADIANS(-1)) * (LAST_DAY('1-03-30 1:29:12') MOD 1 + COS(-1)) AS c1; SELECT(ASIN(-1)+ LN(-1)) % (ATAN(-1) MOD FLOOR(1)) * (TRUNCATE(EXP(-1.e-2),-1.e+30) % RADIANS(-1)) * (LAST_DAY('1-03-30 1:29:12') MOD 1 + COS(-1)) AS c1;
--echo #
--echo # MDEV-35651 NO_UNSIGNED_SUBTRACTION does not work for multiple unsigned integers
--echo #
set sql_mode=no_unsigned_subtraction;
select cast(0 as unsigned) - 1;
select 2-cast(3 as unsigned);
select cast(1 as unsigned) - cast(2 as unsigned);
set sql_mode=default;
--echo #
--echo # End of 10.5 tests --echo # End of 10.5 tests
--echo #

View file

@ -2372,7 +2372,7 @@ drop database dummy;
USE test; USE test;
CREATE VIEW v AS SELECT table_schema AS object_schema, table_name AS object_name, table_type AS object_type FROM information_schema.tables ORDER BY object_schema; CREATE VIEW v AS SELECT table_schema AS object_schema, table_name AS object_name, table_type AS object_type FROM information_schema.tables ORDER BY object_schema;
SELECT * FROM v LIMIT ROWS EXAMINED 9; SELECT * FROM v LIMIT ROWS EXAMINED 9;
ERROR HY000: Sort aborted: ERROR HY000: Sort aborted: LIMIT ROWS EXAMINED
DROP VIEW v; DROP VIEW v;
# #
# MDEV-23408 Wrong result upon query from I_S and further Assertion `!alias_arg || strlen(alias_arg->str) == alias_arg->length' failed with certain connection charset # MDEV-23408 Wrong result upon query from I_S and further Assertion `!alias_arg || strlen(alias_arg->str) == alias_arg->length' failed with certain connection charset

View file

@ -608,7 +608,7 @@ select c1, c2 from t3 order by c2, c1 LIMIT ROWS EXAMINED 2;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 ALL NULL NULL NULL NULL 5 Using filesort 1 SIMPLE t3 ALL NULL NULL NULL NULL 5 Using filesort
select c1, c2 from t3 order by c2, c1 LIMIT ROWS EXAMINED 2; select c1, c2 from t3 order by c2, c1 LIMIT ROWS EXAMINED 2;
ERROR HY000: Sort aborted: ERROR HY000: Sort aborted: LIMIT ROWS EXAMINED
explain explain
select c1, c2 from t3i order by c2, c1 LIMIT ROWS EXAMINED 2; select c1, c2 from t3i order by c2, c1 LIMIT ROWS EXAMINED 2;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
@ -624,7 +624,7 @@ select c1, c2 from t3i order by c2, c1 desc LIMIT ROWS EXAMINED 2;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3i index NULL it3j 8 NULL 5 Using index; Using filesort 1 SIMPLE t3i index NULL it3j 8 NULL 5 Using index; Using filesort
select c1, c2 from t3i order by c2, c1 desc LIMIT ROWS EXAMINED 2; select c1, c2 from t3i order by c2, c1 desc LIMIT ROWS EXAMINED 2;
ERROR HY000: Sort aborted: ERROR HY000: Sort aborted: LIMIT ROWS EXAMINED
drop table t3,t3i; drop table t3,t3i;
========================================================================= =========================================================================
INSERT/DELETE/UPDATE INSERT/DELETE/UPDATE

View file

@ -90,13 +90,11 @@ table->field[0]->offset = 1
table->field[0]->field_length = 10 table->field[0]->field_length = 10
table->field[0]->null_pos wrt to record 0 = 0 table->field[0]->null_pos wrt to record 0 = 0
table->field[0]->null_bit_pos = 1 table->field[0]->null_bit_pos = 1
table->field[1]->field_name DB_ROW_HASH_1 table->field[1]->field_name DB_ROW_HASH_1
table->field[1]->offset = 11 table->field[1]->offset = 11
table->field[1]->field_length = 8 table->field[1]->field_length = 8
table->field[1]->null_pos wrt to record 0 = 0 table->field[1]->null_pos wrt to record 0 = 0
table->field[1]->null_bit_pos = 2 table->field[1]->null_bit_pos = 2
SET debug_dbug=""; SET debug_dbug="";
drop table t1; drop table t1;
SET debug_dbug="d,print_long_unique_internal_state"; SET debug_dbug="d,print_long_unique_internal_state";
@ -182,37 +180,31 @@ table->field[0]->offset = 1
table->field[0]->field_length = 10 table->field[0]->field_length = 10
table->field[0]->null_pos wrt to record 0 = 0 table->field[0]->null_pos wrt to record 0 = 0
table->field[0]->null_bit_pos = 1 table->field[0]->null_bit_pos = 1
table->field[1]->field_name b table->field[1]->field_name b
table->field[1]->offset = 11 table->field[1]->offset = 11
table->field[1]->field_length = 10 table->field[1]->field_length = 10
table->field[1]->null_pos wrt to record 0 = 0 table->field[1]->null_pos wrt to record 0 = 0
table->field[1]->null_bit_pos = 2 table->field[1]->null_bit_pos = 2
table->field[2]->field_name c table->field[2]->field_name c
table->field[2]->offset = 21 table->field[2]->offset = 21
table->field[2]->field_length = 10 table->field[2]->field_length = 10
table->field[2]->null_pos wrt to record 0 = 0 table->field[2]->null_pos wrt to record 0 = 0
table->field[2]->null_bit_pos = 4 table->field[2]->null_bit_pos = 4
table->field[3]->field_name DB_ROW_HASH_1 table->field[3]->field_name DB_ROW_HASH_1
table->field[3]->offset = 31 table->field[3]->offset = 31
table->field[3]->field_length = 8 table->field[3]->field_length = 8
table->field[3]->null_pos wrt to record 0 = 0 table->field[3]->null_pos wrt to record 0 = 0
table->field[3]->null_bit_pos = 8 table->field[3]->null_bit_pos = 8
table->field[4]->field_name DB_ROW_HASH_2 table->field[4]->field_name DB_ROW_HASH_2
table->field[4]->offset = 39 table->field[4]->offset = 39
table->field[4]->field_length = 8 table->field[4]->field_length = 8
table->field[4]->null_pos wrt to record 0 = 0 table->field[4]->null_pos wrt to record 0 = 0
table->field[4]->null_bit_pos = 16 table->field[4]->null_bit_pos = 16
table->field[5]->field_name DB_ROW_HASH_3 table->field[5]->field_name DB_ROW_HASH_3
table->field[5]->offset = 47 table->field[5]->offset = 47
table->field[5]->field_length = 8 table->field[5]->field_length = 8
table->field[5]->null_pos wrt to record 0 = 0 table->field[5]->null_pos wrt to record 0 = 0
table->field[5]->null_bit_pos = 32 table->field[5]->null_bit_pos = 32
SET debug_dbug=""; SET debug_dbug="";
drop table t1; drop table t1;
SET debug_dbug="d,print_long_unique_internal_state"; SET debug_dbug="d,print_long_unique_internal_state";
@ -290,37 +282,31 @@ table->field[0]->offset = 1
table->field[0]->field_length = 10 table->field[0]->field_length = 10
table->field[0]->null_pos wrt to record 0 = 0 table->field[0]->null_pos wrt to record 0 = 0
table->field[0]->null_bit_pos = 1 table->field[0]->null_bit_pos = 1
table->field[1]->field_name b table->field[1]->field_name b
table->field[1]->offset = 11 table->field[1]->offset = 11
table->field[1]->field_length = 10 table->field[1]->field_length = 10
table->field[1]->null_pos wrt to record 0 = 0 table->field[1]->null_pos wrt to record 0 = 0
table->field[1]->null_bit_pos = 2 table->field[1]->null_bit_pos = 2
table->field[2]->field_name c table->field[2]->field_name c
table->field[2]->offset = 21 table->field[2]->offset = 21
table->field[2]->field_length = 10 table->field[2]->field_length = 10
table->field[2]->null_pos wrt to record 0 = 0 table->field[2]->null_pos wrt to record 0 = 0
table->field[2]->null_bit_pos = 4 table->field[2]->null_bit_pos = 4
table->field[3]->field_name d table->field[3]->field_name d
table->field[3]->offset = 31 table->field[3]->offset = 31
table->field[3]->field_length = 10 table->field[3]->field_length = 10
table->field[3]->null_pos wrt to record 0 = 0 table->field[3]->null_pos wrt to record 0 = 0
table->field[3]->null_bit_pos = 8 table->field[3]->null_bit_pos = 8
table->field[4]->field_name DB_ROW_HASH_1 table->field[4]->field_name DB_ROW_HASH_1
table->field[4]->offset = 41 table->field[4]->offset = 41
table->field[4]->field_length = 8 table->field[4]->field_length = 8
table->field[4]->null_pos wrt to record 0 = 0 table->field[4]->null_pos wrt to record 0 = 0
table->field[4]->null_bit_pos = 16 table->field[4]->null_bit_pos = 16
table->field[5]->field_name DB_ROW_HASH_2 table->field[5]->field_name DB_ROW_HASH_2
table->field[5]->offset = 49 table->field[5]->offset = 49
table->field[5]->field_length = 8 table->field[5]->field_length = 8
table->field[5]->null_pos wrt to record 0 = 0 table->field[5]->null_pos wrt to record 0 = 0
table->field[5]->null_bit_pos = 32 table->field[5]->null_bit_pos = 32
SET debug_dbug=""; SET debug_dbug="";
drop table t1; drop table t1;
SET debug_dbug="d,print_long_unique_internal_state"; SET debug_dbug="d,print_long_unique_internal_state";
@ -406,31 +392,26 @@ table->field[0]->offset = 1
table->field[0]->field_length = 4 table->field[0]->field_length = 4
table->field[0]->null_pos wrt to record 0 = -1 table->field[0]->null_pos wrt to record 0 = -1
table->field[0]->null_bit_pos = 0 table->field[0]->null_bit_pos = 0
table->field[1]->field_name b table->field[1]->field_name b
table->field[1]->offset = 5 table->field[1]->offset = 5
table->field[1]->field_length = 10 table->field[1]->field_length = 10
table->field[1]->null_pos wrt to record 0 = 0 table->field[1]->null_pos wrt to record 0 = 0
table->field[1]->null_bit_pos = 1 table->field[1]->null_bit_pos = 1
table->field[2]->field_name c table->field[2]->field_name c
table->field[2]->offset = 15 table->field[2]->offset = 15
table->field[2]->field_length = 10 table->field[2]->field_length = 10
table->field[2]->null_pos wrt to record 0 = -1 table->field[2]->null_pos wrt to record 0 = -1
table->field[2]->null_bit_pos = 0 table->field[2]->null_bit_pos = 0
table->field[3]->field_name DB_ROW_HASH_1 table->field[3]->field_name DB_ROW_HASH_1
table->field[3]->offset = 25 table->field[3]->offset = 25
table->field[3]->field_length = 8 table->field[3]->field_length = 8
table->field[3]->null_pos wrt to record 0 = 0 table->field[3]->null_pos wrt to record 0 = 0
table->field[3]->null_bit_pos = 2 table->field[3]->null_bit_pos = 2
table->field[4]->field_name DB_ROW_HASH_2 table->field[4]->field_name DB_ROW_HASH_2
table->field[4]->offset = 33 table->field[4]->offset = 33
table->field[4]->field_length = 8 table->field[4]->field_length = 8
table->field[4]->null_pos wrt to record 0 = -1 table->field[4]->null_pos wrt to record 0 = -1
table->field[4]->null_bit_pos = 0 table->field[4]->null_bit_pos = 0
SET debug_dbug=""; SET debug_dbug="";
drop table t1; drop table t1;
##Using hash ##Using hash
@ -487,25 +468,21 @@ table->field[0]->offset = 1
table->field[0]->field_length = 4 table->field[0]->field_length = 4
table->field[0]->null_pos wrt to record 0 = 0 table->field[0]->null_pos wrt to record 0 = 0
table->field[0]->null_bit_pos = 2 table->field[0]->null_bit_pos = 2
table->field[1]->field_name b table->field[1]->field_name b
table->field[1]->offset = 5 table->field[1]->offset = 5
table->field[1]->field_length = 4 table->field[1]->field_length = 4
table->field[1]->null_pos wrt to record 0 = 0 table->field[1]->null_pos wrt to record 0 = 0
table->field[1]->null_bit_pos = 4 table->field[1]->null_bit_pos = 4
table->field[2]->field_name c table->field[2]->field_name c
table->field[2]->offset = 9 table->field[2]->offset = 9
table->field[2]->field_length = 4 table->field[2]->field_length = 4
table->field[2]->null_pos wrt to record 0 = 0 table->field[2]->null_pos wrt to record 0 = 0
table->field[2]->null_bit_pos = 8 table->field[2]->null_bit_pos = 8
table->field[3]->field_name DB_ROW_HASH_1 table->field[3]->field_name DB_ROW_HASH_1
table->field[3]->offset = 13 table->field[3]->offset = 13
table->field[3]->field_length = 8 table->field[3]->field_length = 8
table->field[3]->null_pos wrt to record 0 = 0 table->field[3]->null_pos wrt to record 0 = 0
table->field[3]->null_bit_pos = 16 table->field[3]->null_bit_pos = 16
SET debug_dbug=""; SET debug_dbug="";
drop table t1; drop table t1;
##Using hash but with memory engine so no long unique column ##Using hash but with memory engine so no long unique column
@ -562,18 +539,15 @@ table->field[0]->offset = 1
table->field[0]->field_length = 4 table->field[0]->field_length = 4
table->field[0]->null_pos wrt to record 0 = 0 table->field[0]->null_pos wrt to record 0 = 0
table->field[0]->null_bit_pos = 2 table->field[0]->null_bit_pos = 2
table->field[1]->field_name b table->field[1]->field_name b
table->field[1]->offset = 5 table->field[1]->offset = 5
table->field[1]->field_length = 4 table->field[1]->field_length = 4
table->field[1]->null_pos wrt to record 0 = 0 table->field[1]->null_pos wrt to record 0 = 0
table->field[1]->null_bit_pos = 4 table->field[1]->null_bit_pos = 4
table->field[2]->field_name c table->field[2]->field_name c
table->field[2]->offset = 9 table->field[2]->offset = 9
table->field[2]->field_length = 4 table->field[2]->field_length = 4
table->field[2]->null_pos wrt to record 0 = 0 table->field[2]->null_pos wrt to record 0 = 0
table->field[2]->null_bit_pos = 8 table->field[2]->null_bit_pos = 8
SET debug_dbug=""; SET debug_dbug="";
drop table t1; drop table t1;

View file

@ -6,7 +6,7 @@ flush tables;
--let $args=--table-cache=5 --max-connections=10 --log-warnings=1 --silent-startup --lower-case-table-names=1 --help --verbose --let $args=--table-cache=5 --max-connections=10 --log-warnings=1 --silent-startup --lower-case-table-names=1 --help --verbose
--exec $MYSQLD_CMD $args > $MYSQL_TMP_DIR/mysqld--help2.txt 2> $MYSQL_TMP_DIR/mysqld--help2.err --exec $MYSQLD_CMD $args > $MYSQL_TMP_DIR/mysqld--help2.txt 2> $MYSQL_TMP_DIR/mysqld--help2.err
--replace_regex /mysqld/mariadbd/ /\d\d\d\d-\d*-\d* *\d*:\d*:\d* \d* // --replace_regex /mysqld/mariadbd/ /\d\d\d\d-\d*-\d* *\d*:\d*:\d* \d* // /^.*failed to retrieve the MAC address\n//
--cat_file $MYSQL_TMP_DIR/mysqld--help2.err --cat_file $MYSQL_TMP_DIR/mysqld--help2.err
--echo # --echo #
@ -14,7 +14,7 @@ flush tables;
--echo # --echo #
--exec $MYSQLD_CMD $args --datadir=$MYSQL_TMP_DIR/help > $MYSQL_TMP_DIR/mysqld--help2.txt 2> $MYSQL_TMP_DIR/mysqld--help2.err --exec $MYSQLD_CMD $args --datadir=$MYSQL_TMP_DIR/help > $MYSQL_TMP_DIR/mysqld--help2.txt 2> $MYSQL_TMP_DIR/mysqld--help2.err
--replace_regex /\d\d\d\d-\d*-\d* *\d*:\d*:\d* \d* // --replace_regex /mysqld/mariadbd/ /\d\d\d\d-\d*-\d* *\d*:\d*:\d* \d* // /^.*failed to retrieve the MAC address\n//
--cat_file $MYSQL_TMP_DIR/mysqld--help2.err --cat_file $MYSQL_TMP_DIR/mysqld--help2.err
--echo # --echo #
@ -23,7 +23,7 @@ flush tables;
--mkdir $MYSQL_TMP_DIR/help --mkdir $MYSQL_TMP_DIR/help
--exec $MYSQLD_CMD $args --datadir=$MYSQL_TMP_DIR/help > $MYSQL_TMP_DIR/mysqld--help2.txt 2> $MYSQL_TMP_DIR/mysqld--help2.err --exec $MYSQLD_CMD $args --datadir=$MYSQL_TMP_DIR/help > $MYSQL_TMP_DIR/mysqld--help2.txt 2> $MYSQL_TMP_DIR/mysqld--help2.err
--replace_regex /\d\d\d\d-\d*-\d* *\d*:\d*:\d* \d* // --replace_regex /mysqld/mariadbd/ /\d\d\d\d-\d*-\d* *\d*:\d*:\d* \d* // /^.*failed to retrieve the MAC address\n//
--cat_file $MYSQL_TMP_DIR/mysqld--help2.err --cat_file $MYSQL_TMP_DIR/mysqld--help2.err
--list_files $MYSQL_TMP_DIR/help --list_files $MYSQL_TMP_DIR/help

View file

@ -4526,7 +4526,7 @@ sub extract_warning_lines ($$) {
qr|InnoDB: liburing disabled|, qr|InnoDB: liburing disabled|,
qr/InnoDB: Failed to set O_DIRECT on file/, qr/InnoDB: Failed to set O_DIRECT on file/,
qr|setrlimit could not change the size of core files to 'infinity';|, qr|setrlimit could not change the size of core files to 'infinity';|,
qr|feedback plugin: failed to retrieve the MAC address|, qr|failed to retrieve the MAC address|,
qr|Plugin 'FEEDBACK' init function returned error|, qr|Plugin 'FEEDBACK' init function returned error|,
qr|Plugin 'FEEDBACK' registration as a INFORMATION SCHEMA failed|, qr|Plugin 'FEEDBACK' registration as a INFORMATION SCHEMA failed|,
qr|'log-bin-use-v1-row-events' is MySQL .* compatible option|, qr|'log-bin-use-v1-row-events' is MySQL .* compatible option|,

View file

@ -4,4 +4,3 @@ call mtr.add_suppression("Can't generate a unique log-filename");
RESET MASTER; RESET MASTER;
FLUSH LOGS; FLUSH LOGS;
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999) ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)

View file

@ -16,7 +16,6 @@ master-bin.2147483647 # Gtid # # GTID #-#-#
master-bin.2147483647 # Query # # CREATE DATABASE db1 master-bin.2147483647 # Query # # CREATE DATABASE db1
RESET MASTER TO 2147483648; RESET MASTER TO 2147483648;
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999) ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
FOUND 1 /Turning logging off for the whole duration of the MariaDB server process/ in mysqld.1.err FOUND 1 /Turning logging off for the whole duration of the MariaDB server process/ in mysqld.1.err
"Following CREATE DATABSE db2 command will not be present in binary log" "Following CREATE DATABSE db2 command will not be present in binary log"
"as binary log got closed due to ER_NO_UNIQUE_LOGFILE error." "as binary log got closed due to ER_NO_UNIQUE_LOGFILE error."

View file

@ -11,5 +11,4 @@ UPDATE t1 SET c1=repeat('b',255);
INSERT INTO t1 VALUES (repeat('a', 255), repeat('a', 255),repeat('a', 255),repeat('a', 255),repeat('a', 255)); INSERT INTO t1 VALUES (repeat('a', 255), repeat('a', 255),repeat('a', 255),repeat('a', 255),repeat('a', 255));
SHOW BINLOG EVENTS FROM POS; SHOW BINLOG EVENTS FROM POS;
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Invalid pos specified. Requested from pos:POS is greater than actual file size:MAX_POS ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Invalid pos specified. Requested from pos:POS is greater than actual file size:MAX_POS
DROP TABLE t1; DROP TABLE t1;

View file

@ -26,7 +26,6 @@ RESET MASTER;
SET @@global.debug_dbug="d,error_unique_log_filename"; SET @@global.debug_dbug="d,error_unique_log_filename";
FLUSH LOGS; FLUSH LOGS;
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999) ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
# assert: must show one binlog # assert: must show one binlog
show binary logs; show binary logs;
Log_name File_size Log_name File_size
@ -52,7 +51,6 @@ RESET MASTER;
SET @@global.debug_dbug="d,error_unique_log_filename"; SET @@global.debug_dbug="d,error_unique_log_filename";
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t2; LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t2;
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999) ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
# assert: must show one entry # assert: must show one entry
SELECT count(*) FROM t2; SELECT count(*) FROM t2;
count(*) count(*)
@ -78,7 +76,6 @@ LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t2;
INSERT INTO t2 VALUES ('muse'); INSERT INTO t2 VALUES ('muse');
COMMIT; COMMIT;
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999) ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
# assert: must show three entries # assert: must show three entries
SELECT count(*) FROM t2; SELECT count(*) FROM t2;
count(*) count(*)
@ -95,7 +92,6 @@ count(*)
0 0
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t4; LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t4;
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999) ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
# assert: must show 1 entry # assert: must show 1 entry
SELECT count(*) FROM t4; SELECT count(*) FROM t4;
count(*) count(*)
@ -118,13 +114,10 @@ count(*)
0 0
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t4; LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t4;
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999) ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t2; LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t2;
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999) ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
INSERT INTO t2 VALUES ('aaa'), ('bbb'), ('ccc'); INSERT INTO t2 VALUES ('aaa'), ('bbb'), ('ccc');
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999) ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
# INFO: Count(*) Before Offending DELETEs # INFO: Count(*) Before Offending DELETEs
# assert: must show 1 entry # assert: must show 1 entry
SELECT count(*) FROM t4; SELECT count(*) FROM t4;
@ -136,10 +129,8 @@ count(*)
4 4
DELETE FROM t4; DELETE FROM t4;
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999) ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
DELETE FROM t2; DELETE FROM t2;
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999) ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
# INFO: Count(*) After Offending DELETEs # INFO: Count(*) After Offending DELETEs
# assert: must show zero entries # assert: must show zero entries
SELECT count(*) FROM t4; SELECT count(*) FROM t4;

View file

@ -171,7 +171,6 @@ SET @old_dbug= @@GLOBAL.debug_dbug;
SET debug_dbug= '+d,binlog_inject_new_name_error'; SET debug_dbug= '+d,binlog_inject_new_name_error';
FLUSH LOGS; FLUSH LOGS;
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999) ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
SET debug_dbug= @old_dbug; SET debug_dbug= @old_dbug;
INSERT INTO t4 VALUES (2); INSERT INTO t4 VALUES (2);
connection slave; connection slave;

View file

@ -0,0 +1,13 @@
connection node_2;
connection node_1;
connection node_1;
connection node_2;
connection node_2;
Shutting down server ...
connection node_1;
Cleaning var directory ...
connection node_2;
Starting server ...
include/assert_grep.inc [mariabackup: Using 128974848 bytes for buffer pool \(set by --use-memory parameter\)]
disconnect node_2;
disconnect node_1;

View file

@ -0,0 +1,8 @@
!include ../galera_2nodes.cnf
[mysqld]
wsrep_sst_method=mariabackup
wsrep_sst_auth="root:"
[mariabackup]
use_memory=123m

View file

@ -0,0 +1,53 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_mariabackup.inc
# Save original auto_increment_offset values.
--let $node_1=node_1
--let $node_2=node_2
--source include/auto_increment_offset_save.inc
--connection node_2
--echo Shutting down server ...
--source include/shutdown_mysqld.inc
--connection node_1
--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
--source include/wait_condition.inc
#
# Force SST
#
--echo Cleaning var directory ...
--remove_file $MYSQLTEST_VARDIR/mysqld.2/data/grastate.dat
--remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data/mtr
--remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data/performance_schema
--remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data/test
--remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data/mysql
--remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data
--connection node_2
--echo Starting server ...
let $restart_noprint=2;
--source include/start_mysqld.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
--source include/wait_condition.inc
# Confirm that IST did not take place
--let $assert_text = mariabackup: Using 128974848 bytes for buffer pool \(set by --use-memory parameter\)
--let $assert_select = mariabackup: Using 128974848 bytes for buffer pool \(set by --use-memory parameter\)
--let $assert_count = 1
--let $assert_file = $MYSQLTEST_VARDIR/mysqld.2/data/mariabackup.prepare.log
--let $assert_only_after = Starting InnoDB instance for recovery
--source include/assert_grep.inc
# Restore original auto_increment_offset values.
--source include/auto_increment_offset_restore.inc
--source include/galera_end.inc

View file

@ -26,7 +26,6 @@ RESET MASTER;
SET @@global.debug_dbug="d,error_unique_log_filename"; SET @@global.debug_dbug="d,error_unique_log_filename";
FLUSH LOGS; FLUSH LOGS;
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999) ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
# assert: must show one binlog # assert: must show one binlog
show binary logs; show binary logs;
Log_name File_size Log_name File_size
@ -52,7 +51,6 @@ RESET MASTER;
SET @@global.debug_dbug="d,error_unique_log_filename"; SET @@global.debug_dbug="d,error_unique_log_filename";
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t2; LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t2;
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999) ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
# assert: must show one entry # assert: must show one entry
SELECT count(*) FROM t2; SELECT count(*) FROM t2;
count(*) count(*)
@ -78,7 +76,6 @@ LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t2;
INSERT INTO t2 VALUES ('muse'); INSERT INTO t2 VALUES ('muse');
COMMIT; COMMIT;
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999) ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
# assert: must show three entries # assert: must show three entries
SELECT count(*) FROM t2; SELECT count(*) FROM t2;
count(*) count(*)
@ -95,7 +92,6 @@ count(*)
0 0
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t4; LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t4;
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999) ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
# assert: must show 1 entry # assert: must show 1 entry
SELECT count(*) FROM t4; SELECT count(*) FROM t4;
count(*) count(*)
@ -118,13 +114,10 @@ count(*)
0 0
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t4; LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t4;
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999) ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t2; LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t2;
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999) ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
INSERT INTO t2 VALUES ('aaa'), ('bbb'), ('ccc'); INSERT INTO t2 VALUES ('aaa'), ('bbb'), ('ccc');
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999) ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
# INFO: Count(*) Before Offending DELETEs # INFO: Count(*) Before Offending DELETEs
# assert: must show 1 entry # assert: must show 1 entry
SELECT count(*) FROM t4; SELECT count(*) FROM t4;
@ -136,10 +129,8 @@ count(*)
4 4
DELETE FROM t4; DELETE FROM t4;
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999) ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
DELETE FROM t2; DELETE FROM t2;
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999) ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
# INFO: Count(*) After Offending DELETEs # INFO: Count(*) After Offending DELETEs
# assert: must show zero entries # assert: must show zero entries
SELECT count(*) FROM t4; SELECT count(*) FROM t4;

View file

@ -171,7 +171,6 @@ SET @old_dbug= @@GLOBAL.debug_dbug;
SET debug_dbug= '+d,binlog_inject_new_name_error'; SET debug_dbug= '+d,binlog_inject_new_name_error';
FLUSH LOGS; FLUSH LOGS;
ERROR HY000: Can't generate a unique log-filename master-bin.(1-999) ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
SET debug_dbug= @old_dbug; SET debug_dbug= @old_dbug;
INSERT INTO t4 VALUES (2); INSERT INTO t4 VALUES (2);
connection slave; connection slave;

View file

@ -85,6 +85,15 @@ cleanup:
return default_name; return default_name;
} }
static void release_service_name()
{
if (service_name != GSS_C_NO_NAME)
{
OM_uint32 minor;
gss_release_name(&minor, &service_name);
service_name= GSS_C_NO_NAME;
}
}
int plugin_init() int plugin_init()
{ {
@ -127,6 +136,7 @@ int plugin_init()
if (GSS_ERROR(major)) if (GSS_ERROR(major))
{ {
log_error(major, minor, "gss_acquire_cred failed"); log_error(major, minor, "gss_acquire_cred failed");
release_service_name();
return -1; return -1;
} }
gss_release_cred(&minor, &cred); gss_release_cred(&minor, &cred);
@ -136,11 +146,7 @@ int plugin_init()
int plugin_deinit() int plugin_deinit()
{ {
if (service_name != GSS_C_NO_NAME) release_service_name();
{
OM_uint32 minor;
gss_release_name(&minor, &service_name);
}
return 0; return 0;
} }

View file

@ -209,6 +209,7 @@ INNODB_DATA_HOME_DIR=$(trim_dir "${INNODB_DATA_HOME_DIR:-}")
INNODB_LOG_GROUP_HOME=$(trim_dir "${INNODB_LOG_GROUP_HOME:-}") INNODB_LOG_GROUP_HOME=$(trim_dir "${INNODB_LOG_GROUP_HOME:-}")
INNODB_UNDO_DIR=$(trim_dir "${INNODB_UNDO_DIR:-}") INNODB_UNDO_DIR=$(trim_dir "${INNODB_UNDO_DIR:-}")
INNODB_BUFFER_POOL="" INNODB_BUFFER_POOL=""
INNODB_BUFFER_POOL_SIZE=""
INNODB_FORCE_RECOVERY="" INNODB_FORCE_RECOVERY=""
INNOEXTRA="" INNOEXTRA=""
@ -329,6 +330,10 @@ case "$1" in
readonly INNODB_BUFFER_POOL=$(trim_string "$2") readonly INNODB_BUFFER_POOL=$(trim_string "$2")
shift shift
;; ;;
'--innodb-buffer-pool-size')
readonly INNODB_BUFFER_POOL_SIZE=$(trim_string "$2")
shift
;;
'--defaults-file') '--defaults-file')
file=$(trim_string "$2") file=$(trim_string "$2")
readonly WSREP_SST_OPT_DEFAULT="$1=$file" readonly WSREP_SST_OPT_DEFAULT="$1=$file"
@ -607,6 +612,12 @@ case "$1" in
fi fi
skip_mysqld_arg=1 skip_mysqld_arg=1
;; ;;
'--innodb-buffer-pool-size')
if [ -z "$INNODB_BUFFER_POOL_SIZE" ]; then
MYSQLD_OPT_INNODB_BUFFER_POOL_SIZE=$(trim_string "$value")
fi
skip_mysqld_arg=1
;;
'--innodb-force-recovery') '--innodb-force-recovery')
if [ -n "$value" -a "$value" != "0" ]; then if [ -n "$value" -a "$value" != "0" ]; then
INNODB_FORCE_RECOVERY=$(trim_string "$value") INNODB_FORCE_RECOVERY=$(trim_string "$value")
@ -696,6 +707,10 @@ if [ -n "${MYSQLD_OPT_INNODB_BUFFER_POOL:-}" -a \
-z "$INNODB_BUFFER_POOL" ]; then -z "$INNODB_BUFFER_POOL" ]; then
readonly INNODB_BUFFER_POOL="$MYSQLD_OPT_INNODB_BUFFER_POOL" readonly INNODB_BUFFER_POOL="$MYSQLD_OPT_INNODB_BUFFER_POOL"
fi fi
if [ -n "${MYSQLD_OPT_INNODB_BUFFER_POOL_SIZE:-}" -a \
-z "$INNODB_BUFFER_POOL_SIZE" ]; then
readonly INNODB_BUFFER_POOL_SIZE="$MYSQLD_OPT_INNODB_BUFFER_POOL_SIZE"
fi
if [ -n "${MYSQLD_OPT_LOG_BIN:-}" -a \ if [ -n "${MYSQLD_OPT_LOG_BIN:-}" -a \
-z "$WSREP_SST_OPT_BINLOG" ]; then -z "$WSREP_SST_OPT_BINLOG" ]; then
readonly WSREP_SST_OPT_BINLOG="$MYSQLD_OPT_LOG_BIN" readonly WSREP_SST_OPT_BINLOG="$MYSQLD_OPT_LOG_BIN"
@ -752,6 +767,9 @@ fi
if [ -n "$INNODB_BUFFER_POOL" ]; then if [ -n "$INNODB_BUFFER_POOL" ]; then
INNOEXTRA="$INNOEXTRA --innodb-buffer-pool-filename='$INNODB_BUFFER_POOL'" INNOEXTRA="$INNOEXTRA --innodb-buffer-pool-filename='$INNODB_BUFFER_POOL'"
fi fi
if [ -n "$INNODB_BUFFER_POOL_SIZE" ]; then
INNOEXTRA="$INNOEXTRA --innodb-buffer-pool-size='$INNODB_BUFFER_POOL_SIZE'"
fi
if [ -n "$WSREP_SST_OPT_BINLOG" ]; then if [ -n "$WSREP_SST_OPT_BINLOG" ]; then
INNOEXTRA="$INNOEXTRA --log-bin='$WSREP_SST_OPT_BINLOG'" INNOEXTRA="$INNOEXTRA --log-bin='$WSREP_SST_OPT_BINLOG'"
if [ -n "$WSREP_SST_OPT_BINLOG_INDEX" ]; then if [ -n "$WSREP_SST_OPT_BINLOG_INDEX" ]; then
@ -1775,14 +1793,14 @@ simple_cleanup()
create_data() create_data()
{ {
OLD_PWD="$(pwd)" OLD_PWD="$(pwd)"
DATA_DIR="$OLD_PWD"
if [ -n "$DATA" -a "$DATA" != '.' ]; then if [ -n "$DATA" -a "$DATA" != '.' ]; then
[ ! -d "$DATA" ] && mkdir -p "$DATA" [ ! -d "$DATA" ] && mkdir -p "$DATA"
cd "$DATA" cd "$DATA"
DATA_DIR="$(pwd)"
cd "$OLD_PWD"
fi fi
DATA_DIR="$(pwd)"
cd "$OLD_PWD"
} }
create_dirs() create_dirs()

View file

@ -540,7 +540,8 @@ adjust_progress()
fi fi
} }
encgroups='--mysqld|sst|xtrabackup' bkgroups='sst|xtrabackup|mariabackup'
encgroups="--mysqld|$bkgroups"
read_cnf() read_cnf()
{ {
@ -596,26 +597,34 @@ read_cnf()
ssl_dhparams=$(parse_cnf "$encgroups" 'ssl-dhparams') ssl_dhparams=$(parse_cnf "$encgroups" 'ssl-dhparams')
fi fi
sockopt=$(parse_cnf sst sockopt "") sockopt=$(parse_cnf sst sockopt)
progress=$(parse_cnf sst progress "") progress=$(parse_cnf sst progress)
ttime=$(parse_cnf sst time 0) ttime=$(parse_cnf sst time 0)
cpat='.*\.pem$\|.*galera\.cache$\|.*sst_in_progress$\|.*\.sst$\|.*gvwstate\.dat$\|.*grastate\.dat$\|.*\.err$\|.*\.log$\|.*RPM_UPGRADE_MARKER$\|.*RPM_UPGRADE_HISTORY$' cpat='.*\.pem$\|.*galera\.cache$\|.*sst_in_progress$\|.*\.sst$\|.*gvwstate\.dat$\|.*grastate\.dat$\|.*\.err$\|.*\.log$\|.*RPM_UPGRADE_MARKER$\|.*RPM_UPGRADE_HISTORY$'
[ "$OS" = 'FreeBSD' ] && cpat=$(echo "$cpat" | sed 's/\\|/|/g') [ "$OS" = 'FreeBSD' ] && cpat=$(echo "$cpat" | sed 's/\\|/|/g')
cpat=$(parse_cnf sst cpat "$cpat") cpat=$(parse_cnf sst cpat "$cpat")
scomp=$(parse_cnf sst compressor "") scomp=$(parse_cnf sst compressor)
sdecomp=$(parse_cnf sst decompressor "") sdecomp=$(parse_cnf sst decompressor)
rlimit=$(parse_cnf sst rlimit "") rlimit=$(parse_cnf sst rlimit)
uextra=$(parse_cnf sst use-extra 0) uextra=$(parse_cnf sst use-extra 0)
speciald=$(parse_cnf sst sst-special-dirs 1) speciald=$(parse_cnf sst 'sst-special-dirs' 1)
iopts=$(parse_cnf sst inno-backup-opts "") iopts=$(parse_cnf "$bkgroups" 'inno-backup-opts')
iapts=$(parse_cnf sst inno-apply-opts "") iapts=$(parse_cnf "$bkgroups" 'inno-apply-opts')
impts=$(parse_cnf sst inno-move-opts "") impts=$(parse_cnf "$bkgroups" 'inno-move-opts')
stimeout=$(parse_cnf sst sst-initial-timeout 300) use_memory=$(parse_cnf "$bkgroups" 'use-memory')
ssyslog=$(parse_cnf sst sst-syslog 0) if [ -z "$use_memory" ]; then
ssystag=$(parse_cnf mysqld_safe syslog-tag "${SST_SYSLOG_TAG:-}") if [ -n "$INNODB_BUFFER_POOL_SIZE" ]; then
use_memory="$INNODB_BUFFER_POOL_SIZE"
else
use_memory=$(parse_cnf '--mysqld' 'innodb-buffer-pool-size')
fi
fi
stimeout=$(parse_cnf sst 'sst-initial-timeout' 300)
ssyslog=$(parse_cnf sst 'sst-syslog' 0)
ssystag=$(parse_cnf mysqld_safe 'syslog-tag' "${SST_SYSLOG_TAG:-}")
ssystag="$ssystag-" ssystag="$ssystag-"
sstlogarchive=$(parse_cnf sst sst-log-archive 1) sstlogarchive=$(parse_cnf sst 'sst-log-archive' 1)
sstlogarchivedir="" sstlogarchivedir=""
if [ $sstlogarchive -ne 0 ]; then if [ $sstlogarchive -ne 0 ]; then
sstlogarchivedir=$(parse_cnf sst sst-log-archive-dir \ sstlogarchivedir=$(parse_cnf sst sst-log-archive-dir \
@ -1053,6 +1062,9 @@ setup_commands()
if [ -n "$INNODB_FORCE_RECOVERY" ]; then if [ -n "$INNODB_FORCE_RECOVERY" ]; then
recovery=" --innodb-force-recovery=$INNODB_FORCE_RECOVERY" recovery=" --innodb-force-recovery=$INNODB_FORCE_RECOVERY"
fi fi
if [ -n "$use_memory" ]; then
INNOEXTRA="$INNOEXTRA --use-memory=$use_memory"
fi
INNOAPPLY="$BACKUP_BIN --prepare$disver$recovery${iapts:+ }$iapts$INNOEXTRA --target-dir='$DATA' --datadir='$DATA'$mysqld_args $INNOAPPLY" INNOAPPLY="$BACKUP_BIN --prepare$disver$recovery${iapts:+ }$iapts$INNOEXTRA --target-dir='$DATA' --datadir='$DATA'$mysqld_args $INNOAPPLY"
INNOMOVE="$BACKUP_BIN$WSREP_SST_OPT_CONF --move-back$disver${impts:+ }$impts$INNOEXTRA --galera-info --force-non-empty-directories --target-dir='$DATA' --datadir='${TDATA:-$DATA}' $INNOMOVE" INNOMOVE="$BACKUP_BIN$WSREP_SST_OPT_CONF --move-back$disver${impts:+ }$impts$INNOEXTRA --galera-info --force-non-empty-directories --target-dir='$DATA' --datadir='${TDATA:-$DATA}' $INNOMOVE"
INNOBACKUP="$BACKUP_BIN$WSREP_SST_OPT_CONF --backup$disver${iopts:+ }$iopts$tmpopts$INNOEXTRA --galera-info --stream=$sfmt --target-dir='$itmpdir' --datadir='$DATA'$mysqld_args $INNOBACKUP" INNOBACKUP="$BACKUP_BIN$WSREP_SST_OPT_CONF --backup$disver${iopts:+ }$iopts$tmpopts$INNOEXTRA --galera-info --stream=$sfmt --target-dir='$itmpdir' --datadir='$DATA'$mysqld_args $INNOBACKUP"

View file

@ -479,7 +479,7 @@ SORT_INFO *filesort(THD *thd, TABLE *table, Filesort *filesort,
MYF(0), MYF(0),
ER_THD(thd, ER_FILSORT_ABORT), ER_THD(thd, ER_FILSORT_ABORT),
kill_errno ? ER_THD(thd, kill_errno) : kill_errno ? ER_THD(thd, kill_errno) :
thd->killed == ABORT_QUERY ? "" : thd->killed == ABORT_QUERY ? "LIMIT ROWS EXAMINED" :
thd->get_stmt_da()->message()); thd->get_stmt_da()->message());
if ((thd->killed == ABORT_QUERY || kill_errno) && if ((thd->killed == ABORT_QUERY || kill_errno) &&

View file

@ -1309,9 +1309,10 @@ longlong Item_func_minus::int_op()
{ {
if (args[1]->unsigned_flag) if (args[1]->unsigned_flag)
{ {
if ((ulonglong) val0 < (ulonglong) val1) if ((ulonglong) val0 >= (ulonglong) val1)
res_unsigned= TRUE;
else if ((ulonglong)val1 - (ulonglong)val0 > (ulonglong)LONGLONG_MAX)
goto err; goto err;
res_unsigned= TRUE;
} }
else else
{ {

View file

@ -9868,7 +9868,7 @@ static int calculate_server_uid(char *dest)
int2store(rawbuf, mysqld_port); int2store(rawbuf, mysqld_port);
if (my_gethwaddr(rawbuf + 2)) if (my_gethwaddr(rawbuf + 2))
{ {
sql_print_error("feedback plugin: failed to retrieve the MAC address"); sql_print_warning("failed to retrieve the MAC address");
return 1; return 1;
} }

View file

@ -1906,83 +1906,83 @@ ER_NORMAL_SHUTDOWN
swe "%s (%s): Normal avslutning" swe "%s (%s): Normal avslutning"
ukr "%s (%s): Нормальне завершення" ukr "%s (%s): Нормальне завершення"
ER_GOT_SIGNAL ER_GOT_SIGNAL
chi "%s: 收到信号 %d. 强行中止!\n" chi "%s: 收到信号 %d. 强行中止!"
cze "%s: přijat signal %d, končím\n" cze "%s: přijat signal %d, končím!"
dan "%s: Fangede signal %d. Afslutter!!\n" dan "%s: Fangede signal %d. Afslutter!"
eng "%s: Got signal %d. Aborting!\n" eng "%s: Got signal %d. Aborting!"
est "%s: sain signaali %d. Lõpetan!\n" est "%s: sain signaali %d. Lõpetan!"
fre "%s: Reçu le signal %d. Abandonne!\n" fre "%s: Reçu le signal %d. Abandonne!"
ger "%s: Signal %d erhalten. Abbruch!\n" ger "%s: Signal %d erhalten. Abbruch!"
greek "%s: Ελήφθη το μήνυμα %d. Η διαδικασία εγκαταλείπεται!\n" greek "%s: Ελήφθη το μήνυμα %d. Η διαδικασία εγκαταλείπεται!"
hindi "%s: सिग्नल %d मिलने के कारण सिस्टम बंद किया जा रहा है!\n" hindi "%s: सिग्नल %d मिलने के कारण सिस्टम बंद किया जा रहा है!"
hun "%s: %d jelzes. Megszakitva!\n" hun "%s: %d jelzes. Megszakitva!"
ita "%s: Ricevuto segnale %d. Interruzione!\n" ita "%s: Ricevuto segnale %d. Interruzione!"
jpn "%s: シグナル %d を受信しました。強制終了します!\n" jpn "%s: シグナル %d を受信しました。強制終了します!"
kor "%s: %d 신호가 들어왔음. 중지!\n" kor "%s: %d 신호가 들어왔음. 중지!"
nla "%s: Signaal %d. Systeem breekt af!\n" nla "%s: Signaal %d. Systeem breekt af!"
nor "%s: Oppdaget signal %d. Avslutter!\n" nor "%s: Oppdaget signal %d. Avslutter!"
norwegian-ny "%s: Oppdaga signal %d. Avsluttar!\n" norwegian-ny "%s: Oppdaga signal %d. Avsluttar!"
pol "%s: Otrzymano sygnał %d. Kończenie działania!\n" pol "%s: Otrzymano sygnał %d. Kończenie działania!"
por "%s: Obteve sinal %d. Abortando!\n" por "%s: Obteve sinal %d. Abortando!"
rum "%s: Semnal %d obtinut. Aborting!\n" rum "%s: Semnal %d obtinut. Aborting!"
rus "%s: Получен сигнал %d. Прекращаем!\n" rus "%s: Получен сигнал %d. Прекращаем!"
serbian "%s: Dobio signal %d. Prekidam!\n" serbian "%s: Dobio signal %d. Prekidam!"
slo "%s: prijatý signál %d, ukončenie (Abort)!\n" slo "%s: prijatý signál %d, ukončenie (Abort)!"
spa "%s: Obtenida señal %d. ¡Abortando!\n" spa "%s: Obtenida señal %d. ¡Abortando!"
swe "%s: Fick signal %d. Avslutar!\n" swe "%s: Fick signal %d. Avslutar!"
ukr "%s: Отримано сигнал %d. Перериваюсь!\n" ukr "%s: Отримано сигнал %d. Перериваюсь!"
ER_SHUTDOWN_COMPLETE ER_SHUTDOWN_COMPLETE
chi "%s关闭完成\n" chi "%s关闭完成"
cze "%s: ukončení práce hotovo\n" cze "%s: ukončení práce hotovo"
dan "%s: Server lukket\n" dan "%s: Server lukket"
eng "%s: Shutdown complete\n" eng "%s: Shutdown complete"
est "%s: Lõpp\n" est "%s: Lõpp"
fre "%s: Arrêt du serveur terminé\n" fre "%s: Arrêt du serveur terminé"
ger "%s: Herunterfahren beendet\n" ger "%s: Herunterfahren beendet"
greek "%s: Η διαδικασία Shutdown ολοκληρώθηκε\n" greek "%s: Η διαδικασία Shutdown ολοκληρώθηκε"
hindi "%s: शटडाउन पूर्ण\n" hindi "%s: शटडाउन पूर्ण"
hun "%s: A leallitas kesz\n" hun "%s: A leallitas kesz"
ita "%s: Shutdown completato\n" ita "%s: Shutdown completato"
jpn "%s: シャットダウン完了\n" jpn "%s: シャットダウン完了"
kor "%s: Shutdown 이 완료됨!\n" kor "%s: Shutdown 이 완료됨!"
nla "%s: Afsluiten afgerond\n" nla "%s: Afsluiten afgerond"
nor "%s: Avslutning komplett\n" nor "%s: Avslutning komplett"
norwegian-ny "%s: Nedkopling komplett\n" norwegian-ny "%s: Nedkopling komplett"
pol "%s: Zakończenie działania wykonane\n" pol "%s: Zakończenie działania wykonane"
por "%s: 'Shutdown' completo\n" por "%s: 'Shutdown' completo"
rum "%s: Terminare completa\n" rum "%s: Terminare completa"
rus "%s: Остановка завершена\n" rus "%s: Остановка завершена"
serbian "%s: Gašenje završeno\n" serbian "%s: Gašenje završeno"
slo "%s: práca ukončená\n" slo "%s: práca ukončená"
spa "%s: Apagado completado\n" spa "%s: Apagado completado"
swe "%s: Avslutning klar\n" swe "%s: Avslutning klar"
ukr "%s: Роботу завершено\n" ukr "%s: Роботу завершено"
ER_FORCING_CLOSE 08S01 ER_FORCING_CLOSE 08S01
chi "%s: 强行关闭线程 %ld 用户: '%-.48s'\n" chi "%s: 强行关闭线程 %ld 用户: '%-.48s'"
cze "%s: násilné uzavření threadu %ld uživatele '%-.48s'\n" cze "%s: násilné uzavření threadu %ld uživatele '%-.48s'"
dan "%s: Forceret nedlukning af tråd: %ld bruger: '%-.48s'\n" dan "%s: Forceret nedlukning af tråd: %ld bruger: '%-.48s'"
eng "%s: Forcing close of thread %ld user: '%-.48s'\n" eng "%s: Forcing close of thread %ld user: '%-.48s'"
est "%s: Sulgen jõuga lõime %ld kasutaja: '%-.48s'\n" est "%s: Sulgen jõuga lõime %ld kasutaja: '%-.48s'"
fre "%s: Arrêt forcé de la tâche (thread) %ld utilisateur: '%-.48s'\n" fre "%s: Arrêt forcé de la tâche (thread) %ld utilisateur: '%-.48s'"
ger "%s: Thread %ld zwangsweise beendet. Benutzer: '%-.48s'\n" ger "%s: Thread %ld zwangsweise beendet. Benutzer: '%-.48s'"
greek "%s: Το thread θα κλείσει %ld user: '%-.48s'\n" greek "%s: Το thread θα κλείσει %ld user: '%-.48s'"
hindi "%s: %ld थ्रेड बंद किया जा रहा है (यूज़र: '%-.48s')\n" hindi "%s: %ld थ्रेड बंद किया जा रहा है (यूज़र: '%-.48s')"
hun "%s: A(z) %ld thread kenyszeritett zarasa. Felhasznalo: '%-.48s'\n" hun "%s: A(z) %ld thread kenyszeritett zarasa. Felhasznalo: '%-.48s'"
ita "%s: Forzata la chiusura del thread %ld utente: '%-.48s'\n" ita "%s: Forzata la chiusura del thread %ld utente: '%-.48s'"
jpn "%s: スレッド %ld を強制終了します (ユーザー: '%-.48s')\n" jpn "%s: スレッド %ld を強制終了します (ユーザー: '%-.48s')"
kor "%s: thread %ld의 강제 종료 user: '%-.48s'\n" kor "%s: thread %ld의 강제 종료 user: '%-.48s'"
nla "%s: Afsluiten afgedwongen van thread %ld gebruiker: '%-.48s'\n" nla "%s: Afsluiten afgedwongen van thread %ld gebruiker: '%-.48s'"
nor "%s: Påtvinget avslutning av tråd %ld bruker: '%-.48s'\n" nor "%s: Påtvinget avslutning av tråd %ld bruker: '%-.48s'"
norwegian-ny "%s: Påtvinga avslutning av tråd %ld brukar: '%-.48s'\n" norwegian-ny "%s: Påtvinga avslutning av tråd %ld brukar: '%-.48s'"
pol "%s: Wymuszenie zamknięcia w?tku %ld użytkownik: '%-.48s'\n" pol "%s: Wymuszenie zamknięcia w?tku %ld użytkownik: '%-.48s'"
por "%s: Forçando finalização da 'thread' %ld - usuário '%-.48s'\n" por "%s: Forçando finalização da 'thread' %ld - usuário '%-.48s'"
rum "%s: Terminare fortata a thread-ului %ld utilizatorului: '%-.48s'\n" rum "%s: Terminare fortata a thread-ului %ld utilizatorului: '%-.48s'"
rus "%s: Принудительно закрываем поток %ld пользователя: '%-.48s'\n" rus "%s: Принудительно закрываем поток %ld пользователя: '%-.48s'"
serbian "%s: Usiljeno gašenje thread-a %ld koji pripada korisniku: '%-.48s'\n" serbian "%s: Usiljeno gašenje thread-a %ld koji pripada korisniku: '%-.48s'"
slo "%s: násilné ukončenie vlákna %ld užívateľa '%-.48s'\n" slo "%s: násilné ukončenie vlákna %ld užívateľa '%-.48s'"
spa "%s: Forzando a cerrar el hilo (thread) %ld usuario: '%-.48s'\n" spa "%s: Forzando a cerrar el hilo (thread) %ld usuario: '%-.48s'"
swe "%s: Stänger av tråd %ld; användare: '%-.48s'\n" swe "%s: Stänger av tråd %ld; användare: '%-.48s'"
ukr "%s: Прискорюю закриття гілки %ld користувача: '%-.48s'\n" ukr "%s: Прискорюю закриття гілки %ld користувача: '%-.48s'"
ER_IPSOCK_ERROR 08S01 ER_IPSOCK_ERROR 08S01
chi "无法创建IP插口" chi "无法创建IP插口"
cze "Nemohu vytvořit IP socket" cze "Nemohu vytvořit IP socket"
@ -2401,31 +2401,31 @@ ER_TOO_BIG_SET
swe "För många alternativ till kolumn %-.192s för SET" swe "För många alternativ till kolumn %-.192s för SET"
ukr "Забагато строк для стовбця %-.192s та SET" ukr "Забагато строк для стовбця %-.192s та SET"
ER_NO_UNIQUE_LOGFILE ER_NO_UNIQUE_LOGFILE
chi "无法生成唯一的log-filename%-.200s.(1-999)\ n" chi "无法生成唯一的log-filename%-.200s.(1-999)"
cze "Nemohu vytvořit jednoznačné jméno logovacího souboru %-.200s.(1-999)\n" cze "Nemohu vytvořit jednoznačné jméno logovacího souboru %-.200s.(1-999)"
dan "Kan ikke lave unikt log-filnavn %-.200s.(1-999)\n" dan "Kan ikke lave unikt log-filnavn %-.200s.(1-999)"
eng "Can't generate a unique log-filename %-.200s.(1-999)\n" eng "Can't generate a unique log-filename %-.200s.(1-999)"
est "Ei suuda luua unikaalset logifaili nime %-.200s.(1-999)\n" est "Ei suuda luua unikaalset logifaili nime %-.200s.(1-999)"
fre "Ne peut générer un unique nom de journal %-.200s.(1-999)\n" fre "Ne peut générer un unique nom de journal %-.200s.(1-999)"
ger "Kann keinen eindeutigen Dateinamen für die Logdatei %-.200s(1-999) erzeugen\n" ger "Kann keinen eindeutigen Dateinamen für die Logdatei %-.200s(1-999) erzeugen"
greek "Αδύνατη η δημιουργία unique log-filename %-.200s.(1-999)\n" greek "Αδύνατη η δημιουργία unique log-filename %-.200s.(1-999)"
hindi "एक अनूठा लॉग-फ़ाइल नाम %-.200s.(1-999) उत्पन्न नहीं कर सके\n" hindi "एक अनूठा लॉग-फ़ाइल नाम %-.200s.(1-999) उत्पन्न नहीं कर सके"
hun "Egyedi log-filenev nem generalhato: %-.200s.(1-999)\n" hun "Egyedi log-filenev nem generalhato: %-.200s.(1-999)"
ita "Impossibile generare un nome del file log unico %-.200s.(1-999)\n" ita "Impossibile generare un nome del file log unico %-.200s.(1-999)"
jpn "一意なログファイル名 %-.200s.(1-999) を生成できません。\n" jpn "一意なログファイル名 %-.200s.(1-999) を生成できません。"
kor "Unique 로그화일 '%-.200s'를 만들수 없습니다.(1-999)\n" kor "Unique 로그화일 '%-.200s'를 만들수 없습니다.(1-999)"
nla "Het is niet mogelijk een unieke naam te maken voor de logfile %-.200s.(1-999)\n" nla "Het is niet mogelijk een unieke naam te maken voor de logfile %-.200s.(1-999)"
nor "Kan ikke lage unikt loggfilnavn %-.200s.(1-999)\n" nor "Kan ikke lage unikt loggfilnavn %-.200s.(1-999)"
norwegian-ny "Kan ikkje lage unikt loggfilnavn %-.200s.(1-999)\n" norwegian-ny "Kan ikkje lage unikt loggfilnavn %-.200s.(1-999)"
pol "Nie można stworzyć unikalnej nazwy pliku z logiem %-.200s.(1-999)\n" pol "Nie można stworzyć unikalnej nazwy pliku z logiem %-.200s.(1-999)"
por "Não pode gerar um nome de arquivo de 'log' único '%-.200s'.(1-999)\n" por "Não pode gerar um nome de arquivo de 'log' único '%-.200s'.(1-999)"
rum "Nu pot sa generez un nume de log unic %-.200s.(1-999)\n" rum "Nu pot sa generez un nume de log unic %-.200s.(1-999)"
rus "Невозможно создать уникальное имя файла журнала %-.200s.(1-999)\n" rus "Невозможно создать уникальное имя файла журнала %-.200s.(1-999)"
serbian "Ne mogu da generišem jedinstveno ime log-file-a: '%-.200s.(1-999)'\n" serbian "Ne mogu da generišem jedinstveno ime log-file-a: '%-.200s.(1-999)'"
slo "Nemôžem vytvoriť unikátne meno log-súboru %-.200s.(1-999)\n" slo "Nemôžem vytvoriť unikátne meno log-súboru %-.200s.(1-999)"
spa "No puedo generar un único fichero/archivo de historial (log) llamado %-.200s.(1-999)\n" spa "No puedo generar un único fichero/archivo de historial (log) llamado %-.200s.(1-999)"
swe "Kan inte generera ett unikt filnamn %-.200s.(1-999)\n" swe "Kan inte generera ett unikt filnamn %-.200s.(1-999)"
ukr "Не можу згенерувати унікальне ім'я log-файлу %-.200s.(1-999)\n" ukr "Не можу згенерувати унікальне ім'я log-файлу %-.200s.(1-999)"
ER_TABLE_NOT_LOCKED_FOR_WRITE ER_TABLE_NOT_LOCKED_FOR_WRITE
chi "表 '%-.192s' 有 READ 锁,无法更新" chi "表 '%-.192s' 有 READ 锁,无法更新"
cze "Tabulka '%-.192s' byla zamčena s READ a nemůže být změněna" cze "Tabulka '%-.192s' byla zamčena s READ a nemůže být změněna"

View file

@ -3973,7 +3973,8 @@ bool acl_check_host(const char *host, const char *ip)
return 0; return 0;
mysql_mutex_lock(&acl_cache->lock); mysql_mutex_lock(&acl_cache->lock);
if ((host && my_hash_search(&acl_check_hosts,(uchar*) host,strlen(host))) || if (allow_all_hosts ||
(host && my_hash_search(&acl_check_hosts,(uchar*) host,strlen(host))) ||
(ip && my_hash_search(&acl_check_hosts,(uchar*) ip, strlen(ip)))) (ip && my_hash_search(&acl_check_hosts,(uchar*) ip, strlen(ip))))
{ {
mysql_mutex_unlock(&acl_cache->lock); mysql_mutex_unlock(&acl_cache->lock);

View file

@ -691,6 +691,7 @@ Sql_condition *Warning_info::push_warning(THD *thd,
const char *msg) const char *msg)
{ {
Sql_condition *cond= NULL; Sql_condition *cond= NULL;
DBUG_ASSERT(msg[strlen(msg)-1] != '\n');
if (! m_read_only) if (! m_read_only)
{ {

View file

@ -4160,7 +4160,7 @@ bool mysql_show_binlog_events(THD* thd)
if (lex_mi->pos > binlog_size) if (lex_mi->pos > binlog_size)
{ {
snprintf(errmsg_buf, sizeof(errmsg_buf), "Invalid pos specified. Requested from pos:%llu is " snprintf(errmsg_buf, sizeof(errmsg_buf), "Invalid pos specified. Requested from pos:%llu is "
"greater than actual file size:%lu\n", lex_mi->pos, "greater than actual file size:%lu", lex_mi->pos,
(ulong)s.st_size); (ulong)s.st_size);
errmsg= errmsg_buf; errmsg= errmsg_buf;
goto err; goto err;

View file

@ -4016,7 +4016,7 @@ static void print_long_unique_table(TABLE *table)
"table->field[%u]->offset = %" PRIdPTR "\n" // `%td` not available "table->field[%u]->offset = %" PRIdPTR "\n" // `%td` not available
"table->field[%u]->field_length = %d\n" "table->field[%u]->field_length = %d\n"
"table->field[%u]->null_pos wrt to record 0 = %" PRIdPTR "\n" "table->field[%u]->null_pos wrt to record 0 = %" PRIdPTR "\n"
"table->field[%u]->null_bit_pos = %d\n", "table->field[%u]->null_bit_pos = %d",
i, field->field_name.str, i, field->field_name.str,
i, field->ptr- table->record[0], i, field->ptr- table->record[0],
i, field->pack_length(), i, field->pack_length(),

View file

@ -243,8 +243,10 @@ int DOMDOC::DumpDoc(PGLOBAL g, char *ofn)
try { try {
Docp->save(ofn); Docp->save(ofn);
} catch(_com_error e) { } catch(_com_error e) {
snprintf(g->Message, sizeof(g->Message), "%s: %s", MSG(COM_ERROR), int i = snprintf(g->Message, sizeof(g->Message), "%s: %s", MSG(COM_ERROR),
_com_util::ConvertBSTRToString(e.Description())); _com_util::ConvertBSTRToString(e.Description()));
for (i--; i >= 0 && g->Message[i] == '\n'; i--)
g->Message[i] = 0;
rc = -1; rc = -1;
} catch(...) {} } catch(...) {}

View file

@ -12909,7 +12909,7 @@ int create_table_info_t::create_table(bool create_fk)
" on table %s. Please check" " on table %s. Please check"
" the index definition to" " the index definition to"
" make sure it is of correct" " make sure it is of correct"
" type\n", " type",
FTS_DOC_ID_INDEX_NAME, FTS_DOC_ID_INDEX_NAME,
m_table->name.m_name); m_table->name.m_name);
@ -12981,7 +12981,7 @@ int create_table_info_t::create_table(bool create_fk)
"Create table '%s' with foreign key constraint" "Create table '%s' with foreign key constraint"
" failed. There is no index in the referenced" " failed. There is no index in the referenced"
" table where the referenced columns appear" " table where the referenced columns appear"
" as the first columns.\n", m_table_name); " as the first columns.", m_table_name);
break; break;
case DB_CHILD_NO_INDEX: case DB_CHILD_NO_INDEX:
@ -12991,7 +12991,7 @@ int create_table_info_t::create_table(bool create_fk)
"Create table '%s' with foreign key constraint" "Create table '%s' with foreign key constraint"
" failed. There is no index in the referencing" " failed. There is no index in the referencing"
" table where referencing columns appear" " table where referencing columns appear"
" as the first columns.\n", m_table_name); " as the first columns.", m_table_name);
break; break;
case DB_NO_FK_ON_S_BASE_COL: case DB_NO_FK_ON_S_BASE_COL:
push_warning_printf( push_warning_printf(
@ -13000,7 +13000,7 @@ int create_table_info_t::create_table(bool create_fk)
"Create table '%s' with foreign key constraint" "Create table '%s' with foreign key constraint"
" failed. Cannot add foreign key constraint" " failed. Cannot add foreign key constraint"
" placed on the base column of stored" " placed on the base column of stored"
" column. \n", " column. ",
m_table_name); m_table_name);
default: default:
break; break;
@ -15269,7 +15269,7 @@ ha_innobase::optimize(
} else { } else {
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
uint(err), uint(err),
"InnoDB: Cannot defragment table %s: returned error code %d\n", "InnoDB: Cannot defragment table %s: returned error code %d",
m_prebuilt->table->name.m_name, err); m_prebuilt->table->name.m_name, err);
if(err == ER_SP_ALREADY_EXISTS) { if(err == ER_SP_ALREADY_EXISTS) {
@ -21077,8 +21077,7 @@ innodb_compression_algorithm_validate(
if (compression_algorithm == PAGE_LZ4_ALGORITHM) { if (compression_algorithm == PAGE_LZ4_ALGORITHM) {
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
HA_ERR_UNSUPPORTED, HA_ERR_UNSUPPORTED,
"InnoDB: innodb_compression_algorithm = %lu unsupported.\n" "InnoDB: innodb_compression_algorithm = %lu unsupported. liblz4 is not installed.",
"InnoDB: liblz4 is not installed. \n",
compression_algorithm); compression_algorithm);
DBUG_RETURN(1); DBUG_RETURN(1);
} }
@ -21088,8 +21087,7 @@ innodb_compression_algorithm_validate(
if (compression_algorithm == PAGE_LZO_ALGORITHM) { if (compression_algorithm == PAGE_LZO_ALGORITHM) {
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
HA_ERR_UNSUPPORTED, HA_ERR_UNSUPPORTED,
"InnoDB: innodb_compression_algorithm = %lu unsupported.\n" "InnoDB: innodb_compression_algorithm = %lu unsupported. liblzo is not installed.",
"InnoDB: liblzo is not installed. \n",
compression_algorithm); compression_algorithm);
DBUG_RETURN(1); DBUG_RETURN(1);
} }
@ -21099,8 +21097,7 @@ innodb_compression_algorithm_validate(
if (compression_algorithm == PAGE_LZMA_ALGORITHM) { if (compression_algorithm == PAGE_LZMA_ALGORITHM) {
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
HA_ERR_UNSUPPORTED, HA_ERR_UNSUPPORTED,
"InnoDB: innodb_compression_algorithm = %lu unsupported.\n" "InnoDB: innodb_compression_algorithm = %lu unsupported. liblzma is not installed.",
"InnoDB: liblzma is not installed. \n",
compression_algorithm); compression_algorithm);
DBUG_RETURN(1); DBUG_RETURN(1);
} }
@ -21110,8 +21107,7 @@ innodb_compression_algorithm_validate(
if (compression_algorithm == PAGE_BZIP2_ALGORITHM) { if (compression_algorithm == PAGE_BZIP2_ALGORITHM) {
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
HA_ERR_UNSUPPORTED, HA_ERR_UNSUPPORTED,
"InnoDB: innodb_compression_algorithm = %lu unsupported.\n" "InnoDB: innodb_compression_algorithm = %lu unsupported. libbz2 is not installed.",
"InnoDB: libbz2 is not installed. \n",
compression_algorithm); compression_algorithm);
DBUG_RETURN(1); DBUG_RETURN(1);
} }
@ -21121,8 +21117,7 @@ innodb_compression_algorithm_validate(
if (compression_algorithm == PAGE_SNAPPY_ALGORITHM) { if (compression_algorithm == PAGE_SNAPPY_ALGORITHM) {
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
HA_ERR_UNSUPPORTED, HA_ERR_UNSUPPORTED,
"InnoDB: innodb_compression_algorithm = %lu unsupported.\n" "InnoDB: innodb_compression_algorithm = %lu unsupported. libsnappy is not installed.",
"InnoDB: libsnappy is not installed. \n",
compression_algorithm); compression_algorithm);
DBUG_RETURN(1); DBUG_RETURN(1);
} }

View file

@ -5448,7 +5448,7 @@ static int sort_get_next_record(MARIA_SORT_PARAM *sort_param)
if (! searching) if (! searching)
_ma_check_print_info(param, _ma_check_print_info(param,
"Found block with wrong recordlength: %lu " "Found block with wrong recordlength: %lu "
"at %s\n", "at %s",
block_info.rec_len, block_info.rec_len,
llstr(sort_param->pos,llbuff)); llstr(sort_param->pos,llbuff));
continue; continue;
@ -6456,7 +6456,7 @@ void _ma_update_auto_increment_key(HA_CHECK *param, MARIA_HA *info,
{ {
if (!(param->testflag & T_VERY_SILENT)) if (!(param->testflag & T_VERY_SILENT))
_ma_check_print_info(param, _ma_check_print_info(param,
"Table: %s doesn't have an auto increment key\n", "Table: %s doesn't have an auto increment key",
param->isam_file_name); param->isam_file_name);
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }

View file

@ -74,7 +74,7 @@ int maria_extra(MARIA_HA *info, enum ha_extra_function function,
} }
if (info->s->file_map) /* Don't use cache if mmap */ if (info->s->file_map) /* Don't use cache if mmap */
break; break;
#if defined(HAVE_MMAP) && defined(HAVE_MADVISE) #if defined(HAVE_MMAP) && defined(HAVE_MADVISE) && !defined(HAVE_valgrind)
if ((share->options & HA_OPTION_COMPRESS_RECORD)) if ((share->options & HA_OPTION_COMPRESS_RECORD))
{ {
mysql_mutex_lock(&share->intern_lock); mysql_mutex_lock(&share->intern_lock);
@ -162,7 +162,7 @@ int maria_extra(MARIA_HA *info, enum ha_extra_function function,
error= end_io_cache(&info->rec_cache); error= end_io_cache(&info->rec_cache);
/* Sergei will insert full text index caching here */ /* Sergei will insert full text index caching here */
} }
#if defined(HAVE_MMAP) && defined(HAVE_MADVISE) #if defined(HAVE_MMAP) && defined(HAVE_MADVISE) && !defined(HAVE_valgrind)
if (info->opt_flag & MEMMAP_USED) if (info->opt_flag & MEMMAP_USED)
madvise((char*) share->file_map, share->state.state.data_file_length, madvise((char*) share->file_map, share->state.state.data_file_length,
MADV_RANDOM); MADV_RANDOM);
@ -456,7 +456,7 @@ int maria_extra(MARIA_HA *info, enum ha_extra_function function,
maria_extra_keyflag(info, function); maria_extra_keyflag(info, function);
break; break;
case HA_EXTRA_MMAP: case HA_EXTRA_MMAP:
#ifdef HAVE_MMAP #if defined(HAVE_MMAP) && !defined(HAVE_valgrind)
if (block_records) if (block_records)
break; /* Not supported */ break; /* Not supported */
mysql_mutex_lock(&share->intern_lock); mysql_mutex_lock(&share->intern_lock);

View file

@ -1272,7 +1272,7 @@ int chk_data_link(HA_CHECK *param, MI_INFO *info, my_bool extend)
(HA_OPTION_CHECKSUM | HA_OPTION_COMPRESS_RECORD))) (HA_OPTION_CHECKSUM | HA_OPTION_COMPRESS_RECORD)))
{ {
mi_check_print_warning(param, mi_check_print_warning(param,
"Record checksum is not the same as checksum stored in the index file\n"); "Record checksum is not the same as checksum stored in the index file");
error=1; error=1;
} }
else if (!extend) else if (!extend)
@ -3625,7 +3625,7 @@ static int sort_get_next_record(MI_SORT_PARAM *sort_param)
block_info.rec_len > (uint) share->max_pack_length) block_info.rec_len > (uint) share->max_pack_length)
{ {
if (! searching) if (! searching)
mi_check_print_info(param,"Found block with wrong recordlength: %ld at %s\n", mi_check_print_info(param,"Found block with wrong recordlength: %ld at %s",
block_info.rec_len, block_info.rec_len,
llstr(sort_param->pos,llbuff)); llstr(sort_param->pos,llbuff));
continue; continue;
@ -4135,7 +4135,7 @@ static int sort_delete_record(MI_SORT_PARAM *sort_param)
if (info->s->options & HA_OPTION_COMPRESS_RECORD) if (info->s->options & HA_OPTION_COMPRESS_RECORD)
{ {
mi_check_print_error(param, mi_check_print_error(param,
"Recover aborted; Can't run standard recovery on compressed tables with errors in data-file. Use switch 'myisamchk --safe-recover' to fix it\n"); "Recover aborted; Can't run standard recovery on compressed tables with errors in data-file. Use switch 'myisamchk --safe-recover' to fix it");
DBUG_RETURN(1); DBUG_RETURN(1);
} }
@ -4537,7 +4537,7 @@ void update_auto_increment_key(HA_CHECK *param, MI_INFO *info,
{ {
if (!(param->testflag & T_VERY_SILENT)) if (!(param->testflag & T_VERY_SILENT))
mi_check_print_info(param, mi_check_print_info(param,
"Table: %s doesn't have an auto increment key\n", "Table: %s doesn't have an auto increment key",
param->isam_file_name); param->isam_file_name);
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }

View file

@ -69,7 +69,7 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg)
} }
if (info->s->file_map) /* Don't use cache if mmap */ if (info->s->file_map) /* Don't use cache if mmap */
break; break;
#if defined(HAVE_MMAP) && defined(HAVE_MADVISE) #if defined(HAVE_MMAP) && defined(HAVE_MADVISE) && !defined(HAVE_valgrind)
if ((share->options & HA_OPTION_COMPRESS_RECORD)) if ((share->options & HA_OPTION_COMPRESS_RECORD))
{ {
mysql_mutex_lock(&share->intern_lock); mysql_mutex_lock(&share->intern_lock);
@ -155,7 +155,7 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg)
error=end_io_cache(&info->rec_cache); error=end_io_cache(&info->rec_cache);
/* Sergei will insert full text index caching here */ /* Sergei will insert full text index caching here */
} }
#if defined(HAVE_MMAP) && defined(HAVE_MADVISE) #if defined(HAVE_MMAP) && defined(HAVE_MADVISE) && !defined(HAVE_valgrind)
if (info->opt_flag & MEMMAP_USED) if (info->opt_flag & MEMMAP_USED)
madvise((char*) share->file_map, share->state.state.data_file_length, madvise((char*) share->file_map, share->state.state.data_file_length,
MADV_RANDOM); MADV_RANDOM);
@ -321,7 +321,7 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg)
mi_extra_keyflag(info, function); mi_extra_keyflag(info, function);
break; break;
case HA_EXTRA_MMAP: case HA_EXTRA_MMAP:
#ifdef HAVE_MMAP #if defined(HAVE_MMAP) && !defined(HAVE_valgrind)
mysql_mutex_lock(&share->intern_lock); mysql_mutex_lock(&share->intern_lock);
/* /*
Memory map the data file if it is not already mapped. It is safe Memory map the data file if it is not already mapped. It is safe

View file

@ -99,6 +99,7 @@ class aio_linux final : public aio
*/ */
constexpr unsigned MAX_EVENTS= 256; constexpr unsigned MAX_EVENTS= 256;
aio->m_pool->m_worker_init_callback();
io_event events[MAX_EVENTS]; io_event events[MAX_EVENTS];
for (;;) for (;;)
{ {
@ -107,14 +108,14 @@ class aio_linux final : public aio
continue; continue;
case -EINVAL: case -EINVAL:
if (shutdown_in_progress) if (shutdown_in_progress)
return; goto end;
/* fall through */ /* fall through */
default: default:
if (ret < 0) if (ret < 0)
{ {
fprintf(stderr, "io_getevents returned %d\n", ret); fprintf(stderr, "io_getevents returned %d\n", ret);
abort(); abort();
return; goto end;
} }
for (int i= 0; i < ret; i++) for (int i= 0; i < ret; i++)
{ {
@ -138,6 +139,8 @@ class aio_linux final : public aio
} }
} }
} }
end:
aio->m_pool->m_worker_destroy_callback();
} }
public: public:

View file

@ -92,7 +92,9 @@ public:
static void aio_completion_thread_proc(tpool_generic_win_aio* aio) static void aio_completion_thread_proc(tpool_generic_win_aio* aio)
{ {
aio->m_pool->m_worker_init_callback();
aio->completion_thread_work(); aio->completion_thread_work();
aio->m_pool->m_worker_destroy_callback();
} }
~tpool_generic_win_aio() ~tpool_generic_win_aio()

View file

@ -30,6 +30,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 - 1301 USA*/
#define NOMINMAX #define NOMINMAX
#endif #endif
#include <windows.h> #include <windows.h>
#include <cassert>
/** /**
Windows-specific native file handle struct. Windows-specific native file handle struct.
Apart from the actual handle, contains PTP_IO Apart from the actual handle, contains PTP_IO
@ -205,21 +207,24 @@ protected:
std::unique_ptr<aio> m_aio; std::unique_ptr<aio> m_aio;
virtual aio *create_native_aio(int max_io)= 0; virtual aio *create_native_aio(int max_io)= 0;
public:
/** /**
Functions to be called at worker thread start/end Functions to be called at worker thread start/end
can be used for example to set some TLS variables can be used for example to set some TLS variables
*/ */
void (*m_worker_init_callback)(void); void (*m_worker_init_callback)(void)= [] {};
void (*m_worker_destroy_callback)(void); void (*m_worker_destroy_callback)(void)= [] {};
public: thread_pool()
thread_pool() : m_aio(), m_worker_init_callback(), m_worker_destroy_callback() : m_aio()
{ {
} }
virtual void submit_task(task *t)= 0; virtual void submit_task(task *t)= 0;
virtual timer* create_timer(callback_func func, void *data=nullptr) = 0; virtual timer* create_timer(callback_func func, void *data=nullptr) = 0;
void set_thread_callbacks(void (*init)(), void (*destroy)()) void set_thread_callbacks(void (*init)(), void (*destroy)())
{ {
assert(init);
assert(destroy);
m_worker_init_callback= init; m_worker_init_callback= init;
m_worker_destroy_callback= destroy; m_worker_destroy_callback= destroy;
} }

View file

@ -564,8 +564,7 @@ void thread_pool_generic::worker_main(worker_data *thread_var)
{ {
task* task; task* task;
set_tls_pool(this); set_tls_pool(this);
if(m_worker_init_callback) m_worker_init_callback();
m_worker_init_callback();
tls_worker_data = thread_var; tls_worker_data = thread_var;
m_thread_creation_pending.clear(); m_thread_creation_pending.clear();
@ -575,8 +574,7 @@ void thread_pool_generic::worker_main(worker_data *thread_var)
task->execute(); task->execute();
} }
if (m_worker_destroy_callback) m_worker_destroy_callback();
m_worker_destroy_callback();
worker_end(thread_var); worker_end(thread_var);
} }

View file

@ -45,9 +45,7 @@ class thread_pool_win : public thread_pool
if (!m_pool) if (!m_pool)
return; return;
if (m_pool->m_worker_destroy_callback) m_pool->m_worker_destroy_callback();
m_pool->m_worker_destroy_callback();
m_pool->m_thread_count--; m_pool->m_thread_count--;
} }
/** This needs to be called before every IO or simple task callback.*/ /** This needs to be called before every IO or simple task callback.*/
@ -63,8 +61,7 @@ class thread_pool_win : public thread_pool
m_pool = pool; m_pool = pool;
m_pool->m_thread_count++; m_pool->m_thread_count++;
// Call the thread init function. // Call the thread init function.
if (m_pool->m_worker_init_callback) m_pool->m_worker_init_callback();
m_pool->m_worker_init_callback();
} }
}; };