Commit e300184c authored by Marc Alff's avatar Marc Alff

Merge 5.1-bugteam -> local bugfix branch

parents d4d76a6a 3c134107
......@@ -455,46 +455,50 @@ fi
AC_SUBST(ABI_CHECK)
# Lock for PS
# Look for PS usage. We use double dollar-signs in FIND_PROC because this
# value is written to a makefile, which interprets away one level of
# dollar-signs. So, interpretation stages are m4 and then shell in autoconf,
# then Make, then shell. The autoconf substitution uses single quotes, so
# no unprotected single quotes should appear in the expression.
AC_PATH_PROG(PS, ps, ps)
AC_MSG_CHECKING("how to check if pid exists")
PS=$ac_cv_path_PS
# Linux style
if $PS p $$ 2> /dev/null | grep `echo $0 | sed s/\-//` > /dev/null
if $PS wwwp $$ 2> /dev/null | grep -- "$0" > /dev/null
then
FIND_PROC="$PS p \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
FIND_PROC="$PS wwwp \$\$PID | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" > /dev/null"
# Solaris
elif $PS -fp $$ 2> /dev/null | grep $0 > /dev/null
elif $PS -fp $$ 2> /dev/null | grep -- $0 > /dev/null
then
FIND_PROC="$PS -p \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
FIND_PROC="$PS -p \$\$PID | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" > /dev/null"
# BSD style
elif $PS -uaxww 2> /dev/null | grep $0 > /dev/null
elif $PS -uaxww 2> /dev/null | grep -- $0 > /dev/null
then
FIND_PROC="$PS -uaxww | grep -v grep | grep \$\$MYSQLD | grep \" \$\$PID \" > /dev/null"
FIND_PROC="$PS -uaxww | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" | grep \" \$\$PID \" > /dev/null"
# SysV style
elif $PS -ef 2> /dev/null | grep $0 > /dev/null
elif $PS -ef 2> /dev/null | grep -- $0 > /dev/null
then
FIND_PROC="$PS -ef | grep -v grep | grep \$\$MYSQLD | grep \" \$\$PID \" > /dev/null"
FIND_PROC="$PS -ef | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" | grep \" \$\$PID \" > /dev/null"
# Do anybody use this?
elif $PS $$ 2> /dev/null | grep $0 > /dev/null
elif $PS $$ 2> /dev/null | grep -- $0 > /dev/null
then
FIND_PROC="$PS \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
FIND_PROC="$PS \$\$PID | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" > /dev/null"
else
case $SYSTEM_TYPE in
*freebsd*|*dragonfly*)
FIND_PROC="$PS p \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
FIND_PROC="$PS p \$\$PID | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" > /dev/null"
;;
*darwin*)
FIND_PROC="$PS -uaxww | grep -v grep | grep \$\$MYSQLD | grep \" \$\$PID \" > /dev/null"
FIND_PROC="$PS -uaxww | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" | grep \" \$\$PID \" > /dev/null"
;;
*cygwin*)
FIND_PROC="$PS -e | grep -v grep | grep \$\$MYSQLD | grep \" \$\$PID \" > /dev/null"
FIND_PROC="$PS -e | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" | grep \" \$\$PID \" > /dev/null"
;;
*netware*)
FIND_PROC=
;;
*)
AC_MSG_ERROR([Could not find the right ps switches. Which OS is this ?. See the Installation chapter in the Reference Manual.])
AC_MSG_ERROR([Could not find the right ps and/or grep switches. Which OS is this? See the Installation chapter in the Reference Manual.])
esac
fi
AC_SUBST(FIND_PROC)
......
......@@ -125,6 +125,45 @@ drop table t1;
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/
show binlog events from 0;
#
# Bug #39182: Binary log producing incompatible character set query from
# stored procedure.
#
reset master;
CREATE DATABASE bug39182 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
USE bug39182;
CREATE TABLE t1 (a VARCHAR(255) COLLATE utf8_unicode_ci)
DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DELIMITER //;
CREATE PROCEDURE p1()
BEGIN
DECLARE s1 VARCHAR(255);
SET s1= "test";
CREATE TEMPORARY TABLE tmp1
SELECT * FROM t1 WHERE a LIKE CONCAT("%", s1, "%");
SELECT
COLLATION(NAME_CONST('s1', _utf8'test')) c1,
COLLATION(NAME_CONST('s1', _utf8'test' COLLATE utf8_unicode_ci)) c2,
COLLATION(s1) c3,
COERCIBILITY(NAME_CONST('s1', _utf8'test')) d1,
COERCIBILITY(NAME_CONST('s1', _utf8'test' COLLATE utf8_unicode_ci)) d2,
COERCIBILITY(s1) d3;
DROP TEMPORARY TABLE tmp1;
END//
DELIMITER ;//
CALL p1();
source include/show_binlog_events.inc;
DROP PROCEDURE p1;
DROP TABLE t1;
DROP DATABASE bug39182;
USE test;
--echo End of 5.0 tests
# Test of a too big SET INSERT_ID: see if the truncated value goes
......
......@@ -139,15 +139,6 @@ drop table t1,t2,t3;
# table
#
CREATE TABLE t1(a INT) ENGINE=BLACKHOLE;
# NOTE: After exchanging open_ltable() by open_and_lock_tables() in
# handle_delayed_insert() to fix problems with MERGE tables (Bug#26379),
# problems with INSERT DELAYED and BLACKHOLE popped up. open_ltable()
# does not check if the binlogging capabilities of the statement and the
# table match. So the below used to succeed. But since INSERT DELAYED
# switches to row-based logging in mixed-mode and BLACKHOLE cannot do
# row-based logging, it could not really work. Until this problem is
# correctly fixed, we have that error here.
--error ER_BINLOG_LOGGING_IMPOSSIBLE
INSERT DELAYED INTO t1 VALUES(1);
DROP TABLE t1;
......
# Check replication of one statement assuming that the engine on the
# slave is a blackhole engine.
# Input:
# $statement Statement to evaluate, it is assumed to change t1
# 1. Evaluate statement on master, it is assumed to change t1
# 2. Wait for statement to be processed on slave
# 3. SELECT from table t1 to see what was written
# 4. Compare position on slave before executing statement and after
# executing statement. If difference is >0, then something was
# written to the binary log on the slave.
connection slave;
let $before = query_get_value("SHOW MASTER STATUS", Position, 1);
--echo [on master]
connection master;
eval $statement;
--echo [on slave]
sync_slave_with_master;
--echo # Expect 0
SELECT COUNT(*) FROM t1;
let $after = query_get_value("SHOW MASTER STATUS", Position, 1);
let $something_written = `select $after - $before != 0`;
if ($something_written) {
--echo >>> Something was written to binary log <<<
}
if (!$something_written) {
--echo >>> Nothing was written to binary log <<<
}
......@@ -1256,6 +1256,7 @@ connect (con1,localhost,root,,);
connect (con2,localhost,root,,);
SET SESSION AUTOCOMMIT = 0;
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
set binlog_format=mixed;
--echo # Switch to connection con1
connection con1;
......
......@@ -312,7 +312,7 @@ sub mtr_report_stats ($) {
/Slave: According to the master's version/ or
/Slave: Column [0-9]* type mismatch/ or
/Slave: Error .* doesn't exist/ or
/Slave: Error .*Deadlock found/ or
/Slave: Deadlock found/ or
/Slave: Error .*Unknown table/ or
/Slave: Error in Write_rows event: / or
/Slave: Field .* of table .* has no default value/ or
......
......@@ -40,9 +40,9 @@ IN ind DECIMAL(10,2))
BEGIN
INSERT INTO t4 VALUES (ins1, ins2, ind);
END
master-bin.000001 784 Query 1 992 use `test`; INSERT INTO t4 VALUES ( NAME_CONST('ins1',_latin1 0x466F6F2773206120426172), NAME_CONST('ins2',_cp932 0xED40ED41ED42), NAME_CONST('ind',47.93))
master-bin.000001 992 Query 1 1081 use `test`; DROP PROCEDURE bug18293
master-bin.000001 1081 Query 1 1160 use `test`; DROP TABLE t4
master-bin.000001 784 Query 1 1048 use `test`; INSERT INTO t4 VALUES ( NAME_CONST('ins1',_latin1 0x466F6F2773206120426172 COLLATE 'latin1_swedish_ci'), NAME_CONST('ins2',_cp932 0xED40ED41ED42 COLLATE 'cp932_japanese_ci'), NAME_CONST('ind',47.93))
master-bin.000001 1048 Query 1 1137 use `test`; DROP PROCEDURE bug18293
master-bin.000001 1137 Query 1 1216 use `test`; DROP TABLE t4
End of 5.0 tests
SHOW BINLOG EVENTS FROM 364;
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Wrong offset or I/O error
......
......@@ -9,7 +9,9 @@ DROP DATABASE IF EXISTS federated;
CREATE DATABASE federated;
DROP DATABASE IF EXISTS federated;
CREATE DATABASE federated;
SET @OLD_CONCURRENT_INSERT= @@GLOBAL.CONCURRENT_INSERT;
SET @OLD_MASTER_CONCURRENT_INSERT= @@GLOBAL.CONCURRENT_INSERT;
SET @@GLOBAL.CONCURRENT_INSERT= 0;
SET @OLD_SLAVE_CONCURRENT_INSERT= @@GLOBAL.CONCURRENT_INSERT;
SET @@GLOBAL.CONCURRENT_INSERT= 0;
DROP TABLE IF EXISTS federated.bug_13118_table;
CREATE TABLE federated.t1 (
......@@ -51,9 +53,10 @@ id value
7 54
8 55
DROP TABLE federated.t1;
SET @@GLOBAL.CONCURRENT_INSERT= @OLD_MASTER_CONCURRENT_INSERT;
DROP TABLE federated.t1;
SET @@GLOBAL.CONCURRENT_INSERT= @OLD_SLAVE_CONCURRENT_INSERT;
DROP TABLE IF EXISTS federated.t1;
DROP DATABASE IF EXISTS federated;
DROP TABLE IF EXISTS federated.t1;
DROP DATABASE IF EXISTS federated;
SET @@GLOBAL.CONCURRENT_INSERT= @OLD_CONCURRENT_INSERT;
......@@ -1416,4 +1416,41 @@ SELECT AVG(a), CAST(AVG(a) AS DECIMAL) FROM t1;
AVG(a) CAST(AVG(a) AS DECIMAL)
15 15
DROP TABLE t1;
CREATE TABLE derived1 (a bigint(21));
INSERT INTO derived1 VALUES (2);
CREATE TABLE D (
pk int(11) NOT NULL AUTO_INCREMENT,
int_nokey int(11) DEFAULT NULL,
int_key int(11) DEFAULT NULL,
filler blob,
PRIMARY KEY (pk),
KEY int_key (int_key)
);
INSERT INTO D VALUES
(39,40,4,repeat(' X', 42)),
(43,56,4,repeat(' X', 42)),
(47,12,4,repeat(' X', 42)),
(71,28,4,repeat(' X', 42)),
(76,54,4,repeat(' X', 42)),
(83,45,4,repeat(' X', 42)),
(105,53,12,NULL);
SELECT
(SELECT COUNT( int_nokey )
FROM derived1 AS X
WHERE
X.int_nokey < 61
GROUP BY pk
LIMIT 1)
FROM D AS X
WHERE X.int_key < 13
GROUP BY int_nokey LIMIT 1;
(SELECT COUNT( int_nokey )
FROM derived1 AS X
WHERE
X.int_nokey < 61
GROUP BY pk
LIMIT 1)
1
DROP TABLE derived1;
DROP TABLE D;
End of 5.0 tests
drop table if exists t1;
set binlog_format=mixed;
set session transaction isolation level read committed;
create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1;
insert into t1 values (1),(2),(3),(4),(5),(6),(7);
......@@ -6,6 +7,7 @@ set autocommit=0;
select * from t1 where a=3 lock in share mode;
a
3
set binlog_format=mixed;
set session transaction isolation level read committed;
set autocommit=0;
update t1 set a=10 where a=5;
......
......@@ -1024,6 +1024,7 @@ id code name
4 2 Erik
5 3 Sasha
COMMIT;
SET binlog_format='MIXED';
BEGIN;
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
insert into t1 (code, name) values (3, 'Jeremy'), (4, 'Matt');
......@@ -2961,9 +2962,11 @@ drop table t1,t2;
create table t1(a int not null, b int, primary key(a)) engine=innodb;
insert into t1 values(1,1),(2,2),(3,1),(4,2),(5,1),(6,2),(7,3);
commit;
SET binlog_format='MIXED';
set autocommit = 0;
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
update t1 set b = 5 where b = 1;
SET binlog_format='MIXED';
set autocommit = 0;
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
select * from t1 where a = 7 and b = 3 for update;
......@@ -3002,6 +3005,7 @@ d e
3 1
8 6
12 1
SET binlog_format='MIXED';
set autocommit = 0;
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
insert into t1 select * from t2;
......@@ -3032,30 +3036,39 @@ a b
3 1
8 6
12 1
SET binlog_format='MIXED';
set autocommit = 0;
SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
insert into t1 select * from t2;
SET binlog_format='MIXED';
set autocommit = 0;
SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
update t3 set b = (select b from t2 where a = d);
SET binlog_format='MIXED';
set autocommit = 0;
SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
create table t4(a int not null, b int, primary key(a)) engine=innodb select * from t2;
SET binlog_format='MIXED';
set autocommit = 0;
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
insert into t5 (select * from t2 lock in share mode);
SET binlog_format='MIXED';
set autocommit = 0;
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
update t6 set e = (select b from t2 where a = d lock in share mode);
SET binlog_format='MIXED';
set autocommit = 0;
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
create table t7(a int not null, b int, primary key(a)) engine=innodb select * from t2 lock in share mode;
SET binlog_format='MIXED';
set autocommit = 0;
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
insert into t8 (select * from t2 for update);
SET binlog_format='MIXED';
set autocommit = 0;
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
update t9 set e = (select b from t2 where a = d for update);
SET binlog_format='MIXED';
set autocommit = 0;
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
create table t10(a int not null, b int, primary key(a)) engine=innodb select * from t2 for update;
......@@ -3202,6 +3215,7 @@ id
-10
1
DROP TABLE t1;
SET binlog_format='MIXED';
SET TX_ISOLATION='read-committed';
SET AUTOCOMMIT=0;
DROP TABLE IF EXISTS t1, t2;
......@@ -3212,6 +3226,7 @@ CREATE TABLE t1 ( a int ) ENGINE=InnoDB;
CREATE TABLE t2 LIKE t1;
SELECT * FROM t2;
a
SET binlog_format='MIXED';
SET TX_ISOLATION='read-committed';
SET AUTOCOMMIT=0;
INSERT INTO t1 VALUES (1);
......@@ -3219,10 +3234,12 @@ COMMIT;
SELECT * FROM t1 WHERE a=1;
a
1
SET binlog_format='MIXED';
SET TX_ISOLATION='read-committed';
SET AUTOCOMMIT=0;
SELECT * FROM t2;
a
SET binlog_format='MIXED';
SET TX_ISOLATION='read-committed';
SET AUTOCOMMIT=0;
INSERT INTO t1 VALUES (2);
......
......@@ -1512,6 +1512,7 @@ ok
drop table t1;
SET SESSION AUTOCOMMIT = 0;
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
set binlog_format=mixed;
# Switch to connection con1
CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(256))
ENGINE = InnoDB;
......
......@@ -748,12 +748,12 @@ ERROR 42S22: Unknown column 't1.b' in 'field list'
select * from v1a join v1b on t1.b = t2.b;
ERROR 42S22: Unknown column 't1.b' in 'on clause'
select
statistics.TABLE_NAME, statistics.COLUMN_NAME, statistics.TABLE_CATALOG, statistics.TABLE_SCHEMA, statistics.NON_UNIQUE, statistics.INDEX_SCHEMA, statistics.INDEX_NAME, statistics.SEQ_IN_INDEX, statistics.COLLATION, statistics.CARDINALITY, statistics.SUB_PART, statistics.PACKED, statistics.NULLABLE, statistics.INDEX_TYPE, statistics.COMMENT,
statistics.TABLE_NAME, statistics.COLUMN_NAME, statistics.TABLE_CATALOG, statistics.TABLE_SCHEMA, statistics.NON_UNIQUE, statistics.INDEX_SCHEMA, statistics.INDEX_NAME, statistics.SEQ_IN_INDEX, statistics.COLLATION, statistics.SUB_PART, statistics.PACKED, statistics.NULLABLE, statistics.INDEX_TYPE, statistics.COMMENT,
columns.TABLE_CATALOG, columns.TABLE_SCHEMA, columns.COLUMN_DEFAULT, columns.IS_NULLABLE, columns.DATA_TYPE, columns.CHARACTER_MAXIMUM_LENGTH, columns.CHARACTER_OCTET_LENGTH, columns.NUMERIC_PRECISION, columns.NUMERIC_SCALE, columns.CHARACTER_SET_NAME, columns.COLLATION_NAME, columns.COLUMN_TYPE, columns.COLUMN_KEY, columns.EXTRA, columns.COLUMN_COMMENT
from information_schema.statistics join information_schema.columns using(table_name,column_name) where table_name='user';
TABLE_NAME COLUMN_NAME TABLE_CATALOG TABLE_SCHEMA NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT TABLE_CATALOG TABLE_SCHEMA COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA COLUMN_COMMENT
user Host NULL mysql 0 mysql PRIMARY 1 A NULL NULL NULL BTREE NULL mysql NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI
user User NULL mysql 0 mysql PRIMARY 2 A 3 NULL NULL BTREE NULL mysql NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI
TABLE_NAME COLUMN_NAME TABLE_CATALOG TABLE_SCHEMA NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLLATION SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT TABLE_CATALOG TABLE_SCHEMA COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA COLUMN_COMMENT
user Host NULL mysql 0 mysql PRIMARY 1 A NULL NULL BTREE NULL mysql NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI
user User NULL mysql 0 mysql PRIMARY 2 A NULL NULL BTREE NULL mysql NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI
drop table t1;
drop table t2;
drop table t3;
......
......@@ -5,8 +5,8 @@ INIT_VALUE
SELECT @@log AS INIT_VALUE;
INIT_VALUE
1
SET @@global.log = ON;
SET global log = 0;
SET @@global.general_log = ON;
SET global general_log = 0;
'Bug# 34832: log is a system but it is not accessible using SET @@global.log;'
'SET GLOBAL log; and SELECT @@global.log. SHOW VARIABLES shows the value of log.'
'#--------------------FN_DYNVARS_062_02-------------------------#'
......
......@@ -5,17 +5,17 @@ SELECT @start_global_value;
'#--------------------FN_DYNVARS_064_01-------------------------#'
SET @@global.log_bin_trust_routine_creators = TRUE;
Warnings:
Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
SET @@global.log_bin_trust_routine_creators = DEFAULT;
Warnings:
Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
SELECT @@global.log_bin_trust_routine_creators;
@@global.log_bin_trust_routine_creators
0
'#--------------------FN_DYNVARS_064_02-------------------------#'
SET @@global.log_bin_trust_routine_creators = DEFAULT;
Warnings:
Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
SELECT @@global.log_bin_trust_routine_creators = 'FALSE';
@@global.log_bin_trust_routine_creators = 'FALSE'
1
......@@ -24,37 +24,37 @@ Warning 1292 Truncated incorrect DOUBLE value: 'FALSE'
'#--------------------FN_DYNVARS_064_03-------------------------#'
SET @@global.log_bin_trust_routine_creators = ON;
Warnings:
Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
SELECT @@global.log_bin_trust_routine_creators;
@@global.log_bin_trust_routine_creators
1
SET @@global.log_bin_trust_routine_creators = OFF;
Warnings:
Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
SELECT @@global.log_bin_trust_routine_creators;
@@global.log_bin_trust_routine_creators
0
SET @@global.log_bin_trust_routine_creators = 0;
Warnings:
Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
SELECT @@global.log_bin_trust_routine_creators;
@@global.log_bin_trust_routine_creators
0
SET @@global.log_bin_trust_routine_creators = 1;
Warnings:
Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
SELECT @@global.log_bin_trust_routine_creators;
@@global.log_bin_trust_routine_creators
1
SET @@global.log_bin_trust_routine_creators = TRUE;
Warnings:
Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
SELECT @@global.log_bin_trust_routine_creators;
@@global.log_bin_trust_routine_creators
1
SET @@global.log_bin_trust_routine_creators = FALSE;
Warnings:
Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
SELECT @@global.log_bin_trust_routine_creators;
@@global.log_bin_trust_routine_creators
0
......@@ -70,7 +70,7 @@ SET @@global.log_bin_trust_routine_creators = "OFFF";
ERROR 42000: Variable 'log_bin_trust_routine_creators' can't be set to the value of 'OFFF'
SET @@global.log_bin_trust_routine_creators = OF;
Warnings:
Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
SELECT @@global.log_bin_trust_routine_creators;
@@global.log_bin_trust_routine_creators
0
......@@ -96,14 +96,14 @@ ERROR HY000: Variable 'log_bin_trust_routine_creators' is a GLOBAL variable
'#---------------------FN_DYNVARS_064_07----------------------#'
SET @@global.log_bin_trust_routine_creators = TRUE;
Warnings:
Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
SELECT @@log_bin_trust_routine_creators = @@global.log_bin_trust_routine_creators;
@@log_bin_trust_routine_creators = @@global.log_bin_trust_routine_creators
1
'#---------------------FN_DYNVARS_064_08----------------------#'
SET @@global.log_bin_trust_routine_creators = TRUE;
Warnings:
Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
SELECT @@log_bin_trust_routine_creators;
@@log_bin_trust_routine_creators
1
......@@ -115,7 +115,7 @@ SELECT log_bin_trust_routine_creators = @@session.log_bin_trust_routine_creators
ERROR 42S22: Unknown column 'log_bin_trust_routine_creators' in 'field list'
SET @@global.log_bin_trust_routine_creators = @start_global_value;
Warnings:
Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
SELECT @@global.log_bin_trust_routine_creators;
@@global.log_bin_trust_routine_creators
1
......@@ -187,6 +187,8 @@ SELECT @@general_log, @@log;
@@general_log @@log
1 1
SET GLOBAL log = 0;
Warnings:
Warning 1287 The syntax '@@log' is deprecated and will be removed in MySQL 7.0. Please use '@@general_log' instead
SHOW VARIABLES LIKE 'general_log';
Variable_name Value
general_log OFF
......@@ -216,6 +218,8 @@ SELECT @@slow_query_log, @@log_slow_queries;
@@slow_query_log @@log_slow_queries
0 0
SET GLOBAL log_slow_queries = 0;
Warnings:
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead
SHOW VARIABLES LIKE 'slow_query_log';
Variable_name Value
slow_query_log OFF
......@@ -270,4 +274,28 @@ SET GLOBAL general_log_file = @general_log_file_saved;
SET GLOBAL slow_query_log_file = @slow_query_log_file_saved;
# -- End of Bug#32748.
deprecated:
SET GLOBAL log = 0;
Warnings:
Warning 1287 The syntax '@@log' is deprecated and will be removed in MySQL 7.0. Please use '@@general_log' instead
SET GLOBAL log_slow_queries = 0;
Warnings:
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead
SET GLOBAL log = DEFAULT;
Warnings:
Warning 1287 The syntax '@@log' is deprecated and will be removed in MySQL 7.0. Please use '@@general_log' instead
SET GLOBAL log_slow_queries = DEFAULT;
Warnings:
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead
not deprecated:
SELECT @@global.general_log_file INTO @my_glf;
SELECT @@global.slow_query_log_file INTO @my_sqlf;
SET GLOBAL general_log = 0;
SET GLOBAL slow_query_log = 0;
SET GLOBAL general_log_file = 'WL4403_G.log';
SET GLOBAL slow_query_log_file = 'WL4403_SQ.log';
SET GLOBAL general_log_file = @my_glf;
SET GLOBAL slow_query_log_file = @my_sqlf;
SET GLOBAL general_log = DEFAULT;
SET GLOBAL slow_query_log = DEFAULT;
End of 5.1 tests
......@@ -1448,13 +1448,15 @@ create trigger t_ad after delete on t for each row insert into t values (old.s1)
insert into t values (1);
drop table t;
USE mysql;
TRUNCATE TABLE general_log;
SET @old_general_log_state = @@global.general_log;
SET GLOBAL general_log = 0;
ALTER TABLE general_log ENGINE = MyISAM;
ALTER TABLE general_log PARTITION BY RANGE (TO_DAYS(event_time))
(PARTITION p0 VALUES LESS THAN (733144), PARTITION p1 VALUES LESS THAN (3000000));
ERROR HY000: Incorrect usage of PARTITION and log table
ALTER TABLE general_log ENGINE = CSV;
SET GLOBAL general_log = default;
SET GLOBAL general_log = @old_general_log_state;
use test;
create table t2 (b int);
create table t1 (b int)
......@@ -1637,4 +1639,93 @@ select count(*) from t1, t2 where t1.createdDate = t2.createdDate;
count(*)
1
drop table t1, t2;
SET @orig_sql_mode = @@SQL_MODE;
SET SQL_MODE='STRICT_ALL_TABLES,ERROR_FOR_DIVISION_BY_ZERO';
CREATE TABLE t1 (c1 INT)
PARTITION BY LIST(1 DIV c1) (
PARTITION p0 VALUES IN (NULL),
PARTITION p1 VALUES IN (1)
);
INSERT INTO t1 VALUES (0);
ERROR 22012: Division by 0
SELECT * FROM t1;
c1
TRUNCATE t1;
INSERT INTO t1 VALUES (NULL), (0), (1), (2);
ERROR 22012: Division by 0
SELECT * FROM t1;
c1
NULL
DROP TABLE t1;
SET SQL_MODE= @orig_sql_mode;
create table t1 (s1 int) partition by hash(s1) partitions 2;
create index i on t1 (s1);
insert into t1 values (1);
insert into t1 select s1 from t1;
insert into t1 select s1 from t1;
insert into t1 select s1 from t1 order by s1 desc;
select * from t1;
s1
1
1
1
1
1
1
1
1
drop table t1;
create table t1 (s1 int) partition by range(s1)
(partition pa1 values less than (10),
partition pa2 values less than MAXVALUE);
create index i on t1 (s1);
insert into t1 values (1);
insert into t1 select s1 from t1;
insert into t1 select s1 from t1;
insert into t1 select s1 from t1 order by s1 desc;
select * from t1;
s1
1
1
1
1
1
1
1
1
drop table t1;
create table t1 (s1 int) partition by range(s1)
(partition pa1 values less than (10),
partition pa2 values less than MAXVALUE);
create index i on t1 (s1);
insert into t1 values (20);
insert into t1 select s1 from t1;
insert into t1 select s1 from t1;
insert into t1 select s1 from t1 order by s1 desc;
select * from t1;
s1
20
20
20
20
20
20
20
20
drop table t1;
create table t1 (s1 int) partition by range(s1)
(partition pa1 values less than (10),
partition pa2 values less than MAXVALUE);
create index i on t1 (s1);
insert into t1 values (1), (2), (3), (4), (5), (6), (7), (8);
insert into t1 select s1 from t1;
insert into t1 select s1 from t1;
insert into t1 select s1 from t1;
insert into t1 select s1 from t1;
insert into t1 select s1 from t1 order by s1 desc;
insert into t1 select s1 from t1 where s1=3;
select count(*) from t1;
count(*)
288
drop table t1;
End of 5.1 tests
SET @global_slow_launch_time = @@GLOBAL.slow_launch_time;
'#--------------------FN_DYNVARS_124_01-------------------------#'
** Connection default **
'#--------------------FN_DYNVARS_124_01-------------------------#'
SET @@GLOBAL.slow_launch_time=0;
SELECT @@GLOBAL.slow_launch_time;
@@GLOBAL.slow_launch_time
0
** Connecting conn5 using username 'root' **
** Connecting conn6 using username 'root' **
** Connecting conn7 using username 'root' **
** Connecting conn8 using username 'root' **
** Connecting conn9 using username 'root' **
** Connecting conn10 using username 'root' **
** Connecting conn11 using username 'root' **
** Connecting conn12 using username 'root' **
** Connecting conn13 using username 'root' **
** Connecting conn14 using username 'root' **
** Connecting conn15 using username 'root' **
** Connecting conn16 using username 'root' **
show status like 'slow_launch_threads';
Variable_name Value
Slow_launch_threads 12
12 Expected
** Connection default **
** Disconnecting conn5 **
** Disconnecting conn6 **
** Disconnecting conn7 **
** Disconnecting conn8 **
** Disconnecting conn9 **
** Disconnecting conn10 **
** Disconnecting conn11 **
** Disconnecting conn12 **
** Disconnecting conn13 **
** Disconnecting conn14 **
** Disconnecting conn15 **
** Disconnecting conn16 **
** Connecting conn1 using username 'root' **
** Switch to connection default and disconnect conn1 **
'#--------------------FN_DYNVARS_124_02-------------------------#'
SET @@GLOBAL.slow_launch_time= 1000;
SELECT @@GLOBAL.slow_launch_time;
@@GLOBAL.slow_launch_time
1000
** Connecting conn2 using username 'root' **
** Switch to connection default and disconnect conn2 **
SET @@GLOBAL.slow_launch_time = @global_slow_launch_time;
......@@ -161,3 +161,32 @@ SELECT @a, @b;
1 1
DROP TABLE t2, t1;
End of 5.0 tests
BUG#31612
Trigger fired multiple times leads to gaps in auto_increment sequence
create table t1 (a int, val char(1)) engine=InnoDB;
create table t2 (b int auto_increment primary key,
val char(1)) engine=InnoDB;
create trigger t1_after_insert after
insert on t1 for each row insert into t2 set val=NEW.val;
insert into t1 values ( 123, 'a'), ( 123, 'b'), ( 123, 'c'),
(123, 'd'), (123, 'e'), (123, 'f'), (123, 'g');
insert into t1 values ( 654, 'a'), ( 654, 'b'), ( 654, 'c'),
(654, 'd'), (654, 'e'), (654, 'f'), (654, 'g');
select * from t2 order by b;
b val
1 a
2 b
3 c
4 d
5 e
6 f
7 g
8 a
9 b
10 c
11 d
12 e
13 f
14 g
drop trigger t1_after_insert;
drop table t1,t2;
......@@ -21,8 +21,10 @@ INSERT INTO t1 VALUES(24, 24);
'#----------------------------FN_DYNVARS_184_01--------------------------------------#'
** Connection con0 **
SET SESSION tx_isolation = 'READ-UNCOMMITTED';
set binlog_format=mixed;
** Connection con1 **
SET SESSION tx_isolation = 'READ-UNCOMMITTED';
set binlog_format=mixed;
** Connection con0 **
START TRANSACTION;
SELECT * FROM t1 WHERE a IN (2,4,6,8) FOR UPDATE;
......
......@@ -167,7 +167,7 @@ max_error_count 10
drop table t1;
set table_type=MYISAM;
Warnings:
Warning 1287 The syntax 'table_type' is deprecated and will be removed in MySQL 5.2. Please use 'storage_engine' instead
Warning 1287 The syntax '@@table_type' is deprecated and will be removed in MySQL 5.2. Please use '@@storage_engine' instead
create table t1 (a int);
insert into t1 (a) values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
update t1 set a='abc';
......
......@@ -43,8 +43,6 @@ INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2);
UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c;
UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f;
ERROR HY000: Binary logging not possible. Message: Statement cannot be written atomically since more than one engine involved and at least one engine is self-logging
UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c;
ERROR HY000: Binary logging not possible. Message: Statement cannot be written atomically since more than one engine involved and at least one engine is self-logging
TRUNCATE t1m;
TRUNCATE t1b;
TRUNCATE t1n;
......@@ -68,20 +66,21 @@ RESET MASTER;
SET SESSION BINLOG_FORMAT=ROW;
INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2);
INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2);
ERROR HY000: Binary logging not possible. Message: Row-based format required for this statement, but not allowed by this combination of engines
INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2);
UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c;
ERROR HY000: Binary logging not possible. Message: Row-based format required for this statement, but not allowed by this combination of engines
UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f;
ERROR HY000: Binary logging not possible. Message: Statement cannot be written atomically since more than one engine involved and at least one engine is self-logging
UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c;
ERROR HY000: Binary logging not possible. Message: Row-based format required for this statement, but not allowed by this combination of engines
ERROR HY000: Binary logging not possible. Message: Statement cannot be written atomically since more than one engine involved and at least one engine is self-logging
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1m)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; COMMIT
master-bin.000001 # Query # # use `test`; BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1b)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # use `test`; COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1n)
master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
......
......@@ -1090,6 +1090,53 @@ master-bin.000001 295 Table_map 1 337 table_id: # (test.t1)
master-bin.000001 337 Write_rows 1 383 table_id: # flags: STMT_END_F
master-bin.000001 383 Query 1 452 use `test`; COMMIT
master-bin.000001 452 Query 1 528 use `test`; drop table t1
reset master;
CREATE DATABASE bug39182 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
USE bug39182;
CREATE TABLE t1 (a VARCHAR(255) COLLATE utf8_unicode_ci)
DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE PROCEDURE p1()
BEGIN
DECLARE s1 VARCHAR(255);
SET s1= "test";
CREATE TEMPORARY TABLE tmp1
SELECT * FROM t1 WHERE a LIKE CONCAT("%", s1, "%");
SELECT
COLLATION(NAME_CONST('s1', _utf8'test')) c1,
COLLATION(NAME_CONST('s1', _utf8'test' COLLATE utf8_unicode_ci)) c2,
COLLATION(s1) c3,
COERCIBILITY(NAME_CONST('s1', _utf8'test')) d1,
COERCIBILITY(NAME_CONST('s1', _utf8'test' COLLATE utf8_unicode_ci)) d2,
COERCIBILITY(s1) d3;
DROP TEMPORARY TABLE tmp1;
END//
CALL p1();
c1 c2 c3 d1 d2 d3
utf8_general_ci utf8_unicode_ci utf8_unicode_ci 2 2 2
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # CREATE DATABASE bug39182 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci
master-bin.000001 # Query # # use `bug39182`; CREATE TABLE t1 (a VARCHAR(255) COLLATE utf8_unicode_ci)
DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
master-bin.000001 # Query # # use `bug39182`; CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
BEGIN
DECLARE s1 VARCHAR(255);
SET s1= "test";
CREATE TEMPORARY TABLE tmp1
SELECT * FROM t1 WHERE a LIKE CONCAT("%", s1, "%");
SELECT
COLLATION(NAME_CONST('s1', _utf8'test')) c1,
COLLATION(NAME_CONST('s1', _utf8'test' COLLATE utf8_unicode_ci)) c2,
COLLATION(s1) c3,
COERCIBILITY(NAME_CONST('s1', _utf8'test')) d1,
COERCIBILITY(NAME_CONST('s1', _utf8'test' COLLATE utf8_unicode_ci)) d2,
COERCIBILITY(s1) d3;
DROP TEMPORARY TABLE tmp1;
END
DROP PROCEDURE p1;
DROP TABLE t1;
DROP DATABASE bug39182;
USE test;
End of 5.0 tests
reset master;
create table t1 (id tinyint auto_increment primary key);
......
......@@ -594,6 +594,56 @@ master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4
master-bin.000001 106 Query 1 227 use `test`; create table t1 (a bigint unsigned, b bigint(20) unsigned)
master-bin.000001 227 Query 1 351 use `test`; insert into t1 values (9999999999999999,14632475938453979136)
master-bin.000001 351 Query 1 427 use `test`; drop table t1
reset master;
CREATE DATABASE bug39182 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
USE bug39182;
CREATE TABLE t1 (a VARCHAR(255) COLLATE utf8_unicode_ci)
DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE PROCEDURE p1()
BEGIN
DECLARE s1 VARCHAR(255);
SET s1= "test";
CREATE TEMPORARY TABLE tmp1
SELECT * FROM t1 WHERE a LIKE CONCAT("%", s1, "%");
SELECT
COLLATION(NAME_CONST('s1', _utf8'test')) c1,
COLLATION(NAME_CONST('s1', _utf8'test' COLLATE utf8_unicode_ci)) c2,
COLLATION(s1) c3,
COERCIBILITY(NAME_CONST('s1', _utf8'test')) d1,
COERCIBILITY(NAME_CONST('s1', _utf8'test' COLLATE utf8_unicode_ci)) d2,
COERCIBILITY(s1) d3;
DROP TEMPORARY TABLE tmp1;
END//
CALL p1();
c1 c2 c3 d1 d2 d3
utf8_general_ci utf8_unicode_ci utf8_unicode_ci 2 2 2
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # CREATE DATABASE bug39182 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci
master-bin.000001 # Query # # use `bug39182`; CREATE TABLE t1 (a VARCHAR(255) COLLATE utf8_unicode_ci)
DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
master-bin.000001 # Query # # use `bug39182`; CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
BEGIN
DECLARE s1 VARCHAR(255);
SET s1= "test";
CREATE TEMPORARY TABLE tmp1
SELECT * FROM t1 WHERE a LIKE CONCAT("%", s1, "%");
SELECT
COLLATION(NAME_CONST('s1', _utf8'test')) c1,
COLLATION(NAME_CONST('s1', _utf8'test' COLLATE utf8_unicode_ci)) c2,
COLLATION(s1) c3,
COERCIBILITY(NAME_CONST('s1', _utf8'test')) d1,
COERCIBILITY(NAME_CONST('s1', _utf8'test' COLLATE utf8_unicode_ci)) d2,
COERCIBILITY(s1) d3;
DROP TEMPORARY TABLE tmp1;
END
master-bin.000001 # Query # # use `bug39182`; CREATE TEMPORARY TABLE tmp1
SELECT * FROM t1 WHERE a LIKE CONCAT("%", NAME_CONST('s1',_utf8'test' COLLATE 'utf8_unicode_ci'), "%")
master-bin.000001 # Query # # use `bug39182`; DROP TEMPORARY TABLE tmp1
DROP PROCEDURE p1;
DROP TABLE t1;
DROP DATABASE bug39182;
USE test;
End of 5.0 tests
reset master;
create table t1 (id tinyint auto_increment primary key);
......
......@@ -141,7 +141,6 @@ master-bin.000001 # Query # # use `test`; COMMIT
drop table t1,t2,t3;
CREATE TABLE t1(a INT) ENGINE=BLACKHOLE;
INSERT DELAYED INTO t1 VALUES(1);
ERROR HY000: Binary logging not possible. Message: Row-based format required for this statement, but not allowed by this combination of engines
DROP TABLE t1;
CREATE TABLE t1(a INT, b INT) ENGINE=BLACKHOLE;
DELETE FROM t1 WHERE a=10;
......
......@@ -69,9 +69,6 @@ UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f;
#UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f;
error ER_BINLOG_LOGGING_IMPOSSIBLE;
UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c;
TRUNCATE t1m;
TRUNCATE t1b;
TRUNCATE t1n;
......@@ -83,12 +80,10 @@ RESET MASTER;
SET SESSION BINLOG_FORMAT=ROW;
INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2);
error ER_BINLOG_LOGGING_IMPOSSIBLE;
INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2);
INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2);
error ER_BINLOG_LOGGING_IMPOSSIBLE;
UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c;
error ER_BINLOG_LOGGING_IMPOSSIBLE;
UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
# suite/funcs_1/storedproc/param_check.inc
#
# Auxiliary routine to be sourced by
# suite/funcs_1/t/storedproc.test
#
# Purpose:
# The assignment of float values to objects of type DECIMAL causes
# conversions and in some cases an adjustment of the value to
# a border of the value range.
# Try to reveal that function and procedure parameters get a similar
# mangling of the value like columns.
#
# Variables to be set before sourcing this routine
# $test_value - value to be checked
#
# Created:
# 2008-08-27 mleich
#
eval UPDATE t1_aux SET f1 = NULL;
# Enforce that all user variables have the same data type and initial value.
SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
eval UPDATE t1_aux SET f1 = $test_value;
SELECT f1 INTO @v1_tab FROM t1_aux;
eval CALL sproc_1($test_value, @v1_proc);
eval SET @v1_func = func_1($test_value);
if (`SELECT @v1_tab <> @v1_proc OR @v1_tab <> @v2_proc OR @v1_tab <> @v1_func`)
{
--echo Error: @v1_tab, @v1_proc, @v2_proc, @v1_func are not all equal
SELECT @v1_tab, @v1_proc, @v2_proc, @v1_func;
}
#### suite/funcs_1/t/innodb_storedproc.test
#
# This test cannot be used for the embedded server because we check here
# privileges.
--source include/not_embedded.inc
--source include/have_innodb.inc
let $engine_type= innodb;
--source suite/funcs_1/storedproc/load_sp_tb.inc
--source suite/funcs_1/storedproc/storedproc_master.inc
#### suite/funcs_1/t/memory_storedproc.test
#
# This test cannot be used for the embedded server because we check here
# privileges.
--source include/not_embedded.inc
SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
let $engine_type= memory;
--source suite/funcs_1/storedproc/load_sp_tb.inc
--source suite/funcs_1/storedproc/storedproc_master.inc
#### suite/funcs_1/t/myisam_storedproc.test
#
# This test cannot be used for the embedded server because we check here
# privileges.
--source include/not_embedded.inc
SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
let $engine_type= myisam;
--source suite/funcs_1/storedproc/load_sp_tb.inc
--source suite/funcs_1/storedproc/storedproc_master.inc
#### suite/funcs_1/t/ndb_storedproc.test
#
# This test cannot be used for the embedded server because we check here
# privileges.
--source include/not_embedded.inc
--source include/have_ndb.inc
let $engine_type= ndb;
--source suite/funcs_1/storedproc/load_sp_tb.inc
--source suite/funcs_1/storedproc/storedproc_master.inc
......@@ -158,10 +158,16 @@ DROP VIEW IF EXISTS v1;
--disable_query_log
# Storage for the SELECTs to be used for the VIEW definition
# Attention: my_select must be no too small because a statement like
# SELECT LOAD_FILE(< file in MYSQLTEST_VARDIR >)
# AS my_col,
# id FROM t1_values';
# might be a very long
# Bug#38427 "Data too long" ... tests "<ENGINE>_func_view" fail
CREATE TABLE t1_selects
(
id BIGINT AUTO_INCREMENT,
my_select VARCHAR(200) NOT NULL,
my_select VARCHAR(1000) NOT NULL,
disable_result ENUM('Yes','No') NOT NULL default 'No',
PRIMARY KEY(id),
UNIQUE (my_select)
......
......@@ -12,6 +12,5 @@
partition_03ndb : BUG#16385 2006-03-24 mikael Partitions: crash when updating a range partitioned NDB table
ndb_partition_error2 : HF is not sure if the test can work as internded on all the platforms
ndb_index_ordered : Bug#38370 The test ndb.ndb_index_ordered fails with the community features on
# the below testcase have been reworked to avoid the bug, test contains comment, keep bug open
This diff is collapsed.
This diff is collapsed.
################################################################################
# t/partition_auto_increment_archive.test #
# #
# Purpose: #
# Tests around auto increment column #
# Archive branch #
# #
#------------------------------------------------------------------------------#
# Original Author: MattiasJ #
# Original Date: 2008-09-02 #
# Change Author: #
# Change Date: #
# Change: #
################################################################################
#
# NOTE: PLEASE DO NOT ADD NOT MYISAM SPECIFIC TESTCASES HERE !
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
# The server must support partitioning.
--source include/have_partition.inc
#------------------------------------------------------------------------------#
# Engine specific settings and requirements
--source include/have_archive.inc
# Archve does not support delete
let $skip_delete= 1;
let $skip_truncate= 1;
let $skip_update= 1;
let $only_ai_pk= 1;
##### Storage engine to be tested
let $engine= 'Archive';
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_auto_increment.inc
################################################################################
# t/partition_auto_increment_blackhole.test #
# #
# Purpose: #
# Tests around auto increment column #
# Blackhole branch #
# #
#------------------------------------------------------------------------------#
# Original Author: MattiasJ #
# Original Date: 2008-09-02 #
# Change Author: #
# Change Date: #
# Change: #
################################################################################
#
# NOTE: PLEASE DO NOT ADD NOT MYISAM SPECIFIC TESTCASES HERE !
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
# The server must support partitioning.
--source include/have_partition.inc
#------------------------------------------------------------------------------#
# Engine specific settings and requirements
--source include/have_blackhole.inc
##### Storage engine to be tested
let $engine= 'Blackhole';
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_auto_increment.inc
################################################################################
# t/partition_auto_increment_innodb.test #
# #
# Purpose: #
# Tests around auto increment column #
# InnoDB branch #
# #
#------------------------------------------------------------------------------#
# Original Author: MattiasJ #
# Original Date: 2008-02-12 #
# Change Author: #
# Change Date: #
# Change: #
################################################################################
#
# NOTE: PLEASE DO NOT ADD NOT MYISAM SPECIFIC TESTCASES HERE !
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
# The server must support partitioning.
--source include/have_partition.inc
#------------------------------------------------------------------------------#
# Engine specific settings and requirements
##### Storage engine to be tested
let $engine= 'InnoDB';
--source include/have_innodb.inc
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_auto_increment.inc
################################################################################
# t/partition_auto_increment_memory.test #
# #
# Purpose: #
# Tests around auto increment column #
# Memory branch #
# #
#------------------------------------------------------------------------------#
# Original Author: MattiasJ #
# Original Date: 2008-02-12 #
# Change Author: #
# Change Date: #
# Change: #
################################################################################
#
# NOTE: PLEASE DO NOT ADD NOT MYISAM SPECIFIC TESTCASES HERE !
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
# The server must support partitioning.
--source include/have_partition.inc
#------------------------------------------------------------------------------#
# Engine specific settings and requirements
##### Storage engine to be tested
let $engine= 'Memory';
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_auto_increment.inc
################################################################################
# t/partition_auto_increment_myisam.test #
# #
# Purpose: #
# Tests around auto increment column #
# MyISAM branch #
# #
#------------------------------------------------------------------------------#
# Original Author: MattiasJ #
# Original Date: 2008-02-12 #
# Change Author: #
# Change Date: #
# Change: #
################################################################################
#
# NOTE: PLEASE DO NOT ADD NOT MYISAM SPECIFIC TESTCASES HERE !
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
# The server must support partitioning.
--source include/have_partition.inc
#------------------------------------------------------------------------------#
# Engine specific settings and requirements
##### Storage engine to be tested
let $engine= 'MyISAM';
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_auto_increment.inc
################################################################################
# t/partition_auto_increment_ndb.test #
# #
# Purpose: #
# Tests around auto increment column #
# NDB branch #
# #
# Note: NDB behavior for auto_increment on secondary column in #
# multi-column-index is NOT like MyISAM, instead it uses the same #
# behavior as if it was the primary column. #
#------------------------------------------------------------------------------#
# Original Author: MattiasJ #
# Original Date: 2008-09-02 #
# Change Author: #
# Change Date: #
# Change: #
################################################################################
#
# NOTE: PLEASE DO NOT ADD NOT MYISAM SPECIFIC TESTCASES HERE !
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
# The server must support partitioning.
--source include/have_partition.inc
#------------------------------------------------------------------------------#
# Engine specific settings and requirements
--source include/have_ndb.inc
##### Storage engine to be tested
let $engine= 'NDB';
connection default;
#enable hash partitioning
SET new=on;
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_auto_increment.inc
This diff is collapsed.
......@@ -193,7 +193,7 @@ end|
ERROR HY000: You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)
set global log_bin_trust_routine_creators=1;
Warnings:
Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
set global log_bin_trust_function_creators=0;
set global log_bin_trust_function_creators=1;
set global log_bin_trust_function_creators=1;
......@@ -526,7 +526,7 @@ master-bin.000001 # Query 1 # use `test`; DROP TABLE IF EXISTS t1
master-bin.000001 # Query 1 # use `test`; CREATE TABLE t1(col VARCHAR(10))
master-bin.000001 # Query 1 # use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`(arg VARCHAR(10))
INSERT INTO t1 VALUES(arg)
master-bin.000001 # Query 1 # use `test`; INSERT INTO t1 VALUES( NAME_CONST('arg',_latin1'test'))
master-bin.000001 # Query 1 # use `test`; INSERT INTO t1 VALUES( NAME_CONST('arg',_latin1'test' COLLATE 'latin1_swedish_ci'))
master-bin.000001 # Query 1 # use `test`; DROP PROCEDURE p1
master-bin.000001 # Query 1 # use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
SET @a = 1
......@@ -869,7 +869,7 @@ CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`(arg VARCHAR(10))
INSERT INTO t1 VALUES(arg)
/*!*/;
SET TIMESTAMP=t/*!*/;
INSERT INTO t1 VALUES( NAME_CONST('arg',_latin1'test'))
INSERT INTO t1 VALUES( NAME_CONST('arg',_latin1'test' COLLATE 'latin1_swedish_ci'))
/*!*/;
SET TIMESTAMP=t/*!*/;
DROP PROCEDURE p1
......
......@@ -24,6 +24,9 @@ drop table if exists t1,t2;
create table t1(f int);
create table t2(f int);
insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
SELECT COUNT(*) FROM t1;
COUNT(*)
10
create temporary table t3(f int);
insert into t3 select * from t1 where f<6;
create temporary table t3(f int);
......
......@@ -12,5 +12,4 @@
rpl_redirect : Failure is sporadic and and the test is superfluous (mats)
rpl_innodb_bug28430 : Failure on Solaris Bug #36793
#rpl_temporary : BUG#38269 2008-07-21 Sven valgrind error in pushbuild
rpl_flushlog_loop : BUG#37733 2008-07-23 Sven disabled in 5.1-bugteam. the bug has been fixed in 5.1-rpl: please re-enable when that gets pushed to main
This diff is collapsed.
......@@ -56,6 +56,8 @@ drop table if exists t1,t2;
create table t1(f int);
create table t2(f int);
insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
# Auxiliary select (We want that all rows are in the table)
SELECT COUNT(*) FROM t1;
connection con1;
create temporary table t3(f int);
......
This diff is collapsed.
This diff is collapsed.
......@@ -10,6 +10,7 @@ drop table if exists t1;
connect (a,localhost,root,,);
connect (b,localhost,root,,);
connection a;
set binlog_format=mixed;
set session transaction isolation level read committed;
create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1;
insert into t1 values (1),(2),(3),(4),(5),(6),(7);
......@@ -17,6 +18,7 @@ set autocommit=0;
# this should lock the entire table
select * from t1 where a=3 lock in share mode;
connection b;
set binlog_format=mixed;
set session transaction isolation level read committed;
set autocommit=0;
-- error ER_LOCK_WAIT_TIMEOUT
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -2126,7 +2126,7 @@ class Item_ref :public Item_ident
protected:
void set_properties();
public:
enum Ref_Type { REF, DIRECT_REF, VIEW_REF, OUTER_REF };
enum Ref_Type { REF, DIRECT_REF, VIEW_REF, OUTER_REF, AGGREGATE_REF };
Field *result_field; /* Save result here */
Item **ref;
Item_ref(Name_resolution_context *context_arg,
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment