36 changed files with 278 additions and 157 deletions
-
2CMakeLists.txt
-
4cmake/build_configurations/mysql_release.cmake
-
39cmake/build_depends.cmake
-
57cmake/cpack_rpm.cmake
-
20cmake/cpack_source_ignore_files.cmake
-
9cmake/maintainer.cmake
-
3cmake/plugin.cmake
-
14cmake/systemd.cmake
-
26include/mysql/client_plugin.h
-
9mysql-test/r/type_blob.result
-
17mysql-test/suite/binlog/r/binlog_innodb_stm.result
-
26mysql-test/suite/binlog/t/binlog_innodb_stm.test
-
15mysql-test/suite/rpl/r/rpl_slave_invalid_external_user.result
-
42mysql-test/suite/rpl/t/rpl_slave_invalid_external_user.test
-
5mysql-test/t/type_blob.test
-
1plugin/auth_pam/CMakeLists.txt
-
6sql/log.cc
-
27sql/share/errmsg-utf8.txt
-
1sql/sp_head.cc
-
6sql/sql_admin.cc
-
20sql/sql_class.cc
-
5sql/sql_table.cc
-
4sql/wsrep_sst.cc
-
31storage/connect/CMakeLists.txt
-
4storage/connect/ha_connect.h
-
4storage/connect/mycat.cc
-
2storage/mroonga/lib/mrn_context_pool.cpp
-
6storage/spider/spd_table.cc
-
4storage/xtradb/btr/btr0scrub.cc
-
4storage/xtradb/fil/fil0crypt.cc
-
6storage/xtradb/fil/fil0fil.cc
-
2storage/xtradb/handler/ha_innodb.cc
-
2storage/xtradb/include/univ.i
-
2storage/xtradb/lock/lock0lock.cc
-
8storage/xtradb/row/row0mysql.cc
-
2unittest/sql/mf_iocache-t.cc
@ -0,0 +1,39 @@ |
|||
IF(RPM) |
|||
MACRO(FIND_DEP V) |
|||
SET(out ${V}_DEP) |
|||
IF (NOT DEFINED ${out}) |
|||
IF(EXISTS ${${V}} AND NOT IS_DIRECTORY ${${V}}) |
|||
EXECUTE_PROCESS(COMMAND ${ARGN} RESULT_VARIABLE res OUTPUT_VARIABLE O OUTPUT_STRIP_TRAILING_WHITESPACE) |
|||
ELSE() |
|||
SET(res 1) |
|||
ENDIF() |
|||
IF (res) |
|||
SET(O) |
|||
ELSE() |
|||
MESSAGE(STATUS "Need ${O} for ${${V}}") |
|||
ENDIF() |
|||
SET(${out} ${O} CACHE INTERNAL "Package that contains ${${V}}" FORCE) |
|||
ENDIF() |
|||
ENDMACRO() |
|||
|
|||
GET_CMAKE_PROPERTY(ALL_VARS CACHE_VARIABLES) |
|||
FOREACH (V ${ALL_VARS}) |
|||
GET_PROPERTY(H CACHE ${V} PROPERTY HELPSTRING) |
|||
IF (H MATCHES "^Have library [^/]" AND ${V}) |
|||
STRING(REGEX REPLACE "^Have library " "" L ${H}) |
|||
SET(V ${L}_LIBRARY) |
|||
FIND_LIBRARY(${V} ${L}) |
|||
ENDIF() |
|||
GET_PROPERTY(T CACHE ${V} PROPERTY TYPE) |
|||
IF ((T STREQUAL FILEPATH OR V MATCHES "^CMAKE_COMMAND$") AND ${V} MATCHES "^/") |
|||
IF (RPM) |
|||
FIND_DEP(${V} rpm -q --qf "%{NAME}" -f ${${V}}) |
|||
ELSE() # must be DEB |
|||
MESSAGE(FATAL_ERROR "Not implemented") |
|||
ENDIF () |
|||
SET(BUILD_DEPS ${BUILD_DEPS} ${${V}_DEP}) |
|||
ENDIF() |
|||
ENDFOREACH() |
|||
LIST(REMOVE_DUPLICATES BUILD_DEPS) |
|||
STRING(REPLACE ";" " " CPACK_RPM_BUILDREQUIRES "${BUILD_DEPS}") |
|||
ENDIF(RPM) |
@ -0,0 +1,17 @@ |
|||
create table categories( |
|||
cat_id int not null primary key, |
|||
cat_name varchar(255) not null, |
|||
cat_description text |
|||
) engine=innodb; |
|||
create table products( |
|||
prd_id int not null auto_increment primary key, |
|||
prd_name varchar(355) not null, |
|||
prd_price decimal, |
|||
cat_id int not null, |
|||
foreign key fk_cat(cat_id) |
|||
references categories(cat_id) |
|||
on update cascade |
|||
) engine=innodb; |
|||
insert into categories values (1, 'drinks', 'drinks'); |
|||
update categories set cat_description=2 where cat_id=1; |
|||
drop table products, categories; |
@ -0,0 +1,26 @@ |
|||
source include/have_innodb.inc; |
|||
source include/have_binlog_format_statement.inc; |
|||
|
|||
# |
|||
# MDEV-18466 Unsafe to log updates on tables referenced by foreign keys with triggers in statement format |
|||
# |
|||
|
|||
create table categories( |
|||
cat_id int not null primary key, |
|||
cat_name varchar(255) not null, |
|||
cat_description text |
|||
) engine=innodb; |
|||
|
|||
create table products( |
|||
prd_id int not null auto_increment primary key, |
|||
prd_name varchar(355) not null, |
|||
prd_price decimal, |
|||
cat_id int not null, |
|||
foreign key fk_cat(cat_id) |
|||
references categories(cat_id) |
|||
on update cascade |
|||
) engine=innodb; |
|||
|
|||
insert into categories values (1, 'drinks', 'drinks'); |
|||
update categories set cat_description=2 where cat_id=1; |
|||
drop table products, categories; |
@ -0,0 +1,15 @@ |
|||
include/master-slave.inc |
|||
[connection master] |
|||
CREATE USER test_user@localhost; |
|||
SET PASSWORD FOR test_user@localhost = password('PWD'); |
|||
GRANT ALL ON *.* TO test_user@localhost WITH GRANT OPTION; |
|||
connect conn_test,localhost,test_user,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; |
|||
connection conn_test; |
|||
CREATE TABLE t1 (f1 INT); |
|||
CREATE TABLE t2 (f2 VARCHAR(64)); |
|||
CREATE TRIGGER tr_before BEFORE INSERT ON t1 FOR EACH ROW INSERT INTO t2 SELECT variable_name FROM INFORMATION_SCHEMA.SESSION_VARIABLES; |
|||
CREATE DEFINER='root'@'localhost' TRIGGER tr_after AFTER INSERT ON t1 FOR EACH ROW INSERT INTO t2 SELECT variable_name FROM INFORMATION_SCHEMA.SESSION_VARIABLES; |
|||
INSERT INTO t1 VALUES (1); |
|||
DROP USER 'test_user'@'localhost'; |
|||
DROP TABLE t1, t2; |
|||
include/rpl_end.inc |
@ -0,0 +1,42 @@ |
|||
# ==== Purpose ==== |
|||
# |
|||
# Test verifies that when applier thread tries to access 'variable_name' of |
|||
# INFORMATION_SCHEMA.SESSION_VARIABLES table through triggers it successfully |
|||
# retrieves all the session variables. |
|||
# |
|||
# ==== Implementation ==== |
|||
# |
|||
# Steps: |
|||
# 0 - Create two tables t1 and t2. |
|||
# 1 - Create a trigger such that it reads the names of all session variables |
|||
# from INFORMATION_SCHEMA.SESSION_VARIABLES table and populates one of the |
|||
# tables. |
|||
# 2 - Do a DML on master and wait for it to be replicated and ensure that |
|||
# slave is in sync with master and it is up and running. |
|||
# |
|||
# ==== References ==== |
|||
# |
|||
# MDEV-14784: Slave crashes in show_status_array upon running a trigger with |
|||
# select from I_S |
|||
|
|||
--source include/master-slave.inc |
|||
--source include/have_binlog_format_mixed.inc |
|||
--enable_connect_log |
|||
CREATE USER test_user@localhost; |
|||
SET PASSWORD FOR test_user@localhost = password('PWD'); |
|||
GRANT ALL ON *.* TO test_user@localhost WITH GRANT OPTION; |
|||
connect(conn_test,localhost,test_user,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); |
|||
|
|||
--connection conn_test |
|||
CREATE TABLE t1 (f1 INT); |
|||
CREATE TABLE t2 (f2 VARCHAR(64)); |
|||
CREATE TRIGGER tr_before BEFORE INSERT ON t1 FOR EACH ROW INSERT INTO t2 SELECT variable_name FROM INFORMATION_SCHEMA.SESSION_VARIABLES; |
|||
CREATE DEFINER='root'@'localhost' TRIGGER tr_after AFTER INSERT ON t1 FOR EACH ROW INSERT INTO t2 SELECT variable_name FROM INFORMATION_SCHEMA.SESSION_VARIABLES; |
|||
|
|||
INSERT INTO t1 VALUES (1); |
|||
--disable_connect_log |
|||
# Cleanup |
|||
--connection master |
|||
DROP USER 'test_user'@'localhost'; |
|||
DROP TABLE t1, t2; |
|||
--source include/rpl_end.inc |
Write
Preview
Loading…
Cancel
Save
Reference in new issue