mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Merge revisions from maria/5.5 (5.5.41)
bzr merge -r4393 lp:maria/5.5
This commit is contained in:
@@ -255,6 +255,7 @@ our $opt_ddd;
|
||||
our $opt_client_ddd;
|
||||
my $opt_boot_ddd;
|
||||
our $opt_manual_gdb;
|
||||
our $opt_manual_lldb;
|
||||
our $opt_manual_dbx;
|
||||
our $opt_manual_ddd;
|
||||
our $opt_manual_debug;
|
||||
@@ -1157,6 +1158,7 @@ sub command_line_setup {
|
||||
'gdb' => \$opt_gdb,
|
||||
'client-gdb' => \$opt_client_gdb,
|
||||
'manual-gdb' => \$opt_manual_gdb,
|
||||
'manual-lldb' => \$opt_manual_lldb,
|
||||
'boot-gdb' => \$opt_boot_gdb,
|
||||
'manual-debug' => \$opt_manual_debug,
|
||||
'ddd' => \$opt_ddd,
|
||||
@@ -1597,8 +1599,9 @@ sub command_line_setup {
|
||||
$opt_debugger= undef;
|
||||
}
|
||||
|
||||
if ( $opt_gdb || $opt_ddd || $opt_manual_gdb || $opt_manual_ddd ||
|
||||
$opt_manual_debug || $opt_debugger || $opt_dbx || $opt_manual_dbx)
|
||||
if ( $opt_gdb || $opt_ddd || $opt_manual_gdb || $opt_manual_lldb ||
|
||||
$opt_manual_ddd || $opt_manual_debug || $opt_debugger || $opt_dbx ||
|
||||
$opt_manual_dbx)
|
||||
{
|
||||
mtr_error("You need to use the client debug options for the",
|
||||
"embedded server. Ex: --client-gdb");
|
||||
@@ -1625,9 +1628,9 @@ sub command_line_setup {
|
||||
# --------------------------------------------------------------------------
|
||||
# Check debug related options
|
||||
# --------------------------------------------------------------------------
|
||||
if ( $opt_gdb || $opt_client_gdb || $opt_ddd || $opt_client_ddd ||
|
||||
$opt_manual_gdb || $opt_manual_ddd || $opt_manual_debug ||
|
||||
$opt_dbx || $opt_client_dbx || $opt_manual_dbx ||
|
||||
if ( $opt_gdb || $opt_client_gdb || $opt_ddd || $opt_client_ddd ||
|
||||
$opt_manual_gdb || $opt_manual_lldb || $opt_manual_ddd ||
|
||||
$opt_manual_debug || $opt_dbx || $opt_client_dbx || $opt_manual_dbx ||
|
||||
$opt_debugger || $opt_client_debugger )
|
||||
{
|
||||
if ( using_extern() )
|
||||
@@ -2488,6 +2491,14 @@ sub environment_setup {
|
||||
"$bindir/sql$opt_vs_config/mysql_tzinfo_to_sql");
|
||||
$ENV{'MYSQL_TZINFO_TO_SQL'}= native_path($exe_mysql_tzinfo_to_sql);
|
||||
|
||||
# ----------------------------------------------------
|
||||
# replace
|
||||
# ----------------------------------------------------
|
||||
my $exe_replace= mtr_exe_exists(vs_config_dirs('extra', 'replace'),
|
||||
"$basedir/extra/replace",
|
||||
"$path_client_bindir/replace");
|
||||
$ENV{'REPLACE'}= native_path($exe_replace);
|
||||
|
||||
# Create an environment variable to make it possible
|
||||
# to detect that valgrind is being used from test cases
|
||||
$ENV{'VALGRIND_TEST'}= $opt_valgrind;
|
||||
@@ -5475,6 +5486,10 @@ sub mysqld_start ($$) {
|
||||
{
|
||||
gdb_arguments(\$args, \$exe, $mysqld->name());
|
||||
}
|
||||
elsif ( $opt_manual_lldb )
|
||||
{
|
||||
lldb_arguments(\$args, \$exe, $mysqld->name());
|
||||
}
|
||||
elsif ( $opt_ddd || $opt_manual_ddd )
|
||||
{
|
||||
ddd_arguments(\$args, \$exe, $mysqld->name());
|
||||
@@ -6021,7 +6036,6 @@ sub start_mysqltest ($) {
|
||||
return $proc;
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Modify the exe and args so that program is run in gdb in xterm
|
||||
#
|
||||
@@ -6072,6 +6086,32 @@ sub gdb_arguments {
|
||||
$$exe= "xterm";
|
||||
}
|
||||
|
||||
#
|
||||
# Modify the exe and args so that program is run in lldb
|
||||
#
|
||||
sub lldb_arguments {
|
||||
my $args= shift;
|
||||
my $exe= shift;
|
||||
my $type= shift;
|
||||
my $input= shift;
|
||||
|
||||
my $lldb_init_file= "$opt_vardir/tmp/lldbinit.$type";
|
||||
unlink($lldb_init_file);
|
||||
|
||||
# Put $args into a single string
|
||||
my $str= join(" ", @$$args);
|
||||
$input = $input ? "< $input" : "";
|
||||
|
||||
# write init file for mysqld or client
|
||||
mtr_tofile($lldb_init_file, "set args $str $input\n");
|
||||
|
||||
print "\nTo start lldb for $type, type in another window:\n";
|
||||
print "cd $glob_mysql_test_dir && lldb -s $lldb_init_file $$exe\n";
|
||||
|
||||
# Indicate the exe should not be started
|
||||
$$exe= undef;
|
||||
return;
|
||||
}
|
||||
|
||||
#
|
||||
# Modify the exe and args so that program is run in ddd
|
||||
@@ -6481,6 +6521,8 @@ Options for debugging the product
|
||||
test(s)
|
||||
manual-dbx Let user manually start mysqld in dbx, before running
|
||||
test(s)
|
||||
manual-lldb Let user manually start mysqld in lldb, before running
|
||||
test(s)
|
||||
max-save-core Limit the number of core files saved (to avoid filling
|
||||
up disks for heavily crashing server). Defaults to
|
||||
$opt_max_save_core, set to 0 for no limit. Set
|
||||
|
9
mysql-test/r/insert_update_autoinc-7150.result
Normal file
9
mysql-test/r/insert_update_autoinc-7150.result
Normal file
@@ -0,0 +1,9 @@
|
||||
create table t1 (a int(10) auto_increment primary key, b int(11));
|
||||
insert t1 values (null,1);
|
||||
insert t1 values (null,2), (1,-1), (null,3) on duplicate key update b=values(b);
|
||||
select * from t1;
|
||||
a b
|
||||
1 -1
|
||||
2 2
|
||||
3 3
|
||||
drop table t1;
|
@@ -773,3 +773,54 @@ Warning 1356 View 'test.v1' references invalid table(s) or column(s) or function
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#19070633 - POSSIBLE ACCESS TO FREED MEMORY IN IS_FREE_LOCK() AND IS_USED_LOCK().
|
||||
#
|
||||
# Verifying issue for IS_FREE_LOCK() function.
|
||||
SELECT GET_LOCK("lock_19070633", 600);
|
||||
GET_LOCK("lock_19070633", 600)
|
||||
1
|
||||
connect con1, localhost, root,,;
|
||||
# Waiting after getting user level lock info and releasing mutex.
|
||||
SET DEBUG_SYNC= 'after_getting_user_level_lock_info SIGNAL parked WAIT_FOR go';
|
||||
# Sending: SELECT IS_FREE_LOCK("lock_19070633");
|
||||
SELECT IS_FREE_LOCK("lock_19070633");
|
||||
connection default;
|
||||
SET DEBUG_SYNC= 'now WAIT_FOR parked';
|
||||
SELECT RELEASE_LOCK("lock_19070633");
|
||||
RELEASE_LOCK("lock_19070633")
|
||||
1
|
||||
# Signaling connection con1 after releasing the lock.
|
||||
# Without fix, accessing user level lock info in con1 would result in
|
||||
# crash or valgrind issue invalid read is reported.
|
||||
SET DEBUG_SYNC= 'now SIGNAL go';
|
||||
connection con1;
|
||||
# Reaping: SELECT IS_FREE_LOCK("lock_19070633");
|
||||
IS_FREE_LOCK("lock_19070633")
|
||||
0
|
||||
connection default;
|
||||
# Verifying issue for IS_USED_LOCK() function.
|
||||
SELECT GET_LOCK("lock_19070633", 600);
|
||||
GET_LOCK("lock_19070633", 600)
|
||||
1
|
||||
connection con1;
|
||||
# Waiting after getting user level lock info and releasing mutex.
|
||||
SET DEBUG_SYNC= 'after_getting_user_level_lock_info SIGNAL parked WAIT_FOR go';
|
||||
# Sending: SELECT IS_USED_LOCK("lock_19070633");
|
||||
SELECT IS_USED_LOCK("lock_19070633");
|
||||
connection default;
|
||||
SET DEBUG_SYNC= 'now WAIT_FOR parked';
|
||||
SELECT RELEASE_LOCK("lock_19070633");
|
||||
RELEASE_LOCK("lock_19070633")
|
||||
1
|
||||
# Signaling connection con1 after releasing the lock.
|
||||
# Without fix, accessing user level lock info in con1 would result in
|
||||
# crash or valgrind issue invalid read is reported.
|
||||
SET DEBUG_SYNC= 'now SIGNAL go';
|
||||
connection con1;
|
||||
# Reaping: SELECT IS_USED_LOCK("lock_19070633");
|
||||
IS_USED_LOCK("lock_19070633")
|
||||
#
|
||||
connection default;
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
disconnect con1;
|
||||
|
49
mysql-test/r/mdev6830.result
Normal file
49
mysql-test/r/mdev6830.result
Normal file
@@ -0,0 +1,49 @@
|
||||
drop table if exists t1,t2,t3;
|
||||
drop view if exists v2,v3;
|
||||
CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=MyISAM;
|
||||
CREATE TABLE t2 (
|
||||
f1 DATE,
|
||||
f2 VARCHAR(1024),
|
||||
f3 VARCHAR(10),
|
||||
f4 DATE,
|
||||
f5 VARCHAR(10),
|
||||
f6 VARCHAR(10),
|
||||
f7 VARCHAR(10),
|
||||
f8 DATETIME,
|
||||
f9 INT,
|
||||
f10 VARCHAR(1024),
|
||||
f11 VARCHAR(1024),
|
||||
f12 INT,
|
||||
f13 VARCHAR(1024)
|
||||
) ENGINE=MyISAM;
|
||||
CREATE OR REPLACE VIEW v2 AS SELECT * FROM t2;
|
||||
CREATE TABLE t3 (
|
||||
f1 VARCHAR(1024),
|
||||
f2 VARCHAR(1024),
|
||||
f3 DATETIME,
|
||||
f4 VARCHAR(10),
|
||||
f5 INT,
|
||||
f6 VARCHAR(10),
|
||||
f7 VARCHAR(1024),
|
||||
f8 VARCHAR(10),
|
||||
f9 INT,
|
||||
f10 DATE,
|
||||
f11 INT,
|
||||
f12 VARCHAR(1024),
|
||||
f13 VARCHAR(10),
|
||||
f14 DATE,
|
||||
f15 DATETIME
|
||||
) ENGINE=MyISAM;
|
||||
CREATE OR REPLACE ALGORITHM=TEMPTABLE VIEW v3 AS SELECT * FROM t3;
|
||||
INSERT INTO t3 VALUES
|
||||
('FOO','foo','2000-08-04 00:00:00','one',1,'1','FOO','foo',1,'2004-05-09',1,'one','one','2001-12-07','2001-10-17 08:25:04'),
|
||||
('BAR','bar','2001-01-01 04:52:37','two',2,'2','BAR','bar',2,'2008-01-01',2,'two','two','2006-06-19','2002-01-01 08:22:49');
|
||||
CREATE TABLE t4 (f1 VARCHAR(10), f2 INT) ENGINE=MyISAM;
|
||||
SELECT * FROM t1;
|
||||
pk
|
||||
SELECT non_existing FROM v2;
|
||||
ERROR 42S22: Unknown column 'non_existing' in 'field list'
|
||||
SELECT * FROM t1, v3, t4 WHERE v3.f1 = t4.f1 AND t4.f2 = 6 AND t1.pk = v3.f5;
|
||||
pk f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 f13 f14 f15 f1 f2
|
||||
drop table t1,t2,t3,t4;
|
||||
drop view v2,v3;
|
32
mysql-test/r/sp-innodb.result
Normal file
32
mysql-test/r/sp-innodb.result
Normal file
@@ -0,0 +1,32 @@
|
||||
drop table if exists t1,t2;
|
||||
drop procedure if exists p1;
|
||||
#
|
||||
#MDEV-6985: MariaDB crashes on stored procedure call
|
||||
#
|
||||
CREATE TABLE `t1` (
|
||||
`ID` int(11) NOT NULL,
|
||||
PRIMARY KEY (`ID`)
|
||||
) ENGINE=InnoDB;
|
||||
CREATE TABLE `t2` (
|
||||
`ID` int(11) NOT NULL,
|
||||
`DATE` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`ID`)
|
||||
) ENGINE=InnoDB;
|
||||
CREATE PROCEDURE `p1`()
|
||||
BEGIN
|
||||
DECLARE _mySelect CURSOR FOR
|
||||
SELECT DISTINCT t1.ID
|
||||
FROM t1
|
||||
LEFT JOIN t2 AS t2 ON
|
||||
t2.ID = t1.ID
|
||||
AND t2.DATE = (
|
||||
SELECT MAX(T3.DATE) FROM t2 AS T3 WHERE T3.ID = t2.ID AND T3.DATE<=NOW()
|
||||
)
|
||||
WHERE t1.ID = 1;
|
||||
OPEN _mySelect;
|
||||
CLOSE _mySelect;
|
||||
END ;;
|
||||
CALL p1();
|
||||
CALL p1();
|
||||
drop procedure p1;
|
||||
drop table t1,t2;
|
@@ -60,3 +60,8 @@ SELECT VARIABLE_NAME FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME = 'socket';
|
||||
VARIABLE_NAME
|
||||
SOCKET
|
||||
#
|
||||
# Bug#16581605: REPLACE.EXE UTILITY IS BROKEN IN 5.5
|
||||
#
|
||||
xyz
|
||||
def
|
||||
|
@@ -1,6 +1,5 @@
|
||||
set @save_binlog_format= @@global.binlog_format;
|
||||
set @save_binlog_dirct= @@global.binlog_direct_non_transactional_updates;
|
||||
set @save_sql_log_bin= @@global.sql_log_bin;
|
||||
create table t1 (a int) engine= myisam;
|
||||
create table t2 (a int) engine= innodb;
|
||||
SELECT @@session.binlog_format;
|
||||
@@ -129,7 +128,7 @@ commit;
|
||||
begin;
|
||||
insert into t2 values (5);
|
||||
# Test that the global variable 'binlog_format' and
|
||||
# 'binlog_direct_non_transactional_updates' and 'sql_log_bin' are
|
||||
# 'binlog_direct_non_transactional_updates' are
|
||||
# writable inside a transaction.
|
||||
# Current session values are ROW, FALSE, TRUE respectively.
|
||||
SELECT @@global.binlog_format;
|
||||
@@ -137,20 +136,15 @@ SELECT @@global.binlog_format;
|
||||
ROW
|
||||
set @@global.binlog_format= statement;
|
||||
set @@global.binlog_direct_non_transactional_updates= TRUE;
|
||||
set @@global.sql_log_bin= FALSE;
|
||||
SELECT @@global.binlog_format;
|
||||
@@global.binlog_format
|
||||
STATEMENT
|
||||
SELECT @@global.binlog_direct_non_transactional_updates;
|
||||
@@global.binlog_direct_non_transactional_updates
|
||||
1
|
||||
SELECT @@global.sql_log_bin;
|
||||
@@global.sql_log_bin
|
||||
0
|
||||
commit;
|
||||
set @@global.binlog_format= @save_binlog_format;
|
||||
set @@global.binlog_direct_non_transactional_updates= @save_binlog_dirct;
|
||||
set @@global.sql_log_bin= @save_sql_log_bin;
|
||||
create table t3(a int, b int) engine= innodb;
|
||||
create table t4(a int) engine= innodb;
|
||||
create table t5(a int) engine= innodb;
|
||||
|
@@ -15,7 +15,7 @@ show grants for mysqltest_1@localhost;
|
||||
connect (plain,localhost,mysqltest_1,,test);
|
||||
connect (root,localhost,root,,test);
|
||||
|
||||
# Testing setting both session and global SQL_LOG_BIN variable both as
|
||||
# Testing setting session SQL_LOG_BIN variable both as
|
||||
# root and as plain user.
|
||||
|
||||
--echo **** Variable SQL_LOG_BIN ****
|
||||
|
@@ -10,7 +10,6 @@ source include/have_binlog_format_row.inc;
|
||||
|
||||
set @save_binlog_format= @@global.binlog_format;
|
||||
set @save_binlog_dirct= @@global.binlog_direct_non_transactional_updates;
|
||||
set @save_sql_log_bin= @@global.sql_log_bin;
|
||||
create table t1 (a int) engine= myisam;
|
||||
create table t2 (a int) engine= innodb;
|
||||
|
||||
@@ -117,21 +116,18 @@ commit;
|
||||
begin;
|
||||
insert into t2 values (5);
|
||||
--echo # Test that the global variable 'binlog_format' and
|
||||
--echo # 'binlog_direct_non_transactional_updates' and 'sql_log_bin' are
|
||||
--echo # 'binlog_direct_non_transactional_updates' are
|
||||
--echo # writable inside a transaction.
|
||||
--echo # Current session values are ROW, FALSE, TRUE respectively.
|
||||
SELECT @@global.binlog_format;
|
||||
set @@global.binlog_format= statement;
|
||||
set @@global.binlog_direct_non_transactional_updates= TRUE;
|
||||
set @@global.sql_log_bin= FALSE;
|
||||
SELECT @@global.binlog_format;
|
||||
SELECT @@global.binlog_direct_non_transactional_updates;
|
||||
SELECT @@global.sql_log_bin;
|
||||
commit;
|
||||
|
||||
set @@global.binlog_format= @save_binlog_format;
|
||||
set @@global.binlog_direct_non_transactional_updates= @save_binlog_dirct;
|
||||
set @@global.sql_log_bin= @save_sql_log_bin;
|
||||
|
||||
create table t3(a int, b int) engine= innodb;
|
||||
create table t4(a int) engine= innodb;
|
||||
|
@@ -79,4 +79,5 @@ z
|
||||
31
|
||||
32
|
||||
drop table corrupt_bit_test_ā;
|
||||
DROP DATABASE pad;
|
||||
SET GLOBAL innodb_change_buffering_debug = 0;
|
||||
|
11
mysql-test/suite/innodb/r/insert_debug.result
Normal file
11
mysql-test/suite/innodb/r/insert_debug.result
Normal file
@@ -0,0 +1,11 @@
|
||||
#
|
||||
# Bug#19904003 INNODB_LIMIT_OPTIMISTIC_INSERT_DEBUG=1
|
||||
# CAUSES INFINITE PAGE SPLIT
|
||||
#
|
||||
SET GLOBAL innodb_change_buffering_debug=1;
|
||||
SET GLOBAL innodb_limit_optimistic_insert_debug=1;
|
||||
CREATE TABLE t1(c1 INT PRIMARY KEY) ENGINE=InnoDB
|
||||
PARTITION BY HASH (c1) PARTITIONS 15;
|
||||
DROP TABLE t1;
|
||||
SET GLOBAL innodb_change_buffering_debug=0;
|
||||
SET GLOBAL innodb_limit_optimistic_insert_debug=0;
|
253
mysql-test/suite/innodb/r/sp_temp_table.result
Normal file
253
mysql-test/suite/innodb/r/sp_temp_table.result
Normal file
@@ -0,0 +1,253 @@
|
||||
#
|
||||
# Bug #19306524 FAILING ASSERTION WITH TEMP TABLE FOR A PROCEDURE
|
||||
# CALLED FROM A FUNCTION
|
||||
#
|
||||
call mtr.add_suppression("MySQL is trying to drop table");
|
||||
CREATE PROCEDURE cachedata(
|
||||
IN obj_id BIGINT UNSIGNED,
|
||||
IN start DATETIME,
|
||||
IN end DATETIME
|
||||
)
|
||||
cachedata:BEGIN
|
||||
DECLARE cache_count BIGINT;
|
||||
SET @timestamp := NOW();
|
||||
CREATE TEMPORARY TABLE IF NOT EXISTS cachedata (
|
||||
timestamp DATETIME,
|
||||
object_id BIGINT UNSIGNED NOT NULL,
|
||||
start DATETIME,
|
||||
end DATETIME,
|
||||
seqno BIGINT AUTO_INCREMENT,
|
||||
value FLOAT,
|
||||
PRIMARY KEY (seqno),
|
||||
INDEX (timestamp),
|
||||
INDEX (object_id, start, end)
|
||||
) ENGINE=INNODB;
|
||||
DELETE FROM cachedata WHERE
|
||||
timestamp < DATE_SUB(@timestamp, INTERVAL 15 SECOND);
|
||||
SELECT count(*) INTO cache_count FROM cachedata WHERE
|
||||
object_id = obj_id
|
||||
AND start = start
|
||||
AND end = end;
|
||||
IF cache_count > 0 THEN LEAVE cachedata;
|
||||
END IF;
|
||||
INSERT INTO cachedata (timestamp, object_id, start, end, value) VALUES
|
||||
(@timestamp, obj_id, start, end, 1234),
|
||||
(@timestamp, obj_id, start, end, 4567),
|
||||
(@timestamp, obj_id, start, end, 8901),
|
||||
(@timestamp, obj_id, start, end, 1234),
|
||||
(@timestamp, obj_id, start, end, 4567),
|
||||
(@timestamp, obj_id, start, end, 8901),
|
||||
(@timestamp, obj_id, start, end, 1234),
|
||||
(@timestamp, obj_id, start, end, 4567),
|
||||
(@timestamp, obj_id, start, end, 8901),
|
||||
(@timestamp, obj_id, start, end, 1234),
|
||||
(@timestamp, obj_id, start, end, 4567),
|
||||
(@timestamp, obj_id, start, end, 8901),
|
||||
(@timestamp, obj_id, start, end, 2345),
|
||||
(@timestamp, obj_id, start, end, 1234),
|
||||
(@timestamp, obj_id, start, end, 4567),
|
||||
(@timestamp, obj_id, start, end, 8901),
|
||||
(@timestamp, obj_id, start, end, 2345),
|
||||
(@timestamp, obj_id, start, end, 1234),
|
||||
(@timestamp, obj_id, start, end, 4567),
|
||||
(@timestamp, obj_id, start, end, 8901),
|
||||
(@timestamp, obj_id, start, end, 2345);
|
||||
END$$
|
||||
CREATE FUNCTION get_cache(
|
||||
obj_id BIGINT UNSIGNED,
|
||||
start DATETIME,
|
||||
end DATETIME
|
||||
)
|
||||
RETURNS FLOAT
|
||||
READS SQL DATA
|
||||
BEGIN
|
||||
DECLARE result FLOAT;
|
||||
CALL cachedata(obj_id, start, end);
|
||||
SELECT SUM(value) INTO result FROM cachedata WHERE
|
||||
object_id = obj_id
|
||||
AND start = start
|
||||
AND end = end;
|
||||
RETURN result;
|
||||
END$$
|
||||
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||
get_cache(1, '2014-01-01', '2014-02-01')
|
||||
95247
|
||||
select sleep(1);
|
||||
sleep(1)
|
||||
0
|
||||
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||
get_cache(1, '2014-01-01', '2014-02-01')
|
||||
95247
|
||||
select sleep(1);
|
||||
sleep(1)
|
||||
0
|
||||
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||
get_cache(1, '2014-01-01', '2014-02-01')
|
||||
95247
|
||||
select sleep(1);
|
||||
sleep(1)
|
||||
0
|
||||
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||
get_cache(1, '2014-01-01', '2014-02-01')
|
||||
95247
|
||||
select sleep(1);
|
||||
sleep(1)
|
||||
0
|
||||
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||
get_cache(1, '2014-01-01', '2014-02-01')
|
||||
95247
|
||||
select sleep(1);
|
||||
sleep(1)
|
||||
0
|
||||
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||
get_cache(1, '2014-01-01', '2014-02-01')
|
||||
95247
|
||||
select sleep(1);
|
||||
sleep(1)
|
||||
0
|
||||
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||
get_cache(1, '2014-01-01', '2014-02-01')
|
||||
95247
|
||||
select sleep(1);
|
||||
sleep(1)
|
||||
0
|
||||
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||
get_cache(1, '2014-01-01', '2014-02-01')
|
||||
95247
|
||||
select sleep(1);
|
||||
sleep(1)
|
||||
0
|
||||
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||
get_cache(1, '2014-01-01', '2014-02-01')
|
||||
95247
|
||||
select sleep(1);
|
||||
sleep(1)
|
||||
0
|
||||
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||
get_cache(1, '2014-01-01', '2014-02-01')
|
||||
95247
|
||||
select sleep(1);
|
||||
sleep(1)
|
||||
0
|
||||
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||
get_cache(1, '2014-01-01', '2014-02-01')
|
||||
95247
|
||||
select sleep(1);
|
||||
sleep(1)
|
||||
0
|
||||
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||
get_cache(1, '2014-01-01', '2014-02-01')
|
||||
95247
|
||||
select sleep(1);
|
||||
sleep(1)
|
||||
0
|
||||
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||
get_cache(1, '2014-01-01', '2014-02-01')
|
||||
95247
|
||||
select sleep(1);
|
||||
sleep(1)
|
||||
0
|
||||
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||
get_cache(1, '2014-01-01', '2014-02-01')
|
||||
95247
|
||||
select sleep(1);
|
||||
sleep(1)
|
||||
0
|
||||
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||
get_cache(1, '2014-01-01', '2014-02-01')
|
||||
95247
|
||||
select sleep(1);
|
||||
sleep(1)
|
||||
0
|
||||
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||
get_cache(1, '2014-01-01', '2014-02-01')
|
||||
95247
|
||||
select sleep(1);
|
||||
sleep(1)
|
||||
0
|
||||
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||
get_cache(1, '2014-01-01', '2014-02-01')
|
||||
95247
|
||||
select sleep(1);
|
||||
sleep(1)
|
||||
0
|
||||
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||
get_cache(1, '2014-01-01', '2014-02-01')
|
||||
95247
|
||||
select sleep(1);
|
||||
sleep(1)
|
||||
0
|
||||
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||
get_cache(1, '2014-01-01', '2014-02-01')
|
||||
95247
|
||||
select sleep(1);
|
||||
sleep(1)
|
||||
0
|
||||
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||
get_cache(1, '2014-01-01', '2014-02-01')
|
||||
95247
|
||||
select sleep(1);
|
||||
sleep(1)
|
||||
0
|
||||
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||
get_cache(1, '2014-01-01', '2014-02-01')
|
||||
95247
|
||||
select sleep(1);
|
||||
sleep(1)
|
||||
0
|
||||
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||
get_cache(1, '2014-01-01', '2014-02-01')
|
||||
95247
|
||||
select sleep(1);
|
||||
sleep(1)
|
||||
0
|
||||
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||
get_cache(1, '2014-01-01', '2014-02-01')
|
||||
95247
|
||||
select sleep(1);
|
||||
sleep(1)
|
||||
0
|
||||
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||
get_cache(1, '2014-01-01', '2014-02-01')
|
||||
95247
|
||||
select sleep(1);
|
||||
sleep(1)
|
||||
0
|
||||
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||
get_cache(1, '2014-01-01', '2014-02-01')
|
||||
95247
|
||||
select sleep(1);
|
||||
sleep(1)
|
||||
0
|
||||
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||
get_cache(1, '2014-01-01', '2014-02-01')
|
||||
95247
|
||||
select sleep(1);
|
||||
sleep(1)
|
||||
0
|
||||
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||
get_cache(1, '2014-01-01', '2014-02-01')
|
||||
95247
|
||||
select sleep(1);
|
||||
sleep(1)
|
||||
0
|
||||
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||
get_cache(1, '2014-01-01', '2014-02-01')
|
||||
95247
|
||||
select sleep(1);
|
||||
sleep(1)
|
||||
0
|
||||
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||
get_cache(1, '2014-01-01', '2014-02-01')
|
||||
95247
|
||||
select sleep(1);
|
||||
sleep(1)
|
||||
0
|
||||
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||
get_cache(1, '2014-01-01', '2014-02-01')
|
||||
95247
|
||||
select sleep(1);
|
||||
sleep(1)
|
||||
0
|
||||
DROP FUNCTION get_cache;
|
||||
DROP PROCEDURE cachedata;
|
242
mysql-test/suite/innodb/r/strict_mode.result
Normal file
242
mysql-test/suite/innodb/r/strict_mode.result
Normal file
@@ -0,0 +1,242 @@
|
||||
#
|
||||
# Bug #17852083 PRINT A WARNING WHEN DDL HAS AN ERROR IN
|
||||
# INNODB_STRICT_MODE = 1
|
||||
#
|
||||
set innodb_strict_mode = 0;
|
||||
create table t1 (id int auto_increment primary key,
|
||||
v varchar(32),
|
||||
col1 text,
|
||||
col2 text,
|
||||
col3 text,
|
||||
col4 text,
|
||||
col5 text,
|
||||
col6 text,
|
||||
col7 text,
|
||||
col8 text,
|
||||
col9 text,
|
||||
col10 text,
|
||||
col11 text,
|
||||
col12 text,
|
||||
col13 text,
|
||||
col14 text,
|
||||
col15 text,
|
||||
col16 text,
|
||||
col17 text,
|
||||
col18 text,
|
||||
col19 text,
|
||||
col20 text,
|
||||
col21 text,
|
||||
col22 text,
|
||||
col23 text,
|
||||
col24 text,
|
||||
col25 text,
|
||||
col26 text,
|
||||
col27 text,
|
||||
col28 text,
|
||||
col29 text,
|
||||
col30 text,
|
||||
col31 text,
|
||||
col32 text,
|
||||
col33 text,
|
||||
col34 text,
|
||||
col35 text,
|
||||
col36 text,
|
||||
col37 text,
|
||||
col38 text,
|
||||
col39 text,
|
||||
col40 text,
|
||||
col41 text,
|
||||
col42 text,
|
||||
col43 text,
|
||||
col44 text,
|
||||
col45 text ,
|
||||
col46 text,
|
||||
col47 text,
|
||||
col48 text,
|
||||
col49 text,
|
||||
col50 text,
|
||||
col51 text,
|
||||
col52 text,
|
||||
col53 text,
|
||||
col54 text,
|
||||
col55 text,
|
||||
col56 text,
|
||||
col57 text,
|
||||
col58 text,
|
||||
col59 text,
|
||||
col60 text,
|
||||
col61 text,
|
||||
col62 text,
|
||||
col63 text,
|
||||
col64 text,
|
||||
col65 text,
|
||||
col66 text,
|
||||
col67 text,
|
||||
col68 text ,
|
||||
col69 text,
|
||||
col70 text,
|
||||
col71 text,
|
||||
col72 text,
|
||||
col73 text,
|
||||
col74 text,
|
||||
col75 text,
|
||||
col76 text,
|
||||
col77 text,
|
||||
col78 text,
|
||||
col79 text,
|
||||
col80 text,
|
||||
col81 text,
|
||||
col82 text,
|
||||
col83 text,
|
||||
col84 text,
|
||||
col85 text,
|
||||
col86 text,
|
||||
col87 text,
|
||||
col88 text,
|
||||
col89 text,
|
||||
col90 text,
|
||||
col91 text,
|
||||
col92 text,
|
||||
col93 text,
|
||||
col94 text,
|
||||
col95 text,
|
||||
col96 text,
|
||||
col97 text,
|
||||
col98 text,
|
||||
col99 text,
|
||||
col100 text,
|
||||
col101 text,
|
||||
col102 text,
|
||||
col103 text,
|
||||
col104 text,
|
||||
col105 text,
|
||||
col106 text,
|
||||
col107 text,
|
||||
col108 text,
|
||||
col109 text,
|
||||
col110 text,
|
||||
col111 text,
|
||||
col112 text,
|
||||
col113 text,
|
||||
col114 text,
|
||||
col115 text,
|
||||
col116 text,
|
||||
col117 text,
|
||||
col118 text,
|
||||
col119 text,
|
||||
col120 text,
|
||||
col121 text,
|
||||
col122 text,
|
||||
col123 text,
|
||||
col124 text,
|
||||
col125 text,
|
||||
col126 text ,
|
||||
col127 text,
|
||||
col128 text,
|
||||
col129 text,
|
||||
col130 text,
|
||||
col131 text,
|
||||
col132 text,
|
||||
col133 text,
|
||||
col134 text,
|
||||
col135 text,
|
||||
col136 text,
|
||||
col137 text,
|
||||
col138 text,
|
||||
col139 text,
|
||||
col140 text,
|
||||
col141 text,
|
||||
col142 text,
|
||||
col143 text,
|
||||
col144 text,
|
||||
col145 text,
|
||||
col146 text,
|
||||
col147 text ,
|
||||
col148 text,
|
||||
col149 text,
|
||||
col150 text,
|
||||
col151 text,
|
||||
col152 text,
|
||||
col153 text,
|
||||
col154 text,
|
||||
col155 text,
|
||||
col156 text,
|
||||
col157 text,
|
||||
col158 text,
|
||||
col159 text,
|
||||
col160 text,
|
||||
col161 text,
|
||||
col162 text,
|
||||
col163 text,
|
||||
col164 text,
|
||||
col165 text,
|
||||
col166 text,
|
||||
col167 text,
|
||||
col168 text,
|
||||
col169 text,
|
||||
col170 text,
|
||||
col171 text,
|
||||
col172 text ,
|
||||
col173 text,
|
||||
col174 text,
|
||||
col175 text,
|
||||
col176 text,
|
||||
col177 text,
|
||||
col178 text,
|
||||
col179 text,
|
||||
col180 text,
|
||||
col181 text,
|
||||
col182 text,
|
||||
col183 text,
|
||||
col184 text,
|
||||
col185 text,
|
||||
col186 text,
|
||||
col187 text,
|
||||
col188 text,
|
||||
col189 text,
|
||||
col190 text,
|
||||
col191 text,
|
||||
col192 text,
|
||||
col193 text,
|
||||
col194 text,
|
||||
col195 text,
|
||||
col196 text,
|
||||
col197 text,
|
||||
col198 text,
|
||||
col199 text,
|
||||
col200 text,
|
||||
col201 text,
|
||||
col202 text,
|
||||
col203 text,
|
||||
col204 text,
|
||||
col205 text,
|
||||
col206 text,
|
||||
col207 text,
|
||||
col208 text,
|
||||
col209 text,
|
||||
col210 text,
|
||||
col211 text,
|
||||
col212 text,
|
||||
col213 text,
|
||||
col214 text,
|
||||
col215 text,
|
||||
col216 text,
|
||||
col217 text,
|
||||
col218 text,
|
||||
col219 text,
|
||||
col220 text,
|
||||
col221 text,
|
||||
col222 text,
|
||||
col223 text,
|
||||
col224 text,
|
||||
col225 text,
|
||||
col226 text,
|
||||
col227 text,
|
||||
col228 text
|
||||
) ENGINE=InnoDB;
|
||||
Warnings:
|
||||
Warning 139 Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
|
||||
set innodb_strict_mode = 1;
|
||||
alter table t1 engine=InnoDB;
|
||||
ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
|
||||
drop table t1;
|
@@ -3,6 +3,11 @@
|
||||
#
|
||||
-- source include/have_innodb.inc
|
||||
|
||||
if (`select plugin_auth_version <= "5.5.40-MariaDB-36.1" from information_schema.plugins where plugin_name='innodb'`)
|
||||
{
|
||||
--skip Not fixed in XtraDB as of 5.5.40-MariaDB-36.1 or earlier
|
||||
}
|
||||
|
||||
# Issues with innodb_change_buffering_debug on Windows, so the test scenario
|
||||
# cannot be created on windows
|
||||
--source include/not_windows.inc
|
||||
@@ -16,14 +21,20 @@
|
||||
# It instructs InnoDB to try to evict pages from the buffer pool when
|
||||
# change buffering is possible, so that the change buffer will be used
|
||||
# whenever possible.
|
||||
-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE
|
||||
SET @innodb_change_buffering_debug_orig = @@innodb_change_buffering_debug;
|
||||
-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE
|
||||
SET GLOBAL innodb_change_buffering_debug = 1;
|
||||
|
||||
# Turn off Unique Check to create corrupted index with dup key
|
||||
SET UNIQUE_CHECKS=0;
|
||||
|
||||
CREATE DATABASE pad;
|
||||
let $i=345;
|
||||
while ($i)
|
||||
{
|
||||
--eval CREATE TABLE pad.t$i (a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
dec $i;
|
||||
}
|
||||
|
||||
-- enable_query_log
|
||||
|
||||
set names utf8;
|
||||
@@ -119,6 +130,6 @@ select z from corrupt_bit_test_ā limit 10;
|
||||
|
||||
# Drop table
|
||||
drop table corrupt_bit_test_ā;
|
||||
DROP DATABASE pad;
|
||||
|
||||
-- error 0, ER_UNKNOWN_SYSTEM_VARIABLE
|
||||
SET GLOBAL innodb_change_buffering_debug = 0;
|
||||
|
22
mysql-test/suite/innodb/t/insert_debug.test
Normal file
22
mysql-test/suite/innodb/t/insert_debug.test
Normal file
@@ -0,0 +1,22 @@
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_debug.inc
|
||||
--source include/have_partition.inc
|
||||
|
||||
if (`select plugin_auth_version <= "5.5.40-MariaDB-36.1" from information_schema.plugins where plugin_name='innodb'`)
|
||||
{
|
||||
--skip Not fixed in XtraDB as of 5.5.40-MariaDB-36.1 or earlier
|
||||
}
|
||||
|
||||
--echo #
|
||||
--echo # Bug#19904003 INNODB_LIMIT_OPTIMISTIC_INSERT_DEBUG=1
|
||||
--echo # CAUSES INFINITE PAGE SPLIT
|
||||
--echo #
|
||||
|
||||
SET GLOBAL innodb_change_buffering_debug=1;
|
||||
SET GLOBAL innodb_limit_optimistic_insert_debug=1;
|
||||
CREATE TABLE t1(c1 INT PRIMARY KEY) ENGINE=InnoDB
|
||||
PARTITION BY HASH (c1) PARTITIONS 15;
|
||||
DROP TABLE t1;
|
||||
|
||||
SET GLOBAL innodb_change_buffering_debug=0;
|
||||
SET GLOBAL innodb_limit_optimistic_insert_debug=0;
|
108
mysql-test/suite/innodb/t/sp_temp_table.test
Normal file
108
mysql-test/suite/innodb/t/sp_temp_table.test
Normal file
@@ -0,0 +1,108 @@
|
||||
--source include/have_innodb.inc
|
||||
--source include/big_test.inc
|
||||
|
||||
if (`select plugin_auth_version <= "5.5.40-MariaDB-36.1" from information_schema.plugins where plugin_name='innodb'`)
|
||||
{
|
||||
--skip Not fixed in XtraDB as of 5.5.40-MariaDB-36.1 or earlier
|
||||
}
|
||||
|
||||
--echo #
|
||||
--echo # Bug #19306524 FAILING ASSERTION WITH TEMP TABLE FOR A PROCEDURE
|
||||
--echo # CALLED FROM A FUNCTION
|
||||
--echo #
|
||||
|
||||
call mtr.add_suppression("MySQL is trying to drop table");
|
||||
|
||||
DELIMITER $$;
|
||||
CREATE PROCEDURE cachedata(
|
||||
IN obj_id BIGINT UNSIGNED,
|
||||
IN start DATETIME,
|
||||
IN end DATETIME
|
||||
)
|
||||
|
||||
cachedata:BEGIN
|
||||
DECLARE cache_count BIGINT;
|
||||
|
||||
SET @timestamp := NOW();
|
||||
|
||||
CREATE TEMPORARY TABLE IF NOT EXISTS cachedata (
|
||||
timestamp DATETIME,
|
||||
object_id BIGINT UNSIGNED NOT NULL,
|
||||
start DATETIME,
|
||||
end DATETIME,
|
||||
seqno BIGINT AUTO_INCREMENT,
|
||||
value FLOAT,
|
||||
PRIMARY KEY (seqno),
|
||||
INDEX (timestamp),
|
||||
INDEX (object_id, start, end)
|
||||
) ENGINE=INNODB;
|
||||
|
||||
DELETE FROM cachedata WHERE
|
||||
timestamp < DATE_SUB(@timestamp, INTERVAL 15 SECOND);
|
||||
|
||||
SELECT count(*) INTO cache_count FROM cachedata WHERE
|
||||
object_id = obj_id
|
||||
AND start = start
|
||||
AND end = end;
|
||||
|
||||
IF cache_count > 0 THEN LEAVE cachedata;
|
||||
END IF;
|
||||
|
||||
INSERT INTO cachedata (timestamp, object_id, start, end, value) VALUES
|
||||
(@timestamp, obj_id, start, end, 1234),
|
||||
(@timestamp, obj_id, start, end, 4567),
|
||||
(@timestamp, obj_id, start, end, 8901),
|
||||
(@timestamp, obj_id, start, end, 1234),
|
||||
(@timestamp, obj_id, start, end, 4567),
|
||||
(@timestamp, obj_id, start, end, 8901),
|
||||
(@timestamp, obj_id, start, end, 1234),
|
||||
(@timestamp, obj_id, start, end, 4567),
|
||||
(@timestamp, obj_id, start, end, 8901),
|
||||
(@timestamp, obj_id, start, end, 1234),
|
||||
(@timestamp, obj_id, start, end, 4567),
|
||||
(@timestamp, obj_id, start, end, 8901),
|
||||
(@timestamp, obj_id, start, end, 2345),
|
||||
(@timestamp, obj_id, start, end, 1234),
|
||||
(@timestamp, obj_id, start, end, 4567),
|
||||
(@timestamp, obj_id, start, end, 8901),
|
||||
(@timestamp, obj_id, start, end, 2345),
|
||||
(@timestamp, obj_id, start, end, 1234),
|
||||
(@timestamp, obj_id, start, end, 4567),
|
||||
(@timestamp, obj_id, start, end, 8901),
|
||||
(@timestamp, obj_id, start, end, 2345);
|
||||
|
||||
END$$
|
||||
|
||||
|
||||
CREATE FUNCTION get_cache(
|
||||
obj_id BIGINT UNSIGNED,
|
||||
start DATETIME,
|
||||
end DATETIME
|
||||
)
|
||||
RETURNS FLOAT
|
||||
READS SQL DATA
|
||||
BEGIN
|
||||
DECLARE result FLOAT;
|
||||
|
||||
CALL cachedata(obj_id, start, end);
|
||||
|
||||
SELECT SUM(value) INTO result FROM cachedata WHERE
|
||||
object_id = obj_id
|
||||
AND start = start
|
||||
AND end = end;
|
||||
|
||||
RETURN result;
|
||||
END$$
|
||||
|
||||
DELIMITER ;$$
|
||||
|
||||
let $i = 30;
|
||||
while ($i)
|
||||
{
|
||||
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||
select sleep(1);
|
||||
dec $i;
|
||||
}
|
||||
|
||||
DROP FUNCTION get_cache;
|
||||
DROP PROCEDURE cachedata;
|
251
mysql-test/suite/innodb/t/strict_mode.test
Normal file
251
mysql-test/suite/innodb/t/strict_mode.test
Normal file
@@ -0,0 +1,251 @@
|
||||
--source include/have_innodb.inc
|
||||
|
||||
if (`select plugin_auth_version <= "5.5.40-MariaDB-36.1" from information_schema.plugins where plugin_name='innodb'`)
|
||||
{
|
||||
--skip Not fixed in XtraDB as of 5.5.40-MariaDB-36.1 or earlier
|
||||
}
|
||||
|
||||
--echo #
|
||||
--echo # Bug #17852083 PRINT A WARNING WHEN DDL HAS AN ERROR IN
|
||||
--echo # INNODB_STRICT_MODE = 1
|
||||
--echo #
|
||||
|
||||
set innodb_strict_mode = 0;
|
||||
|
||||
create table t1 (id int auto_increment primary key,
|
||||
v varchar(32),
|
||||
col1 text,
|
||||
col2 text,
|
||||
col3 text,
|
||||
col4 text,
|
||||
col5 text,
|
||||
col6 text,
|
||||
col7 text,
|
||||
col8 text,
|
||||
col9 text,
|
||||
col10 text,
|
||||
col11 text,
|
||||
col12 text,
|
||||
col13 text,
|
||||
col14 text,
|
||||
col15 text,
|
||||
col16 text,
|
||||
col17 text,
|
||||
col18 text,
|
||||
col19 text,
|
||||
col20 text,
|
||||
col21 text,
|
||||
col22 text,
|
||||
col23 text,
|
||||
col24 text,
|
||||
col25 text,
|
||||
col26 text,
|
||||
col27 text,
|
||||
col28 text,
|
||||
col29 text,
|
||||
col30 text,
|
||||
col31 text,
|
||||
col32 text,
|
||||
col33 text,
|
||||
col34 text,
|
||||
col35 text,
|
||||
col36 text,
|
||||
col37 text,
|
||||
col38 text,
|
||||
col39 text,
|
||||
col40 text,
|
||||
col41 text,
|
||||
col42 text,
|
||||
col43 text,
|
||||
col44 text,
|
||||
col45 text ,
|
||||
col46 text,
|
||||
col47 text,
|
||||
col48 text,
|
||||
col49 text,
|
||||
col50 text,
|
||||
col51 text,
|
||||
col52 text,
|
||||
col53 text,
|
||||
col54 text,
|
||||
col55 text,
|
||||
col56 text,
|
||||
col57 text,
|
||||
col58 text,
|
||||
col59 text,
|
||||
col60 text,
|
||||
col61 text,
|
||||
col62 text,
|
||||
col63 text,
|
||||
col64 text,
|
||||
col65 text,
|
||||
col66 text,
|
||||
col67 text,
|
||||
col68 text ,
|
||||
col69 text,
|
||||
col70 text,
|
||||
col71 text,
|
||||
col72 text,
|
||||
col73 text,
|
||||
col74 text,
|
||||
col75 text,
|
||||
col76 text,
|
||||
col77 text,
|
||||
col78 text,
|
||||
col79 text,
|
||||
col80 text,
|
||||
col81 text,
|
||||
col82 text,
|
||||
col83 text,
|
||||
col84 text,
|
||||
col85 text,
|
||||
col86 text,
|
||||
col87 text,
|
||||
col88 text,
|
||||
col89 text,
|
||||
col90 text,
|
||||
col91 text,
|
||||
col92 text,
|
||||
col93 text,
|
||||
col94 text,
|
||||
col95 text,
|
||||
col96 text,
|
||||
col97 text,
|
||||
col98 text,
|
||||
col99 text,
|
||||
col100 text,
|
||||
col101 text,
|
||||
col102 text,
|
||||
col103 text,
|
||||
col104 text,
|
||||
col105 text,
|
||||
col106 text,
|
||||
col107 text,
|
||||
col108 text,
|
||||
col109 text,
|
||||
col110 text,
|
||||
col111 text,
|
||||
col112 text,
|
||||
col113 text,
|
||||
col114 text,
|
||||
col115 text,
|
||||
col116 text,
|
||||
col117 text,
|
||||
col118 text,
|
||||
col119 text,
|
||||
col120 text,
|
||||
col121 text,
|
||||
col122 text,
|
||||
col123 text,
|
||||
col124 text,
|
||||
col125 text,
|
||||
col126 text ,
|
||||
col127 text,
|
||||
col128 text,
|
||||
col129 text,
|
||||
col130 text,
|
||||
col131 text,
|
||||
col132 text,
|
||||
col133 text,
|
||||
col134 text,
|
||||
col135 text,
|
||||
col136 text,
|
||||
col137 text,
|
||||
col138 text,
|
||||
col139 text,
|
||||
col140 text,
|
||||
col141 text,
|
||||
col142 text,
|
||||
col143 text,
|
||||
col144 text,
|
||||
col145 text,
|
||||
col146 text,
|
||||
col147 text ,
|
||||
col148 text,
|
||||
col149 text,
|
||||
col150 text,
|
||||
col151 text,
|
||||
col152 text,
|
||||
col153 text,
|
||||
col154 text,
|
||||
col155 text,
|
||||
col156 text,
|
||||
col157 text,
|
||||
col158 text,
|
||||
col159 text,
|
||||
col160 text,
|
||||
col161 text,
|
||||
col162 text,
|
||||
col163 text,
|
||||
col164 text,
|
||||
col165 text,
|
||||
col166 text,
|
||||
col167 text,
|
||||
col168 text,
|
||||
col169 text,
|
||||
col170 text,
|
||||
col171 text,
|
||||
col172 text ,
|
||||
col173 text,
|
||||
col174 text,
|
||||
col175 text,
|
||||
col176 text,
|
||||
col177 text,
|
||||
col178 text,
|
||||
col179 text,
|
||||
col180 text,
|
||||
col181 text,
|
||||
col182 text,
|
||||
col183 text,
|
||||
col184 text,
|
||||
col185 text,
|
||||
col186 text,
|
||||
col187 text,
|
||||
col188 text,
|
||||
col189 text,
|
||||
col190 text,
|
||||
col191 text,
|
||||
col192 text,
|
||||
col193 text,
|
||||
col194 text,
|
||||
col195 text,
|
||||
col196 text,
|
||||
col197 text,
|
||||
col198 text,
|
||||
col199 text,
|
||||
col200 text,
|
||||
col201 text,
|
||||
col202 text,
|
||||
col203 text,
|
||||
col204 text,
|
||||
col205 text,
|
||||
col206 text,
|
||||
col207 text,
|
||||
col208 text,
|
||||
col209 text,
|
||||
col210 text,
|
||||
col211 text,
|
||||
col212 text,
|
||||
col213 text,
|
||||
col214 text,
|
||||
col215 text,
|
||||
col216 text,
|
||||
col217 text,
|
||||
col218 text,
|
||||
col219 text,
|
||||
col220 text,
|
||||
col221 text,
|
||||
col222 text,
|
||||
col223 text,
|
||||
col224 text,
|
||||
col225 text,
|
||||
col226 text,
|
||||
col227 text,
|
||||
col228 text
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
set innodb_strict_mode = 1;
|
||||
--error ER_TOO_BIG_ROWSIZE
|
||||
alter table t1 engine=InnoDB;
|
||||
|
||||
drop table t1;
|
@@ -57,11 +57,16 @@ ERROR 42000: Variable 'sql_log_bin' can't be set to the value of '
|
||||
SET @@session.sql_log_bin = NO;
|
||||
ERROR 42000: Variable 'sql_log_bin' can't be set to the value of 'NO'
|
||||
'#-------------------FN_DYNVARS_156_05----------------------------#'
|
||||
SET @@global.sql_log_bin = 0;
|
||||
SELECT @@global.sql_log_bin;
|
||||
@@global.sql_log_bin
|
||||
0
|
||||
1
|
||||
SET @@global.sql_log_bin = 0;
|
||||
ERROR HY000: Variable 'sql_log_bin' is a SESSION variable
|
||||
SELECT @@global.sql_log_bin;
|
||||
@@global.sql_log_bin
|
||||
1
|
||||
SET @@global.sql_log_bin = 1;
|
||||
ERROR HY000: Variable 'sql_log_bin' is a SESSION variable
|
||||
'#----------------------FN_DYNVARS_156_06------------------------#'
|
||||
SELECT count(VARIABLE_VALUE) FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='sql_log_bin';
|
||||
count(VARIABLE_VALUE)
|
||||
|
@@ -109,11 +109,15 @@ SET @@session.sql_log_bin = NO;
|
||||
|
||||
--echo '#-------------------FN_DYNVARS_156_05----------------------------#'
|
||||
###########################################################################
|
||||
# Test if accessing global sql_log_bin gives error #
|
||||
# Test if setting global sql_log_bin gives error, #
|
||||
# and there is no error on reading it. #
|
||||
###########################################################################
|
||||
|
||||
SELECT @@global.sql_log_bin;
|
||||
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SET @@global.sql_log_bin = 0;
|
||||
SELECT @@global.sql_log_bin;
|
||||
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SET @@global.sql_log_bin = 1;
|
||||
|
||||
--echo '#----------------------FN_DYNVARS_156_06------------------------#'
|
||||
|
8
mysql-test/t/insert_update_autoinc-7150.test
Normal file
8
mysql-test/t/insert_update_autoinc-7150.test
Normal file
@@ -0,0 +1,8 @@
|
||||
#
|
||||
# MDEV-7150 Wrong auto increment values on INSERT .. ON DUPLICATE KEY UPDATE when the inserted columns include NULL in an auto-increment column
|
||||
#
|
||||
create table t1 (a int(10) auto_increment primary key, b int(11));
|
||||
insert t1 values (null,1);
|
||||
insert t1 values (null,2), (1,-1), (null,3) on duplicate key update b=values(b);
|
||||
select * from t1;
|
||||
drop table t1;
|
@@ -1136,6 +1136,61 @@ DROP TABLE t1;
|
||||
disconnect con1;
|
||||
disconnect con2;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#19070633 - POSSIBLE ACCESS TO FREED MEMORY IN IS_FREE_LOCK() AND IS_USED_LOCK().
|
||||
--echo #
|
||||
|
||||
--enable_connect_log
|
||||
|
||||
--echo # Verifying issue for IS_FREE_LOCK() function.
|
||||
SELECT GET_LOCK("lock_19070633", 600);
|
||||
|
||||
connect (con1, localhost, root,,);
|
||||
--echo # Waiting after getting user level lock info and releasing mutex.
|
||||
SET DEBUG_SYNC= 'after_getting_user_level_lock_info SIGNAL parked WAIT_FOR go';
|
||||
--echo # Sending: SELECT IS_FREE_LOCK("lock_19070633");
|
||||
send SELECT IS_FREE_LOCK("lock_19070633");
|
||||
|
||||
connection default;
|
||||
SET DEBUG_SYNC= 'now WAIT_FOR parked';
|
||||
SELECT RELEASE_LOCK("lock_19070633");
|
||||
--echo # Signaling connection con1 after releasing the lock.
|
||||
--echo # Without fix, accessing user level lock info in con1 would result in
|
||||
--echo # crash or valgrind issue invalid read is reported.
|
||||
SET DEBUG_SYNC= 'now SIGNAL go';
|
||||
|
||||
connection con1;
|
||||
--echo # Reaping: SELECT IS_FREE_LOCK("lock_19070633");
|
||||
--reap
|
||||
|
||||
connection default;
|
||||
--echo # Verifying issue for IS_USED_LOCK() function.
|
||||
SELECT GET_LOCK("lock_19070633", 600);
|
||||
|
||||
connection con1;
|
||||
--echo # Waiting after getting user level lock info and releasing mutex.
|
||||
SET DEBUG_SYNC= 'after_getting_user_level_lock_info SIGNAL parked WAIT_FOR go';
|
||||
--echo # Sending: SELECT IS_USED_LOCK("lock_19070633");
|
||||
send SELECT IS_USED_LOCK("lock_19070633");
|
||||
|
||||
connection default;
|
||||
SET DEBUG_SYNC= 'now WAIT_FOR parked';
|
||||
SELECT RELEASE_LOCK("lock_19070633");
|
||||
--echo # Signaling connection con1 after releasing the lock.
|
||||
--echo # Without fix, accessing user level lock info in con1 would result in
|
||||
--echo # crash or valgrind issue invalid read is reported.
|
||||
SET DEBUG_SYNC= 'now SIGNAL go';
|
||||
|
||||
connection con1;
|
||||
--echo # Reaping: SELECT IS_USED_LOCK("lock_19070633");
|
||||
--replace_column 1 #
|
||||
--reap
|
||||
|
||||
connection default;
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
disconnect con1;
|
||||
|
||||
--disable_connect_log
|
||||
|
||||
# Check that all connections opened by test cases in this file are really
|
||||
# gone so execution of other tests won't be affected by their presence.
|
||||
|
1
mysql-test/t/mdev6830-master.opt
Normal file
1
mysql-test/t/mdev6830-master.opt
Normal file
@@ -0,0 +1 @@
|
||||
--debug
|
63
mysql-test/t/mdev6830.test
Normal file
63
mysql-test/t/mdev6830.test
Normal file
@@ -0,0 +1,63 @@
|
||||
|
||||
--source include/have_debug.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1,t2,t3;
|
||||
drop view if exists v2,v3;
|
||||
--enable_warnings
|
||||
CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=MyISAM;
|
||||
|
||||
CREATE TABLE t2 (
|
||||
f1 DATE,
|
||||
f2 VARCHAR(1024),
|
||||
f3 VARCHAR(10),
|
||||
f4 DATE,
|
||||
f5 VARCHAR(10),
|
||||
f6 VARCHAR(10),
|
||||
f7 VARCHAR(10),
|
||||
f8 DATETIME,
|
||||
f9 INT,
|
||||
f10 VARCHAR(1024),
|
||||
f11 VARCHAR(1024),
|
||||
f12 INT,
|
||||
f13 VARCHAR(1024)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
CREATE OR REPLACE VIEW v2 AS SELECT * FROM t2;
|
||||
|
||||
CREATE TABLE t3 (
|
||||
f1 VARCHAR(1024),
|
||||
f2 VARCHAR(1024),
|
||||
f3 DATETIME,
|
||||
f4 VARCHAR(10),
|
||||
f5 INT,
|
||||
f6 VARCHAR(10),
|
||||
f7 VARCHAR(1024),
|
||||
f8 VARCHAR(10),
|
||||
f9 INT,
|
||||
f10 DATE,
|
||||
f11 INT,
|
||||
f12 VARCHAR(1024),
|
||||
f13 VARCHAR(10),
|
||||
f14 DATE,
|
||||
f15 DATETIME
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
CREATE OR REPLACE ALGORITHM=TEMPTABLE VIEW v3 AS SELECT * FROM t3;
|
||||
|
||||
INSERT INTO t3 VALUES
|
||||
('FOO','foo','2000-08-04 00:00:00','one',1,'1','FOO','foo',1,'2004-05-09',1,'one','one','2001-12-07','2001-10-17 08:25:04'),
|
||||
('BAR','bar','2001-01-01 04:52:37','two',2,'2','BAR','bar',2,'2008-01-01',2,'two','two','2006-06-19','2002-01-01 08:22:49');
|
||||
|
||||
CREATE TABLE t4 (f1 VARCHAR(10), f2 INT) ENGINE=MyISAM;
|
||||
|
||||
SELECT * FROM t1;
|
||||
|
||||
--error ER_BAD_FIELD_ERROR
|
||||
SELECT non_existing FROM v2;
|
||||
|
||||
SELECT * FROM t1, v3, t4 WHERE v3.f1 = t4.f1 AND t4.f2 = 6 AND t1.pk = v3.f5;
|
||||
|
||||
drop table t1,t2,t3,t4;
|
||||
drop view v2,v3;
|
||||
|
45
mysql-test/t/sp-innodb.test
Normal file
45
mysql-test/t/sp-innodb.test
Normal file
@@ -0,0 +1,45 @@
|
||||
|
||||
--source include/have_innodb.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1,t2;
|
||||
drop procedure if exists p1;
|
||||
--enable_warnings
|
||||
|
||||
--echo #
|
||||
--echo #MDEV-6985: MariaDB crashes on stored procedure call
|
||||
--echo #
|
||||
CREATE TABLE `t1` (
|
||||
`ID` int(11) NOT NULL,
|
||||
PRIMARY KEY (`ID`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE `t2` (
|
||||
`ID` int(11) NOT NULL,
|
||||
`DATE` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`ID`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
--delimiter ;;
|
||||
|
||||
CREATE PROCEDURE `p1`()
|
||||
BEGIN
|
||||
DECLARE _mySelect CURSOR FOR
|
||||
SELECT DISTINCT t1.ID
|
||||
FROM t1
|
||||
LEFT JOIN t2 AS t2 ON
|
||||
t2.ID = t1.ID
|
||||
AND t2.DATE = (
|
||||
SELECT MAX(T3.DATE) FROM t2 AS T3 WHERE T3.ID = t2.ID AND T3.DATE<=NOW()
|
||||
)
|
||||
WHERE t1.ID = 1;
|
||||
OPEN _mySelect;
|
||||
CLOSE _mySelect;
|
||||
END ;;
|
||||
--delimiter ;
|
||||
|
||||
CALL p1();
|
||||
CALL p1();
|
||||
|
||||
drop procedure p1;
|
||||
drop table t1,t2;
|
@@ -98,3 +98,19 @@ deallocate prepare abc;
|
||||
|
||||
SELECT VARIABLE_NAME FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME = 'socket';
|
||||
|
||||
--echo #
|
||||
--echo # Bug#16581605: REPLACE.EXE UTILITY IS BROKEN IN 5.5
|
||||
--echo #
|
||||
|
||||
# Creating a temporary text file.
|
||||
--write_file $MYSQL_TMP_DIR/bug16581605.txt
|
||||
abc
|
||||
def
|
||||
EOF
|
||||
|
||||
#REPLACE.EXE UTILITY will work fine after the fix.
|
||||
--exec $REPLACE abc xyz < $MYSQL_TMP_DIR/bug16581605.txt
|
||||
|
||||
#Cleanup
|
||||
remove_file $MYSQL_TMP_DIR/bug16581605.txt;
|
||||
|
Reference in New Issue
Block a user