Merge branch '10.1' into 10.2

This commit is contained in:
Sergei Golubchik 2017-02-10 17:01:45 +01:00
commit 2195bb4e41
226 changed files with 11199 additions and 2971 deletions

2
.gitignore vendored
View file

@ -51,6 +51,7 @@ extra/jemalloc/build/
extra/jemalloc/tmp/
extra/my_print_defaults
extra/mysql_waitpid
extra/mysqld_safe_helper
extra/perror
extra/replace
extra/resolve_stack_dump
@ -224,6 +225,7 @@ support-files/mysql.spec
support-files/mysqld_multi.server
support-files/wsrep.cnf
support-files/wsrep_notify
support-files/policy/selinux/mysqld-safe.pp
tags
tests/async_queries
tests/bug25714

View file

@ -1571,8 +1571,10 @@ static my_bool get_pidfile(MYSQL *mysql, char *pidfile)
if (mysql_query(mysql, "SHOW VARIABLES LIKE 'pid_file'"))
{
my_printf_error(0, "query failed; error: '%s'", error_flags,
mysql_error(mysql));
my_printf_error(mysql_errno(mysql),
"The query to get the server's pid file failed,"
" error: '%s'. Continuing.", error_flags,
mysql_error(mysql));
}
result = mysql_store_result(mysql);
if (result)

View file

@ -27,6 +27,7 @@ usr/bin/mysql_tzinfo_to_sql
usr/bin/mysqlbinlog
usr/bin/mysqld_multi
usr/bin/mysqld_safe
usr/bin/mysqld_safe_helper
usr/bin/mysqlhotcopy
usr/bin/perror
usr/bin/replace

View file

@ -8,8 +8,8 @@
## DP: http://bugs.mysql.com/bug.php?id=6901
@DPATCH@
--- old/scripts/mysql_system_tables_data.sql 2008-12-04 22:59:44.000000000 +0100
+++ new/scripts/mysql_system_tables_data.sql 2008-12-04 23:00:07.000000000 +0100
--- a/scripts/mysql_system_tables_data.sql
+++ b/scripts/mysql_system_tables_data.sql
@@ -26,16 +26,6 @@
-- a plain character
SELECT LOWER( REPLACE((SELECT REPLACE(@@hostname,'_','\_')),'%','\%') )INTO @current_hostname;
@ -26,14 +26,14 @@
-
-- Fill "user" table with default users allowing root access
-- from local machine if "user" table didn't exist before
CREATE TEMPORARY TABLE tmp_user LIKE user;
@@ -43,8 +33,6 @@ INSERT INTO tmp_user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','
REPLACE INTO tmp_user SELECT @current_hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N','N','',0 FROM dual WHERE @current_hostname != 'localhost';
REPLACE INTO tmp_user VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N','N','',0);
REPLACE INTO tmp_user VALUES ('::1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N','N', '', 0);
-INSERT INTO tmp_user (host,user) VALUES ('localhost','');
-INSERT INTO tmp_user (host,user) SELECT @current_hostname,'' FROM dual WHERE @current_hostname != 'localhost';
INSERT INTO user SELECT * FROM tmp_user WHERE @had_user_table=0;
DROP TABLE tmp_user;
CREATE TEMPORARY TABLE tmp_user_nopasswd LIKE user;
@@ -48,9 +38,6 @@ REPLACE INTO tmp_user_nopasswd VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y'
REPLACE INTO tmp_user_nopasswd VALUES ('::1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N','N', '', 0);
-- More secure root account using unix sucket auth.
INSERT INTO tmp_user_socket VALUES ('localhost',IFNULL(@auth_root_socket, 'root'),'','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'unix_socket','','N', 'N','', 0);
--- Anonymous user with no privileges.
-INSERT INTO tmp_user_anonymous (host,user) VALUES ('localhost','');
-INSERT INTO tmp_user_anonymous (host,user) SELECT @current_hostname,'' FROM dual WHERE @current_hostname != 'localhost';
INSERT INTO user SELECT * FROM tmp_user_nopasswd WHERE @had_user_table=0 AND @skip_auth_root_nopasswd IS NULL;
INSERT INTO user SELECT * FROM tmp_user_socket WHERE @had_user_table=0 AND @auth_root_socket IS NOT NULL;

View file

@ -98,4 +98,7 @@ IF(UNIX)
MYSQL_ADD_EXECUTABLE(mysql_waitpid mysql_waitpid.c COMPONENT Client)
TARGET_LINK_LIBRARIES(mysql_waitpid mysys)
MYSQL_ADD_EXECUTABLE(mysqld_safe_helper mysqld_safe_helper.c COMPONENT Server)
TARGET_LINK_LIBRARIES(mysqld_safe_helper mysys)
ENDIF()

View file

@ -0,0 +1,77 @@
#include <my_global.h>
#include <m_string.h>
#include <my_sys.h>
#include <my_pthread.h>
#ifdef HAVE_PWD_H
#include <pwd.h>
#endif
#include <stdlib.h>
#include <stdio.h>
void my_exit(int c)
{
my_end(0);
exit(c);
}
void do_usage()
{
printf("Usage:\n"
" %s <user> log <filename>\n"
" %s <user> exec <command> <args>\n",
my_progname, my_progname);
my_exit(1);
}
void do_log(const char *logfile)
{
FILE *f;
uchar buf[4096];
int size;
if (!logfile)
do_usage();
f= my_fopen(logfile, O_WRONLY|O_APPEND|O_CREAT, MYF(MY_WME));
if (!f)
my_exit(1);
while ((size= my_fread(stdin, buf, sizeof(buf), MYF(MY_WME))) > 0)
if ((int)my_fwrite(f, buf, size, MYF(MY_WME)) != size)
my_exit(1);
my_fclose(f, MYF(0));
my_exit(0);
}
void do_exec(char *args[])
{
if (!args[0])
do_usage();
my_end(0);
execvp(args[0], args);
}
int main(int argc, char *argv[])
{
struct passwd *user_info;
MY_INIT(argv[0]);
if (argc < 3)
do_usage(argv[0]);
user_info= my_check_user(argv[1], MYF(0));
if (user_info ? my_set_user(argv[1], user_info, MYF(MY_WME))
: my_errno == EINVAL)
my_exit(1);
if (strcmp(argv[2], "log") == 0)
do_log(argv[3]);
if (strcmp(argv[2], "exec") == 0)
do_exec(argv+3);
my_end(0);
return 1;
}

View file

@ -678,8 +678,12 @@ extern void *my_memmem(const void *haystack, size_t haystacklen,
#ifdef _WIN32
extern int my_access(const char *path, int amode);
#define my_check_user(A,B) (NULL)
#define my_set_user(A,B,C) (0)
#else
#define my_access access
struct passwd *my_check_user(const char *user, myf MyFlags);
int my_set_user(const char *user, struct passwd *user_info, myf MyFlags);
#endif
extern int check_if_legal_filename(const char *path);

View file

@ -1,6 +1,6 @@
'\" t
.\"
.TH "\FBMYSQL_SECURE_INST" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System"
.TH "\FBMYSQL_SECURE_INST" "1" "3 January 2017" "MariaDB 10\&.2" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@ -71,9 +71,8 @@ test
database, which by default can be accessed by anonymous users\&.
.RE
.PP
Invoke
\fBmysql_secure_installation\fR
without arguments:
can be invoked without arguments:
.sp
.if n \{\
.RS 4
@ -86,10 +85,75 @@ shell> \fBmysql_secure_installation\fR
.\}
.PP
The script will prompt you to determine which actions to perform\&.
.PP
\fBmysql_secure_installation\fR
accepts some options:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql_secure_installation: basedir option
.\" basedir option: mysql_secure_installation
\fB\-\-basedir=\fR\fB\fIdir_name\fR\fR
.sp
Base directory\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql_secure_installation: defaults-extra-file option
.\" defaults-extra-file option: mysql_secure_installation
\fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR
.sp
Additional option file\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql_secure_installation: defaults-file option
.\" defaults-file option: mysql_secure_installation
\fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR
.sp
Option file\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql_secure_installation: no-defaults option
.\" no-defaults option: mysql_secure_installation
\fB\-\-no\-defaults\fR
.sp
Don't read any defaults file\&.
.RE
.sp
Other unrecognized options will be passed on to the server\&.
.SH "COPYRIGHT"
.br
.PP
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2017 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP

View file

@ -20,7 +20,7 @@
# then set default's client character set(latin1) as client's character set.
###############################################################################
--source include/master-slave.inc
call mtr.add_suppression("Cannot use utf16 as character_set_client");
call mtr.add_suppression("'utf16' can not be used as client character set");
CREATE TABLE t1(i VARCHAR(20));
INSERT INTO t1 VALUES (0xFFFF);
--sync_slave_with_master

View file

@ -0,0 +1,3 @@
# The time on ANALYSE FORMAT=JSON is rather variable
--replace_regex /("(r_total_time_ms|r_buffer_size)": )[^, \n]*/\1"REPLACED"/

View file

@ -491,15 +491,15 @@ ANALYZE
"query_block": {
"select_id": 1,
"r_loops": 1,
"volatile parameter": "REPLACED",
"r_total_time_ms": "REPLACED",
"having_condition": "TOP > t2.a",
"filesort": {
"sort_key": "t2.a",
"r_loops": 1,
"volatile parameter": "REPLACED",
"r_total_time_ms": "REPLACED",
"r_used_priority_queue": false,
"r_output_rows": 0,
"volatile parameter": "REPLACED",
"r_buffer_size": "REPLACED",
"temporary_table": {
"table": {
"table_name": "t2",
@ -507,7 +507,7 @@ ANALYZE
"r_loops": 1,
"rows": 256,
"r_rows": 256,
"volatile parameter": "REPLACED",
"r_total_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
}
@ -522,14 +522,14 @@ ANALYZE
"query_block": {
"select_id": 1,
"r_loops": 1,
"volatile parameter": "REPLACED",
"r_total_time_ms": "REPLACED",
"filesort": {
"sort_key": "t2.a",
"r_loops": 1,
"volatile parameter": "REPLACED",
"r_total_time_ms": "REPLACED",
"r_used_priority_queue": false,
"r_output_rows": 256,
"volatile parameter": "REPLACED",
"r_buffer_size": "REPLACED",
"temporary_table": {
"table": {
"table_name": "t2",
@ -537,7 +537,7 @@ ANALYZE
"r_loops": 1,
"rows": 256,
"r_rows": 256,
"volatile parameter": "REPLACED",
"r_total_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
}
@ -563,14 +563,14 @@ ANALYZE
"query_block": {
"select_id": 1,
"r_loops": 1,
"volatile parameter": "REPLACED",
"r_total_time_ms": "REPLACED",
"filesort": {
"sort_key": "t2.a",
"r_loops": 1,
"volatile parameter": "REPLACED",
"r_total_time_ms": "REPLACED",
"r_used_priority_queue": false,
"r_output_rows": 256,
"volatile parameter": "REPLACED",
"r_buffer_size": "REPLACED",
"temporary_table": {
"table": {
"table_name": "t2",
@ -578,7 +578,7 @@ ANALYZE
"r_loops": 1,
"rows": 256,
"r_rows": 256,
"volatile parameter": "REPLACED",
"r_total_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
}
@ -600,14 +600,14 @@ ANALYZE
"query_block": {
"select_id": 1,
"r_loops": 1,
"volatile parameter": "REPLACED",
"r_total_time_ms": "REPLACED",
"table": {
"table_name": "t1",
"access_type": "ALL",
"r_loops": 1,
"rows": 2,
"r_rows": 2,
"volatile parameter": "REPLACED",
"r_total_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
},
@ -619,7 +619,7 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 2,
"volatile parameter": "REPLACED",
"r_total_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
},
@ -632,14 +632,14 @@ ANALYZE
"query_block": {
"select_id": 2,
"r_loops": 1,
"volatile parameter": "REPLACED",
"r_total_time_ms": "REPLACED",
"table": {
"table_name": "t1",
"access_type": "ALL",
"r_loops": 1,
"rows": 2,
"r_rows": 2,
"volatile parameter": "REPLACED",
"r_total_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
}
@ -653,7 +653,7 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 2,
"volatile parameter": "REPLACED",
"r_total_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
},
@ -685,22 +685,22 @@ ANALYZE
"query_block": {
"select_id": 1,
"r_loops": 1,
"volatile parameter": "REPLACED",
"r_total_time_ms": "REPLACED",
"filesort": {
"sort_key": "group_concat(t3.f3 separator ',')",
"r_loops": 1,
"volatile parameter": "REPLACED",
"r_total_time_ms": "REPLACED",
"r_used_priority_queue": false,
"r_output_rows": 0,
"volatile parameter": "REPLACED",
"r_buffer_size": "REPLACED",
"temporary_table": {
"filesort": {
"sort_key": "(subquery#2)",
"r_loops": 1,
"volatile parameter": "REPLACED",
"r_total_time_ms": "REPLACED",
"r_used_priority_queue": false,
"r_output_rows": 0,
"volatile parameter": "REPLACED",
"r_buffer_size": "REPLACED",
"temporary_table": {
"table": {
"table_name": "t2",
@ -708,7 +708,7 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 2,
"volatile parameter": "REPLACED",
"r_total_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 100
},
@ -719,7 +719,7 @@ ANALYZE
"r_loops": 1,
"rows": 2,
"r_rows": 2,
"volatile parameter": "REPLACED",
"r_total_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 0,
"attached_condition": "t3.f3 in (1,2)"

View file

@ -1912,6 +1912,13 @@ end|
create table t1 as select f1();
ERROR 42S02: Table 'test.t1' doesn't exist
drop function f1;
#
# MDEV-10274 Bundling insert with create statement
# for table with unsigned Decimal primary key issues warning 1194
#
create table t1(ID decimal(2,1) unsigned NOT NULL, PRIMARY KEY (ID))engine=memory
select 2.1 ID;
drop table t1;
End of 5.5 tests
create table t1;
ERROR 42000: A table must have at least 1 column

View file

@ -4576,6 +4576,16 @@ SELECT CHAR_LENGTH(TRIM(BOTH 0x00 FROM _ucs2 0x0061));
CHAR_LENGTH(TRIM(BOTH 0x00 FROM _ucs2 0x0061))
1
#
# MDEV-11685: sql_mode can't be set with non-ascii connection charset
#
SET character_set_connection=ucs2;
SET sql_mode='NO_ENGINE_SUBSTITUTION';
SELECT @@sql_mode;
@@sql_mode
NO_ENGINE_SUBSTITUTION
SET sql_mode=DEFAULT;
SET NAMES utf8;
#
# End of 5.5 tests
#
#

View file

@ -1,4 +1,4 @@
call mtr.add_suppression("Cannot use ucs2 as character_set_client");
call mtr.add_suppression("'ucs2' can not be used as client character set");
show variables like 'collation_server';
Variable_name Value
collation_server ucs2_unicode_ci

View file

@ -1,4 +1,4 @@
call mtr.add_suppression("Cannot use ucs2 as character_set_client");
call mtr.add_suppression("'ucs2' can not be used as client character set");
#
# Start of 5.5 tests
#

View file

@ -1584,6 +1584,16 @@ ERROR HY000: Invalid utf16 character string: 'DE9899'
DO LPAD(_utf16 0x0061 COLLATE utf16_unicode_ci, 10000, 0x0061DE989999);
ERROR HY000: Invalid utf16 character string: 'DE9899'
#
# MDEV-11685: sql_mode can't be set with non-ascii connection charset
#
SET character_set_connection=utf16;
SET sql_mode='NO_ENGINE_SUBSTITUTION';
SELECT @@sql_mode;
@@sql_mode
NO_ENGINE_SUBSTITUTION
SET sql_mode=DEFAULT;
SET NAMES utf8;
#
# End of 5.5 tests
#
#

View file

@ -1,4 +1,4 @@
call mtr.add_suppression("Cannot use utf16 as character_set_client");
call mtr.add_suppression("'utf16' can not be used as client character set");
SHOW VARIABLES LIKE 'collation_server';
Variable_name Value
collation_server utf16_general_ci

View file

@ -1668,6 +1668,16 @@ c
Warnings:
Warning 1300 Invalid utf32 character string: '\xFF\xFF\x00\x00'
#
# MDEV-11685: sql_mode can't be set with non-ascii connection charset
#
SET character_set_connection=utf32;
SET sql_mode='NO_ENGINE_SUBSTITUTION';
SELECT @@sql_mode;
@@sql_mode
NO_ENGINE_SUBSTITUTION
SET sql_mode=DEFAULT;
SET NAMES utf8;
#
# End of 5.5 tests
#
#

View file

@ -0,0 +1,13 @@
set @event_scheduler_save= @@global.event_scheduler;
set @slow_query_log_save= @@global.slow_query_log;
set global event_scheduler= on;
set global slow_query_log= on;
set global long_query_time=0.2;
create table t1 (i int);
insert into t1 values (0);
create event ev on schedule at CURRENT_TIMESTAMP + INTERVAL 1 second do update t1 set i=1+sleep(0.5);
FOUND /update t1 set i=1/ in mysqld-slow.log
drop table t1;
set global event_scheduler= @event_scheduler_save;
set global slow_query_log= @slow_query_log_save;
set global long_query_time= @@session.long_query_time;

View file

@ -2765,6 +2765,12 @@ id date1 date2 DATE_ADD(a.date1,INTERVAL -10 DAY) TO_DAYS(a.date1)-10
18 2010-10-13 2010-10-03 2010-10-03 734413
DROP TABLE t1;
#
# MDEV-10524 Assertion `arg1_int >= 0' failed in Item_func_additive_op::result_precision()
#
SELECT 1 MOD ADDTIME( '13:58:57', '00:00:01' ) + 2;
1 MOD ADDTIME( '13:58:57', '00:00:01' ) + 2
3
#
# Start of 10.0 tests
#
#

View file

@ -799,3 +799,32 @@ a b c
9 d d
DROP TABLE t1;
set optimizer_switch= @optimizer_switch_save;
#
# MDEV-10927: Crash When Using sort_union Optimization
#
set @tmp_optimizer_switch=@@optimizer_switch;
SET optimizer_switch='index_merge_sort_intersection=on';
SET SESSION sort_buffer_size = 1024;
create table t1 (
pk int(11) NOT NULL AUTO_INCREMENT,
col1 int(11) NOT NULL,
col2 int(11) NOT NULL,
col3 int(11) NOT NULL,
key2 int(11) NOT NULL,
col4 int(11) NOT NULL,
key1 int(11) NOT NULL,
PRIMARY KEY (pk),
KEY key1 (key1),
KEY key2 (key2)
) ENGINE=InnoDB AUTO_INCREMENT=12860259 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
create table t2(a int);
insert into t2 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t3(a int);
insert into t3 select A.a + B.a* 10 + C.a * 100 + D.a*1000 from t2 A, t2 B, t2 C, t2 D;
insert into t1 (key1, key2, col1,col2,col3,col4)
select a,a, a,a,a,a from t3;
SELECT sum(col1) FROM t1 FORCE INDEX (key1,key2) WHERE (key1 between 10 and 8191+10) or (key2= 5);
sum(col1)
33632261
drop table t1,t2,t3;
set optimizer_switch=@tmp_optimizer_switch;

View file

@ -151,3 +151,11 @@ select create_options from information_schema.tables where table_schema="test";
create_options
partitioned
drop table t1;
#
# MDEV-11353 - Identical logical conditions
#
CREATE TABLE t1(a INT) CHECKSUM=1 SELECT 1;
SELECT CHECKSUM FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1';
CHECKSUM
3036305396
DROP TABLE t1;

View file

@ -242,14 +242,16 @@ ERROR 42S22: Unknown column 'a' in 'field list'
DROP TABLE t1,t2;
SET SQL_MODE = 'TRADITIONAL';
CREATE TABLE t1 (a INT PRIMARY KEY, b INT NOT NULL);
INSERT INTO t1 VALUES (1,1);
INSERT INTO t1 (a) VALUES (1);
ERROR HY000: Field 'b' doesn't have a default value
INSERT INTO t1 (a) VALUES (1) ON DUPLICATE KEY UPDATE a = b;
ERROR HY000: Field 'b' doesn't have a default value
INSERT INTO t1 (a) VALUES (1) ON DUPLICATE KEY UPDATE b = a;
INSERT INTO t1 (a) VALUES (1) ON DUPLICATE KEY UPDATE b = b;
ERROR HY000: Field 'b' doesn't have a default value
SELECT * FROM t1;
a b
1 1
DROP TABLE t1;
CREATE TABLE t1 (f1 INT AUTO_INCREMENT PRIMARY KEY,
f2 VARCHAR(5) NOT NULL UNIQUE);

View file

@ -5755,11 +5755,13 @@ LEFT JOIN t2 c1 ON c1.parent_id = t.id AND c1.col2 = "val"
LEFT JOIN t2 c23 ON c23.parent_id = t.id AND c23.col2 = "val"
LEFT JOIN t2 c24 ON c24.parent_id = t.id AND c24.col2 = "val"
LEFT JOIN t2 c25 ON c25.parent_id = t.id AND c25.col2 = "val"
LEFT JOIN t2 c26 ON c26.parent_id = t.id AND c26.col2 = "val"
LEFT JOIN t2 c27 ON c27.parent_id = t.id AND c27.col2 = "val"
ORDER BY
col1;
id col1
select timestampdiff(second, @init_time, now()) <= 1;
timestampdiff(second, @init_time, now()) <= 1
select timestampdiff(second, @init_time, now()) <= 5;
timestampdiff(second, @init_time, now()) <= 5
1
set join_cache_level=2;
set @init_time:=now();
@ -5791,11 +5793,13 @@ LEFT JOIN t2 c1 ON c1.parent_id = t.id AND c1.col2 = "val"
LEFT JOIN t2 c23 ON c23.parent_id = t.id AND c23.col2 = "val"
LEFT JOIN t2 c24 ON c24.parent_id = t.id AND c24.col2 = "val"
LEFT JOIN t2 c25 ON c25.parent_id = t.id AND c25.col2 = "val"
LEFT JOIN t2 c26 ON c26.parent_id = t.id AND c26.col2 = "val"
LEFT JOIN t2 c27 ON c27.parent_id = t.id AND c27.col2 = "val"
ORDER BY
col1;
id col1
select timestampdiff(second, @init_time, now()) <= 1;
timestampdiff(second, @init_time, now()) <= 1
select timestampdiff(second, @init_time, now()) <= 5;
timestampdiff(second, @init_time, now()) <= 5
1
EXPLAIN
SELECT t.*
@ -5826,6 +5830,8 @@ LEFT JOIN t2 c1 ON c1.parent_id = t.id AND c1.col2 = "val"
LEFT JOIN t2 c23 ON c23.parent_id = t.id AND c23.col2 = "val"
LEFT JOIN t2 c24 ON c24.parent_id = t.id AND c24.col2 = "val"
LEFT JOIN t2 c25 ON c25.parent_id = t.id AND c25.col2 = "val"
LEFT JOIN t2 c26 ON c26.parent_id = t.id AND c26.col2 = "val"
LEFT JOIN t2 c27 ON c27.parent_id = t.id AND c27.col2 = "val"
ORDER BY
col1;
id select_type table type possible_keys key key_len ref rows Extra
@ -5855,6 +5861,8 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE c23 ALL NULL NULL NULL NULL 1 Using where; Using join buffer (incremental, BNL join)
1 SIMPLE c24 ALL NULL NULL NULL NULL 1 Using where; Using join buffer (incremental, BNL join)
1 SIMPLE c25 ALL NULL NULL NULL NULL 1 Using where; Using join buffer (incremental, BNL join)
1 SIMPLE c26 ALL NULL NULL NULL NULL 1 Using where; Using join buffer (incremental, BNL join)
1 SIMPLE c27 ALL NULL NULL NULL NULL 1 Using where; Using join buffer (incremental, BNL join)
set join_buffer_size=default;
set join_cache_level = default;
DROP TABLE t1,t2;

View file

@ -537,7 +537,7 @@ disconnect con1;
# Bug#11765139 58069: LOAD DATA INFILE: VALGRIND REPORTS INVALID MEMORY READS AND WRITES WITH U
#
CREATE TABLE t1(f1 INT);
SELECT 0xE1C330 INTO OUTFILE 't1.dat';
SELECT 0xE1BB30 INTO OUTFILE 't1.dat';
LOAD DATA INFILE 't1.dat' IGNORE INTO TABLE t1 CHARACTER SET utf8;
DROP TABLE t1;
#
@ -562,34 +562,21 @@ FIELDS TERMINATED BY 't' LINES TERMINATED BY '';
Got one of the listed errors
SET @@sql_mode= @old_mode;
DROP TABLE t1;
#
# Bug#23080148 - Backport of Bug#20683959.
# Bug#20683959 LOAD DATA INFILE IGNORES A SPECIFIC ROW SILENTLY
# UNDER DB CHARSET IS UTF8.
# MDEV-11079 Regression: LOAD DATA INFILE lost BLOB support using utf8 load files
#
CREATE DATABASE d1 CHARSET latin1;
USE d1;
CREATE TABLE t1 (val TEXT);
LOAD DATA INFILE '../../std_data/bug20683959loaddata.txt' INTO TABLE t1;
SELECT COUNT(*) FROM t1;
COUNT(*)
1
SELECT HEX(val) FROM t1;
HEX(val)
C38322525420406E696F757A656368756E3A20E98198E2889AF58081AEE7B99DE4B88AE383A3E7B99DE69690F58087B3E7B9A7EFBDA8E7B99DEFBDB3E7B99DE78999E880B3E7B8BAEFBDAAE7B9A7E89699E296A1E7B8BAE4BBA3EFBD8CE7B8BAEFBDA9E7B8B2E2889AE38184E7B99DEFBDB3E7B99DE4B88AE383A3E7B99DE69690F58087B3E7B9A7EFBDA8E7B99DEFBDB3E7B99DE5B3A8EFBD84E8ABA0EFBDA8E89C89F580948EE599AAE7B8BAEFBDAAE7B8BAE9A198EFBDA9EFBDB1E7B9A7E581B5E289A0E7B8BAEFBDBEE7B9A7E9A194EFBDA9E882B4EFBDA5EFBDB5E980A7F5808B96E28693E99EABE38287E58F99E7B8BAE58AB1E28691E7B8BAF5808B9AE7828AE98095EFBDB1E7B8BAEFBDAFE7B8B2E288ABE6A89FE89EB3E6BA98F58081ADE88EA0EFBDBAE98095E6BA98F58081AEE89D93EFBDBAE8AD9BEFBDACE980A7F5808B96E28693E7B8BAF580918EE288AAE7B8BAE4B88AEFBC9EE7B8BAE4B99DE28691E7B8BAF5808B96EFBCA0E88DB3E6A68AEFBDB9EFBDB3E981B2E5B3A8E296A1E7B8BAE7A4BCE7828AE88DB3E6A68AEFBDB0EFBDBDE7B8BAA0E7B8BAE88B93EFBDBEE5B899EFBC9E
CREATE DATABASE d2 CHARSET utf8;
USE d2;
CREATE TABLE t1 (val TEXT);
LOAD DATA INFILE '../../std_data/bug20683959loaddata.txt' INTO TABLE t1;
Warnings:
Warning 1366 Incorrect string value: '\xF5\x80\x81\xAE\xE7\xB9...' for column 'val' at row 1
SELECT COUNT(*) FROM t1;
COUNT(*)
1
SELECT HEX(val) FROM t1;
HEX(val)
C38322525420406E696F757A656368756E3A20E98198E2889A3F3F3F3FE7B99DE4B88AE383A3E7B99DE696903F3F3F3FE7B9A7EFBDA8E7B99DEFBDB3E7B99DE78999E880B3E7B8BAEFBDAAE7B9A7E89699E296A1E7B8BAE4BBA3EFBD8CE7B8BAEFBDA9E7B8B2E2889AE38184E7B99DEFBDB3E7B99DE4B88AE383A3E7B99DE696903F3F3F3FE7B9A7EFBDA8E7B99DEFBDB3E7B99DE5B3A8EFBD84E8ABA0EFBDA8E89C893F3F3F3FE599AAE7B8BAEFBDAAE7B8BAE9A198EFBDA9EFBDB1E7B9A7E581B5E289A0E7B8BAEFBDBEE7B9A7E9A194EFBDA9E882B4EFBDA5EFBDB5E980A73F3F3F3FE28693E99EABE38287E58F99E7B8BAE58AB1E28691E7B8BA3F3F3F3FE7828AE98095EFBDB1E7B8BAEFBDAFE7B8B2E288ABE6A89FE89EB3E6BA983F3F3F3FE88EA0EFBDBAE98095E6BA983F3F3F3FE89D93EFBDBAE8AD9BEFBDACE980A73F3F3F3FE28693E7B8BA3F3F3F3FE288AAE7B8BAE4B88AEFBC9EE7B8BAE4B99DE28691E7B8BA3F3F3F3FEFBCA0E88DB3E6A68AEFBDB9EFBDB3E981B2E5B3A8E296A1E7B8BAE7A4BCE7828AE88DB3E6A68AEFBDB0EFBDBDE7B8BA3FE7B8BAE88B93EFBDBEE5B899EFBC9E
DROP TABLE d1.t1, d2.t1;
DROP DATABASE d1;
DROP DATABASE d2;
CREATE TABLE t1 (a mediumblob NOT NULL) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
LOAD DATA INFILE '../../std_data/loaddata/mdev-11079.txt' INTO TABLE t1 CHARSET utf8 FIELDS TERMINATED BY ';' ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '\n';
SELECT HEX(a) FROM t1;
HEX(a)
25AAABAC
DROP TABLE t1;
#
# MDEV-11631 LOAD DATA INFILE fails to load data with an escape character followed by a multi-byte character
#
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8);
LOAD DATA INFILE '../../std_data/loaddata/mdev-11631.txt' INTO TABLE t1 CHARACTER SET utf8;
SELECT HEX(a) FROM t1;
HEX(a)
C3A4
DROP TABLE t1;

View file

@ -70,9 +70,9 @@ sleep(0.5)
select count(*) FROM mysql.slow_log;
count(*)
1
truncate mysql.slow_log;
set @@long_query_time=default;
set global slow_query_log= @org_slow_query_log;
set @@log_slow_filter=default;
set @@log_slow_verbosity=default;
set global log_output= default;
truncate mysql.slow_log;

View file

@ -474,10 +474,10 @@ The following options may be given as the first argument:
--max-sp-recursion-depth[=#]
Maximum stored procedure recursion depth
--max-statement-time=#
A SELECT query that have taken more than
max_statement_time seconds will be aborted. The argument
will be treated as a decimal value with microsecond
precision. A value of 0 (default) means no timeout
A query that has taken more than max_statement_time
seconds will be aborted. The argument will be treated as
a decimal value with microsecond precision. A value of 0
(default) means no timeout
--max-tmp-tables=# Unused, will be removed.
--max-user-connections=#
The maximum number of active connections for a single

View file

@ -2935,6 +2935,17 @@ t2 A, t2 B
where A.b = B.b
order by A.col2, B.col2 limit 10, 1000000;
drop table t1,t2,t3;
#
# mdev-10705 : long order by list that can be skipped
#
SELECT 1
UNION
( SELECT 2
ORDER BY NULL, @a0 := 3, @a1 := 3, @a2 := 3, @a3 := 3, @a4 := 3,
@a5 := 3, @a6 := 3, @a7 := 3, @a8 := 3, @a9 := 3, @a10 := 3 );
1
1
2
End of 5.5 tests
#
# MDEV-5884: EXPLAIN UPDATE ... ORDER BY LIMIT shows wrong #rows

View file

@ -7165,6 +7165,17 @@ NULL
drop view v2;
drop table t1,t2;
#
# MDEV-10386 Assertion `fixed == 1' failed in virtual String* Item_func_conv_charset::val_str(String*)
#
CREATE TABLE t1 (f1 CHAR(3) CHARACTER SET utf8 NULL, f2 CHAR(3) CHARACTER SET latin1 NULL);
INSERT INTO t1 VALUES ('foo','bar');
SELECT * FROM t1 WHERE f2 >= SOME ( SELECT f1 FROM t1 );
f1 f2
SELECT * FROM t1 WHERE f2 <= SOME ( SELECT f1 FROM t1 );
f1 f2
foo bar
DROP TABLE t1;
#
# MDEV-9487: Server crashes in Time_and_counter_tracker::incr_loops
# with UNION in ALL subquery
#

View file

@ -348,4 +348,49 @@ where t1.a = t2.a and ( t1.a = ( select min(a) from t1 ) or 0 );
a a a
FRA FRA FRA
drop table t1,t2,t3;
#
# MDEV-10148: Database crashes in the query to the View
#
CREATE TABLE t1 (
key_code INT(11) NOT NULL,
value_string VARCHAR(50) NULL DEFAULT NULL,
PRIMARY KEY (key_code)
) COLLATE='utf8_general_ci' ENGINE=InnoDB ;
CREATE TABLE t2 (
key_code INT(11) NOT NULL,
target_date DATE NULL DEFAULT NULL,
PRIMARY KEY (key_code)
) COLLATE='utf8_general_ci' ENGINE=InnoDB ;
CREATE TABLE t3 (
now_date DATE NOT NULL,
PRIMARY KEY (now_date)
) COLLATE='utf8_general_ci' ENGINE=InnoDB ;
CREATE VIEW v1
AS
SELECT
B.key_code,
B.target_date
FROM
t2 B INNER JOIN t3 C ON
B.target_date = C.now_date
;
SET @s = 'SELECT A.* FROM t1 A WHERE A.key_code IN (SELECT key_code FROM v1)';
PREPARE stmt FROM @s;
EXECUTE stmt;
key_code value_string
EXECUTE stmt;
key_code value_string
DEALLOCATE PREPARE stmt;
DROP VIEW v1;
DROP TABLE t1,t2,t3;
set optimizer_switch=@subselect2_test_tmp;
create table t1 (a int);
create table t2 (a int);
create table t3(a int);
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
insert into t2 select a from t1;
insert into t3 select a from t1;
select null in (select a from t1 where a < out3.a union select a from t2 where
(select a from t3) +1 < out3.a+1) from t3 out3;
ERROR 21000: Subquery returns more than 1 row
drop table t1, t2, t3;

View file

@ -2401,5 +2401,56 @@ SELECT x FROM t1 WHERE id > (SELECT MAX(id) - 1000 FROM t1) ORDER BY x LIMIT 1;
x
0
drop table t1;
#
# MDEV-7691: Assertion `outer_context || !*from_field || *from_field == not_found_field' ...
#
set optimizer_switch=default;
CREATE TABLE t1 (a INT) ENGINE=MyISAM;
INSERT INTO t1 VALUES (4),(6);
CREATE TABLE t2 (b INT) ENGINE=MyISAM;
INSERT INTO t2 VALUES (1),(8);
PREPARE stmt FROM "
SELECT * FROM t2
HAVING 0 IN (
SELECT a FROM t1
WHERE a IN (
SELECT a FROM t1
WHERE b = a
)
)
";
EXECUTE stmt;
b
EXECUTE stmt;
b
# Alternative test case, without HAVING
CREATE TABLE t3 (i INT) ENGINE=MyISAM;
INSERT INTO t3 VALUES (4),(6);
PREPARE stmt FROM "
SELECT * FROM t3 AS t10
WHERE EXISTS (
SELECT * FROM t3 AS t20 WHERE t10.i IN (
SELECT i FROM t3
)
)";
EXECUTE stmt;
i
6
EXECUTE stmt;
i
6
drop table t1, t2, t3;
SET optimizer_switch= @@global.optimizer_switch;
set @@tmp_table_size= @@global.tmp_table_size;
#
# MDEV-10232 Scalar result of subquery changes after adding an outer select stmt
#
create table t1(c1 int, c2 int, primary key(c2));
insert into t1 values(2,1),(1,2);
select (select c1 from t1 group by c1,c2 order by c1 limit 1) as x;
x
1
(select c1 from t1 group by c1,c2 order by c1 limit 1);
c1
1
drop table t1;

View file

@ -7165,6 +7165,17 @@ NULL
drop view v2;
drop table t1,t2;
#
# MDEV-10386 Assertion `fixed == 1' failed in virtual String* Item_func_conv_charset::val_str(String*)
#
CREATE TABLE t1 (f1 CHAR(3) CHARACTER SET utf8 NULL, f2 CHAR(3) CHARACTER SET latin1 NULL);
INSERT INTO t1 VALUES ('foo','bar');
SELECT * FROM t1 WHERE f2 >= SOME ( SELECT f1 FROM t1 );
f1 f2
SELECT * FROM t1 WHERE f2 <= SOME ( SELECT f1 FROM t1 );
f1 f2
foo bar
DROP TABLE t1;
#
# MDEV-9487: Server crashes in Time_and_counter_tracker::incr_loops
# with UNION in ALL subquery
#

View file

@ -7158,6 +7158,17 @@ NULL
drop view v2;
drop table t1,t2;
#
# MDEV-10386 Assertion `fixed == 1' failed in virtual String* Item_func_conv_charset::val_str(String*)
#
CREATE TABLE t1 (f1 CHAR(3) CHARACTER SET utf8 NULL, f2 CHAR(3) CHARACTER SET latin1 NULL);
INSERT INTO t1 VALUES ('foo','bar');
SELECT * FROM t1 WHERE f2 >= SOME ( SELECT f1 FROM t1 );
f1 f2
SELECT * FROM t1 WHERE f2 <= SOME ( SELECT f1 FROM t1 );
f1 f2
foo bar
DROP TABLE t1;
#
# MDEV-9487: Server crashes in Time_and_counter_tracker::incr_loops
# with UNION in ALL subquery
#

View file

@ -7156,6 +7156,17 @@ NULL
drop view v2;
drop table t1,t2;
#
# MDEV-10386 Assertion `fixed == 1' failed in virtual String* Item_func_conv_charset::val_str(String*)
#
CREATE TABLE t1 (f1 CHAR(3) CHARACTER SET utf8 NULL, f2 CHAR(3) CHARACTER SET latin1 NULL);
INSERT INTO t1 VALUES ('foo','bar');
SELECT * FROM t1 WHERE f2 >= SOME ( SELECT f1 FROM t1 );
f1 f2
SELECT * FROM t1 WHERE f2 <= SOME ( SELECT f1 FROM t1 );
f1 f2
foo bar
DROP TABLE t1;
#
# MDEV-9487: Server crashes in Time_and_counter_tracker::incr_loops
# with UNION in ALL subquery
#

View file

@ -7171,6 +7171,17 @@ NULL
drop view v2;
drop table t1,t2;
#
# MDEV-10386 Assertion `fixed == 1' failed in virtual String* Item_func_conv_charset::val_str(String*)
#
CREATE TABLE t1 (f1 CHAR(3) CHARACTER SET utf8 NULL, f2 CHAR(3) CHARACTER SET latin1 NULL);
INSERT INTO t1 VALUES ('foo','bar');
SELECT * FROM t1 WHERE f2 >= SOME ( SELECT f1 FROM t1 );
f1 f2
SELECT * FROM t1 WHERE f2 <= SOME ( SELECT f1 FROM t1 );
f1 f2
foo bar
DROP TABLE t1;
#
# MDEV-9487: Server crashes in Time_and_counter_tracker::incr_loops
# with UNION in ALL subquery
#

View file

@ -7156,6 +7156,17 @@ NULL
drop view v2;
drop table t1,t2;
#
# MDEV-10386 Assertion `fixed == 1' failed in virtual String* Item_func_conv_charset::val_str(String*)
#
CREATE TABLE t1 (f1 CHAR(3) CHARACTER SET utf8 NULL, f2 CHAR(3) CHARACTER SET latin1 NULL);
INSERT INTO t1 VALUES ('foo','bar');
SELECT * FROM t1 WHERE f2 >= SOME ( SELECT f1 FROM t1 );
f1 f2
SELECT * FROM t1 WHERE f2 <= SOME ( SELECT f1 FROM t1 );
f1 f2
foo bar
DROP TABLE t1;
#
# MDEV-9487: Server crashes in Time_and_counter_tracker::incr_loops
# with UNION in ALL subquery
#

View file

@ -0,0 +1,22 @@
set sql_mode='strict_all_tables';
create table t1 (a int not null, b int);
insert t1 (b) values (1);
ERROR HY000: Field 'a' doesn't have a default value
create trigger trgi before insert on t1 for each row
case new.b
when 10 then
set new.a = new.b;
when 30 then
set new.a = new.a;
else
do 1;
end case|
insert t1 (b) values (10);
insert t1 (b) values (20);
ERROR HY000: Field 'a' doesn't have a default value
insert t1 (b) values (30);
select * from t1;
a b
10 10
0 30
drop table t1;

View file

@ -1233,12 +1233,9 @@ a b
select * from ((select * from t1 limit 1) union (select * from t1 limit 1)) a;
a b
1 a
2 b
select * from ((select * from t1 limit 1) union (select * from t1 limit 1) union (select * from t1 limit 1)) a;
a b
1 a
2 b
3 c
select * from ((((select * from t1))) union (select * from t1) union (select * from t1)) a;
a b
1 a
@ -1621,7 +1618,6 @@ NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL Using filesort
Warnings:
Note 1003 select NULL AS `a` from `test`.`t1` union select NULL AS `a` from `test`.`t1` order by `a`
DROP TABLE t1;
End of 5.0 tests
#
# Bug#32858: Error: "Incorrect usage of UNION and INTO" does not take
# subselects into account
@ -1736,6 +1732,16 @@ a
6
7
8
(select a from t1 where false) UNION (select a from t1) limit 8;
a
10
2
3
4
5
6
7
8
drop table t1;
#
# Bug#11765255 58201:
@ -2031,6 +2037,25 @@ bbbb
dddd
drop table t1;
#
# MDEV-10172: UNION query returns incorrect rows outside
# conditional evaluation
#
create table t1 (d datetime not null primary key);
insert into t1(d) values ('2016-06-01'),('2016-06-02'),('2016-06-03'),('2016-06-04');
select * from
(
select * from t1 where d between '2016-06-02' and '2016-06-05'
union
(select * from t1 where d < '2016-06-05' order by d desc limit 1)
) onlyJun2toJun4
order by d;
d
2016-06-02 00:00:00
2016-06-03 00:00:00
2016-06-04 00:00:00
drop table t1;
End of 5.0 tests
#
# WL#1763 Avoid creating temporary table in UNION ALL
#
EXPLAIN SELECT 1 UNION ALL SELECT 1 LIMIT 1 OFFSET 1;

View file

@ -1 +0,0 @@
Ã"RT @niouzechun: 遘√<E98198><E2889A><EFBFBD><EFBFBD>繝上ャ繝斐<E7B99D><E69690><EFBFBD><EFBFBD>繧ィ繝ウ繝牙耳縺ェ繧薙□縺代縺ゥ縲√い繝ウ繝上ャ繝斐<E7B99D><E69690><EFBFBD><EFBFBD>繧ィ繝ウ繝峨諠ィ蜉<EFBDA8><E89C89><EFBFBD><EFBFBD>噪縺ェ縺願ゥア繧偵≠縺セ繧顔ゥ肴・オ逧<EFBDB5><E980A7><EFBFBD><EFBFBD>↓鞫ょ叙縺励↑縺<E28691><E7B8BA><EFBFBD><EFBFBD>炊逕ア縺ッ縲∫樟螳溘<E89EB3><E6BA98><EFBFBD><EFBFBD>莠コ逕溘<E98095><E6BA98><EFBFBD><EFBFBD>蝓コ譛ャ逧<EFBDAC><E980A7><EFBFBD><EFBFBD>↓縺<E28693><E7B8BA><EFBFBD><EFBFBD>縺上縺九↑縺<E28691><E7B8BA><EFBFBD><EFBFBD>荳榊ケウ遲峨□縺礼炊荳榊ース縺<EFBDBD>縺苓セ帙

View file

@ -0,0 +1 @@
"%<25><><EFBFBD>"

View file

@ -0,0 +1 @@

View file

@ -0,0 +1,22 @@
#
# MDEV-4774: Strangeness with max_binlog_stmt_cache_size Settings
#
CALL mtr.add_suppression("unsigned value 18446744073709547520 adjusted to 4294963200");
SELECT @@global.max_binlog_stmt_cache_size;
@@global.max_binlog_stmt_cache_size
MAX_BINLOG_STMT_CACHE_SIZE
SET @cache_size= @@max_binlog_stmt_cache_size;
SET @@global.max_binlog_stmt_cache_size= @cache_size+1;
SELECT @@global.max_binlog_stmt_cache_size;
@@global.max_binlog_stmt_cache_size
MAX_BINLOG_STMT_CACHE_SIZE
SET @@global.max_binlog_stmt_cache_size = @cache_size+4095;
SELECT @@global.max_binlog_stmt_cache_size;
@@global.max_binlog_stmt_cache_size
MAX_BINLOG_STMT_CACHE_SIZE
SET @@global.max_binlog_stmt_cache_size= @cache_size-1;
SELECT @@global.max_binlog_stmt_cache_size = @cache_size-4096;
@@global.max_binlog_stmt_cache_size = @cache_size-4096
1
SET @@global.max_binlog_stmt_cache_size= @cache_size;
# End of test

View file

@ -0,0 +1 @@
--max_binlog_stmt_cache_size=18446744073709547520

View file

@ -0,0 +1,36 @@
--echo #
--echo # MDEV-4774: Strangeness with max_binlog_stmt_cache_size Settings
--echo #
CALL mtr.add_suppression("unsigned value 18446744073709547520 adjusted to 4294963200");
--replace_result 18446744073709547520 MAX_BINLOG_STMT_CACHE_SIZE 4294963200 MAX_BINLOG_STMT_CACHE_SIZE
SELECT @@global.max_binlog_stmt_cache_size;
# Save the initial value of @@global.max_binlog_stmt_cache_size.
--replace_result 18446744073709547520 MAX_BINLOG_STMT_CACHE_SIZE 4294963200 MAX_BINLOG_STMT_CACHE_SIZE
SET @cache_size= @@max_binlog_stmt_cache_size;
--disable_warnings
SET @@global.max_binlog_stmt_cache_size= @cache_size+1;
--enable_warnings
--replace_result 18446744073709547520 MAX_BINLOG_STMT_CACHE_SIZE 4294963200 MAX_BINLOG_STMT_CACHE_SIZE
SELECT @@global.max_binlog_stmt_cache_size;
--disable_warnings
SET @@global.max_binlog_stmt_cache_size = @cache_size+4095;
--enable_warnings
--replace_result 4294963200 MAX_BINLOG_STMT_CACHE_SIZE 18446744073709547520 MAX_BINLOG_STMT_CACHE_SIZE
SELECT @@global.max_binlog_stmt_cache_size;
--disable_warnings
SET @@global.max_binlog_stmt_cache_size= @cache_size-1;
--enable_warnings
SELECT @@global.max_binlog_stmt_cache_size = @cache_size-4096;
# Restore @@global.max_binlog_stmt_cache_size to its initial value.
SET @@global.max_binlog_stmt_cache_size= @cache_size;
--echo # End of test

View file

@ -1,6 +1,6 @@
include/master-slave.inc
[connection master]
call mtr.add_suppression("Cannot use utf16 as character_set_client");
call mtr.add_suppression("'utf16' can not be used as client character set");
CREATE TABLE t1(i VARCHAR(20));
INSERT INTO t1 VALUES (0xFFFF);
connection slave;

View file

@ -0,0 +1,3 @@
# Wait max 10 min for key encryption threads to encrypt all spaces
# Success!
# All done

View file

@ -0,0 +1,3 @@
--innodb-encrypt-tables=1
--innodb-encryption-threads=4
--innodb-tablespaces-encryption

View file

@ -0,0 +1,34 @@
--source suite/encryption/include/have_file_key_management_plugin.inc
--source include/have_innodb.inc
--source include/not_embedded.inc
--echo # Wait max 10 min for key encryption threads to encrypt all spaces
let $cnt=600;
while ($cnt)
{
let $success=`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0`;
if ($success)
{
let $cnt=0;
}
if (!$success)
{
real_sleep 1;
dec $cnt;
}
}
if (!$success)
{
SELECT * FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION;
SHOW STATUS LIKE 'innodb_encryption%';
-- die Timeout waiting for encryption threads
}
--echo # Success!
#
# MDEV-11835: InnoDB: Failing assertion: free_slot != NULL on
# restarting server with encryption and read-only
#
--let $restart_parameters= --innodb-read-only=1 --innodb-encrypt-tables=1
--source include/restart_mysqld.inc
--echo # All done

View file

@ -6,6 +6,7 @@
# Checking of other prerequisites is in charset_master.test #
################################################################################
--source include/no_valgrind_without_big.inc
--source include/have_innodb.inc
let $engine_type= InnoDB;

View file

@ -0,0 +1,11 @@
#
# MDEV-10812: On COM_STMT_CLOSE/COM_QUIT, when wsrep_conflict_state
# is ABORTED, it causes wrong response to be sent to the client
#
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
CREATE TABLE t1(a INT PRIMARY KEY);
INSERT INTO t1 VALUES(1),(2),(3);
START TRANSACTION ;
UPDATE t1 SET a=a+100;
UPDATE t1 SET a=a+100;
DROP TABLE t1;

View file

@ -24,3 +24,4 @@ connection node_2;
SET GLOBAL wsrep_certify_nonPK = 1;
DROP TABLE t1;
DROP TABLE t2;
call mtr.add_suppression("SQL statement was ineffective");

View file

@ -45,3 +45,4 @@ CALL mtr.add_suppression("gcs connect failed: Connection timed out");
CALL mtr.add_suppression("WSREP: wsrep::connect\\(foo://\\) failed: 7");
disconnect node_2;
disconnect node_1;
# End of test

View file

@ -113,3 +113,23 @@ INSERT INTO t1 (f2) VALUES (2);
ERROR HY000: wsrep_max_ws_rows exceeded
DROP TABLE t1;
DROP TABLE ten;
#
# MDEV-11817: Altering a table with more rows than
# wsrep_max_ws_rows causes cluster to break when running
# Galera cluster in TOI mode
#
CREATE TABLE t1(c1 INT)ENGINE = INNODB;
SET GLOBAL wsrep_max_ws_rows= DEFAULT;
INSERT INTO t1 VALUES(1);
INSERT INTO t1 SELECT * FROM t1;
SET GLOBAL wsrep_max_ws_rows= 1;
ALTER TABLE t1 CHANGE COLUMN c1 c1 BIGINT;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` bigint(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SELECT COUNT(*) FROM t1;
COUNT(*)
2
DROP TABLE t1;

View file

@ -32,7 +32,6 @@ push @::global_suppressions,
qr(WSREP:.*down context.*),
qr(WSREP: Failed to send state UUID:),
qr(WSREP: last inactive check more than .* skipping check),
qr(WSREP: SQL statement was ineffective),
qr(WSREP: Releasing seqno [0-9]* before [0-9]* was assigned.),
qr|WSREP: access file\(.*gvwstate.dat\) failed\(No such file or directory\)|,
qr(WSREP: Quorum: No node with complete state),
@ -67,6 +66,7 @@ push @::global_suppressions,
qr|WSREP: gcs_caused\(\) returned .*|,
qr|WSREP: Protocol violation. JOIN message sender .* is not in state transfer \(SYNCED\). Message ignored.|,
qr(WSREP: Action message in non-primary configuration from member [0-9]*),
qr(WSREP: discarding established .*),
);

View file

@ -0,0 +1,27 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--echo #
--echo # MDEV-10812: On COM_STMT_CLOSE/COM_QUIT, when wsrep_conflict_state
--echo # is ABORTED, it causes wrong response to be sent to the client
--echo #
# First create a deadlock
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
CREATE TABLE t1(a INT PRIMARY KEY);
INSERT INTO t1 VALUES(1),(2),(3);
START TRANSACTION ;
UPDATE t1 SET a=a+100;
--sleep 2
--connection node_2
UPDATE t1 SET a=a+100;
--sleep 2
--connection node_1a
# here we get deadlock error
--disconnect node_1a
--connection node_2
DROP TABLE t1;

View file

@ -37,3 +37,7 @@ SELECT COUNT(*) = 1 FROM t2 WHERE f1 = 3;
DROP TABLE t1;
DROP TABLE t2;
--connection node_1
call mtr.add_suppression("SQL statement was ineffective");
--source include/galera_end.inc

View file

@ -9,6 +9,7 @@
--let $node_1=node_1
--let $node_2=node_2
--source include/auto_increment_offset_save.inc
#
# Set to invalid value
#
@ -73,3 +74,4 @@ CALL mtr.add_suppression("WSREP: wsrep::connect\\(foo://\\) failed: 7");
--source include/auto_increment_offset_restore.inc
--source include/galera_end.inc
--echo # End of test

View file

@ -146,10 +146,31 @@ INSERT INTO t1 (f2) VALUES (1);
--error ER_ERROR_DURING_COMMIT
INSERT INTO t1 (f2) VALUES (2);
DROP TABLE t1;
DROP TABLE ten;
--echo #
--echo # MDEV-11817: Altering a table with more rows than
--echo # wsrep_max_ws_rows causes cluster to break when running
--echo # Galera cluster in TOI mode
--echo #
--connection node_1
CREATE TABLE t1(c1 INT)ENGINE = INNODB;
SET GLOBAL wsrep_max_ws_rows= DEFAULT;
INSERT INTO t1 VALUES(1);
INSERT INTO t1 SELECT * FROM t1;
SET GLOBAL wsrep_max_ws_rows= 1;
ALTER TABLE t1 CHANGE COLUMN c1 c1 BIGINT;
--connection node_2
SHOW CREATE TABLE t1;
SELECT COUNT(*) FROM t1;
DROP TABLE t1;
--connection node_1
--disable_query_log
--eval SET GLOBAL wsrep_max_ws_rows = $wsrep_max_ws_rows_orig
--enable_query_log
DROP TABLE t1;
DROP TABLE ten;
--source include/galera_end.inc

View file

@ -0,0 +1,20 @@
SET GLOBAL innodb_file_format = `Barracuda`;
SET GLOBAL innodb_file_per_table = ON;
create table t1 (c1 int not null primary key auto_increment, b char(200)) engine=innodb page_compressed=1;
insert into t1 values(NULL,'compressed_text_aaaaaaaaabbbbbbbbbbbbbccccccccccccc');
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
# t1 compressed expected NOT FOUND
NOT FOUND /compressed_text/ in t1.ibd
drop table t1;

View file

@ -0,0 +1,51 @@
--source include/have_innodb.inc
--disable_query_log
let $innodb_compression_algorithm_orig=`SELECT @@innodb_compression_algorithm`;
let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
--enable_query_log
--disable_warnings
SET GLOBAL innodb_file_format = `Barracuda`;
SET GLOBAL innodb_file_per_table = ON;
--enable_warnings
create table t1 (c1 int not null primary key auto_increment, b char(200)) engine=innodb page_compressed=1;
insert into t1 values(NULL,'compressed_text_aaaaaaaaabbbbbbbbbbbbbccccccccccccc');
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
let $wait_condition= select variable_value > 0 from information_schema.global_status where variable_name = 'INNODB_NUM_PAGES_PAGE_COMPRESSED';
--source include/wait_condition.inc
--let $MYSQLD_DATADIR=`select @@datadir`
--let t1_IBD = $MYSQLD_DATADIR/test/t1.ibd
--let SEARCH_RANGE = 10000000
--let SEARCH_PATTERN=compressed_text
--echo # t1 compressed expected NOT FOUND
-- let SEARCH_FILE=$t1_IBD
-- source include/search_pattern_in_file.inc
drop table t1;
# reset system
--disable_query_log
--disable_warnings
EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algorithm_orig;
EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
--enable_warnings
--enable_query_log

View file

@ -206,10 +206,10 @@ Filename::tab#.ibd
# allow-mismatches,page,start-page,end-page
[9]: check the both short and long options "page" and "start-page" when
# seek value is larger than file size.
NOT FOUND /Error: Unable to seek to necessary offset: Invalid argument/ in my_restart.err
NOT FOUND /Error: Unable to seek to necessary offset: Invalid argument/ in my_restart.err
NOT FOUND /Error: Unable to seek to necessary offset: Invalid argument/ in my_restart.err
NOT FOUND /Error: Unable to seek to necessary offset: Invalid argument/ in my_restart.err
FOUND /Error: Unable to seek to necessary offset: Invalid argument/ in my_restart.err
FOUND /Error: Unable to seek to necessary offset: Invalid argument/ in my_restart.err
FOUND /Error: Unable to seek to necessary offset: Invalid argument/ in my_restart.err
FOUND /Error: Unable to seek to necessary offset: Invalid argument/ in my_restart.err
[34]: check the invalid upper bound values for options, allow-mismatches, end-page, start-page and page.
# innochecksum will fail with error code: 1
NOT FOUND /Incorrect unsigned integer value: '18446744073709551616'/ in my_restart.err

View file

@ -1,15 +1,21 @@
include/master-slave.inc
[connection master]
---Setup Section --
set timestamp=1000000000;
DROP TABLE IF EXISTS t1,t2,t3;
connection master;
CREATE TABLE t1(word VARCHAR(20));
CREATE TABLE t2(id INT AUTO_INCREMENT NOT NULL PRIMARY KEY);
CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT);
---Test1 check table load --
INSERT INTO t1 VALUES ("abirvalg");
LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1;
LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1;
LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1;
LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1;
LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1;
set @d1 = 'dd1';
set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1);
set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1);
set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1);
---Test 1 check table load --
SELECT COUNT(*) from t1;
COUNT(*)
351
@ -74,9 +80,7 @@ c1 c3 c4 c5
connection master;
insert into t1 values ("Alas");
flush logs;
--- Test 1 Dump binlog to file --
--- Test 1 delete tables, clean master and slave --
DROP TABLE t1;
DROP TABLE t2;
@ -91,9 +95,7 @@ reset slave;
start slave;
include/wait_for_slave_to_start.inc
connection master;
--- Test 1 Load from Dump binlog file --
--- Test 1 Check Load Results --
SELECT COUNT(*) from t1;
COUNT(*)
@ -157,7 +159,6 @@ c1 c3 c4 c5
4 2006-02-22 00:00:00 Tested in Texas 8.8
5 2006-02-22 00:00:00 Tested in Texas 11
connection master;
--- Test 2 position test --
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
@ -168,7 +169,7 @@ use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.sql_mode=1342177280/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
@ -181,7 +182,6 @@ DELIMITER ;
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
--- Test 3 First Remote test --
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
@ -192,15 +192,12 @@ use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.sql_mode=1342177280/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
DROP TABLE IF EXISTS `t1`,`t2`,`t3` /* generated by server */
/*!*/;
SET TIMESTAMP=1000000000/*!*/;
CREATE TABLE t1(word VARCHAR(20))
/*!*/;
SET TIMESTAMP=1000000000/*!*/;
@ -214,7 +211,6 @@ DELIMITER ;
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
--- Test 4 Second Remote test --
DROP TABLE t1;
DROP TABLE t2;
@ -291,7 +287,6 @@ c1 c3 c4 c5
4 2006-02-22 00:00:00 Tested in Texas 8.8
5 2006-02-22 00:00:00 Tested in Texas 11
connection master;
--- Test 5 LOAD DATA --
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
@ -302,7 +297,6 @@ DELIMITER ;
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
--- Test 6 reading stdin --
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
@ -313,15 +307,12 @@ use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.sql_mode=1342177280/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
DROP TABLE IF EXISTS `t1`,`t2`,`t3` /* generated by server */
/*!*/;
SET TIMESTAMP=1000000000/*!*/;
CREATE TABLE t1(word VARCHAR(20))
/*!*/;
SET TIMESTAMP=1000000000/*!*/;
@ -335,7 +326,6 @@ DELIMITER ;
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
--- Test 7 reading stdin w/position --
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
@ -346,7 +336,7 @@ use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.sql_mode=1342177280/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
@ -359,7 +349,6 @@ DELIMITER ;
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
--- Test 8 switch internal charset --
connection slave;
stop slave;
@ -400,18 +389,17 @@ HEX(f)
select HEX(f) from t5;
HEX(f)
835C
--- Test cleanup --
connection master;
connection slave;
connection master;
DROP TABLE IF EXISTS t1;
DROP TABLE t1, t2, t3, t04, t05, t4, t5;
CREATE TABLE t1 (a INT NOT NULL KEY, b INT);
INSERT INTO t1 VALUES(1,1);
SELECT * FROM t1;
a b
1 1
FLUSH LOGS;
DROP TABLE IF EXISTS t1, t2, t3, t04, t05, t4, t5;
DROP TABLE t1;
connection slave;
include/rpl_end.inc

View file

@ -1,6 +1,6 @@
include/master-slave.inc
[connection master]
call mtr.add_suppression("Cannot use utf16 as character_set_client");
call mtr.add_suppression("'utf16' can not be used as client character set");
CREATE TABLE t1(i VARCHAR(20));
INSERT INTO t1 VALUES (0xFFFF);
connection slave;

View file

@ -0,0 +1,17 @@
include/master-slave.inc
[connection master]
connection slave;
install soname "simple_password_check";
select @@strict_password_validation;
@@strict_password_validation
1
connection master;
create user foo1 identified by password '11111111111111111111111111111111111111111';
set password for foo1 = PASSWORD('PLAINtext-password!!99');
drop user foo1;
connection slave;
connection slave;
create user foo1 identified by password '11111111111111111111111111111111111111111';
ERROR HY000: The MariaDB server is running with the --strict-password-validation option so it cannot execute this statement
uninstall plugin simple_password_check;
include/rpl_end.inc

View file

@ -4,44 +4,27 @@
# Purpose: To test changes to mysqlbinlog for row based bin logs #
# We are using .opt file since we need small binlog size #
##################################################################
# Include Section
# Make sure that we have row based bin log
-- source include/have_binlog_format_row.inc
# Embedded server doesn't support binlogging
-- source include/not_embedded.inc
# This test requires the cp932 charset compiled in
-- source include/have_cp932.inc
# Slow test, don't run during staging part
-- source include/not_staging.inc
-- source include/master-slave.inc
# Setup Section
--echo ---Setup Section --
# we need this for getting fixed timestamps inside of this test
--disable_query_log
select "---Setup Section --" as "";
set sql_mode="";
--enable_query_log
set timestamp=1000000000;
--disable_warnings
DROP TABLE IF EXISTS t1,t2,t3;
--enable_warnings
connection master;
CREATE TABLE t1(word VARCHAR(20));
CREATE TABLE t2(id INT AUTO_INCREMENT NOT NULL PRIMARY KEY);
--let $position= query_get_value(SHOW MASTER STATUS, Position, 1)
--let position= query_get_value(SHOW MASTER STATUS, Position, 1)
CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT);
--let $stop_position=query_get_value(SHOW MASTER STATUS, Position, 1)
--let $stop_position1=`select $stop_position - 1`
--let $binlog_start_pos=query_get_value(SHOW BINLOG EVENTS LIMIT 1, End_log_pos, 1)
--let stop_position=query_get_value(SHOW MASTER STATUS, Position, 1)
--let stop_position1=`select $stop_position - 1`
--let binlog_start_pos=query_get_value(SHOW BINLOG EVENTS LIMIT 1, End_log_pos, 1)
# Test Section
# Lets start by putting some data into the tables.
--disable_query_log
INSERT INTO t1 VALUES ("abirvalg");
LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1;
LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1;
@ -55,7 +38,8 @@ set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1);
set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1);
set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1);
let $count=500;
--disable_query_log
let count=500;
while ($count)
{
INSERT INTO t2 VALUES (NULL);
@ -64,10 +48,7 @@ while ($count)
}
--enable_query_log
--disable_query_log
select "---Test1 check table load --" as "";
--enable_query_log
--echo ---Test 1 check table load --
# Lets Check the tables on the Master
SELECT COUNT(*) from t1;
@ -96,34 +77,26 @@ insert into t1 values ("Alas");
flush logs;
# delimiters are for easier debugging in future
--disable_query_log
select "--- Test 1 Dump binlog to file --" as "";
--enable_query_log
--echo --- Test 1 Dump binlog to file --
#
# Prepare local temporary file to recreate what we have currently.
let $MYSQLD_DATADIR= `select @@datadir;`;
let MYSQLD_DATADIR= `select @@datadir;`;
--exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/master.sql
--exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000002 >> $MYSQLTEST_VARDIR/tmp/master.sql
# Now that we have our file, lets get rid of the current database.
# Cleanup the master and the slave and try to recreate.
--disable_query_log
select "--- Test 1 delete tables, clean master and slave --" as "";
--enable_query_log
--echo --- Test 1 delete tables, clean master and slave --
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;
sync_slave_with_master;
#we expect STOP SLAVE to produce a warning as the slave is stopped
#(the server was started with skip-slave-start)
--disable_warnings
stop slave;
--source include/wait_for_slave_to_stop.inc
--enable_warnings
connection master;
reset master;
connection slave;
@ -133,15 +106,11 @@ start slave;
connection master;
# We should be clean at this point, now we will run in the file from above.
--disable_query_log
select "--- Test 1 Load from Dump binlog file --" as "";
--enable_query_log
--echo --- Test 1 Load from Dump binlog file --
--exec $MYSQL -e "source $MYSQLTEST_VARDIR/tmp/master.sql"
--disable_query_log
select "--- Test 1 Check Load Results --" as "";
--enable_query_log
--echo --- Test 1 Check Load Results --
# Lets Check the tables on the Master
SELECT COUNT(*) from t1;
@ -169,28 +138,20 @@ remove_file $MYSQLTEST_VARDIR/tmp/master.sql;
# this test for start-position option
# By setting this position to 416, we should only get the create of t3
--disable_query_log
select "--- Test 2 position test --" as "";
--enable_query_log
let $MYSQLD_DATADIR= `select @@datadir;`;
--echo --- Test 2 position test --
--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --start-position=$position --stop-position=$stop_position $MYSQLD_DATADIR/master-bin.000001
# These are tests for remote binlog.
# They should return the same as previous test.
--disable_query_log
select "--- Test 3 First Remote test --" as "";
--enable_query_log
--echo --- Test 3 First Remote test --
# This is broken now
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --stop-position=$stop_position --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001
--disable_query_log
select "--- Test 4 Second Remote test --" as "";
--enable_query_log
--echo --- Test 4 Second Remote test --
--exec $MYSQL_BINLOG --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 > $MYSQLTEST_VARDIR/tmp/remote.sql
--exec $MYSQL_BINLOG --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 >> $MYSQLTEST_VARDIR/tmp/remote.sql
# Now that we have our file, lets get rid of the current database.
@ -202,13 +163,8 @@ DROP TABLE t3;
sync_slave_with_master;
#we expect STOP SLAVE to produce a warning as the slave is stopped
#(the server was started with skip-slave-start)
--disable_warnings
stop slave;
--source include/wait_for_slave_to_stop.inc
--enable_warnings
connection master;
reset master;
connection slave;
@ -252,40 +208,26 @@ connection master;
# transactions. /Matz
# LOAD DATA
--disable_query_log
select "--- Test 5 LOAD DATA --" as "";
--enable_query_log
--echo --- Test 5 LOAD DATA --
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --stop-position=$binlog_start_pos --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002
# Bug#7853 (mysqlbinlog does not accept input from stdin)
--disable_query_log
select "--- Test 6 reading stdin --" as "";
--enable_query_log
let $MYSQLD_DATADIR= `select @@datadir;`;
--echo --- Test 6 reading stdin --
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
--exec $MYSQL_BINLOG --short-form --stop-position=$stop_position1 - < $MYSQLD_DATADIR/master-bin.000001
--disable_query_log
select "--- Test 7 reading stdin w/position --" as "";
--enable_query_log
--echo --- Test 7 reading stdin w/position --
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
--exec $MYSQL_BINLOG --short-form --start-position=$position --stop-position=$stop_position - < $MYSQLD_DATADIR/master-bin.000001
# Bug#16217 (mysql client did not know how not switch its internal charset)
--disable_query_log
select "--- Test 8 switch internal charset --" as "";
--enable_query_log
--echo --- Test 8 switch internal charset --
sync_slave_with_master;
#we expect STOP SLAVE to produce a warning as the slave is stopped
#(the server was started with skip-slave-start)
--disable_warnings
stop slave;
--source include/wait_for_slave_to_stop.inc
--enable_warnings
connection master;
reset master;
connection slave;
@ -298,7 +240,6 @@ create table t4 (f text character set utf8);
create table t5 (f text character set cp932);
--exec $MYSQL --default-character-set=utf8 test -e "insert into t4 values(_utf8'ソ')"
--exec $MYSQL --default-character-set=cp932 test -e "insert into t5 values(_cp932'ƒ\');"
let $MYSQLD_DATADIR= `select @@datadir;`;
flush logs;
rename table t4 to t04, t5 to t05;
--exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 | $MYSQL --default-character-set=utf8
@ -315,42 +256,30 @@ select HEX(f) from t4;
select HEX(f) from t05;
select HEX(f) from t5;
--disable_query_log
select "--- Test cleanup --" as "";
--enable_query_log
--echo --- Test cleanup --
# clean up
connection master;
sync_slave_with_master;
connection master;
DROP TABLE t1, t2, t3, t04, t05, t4, t5;
# BUG#17654 also test mysqlbinlog to ensure it can read the binlog from a remote server
# and ensure that the results are the same as if read from a file (the same file).
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
CREATE TABLE t1 (a INT NOT NULL KEY, b INT);
INSERT INTO t1 VALUES(1,1);
SELECT * FROM t1;
let $MYSQLD_DATADIR= `select @@datadir;`;
FLUSH LOGS;
--exec $MYSQL_BINLOG --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 > $MYSQLTEST_VARDIR/tmp/remote.sql
--exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/local.sql
--diff_files $MYSQLTEST_VARDIR/tmp/local.sql $MYSQLTEST_VARDIR/tmp/remote.sql
--remove_file $MYSQLTEST_VARDIR/tmp/remote.sql
--remove_file $MYSQLTEST_VARDIR/tmp/local.sql
DROP TABLE t1;
DROP TABLE IF EXISTS t1, t2, t3, t04, t05, t4, t5;
sync_slave_with_master;
# End of 4.1 tests

View file

@ -0,0 +1,24 @@
if (!$SIMPLE_PASSWORD_CHECK_SO) {
skip No SIMPLE_PASSWORD_CHECK plugin;
}
--source include/master-slave.inc
--connection slave
install soname "simple_password_check";
select @@strict_password_validation;
--connection master
create user foo1 identified by password '11111111111111111111111111111111111111111';
set password for foo1 = PASSWORD('PLAINtext-password!!99');
drop user foo1;
--sync_slave_with_master
--connection slave
--error ER_OPTION_PREVENTS_STATEMENT
create user foo1 identified by password '11111111111111111111111111111111111111111';
uninstall plugin simple_password_check;
--source include/rpl_end.inc

View file

@ -1,6 +1,6 @@
--- ./suite/sys_vars/r/sysvars_innodb.result 2017-01-03 12:06:25.401683053 +0200
+++ ./suite/sys_vars/r/sysvars_innodb,32bit.reject 2017-01-04 18:26:46.741752657 +0200
@@ -53,7 +53,7 @@
--- suite/sys_vars/r/sysvars_innodb.result
+++ suite/sys_vars/r/sysvars_innodb.result
@@ -54,7 +54,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 8
VARIABLE_SCOPE GLOBAL
@ -9,7 +9,7 @@
VARIABLE_COMMENT Number of InnoDB Adapative Hash Index Partitions. (default = 8).
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 512
@@ -67,7 +67,7 @@
@@ -68,7 +68,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 150000
VARIABLE_SCOPE GLOBAL
@ -18,7 +18,7 @@
VARIABLE_COMMENT The upper limit of the sleep delay in usec. Value of 0 disables it.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1000000
@@ -81,7 +81,7 @@
@@ -82,7 +82,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 5
VARIABLE_SCOPE GLOBAL
@ -27,7 +27,7 @@
VARIABLE_COMMENT Background commit interval in seconds
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 1073741824
@@ -137,7 +137,7 @@
@@ -138,7 +138,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
@ -36,7 +36,7 @@
VARIABLE_COMMENT InnoDB API transaction isolation level
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 3
@@ -151,7 +151,7 @@
@@ -152,7 +152,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 64
VARIABLE_SCOPE GLOBAL
@ -45,7 +45,7 @@
VARIABLE_COMMENT Data file autoextend increment in megabytes
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 1000
@@ -165,7 +165,7 @@
@@ -166,7 +166,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1
VARIABLE_SCOPE GLOBAL
@ -54,7 +54,7 @@
VARIABLE_COMMENT The AUTOINC lock modes supported by InnoDB: 0 => Old style AUTOINC locking (for backward compatibility); 1 => New style AUTOINC locking; 2 => No AUTOINC locking (unsafe for SBR)
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 2
@@ -249,10 +249,10 @@
@@ -250,10 +250,10 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 134217728
VARIABLE_SCOPE GLOBAL
@ -67,7 +67,7 @@
NUMERIC_BLOCK_SIZE 1048576
ENUM_VALUE_LIST NULL
READ_ONLY YES
@@ -291,7 +291,7 @@
@@ -292,7 +292,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 25
VARIABLE_SCOPE GLOBAL
@ -76,7 +76,7 @@
VARIABLE_COMMENT Dump only the hottest N% of each buffer pool, defaults to 25
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 100
@@ -333,7 +333,7 @@
@@ -334,7 +334,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
@ -85,7 +85,7 @@
VARIABLE_COMMENT Number of buffer pool instances, set to higher value on high-end machines to increase scalability
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 64
@@ -403,7 +403,7 @@
@@ -404,7 +404,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
@ -94,7 +94,7 @@
VARIABLE_COMMENT A number between [0, 100] that tells how oftern buffer pool dump status in percentages should be printed. E.g. 10 means that buffer pool dump status is printed when every 10% of number of buffer pool pages are dumped. Default is 0 (only start and end status is printed).
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 100
@@ -515,7 +515,7 @@
@@ -516,7 +516,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
@ -103,7 +103,7 @@
VARIABLE_COMMENT Helps in performance tuning in heavily concurrent environments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1000
@@ -557,7 +557,7 @@
@@ -558,7 +558,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 5
VARIABLE_SCOPE GLOBAL
@ -112,7 +112,7 @@
VARIABLE_COMMENT If the compression failure rate of a table is greater than this number more padding is added to the pages to reduce the failures. A value of zero implies no padding
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 100
@@ -585,7 +585,7 @@
@@ -586,7 +586,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 50
VARIABLE_SCOPE GLOBAL
@ -121,7 +121,7 @@
VARIABLE_COMMENT Percentage of empty space on a data page that can be reserved to make the page compressible.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 75
@@ -613,10 +613,10 @@
@@ -600,10 +600,10 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 5000
VARIABLE_SCOPE GLOBAL
@ -134,7 +134,7 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
@@ -865,7 +865,7 @@
@@ -852,7 +852,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 120
VARIABLE_SCOPE GLOBAL
@ -143,7 +143,7 @@
VARIABLE_COMMENT Number of pages reserved in doublewrite buffer for batch flushing
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 127
@@ -949,7 +949,7 @@
@@ -936,7 +936,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1
VARIABLE_SCOPE GLOBAL
@ -152,7 +152,7 @@
VARIABLE_COMMENT Speeds up the shutdown process of the InnoDB storage engine. Possible values are 0, 1 (faster) or 2 (fastest - crash-like).
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 2
@@ -963,7 +963,7 @@
@@ -950,7 +950,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 600
VARIABLE_SCOPE GLOBAL
@ -161,7 +161,7 @@
VARIABLE_COMMENT Maximum number of seconds that semaphore times out in InnoDB.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
@@ -1033,7 +1033,7 @@
@@ -1020,7 +1020,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 100
VARIABLE_SCOPE GLOBAL
@ -170,7 +170,7 @@
VARIABLE_COMMENT Percentage of B-tree page filled during bulk insert
NUMERIC_MIN_VALUE 10
NUMERIC_MAX_VALUE 100
@@ -1047,7 +1047,7 @@
@@ -1034,7 +1034,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
@ -179,7 +179,7 @@
VARIABLE_COMMENT Make the first page of the given tablespace dirty.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
@@ -1061,7 +1061,7 @@
@@ -1048,7 +1048,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 30
VARIABLE_SCOPE GLOBAL
@ -188,7 +188,7 @@
VARIABLE_COMMENT Number of iterations over which the background flushing is averaged.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 1000
@@ -1089,7 +1089,7 @@
@@ -1076,7 +1076,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1
VARIABLE_SCOPE GLOBAL
@ -197,7 +197,7 @@
VARIABLE_COMMENT Controls the durability/speed trade-off for commits. Set to 0 (write and flush redo log to disk only once per second), 1 (flush to disk at each commit), 2 (write to log at commit but flush to disk only once per second) or 3 (flush to disk at prepare and at commit, slower and usually redundant). 1 and 3 guarantees that after a crash, committed transactions will not be lost and will be consistent with the binlog and other transactional engines. 2 can get inconsistent and lose transactions if there is a power failure or kernel crash but not if mysqld crashes. 0 has no guarantees in case of crash. 0 and 2 can be faster than 1 or 3.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 3
@@ -1117,7 +1117,7 @@
@@ -1104,7 +1104,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1
VARIABLE_SCOPE GLOBAL
@ -206,7 +206,7 @@
VARIABLE_COMMENT Set to 0 (don't flush neighbors from buffer pool), 1 (flush contiguous neighbors from buffer pool) or 2 (flush neighbors from buffer pool), when flushing a block
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 2
@@ -1173,7 +1173,7 @@
@@ -1160,7 +1160,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
@ -215,16 +215,7 @@
VARIABLE_COMMENT Helps to save your data in case the disk image of the database becomes corrupt.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 6
@@ -1187,7 +1187,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Kills the server during crash recovery.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 100
@@ -1215,7 +1215,7 @@
@@ -1188,7 +1188,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 8000000
VARIABLE_SCOPE GLOBAL
@ -233,7 +224,7 @@
VARIABLE_COMMENT InnoDB Fulltext search cache size in bytes
NUMERIC_MIN_VALUE 1600000
NUMERIC_MAX_VALUE 80000000
@@ -1257,7 +1257,7 @@
@@ -1230,7 +1230,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 84
VARIABLE_SCOPE GLOBAL
@ -242,7 +233,7 @@
VARIABLE_COMMENT InnoDB Fulltext search maximum token size in characters
NUMERIC_MIN_VALUE 10
NUMERIC_MAX_VALUE 84
@@ -1271,7 +1271,7 @@
@@ -1244,7 +1244,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 3
VARIABLE_SCOPE GLOBAL
@ -251,7 +242,7 @@
VARIABLE_COMMENT InnoDB Fulltext search minimum token size in characters
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 16
@@ -1285,7 +1285,7 @@
@@ -1258,7 +1258,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 2000
VARIABLE_SCOPE GLOBAL
@ -260,7 +251,7 @@
VARIABLE_COMMENT InnoDB Fulltext search number of words to optimize for each optimize table call
NUMERIC_MIN_VALUE 1000
NUMERIC_MAX_VALUE 10000
@@ -1299,7 +1299,7 @@
@@ -1272,7 +1272,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 2000000000
VARIABLE_SCOPE GLOBAL
@ -269,7 +260,7 @@
VARIABLE_COMMENT InnoDB Fulltext search query result cache limit in bytes
NUMERIC_MIN_VALUE 1000000
NUMERIC_MAX_VALUE 4294967295
@@ -1327,7 +1327,7 @@
@@ -1300,7 +1300,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 2
VARIABLE_SCOPE GLOBAL
@ -278,7 +269,7 @@
VARIABLE_COMMENT InnoDB Fulltext search parallel sort degree, will round up to nearest power of 2 number
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 16
@@ -1341,7 +1341,7 @@
@@ -1314,7 +1314,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 640000000
VARIABLE_SCOPE GLOBAL
@ -287,7 +278,7 @@
VARIABLE_COMMENT Total memory allocated for InnoDB Fulltext Search cache
NUMERIC_MIN_VALUE 32000000
NUMERIC_MAX_VALUE 1600000000
@@ -1369,7 +1369,7 @@
@@ -1342,7 +1342,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 100
VARIABLE_SCOPE GLOBAL
@ -296,7 +287,7 @@
VARIABLE_COMMENT Up to what percentage of dirty pages should be flushed when innodb finds it has spare resources to do so.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 100
@@ -1411,10 +1411,10 @@
@@ -1384,10 +1384,10 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 200
VARIABLE_SCOPE GLOBAL
@ -309,7 +300,7 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
@@ -1423,12 +1423,12 @@
@@ -1396,12 +1396,12 @@
SESSION_VALUE NULL
GLOBAL_VALUE 2000
GLOBAL_VALUE_ORIGIN COMPILE-TIME
@ -325,7 +316,7 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
@@ -1495,7 +1495,7 @@
@@ -1468,7 +1468,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 50
VARIABLE_SCOPE SESSION
@ -334,7 +325,7 @@
VARIABLE_COMMENT Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back. Values above 100000000 disable the timeout.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 1073741824
@@ -1509,10 +1509,10 @@
@@ -1482,10 +1482,10 @@
GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE 16777216
VARIABLE_SCOPE GLOBAL
@ -347,7 +338,7 @@
NUMERIC_BLOCK_SIZE 1024
ENUM_VALUE_LIST NULL
READ_ONLY YES
@@ -1565,7 +1565,7 @@
@@ -1538,7 +1538,7 @@
GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE 2
VARIABLE_SCOPE GLOBAL
@ -356,7 +347,7 @@
VARIABLE_COMMENT Number of log files in the log group. InnoDB writes to the files in a circular fashion.
NUMERIC_MIN_VALUE 2
NUMERIC_MAX_VALUE 100
@@ -1607,7 +1607,7 @@
@@ -1580,7 +1580,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 8192
VARIABLE_SCOPE GLOBAL
@ -365,7 +356,7 @@
VARIABLE_COMMENT Redo log write ahead unit size to avoid read-on-write, it should match the OS cache block IO size
NUMERIC_MIN_VALUE 512
NUMERIC_MAX_VALUE 16384
@@ -1621,10 +1621,10 @@
@@ -1594,10 +1594,10 @@
GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE 1024
VARIABLE_SCOPE GLOBAL
@ -378,7 +369,7 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
@@ -1677,10 +1677,10 @@
@@ -1650,10 +1650,10 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
@ -391,7 +382,7 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
@@ -1691,7 +1691,7 @@
@@ -1664,7 +1664,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
@ -400,7 +391,7 @@
VARIABLE_COMMENT Maximum delay of user threads in micro-seconds
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 10000000
@@ -1789,7 +1789,7 @@
@@ -1762,7 +1762,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 8
VARIABLE_SCOPE GLOBAL
@ -409,7 +400,7 @@
VARIABLE_COMMENT Number of multi-threaded flush threads
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 64
@@ -1845,10 +1845,10 @@
@@ -1818,10 +1818,10 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
@ -422,7 +413,7 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY YES
@@ -1873,7 +1873,7 @@
@@ -1846,7 +1846,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 4
VARIABLE_SCOPE GLOBAL
@ -431,7 +422,7 @@
VARIABLE_COMMENT Page cleaner threads can be from 1 to 64. Default is 4.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 64
@@ -1901,7 +1901,7 @@
@@ -1874,7 +1874,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 16
VARIABLE_SCOPE GLOBAL
@ -440,7 +431,7 @@
VARIABLE_COMMENT Number of rw_locks protecting buffer pool page_hash. Rounded up to the next power of 2
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 1024
@@ -1915,7 +1915,7 @@
@@ -1888,7 +1888,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 16384
VARIABLE_SCOPE GLOBAL
@ -449,7 +440,7 @@
VARIABLE_COMMENT Page size to use for all InnoDB tablespaces.
NUMERIC_MIN_VALUE 4096
NUMERIC_MAX_VALUE 65536
@@ -1957,7 +1957,7 @@
@@ -1930,7 +1930,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 300
VARIABLE_SCOPE GLOBAL
@ -458,7 +449,7 @@
VARIABLE_COMMENT Number of UNDO log pages to purge in one batch from the history list.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 5000
@@ -1971,7 +1971,7 @@
@@ -1944,7 +1944,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 128
VARIABLE_SCOPE GLOBAL
@ -467,7 +458,7 @@
VARIABLE_COMMENT Dictates rate at which UNDO records are purged. Value N means purge rollback segment(s) on every Nth iteration of purge invocation
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 128
@@ -2013,7 +2013,7 @@
@@ -1986,7 +1986,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 4
VARIABLE_SCOPE GLOBAL
@ -476,7 +467,7 @@
VARIABLE_COMMENT Purge threads can be from 1 to 32. Default is 4.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 32
@@ -2041,7 +2041,7 @@
@@ -2014,7 +2014,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 56
VARIABLE_SCOPE GLOBAL
@ -485,7 +476,7 @@
VARIABLE_COMMENT Number of pages that must be accessed sequentially for InnoDB to trigger a readahead.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 64
@@ -2055,7 +2055,7 @@
@@ -2028,7 +2028,7 @@
GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE 4
VARIABLE_SCOPE GLOBAL
@ -494,7 +485,7 @@
VARIABLE_COMMENT Number of background read I/O threads in InnoDB.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 64
@@ -2083,10 +2083,10 @@
@@ -2056,10 +2056,10 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
@ -507,7 +498,7 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
@@ -2111,7 +2111,7 @@
@@ -2084,7 +2084,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 128
VARIABLE_SCOPE GLOBAL
@ -516,7 +507,7 @@
VARIABLE_COMMENT Number of undo logs to use (deprecated).
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 128
@@ -2125,7 +2125,7 @@
@@ -2098,7 +2098,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
@ -525,7 +516,7 @@
VARIABLE_COMMENT An InnoDB page number.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
@@ -2181,7 +2181,7 @@
@@ -2154,7 +2154,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1048576
VARIABLE_SCOPE GLOBAL
@ -534,7 +525,7 @@
VARIABLE_COMMENT Memory buffer size for index creation
NUMERIC_MIN_VALUE 65536
NUMERIC_MAX_VALUE 67108864
@@ -2391,7 +2391,7 @@
@@ -2364,7 +2364,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1
VARIABLE_SCOPE GLOBAL
@ -543,7 +534,7 @@
VARIABLE_COMMENT Size of the mutex/lock wait array.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 1024
@@ -2419,10 +2419,10 @@
@@ -2392,10 +2392,10 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 30
VARIABLE_SCOPE GLOBAL
@ -556,7 +547,7 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
@@ -2461,7 +2461,7 @@
@@ -2434,7 +2434,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
@ -565,7 +556,7 @@
VARIABLE_COMMENT Helps in performance tuning in heavily concurrent environments. Sets the maximum number of threads allowed inside InnoDB. Value 0 will disable the thread throttling.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1000
@@ -2475,7 +2475,7 @@
@@ -2448,7 +2448,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 10000
VARIABLE_SCOPE GLOBAL
@ -574,7 +565,7 @@
VARIABLE_COMMENT Time of innodb thread sleeping before joining InnoDB queue (usec). Value 0 disable a sleep
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1000000
@@ -2545,7 +2545,7 @@
@@ -2518,7 +2518,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 128
VARIABLE_SCOPE GLOBAL
@ -583,7 +574,7 @@
VARIABLE_COMMENT Number of undo logs to use.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 128
@@ -2573,7 +2573,7 @@
@@ -2546,7 +2546,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
@ -592,7 +583,7 @@
VARIABLE_COMMENT Number of undo tablespaces to use.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 95
@@ -2657,7 +2657,7 @@
@@ -2630,7 +2630,7 @@
GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE 4
VARIABLE_SCOPE GLOBAL

View file

@ -526,9 +526,9 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_COMPRESSION_ALGORITHM
SESSION_VALUE NULL
GLOBAL_VALUE none
GLOBAL_VALUE zlib
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE none
DEFAULT_VALUE zlib
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Compression algorithm used on page compression. One of: none, zlib, lz4, lzo, lzma, or bzip2

View file

@ -2102,7 +2102,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0.000000
VARIABLE_SCOPE SESSION
VARIABLE_TYPE DOUBLE
VARIABLE_COMMENT A SELECT query that have taken more than max_statement_time seconds will be aborted. The argument will be treated as a decimal value with microsecond precision. A value of 0 (default) means no timeout
VARIABLE_COMMENT A query that has taken more than max_statement_time seconds will be aborted. The argument will be treated as a decimal value with microsecond precision. A value of 0 (default) means no timeout
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 31536000
NUMERIC_BLOCK_SIZE NULL

View file

@ -2298,7 +2298,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0.000000
VARIABLE_SCOPE SESSION
VARIABLE_TYPE DOUBLE
VARIABLE_COMMENT A SELECT query that have taken more than max_statement_time seconds will be aborted. The argument will be treated as a decimal value with microsecond precision. A value of 0 (default) means no timeout
VARIABLE_COMMENT A query that has taken more than max_statement_time seconds will be aborted. The argument will be treated as a decimal value with microsecond precision. A value of 0 (default) means no timeout
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 31536000
NUMERIC_BLOCK_SIZE NULL

View file

@ -3,6 +3,11 @@
--source include/not_valgrind.inc
--source include/word_size.inc
if (`select plugin_auth_version <= "5.6.34-79.1" from information_schema.plugins where plugin_name='innodb'`)
{
--skip Not fixed in XtraDB as of 10.1.21-MariaDB or earlier
}
--vertical_results
--replace_regex /^\/\S+/PATH/ /\.\//PATH/
select * from information_schema.system_variables

View file

@ -110,7 +110,7 @@ drop table t1,t2;
drop procedure p1;
--echo #
--echo # Bug mdev-3845: values of virtual columns are not computed for triggers
--echo # MDEV-3845 values of virtual columns are not computed for triggers
--echo #
CREATE TABLE t1 (
@ -149,6 +149,14 @@ DROP TRIGGER t1_ins_aft;
DROP TRIGGER t1_del_bef;
DROP TABLE t1,t2;
#
# MDEV-11706 Assertion `is_stat_field || !table || (!table->write_set || bitmap_is_set(table->write_set, field_index) || (table->vcol_set && bitmap_is_set(table->vcol_set, field_index)))' failed in Field_time::store_TIME_with_warning
#
create table t1 (i int, t time not null, vt time(4) as (t) virtual);
create trigger trg before update on t1 for each row set @a = 1;
insert ignore into t1 (i) values (1);
drop table t1;
--echo #
--echo # Examine the number of times triggers are recalculated for updates
--echo #

View file

@ -328,6 +328,13 @@ t1 CREATE TABLE `t1` (
`c1` varchar(50) COLLATE latin1_general_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci
drop table t1;
set sql_mode='no_zero_date';
create table t1 (
ts timestamp not null default current_timestamp,
tsv timestamp as (adddate(ts, interval 1 day)) virtual
);
drop table t1;
set sql_mode=default;
#
# Start of 10.1 tests
#

View file

@ -86,7 +86,7 @@ a b c
drop table t1,t2;
drop procedure p1;
#
# Bug mdev-3845: values of virtual columns are not computed for triggers
# MDEV-3845 values of virtual columns are not computed for triggers
#
CREATE TABLE t1 (
a INTEGER UNSIGNED NULL DEFAULT NULL,
@ -125,6 +125,12 @@ c
DROP TRIGGER t1_ins_aft;
DROP TRIGGER t1_del_bef;
DROP TABLE t1,t2;
create table t1 (i int, t time not null, vt time(4) as (t) virtual);
create trigger trg before update on t1 for each row set @a = 1;
insert ignore into t1 (i) values (1);
Warnings:
Warning 1364 Field 't' doesn't have a default value
drop table t1;
#
# Examine the number of times triggers are recalculated for updates
#

View file

@ -86,7 +86,7 @@ a b c
drop table t1,t2;
drop procedure p1;
#
# Bug mdev-3845: values of virtual columns are not computed for triggers
# MDEV-3845 values of virtual columns are not computed for triggers
#
CREATE TABLE t1 (
a INTEGER UNSIGNED NULL DEFAULT NULL,
@ -125,6 +125,12 @@ c
DROP TRIGGER t1_ins_aft;
DROP TRIGGER t1_del_bef;
DROP TABLE t1,t2;
create table t1 (i int, t time not null, vt time(4) as (t) virtual);
create trigger trg before update on t1 for each row set @a = 1;
insert ignore into t1 (i) values (1);
Warnings:
Warning 1364 Field 't' doesn't have a default value
drop table t1;
#
# Examine the number of times triggers are recalculated for updates
#

View file

@ -0,0 +1,67 @@
create table t1 (a datetime,
# get_datetime_value
b int as (a > 1), # Arg_comparator
c int as (a in (1,2,3)), # in_datetime
d int as ((a,a) in ((1,1),(2,1),(NULL,1))), # cmp_item_datetime
# other issues
e int as ((a,1) in ((1,1),(2,1),(NULL,1))) # cmp_item_row::alloc_comparators()
);
Warnings:
Warning 1292 Incorrect datetime value: '1'
Warning 1292 Incorrect datetime value: '2'
Warning 1292 Incorrect datetime value: '3'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
`b` int(11) GENERATED ALWAYS AS (`a` > 1) VIRTUAL,
`c` int(11) GENERATED ALWAYS AS (`a` in (1,2,3)) VIRTUAL,
`d` int(11) GENERATED ALWAYS AS ((`a`,`a`) in ((1,1),(2,1),(NULL,1))) VIRTUAL,
`e` int(11) GENERATED ALWAYS AS ((`a`,1) in ((1,1),(2,1),(NULL,1))) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
Warnings:
Warning 1292 Incorrect datetime value: '1'
Warning 1292 Incorrect datetime value: '2'
Warning 1292 Incorrect datetime value: '3'
connect con1, localhost, root;
insert t1 (a) values ('2010-10-10 10:10:10');
select * from t1;
a b c d e
2010-10-10 10:10:10 1 0 0 NULL
Warnings:
Warning 1292 Incorrect datetime value: '1'
Warning 1292 Incorrect datetime value: '1'
Warning 1292 Incorrect datetime value: '2'
Warning 1292 Incorrect datetime value: '1'
Warning 1292 Incorrect datetime value: '1'
Warning 1292 Incorrect datetime value: '2'
disconnect con1;
connection default;
select * from t1;
a b c d e
2010-10-10 10:10:10 1 0 0 NULL
Warnings:
Warning 1292 Incorrect datetime value: '1'
Warning 1292 Incorrect datetime value: '2'
Warning 1292 Incorrect datetime value: '1'
Warning 1292 Incorrect datetime value: '1'
Warning 1292 Incorrect datetime value: '2'
drop table t1;
connect con1, localhost, root;
create table t1 (a datetime,
b datetime as (least(a,1)) # Item_func_min_max::get_date
);
insert t1 (a) values ('2010-10-10 10:10:10');
select * from t1;
a b
2010-10-10 10:10:10 0000-00-00 00:00:00
Warnings:
Warning 1292 Incorrect datetime value: '1'
disconnect con1;
connection default;
select * from t1;
a b
2010-10-10 10:10:10 0000-00-00 00:00:00
Warnings:
Warning 1292 Incorrect datetime value: '1'
drop table t1;

View file

@ -294,6 +294,17 @@ create table t1 (v1 varchar(255) as (c1) persistent, c1 varchar(50)) collate=lat
show create table t1;
drop table t1;
#
# MDEV-11527 Virtual columns do not get along well with NO_ZERO_DATE
#
set sql_mode='no_zero_date';
create table t1 (
ts timestamp not null default current_timestamp,
tsv timestamp as (adddate(ts, interval 1 day)) virtual
);
drop table t1;
set sql_mode=default;
--echo #
--echo # Start of 10.1 tests

View file

@ -0,0 +1,35 @@
#
# This tests various issues when vcol items allocate memory (e.g. more items)
# not in the TABLE::expr_arena.
#
#
# MDEV-9690 concurrent queries with virtual columns crash in temporal code
#
create table t1 (a datetime,
# get_datetime_value
b int as (a > 1), # Arg_comparator
c int as (a in (1,2,3)), # in_datetime
d int as ((a,a) in ((1,1),(2,1),(NULL,1))), # cmp_item_datetime
# other issues
e int as ((a,1) in ((1,1),(2,1),(NULL,1))) # cmp_item_row::alloc_comparators()
);
show create table t1;
connect con1, localhost, root;
insert t1 (a) values ('2010-10-10 10:10:10');
select * from t1;
disconnect con1;
connection default;
select * from t1;
drop table t1;
connect con1, localhost, root;
create table t1 (a datetime,
b datetime as (least(a,1)) # Item_func_min_max::get_date
);
insert t1 (a) values ('2010-10-10 10:10:10');
select * from t1;
disconnect con1;
connection default;
select * from t1;
drop table t1;

View file

@ -9,34 +9,34 @@ create table t0 (a int);
INSERT INTO t0 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
--echo # r_filtered=30%, because 3 rows match: 0,1,2
--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/
--source include/analyze-format.inc
analyze format=json select * from t0 where a<3;
create table t1 (a int, b int, c int, key(a));
insert into t1 select A.a*10 + B.a, A.a*10 + B.a, A.a*10 + B.a from t0 A, t0 B;
--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/
--source include/analyze-format.inc
analyze
select * from t0, t1 where t1.a=t0.a and t0.a > 9;
--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/
--source include/analyze-format.inc
analyze format=json
select * from t0, t1 where t1.a=t0.a and t0.a > 9;
analyze
select * from t0, t1 where t1.a=t0.a and t1.b<4;
--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/
--source include/analyze-format.inc
analyze format=json
select * from t0, t1 where t1.a=t0.a and t1.b<4;
analyze
select * from t1 tbl1, t1 tbl2 where tbl1.b<2 and tbl2.b>5;
--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/
--source include/analyze-format.inc
analyze format=json
select * from t1 tbl1, t1 tbl2 where tbl1.b<20 and tbl2.b<60;
--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/
--source include/analyze-format.inc
analyze format=json
select * from t1 tbl1, t1 tbl2 where tbl1.b<20 and tbl2.b<60 and tbl1.c > tbl2.c;
@ -53,7 +53,7 @@ insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t2 (a int, key(a));
insert into t2 values (0),(1);
--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/
--source include/analyze-format.inc
analyze format=json select * from t1 straight_join t2 force index(a) where t2.a=t1.a;
drop table t1,t2;
@ -69,7 +69,7 @@ select database();
connect (con1,localhost,root,,*NO-ONE*);
connection con1;
select database();
--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/
--source include/analyze-format.inc
analyze format=json select * from test.t1 where t1.a<5;
disconnect con1;
connection default;
@ -91,15 +91,15 @@ create table t1 (pk int primary key);
insert into t1 select a from t3;
alter table t1 add b int;
--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/
--source include/analyze-format.inc
analyze format=json
update t1 set b=pk;
--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/
--source include/analyze-format.inc
analyze format=json
select * from t1 where pk < 10 and b > 4;
--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/
--source include/analyze-format.inc
analyze format=json
delete from t1 where pk < 10 and b > 4;
@ -127,7 +127,7 @@ create table t2 (key1 int, key2 int, key3 int, key4 int, col1 int,
insert into t2 select a,a,a,a,a from t3;
insert into t2 select 15,15,15,15,15 from t4;
--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/
--source include/analyze-format.inc
analyze format=json
select * from t1, t2 where (t2.key1 between t1.lb1 and t1.rb1) and
(t2.key2 between t1.lb2 and t1.rb2) and
@ -144,7 +144,7 @@ INSERT INTO t0 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t1 (a int);
INSERT INTO t1 select * from t0;
--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/
--source include/analyze-format.inc
analyze format=json (select * from t1 tbl1 where a<5) union (select * from t1 tbl2 where a in (2,3));
drop table t0, t1;
@ -164,16 +164,16 @@ create table t2 (
);
insert into t2 select A.a*1000 + B.a, A.a*1000 + B.a from t0 A, t1 B;
--echo # normal HAVING
--replace_regex /"(r_total_time_ms|r_buffer_size)": .*?,/"volatile parameter": "REPLACED",/
--source include/analyze-format.inc
analyze format=json select a, max(b) as TOP from t2 group by a having TOP > a;
--echo # HAVING is always TRUE (not printed)
--replace_regex /"(r_total_time_ms|r_buffer_size)": .*?,/"volatile parameter": "REPLACED",/
--source include/analyze-format.inc
analyze format=json select a, max(b) as TOP from t2 group by a having 1<>2;
--echo # HAVING is always FALSE (intercepted by message)
--replace_regex /"(r_total_time_ms|r_buffer_size)": .*?,/"volatile parameter": "REPLACED",/
--source include/analyze-format.inc
analyze format=json select a, max(b) as TOP from t2 group by a having 1=2;
--echo # HAVING is absent
--replace_regex /"(r_total_time_ms|r_buffer_size)": .*?,/"volatile parameter": "REPLACED",/
--source include/analyze-format.inc
analyze format=json select a, max(b) as TOP from t2 group by a;
drop table t0, t1, t2;
@ -186,7 +186,7 @@ INSERT INTO t1 VALUES (1),(2);
CREATE TABLE t2 (b INT);
INSERT INTO t2 VALUES (3),(4);
--replace_regex /"(r_total_time_ms|r_buffer_size)": .*?,/"volatile parameter": "REPLACED",/
--source include/analyze-format.inc
ANALYZE FORMAT=JSON SELECT STRAIGHT_JOIN * FROM t1, t2 WHERE b IN ( SELECT a FROM t1 );
drop table t1,t2;
@ -203,7 +203,7 @@ INSERT INTO t2 VALUES (2),(3);
CREATE TABLE t3 (f3 INT) ENGINE=MyISAM;
INSERT INTO t3 VALUES (3),(4);
--replace_regex /"(r_total_time_ms|r_buffer_size)": .*?,/"volatile parameter": "REPLACED",/
--source include/analyze-format.inc
ANALYZE FORMAT=JSON
SELECT GROUP_CONCAT(f3) AS gc, ( SELECT MAX(f1) FROM t1, t2 WHERE f2 = f3 ) sq
FROM t2, t3

View file

@ -22,7 +22,7 @@ explain
update t2 set b=b+1 order by b limit 5;
explain format=json
update t2 set b=b+1 order by b limit 5;
--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/
--source include/analyze-format.inc
analyze format=json
update t2 set b=b+1 order by b limit 5;
@ -33,7 +33,7 @@ explain
update t2 set a=a+1 where a<10;
explain format=json
update t2 set a=a+1 where a<10;
--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/
--source include/analyze-format.inc
analyze format=json
update t2 set a=a+1 where a<10;
@ -44,7 +44,7 @@ explain
delete from t2 order by b limit 5;
explain format=json
delete from t2 order by b limit 5;
--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ /"r_buffer_size": "[^"]+"/"r_buffer_size": "REPLACED"/
--source include/analyze-format.inc
analyze format=json
delete from t2 order by b limit 5;
@ -55,7 +55,7 @@ explain
select * from t0,t2 where t2.a=t0.a order by t2.b limit 4;
explain format=json
select * from t0,t2 where t2.a=t0.a order by t2.b limit 4;
--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/
--source include/analyze-format.inc
analyze format=json
select * from t0,t2 where t2.a=t0.a order by t2.b limit 4;
@ -67,7 +67,7 @@ explain
select * from t0,t2 where t2.a=t0.a order by t0.a limit 4;
explain format=json
select * from t0,t2 where t2.a=t0.a order by t0.a limit 4;
--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ /"r_buffer_size": "[^"]+"/"r_buffer_size": "REPLACED"/
--source include/analyze-format.inc
analyze format=json
select * from t0,t2 where t2.a=t0.a order by t0.a limit 4;
@ -86,7 +86,7 @@ select
c.a
from t0 a, t0 b, t0 c;
--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ /"r_buffer_size": "[^"]+"/"r_buffer_size": "REPLACED"/
--source include/analyze-format.inc
analyze format=json
select MAX(b) from t2 where mod(a,2)=0 group by c;
@ -115,7 +115,7 @@ drop table t3;
create table t3 (a int, b int);
insert into t3 select a, 123 from t0;
--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ /"r_buffer_size": "[^"]+"/"r_buffer_size": "REPLACED"/
--source include/analyze-format.inc
analyze format=json
select distinct max(t3.b) Q from t0, t3 where t0.a=t3.a group by t0.a order by null;
@ -136,7 +136,7 @@ insert into t6 values (0, 0), (1, 1), (2, 1), (3, 1), (4, 1);
insert into t7 values (3, 3), (2, 2), (1, 1);
--echo # TODO: This ANALYZE output doesn't make it clear what is used for what.
--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ /"r_buffer_size": "[^"]+"/"r_buffer_size": "REPLACED"/
--source include/analyze-format.inc
analyze format=json
select count(distinct t5.b) as sum from t5, t6
where t5.a=t6.a and t6.b > 0 and t5.a <= 5
@ -168,7 +168,7 @@ explain
select col1 f1, col2 f2, col1 f3 from t2 group by f1;
analyze
select col1 f1, col2 f2, col1 f3 from t2 group by f1;
--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ /"r_buffer_size": "[^"]+"/"r_buffer_size": "REPLACED"/
--source include/analyze-format.inc
analyze format=json
select col1 f1, col2 f2, col1 f3 from t2 group by f1;
drop table t2;

View file

@ -1754,6 +1754,15 @@ DELIMITER ;|
create table t1 as select f1();
drop function f1;
--echo #
--echo # MDEV-10274 Bundling insert with create statement
--echo # for table with unsigned Decimal primary key issues warning 1194
--echo #
create table t1(ID decimal(2,1) unsigned NOT NULL, PRIMARY KEY (ID))engine=memory
select 2.1 ID;
drop table t1;
--echo End of 5.5 tests
#

View file

@ -1510,7 +1510,7 @@ drop table t1;
--echo # MDEV-10773: ANALYZE for query with recursive CTE
--echo #
--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*(e[-+]?[0-9]+)?/"r_total_time_ms": "REPLACED"/
--source include/analyze-format.inc
analyze format=json
with recursive src(counter) as
(select 1

View file

@ -816,6 +816,14 @@ SELECT CHAR_LENGTH(TRIM(BOTH 0x0001 FROM _ucs2 0x0061));
SELECT CHAR_LENGTH(TRIM(BOTH 0x61 FROM _ucs2 0x0061));
SELECT CHAR_LENGTH(TRIM(BOTH 0x00 FROM _ucs2 0x0061));
--echo #
--echo # MDEV-11685: sql_mode can't be set with non-ascii connection charset
--echo #
SET character_set_connection=ucs2;
SET sql_mode='NO_ENGINE_SUBSTITUTION';
SELECT @@sql_mode;
SET sql_mode=DEFAULT;
SET NAMES utf8;
--echo #
--echo # End of 5.5 tests

View file

@ -1,6 +1,6 @@
-- source include/have_ucs2.inc
call mtr.add_suppression("Cannot use ucs2 as character_set_client");
call mtr.add_suppression("'ucs2' can not be used as client character set");
#
# MySQL Bug#15276: MySQL ignores collation-server

View file

@ -1,7 +1,7 @@
-- source include/have_query_cache.inc
-- source include/have_ucs2.inc
call mtr.add_suppression("Cannot use ucs2 as character_set_client");
call mtr.add_suppression("'ucs2' can not be used as client character set");
--echo #
--echo # Start of 5.5 tests

View file

@ -795,6 +795,15 @@ DO RPAD(_utf16 0x0061 COLLATE utf16_unicode_ci, 10000, 0x0061DE989999);
--error ER_INVALID_CHARACTER_STRING
DO LPAD(_utf16 0x0061 COLLATE utf16_unicode_ci, 10000, 0x0061DE989999);
--echo #
--echo # MDEV-11685: sql_mode can't be set with non-ascii connection charset
--echo #
SET character_set_connection=utf16;
SET sql_mode='NO_ENGINE_SUBSTITUTION';
SELECT @@sql_mode;
SET sql_mode=DEFAULT;
SET NAMES utf8;
--echo #
--echo # End of 5.5 tests
--echo #

View file

@ -1,5 +1,5 @@
--source include/have_utf16.inc
call mtr.add_suppression("Cannot use utf16 as character_set_client");
call mtr.add_suppression("'utf16' can not be used as client character set");
#
# Bug #32391 Character sets: crash with --character-set-server

View file

@ -894,6 +894,15 @@ SELECT CHAR_LENGTH(TRIM(BOTH 0x00 FROM _utf32 0x00000061));
#
select hex(lower(cast(0xffff0000 as char character set utf32))) as c;
--echo #
--echo # MDEV-11685: sql_mode can't be set with non-ascii connection charset
--echo #
SET character_set_connection=utf32;
SET sql_mode='NO_ENGINE_SUBSTITUTION';
SELECT @@sql_mode;
SET sql_mode=DEFAULT;
SET NAMES utf8;
--echo #
--echo # End of 5.5 tests
--echo #

View file

@ -0,0 +1,28 @@
--source include/not_embedded.inc
#
# MDEV-11552 Queries executed by event scheduler are written to slow log incorrectly or not written at all
#
set @event_scheduler_save= @@global.event_scheduler;
set @slow_query_log_save= @@global.slow_query_log;
set global event_scheduler= on;
set global slow_query_log= on;
set global long_query_time=0.2;
create table t1 (i int);
insert into t1 values (0);
create event ev on schedule at CURRENT_TIMESTAMP + INTERVAL 1 second do update t1 set i=1+sleep(0.5);
--let wait_condition= select i from t1 where i > 0
--source include/wait_condition.inc
--let SEARCH_FILE = `SELECT @@slow_query_log_file`
--let SEARCH_PATTERN= update t1 set i=1
--let SEARCH_RANGE= -1000
--source include/search_pattern_in_file.inc
drop table t1;
set global event_scheduler= @event_scheduler_save;
set global slow_query_log= @slow_query_log_save;
set global long_query_time= @@session.long_query_time;

View file

@ -219,7 +219,7 @@ create table t1 (a int, b int, c int, d int, key(a,b,c));
insert into t1 select A.a, B.a, C.a, D.a from t2 A, t2 B, t2 C, t2 D;
explain select count(distinct b) from t1 group by a;
explain format=json select count(distinct b) from t1 group by a;
--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/
--source include/analyze-format.inc
analyze format=json select count(distinct b) from t1 group by a;
drop table t1,t2;
@ -342,7 +342,7 @@ explain
select * from t1 left join t2 on t2.pk > 10 and t2.pk < 0;
explain format=json
select * from t1 left join t2 on t2.pk > 10 and t2.pk < 0;
--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/
--source include/analyze-format.inc
analyze format=json
select * from t1 left join t2 on t2.pk > 10 and t2.pk < 0;
@ -351,7 +351,7 @@ explain
select * from t1 left join t2 on t2.pk=t1.a where t2.pk is null;
explain format=json
select * from t1 left join t2 on t2.pk=t1.a where t2.pk is null;
--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/
--source include/analyze-format.inc
analyze format=json
select * from t1 left join t2 on t2.pk=t1.a where t2.pk is null;
@ -360,7 +360,7 @@ explain
select distinct t1.a from t1 join t2 on t2.pk=t1.a;
explain format=json
select distinct t1.a from t1 join t2 on t2.pk=t1.a;
--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/
--source include/analyze-format.inc
analyze format=json
select distinct t1.a from t1 join t2 on t2.pk=t1.a;
drop table t1,t2;
@ -386,7 +386,7 @@ explain
select * from t3,t4 where t3.a=t4.a and (t4.b+1 <= t3.b+1);
explain format=json
select * from t3,t4 where t3.a=t4.a and (t4.b+1 <= t3.b+1);
--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/
--source include/analyze-format.inc
analyze format=json
select * from t3,t4 where t3.a=t4.a and (t4.b+1 <= t3.b+1);
set optimizer_switch=@tmp_optimizer_switch;

View file

@ -8,10 +8,10 @@ create table t1 (
insert into t1 select a from t2;
explain partitions select * from t1 where a in (2,3,4);
explain format=json select * from t1 where a in (2,3,4);
--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/
--source include/analyze-format.inc
analyze format=json select * from t1 where a in (2,3,4);
--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/
--source include/analyze-format.inc
analyze format=json update t1 set a=a+10 where a in (2,3,4);
--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/
--source include/analyze-format.inc
analyze format=json delete from t1 where a in (20,30,40);
drop table t1,t2;

View file

@ -1672,6 +1672,11 @@ INSERT INTO t1 VALUES (18, '2010-10-13');
SELECT a.id,a.date1,FROM_DAYS(TO_DAYS(a.date1)-10) as date2, DATE_ADD(a.date1,INTERVAL -10 DAY),TO_DAYS(a.date1)-10 FROM t1 a ORDER BY a.id;
DROP TABLE t1;
--echo #
--echo # MDEV-10524 Assertion `arg1_int >= 0' failed in Item_func_additive_op::result_precision()
--echo #
SELECT 1 MOD ADDTIME( '13:58:57', '00:00:01' ) + 2;
--echo #
--echo # Start of 10.0 tests

View file

@ -171,6 +171,37 @@ WHERE ( tb.b != ta.b OR tb.a = ta.a )
AND ( tb.b = ta.c OR tb.b = ta.b );
DROP TABLE t1;
set optimizer_switch= @optimizer_switch_save;
--echo #
--echo # MDEV-10927: Crash When Using sort_union Optimization
--echo #
set @tmp_optimizer_switch=@@optimizer_switch;
SET optimizer_switch='index_merge_sort_intersection=on';
SET SESSION sort_buffer_size = 1024;
create table t1 (
pk int(11) NOT NULL AUTO_INCREMENT,
col1 int(11) NOT NULL,
col2 int(11) NOT NULL,
col3 int(11) NOT NULL,
key2 int(11) NOT NULL,
col4 int(11) NOT NULL,
key1 int(11) NOT NULL,
PRIMARY KEY (pk),
KEY key1 (key1),
KEY key2 (key2)
) ENGINE=InnoDB AUTO_INCREMENT=12860259 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
create table t2(a int);
insert into t2 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t3(a int);
insert into t3 select A.a + B.a* 10 + C.a * 100 + D.a*1000 from t2 A, t2 B, t2 C, t2 D;
insert into t1 (key1, key2, col1,col2,col3,col4)
select a,a, a,a,a,a from t3;
SELECT sum(col1) FROM t1 FORCE INDEX (key1,key2) WHERE (key1 between 10 and 8191+10) or (key2= 5);
drop table t1,t2,t3;
set optimizer_switch=@tmp_optimizer_switch;

View file

@ -131,3 +131,10 @@ drop table if exists t1;
create table t1 (f1 int key) partition by key(f1) partitions 2;
select create_options from information_schema.tables where table_schema="test";
drop table t1;
--echo #
--echo # MDEV-11353 - Identical logical conditions
--echo #
CREATE TABLE t1(a INT) CHECKSUM=1 SELECT 1;
SELECT CHECKSUM FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1';
DROP TABLE t1;

View file

@ -170,6 +170,7 @@ DROP TABLE t1,t2;
SET SQL_MODE = 'TRADITIONAL';
CREATE TABLE t1 (a INT PRIMARY KEY, b INT NOT NULL);
INSERT INTO t1 VALUES (1,1);
--error ER_NO_DEFAULT_FOR_FIELD
INSERT INTO t1 (a) VALUES (1);
@ -177,7 +178,10 @@ INSERT INTO t1 (a) VALUES (1);
--error ER_NO_DEFAULT_FOR_FIELD
INSERT INTO t1 (a) VALUES (1) ON DUPLICATE KEY UPDATE a = b;
--error ER_NO_DEFAULT_FOR_FIELD
# this one is ok
INSERT INTO t1 (a) VALUES (1) ON DUPLICATE KEY UPDATE b = a;
# arguably the statement below should fail
INSERT INTO t1 (a) VALUES (1) ON DUPLICATE KEY UPDATE b = b;
SELECT * FROM t1;

View file

@ -3742,9 +3742,11 @@ FROM
LEFT JOIN t2 c23 ON c23.parent_id = t.id AND c23.col2 = "val"
LEFT JOIN t2 c24 ON c24.parent_id = t.id AND c24.col2 = "val"
LEFT JOIN t2 c25 ON c25.parent_id = t.id AND c25.col2 = "val"
LEFT JOIN t2 c26 ON c26.parent_id = t.id AND c26.col2 = "val"
LEFT JOIN t2 c27 ON c27.parent_id = t.id AND c27.col2 = "val"
ORDER BY
col1;
select timestampdiff(second, @init_time, now()) <= 1;
select timestampdiff(second, @init_time, now()) <= 5;
set join_cache_level=2;
@ -3777,9 +3779,11 @@ FROM
LEFT JOIN t2 c23 ON c23.parent_id = t.id AND c23.col2 = "val"
LEFT JOIN t2 c24 ON c24.parent_id = t.id AND c24.col2 = "val"
LEFT JOIN t2 c25 ON c25.parent_id = t.id AND c25.col2 = "val"
LEFT JOIN t2 c26 ON c26.parent_id = t.id AND c26.col2 = "val"
LEFT JOIN t2 c27 ON c27.parent_id = t.id AND c27.col2 = "val"
ORDER BY
col1;
select timestampdiff(second, @init_time, now()) <= 1;
select timestampdiff(second, @init_time, now()) <= 5;
EXPLAIN
SELECT t.*
@ -3810,6 +3814,8 @@ FROM
LEFT JOIN t2 c23 ON c23.parent_id = t.id AND c23.col2 = "val"
LEFT JOIN t2 c24 ON c24.parent_id = t.id AND c24.col2 = "val"
LEFT JOIN t2 c25 ON c25.parent_id = t.id AND c25.col2 = "val"
LEFT JOIN t2 c26 ON c26.parent_id = t.id AND c26.col2 = "val"
LEFT JOIN t2 c27 ON c27.parent_id = t.id AND c27.col2 = "val"
ORDER BY
col1;

View file

@ -612,7 +612,7 @@ disconnect con1;
--echo #
CREATE TABLE t1(f1 INT);
EVAL SELECT 0xE1C330 INTO OUTFILE 't1.dat';
EVAL SELECT 0xE1BB30 INTO OUTFILE 't1.dat';
--disable_warnings
LOAD DATA INFILE 't1.dat' IGNORE INTO TABLE t1 CHARACTER SET utf8;
--enable_warnings
@ -658,27 +658,21 @@ SET @@sql_mode= @old_mode;
--remove_file $MYSQLTEST_VARDIR/mysql
DROP TABLE t1;
--echo
--echo #
--echo # Bug#23080148 - Backport of Bug#20683959.
--echo # Bug#20683959 LOAD DATA INFILE IGNORES A SPECIFIC ROW SILENTLY
--echo # UNDER DB CHARSET IS UTF8.
--echo # MDEV-11079 Regression: LOAD DATA INFILE lost BLOB support using utf8 load files
--echo #
CREATE DATABASE d1 CHARSET latin1;
USE d1;
CREATE TABLE t1 (val TEXT);
LOAD DATA INFILE '../../std_data/bug20683959loaddata.txt' INTO TABLE t1;
SELECT COUNT(*) FROM t1;
SELECT HEX(val) FROM t1;
CREATE TABLE t1 (a mediumblob NOT NULL) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
LOAD DATA INFILE '../../std_data/loaddata/mdev-11079.txt' INTO TABLE t1 CHARSET utf8 FIELDS TERMINATED BY ';' ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '\n';
SELECT HEX(a) FROM t1;
DROP TABLE t1;
CREATE DATABASE d2 CHARSET utf8;
USE d2;
CREATE TABLE t1 (val TEXT);
LOAD DATA INFILE '../../std_data/bug20683959loaddata.txt' INTO TABLE t1;
SELECT COUNT(*) FROM t1;
SELECT HEX(val) FROM t1;
--echo #
--echo # MDEV-11631 LOAD DATA INFILE fails to load data with an escape character followed by a multi-byte character
--echo #
DROP TABLE d1.t1, d2.t1;
DROP DATABASE d1;
DROP DATABASE d2;
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8);
LOAD DATA INFILE '../../std_data/loaddata/mdev-11631.txt' INTO TABLE t1 CHARACTER SET utf8;
SELECT HEX(a) FROM t1;
DROP TABLE t1;

View file

@ -50,7 +50,6 @@ set global slow_query_log=1;
set global log_output='TABLE';
select sleep(0.5);
select count(*) FROM mysql.slow_log;
truncate mysql.slow_log;
# Reset used variables
set @@long_query_time=default;
@ -58,3 +57,4 @@ set global slow_query_log= @org_slow_query_log;
set @@log_slow_filter=default;
set @@log_slow_verbosity=default;
set global log_output= default;
truncate mysql.slow_log;

View file

@ -1945,6 +1945,16 @@ order by A.col2, B.col2 limit 10, 1000000;
drop table t1,t2,t3;
--echo #
--echo # mdev-10705 : long order by list that can be skipped
--echo #
SELECT 1
UNION
( SELECT 2
ORDER BY NULL, @a0 := 3, @a1 := 3, @a2 := 3, @a3 := 3, @a4 := 3,
@a5 := 3, @a6 := 3, @a7 := 3, @a8 := 3, @a9 := 3, @a10 := 3 );
--echo End of 5.5 tests
--echo #

View file

@ -6014,6 +6014,17 @@ SELECT ( SELECT MIN(v2.f2) FROM t1 ) AS sq FROM v2 GROUP BY sq;
drop view v2;
drop table t1,t2;
--echo #
--echo # MDEV-10386 Assertion `fixed == 1' failed in virtual String* Item_func_conv_charset::val_str(String*)
--echo #
CREATE TABLE t1 (f1 CHAR(3) CHARACTER SET utf8 NULL, f2 CHAR(3) CHARACTER SET latin1 NULL);
INSERT INTO t1 VALUES ('foo','bar');
SELECT * FROM t1 WHERE f2 >= SOME ( SELECT f1 FROM t1 );
SELECT * FROM t1 WHERE f2 <= SOME ( SELECT f1 FROM t1 );
DROP TABLE t1;
--echo #
--echo # MDEV-9487: Server crashes in Time_and_counter_tracker::incr_loops
--echo # with UNION in ALL subquery

Some files were not shown because too many files have changed in this diff Show more