mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Manual merge of mysql-trunk into mysql-trunk-merge.
Conflicts: Text conflict in client/mysqlbinlog.cc Text conflict in mysql-test/Makefile.am Text conflict in mysql-test/collections/default.daily Text conflict in mysql-test/r/mysqlbinlog_row_innodb.result Text conflict in mysql-test/suite/rpl/r/rpl_typeconv_innodb.result Text conflict in mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test Text conflict in mysql-test/suite/rpl/t/rpl_row_create_table.test Text conflict in mysql-test/suite/rpl/t/rpl_slave_skip.test Text conflict in mysql-test/suite/rpl/t/rpl_typeconv_innodb.test Text conflict in mysys/charset.c Text conflict in sql/field.cc Text conflict in sql/field.h Text conflict in sql/item.h Text conflict in sql/item_func.cc Text conflict in sql/log.cc Text conflict in sql/log_event.cc Text conflict in sql/log_event_old.cc Text conflict in sql/mysqld.cc Text conflict in sql/rpl_utility.cc Text conflict in sql/rpl_utility.h Text conflict in sql/set_var.cc Text conflict in sql/share/Makefile.am Text conflict in sql/sql_delete.cc Text conflict in sql/sql_plugin.cc Text conflict in sql/sql_select.cc Text conflict in sql/sql_table.cc Text conflict in storage/example/ha_example.h Text conflict in storage/federated/ha_federated.cc Text conflict in storage/myisammrg/ha_myisammrg.cc Text conflict in storage/myisammrg/myrg_open.c
This commit is contained in:
@ -1105,6 +1105,8 @@ CREATE PROCEDURE p1 ()
|
||||
BEGIN
|
||||
DECLARE i INT DEFAULT 50;
|
||||
DECLARE cnt INT;
|
||||
# Continue even in the presence of ER_LOCK_DEADLOCK.
|
||||
DECLARE CONTINUE HANDLER FOR 1213 BEGIN END;
|
||||
START TRANSACTION;
|
||||
ALTER TABLE t1 ENGINE=InnoDB;
|
||||
COMMIT;
|
||||
@ -1618,6 +1620,7 @@ a b
|
||||
SELECT * FROM t1;
|
||||
a b
|
||||
1 init+con1+con2
|
||||
COMMIT;
|
||||
# Switch to connection con1
|
||||
# 3. test for updated key column:
|
||||
TRUNCATE t1;
|
||||
@ -2337,6 +2340,7 @@ Packed NULL
|
||||
Null
|
||||
Index_type BTREE
|
||||
Comment
|
||||
Index_comment
|
||||
Table t1
|
||||
Non_unique 0
|
||||
Key_name k
|
||||
@ -2349,6 +2353,7 @@ Packed NULL
|
||||
Null
|
||||
Index_type BTREE
|
||||
Comment
|
||||
Index_comment
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
#
|
||||
@ -2371,3 +2376,28 @@ t2 CREATE TABLE `t2` (
|
||||
CONSTRAINT `x` FOREIGN KEY (`fk`) REFERENCES `t1` (`pk`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
drop table t2, t1;
|
||||
#
|
||||
# Bug#44613 SELECT statement inside FUNCTION takes a shared lock
|
||||
#
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP FUNCTION IF EXISTS f1;
|
||||
CREATE TABLE t1(x INT PRIMARY KEY, y INT) ENGINE=innodb;
|
||||
INSERT INTO t1 VALUES (1, 0), (2, 0);
|
||||
CREATE FUNCTION f1(z INT) RETURNS INT READS SQL DATA
|
||||
RETURN (SELECT x FROM t1 WHERE x = z);
|
||||
# Connection default
|
||||
START TRANSACTION;
|
||||
SELECT f1(1);
|
||||
f1(1)
|
||||
1
|
||||
# Connection con2
|
||||
START TRANSACTION;
|
||||
SELECT f1(1);
|
||||
f1(1)
|
||||
1
|
||||
UPDATE t1 SET y = 1 WHERE x = 1;
|
||||
COMMIT;
|
||||
# Connection default
|
||||
COMMIT;
|
||||
DROP TABLE t1;
|
||||
DROP FUNCTION f1;
|
||||
|
Reference in New Issue
Block a user