234 changed files with 2391 additions and 771 deletions
-
13include/mysql/psi/mysql_file.h
-
13include/mysql/psi/mysql_idle.h
-
18include/mysql/psi/mysql_socket.h
-
13include/mysql/psi/mysql_stage.h
-
13include/mysql/psi/mysql_statement.h
-
13include/mysql/psi/mysql_table.h
-
13include/mysql/psi/mysql_thread.h
-
13include/mysql/psi/psi.h
-
13include/mysql/psi/psi_abi_v0.h
-
13include/mysql/psi/psi_abi_v1.h
-
13include/mysql/psi/psi_abi_v2.h
-
2libmariadb
-
10mysql-test/main/connect_debug.result
-
15mysql-test/main/connect_debug.test
-
1mysql-test/main/insert_debug-master.opt
-
29mysql-test/main/insert_debug.result
-
54mysql-test/main/insert_debug.test
-
11mysql-test/main/uniques_crash-7912.result
-
26mysql-test/main/uniques_crash-7912.test
-
50mysql-test/suite/galera/r/galera_rsu_drop_pk.result
-
28mysql-test/suite/galera/t/galera_rsu_drop_pk.test
-
13mysql-test/suite/perfschema/t/ddl_esms_by_digest.test
-
13mysql-test/suite/perfschema/t/dml_esms_by_digest.test
-
5sql-common/client.c
-
4sql/slave.cc
-
1sql/sql_acl.cc
-
12sql/uniques.h
-
11storage/connect/CMakeLists.txt
-
6storage/connect/ha_connect.cc
-
2storage/connect/inihandl.cpp
-
1storage/connect/mysql-test/connect/disabled.def
-
89storage/connect/mysql-test/connect/t/ini_grant.result
-
12storage/connect/reldef.cpp
-
2storage/connect/restget.cpp
-
36storage/connect/tabrest.cpp
-
4storage/connect/tabrest.h
-
15storage/perfschema/CMakeLists.txt
-
13storage/perfschema/cursor_by_account.cc
-
13storage/perfschema/cursor_by_account.h
-
13storage/perfschema/cursor_by_host.cc
-
13storage/perfschema/cursor_by_host.h
-
13storage/perfschema/cursor_by_thread.cc
-
13storage/perfschema/cursor_by_thread.h
-
13storage/perfschema/cursor_by_thread_connect_attr.cc
-
13storage/perfschema/cursor_by_thread_connect_attr.h
-
13storage/perfschema/cursor_by_user.cc
-
13storage/perfschema/cursor_by_user.h
-
13storage/perfschema/gen_pfs_lex_token.cc
-
13storage/perfschema/ha_perfschema.cc
-
13storage/perfschema/ha_perfschema.h
-
13storage/perfschema/pfs.cc
-
13storage/perfschema/pfs.h
-
13storage/perfschema/pfs_account.cc
-
13storage/perfschema/pfs_account.h
-
13storage/perfschema/pfs_atomic.h
-
13storage/perfschema/pfs_autosize.cc
-
13storage/perfschema/pfs_column_types.h
-
13storage/perfschema/pfs_column_values.cc
-
13storage/perfschema/pfs_column_values.h
-
13storage/perfschema/pfs_con_slice.cc
-
13storage/perfschema/pfs_con_slice.h
-
13storage/perfschema/pfs_defaults.cc
-
13storage/perfschema/pfs_defaults.h
-
13storage/perfschema/pfs_digest.cc
-
13storage/perfschema/pfs_digest.h
-
13storage/perfschema/pfs_engine_table.cc
-
13storage/perfschema/pfs_engine_table.h
-
13storage/perfschema/pfs_events.h
-
13storage/perfschema/pfs_events_stages.cc
-
13storage/perfschema/pfs_events_stages.h
-
13storage/perfschema/pfs_events_statements.cc
-
13storage/perfschema/pfs_events_statements.h
-
13storage/perfschema/pfs_events_waits.cc
-
13storage/perfschema/pfs_events_waits.h
-
13storage/perfschema/pfs_global.cc
-
13storage/perfschema/pfs_global.h
-
13storage/perfschema/pfs_host.cc
-
13storage/perfschema/pfs_host.h
-
13storage/perfschema/pfs_instr.cc
-
13storage/perfschema/pfs_instr.h
-
13storage/perfschema/pfs_instr_class.cc
-
13storage/perfschema/pfs_instr_class.h
-
13storage/perfschema/pfs_lock.h
-
13storage/perfschema/pfs_server.cc
-
13storage/perfschema/pfs_server.h
-
13storage/perfschema/pfs_setup_actor.cc
-
13storage/perfschema/pfs_setup_actor.h
-
13storage/perfschema/pfs_setup_object.cc
-
13storage/perfschema/pfs_setup_object.h
-
13storage/perfschema/pfs_stat.h
-
13storage/perfschema/pfs_timer.cc
-
13storage/perfschema/pfs_timer.h
-
13storage/perfschema/pfs_user.cc
-
13storage/perfschema/pfs_user.h
-
13storage/perfschema/pfs_visitor.cc
-
13storage/perfschema/pfs_visitor.h
-
13storage/perfschema/table_accounts.cc
-
13storage/perfschema/table_accounts.h
-
13storage/perfschema/table_all_instr.cc
-
13storage/perfschema/table_all_instr.h
@ -1 +1 @@ |
|||
Subproject commit 63df45ce3df3fbc04d8fab9bceb77f9d1cccd4aa |
|||
Subproject commit a1283d0b10a3b675bede48d9fe2d082865a24a6c |
|||
@ -0,0 +1 @@ |
|||
--innodb_autoinc_lock_mode=2 |
|||
@ -0,0 +1,29 @@ |
|||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; |
|||
connect con1, localhost, root,,; |
|||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; |
|||
connection default; |
|||
CREATE TABLE t1(c1 VARCHAR(10) NOT NULL, c2 VARCHAR(10) NOT NULL, c3 VARCHAR(10) NOT NULL); |
|||
INSERT INTO t1(c1, c2, c3) VALUES('A1','B1','IT1'), ('A2','B2','IT1'), ('A3','B3','IT1'), ('A4','B4','IT1'), ('A5','B5','IT1'), ('A6','B6','IT1'), ('A7','B7','IT1'); |
|||
CREATE TABLE t2(c1 VARCHAR(10) NOT NULL, c2 VARCHAR(10) NOT NULL, c3 VARCHAR(10) NOT NULL); |
|||
INSERT INTO t2(c1, c2, c3) VALUES ('A3','B3','IT2'), ('A2','B2','IT2'), ('A4','B4','IT2'), ('A5','B5','II2'); |
|||
CREATE TABLE result(id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, c1 VARCHAR(10) NOT NULL, c2 VARCHAR(10), |
|||
c3 VARCHAR(10), update_count INT DEFAULT 0, UNIQUE KEY uniq_idx (c1,c2), PRIMARY KEY (id)) ENGINE = innodb; |
|||
SET DEBUG_SYNC = "ha_write_row_end WAIT_FOR flushed EXECUTE 1"; |
|||
INSERT INTO result(c1, c2, c3) SELECT * FROM t1 ON DUPLICATE KEY UPDATE c2=t1.c2, c3='UT1', update_count=update_count+1; |
|||
connection con1; |
|||
INSERT INTO result(c1, c2, c3) SELECT * FROM t2 ON DUPLICATE KEY UPDATE c2=t2.c2, c3='UT2', update_count=update_count+1; |
|||
SET DEBUG_SYNC = "now SIGNAL flushed"; |
|||
connection default; |
|||
SELECT * FROM result; |
|||
id c1 c2 c3 update_count |
|||
1 A1 B1 IT1 0 |
|||
2 A3 B3 UT1 1 |
|||
3 A2 B2 UT1 1 |
|||
4 A4 B4 UT1 1 |
|||
5 A5 B5 UT1 1 |
|||
9 A6 B6 IT1 0 |
|||
10 A7 B7 IT1 0 |
|||
DROP TABLE t1; |
|||
DROP TABLE t2; |
|||
DROP TABLE result; |
|||
SET DEBUG_SYNC = "RESET"; |
|||
@ -0,0 +1,54 @@ |
|||
source include/have_innodb.inc; |
|||
source include/have_debug.inc; |
|||
source include/have_debug_sync.inc; |
|||
|
|||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; |
|||
|
|||
connect (con1, localhost, root,,); |
|||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; |
|||
|
|||
connection default; |
|||
|
|||
let $conn0_id= `SELECT CONNECTION_ID()`; |
|||
|
|||
CREATE TABLE t1(c1 VARCHAR(10) NOT NULL, c2 VARCHAR(10) NOT NULL, c3 VARCHAR(10) NOT NULL); |
|||
INSERT INTO t1(c1, c2, c3) VALUES('A1','B1','IT1'), ('A2','B2','IT1'), ('A3','B3','IT1'), ('A4','B4','IT1'), ('A5','B5','IT1'), ('A6','B6','IT1'), ('A7','B7','IT1'); |
|||
|
|||
CREATE TABLE t2(c1 VARCHAR(10) NOT NULL, c2 VARCHAR(10) NOT NULL, c3 VARCHAR(10) NOT NULL); |
|||
INSERT INTO t2(c1, c2, c3) VALUES ('A3','B3','IT2'), ('A2','B2','IT2'), ('A4','B4','IT2'), ('A5','B5','II2'); |
|||
|
|||
CREATE TABLE result(id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, c1 VARCHAR(10) NOT NULL, c2 VARCHAR(10), |
|||
c3 VARCHAR(10), update_count INT DEFAULT 0, UNIQUE KEY uniq_idx (c1,c2), PRIMARY KEY (id)) ENGINE = innodb; |
|||
|
|||
# Insert one row from 't1' into the 'result' table and wait on a debug sync |
|||
# point. The next insert statement from an session 2 inserts values that would |
|||
# lead to unique key clash, when this insert resumes. |
|||
# The subsequent inserts of this statement(after resume) will fail because of a |
|||
# clash with the unique index, and are expected to update the row which clashes |
|||
# with the unique key. |
|||
# Without the fix for bug#30194841 a stale auto increment value, would cause a |
|||
# collision with existing auto increment column value and ends up updating that |
|||
# colliding row, instead of the row colliding with the unique index. |
|||
SET DEBUG_SYNC = "ha_write_row_end WAIT_FOR flushed EXECUTE 1"; |
|||
send INSERT INTO result(c1, c2, c3) SELECT * FROM t1 ON DUPLICATE KEY UPDATE c2=t1.c2, c3='UT1', update_count=update_count+1; |
|||
|
|||
# While session 1 is waiting (after one insert), insert rows that will cause a clash |
|||
# with the inserts of session 1 on the unique key. |
|||
connection con1; |
|||
|
|||
# Wait for the session 1 to hit the debug sync point. |
|||
let $wait_condition=SELECT 1 FROM information_schema.processlist WHERE id = $conn0_id AND state LIKE '%ha_write_row_end%'; |
|||
--source include/wait_condition.inc |
|||
|
|||
INSERT INTO result(c1, c2, c3) SELECT * FROM t2 ON DUPLICATE KEY UPDATE c2=t2.c2, c3='UT2', update_count=update_count+1; |
|||
|
|||
# Signal to resume the insert statement in session 1 |
|||
SET DEBUG_SYNC = "now SIGNAL flushed"; |
|||
connection default; |
|||
reap; |
|||
SELECT * FROM result; |
|||
|
|||
DROP TABLE t1; |
|||
DROP TABLE t2; |
|||
DROP TABLE result; |
|||
SET DEBUG_SYNC = "RESET"; |
|||
@ -1,11 +0,0 @@ |
|||
call mtr.add_suppression("Out of memory"); |
|||
set sql_mode=""; |
|||
drop table if exists t1,t2; |
|||
create table `t1` (`a` datetime not null) engine=InnoDB; |
|||
create table `t2` (`a` int not null) engine=innodb; |
|||
replace into t1 values (),(); |
|||
insert into t2 values(0); |
|||
set session sort_buffer_size = 1024*1024*1024*1024; |
|||
delete d2 from t2 as d1, t1 as d2 where d1.a <=> d2.a; |
|||
drop table t2; |
|||
drop table t1; |
|||
@ -1,26 +0,0 @@ |
|||
# |
|||
# MDEV-7912 |
|||
# |
|||
# multitable delete with wrongly set sort_buffer_size crashes in merge_buffers |
|||
|
|||
--source include/have_innodb.inc |
|||
--source include/have_debug.inc |
|||
--source include/windows.inc |
|||
|
|||
call mtr.add_suppression("Out of memory"); |
|||
|
|||
set sql_mode=""; |
|||
--disable_warnings |
|||
drop table if exists t1,t2; |
|||
create table `t1` (`a` datetime not null) engine=InnoDB; |
|||
create table `t2` (`a` int not null) engine=innodb; |
|||
replace into t1 values (),(); |
|||
insert into t2 values(0); |
|||
set session sort_buffer_size = 1024*1024*1024*1024; |
|||
#Either fail with EE_OUTOFMEMORY, or succeed |
|||
--error 0 , 5 |
|||
delete d2 from t2 as d1, t1 as d2 where d1.a <=> d2.a; |
|||
--enable_warnings |
|||
|
|||
drop table t2; |
|||
drop table t1; |
|||
@ -0,0 +1,89 @@ |
|||
# |
|||
# Checking FILE privileges |
|||
# |
|||
set sql_mode=""; |
|||
GRANT ALL PRIVILEGES ON *.* TO user@localhost; |
|||
REVOKE FILE ON *.* FROM user@localhost; |
|||
set sql_mode=default; |
|||
connect user,localhost,user,,; |
|||
connection user; |
|||
SELECT user(); |
|||
user() |
|||
user@localhost |
|||
CREATE TABLE t1 (sec CHAR(10) NOT NULL FLAG=1, val CHAR(10) NOT NULL) ENGINE=CONNECT TABLE_TYPE=INI; |
|||
Warnings: |
|||
Warning 1105 No file name. Table will use t1.ini |
|||
INSERT INTO t1 VALUES ('sec1','val1'); |
|||
SELECT * FROM t1; |
|||
sec val |
|||
sec1 val1 |
|||
UPDATE t1 SET val='val11'; |
|||
SELECT * FROM t1; |
|||
sec val |
|||
sec1 val11 |
|||
DELETE FROM t1; |
|||
SELECT * FROM t1; |
|||
sec val |
|||
INSERT INTO t1 VALUES('sec2','val2'); |
|||
TRUNCATE TABLE t1; |
|||
SELECT * FROM t1; |
|||
sec val |
|||
CREATE VIEW v1 AS SELECT * FROM t1; |
|||
SELECT * FROM v1; |
|||
sec val |
|||
DROP VIEW v1; |
|||
DROP TABLE t1; |
|||
CREATE TABLE t1 (sec CHAR(10) NOT NULL FLAG=1, val CHAR(10) NOT NULL) ENGINE=CONNECT TABLE_TYPE=INI FILE_NAME='t1.EXT'; |
|||
ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation |
|||
connection default; |
|||
SELECT user(); |
|||
user() |
|||
root@localhost |
|||
CREATE TABLE t1 (sec CHAR(10) NOT NULL FLAG=1, val CHAR(10) NOT NULL) ENGINE=CONNECT TABLE_TYPE=INI FILE_NAME='t1.EXT'; |
|||
INSERT INTO t1 VALUES ('sec1','val1'); |
|||
connection user; |
|||
SELECT user(); |
|||
user() |
|||
user@localhost |
|||
INSERT INTO t1 VALUES ('sec2','val2'); |
|||
ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation |
|||
SELECT * FROM t1; |
|||
ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation |
|||
UPDATE t1 SET val='val11'; |
|||
ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation |
|||
DELETE FROM t1; |
|||
ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation |
|||
TRUNCATE TABLE t1; |
|||
ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation |
|||
ALTER TABLE t1 READONLY=1; |
|||
ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation |
|||
DROP TABLE t1; |
|||
ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation |
|||
CREATE VIEW v1 AS SELECT * FROM t1; |
|||
ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation |
|||
# Testing a VIEW created with FILE privileges but accessed with no FILE |
|||
connection default; |
|||
SELECT user(); |
|||
user() |
|||
root@localhost |
|||
CREATE SQL SECURITY INVOKER VIEW v1 AS SELECT * FROM t1; |
|||
connection user; |
|||
SELECT user(); |
|||
user() |
|||
user@localhost |
|||
SELECT * FROM v1; |
|||
ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation |
|||
INSERT INTO v1 VALUES ('sec3','val3'); |
|||
ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation |
|||
UPDATE v1 SET val='val11'; |
|||
ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation |
|||
DELETE FROM v1; |
|||
ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation |
|||
disconnect user; |
|||
connection default; |
|||
DROP VIEW v1; |
|||
DROP TABLE t1; |
|||
DROP USER user@localhost; |
|||
# |
|||
# Checking FILE privileges: done |
|||
# |
|||
Some files were not shown because too many files changed in this diff
Write
Preview
Loading…
Cancel
Save
Reference in new issue