Merge 10.4 into 10.5
This commit is contained in:
commit
977c385df3
@ -1722,7 +1722,7 @@ that may lead to an endless loop.",
|
||||
&opt_binlog_rows_event_max_encoded_size, 0,
|
||||
GET_ULONG, REQUIRED_ARG, UINT_MAX/4, 256, ULONG_MAX, 0, 256, 0},
|
||||
#endif
|
||||
{"verify-binlog-checksum", 'c', "Verify checksum binlog events.",
|
||||
{"verify-binlog-checksum", 'c', "Verify binlog event checksums.",
|
||||
(uchar**) &opt_verify_binlog_checksum, (uchar**) &opt_verify_binlog_checksum,
|
||||
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"rewrite-db", OPT_REWRITE_DB,
|
||||
|
@ -255,9 +255,6 @@
|
||||
#cmakedefine STRUCT_TIMESPEC_HAS_TV_SEC 1
|
||||
#cmakedefine STRUCT_TIMESPEC_HAS_TV_NSEC 1
|
||||
|
||||
#define USE_MB 1
|
||||
#define USE_MB_IDENT 1
|
||||
|
||||
/* this means that valgrind headers and macros are available */
|
||||
#cmakedefine HAVE_VALGRIND_MEMCHECK_H 1
|
||||
|
||||
@ -453,8 +450,8 @@
|
||||
#cmakedefine MYSQL_DEFAULT_CHARSET_NAME "@MYSQL_DEFAULT_CHARSET_NAME@"
|
||||
#cmakedefine MYSQL_DEFAULT_COLLATION_NAME "@MYSQL_DEFAULT_COLLATION_NAME@"
|
||||
|
||||
#cmakedefine USE_MB 1
|
||||
#cmakedefine USE_MB_IDENT 1
|
||||
#cmakedefine USE_MB
|
||||
#cmakedefine USE_MB_IDENT
|
||||
|
||||
/* This should mean case insensitive file system */
|
||||
#cmakedefine FN_NO_CASE_SENSE 1
|
||||
|
@ -195,4 +195,29 @@ connection default;
|
||||
DROP USER 'user2'@'%';
|
||||
DROP DATABASE temp;
|
||||
set global sql_mode=default;
|
||||
End of 5.0 tests
|
||||
#
|
||||
# End of 5.0 tests
|
||||
#
|
||||
create database db1;
|
||||
create user foo@localhost;
|
||||
grant create on db1.* to foo@localhost;
|
||||
connect foo,localhost,foo;
|
||||
create temporary table t as values (1),(2),(3);
|
||||
use db1;
|
||||
create table t1 as select * from test.t;
|
||||
ERROR 42000: INSERT command denied to user 'foo'@'localhost' for table `db1`.`t1`
|
||||
create table t1 as values (1),(2),(3);
|
||||
ERROR 42000: INSERT command denied to user 'foo'@'localhost' for table `db1`.`t1`
|
||||
create table t1 (a int);
|
||||
disconnect foo;
|
||||
connection default;
|
||||
revoke create on db1.* from foo@localhost;
|
||||
grant insert on db1.* to foo@localhost;
|
||||
connect foo,localhost,foo;
|
||||
use db1;
|
||||
create table t2 as values (1),(2),(3);
|
||||
ERROR 42000: CREATE command denied to user 'foo'@'localhost' for table `db1`.`t2`
|
||||
disconnect foo;
|
||||
connection default;
|
||||
drop user foo@localhost;
|
||||
drop database db1;
|
||||
|
@ -207,7 +207,35 @@ DROP USER 'user2'@'%';
|
||||
DROP DATABASE temp;
|
||||
|
||||
set global sql_mode=default;
|
||||
--echo End of 5.0 tests
|
||||
--echo #
|
||||
--echo # End of 5.0 tests
|
||||
--echo #
|
||||
|
||||
create database db1;
|
||||
create user foo@localhost;
|
||||
grant create on db1.* to foo@localhost;
|
||||
connect foo,localhost,foo;
|
||||
create temporary table t as values (1),(2),(3);
|
||||
use db1;
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
create table t1 as select * from test.t;
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
create table t1 as values (1),(2),(3);
|
||||
create table t1 (a int);
|
||||
disconnect foo;
|
||||
connection default;
|
||||
|
||||
revoke create on db1.* from foo@localhost;
|
||||
grant insert on db1.* to foo@localhost;
|
||||
connect foo,localhost,foo;
|
||||
use db1;
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
create table t2 as values (1),(2),(3);
|
||||
disconnect foo;
|
||||
|
||||
connection default;
|
||||
drop user foo@localhost;
|
||||
drop database db1;
|
||||
|
||||
# Wait till we reached the initial number of concurrent sessions
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -53,6 +53,8 @@ BEGIN NOT ATOMIC
|
||||
SELECT tabledef AS ``;
|
||||
EXECUTE IMMEDIATE tabledef;
|
||||
SHOW WARNINGS;
|
||||
SELECT * FROM t1;
|
||||
SHOW WARNINGS;
|
||||
SHOW CREATE TABLE t1;
|
||||
DROP TABLE t1;
|
||||
END;
|
||||
|
@ -34,8 +34,10 @@ SCHEMA="mtr_wsrep_notify"
|
||||
MEMB_TABLE="$SCHEMA.membership"
|
||||
STATUS_TABLE="$SCHEMA.status"
|
||||
|
||||
BEGIN="
|
||||
SET wsrep_on=0;
|
||||
WSREP_ON='SET wsrep_on=ON'
|
||||
WSREP_OFF='SET wsrep_on=OFF'
|
||||
|
||||
BEGIN="$WSREP_OFF;
|
||||
CREATE SCHEMA IF NOT EXISTS $SCHEMA;
|
||||
CREATE TABLE IF NOT EXISTS $MEMB_TABLE (
|
||||
idx INT,
|
||||
@ -50,9 +52,8 @@ CREATE TABLE IF NOT EXISTS $STATUS_TABLE (
|
||||
uuid CHAR(40), /* cluster UUID */
|
||||
prim BOOLEAN /* if component is primary */
|
||||
) ENGINE=MEMORY;
|
||||
BEGIN;
|
||||
"
|
||||
END="COMMIT;"
|
||||
BEGIN"
|
||||
END="COMMIT; $WSREP_ON"
|
||||
|
||||
configuration_change()
|
||||
{
|
||||
@ -71,7 +72,7 @@ configuration_change()
|
||||
|
||||
echo "INSERT INTO $STATUS_TABLE VALUES($idx, $INDEX, '$STATUS', '$CLUSTER_UUID', $PRIMARY);"
|
||||
|
||||
echo "$END"
|
||||
echo "$END;"
|
||||
}
|
||||
|
||||
status_update()
|
||||
@ -186,13 +187,13 @@ then
|
||||
fi
|
||||
fi
|
||||
|
||||
case $STATUS in
|
||||
"joined" | "donor" | "synced")
|
||||
case "$STATUS" in
|
||||
'joined' | 'donor' | 'synced')
|
||||
"$COM" | eval "$CLIENT" -B "-u'$USER'"${PSWD:+" -p'$PSWD'"}\
|
||||
"-h'$HOST'" "-P$PORT"$SSL_PARAM
|
||||
;;
|
||||
*)
|
||||
# The node might be shutting down
|
||||
# The node might be shutting down or not initialized
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -34,8 +34,10 @@ SCHEMA="mtr_wsrep_notify"
|
||||
MEMB_TABLE="$SCHEMA.membership"
|
||||
STATUS_TABLE="$SCHEMA.status"
|
||||
|
||||
BEGIN="
|
||||
SET wsrep_on=0;
|
||||
WSREP_ON='SET wsrep_on=ON'
|
||||
WSREP_OFF='SET wsrep_on=OFF'
|
||||
|
||||
BEGIN="$WSREP_OFF;
|
||||
CREATE SCHEMA IF NOT EXISTS $SCHEMA;
|
||||
CREATE TABLE IF NOT EXISTS $MEMB_TABLE (
|
||||
idx INT,
|
||||
@ -50,9 +52,8 @@ CREATE TABLE IF NOT EXISTS $STATUS_TABLE (
|
||||
uuid CHAR(40), /* cluster UUID */
|
||||
prim BOOLEAN /* if component is primary */
|
||||
) ENGINE=MEMORY;
|
||||
BEGIN;
|
||||
"
|
||||
END="COMMIT;"
|
||||
BEGIN"
|
||||
END="COMMIT; $WSREP_ON"
|
||||
|
||||
configuration_change()
|
||||
{
|
||||
@ -71,12 +72,12 @@ configuration_change()
|
||||
|
||||
echo "INSERT INTO $STATUS_TABLE VALUES($idx, $INDEX, '$STATUS', '$CLUSTER_UUID', $PRIMARY);"
|
||||
|
||||
echo "$END"
|
||||
echo "$END;"
|
||||
}
|
||||
|
||||
status_update()
|
||||
{
|
||||
echo "SET wsrep_on=0; BEGIN; UPDATE $STATUS_TABLE SET status='$STATUS'; COMMIT;"
|
||||
echo "$BEGIN; UPDATE $STATUS_TABLE SET status='$STATUS'; $END;"
|
||||
}
|
||||
|
||||
trim_string()
|
||||
@ -186,10 +187,14 @@ then
|
||||
fi
|
||||
fi
|
||||
|
||||
# Undefined means node is shutting down
|
||||
if [ "$STATUS" != 'Undefined' ]; then
|
||||
"$COM" | eval "$CLIENT" -B "-u'$USER'"${PSWD:+" -p'$PSWD'"}\
|
||||
"-h'$HOST'" "-P$PORT"$SSL_PARAM
|
||||
fi
|
||||
case "$STATUS" in
|
||||
'joined' | 'donor' | 'synced')
|
||||
"$COM" | eval "$CLIENT" -B "-u'$USER'"${PSWD:+" -p'$PSWD'"}\
|
||||
"-h'$HOST'" "-P$PORT"$SSL_PARAM
|
||||
;;
|
||||
*)
|
||||
# The node might be shutting down or not initialized
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
@ -22,7 +22,6 @@ galera_gcache_recover_manytrx : MDEV-18834 Galera test failure
|
||||
galera_parallel_simple : MDEV-20318 galera.galera_parallel_simple fails
|
||||
galera_pc_recovery : MDEV-25199 cluster fails to start up
|
||||
galera_shutdown_nonprim : MDEV-21493 galera.galera_shutdown_nonprim
|
||||
galera_trigger : MDEV-24048 galera.galera_trigger MTR fails: Result content mismatch
|
||||
galera_var_ignore_apply_errors : MDEV-26770 galera_var_ignore_apply_errors fails Server did not transition to READY state
|
||||
galera_var_node_address : MDEV-20485 Galera test failure
|
||||
galera_var_notify_cmd : MDEV-21905 Galera test galera_var_notify_cmd causes hang
|
||||
@ -33,3 +32,8 @@ query_cache: MDEV-15805 Test failure on galera.query_cache
|
||||
versioning_trx_id: MDEV-18590: galera.versioning_trx_id: Test failure: mysqltest: Result content mismatch
|
||||
galera_bf_abort_at_after_statement : Unstable
|
||||
|
||||
# Recent trouble
|
||||
MDEV-26597 : crashes on 10.5
|
||||
MDEV-27615 : crashes on 10.5 after MDEV-26597 fix
|
||||
MDEV-29142 : fails on 10.5 with WSREP: Inconsistency detected
|
||||
galera_bf_abort_shutdown : MDEV-29368 shutdown hang
|
||||
|
19
mysql-test/suite/galera/r/MDEV-26597.result
Normal file
19
mysql-test/suite/galera/r/MDEV-26597.result
Normal file
@ -0,0 +1,19 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
connection node_2;
|
||||
CREATE TABLE t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 FLOAT(3,2));
|
||||
SET GLOBAL wsrep_provider_options = 'repl.max_ws_size=512';
|
||||
SET @@autocommit=0;
|
||||
INSERT INTO t3 VALUES (1000,0.00),(1001,0.25),(1002,0.50),(1003,0.75),(1008,1.00),(1009,1.25),(1010,1.50),(1011,1.75);
|
||||
CREATE TABLE t1 ( pk int primary key) ENGINE=INNODB;
|
||||
ERROR HY000: Maximum writeset size exceeded
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Error 1105 Maximum writeset size exceeded
|
||||
connection node_2;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
Killing server ...
|
||||
connection node_1;
|
||||
DROP TABLE t3;
|
17
mysql-test/suite/galera/r/MDEV-27123.result
Normal file
17
mysql-test/suite/galera/r/MDEV-27123.result
Normal file
@ -0,0 +1,17 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
show variables like 'auto_increment%';
|
||||
Variable_name Value
|
||||
auto_increment_increment 3
|
||||
auto_increment_offset 3
|
||||
create table t4 (c1 int primary key auto_increment) engine=innodb;
|
||||
show variables like 'auto_increment%';
|
||||
Variable_name Value
|
||||
auto_increment_increment 3
|
||||
auto_increment_offset 3
|
||||
alter table t4 add (c2 varchar(50));
|
||||
show variables like 'auto_increment%';
|
||||
Variable_name Value
|
||||
auto_increment_increment 3
|
||||
auto_increment_offset 3
|
||||
DROP TABLE t4;
|
43
mysql-test/suite/galera/r/MDEV-29142.result
Normal file
43
mysql-test/suite/galera/r/MDEV-29142.result
Normal file
@ -0,0 +1,43 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
call mtr.add_suppression("WSREP: Event .* Write_rows_v1 apply failed:.*");
|
||||
call mtr.add_suppression("WSREP: Failed to apply write set:.*");
|
||||
connection node_2;
|
||||
call mtr.add_suppression("WSREP: Failed to open table mysql.wsrep_streaming_log for writing");
|
||||
call mtr.add_suppression("WSREP: Failed to open SR table for write");
|
||||
call mtr.add_suppression("WSREP: Failed to recover SR transactions from schema: wsrep_on : 0");
|
||||
SET @@global.tx_read_only = ON;
|
||||
SET default_storage_engine = SEQUENCE;
|
||||
create table t1 (c1 int);
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 131 "Command not supported by the engine")
|
||||
CREATE TABLE t1(c1 VARCHAR(20)) engine=innodb;
|
||||
INSERT INTO t1 VALUES(0xA9B8);
|
||||
create TABLE t1 (c1 int) engine=innodb;
|
||||
ERROR 42S01: Table 't1' already exists
|
||||
create TABLE t1 (c1 int) engine=innodb;
|
||||
ERROR 42S01: Table 't1' already exists
|
||||
SET GLOBAL wsrep_on=OFF;
|
||||
SET GLOBAL wsrep_cluster_address='gcomm://';
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SELECT 1;
|
||||
1
|
||||
1
|
||||
SELECT 1;
|
||||
1
|
||||
1
|
||||
COMMIT;
|
||||
# Killing cluster because we have messed with wsrep_cluster_address
|
||||
connection node_2;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
Killing server ...
|
||||
connection node_1;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
Killing server ...
|
||||
connection node_2;
|
||||
call mtr.add_suppression("WSREP: Failed to open table mysql.wsrep_streaming_log for writing");
|
||||
call mtr.add_suppression("WSREP: Failed to open SR table for write");
|
||||
call mtr.add_suppression("WSREP: Failed to recover SR transactions from schema: wsrep_on : 0");
|
||||
DROP TABLE IF EXISTS t1;
|
@ -4,7 +4,7 @@ connection node_1;
|
||||
CREATE TABLE t1 (f1 VARCHAR(512)) ENGINE=InnoDB;
|
||||
SET GLOBAL wsrep_provider_options = 'repl.max_ws_size=512';
|
||||
INSERT INTO t1 VALUES (REPEAT('a', 512));
|
||||
ERROR HY000: Got error 5 "Input/output error" during COMMIT
|
||||
ERROR HY000: Maximum writeset size exceeded
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
|
@ -4,7 +4,7 @@ connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 VARCHAR(1024)) Engine=InnoDB;
|
||||
SET GLOBAL wsrep_max_ws_size = 1024;
|
||||
INSERT INTO t1 VALUES (DEFAULT, REPEAT('X', 1024));
|
||||
ERROR HY000: Got error 5 "Input/output error" during COMMIT
|
||||
ERROR HY000: Maximum writeset size exceeded
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
SELECT COUNT(DISTINCT uuid) AS EXPECT_2 FROM mtr_wsrep_notify.membership;
|
||||
EXPECT_2
|
||||
|
32
mysql-test/suite/galera/t/MDEV-26597.test
Normal file
32
mysql-test/suite/galera/t/MDEV-26597.test
Normal file
@ -0,0 +1,32 @@
|
||||
--source include/galera_cluster.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
|
||||
CREATE TABLE t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 FLOAT(3,2));
|
||||
SET GLOBAL wsrep_provider_options = 'repl.max_ws_size=512';
|
||||
SET @@autocommit=0;
|
||||
INSERT INTO t3 VALUES (1000,0.00),(1001,0.25),(1002,0.50),(1003,0.75),(1008,1.00),(1009,1.25),(1010,1.50),(1011,1.75);
|
||||
--error ER_UNKNOWN_ERROR
|
||||
CREATE TABLE t1 ( pk int primary key) ENGINE=INNODB;
|
||||
SHOW WARNINGS;
|
||||
|
||||
--connection node_2
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
--source include/kill_galera.inc
|
||||
|
||||
--let $start_mysqld_params = ""
|
||||
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
|
||||
--source include/start_mysqld.inc
|
||||
|
||||
#
|
||||
# Cleanup
|
||||
#
|
||||
--source ../../galera/include/auto_increment_offset_restore.inc
|
||||
--connection node_1
|
||||
DROP TABLE t3;
|
||||
|
||||
|
2
mysql-test/suite/galera/t/MDEV-27123.opt
Normal file
2
mysql-test/suite/galera/t/MDEV-27123.opt
Normal file
@ -0,0 +1,2 @@
|
||||
--wsrep_auto_increment_control=OFF --auto_increment_increment=3 --auto_increment_offset=3
|
||||
|
8
mysql-test/suite/galera/t/MDEV-27123.test
Normal file
8
mysql-test/suite/galera/t/MDEV-27123.test
Normal file
@ -0,0 +1,8 @@
|
||||
--source include/galera_cluster.inc
|
||||
|
||||
show variables like 'auto_increment%';
|
||||
create table t4 (c1 int primary key auto_increment) engine=innodb;
|
||||
show variables like 'auto_increment%';
|
||||
alter table t4 add (c2 varchar(50));
|
||||
show variables like 'auto_increment%';
|
||||
DROP TABLE t4;
|
71
mysql-test/suite/galera/t/MDEV-29142.test
Normal file
71
mysql-test/suite/galera/t/MDEV-29142.test
Normal file
@ -0,0 +1,71 @@
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_sequence.inc
|
||||
--source include/force_restart.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_1
|
||||
call mtr.add_suppression("WSREP: Event .* Write_rows_v1 apply failed:.*");
|
||||
call mtr.add_suppression("WSREP: Failed to apply write set:.*");
|
||||
|
||||
--connection node_2
|
||||
call mtr.add_suppression("WSREP: Failed to open table mysql.wsrep_streaming_log for writing");
|
||||
call mtr.add_suppression("WSREP: Failed to open SR table for write");
|
||||
call mtr.add_suppression("WSREP: Failed to recover SR transactions from schema: wsrep_on : 0");
|
||||
|
||||
SET @@global.tx_read_only = ON;
|
||||
--error 0,1286
|
||||
SET default_storage_engine = SEQUENCE;
|
||||
--error 1005
|
||||
create table t1 (c1 int);
|
||||
CREATE TABLE t1(c1 VARCHAR(20)) engine=innodb;
|
||||
INSERT INTO t1 VALUES(0xA9B8);
|
||||
--error 1050
|
||||
create TABLE t1 (c1 int) engine=innodb;
|
||||
--error 1050
|
||||
create TABLE t1 (c1 int) engine=innodb;
|
||||
--let $wsrep_cluster_address_saved = `SELECT @@global.wsrep_cluster_address`
|
||||
SET GLOBAL wsrep_on=OFF;
|
||||
SET GLOBAL wsrep_cluster_address='gcomm://';
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SELECT 1;
|
||||
SELECT 1;
|
||||
COMMIT;
|
||||
|
||||
#
|
||||
# Kill the entire cluster and restart
|
||||
#
|
||||
--echo # Killing cluster because we have messed with wsrep_cluster_address
|
||||
--connection node_2
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
--source include/kill_galera.inc
|
||||
|
||||
--connection node_1
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
--source include/kill_galera.inc
|
||||
|
||||
--remove_file $MYSQLTEST_VARDIR/mysqld.1/data/grastate.dat
|
||||
--let $start_mysqld_params = "--wsrep-new-cluster"
|
||||
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--source include/start_mysqld.inc
|
||||
|
||||
--connection node_2
|
||||
--let $start_mysqld_params = ""
|
||||
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
|
||||
--source include/start_mysqld.inc
|
||||
|
||||
call mtr.add_suppression("WSREP: Failed to open table mysql.wsrep_streaming_log for writing");
|
||||
call mtr.add_suppression("WSREP: Failed to open SR table for write");
|
||||
call mtr.add_suppression("WSREP: Failed to recover SR transactions from schema: wsrep_on : 0");
|
||||
|
||||
#
|
||||
# Cleanup
|
||||
#
|
||||
--source ../../galera/include/auto_increment_offset_restore.inc
|
||||
# We killed cluster, it might mean that table does not exists
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
@ -12,7 +12,7 @@ CREATE TABLE t1 (f1 VARCHAR(512)) ENGINE=InnoDB;
|
||||
|
||||
SET GLOBAL wsrep_provider_options = 'repl.max_ws_size=512';
|
||||
|
||||
--error ER_ERROR_DURING_COMMIT
|
||||
--error ER_UNKNOWN_ERROR
|
||||
INSERT INTO t1 VALUES (REPEAT('a', 512));
|
||||
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
|
@ -12,7 +12,7 @@ CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 VARCHAR(1024)) Engine
|
||||
--let $wsrep_max_ws_size_orig = `SELECT @@wsrep_max_ws_size`
|
||||
SET GLOBAL wsrep_max_ws_size = 1024;
|
||||
|
||||
--error ER_ERROR_DURING_COMMIT
|
||||
--error ER_UNKNOWN_ERROR
|
||||
INSERT INTO t1 VALUES (DEFAULT, REPEAT('X', 1024));
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
|
||||
|
@ -16,6 +16,7 @@ galera_gtid_2_cluster : MDEV-23775 Galera test failure on galera_3nodes.galera_g
|
||||
galera_ist_gcache_rollover : MDEV-23578 WSREP: exception caused by message: {v=0,t=1,ut=255,o=4,s=0,sr=0,as=1,f=6,src=50524cfe,srcvid=view_id(REG,50524cfe,4),insvid=view_id(UNKNOWN,00000000,0),ru=00000000,r=[-1,-1],fs=75,nl=(}
|
||||
galera_load_data_ist : MDEV-24639 galera_3nodes.galera_load_data_ist MTR failed with SIGABRT: query 'reap' failed: 2013: Lost connection to MySQL server during query
|
||||
galera_load_data_ist : MDEV-24639 galera_3nodes.galera_load_data_ist MTR failed with SIGABRT: query 'reap' failed: 2013: Lost connection to MySQL server during query
|
||||
galera_parallel_apply_3nodes : MDEV-29368 DEBUG_SYNC timeout
|
||||
galera_pc_bootstrap : MDEV-24097 MTR sporadaically fails: Failed to start mysqld or mysql_shutdown failed
|
||||
galera_safe_to_bootstrap : MDEV-24097 galera_3nodes.galera_safe_to_bootstrap MTR sporadaically fails: Failed to start mysqld or mysql_shutdown failed
|
||||
galera_slave_options_do : MDEV-8798
|
||||
|
@ -12,3 +12,6 @@
|
||||
|
||||
GCF-1060 : MDEV-26528 wrong usage of mutex LOCK_thd_kill and LOCK_thd_kill
|
||||
|
||||
galera_sr_ws_size2 : MDEV-29773 assertion failure
|
||||
galera-features#56 : MDEV-29773 assertion failure
|
||||
MDEV-27615 : MDEV-29773 assertion failure
|
||||
|
@ -1082,9 +1082,11 @@ COMMIT;
|
||||
drop table t2;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-19526 heap number overflow
|
||||
# MDEV-19526/MDEV-29742 heap number overflow
|
||||
#
|
||||
CREATE TABLE t1(a SMALLINT NOT NULL UNIQUE AUTO_INCREMENT, KEY(a))
|
||||
ENGINE=InnoDB;
|
||||
INSERT INTO t1 (a) SELECT seq FROM seq_1_to_8191;
|
||||
ALTER TABLE t1 FORCE, ALGORITHM=INPLACE;
|
||||
DROP TABLE t1;
|
||||
# End of 10.3 tests
|
||||
|
@ -641,9 +641,12 @@ drop table t2;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-19526 heap number overflow
|
||||
--echo # MDEV-19526/MDEV-29742 heap number overflow
|
||||
--echo #
|
||||
CREATE TABLE t1(a SMALLINT NOT NULL UNIQUE AUTO_INCREMENT, KEY(a))
|
||||
ENGINE=InnoDB;
|
||||
INSERT INTO t1 (a) SELECT seq FROM seq_1_to_8191;
|
||||
ALTER TABLE t1 FORCE, ALGORITHM=INPLACE;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo # End of 10.3 tests
|
||||
|
@ -56,9 +56,8 @@ DROP TABLE t1;
|
||||
# MDEV-25663 Double free of transaction during TRUNCATE
|
||||
#
|
||||
call mtr.add_suppression("InnoDB: \\(Too many concurrent transactions\\)");
|
||||
SET DEBUG_DBUG='-d,ib_create_table_fail_too_many_trx';
|
||||
CREATE TABLE t1 (b CHAR(12), FULLTEXT KEY(b)) engine=InnoDB;
|
||||
SET @save_dbug= @@debug_dbug;
|
||||
CREATE TABLE t1 (b CHAR(12), FULLTEXT KEY(b)) engine=InnoDB;
|
||||
SET debug_dbug='+d,ib_create_table_fail_too_many_trx';
|
||||
TRUNCATE t1;
|
||||
ERROR HY000: Got error -1 "Internal error < 0 (Not system error)" from storage engine InnoDB
|
||||
|
@ -11,12 +11,13 @@ DROP TABLE mdev21563;
|
||||
#
|
||||
CREATE TABLE t1(f1 CHAR(100), FULLTEXT idx(f1))ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES('mysql'), ('innodb');
|
||||
SET @save_dbug=@@debug_dbug;
|
||||
set debug_dbug="+d,fts_instrument_sync_debug";
|
||||
INSERT INTO t1 VALUES('test');
|
||||
set debug_dbug="-d,fts_instrument_sync_debug";
|
||||
set debug_dbug=@save_dbug;
|
||||
INSERT INTO t1 VALUES('This is a fts issue');
|
||||
# restart
|
||||
set debug_dbug="+d,fts_instrument_sync_debug";
|
||||
UPDATE t1 SET f1="mariadb";
|
||||
set debug_dbug="-d,fts_instrument_sync_debug";
|
||||
set debug_dbug=@save_dbug;
|
||||
DROP TABLE t1;
|
||||
|
@ -85,10 +85,9 @@ DROP TABLE t1;
|
||||
--echo # MDEV-25663 Double free of transaction during TRUNCATE
|
||||
--echo #
|
||||
call mtr.add_suppression("InnoDB: \\(Too many concurrent transactions\\)");
|
||||
SET DEBUG_DBUG='-d,ib_create_table_fail_too_many_trx';
|
||||
SET @save_dbug= @@debug_dbug;
|
||||
|
||||
CREATE TABLE t1 (b CHAR(12), FULLTEXT KEY(b)) engine=InnoDB;
|
||||
SET @save_dbug= @@debug_dbug;
|
||||
SET debug_dbug='+d,ib_create_table_fail_too_many_trx';
|
||||
--error ER_GET_ERRNO
|
||||
TRUNCATE t1;
|
||||
|
@ -16,12 +16,13 @@ DROP TABLE mdev21563;
|
||||
--echo #
|
||||
CREATE TABLE t1(f1 CHAR(100), FULLTEXT idx(f1))ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES('mysql'), ('innodb');
|
||||
SET @save_dbug=@@debug_dbug;
|
||||
set debug_dbug="+d,fts_instrument_sync_debug";
|
||||
INSERT INTO t1 VALUES('test');
|
||||
set debug_dbug="-d,fts_instrument_sync_debug";
|
||||
set debug_dbug=@save_dbug;
|
||||
INSERT INTO t1 VALUES('This is a fts issue');
|
||||
--source include/restart_mysqld.inc
|
||||
set debug_dbug="+d,fts_instrument_sync_debug";
|
||||
UPDATE t1 SET f1="mariadb";
|
||||
set debug_dbug="-d,fts_instrument_sync_debug";
|
||||
set debug_dbug=@save_dbug;
|
||||
DROP TABLE t1;
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Copyright (c) 2006, 2014, Oracle and/or its affiliates.
|
||||
# Copyright (c) 2010, 2020, MariaDB Corporation.
|
||||
# Copyright (c) 2010, 2022, MariaDB Corporation.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -176,7 +176,14 @@ SET (SQL_SOURCE
|
||||
${GEN_SOURCES}
|
||||
${MYSYS_LIBWRAP_SOURCE}
|
||||
)
|
||||
|
||||
|
||||
IF(CMAKE_C_COMPILER_ID MATCHES "Clang" AND
|
||||
NOT CMAKE_C_COMPILER_VERSION VERSION_LESS "13.0.0")
|
||||
ADD_COMPILE_FLAGS(${CMAKE_CURRENT_BINARY_DIR}/yy_mariadb.cc
|
||||
${CMAKE_CURRENT_BINARY_DIR}/yy_oracle.cc
|
||||
COMPILE_FLAGS "-Wno-unused-but-set-variable")
|
||||
ENDIF()
|
||||
|
||||
IF ((CMAKE_SYSTEM_NAME MATCHES "Linux" OR
|
||||
CMAKE_SYSTEM_NAME MATCHES "SunOS" OR
|
||||
WIN32 OR
|
||||
|
@ -509,8 +509,18 @@ bool Sql_cmd_alter_table::execute(THD *thd)
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
|
||||
thd->variables.auto_increment_offset = 1;
|
||||
thd->variables.auto_increment_increment = 1;
|
||||
/*
|
||||
It makes sense to set auto_increment_* to defaults in TOI operations.
|
||||
Must be done before wsrep_TOI_begin() since Query_log_event encapsulating
|
||||
TOI statement and auto inc variables for wsrep replication is constructed
|
||||
there. Variables are reset back in THD::reset_for_next_command() before
|
||||
processing of next command.
|
||||
*/
|
||||
if (wsrep_auto_increment_control)
|
||||
{
|
||||
thd->variables.auto_increment_offset = 1;
|
||||
thd->variables.auto_increment_increment = 1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -63,23 +63,23 @@ public:
|
||||
{
|
||||
static const char *names[17]=
|
||||
{
|
||||
"HA_NOSAME",
|
||||
"HA_PACK_KEY",
|
||||
"HA_SPACE_PACK_USED",
|
||||
"HA_VAR_LENGTH_KEY",
|
||||
"HA_AUTO_KEY",
|
||||
"HA_BINARY_PACK_KEY",
|
||||
"HA_NULL_PART_KEY",
|
||||
"HA_FULLTEXT",
|
||||
"HA_UNIQUE_CHECK",
|
||||
"HA_SORT_ALLOWS_SAME",
|
||||
"HA_SPATIAL",
|
||||
"HA_NULL_ARE_EQUAL",
|
||||
"HA_GENERATED_KEY",
|
||||
"HA_USES_COMMENT",
|
||||
"HA_USES_PARSER",
|
||||
"HA_USES_BLOCK_SIZE",
|
||||
"HA_KEY_HAS_PART_KEY_SEG"
|
||||
"HA_NOSAME", // 1
|
||||
"HA_PACK_KEY", // 2 - used in both HA_KEYSEG and KEY/MI_KEYDEF
|
||||
"HA_SPACE_PACK_USED", // 4
|
||||
"HA_VAR_LENGTH_KEY", // 8
|
||||
"HA_AUTO_KEY", // 16
|
||||
"HA_BINARY_PACK_KEY", // 32
|
||||
"HA_NULL_PART_KEY", // 64
|
||||
"HA_FULLTEXT", // 128
|
||||
"HA_UNIQUE_CHECK", // 256
|
||||
"HA_SORT_ALLOWS_SAME", // 512
|
||||
"HA_SPATIAL", // 1024
|
||||
"HA_NULL_ARE_EQUAL", // 2048
|
||||
"HA_USES_COMMENT", // 4096
|
||||
"HA_GENERATED_KEY", // 8192
|
||||
"HA_USES_PARSER", // 16384
|
||||
"HA_USES_BLOCK_SIZE", // 32768
|
||||
"HA_KEY_HAS_PART_KEY_SEG" // 65536
|
||||
};
|
||||
return append_flag32_names((uint) flags, names, array_elements(names));
|
||||
}
|
||||
@ -89,7 +89,7 @@ public:
|
||||
static const char *names[]=
|
||||
{
|
||||
"HA_SPACE_PACK", // 1
|
||||
"??? 2 ???", // 2
|
||||
"HA_PACK_KEY", // 2 - used in both HA_KEYSEG and KEY/MI_KEYDEF
|
||||
"HA_PART_KEY_SEG", // 4
|
||||
"HA_VAR_LENGTH_PART", // 8
|
||||
"HA_NULL_PART", // 16
|
||||
|
@ -9962,7 +9962,7 @@ bool create_table_precheck(THD *thd, TABLE_LIST *tables,
|
||||
{
|
||||
LEX *lex= thd->lex;
|
||||
SELECT_LEX *select_lex= lex->first_select_lex();
|
||||
privilege_t want_priv(NO_ACL);
|
||||
privilege_t want_priv{CREATE_ACL};
|
||||
bool error= TRUE; // Error message is given
|
||||
DBUG_ENTER("create_table_precheck");
|
||||
|
||||
@ -9971,8 +9971,10 @@ bool create_table_precheck(THD *thd, TABLE_LIST *tables,
|
||||
CREATE TABLE ... SELECT, also require INSERT.
|
||||
*/
|
||||
|
||||
want_priv= lex->tmp_table() ? CREATE_TMP_ACL :
|
||||
(CREATE_ACL | (select_lex->item_list.elements ? INSERT_ACL : NO_ACL));
|
||||
if (lex->tmp_table())
|
||||
want_priv= CREATE_TMP_ACL;
|
||||
else if (select_lex->item_list.elements || select_lex->tvc)
|
||||
want_priv|= INSERT_ACL;
|
||||
|
||||
/* CREATE OR REPLACE on not temporary tables require DROP_ACL */
|
||||
if (lex->create_info.or_replace() && !lex->tmp_table())
|
||||
|
355
sql/sql_type.h
355
sql/sql_type.h
@ -2,7 +2,7 @@
|
||||
#define SQL_TYPE_H_INCLUDED
|
||||
/*
|
||||
Copyright (c) 2015 MariaDB Foundation.
|
||||
Copyright (c) 2015, 2021, MariaDB Corporation.
|
||||
Copyright (c) 2015, 2022, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -3807,8 +3807,8 @@ public:
|
||||
{
|
||||
return this;
|
||||
}
|
||||
virtual bool partition_field_check(const LEX_CSTRING &field_name,
|
||||
Item *item_expr) const
|
||||
virtual bool partition_field_check(const LEX_CSTRING &field_name, Item *)
|
||||
const
|
||||
{
|
||||
partition_field_type_not_allowed(field_name);
|
||||
return true;
|
||||
@ -4177,8 +4177,8 @@ public:
|
||||
CHARSET_INFO *cs,
|
||||
bool send_error) const
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
return NULL;
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return nullptr;
|
||||
}
|
||||
Item_literal *create_literal_item(THD *thd, const String *str,
|
||||
bool send_error) const
|
||||
@ -4189,12 +4189,13 @@ public:
|
||||
virtual Item *create_typecast_item(THD *thd, Item *item,
|
||||
const Type_cast_attributes &attr) const
|
||||
{
|
||||
return NULL;
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return nullptr;
|
||||
}
|
||||
virtual Item_copy *create_item_copy(THD *thd, Item *item) const;
|
||||
virtual int cmp_native(const Native &a, const Native &b) const
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return 0;
|
||||
}
|
||||
virtual bool set_comparator_func(Arg_comparator *cmp) const= 0;
|
||||
@ -4348,11 +4349,10 @@ class Type_handler_row: public Type_handler
|
||||
public:
|
||||
virtual ~Type_handler_row() {}
|
||||
const Name &default_value() const override;
|
||||
bool validate_implicit_default_value(THD *thd,
|
||||
const Column_definition &def) const
|
||||
override
|
||||
bool validate_implicit_default_value(THD *, const Column_definition &)
|
||||
const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return true;
|
||||
}
|
||||
const Type_collection *type_collection() const override;
|
||||
@ -4366,12 +4366,12 @@ public:
|
||||
bool can_return_time() const override { return false; }
|
||||
enum_field_types field_type() const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return MYSQL_TYPE_NULL;
|
||||
};
|
||||
protocol_send_type_t protocol_send_type() const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return PROTOCOL_SEND_STRING;
|
||||
}
|
||||
Item_result result_type() const override
|
||||
@ -4382,47 +4382,44 @@ public:
|
||||
{
|
||||
return ROW_RESULT;
|
||||
}
|
||||
enum_dynamic_column_type dyncol_type(const Type_all_attributes *attr)
|
||||
enum_dynamic_column_type dyncol_type(const Type_all_attributes *)
|
||||
const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return DYN_COL_NULL;
|
||||
}
|
||||
const Type_handler *type_handler_for_comparison() const override;
|
||||
int stored_field_cmp_to_item(THD *thd, Field *field, Item *item) const override
|
||||
int stored_field_cmp_to_item(THD *, Field *, Item *) const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return 0;
|
||||
}
|
||||
bool subquery_type_allows_materialization(const Item *, const Item *,
|
||||
bool) const override
|
||||
bool subquery_type_allows_materialization(const Item *, const Item *, bool)
|
||||
const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return false;
|
||||
}
|
||||
Field *make_num_distinct_aggregator_field(MEM_ROOT *, const Item *) const override
|
||||
Field *make_num_distinct_aggregator_field(MEM_ROOT *, const Item *) const
|
||||
override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
return NULL;
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return nullptr;
|
||||
}
|
||||
Field *make_conversion_table_field(MEM_ROOT *root,
|
||||
TABLE *table,
|
||||
uint metadata,
|
||||
const Field *target) const override
|
||||
Field *make_conversion_table_field(MEM_ROOT *, TABLE *, uint, const Field *)
|
||||
const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
return NULL;
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return nullptr;
|
||||
}
|
||||
bool Column_definition_fix_attributes(Column_definition *c) const override
|
||||
bool Column_definition_fix_attributes(Column_definition *) const override
|
||||
{
|
||||
return false;
|
||||
}
|
||||
void Column_definition_reuse_fix_attributes(THD *thd,
|
||||
Column_definition *c,
|
||||
const Field *field)
|
||||
const override
|
||||
void Column_definition_reuse_fix_attributes(THD *, Column_definition *,
|
||||
const Field *) const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
}
|
||||
bool Column_definition_prepare_stage1(THD *thd,
|
||||
MEM_ROOT *mem_root,
|
||||
@ -4432,28 +4429,25 @@ public:
|
||||
const Column_derived_attributes
|
||||
*derived_attr)
|
||||
const override;
|
||||
bool Column_definition_redefine_stage1(Column_definition *def,
|
||||
const Column_definition *dup,
|
||||
const handler *file)
|
||||
bool Column_definition_redefine_stage1(Column_definition *,
|
||||
const Column_definition *,
|
||||
const handler *)
|
||||
const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return true;
|
||||
}
|
||||
bool Column_definition_prepare_stage2(Column_definition *c,
|
||||
handler *file,
|
||||
ulonglong table_flags) const override
|
||||
bool Column_definition_prepare_stage2(Column_definition *, handler *,
|
||||
ulonglong) const override
|
||||
{
|
||||
return false;
|
||||
}
|
||||
Field *make_table_field(MEM_ROOT *root,
|
||||
const LEX_CSTRING *name,
|
||||
const Record_addr &addr,
|
||||
const Type_all_attributes &attr,
|
||||
TABLE_SHARE *share) const override
|
||||
Field *make_table_field(MEM_ROOT *, const LEX_CSTRING *, const Record_addr &,
|
||||
const Type_all_attributes &, TABLE_SHARE *)
|
||||
const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
return NULL;
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return nullptr;
|
||||
}
|
||||
Field *make_table_field_from_def(TABLE_SHARE *share,
|
||||
MEM_ROOT *mem_root,
|
||||
@ -4466,76 +4460,73 @@ public:
|
||||
const SORT_FIELD_ATTR *sort_field,
|
||||
Sort_param *param) const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
}
|
||||
uint make_packed_sort_key_part(uchar *to, Item *item,
|
||||
const SORT_FIELD_ATTR *sort_field,
|
||||
Sort_param *param) const override
|
||||
uint make_packed_sort_key_part(uchar *, Item *, const SORT_FIELD_ATTR *,
|
||||
Sort_param *) const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return 0;
|
||||
}
|
||||
void sort_length(THD *thd, const Type_std_attributes *item,
|
||||
SORT_FIELD_ATTR *attr) const override
|
||||
void sort_length(THD *, const Type_std_attributes *, SORT_FIELD_ATTR *)
|
||||
const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
}
|
||||
uint32 max_display_length(const Item *item) const override
|
||||
uint32 max_display_length(const Item *) const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return 0;
|
||||
}
|
||||
uint32 max_display_length_for_field(const Conv_source &src) const override
|
||||
uint32 max_display_length_for_field(const Conv_source &) const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return 0;
|
||||
}
|
||||
uint32 calc_pack_length(uint32 length) const override
|
||||
uint32 calc_pack_length(uint32) const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return 0;
|
||||
}
|
||||
bool Item_eq_value(THD *thd, const Type_cmp_attributes *attr,
|
||||
Item *a, Item *b) const override;
|
||||
uint Item_decimal_precision(const Item *item) const override
|
||||
uint Item_decimal_precision(const Item *) const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return DECIMAL_MAX_PRECISION;
|
||||
}
|
||||
bool Item_save_in_value(THD *thd, Item *item, st_value *value) const override;
|
||||
bool Item_save_in_value(THD *thd, Item *item, st_value *value) const
|
||||
override;
|
||||
bool Item_param_set_from_value(THD *thd,
|
||||
Item_param *param,
|
||||
const Type_all_attributes *attr,
|
||||
const st_value *value) const override;
|
||||
bool Item_send(Item *item, Protocol *protocol, st_value *buf) const override
|
||||
bool Item_send(Item *, Protocol *, st_value *) const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return true;
|
||||
}
|
||||
void Item_update_null_value(Item *item) const override;
|
||||
int Item_save_in_field(Item *item, Field *field, bool no_conversions)
|
||||
const override
|
||||
int Item_save_in_field(Item *, Field *, bool) const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return 1;
|
||||
}
|
||||
String *print_item_value(THD *thd, Item *item, String *str) const override;
|
||||
bool can_change_cond_ref_to_const(Item_bool_func2 *target,
|
||||
Item *target_expr, Item *target_value,
|
||||
Item_bool_func2 *source,
|
||||
Item *source_expr, Item *source_const)
|
||||
const override
|
||||
bool can_change_cond_ref_to_const(Item_bool_func2 *, Item *, Item *,
|
||||
Item_bool_func2 *, Item *, Item *)
|
||||
const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return false;
|
||||
}
|
||||
Item *make_const_item_for_comparison(THD *, Item *src, const Item *cmp)
|
||||
const override;
|
||||
Item *make_const_item_for_comparison(THD *, Item *src, const Item *cmp) const
|
||||
override;
|
||||
Item_cache *Item_get_cache(THD *thd, const Item *item) const override;
|
||||
Item_copy *create_item_copy(THD *thd, Item *item) const override
|
||||
Item_copy *create_item_copy(THD *, Item *) const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
return NULL;
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return nullptr;
|
||||
}
|
||||
bool set_comparator_func(Arg_comparator *cmp) const override;
|
||||
bool Item_hybrid_func_fix_attributes(THD *thd,
|
||||
@ -4545,188 +4536,187 @@ public:
|
||||
Item **items, uint nitems)
|
||||
const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return true;
|
||||
}
|
||||
bool Item_sum_hybrid_fix_length_and_dec(Item_sum_hybrid *func) const override
|
||||
bool Item_sum_hybrid_fix_length_and_dec(Item_sum_hybrid *) const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return true;
|
||||
}
|
||||
bool Item_sum_sum_fix_length_and_dec(Item_sum_sum *) const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return true;
|
||||
}
|
||||
bool Item_sum_avg_fix_length_and_dec(Item_sum_avg *) const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return true;
|
||||
}
|
||||
bool Item_sum_variance_fix_length_and_dec(Item_sum_variance *) const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return true;
|
||||
}
|
||||
bool Item_val_bool(Item *item) const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return false;
|
||||
}
|
||||
void Item_get_date(THD *thd, Item *item,
|
||||
Temporal::Warn *warn, MYSQL_TIME *ltime,
|
||||
date_mode_t fuzzydate) const override
|
||||
void Item_get_date(THD *, Item *, Temporal::Warn *, MYSQL_TIME *ltime,
|
||||
date_mode_t) const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
set_zero_time(ltime, MYSQL_TIMESTAMP_NONE);
|
||||
}
|
||||
longlong Item_val_int_signed_typecast(Item *item) const override
|
||||
longlong Item_val_int_signed_typecast(Item *) const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return 0;
|
||||
}
|
||||
longlong Item_val_int_unsigned_typecast(Item *item) const override
|
||||
longlong Item_val_int_unsigned_typecast(Item *) const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return 0;
|
||||
}
|
||||
String *Item_func_hex_val_str_ascii(Item_func_hex *item, String *str)
|
||||
const override
|
||||
String *Item_func_hex_val_str_ascii(Item_func_hex *, String *) const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
return NULL;
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return nullptr;
|
||||
}
|
||||
String *Item_func_hybrid_field_type_val_str(Item_func_hybrid_field_type *,
|
||||
String *) const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
return NULL;
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return nullptr;
|
||||
}
|
||||
double Item_func_hybrid_field_type_val_real(Item_func_hybrid_field_type *)
|
||||
const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return 0.0;
|
||||
}
|
||||
longlong Item_func_hybrid_field_type_val_int(Item_func_hybrid_field_type *)
|
||||
const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return 0;
|
||||
}
|
||||
my_decimal *Item_func_hybrid_field_type_val_decimal(
|
||||
Item_func_hybrid_field_type *,
|
||||
my_decimal *) const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
return NULL;
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return nullptr;
|
||||
}
|
||||
void Item_func_hybrid_field_type_get_date(THD *,
|
||||
Item_func_hybrid_field_type *,
|
||||
Temporal::Warn *,
|
||||
MYSQL_TIME *ltime,
|
||||
date_mode_t fuzzydate)
|
||||
const override
|
||||
date_mode_t) const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
set_zero_time(ltime, MYSQL_TIMESTAMP_NONE);
|
||||
}
|
||||
|
||||
String *Item_func_min_max_val_str(Item_func_min_max *, String *) const override
|
||||
String *Item_func_min_max_val_str(Item_func_min_max *, String *) const
|
||||
override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
return NULL;
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return nullptr;
|
||||
}
|
||||
double Item_func_min_max_val_real(Item_func_min_max *) const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return 0;
|
||||
}
|
||||
longlong Item_func_min_max_val_int(Item_func_min_max *) const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return 0;
|
||||
}
|
||||
my_decimal *Item_func_min_max_val_decimal(Item_func_min_max *,
|
||||
my_decimal *) const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
return NULL;
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return nullptr;
|
||||
}
|
||||
bool Item_func_min_max_get_date(THD *thd, Item_func_min_max*,
|
||||
MYSQL_TIME *, date_mode_t fuzzydate)
|
||||
const override
|
||||
bool Item_func_min_max_get_date(THD *, Item_func_min_max*, MYSQL_TIME *,
|
||||
date_mode_t) const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return true;
|
||||
}
|
||||
bool Item_func_between_fix_length_and_dec(Item_func_between *func)
|
||||
const override
|
||||
bool Item_func_between_fix_length_and_dec(Item_func_between *) const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return true;
|
||||
}
|
||||
longlong Item_func_between_val_int(Item_func_between *func) const override;
|
||||
cmp_item *make_cmp_item(THD *thd, CHARSET_INFO *cs) const override;
|
||||
in_vector *make_in_vector(THD *thd, const Item_func_in *f, uint nargs)
|
||||
const override;
|
||||
bool Item_func_in_fix_comparator_compatible_types(THD *thd, Item_func_in *)
|
||||
const override;
|
||||
in_vector *make_in_vector(THD *thd, const Item_func_in *f, uint nargs) const
|
||||
override;
|
||||
bool Item_func_in_fix_comparator_compatible_types(THD *thd,
|
||||
Item_func_in *) const
|
||||
override;
|
||||
bool Item_func_round_fix_length_and_dec(Item_func_round *) const override;
|
||||
bool Item_func_int_val_fix_length_and_dec(Item_func_int_val *) const override;
|
||||
bool Item_func_int_val_fix_length_and_dec(Item_func_int_val *) const
|
||||
override;
|
||||
bool Item_func_abs_fix_length_and_dec(Item_func_abs *) const override;
|
||||
bool Item_func_neg_fix_length_and_dec(Item_func_neg *) const override;
|
||||
|
||||
bool Item_func_signed_fix_length_and_dec(Item_func_signed *) const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return true;
|
||||
}
|
||||
bool Item_func_unsigned_fix_length_and_dec(Item_func_unsigned *) const override
|
||||
bool Item_func_unsigned_fix_length_and_dec(Item_func_unsigned *) const
|
||||
override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return true;
|
||||
}
|
||||
bool Item_double_typecast_fix_length_and_dec(Item_double_typecast *)
|
||||
const override
|
||||
bool Item_double_typecast_fix_length_and_dec(Item_double_typecast *) const
|
||||
override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return true;
|
||||
}
|
||||
bool Item_float_typecast_fix_length_and_dec(Item_float_typecast *)
|
||||
const override
|
||||
bool Item_float_typecast_fix_length_and_dec(Item_float_typecast *) const
|
||||
override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return true;
|
||||
}
|
||||
bool Item_decimal_typecast_fix_length_and_dec(Item_decimal_typecast *)
|
||||
const override
|
||||
bool Item_decimal_typecast_fix_length_and_dec(Item_decimal_typecast *) const
|
||||
override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return true;
|
||||
}
|
||||
bool Item_char_typecast_fix_length_and_dec(Item_char_typecast *)
|
||||
const override
|
||||
bool Item_char_typecast_fix_length_and_dec(Item_char_typecast *) const
|
||||
override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return true;
|
||||
}
|
||||
bool Item_time_typecast_fix_length_and_dec(Item_time_typecast *)
|
||||
const override
|
||||
bool Item_time_typecast_fix_length_and_dec(Item_time_typecast *) const
|
||||
override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return true;
|
||||
}
|
||||
bool Item_date_typecast_fix_length_and_dec(Item_date_typecast *)
|
||||
const override
|
||||
bool Item_date_typecast_fix_length_and_dec(Item_date_typecast *) const
|
||||
override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return true;
|
||||
}
|
||||
bool Item_datetime_typecast_fix_length_and_dec(Item_datetime_typecast *)
|
||||
const override
|
||||
const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -4746,8 +4736,6 @@ class Type_handler_numeric: public Type_handler
|
||||
public:
|
||||
const Name &default_value() const override;
|
||||
String *print_item_value(THD *thd, Item *item, String *str) const override;
|
||||
double Item_func_min_max_val_real(Item_func_min_max *) const override;
|
||||
longlong Item_func_min_max_val_int(Item_func_min_max *) const override;
|
||||
bool Column_definition_prepare_stage1(THD *thd,
|
||||
MEM_ROOT *mem_root,
|
||||
Column_definition *c,
|
||||
@ -4756,19 +4744,23 @@ public:
|
||||
const Column_derived_attributes
|
||||
*derived_attr)
|
||||
const override;
|
||||
double Item_func_min_max_val_real(Item_func_min_max *) const override;
|
||||
longlong Item_func_min_max_val_int(Item_func_min_max *) const override;
|
||||
my_decimal *Item_func_min_max_val_decimal(Item_func_min_max *,
|
||||
my_decimal *) const override;
|
||||
bool Item_func_min_max_get_date(THD *thd, Item_func_min_max*,
|
||||
MYSQL_TIME *, date_mode_t fuzzydate)
|
||||
const override;
|
||||
MYSQL_TIME *, date_mode_t fuzzydate) const
|
||||
override;
|
||||
virtual ~Type_handler_numeric() { }
|
||||
bool can_change_cond_ref_to_const(Item_bool_func2 *target,
|
||||
Item *target_expr, Item *target_value,
|
||||
Item_bool_func2 *source,
|
||||
Item *source_expr, Item *source_const)
|
||||
const override;
|
||||
bool Item_func_between_fix_length_and_dec(Item_func_between *func) const override;
|
||||
bool Item_char_typecast_fix_length_and_dec(Item_char_typecast *) const override;
|
||||
Item *source_expr, Item *source_const) const
|
||||
override;
|
||||
bool Item_func_between_fix_length_and_dec(Item_func_between *func) const
|
||||
override;
|
||||
bool Item_char_typecast_fix_length_and_dec(Item_char_typecast *) const
|
||||
override;
|
||||
};
|
||||
|
||||
|
||||
@ -5263,8 +5255,8 @@ public:
|
||||
return type_limits_int()->char_length();
|
||||
}
|
||||
uint32 Item_decimal_notation_int_digits(const Item *item) const override;
|
||||
bool partition_field_check(const LEX_CSTRING &field_name,
|
||||
Item *item_expr) const override
|
||||
bool partition_field_check(const LEX_CSTRING &, Item *item_expr)
|
||||
const override
|
||||
{
|
||||
return partition_field_check_result_type(item_expr, INT_RESULT);
|
||||
}
|
||||
@ -6102,8 +6094,8 @@ public:
|
||||
const override;
|
||||
bool Item_param_val_native(THD *thd, Item_param *item, Native *to)
|
||||
const override;
|
||||
bool partition_field_check(const LEX_CSTRING &field_name,
|
||||
Item *item_expr) const override
|
||||
bool partition_field_check(const LEX_CSTRING &, Item *item_expr)
|
||||
const override
|
||||
{
|
||||
return partition_field_check_result_type(item_expr, STRING_RESULT);
|
||||
}
|
||||
@ -6312,8 +6304,8 @@ public:
|
||||
{
|
||||
return true;
|
||||
}
|
||||
bool partition_field_check(const LEX_CSTRING &field_name,
|
||||
Item *item_expr) const override
|
||||
bool partition_field_check(const LEX_CSTRING &, Item *item_expr)
|
||||
const override
|
||||
{
|
||||
return partition_field_check_result_type(item_expr, STRING_RESULT);
|
||||
}
|
||||
@ -6442,8 +6434,8 @@ public:
|
||||
{
|
||||
return true;
|
||||
}
|
||||
bool partition_field_check(const LEX_CSTRING &field_name,
|
||||
Item *item_expr) const override
|
||||
bool partition_field_check(const LEX_CSTRING &, Item *item_expr)
|
||||
const override
|
||||
{
|
||||
return partition_field_check_result_type(item_expr, STRING_RESULT);
|
||||
}
|
||||
@ -6893,12 +6885,13 @@ public:
|
||||
bool is_param_long_data_type() const override { return true; }
|
||||
uint32 max_display_length_for_field(const Conv_source &src) const override;
|
||||
uint32 calc_pack_length(uint32 length) const override { return length; }
|
||||
const Type_handler *type_handler_for_tmp_table(const Item *item) const override
|
||||
const Type_handler *type_handler_for_tmp_table(const Item *item) const
|
||||
override
|
||||
{
|
||||
return varstring_type_handler(item);
|
||||
}
|
||||
bool partition_field_check(const LEX_CSTRING &field_name,
|
||||
Item *item_expr) const override
|
||||
bool partition_field_check(const LEX_CSTRING &, Item *item_expr)
|
||||
const override
|
||||
{
|
||||
return partition_field_check_result_type(item_expr, STRING_RESULT);
|
||||
}
|
||||
@ -6985,7 +6978,8 @@ public:
|
||||
{
|
||||
return (length + (length < 256 ? 1: 2));
|
||||
}
|
||||
const Type_handler *type_handler_for_tmp_table(const Item *item) const override
|
||||
const Type_handler *type_handler_for_tmp_table(const Item *item) const
|
||||
override
|
||||
{
|
||||
return varstring_type_handler(item);
|
||||
}
|
||||
@ -6994,8 +6988,8 @@ public:
|
||||
return varstring_type_handler(item);
|
||||
}
|
||||
bool is_param_long_data_type() const override { return true; }
|
||||
bool partition_field_check(const LEX_CSTRING &field_name,
|
||||
Item *item_expr) const override
|
||||
bool partition_field_check(const LEX_CSTRING &, Item *item_expr)
|
||||
const override
|
||||
{
|
||||
return partition_field_check_result_type(item_expr, STRING_RESULT);
|
||||
}
|
||||
@ -7055,12 +7049,12 @@ public:
|
||||
}
|
||||
ulong KEY_pack_flags(uint column_nr) const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return 0;
|
||||
}
|
||||
uint32 max_display_length_for_field(const Conv_source &src) const override;
|
||||
bool partition_field_check(const LEX_CSTRING &field_name,
|
||||
Item *item_expr) const override
|
||||
bool partition_field_check(const LEX_CSTRING &field_name, Item *)
|
||||
const override
|
||||
{
|
||||
partition_field_type_not_allowed(field_name);
|
||||
return true;
|
||||
@ -7140,7 +7134,7 @@ public:
|
||||
void Item_param_setup_conversion(THD *thd, Item_param *) const override;
|
||||
|
||||
bool partition_field_check(const LEX_CSTRING &field_name,
|
||||
Item *item_expr) const override;
|
||||
Item *item_expr) const override;
|
||||
Field *make_schema_field(MEM_ROOT *root,
|
||||
TABLE *table,
|
||||
const Record_addr &addr,
|
||||
@ -7178,7 +7172,8 @@ class Type_handler_medium_blob: public Type_handler_blob_common
|
||||
public:
|
||||
virtual ~Type_handler_medium_blob() {}
|
||||
uint length_bytes() const override { return 3; }
|
||||
enum_field_types field_type() const override { return MYSQL_TYPE_MEDIUM_BLOB; }
|
||||
enum_field_types field_type() const override
|
||||
{ return MYSQL_TYPE_MEDIUM_BLOB; }
|
||||
uint32 max_display_length_for_field(const Conv_source &src) const override;
|
||||
uint32 calc_pack_length(uint32 length) const override;
|
||||
Field *make_table_field(MEM_ROOT *root,
|
||||
@ -7235,7 +7230,7 @@ public:
|
||||
}
|
||||
ulong KEY_pack_flags(uint) const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
MY_ASSERT_UNREACHABLE();
|
||||
return 0;
|
||||
}
|
||||
uint32 max_display_length_for_field(const Conv_source &src) const override;
|
||||
|
@ -471,19 +471,20 @@ void wsrep_recover_sr_from_storage(THD *orig_thd)
|
||||
if (!wsrep_schema)
|
||||
{
|
||||
WSREP_ERROR("Wsrep schema not initialized when trying to recover "
|
||||
"streaming transactions");
|
||||
unireg_abort(1);
|
||||
"streaming transactions: wsrep_on %d", WSREP_ON);
|
||||
trans_commit(orig_thd);
|
||||
}
|
||||
if (wsrep_schema->recover_sr_transactions(orig_thd))
|
||||
{
|
||||
WSREP_ERROR("Failed to recover SR transactions from schema");
|
||||
unireg_abort(1);
|
||||
WSREP_ERROR("Failed to recover SR transactions from schema: wsrep_on : %d", WSREP_ON);
|
||||
trans_commit(orig_thd);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
/* */
|
||||
WSREP_ERROR("Unsupported wsrep SR store type: %lu", wsrep_SR_store_type);
|
||||
unireg_abort(1);
|
||||
WSREP_ERROR("Unsupported wsrep SR store type: %lu wsrep_on: %d",
|
||||
wsrep_SR_store_type, WSREP_ON);
|
||||
trans_commit(orig_thd);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -2355,7 +2356,7 @@ static int wsrep_TOI_begin(THD *thd, const char *db, const char *table,
|
||||
ret,
|
||||
(thd->db.str ? thd->db.str : "(null)"),
|
||||
wsrep_thd_query(thd));
|
||||
my_error(ER_ERROR_DURING_COMMIT, MYF(0), WSREP_SIZE_EXCEEDED);
|
||||
my_error(ER_UNKNOWN_ERROR, MYF(0), "Maximum writeset size exceeded");
|
||||
break;
|
||||
case wsrep::e_deadlock_error:
|
||||
WSREP_WARN("TO isolation failed for: %d, schema: %s, sql: %s. "
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2013-2021 Codership Oy <info@codership.com>
|
||||
/* Copyright (C) 2013-2022 Codership Oy <info@codership.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2013-2021 Codership Oy <info@codership.com>
|
||||
/* Copyright (C) 2013-2022 Codership Oy <info@codership.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -182,7 +182,7 @@ void wsrep_reset_threadvars(THD *);
|
||||
so don't override those by default
|
||||
*/
|
||||
|
||||
static inline void wsrep_override_error(THD *thd, uint error)
|
||||
static inline void wsrep_override_error(THD *thd, uint error, const char *format= 0, ...)
|
||||
{
|
||||
DBUG_ASSERT(error != ER_ERROR_DURING_COMMIT);
|
||||
Diagnostics_area *da= thd->get_stmt_da();
|
||||
@ -195,26 +195,11 @@ static inline void wsrep_override_error(THD *thd, uint error)
|
||||
da->sql_errno() != ER_LOCK_DEADLOCK))
|
||||
{
|
||||
da->reset_diagnostics_area();
|
||||
my_error(error, MYF(0));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Override error with additional wsrep status.
|
||||
*/
|
||||
static inline void wsrep_override_error(THD *thd, uint error,
|
||||
enum wsrep::provider::status status)
|
||||
{
|
||||
Diagnostics_area *da= thd->get_stmt_da();
|
||||
if (da->is_ok() ||
|
||||
!da->is_set() ||
|
||||
(da->is_error() &&
|
||||
da->sql_errno() != error &&
|
||||
da->sql_errno() != ER_ERROR_DURING_COMMIT &&
|
||||
da->sql_errno() != ER_LOCK_DEADLOCK))
|
||||
{
|
||||
da->reset_diagnostics_area();
|
||||
my_error(error, MYF(0), status);
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
if (!format) format= ER_THD(thd, error);
|
||||
my_printv_error(error, format, MYF(0), args);
|
||||
va_end(args);
|
||||
}
|
||||
}
|
||||
|
||||
@ -226,7 +211,10 @@ static inline void wsrep_override_error(THD* thd,
|
||||
switch (ce)
|
||||
{
|
||||
case wsrep::e_error_during_commit:
|
||||
wsrep_override_error(thd, ER_ERROR_DURING_COMMIT, status);
|
||||
if (status == wsrep::provider::error_size_exceeded)
|
||||
wsrep_override_error(thd, ER_UNKNOWN_ERROR, "Maximum writeset size exceeded");
|
||||
else
|
||||
wsrep_override_error(thd, ER_ERROR_DURING_COMMIT, 0, status);
|
||||
break;
|
||||
case wsrep::e_deadlock_error:
|
||||
wsrep_override_error(thd, ER_LOCK_DEADLOCK);
|
||||
@ -235,11 +223,11 @@ static inline void wsrep_override_error(THD* thd,
|
||||
wsrep_override_error(thd, ER_QUERY_INTERRUPTED);
|
||||
break;
|
||||
case wsrep::e_size_exceeded_error:
|
||||
wsrep_override_error(thd, ER_ERROR_DURING_COMMIT, status);
|
||||
wsrep_override_error(thd, ER_UNKNOWN_ERROR, "Maximum writeset size exceeded");
|
||||
break;
|
||||
case wsrep::e_append_fragment_error:
|
||||
/* TODO: Figure out better error number */
|
||||
wsrep_override_error(thd, ER_ERROR_DURING_COMMIT, status);
|
||||
wsrep_override_error(thd, ER_ERROR_DURING_COMMIT, 0, status);
|
||||
break;
|
||||
case wsrep::e_not_supported_error:
|
||||
wsrep_override_error(thd, ER_NOT_SUPPORTED_YET);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright 2016-2019 Codership Oy <http://www.codership.com>
|
||||
/* Copyright 2016-2022 Codership Oy <http://www.codership.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright 2008-2021 Codership Oy <http://www.codership.com>
|
||||
/* Copyright 2008-2022 Codership Oy <http://www.codership.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -123,8 +123,7 @@ bool wsrep_on_update (sys_var *self, THD* thd, enum_var_type var_type)
|
||||
|
||||
if (wsrep_init())
|
||||
{
|
||||
my_error(ER_CANT_OPEN_LIBRARY, MYF(0), tmp, my_error, "wsrep_init failed");
|
||||
//rcode= true;
|
||||
my_error(ER_CANT_OPEN_LIBRARY, MYF(0), tmp, errno, "wsrep_init failed");
|
||||
saved_wsrep_on= false;
|
||||
}
|
||||
|
||||
@ -803,11 +802,22 @@ bool wsrep_slave_threads_update (sys_var *self, THD* thd, enum_var_type type)
|
||||
{
|
||||
WSREP_DEBUG("Creating %d applier threads, total %ld", wsrep_slave_count_change, wsrep_slave_threads);
|
||||
res= wsrep_create_appliers(wsrep_slave_count_change, true);
|
||||
mysql_mutex_unlock(&LOCK_global_system_variables);
|
||||
mysql_mutex_unlock(&LOCK_wsrep_slave_threads);
|
||||
// Thread creation and execution is asyncronous, therefore we need
|
||||
// wait them to be started or error produced
|
||||
while (wsrep_running_applier_threads != (ulong)wsrep_slave_threads)
|
||||
{
|
||||
my_sleep(1000);
|
||||
}
|
||||
|
||||
mysql_mutex_lock(&LOCK_global_system_variables);
|
||||
|
||||
WSREP_DEBUG("Running %lu applier threads", wsrep_running_applier_threads);
|
||||
wsrep_slave_count_change = 0;
|
||||
}
|
||||
|
||||
mysql_mutex_unlock(&LOCK_wsrep_slave_threads);
|
||||
else
|
||||
mysql_mutex_unlock(&LOCK_wsrep_slave_threads);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
@ -539,6 +539,11 @@ IF(MSVC)
|
||||
# on generated file.
|
||||
TARGET_COMPILE_OPTIONS(innobase PRIVATE "/wd4065")
|
||||
ENDIF()
|
||||
IF(CMAKE_C_COMPILER_ID MATCHES "Clang" AND
|
||||
NOT CMAKE_C_COMPILER_VERSION VERSION_LESS "13.0.0")
|
||||
ADD_COMPILE_FLAGS(pars/pars0grm.cc fts/fts0pars.cc
|
||||
COMPILE_FLAGS "-Wno-unused-but-set-variable")
|
||||
ENDIF()
|
||||
|
||||
IF(NOT (PLUGIN_INNOBASE STREQUAL DYNAMIC))
|
||||
TARGET_LINK_LIBRARIES(innobase tpool mysys)
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 2014, 2019, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2017, 2021, MariaDB Corporation.
|
||||
Copyright (c) 2017, 2022, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
@ -752,6 +752,11 @@ bool
|
||||
PageBulk::isSpaceAvailable(
|
||||
ulint rec_size)
|
||||
{
|
||||
if (m_rec_no >= 8190) {
|
||||
ut_ad(srv_page_size == 65536);
|
||||
return false;
|
||||
}
|
||||
|
||||
ulint slot_size;
|
||||
ulint required_space;
|
||||
|
||||
|
@ -335,7 +335,7 @@ static int mrn_change_encoding(grn_ctx *ctx, const CHARSET_INFO *charset)
|
||||
return mrn::encoding::set(ctx, charset);
|
||||
}
|
||||
|
||||
#if !defined(DBUG_OFF) && !defined(_lint)
|
||||
#if defined DBUG_TRACE && !defined(_lint)
|
||||
static const char *mrn_inspect_thr_lock_type(enum thr_lock_type lock_type)
|
||||
{
|
||||
const char *inspected = "<unknown>";
|
||||
@ -3372,16 +3372,16 @@ int ha_mroonga::wrapper_create_index(const char *name, TABLE *table,
|
||||
index_tables, NULL, tmp_share);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (error) {
|
||||
for (uint j = 0; j < i; j++) {
|
||||
if (index_tables[j]) {
|
||||
grn_obj_remove(ctx, index_tables[j]);
|
||||
if (error) {
|
||||
for (uint j = 0; j < i; j++) {
|
||||
if (index_tables[j]) {
|
||||
grn_obj_remove(ctx, index_tables[j]);
|
||||
}
|
||||
}
|
||||
grn_obj_remove(ctx, grn_table);
|
||||
grn_table = NULL;
|
||||
}
|
||||
grn_obj_remove(ctx, grn_table);
|
||||
grn_table = NULL;
|
||||
}
|
||||
MRN_FREE_VARIABLE_LENGTH_ARRAYS(index_tables);
|
||||
DBUG_RETURN(error);
|
||||
|
4
storage/mroonga/vendor/groonga/lib/alloc.c
vendored
4
storage/mroonga/vendor/groonga/lib/alloc.c
vendored
@ -828,8 +828,8 @@ grn_free_default(grn_ctx *ctx, void *ptr,
|
||||
if (ptr) {
|
||||
GRN_ADD_ALLOC_COUNT(-1);
|
||||
} else {
|
||||
GRN_LOG(ctx, GRN_LOG_ALERT, "free fail (%p) (%s:%d) <%d>",
|
||||
ptr, file, line, alloc_count);
|
||||
GRN_LOG(ctx, GRN_LOG_ALERT, "free fail (%s:%d) <%d>",
|
||||
file, line, alloc_count);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
82
storage/mroonga/vendor/groonga/lib/db.c
vendored
82
storage/mroonga/vendor/groonga/lib/db.c
vendored
@ -3591,53 +3591,51 @@ grn_obj_search_column_index_by_key(grn_ctx *ctx, grn_obj *obj,
|
||||
if (need_cast) {
|
||||
GRN_OBJ_INIT(&casted_query, GRN_BULK, 0, key_type);
|
||||
rc = grn_obj_cast(ctx, query, &casted_query, GRN_FALSE);
|
||||
if (rc == GRN_SUCCESS) {
|
||||
key = GRN_BULK_HEAD(&casted_query);
|
||||
key_len = GRN_BULK_VSIZE(&casted_query);
|
||||
}
|
||||
} else {
|
||||
rc = GRN_SUCCESS;
|
||||
key = GRN_BULK_HEAD(query);
|
||||
key_len = GRN_BULK_VSIZE(query);
|
||||
if (rc != GRN_SUCCESS)
|
||||
goto fail;
|
||||
query = &casted_query;
|
||||
}
|
||||
if (rc == GRN_SUCCESS) {
|
||||
if (grn_logger_pass(ctx, GRN_REPORT_INDEX_LOG_LEVEL)) {
|
||||
const char *tag;
|
||||
if (optarg) {
|
||||
switch (optarg->mode) {
|
||||
case GRN_OP_MATCH :
|
||||
tag = "[key][match]";
|
||||
break;
|
||||
case GRN_OP_EXACT :
|
||||
tag = "[key][exact]";
|
||||
break;
|
||||
case GRN_OP_NEAR :
|
||||
tag = "[key][near]";
|
||||
break;
|
||||
case GRN_OP_NEAR2 :
|
||||
tag = "[key][near2]";
|
||||
break;
|
||||
case GRN_OP_SIMILAR :
|
||||
tag = "[key][similar]";
|
||||
break;
|
||||
case GRN_OP_REGEXP :
|
||||
tag = "[key][regexp]";
|
||||
break;
|
||||
case GRN_OP_FUZZY :
|
||||
tag = "[key][fuzzy]";
|
||||
break;
|
||||
default :
|
||||
tag = "[key][unknown]";
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
|
||||
key = GRN_BULK_HEAD(query);
|
||||
key_len = GRN_BULK_VSIZE(query);
|
||||
|
||||
if (grn_logger_pass(ctx, GRN_REPORT_INDEX_LOG_LEVEL)) {
|
||||
const char *tag;
|
||||
if (optarg) {
|
||||
switch (optarg->mode) {
|
||||
case GRN_OP_MATCH :
|
||||
tag = "[key][match]";
|
||||
break;
|
||||
case GRN_OP_EXACT :
|
||||
tag = "[key][exact]";
|
||||
break;
|
||||
case GRN_OP_NEAR :
|
||||
tag = "[key][near]";
|
||||
break;
|
||||
case GRN_OP_NEAR2 :
|
||||
tag = "[key][near2]";
|
||||
break;
|
||||
case GRN_OP_SIMILAR :
|
||||
tag = "[key][similar]";
|
||||
break;
|
||||
case GRN_OP_REGEXP :
|
||||
tag = "[key][regexp]";
|
||||
break;
|
||||
case GRN_OP_FUZZY :
|
||||
tag = "[key][fuzzy]";
|
||||
break;
|
||||
default :
|
||||
tag = "[key][unknown]";
|
||||
break;
|
||||
}
|
||||
grn_obj_search_index_report(ctx, tag, obj);
|
||||
} else {
|
||||
tag = "[key][exact]";
|
||||
}
|
||||
rc = grn_ii_sel(ctx, (grn_ii *)obj, key, key_len,
|
||||
(grn_hash *)res, op, optarg);
|
||||
grn_obj_search_index_report(ctx, tag, obj);
|
||||
}
|
||||
rc = grn_ii_sel(ctx, (grn_ii *)obj, key, key_len,
|
||||
(grn_hash *)res, op, optarg);
|
||||
fail:
|
||||
if (need_cast) {
|
||||
GRN_OBJ_FIN(ctx, &casted_query);
|
||||
}
|
||||
|
@ -860,6 +860,13 @@ int ha_myisam::open(const char *name, int mode, uint test_if_locked)
|
||||
/* purecov: end */
|
||||
}
|
||||
}
|
||||
|
||||
DBUG_EXECUTE_IF("key",
|
||||
Debug_key_myisam::print_keys_myisam(table->in_use,
|
||||
"ha_myisam::open: ",
|
||||
table, file->s->keyinfo,
|
||||
file->s->base.keys);
|
||||
);
|
||||
|
||||
if (test_if_locked & (HA_OPEN_IGNORE_IF_LOCKED | HA_OPEN_TMP_TABLE))
|
||||
(void) mi_extra(file, HA_EXTRA_NO_WAIT_LOCK, 0);
|
||||
|
@ -34,8 +34,10 @@ SCHEMA="wsrep"
|
||||
MEMB_TABLE="$SCHEMA.membership"
|
||||
STATUS_TABLE="$SCHEMA.status"
|
||||
|
||||
BEGIN="
|
||||
SET wsrep_on=0;
|
||||
WSREP_ON='SET wsrep_on=ON'
|
||||
WSREP_OFF='SET wsrep_on=OFF'
|
||||
|
||||
BEGIN="$WSREP_OFF;
|
||||
DROP SCHEMA IF EXISTS $SCHEMA; CREATE SCHEMA $SCHEMA;
|
||||
CREATE TABLE $MEMB_TABLE (
|
||||
idx INT UNIQUE PRIMARY KEY,
|
||||
@ -50,9 +52,8 @@ CREATE TABLE $STATUS_TABLE (
|
||||
uuid CHAR(40), /* cluster UUID */
|
||||
prim BOOLEAN /* if component is primary */
|
||||
) ENGINE=MEMORY;
|
||||
BEGIN;
|
||||
"
|
||||
END="COMMIT;"
|
||||
BEGIN"
|
||||
END="COMMIT; $WSREP_ON"
|
||||
|
||||
configuration_change()
|
||||
{
|
||||
@ -71,12 +72,12 @@ configuration_change()
|
||||
|
||||
echo "INSERT INTO $STATUS_TABLE VALUES($idx, $INDEX, '$STATUS', '$CLUSTER_UUID', $PRIMARY);"
|
||||
|
||||
echo "$END"
|
||||
echo "$END;"
|
||||
}
|
||||
|
||||
status_update()
|
||||
{
|
||||
echo "SET wsrep_on=0; BEGIN; UPDATE $STATUS_TABLE SET status='$STATUS'; COMMIT;"
|
||||
echo "$WSREP_OFF; BEGIN; UPDATE $STATUS_TABLE SET status='$STATUS'; $END;"
|
||||
}
|
||||
|
||||
trim_string()
|
||||
@ -186,10 +187,14 @@ then
|
||||
fi
|
||||
fi
|
||||
|
||||
# Undefined means node is shutting down
|
||||
if [ "$STATUS" != 'Undefined' ]; then
|
||||
"$COM" | eval "$CLIENT" -B "-u'$USER'"${PSWD:+" -p'$PSWD'"}\
|
||||
"-h'$HOST'" "-P$PORT"$SSL_PARAM
|
||||
fi
|
||||
case "$STATUS" in
|
||||
'joined' | 'donor' | 'synced')
|
||||
"$COM" | eval "$CLIENT" -B "-u'$USER'"${PSWD:+" -p'$PSWD'"}\
|
||||
"-h'$HOST'" "-P$PORT"$SSL_PARAM
|
||||
;;
|
||||
*)
|
||||
# The node might be shutting down or not initialized
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user