mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge 10.6 into 10.11
This commit is contained in:
@@ -27,6 +27,7 @@ SET(MY_WARNING_FLAGS
|
||||
-Wenum-conversion
|
||||
-Wextra
|
||||
-Wformat-security
|
||||
-Winconsistent-missing-override
|
||||
-Wmissing-braces
|
||||
-Wno-format-truncation
|
||||
-Wno-init-self
|
||||
@@ -34,8 +35,9 @@ SET(MY_WARNING_FLAGS
|
||||
-Wno-null-conversion
|
||||
-Wno-unused-parameter
|
||||
-Wno-unused-private-field
|
||||
-Woverloaded-virtual
|
||||
-Wnon-virtual-dtor
|
||||
-Woverloaded-virtual
|
||||
-Wsuggest-override
|
||||
-Wvla
|
||||
-Wwrite-strings
|
||||
)
|
||||
|
@@ -359,7 +359,8 @@ int main(int argc,char *argv[])
|
||||
{
|
||||
found= 1;
|
||||
if (verbose)
|
||||
printf("MariaDB error code %3d (%s): %s\n", code, name, msg);
|
||||
printf("MariaDB error code %3d (%s): %s\n"
|
||||
"Learn more: https://mariadb.com/kb/en/e%3d/\n", code, name, msg, code);
|
||||
else
|
||||
puts(msg);
|
||||
}
|
||||
|
@@ -21,5 +21,10 @@
|
||||
--source include/log_grep.inc
|
||||
|
||||
# InnoDB/Engines
|
||||
--let log_expected_matches = $log_slow_innodb_expected_matches
|
||||
--let grep_pattern = ^# Pages_accessed: \d+ Pages_read: \d+ Pages_updated: \d+ Old_rows_read: \d+\n# Pages_read_time: \d+\.\d+ Engine_time: \d+\.\d+\$
|
||||
--let log_expected_matches = $log_slow_verbosity_innodb_expected_matches
|
||||
--let grep_pattern = ^# Pages_accessed: \d+ Pages_read: \d+ Pages_updated: \d+ Old_rows_read: \d+\$
|
||||
--source include/log_grep.inc
|
||||
|
||||
--let grep_pattern = ^# Pages_read_time: \d+\.\d+ Engine_time: \d+\.\d+\$
|
||||
--source include/log_grep.inc
|
||||
|
||||
|
@@ -15370,3 +15370,39 @@ DROP TABLE t1;
|
||||
#
|
||||
# End of MariaDB-10.2 tests
|
||||
#
|
||||
#
|
||||
# Start of 10.5 tests
|
||||
#
|
||||
#
|
||||
# MDEV-34417 Wrong result set with utf8mb4_danish_ci and BNLH join
|
||||
#
|
||||
CREATE TABLE t1 (a VARCHAR(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_danish_ci);
|
||||
INSERT INTO t1 VALUES ('aaaa'),('åå');
|
||||
SELECT * FROM t1 WHERE a='aaaa';
|
||||
a
|
||||
aaaa
|
||||
åå
|
||||
SET join_cache_level=1;
|
||||
SELECT * FROM t1 NATURAL JOIN t1 t2;
|
||||
a
|
||||
aaaa
|
||||
åå
|
||||
aaaa
|
||||
åå
|
||||
# Expect a BNHL join
|
||||
SET join_cache_level=3;
|
||||
EXPLAIN SELECT * FROM t1 NATURAL JOIN t1 t2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where
|
||||
1 SIMPLE t2 hash_ALL NULL #hash#$hj 2003 test.t1.a 2 Using where; Using join buffer (flat, BNLH join)
|
||||
SELECT * FROM t1 NATURAL JOIN t1 t2;
|
||||
a
|
||||
aaaa
|
||||
åå
|
||||
aaaa
|
||||
åå
|
||||
DROP TABLE t1;
|
||||
SET join_cache_level=DEFAULT;
|
||||
#
|
||||
# End of 10.5 tests
|
||||
#
|
||||
|
@@ -696,3 +696,32 @@ DROP TABLE t1;
|
||||
--echo #
|
||||
--echo # End of MariaDB-10.2 tests
|
||||
--echo #
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Start of 10.5 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-34417 Wrong result set with utf8mb4_danish_ci and BNLH join
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a VARCHAR(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_danish_ci);
|
||||
INSERT INTO t1 VALUES ('aaaa'),('åå');
|
||||
SELECT * FROM t1 WHERE a='aaaa';
|
||||
|
||||
SET join_cache_level=1;
|
||||
SELECT * FROM t1 NATURAL JOIN t1 t2;
|
||||
|
||||
--echo # Expect a BNHL join
|
||||
SET join_cache_level=3;
|
||||
EXPLAIN SELECT * FROM t1 NATURAL JOIN t1 t2;
|
||||
SELECT * FROM t1 NATURAL JOIN t1 t2;
|
||||
|
||||
DROP TABLE t1;
|
||||
SET join_cache_level=DEFAULT;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.5 tests
|
||||
--echo #
|
||||
|
@@ -1746,3 +1746,16 @@ RELEASE_ALL_LOCKS()
|
||||
SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA
|
||||
FROM information_schema.metadata_lock_info WHERE thread_id>0 ORDER BY TABLE_SCHEMA;
|
||||
LOCK_MODE LOCK_TYPE TABLE_SCHEMA
|
||||
#
|
||||
# MDEV-32583 UUID() should be treated as stochastic for the purposes of
|
||||
# forcing query materialization
|
||||
#
|
||||
create table t1 as WITH cte AS (SELECT UUID() as r FROM seq_1_to_10)
|
||||
SELECT r as r1, r FROM cte;
|
||||
select count(*) from t1 where r1!=r;
|
||||
count(*)
|
||||
0
|
||||
drop table t1;
|
||||
#
|
||||
# End of 10.5 tests
|
||||
#
|
||||
|
@@ -1367,3 +1367,18 @@ FROM information_schema.metadata_lock_info WHERE thread_id>0 ORDER BY TABLE_SCHE
|
||||
|
||||
--enable_ps2_protocol
|
||||
--enable_view_protocol
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-32583 UUID() should be treated as stochastic for the purposes of
|
||||
--echo # forcing query materialization
|
||||
--echo #
|
||||
|
||||
--source include/have_sequence.inc
|
||||
create table t1 as WITH cte AS (SELECT UUID() as r FROM seq_1_to_10)
|
||||
SELECT r as r1, r FROM cte;
|
||||
select count(*) from t1 where r1!=r;
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.5 tests
|
||||
--echo #
|
||||
|
@@ -5565,4 +5565,16 @@ SELECT a,b FROM t1 GROUP BY a,b HAVING a = (b IS NULL);
|
||||
a b
|
||||
0 11
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-19520 Extend condition normalization to include 'NOT a'
|
||||
# having Item_func_not in item tree breaks assumptions during the
|
||||
# optimization phase about transformation possibilities in fix_fields().
|
||||
# Remove Item_func_not by extending normalization during parsing.
|
||||
#
|
||||
CREATE TABLE t1 (a INT);
|
||||
INSERT INTO t1 VALUES (0),(1);
|
||||
SELECT a FROM t1 GROUP BY a HAVING NOT a;
|
||||
a
|
||||
0
|
||||
DROP TABLE t1;
|
||||
End of 10.4 tests
|
||||
|
@@ -1489,4 +1489,16 @@ SELECT a,b FROM t1 GROUP BY a,b HAVING a = (b IS NULL);
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-19520 Extend condition normalization to include 'NOT a'
|
||||
--echo # having Item_func_not in item tree breaks assumptions during the
|
||||
--echo # optimization phase about transformation possibilities in fix_fields().
|
||||
--echo # Remove Item_func_not by extending normalization during parsing.
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a INT);
|
||||
INSERT INTO t1 VALUES (0),(1);
|
||||
SELECT a FROM t1 GROUP BY a HAVING NOT a;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 10.4 tests
|
||||
|
@@ -23,6 +23,10 @@ UPDATE t1 set b=b+1 where a=1 or a=999;
|
||||
[log_grep.inc] lines: 0
|
||||
[log_grep.inc] file: log_slow_innodb-verbosity_1 pattern: ^# Tmp_tables: \d+ Tmp_disk_tables: \d+$
|
||||
[log_grep.inc] lines: 0
|
||||
[log_grep.inc] file: log_slow_innodb-verbosity_1 pattern: ^# Pages_accessed: \d+ Pages_read: \d+ Pages_updated: \d+ Old_rows_read: \d+$ expected_matches: 2
|
||||
[log_grep.inc] found expected match count: 2
|
||||
[log_grep.inc] file: log_slow_innodb-verbosity_1 pattern: ^# Pages_read_time: \d+\.\d+ Engine_time: \d+\.\d+$ expected_matches: 2
|
||||
[log_grep.inc] found expected match count: 2
|
||||
SET SESSION log_slow_verbosity='innodb,query_plan';
|
||||
[slow_log_start.inc] log_slow_innodb-verbosity_2
|
||||
SELECT 1;
|
||||
@@ -43,6 +47,10 @@ SELECT 1;
|
||||
[log_grep.inc] lines: 0
|
||||
[log_grep.inc] file: log_slow_innodb-verbosity_2 pattern: ^# Tmp_tables: \d+ Tmp_disk_tables: \d+$
|
||||
[log_grep.inc] lines: 0
|
||||
[log_grep.inc] file: log_slow_innodb-verbosity_2 pattern: ^# Pages_accessed: \d+ Pages_read: \d+ Pages_updated: \d+ Old_rows_read: \d+$
|
||||
[log_grep.inc] lines: 0
|
||||
[log_grep.inc] file: log_slow_innodb-verbosity_2 pattern: ^# Pages_read_time: \d+\.\d+ Engine_time: \d+\.\d+$
|
||||
[log_grep.inc] lines: 0
|
||||
SET SESSION log_slow_verbosity='query_plan';
|
||||
[log_slow_stop.inc] log_slow_innodb-verbosity_3
|
||||
--source include/log_slow_start.inc
|
||||
@@ -75,4 +83,12 @@ INSERT INTO t1 VALUE(1000) pattern: ^# Filesort: (Yes|No) Filesort_on_disk: (Ye
|
||||
--source include/log_slow_start.inc
|
||||
INSERT INTO t1 VALUE(1000) pattern: ^# Tmp_tables: \d+ Tmp_disk_tables: \d+$
|
||||
[log_grep.inc] lines: 0
|
||||
[log_grep.inc] file: log_slow_innodb-verbosity_3
|
||||
--source include/log_slow_start.inc
|
||||
INSERT INTO t1 VALUE(1000) pattern: ^# Pages_accessed: \d+ Pages_read: \d+ Pages_updated: \d+ Old_rows_read: \d+$
|
||||
[log_grep.inc] lines: 0
|
||||
[log_grep.inc] file: log_slow_innodb-verbosity_3
|
||||
--source include/log_slow_start.inc
|
||||
INSERT INTO t1 VALUE(1000) pattern: ^# Pages_read_time: \d+\.\d+ Engine_time: \d+\.\d+$
|
||||
[log_grep.inc] lines: 0
|
||||
DROP TABLE t1;
|
||||
|
@@ -72,7 +72,7 @@ let log_file=$log_slow_prefix-verbosity_3
|
||||
INSERT INTO t1 VALUE(1000);
|
||||
--source include/log_slow_stop.inc
|
||||
|
||||
--let log_slow_verbosity_innodb_expected_matches= 1
|
||||
--let log_slow_verbosity_innodb_expected_matches= 0
|
||||
--source include/log_slow_grep.inc
|
||||
|
||||
DROP TABLE t1;
|
||||
|
@@ -9,10 +9,10 @@ connect con1, localhost, u, bad_pass;
|
||||
ERROR 28000: Access denied for user 'u'@'localhost' (using password: YES)
|
||||
connect(localhost,u,good_pass,test,MASTER_PORT,MASTER_SOCKET);
|
||||
connect con1, localhost, u, good_pass;
|
||||
ERROR HY000: User is blocked because of too many credential errors; unblock with 'FLUSH PRIVILEGES'
|
||||
ERROR HY000: User is blocked because of too many credential errors; unblock with 'ALTER USER / FLUSH PRIVILEGES'
|
||||
connect(localhost,u,bad_pass,test,MASTER_PORT,MASTER_SOCKET);
|
||||
connect con1, localhost, u, bad_pass;
|
||||
ERROR HY000: User is blocked because of too many credential errors; unblock with 'FLUSH PRIVILEGES'
|
||||
ERROR HY000: User is blocked because of too many credential errors; unblock with 'ALTER USER / FLUSH PRIVILEGES'
|
||||
FLUSH PRIVILEGES;
|
||||
connect con1, localhost, u, good_pass;
|
||||
disconnect con1;
|
||||
@@ -27,7 +27,7 @@ ERROR 28000: Access denied for user 'u'@'localhost' (using password: YES)
|
||||
connect con1, localhost, u, good_pass;
|
||||
ERROR 28000: Access denied for user 'u'@'localhost' (using password: YES)
|
||||
ERROR 28000: Access denied for user 'u'@'localhost' (using password: YES)
|
||||
ERROR HY000: User is blocked because of too many credential errors; unblock with 'FLUSH PRIVILEGES'
|
||||
ERROR HY000: User is blocked because of too many credential errors; unblock with 'ALTER USER / FLUSH PRIVILEGES'
|
||||
disconnect con1;
|
||||
connection default;
|
||||
FLUSH PRIVILEGES;
|
||||
@@ -40,6 +40,21 @@ ERROR 28000: Access denied for user 'root'@'localhost' (using password: YES)
|
||||
connect con1, localhost, u, good_pass;
|
||||
disconnect con1;
|
||||
connection default;
|
||||
connect(localhost,u,bad_password,test,MASTER_PORT,MASTER_SOCKET);
|
||||
connect con1, localhost, u, bad_password;
|
||||
ERROR 28000: Access denied for user 'u'@'localhost' (using password: YES)
|
||||
connect(localhost,u,bad_password,test,MASTER_PORT,MASTER_SOCKET);
|
||||
connect con1, localhost, u, bad_password;
|
||||
ERROR 28000: Access denied for user 'u'@'localhost' (using password: YES)
|
||||
connect(localhost,u,good_pass,test,MASTER_PORT,MASTER_SOCKET);
|
||||
connect con1, localhost, u, good_pass;
|
||||
ERROR HY000: User is blocked because of too many credential errors; unblock with 'ALTER USER / FLUSH PRIVILEGES'
|
||||
ALTER USER u ACCOUNT UNLOCK;
|
||||
connect(localhost,u,bad_password,test,MASTER_PORT,MASTER_SOCKET);
|
||||
connect con1, localhost, u, bad_password;
|
||||
ERROR 28000: Access denied for user 'u'@'localhost' (using password: YES)
|
||||
connect con1, localhost, u, good_pass;
|
||||
disconnect con1;
|
||||
connection default;
|
||||
DROP USER u;
|
||||
FLUSH PRIVILEGES;
|
||||
set global max_password_errors=@old_max_password_errors;
|
||||
|
@@ -59,6 +59,28 @@ connect (con1, localhost, root, bad_pass);
|
||||
connect (con1, localhost, u, good_pass);
|
||||
disconnect con1;
|
||||
connection default;
|
||||
|
||||
# Block u again
|
||||
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
|
||||
error ER_ACCESS_DENIED_ERROR;
|
||||
connect(con1, localhost, u, bad_password);
|
||||
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
|
||||
error ER_ACCESS_DENIED_ERROR;
|
||||
connect(con1, localhost, u, bad_password);
|
||||
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
|
||||
error ER_USER_IS_BLOCKED;
|
||||
connect(con1, localhost, u, good_pass);
|
||||
|
||||
# Unblock foo
|
||||
ALTER USER u ACCOUNT UNLOCK;
|
||||
|
||||
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
|
||||
error ER_ACCESS_DENIED_ERROR;
|
||||
connect(con1, localhost, u, bad_password);
|
||||
|
||||
connect(con1, localhost, u, good_pass);
|
||||
disconnect con1;
|
||||
connection default;
|
||||
|
||||
DROP USER u;
|
||||
FLUSH PRIVILEGES;
|
||||
set global max_password_errors=@old_max_password_errors;
|
@@ -3,5 +3,6 @@ Win32 error code 150: System trace information was not specified in your CONFIG.
|
||||
OS error code 23: Too many open files in system
|
||||
Win32 error code 23: Data error (cyclic redundancy check).
|
||||
MariaDB error code 1062 (ER_DUP_ENTRY): Duplicate entry '%-.192T' for key %d
|
||||
Learn more: https://mariadb.com/kb/en/e1062/
|
||||
Win32 error code 1062: The service has not been started.
|
||||
Illegal error code: 30000
|
||||
|
@@ -1,6 +1,10 @@
|
||||
Illegal error code: 10000
|
||||
MariaDB error code 1062 (ER_DUP_ENTRY): Duplicate entry '%-.192T' for key %d
|
||||
Learn more: https://mariadb.com/kb/en/e1062/
|
||||
MariaDB error code 1408 (ER_STARTUP): %s: ready for connections.
|
||||
Version: '%s' socket: '%s' port: %d %s
|
||||
Learn more: https://mariadb.com/kb/en/e1408/
|
||||
MariaDB error code 1459 (ER_TABLE_NEEDS_UPGRADE): Upgrade required. Please do "REPAIR %s %`s" or dump/reload to fix it!
|
||||
Learn more: https://mariadb.com/kb/en/e1459/
|
||||
MariaDB error code 1461 (ER_MAX_PREPARED_STMT_COUNT_REACHED): Can't create more than max_prepared_stmt_count statements (current value: %u)
|
||||
Learn more: https://mariadb.com/kb/en/e1461/
|
||||
|
@@ -2264,21 +2264,24 @@ DROP TABLE t1;
|
||||
CREATE TABLE t1 (pk int) engine=myisam ;
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
CREATE TABLE t2 (
|
||||
pk int auto_increment PRIMARY KEY,
|
||||
i1 int, i2 int, c2 varchar(1),
|
||||
KEY (i1), KEY (i2)
|
||||
pk int PRIMARY KEY,
|
||||
i1 int, i2 int,
|
||||
c2 varchar(100),
|
||||
KEY (i1),
|
||||
KEY (i2)
|
||||
) engine=myisam;
|
||||
INSERT INTO t2 VALUES
|
||||
(1,8,6,'t'),(2,5,7,'i'),(3,4,4,'h'),(4,207,38,'d'),(5,183,206,'b'),
|
||||
(6,7,null,'o'),(7,1,2,'j'),(8,17,36,'s'),(9,4,5,'q'),(10,0,6,'l'),
|
||||
(11,1,9,'j'),(12,5,6,'y'),(13,null,0,'i'),(14,7,7,'x'),(15,5,2,'u');
|
||||
insert into t2
|
||||
select
|
||||
seq, floor(seq/100), floor(seq/100), 'abcd'
|
||||
from
|
||||
seq_1_to_10000;
|
||||
SELECT * FROM t1 HAVING (7, 9) IN (SELECT t2.i1, t2.i2 FROM t2 WHERE t2.i1 = 3);
|
||||
pk
|
||||
EXPLAIN EXTENDED
|
||||
SELECT * FROM t1 HAVING (7, 9) IN (SELECT t2.i1, t2.i2 FROM t2 WHERE t2.i1 = 3);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible HAVING
|
||||
2 SUBQUERY t2 ref i1,i2 i1 5 const 1 100.00 Using index condition; Using where
|
||||
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL no matching row in const table
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`t1`.`pk` AS `pk` from `test`.`t1` having 0
|
||||
DROP TABLE t1,t2;
|
||||
|
@@ -298,15 +298,18 @@ CREATE TABLE t1 (pk int) engine=myisam ;
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
|
||||
CREATE TABLE t2 (
|
||||
pk int auto_increment PRIMARY KEY,
|
||||
i1 int, i2 int, c2 varchar(1),
|
||||
KEY (i1), KEY (i2)
|
||||
pk int PRIMARY KEY,
|
||||
i1 int, i2 int,
|
||||
c2 varchar(100),
|
||||
KEY (i1),
|
||||
KEY (i2)
|
||||
) engine=myisam;
|
||||
|
||||
INSERT INTO t2 VALUES
|
||||
(1,8,6,'t'),(2,5,7,'i'),(3,4,4,'h'),(4,207,38,'d'),(5,183,206,'b'),
|
||||
(6,7,null,'o'),(7,1,2,'j'),(8,17,36,'s'),(9,4,5,'q'),(10,0,6,'l'),
|
||||
(11,1,9,'j'),(12,5,6,'y'),(13,null,0,'i'),(14,7,7,'x'),(15,5,2,'u');
|
||||
insert into t2
|
||||
select
|
||||
seq, floor(seq/100), floor(seq/100), 'abcd'
|
||||
from
|
||||
seq_1_to_10000;
|
||||
|
||||
SELECT * FROM t1 HAVING (7, 9) IN (SELECT t2.i1, t2.i2 FROM t2 WHERE t2.i1 = 3);
|
||||
EXPLAIN EXTENDED
|
||||
|
@@ -2220,21 +2220,24 @@ DROP TABLE t1;
|
||||
CREATE TABLE t1 (pk int) engine=myisam ;
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
CREATE TABLE t2 (
|
||||
pk int auto_increment PRIMARY KEY,
|
||||
i1 int, i2 int, c2 varchar(1),
|
||||
KEY (i1), KEY (i2)
|
||||
pk int PRIMARY KEY,
|
||||
i1 int, i2 int,
|
||||
c2 varchar(100),
|
||||
KEY (i1),
|
||||
KEY (i2)
|
||||
) engine=myisam;
|
||||
INSERT INTO t2 VALUES
|
||||
(1,8,6,'t'),(2,5,7,'i'),(3,4,4,'h'),(4,207,38,'d'),(5,183,206,'b'),
|
||||
(6,7,null,'o'),(7,1,2,'j'),(8,17,36,'s'),(9,4,5,'q'),(10,0,6,'l'),
|
||||
(11,1,9,'j'),(12,5,6,'y'),(13,null,0,'i'),(14,7,7,'x'),(15,5,2,'u');
|
||||
insert into t2
|
||||
select
|
||||
seq, floor(seq/100), floor(seq/100), 'abcd'
|
||||
from
|
||||
seq_1_to_10000;
|
||||
SELECT * FROM t1 HAVING (7, 9) IN (SELECT t2.i1, t2.i2 FROM t2 WHERE t2.i1 = 3);
|
||||
pk
|
||||
EXPLAIN EXTENDED
|
||||
SELECT * FROM t1 HAVING (7, 9) IN (SELECT t2.i1, t2.i2 FROM t2 WHERE t2.i1 = 3);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible HAVING
|
||||
2 SUBQUERY t2 ref i1,i2 i1 5 const 1 100.00 Using index condition; Using where
|
||||
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL no matching row in const table
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`t1`.`pk` AS `pk` from `test`.`t1` having 0
|
||||
DROP TABLE t1,t2;
|
||||
@@ -4270,5 +4273,78 @@ count(*)
|
||||
SET optimizer_switch=@save_optimizer_switch;
|
||||
DROP TABLE t0, t1;
|
||||
# End of 10.4 tests
|
||||
#
|
||||
# MDEV-33875: ORDER BY DESC causes ROWID Filter slowdown
|
||||
#
|
||||
create table t1 (
|
||||
pk int primary key auto_increment,
|
||||
a int,
|
||||
b int,
|
||||
f1 varchar(200),
|
||||
f2 varchar(200),
|
||||
f3 varchar(200),
|
||||
f4 varchar(200),
|
||||
f5 varchar(200),
|
||||
key(a, pk),
|
||||
key(b)
|
||||
) engine=innodb;
|
||||
insert into t1 (a,b,f1, f2, f3, f4) select
|
||||
seq, seq,
|
||||
repeat('1-', 100),
|
||||
repeat('2-', 100),
|
||||
repeat('3-', 100),
|
||||
repeat('4-', 100)
|
||||
from
|
||||
seq_1_to_5000;
|
||||
insert into t1 (a,b,f1, f2, f3, f4)select
|
||||
30100, 30100,
|
||||
'abcd','abcd','abcd','abcd'
|
||||
from
|
||||
seq_1_to_250;
|
||||
insert into t1 (a,b,f1) values ( 110, 100, 12345);
|
||||
analyze table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze status Engine-independent statistics collected
|
||||
test.t1 analyze status OK
|
||||
# The following must NOT use Rowid Filter:
|
||||
analyze format=json select * from t1
|
||||
where
|
||||
a =30100 and b in (30100,30101,30102)
|
||||
order by
|
||||
pk desc;
|
||||
ANALYZE
|
||||
{
|
||||
"query_optimization": {
|
||||
"r_total_time_ms": "REPLACED"
|
||||
},
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"r_loops": 1,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"nested_loop": [
|
||||
{
|
||||
"table": {
|
||||
"table_name": "t1",
|
||||
"access_type": "ref",
|
||||
"possible_keys": ["a", "b"],
|
||||
"key": "a",
|
||||
"key_length": "5",
|
||||
"used_key_parts": ["a"],
|
||||
"ref": ["const"],
|
||||
"r_loops": 1,
|
||||
"rows": 250,
|
||||
"r_rows": 250,
|
||||
"r_table_time_ms": "REPLACED",
|
||||
"r_other_time_ms": "REPLACED",
|
||||
"r_engine_stats": REPLACED,
|
||||
"filtered": 4.799086094,
|
||||
"r_filtered": 100,
|
||||
"attached_condition": "t1.a <=> 30100 and t1.b in (30100,30101,30102)"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
drop table t1;
|
||||
# End of 10.6 tests
|
||||
set global innodb_stats_persistent= @stats.save;
|
||||
|
@@ -760,7 +760,49 @@ DROP TABLE t0, t1;
|
||||
|
||||
--echo # End of 10.4 tests
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-33875: ORDER BY DESC causes ROWID Filter slowdown
|
||||
--echo #
|
||||
create table t1 (
|
||||
pk int primary key auto_increment,
|
||||
a int,
|
||||
b int,
|
||||
f1 varchar(200),
|
||||
f2 varchar(200),
|
||||
f3 varchar(200),
|
||||
f4 varchar(200),
|
||||
f5 varchar(200),
|
||||
key(a, pk),
|
||||
key(b)
|
||||
) engine=innodb;
|
||||
|
||||
insert into t1 (a,b,f1, f2, f3, f4) select
|
||||
seq, seq,
|
||||
repeat('1-', 100),
|
||||
repeat('2-', 100),
|
||||
repeat('3-', 100),
|
||||
repeat('4-', 100)
|
||||
from
|
||||
seq_1_to_5000;
|
||||
|
||||
insert into t1 (a,b,f1, f2, f3, f4)select
|
||||
30100, 30100,
|
||||
'abcd','abcd','abcd','abcd'
|
||||
from
|
||||
seq_1_to_250;
|
||||
insert into t1 (a,b,f1) values ( 110, 100, 12345);
|
||||
analyze table t1;
|
||||
|
||||
--echo # The following must NOT use Rowid Filter:
|
||||
--source include/analyze-format.inc
|
||||
analyze format=json select * from t1
|
||||
where
|
||||
a =30100 and b in (30100,30101,30102)
|
||||
order by
|
||||
pk desc;
|
||||
|
||||
drop table t1;
|
||||
|
||||
--echo # End of 10.6 tests
|
||||
|
||||
set global innodb_stats_persistent= @stats.save;
|
||||
|
||||
|
@@ -16,7 +16,7 @@ call mtr.add_suppression("Error in Log_event::read_log_event");
|
||||
|
||||
# Proof of no crash follows.
|
||||
# There's no need for actual bin-loggable queries to the server
|
||||
--let $restart_parameters= --master_verify_checksum=ON --debug_dbug="+d,corrupt_read_log_event_char"
|
||||
--let $restart_parameters= --master_verify_checksum=ON --debug_dbug=+d,corrupt_read_log_event_char
|
||||
--let $shutdown_timeout=0
|
||||
--source include/restart_mysqld.inc
|
||||
--let $restart_parameters=
|
||||
|
@@ -6,13 +6,13 @@ SELECT @@wsrep_slave_threads;
|
||||
1
|
||||
SET GLOBAL wsrep_slave_threads=2;
|
||||
KILL ID;
|
||||
Got one of the listed errors
|
||||
ERROR HY000: This is a high priority thread/query and cannot be killed without compromising the consistency of the cluster
|
||||
KILL QUERY ID;
|
||||
Got one of the listed errors
|
||||
ERROR HY000: This is a high priority thread/query and cannot be killed without compromising the consistency of the cluster
|
||||
KILL ID;
|
||||
Got one of the listed errors
|
||||
ERROR HY000: This is a high priority thread/query and cannot be killed without compromising the consistency of the cluster
|
||||
KILL QUERY ID;
|
||||
Got one of the listed errors
|
||||
ERROR HY000: This is a high priority thread/query and cannot be killed without compromising the consistency of the cluster
|
||||
SET GLOBAL wsrep_slave_threads=DEFAULT;
|
||||
connection node_1;
|
||||
create table t1(a int not null primary key) engine=innodb;
|
||||
|
25
mysql-test/suite/galera/r/galera_kill_bf.result
Normal file
25
mysql-test/suite/galera/r/galera_kill_bf.result
Normal file
@@ -0,0 +1,25 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connect con1,127.0.0.1,root,,test,$NODE_MYPORT_1;
|
||||
call mtr.add_suppression("WSREP: ALTER TABLE isolation failure");
|
||||
CREATE TABLE t1(c1 INT PRIMARY KEY, c2 INT) ENGINE=InnoDB;
|
||||
INSERT into t1 values (1,1);
|
||||
SET DEBUG_SYNC = 'alter_table_after_open_tables SIGNAL bf_started WAIT_FOR bf_continue';
|
||||
ALTER TABLE t1 DROP COLUMN c2;;
|
||||
connection node_1;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET DEBUG_SYNC = 'now WAIT_FOR bf_started';
|
||||
KILL ID;
|
||||
ERROR HY000: This is a high priority thread/query and cannot be killed without compromising the consistency of the cluster
|
||||
KILL QUERY ID;
|
||||
ERROR HY000: This is a high priority thread/query and cannot be killed without compromising the consistency of the cluster
|
||||
connection node_1;
|
||||
SET DEBUG_SYNC = 'now SIGNAL bf_continue';
|
||||
connection con1;
|
||||
SET DEBUG_SYNC = 'RESET';
|
||||
SELECT * FROM t1;
|
||||
c1
|
||||
1
|
||||
connection node_1;
|
||||
DROP TABLE t1;
|
||||
disconnect con1;
|
@@ -17,21 +17,21 @@ SET GLOBAL wsrep_slave_threads=2;
|
||||
--let $applier_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle' LIMIT 1`
|
||||
|
||||
--replace_result $applier_thread ID
|
||||
--error ER_KILL_DENIED_ERROR,ER_KILL_DENIED_ERROR
|
||||
--error ER_KILL_DENIED_ERROR
|
||||
--eval KILL $applier_thread
|
||||
|
||||
--replace_result $applier_thread ID
|
||||
--error ER_KILL_DENIED_ERROR,ER_KILL_DENIED_ERROR
|
||||
--error ER_KILL_DENIED_ERROR
|
||||
--eval KILL QUERY $applier_thread
|
||||
|
||||
--let $aborter_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep aborter idle' LIMIT 1`
|
||||
|
||||
--replace_result $aborter_thread ID
|
||||
--error ER_KILL_DENIED_ERROR,ER_KILL_DENIED_ERROR
|
||||
--error ER_KILL_DENIED_ERROR
|
||||
--eval KILL $aborter_thread
|
||||
|
||||
--replace_result $aborter_thread ID
|
||||
--error ER_KILL_DENIED_ERROR,ER_KILL_DENIED_ERROR
|
||||
--error ER_KILL_DENIED_ERROR
|
||||
--eval KILL QUERY $aborter_thread
|
||||
|
||||
SET GLOBAL wsrep_slave_threads=DEFAULT;
|
||||
|
41
mysql-test/suite/galera/t/galera_kill_bf.test
Normal file
41
mysql-test/suite/galera/t/galera_kill_bf.test
Normal file
@@ -0,0 +1,41 @@
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_debug_sync.inc
|
||||
--source include/have_debug.inc
|
||||
|
||||
--connect con1,127.0.0.1,root,,test,$NODE_MYPORT_1
|
||||
|
||||
call mtr.add_suppression("WSREP: ALTER TABLE isolation failure");
|
||||
|
||||
CREATE TABLE t1(c1 INT PRIMARY KEY, c2 INT) ENGINE=InnoDB;
|
||||
INSERT into t1 values (1,1);
|
||||
|
||||
SET DEBUG_SYNC = 'alter_table_after_open_tables SIGNAL bf_started WAIT_FOR bf_continue';
|
||||
--send ALTER TABLE t1 DROP COLUMN c2;
|
||||
|
||||
--connection node_1
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET DEBUG_SYNC = 'now WAIT_FOR bf_started';
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'debug sync point: alter_table_after_open_tables'
|
||||
--source include/wait_condition.inc
|
||||
|
||||
--let $applier_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'debug sync point:%' LIMIT 1`
|
||||
|
||||
--replace_result $applier_thread ID
|
||||
--error ER_KILL_DENIED_ERROR
|
||||
--eval KILL $applier_thread
|
||||
|
||||
--replace_result $applier_thread ID
|
||||
--error ER_KILL_DENIED_ERROR
|
||||
--eval KILL QUERY $applier_thread
|
||||
|
||||
--connection node_1
|
||||
SET DEBUG_SYNC = 'now SIGNAL bf_continue';
|
||||
|
||||
--connection con1
|
||||
--reap
|
||||
SET DEBUG_SYNC = 'RESET';
|
||||
SELECT * FROM t1;
|
||||
|
||||
--connection node_1
|
||||
DROP TABLE t1;
|
||||
--disconnect con1
|
@@ -0,0 +1,68 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
connect node_1c, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
connect node_1d, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
connect node_1e, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1(a int not null primary key auto_increment, b int) engine=innodb;
|
||||
INSERT INTO t1(b) VALUES (1);
|
||||
connection node_1c;
|
||||
begin;
|
||||
insert into t1 values (2,2);
|
||||
connection node_1d;
|
||||
begin;
|
||||
insert into t1 values (3,3);
|
||||
connection node_1a;
|
||||
SET GLOBAL DEBUG_DBUG='+d,wsrep_after_kill';
|
||||
connection node_2;
|
||||
insert into t1 values (2,6);
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_sync_wait=0;
|
||||
SET DEBUG_SYNC='now WAIT_FOR wsrep_after_kill_reached';
|
||||
SET GLOBAL DEBUG_DBUG='';
|
||||
SET GLOBAL DEBUG_DBUG='+d,wsrep_after_kill_2';
|
||||
connection node_3;
|
||||
insert into t1 values (3,9);
|
||||
connection node_1a;
|
||||
SET DEBUG_SYNC='now WAIT_FOR wsrep_after_kill_reached_2';
|
||||
SET GLOBAL DEBUG_DBUG='';
|
||||
SET DEBUG_SYNC='now SIGNAL wsrep_after_kill_continue';
|
||||
connection node_1c;
|
||||
COMMIT;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
connection node_1a;
|
||||
SET GLOBAL DEBUG_DBUG='';
|
||||
SET DEBUG_SYNC='now SIGNAL wsrep_after_kill_continue_2';
|
||||
connection node_1d;
|
||||
COMMIT;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
connection node_2;
|
||||
SELECT * from t1;
|
||||
a b
|
||||
1 1
|
||||
2 6
|
||||
3 9
|
||||
connection node_3;
|
||||
SELECT * from t1;
|
||||
a b
|
||||
1 1
|
||||
2 6
|
||||
3 9
|
||||
connection node_1a;
|
||||
SET DEBUG_SYNC = reset;
|
||||
connection node_1e;
|
||||
set debug_sync = reset;
|
||||
connection node_1;
|
||||
SELECT * from t1;
|
||||
a b
|
||||
1 1
|
||||
2 6
|
||||
3 9
|
||||
disconnect node_1a;
|
||||
disconnect node_1b;
|
||||
disconnect node_1c;
|
||||
disconnect node_1d;
|
||||
disconnect node_1e;
|
||||
drop table t1;
|
@@ -90,7 +90,7 @@ show variables like 'wsrep_gtid_domain_id';
|
||||
# If bug is present, node_3 remains on domain id 100
|
||||
#
|
||||
--connection node_3
|
||||
--let $restart_parameters = --wsrep_sst_donor="node2"
|
||||
--let $restart_parameters = --wsrep_sst_donor=node2
|
||||
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.3.expect
|
||||
--source include/start_mysqld.inc
|
||||
|
||||
|
@@ -0,0 +1,19 @@
|
||||
!include ../galera_3nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
wsrep-debug=SERVER
|
||||
loose-wsrep-duplicate-primary-value=1
|
||||
wsrep-auto-increment-control=OFF
|
||||
auto-increment-offset=1
|
||||
|
||||
[mysqld.2]
|
||||
wsrep-debug=SERVER
|
||||
loose-wsrep-duplicate-primary-value=1
|
||||
wsrep-auto-increment-control=OFF
|
||||
auto-increment-offset=1
|
||||
|
||||
[mysqld.3]
|
||||
wsrep-debug=SERVER
|
||||
loose-wsrep-duplicate-primary-value=1
|
||||
wsrep-auto-increment-control=OFF
|
||||
auto-increment-offset=1
|
@@ -0,0 +1,81 @@
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_debug.inc
|
||||
--source include/have_debug_sync.inc
|
||||
--source include/big_test.inc
|
||||
|
||||
--let $galera_connection_name = node_3
|
||||
--let $galera_server_number = 3
|
||||
--source include/galera_connect.inc
|
||||
|
||||
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
|
||||
--connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1
|
||||
--connect node_1c, 127.0.0.1, root, , test, $NODE_MYPORT_1
|
||||
--connect node_1d, 127.0.0.1, root, , test, $NODE_MYPORT_1
|
||||
--connect node_1e, 127.0.0.1, root, , test, $NODE_MYPORT_1
|
||||
|
||||
--connection node_1
|
||||
CREATE TABLE t1(a int not null primary key auto_increment, b int) engine=innodb;
|
||||
INSERT INTO t1(b) VALUES (1);
|
||||
|
||||
--connection node_1c
|
||||
begin;
|
||||
insert into t1 values (2,2);
|
||||
|
||||
--connection node_1d
|
||||
begin;
|
||||
insert into t1 values (3,3);
|
||||
|
||||
--connection node_1a
|
||||
SET GLOBAL DEBUG_DBUG='+d,wsrep_after_kill';
|
||||
|
||||
--connection node_2
|
||||
insert into t1 values (2,6);
|
||||
|
||||
--connection node_1a
|
||||
SET SESSION wsrep_sync_wait=0;
|
||||
SET DEBUG_SYNC='now WAIT_FOR wsrep_after_kill_reached';
|
||||
SET GLOBAL DEBUG_DBUG='';
|
||||
SET GLOBAL DEBUG_DBUG='+d,wsrep_after_kill_2';
|
||||
|
||||
--connection node_3
|
||||
insert into t1 values (3,9);
|
||||
|
||||
--connection node_1a
|
||||
SET DEBUG_SYNC='now WAIT_FOR wsrep_after_kill_reached_2';
|
||||
SET GLOBAL DEBUG_DBUG='';
|
||||
SET DEBUG_SYNC='now SIGNAL wsrep_after_kill_continue';
|
||||
|
||||
--connection node_1c
|
||||
--error 1213
|
||||
COMMIT;
|
||||
|
||||
--connection node_1a
|
||||
SET GLOBAL DEBUG_DBUG='';
|
||||
SET DEBUG_SYNC='now SIGNAL wsrep_after_kill_continue_2';
|
||||
|
||||
--connection node_1d
|
||||
--error 1213
|
||||
COMMIT;
|
||||
|
||||
--connection node_2
|
||||
SELECT * from t1;
|
||||
|
||||
--connection node_3
|
||||
SELECT * from t1;
|
||||
|
||||
--connection node_1a
|
||||
SET DEBUG_SYNC = reset;
|
||||
|
||||
--connection node_1e
|
||||
set debug_sync = reset;
|
||||
|
||||
--connection node_1
|
||||
SELECT * from t1;
|
||||
|
||||
--disconnect node_1a
|
||||
--disconnect node_1b
|
||||
--disconnect node_1c
|
||||
--disconnect node_1d
|
||||
--disconnect node_1e
|
||||
|
||||
drop table t1;
|
@@ -3,7 +3,12 @@ CREATE TABLE t1(
|
||||
id INT,
|
||||
PRIMARY KEY(id)
|
||||
) ENGINE=InnoDB;
|
||||
CREATE TABLE dl(
|
||||
id INT UNSIGNED PRIMARY KEY AUTO_INCREMENT,
|
||||
cnt INT UNSIGNED
|
||||
) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES(1), (2), (3);
|
||||
INSERT INTO dl(cnt) SELECT variable_value FROM information_schema.global_status WHERE variable_name LIKE 'Innodb_deadlocks';
|
||||
BEGIN;
|
||||
SELECT * FROM t1 WHERE id = 1 LOCK IN SHARE MODE;
|
||||
connect con1,localhost,root,,;
|
||||
@@ -20,5 +25,8 @@ disconnect con1;
|
||||
ROLLBACK;
|
||||
disconnect con2;
|
||||
connection default;
|
||||
'Deadlock counter is valid';
|
||||
1
|
||||
ROLLBACK;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE dl;
|
||||
|
@@ -6,3 +6,4 @@ call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE faile
|
||||
# MDEV-25019 memory allocation failures during startup cause server failure in different, confusing ways
|
||||
#
|
||||
# restart: --debug_dbug=+d,ib_buf_chunk_init_fails
|
||||
FOUND 1 /\[ERROR\] InnoDB: Cannot allocate memory for the buffer pool/ in mysqld.1.err
|
||||
|
@@ -103,6 +103,27 @@ SELECT * FROM t;
|
||||
a b
|
||||
10 1
|
||||
10 20
|
||||
TRUNCATE TABLE t;
|
||||
#
|
||||
# MDEV-34108 Inappropriate semi-consistent read in snapshot isolation
|
||||
#
|
||||
INSERT INTO t VALUES(NULL, 1), (1, 1);
|
||||
BEGIN;
|
||||
UPDATE t SET b = 3;
|
||||
connection consistent;
|
||||
SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
BEGIN;
|
||||
UPDATE t SET b = 2 WHERE a;
|
||||
connection default;
|
||||
UPDATE t SET a = 1;
|
||||
COMMIT;
|
||||
connection consistent;
|
||||
COMMIT;
|
||||
connection default;
|
||||
SELECT * FROM t;
|
||||
a b
|
||||
1 2
|
||||
1 2
|
||||
DROP TABLE t;
|
||||
#
|
||||
# MDEV-33802 Weird read view after ROLLBACK of other transactions
|
||||
|
8
mysql-test/suite/innodb/r/log_file_overwrite.result
Normal file
8
mysql-test/suite/innodb/r/log_file_overwrite.result
Normal file
@@ -0,0 +1,8 @@
|
||||
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
|
||||
call mtr.add_suppression("plugin 'InnoDB' registration as a STORAGE ENGINE failed.");
|
||||
CREATE TABLE t1(f1 INT NOT NULL, f2 TEXT)ENGINE=InnoDB;
|
||||
# restart: --debug_dbug=+d,ib_log_checkpoint_avoid_hard --innodb_flush_sync=0
|
||||
INSERT INTO t1 SELECT seq, repeat('a', 4000) FROM seq_1_to_1800;
|
||||
# restart: --debug_dbug=+d,before_final_redo_apply --innodb_log_file_size=8M
|
||||
# restart: --innodb_log_file_size=10M
|
||||
DROP TABLE t1;
|
10
mysql-test/suite/innodb/r/recovery_memory,debug.rdiff
Normal file
10
mysql-test/suite/innodb/r/recovery_memory,debug.rdiff
Normal file
@@ -0,0 +1,10 @@
|
||||
--- recovery_memory.result 2024-06-21 12:54:38.026355524 +0530
|
||||
+++ recovery_memory.reject 2024-06-21 17:22:49.394535026 +0530
|
||||
@@ -23,6 +23,7 @@
|
||||
CREATE TABLE t1(f1 INT NOT NULL)ENGINE=InnoDB;
|
||||
INSERT INTO t1 SELECT * FROM seq_1_to_65536;
|
||||
# restart: with restart_parameters
|
||||
+FOUND 1 /\[ERROR\] InnoDB: The change buffer is corrupted or has been removed on upgrade to MariaDB 11.0 or later/ in mysqld.1.err
|
||||
# restart
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
@@ -14,7 +14,14 @@ CREATE TABLE t1(
|
||||
PRIMARY KEY(id)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE dl(
|
||||
id INT UNSIGNED PRIMARY KEY AUTO_INCREMENT,
|
||||
cnt INT UNSIGNED
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
INSERT INTO t1 VALUES(1), (2), (3);
|
||||
# Preserve the initial value of the deadlock counter
|
||||
INSERT INTO dl(cnt) SELECT variable_value FROM information_schema.global_status WHERE variable_name LIKE 'Innodb_deadlocks';
|
||||
|
||||
# We are not interested query results, only errors
|
||||
--disable_result_log
|
||||
@@ -61,6 +68,7 @@ disconnect con2;
|
||||
# and does the update.
|
||||
#
|
||||
connection default;
|
||||
--let $valid_deadlock_cnt= 1
|
||||
if (!$have_deadlock) {
|
||||
--error 0,ER_LOCK_WAIT_TIMEOUT
|
||||
reap;
|
||||
@@ -68,12 +76,21 @@ reap;
|
||||
if ($have_deadlock) {
|
||||
--error 0,ER_LOCK_DEADLOCK
|
||||
reap;
|
||||
--disable_query_log
|
||||
INSERT INTO dl(cnt) SELECT variable_value FROM information_schema.global_status WHERE variable_name LIKE 'Innodb_deadlocks';
|
||||
set @init_deadlock_cnt = (SELECT min(k.cnt) FROM dl k);
|
||||
--let $valid_deadlock_cnt= `SELECT (max(t.cnt-@init_deadlock_cnt) = 1) FROM dl t`
|
||||
--enable_query_log
|
||||
}
|
||||
# Indicates that the deadlock counter works well.
|
||||
# Use the default =1 where is no deadlock detection,
|
||||
# to enable unconditional check.
|
||||
--echo 'Deadlock counter is valid';
|
||||
--echo $valid_deadlock_cnt
|
||||
|
||||
ROLLBACK;
|
||||
|
||||
--enable_result_log
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
DROP TABLE dl;
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
@@ -7,5 +7,8 @@ call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE faile
|
||||
--echo #
|
||||
--echo # MDEV-25019 memory allocation failures during startup cause server failure in different, confusing ways
|
||||
--echo #
|
||||
let restart_parameters=--debug_dbug="+d,ib_buf_chunk_init_fails";
|
||||
let restart_parameters=--debug_dbug=+d,ib_buf_chunk_init_fails;
|
||||
--source include/restart_mysqld.inc
|
||||
let SEARCH_FILE = $MYSQLTEST_VARDIR/log/mysqld.1.err;
|
||||
let SEARCH_PATTERN=\[ERROR\] InnoDB: Cannot allocate memory for the buffer pool;
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
@@ -103,6 +103,40 @@ COMMIT;
|
||||
--reap
|
||||
COMMIT;
|
||||
|
||||
--connection default
|
||||
SELECT * FROM t;
|
||||
TRUNCATE TABLE t;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-34108 Inappropriate semi-consistent read in snapshot isolation
|
||||
--echo #
|
||||
INSERT INTO t VALUES(NULL, 1), (1, 1);
|
||||
BEGIN;
|
||||
UPDATE t SET b = 3;
|
||||
|
||||
--connection consistent
|
||||
SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
BEGIN;
|
||||
# As semi-consistent read is disabled for innodb_snapshot_isolation=ON, the
|
||||
# following UPDATE must be blocked on the first record.
|
||||
--send UPDATE t SET b = 2 WHERE a
|
||||
|
||||
--connection default
|
||||
let $wait_condition=
|
||||
select count(*) = 1 from information_schema.processlist
|
||||
where state = 'Updating' and info = 'UPDATE t SET b = 2 WHERE a';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
UPDATE t SET a = 1;
|
||||
COMMIT;
|
||||
--connection consistent
|
||||
# If the bug wouldn't be fixed, the result would be (1,3),(1,2), because
|
||||
# "UPDATE t SET b = 2 WHERE a" would be blocked on the second (1,3) record,
|
||||
# as semi-consistent read would filter out the first (null,3) record without
|
||||
# blocking.
|
||||
--reap
|
||||
COMMIT;
|
||||
|
||||
--connection default
|
||||
SELECT * FROM t;
|
||||
DROP TABLE t;
|
||||
|
17
mysql-test/suite/innodb/t/log_file_overwrite.test
Normal file
17
mysql-test/suite/innodb/t/log_file_overwrite.test
Normal file
@@ -0,0 +1,17 @@
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_sequence.inc
|
||||
--source include/have_debug.inc
|
||||
|
||||
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
|
||||
call mtr.add_suppression("plugin 'InnoDB' registration as a STORAGE ENGINE failed.");
|
||||
CREATE TABLE t1(f1 INT NOT NULL, f2 TEXT)ENGINE=InnoDB;
|
||||
let $restart_parameters=--debug_dbug=+d,ib_log_checkpoint_avoid_hard --innodb_flush_sync=0;
|
||||
--source include/restart_mysqld.inc
|
||||
INSERT INTO t1 SELECT seq, repeat('a', 4000) FROM seq_1_to_1800;
|
||||
let $restart_parameters=--debug_dbug=+d,before_final_redo_apply --innodb_log_file_size=8M;
|
||||
let $shutdown_timeout=0;
|
||||
--source include/restart_mysqld.inc
|
||||
let $restart_parameters=--innodb_log_file_size=10M;
|
||||
let $shutdown_timeout=;
|
||||
--source include/restart_mysqld.inc
|
||||
DROP TABLE t1;
|
@@ -33,7 +33,7 @@ DROP PROCEDURE dorepeat;
|
||||
--echo #
|
||||
if ($have_debug) {
|
||||
SET DEBUG_DBUG="+d,ib_log_checkpoint_avoid_hard";
|
||||
let $restart_parameters=--innodb_buffer_pool_size=5242880 --debug_dbug="+d,ibuf_init_corrupt";
|
||||
let $restart_parameters=--innodb_buffer_pool_size=5242880 --debug_dbug=+d,ibuf_init_corrupt;
|
||||
}
|
||||
if (!$have_debug) {
|
||||
--echo SET DEBUG_DBUG="+d,ib_log_checkpoint_avoid_hard";
|
||||
@@ -44,6 +44,11 @@ INSERT INTO t1 SELECT * FROM seq_1_to_65536;
|
||||
let $restart_noprint=1;
|
||||
let $shutdown_timeout=0;
|
||||
--source include/restart_mysqld.inc
|
||||
if ($have_debug) {
|
||||
let SEARCH_FILE = $MYSQLTEST_VARDIR/log/mysqld.1.err;
|
||||
let SEARCH_PATTERN=\[ERROR\] InnoDB: The change buffer is corrupted or has been removed on upgrade to MariaDB 11.0 or later;
|
||||
--source include/search_pattern_in_file.inc
|
||||
}
|
||||
let $restart_noprint=0;
|
||||
let $restart_parameters=;
|
||||
--source include/restart_mysqld.inc
|
||||
|
@@ -2,6 +2,9 @@ include/master-slave.inc
|
||||
[connection master]
|
||||
connection master;
|
||||
call mtr.add_suppression("Got an error reading communication packets");
|
||||
call mtr.add_suppression("Got an error writing communication packets");
|
||||
call mtr.add_suppression("Could not read packet");
|
||||
call mtr.add_suppression("Could not write packet");
|
||||
set @save_bgc_count= @@global.binlog_commit_wait_count;
|
||||
set @save_bgc_usec= @@global.binlog_commit_wait_usec;
|
||||
set @save_debug_dbug= @@global.debug_dbug;
|
||||
|
@@ -0,0 +1,28 @@
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
include/assert.inc [Password length is 96]
|
||||
connection master;
|
||||
SET SQL_LOG_BIN=0;
|
||||
GRANT REPLICATION SLAVE ON *.* TO rpl@127.0.0.1 IDENTIFIED BY '123456789X12141618202224262830323436384042444648505254565860626466687072747678808284868890929496';
|
||||
SET SQL_LOG_BIN=1;
|
||||
connection slave;
|
||||
include/stop_slave.inc
|
||||
CHANGE MASTER TO MASTER_HOST='127.0.0.1', master_user='rpl', master_password='123456789X12141618202224262830323436384042444648505254565860626466687072747678808284868890929496';
|
||||
include/start_slave.inc
|
||||
include/check_slave_param.inc [Slave_IO_Running]
|
||||
connection master;
|
||||
include/rpl_restart_server.inc [server_number=2]
|
||||
connection slave;
|
||||
include/start_slave.inc
|
||||
include/check_slave_param.inc [Slave_IO_Running]
|
||||
connection master;
|
||||
SET SQL_LOG_BIN=0;
|
||||
DROP USER rpl@127.0.0.1;
|
||||
FLUSH PRIVILEGES;
|
||||
SET SQL_LOG_BIN=1;
|
||||
connection slave;
|
||||
include/stop_slave.inc
|
||||
CHANGE MASTER TO MASTER_USER = 'root', MASTER_PASSWORD = '';
|
||||
include/start_slave.inc
|
||||
connection master;
|
||||
include/rpl_end.inc
|
@@ -26,6 +26,9 @@
|
||||
|
||||
--connection master
|
||||
call mtr.add_suppression("Got an error reading communication packets");
|
||||
call mtr.add_suppression("Got an error writing communication packets");
|
||||
call mtr.add_suppression("Could not read packet");
|
||||
call mtr.add_suppression("Could not write packet");
|
||||
set @save_bgc_count= @@global.binlog_commit_wait_count;
|
||||
set @save_bgc_usec= @@global.binlog_commit_wait_usec;
|
||||
set @save_debug_dbug= @@global.debug_dbug;
|
||||
|
80
mysql-test/suite/rpl/t/rpl_slave_restart_long_password.test
Normal file
80
mysql-test/suite/rpl/t/rpl_slave_restart_long_password.test
Normal file
@@ -0,0 +1,80 @@
|
||||
#
|
||||
# This test validates a fix for a bug where slaves only read the
|
||||
# first 41 characters of MASTER_PASSWORD from the master.info file
|
||||
# after restarts.
|
||||
#
|
||||
# The test ensures that passwords up to the maximum allowable
|
||||
# length (96 ASCII characters) will be read from the master.info
|
||||
# file after slave restarts
|
||||
#
|
||||
# References:
|
||||
# MDEV-23857: replication master password length
|
||||
#
|
||||
|
||||
# Test is format independent, so only run with one format
|
||||
--source include/have_binlog_format_mixed.inc
|
||||
--source include/master-slave.inc
|
||||
|
||||
|
||||
#####
|
||||
# Setup
|
||||
#
|
||||
--let $passwd=123456789X12141618202224262830323436384042444648505254565860626466687072747678808284868890929496
|
||||
--let $expected_pwlen=96
|
||||
--let assert_cond=CHAR_LENGTH("$passwd")=$expected_pwlen
|
||||
--let assert_text=Password length is $expected_pwlen
|
||||
--source include/assert.inc
|
||||
|
||||
connection master;
|
||||
SET SQL_LOG_BIN=0;
|
||||
--eval GRANT REPLICATION SLAVE ON *.* TO rpl@127.0.0.1 IDENTIFIED BY '$passwd'
|
||||
SET SQL_LOG_BIN=1;
|
||||
#####
|
||||
|
||||
|
||||
#####
|
||||
# Change master to new user/password combination
|
||||
#
|
||||
connection slave;
|
||||
--source include/stop_slave.inc
|
||||
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', master_user='rpl', master_password='$passwd'
|
||||
|
||||
--source include/start_slave.inc
|
||||
--let $slave_param= Slave_IO_Running
|
||||
--let $slave_param_value= Yes
|
||||
--source include/check_slave_param.inc
|
||||
#####
|
||||
|
||||
|
||||
#####
|
||||
# Ensure slave can re-connect to master after restart
|
||||
#
|
||||
connection master;
|
||||
--let $rpl_server_number= 2
|
||||
--source include/rpl_restart_server.inc
|
||||
|
||||
connection slave;
|
||||
--source include/start_slave.inc
|
||||
--let $slave_param= Slave_IO_Running
|
||||
--let $slave_param_value= Yes
|
||||
--source include/check_slave_param.inc
|
||||
#####
|
||||
|
||||
|
||||
#####
|
||||
# Cleanup
|
||||
#
|
||||
connection master;
|
||||
SET SQL_LOG_BIN=0;
|
||||
DROP USER rpl@127.0.0.1;
|
||||
FLUSH PRIVILEGES;
|
||||
SET SQL_LOG_BIN=1;
|
||||
|
||||
connection slave;
|
||||
--source include/stop_slave.inc
|
||||
CHANGE MASTER TO MASTER_USER = 'root', MASTER_PASSWORD = '';
|
||||
--source include/start_slave.inc
|
||||
|
||||
connection master;
|
||||
-- source include/rpl_end.inc
|
||||
#####
|
37
mysql-test/suite/vcol/r/vcol_utf32.result
Normal file
37
mysql-test/suite/vcol/r/vcol_utf32.result
Normal file
@@ -0,0 +1,37 @@
|
||||
#
|
||||
# MDEV-27966 Assertion `fixed()' failed and Assertion `fixed == 1' failed, both in Item_func_concat::val_str on SELECT after INSERT with collation utf32_bin on utf8_bin table
|
||||
#
|
||||
SET NAMES utf8mb3;
|
||||
SET sql_mode='';
|
||||
CREATE TABLE t (c1 INT,c2 CHAR AS (CONCAT ('',DAYNAME ('')))) COLLATE utf8_bin ENGINE=InnoDB;
|
||||
Warnings:
|
||||
Warning 1286 Unknown storage engine 'InnoDB'
|
||||
Warning 1266 Using storage engine MyISAM for table 't'
|
||||
INSERT INTO t VALUES (0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0);
|
||||
Warnings:
|
||||
Warning 1906 The value specified for generated column 'c2' in table 't' has been ignored
|
||||
Warning 1292 Incorrect datetime value: ''
|
||||
Warning 1906 The value specified for generated column 'c2' in table 't' has been ignored
|
||||
Warning 1292 Incorrect datetime value: ''
|
||||
Warning 1906 The value specified for generated column 'c2' in table 't' has been ignored
|
||||
Warning 1292 Incorrect datetime value: ''
|
||||
Warning 1906 The value specified for generated column 'c2' in table 't' has been ignored
|
||||
Warning 1292 Incorrect datetime value: ''
|
||||
Warning 1906 The value specified for generated column 'c2' in table 't' has been ignored
|
||||
Warning 1292 Incorrect datetime value: ''
|
||||
Warning 1906 The value specified for generated column 'c2' in table 't' has been ignored
|
||||
Warning 1292 Incorrect datetime value: ''
|
||||
Warning 1906 The value specified for generated column 'c2' in table 't' has been ignored
|
||||
Warning 1292 Incorrect datetime value: ''
|
||||
Warning 1906 The value specified for generated column 'c2' in table 't' has been ignored
|
||||
Warning 1292 Incorrect datetime value: ''
|
||||
Warning 1906 The value specified for generated column 'c2' in table 't' has been ignored
|
||||
Warning 1292 Incorrect datetime value: ''
|
||||
SET collation_connection='utf32_bin';
|
||||
INSERT INTO t VALUES (0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0);
|
||||
ERROR HY000: Illegal mix of collations (utf8mb3_bin,COERCIBLE) and (utf32_bin,COERCIBLE) for operation 'concat'
|
||||
SELECT * FROM t;
|
||||
ERROR HY000: Illegal mix of collations (utf8mb3_bin,COERCIBLE) and (utf32_bin,COERCIBLE) for operation 'concat'
|
||||
DROP TABLE t;
|
||||
SET sql_mode=DEFAULT;
|
||||
SET NAMES utf8mb3;
|
18
mysql-test/suite/vcol/t/vcol_utf32.test
Normal file
18
mysql-test/suite/vcol/t/vcol_utf32.test
Normal file
@@ -0,0 +1,18 @@
|
||||
--source include/have_utf32.inc
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-27966 Assertion `fixed()' failed and Assertion `fixed == 1' failed, both in Item_func_concat::val_str on SELECT after INSERT with collation utf32_bin on utf8_bin table
|
||||
--echo #
|
||||
|
||||
SET NAMES utf8mb3;
|
||||
SET sql_mode='';
|
||||
CREATE TABLE t (c1 INT,c2 CHAR AS (CONCAT ('',DAYNAME ('')))) COLLATE utf8_bin ENGINE=InnoDB;
|
||||
INSERT INTO t VALUES (0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0);
|
||||
SET collation_connection='utf32_bin';
|
||||
--error ER_CANT_AGGREGATE_2COLLATIONS
|
||||
INSERT INTO t VALUES (0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0);
|
||||
--error ER_CANT_AGGREGATE_2COLLATIONS
|
||||
SELECT * FROM t;
|
||||
DROP TABLE t;
|
||||
SET sql_mode=DEFAULT;
|
||||
SET NAMES utf8mb3;
|
@@ -101,10 +101,10 @@ public:
|
||||
uchar source_tail[MY_AES_BLOCK_SIZE];
|
||||
|
||||
MyCTX_nopad() : MyCTX() { }
|
||||
~MyCTX_nopad() = default;
|
||||
~MyCTX_nopad() override = default;
|
||||
|
||||
int init(const EVP_CIPHER *cipher, int encrypt, const uchar *key, uint klen,
|
||||
const uchar *iv, uint ivlen)
|
||||
const uchar *iv, uint ivlen) override
|
||||
{
|
||||
compile_time_assert(MY_AES_CTX_SIZE >= sizeof(MyCTX_nopad));
|
||||
this->key= key;
|
||||
@@ -141,13 +141,13 @@ public:
|
||||
source_tail_len= new_tail_len;
|
||||
}
|
||||
|
||||
int update(const uchar *src, uint slen, uchar *dst, uint *dlen)
|
||||
int update(const uchar *src, uint slen, uchar *dst, uint *dlen) override
|
||||
{
|
||||
update_source_tail(src, slen);
|
||||
return MyCTX::update(src, slen, dst, dlen);
|
||||
}
|
||||
|
||||
int finish(uchar *dst, uint *dlen)
|
||||
int finish(uchar *dst, uint *dlen) override
|
||||
{
|
||||
if (source_tail_len)
|
||||
{
|
||||
@@ -206,10 +206,10 @@ public:
|
||||
const uchar *aad;
|
||||
int aadlen;
|
||||
MyCTX_gcm() : MyCTX() { }
|
||||
~MyCTX_gcm() { }
|
||||
~MyCTX_gcm() override { }
|
||||
|
||||
int init(const EVP_CIPHER *cipher, int encrypt, const uchar *key, uint klen,
|
||||
const uchar *iv, uint ivlen)
|
||||
const uchar *iv, uint ivlen) override
|
||||
{
|
||||
compile_time_assert(MY_AES_CTX_SIZE >= sizeof(MyCTX_gcm));
|
||||
int res= MyCTX::init(cipher, encrypt, key, klen, iv, ivlen);
|
||||
@@ -219,7 +219,7 @@ public:
|
||||
return res;
|
||||
}
|
||||
|
||||
int update(const uchar *src, uint slen, uchar *dst, uint *dlen)
|
||||
int update(const uchar *src, uint slen, uchar *dst, uint *dlen) override
|
||||
{
|
||||
/*
|
||||
note that this GCM class cannot do streaming decryption, because
|
||||
@@ -244,7 +244,7 @@ public:
|
||||
return MyCTX::update(src, slen, dst, dlen);
|
||||
}
|
||||
|
||||
int finish(uchar *dst, uint *dlen)
|
||||
int finish(uchar *dst, uint *dlen) override
|
||||
{
|
||||
int fin;
|
||||
if (!EVP_CipherFinal_ex(ctx, dst, &fin))
|
||||
|
@@ -154,7 +154,7 @@ public:
|
||||
Base(logLevel)
|
||||
{
|
||||
}
|
||||
virtual LogLevel GetLogLevel(void) const override
|
||||
LogLevel GetLogLevel(void) const override
|
||||
{
|
||||
return (LogLevel)log_level;
|
||||
}
|
||||
@@ -162,12 +162,12 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual void Flush(void) override
|
||||
void Flush(void) override
|
||||
{
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual void ProcessFormattedStatement(Aws::String&& statement) override
|
||||
void ProcessFormattedStatement(Aws::String&& statement) override
|
||||
{
|
||||
#ifdef _WIN32
|
||||
/*
|
||||
|
@@ -53,7 +53,7 @@ class Url_http: public Url {
|
||||
{
|
||||
proxy_host.length= 0;
|
||||
}
|
||||
~Url_http()
|
||||
~Url_http() override
|
||||
{
|
||||
my_free(host.str);
|
||||
my_free(port.str);
|
||||
@@ -62,9 +62,9 @@ class Url_http: public Url {
|
||||
}
|
||||
|
||||
public:
|
||||
void abort();
|
||||
int send(const char* data, size_t data_length);
|
||||
int set_proxy(const char *proxy, size_t proxy_len)
|
||||
void abort() override;
|
||||
int send(const char* data, size_t data_length) override;
|
||||
int set_proxy(const char *proxy, size_t proxy_len) override
|
||||
{
|
||||
if (use_proxy())
|
||||
{
|
||||
|
@@ -84,10 +84,10 @@ prep_stmt::operator =(const prep_stmt& x)
|
||||
|
||||
struct database : public database_i, private noncopyable {
|
||||
database(const config& c);
|
||||
virtual ~database();
|
||||
virtual dbcontext_ptr create_context(bool for_write) volatile;
|
||||
virtual void stop() volatile;
|
||||
virtual const config& get_conf() const volatile;
|
||||
~database() override;
|
||||
dbcontext_ptr create_context(bool for_write) volatile override;
|
||||
void stop() volatile override;
|
||||
const config& get_conf() const volatile override;
|
||||
public:
|
||||
int child_running;
|
||||
private:
|
||||
@@ -128,21 +128,21 @@ struct expr_user_lock : private noncopyable {
|
||||
|
||||
struct dbcontext : public dbcontext_i, private noncopyable {
|
||||
dbcontext(volatile database *d, bool for_write);
|
||||
virtual ~dbcontext();
|
||||
virtual void init_thread(const void *stack_botton,
|
||||
volatile int& shutdown_flag);
|
||||
virtual void term_thread();
|
||||
virtual bool check_alive();
|
||||
virtual void lock_tables_if();
|
||||
virtual void unlock_tables_if();
|
||||
virtual bool get_commit_error();
|
||||
virtual void clear_error();
|
||||
virtual void close_tables_if();
|
||||
virtual void table_addref(size_t tbl_id);
|
||||
virtual void table_release(size_t tbl_id);
|
||||
virtual void cmd_open(dbcallback_i& cb, const cmd_open_args& args);
|
||||
virtual void cmd_exec(dbcallback_i& cb, const cmd_exec_args& args);
|
||||
virtual void set_statistics(size_t num_conns, size_t num_active);
|
||||
~dbcontext() override;
|
||||
void init_thread(const void *stack_botton,
|
||||
volatile int& shutdown_flag) override;
|
||||
void term_thread() override;
|
||||
bool check_alive() override;
|
||||
void lock_tables_if() override;
|
||||
void unlock_tables_if() override;
|
||||
bool get_commit_error() override;
|
||||
void clear_error() override;
|
||||
void close_tables_if() override;
|
||||
void table_addref(size_t tbl_id) override;
|
||||
void table_release(size_t tbl_id) override;
|
||||
void cmd_open(dbcallback_i& cb, const cmd_open_args& args) override;
|
||||
void cmd_exec(dbcallback_i& cb, const cmd_exec_args& args) override;
|
||||
void set_statistics(size_t num_conns, size_t num_active) override;
|
||||
private:
|
||||
int set_thread_message(const char *fmt, ...)
|
||||
__attribute__((format (printf, 2, 3)));
|
||||
|
@@ -34,8 +34,8 @@ struct worker_throbj {
|
||||
|
||||
struct hstcpsvr : public hstcpsvr_i, private noncopyable {
|
||||
hstcpsvr(const config& c);
|
||||
~hstcpsvr();
|
||||
virtual std::string start_listen();
|
||||
~hstcpsvr() override;
|
||||
std::string start_listen() override;
|
||||
private:
|
||||
hstcpsvr_shared_c cshared;
|
||||
volatile hstcpsvr_shared_v vshared;
|
||||
|
@@ -77,15 +77,15 @@ struct hstcpsvr_conn : public dbcallback_i {
|
||||
bool write_more(bool *more_r = 0);
|
||||
bool read_more(bool *more_r = 0);
|
||||
public:
|
||||
virtual void dbcb_set_prep_stmt(size_t pst_id, const prep_stmt& v);
|
||||
virtual const prep_stmt *dbcb_get_prep_stmt(size_t pst_id) const;
|
||||
virtual void dbcb_resp_short(uint32_t code, const char *msg);
|
||||
virtual void dbcb_resp_short_num(uint32_t code, uint32_t value);
|
||||
virtual void dbcb_resp_short_num64(uint32_t code, uint64_t value);
|
||||
virtual void dbcb_resp_begin(size_t num_flds);
|
||||
virtual void dbcb_resp_entry(const char *fld, size_t fldlen);
|
||||
virtual void dbcb_resp_end();
|
||||
virtual void dbcb_resp_cancel();
|
||||
void dbcb_set_prep_stmt(size_t pst_id, const prep_stmt& v) override;
|
||||
const prep_stmt *dbcb_get_prep_stmt(size_t pst_id) const override;
|
||||
void dbcb_resp_short(uint32_t code, const char *msg) override;
|
||||
void dbcb_resp_short_num(uint32_t code, uint32_t value) override;
|
||||
void dbcb_resp_short_num64(uint32_t code, uint64_t value) override;
|
||||
void dbcb_resp_begin(size_t num_flds) override;
|
||||
void dbcb_resp_entry(const char *fld, size_t fldlen) override;
|
||||
void dbcb_resp_end() override;
|
||||
void dbcb_resp_cancel() override;
|
||||
public:
|
||||
hstcpsvr_conn() : addr_len(sizeof(addr)), readsize(4096),
|
||||
nonblocking(false), read_finished(false), write_finished(false),
|
||||
@@ -254,7 +254,7 @@ hstcpsvr_conn::dbcb_resp_cancel()
|
||||
|
||||
struct hstcpsvr_worker : public hstcpsvr_worker_i, private noncopyable {
|
||||
hstcpsvr_worker(const hstcpsvr_worker_arg& arg);
|
||||
virtual void run();
|
||||
void run() override;
|
||||
private:
|
||||
const hstcpsvr_shared_c& cshared;
|
||||
volatile hstcpsvr_shared_v& vshared;
|
||||
|
@@ -27,23 +27,23 @@ namespace dena {
|
||||
|
||||
struct hstcpcli : public hstcpcli_i, private noncopyable {
|
||||
hstcpcli(const socket_args& args);
|
||||
virtual void close();
|
||||
virtual int reconnect();
|
||||
virtual bool stable_point();
|
||||
virtual void request_buf_open_index(size_t pst_id, const char *dbn,
|
||||
const char *tbl, const char *idx, const char *retflds, const char *filflds);
|
||||
virtual void request_buf_auth(const char *secret, const char *typ);
|
||||
virtual void request_buf_exec_generic(size_t pst_id, const string_ref& op,
|
||||
void close() override;
|
||||
int reconnect() override;
|
||||
bool stable_point() override;
|
||||
void request_buf_open_index(size_t pst_id, const char *dbn,
|
||||
const char *tbl, const char *idx, const char *retflds, const char *filflds) override;
|
||||
void request_buf_auth(const char *secret, const char *typ) override;
|
||||
void request_buf_exec_generic(size_t pst_id, const string_ref& op,
|
||||
const string_ref *kvs, size_t kvslen, uint32_t limit, uint32_t skip,
|
||||
const string_ref& mod_op, const string_ref *mvs, size_t mvslen,
|
||||
const hstcpcli_filter *fils, size_t filslen, int invalues_keypart,
|
||||
const string_ref *invalues, size_t invalueslen);
|
||||
virtual int request_send();
|
||||
virtual int response_recv(size_t& num_flds_r);
|
||||
virtual const string_ref *get_next_row();
|
||||
virtual void response_buf_remove();
|
||||
virtual int get_error_code();
|
||||
virtual std::string get_error();
|
||||
const string_ref *invalues, size_t invalueslen) override;
|
||||
int request_send() override;
|
||||
int response_recv(size_t& num_flds_r) override;
|
||||
const string_ref *get_next_row() override;
|
||||
void response_buf_remove() override;
|
||||
int get_error_code() override;
|
||||
std::string get_error() override;
|
||||
private:
|
||||
int read_more();
|
||||
void clear_error();
|
||||
|
@@ -90,7 +90,7 @@ public:
|
||||
{
|
||||
null_value= false;
|
||||
}
|
||||
bool need_parentheses_in_default() { return false; }
|
||||
bool need_parentheses_in_default() override { return false; }
|
||||
};
|
||||
|
||||
|
||||
|
@@ -47,7 +47,7 @@ public:
|
||||
static Create_func_inet_ntoa s_singleton;
|
||||
protected:
|
||||
Create_func_inet_ntoa() {}
|
||||
virtual ~Create_func_inet_ntoa() {}
|
||||
~Create_func_inet_ntoa() override {}
|
||||
};
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ public:
|
||||
static Create_func_inet_aton s_singleton;
|
||||
protected:
|
||||
Create_func_inet_aton() {}
|
||||
virtual ~Create_func_inet_aton() {}
|
||||
~Create_func_inet_aton() override {}
|
||||
};
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
static Create_func_inet6_aton s_singleton;
|
||||
protected:
|
||||
Create_func_inet6_aton() {}
|
||||
virtual ~Create_func_inet6_aton() {}
|
||||
~Create_func_inet6_aton() override {}
|
||||
};
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ public:
|
||||
static Create_func_inet6_ntoa s_singleton;
|
||||
protected:
|
||||
Create_func_inet6_ntoa() {}
|
||||
virtual ~Create_func_inet6_ntoa() {}
|
||||
~Create_func_inet6_ntoa() override {}
|
||||
};
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ public:
|
||||
static Create_func_is_ipv4 s_singleton;
|
||||
protected:
|
||||
Create_func_is_ipv4() {}
|
||||
virtual ~Create_func_is_ipv4() {}
|
||||
~Create_func_is_ipv4() override {}
|
||||
};
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ public:
|
||||
static Create_func_is_ipv6 s_singleton;
|
||||
protected:
|
||||
Create_func_is_ipv6() {}
|
||||
virtual ~Create_func_is_ipv6() {}
|
||||
~Create_func_is_ipv6() override {}
|
||||
};
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ public:
|
||||
static Create_func_is_ipv4_compat s_singleton;
|
||||
protected:
|
||||
Create_func_is_ipv4_compat() {}
|
||||
virtual ~Create_func_is_ipv4_compat() {}
|
||||
~Create_func_is_ipv4_compat() override {}
|
||||
};
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ public:
|
||||
static Create_func_is_ipv4_mapped s_singleton;
|
||||
protected:
|
||||
Create_func_is_ipv4_mapped() {}
|
||||
virtual ~Create_func_is_ipv4_mapped() {}
|
||||
~Create_func_is_ipv4_mapped() override {}
|
||||
};
|
||||
|
||||
|
||||
|
@@ -74,14 +74,14 @@ public:
|
||||
&my_charset_utf8mb4_bin)
|
||||
{}
|
||||
|
||||
String *val_str(String *val_buffer, String *val_str);
|
||||
const Type_handler *type_handler() const { return &type_handler_mysql_json; }
|
||||
String *val_str(String *val_buffer, String *val_str) override;
|
||||
const Type_handler *type_handler() const override { return &type_handler_mysql_json; }
|
||||
bool parse_mysql(String *dest, const char *data, size_t length) const;
|
||||
bool send(Protocol *protocol) { return Field::send(protocol); }
|
||||
void sql_type(String &s) const
|
||||
bool send(Protocol *protocol) override { return Field::send(protocol); }
|
||||
void sql_type(String &s) const override
|
||||
{ s.set_ascii(STRING_WITH_LEN("mysql_json /* JSON from MySQL 5.7 */")); }
|
||||
/* this will make ALTER TABLE to consider it different from built-in field */
|
||||
Compression_method *compression_method() const { return (Compression_method*)1; }
|
||||
Compression_method *compression_method() const override { return (Compression_method*)1; }
|
||||
};
|
||||
|
||||
Field *Type_handler_mysql_json::make_conversion_table_field(MEM_ROOT *root,
|
||||
|
@@ -115,7 +115,7 @@ public:
|
||||
{
|
||||
DBUG_ENTER("Create_func_uuid::create");
|
||||
thd->lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION);
|
||||
thd->lex->safe_to_cache_query= 0;
|
||||
thd->lex->uncacheable(UNCACHEABLE_RAND);
|
||||
DBUG_RETURN(new (thd->mem_root) Item_func_uuid(thd));
|
||||
}
|
||||
static Create_func_uuid s_singleton;
|
||||
@@ -133,7 +133,7 @@ public:
|
||||
{
|
||||
DBUG_ENTER("Create_func_sys_guid::create");
|
||||
thd->lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION);
|
||||
thd->lex->safe_to_cache_query= 0;
|
||||
thd->lex->uncacheable(UNCACHEABLE_RAND);
|
||||
DBUG_RETURN(new (thd->mem_root) Item_func_sys_guid(thd));
|
||||
}
|
||||
static Create_func_sys_guid s_singleton;
|
||||
|
@@ -30,14 +30,14 @@ template <TR_table::field_id_t TRT_FIELD>
|
||||
class Create_func_trt : public Create_native_func
|
||||
{
|
||||
public:
|
||||
virtual Item *create_native(THD *thd, const LEX_CSTRING *name,
|
||||
List<Item> *item_list);
|
||||
Item *create_native(THD *thd, const LEX_CSTRING *name,
|
||||
List<Item> *item_list) override;
|
||||
|
||||
static Create_func_trt<TRT_FIELD> s_singleton;
|
||||
|
||||
protected:
|
||||
Create_func_trt() = default;
|
||||
virtual ~Create_func_trt() = default;
|
||||
~Create_func_trt() override = default;
|
||||
};
|
||||
|
||||
template<TR_table::field_id_t TRT_FIELD>
|
||||
@@ -104,8 +104,8 @@ template <class Item_func_trt_trx_seesX>
|
||||
class Create_func_trt_trx_sees : public Create_native_func
|
||||
{
|
||||
public:
|
||||
virtual Item *create_native(THD *thd, const LEX_CSTRING *name,
|
||||
List<Item> *item_list)
|
||||
Item *create_native(THD *thd, const LEX_CSTRING *name,
|
||||
List<Item> *item_list) override
|
||||
{
|
||||
Item *func= NULL;
|
||||
int arg_count= 0;
|
||||
@@ -133,7 +133,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_trt_trx_sees() = default;
|
||||
virtual ~Create_func_trt_trx_sees() = default;
|
||||
~Create_func_trt_trx_sees() override = default;
|
||||
};
|
||||
|
||||
template<class X>
|
||||
|
@@ -233,6 +233,7 @@ ELSE()
|
||||
SET(sysconfdir "/etc")
|
||||
ENDIF()
|
||||
SET(bindir ${INSTALL_BINDIRABS})
|
||||
SET(sbindir ${INSTALL_SBINDIRABS})
|
||||
SET(libexecdir ${INSTALL_SBINDIRABS})
|
||||
SET(scriptdir ${INSTALL_BINDIRABS})
|
||||
SET(datadir ${INSTALL_MYSQLSHAREDIRABS})
|
||||
|
@@ -152,7 +152,6 @@ WSREP_SST_OPT_DATA=""
|
||||
WSREP_SST_OPT_AUTH="${WSREP_SST_OPT_AUTH:-}"
|
||||
WSREP_SST_OPT_USER="${WSREP_SST_OPT_USER:-}"
|
||||
WSREP_SST_OPT_PSWD="${WSREP_SST_OPT_PSWD:-}"
|
||||
WSREP_SST_OPT_REMOTE_AUTH="${WSREP_SST_OPT_REMOTE_AUTH:-}"
|
||||
WSREP_SST_OPT_DEFAULT=""
|
||||
WSREP_SST_OPT_DEFAULTS=""
|
||||
WSREP_SST_OPT_EXTRA_DEFAULT=""
|
||||
@@ -1008,11 +1007,6 @@ in_config()
|
||||
echo $found
|
||||
}
|
||||
|
||||
wsrep_auth_not_set()
|
||||
{
|
||||
[ -z "$WSREP_SST_OPT_AUTH" ]
|
||||
}
|
||||
|
||||
# Get rid of incorrect values resulting from substitution
|
||||
# in programs external to the script:
|
||||
if [ "$WSREP_SST_OPT_USER" = '(null)' ]; then
|
||||
@@ -1028,12 +1022,12 @@ fi
|
||||
# Let's read the value of the authentication string from the
|
||||
# configuration file so that it does not go to the command line
|
||||
# and does not appear in the ps output:
|
||||
if wsrep_auth_not_set; then
|
||||
if [ -z "$WSREP_SST_OPT_AUTH" ]; then
|
||||
WSREP_SST_OPT_AUTH=$(parse_cnf 'sst' 'wsrep-sst-auth')
|
||||
fi
|
||||
|
||||
# Splitting WSREP_SST_OPT_AUTH as "user:password" pair:
|
||||
if ! wsrep_auth_not_set; then
|
||||
if [ -n "$WSREP_SST_OPT_AUTH" ]; then
|
||||
# Extract username as shortest prefix up to first ':' character:
|
||||
WSREP_SST_OPT_AUTH_USER="${WSREP_SST_OPT_AUTH%%:*}"
|
||||
if [ -z "$WSREP_SST_OPT_USER" ]; then
|
||||
@@ -1057,19 +1051,20 @@ if ! wsrep_auth_not_set; then
|
||||
fi
|
||||
fi
|
||||
|
||||
WSREP_SST_OPT_REMOTE_AUTH="${WSREP_SST_OPT_REMOTE_AUTH:-}"
|
||||
WSREP_SST_OPT_REMOTE_USER=
|
||||
WSREP_SST_OPT_REMOTE_PSWD=
|
||||
if [ -n "$WSREP_SST_OPT_REMOTE_AUTH" ]; then
|
||||
# Split auth string at the last ':'
|
||||
WSREP_SST_OPT_REMOTE_USER="${WSREP_SST_OPT_REMOTE_AUTH%%:*}"
|
||||
WSREP_SST_OPT_REMOTE_PSWD="${WSREP_SST_OPT_REMOTE_AUTH#*:}"
|
||||
fi
|
||||
|
||||
readonly WSREP_SST_OPT_USER
|
||||
readonly WSREP_SST_OPT_PSWD
|
||||
readonly WSREP_SST_OPT_AUTH
|
||||
|
||||
if [ -n "$WSREP_SST_OPT_REMOTE_AUTH" ]; then
|
||||
# Split auth string at the last ':'
|
||||
readonly WSREP_SST_OPT_REMOTE_USER="${WSREP_SST_OPT_REMOTE_AUTH%%:*}"
|
||||
readonly WSREP_SST_OPT_REMOTE_PSWD="${WSREP_SST_OPT_REMOTE_AUTH#*:}"
|
||||
else
|
||||
readonly WSREP_SST_OPT_REMOTE_USER=
|
||||
readonly WSREP_SST_OPT_REMOTE_PSWD=
|
||||
fi
|
||||
|
||||
readonly WSREP_SST_OPT_REMOTE_USER
|
||||
readonly WSREP_SST_OPT_REMOTE_PSWD
|
||||
readonly WSREP_SST_OPT_REMOTE_AUTH
|
||||
|
||||
if [ -n "$WSREP_SST_OPT_DATA" ]; then
|
||||
|
@@ -1100,15 +1100,13 @@ if [ "$WSREP_SST_OPT_ROLE" = 'donor' ]; then
|
||||
|
||||
wsrep_log_info "Using '$itmpdir' as mariadb-backup working directory"
|
||||
|
||||
usrst=0
|
||||
if [ -n "$WSREP_SST_OPT_USER" ]; then
|
||||
INNOEXTRA="$INNOEXTRA --user='$WSREP_SST_OPT_USER'"
|
||||
usrst=1
|
||||
fi
|
||||
|
||||
if [ -n "$WSREP_SST_OPT_PSWD" ]; then
|
||||
export MYSQL_PWD="$WSREP_SST_OPT_PSWD"
|
||||
elif [ $usrst -eq 1 ]; then
|
||||
elif [ -n "$WSREP_SST_OPT_USER" ]; then
|
||||
# Empty password, used for testing, debugging etc.
|
||||
unset MYSQL_PWD
|
||||
fi
|
||||
|
@@ -40,17 +40,15 @@ then
|
||||
fi
|
||||
|
||||
# Check client version
|
||||
if ! $MYSQL_CLIENT --version | grep -q -E 'Distrib 10\.[1-9]'; then
|
||||
if ! $MYSQL_CLIENT --version | grep -q -E '(Distrib 10\.[1-9])|( from 1[1-9]\.)'; then
|
||||
$MYSQL_CLIENT --version >&2
|
||||
wsrep_log_error "this operation requires MySQL client version 10.1 or newer"
|
||||
exit $EINVAL
|
||||
fi
|
||||
|
||||
AUTH=""
|
||||
usrst=0
|
||||
if [ -n "$WSREP_SST_OPT_USER" ]; then
|
||||
AUTH="-u$WSREP_SST_OPT_USER"
|
||||
usrst=1
|
||||
fi
|
||||
|
||||
# Refs https://github.com/codership/mysql-wsrep/issues/141
|
||||
@@ -64,7 +62,7 @@ fi
|
||||
# word, it is arguably more secure than passing password on the command line.
|
||||
if [ -n "$WSREP_SST_OPT_PSWD" ]; then
|
||||
export MYSQL_PWD="$WSREP_SST_OPT_PSWD"
|
||||
elif [ $usrst -eq 1 ]; then
|
||||
elif [ -n "$WSREP_SST_OPT_USER" ]; then
|
||||
# Empty password, used for testing, debugging etc.
|
||||
unset MYSQL_PWD
|
||||
fi
|
||||
|
@@ -924,12 +924,12 @@ public:
|
||||
first_error(0), only_ignore_non_existing_errors(0)
|
||||
{}
|
||||
|
||||
bool handle_condition(THD *thd,
|
||||
bool handle_condition(THD *,
|
||||
uint sql_errno,
|
||||
const char* sqlstate,
|
||||
const char*,
|
||||
Sql_condition::enum_warning_level *level,
|
||||
const char* msg,
|
||||
Sql_condition ** cond_hdl)
|
||||
const char*,
|
||||
Sql_condition **cond_hdl) override
|
||||
{
|
||||
*cond_hdl= NULL;
|
||||
if (non_existing_table_error(sql_errno) ||
|
||||
|
@@ -71,14 +71,14 @@ public:
|
||||
Stored_program_creation_ctx **ctx);
|
||||
|
||||
public:
|
||||
virtual Stored_program_creation_ctx *clone(MEM_ROOT *mem_root)
|
||||
Stored_program_creation_ctx *clone(MEM_ROOT *mem_root) override
|
||||
{
|
||||
return new (mem_root)
|
||||
Event_creation_ctx(m_client_cs, m_connection_cl, m_db_cl);
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual Object_creation_ctx *create_backup_ctx(THD *thd) const
|
||||
Object_creation_ctx *create_backup_ctx(THD *thd) const override
|
||||
{
|
||||
/*
|
||||
We can avoid usual backup/restore employed in stored programs since we
|
||||
|
@@ -117,7 +117,7 @@ public:
|
||||
virtual ~Event_queue_element();
|
||||
|
||||
virtual bool
|
||||
load_from_row(THD *thd, TABLE *table);
|
||||
load_from_row(THD *thd, TABLE *table) override;
|
||||
|
||||
bool
|
||||
compute_next_execution_time();
|
||||
@@ -155,7 +155,7 @@ public:
|
||||
init();
|
||||
|
||||
virtual bool
|
||||
load_from_row(THD *thd, TABLE *table);
|
||||
load_from_row(THD *thd, TABLE *table) override;
|
||||
|
||||
int
|
||||
get_create_event(THD *thd, String *buf);
|
||||
@@ -176,7 +176,7 @@ public:
|
||||
Event_job_data();
|
||||
|
||||
virtual bool
|
||||
load_from_row(THD *thd, TABLE *table);
|
||||
load_from_row(THD *thd, TABLE *table) override;
|
||||
|
||||
bool
|
||||
execute(THD *thd, bool drop);
|
||||
|
10
sql/field.h
10
sql/field.h
@@ -3204,7 +3204,7 @@ public:
|
||||
:Field_temporal(ptr_arg, len_arg, null_ptr_arg, null_bit_arg,
|
||||
unireg_check_arg, field_name_arg)
|
||||
{}
|
||||
bool validate_value_in_record(THD *thd, const uchar *record) const;
|
||||
bool validate_value_in_record(THD *thd, const uchar *record) const override;
|
||||
};
|
||||
|
||||
|
||||
@@ -5168,20 +5168,20 @@ public:
|
||||
m_table(NULL)
|
||||
{}
|
||||
~Field_row();
|
||||
en_fieldtype tmp_engine_column_type(bool use_packed_rows) const
|
||||
en_fieldtype tmp_engine_column_type(bool use_packed_rows) const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
return Field::tmp_engine_column_type(use_packed_rows);
|
||||
}
|
||||
enum_conv_type rpl_conv_type_from(const Conv_source &source,
|
||||
const Relay_log_info *rli,
|
||||
const Conv_param ¶m) const
|
||||
const Conv_param ¶m) const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
return CONV_TYPE_IMPOSSIBLE;
|
||||
}
|
||||
Virtual_tmp_table **virtual_tmp_table_addr() { return &m_table; }
|
||||
bool sp_prepare_and_store_item(THD *thd, Item **value);
|
||||
Virtual_tmp_table **virtual_tmp_table_addr() override { return &m_table; }
|
||||
bool sp_prepare_and_store_item(THD *thd, Item **value) override;
|
||||
};
|
||||
|
||||
|
||||
|
@@ -146,16 +146,16 @@ public:
|
||||
Gcalc_operation_transporter(Gcalc_function *fn, Gcalc_heap *heap) :
|
||||
Gcalc_shape_transporter(heap), m_fn(fn) {}
|
||||
|
||||
int single_point(double x, double y);
|
||||
int start_line();
|
||||
int complete_line();
|
||||
int start_poly();
|
||||
int complete_poly();
|
||||
int start_ring();
|
||||
int complete_ring();
|
||||
int add_point(double x, double y);
|
||||
int start_collection(int n_objects);
|
||||
int empty_shape();
|
||||
int single_point(double x, double y) override;
|
||||
int start_line() override;
|
||||
int complete_line() override;
|
||||
int start_poly() override;
|
||||
int complete_poly() override;
|
||||
int start_ring() override;
|
||||
int complete_ring() override;
|
||||
int add_point(double x, double y) override;
|
||||
int start_collection(int n_objects) override;
|
||||
int empty_shape() override;
|
||||
};
|
||||
|
||||
|
||||
|
@@ -10515,7 +10515,7 @@ public:
|
||||
m_tot_parts(tot_parts)
|
||||
{}
|
||||
|
||||
~ha_partition_inplace_ctx()
|
||||
~ha_partition_inplace_ctx() override
|
||||
{
|
||||
if (handler_ctx_array)
|
||||
{
|
||||
|
@@ -67,44 +67,44 @@ public:
|
||||
~ha_sequence();
|
||||
|
||||
/* virtual function that are re-implemented for sequence */
|
||||
int open(const char *name, int mode, uint test_if_locked);
|
||||
int open(const char *name, int mode, uint test_if_locked) override;
|
||||
int create(const char *name, TABLE *form,
|
||||
HA_CREATE_INFO *create_info);
|
||||
handler *clone(const char *name, MEM_ROOT *mem_root);
|
||||
int write_row(const uchar *buf);
|
||||
Table_flags table_flags() const;
|
||||
HA_CREATE_INFO *create_info) override;
|
||||
handler *clone(const char *name, MEM_ROOT *mem_root) override;
|
||||
int write_row(const uchar *buf) override;
|
||||
Table_flags table_flags() const override;
|
||||
/* One can't update or delete from sequence engine */
|
||||
int update_row(const uchar *old_data, const uchar *new_data)
|
||||
int update_row(const uchar *old_data, const uchar *new_data) override
|
||||
{ return HA_ERR_WRONG_COMMAND; }
|
||||
int delete_row(const uchar *buf)
|
||||
int delete_row(const uchar *buf) override
|
||||
{ return HA_ERR_WRONG_COMMAND; }
|
||||
/* One can't delete from sequence engine */
|
||||
int truncate()
|
||||
int truncate() override
|
||||
{ return HA_ERR_WRONG_COMMAND; }
|
||||
/* Can't use query cache */
|
||||
uint8 table_cache_type()
|
||||
uint8 table_cache_type() override
|
||||
{ return HA_CACHE_TBL_NOCACHE; }
|
||||
void print_error(int error, myf errflag);
|
||||
int info(uint);
|
||||
LEX_CSTRING *engine_name() { return hton_name(file->ht); }
|
||||
int external_lock(THD *thd, int lock_type);
|
||||
int extra(enum ha_extra_function operation);
|
||||
void print_error(int error, myf errflag) override;
|
||||
int info(uint) override;
|
||||
LEX_CSTRING *engine_name() override { return hton_name(file->ht); }
|
||||
int external_lock(THD *thd, int lock_type) override;
|
||||
int extra(enum ha_extra_function operation) override;
|
||||
/* For ALTER ONLINE TABLE */
|
||||
bool check_if_incompatible_data(HA_CREATE_INFO *create_info,
|
||||
uint table_changes);
|
||||
uint table_changes) override;
|
||||
void write_lock() { write_locked= 1;}
|
||||
void unlock() { write_locked= 0; }
|
||||
bool is_locked() { return write_locked; }
|
||||
|
||||
/* Functions that are directly mapped to the underlying handler */
|
||||
int rnd_init(bool scan)
|
||||
int rnd_init(bool scan) override
|
||||
{ return file->rnd_init(scan); }
|
||||
/*
|
||||
We need to have a lock here to protect engines like MyISAM from
|
||||
simultaneous read and write. For sequence's this is not critical
|
||||
as this function is used extremely seldom.
|
||||
*/
|
||||
int rnd_next(uchar *buf)
|
||||
int rnd_next(uchar *buf) override
|
||||
{
|
||||
int error;
|
||||
table->s->sequence->read_lock(table);
|
||||
@@ -112,9 +112,9 @@ public:
|
||||
table->s->sequence->read_unlock(table);
|
||||
return error;
|
||||
}
|
||||
int rnd_end()
|
||||
int rnd_end() override
|
||||
{ return file->rnd_end(); }
|
||||
int rnd_pos(uchar *buf, uchar *pos)
|
||||
int rnd_pos(uchar *buf, uchar *pos) override
|
||||
{
|
||||
int error;
|
||||
table->s->sequence->read_lock(table);
|
||||
@@ -122,37 +122,37 @@ public:
|
||||
table->s->sequence->read_unlock(table);
|
||||
return error;
|
||||
}
|
||||
void position(const uchar *record)
|
||||
void position(const uchar *record) override
|
||||
{ return file->position(record); }
|
||||
const char *table_type() const
|
||||
const char *table_type() const override
|
||||
{ return file->table_type(); }
|
||||
ulong index_flags(uint inx, uint part, bool all_parts) const
|
||||
ulong index_flags(uint inx, uint part, bool all_parts) const override
|
||||
{ return file->index_flags(inx, part, all_parts); }
|
||||
THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to,
|
||||
enum thr_lock_type lock_type)
|
||||
enum thr_lock_type lock_type) override
|
||||
{ return file->store_lock(thd, to, lock_type); }
|
||||
int close(void)
|
||||
int close(void) override
|
||||
{ return file->close(); }
|
||||
const char **bas_ext() const
|
||||
{ return file->bas_ext(); }
|
||||
int delete_table(const char*name)
|
||||
int delete_table(const char*name) override
|
||||
{ return file->delete_table(name); }
|
||||
int rename_table(const char *from, const char *to)
|
||||
int rename_table(const char *from, const char *to) override
|
||||
{ return file->rename_table(from, to); }
|
||||
void unbind_psi()
|
||||
void unbind_psi() override
|
||||
{ file->unbind_psi(); }
|
||||
void rebind_psi()
|
||||
void rebind_psi() override
|
||||
{ file->rebind_psi(); }
|
||||
|
||||
bool auto_repair(int error) const
|
||||
bool auto_repair(int error) const override
|
||||
{ return file->auto_repair(error); }
|
||||
int repair(THD* thd, HA_CHECK_OPT* check_opt)
|
||||
int repair(THD* thd, HA_CHECK_OPT* check_opt) override
|
||||
{ return file->repair(thd, check_opt); }
|
||||
bool check_and_repair(THD *thd)
|
||||
bool check_and_repair(THD *thd) override
|
||||
{ return file->check_and_repair(thd); }
|
||||
bool is_crashed() const
|
||||
bool is_crashed() const override
|
||||
{ return file->is_crashed(); }
|
||||
void column_bitmaps_signal()
|
||||
void column_bitmaps_signal() override
|
||||
{ return file->column_bitmaps_signal(); }
|
||||
|
||||
/* New methods */
|
||||
|
@@ -169,7 +169,7 @@ public:
|
||||
const char* sqlstate,
|
||||
Sql_condition::enum_warning_level *level,
|
||||
const char* msg,
|
||||
Sql_condition ** cond_hdl)
|
||||
Sql_condition ** cond_hdl) override
|
||||
{
|
||||
*cond_hdl= NULL;
|
||||
if (non_existing_table_error(sql_errno))
|
||||
|
@@ -5256,8 +5256,8 @@ public:
|
||||
: thd(thd_arg), wild(NULL), with_temps(true), tables(tables_arg) {}
|
||||
~Discovered_table_list() = default;
|
||||
|
||||
bool add_table(const char *tname, size_t tlen);
|
||||
bool add_file(const char *fname);
|
||||
bool add_table(const char *tname, size_t tlen) override;
|
||||
bool add_file(const char *fname) override;
|
||||
|
||||
void sort();
|
||||
void remove_duplicates(); // assumes that the list is sorted
|
||||
|
@@ -8069,7 +8069,7 @@ class Dependency_marker: public Field_enumerator
|
||||
public:
|
||||
THD *thd;
|
||||
st_select_lex *current_select;
|
||||
virtual void visit_field(Item_field *item)
|
||||
void visit_field(Item_field *item) override
|
||||
{
|
||||
// Find which select the field is in. This is achieved by walking up
|
||||
// the select tree and looking for the table of interest.
|
||||
|
119
sql/item.h
119
sql/item.h
@@ -458,16 +458,16 @@ public:
|
||||
class Sp_rcontext_handler_local: public Sp_rcontext_handler
|
||||
{
|
||||
public:
|
||||
const LEX_CSTRING *get_name_prefix() const;
|
||||
sp_rcontext *get_rcontext(sp_rcontext *ctx) const;
|
||||
const LEX_CSTRING *get_name_prefix() const override;
|
||||
sp_rcontext *get_rcontext(sp_rcontext *ctx) const override;
|
||||
};
|
||||
|
||||
|
||||
class Sp_rcontext_handler_package_body: public Sp_rcontext_handler
|
||||
{
|
||||
public:
|
||||
const LEX_CSTRING *get_name_prefix() const;
|
||||
sp_rcontext *get_rcontext(sp_rcontext *ctx) const;
|
||||
const LEX_CSTRING *get_name_prefix() const override;
|
||||
sp_rcontext *get_rcontext(sp_rcontext *ctx) const override;
|
||||
};
|
||||
|
||||
|
||||
@@ -3059,8 +3059,8 @@ class Item_basic_constant :public Item_basic_value
|
||||
public:
|
||||
Item_basic_constant(THD *thd): Item_basic_value(thd) {};
|
||||
Item_basic_constant(): Item_basic_value() {};
|
||||
bool check_vcol_func_processor(void *arg) { return false; }
|
||||
const Item_const *get_item_const() const { return this; }
|
||||
bool check_vcol_func_processor(void *) override { return false; }
|
||||
const Item_const *get_item_const() const override { return this; }
|
||||
virtual Item_basic_constant *make_string_literal_concat(THD *thd,
|
||||
const LEX_CSTRING *)
|
||||
{
|
||||
@@ -4794,7 +4794,7 @@ public:
|
||||
const LEX_CSTRING &str, CHARSET_INFO *tocs):
|
||||
Item_string(thd, name_arg, str, tocs)
|
||||
{ }
|
||||
virtual bool is_cs_specified() const
|
||||
bool is_cs_specified() const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -4873,7 +4873,7 @@ public:
|
||||
{
|
||||
max_length= length;
|
||||
}
|
||||
bool check_vcol_func_processor(void *arg)
|
||||
bool check_vcol_func_processor(void *arg) override
|
||||
{
|
||||
return mark_unsupported_function("safe_string", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
@@ -4898,7 +4898,7 @@ public:
|
||||
:Item_partition_func_safe_string(thd, LEX_CSTRING({header, strlen(header)}),
|
||||
length * cs->mbmaxlen, cs)
|
||||
{ }
|
||||
void make_send_field(THD *thd, Send_field *field);
|
||||
void make_send_field(THD *thd, Send_field *field) override;
|
||||
};
|
||||
|
||||
|
||||
@@ -5314,7 +5314,7 @@ public:
|
||||
{
|
||||
base_flags&= ~item_base_t::MAYBE_NULL;
|
||||
}
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override
|
||||
{
|
||||
cached_time.copy_to_mysql_time(ltime);
|
||||
return (null_value= false);
|
||||
@@ -5336,7 +5336,7 @@ public:
|
||||
{
|
||||
base_flags&= ~item_base_t::MAYBE_NULL;
|
||||
}
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override
|
||||
{
|
||||
cached_time.copy_to_mysql_time(ltime);
|
||||
return (null_value= false);
|
||||
@@ -7295,7 +7295,7 @@ class Item_cache_year: public Item_cache_int
|
||||
public:
|
||||
Item_cache_year(THD *thd, const Type_handler *handler)
|
||||
:Item_cache_int(thd, handler) { }
|
||||
bool get_date(THD *thd, MYSQL_TIME *to, date_mode_t mode)
|
||||
bool get_date(THD *thd, MYSQL_TIME *to, date_mode_t mode) override
|
||||
{
|
||||
return type_handler_year.Item_get_date_with_warn(thd, this, to, mode);
|
||||
}
|
||||
@@ -7802,9 +7802,9 @@ class Item_iterator_ref_list: public Item_iterator
|
||||
public:
|
||||
Item_iterator_ref_list(List_iterator<Item*> &arg_list):
|
||||
list(arg_list) {}
|
||||
void open() { list.rewind(); }
|
||||
Item *next() { return *(list++); }
|
||||
void close() {}
|
||||
void open() override { list.rewind(); }
|
||||
Item *next() override { return *(list++); }
|
||||
void close() override {}
|
||||
};
|
||||
|
||||
|
||||
@@ -7818,9 +7818,9 @@ class Item_iterator_list: public Item_iterator
|
||||
public:
|
||||
Item_iterator_list(List_iterator<Item> &arg_list):
|
||||
list(arg_list) {}
|
||||
void open() { list.rewind(); }
|
||||
Item *next() { return (list++); }
|
||||
void close() {}
|
||||
void open() override { list.rewind(); }
|
||||
Item *next() override { return (list++); }
|
||||
void close() override {}
|
||||
};
|
||||
|
||||
|
||||
@@ -7834,14 +7834,14 @@ class Item_iterator_row: public Item_iterator
|
||||
uint current;
|
||||
public:
|
||||
Item_iterator_row(Item *base) : base_item(base), current(0) {}
|
||||
void open() { current= 0; }
|
||||
Item *next()
|
||||
void open() override { current= 0; }
|
||||
Item *next() override
|
||||
{
|
||||
if (current >= base_item->cols())
|
||||
return NULL;
|
||||
return base_item->element_index(current++);
|
||||
}
|
||||
void close() {}
|
||||
void close() override {}
|
||||
};
|
||||
|
||||
|
||||
@@ -7887,84 +7887,85 @@ public:
|
||||
|
||||
void change_item(THD *thd, Item *);
|
||||
|
||||
bool fix_fields(THD *thd, Item **it);
|
||||
bool fix_fields(THD *thd, Item **it) override;
|
||||
|
||||
void print(String *str, enum_query_type query_type);
|
||||
void print(String *str, enum_query_type query_type) override;
|
||||
|
||||
Item *safe_charset_converter(THD *thd, CHARSET_INFO *tocs);
|
||||
Item *get_tmp_table_item(THD *thd)
|
||||
Item *safe_charset_converter(THD *thd, CHARSET_INFO *tocs) override;
|
||||
Item *get_tmp_table_item(THD *thd) override
|
||||
{ return m_item->get_tmp_table_item(thd); }
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_direct_ref_to_item>(thd, this); }
|
||||
COND *build_equal_items(THD *thd, COND_EQUAL *inherited,
|
||||
bool link_item_fields,
|
||||
COND_EQUAL **cond_equal_ref)
|
||||
COND_EQUAL **cond_equal_ref) override
|
||||
{
|
||||
return m_item->build_equal_items(thd, inherited, link_item_fields,
|
||||
cond_equal_ref);
|
||||
}
|
||||
const char *full_name() const { return m_item->full_name(); }
|
||||
void make_send_field(THD *thd, Send_field *field)
|
||||
LEX_CSTRING full_name_cstring() const override
|
||||
{ return m_item->full_name_cstring(); }
|
||||
void make_send_field(THD *thd, Send_field *field) override
|
||||
{ m_item->make_send_field(thd, field); }
|
||||
bool eq(const Item *item, bool binary_cmp) const
|
||||
bool eq(const Item *item, bool binary_cmp) const override
|
||||
{
|
||||
const Item *it= item->real_item();
|
||||
return m_item->eq(it, binary_cmp);
|
||||
}
|
||||
void fix_after_pullout(st_select_lex *new_parent, Item **refptr, bool merge)
|
||||
void fix_after_pullout(st_select_lex *new_parent, Item **refptr, bool merge) override
|
||||
{ m_item->fix_after_pullout(new_parent, &m_item, merge); }
|
||||
void save_val(Field *to)
|
||||
void save_val(Field *to) override
|
||||
{ return m_item->save_val(to); }
|
||||
void save_result(Field *to)
|
||||
void save_result(Field *to) override
|
||||
{ return m_item->save_result(to); }
|
||||
int save_in_field(Field *to, bool no_conversions)
|
||||
int save_in_field(Field *to, bool no_conversions) override
|
||||
{ return m_item->save_in_field(to, no_conversions); }
|
||||
const Type_handler *type_handler() const { return m_item->type_handler(); }
|
||||
table_map used_tables() const { return m_item->used_tables(); }
|
||||
void update_used_tables()
|
||||
const Type_handler *type_handler() const override { return m_item->type_handler(); }
|
||||
table_map used_tables() const override { return m_item->used_tables(); }
|
||||
void update_used_tables() override
|
||||
{ m_item->update_used_tables(); }
|
||||
bool const_item() const { return m_item->const_item(); }
|
||||
table_map not_null_tables() const { return m_item->not_null_tables(); }
|
||||
bool walk(Item_processor processor, bool walk_subquery, void *arg)
|
||||
bool const_item() const override { return m_item->const_item(); }
|
||||
table_map not_null_tables() const override { return m_item->not_null_tables(); }
|
||||
bool walk(Item_processor processor, bool walk_subquery, void *arg) override
|
||||
{
|
||||
return m_item->walk(processor, walk_subquery, arg) ||
|
||||
(this->*processor)(arg);
|
||||
}
|
||||
bool enumerate_field_refs_processor(void *arg)
|
||||
bool enumerate_field_refs_processor(void *arg) override
|
||||
{ return m_item->enumerate_field_refs_processor(arg); }
|
||||
Item_field *field_for_view_update()
|
||||
Item_field *field_for_view_update() override
|
||||
{ return m_item->field_for_view_update(); }
|
||||
|
||||
/* Row emulation: forwarding of ROW-related calls to orig_item */
|
||||
uint cols() const
|
||||
uint cols() const override
|
||||
{ return m_item->cols(); }
|
||||
Item* element_index(uint i)
|
||||
Item* element_index(uint i) override
|
||||
{ return this; }
|
||||
Item** addr(uint i)
|
||||
Item** addr(uint i) override
|
||||
{ return &m_item; }
|
||||
bool check_cols(uint c)
|
||||
bool check_cols(uint c) override
|
||||
{ return Item::check_cols(c); }
|
||||
bool null_inside()
|
||||
bool null_inside() override
|
||||
{ return m_item->null_inside(); }
|
||||
void bring_value()
|
||||
void bring_value() override
|
||||
{}
|
||||
|
||||
Item_equal *get_item_equal() { return m_item->get_item_equal(); }
|
||||
void set_item_equal(Item_equal *item_eq) { m_item->set_item_equal(item_eq); }
|
||||
Item_equal *find_item_equal(COND_EQUAL *cond_equal)
|
||||
Item_equal *get_item_equal() override { return m_item->get_item_equal(); }
|
||||
void set_item_equal(Item_equal *item_eq) override { m_item->set_item_equal(item_eq); }
|
||||
Item_equal *find_item_equal(COND_EQUAL *cond_equal) override
|
||||
{ return m_item->find_item_equal(cond_equal); }
|
||||
Item *propagate_equal_fields(THD *thd, const Context &ctx, COND_EQUAL *cond)
|
||||
Item *propagate_equal_fields(THD *thd, const Context &ctx, COND_EQUAL *cond) override
|
||||
{ return m_item->propagate_equal_fields(thd, ctx, cond); }
|
||||
Item *replace_equal_field(THD *thd, uchar *arg)
|
||||
Item *replace_equal_field(THD *thd, uchar *arg) override
|
||||
{ return m_item->replace_equal_field(thd, arg); }
|
||||
|
||||
bool excl_dep_on_table(table_map tab_map)
|
||||
bool excl_dep_on_table(table_map tab_map) override
|
||||
{ return m_item->excl_dep_on_table(tab_map); }
|
||||
bool excl_dep_on_grouping_fields(st_select_lex *sel)
|
||||
bool excl_dep_on_grouping_fields(st_select_lex *sel) override
|
||||
{ return m_item->excl_dep_on_grouping_fields(sel); }
|
||||
bool is_expensive() { return m_item->is_expensive(); }
|
||||
bool is_expensive() override { return m_item->is_expensive(); }
|
||||
void set_item(Item *item) { m_item= item; }
|
||||
Item *build_clone(THD *thd)
|
||||
Item *build_clone(THD *thd) override
|
||||
{
|
||||
Item *clone_item= m_item->build_clone(thd);
|
||||
if (clone_item)
|
||||
@@ -7979,7 +7980,7 @@ public:
|
||||
}
|
||||
|
||||
void split_sum_func(THD *thd, Ref_ptr_array ref_pointer_array,
|
||||
List<Item> &fields, uint flags)
|
||||
List<Item> &fields, uint flags) override
|
||||
{
|
||||
m_item->split_sum_func(thd, ref_pointer_array, fields, flags);
|
||||
}
|
||||
@@ -7987,7 +7988,7 @@ public:
|
||||
This processor states that this is safe for virtual columns
|
||||
(because this Item transparency)
|
||||
*/
|
||||
bool check_vcol_func_processor(void *arg) { return FALSE;}
|
||||
bool check_vcol_func_processor(void *arg) override { return FALSE;}
|
||||
};
|
||||
|
||||
inline bool TABLE::mark_column_with_deps(Field *field)
|
||||
|
@@ -4919,7 +4919,7 @@ class Func_handler_bit_or_int_to_ulonglong:
|
||||
public Item_handled_func::Handler_ulonglong
|
||||
{
|
||||
public:
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const override
|
||||
{
|
||||
DBUG_ASSERT(item->fixed());
|
||||
Longlong_null a= item->arguments()[0]->to_longlong_null();
|
||||
@@ -4932,7 +4932,7 @@ class Func_handler_bit_or_dec_to_ulonglong:
|
||||
public Item_handled_func::Handler_ulonglong
|
||||
{
|
||||
public:
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const override
|
||||
{
|
||||
DBUG_ASSERT(item->fixed());
|
||||
VDec a(item->arguments()[0]);
|
||||
@@ -4954,7 +4954,7 @@ class Func_handler_bit_and_int_to_ulonglong:
|
||||
public Item_handled_func::Handler_ulonglong
|
||||
{
|
||||
public:
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const override
|
||||
{
|
||||
DBUG_ASSERT(item->fixed());
|
||||
Longlong_null a= item->arguments()[0]->to_longlong_null();
|
||||
@@ -4967,7 +4967,7 @@ class Func_handler_bit_and_dec_to_ulonglong:
|
||||
public Item_handled_func::Handler_ulonglong
|
||||
{
|
||||
public:
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const override
|
||||
{
|
||||
DBUG_ASSERT(item->fixed());
|
||||
VDec a(item->arguments()[0]);
|
||||
|
@@ -453,10 +453,10 @@ public:
|
||||
Item_bool_func2(THD *thd, Item *a, Item *b):
|
||||
Item_bool_func(thd, a, b) { }
|
||||
|
||||
bool is_null() { return MY_TEST(args[0]->is_null() || args[1]->is_null()); }
|
||||
bool is_null() override { return MY_TEST(args[0]->is_null() || args[1]->is_null()); }
|
||||
COND *remove_eq_conds(THD *thd, Item::cond_result *cond_value,
|
||||
bool top_level);
|
||||
bool count_sargable_conds(void *arg);
|
||||
bool top_level) override;
|
||||
bool count_sargable_conds(void *arg) override;
|
||||
/*
|
||||
Specifies which result type the function uses to compare its arguments.
|
||||
This method is used in equal field propagation.
|
||||
@@ -471,7 +471,7 @@ public:
|
||||
*/
|
||||
return &type_handler_varchar;
|
||||
}
|
||||
SEL_TREE *get_mm_tree(RANGE_OPT_PARAM *param, Item **cond_ptr)
|
||||
SEL_TREE *get_mm_tree(RANGE_OPT_PARAM *param, Item **cond_ptr) override
|
||||
{
|
||||
DBUG_ENTER("Item_bool_func2::get_mm_tree");
|
||||
DBUG_ASSERT(arg_count == 2);
|
||||
@@ -504,7 +504,7 @@ class Item_bool_func2_with_rev :public Item_bool_func2
|
||||
{
|
||||
protected:
|
||||
SEL_TREE *get_func_mm_tree(RANGE_OPT_PARAM *param,
|
||||
Field *field, Item *value)
|
||||
Field *field, Item *value) override
|
||||
{
|
||||
DBUG_ENTER("Item_bool_func2_with_rev::get_func_mm_tree");
|
||||
Item_func::Functype func_type=
|
||||
@@ -515,7 +515,7 @@ public:
|
||||
Item_bool_func2_with_rev(THD *thd, Item *a, Item *b):
|
||||
Item_bool_func2(thd, a, b) { }
|
||||
virtual enum Functype rev_functype() const= 0;
|
||||
SEL_TREE *get_mm_tree(RANGE_OPT_PARAM *param, Item **cond_ptr)
|
||||
SEL_TREE *get_mm_tree(RANGE_OPT_PARAM *param, Item **cond_ptr) override
|
||||
{
|
||||
DBUG_ENTER("Item_bool_func2_with_rev::get_mm_tree");
|
||||
DBUG_ASSERT(arg_count == 2);
|
||||
@@ -1266,32 +1266,32 @@ public:
|
||||
:Item_func_case_abbreviation2(thd, a, b, c)
|
||||
{ }
|
||||
|
||||
bool date_op(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
|
||||
bool date_op(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override
|
||||
{
|
||||
Datetime_truncation_not_needed dt(thd, find_item(), fuzzydate);
|
||||
return (null_value= dt.copy_to_mysql_time(ltime, mysql_timestamp_type()));
|
||||
}
|
||||
bool time_op(THD *thd, MYSQL_TIME *ltime)
|
||||
bool time_op(THD *thd, MYSQL_TIME *ltime) override
|
||||
{
|
||||
return (null_value= Time(find_item()).copy_to_mysql_time(ltime));
|
||||
}
|
||||
longlong int_op()
|
||||
longlong int_op() override
|
||||
{
|
||||
return val_int_from_item(find_item());
|
||||
}
|
||||
double real_op()
|
||||
double real_op() override
|
||||
{
|
||||
return val_real_from_item(find_item());
|
||||
}
|
||||
my_decimal *decimal_op(my_decimal *decimal_value)
|
||||
my_decimal *decimal_op(my_decimal *decimal_value) override
|
||||
{
|
||||
return val_decimal_from_item(find_item(), decimal_value);
|
||||
}
|
||||
String *str_op(String *str)
|
||||
String *str_op(String *str) override
|
||||
{
|
||||
return val_str_from_item(find_item(), str);
|
||||
}
|
||||
bool native_op(THD *thd, Native *to)
|
||||
bool native_op(THD *thd, Native *to) override
|
||||
{
|
||||
return val_native_with_conversion_from_item(thd, find_item(), to,
|
||||
type_handler());
|
||||
@@ -1608,8 +1608,8 @@ public:
|
||||
|
||||
in_temporal(THD *thd, uint elements)
|
||||
:in_longlong(thd, elements) {};
|
||||
Item *create_item(THD *thd);
|
||||
void value_to_item(uint pos, Item *item)
|
||||
Item *create_item(THD *thd) override;
|
||||
void value_to_item(uint pos, Item *item) override
|
||||
{
|
||||
packed_longlong *val= reinterpret_cast<packed_longlong*>(base)+pos;
|
||||
Item_datetime *dt= static_cast<Item_datetime*>(item);
|
||||
@@ -1746,7 +1746,7 @@ public:
|
||||
cmp_item_sort_string(CHARSET_INFO *cs):
|
||||
cmp_item_string(cs),
|
||||
value(value_buff, sizeof(value_buff), cs) {}
|
||||
void store_value(Item *item)
|
||||
void store_value(Item *item) override
|
||||
{
|
||||
value_res= item->val_str(&value);
|
||||
m_null_value= item->null_value;
|
||||
@@ -1758,13 +1758,13 @@ public:
|
||||
value_res= &value;
|
||||
}
|
||||
}
|
||||
int cmp_not_null(const Value *val)
|
||||
int cmp_not_null(const Value *val) override
|
||||
{
|
||||
DBUG_ASSERT(!val->is_null());
|
||||
DBUG_ASSERT(val->is_string());
|
||||
return sortcmp(value_res, &val->m_string, cmp_charset) != 0;
|
||||
}
|
||||
int cmp(Item *arg)
|
||||
int cmp(Item *arg) override
|
||||
{
|
||||
char buff[STRING_BUFFER_USUAL_SIZE];
|
||||
String tmp(buff, sizeof(buff), cmp_charset), *res= arg->val_str(&tmp);
|
||||
@@ -1777,12 +1777,12 @@ public:
|
||||
else
|
||||
return TRUE;
|
||||
}
|
||||
int compare(cmp_item *ci)
|
||||
int compare(cmp_item *ci) override
|
||||
{
|
||||
cmp_item_string *l_cmp= (cmp_item_string *) ci;
|
||||
return sortcmp(value_res, l_cmp->value_res, cmp_charset);
|
||||
}
|
||||
cmp_item *make_same(THD *thd);
|
||||
cmp_item *make_same(THD *thd) override;
|
||||
void set_charset(CHARSET_INFO *cs)
|
||||
{
|
||||
cmp_charset= cs;
|
||||
@@ -1795,28 +1795,28 @@ class cmp_item_int : public cmp_item_scalar
|
||||
longlong value;
|
||||
public:
|
||||
cmp_item_int() = default; /* Remove gcc warning */
|
||||
void store_value(Item *item)
|
||||
void store_value(Item *item) override
|
||||
{
|
||||
value= item->val_int();
|
||||
m_null_value= item->null_value;
|
||||
}
|
||||
int cmp_not_null(const Value *val)
|
||||
int cmp_not_null(const Value *val) override
|
||||
{
|
||||
DBUG_ASSERT(!val->is_null());
|
||||
DBUG_ASSERT(val->is_longlong());
|
||||
return value != val->value.m_longlong;
|
||||
}
|
||||
int cmp(Item *arg)
|
||||
int cmp(Item *arg) override
|
||||
{
|
||||
const bool rc= value != arg->val_int();
|
||||
return (m_null_value || arg->null_value) ? UNKNOWN : rc;
|
||||
}
|
||||
int compare(cmp_item *ci)
|
||||
int compare(cmp_item *ci) override
|
||||
{
|
||||
cmp_item_int *l_cmp= (cmp_item_int *)ci;
|
||||
return (value < l_cmp->value) ? -1 : ((value == l_cmp->value) ? 0 : 1);
|
||||
}
|
||||
cmp_item *make_same(THD *thd);
|
||||
cmp_item *make_same(THD *thd) override;
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -1828,7 +1828,7 @@ protected:
|
||||
longlong value;
|
||||
public:
|
||||
cmp_item_temporal() = default;
|
||||
int compare(cmp_item *ci);
|
||||
int compare(cmp_item *ci) override;
|
||||
};
|
||||
|
||||
|
||||
@@ -1838,14 +1838,14 @@ public:
|
||||
cmp_item_datetime()
|
||||
:cmp_item_temporal()
|
||||
{ }
|
||||
void store_value(Item *item)
|
||||
void store_value(Item *item) override
|
||||
{
|
||||
value= item->val_datetime_packed(current_thd);
|
||||
m_null_value= item->null_value;
|
||||
}
|
||||
int cmp_not_null(const Value *val);
|
||||
int cmp(Item *arg);
|
||||
cmp_item *make_same(THD *thd);
|
||||
int cmp_not_null(const Value *val) override;
|
||||
int cmp(Item *arg) override;
|
||||
cmp_item *make_same(THD *thd) override;
|
||||
};
|
||||
|
||||
|
||||
@@ -1855,14 +1855,14 @@ public:
|
||||
cmp_item_time()
|
||||
:cmp_item_temporal()
|
||||
{ }
|
||||
void store_value(Item *item)
|
||||
void store_value(Item *item) override
|
||||
{
|
||||
value= item->val_time_packed(current_thd);
|
||||
m_null_value= item->null_value;
|
||||
}
|
||||
int cmp_not_null(const Value *val);
|
||||
int cmp(Item *arg);
|
||||
cmp_item *make_same(THD *thd);
|
||||
int cmp_not_null(const Value *val) override;
|
||||
int cmp(Item *arg) override;
|
||||
cmp_item *make_same(THD *thd) override;
|
||||
};
|
||||
|
||||
|
||||
@@ -1871,11 +1871,11 @@ class cmp_item_timestamp: public cmp_item_scalar
|
||||
Timestamp_or_zero_datetime_native m_native;
|
||||
public:
|
||||
cmp_item_timestamp() :cmp_item_scalar() { }
|
||||
void store_value(Item *item);
|
||||
int cmp_not_null(const Value *val);
|
||||
int cmp(Item *arg);
|
||||
int compare(cmp_item *ci);
|
||||
cmp_item *make_same(THD *thd);
|
||||
void store_value(Item *item) override;
|
||||
int cmp_not_null(const Value *val) override;
|
||||
int cmp(Item *arg) override;
|
||||
int compare(cmp_item *ci) override;
|
||||
cmp_item *make_same(THD *thd) override;
|
||||
};
|
||||
|
||||
|
||||
@@ -1884,28 +1884,28 @@ class cmp_item_real : public cmp_item_scalar
|
||||
double value;
|
||||
public:
|
||||
cmp_item_real() = default; /* Remove gcc warning */
|
||||
void store_value(Item *item)
|
||||
void store_value(Item *item) override
|
||||
{
|
||||
value= item->val_real();
|
||||
m_null_value= item->null_value;
|
||||
}
|
||||
int cmp_not_null(const Value *val)
|
||||
int cmp_not_null(const Value *val) override
|
||||
{
|
||||
DBUG_ASSERT(!val->is_null());
|
||||
DBUG_ASSERT(val->is_double());
|
||||
return value != val->value.m_double;
|
||||
}
|
||||
int cmp(Item *arg)
|
||||
int cmp(Item *arg) override
|
||||
{
|
||||
const bool rc= value != arg->val_real();
|
||||
return (m_null_value || arg->null_value) ? UNKNOWN : rc;
|
||||
}
|
||||
int compare(cmp_item *ci)
|
||||
int compare(cmp_item *ci) override
|
||||
{
|
||||
cmp_item_real *l_cmp= (cmp_item_real *) ci;
|
||||
return (value < l_cmp->value)? -1 : ((value == l_cmp->value) ? 0 : 1);
|
||||
}
|
||||
cmp_item *make_same(THD *thd);
|
||||
cmp_item *make_same(THD *thd) override;
|
||||
};
|
||||
|
||||
|
||||
@@ -1914,11 +1914,11 @@ class cmp_item_decimal : public cmp_item_scalar
|
||||
my_decimal value;
|
||||
public:
|
||||
cmp_item_decimal() = default; /* Remove gcc warning */
|
||||
void store_value(Item *item);
|
||||
int cmp(Item *arg);
|
||||
int cmp_not_null(const Value *val);
|
||||
int compare(cmp_item *c);
|
||||
cmp_item *make_same(THD *thd);
|
||||
void store_value(Item *item) override;
|
||||
int cmp(Item *arg) override;
|
||||
int cmp_not_null(const Value *val) override;
|
||||
int compare(cmp_item *c) override;
|
||||
cmp_item *make_same(THD *thd) override;
|
||||
};
|
||||
|
||||
|
||||
@@ -1934,28 +1934,28 @@ class cmp_item_sort_string_in_static :public cmp_item_string
|
||||
public:
|
||||
cmp_item_sort_string_in_static(CHARSET_INFO *cs):
|
||||
cmp_item_string(cs) {}
|
||||
void store_value(Item *item)
|
||||
void store_value(Item *item) override
|
||||
{
|
||||
value_res= item->val_str(&value);
|
||||
m_null_value= item->null_value;
|
||||
}
|
||||
int cmp_not_null(const Value *val)
|
||||
int cmp_not_null(const Value *val) override
|
||||
{
|
||||
DBUG_ASSERT(false);
|
||||
return TRUE;
|
||||
}
|
||||
int cmp(Item *item)
|
||||
int cmp(Item *item) override
|
||||
{
|
||||
// Should never be called
|
||||
DBUG_ASSERT(false);
|
||||
return TRUE;
|
||||
}
|
||||
int compare(cmp_item *ci)
|
||||
int compare(cmp_item *ci) override
|
||||
{
|
||||
cmp_item_string *l_cmp= (cmp_item_string *) ci;
|
||||
return sortcmp(value_res, l_cmp->value_res, cmp_charset);
|
||||
}
|
||||
cmp_item *make_same(THD *thd)
|
||||
cmp_item *make_same(THD *) override
|
||||
{
|
||||
return new cmp_item_sort_string_in_static(cmp_charset);
|
||||
}
|
||||
@@ -2682,7 +2682,7 @@ public:
|
||||
bool prepare_comparators(THD *, const LEX_CSTRING &funcname,
|
||||
const Item_args *args, uint level);
|
||||
int cmp(Item *arg) override;
|
||||
int cmp_not_null(const Value *val) override
|
||||
int cmp_not_null(const Value *) override
|
||||
{
|
||||
DBUG_ASSERT(false);
|
||||
return TRUE;
|
||||
@@ -3681,11 +3681,11 @@ public:
|
||||
Item_func_cursor_bool_attr(THD *thd, const LEX_CSTRING *name, uint offset)
|
||||
:Item_bool_func(thd), Cursor_ref(name, offset)
|
||||
{ }
|
||||
bool check_vcol_func_processor(void *arg)
|
||||
bool check_vcol_func_processor(void *arg) override
|
||||
{
|
||||
return mark_unsupported_function(func_name(), arg, VCOL_SESSION_FUNC);
|
||||
}
|
||||
void print(String *str, enum_query_type query_type)
|
||||
void print(String *str, enum_query_type query_type) override
|
||||
{
|
||||
Cursor_ref::print_func(str, func_name_cstring());
|
||||
}
|
||||
@@ -3780,11 +3780,11 @@ class Eq_creator :public Comp_creator
|
||||
public:
|
||||
Eq_creator() = default; /* Remove gcc warning */
|
||||
virtual ~Eq_creator() = default; /* Remove gcc warning */
|
||||
Item_bool_rowready_func2* create(THD *thd, Item *a, Item *b) const;
|
||||
Item_bool_rowready_func2* create_swap(THD *thd, Item *a, Item *b) const;
|
||||
const char* symbol(bool invert) const { return invert? "<>" : "="; }
|
||||
bool eqne_op() const { return 1; }
|
||||
bool l_op() const { return 0; }
|
||||
Item_bool_rowready_func2* create(THD *thd, Item *a, Item *b) const override;
|
||||
Item_bool_rowready_func2* create_swap(THD *thd, Item *a, Item *b) const override;
|
||||
const char* symbol(bool invert) const override { return invert? "<>" : "="; }
|
||||
bool eqne_op() const override { return 1; }
|
||||
bool l_op() const override { return 0; }
|
||||
};
|
||||
|
||||
class Ne_creator :public Comp_creator
|
||||
@@ -3792,11 +3792,11 @@ class Ne_creator :public Comp_creator
|
||||
public:
|
||||
Ne_creator() = default; /* Remove gcc warning */
|
||||
virtual ~Ne_creator() = default; /* Remove gcc warning */
|
||||
Item_bool_rowready_func2* create(THD *thd, Item *a, Item *b) const;
|
||||
Item_bool_rowready_func2* create_swap(THD *thd, Item *a, Item *b) const;
|
||||
const char* symbol(bool invert) const { return invert? "=" : "<>"; }
|
||||
bool eqne_op() const { return 1; }
|
||||
bool l_op() const { return 0; }
|
||||
Item_bool_rowready_func2* create(THD *thd, Item *a, Item *b) const override;
|
||||
Item_bool_rowready_func2* create_swap(THD *thd, Item *a, Item *b) const override;
|
||||
const char* symbol(bool invert) const override { return invert? "=" : "<>"; }
|
||||
bool eqne_op() const override { return 1; }
|
||||
bool l_op() const override { return 0; }
|
||||
};
|
||||
|
||||
class Gt_creator :public Comp_creator
|
||||
@@ -3804,11 +3804,11 @@ class Gt_creator :public Comp_creator
|
||||
public:
|
||||
Gt_creator() = default; /* Remove gcc warning */
|
||||
virtual ~Gt_creator() = default; /* Remove gcc warning */
|
||||
Item_bool_rowready_func2* create(THD *thd, Item *a, Item *b) const;
|
||||
Item_bool_rowready_func2* create_swap(THD *thd, Item *a, Item *b) const;
|
||||
const char* symbol(bool invert) const { return invert? "<=" : ">"; }
|
||||
bool eqne_op() const { return 0; }
|
||||
bool l_op() const { return 0; }
|
||||
Item_bool_rowready_func2* create(THD *thd, Item *a, Item *b) const override;
|
||||
Item_bool_rowready_func2* create_swap(THD *thd, Item *a, Item *b) const override;
|
||||
const char* symbol(bool invert) const override { return invert? "<=" : ">"; }
|
||||
bool eqne_op() const override { return 0; }
|
||||
bool l_op() const override { return 0; }
|
||||
};
|
||||
|
||||
class Lt_creator :public Comp_creator
|
||||
@@ -3816,11 +3816,11 @@ class Lt_creator :public Comp_creator
|
||||
public:
|
||||
Lt_creator() = default; /* Remove gcc warning */
|
||||
virtual ~Lt_creator() = default; /* Remove gcc warning */
|
||||
Item_bool_rowready_func2* create(THD *thd, Item *a, Item *b) const;
|
||||
Item_bool_rowready_func2* create_swap(THD *thd, Item *a, Item *b) const;
|
||||
const char* symbol(bool invert) const { return invert? ">=" : "<"; }
|
||||
bool eqne_op() const { return 0; }
|
||||
bool l_op() const { return 1; }
|
||||
Item_bool_rowready_func2* create(THD *thd, Item *a, Item *b) const override;
|
||||
Item_bool_rowready_func2* create_swap(THD *thd, Item *a, Item *b) const override;
|
||||
const char* symbol(bool invert) const override { return invert? ">=" : "<"; }
|
||||
bool eqne_op() const override { return 0; }
|
||||
bool l_op() const override { return 1; }
|
||||
};
|
||||
|
||||
class Ge_creator :public Comp_creator
|
||||
@@ -3828,11 +3828,11 @@ class Ge_creator :public Comp_creator
|
||||
public:
|
||||
Ge_creator() = default; /* Remove gcc warning */
|
||||
virtual ~Ge_creator() = default; /* Remove gcc warning */
|
||||
Item_bool_rowready_func2* create(THD *thd, Item *a, Item *b) const;
|
||||
Item_bool_rowready_func2* create_swap(THD *thd, Item *a, Item *b) const;
|
||||
const char* symbol(bool invert) const { return invert? "<" : ">="; }
|
||||
bool eqne_op() const { return 0; }
|
||||
bool l_op() const { return 0; }
|
||||
Item_bool_rowready_func2* create(THD *thd, Item *a, Item *b) const override;
|
||||
Item_bool_rowready_func2* create_swap(THD *thd, Item *a, Item *b) const override;
|
||||
const char* symbol(bool invert) const override { return invert? "<" : ">="; }
|
||||
bool eqne_op() const override { return 0; }
|
||||
bool l_op() const override { return 0; }
|
||||
};
|
||||
|
||||
class Le_creator :public Comp_creator
|
||||
@@ -3840,11 +3840,11 @@ class Le_creator :public Comp_creator
|
||||
public:
|
||||
Le_creator() = default; /* Remove gcc warning */
|
||||
virtual ~Le_creator() = default; /* Remove gcc warning */
|
||||
Item_bool_rowready_func2* create(THD *thd, Item *a, Item *b) const;
|
||||
Item_bool_rowready_func2* create_swap(THD *thd, Item *a, Item *b) const;
|
||||
const char* symbol(bool invert) const { return invert? ">" : "<="; }
|
||||
bool eqne_op() const { return 0; }
|
||||
bool l_op() const { return 1; }
|
||||
Item_bool_rowready_func2* create(THD *thd, Item *a, Item *b) const override;
|
||||
Item_bool_rowready_func2* create_swap(THD *thd, Item *a, Item *b) const override;
|
||||
const char* symbol(bool invert) const override { return invert? ">" : "<="; }
|
||||
bool eqne_op() const override { return 0; }
|
||||
bool l_op() const override { return 1; }
|
||||
};
|
||||
|
||||
/*
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -2152,7 +2152,7 @@ class Func_handler_shift_left_int_to_ulonglong:
|
||||
public Item_handled_func::Handler_ulonglong
|
||||
{
|
||||
public:
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const override
|
||||
{
|
||||
DBUG_ASSERT(item->fixed());
|
||||
return item->arguments()[0]->to_longlong_null() <<
|
||||
@@ -2165,7 +2165,7 @@ class Func_handler_shift_left_decimal_to_ulonglong:
|
||||
public Item_handled_func::Handler_ulonglong
|
||||
{
|
||||
public:
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const override
|
||||
{
|
||||
DBUG_ASSERT(item->fixed());
|
||||
return VDec(item->arguments()[0]).to_xlonglong_null() <<
|
||||
@@ -2186,7 +2186,7 @@ class Func_handler_shift_right_int_to_ulonglong:
|
||||
public Item_handled_func::Handler_ulonglong
|
||||
{
|
||||
public:
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const override
|
||||
{
|
||||
DBUG_ASSERT(item->fixed());
|
||||
return item->arguments()[0]->to_longlong_null() >>
|
||||
@@ -2199,7 +2199,7 @@ class Func_handler_shift_right_decimal_to_ulonglong:
|
||||
public Item_handled_func::Handler_ulonglong
|
||||
{
|
||||
public:
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const override
|
||||
{
|
||||
DBUG_ASSERT(item->fixed());
|
||||
return VDec(item->arguments()[0]).to_xlonglong_null() >>
|
||||
@@ -2220,7 +2220,7 @@ class Func_handler_bit_neg_int_to_ulonglong:
|
||||
public Item_handled_func::Handler_ulonglong
|
||||
{
|
||||
public:
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const override
|
||||
{
|
||||
DBUG_ASSERT(item->fixed());
|
||||
return ~ item->arguments()[0]->to_longlong_null();
|
||||
@@ -2232,7 +2232,7 @@ class Func_handler_bit_neg_decimal_to_ulonglong:
|
||||
public Item_handled_func::Handler_ulonglong
|
||||
{
|
||||
public:
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const override
|
||||
{
|
||||
DBUG_ASSERT(item->fixed());
|
||||
return ~ VDec(item->arguments()[0]).to_xlonglong_null();
|
||||
@@ -3432,7 +3432,7 @@ class Func_handler_bit_count_int_to_slong:
|
||||
public Item_handled_func::Handler_slong2
|
||||
{
|
||||
public:
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const override
|
||||
{
|
||||
DBUG_ASSERT(item->fixed());
|
||||
return item->arguments()[0]->to_longlong_null().bit_count();
|
||||
@@ -3444,7 +3444,7 @@ class Func_handler_bit_count_decimal_to_slong:
|
||||
public Item_handled_func::Handler_slong2
|
||||
{
|
||||
public:
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const override
|
||||
{
|
||||
DBUG_ASSERT(item->fixed());
|
||||
return VDec(item->arguments()[0]).to_xlonglong_null().bit_count();
|
||||
@@ -4178,7 +4178,7 @@ public:
|
||||
const char * /* sqlstate */,
|
||||
Sql_condition::enum_warning_level* /* level */,
|
||||
const char *message,
|
||||
Sql_condition ** /* cond_hdl */);
|
||||
Sql_condition ** /* cond_hdl */) override;
|
||||
};
|
||||
|
||||
bool
|
||||
@@ -6470,7 +6470,7 @@ class Func_handler_bit_xor_int_to_ulonglong:
|
||||
public Item_handled_func::Handler_ulonglong
|
||||
{
|
||||
public:
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const override
|
||||
{
|
||||
DBUG_ASSERT(item->fixed());
|
||||
return item->arguments()[0]->to_longlong_null() ^
|
||||
@@ -6483,7 +6483,7 @@ class Func_handler_bit_xor_dec_to_ulonglong:
|
||||
public Item_handled_func::Handler_ulonglong
|
||||
{
|
||||
public:
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const override
|
||||
{
|
||||
DBUG_ASSERT(item->fixed());
|
||||
return VDec(item->arguments()[0]).to_xlonglong_null() ^
|
||||
|
136
sql/item_func.h
136
sql/item_func.h
@@ -459,7 +459,7 @@ public:
|
||||
}
|
||||
void convert_const_compared_to_int_field(THD *thd);
|
||||
Item_func *get_item_func() override { return this; }
|
||||
bool is_simplified_cond_processor(void *arg) override
|
||||
bool is_simplified_cond_processor(void *) override
|
||||
{ return const_item() && !val_int(); }
|
||||
};
|
||||
|
||||
@@ -567,30 +567,30 @@ public:
|
||||
class Handler_str: public Handler
|
||||
{
|
||||
public:
|
||||
String *val_str_ascii(Item_handled_func *item, String *str) const
|
||||
String *val_str_ascii(Item_handled_func *item, String *str) const override
|
||||
{
|
||||
return item->Item::val_str_ascii(str);
|
||||
}
|
||||
double val_real(Item_handled_func *item) const
|
||||
double val_real(Item_handled_func *item) const override
|
||||
{
|
||||
DBUG_ASSERT(item->fixed());
|
||||
StringBuffer<64> tmp;
|
||||
String *res= item->val_str(&tmp);
|
||||
return res ? item->double_from_string_with_check(res) : 0.0;
|
||||
}
|
||||
longlong val_int(Item_handled_func *item) const
|
||||
longlong val_int(Item_handled_func *item) const override
|
||||
{
|
||||
DBUG_ASSERT(item->fixed());
|
||||
StringBuffer<22> tmp;
|
||||
String *res= item->val_str(&tmp);
|
||||
return res ? item->longlong_from_string_with_check(res) : 0;
|
||||
}
|
||||
my_decimal *val_decimal(Item_handled_func *item, my_decimal *to) const
|
||||
my_decimal *val_decimal(Item_handled_func *item, my_decimal *to) const override
|
||||
{
|
||||
return item->val_decimal_from_string(to);
|
||||
}
|
||||
bool get_date(THD *thd, Item_handled_func *item, MYSQL_TIME *to,
|
||||
date_mode_t fuzzydate) const
|
||||
date_mode_t fuzzydate) const override
|
||||
{
|
||||
return item->get_date_from_string(thd, to, fuzzydate);
|
||||
}
|
||||
@@ -603,7 +603,7 @@ public:
|
||||
class Handler_temporal: public Handler
|
||||
{
|
||||
public:
|
||||
String *val_str(Item_handled_func *item, String *to) const
|
||||
String *val_str(Item_handled_func *item, String *to) const override
|
||||
{
|
||||
StringBuffer<MAX_FIELD_WIDTH> ascii_buf;
|
||||
return item->val_str_from_val_str_ascii(to, &ascii_buf);
|
||||
@@ -618,28 +618,28 @@ public:
|
||||
class Handler_temporal_string: public Handler_temporal
|
||||
{
|
||||
public:
|
||||
const Type_handler *return_type_handler(const Item_handled_func *) const
|
||||
const Type_handler *return_type_handler(const Item_handled_func *) const override
|
||||
{
|
||||
return &type_handler_string;
|
||||
}
|
||||
const Type_handler *
|
||||
type_handler_for_create_select(const Item_handled_func *item) const
|
||||
type_handler_for_create_select(const Item_handled_func *item) const override
|
||||
{
|
||||
return return_type_handler(item)->type_handler_for_tmp_table(item);
|
||||
}
|
||||
double val_real(Item_handled_func *item) const
|
||||
double val_real(Item_handled_func *item) const override
|
||||
{
|
||||
return Temporal_hybrid(item).to_double();
|
||||
}
|
||||
longlong val_int(Item_handled_func *item) const
|
||||
longlong val_int(Item_handled_func *item) const override
|
||||
{
|
||||
return Temporal_hybrid(item).to_longlong();
|
||||
}
|
||||
my_decimal *val_decimal(Item_handled_func *item, my_decimal *to) const
|
||||
my_decimal *val_decimal(Item_handled_func *item, my_decimal *to) const override
|
||||
{
|
||||
return Temporal_hybrid(item).to_decimal(to);
|
||||
}
|
||||
String *val_str_ascii(Item_handled_func *item, String *to) const
|
||||
String *val_str_ascii(Item_handled_func *item, String *to) const override
|
||||
{
|
||||
return Temporal_hybrid(item).to_string(to, item->decimals);
|
||||
}
|
||||
@@ -649,28 +649,28 @@ public:
|
||||
class Handler_date: public Handler_temporal
|
||||
{
|
||||
public:
|
||||
const Type_handler *return_type_handler(const Item_handled_func *) const
|
||||
const Type_handler *return_type_handler(const Item_handled_func *) const override
|
||||
{
|
||||
return &type_handler_newdate;
|
||||
}
|
||||
bool fix_length_and_dec(Item_handled_func *item) const
|
||||
bool fix_length_and_dec(Item_handled_func *item) const override
|
||||
{
|
||||
item->fix_attributes_date();
|
||||
return false;
|
||||
}
|
||||
double val_real(Item_handled_func *item) const
|
||||
double val_real(Item_handled_func *item) const override
|
||||
{
|
||||
return Date(item).to_double();
|
||||
}
|
||||
longlong val_int(Item_handled_func *item) const
|
||||
longlong val_int(Item_handled_func *item) const override
|
||||
{
|
||||
return Date(item).to_longlong();
|
||||
}
|
||||
my_decimal *val_decimal(Item_handled_func *item, my_decimal *to) const
|
||||
my_decimal *val_decimal(Item_handled_func *item, my_decimal *to) const override
|
||||
{
|
||||
return Date(item).to_decimal(to);
|
||||
}
|
||||
String *val_str_ascii(Item_handled_func *item, String *to) const
|
||||
String *val_str_ascii(Item_handled_func *item, String *to) const override
|
||||
{
|
||||
return Date(item).to_string(to);
|
||||
}
|
||||
@@ -680,27 +680,27 @@ public:
|
||||
class Handler_time: public Handler_temporal
|
||||
{
|
||||
public:
|
||||
const Type_handler *return_type_handler(const Item_handled_func *) const
|
||||
const Type_handler *return_type_handler(const Item_handled_func *) const override
|
||||
{
|
||||
return &type_handler_time2;
|
||||
}
|
||||
double val_real(Item_handled_func *item) const
|
||||
double val_real(Item_handled_func *item) const override
|
||||
{
|
||||
return Time(item).to_double();
|
||||
}
|
||||
longlong val_int(Item_handled_func *item) const
|
||||
longlong val_int(Item_handled_func *item) const override
|
||||
{
|
||||
return Time(item).to_longlong();
|
||||
}
|
||||
my_decimal *val_decimal(Item_handled_func *item, my_decimal *to) const
|
||||
my_decimal *val_decimal(Item_handled_func *item, my_decimal *to) const override
|
||||
{
|
||||
return Time(item).to_decimal(to);
|
||||
}
|
||||
String *val_str_ascii(Item_handled_func *item, String *to) const
|
||||
String *val_str_ascii(Item_handled_func *item, String *to) const override
|
||||
{
|
||||
return Time(item).to_string(to, item->decimals);
|
||||
}
|
||||
bool val_native(THD *thd, Item_handled_func *item, Native *to) const
|
||||
bool val_native(THD *thd, Item_handled_func *item, Native *to) const override
|
||||
{
|
||||
return Time(thd, item).to_native(to, item->decimals);
|
||||
}
|
||||
@@ -710,23 +710,23 @@ public:
|
||||
class Handler_datetime: public Handler_temporal
|
||||
{
|
||||
public:
|
||||
const Type_handler *return_type_handler(const Item_handled_func *) const
|
||||
const Type_handler *return_type_handler(const Item_handled_func *) const override
|
||||
{
|
||||
return &type_handler_datetime2;
|
||||
}
|
||||
double val_real(Item_handled_func *item) const
|
||||
double val_real(Item_handled_func *item) const override
|
||||
{
|
||||
return Datetime(item).to_double();
|
||||
}
|
||||
longlong val_int(Item_handled_func *item) const
|
||||
longlong val_int(Item_handled_func *item) const override
|
||||
{
|
||||
return Datetime(item).to_longlong();
|
||||
}
|
||||
my_decimal *val_decimal(Item_handled_func *item, my_decimal *to) const
|
||||
my_decimal *val_decimal(Item_handled_func *item, my_decimal *to) const override
|
||||
{
|
||||
return Datetime(item).to_decimal(to);
|
||||
}
|
||||
String *val_str_ascii(Item_handled_func *item, String *to) const
|
||||
String *val_str_ascii(Item_handled_func *item, String *to) const override
|
||||
{
|
||||
return Datetime(item).to_string(to, item->decimals);
|
||||
}
|
||||
@@ -736,7 +736,7 @@ public:
|
||||
class Handler_int: public Handler
|
||||
{
|
||||
public:
|
||||
String *val_str(Item_handled_func *item, String *to) const
|
||||
String *val_str(Item_handled_func *item, String *to) const override
|
||||
{
|
||||
longlong nr= val_int(item);
|
||||
if (item->null_value)
|
||||
@@ -744,25 +744,25 @@ public:
|
||||
to->set_int(nr, item->unsigned_flag, item->collation.collation);
|
||||
return to;
|
||||
}
|
||||
String *val_str_ascii(Item_handled_func *item, String *to) const
|
||||
String *val_str_ascii(Item_handled_func *item, String *to) const override
|
||||
{
|
||||
return item->Item::val_str_ascii(to);
|
||||
}
|
||||
double val_real(Item_handled_func *item) const
|
||||
double val_real(Item_handled_func *item) const override
|
||||
{
|
||||
return item->unsigned_flag ? (double) ((ulonglong) val_int(item)) :
|
||||
(double) val_int(item);
|
||||
}
|
||||
my_decimal *val_decimal(Item_handled_func *item, my_decimal *to) const
|
||||
my_decimal *val_decimal(Item_handled_func *item, my_decimal *to) const override
|
||||
{
|
||||
return item->val_decimal_from_int(to);
|
||||
}
|
||||
bool get_date(THD *thd, Item_handled_func *item,
|
||||
MYSQL_TIME *to, date_mode_t fuzzydate) const
|
||||
MYSQL_TIME *to, date_mode_t fuzzydate) const override
|
||||
{
|
||||
return item->get_date_from_int(thd, to, fuzzydate);
|
||||
}
|
||||
longlong val_int(Item_handled_func *item) const
|
||||
longlong val_int(Item_handled_func *item) const override
|
||||
{
|
||||
Longlong_null tmp= to_longlong_null(item);
|
||||
item->null_value= tmp.is_null();
|
||||
@@ -774,11 +774,11 @@ public:
|
||||
class Handler_slong: public Handler_int
|
||||
{
|
||||
public:
|
||||
const Type_handler *return_type_handler(const Item_handled_func *item) const
|
||||
const Type_handler *return_type_handler(const Item_handled_func *item) const override
|
||||
{
|
||||
return &type_handler_slong;
|
||||
}
|
||||
bool fix_length_and_dec(Item_handled_func *item) const
|
||||
bool fix_length_and_dec(Item_handled_func *item) const override
|
||||
{
|
||||
item->unsigned_flag= false;
|
||||
item->collation= DTCollation_numeric();
|
||||
@@ -790,7 +790,7 @@ public:
|
||||
class Handler_slong2: public Handler_slong
|
||||
{
|
||||
public:
|
||||
bool fix_length_and_dec(Item_handled_func *func) const
|
||||
bool fix_length_and_dec(Item_handled_func *func) const override
|
||||
{
|
||||
bool rc= Handler_slong::fix_length_and_dec(func);
|
||||
func->max_length= 2;
|
||||
@@ -801,11 +801,11 @@ public:
|
||||
class Handler_ulonglong: public Handler_int
|
||||
{
|
||||
public:
|
||||
const Type_handler *return_type_handler(const Item_handled_func *item) const
|
||||
const Type_handler *return_type_handler(const Item_handled_func *item) const override
|
||||
{
|
||||
return &type_handler_ulonglong;
|
||||
}
|
||||
bool fix_length_and_dec(Item_handled_func *item) const
|
||||
bool fix_length_and_dec(Item_handled_func *item) const override
|
||||
{
|
||||
item->unsigned_flag= true;
|
||||
item->collation= DTCollation_numeric();
|
||||
@@ -1102,7 +1102,7 @@ public:
|
||||
Item_func_case_expression(THD *thd, List<Item> &list):
|
||||
Item_func_hybrid_field_type(thd, list)
|
||||
{ }
|
||||
bool find_not_null_fields(table_map allowed) { return false; }
|
||||
bool find_not_null_fields(table_map allowed) override { return false; }
|
||||
};
|
||||
|
||||
|
||||
@@ -1131,18 +1131,18 @@ public:
|
||||
Item_func_numhybrid(THD *thd, List<Item> &list):
|
||||
Item_func_hybrid_field_type(thd, list)
|
||||
{ }
|
||||
String *str_op(String *str) { DBUG_ASSERT(0); return 0; }
|
||||
bool date_op(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
|
||||
String *str_op(String *str) override { DBUG_ASSERT(0); return 0; }
|
||||
bool date_op(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
return true;
|
||||
}
|
||||
bool time_op(THD *thd, MYSQL_TIME *ltime)
|
||||
bool time_op(THD *thd, MYSQL_TIME *ltime) override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
return true;
|
||||
}
|
||||
bool native_op(THD *thd, Native *to)
|
||||
bool native_op(THD *thd, Native *to) override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
return true;
|
||||
@@ -1156,8 +1156,8 @@ class Item_func_num1: public Item_func_numhybrid
|
||||
public:
|
||||
Item_func_num1(THD *thd, Item *a): Item_func_numhybrid(thd, a) {}
|
||||
Item_func_num1(THD *thd, Item *a, Item *b): Item_func_numhybrid(thd, a, b) {}
|
||||
bool check_partition_func_processor(void *int_arg) { return FALSE; }
|
||||
bool check_vcol_func_processor(void *arg) { return FALSE; }
|
||||
bool check_partition_func_processor(void *int_arg) override { return FALSE; }
|
||||
bool check_vcol_func_processor(void *arg) override { return FALSE; }
|
||||
};
|
||||
|
||||
|
||||
@@ -1305,10 +1305,14 @@ public:
|
||||
Item_func_hash_mariadb_100403(THD *thd, List<Item> &item)
|
||||
:Item_func_hash(thd, item)
|
||||
{}
|
||||
longlong val_int();
|
||||
Item *get_copy(THD *thd)
|
||||
longlong val_int() override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_hash_mariadb_100403>(thd, this); }
|
||||
const char *func_name() const { return "<hash_mariadb_100403>"; }
|
||||
LEX_CSTRING func_name_cstring() const override
|
||||
{
|
||||
static LEX_CSTRING name= {STRING_WITH_LEN("<hash_mariadb_100403>") };
|
||||
return name;
|
||||
}
|
||||
};
|
||||
|
||||
class Item_longlong_func: public Item_int_func
|
||||
@@ -1557,8 +1561,8 @@ public:
|
||||
decimals= (uint8) dec;
|
||||
max_length= (uint32) len;
|
||||
}
|
||||
bool need_parentheses_in_default() { return true; }
|
||||
void print(String *str, enum_query_type query_type);
|
||||
bool need_parentheses_in_default() override { return true; }
|
||||
void print(String *str, enum_query_type query_type) override;
|
||||
void fix_length_and_dec_generic()
|
||||
{
|
||||
set_maybe_null();
|
||||
@@ -1627,9 +1631,9 @@ class Item_func_additive_op :public Item_num_op
|
||||
{
|
||||
public:
|
||||
Item_func_additive_op(THD *thd, Item *a, Item *b): Item_num_op(thd, a, b) {}
|
||||
void result_precision();
|
||||
bool check_partition_func_processor(void *int_arg) {return FALSE;}
|
||||
bool check_vcol_func_processor(void *arg) { return FALSE;}
|
||||
void result_precision() override;
|
||||
bool check_partition_func_processor(void *int_arg) override {return FALSE;}
|
||||
bool check_vcol_func_processor(void *arg) override { return FALSE;}
|
||||
};
|
||||
|
||||
|
||||
@@ -3262,7 +3266,7 @@ class Item_func_get_lock final :public Item_func_lock
|
||||
String value;
|
||||
public:
|
||||
Item_func_get_lock(THD *thd, Item *a, Item *b) :Item_func_lock(thd, a, b) {}
|
||||
longlong val_int() final;
|
||||
longlong val_int() override final;
|
||||
LEX_CSTRING func_name_cstring() const override final
|
||||
{
|
||||
static LEX_CSTRING name= {STRING_WITH_LEN("get_lock") };
|
||||
@@ -3274,7 +3278,7 @@ class Item_func_get_lock final :public Item_func_lock
|
||||
set_maybe_null();
|
||||
return FALSE;
|
||||
}
|
||||
Item *get_copy(THD *thd) final
|
||||
Item *get_copy(THD *thd) override final
|
||||
{ return get_item_copy<Item_func_get_lock>(thd, this); }
|
||||
};
|
||||
|
||||
@@ -3284,13 +3288,13 @@ class Item_func_release_all_locks final :public Item_func_lock
|
||||
public:
|
||||
Item_func_release_all_locks(THD *thd): Item_func_lock(thd)
|
||||
{ unsigned_flag= 1; }
|
||||
longlong val_int() final;
|
||||
longlong val_int() override final;
|
||||
LEX_CSTRING func_name_cstring() const override
|
||||
{
|
||||
static LEX_CSTRING name= {STRING_WITH_LEN("release_all_locks") };
|
||||
return name;
|
||||
}
|
||||
Item *get_copy(THD *thd) final
|
||||
Item *get_copy(THD *thd) override final
|
||||
{ return get_item_copy<Item_func_release_all_locks>(thd, this); }
|
||||
};
|
||||
|
||||
@@ -3302,7 +3306,7 @@ class Item_func_release_lock final :public Item_func_lock
|
||||
String value;
|
||||
public:
|
||||
Item_func_release_lock(THD *thd, Item *a): Item_func_lock(thd, a) {}
|
||||
longlong val_int() final;
|
||||
longlong val_int() override final;
|
||||
LEX_CSTRING func_name_cstring() const override
|
||||
{
|
||||
static LEX_CSTRING name= {STRING_WITH_LEN("release_lock") };
|
||||
@@ -3314,7 +3318,7 @@ public:
|
||||
set_maybe_null();
|
||||
return FALSE;
|
||||
}
|
||||
Item *get_copy(THD *thd) final
|
||||
Item *get_copy(THD *thd) override final
|
||||
{ return get_item_copy<Item_func_release_lock>(thd, this); }
|
||||
};
|
||||
|
||||
@@ -3411,16 +3415,16 @@ public:
|
||||
:Item_hybrid_func(thd, item),
|
||||
m_var_entry(item->m_var_entry), name(item->name) { }
|
||||
Field *create_tmp_field_ex(MEM_ROOT *root, TABLE *table, Tmp_field_src *src,
|
||||
const Tmp_field_param *param)
|
||||
const Tmp_field_param *param) override
|
||||
{
|
||||
DBUG_ASSERT(fixed());
|
||||
return create_tmp_field_ex_from_handler(root, table, src, param,
|
||||
type_handler());
|
||||
}
|
||||
Field *create_field_for_create_select(MEM_ROOT *root, TABLE *table)
|
||||
Field *create_field_for_create_select(MEM_ROOT *root, TABLE *table) override
|
||||
{ return create_table_field_from_handler(root, table); }
|
||||
bool check_vcol_func_processor(void *arg);
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
|
||||
bool check_vcol_func_processor(void *arg) override;
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override
|
||||
{
|
||||
return type_handler()->Item_get_date_with_warn(thd, this, ltime, fuzzydate);
|
||||
}
|
||||
|
@@ -2787,7 +2787,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_area() = default;
|
||||
virtual ~Create_func_area() = default;
|
||||
~Create_func_area() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -2803,7 +2803,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_as_wkb() = default;
|
||||
virtual ~Create_func_as_wkb() = default;
|
||||
~Create_func_as_wkb() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -2819,7 +2819,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_as_wkt() = default;
|
||||
virtual ~Create_func_as_wkt() = default;
|
||||
~Create_func_as_wkt() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -2836,7 +2836,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_centroid() = default;
|
||||
virtual ~Create_func_centroid() = default;
|
||||
~Create_func_centroid() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -2852,7 +2852,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_convexhull() = default;
|
||||
virtual ~Create_func_convexhull() = default;
|
||||
~Create_func_convexhull() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -2868,7 +2868,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_pointonsurface() = default;
|
||||
virtual ~Create_func_pointonsurface() = default;
|
||||
~Create_func_pointonsurface() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -2885,7 +2885,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_mbr_contains() = default;
|
||||
virtual ~Create_func_mbr_contains() = default;
|
||||
~Create_func_mbr_contains() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -2901,7 +2901,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_contains() = default;
|
||||
virtual ~Create_func_contains() = default;
|
||||
~Create_func_contains() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -2917,7 +2917,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_crosses() = default;
|
||||
virtual ~Create_func_crosses() = default;
|
||||
~Create_func_crosses() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -2933,7 +2933,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_dimension() = default;
|
||||
virtual ~Create_func_dimension() = default;
|
||||
~Create_func_dimension() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -2950,7 +2950,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_mbr_disjoint() = default;
|
||||
virtual ~Create_func_mbr_disjoint() = default;
|
||||
~Create_func_mbr_disjoint() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -2966,7 +2966,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_disjoint() = default;
|
||||
virtual ~Create_func_disjoint() = default;
|
||||
~Create_func_disjoint() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -2982,7 +2982,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_distance() = default;
|
||||
virtual ~Create_func_distance() = default;
|
||||
~Create_func_distance() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -2995,7 +2995,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_distance_sphere() = default;
|
||||
virtual ~Create_func_distance_sphere() = default;
|
||||
~Create_func_distance_sphere() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -3030,7 +3030,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_endpoint() = default;
|
||||
virtual ~Create_func_endpoint() = default;
|
||||
~Create_func_endpoint() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -3046,7 +3046,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_envelope() = default;
|
||||
virtual ~Create_func_envelope() = default;
|
||||
~Create_func_envelope() override = default;
|
||||
};
|
||||
|
||||
class Create_func_boundary : public Create_func_arg1
|
||||
@@ -3061,7 +3061,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_boundary() = default;
|
||||
virtual ~Create_func_boundary() = default;
|
||||
~Create_func_boundary() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -3078,7 +3078,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_mbr_equals() = default;
|
||||
virtual ~Create_func_mbr_equals() = default;
|
||||
~Create_func_mbr_equals() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -3095,7 +3095,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_equals() = default;
|
||||
virtual ~Create_func_equals() = default;
|
||||
~Create_func_equals() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -3112,7 +3112,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_exteriorring() = default;
|
||||
virtual ~Create_func_exteriorring() = default;
|
||||
~Create_func_exteriorring() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -3127,7 +3127,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_geometry_from_text() = default;
|
||||
virtual ~Create_func_geometry_from_text() = default;
|
||||
~Create_func_geometry_from_text() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -3178,7 +3178,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_geometry_from_wkb() = default;
|
||||
virtual ~Create_func_geometry_from_wkb() = default;
|
||||
~Create_func_geometry_from_wkb() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -3228,7 +3228,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_geometry_from_json() = default;
|
||||
virtual ~Create_func_geometry_from_json() = default;
|
||||
~Create_func_geometry_from_json() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -3288,7 +3288,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_as_geojson() = default;
|
||||
virtual ~Create_func_as_geojson() = default;
|
||||
~Create_func_as_geojson() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -3348,7 +3348,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_geometry_type() = default;
|
||||
virtual ~Create_func_geometry_type() = default;
|
||||
~Create_func_geometry_type() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -3365,7 +3365,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_geometryn() = default;
|
||||
virtual ~Create_func_geometryn() = default;
|
||||
~Create_func_geometryn() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -3382,7 +3382,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_gis_debug() = default;
|
||||
virtual ~Create_func_gis_debug() = default;
|
||||
~Create_func_gis_debug() override = default;
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -3399,7 +3399,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_glength() = default;
|
||||
virtual ~Create_func_glength() = default;
|
||||
~Create_func_glength() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -3416,7 +3416,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_interiorringn() = default;
|
||||
virtual ~Create_func_interiorringn() = default;
|
||||
~Create_func_interiorringn() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -3432,7 +3432,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_relate() = default;
|
||||
virtual ~Create_func_relate() = default;
|
||||
~Create_func_relate() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -3449,7 +3449,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_mbr_intersects() = default;
|
||||
virtual ~Create_func_mbr_intersects() = default;
|
||||
~Create_func_mbr_intersects() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -3466,7 +3466,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_intersects() = default;
|
||||
virtual ~Create_func_intersects() = default;
|
||||
~Create_func_intersects() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -3483,7 +3483,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_intersection() = default;
|
||||
virtual ~Create_func_intersection() = default;
|
||||
~Create_func_intersection() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -3500,7 +3500,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_difference() = default;
|
||||
virtual ~Create_func_difference() = default;
|
||||
~Create_func_difference() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -3517,7 +3517,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_union() = default;
|
||||
virtual ~Create_func_union() = default;
|
||||
~Create_func_union() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -3534,7 +3534,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_symdifference() = default;
|
||||
virtual ~Create_func_symdifference() = default;
|
||||
~Create_func_symdifference() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -3550,7 +3550,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_buffer() = default;
|
||||
virtual ~Create_func_buffer() = default;
|
||||
~Create_func_buffer() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -3566,7 +3566,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_isclosed() = default;
|
||||
virtual ~Create_func_isclosed() = default;
|
||||
~Create_func_isclosed() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -3582,7 +3582,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_isring() = default;
|
||||
virtual ~Create_func_isring() = default;
|
||||
~Create_func_isring() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -3598,7 +3598,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_isempty() = default;
|
||||
virtual ~Create_func_isempty() = default;
|
||||
~Create_func_isempty() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -3614,7 +3614,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_issimple() = default;
|
||||
virtual ~Create_func_issimple() = default;
|
||||
~Create_func_issimple() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -3631,7 +3631,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_numgeometries() = default;
|
||||
virtual ~Create_func_numgeometries() = default;
|
||||
~Create_func_numgeometries() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -3647,7 +3647,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_numinteriorring() = default;
|
||||
virtual ~Create_func_numinteriorring() = default;
|
||||
~Create_func_numinteriorring() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -3663,7 +3663,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_numpoints() = default;
|
||||
virtual ~Create_func_numpoints() = default;
|
||||
~Create_func_numpoints() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -3680,7 +3680,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_mbr_overlaps() = default;
|
||||
virtual ~Create_func_mbr_overlaps() = default;
|
||||
~Create_func_mbr_overlaps() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -3697,7 +3697,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_overlaps() = default;
|
||||
virtual ~Create_func_overlaps() = default;
|
||||
~Create_func_overlaps() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -3716,7 +3716,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_pointn() = default;
|
||||
virtual ~Create_func_pointn() = default;
|
||||
~Create_func_pointn() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -3734,7 +3734,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_srid() = default;
|
||||
virtual ~Create_func_srid() = default;
|
||||
~Create_func_srid() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -3751,7 +3751,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_startpoint() = default;
|
||||
virtual ~Create_func_startpoint() = default;
|
||||
~Create_func_startpoint() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -3769,7 +3769,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_touches() = default;
|
||||
virtual ~Create_func_touches() = default;
|
||||
~Create_func_touches() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -3786,7 +3786,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_mbr_within() = default;
|
||||
virtual ~Create_func_mbr_within() = default;
|
||||
~Create_func_mbr_within() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -3803,7 +3803,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_within() = default;
|
||||
virtual ~Create_func_within() = default;
|
||||
~Create_func_within() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -3819,7 +3819,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_x() = default;
|
||||
virtual ~Create_func_x() = default;
|
||||
~Create_func_x() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -3835,7 +3835,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_y() = default;
|
||||
virtual ~Create_func_y() = default;
|
||||
~Create_func_y() override = default;
|
||||
};
|
||||
|
||||
|
||||
|
@@ -454,16 +454,16 @@ class Item_func_boundary: public Item_geometry_func_args_geometry
|
||||
Transporter(Gcalc_result_receiver *receiver) :
|
||||
Gcalc_shape_transporter(NULL), m_receiver(receiver)
|
||||
{}
|
||||
int single_point(double x, double y);
|
||||
int start_line();
|
||||
int complete_line();
|
||||
int start_poly();
|
||||
int complete_poly();
|
||||
int start_ring();
|
||||
int complete_ring();
|
||||
int add_point(double x, double y);
|
||||
int single_point(double x, double y) override;
|
||||
int start_line() override;
|
||||
int complete_line() override;
|
||||
int start_poly() override;
|
||||
int complete_poly() override;
|
||||
int start_ring() override;
|
||||
int complete_ring() override;
|
||||
int add_point(double x, double y) override;
|
||||
|
||||
int start_collection(int n_objects);
|
||||
int start_collection(int n_objects) override;
|
||||
};
|
||||
Gcalc_result_receiver res_receiver;
|
||||
public:
|
||||
@@ -909,16 +909,16 @@ protected:
|
||||
Gcalc_function::op_difference),
|
||||
skip_line(FALSE)
|
||||
{}
|
||||
int single_point(double x, double y);
|
||||
int start_line();
|
||||
int complete_line();
|
||||
int start_poly();
|
||||
int complete_poly();
|
||||
int start_ring();
|
||||
int complete_ring();
|
||||
int add_point(double x, double y);
|
||||
int single_point(double x, double y) override;
|
||||
int start_line() override;
|
||||
int complete_line() override;
|
||||
int start_poly() override;
|
||||
int complete_poly() override;
|
||||
int start_ring() override;
|
||||
int complete_ring() override;
|
||||
int add_point(double x, double y) override;
|
||||
|
||||
int start_collection(int n_objects);
|
||||
int start_collection(int n_objects) override;
|
||||
};
|
||||
Gcalc_heap collector;
|
||||
Gcalc_function func;
|
||||
|
@@ -295,7 +295,7 @@ public:
|
||||
Item_json_func(thd, list), paths(NULL), tmp_paths(0), n_paths(0) {}
|
||||
virtual ~Item_json_str_multipath();
|
||||
|
||||
bool fix_fields(THD *thd, Item **ref);
|
||||
bool fix_fields(THD *thd, Item **ref) override;
|
||||
virtual uint get_n_paths() const = 0;
|
||||
};
|
||||
|
||||
|
@@ -109,7 +109,7 @@ public:
|
||||
:Item_str_ascii_func(thd, a) { }
|
||||
Item_str_ascii_checksum_func(THD *thd, Item *a, Item *b)
|
||||
:Item_str_ascii_func(thd, a, b) { }
|
||||
bool eq(const Item *item, bool binary_cmp) const
|
||||
bool eq(const Item *item, bool binary_cmp) const override
|
||||
{
|
||||
// Always use binary argument comparison: MD5('x') != MD5('X')
|
||||
return Item_func::eq(item, true);
|
||||
@@ -129,7 +129,7 @@ public:
|
||||
:Item_str_func(thd, a) { }
|
||||
Item_str_binary_checksum_func(THD *thd, Item *a, Item *b)
|
||||
:Item_str_func(thd, a, b) { }
|
||||
bool eq(const Item *item, bool binary_cmp) const
|
||||
bool eq(const Item *item, bool binary_cmp) const override
|
||||
{
|
||||
/*
|
||||
Always use binary argument comparison:
|
||||
@@ -238,7 +238,7 @@ protected:
|
||||
public:
|
||||
Item_aes_crypt(THD *thd, Item *a, Item *b)
|
||||
:Item_str_binary_checksum_func(thd, a, b) {}
|
||||
String *val_str(String *);
|
||||
String *val_str(String *) override;
|
||||
};
|
||||
|
||||
class Item_func_aes_encrypt :public Item_aes_crypt
|
||||
@@ -536,14 +536,14 @@ public:
|
||||
Item_func_regexp_replace_oracle(THD *thd, Item *a, Item *b, Item *c)
|
||||
:Item_func_regexp_replace(thd, a, b, c)
|
||||
{}
|
||||
const Schema *schema() const { return &oracle_schema_ref; }
|
||||
bool fix_length_and_dec(THD *thd)
|
||||
const Schema *schema() const override { return &oracle_schema_ref; }
|
||||
bool fix_length_and_dec(THD *thd) override
|
||||
{
|
||||
bool rc= Item_func_regexp_replace::fix_length_and_dec(thd);
|
||||
set_maybe_null(); // Empty result is converted to NULL
|
||||
return rc;
|
||||
}
|
||||
String *val_str(String *str)
|
||||
String *val_str(String *str) override
|
||||
{
|
||||
return val_str_internal(str, true);
|
||||
}
|
||||
@@ -1101,19 +1101,19 @@ class Item_func_sysconst :public Item_str_func
|
||||
public:
|
||||
Item_func_sysconst(THD *thd): Item_str_func(thd)
|
||||
{ collation.set(system_charset_info,DERIVATION_SYSCONST); }
|
||||
Item *safe_charset_converter(THD *thd, CHARSET_INFO *tocs);
|
||||
Item *safe_charset_converter(THD *thd, CHARSET_INFO *tocs) override;
|
||||
/*
|
||||
Used to create correct Item name in new converted item in
|
||||
safe_charset_converter, return string representation of this function
|
||||
call
|
||||
*/
|
||||
virtual const char *fully_qualified_func_name() const = 0;
|
||||
bool check_vcol_func_processor(void *arg)
|
||||
bool check_vcol_func_processor(void *arg) override
|
||||
{
|
||||
return mark_unsupported_function(fully_qualified_func_name(), arg,
|
||||
VCOL_SESSION_FUNC);
|
||||
}
|
||||
bool const_item() const;
|
||||
bool const_item() const override;
|
||||
};
|
||||
|
||||
|
||||
|
@@ -472,7 +472,7 @@ class Field_fixer: public Field_enumerator
|
||||
public:
|
||||
table_map used_tables; /* Collect used_tables here */
|
||||
st_select_lex *new_parent; /* Select we're in */
|
||||
virtual void visit_field(Item_field *item)
|
||||
void visit_field(Item_field *item) override
|
||||
{
|
||||
//for (TABLE_LIST *tbl= new_parent->leaf_tables; tbl; tbl= tbl->next_local)
|
||||
//{
|
||||
|
@@ -794,16 +794,16 @@ public:
|
||||
chooser_compare_func_creator fc,
|
||||
st_select_lex *select_lex, bool all);
|
||||
|
||||
void cleanup();
|
||||
void cleanup() override;
|
||||
// only ALL subquery has upper not
|
||||
subs_type substype() { return all?ALL_SUBS:ANY_SUBS; }
|
||||
bool select_transformer(JOIN *join);
|
||||
subs_type substype() override { return all?ALL_SUBS:ANY_SUBS; }
|
||||
bool select_transformer(JOIN *join) override;
|
||||
void create_comp_func(bool invert) { func= func_creator(invert); }
|
||||
void print(String *str, enum_query_type query_type);
|
||||
enum precedence precedence() const { return CMP_PRECEDENCE; }
|
||||
void print(String *str, enum_query_type query_type) override;
|
||||
enum precedence precedence() const override { return CMP_PRECEDENCE; }
|
||||
bool is_maxmin_applicable(JOIN *join);
|
||||
bool transform_into_max_min(JOIN *join);
|
||||
void no_rows_in_result();
|
||||
void no_rows_in_result() override;
|
||||
};
|
||||
|
||||
|
||||
@@ -1063,9 +1063,9 @@ public:
|
||||
check_null(chk_null),
|
||||
having(having_arg)
|
||||
{ DBUG_ASSERT(subs); }
|
||||
int exec();
|
||||
void print (String *str, enum_query_type query_type);
|
||||
virtual enum_engine_type engine_type() { return INDEXSUBQUERY_ENGINE; }
|
||||
int exec() override;
|
||||
void print (String *str, enum_query_type query_type) override;
|
||||
enum_engine_type engine_type() override { return INDEXSUBQUERY_ENGINE; }
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -1507,7 +1507,7 @@ protected:
|
||||
|
||||
bool test_null_row(rownum_t row_num);
|
||||
bool exists_complementing_null_row(MY_BITMAP *keys_to_complement);
|
||||
bool partial_match();
|
||||
bool partial_match() override;
|
||||
public:
|
||||
subselect_rowid_merge_engine(THD *thd,
|
||||
subselect_uniquesubquery_engine *engine_arg,
|
||||
@@ -1527,15 +1527,15 @@ public:
|
||||
{}
|
||||
~subselect_rowid_merge_engine();
|
||||
bool init(MY_BITMAP *non_null_key_parts, MY_BITMAP *partial_match_key_parts);
|
||||
void cleanup();
|
||||
virtual enum_engine_type engine_type() { return ROWID_MERGE_ENGINE; }
|
||||
void cleanup() override;
|
||||
enum_engine_type engine_type() override { return ROWID_MERGE_ENGINE; }
|
||||
};
|
||||
|
||||
|
||||
class subselect_table_scan_engine: public subselect_partial_match_engine
|
||||
{
|
||||
protected:
|
||||
bool partial_match();
|
||||
bool partial_match() override;
|
||||
public:
|
||||
subselect_table_scan_engine(THD *thd,
|
||||
subselect_uniquesubquery_engine *engine_arg,
|
||||
@@ -1545,7 +1545,7 @@ public:
|
||||
bool has_covering_null_row_arg,
|
||||
bool has_covering_null_columns_arg,
|
||||
uint count_columns_with_nulls_arg);
|
||||
void cleanup();
|
||||
virtual enum_engine_type engine_type() { return TABLE_SCAN_ENGINE; }
|
||||
void cleanup() override;
|
||||
enum_engine_type engine_type() override { return TABLE_SCAN_ENGINE; }
|
||||
};
|
||||
#endif /* ITEM_SUBSELECT_INCLUDED */
|
||||
|
@@ -704,15 +704,15 @@ public:
|
||||
Aggregator(sum), table(NULL), tmp_table_param(NULL), tree(NULL),
|
||||
always_null(false), use_distinct_values(false) {}
|
||||
virtual ~Aggregator_distinct ();
|
||||
Aggregator_type Aggrtype() { return DISTINCT_AGGREGATOR; }
|
||||
Aggregator_type Aggrtype() override { return DISTINCT_AGGREGATOR; }
|
||||
|
||||
bool setup(THD *);
|
||||
void clear();
|
||||
bool add();
|
||||
void endup();
|
||||
virtual my_decimal *arg_val_decimal(my_decimal * value);
|
||||
virtual double arg_val_real();
|
||||
virtual bool arg_is_null(bool use_null_value);
|
||||
bool setup(THD *) override;
|
||||
void clear() override;
|
||||
bool add() override;
|
||||
void endup() override;
|
||||
my_decimal *arg_val_decimal(my_decimal * value) override;
|
||||
double arg_val_real() override;
|
||||
bool arg_is_null(bool use_null_value) override;
|
||||
|
||||
bool unique_walk_function(void *element);
|
||||
bool unique_walk_function_for_count(void *element);
|
||||
@@ -731,15 +731,15 @@ public:
|
||||
|
||||
Aggregator_simple (Item_sum *sum) :
|
||||
Aggregator(sum) {}
|
||||
Aggregator_type Aggrtype() { return Aggregator::SIMPLE_AGGREGATOR; }
|
||||
Aggregator_type Aggrtype() override { return Aggregator::SIMPLE_AGGREGATOR; }
|
||||
|
||||
bool setup(THD * thd) { return item_sum->setup(thd); }
|
||||
void clear() { item_sum->clear(); }
|
||||
bool add() { return item_sum->add(); }
|
||||
void endup() {};
|
||||
virtual my_decimal *arg_val_decimal(my_decimal * value);
|
||||
virtual double arg_val_real();
|
||||
virtual bool arg_is_null(bool use_null_value);
|
||||
bool setup(THD * thd) override { return item_sum->setup(thd); }
|
||||
void clear() override { item_sum->clear(); }
|
||||
bool add() override { return item_sum->add(); }
|
||||
void endup() override {};
|
||||
my_decimal *arg_val_decimal(my_decimal * value) override;
|
||||
double arg_val_real() override;
|
||||
bool arg_is_null(bool use_null_value) override;
|
||||
};
|
||||
|
||||
|
||||
@@ -755,7 +755,7 @@ public:
|
||||
Item_sum(thd, list) {}
|
||||
Item_sum_num(THD *thd, Item_sum_num *item):
|
||||
Item_sum(thd, item) {}
|
||||
bool fix_fields(THD *, Item **);
|
||||
bool fix_fields(THD *, Item **) override;
|
||||
};
|
||||
|
||||
|
||||
@@ -807,7 +807,8 @@ public:
|
||||
max_length=21;
|
||||
base_flags&= ~item_base_t::MAYBE_NULL;
|
||||
null_value=0;
|
||||
return FALSE; }
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1184,7 +1185,8 @@ public:
|
||||
{
|
||||
return get_arg(0)->real_type_handler();
|
||||
}
|
||||
const TYPELIB *get_typelib() const override { return args[0]->get_typelib(); }
|
||||
const TYPELIB *get_typelib() const override
|
||||
{ return args[0]->get_typelib(); }
|
||||
void update_field() override;
|
||||
void min_max_update_str_field();
|
||||
void min_max_update_real_field();
|
||||
@@ -1276,9 +1278,7 @@ public:
|
||||
clear_as_window();
|
||||
Item_sum_int::cleanup();
|
||||
}
|
||||
void setup_window_func(THD *thd __attribute__((unused)),
|
||||
Window_spec *window_spec __attribute__((unused)))
|
||||
override
|
||||
void setup_window_func(THD *, Window_spec *) override
|
||||
{
|
||||
as_window_function= TRUE;
|
||||
clear_as_window();
|
||||
|
@@ -3261,21 +3261,21 @@ String *Item_char_typecast::val_str_binary_from_native(String *str)
|
||||
class Item_char_typecast_func_handler: public Item_handled_func::Handler_str
|
||||
{
|
||||
public:
|
||||
const Type_handler *return_type_handler(const Item_handled_func *item) const
|
||||
const Type_handler *return_type_handler(const Item_handled_func *item) const override
|
||||
{
|
||||
return Type_handler::string_type_handler(item->max_length);
|
||||
}
|
||||
const Type_handler *
|
||||
type_handler_for_create_select(const Item_handled_func *item) const
|
||||
type_handler_for_create_select(const Item_handled_func *item) const override
|
||||
{
|
||||
return return_type_handler(item)->type_handler_for_tmp_table(item);
|
||||
}
|
||||
|
||||
bool fix_length_and_dec(Item_handled_func *item) const
|
||||
bool fix_length_and_dec(Item_handled_func *item) const override
|
||||
{
|
||||
return false;
|
||||
}
|
||||
String *val_str(Item_handled_func *item, String *to) const
|
||||
String *val_str(Item_handled_func *item, String *to) const override
|
||||
{
|
||||
DBUG_ASSERT(dynamic_cast<const Item_char_typecast*>(item));
|
||||
return static_cast<Item_char_typecast*>(item)->val_str_generic(to);
|
||||
|
@@ -560,9 +560,9 @@ public:
|
||||
else
|
||||
set_handler(type_handler_long_or_longlong());
|
||||
}
|
||||
double real_op() { DBUG_ASSERT(0); return 0; }
|
||||
String *str_op(String *str) { DBUG_ASSERT(0); return 0; }
|
||||
bool date_op(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
|
||||
double real_op() override { DBUG_ASSERT(0); return 0; }
|
||||
String *str_op(String *str) override { DBUG_ASSERT(0); return 0; }
|
||||
bool date_op(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
return true;
|
||||
@@ -1320,7 +1320,7 @@ public:
|
||||
&my_charset_latin1),
|
||||
m_fsp(fsp)
|
||||
{ }
|
||||
String *val_str(String *to)
|
||||
String *val_str(String *to) override
|
||||
{
|
||||
Interval_DDhhmmssff it(current_thd, args[0], m_fsp);
|
||||
null_value= !it.is_valid_interval_DDhhmmssff();
|
||||
@@ -1716,7 +1716,7 @@ class Func_handler_date_add_interval_datetime:
|
||||
public Func_handler_date_add_interval
|
||||
{
|
||||
public:
|
||||
bool fix_length_and_dec(Item_handled_func *item) const
|
||||
bool fix_length_and_dec(Item_handled_func *item) const override
|
||||
{
|
||||
uint dec= MY_MAX(item->arguments()[0]->datetime_precision(current_thd),
|
||||
interval_dec(item->arguments()[1], int_type(item)));
|
||||
@@ -1724,7 +1724,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
bool get_date(THD *thd, Item_handled_func *item,
|
||||
MYSQL_TIME *to, date_mode_t fuzzy) const
|
||||
MYSQL_TIME *to, date_mode_t fuzzy) const override
|
||||
{
|
||||
Datetime::Options opt(TIME_CONV_NONE, thd);
|
||||
Datetime dt(thd, item->arguments()[0], opt);
|
||||
@@ -1743,7 +1743,7 @@ class Func_handler_date_add_interval_datetime_arg0_time:
|
||||
{
|
||||
public:
|
||||
bool get_date(THD *thd, Item_handled_func *item,
|
||||
MYSQL_TIME *to, date_mode_t fuzzy) const;
|
||||
MYSQL_TIME *to, date_mode_t fuzzy) const override;
|
||||
};
|
||||
|
||||
|
||||
@@ -1753,7 +1753,7 @@ class Func_handler_date_add_interval_date:
|
||||
{
|
||||
public:
|
||||
bool get_date(THD *thd, Item_handled_func *item,
|
||||
MYSQL_TIME *to, date_mode_t fuzzy) const
|
||||
MYSQL_TIME *to, date_mode_t fuzzy) const override
|
||||
{
|
||||
/*
|
||||
The first argument is known to be of the DATE data type (not DATETIME).
|
||||
@@ -1775,7 +1775,7 @@ class Func_handler_date_add_interval_time:
|
||||
public Func_handler_date_add_interval
|
||||
{
|
||||
public:
|
||||
bool fix_length_and_dec(Item_handled_func *item) const
|
||||
bool fix_length_and_dec(Item_handled_func *item) const override
|
||||
{
|
||||
uint dec= MY_MAX(item->arguments()[0]->time_precision(current_thd),
|
||||
interval_dec(item->arguments()[1], int_type(item)));
|
||||
@@ -1783,7 +1783,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
bool get_date(THD *thd, Item_handled_func *item,
|
||||
MYSQL_TIME *to, date_mode_t fuzzy) const
|
||||
MYSQL_TIME *to, date_mode_t fuzzy) const override
|
||||
{
|
||||
Time t(thd, item->arguments()[0]);
|
||||
if (!t.is_valid_time())
|
||||
@@ -1800,7 +1800,7 @@ class Func_handler_date_add_interval_string:
|
||||
public Func_handler_date_add_interval
|
||||
{
|
||||
public:
|
||||
bool fix_length_and_dec(Item_handled_func *item) const
|
||||
bool fix_length_and_dec(Item_handled_func *item) const override
|
||||
{
|
||||
uint dec= MY_MAX(item->arguments()[0]->datetime_precision(current_thd),
|
||||
interval_dec(item->arguments()[1], int_type(item)));
|
||||
@@ -1812,7 +1812,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
bool get_date(THD *thd, Item_handled_func *item,
|
||||
MYSQL_TIME *to, date_mode_t fuzzy) const
|
||||
MYSQL_TIME *to, date_mode_t fuzzy) const override
|
||||
{
|
||||
if (item->arguments()[0]->
|
||||
get_date(thd, to, Datetime::Options(TIME_CONV_NONE, thd)) ||
|
||||
@@ -1841,7 +1841,7 @@ public:
|
||||
Func_handler_add_time_datetime(int sign)
|
||||
:Func_handler_sign(sign)
|
||||
{ }
|
||||
bool fix_length_and_dec(Item_handled_func *item) const
|
||||
bool fix_length_and_dec(Item_handled_func *item) const override
|
||||
{
|
||||
THD *thd= current_thd;
|
||||
uint dec0= item->arguments()[0]->datetime_precision(thd);
|
||||
@@ -1850,7 +1850,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
bool get_date(THD *thd, Item_handled_func *item,
|
||||
MYSQL_TIME *to, date_mode_t fuzzy) const
|
||||
MYSQL_TIME *to, date_mode_t fuzzy) const override
|
||||
{
|
||||
DBUG_ASSERT(item->fixed());
|
||||
Datetime::Options opt(TIME_CONV_NONE, thd);
|
||||
@@ -1875,7 +1875,7 @@ public:
|
||||
Func_handler_add_time_time(int sign)
|
||||
:Func_handler_sign(sign)
|
||||
{ }
|
||||
bool fix_length_and_dec(Item_handled_func *item) const
|
||||
bool fix_length_and_dec(Item_handled_func *item) const override
|
||||
{
|
||||
THD *thd= current_thd;
|
||||
uint dec0= item->arguments()[0]->time_precision(thd);
|
||||
@@ -1884,7 +1884,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
bool get_date(THD *thd, Item_handled_func *item,
|
||||
MYSQL_TIME *to, date_mode_t fuzzy) const
|
||||
MYSQL_TIME *to, date_mode_t fuzzy) const override
|
||||
{
|
||||
DBUG_ASSERT(item->fixed());
|
||||
Time t(thd, item->arguments()[0]);
|
||||
@@ -1908,7 +1908,7 @@ public:
|
||||
Func_handler_add_time_string(int sign)
|
||||
:Func_handler_sign(sign)
|
||||
{ }
|
||||
bool fix_length_and_dec(Item_handled_func *item) const
|
||||
bool fix_length_and_dec(Item_handled_func *item) const override
|
||||
{
|
||||
uint dec0= item->arguments()[0]->decimals;
|
||||
uint dec1= Interval_DDhhmmssff::fsp(current_thd, item->arguments()[1]);
|
||||
@@ -1921,7 +1921,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
bool get_date(THD *thd, Item_handled_func *item,
|
||||
MYSQL_TIME *to, date_mode_t fuzzy) const
|
||||
MYSQL_TIME *to, date_mode_t fuzzy) const override
|
||||
{
|
||||
DBUG_ASSERT(item->fixed());
|
||||
// Detect a proper timestamp type based on the argument values
|
||||
@@ -1945,13 +1945,13 @@ class Func_handler_str_to_date_datetime_sec:
|
||||
public Item_handled_func::Handler_datetime
|
||||
{
|
||||
public:
|
||||
bool fix_length_and_dec(Item_handled_func *item) const
|
||||
bool fix_length_and_dec(Item_handled_func *item) const override
|
||||
{
|
||||
item->fix_attributes_datetime(0);
|
||||
return false;
|
||||
}
|
||||
bool get_date(THD *thd, Item_handled_func *item,
|
||||
MYSQL_TIME *to, date_mode_t fuzzy) const
|
||||
MYSQL_TIME *to, date_mode_t fuzzy) const override
|
||||
{
|
||||
return static_cast<Item_func_str_to_date*>(item)->
|
||||
get_date_common(thd, to, fuzzy, MYSQL_TIMESTAMP_DATETIME);
|
||||
@@ -1963,13 +1963,13 @@ class Func_handler_str_to_date_datetime_usec:
|
||||
public Item_handled_func::Handler_datetime
|
||||
{
|
||||
public:
|
||||
bool fix_length_and_dec(Item_handled_func *item) const
|
||||
bool fix_length_and_dec(Item_handled_func *item) const override
|
||||
{
|
||||
item->fix_attributes_datetime(TIME_SECOND_PART_DIGITS);
|
||||
return false;
|
||||
}
|
||||
bool get_date(THD *thd, Item_handled_func *item,
|
||||
MYSQL_TIME *to, date_mode_t fuzzy) const
|
||||
MYSQL_TIME *to, date_mode_t fuzzy) const override
|
||||
{
|
||||
return static_cast<Item_func_str_to_date*>(item)->
|
||||
get_date_common(thd, to, fuzzy, MYSQL_TIMESTAMP_DATETIME);
|
||||
@@ -1981,7 +1981,7 @@ class Func_handler_str_to_date_date: public Item_handled_func::Handler_date
|
||||
{
|
||||
public:
|
||||
bool get_date(THD *thd, Item_handled_func *item,
|
||||
MYSQL_TIME *to, date_mode_t fuzzy) const
|
||||
MYSQL_TIME *to, date_mode_t fuzzy) const override
|
||||
{
|
||||
return static_cast<Item_func_str_to_date*>(item)->
|
||||
get_date_common(thd, to, fuzzy, MYSQL_TIMESTAMP_DATE);
|
||||
@@ -1993,7 +1993,7 @@ class Func_handler_str_to_date_time: public Item_handled_func::Handler_time
|
||||
{
|
||||
public:
|
||||
bool get_date(THD *thd, Item_handled_func *item,
|
||||
MYSQL_TIME *to, date_mode_t fuzzy) const
|
||||
MYSQL_TIME *to, date_mode_t fuzzy) const override
|
||||
{
|
||||
if (static_cast<Item_func_str_to_date*>(item)->
|
||||
get_date_common(thd, to, fuzzy, MYSQL_TIMESTAMP_TIME))
|
||||
@@ -2016,7 +2016,7 @@ public:
|
||||
class Func_handler_str_to_date_time_sec: public Func_handler_str_to_date_time
|
||||
{
|
||||
public:
|
||||
bool fix_length_and_dec(Item_handled_func *item) const
|
||||
bool fix_length_and_dec(Item_handled_func *item) const override
|
||||
{
|
||||
item->fix_attributes_time(0);
|
||||
return false;
|
||||
@@ -2027,7 +2027,7 @@ public:
|
||||
class Func_handler_str_to_date_time_usec: public Func_handler_str_to_date_time
|
||||
{
|
||||
public:
|
||||
bool fix_length_and_dec(Item_handled_func *item) const
|
||||
bool fix_length_and_dec(Item_handled_func *item) const override
|
||||
{
|
||||
item->fix_attributes_time(TIME_SECOND_PART_DIGITS);
|
||||
return false;
|
||||
|
@@ -584,13 +584,13 @@ public:
|
||||
CHARSET_INFO *cs):
|
||||
Item_string(thd, str, length, cs)
|
||||
{ }
|
||||
bool const_item() const { return false ; }
|
||||
bool basic_const_item() const { return false; }
|
||||
bool const_item() const override { return false ; }
|
||||
bool basic_const_item() const override { return false; }
|
||||
void set_value(const char *str, uint length, CHARSET_INFO *cs)
|
||||
{
|
||||
str_value.set(str, length, cs);
|
||||
}
|
||||
Item *safe_charset_converter(THD *thd, CHARSET_INFO *tocs)
|
||||
Item *safe_charset_converter(THD *thd, CHARSET_INFO *tocs) override
|
||||
{
|
||||
/*
|
||||
Item_string::safe_charset_converter() does not accept non-constants.
|
||||
|
36
sql/key.cc
36
sql/key.cc
@@ -758,13 +758,11 @@ ulong key_hashnr(KEY *key_info, uint used_key_parts, const uchar *key)
|
||||
|
||||
if (is_string)
|
||||
{
|
||||
if (cs->mbmaxlen > 1)
|
||||
{
|
||||
size_t char_length= cs->charpos(pos + pack_length,
|
||||
pos + pack_length + length,
|
||||
length / cs->mbmaxlen);
|
||||
set_if_smaller(length, char_length);
|
||||
}
|
||||
/*
|
||||
Prefix keys are not possible in BNLH joins.
|
||||
Use the whole string to calculate the hash.
|
||||
*/
|
||||
DBUG_ASSERT((key_part->key_part_flag & HA_PART_KEY_SEG) == 0);
|
||||
cs->hash_sort(pos+pack_length, length, &nr, &nr2);
|
||||
key+= pack_length;
|
||||
}
|
||||
@@ -868,25 +866,13 @@ bool key_buf_cmp(KEY *key_info, uint used_key_parts,
|
||||
if (is_string)
|
||||
{
|
||||
/*
|
||||
Compare the strings taking into account length in characters
|
||||
and collation
|
||||
Prefix keys are not possible in BNLH joins.
|
||||
Compare whole strings.
|
||||
*/
|
||||
size_t byte_len1= length1, byte_len2= length2;
|
||||
if (cs->mbmaxlen > 1)
|
||||
{
|
||||
size_t char_length1= cs->charpos(pos1 + pack_length,
|
||||
pos1 + pack_length + length1,
|
||||
length1 / cs->mbmaxlen);
|
||||
size_t char_length2= cs->charpos(pos2 + pack_length,
|
||||
pos2 + pack_length + length2,
|
||||
length2 / cs->mbmaxlen);
|
||||
set_if_smaller(length1, char_length1);
|
||||
set_if_smaller(length2, char_length2);
|
||||
}
|
||||
if (length1 != length2 ||
|
||||
cs->strnncollsp(pos1 + pack_length, byte_len1,
|
||||
pos2 + pack_length, byte_len2))
|
||||
return TRUE;
|
||||
DBUG_ASSERT((key_part->key_part_flag & HA_PART_KEY_SEG) == 0);
|
||||
if (cs->strnncollsp(pos1 + pack_length, length1,
|
||||
pos2 + pack_length, length2))
|
||||
return true;
|
||||
key1+= pack_length; key2+= pack_length;
|
||||
}
|
||||
else
|
||||
|
@@ -48,7 +48,7 @@ public:
|
||||
{
|
||||
return length == name_length && !memcmp(name, name_cmp, length);
|
||||
}
|
||||
~NAMED_ILINK()
|
||||
~NAMED_ILINK() override
|
||||
{
|
||||
my_free((void *) name);
|
||||
}
|
||||
|
@@ -215,14 +215,14 @@ public:
|
||||
m_message[0]= '\0';
|
||||
}
|
||||
|
||||
virtual ~Silence_log_table_errors() = default;
|
||||
~Silence_log_table_errors() override = default;
|
||||
|
||||
virtual bool handle_condition(THD *thd,
|
||||
bool handle_condition(THD *thd,
|
||||
uint sql_errno,
|
||||
const char* sql_state,
|
||||
Sql_condition::enum_warning_level *level,
|
||||
const char* msg,
|
||||
Sql_condition ** cond_hdl);
|
||||
Sql_condition ** cond_hdl) override;
|
||||
const char *message() const { return m_message; }
|
||||
};
|
||||
|
||||
|
72
sql/log.h
72
sql/log.h
@@ -101,25 +101,25 @@ class TC_LOG_DUMMY: public TC_LOG // use it to disable the logging
|
||||
{
|
||||
public:
|
||||
TC_LOG_DUMMY() = default;
|
||||
int open(const char *opt_name) { return 0; }
|
||||
void close() { }
|
||||
int open(const char *opt_name) override { return 0; }
|
||||
void close() override { }
|
||||
/*
|
||||
TC_LOG_DUMMY is only used when there are <= 1 XA-capable engines, and we
|
||||
only use internal XA during commit when >= 2 XA-capable engines
|
||||
participate.
|
||||
*/
|
||||
int log_and_order(THD *thd, my_xid xid, bool all,
|
||||
bool need_prepare_ordered, bool need_commit_ordered)
|
||||
bool need_prepare_ordered, bool need_commit_ordered) override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
return 1;
|
||||
}
|
||||
int unlog(ulong cookie, my_xid xid) { return 0; }
|
||||
int unlog_xa_prepare(THD *thd, bool all)
|
||||
int unlog(ulong cookie, my_xid xid) override { return 0; }
|
||||
int unlog_xa_prepare(THD *thd, bool all) override
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
void commit_checkpoint_notify(void *cookie) { DBUG_ASSERT(0); };
|
||||
void commit_checkpoint_notify(void *cookie) override { DBUG_ASSERT(0); };
|
||||
};
|
||||
|
||||
#define TC_LOG_PAGE_SIZE 8192
|
||||
@@ -197,16 +197,16 @@ class TC_LOG_MMAP: public TC_LOG
|
||||
|
||||
public:
|
||||
TC_LOG_MMAP(): inited(0), pending_checkpoint(0) {}
|
||||
int open(const char *opt_name);
|
||||
void close();
|
||||
int open(const char *opt_name) override;
|
||||
void close() override;
|
||||
int log_and_order(THD *thd, my_xid xid, bool all,
|
||||
bool need_prepare_ordered, bool need_commit_ordered);
|
||||
int unlog(ulong cookie, my_xid xid);
|
||||
int unlog_xa_prepare(THD *thd, bool all)
|
||||
bool need_prepare_ordered, bool need_commit_ordered) override;
|
||||
int unlog(ulong cookie, my_xid xid) override;
|
||||
int unlog_xa_prepare(THD *thd, bool all) override
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
void commit_checkpoint_notify(void *cookie);
|
||||
void commit_checkpoint_notify(void *cookie) override;
|
||||
int recover();
|
||||
|
||||
private:
|
||||
@@ -721,15 +721,15 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
int open(const char *opt_name);
|
||||
void close();
|
||||
virtual int generate_new_name(char *new_name, const char *log_name,
|
||||
ulong next_log_number);
|
||||
int open(const char *opt_name) override;
|
||||
void close() override;
|
||||
int generate_new_name(char *new_name, const char *log_name,
|
||||
ulong next_log_number) override;
|
||||
int log_and_order(THD *thd, my_xid xid, bool all,
|
||||
bool need_prepare_ordered, bool need_commit_ordered);
|
||||
int unlog(ulong cookie, my_xid xid);
|
||||
int unlog_xa_prepare(THD *thd, bool all);
|
||||
void commit_checkpoint_notify(void *cookie);
|
||||
bool need_prepare_ordered, bool need_commit_ordered) override;
|
||||
int unlog(ulong cookie, my_xid xid) override;
|
||||
int unlog_xa_prepare(THD *thd, bool all) override;
|
||||
void commit_checkpoint_notify(void *cookie) override;
|
||||
int recover(LOG_INFO *linfo, const char *last_log_name, IO_CACHE *first_log,
|
||||
Format_description_log_event *fdle, bool do_xa);
|
||||
int do_binlog_recovery(const char *opt_name, bool do_xa_recovery);
|
||||
@@ -1023,19 +1023,19 @@ class Log_to_csv_event_handler: public Log_event_handler
|
||||
public:
|
||||
Log_to_csv_event_handler();
|
||||
~Log_to_csv_event_handler();
|
||||
virtual bool init();
|
||||
virtual void cleanup();
|
||||
bool init() override;
|
||||
void cleanup() override;
|
||||
|
||||
virtual bool log_slow(THD *thd, my_hrtime_t current_time,
|
||||
bool log_slow(THD *thd, my_hrtime_t current_time,
|
||||
const char *user_host, size_t user_host_len, ulonglong query_utime,
|
||||
ulonglong lock_utime, bool is_command,
|
||||
const char *sql_text, size_t sql_text_len);
|
||||
virtual bool log_error(enum loglevel level, const char *format,
|
||||
va_list args);
|
||||
virtual bool log_general(THD *thd, my_hrtime_t event_time, const char *user_host, size_t user_host_len, my_thread_id thread_id,
|
||||
const char *sql_text, size_t sql_text_len) override;
|
||||
bool log_error(enum loglevel level, const char *format,
|
||||
va_list args) override;
|
||||
bool log_general(THD *thd, my_hrtime_t event_time, const char *user_host, size_t user_host_len, my_thread_id thread_id,
|
||||
const char *command_type, size_t command_type_len,
|
||||
const char *sql_text, size_t sql_text_len,
|
||||
CHARSET_INFO *client_cs);
|
||||
CHARSET_INFO *client_cs) override;
|
||||
|
||||
int activate_log(THD *thd, uint log_type);
|
||||
};
|
||||
@@ -1053,19 +1053,19 @@ class Log_to_file_event_handler: public Log_event_handler
|
||||
public:
|
||||
Log_to_file_event_handler(): is_initialized(FALSE)
|
||||
{}
|
||||
virtual bool init();
|
||||
virtual void cleanup();
|
||||
bool init() override;
|
||||
void cleanup() override;
|
||||
|
||||
virtual bool log_slow(THD *thd, my_hrtime_t current_time,
|
||||
bool log_slow(THD *thd, my_hrtime_t current_time,
|
||||
const char *user_host, size_t user_host_len, ulonglong query_utime,
|
||||
ulonglong lock_utime, bool is_command,
|
||||
const char *sql_text, size_t sql_text_len);
|
||||
virtual bool log_error(enum loglevel level, const char *format,
|
||||
va_list args);
|
||||
virtual bool log_general(THD *thd, my_hrtime_t event_time, const char *user_host, size_t user_host_len, my_thread_id thread_id,
|
||||
const char *sql_text, size_t sql_text_len) override;
|
||||
bool log_error(enum loglevel level, const char *format,
|
||||
va_list args) override;
|
||||
bool log_general(THD *thd, my_hrtime_t event_time, const char *user_host, size_t user_host_len, my_thread_id thread_id,
|
||||
const char *command_type, size_t command_type_len,
|
||||
const char *sql_text, size_t sql_text_len,
|
||||
CHARSET_INFO *client_cs);
|
||||
CHARSET_INFO *client_cs) override;
|
||||
void flush();
|
||||
void init_pthread_objects();
|
||||
MYSQL_QUERY_LOG *get_mysql_slow_log() { return &mysql_slow_log; }
|
||||
|
540
sql/log_event.h
540
sql/log_event.h
File diff suppressed because it is too large
Load Diff
@@ -27,13 +27,13 @@
|
||||
#include "lock.h" // mysql_unlock_tables
|
||||
#include "rpl_rli.h"
|
||||
#include "rpl_utility.h"
|
||||
#endif
|
||||
#include "log_event_old.h"
|
||||
#include "rpl_record_old.h"
|
||||
#include "transaction.h"
|
||||
#ifdef WITH_WSREP
|
||||
#include "wsrep_mysqld.h"
|
||||
#endif /* WITH_WSREP */
|
||||
#endif /* MYSQL_CLIENT */
|
||||
#include "log_event_old.h"
|
||||
#include "rpl_record_old.h"
|
||||
#include "transaction.h"
|
||||
|
||||
PSI_memory_key key_memory_log_event_old;
|
||||
|
||||
|
@@ -111,12 +111,12 @@ public:
|
||||
flag_set get_flags(flag_set flags_arg) const { return m_flags & flags_arg; }
|
||||
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
virtual void pack_info(Protocol *protocol);
|
||||
void pack_info(Protocol *protocol) override;
|
||||
#endif
|
||||
|
||||
#ifdef MYSQL_CLIENT
|
||||
/* not for direct call, each derived has its own ::print() */
|
||||
virtual bool print(FILE *file, PRINT_EVENT_INFO *print_event_info)= 0;
|
||||
bool print(FILE *file, PRINT_EVENT_INFO *print_event_info) override= 0;
|
||||
#endif
|
||||
|
||||
#ifndef MYSQL_CLIENT
|
||||
@@ -127,16 +127,19 @@ public:
|
||||
#endif
|
||||
|
||||
/* Member functions to implement superclass interface */
|
||||
virtual int get_data_size();
|
||||
int get_data_size() override;
|
||||
|
||||
MY_BITMAP const *get_cols() const { return &m_cols; }
|
||||
size_t get_width() const { return m_width; }
|
||||
ulonglong get_table_id() const { return m_table_id; }
|
||||
|
||||
#ifndef MYSQL_CLIENT
|
||||
virtual bool write_data_header();
|
||||
virtual bool write_data_body();
|
||||
virtual const char *get_db() { return m_table->s->db.str; }
|
||||
bool write_data_header() override;
|
||||
bool write_data_body() override;
|
||||
const char *get_db() override { return m_table->s->db.str; }
|
||||
#ifdef HAVE_REPLICATION
|
||||
bool is_part_of_group() override { return 1; }
|
||||
#endif
|
||||
#endif
|
||||
/*
|
||||
Check that malloc() succeeded in allocating memory for the rows
|
||||
@@ -144,11 +147,10 @@ public:
|
||||
is valid is done in the Update_rows_log_event_old::is_valid()
|
||||
function.
|
||||
*/
|
||||
virtual bool is_valid() const
|
||||
bool is_valid() const override
|
||||
{
|
||||
return m_rows_buf && m_cols.bitmap;
|
||||
}
|
||||
bool is_part_of_group() { return 1; }
|
||||
|
||||
uint m_row_count; /* The number of rows added to the event */
|
||||
|
||||
@@ -215,9 +217,9 @@ protected:
|
||||
private:
|
||||
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
virtual int do_apply_event(rpl_group_info *rgi);
|
||||
virtual int do_update_pos(rpl_group_info *rgi);
|
||||
virtual enum_skip_reason do_shall_skip(rpl_group_info *rgi);
|
||||
int do_apply_event(rpl_group_info *rgi) override;
|
||||
int do_update_pos(rpl_group_info *rgi) override;
|
||||
enum_skip_reason do_shall_skip(rpl_group_info *rgi) override;
|
||||
|
||||
/*
|
||||
Primitive to prepare for a sequence of row executions.
|
||||
@@ -379,13 +381,13 @@ public:
|
||||
|
||||
private:
|
||||
#ifdef MYSQL_CLIENT
|
||||
bool print(FILE *file, PRINT_EVENT_INFO *print_event_info);
|
||||
bool print(FILE *file, PRINT_EVENT_INFO *print_event_info) override;
|
||||
#endif
|
||||
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
virtual int do_before_row_operations(const Slave_reporting_capability *const);
|
||||
virtual int do_after_row_operations(const Slave_reporting_capability *const,int);
|
||||
virtual int do_exec_row(rpl_group_info *);
|
||||
int do_before_row_operations(const Slave_reporting_capability *const) override;
|
||||
int do_after_row_operations(const Slave_reporting_capability *const,int) override;
|
||||
int do_exec_row(rpl_group_info *) override;
|
||||
#endif
|
||||
/********** END OF CUT & PASTE FROM Write_rows_log_event **********/
|
||||
|
||||
@@ -397,19 +399,19 @@ public:
|
||||
};
|
||||
|
||||
private:
|
||||
virtual Log_event_type get_type_code() { return (Log_event_type)TYPE_CODE; }
|
||||
Log_event_type get_type_code() override { return (Log_event_type)TYPE_CODE; }
|
||||
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
// use old definition of do_apply_event()
|
||||
virtual int do_apply_event(rpl_group_info *rgi)
|
||||
int do_apply_event(rpl_group_info *rgi) override
|
||||
{ return Old_rows_log_event::do_apply_event(this, rgi); }
|
||||
|
||||
// primitives for old version of do_apply_event()
|
||||
virtual int do_before_row_operations(TABLE *table);
|
||||
virtual int do_after_row_operations(TABLE *table, int error);
|
||||
int do_before_row_operations(TABLE *table) override;
|
||||
int do_after_row_operations(TABLE *table, int error) override;
|
||||
virtual int do_prepare_row(THD*, rpl_group_info*, TABLE*,
|
||||
uchar const *row_start, uchar const **row_end);
|
||||
virtual int do_exec_row(TABLE *table);
|
||||
uchar const *row_start, uchar const **row_end) override;
|
||||
int do_exec_row(TABLE *table) override;
|
||||
|
||||
#endif
|
||||
};
|
||||
@@ -455,13 +457,13 @@ public:
|
||||
|
||||
protected:
|
||||
#ifdef MYSQL_CLIENT
|
||||
bool print(FILE *file, PRINT_EVENT_INFO *print_event_info);
|
||||
bool print(FILE *file, PRINT_EVENT_INFO *print_event_info) override;
|
||||
#endif
|
||||
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
virtual int do_before_row_operations(const Slave_reporting_capability *const);
|
||||
virtual int do_after_row_operations(const Slave_reporting_capability *const,int);
|
||||
virtual int do_exec_row(rpl_group_info *);
|
||||
int do_before_row_operations(const Slave_reporting_capability *const) override;
|
||||
int do_after_row_operations(const Slave_reporting_capability *const,int) override;
|
||||
int do_exec_row(rpl_group_info *) override;
|
||||
#endif /* !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION) */
|
||||
/********** END OF CUT & PASTE FROM Update_rows_log_event **********/
|
||||
|
||||
@@ -475,19 +477,19 @@ public:
|
||||
};
|
||||
|
||||
private:
|
||||
virtual Log_event_type get_type_code() { return (Log_event_type)TYPE_CODE; }
|
||||
Log_event_type get_type_code() override { return (Log_event_type)TYPE_CODE; }
|
||||
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
// use old definition of do_apply_event()
|
||||
virtual int do_apply_event(rpl_group_info *rgi)
|
||||
int do_apply_event(rpl_group_info *rgi) override
|
||||
{ return Old_rows_log_event::do_apply_event(this, rgi); }
|
||||
|
||||
// primitives for old version of do_apply_event()
|
||||
virtual int do_before_row_operations(TABLE *table);
|
||||
virtual int do_after_row_operations(TABLE *table, int error);
|
||||
int do_before_row_operations(TABLE *table) override;
|
||||
int do_after_row_operations(TABLE *table, int error) override;
|
||||
virtual int do_prepare_row(THD*, rpl_group_info*, TABLE*,
|
||||
uchar const *row_start, uchar const **row_end);
|
||||
virtual int do_exec_row(TABLE *table);
|
||||
uchar const *row_start, uchar const **row_end) override;
|
||||
int do_exec_row(TABLE *table) override;
|
||||
#endif /* !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION) */
|
||||
};
|
||||
|
||||
@@ -529,13 +531,13 @@ public:
|
||||
|
||||
protected:
|
||||
#ifdef MYSQL_CLIENT
|
||||
bool print(FILE *file, PRINT_EVENT_INFO *print_event_info);
|
||||
bool print(FILE *file, PRINT_EVENT_INFO *print_event_info) override;
|
||||
#endif
|
||||
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
virtual int do_before_row_operations(const Slave_reporting_capability *const);
|
||||
virtual int do_after_row_operations(const Slave_reporting_capability *const,int);
|
||||
virtual int do_exec_row(rpl_group_info *);
|
||||
int do_before_row_operations(const Slave_reporting_capability *const) override;
|
||||
int do_after_row_operations(const Slave_reporting_capability *const,int) override;
|
||||
int do_exec_row(rpl_group_info *) override;
|
||||
#endif
|
||||
/********** END CUT & PASTE FROM Delete_rows_log_event **********/
|
||||
|
||||
@@ -549,19 +551,19 @@ public:
|
||||
};
|
||||
|
||||
private:
|
||||
virtual Log_event_type get_type_code() { return (Log_event_type)TYPE_CODE; }
|
||||
Log_event_type get_type_code() override { return (Log_event_type)TYPE_CODE; }
|
||||
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
// use old definition of do_apply_event()
|
||||
virtual int do_apply_event(rpl_group_info *rgi)
|
||||
int do_apply_event(rpl_group_info *rgi) override
|
||||
{ return Old_rows_log_event::do_apply_event(this, rgi); }
|
||||
|
||||
// primitives for old version of do_apply_event()
|
||||
virtual int do_before_row_operations(TABLE *table);
|
||||
virtual int do_after_row_operations(TABLE *table, int error);
|
||||
int do_before_row_operations(TABLE *table) override;
|
||||
int do_after_row_operations(TABLE *table, int error) override;
|
||||
virtual int do_prepare_row(THD*, rpl_group_info*, TABLE*,
|
||||
uchar const *row_start, uchar const **row_end);
|
||||
virtual int do_exec_row(TABLE *table);
|
||||
uchar const *row_start, uchar const **row_end) override;
|
||||
int do_exec_row(TABLE *table) override;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@@ -9016,6 +9016,7 @@ uint8 Update_rows_log_event::get_trg_event_map()
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(MYSQL_SERVER) && defined(HAVE_REPLICATION)
|
||||
void Incident_log_event::pack_info(Protocol *protocol)
|
||||
{
|
||||
char buf[256];
|
||||
@@ -9028,7 +9029,7 @@ void Incident_log_event::pack_info(Protocol *protocol)
|
||||
m_incident, description(), m_message.str);
|
||||
protocol->store(buf, bytes, &my_charset_bin);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(WITH_WSREP)
|
||||
/*
|
||||
@@ -9114,6 +9115,7 @@ Incident_log_event::write_data_body()
|
||||
}
|
||||
|
||||
|
||||
#if defined(MYSQL_SERVER) && defined(HAVE_REPLICATION)
|
||||
/* Pack info for its unrecognized ignorable event */
|
||||
void Ignorable_log_event::pack_info(Protocol *protocol)
|
||||
{
|
||||
@@ -9123,7 +9125,7 @@ void Ignorable_log_event::pack_info(Protocol *protocol)
|
||||
number, description);
|
||||
protocol->store(buf, bytes, &my_charset_bin);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_REPLICATION)
|
||||
Heartbeat_log_event::Heartbeat_log_event(const uchar *buf, uint event_len,
|
||||
|
36
sql/mdl.cc
36
sql/mdl.cc
@@ -199,10 +199,10 @@ public:
|
||||
m_current_search_depth(0),
|
||||
m_found_deadlock(FALSE)
|
||||
{}
|
||||
virtual bool enter_node(MDL_context *node);
|
||||
virtual void leave_node(MDL_context *node);
|
||||
bool enter_node(MDL_context *node) override;
|
||||
void leave_node(MDL_context *node) override;
|
||||
|
||||
virtual bool inspect_edge(MDL_context *dest);
|
||||
bool inspect_edge(MDL_context *dest) override;
|
||||
|
||||
MDL_context *get_victim() const { return m_victim; }
|
||||
private:
|
||||
@@ -434,11 +434,11 @@ public:
|
||||
struct MDL_scoped_lock : public MDL_lock_strategy
|
||||
{
|
||||
MDL_scoped_lock() = default;
|
||||
virtual const bitmap_t *incompatible_granted_types_bitmap() const
|
||||
const bitmap_t *incompatible_granted_types_bitmap() const override
|
||||
{ return m_granted_incompatible; }
|
||||
virtual const bitmap_t *incompatible_waiting_types_bitmap() const
|
||||
const bitmap_t *incompatible_waiting_types_bitmap() const override
|
||||
{ return m_waiting_incompatible; }
|
||||
virtual bool needs_notification(const MDL_ticket *ticket) const
|
||||
bool needs_notification(const MDL_ticket *ticket) const override
|
||||
{ return (ticket->get_type() == MDL_SHARED); }
|
||||
|
||||
/**
|
||||
@@ -449,14 +449,14 @@ public:
|
||||
insert delayed. We need to kill such threads in order to get
|
||||
global shared lock. We do this my calling code outside of MDL.
|
||||
*/
|
||||
virtual bool conflicting_locks(const MDL_ticket *ticket) const
|
||||
bool conflicting_locks(const MDL_ticket *ticket) const override
|
||||
{ return ticket->get_type() == MDL_INTENTION_EXCLUSIVE; }
|
||||
|
||||
/*
|
||||
In scoped locks, only IX lock request would starve because of X/S. But that
|
||||
is practically very rare case. So just return 0 from this function.
|
||||
*/
|
||||
virtual bitmap_t hog_lock_types_bitmap() const
|
||||
bitmap_t hog_lock_types_bitmap() const override
|
||||
{ return 0; }
|
||||
private:
|
||||
static const bitmap_t m_granted_incompatible[MDL_TYPE_END];
|
||||
@@ -471,11 +471,11 @@ public:
|
||||
struct MDL_object_lock : public MDL_lock_strategy
|
||||
{
|
||||
MDL_object_lock() = default;
|
||||
virtual const bitmap_t *incompatible_granted_types_bitmap() const
|
||||
const bitmap_t *incompatible_granted_types_bitmap() const override
|
||||
{ return m_granted_incompatible; }
|
||||
virtual const bitmap_t *incompatible_waiting_types_bitmap() const
|
||||
const bitmap_t *incompatible_waiting_types_bitmap() const override
|
||||
{ return m_waiting_incompatible; }
|
||||
virtual bool needs_notification(const MDL_ticket *ticket) const
|
||||
bool needs_notification(const MDL_ticket *ticket) const override
|
||||
{
|
||||
return (MDL_BIT(ticket->get_type()) &
|
||||
(MDL_BIT(MDL_SHARED_NO_WRITE) |
|
||||
@@ -491,7 +491,7 @@ public:
|
||||
lock or some other non-MDL resource we might need to wake it up
|
||||
by calling code outside of MDL.
|
||||
*/
|
||||
virtual bool conflicting_locks(const MDL_ticket *ticket) const
|
||||
bool conflicting_locks(const MDL_ticket *ticket) const override
|
||||
{ return ticket->get_type() < MDL_SHARED_UPGRADABLE; }
|
||||
|
||||
/*
|
||||
@@ -499,7 +499,7 @@ public:
|
||||
max_write_lock_count times in a row while other lock types are
|
||||
waiting.
|
||||
*/
|
||||
virtual bitmap_t hog_lock_types_bitmap() const
|
||||
bitmap_t hog_lock_types_bitmap() const override
|
||||
{
|
||||
return (MDL_BIT(MDL_SHARED_NO_WRITE) |
|
||||
MDL_BIT(MDL_SHARED_NO_READ_WRITE) |
|
||||
@@ -515,11 +515,11 @@ public:
|
||||
struct MDL_backup_lock: public MDL_lock_strategy
|
||||
{
|
||||
MDL_backup_lock() = default;
|
||||
virtual const bitmap_t *incompatible_granted_types_bitmap() const
|
||||
const bitmap_t *incompatible_granted_types_bitmap() const override
|
||||
{ return m_granted_incompatible; }
|
||||
virtual const bitmap_t *incompatible_waiting_types_bitmap() const
|
||||
const bitmap_t *incompatible_waiting_types_bitmap() const override
|
||||
{ return m_waiting_incompatible; }
|
||||
virtual bool needs_notification(const MDL_ticket *ticket) const
|
||||
bool needs_notification(const MDL_ticket *ticket) const override
|
||||
{
|
||||
return (MDL_BIT(ticket->get_type()) & MDL_BIT(MDL_BACKUP_FTWRL1));
|
||||
}
|
||||
@@ -529,7 +529,7 @@ public:
|
||||
We need to kill such threads in order to get lock for FTWRL statements.
|
||||
We do this by calling code outside of MDL.
|
||||
*/
|
||||
virtual bool conflicting_locks(const MDL_ticket *ticket) const
|
||||
bool conflicting_locks(const MDL_ticket *ticket) const override
|
||||
{
|
||||
return (MDL_BIT(ticket->get_type()) &
|
||||
(MDL_BIT(MDL_BACKUP_DML) |
|
||||
@@ -541,7 +541,7 @@ public:
|
||||
BACKUP statements. This scenario is partically useless in real world,
|
||||
so we just return 0 here.
|
||||
*/
|
||||
virtual bitmap_t hog_lock_types_bitmap() const
|
||||
bitmap_t hog_lock_types_bitmap() const override
|
||||
{ return 0; }
|
||||
private:
|
||||
static const bitmap_t m_granted_incompatible[MDL_BACKUP_END];
|
||||
|
@@ -726,8 +726,8 @@ public:
|
||||
bool is_incompatible_when_waiting(enum_mdl_type type) const;
|
||||
|
||||
/** Implement MDL_wait_for_subgraph interface. */
|
||||
virtual bool accept_visitor(MDL_wait_for_graph_visitor *dvisitor);
|
||||
virtual uint get_deadlock_weight() const;
|
||||
bool accept_visitor(MDL_wait_for_graph_visitor *dvisitor) override;
|
||||
uint get_deadlock_weight() const override;
|
||||
/**
|
||||
Status of lock request represented by the ticket as reflected in P_S.
|
||||
*/
|
||||
|
@@ -247,11 +247,11 @@ public:
|
||||
void *seq_init_param, uint n_ranges,
|
||||
uint mode, Key_parameters *key_par,
|
||||
Lifo_buffer *key_buffer,
|
||||
Buffer_manager *buf_manager_arg);
|
||||
int get_next(range_id_t *range_info);
|
||||
int refill_buffer(bool initial) { return initial? 0: HA_ERR_END_OF_FILE; }
|
||||
uchar *get_rowid_ptr() { return file->ref; }
|
||||
bool skip_record(range_id_t range_id, uchar *rowid)
|
||||
Buffer_manager *buf_manager_arg) override;
|
||||
int get_next(range_id_t *range_info) override;
|
||||
int refill_buffer(bool initial) override { return initial? 0: HA_ERR_END_OF_FILE; }
|
||||
uchar *get_rowid_ptr() override { return file->ref; }
|
||||
bool skip_record(range_id_t range_id, uchar *rowid) override
|
||||
{
|
||||
return (file->mrr_funcs.skip_record &&
|
||||
file->mrr_funcs.skip_record(file->mrr_iter, range_id, rowid));
|
||||
@@ -270,12 +270,12 @@ public:
|
||||
void *seq_init_param, uint n_ranges,
|
||||
uint mode, Key_parameters *key_par,
|
||||
Lifo_buffer *key_buffer,
|
||||
Buffer_manager *buf_manager_arg);
|
||||
int get_next(range_id_t *range_info);
|
||||
int refill_buffer(bool initial);
|
||||
uchar *get_rowid_ptr() { return file->ref; }
|
||||
Buffer_manager *buf_manager_arg) override;
|
||||
int get_next(range_id_t *range_info) override;
|
||||
int refill_buffer(bool initial) override;
|
||||
uchar *get_rowid_ptr() override { return file->ref; }
|
||||
|
||||
bool skip_record(range_id_t range_info, uchar *rowid)
|
||||
bool skip_record(range_id_t range_info, uchar *rowid) override
|
||||
{
|
||||
return (mrr_funcs.skip_record &&
|
||||
mrr_funcs.skip_record(mrr_iter, range_info, rowid));
|
||||
@@ -292,9 +292,9 @@ public:
|
||||
uchar **space_start, uchar *space_end);
|
||||
void set_no_interruption_temp_buffer();
|
||||
|
||||
void interrupt_read();
|
||||
void resume_read();
|
||||
void position();
|
||||
void interrupt_read() override;
|
||||
void resume_read() override;
|
||||
void position() override;
|
||||
private:
|
||||
Key_value_records_iterator kv_it;
|
||||
|
||||
@@ -365,8 +365,8 @@ class Mrr_ordered_rndpos_reader : public Mrr_reader
|
||||
public:
|
||||
int init(handler *file, Mrr_index_reader *index_reader, uint mode,
|
||||
Lifo_buffer *buf, Rowid_filter *filter);
|
||||
int get_next(range_id_t *range_info);
|
||||
int refill_buffer(bool initial);
|
||||
int get_next(range_id_t *range_info) override;
|
||||
int refill_buffer(bool initial) override;
|
||||
private:
|
||||
handler *file; /* Handler to use */
|
||||
|
||||
|
@@ -335,6 +335,7 @@ static char *init_bootstrap_command_line(char *cmdline, size_t size)
|
||||
" %s"
|
||||
" --bootstrap"
|
||||
" --datadir=."
|
||||
" --tmpdir=."
|
||||
" --loose-innodb-buffer-pool-size=20M"
|
||||
"\""
|
||||
, mysqld_path, opt_verbose_bootstrap ? "--console" : "");
|
||||
|
@@ -778,13 +778,12 @@ net_real_write(NET *net,const uchar *packet, size_t len)
|
||||
#ifdef MYSQL_SERVER
|
||||
if (global_system_variables.log_warnings > 3)
|
||||
{
|
||||
my_printf_error(net->last_errno,
|
||||
"Could not write packet: fd: %lld state: %d "
|
||||
sql_print_warning("Could not write packet: fd: %lld state: %d "
|
||||
"errno: %d vio_errno: %d length: %ld",
|
||||
MYF(ME_ERROR_LOG),
|
||||
MYF(ME_ERROR_LOG | ME_WARNING),
|
||||
(longlong) vio_fd(net->vio), (int) net->vio->state,
|
||||
vio_errno(net->vio), net->last_errno, (ulong) (end-pos));
|
||||
break;
|
||||
vio_errno(net->vio), net->last_errno,
|
||||
(ulong) (end-pos));
|
||||
}
|
||||
#endif
|
||||
MYSQL_SERVER_my_error(net->last_errno, MYF(0));
|
||||
@@ -1101,16 +1100,15 @@ retry:
|
||||
#ifdef MYSQL_SERVER
|
||||
if (global_system_variables.log_warnings > 3)
|
||||
{
|
||||
my_printf_error(net->last_errno,
|
||||
"Could not read packet: fd: %lld state: %d "
|
||||
"remain: %u errno: %d vio_errno: %d "
|
||||
/* Log things as a warning */
|
||||
sql_print_warning("Could not read packet: fd: %lld state: %d "
|
||||
"read_length: %u errno: %d vio_errno: %d "
|
||||
"length: %lld",
|
||||
MYF(ME_ERROR_LOG),
|
||||
(longlong) vio_fd(net->vio), (int) net->vio->state,
|
||||
(longlong) vio_fd(net->vio),
|
||||
(int) net->vio->state,
|
||||
remain, vio_errno(net->vio), net->last_errno,
|
||||
(longlong) length);
|
||||
}
|
||||
else
|
||||
my_error(net->last_errno, MYF(0));
|
||||
#endif /* MYSQL_SERVER */
|
||||
goto end;
|
||||
|
@@ -2272,10 +2272,10 @@ public:
|
||||
TRP_RANGE(SEL_ARG *key_arg, uint idx_arg, uint mrr_flags_arg)
|
||||
: key(key_arg), key_idx(idx_arg), mrr_flags(mrr_flags_arg)
|
||||
{}
|
||||
virtual ~TRP_RANGE() = default; /* Remove gcc warning */
|
||||
~TRP_RANGE() override = default; /* Remove gcc warning */
|
||||
|
||||
QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows,
|
||||
MEM_ROOT *parent_alloc)
|
||||
MEM_ROOT *parent_alloc) override
|
||||
{
|
||||
DBUG_ENTER("TRP_RANGE::make_quick");
|
||||
QUICK_RANGE_SELECT *quick;
|
||||
@@ -2288,7 +2288,7 @@ public:
|
||||
DBUG_RETURN(quick);
|
||||
}
|
||||
void trace_basic_info(PARAM *param,
|
||||
Json_writer_object *trace_object) const;
|
||||
Json_writer_object *trace_object) const override;
|
||||
};
|
||||
|
||||
void TRP_RANGE::trace_basic_info(PARAM *param,
|
||||
@@ -2320,9 +2320,9 @@ class TRP_ROR_INTERSECT : public TABLE_READ_PLAN
|
||||
{
|
||||
public:
|
||||
TRP_ROR_INTERSECT() = default; /* Remove gcc warning */
|
||||
virtual ~TRP_ROR_INTERSECT() = default; /* Remove gcc warning */
|
||||
~TRP_ROR_INTERSECT() override = default; /* Remove gcc warning */
|
||||
QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows,
|
||||
MEM_ROOT *parent_alloc);
|
||||
MEM_ROOT *parent_alloc) override;
|
||||
|
||||
/* Array of pointers to ROR range scans used in this intersection */
|
||||
struct st_ror_scan_info **first_scan;
|
||||
@@ -2331,7 +2331,7 @@ public:
|
||||
bool is_covering; /* TRUE if no row retrieval phase is necessary */
|
||||
double index_scan_costs; /* SUM(cost(index_scan)) */
|
||||
void trace_basic_info(PARAM *param,
|
||||
Json_writer_object *trace_object) const;
|
||||
Json_writer_object *trace_object) const override;
|
||||
};
|
||||
|
||||
|
||||
@@ -2346,13 +2346,13 @@ class TRP_ROR_UNION : public TABLE_READ_PLAN
|
||||
{
|
||||
public:
|
||||
TRP_ROR_UNION() = default; /* Remove gcc warning */
|
||||
virtual ~TRP_ROR_UNION() = default; /* Remove gcc warning */
|
||||
~TRP_ROR_UNION() override = default; /* Remove gcc warning */
|
||||
QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows,
|
||||
MEM_ROOT *parent_alloc);
|
||||
MEM_ROOT *parent_alloc) override;
|
||||
TABLE_READ_PLAN **first_ror; /* array of ptrs to plans for merged scans */
|
||||
TABLE_READ_PLAN **last_ror; /* end of the above array */
|
||||
void trace_basic_info(PARAM *param,
|
||||
Json_writer_object *trace_object) const;
|
||||
Json_writer_object *trace_object) const override;
|
||||
};
|
||||
|
||||
void TRP_ROR_UNION::trace_basic_info(PARAM *param,
|
||||
@@ -2379,15 +2379,15 @@ class TRP_INDEX_INTERSECT : public TABLE_READ_PLAN
|
||||
{
|
||||
public:
|
||||
TRP_INDEX_INTERSECT() = default; /* Remove gcc warning */
|
||||
virtual ~TRP_INDEX_INTERSECT() = default; /* Remove gcc warning */
|
||||
~TRP_INDEX_INTERSECT() override = default; /* Remove gcc warning */
|
||||
QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows,
|
||||
MEM_ROOT *parent_alloc);
|
||||
MEM_ROOT *parent_alloc) override;
|
||||
TRP_RANGE **range_scans; /* array of ptrs to plans of intersected scans */
|
||||
TRP_RANGE **range_scans_end; /* end of the array */
|
||||
/* keys whose scans are to be filtered by cpk conditions */
|
||||
key_map filtered_scans;
|
||||
void trace_basic_info(PARAM *param,
|
||||
Json_writer_object *trace_object) const;
|
||||
Json_writer_object *trace_object) const override;
|
||||
|
||||
};
|
||||
|
||||
@@ -2416,13 +2416,13 @@ class TRP_INDEX_MERGE : public TABLE_READ_PLAN
|
||||
{
|
||||
public:
|
||||
TRP_INDEX_MERGE() = default; /* Remove gcc warning */
|
||||
virtual ~TRP_INDEX_MERGE() = default; /* Remove gcc warning */
|
||||
~TRP_INDEX_MERGE() override = default; /* Remove gcc warning */
|
||||
QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows,
|
||||
MEM_ROOT *parent_alloc);
|
||||
MEM_ROOT *parent_alloc) override;
|
||||
TRP_RANGE **range_scans; /* array of ptrs to plans of merged scans */
|
||||
TRP_RANGE **range_scans_end; /* end of the array */
|
||||
void trace_basic_info(PARAM *param,
|
||||
Json_writer_object *trace_object) const;
|
||||
Json_writer_object *trace_object) const override;
|
||||
};
|
||||
|
||||
void TRP_INDEX_MERGE::trace_basic_info(PARAM *param,
|
||||
@@ -2484,13 +2484,13 @@ public:
|
||||
if (key_infix_len)
|
||||
memcpy(this->key_infix, key_infix_arg, key_infix_len);
|
||||
}
|
||||
virtual ~TRP_GROUP_MIN_MAX() = default; /* Remove gcc warning */
|
||||
~TRP_GROUP_MIN_MAX() override = default; /* Remove gcc warning */
|
||||
|
||||
QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows,
|
||||
MEM_ROOT *parent_alloc);
|
||||
MEM_ROOT *parent_alloc) override;
|
||||
void use_index_scan() { is_index_scan= TRUE; }
|
||||
void trace_basic_info(PARAM *param,
|
||||
Json_writer_object *trace_object) const;
|
||||
Json_writer_object *trace_object) const override;
|
||||
};
|
||||
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user