1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

5.5 merge

This commit is contained in:
Sergei Golubchik
2013-07-17 21:24:29 +02:00
1704 changed files with 7802 additions and 3315 deletions

View File

@ -35,6 +35,7 @@ log-bin-trust-function-creators=1
key_buffer_size= 1M
sort_buffer= 256K
max_heap_table_size= 1M
loose-aria-pagecache-buffer-size=8M
loose-feedback-user-info= mysql-test

View File

@ -11,7 +11,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
if (!`SELECT count(*) FROM information_schema.engines WHERE
(support = 'YES' OR support = 'DEFAULT') AND

View File

@ -892,3 +892,24 @@ insert into t1 values ('',1);
select 1 from t1 where b <= 1 and a <> '';
drop table t1;
--echo #
--echo # MDEV-4778: Incorrect results from Aria/MyISAM SELECT using index with prefix length on TEXT column
--echo #
CREATE TABLE t1 (
c1 TEXT ,
c2 VARCHAR(2) ,
INDEX idx1 (c2,c1(2)),
INDEX idx2 (c2,c1(1))
);
INSERT INTO t1 (c1,c2) VALUES ('aa','x'), ('a' ,'y');
SELECT * FROM t1 IGNORE INDEX(idx1,idx2) WHERE (c1='aa' AND c2='x') OR (c1='a' AND c2='y');
EXPLAIN
SELECT * FROM t1 FORCE INDEX(idx1) WHERE (c1='aa' AND c2='x') OR (c1='a' AND c2='y');
SELECT * FROM t1 FORCE INDEX(idx1) WHERE (c1='aa' AND c2='x') OR (c1='a' AND c2='y');
SELECT * FROM t1 FORCE INDEX(idx2) WHERE (c1='aa' AND c2='x') OR (c1='a' AND c2='y');
DROP TABLE t1;

View File

@ -0,0 +1,39 @@
#
# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
#
--let $include_filename= install_semisync.inc
--source include/begin_include_file.inc
--source include/not_embedded.inc
--source include/have_semisync_plugin.inc
--connection master
--disable_query_log
--let $value = query_get_value(show variables like 'rpl_semi_sync_master_enabled', Value, 1)
if ($value == No such row)
{
SET sql_log_bin = 0;
eval INSTALL PLUGIN rpl_semi_sync_master SONAME '$SEMISYNC_MASTER_PLUGIN';
SET GLOBAL rpl_semi_sync_master_enabled = 1;
SET sql_log_bin = 1;
}
--enable_query_log
--connection slave
--source include/stop_slave_io.inc
--disable_query_log
--let $value= query_get_value(show variables like 'rpl_semi_sync_slave_enabled', Value, 1)
if ($value == No such row)
{
SET sql_log_bin = 0;
eval INSTALL PLUGIN rpl_semi_sync_slave SONAME '$SEMISYNC_SLAVE_PLUGIN';
SET GLOBAL rpl_semi_sync_slave_enabled = 1;
SET sql_log_bin = 1;
}
START SLAVE IO_THREAD;
--source include/wait_for_slave_io_to_start.inc
--enable_query_log
--source include/end_include_file.inc

View File

@ -0,0 +1,24 @@
#
# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
#
--let $include_filename= uninstall_semisync.inc
--source include/begin_include_file.inc
--disable_query_log
--connection slave
--source include/stop_slave_io.inc
# Uninstall rpl_semi_sync_slave first
--disable_warnings
UNINSTALL PLUGIN rpl_semi_sync_slave;
--connection master
UNINSTALL PLUGIN rpl_semi_sync_master;
--enable_warnings
--connection slave
START SLAVE IO_THREAD;
--source include/wait_for_slave_io_to_start.inc
--enable_query_log
--source include/end_include_file.inc

View File

@ -1,5 +1,5 @@
# -*- cperl -*-
# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -255,13 +255,17 @@ EOF
sub show {
my ($class, $core_name, $exe_mysqld)= @_;
my ($class, $core_name, $exe_mysqld, $parallel)= @_;
$hint_mysqld= $exe_mysqld;
# On Windows, rely on cdb to be there...
if (IS_WINDOWS)
{
_cdb($core_name);
# Starting cdb is unsafe when used with --parallel > 1 option
if ( $parallel < 2 )
{
_cdb($core_name);
}
return;
}

View File

@ -1,4 +1,4 @@
# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -13,6 +13,10 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
IF (NOT INSTALL_MYSQLTESTDIR)
RETURN()
ENDIF()
SET(INSTALL_ARGS
DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess"
COMPONENT Test
@ -25,8 +29,16 @@ ELSE()
MYSQL_ADD_EXECUTABLE(my_safe_process safe_process.cc ${INSTALL_ARGS})
ENDIF()
INSTALL(TARGETS my_safe_process DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess" COMPONENT Test)
INSTALL(TARGETS my_safe_process
DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess" COMPONENT Test
)
IF(WIN32)
INSTALL(TARGETS my_safe_kill DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess" COMPONENT Test)
INSTALL(TARGETS my_safe_kill
DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess" COMPONENT Test
)
ENDIF()
INSTALL(FILES Base.pm DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess" COMPONENT Test)
INSTALL(FILES Base.pm
DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess" COMPONENT Test
)

View File

@ -11,7 +11,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
/*

View File

@ -1,5 +1,5 @@
# -*- cperl -*-
# Copyright (c) 2008 MySQL AB, 2008 Sun Microsystems, Inc.
# Copyright (c) 2013 MySQL AB, 2008 Sun Microsystems, Inc.
# Use is subject to license terms.
#
# This program is free software; you can redistribute it and/or modify
@ -60,7 +60,7 @@ sub _cpuinfo {
}
# Make sure bogomips is set to some value
$cpuinfo->{bogomips} |= DEFAULT_BOGO_MIPS;
$cpuinfo->{bogomips} ||= DEFAULT_BOGO_MIPS;
# Cpus reported once, but with 'cpu_count' set to the actual number
my $cpu_count= $cpuinfo->{cpu_count} || 1;

View File

@ -1,7 +1,7 @@
#!/usr/bin/perl
# -*- cperl -*-
# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -133,7 +133,6 @@ our $path_timefile;
our $path_snapshot;
our $path_mysqltest_log;
our $path_current_test_log;
our $path_my_basedir;
our $opt_vardir; # A path but set directly on cmd line
our $path_vardir_trace; # unix formatted opt_vardir for trace files
@ -779,8 +778,6 @@ sub command_line_setup () {
$glob_mysql_bench_dir= undef
unless -d $glob_mysql_bench_dir;
$path_my_basedir=
$source_dist ? $glob_mysql_test_dir : $glob_basedir;
$glob_timers= mtr_init_timers();
@ -3171,7 +3168,7 @@ sub install_db ($$) {
mtr_init_args(\$args);
mtr_add_arg($args, "--no-defaults");
mtr_add_arg($args, "--bootstrap");
mtr_add_arg($args, "--basedir=%s", $path_my_basedir);
mtr_add_arg($args, "--basedir=%s", $glob_basedir);
mtr_add_arg($args, "--datadir=%s", $data_dir);
mtr_add_arg($args, "--loose-skip-ndbcluster");
mtr_add_arg($args, "--loose-skip-aria");
@ -3333,7 +3330,7 @@ log = $instance->{path_datadir}/mysqld$server_id.log
log-error = $instance->{path_datadir}/mysqld$server_id.err.log
log-slow-queries = $instance->{path_datadir}/mysqld$server_id.slow.log
character-sets-dir = $path_charsetsdir
basedir = $path_my_basedir
basedir = $glob_basedir
server_id = $server_id
shutdown-delay = 10
skip-stack-trace
@ -3942,7 +3939,7 @@ sub mysqld_arguments ($$$$) {
mtr_add_arg($args, "%s--no-defaults", $prefix);
mtr_add_arg($args, "%s--basedir=%s", $prefix, $path_my_basedir);
mtr_add_arg($args, "%s--basedir=%s", $prefix, $glob_basedir);
mtr_add_arg($args, "%s--character-sets-dir=%s", $prefix, $path_charsetsdir);
if ( $mysql_version_id >= 50036)

View File

@ -1,8 +1,8 @@
#!/usr/bin/perl
# -*- cperl -*-
# Copyright (c) 2004, 2012, Oracle and/or its affiliates.
# Copyright (c) 2009, 2012, Monty Program Ab
# Copyright (c) 2004, 2013, Oracle and/or its affiliates.
# Copyright (c) 2009, 2013, Monty Program Ab
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -691,7 +691,7 @@ sub run_test_server ($$$) {
mtr_report(" - found '$core_name'",
"($num_saved_cores/$opt_max_save_core)");
My::CoreDump->show($core_file, $exe_mysqld);
My::CoreDump->show($core_file, $exe_mysqld, $opt_parallel);
if ($num_saved_cores >= $opt_max_save_core) {
mtr_report(" - deleting it, already saved",

View File

@ -12,8 +12,8 @@
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA
suppress UMR rw_read_held; mi_open; ha_myisam::open64; handler::ha_open; openfrm
suppress UMR my_end; main

View File

@ -4,6 +4,8 @@ select * from t1;
d
2012-00-00
update t1 set d = adddate(d, interval 1 day);
Warnings:
Warning 1292 Incorrect datetime value: '2012-00-00'
select * from t1;
d
NULL

View File

@ -268,37 +268,37 @@ cast(010203101112.121314 as datetime)
0001-02-03 10:11:12
select cast(120010203101112.121314 as datetime);
cast(120010203101112.121314 as datetime)
0000-00-00 00:00:00
NULL
Warnings:
Warning 1292 Incorrect datetime value: '120010203101112.121314'
select cast(cast(1.1 as decimal) as datetime);
cast(cast(1.1 as decimal) as datetime)
0000-00-00 00:00:00
NULL
Warnings:
Warning 1292 Incorrect datetime value: '1'
select cast(cast(-1.1 as decimal) as datetime);
cast(cast(-1.1 as decimal) as datetime)
0000-00-00 00:00:00
NULL
Warnings:
Warning 1292 Incorrect datetime value: '-1'
select cast('0' as date);
cast('0' as date)
0000-00-00
NULL
Warnings:
Warning 1292 Incorrect datetime value: '0'
select cast('' as date);
cast('' as date)
0000-00-00
NULL
Warnings:
Warning 1292 Incorrect datetime value: ''
select cast('0' as datetime);
cast('0' as datetime)
0000-00-00 00:00:00
NULL
Warnings:
Warning 1292 Incorrect datetime value: '0'
select cast('' as datetime);
cast('' as datetime)
0000-00-00 00:00:00
NULL
Warnings:
Warning 1292 Incorrect datetime value: ''
select cast('0' as time);
@ -306,7 +306,7 @@ cast('0' as time)
00:00:00
select cast('' as time);
cast('' as time)
00:00:00
NULL
Warnings:
Warning 1292 Truncated incorrect time value: ''
select cast(NULL as DATE);
@ -323,13 +323,13 @@ cast(NULL as BINARY)
NULL
select cast(cast(120010203101112.121314 as double) as datetime);
cast(cast(120010203101112.121314 as double) as datetime)
0000-00-00 00:00:00
NULL
select cast(cast(1.1 as double) as datetime);
cast(cast(1.1 as double) as datetime)
0000-00-00 00:00:01
select cast(cast(-1.1 as double) as datetime);
cast(cast(-1.1 as double) as datetime)
0000-00-00 00:00:00
NULL
explain extended select cast(10 as double(5,2));
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
@ -786,4 +786,10 @@ SELECT CAST(TIME('10:20:30') AS DATE) + INTERVAL 1 DAY;
CAST(TIME('10:20:30') AS DATE) + INTERVAL 1 DAY
NULL
Warnings:
Warning 1292 Truncated incorrect date value: '0000-00-00'
Warning 1292 Incorrect datetime value: '0000-00-00'
SET SQL_MODE=ALLOW_INVALID_DATES;
SELECT DATE("foo");
DATE("foo")
NULL
Warnings:
Warning 1292 Incorrect datetime value: 'foo'

View File

@ -521,7 +521,7 @@ TIME_FORMAT("25:00:00", '%l %p')
1 AM
SELECT DATE_FORMAT('%Y-%m-%d %H:%i:%s', 1151414896);
DATE_FORMAT('%Y-%m-%d %H:%i:%s', 1151414896)
1151414896
NULL
Warnings:
Warning 1292 Incorrect datetime value: '%Y-%m-%d %H:%i:%s'
select str_to_date('04 /30/2004', '%m /%d/%Y');

View File

@ -0,0 +1,6 @@
set optimizer_switch = 'derived_merge=on';
create table t1 (c1 char(8), c2 char(8)) engine=myisam;
insert into t1 values ('test1','test2'),('test3','test4');
select * from (select c1 from t1 where match (c2) against ('hello' in boolean mode)) as alias;
c1
drop table t1;

View File

@ -168,7 +168,7 @@ date("1997-12-31 23:59:59.000001")
1997-12-31
select date("1997-13-31 23:59:59.000001");
date("1997-13-31 23:59:59.000001")
0000-00-00
NULL
Warnings:
Warning 1292 Incorrect datetime value: '1997-13-31 23:59:59.000001'
select time("1997-12-31 23:59:59.000001");
@ -176,7 +176,7 @@ time("1997-12-31 23:59:59.000001")
23:59:59.000001
select time("1997-12-31 25:59:59.000001");
time("1997-12-31 25:59:59.000001")
00:00:00
NULL
Warnings:
Warning 1292 Truncated incorrect time value: '1997-12-31 25:59:59.000001'
select microsecond("1997-12-31 23:59:59.000001");
@ -250,8 +250,6 @@ a
select microsecond(19971231235959.01) as a;
a
10000
Warnings:
Warning 1292 Truncated incorrect time value: '19971231235959.01'
select date_add("1997-12-31",INTERVAL "10.09" SECOND_MICROSECOND) as a;
a
1997-12-31 00:00:10.090000

View File

@ -1222,14 +1222,13 @@ DROP TABLE t1,t2;
set time_zone= @@global.time_zone;
select str_to_date('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE;
str_to_date('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE
NULL
Warnings:
Warning 1411 Incorrect datetime value: '10:00 PM' for function str_to_date
22:10:00
select str_to_date("1997-00-04 22:23:00","%Y-%m-%D") + interval 10 minute;
str_to_date("1997-00-04 22:23:00","%Y-%m-%D") + interval 10 minute
NULL
Warnings:
Warning 1411 Incorrect datetime value: '1997-00-04 22:23:00' for function str_to_date
Warning 1292 Truncated incorrect date value: '1997-00-04 22:23:00'
Warning 1292 Incorrect datetime value: '1997-00-04'
create table t1 (field DATE);
insert into t1 values ('2006-11-06');
select * from t1 where field < '2006-11-06 04:08:36.0';
@ -1423,13 +1422,15 @@ MAKEDATE(11111111,1)
NULL
SELECT WEEK(DATE_ADD(FROM_DAYS(1),INTERVAL 1 MONTH), 1);
WEEK(DATE_ADD(FROM_DAYS(1),INTERVAL 1 MONTH), 1)
0
NULL
Warnings:
Warning 1292 Incorrect datetime value: '0000-00-00'
#
# Bug#12584302 AFTER FIX FOR #12403504: ASSERTION FAILED: DELSUM+(INT) Y/4-TEMP > 0,
#
DO WEEK((DATE_ADD((CAST(0 AS DATE)), INTERVAL 1 YEAR_MONTH)), 5);
Warnings:
Warning 1292 Incorrect datetime value: '0'
Warning 1292 Incorrect datetime value: '0000-00-00'
#
# BUG#13458237 INCONSISTENT HANDLING OF INVALIDE DATES WITH ZERO DAY
# SIMILAR TO '2009-10-00'
@ -1713,6 +1714,7 @@ min(timestampadd(month, 1>'', from_days('%Z')))
NULL
Warnings:
Warning 1292 Truncated incorrect INTEGER value: '%Z'
Warning 1292 Incorrect datetime value: '0000-00-00'
create table t1(a time);
insert into t1 values ('00:00:00'),('00:01:00');
select 1 from t1 where 1 < some (select cast(a as datetime) from t1);
@ -1781,7 +1783,7 @@ Warnings:
Warning 1441 Datetime function: time field overflow
select cast('131415.123e0' as time);
cast('131415.123e0' as time)
00:00:00
NULL
Warnings:
Warning 1292 Truncated incorrect time value: '131415.123e0'
select cast('2010-01-02 03:04:05' as datetime) between null and '2010-01-02 03:04:04';
@ -1801,12 +1803,12 @@ unix_timestamp(null)
NULL
select truncate(date('2010-40-10'), 6);
truncate(date('2010-40-10'), 6)
0.000000
NULL
Warnings:
Warning 1292 Incorrect datetime value: '2010-40-10'
select extract(month from '2010-40-50');
extract(month from '2010-40-50')
0
NULL
Warnings:
Warning 1292 Incorrect datetime value: '2010-40-50'
select subtime('0000-00-10 10:10:10', '30 10:00:00');
@ -1884,6 +1886,8 @@ insert into t1 values ('0000-00-00');
select timestampadd(week, 1, f1) from t1;
timestampadd(week, 1, f1)
NULL
Warnings:
Warning 1292 Incorrect datetime value: '0000-00-00'
select timestampadd(week, 1, date("0000-00-00"));
timestampadd(week, 1, date("0000-00-00"))
NULL
@ -1936,3 +1940,13 @@ SELECT 1 FROM DUAL WHERE MINUTE(TIMEDIFF(NULL, '12:12:12'));
1
SELECT 1 FROM DUAL WHERE SECOND(TIMEDIFF(NULL, '12:12:12'));
1
#
# MDEV-4635 Crash in UNIX_TIMESTAMP(STR_TO_DATE('2020','%Y'))
#
SET TIME_ZONE='+02:00';
SELECT UNIX_TIMESTAMP(STR_TO_DATE('2020','%Y'));
UNIX_TIMESTAMP(STR_TO_DATE('2020','%Y'))
NULL
Warnings:
Warning 1411 Incorrect datetime value: '2020' for function str_to_date
SET TIME_ZONE=DEFAULT;

View File

@ -41,7 +41,7 @@ a17aaaaaaaaaaaaa0 localhost
b64bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb0 localhost
c80cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc0 localhost
select user,host from mysql.db;
ERROR 42000: SELECT command denied to user 'b64bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'@'localhost' for table 'db'
ERROR 42000: SELECT command denied to user 'b64bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb0'@'localhost' for table 'db'
select user(), current_user();
user() current_user()
c80cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc0@localhost c80cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc0@localhost
@ -54,15 +54,37 @@ user
b64bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb0
c80cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc0
select user,host from mysql.tables_priv;
ERROR 42000: SELECT command denied to user 'c80ccccccccccccccccccccccccccccccccccccccccccccc'@'localhost' for column 'host' in table 'tables_priv'
ERROR 42000: SELECT command denied to user 'c80cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc0'@'localhost' for column 'host' in table 'tables_priv'
use mtr;
ERROR 42000: Access denied for user 'c80cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc0'@'localhost' to database 'mtr'
drop procedure mtr.add_suppression;
ERROR 42000: alter routine command denied to user 'c80cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc0'@'localhost' for routine 'mtr.add_suppression'
create procedure test.p1() select user(), current_user(), user from mysql.tables_priv;
show create procedure test.p1;
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
p1 CREATE DEFINER=`c80cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc0`@`localhost` PROCEDURE `p1`()
select user(), current_user(), user from mysql.tables_priv latin1 latin1_swedish_ci latin1_swedish_ci
select definer from information_schema.routines;
definer
c80cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc0@localhost
create table test.t1 (a text);
create event e1 on schedule every 1 second
do insert test.t1 values (concat(user(), ' ', current_user()));
select definer from information_schema.events;
definer
c80cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc0@localhost
create view v1 as select * from t1;
select definer from information_schema.views;
definer
c80cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc0@localhost
drop view v1;
create trigger tr1 before delete on t1 for each row set @a:=1;
select definer from information_schema.triggers;
definer
c80cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc0@localhost
drop trigger tr1;
connect(localhost,c80cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc0,foobar,test,MASTER_PORT,MASTER_SOCKET);
ERROR 28000: Access denied for user 'c80cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc0'@'localhost' (using password: YES)
call test.p1();
user() current_user() user
root@localhost c80cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc0@localhost b64bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb0

View File

@ -3561,3 +3561,45 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range NULL PRIMARY 5 NULL 9 Using index for group-by (scanning)
drop table t1;
# End of test#50539.
#
# MDEV-4219 A simple select query returns random data (upstream bug#68473)
#
drop table if exists faulty;
CREATE TABLE faulty (
a int(11) unsigned NOT NULL AUTO_INCREMENT,
b int(11) unsigned NOT NULL,
c datetime NOT NULL,
PRIMARY KEY (a),
UNIQUE KEY b_and_c (b,c)
);
INSERT INTO faulty (b, c) VALUES
(1801, '2013-02-15 09:00:00'),
(1802, '2013-02-28 09:00:00'),
(1802, '2013-03-01 09:00:00'),
(5, '1990-02-15 09:00:00'),
(5, '2013-02-15 09:00:00'),
(5, '2009-02-15 17:00:00');
EXPLAIN
SELECT DISTINCT b, c FROM faulty WHERE b='1802' ORDER BY c;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE faulty range b_and_c b_and_c 12 NULL 2 Using where; Using index for group-by; Using filesort
SELECT DISTINCT b, c FROM faulty WHERE b='1802' ORDER BY c;
b c
1802 2013-02-28 09:00:00
1802 2013-03-01 09:00:00
drop table faulty;
CREATE TABLE t1 (a INT, b INT);
INSERT INTO t1 (a, b) VALUES (1,1), (1,2), (1,3);
INSERT INTO t1 SELECT a + 1, b FROM t1;
INSERT INTO t1 SELECT a + 2, b FROM t1;
CREATE INDEX break_it ON t1 (a, b);
EXPLAIN
SELECT distinct a, b FROM t1 where a = '3' ORDER BY b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range break_it break_it 10 NULL 2 Using where; Using index for group-by; Using filesort
SELECT distinct a, b FROM t1 where a = '3' ORDER BY b;
a b
3 1
3 2
3 3
drop table t1;

View File

@ -1617,4 +1617,30 @@ GROUP BY 2;
COUNT(DISTINCT t2.b) CONCAT(t1.c)
2 0
DROP TABLE t1,t2,t3;
#
# MDEV-4556 Server crashes in SEL_ARG::rb_insert with index_merge+index_merge_sort_union, FORCE INDEX
#
CREATE TABLE t1 (
pk int,
code char(2),
population_rate int,
area_rate int,
primary key (pk),
index (code),
key (population_rate),
key (area_rate)
);
INSERT INTO t1 VALUES (1,'WI',20, 23), (2, 'WA', 13, 18);
EXPLAIN
SELECT * FROM t1 FORCE INDEX ( PRIMARY, population_rate, area_rate, code )
WHERE pk = 1 OR population_rate = 1 OR ( area_rate IN ( 1,2 ) OR area_rate IS NULL )
AND (population_rate = 25 OR area_rate BETWEEN 2 AND 25 OR code BETWEEN 'MA' AND 'TX');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge PRIMARY,code,population_rate,area_rate PRIMARY,population_rate,area_rate 4,5,5 NULL 2 Using sort_union(PRIMARY,population_rate,area_rate); Using where
SELECT * FROM t1 FORCE INDEX ( PRIMARY, population_rate, area_rate, code )
WHERE pk = 1 OR population_rate = 1 OR ( area_rate IN ( 1,2 ) OR area_rate IS NULL )
AND (population_rate = 25 OR area_rate BETWEEN 2 AND 25 OR code BETWEEN 'MA' AND 'TX');
pk code population_rate area_rate
1 WI 20 23
DROP TABLE t1;
set optimizer_switch= @optimizer_switch_save;

View File

@ -30,7 +30,7 @@ ROUTINES CREATE TEMPORARY TABLE `ROUTINES` (
`LAST_ALTERED` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`SQL_MODE` varchar(8192) NOT NULL DEFAULT '',
`ROUTINE_COMMENT` longtext NOT NULL,
`DEFINER` varchar(77) NOT NULL DEFAULT '',
`DEFINER` varchar(189) NOT NULL DEFAULT '',
`CHARACTER_SET_CLIENT` varchar(32) NOT NULL DEFAULT '',
`COLLATION_CONNECTION` varchar(32) NOT NULL DEFAULT '',
`DATABASE_COLLATION` varchar(32) NOT NULL DEFAULT ''
@ -587,14 +587,14 @@ ORDINAL_POSITION 28
COLUMN_DEFAULT
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 77
CHARACTER_OCTET_LENGTH 231
CHARACTER_MAXIMUM_LENGTH 189
CHARACTER_OCTET_LENGTH 567
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
DATETIME_PRECISION NULL
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(77)
COLUMN_TYPE varchar(189)
COLUMN_KEY
EXTRA
PRIVILEGES #
@ -688,7 +688,7 @@ CREATED datetime NO 0000-00-00 00:00:00
LAST_ALTERED datetime NO 0000-00-00 00:00:00
SQL_MODE varchar(8192) NO
ROUTINE_COMMENT longtext NO NULL
DEFINER varchar(77) NO
DEFINER varchar(189) NO
CHARACTER_SET_CLIENT varchar(32) NO
COLLATION_CONNECTION varchar(32) NO
DATABASE_COLLATION varchar(32) NO

View File

@ -1,5 +1,5 @@
--- r/innodb_icp.result 2012-02-25 17:31:11.000000000 +0100
+++ /usr/home/serg/Abk/mysql/5.5-mtr/mysql-test/r/innodb_icp,innodb_plugin.reject 2012-02-25 22:32:18.000000000 +0100
--- r/innodb_icp.result 2013-07-16 17:01:00.000000000 +0400
+++ r/innodb_icp,innodb_plugin.reject 2013-07-16 17:16:53.000000000 +0400
@@ -213,7 +213,7 @@
EXPLAIN
SELECT c1 FROM t3 WHERE c1 >= 'c-1004=w' and c1 <= 'c-1006=w' and i1 > 2;
@ -45,5 +45,14 @@
+Handler_icp_attempts 0
+Handler_icp_match 0
DROP TABLE t1;
#
# BUG#920132: Assert trx->n_active_thrs == 1 failed at que0que.c line 1050
create table t1 (a int,b char(5),primary key (a), key (b(1)));
insert into t1 values ('a','b');
@@ -868,7 +868,7 @@
EXPLAIN
SELECT * FROM t1 FORCE INDEX(idx1) WHERE (c1='aa' AND c2='x') OR (c1='a' AND c2='y');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx1 idx1 10 NULL 2 Using index condition; Using where
+1 SIMPLE t1 range idx1 idx1 10 NULL 2 Using where
SELECT * FROM t1 FORCE INDEX(idx1) WHERE (c1='aa' AND c2='x') OR (c1='a' AND c2='y');
c1 c2
aa x

View File

@ -852,6 +852,33 @@ select 1 from t1 where b <= 1 and a <> '';
1
drop table t1;
#
# MDEV-4778: Incorrect results from Aria/MyISAM SELECT using index with prefix length on TEXT column
#
CREATE TABLE t1 (
c1 TEXT ,
c2 VARCHAR(2) ,
INDEX idx1 (c2,c1(2)),
INDEX idx2 (c2,c1(1))
);
INSERT INTO t1 (c1,c2) VALUES ('aa','x'), ('a' ,'y');
SELECT * FROM t1 IGNORE INDEX(idx1,idx2) WHERE (c1='aa' AND c2='x') OR (c1='a' AND c2='y');
c1 c2
aa x
a y
EXPLAIN
SELECT * FROM t1 FORCE INDEX(idx1) WHERE (c1='aa' AND c2='x') OR (c1='a' AND c2='y');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range idx1 idx1 10 NULL 2 Using index condition; Using where
SELECT * FROM t1 FORCE INDEX(idx1) WHERE (c1='aa' AND c2='x') OR (c1='a' AND c2='y');
c1 c2
aa x
a y
SELECT * FROM t1 FORCE INDEX(idx2) WHERE (c1='aa' AND c2='x') OR (c1='a' AND c2='y');
c1 c2
aa x
a y
DROP TABLE t1;
#
# BUG#920132: Assert trx->n_active_thrs == 1 failed at que0que.c line 1050
#
CREATE TABLE t1 ( a INT )

View File

@ -1472,6 +1472,11 @@ dog_id dog_id birthday dog_id t_id birthday dog_id t_id birthday a_id dog_id
5918 5918 2004-07-22 5918 N 2004-07-22 5918 N 2004-07-22 5992424 5918
SET optimizer_switch=@tmp_optimizer_switch;
DROP TABLE t1,t2,t3,t4,t5;
#
# MDEV-4752: Segfault during parsing of illegal query
#
SELECT * FROM t5 JOIN (t1 JOIN t2 UNION SELECT * FROM t3 JOIN t4);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 1
SET optimizer_switch=@save_optimizer_switch;
#
# Bug #35268: Parser can't handle STRAIGHT_JOIN with USING

View File

@ -16,7 +16,7 @@ cast(convert(0x0030 using ucs2) as decimal(5.2)) cast(concat(convert(0x0030 usin
0 0
select cast(convert(_ucs2 0x0030 using latin1) as date), cast(concat(convert(_ucs2 0x0030 using latin1)) as date);
cast(convert(_ucs2 0x0030 using latin1) as date) cast(concat(convert(_ucs2 0x0030 using latin1)) as date)
0000-00-00 0000-00-00
NULL NULL
Warnings:
Warning 1292 Incorrect datetime value: '0'
Warning 1292 Incorrect datetime value: '0'

View File

@ -0,0 +1,19 @@
create table t1 (f1 char(4) primary key) engine=innodb charset=utf8 ;
insert into t1 values ('aaaa');
create table t2 (f2 text, f3 char(4) not null) engine=innodb charset=utf8 ;
create table t3 (id int not null) engine=innodb charset=utf8 ;
create table t4 (val int not null) engine=innodb charset=utf8;
explain select 1 from
(select f2, f3, val, count(id) from t4 join t2 left join t3 on 0) top
join t1 on f1 = f3 where f3 = 'aaaa' order by val;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 const PRIMARY PRIMARY 12 const 1 Using index; Using filesort
1 PRIMARY <derived2> ref key0 key0 13 const 0 Using where
2 DERIVED t4 ALL NULL NULL NULL NULL 1
2 DERIVED t2 ALL NULL NULL NULL NULL 1 Using join buffer (flat, BNL join)
2 DERIVED t3 ALL NULL NULL NULL NULL 1 Using where; Using join buffer (incremental, BNL join)
select 1 from
(select f2, f3, val, count(id) from t4 join t2 left join t3 on 0) top
join t1 on f1 = f3 where f3 = 'aaaa' order by val;
1
drop table t1, t2, t3, t4;

View File

@ -105,7 +105,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range FieldKey FieldKey 38 NULL 4 Using index condition; Rowid-ordered scan; Using filesort
EXPLAIN SELECT * FROM t1 IGNORE INDEX (FieldKey, LongField) WHERE FieldKey > '2' ORDER BY LongVal;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range StringField StringField 38 NULL 4 Using index condition; Using filesort
1 SIMPLE t1 range StringField StringField 38 NULL 4 Using where; Using filesort
SELECT * FROM t1 WHERE FieldKey > '2' ORDER BY LongVal;
FieldKey LongVal StringVal
3 1 2

View File

@ -211,7 +211,7 @@ c-1006=w
EXPLAIN
SELECT c1 FROM t3 WHERE c1 >= 'c-1004=w' and c1 <= 'c-1006=w' and i1 > 2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 range c1 c1 12 NULL 2 Using index condition; Using where
1 SIMPLE t3 range c1 c1 12 NULL 2 Using where
SELECT c1 FROM t3 WHERE c1 >= 'c-1004=w' and c1 <= 'c-1006=w' and i1 > 2;
c1
EXPLAIN
@ -855,6 +855,33 @@ insert into t1 values ('',1);
select 1 from t1 where b <= 1 and a <> '';
1
drop table t1;
#
# MDEV-4778: Incorrect results from Aria/MyISAM SELECT using index with prefix length on TEXT column
#
CREATE TABLE t1 (
c1 TEXT ,
c2 VARCHAR(2) ,
INDEX idx1 (c2,c1(2)),
INDEX idx2 (c2,c1(1))
);
INSERT INTO t1 (c1,c2) VALUES ('aa','x'), ('a' ,'y');
SELECT * FROM t1 IGNORE INDEX(idx1,idx2) WHERE (c1='aa' AND c2='x') OR (c1='a' AND c2='y');
c1 c2
aa x
a y
EXPLAIN
SELECT * FROM t1 FORCE INDEX(idx1) WHERE (c1='aa' AND c2='x') OR (c1='a' AND c2='y');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range idx1 idx1 10 NULL 2 Using where
SELECT * FROM t1 FORCE INDEX(idx1) WHERE (c1='aa' AND c2='x') OR (c1='a' AND c2='y');
c1 c2
aa x
a y
SELECT * FROM t1 FORCE INDEX(idx2) WHERE (c1='aa' AND c2='x') OR (c1='a' AND c2='y');
c1 c2
aa x
a y
DROP TABLE t1;
drop table if exists t0, t1, t1i, t1m;
#
# BUG#826935 Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))' failed

View File

@ -0,0 +1,50 @@
RESET MASTER;
# Bug#33048 Not able to recover binary/blob data correctly using mysqlbinlog
# --------------------------------------------------------------------------
# The test verify that 0x00 and 0x0D0A sequence can be handled correctly by
# mysql
CREATE TABLE `A
B` (c1 CHAR(100));
# It is a faked statement. ASCII 0 is in the original statement, it would
# make the test result to become a binary file which was difficult to get
# the diff result if the original query was logged in the result.
INSERT INTO `A\r\nB` VALUES("A\0B");
INSERT INTO `A
B` VALUES("A
B");
SELECT HEX(c1) FROM `A
B`;
HEX(c1)
410042
410D0A42
FLUSH LOGS;
DROP TABLE `A
B`;
RESET MASTER;
# '--exec mysql ...' without --binary-mode option
# It creates the table with a wrong table name and generates an error.
# (error output was suppressed to make the test case platform agnostic)
# It is not in binary_mode, so table name '0x410D0A42' can be translated to
# '0x410A42' by mysql depending on the OS - Windows or Unix-like.
DROP TABLE `TABLE_NAME_MASKED`;
# In binary_mode, table name '0x410D0A42' and string '0x410042' can be
# handled correctly.
RESET MASTER;
SELECT HEX(c1) FROM `A
B`;
HEX(c1)
410042
410D0A42
DROP TABLE `A
B`;
RESET MASTER;
include/assert.inc [Table and contents created through mysqltest match 0x610D0A62.]
include/assert.inc [Table and contents created while replaying binary log without --binary-mode set match 0x61(0D)0A62.]
include/assert.inc [Table and contents created while replaying binary log with --binary-mode set match 0x610D0A62.]

View File

@ -121,7 +121,6 @@ Phase 3/3: Running 'mysql_fix_privilege_tables'...
OK
DROP USER mysqltest1@'%';
Run mysql_upgrade with a non existing server socket
Phase 1/3: Fixing table and database names
mysqlcheck: Got error: 2005: Unknown MySQL server host 'not_existing_host' (errno) when trying to connect
FATAL ERROR: Upgrade failed
set GLOBAL sql_mode='STRICT_ALL_TABLES,ANSI_QUOTES,NO_ZERO_DATE';

View File

@ -78,13 +78,13 @@ insert into t2 select * from t1;
alter table t1 modify b blob not null, add c int not null, drop key a, add unique key (a,b(20),c), drop key b, add key (b(10));
explain select * from t1 where a is null and b = 2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref a,b a 5 const 3 Using index condition; Using where
1 SIMPLE t1 ref a,b a 5 const 3 Using where
explain select * from t1 where a is null and b = 2 and c=0;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref a,b a 5 const 3 Using index condition; Using where
1 SIMPLE t1 ref a,b a 5 const 3 Using where
explain select * from t1 where a is null and b = 7 and c=0;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref a,b a 5 const 3 Using index condition; Using where
1 SIMPLE t1 ref a,b a 5 const 3 Using where
explain select * from t1 where a=2 and b = 2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref a,b a 5 const 1 Using where
@ -93,25 +93,25 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 12 Using where
explain select * from t1 where (a is null or a > 0 and a < 3) and b < 5 and c=0 limit 3;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range a,b a 5 NULL 5 Using index condition; Using where
1 SIMPLE t1 range a,b a 5 NULL 5 Using where
explain select * from t1 where (a is null or a = 7) and b=7 and c=0;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref_or_null a,b a 5 const 4 Using index condition; Using where
1 SIMPLE t1 ref_or_null a,b a 5 const 4 Using where
explain select * from t1 where (a is null and b>a) or a is null and b=7 limit 2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref a,b a 5 const 3 Using index condition; Using where
1 SIMPLE t1 ref a,b a 5 const 3 Using where
explain select * from t1 where a is null and b=9 or a is null and b=7 limit 3;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref a,b a 5 const 3 Using index condition; Using where
1 SIMPLE t1 ref a,b a 5 const 3 Using where
explain select * from t1 where a > 1 and a < 3 limit 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range a a 5 NULL 1 Using index condition
1 SIMPLE t1 range a a 5 NULL 1 Using where
explain select * from t1 where a is null and b=7 or a > 1 and a < 3 limit 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range a,b a 5 NULL 4 Using index condition; Using where
1 SIMPLE t1 range a,b a 5 NULL 4 Using where
explain select * from t1 where a > 8 and a < 9;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range a a 5 NULL 1 Using index condition
1 SIMPLE t1 range a a 5 NULL 1 Using where
explain select * from t1 where b like "6%";
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range b b 12 NULL 1 Using where

View File

@ -618,7 +618,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range FieldKey FieldKey 38 NULL 4 Using index condition; Using filesort
EXPLAIN SELECT * FROM t1 IGNORE INDEX (FieldKey, LongField) WHERE FieldKey > '2' ORDER BY LongVal;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range StringField StringField 38 NULL 4 Using index condition; Using filesort
1 SIMPLE t1 range StringField StringField 38 NULL 4 Using where; Using filesort
SELECT * FROM t1 WHERE FieldKey > '2' ORDER BY LongVal;
FieldKey LongVal StringVal
3 1 2

View File

@ -143,15 +143,8 @@ TRUNCATE t2;
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE t2 CHARACTER SET binary FIELDS TERMINATED BY 'ъ';
Warnings:
Warning 1638 Non-ASCII separator arguments are not fully supported
Warning 1265 Data truncated for column 'a' at row 1
Warning 1261 Row 1 doesn't contain data for all columns
Warning 1261 Row 1 doesn't contain data for all columns
Warning 1265 Data truncated for column 'a' at row 2
Warning 1261 Row 2 doesn't contain data for all columns
Warning 1261 Row 2 doesn't contain data for all columns
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
a b c
1 NULL NULL
1 ABC-АБВ DEF-ÂÃÄ
2 NULL NULL
SELECT * FROM t1 INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' LINES STARTING BY 'ъ';
@ -181,7 +174,6 @@ Warning 1638 Non-ASCII separator arguments are not fully supported
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
a b c
1 ABC-АБВ DEF-ÂÃÄ
1 ABC-АБВ DEF-ÂÃÄÑŠ2
2 NULL NULL
# Default (binary) charset:
SELECT * INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' FROM t1;

View File

@ -555,14 +555,10 @@ ERROR 42000: Incorrect parameters in the call to native function 'atan'
DROP TABLE IF EXISTS t1;
SELECT STR_TO_DATE('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE;
STR_TO_DATE('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE
NULL
Warnings:
Warning 1411 Incorrect datetime value: '10:00 PM' for function str_to_date
22:10:00
SELECT STR_TO_DATE('10:00 PM', '%h:%i %p') + INTERVAL (INTERVAL(1,2,3) + 1) MINUTE;
STR_TO_DATE('10:00 PM', '%h:%i %p') + INTERVAL (INTERVAL(1,2,3) + 1) MINUTE
NULL
Warnings:
Warning 1411 Incorrect datetime value: '10:00 PM' for function str_to_date
22:01:00
SELECT "1997-12-31 23:59:59" + INTERVAL 1 SECOND;
"1997-12-31 23:59:59" + INTERVAL 1 SECOND
1998-01-01 00:00:00

View File

@ -699,6 +699,7 @@ a tz
2038-01-19 03:14:06 Moscow
UPDATE t2 SET a = TIMESTAMPADD(SECOND, 1, a);
Warnings:
Warning 1292 Incorrect datetime value: '0000-00-00'
Warning 1264 Out of range value for column 'a' at row 34
Warning 1264 Out of range value for column 'a' at row 35
SELECT MIN(a), MAX(a) FROM t2;
@ -780,6 +781,10 @@ a tz
2038-01-19 03:14:07 UTC
2011-10-30 00:00:02 Moscow
UPDATE t2 SET a = TIMESTAMPADD(SECOND, -1, a);
Warnings:
Warning 1292 Incorrect datetime value: '0000-00-00'
Warning 1292 Incorrect datetime value: '0000-00-00'
Warning 1292 Incorrect datetime value: '0000-00-00'
SELECT MIN(a), MAX(a) FROM t2;
MIN(a) MAX(a)
1970-01-01 00:00:01 2038-01-19 03:14:06
@ -1174,6 +1179,7 @@ a tz
2038-01-19 06:14:06 Moscow
UPDATE t2 SET a = TIMESTAMPADD(SECOND, 1, a);
Warnings:
Warning 1292 Incorrect datetime value: '0000-00-00'
Warning 1299 Invalid TIMESTAMP value in column 'a' at row 8
Warning 1299 Invalid TIMESTAMP value in column 'a' at row 9
Warning 1264 Out of range value for column 'a' at row 34
@ -1258,6 +1264,9 @@ a tz
2011-10-30 03:00:02 Moscow
UPDATE t2 SET a = TIMESTAMPADD(SECOND, -1, a);
Warnings:
Warning 1292 Incorrect datetime value: '0000-00-00'
Warning 1292 Incorrect datetime value: '0000-00-00'
Warning 1292 Incorrect datetime value: '0000-00-00'
Warning 1299 Invalid TIMESTAMP value in column 'a' at row 18
Warning 1299 Invalid TIMESTAMP value in column 'a' at row 19
SELECT MIN(a), MAX(a) FROM t2;

View File

@ -2235,10 +2235,9 @@ INSERT INTO t1 VALUES (1, '2009-01-01'), (2, NULL);
# test with an invalid date, which lead to item->null_value is set.
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-99' AS DATETIME);
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p20090401 ALL NULL NULL NULL NULL 2 Using where
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
Warnings:
Warning 1292 Incorrect datetime value: '2009-04-99'
Warning 1292 Incorrect datetime value: '2009-04-99'
DROP TABLE t1;
CREATE TABLE t1
(a INT NOT NULL AUTO_INCREMENT,

View File

@ -199,3 +199,24 @@ select 1;
1
1
UNINSTALL PLUGIN example;
UNINSTALL PLUGIN MyISAM;
ERROR HY000: Built-in plugins cannot be deleted
select plugin_name from information_schema.plugins where plugin_library like 'ha_example%';
plugin_name
install soname 'ha_example';
select plugin_name from information_schema.plugins where plugin_library like 'ha_example%';
plugin_name
EXAMPLE
UNUSABLE
uninstall plugin example;
select plugin_name from information_schema.plugins where plugin_library like 'ha_example%';
plugin_name
UNUSABLE
install soname 'ha_example';
select plugin_name from information_schema.plugins where plugin_library like 'ha_example%';
plugin_name
EXAMPLE
UNUSABLE
uninstall soname 'ha_example';
select plugin_name from information_schema.plugins where plugin_library like 'ha_example%';
plugin_name

View File

@ -0,0 +1,15 @@
SET DEBUG_SYNC = 'dispatch_command_before_set_time WAIT_FOR do_set_time';
SELECT 1;
SET DEBUG_SYNC = 'fill_schema_processlist_after_unow SIGNAL do_set_time WAIT_FOR fill_schema_proceed';
SELECT INFO,TIME,TIME_MS FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO IS NULL;
1
1
SET DEBUG_SYNC = 'now SIGNAL fill_schema_proceed';
INFO TIME TIME_MS
NULL 0 0.000
select sleep(5);
sleep(5)
0
select command, time < 5 from information_schema.processlist where id != connection_id();
command time < 5
Sleep 1

View File

@ -998,7 +998,7 @@ def information_schema TRIGGERS TRIGGERS ACTION_STATEMENT Statement 252 589815 1
def information_schema TRIGGERS TRIGGERS ACTION_TIMING Timing 253 18 6 N 1 0 33
def information_schema TRIGGERS TRIGGERS CREATED Created 12 19 0 Y 128 0 63
def information_schema TRIGGERS TRIGGERS SQL_MODE sql_mode 253 24576 0 N 1 0 33
def information_schema TRIGGERS TRIGGERS DEFINER Definer 253 231 14 N 1 0 33
def information_schema TRIGGERS TRIGGERS DEFINER Definer 253 567 14 N 1 0 33
def information_schema TRIGGERS TRIGGERS CHARACTER_SET_CLIENT character_set_client 253 96 6 N 1 0 33
def information_schema TRIGGERS TRIGGERS COLLATION_CONNECTION collation_connection 253 96 6 N 1 0 33
def information_schema TRIGGERS TRIGGERS DATABASE_COLLATION Database Collation 253 96 17 N 1 0 33
@ -1042,7 +1042,7 @@ def information_schema TRIGGERS TRIGGERS ACTION_REFERENCE_NEW_TABLE ACTION_REFER
def information_schema TRIGGERS TRIGGERS ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_OLD_ROW 253 9 3 N 1 0 33
def information_schema TRIGGERS TRIGGERS ACTION_REFERENCE_NEW_ROW ACTION_REFERENCE_NEW_ROW 253 9 3 N 1 0 33
def information_schema TRIGGERS TRIGGERS SQL_MODE SQL_MODE 253 24576 0 N 1 0 33
def information_schema TRIGGERS TRIGGERS DEFINER DEFINER 253 231 14 N 1 0 33
def information_schema TRIGGERS TRIGGERS DEFINER DEFINER 253 567 14 N 1 0 33
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW SQL_MODE DEFINER
def test t1_bi INSERT def test t1 NULL SET @a = 1 ROW BEFORE NULL NULL OLD NEW root@localhost
----------------------------------------------------------------
@ -1065,7 +1065,7 @@ def information_schema VIEWS VIEWS TABLE_NAME TABLE_NAME 253 192 2 N 1 0 33
def information_schema VIEWS VIEWS VIEW_DEFINITION VIEW_DEFINITION 252 589815 15 N 17 0 33
def information_schema VIEWS VIEWS CHECK_OPTION CHECK_OPTION 253 24 4 N 1 0 33
def information_schema VIEWS VIEWS IS_UPDATABLE IS_UPDATABLE 253 9 2 N 1 0 33
def information_schema VIEWS VIEWS DEFINER DEFINER 253 231 14 N 1 0 33
def information_schema VIEWS VIEWS DEFINER DEFINER 253 567 14 N 1 0 33
def information_schema VIEWS VIEWS SECURITY_TYPE SECURITY_TYPE 253 21 7 N 1 0 33
def information_schema VIEWS VIEWS CHARACTER_SET_CLIENT CHARACTER_SET_CLIENT 253 96 6 N 1 0 33
def information_schema VIEWS VIEWS COLLATION_CONNECTION COLLATION_CONNECTION 253 96 6 N 1 0 33
@ -1123,7 +1123,7 @@ def information_schema ROUTINES ROUTINES SQL_PATH SQL_PATH 253 192 0 Y 0 0 33
def information_schema ROUTINES ROUTINES SECURITY_TYPE SECURITY_TYPE 253 21 7 N 1 0 33
def information_schema ROUTINES ROUTINES SQL_MODE SQL_MODE 253 24576 0 N 1 0 33
def information_schema ROUTINES ROUTINES ROUTINE_COMMENT ROUTINE_COMMENT 252 589815 0 N 17 0 33
def information_schema ROUTINES ROUTINES DEFINER DEFINER 253 231 14 N 1 0 33
def information_schema ROUTINES ROUTINES DEFINER DEFINER 253 567 14 N 1 0 33
SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE SQL_MODE ROUTINE_COMMENT DEFINER
p1 def test p1 PROCEDURE NULL SQL SELECT 1 NULL NULL SQL NO CONTAINS SQL NULL DEFINER root@localhost
----------------------------------------------------------------
@ -1178,7 +1178,7 @@ def information_schema ROUTINES ROUTINES SQL_PATH SQL_PATH 253 192 0 Y 0 0 33
def information_schema ROUTINES ROUTINES SECURITY_TYPE SECURITY_TYPE 253 21 7 N 1 0 33
def information_schema ROUTINES ROUTINES SQL_MODE SQL_MODE 253 24576 0 N 1 0 33
def information_schema ROUTINES ROUTINES ROUTINE_COMMENT ROUTINE_COMMENT 252 589815 0 N 17 0 33
def information_schema ROUTINES ROUTINES DEFINER DEFINER 253 231 14 N 1 0 33
def information_schema ROUTINES ROUTINES DEFINER DEFINER 253 567 14 N 1 0 33
SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE SQL_MODE ROUTINE_COMMENT DEFINER
f1 def test f1 FUNCTION int(11) SQL RETURN 1 NULL NULL SQL NO CONTAINS SQL NULL DEFINER root@localhost
----------------------------------------------------------------

View File

@ -0,0 +1,6 @@
create table t (a int);
create or replace view v as select 1 from t where a;
delete from v where (select g());
ERROR 42000: FUNCTION test.g does not exist
drop view v;
drop table t;

View File

@ -12,12 +12,12 @@ Warning 1292 Truncated incorrect datetime value: '2012103123595912'
Warning 1292 Truncated incorrect datetime value: '20121031235959123'
select cast(0 as date), cast('0000-00-00' as date), cast('0' as date);
cast(0 as date) cast('0000-00-00' as date) cast('0' as date)
0000-00-00 0000-00-00 0000-00-00
0000-00-00 0000-00-00 NULL
Warnings:
Warning 1292 Incorrect datetime value: '0'
select extract(hour from '100000:02:03'), extract(hour from '100000:02:03 ');
extract(hour from '100000:02:03') extract(hour from '100000:02:03 ')
0 0
NULL NULL
Warnings:
Warning 1292 Truncated incorrect time value: '100000:02:03'
Warning 1292 Truncated incorrect time value: '100000:02:03 '

View File

@ -206,7 +206,9 @@ INSERT INTO t1 (col1) VALUES (STR_TO_DATE('15.10.2004','%d.%m.%Y'));
INSERT INTO t1 (col2) VALUES (STR_TO_DATE('15.10.2004 10.15','%d.%m.%Y %H.%i'));
INSERT INTO t1 (col3) VALUES (STR_TO_DATE('15.10.2004 10.15','%d.%m.%Y %H.%i'));
INSERT INTO t1 (col1) VALUES(STR_TO_DATE('31.10.0000 15.30','%d.%m.%Y %H.%i'));
ERROR HY000: Incorrect datetime value: '31.10.0000 15.30' for function str_to_date
Warnings:
Note 1265 Data truncated for column 'col1' at row 1
INSERT INTO t1 (col2) VALUES(STR_TO_DATE('31.10.0000 15.30','%d.%m.%Y %H.%i'));
INSERT INTO t1 (col1) VALUES(STR_TO_DATE('31.0.2004 15.30','%d.%m.%Y %H.%i'));
ERROR HY000: Incorrect datetime value: '31.0.2004 15.30' for function str_to_date
INSERT INTO t1 (col1) VALUES(STR_TO_DATE('0.10.2004 15.30','%d.%m.%Y %H.%i'));
@ -221,8 +223,6 @@ INSERT INTO t1 (col1) VALUES(STR_TO_DATE('15.13.2004 15.30','%d.%m.%Y %H.%i'));
ERROR HY000: Incorrect datetime value: '15.13.2004 15.30' for function str_to_date
INSERT INTO t1 (col1) VALUES(STR_TO_DATE('00.00.0000','%d.%m.%Y'));
ERROR HY000: Incorrect datetime value: '00.00.0000' for function str_to_date
INSERT INTO t1 (col2) VALUES(STR_TO_DATE('31.10.0000 15.30','%d.%m.%Y %H.%i'));
ERROR HY000: Incorrect datetime value: '31.10.0000 15.30' for function str_to_date
INSERT INTO t1 (col2) VALUES(STR_TO_DATE('31.0.2004 15.30','%d.%m.%Y %H.%i'));
ERROR HY000: Incorrect datetime value: '31.0.2004 15.30' for function str_to_date
INSERT INTO t1 (col2) VALUES(STR_TO_DATE('0.10.2004 15.30','%d.%m.%Y %H.%i'));
@ -238,7 +238,7 @@ ERROR HY000: Incorrect datetime value: '15.13.2004 15.30' for function str_to_da
INSERT INTO t1 (col2) VALUES(STR_TO_DATE('00.00.0000','%d.%m.%Y'));
ERROR HY000: Incorrect datetime value: '00.00.0000' for function str_to_date
INSERT INTO t1 (col3) VALUES(STR_TO_DATE('31.10.0000 15.30','%d.%m.%Y %H.%i'));
ERROR HY000: Incorrect datetime value: '31.10.0000 15.30' for function str_to_date
ERROR 22007: Incorrect datetime value: '0000-10-31 15:30:00' for column 'col3' at row 1
INSERT INTO t1 (col3) VALUES(STR_TO_DATE('31.0.2004 15.30','%d.%m.%Y %H.%i'));
ERROR HY000: Incorrect datetime value: '31.0.2004 15.30' for function str_to_date
INSERT INTO t1 (col3) VALUES(STR_TO_DATE('0.10.2004 15.30','%d.%m.%Y %H.%i'));

View File

@ -5173,9 +5173,9 @@ a 1
SELECT * FROM t1 JOIN ((SELECT 1 UNION SELECT 1)) ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')) ON 1' at line 1
SELECT * FROM t1 JOIN (t1 t1a UNION SELECT 1) ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ON 1' at line 1
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') ON 1' at line 1
SELECT * FROM t1 JOIN ((t1 t1a UNION SELECT 1)) ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') ON 1' at line 1
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')) ON 1' at line 1
SELECT * FROM t1 JOIN (t1 t1a) t1a ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 't1a ON 1' at line 1
SELECT * FROM t1 JOIN ((t1 t1a)) t1a ON 1;

View File

@ -5179,9 +5179,9 @@ a 1
SELECT * FROM t1 JOIN ((SELECT 1 UNION SELECT 1)) ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')) ON 1' at line 1
SELECT * FROM t1 JOIN (t1 t1a UNION SELECT 1) ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ON 1' at line 1
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') ON 1' at line 1
SELECT * FROM t1 JOIN ((t1 t1a UNION SELECT 1)) ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') ON 1' at line 1
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')) ON 1' at line 1
SELECT * FROM t1 JOIN (t1 t1a) t1a ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 't1a ON 1' at line 1
SELECT * FROM t1 JOIN ((t1 t1a)) t1a ON 1;

View File

@ -450,4 +450,48 @@ a d2
select distinct (1 + (select 1 from `t2` where `a`)) `d2` from `t1`;
d2
drop table t1,t2;
#
# MDEV-4042: Assertion `table->key_read == 0' fails in close_thread_table on EXPLAIN with GROUP BY and HAVING in EXISTS SQ,
# MDEV-4536: ...sql/sql_base.cc:1598: bool close_thread_table(THD*, TABLE**): Assertion `table->key_read == 0' failed.
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
CREATE TABLE t2 (b INT PRIMARY KEY, c INT) ENGINE=InnoDB;
CREATE TABLE t3 (d INT) ENGINE=InnoDB;
EXPLAIN
SELECT * FROM t1 WHERE EXISTS ( SELECT b FROM t2, t3 GROUP BY b HAVING b != 3 );
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
2 SUBQUERY t2 index NULL PRIMARY 4 NULL 1 Using index; Using temporary; Using filesort
2 SUBQUERY t3 ALL NULL NULL NULL NULL 1 Using join buffer (flat, BNL join)
SELECT * FROM t1 WHERE EXISTS ( SELECT b FROM t2, t3 GROUP BY b HAVING b != 3 );
a
DROP TABLE t1,t2,t3;
CREATE TABLE t1 (
pk int auto_increment primary key,
col_int_key int(11),
key col_int_key (col_int_key),col_varchar_key varchar(128),
key (col_varchar_key)
) engine=innodb;
EXPLAIN
SELECT 1 FROM t1 AS alias1
WHERE EXISTS ( SELECT SQ2_alias1 . col_int_key AS SQ2_field1
FROM ( t1 AS SQ2_alias1 RIGHT OUTER JOIN
t1 AS SQ2_alias2 ON (SQ2_alias2 . col_int_key = SQ2_alias1 . col_int_key )
)
GROUP BY SQ2_field1
HAVING SQ2_alias1 . col_int_key >= 7
);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
2 SUBQUERY SQ2_alias2 index NULL col_int_key 5 NULL 1 Using index; Using temporary; Using filesort
2 SUBQUERY SQ2_alias1 ref col_int_key col_int_key 5 test.SQ2_alias2.col_int_key 1 Using where; Using index
SELECT 1 FROM t1 AS alias1
WHERE EXISTS ( SELECT SQ2_alias1 . col_int_key AS SQ2_field1
FROM ( t1 AS SQ2_alias1 RIGHT OUTER JOIN
t1 AS SQ2_alias2 ON (SQ2_alias2 . col_int_key = SQ2_alias1 . col_int_key )
)
GROUP BY SQ2_field1
HAVING SQ2_alias1 . col_int_key >= 7
);
1
drop table t1;
set optimizer_switch=@subselect_innodb_tmp;

View File

@ -5175,9 +5175,9 @@ a 1
SELECT * FROM t1 JOIN ((SELECT 1 UNION SELECT 1)) ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')) ON 1' at line 1
SELECT * FROM t1 JOIN (t1 t1a UNION SELECT 1) ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ON 1' at line 1
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') ON 1' at line 1
SELECT * FROM t1 JOIN ((t1 t1a UNION SELECT 1)) ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') ON 1' at line 1
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')) ON 1' at line 1
SELECT * FROM t1 JOIN (t1 t1a) t1a ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 't1a ON 1' at line 1
SELECT * FROM t1 JOIN ((t1 t1a)) t1a ON 1;

View File

@ -5171,9 +5171,9 @@ a 1
SELECT * FROM t1 JOIN ((SELECT 1 UNION SELECT 1)) ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')) ON 1' at line 1
SELECT * FROM t1 JOIN (t1 t1a UNION SELECT 1) ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ON 1' at line 1
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') ON 1' at line 1
SELECT * FROM t1 JOIN ((t1 t1a UNION SELECT 1)) ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') ON 1' at line 1
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')) ON 1' at line 1
SELECT * FROM t1 JOIN (t1 t1a) t1a ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 't1a ON 1' at line 1
SELECT * FROM t1 JOIN ((t1 t1a)) t1a ON 1;

View File

@ -5179,9 +5179,9 @@ a 1
SELECT * FROM t1 JOIN ((SELECT 1 UNION SELECT 1)) ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')) ON 1' at line 1
SELECT * FROM t1 JOIN (t1 t1a UNION SELECT 1) ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ON 1' at line 1
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') ON 1' at line 1
SELECT * FROM t1 JOIN ((t1 t1a UNION SELECT 1)) ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') ON 1' at line 1
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')) ON 1' at line 1
SELECT * FROM t1 JOIN (t1 t1a) t1a ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 't1a ON 1' at line 1
SELECT * FROM t1 JOIN ((t1 t1a)) t1a ON 1;

View File

@ -5171,9 +5171,9 @@ a 1
SELECT * FROM t1 JOIN ((SELECT 1 UNION SELECT 1)) ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')) ON 1' at line 1
SELECT * FROM t1 JOIN (t1 t1a UNION SELECT 1) ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ON 1' at line 1
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') ON 1' at line 1
SELECT * FROM t1 JOIN ((t1 t1a UNION SELECT 1)) ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') ON 1' at line 1
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')) ON 1' at line 1
SELECT * FROM t1 JOIN (t1 t1a) t1a ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 't1a ON 1' at line 1
SELECT * FROM t1 JOIN ((t1 t1a)) t1a ON 1;

View File

@ -2884,4 +2884,40 @@ HAVING c <> ( SELECT MAX( c ) FROM t1 )
ORDER BY sm;
c sm
DROP TABLE t1,t2;
#
# mdev-4173 ignored duplicate value when converting heap to temp table
# could lead to extra rows in semijoin queries or missing row in union queries
#
CREATE TABLE t1 (i1 INT) engine=myisam;
INSERT INTO t1 VALUES
(4),(8),(0),(0),(0),(7),(7),(5),(3),(4),(9),(6),(1),(5),(6),(2),(4),(4);
CREATE TABLE t2 (i2 INT, j2 INT) engine=myisam;
INSERT INTO t2 VALUES
(7,1),(0,7),(9,4),(3,7),(4,0),(2,2),(5,9),(3,4),
(1,0),(3,9),(5,8),(1,8),(204,18),(224,84),(9,6);
CREATE TABLE t3 (i3 INT, KEY(i3)) engine=myisam;
INSERT INTO t3 VALUES
(0),(8),(1),(8),(9),(24),(6),(1),(6),(2),(4),(2),(1);
select @@max_heap_table_size into @tmp_max_heap_table_size;
select @@join_buffer_size into @tmp_join_buffer_size;
set max_heap_table_size=16*1024;
COUNT(*)
2834
COUNT(*)
2834
COUNT(*)
2834
COUNT(*)
2834
COUNT(*)
2834
COUNT(*)
2834
COUNT(*)
2834
COUNT(*)
2834
DROP TABLE t1, t2, t3;
set join_buffer_size = @tmp_join_buffer_size;
set max_heap_table_size = @tmp_max_heap_table_size;
set optimizer_switch=@subselect_sj_tmp;

View File

@ -1094,5 +1094,27 @@ COUNT(*)
3724
set optimizer_prune_level=@tmp_951283;
DROP TABLE t1,t2;
DROP TABLE IF EXISTS t1,t2,t3,t4;
#
# MDEV-4782: Valgrind warnings (Conditional jump or move depends on uninitialised value) with InnoDB, semijoin
#
CREATE TABLE t1 ( t1_pk1 varchar(3), t1_pk2 varchar(52), PRIMARY KEY (t1_pk1,t1_pk2)) ENGINE=InnoDB;
INSERT INTO t1 VALUES ('CHN','Chinese'),('USA','English');
CREATE TABLE t2 ( t2_i int(11), t2_c varchar(52)) ENGINE=InnoDB;
INSERT INTO t2 VALUES (86,'English');
CREATE TABLE t3 ( t3_i int(11), t3_c varchar(35)) ENGINE=InnoDB;
INSERT INTO t3 VALUES (3989,'Abilene'),(3873,'Akron');
create table t4 like t1;
insert into t4 select * from t1;
SELECT * FROM t1, t3 WHERE t3_c IN ( SELECT t1_pk2 FROM t4, t2 WHERE t2_c = t1_pk2 AND t2_i >= t3_i ) AND ( t1_pk1 = 'POL' );
t1_pk1 t1_pk2 t3_i t3_c
explain
SELECT * FROM t1, t3 WHERE t3_c IN ( SELECT t1_pk2 FROM t4, t2 WHERE t2_c = t1_pk2 AND t2_i >= t3_i ) AND ( t1_pk1 = 'POL' );
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ref PRIMARY PRIMARY 5 const 1 Using where; Using index
1 PRIMARY t2 ALL NULL NULL NULL NULL 1 Start temporary
1 PRIMARY t3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
1 PRIMARY t4 index NULL PRIMARY 59 NULL 2 Using where; Using index; End temporary
DROP TABLE t1,t2,t3,t4;
# This must be the last in the file:
set optimizer_switch=@subselect_sj2_tmp;

View File

@ -1109,6 +1109,28 @@ COUNT(*)
3724
set optimizer_prune_level=@tmp_951283;
DROP TABLE t1,t2;
DROP TABLE IF EXISTS t1,t2,t3,t4;
#
# MDEV-4782: Valgrind warnings (Conditional jump or move depends on uninitialised value) with InnoDB, semijoin
#
CREATE TABLE t1 ( t1_pk1 varchar(3), t1_pk2 varchar(52), PRIMARY KEY (t1_pk1,t1_pk2)) ENGINE=InnoDB;
INSERT INTO t1 VALUES ('CHN','Chinese'),('USA','English');
CREATE TABLE t2 ( t2_i int(11), t2_c varchar(52)) ENGINE=InnoDB;
INSERT INTO t2 VALUES (86,'English');
CREATE TABLE t3 ( t3_i int(11), t3_c varchar(35)) ENGINE=InnoDB;
INSERT INTO t3 VALUES (3989,'Abilene'),(3873,'Akron');
create table t4 like t1;
insert into t4 select * from t1;
SELECT * FROM t1, t3 WHERE t3_c IN ( SELECT t1_pk2 FROM t4, t2 WHERE t2_c = t1_pk2 AND t2_i >= t3_i ) AND ( t1_pk1 = 'POL' );
t1_pk1 t1_pk2 t3_i t3_c
explain
SELECT * FROM t1, t3 WHERE t3_c IN ( SELECT t1_pk2 FROM t4, t2 WHERE t2_c = t1_pk2 AND t2_i >= t3_i ) AND ( t1_pk1 = 'POL' );
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ref PRIMARY PRIMARY 5 const 1 Using where; Using index
1 PRIMARY t2 ALL NULL NULL NULL NULL 1 Start temporary; Using join buffer (flat, BNL join)
1 PRIMARY t3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
1 PRIMARY t4 hash_index NULL #hash#$hj:PRIMARY 55:59 test.t3.t3_c 2 Using where; End temporary; Using join buffer (incremental, BNLH join)
DROP TABLE t1,t2,t3,t4;
# This must be the last in the file:
set optimizer_switch=@subselect_sj2_tmp;
#

View File

@ -1096,6 +1096,28 @@ COUNT(*)
3724
set optimizer_prune_level=@tmp_951283;
DROP TABLE t1,t2;
DROP TABLE IF EXISTS t1,t2,t3,t4;
#
# MDEV-4782: Valgrind warnings (Conditional jump or move depends on uninitialised value) with InnoDB, semijoin
#
CREATE TABLE t1 ( t1_pk1 varchar(3), t1_pk2 varchar(52), PRIMARY KEY (t1_pk1,t1_pk2)) ENGINE=InnoDB;
INSERT INTO t1 VALUES ('CHN','Chinese'),('USA','English');
CREATE TABLE t2 ( t2_i int(11), t2_c varchar(52)) ENGINE=InnoDB;
INSERT INTO t2 VALUES (86,'English');
CREATE TABLE t3 ( t3_i int(11), t3_c varchar(35)) ENGINE=InnoDB;
INSERT INTO t3 VALUES (3989,'Abilene'),(3873,'Akron');
create table t4 like t1;
insert into t4 select * from t1;
SELECT * FROM t1, t3 WHERE t3_c IN ( SELECT t1_pk2 FROM t4, t2 WHERE t2_c = t1_pk2 AND t2_i >= t3_i ) AND ( t1_pk1 = 'POL' );
t1_pk1 t1_pk2 t3_i t3_c
explain
SELECT * FROM t1, t3 WHERE t3_c IN ( SELECT t1_pk2 FROM t4, t2 WHERE t2_c = t1_pk2 AND t2_i >= t3_i ) AND ( t1_pk1 = 'POL' );
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ref PRIMARY PRIMARY 5 const 1 Using where; Using index
1 PRIMARY t2 ALL NULL NULL NULL NULL 1 Start temporary
1 PRIMARY t3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
1 PRIMARY t4 index NULL PRIMARY 59 NULL 2 Using where; Using index; End temporary
DROP TABLE t1,t2,t3,t4;
# This must be the last in the file:
set optimizer_switch=@subselect_sj2_tmp;
set optimizer_switch=default;

View File

@ -2898,6 +2898,42 @@ HAVING c <> ( SELECT MAX( c ) FROM t1 )
ORDER BY sm;
c sm
DROP TABLE t1,t2;
#
# mdev-4173 ignored duplicate value when converting heap to temp table
# could lead to extra rows in semijoin queries or missing row in union queries
#
CREATE TABLE t1 (i1 INT) engine=myisam;
INSERT INTO t1 VALUES
(4),(8),(0),(0),(0),(7),(7),(5),(3),(4),(9),(6),(1),(5),(6),(2),(4),(4);
CREATE TABLE t2 (i2 INT, j2 INT) engine=myisam;
INSERT INTO t2 VALUES
(7,1),(0,7),(9,4),(3,7),(4,0),(2,2),(5,9),(3,4),
(1,0),(3,9),(5,8),(1,8),(204,18),(224,84),(9,6);
CREATE TABLE t3 (i3 INT, KEY(i3)) engine=myisam;
INSERT INTO t3 VALUES
(0),(8),(1),(8),(9),(24),(6),(1),(6),(2),(4),(2),(1);
select @@max_heap_table_size into @tmp_max_heap_table_size;
select @@join_buffer_size into @tmp_join_buffer_size;
set max_heap_table_size=16*1024;
COUNT(*)
2834
COUNT(*)
2834
COUNT(*)
2834
COUNT(*)
2834
COUNT(*)
2834
COUNT(*)
2834
COUNT(*)
2834
COUNT(*)
2834
DROP TABLE t1, t2, t3;
set join_buffer_size = @tmp_join_buffer_size;
set max_heap_table_size = @tmp_max_heap_table_size;
set optimizer_switch=@subselect_sj_tmp;
#
# BUG#49129: Wrong result with IN-subquery with join_cache_level=6 and firstmatch=off

View File

@ -136,7 +136,7 @@ select @d:=1311;
1311
select year(@d), month(@d), day(@d), cast(@d as date);
year(@d) month(@d) day(@d) cast(@d as date)
0 0 0 0000-00-00
NULL NULL NULL NULL
Warnings:
Warning 1292 Incorrect datetime value: '1311'
Warning 1292 Incorrect datetime value: '1311'
@ -303,6 +303,17 @@ Warnings:
Warning 1265 Data truncated for column 'f1' at row 1
drop table t1;
#
# MDEV-4634 Crash in CONVERT_TZ
#
SELECT CONVERT_TZ(GREATEST(DATE('2021-00-00'),DATE('2022-00-00')),'+00:00','+7:5');
CONVERT_TZ(GREATEST(DATE('2021-00-00'),DATE('2022-00-00')),'+00:00','+7:5')
NULL
Warnings:
Warning 1292 Incorrect datetime value: '2022-00-00 00:00:00'
#
# End of 5.3 tests
#
#
# Bug #33629: last_day function can return null, but has 'not null'
# flag set for result
#

View File

@ -657,8 +657,8 @@ create table t1 (d date, t time) engine=myisam;
insert into t1 values ('2000-12-03','22:55:23'),('2008-05-03','10:19:31');
select case when d = '2012-12-12' then d else t end as cond, group_concat( d ) from t1 group by cond;
cond group_concat( d )
0000-00-00 00:00:00 2000-12-03
0000-00-00 00:00:00 2008-05-03
NULL 2000-12-03
NULL 2008-05-03
Warnings:
Warning 1292 Incorrect datetime value: '22:55:23'
Warning 1292 Incorrect datetime value: '10:19:31'
@ -681,6 +681,14 @@ c a b
1 1 0000-00-00
3 NULL NULL
drop table t1,t2;
#
# MDEV-4634 Crash in CONVERT_TZ
#
SELECT CONVERT_TZ(GREATEST(TIMESTAMP('2021-00-00'),TIMESTAMP('2022-00-00')),'+00:00','+7:5');
CONVERT_TZ(GREATEST(TIMESTAMP('2021-00-00'),TIMESTAMP('2022-00-00')),'+00:00','+7:5')
NULL
Warnings:
Warning 1292 Incorrect datetime value: '2022-00-00 00:00:00'
End of 5.3 tests
#
# Start of 5.5 tests

View File

@ -338,3 +338,15 @@ select * from t1;
a b
2010-01-02 03:04:05.000000 2010-01-02 03:04:05
drop table t1;
#
# MDEV-4651 Crash in my_decimal2decimal in a ORDER BY query
#
SET @@time_zone='+00:00';
CREATE TABLE t1 (a DATETIME(4) NOT NULL);
INSERT INTO t1 VALUES ('2001-01-01 00:00:00'),('2000-00-00 00:00:00');
SELECT UNIX_TIMESTAMP(a) FROM t1 ORDER BY 1;
UNIX_TIMESTAMP(a)
NULL
978307200.0000
DROP TABLE t1;
SET @@time_zone=DEFAULT;

View File

@ -174,6 +174,17 @@ select f1, f1 = '2010-10-11 23:38:57' from t1;
f1 f1 = '2010-10-11 23:38:57'
23:38:57 0
drop table t1;
#
# MDEV-4634 Crash in CONVERT_TZ
#
SELECT CONVERT_TZ(GREATEST(TIME('00:00:00'),TIME('00:00:00')),'+00:00','+7:5');
CONVERT_TZ(GREATEST(TIME('00:00:00'),TIME('00:00:00')),'+00:00','+7:5')
NULL
Warnings:
Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00'
#
# End of 5.3 tests
#
CREATE TABLE t1 (f1 TIME);
INSERT INTO t1 VALUES ('24:00:00');
SELECT '24:00:00' = (SELECT f1 FROM t1);

View File

@ -1487,7 +1487,7 @@ SET @old_max_binlog_cache_size = @@GLOBAL.max_binlog_cache_size;
SET GLOBAL max_binlog_cache_size = 5 * 1024 * 1024 * 1024;
SELECT @@GLOBAL.max_binlog_cache_size;
@@GLOBAL.max_binlog_cache_size
5368709120
max_size
SET GLOBAL max_binlog_cache_size = @old_max_binlog_cache_size;
#
# Bug #37168 : Missing variable - skip_name_resolve

View File

@ -4863,6 +4863,18 @@ a
1
drop view v1;
drop table t1,t2;
#
# MDEV-4593: p_s: crash in simplify_joins with delete using subselect
# from view
#
create table `t1`(`a` int);
create table `t2`(`a` int);
create or replace view `v1` as select `a` from `t1`;
prepare s from "delete from `t2` order by (select 1 from `v1`)";
execute s;
deallocate prepare s;
drop view v1;
drop tables t1,t2;
# -----------------------------------------------------------------
# -- End of 5.3 tests.
# -----------------------------------------------------------------

View File

@ -0,0 +1,10 @@
create table t1 (a int) engine=archive;
insert into t1 values (1);
select * from t1;
Got one of the listed errors
insert into t1 values (2);
ERROR HY000: Table 't1' is marked as crashed and should be repaired
repair table t1;
Table Op Msg_type Msg_text
test.t1 repair error Corrupt
drop table t1;

View File

@ -0,0 +1,17 @@
#
# MDEV-4444 Server crashes with "safe_mutex: Trying to destroy a mutex share->mutex that was locked" on attempt to recover an archive table
#
--source include/have_archive.inc
--let $datadir = `SELECT @@datadir`
create table t1 (a int) engine=archive;
insert into t1 values (1);
--remove_file $datadir/test/t1.ARZ
--error 13,1017
select * from t1;
--error ER_CRASHED_ON_USAGE
insert into t1 values (2);
repair table t1;
drop table t1;

View File

@ -447,6 +447,7 @@ BEGIN
### DELETE FROM `test1`.`t1`
### WHERE
### @1=3 /* INT meta=0 nullable=1 is_null=0 */
'/*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
@ -1111,6 +1112,7 @@ BEGIN
### DELETE FROM `test1`.`t1`
### WHERE
### @1=3 /* INT meta=0 nullable=1 is_null=0 */
'/*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;

View File

@ -7,6 +7,12 @@ Level Code Message
Error 1 server name: 'non_existing' doesn't exist!
Error 1 Can't create/write to file 'non_existing' (Errcode: 14 "Bad address")
Error 1005 Can't create table `test`.`t1` (errno: 1 "Operation not permitted")
create table t1 (a int);
create table fed (a int) engine=Federated CONNECTION='mysql://root@127.0.0.1:MASTER_PORT/test/t1';
drop table t1;
select * from fed;
Got one of the listed errors
drop table fed;
DROP TABLE IF EXISTS federated.t1;
DROP DATABASE IF EXISTS federated;
DROP TABLE IF EXISTS federated.t1;

View File

@ -8,5 +8,17 @@ connection master;
CREATE TABLE t1 (a INT) ENGINE=FEDERATED CONNECTION='non_existing';
SHOW WARNINGS;
#
# MDEV-4468 Assertion `error != 0' fails or timeout occurs on select from a FEDERATED table which points at a non-existent table
#
create table t1 (a int);
--replace_result $MASTER_MYPORT MASTER_PORT
eval create table fed (a int) engine=Federated CONNECTION='mysql://root@127.0.0.1:$MASTER_MYPORT/test/t1';
drop table t1;
--error 1146,1431
select * from fed;
drop table fed;
source include/federated_cleanup.inc;

View File

@ -88,7 +88,7 @@ def information_schema EVENTS CHARACTER_SET_CLIENT 22 NO varchar 32 96 NULL NUL
def information_schema EVENTS COLLATION_CONNECTION 23 NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select
def information_schema EVENTS CREATED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL 0 NULL NULL datetime select
def information_schema EVENTS DATABASE_COLLATION 24 NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select
def information_schema EVENTS DEFINER 4 NO varchar 77 231 NULL NULL NULL utf8 utf8_general_ci varchar(77) select
def information_schema EVENTS DEFINER 4 NO varchar 189 567 NULL NULL NULL utf8 utf8_general_ci varchar(189) select
def information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select
def information_schema EVENTS EVENT_BODY 6 NO varchar 8 24 NULL NULL NULL utf8 utf8_general_ci varchar(8) select
def information_schema EVENTS EVENT_CATALOG 1 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select
@ -267,7 +267,7 @@ def information_schema ROUTINES CREATED 24 0000-00-00 00:00:00 NO datetime NULL
def information_schema ROUTINES DATABASE_COLLATION 31 NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select
def information_schema ROUTINES DATA_TYPE 6 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select
def information_schema ROUTINES DATETIME_PRECISION 11 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select
def information_schema ROUTINES DEFINER 28 NO varchar 77 231 NULL NULL NULL utf8 utf8_general_ci varchar(77) select
def information_schema ROUTINES DEFINER 28 NO varchar 189 567 NULL NULL NULL utf8 utf8_general_ci varchar(189) select
def information_schema ROUTINES DTD_IDENTIFIER 14 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select
def information_schema ROUTINES EXTERNAL_LANGUAGE 18 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select
def information_schema ROUTINES EXTERNAL_NAME 17 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select
@ -378,7 +378,7 @@ def information_schema TRIGGERS CHARACTER_SET_CLIENT 20 NO varchar 32 96 NULL N
def information_schema TRIGGERS COLLATION_CONNECTION 21 NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select
def information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select
def information_schema TRIGGERS DATABASE_COLLATION 22 NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select
def information_schema TRIGGERS DEFINER 19 NO varchar 77 231 NULL NULL NULL utf8 utf8_general_ci varchar(77) select
def information_schema TRIGGERS DEFINER 19 NO varchar 189 567 NULL NULL NULL utf8 utf8_general_ci varchar(189) select
def information_schema TRIGGERS EVENT_MANIPULATION 4 NO varchar 6 18 NULL NULL NULL utf8 utf8_general_ci varchar(6) select
def information_schema TRIGGERS EVENT_OBJECT_CATALOG 5 NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select
def information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select
@ -417,7 +417,7 @@ def information_schema USER_STATISTICS USER 1 NO varchar 128 384 NULL NULL NULL
def information_schema VIEWS CHARACTER_SET_CLIENT 9 NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select
def information_schema VIEWS CHECK_OPTION 5 NO varchar 8 24 NULL NULL NULL utf8 utf8_general_ci varchar(8) select
def information_schema VIEWS COLLATION_CONNECTION 10 NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select
def information_schema VIEWS DEFINER 7 NO varchar 77 231 NULL NULL NULL utf8 utf8_general_ci varchar(77) select
def information_schema VIEWS DEFINER 7 NO varchar 189 567 NULL NULL NULL utf8 utf8_general_ci varchar(189) select
def information_schema VIEWS IS_UPDATABLE 6 NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select
def information_schema VIEWS SECURITY_TYPE 8 NO varchar 7 21 NULL NULL NULL utf8 utf8_general_ci varchar(7) select
def information_schema VIEWS TABLE_CATALOG 1 NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select
@ -570,7 +570,7 @@ NULL information_schema COLUMNS DATETIME_PRECISION bigint NULL NULL NULL NULL bi
3.0000 information_schema EVENTS EVENT_CATALOG varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema EVENTS EVENT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema EVENTS EVENT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema EVENTS DEFINER varchar 77 231 utf8 utf8_general_ci varchar(77)
3.0000 information_schema EVENTS DEFINER varchar 189 567 utf8 utf8_general_ci varchar(189)
3.0000 information_schema EVENTS TIME_ZONE varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema EVENTS EVENT_BODY varchar 8 24 utf8 utf8_general_ci varchar(8)
1.0000 information_schema EVENTS EVENT_DEFINITION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
@ -767,7 +767,7 @@ NULL information_schema ROUTINES CREATED datetime NULL NULL NULL NULL datetime
NULL information_schema ROUTINES LAST_ALTERED datetime NULL NULL NULL NULL datetime
3.0000 information_schema ROUTINES SQL_MODE varchar 8192 24576 utf8 utf8_general_ci varchar(8192)
1.0000 information_schema ROUTINES ROUTINE_COMMENT longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
3.0000 information_schema ROUTINES DEFINER varchar 77 231 utf8 utf8_general_ci varchar(77)
3.0000 information_schema ROUTINES DEFINER varchar 189 567 utf8 utf8_general_ci varchar(189)
3.0000 information_schema ROUTINES CHARACTER_SET_CLIENT varchar 32 96 utf8 utf8_general_ci varchar(32)
3.0000 information_schema ROUTINES COLLATION_CONNECTION varchar 32 96 utf8 utf8_general_ci varchar(32)
3.0000 information_schema ROUTINES DATABASE_COLLATION varchar 32 96 utf8 utf8_general_ci varchar(32)
@ -866,7 +866,7 @@ NULL information_schema TRIGGERS ACTION_ORDER bigint NULL NULL NULL NULL bigint(
3.0000 information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW varchar 3 9 utf8 utf8_general_ci varchar(3)
NULL information_schema TRIGGERS CREATED datetime NULL NULL NULL NULL datetime
3.0000 information_schema TRIGGERS SQL_MODE varchar 8192 24576 utf8 utf8_general_ci varchar(8192)
3.0000 information_schema TRIGGERS DEFINER varchar 77 231 utf8 utf8_general_ci varchar(77)
3.0000 information_schema TRIGGERS DEFINER varchar 189 567 utf8 utf8_general_ci varchar(189)
3.0000 information_schema TRIGGERS CHARACTER_SET_CLIENT varchar 32 96 utf8 utf8_general_ci varchar(32)
3.0000 information_schema TRIGGERS COLLATION_CONNECTION varchar 32 96 utf8 utf8_general_ci varchar(32)
3.0000 information_schema TRIGGERS DATABASE_COLLATION varchar 32 96 utf8 utf8_general_ci varchar(32)
@ -903,7 +903,7 @@ NULL information_schema USER_STATISTICS EMPTY_QUERIES bigint NULL NULL NULL NULL
1.0000 information_schema VIEWS VIEW_DEFINITION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
3.0000 information_schema VIEWS CHECK_OPTION varchar 8 24 utf8 utf8_general_ci varchar(8)
3.0000 information_schema VIEWS IS_UPDATABLE varchar 3 9 utf8 utf8_general_ci varchar(3)
3.0000 information_schema VIEWS DEFINER varchar 77 231 utf8 utf8_general_ci varchar(77)
3.0000 information_schema VIEWS DEFINER varchar 189 567 utf8 utf8_general_ci varchar(189)
3.0000 information_schema VIEWS SECURITY_TYPE varchar 7 21 utf8 utf8_general_ci varchar(7)
3.0000 information_schema VIEWS CHARACTER_SET_CLIENT varchar 32 96 utf8 utf8_general_ci varchar(32)
3.0000 information_schema VIEWS COLLATION_CONNECTION varchar 32 96 utf8 utf8_general_ci varchar(32)

View File

@ -89,7 +89,7 @@ def information_schema EVENTS CHARACTER_SET_CLIENT 22 NO varchar 32 96 NULL NUL
def information_schema EVENTS COLLATION_CONNECTION 23 NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32)
def information_schema EVENTS CREATED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL 0 NULL NULL datetime
def information_schema EVENTS DATABASE_COLLATION 24 NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32)
def information_schema EVENTS DEFINER 4 NO varchar 77 231 NULL NULL NULL utf8 utf8_general_ci varchar(77)
def information_schema EVENTS DEFINER 4 NO varchar 189 567 NULL NULL NULL utf8 utf8_general_ci varchar(189)
def information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime
def information_schema EVENTS EVENT_BODY 6 NO varchar 8 24 NULL NULL NULL utf8 utf8_general_ci varchar(8)
def information_schema EVENTS EVENT_CATALOG 1 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
@ -268,7 +268,7 @@ def information_schema ROUTINES CREATED 24 0000-00-00 00:00:00 NO datetime NULL
def information_schema ROUTINES DATABASE_COLLATION 31 NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32)
def information_schema ROUTINES DATA_TYPE 6 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
def information_schema ROUTINES DATETIME_PRECISION 11 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
def information_schema ROUTINES DEFINER 28 NO varchar 77 231 NULL NULL NULL utf8 utf8_general_ci varchar(77)
def information_schema ROUTINES DEFINER 28 NO varchar 189 567 NULL NULL NULL utf8 utf8_general_ci varchar(189)
def information_schema ROUTINES DTD_IDENTIFIER 14 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext
def information_schema ROUTINES EXTERNAL_LANGUAGE 18 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
def information_schema ROUTINES EXTERNAL_NAME 17 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
@ -379,7 +379,7 @@ def information_schema TRIGGERS CHARACTER_SET_CLIENT 20 NO varchar 32 96 NULL N
def information_schema TRIGGERS COLLATION_CONNECTION 21 NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32)
def information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime
def information_schema TRIGGERS DATABASE_COLLATION 22 NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32)
def information_schema TRIGGERS DEFINER 19 NO varchar 77 231 NULL NULL NULL utf8 utf8_general_ci varchar(77)
def information_schema TRIGGERS DEFINER 19 NO varchar 189 567 NULL NULL NULL utf8 utf8_general_ci varchar(189)
def information_schema TRIGGERS EVENT_MANIPULATION 4 NO varchar 6 18 NULL NULL NULL utf8 utf8_general_ci varchar(6)
def information_schema TRIGGERS EVENT_OBJECT_CATALOG 5 NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512)
def information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
@ -418,7 +418,7 @@ def information_schema USER_STATISTICS USER 1 NO varchar 128 384 NULL NULL NULL
def information_schema VIEWS CHARACTER_SET_CLIENT 9 NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32)
def information_schema VIEWS CHECK_OPTION 5 NO varchar 8 24 NULL NULL NULL utf8 utf8_general_ci varchar(8)
def information_schema VIEWS COLLATION_CONNECTION 10 NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32)
def information_schema VIEWS DEFINER 7 NO varchar 77 231 NULL NULL NULL utf8 utf8_general_ci varchar(77)
def information_schema VIEWS DEFINER 7 NO varchar 189 567 NULL NULL NULL utf8 utf8_general_ci varchar(189)
def information_schema VIEWS IS_UPDATABLE 6 NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3)
def information_schema VIEWS SECURITY_TYPE 8 NO varchar 7 21 NULL NULL NULL utf8 utf8_general_ci varchar(7)
def information_schema VIEWS TABLE_CATALOG 1 NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512)
@ -575,7 +575,7 @@ NULL information_schema COLUMNS DATETIME_PRECISION bigint NULL NULL NULL NULL bi
3.0000 information_schema EVENTS EVENT_CATALOG varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema EVENTS EVENT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema EVENTS EVENT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema EVENTS DEFINER varchar 77 231 utf8 utf8_general_ci varchar(77)
3.0000 information_schema EVENTS DEFINER varchar 189 567 utf8 utf8_general_ci varchar(189)
3.0000 information_schema EVENTS TIME_ZONE varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema EVENTS EVENT_BODY varchar 8 24 utf8 utf8_general_ci varchar(8)
1.0000 information_schema EVENTS EVENT_DEFINITION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
@ -772,7 +772,7 @@ NULL information_schema ROUTINES CREATED datetime NULL NULL NULL NULL datetime
NULL information_schema ROUTINES LAST_ALTERED datetime NULL NULL NULL NULL datetime
3.0000 information_schema ROUTINES SQL_MODE varchar 8192 24576 utf8 utf8_general_ci varchar(8192)
1.0000 information_schema ROUTINES ROUTINE_COMMENT longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
3.0000 information_schema ROUTINES DEFINER varchar 77 231 utf8 utf8_general_ci varchar(77)
3.0000 information_schema ROUTINES DEFINER varchar 189 567 utf8 utf8_general_ci varchar(189)
3.0000 information_schema ROUTINES CHARACTER_SET_CLIENT varchar 32 96 utf8 utf8_general_ci varchar(32)
3.0000 information_schema ROUTINES COLLATION_CONNECTION varchar 32 96 utf8 utf8_general_ci varchar(32)
3.0000 information_schema ROUTINES DATABASE_COLLATION varchar 32 96 utf8 utf8_general_ci varchar(32)
@ -871,7 +871,7 @@ NULL information_schema TRIGGERS ACTION_ORDER bigint NULL NULL NULL NULL bigint(
3.0000 information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW varchar 3 9 utf8 utf8_general_ci varchar(3)
NULL information_schema TRIGGERS CREATED datetime NULL NULL NULL NULL datetime
3.0000 information_schema TRIGGERS SQL_MODE varchar 8192 24576 utf8 utf8_general_ci varchar(8192)
3.0000 information_schema TRIGGERS DEFINER varchar 77 231 utf8 utf8_general_ci varchar(77)
3.0000 information_schema TRIGGERS DEFINER varchar 189 567 utf8 utf8_general_ci varchar(189)
3.0000 information_schema TRIGGERS CHARACTER_SET_CLIENT varchar 32 96 utf8 utf8_general_ci varchar(32)
3.0000 information_schema TRIGGERS COLLATION_CONNECTION varchar 32 96 utf8 utf8_general_ci varchar(32)
3.0000 information_schema TRIGGERS DATABASE_COLLATION varchar 32 96 utf8 utf8_general_ci varchar(32)
@ -908,7 +908,7 @@ NULL information_schema USER_STATISTICS EMPTY_QUERIES bigint NULL NULL NULL NULL
1.0000 information_schema VIEWS VIEW_DEFINITION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
3.0000 information_schema VIEWS CHECK_OPTION varchar 8 24 utf8 utf8_general_ci varchar(8)
3.0000 information_schema VIEWS IS_UPDATABLE varchar 3 9 utf8 utf8_general_ci varchar(3)
3.0000 information_schema VIEWS DEFINER varchar 77 231 utf8 utf8_general_ci varchar(77)
3.0000 information_schema VIEWS DEFINER varchar 189 567 utf8 utf8_general_ci varchar(189)
3.0000 information_schema VIEWS SECURITY_TYPE varchar 7 21 utf8 utf8_general_ci varchar(7)
3.0000 information_schema VIEWS CHARACTER_SET_CLIENT varchar 32 96 utf8 utf8_general_ci varchar(32)
3.0000 information_schema VIEWS COLLATION_CONNECTION varchar 32 96 utf8 utf8_general_ci varchar(32)

View File

@ -81,7 +81,7 @@ def mysql gtid_slave_pos sub_id 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL b
def mysql help_category help_category_id 1 NULL NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5) unsigned PRI select,insert,update,references
def mysql help_category name 2 NULL NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) UNI select,insert,update,references
def mysql help_category parent_category_id 3 NULL YES smallint NULL NULL 5 0 NULL NULL NULL smallint(5) unsigned select,insert,update,references
def mysql help_category url 4 NULL NO char 128 384 NULL NULL NULL utf8 utf8_general_ci char(128) select,insert,update,references
def mysql help_category url 4 NULL NO text 65535 65535 NULL NULL NULL utf8 utf8_general_ci text select,insert,update,references
def mysql help_keyword help_keyword_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI select,insert,update,references
def mysql help_keyword name 2 NULL NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) UNI select,insert,update,references
def mysql help_relation help_keyword_id 2 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI select,insert,update,references
@ -91,7 +91,7 @@ def mysql help_topic example 5 NULL NO text 65535 65535 NULL NULL NULL utf8 utf8
def mysql help_topic help_category_id 3 NULL NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5) unsigned select,insert,update,references
def mysql help_topic help_topic_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI select,insert,update,references
def mysql help_topic name 2 NULL NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) UNI select,insert,update,references
def mysql help_topic url 6 NULL NO char 128 384 NULL NULL NULL utf8 utf8_general_ci char(128) select,insert,update,references
def mysql help_topic url 6 NULL NO text 65535 65535 NULL NULL NULL utf8 utf8_general_ci text select,insert,update,references
def mysql host Alter_priv 12 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
def mysql host Alter_routine_priv 18 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
def mysql host Create_priv 7 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
@ -400,7 +400,7 @@ NULL mysql gtid_slave_pos seq_no bigint NULL NULL NULL NULL bigint(20) unsigned
NULL mysql help_category help_category_id smallint NULL NULL NULL NULL smallint(5) unsigned
3.0000 mysql help_category name char 64 192 utf8 utf8_general_ci char(64)
NULL mysql help_category parent_category_id smallint NULL NULL NULL NULL smallint(5) unsigned
3.0000 mysql help_category url char 128 384 utf8 utf8_general_ci char(128)
1.0000 mysql help_category url text 65535 65535 utf8 utf8_general_ci text
NULL mysql help_keyword help_keyword_id int NULL NULL NULL NULL int(10) unsigned
3.0000 mysql help_keyword name char 64 192 utf8 utf8_general_ci char(64)
NULL mysql help_relation help_topic_id int NULL NULL NULL NULL int(10) unsigned
@ -410,7 +410,7 @@ NULL mysql help_topic help_topic_id int NULL NULL NULL NULL int(10) unsigned
NULL mysql help_topic help_category_id smallint NULL NULL NULL NULL smallint(5) unsigned
1.0000 mysql help_topic description text 65535 65535 utf8 utf8_general_ci text
1.0000 mysql help_topic example text 65535 65535 utf8 utf8_general_ci text
3.0000 mysql help_topic url char 128 384 utf8 utf8_general_ci char(128)
1.0000 mysql help_topic url text 65535 65535 utf8 utf8_general_ci text
3.0000 mysql host Host char 60 180 utf8 utf8_bin char(60)
3.0000 mysql host Db char 64 192 utf8 utf8_bin char(64)
3.0000 mysql host Select_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')

View File

@ -81,7 +81,7 @@ def mysql gtid_slave_pos sub_id 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL b
def mysql help_category help_category_id 1 NULL NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5) unsigned PRI
def mysql help_category name 2 NULL NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) UNI
def mysql help_category parent_category_id 3 NULL YES smallint NULL NULL 5 0 NULL NULL NULL smallint(5) unsigned
def mysql help_category url 4 NULL NO char 128 384 NULL NULL NULL utf8 utf8_general_ci char(128)
def mysql help_category url 4 NULL NO text 65535 65535 NULL NULL NULL utf8 utf8_general_ci text
def mysql help_keyword help_keyword_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI
def mysql help_keyword name 2 NULL NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) UNI
def mysql help_relation help_keyword_id 2 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI
@ -91,7 +91,7 @@ def mysql help_topic example 5 NULL NO text 65535 65535 NULL NULL NULL utf8 utf8
def mysql help_topic help_category_id 3 NULL NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5) unsigned
def mysql help_topic help_topic_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI
def mysql help_topic name 2 NULL NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) UNI
def mysql help_topic url 6 NULL NO char 128 384 NULL NULL NULL utf8 utf8_general_ci char(128)
def mysql help_topic url 6 NULL NO text 65535 65535 NULL NULL NULL utf8 utf8_general_ci text
def mysql host Alter_priv 12 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y')
def mysql host Alter_routine_priv 18 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y')
def mysql host Create_priv 7 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y')
@ -400,7 +400,7 @@ NULL mysql gtid_slave_pos seq_no bigint NULL NULL NULL NULL bigint(20) unsigned
NULL mysql help_category help_category_id smallint NULL NULL NULL NULL smallint(5) unsigned
3.0000 mysql help_category name char 64 192 utf8 utf8_general_ci char(64)
NULL mysql help_category parent_category_id smallint NULL NULL NULL NULL smallint(5) unsigned
3.0000 mysql help_category url char 128 384 utf8 utf8_general_ci char(128)
1.0000 mysql help_category url text 65535 65535 utf8 utf8_general_ci text
NULL mysql help_keyword help_keyword_id int NULL NULL NULL NULL int(10) unsigned
3.0000 mysql help_keyword name char 64 192 utf8 utf8_general_ci char(64)
NULL mysql help_relation help_topic_id int NULL NULL NULL NULL int(10) unsigned
@ -410,7 +410,7 @@ NULL mysql help_topic help_topic_id int NULL NULL NULL NULL int(10) unsigned
NULL mysql help_topic help_category_id smallint NULL NULL NULL NULL smallint(5) unsigned
1.0000 mysql help_topic description text 65535 65535 utf8 utf8_general_ci text
1.0000 mysql help_topic example text 65535 65535 utf8 utf8_general_ci text
3.0000 mysql help_topic url char 128 384 utf8 utf8_general_ci char(128)
1.0000 mysql help_topic url text 65535 65535 utf8 utf8_general_ci text
3.0000 mysql host Host char 60 180 utf8 utf8_bin char(60)
3.0000 mysql host Db char 64 192 utf8 utf8_bin char(64)
3.0000 mysql host Select_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')

View File

@ -31,7 +31,7 @@ Field Type Null Key Default Extra
EVENT_CATALOG varchar(64) NO
EVENT_SCHEMA varchar(64) NO
EVENT_NAME varchar(64) NO
DEFINER varchar(77) NO
DEFINER varchar(189) NO
TIME_ZONE varchar(64) NO
EVENT_BODY varchar(8) NO
EVENT_DEFINITION longtext NO NULL
@ -58,7 +58,7 @@ EVENTS CREATE TEMPORARY TABLE `EVENTS` (
`EVENT_CATALOG` varchar(64) NOT NULL DEFAULT '',
`EVENT_SCHEMA` varchar(64) NOT NULL DEFAULT '',
`EVENT_NAME` varchar(64) NOT NULL DEFAULT '',
`DEFINER` varchar(77) NOT NULL DEFAULT '',
`DEFINER` varchar(189) NOT NULL DEFAULT '',
`TIME_ZONE` varchar(64) NOT NULL DEFAULT '',
`EVENT_BODY` varchar(8) NOT NULL DEFAULT '',
`EVENT_DEFINITION` longtext NOT NULL,
@ -85,7 +85,7 @@ Field Type Null Key Default Extra
EVENT_CATALOG varchar(64) NO
EVENT_SCHEMA varchar(64) NO
EVENT_NAME varchar(64) NO
DEFINER varchar(77) NO
DEFINER varchar(189) NO
TIME_ZONE varchar(64) NO
EVENT_BODY varchar(8) NO
EVENT_DEFINITION longtext NO NULL

View File

@ -55,7 +55,7 @@ CREATED datetime NO 0000-00-00 00:00:00
LAST_ALTERED datetime NO 0000-00-00 00:00:00
SQL_MODE varchar(8192) NO
ROUTINE_COMMENT longtext NO NULL
DEFINER varchar(77) NO
DEFINER varchar(189) NO
CHARACTER_SET_CLIENT varchar(32) NO
COLLATION_CONNECTION varchar(32) NO
DATABASE_COLLATION varchar(32) NO
@ -89,7 +89,7 @@ ROUTINES CREATE TEMPORARY TABLE `ROUTINES` (
`LAST_ALTERED` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`SQL_MODE` varchar(8192) NOT NULL DEFAULT '',
`ROUTINE_COMMENT` longtext NOT NULL,
`DEFINER` varchar(77) NOT NULL DEFAULT '',
`DEFINER` varchar(189) NOT NULL DEFAULT '',
`CHARACTER_SET_CLIENT` varchar(32) NOT NULL DEFAULT '',
`COLLATION_CONNECTION` varchar(32) NOT NULL DEFAULT '',
`DATABASE_COLLATION` varchar(32) NOT NULL DEFAULT ''
@ -123,7 +123,7 @@ CREATED datetime NO 0000-00-00 00:00:00
LAST_ALTERED datetime NO 0000-00-00 00:00:00
SQL_MODE varchar(8192) NO
ROUTINE_COMMENT longtext NO NULL
DEFINER varchar(77) NO
DEFINER varchar(189) NO
CHARACTER_SET_CLIENT varchar(32) NO
COLLATION_CONNECTION varchar(32) NO
DATABASE_COLLATION varchar(32) NO

View File

@ -179,7 +179,7 @@ TABLE_NAME help_category
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
ROW_FORMAT Fixed
ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#

View File

@ -179,7 +179,7 @@ TABLE_NAME help_category
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
ROW_FORMAT Fixed
ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@ -839,7 +839,7 @@ TABLE_NAME help_category
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
ROW_FORMAT Fixed
ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#

View File

@ -46,7 +46,7 @@ ACTION_REFERENCE_OLD_ROW varchar(3) NO
ACTION_REFERENCE_NEW_ROW varchar(3) NO
CREATED datetime YES NULL
SQL_MODE varchar(8192) NO
DEFINER varchar(77) NO
DEFINER varchar(189) NO
CHARACTER_SET_CLIENT varchar(32) NO
COLLATION_CONNECTION varchar(32) NO
DATABASE_COLLATION varchar(32) NO
@ -71,7 +71,7 @@ TRIGGERS CREATE TEMPORARY TABLE `TRIGGERS` (
`ACTION_REFERENCE_NEW_ROW` varchar(3) NOT NULL DEFAULT '',
`CREATED` datetime DEFAULT NULL,
`SQL_MODE` varchar(8192) NOT NULL DEFAULT '',
`DEFINER` varchar(77) NOT NULL DEFAULT '',
`DEFINER` varchar(189) NOT NULL DEFAULT '',
`CHARACTER_SET_CLIENT` varchar(32) NOT NULL DEFAULT '',
`COLLATION_CONNECTION` varchar(32) NOT NULL DEFAULT '',
`DATABASE_COLLATION` varchar(32) NOT NULL DEFAULT ''
@ -96,7 +96,7 @@ ACTION_REFERENCE_OLD_ROW varchar(3) NO
ACTION_REFERENCE_NEW_ROW varchar(3) NO
CREATED datetime YES NULL
SQL_MODE varchar(8192) NO
DEFINER varchar(77) NO
DEFINER varchar(189) NO
CHARACTER_SET_CLIENT varchar(32) NO
COLLATION_CONNECTION varchar(32) NO
DATABASE_COLLATION varchar(32) NO

View File

@ -34,7 +34,7 @@ TABLE_NAME varchar(64) NO
VIEW_DEFINITION longtext NO NULL
CHECK_OPTION varchar(8) NO
IS_UPDATABLE varchar(3) NO
DEFINER varchar(77) NO
DEFINER varchar(189) NO
SECURITY_TYPE varchar(7) NO
CHARACTER_SET_CLIENT varchar(32) NO
COLLATION_CONNECTION varchar(32) NO
@ -47,7 +47,7 @@ VIEWS CREATE TEMPORARY TABLE `VIEWS` (
`VIEW_DEFINITION` longtext NOT NULL,
`CHECK_OPTION` varchar(8) NOT NULL DEFAULT '',
`IS_UPDATABLE` varchar(3) NOT NULL DEFAULT '',
`DEFINER` varchar(77) NOT NULL DEFAULT '',
`DEFINER` varchar(189) NOT NULL DEFAULT '',
`SECURITY_TYPE` varchar(7) NOT NULL DEFAULT '',
`CHARACTER_SET_CLIENT` varchar(32) NOT NULL DEFAULT '',
`COLLATION_CONNECTION` varchar(32) NOT NULL DEFAULT ''
@ -60,7 +60,7 @@ TABLE_NAME varchar(64) NO
VIEW_DEFINITION longtext NO NULL
CHECK_OPTION varchar(8) NO
IS_UPDATABLE varchar(3) NO
DEFINER varchar(77) NO
DEFINER varchar(189) NO
SECURITY_TYPE varchar(7) NO
CHARACTER_SET_CLIENT varchar(32) NO
COLLATION_CONNECTION varchar(32) NO

View File

@ -0,0 +1,5 @@
create temporary table t1 as select 1;
handler t1 open;
handler t1 read next;
1
1

View File

@ -0,0 +1,10 @@
#
# MDEV-4480 Assertion `inited == NONE' fails on closing a connection with open handler on temporary table
#
--connect (con1,localhost,root,,)
create temporary table t1 as select 1;
handler t1 open;
handler t1 read next;
--disconnect con1

View File

@ -213,7 +213,7 @@ c-1006=w
EXPLAIN
SELECT c1 FROM t3 WHERE c1 >= 'c-1004=w' and c1 <= 'c-1006=w' and i1 > 2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 range c1 c1 12 NULL 2 Using index condition; Using where
1 SIMPLE t3 range c1 c1 12 NULL 2 Using where
SELECT c1 FROM t3 WHERE c1 >= 'c-1004=w' and c1 <= 'c-1006=w' and i1 > 2;
c1
EXPLAIN
@ -857,5 +857,32 @@ insert into t1 values ('',1);
select 1 from t1 where b <= 1 and a <> '';
1
drop table t1;
#
# MDEV-4778: Incorrect results from Aria/MyISAM SELECT using index with prefix length on TEXT column
#
CREATE TABLE t1 (
c1 TEXT ,
c2 VARCHAR(2) ,
INDEX idx1 (c2,c1(2)),
INDEX idx2 (c2,c1(1))
);
INSERT INTO t1 (c1,c2) VALUES ('aa','x'), ('a' ,'y');
SELECT * FROM t1 IGNORE INDEX(idx1,idx2) WHERE (c1='aa' AND c2='x') OR (c1='a' AND c2='y');
c1 c2
aa x
a y
EXPLAIN
SELECT * FROM t1 FORCE INDEX(idx1) WHERE (c1='aa' AND c2='x') OR (c1='a' AND c2='y');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range idx1 idx1 10 NULL 2 Using where
SELECT * FROM t1 FORCE INDEX(idx1) WHERE (c1='aa' AND c2='x') OR (c1='a' AND c2='y');
c1 c2
aa x
a y
SELECT * FROM t1 FORCE INDEX(idx2) WHERE (c1='aa' AND c2='x') OR (c1='a' AND c2='y');
c1 c2
aa x
a y
DROP TABLE t1;
set storage_engine= @save_storage_engine;
set optimizer_switch=@maria_icp_tmp;

View File

@ -312,7 +312,7 @@ aria_log_file_size 4294959104
aria_log_purge_type immediate
aria_max_sort_file_size 9223372036853727232
aria_pagecache_age_threshold 300
aria_pagecache_buffer_size 134217728
aria_pagecache_buffer_size 8388608
aria_pagecache_division_limit 100
aria_page_checksum OFF
aria_recover NORMAL

View File

@ -44,6 +44,7 @@ insert t2 values ('2020-10-09');
select * from t2;
a
2020-10-09
alter table t2 add column b int;
drop table t2;
explain select distinct * from t2;
id select_type table type possible_keys key key_len ref rows Extra
@ -80,8 +81,8 @@ root[root] @ localhost [] mysql.table_stats : write
root[root] @ localhost [] mysql.column_stats : write
root[root] @ localhost [] mysql.index_stats : write
root[root] @ localhost [] >> alter table t2 add column b int
root[root] @ localhost [] test.t2 : alter
root[root] @ localhost [] test.t2 : read
root[root] @ localhost [] test.t2 : alter
root[root] @ localhost [] >> create definer=testuser@localhost view v1 as select t2.a+1, t2_copy.a+2 from t2, t2 as t2_copy
root[root] @ localhost [] test.t2 : read
root[root] @ localhost [] test.t2 : read
@ -92,6 +93,7 @@ root[root] @ localhost [] >> drop view v1
root[root] @ localhost [] >> create temporary table t2 (a date)
root[root] @ localhost [] >> insert t2 values ('2020-10-09')
root[root] @ localhost [] >> select * from t2
root[root] @ localhost [] >> alter table t2 add column b int
root[root] @ localhost [] >> drop table t2
root[root] @ localhost [] >> explain select distinct * from t2
root[root] @ localhost [] test.t2 : read

View File

@ -3,3 +3,5 @@ CREATE TABLE t1(a TEXT, b TEXT, FULLTEXT(a) WITH PARSER simple_parser);
ALTER TABLE t1 ADD FULLTEXT(b) WITH PARSER simple_parser;
DROP TABLE t1;
UNINSTALL PLUGIN simple_parser;
show status like 'a%status';
Variable_name Value

View File

@ -0,0 +1,10 @@
install plugin pam soname 'auth_pam.so';
create user test_pam identified via pam using 'mariadb_mtr';
create user pam_test;
grant proxy on pam_test to test_pam;
show variables like 'pam%';
Variable_name Value
pam_use_cleartext_plugin ON
drop user test_pam;
drop user pam_test;
uninstall plugin pam;

View File

@ -38,6 +38,7 @@ drop view v1;
create temporary table t2 (a date);
insert t2 values ('2020-10-09');
select * from t2;
alter table t2 add column b int; # MDEV-4565 ALTER on a temporary table generates an audit event
drop table t2;
# internal temp table generates no audit events

View File

@ -9,3 +9,9 @@ CREATE TABLE t1(a TEXT, b TEXT, FULLTEXT(a) WITH PARSER simple_parser);
ALTER TABLE t1 ADD FULLTEXT(b) WITH PARSER simple_parser;
DROP TABLE t1;
UNINSTALL PLUGIN simple_parser;
#
# Bug #69682 - mysqld crashes after uninstall of plugin with "first" status var
#
show status like 'a%status';

View File

@ -1,16 +1,5 @@
--source include/not_embedded.inc
if (!$AUTH_PAM_SO) {
skip No pam auth plugin;
}
eval install plugin pam soname '$AUTH_PAM_SO';
create user test_pam identified via pam using 'mariadb_mtr';
create user pam_test;
grant proxy on pam_test to test_pam;
let $plugindir=`SELECT @@global.plugin_dir`;
--source pam_init.inc
--write_file $MYSQLTEST_VARDIR/tmp/pam_good.txt
not very secret challenge

View File

@ -0,0 +1 @@
--loose-pam-use-cleartext-plugin

View File

@ -0,0 +1,12 @@
--source pam_init.inc
show variables like 'pam%';
--error 1
--exec echo FAIL | $MYSQL_TEST -u test_pam --plugin-dir=$plugindir
drop user test_pam;
drop user pam_test;
uninstall plugin pam;

View File

@ -0,0 +1,14 @@
--source include/not_embedded.inc
if (!$AUTH_PAM_SO) {
skip No pam auth plugin;
}
eval install plugin pam soname '$AUTH_PAM_SO';
create user test_pam identified via pam using 'mariadb_mtr';
create user pam_test;
grant proxy on pam_test to test_pam;
let $plugindir=`SELECT @@global.plugin_dir`;

View File

@ -33,5 +33,5 @@ SELECT COUNT(*) FROM mysqltest.t1;
COUNT(*)
2
DROP DATABASE mysqltest;
DROP TABLE test.t1;
DROP TABLE IF EXISTS test.t1;
include/rpl_end.inc

View File

@ -313,7 +313,7 @@ CREATE TABLE `t``1` ( `a``` INT PRIMARY KEY) ENGINE=innodb;
CREATE TABLE `t``2` ( `b``` INT PRIMARY KEY, `c``` INT NOT NULL,
FOREIGN KEY fk (`c```) REFERENCES `t``1`(`a```)) ENGINE=innodb;
TRUNCATE `t``1`;
ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`db1``; select 'oops!'`.`t``2`, CONSTRAINT `INNODB_FOREIGN_KEY_NAME` FOREIGN KEY (`c```) REFERENCES `db1``; select 'oops!'`.`t``1` (`a```))
ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`db1``; select 'oops!'`.`t``2`, CONSTRAINT `t``2_ibfk_1` FOREIGN KEY (`c```) REFERENCES `db1``; select 'oops!'`.`t``1` (`a```))
DROP TABLE `t``2`;
DROP TABLE `t``1`;
*** Test correct quoting of DELETE FROM statement binlogged for HEAP table that is emptied due to server restart

View File

@ -44,7 +44,7 @@ SELECT COUNT(*) FROM mysqltest.t1;
# Cleanup
connection master;
DROP DATABASE mysqltest;
DROP TABLE test.t1;
DROP TABLE IF EXISTS test.t1;
sync_slave_with_master;
# End of test

View File

@ -182,7 +182,6 @@ use `db1``; select 'oops!'`;
CREATE TABLE `t``1` ( `a``` INT PRIMARY KEY) ENGINE=innodb;
CREATE TABLE `t``2` ( `b``` INT PRIMARY KEY, `c``` INT NOT NULL,
FOREIGN KEY fk (`c```) REFERENCES `t``1`(`a```)) ENGINE=innodb;
--replace_regex /t@[0-9]+_ibfk_[0-9]+/INNODB_FOREIGN_KEY_NAME/
--error ER_TRUNCATE_ILLEGAL_FK
TRUNCATE `t``1`;
DROP TABLE `t``2`;

View File

@ -1,20 +1,20 @@
select @@global.aria_pagecache_buffer_size;
@@global.aria_pagecache_buffer_size
134217728
8388608
select @@session.aria_pagecache_buffer_size;
ERROR HY000: Variable 'aria_pagecache_buffer_size' is a GLOBAL variable
show global variables like 'aria_pagecache_buffer_size';
Variable_name Value
aria_pagecache_buffer_size 134217728
aria_pagecache_buffer_size 8388608
show session variables like 'aria_pagecache_buffer_size';
Variable_name Value
aria_pagecache_buffer_size 134217728
aria_pagecache_buffer_size 8388608
select * from information_schema.global_variables where variable_name='aria_pagecache_buffer_size';
VARIABLE_NAME VARIABLE_VALUE
ARIA_PAGECACHE_BUFFER_SIZE 134217728
ARIA_PAGECACHE_BUFFER_SIZE 8388608
select * from information_schema.session_variables where variable_name='aria_pagecache_buffer_size';
VARIABLE_NAME VARIABLE_VALUE
ARIA_PAGECACHE_BUFFER_SIZE 134217728
ARIA_PAGECACHE_BUFFER_SIZE 8388608
set global aria_pagecache_buffer_size=1;
ERROR HY000: Variable 'aria_pagecache_buffer_size' is a read only variable
set session aria_pagecache_buffer_size=1;

View File

@ -59,7 +59,7 @@ Warnings:
Warning 1292 Truncated incorrect binlog_cache_size value: '42949672950'
SELECT @@global.binlog_cache_size;
@@global.binlog_cache_size
42949668864
max_binlog_cache_size
'Bug: Errors are not coming on assigning invalid values to variable'
SET @@global.binlog_cache_size = ON;
ERROR 42000: Incorrect argument type to variable 'binlog_cache_size'

View File

@ -59,7 +59,7 @@ Warnings:
Warning 1292 Truncated incorrect binlog_stmt_cache_size value: '42949672950'
SELECT @@global.binlog_stmt_cache_size;
@@global.binlog_stmt_cache_size
42949668864
max_binlog_cache_size
'Bug: Errors are not coming on assigning invalid values to variable'
SET @@global.binlog_stmt_cache_size = ON;
ERROR 42000: Incorrect argument type to variable 'binlog_stmt_cache_size'

View File

@ -64,7 +64,7 @@ SELECT @@session.bulk_insert_buffer_size;
SET @@global.bulk_insert_buffer_size = 42949672950;
SELECT @@global.bulk_insert_buffer_size;
@@global.bulk_insert_buffer_size
42949672950
max_bulk_insert_buffer_size
SET @@global.bulk_insert_buffer_size = -1024;
Warnings:
Warning 1292 Truncated incorrect bulk_insert_buffer_size value: '-1024'
@ -80,7 +80,7 @@ ERROR 42000: Incorrect argument type to variable 'bulk_insert_buffer_size'
SET @@session.bulk_insert_buffer_size = 42949672950;
SELECT @@session.bulk_insert_buffer_size;
@@session.bulk_insert_buffer_size
42949672950
max_bulk_insert_buffer_size
SET @@session.bulk_insert_buffer_size = -2;
Warnings:
Warning 1292 Truncated incorrect bulk_insert_buffer_size value: '-2'

View File

@ -73,17 +73,18 @@ Warnings:
Warning 1292 Truncated incorrect join_buffer_size value: '42949672951'
SELECT @@global.join_buffer_size;
@@global.join_buffer_size
42949672832
max_join_buffer_size
SET @@global.join_buffer_size = 1024*1024;
SET @@global.join_buffer_size = 65530.34;
ERROR 42000: Incorrect argument type to variable 'join_buffer_size'
SELECT @@global.join_buffer_size;
@@global.join_buffer_size
42949672832
1048576
SET @@global.join_buffer_size = test;
ERROR 42000: Incorrect argument type to variable 'join_buffer_size'
SELECT @@global.join_buffer_size;
@@global.join_buffer_size
42949672832
1048576
SET @@session.join_buffer_size = 0;
Warnings:
Warning 1292 Truncated incorrect join_buffer_size value: '0'
@ -107,17 +108,18 @@ Warnings:
Warning 1292 Truncated incorrect join_buffer_size value: '42949672951'
SELECT @@session.join_buffer_size;
@@session.join_buffer_size
42949672832
max_join_buffer_size
SET @@session.join_buffer_size = 1024*1024;
SET @@session.join_buffer_size = 65530.34;
ERROR 42000: Incorrect argument type to variable 'join_buffer_size'
SELECT @@session.join_buffer_size;
@@session.join_buffer_size
42949672832
1048576
SET @@session.join_buffer_size = test;
ERROR 42000: Incorrect argument type to variable 'join_buffer_size'
SELECT @@session.join_buffer_size;
@@session.join_buffer_size
42949672832
1048576
'#------------------FN_DYNVARS_053_06-----------------------#'
SELECT @@global.join_buffer_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES

View File

@ -1,7 +1,7 @@
SET @start_value = @@global.max_binlog_cache_size;
SELECT @start_value;
@start_value
18446744073709547520
max_binlog_cache_size
'#--------------------FN_DYNVARS_072_01------------------------#'
SET @@global.max_binlog_cache_size = 5000;
Warnings:
@ -9,7 +9,7 @@ Warning 1292 Truncated incorrect max_binlog_cache_size value: '5000'
SET @@global.max_binlog_cache_size = DEFAULT;
SELECT @@global.max_binlog_cache_size;
@@global.max_binlog_cache_size
18446744073709547520
max_binlog_cache_size
'#---------------------FN_DYNVARS_072_02-------------------------#'
SET @@global.max_binlog_cache_size = @start_value;
SELECT @@global.max_binlog_cache_size = 4294967295;
@ -56,12 +56,13 @@ Warnings:
Warning 1292 Truncated incorrect max_binlog_cache_size value: '100000000000'
SELECT @@global.max_binlog_cache_size;
@@global.max_binlog_cache_size
99999997952
max_binlog_cache_size
SET @@global.max_binlog_cache_size = 1024*1024;
SET @@global.max_binlog_cache_size = 10000.01;
ERROR 42000: Incorrect argument type to variable 'max_binlog_cache_size'
SELECT @@global.max_binlog_cache_size;
@@global.max_binlog_cache_size
99999997952
1048576
SET @@global.max_binlog_cache_size = -1024;
Warnings:
Warning 1292 Truncated incorrect max_binlog_cache_size value: '-1024'
@ -77,7 +78,7 @@ SELECT @@global.max_binlog_cache_size;
SET @@global.max_binlog_cache_size = 4294967296;
SELECT @@global.max_binlog_cache_size;
@@global.max_binlog_cache_size
4294967296
max_binlog_cache_size
SET @@global.max_binlog_cache_size = 4095;
Warnings:
Warning 1292 Truncated incorrect max_binlog_cache_size value: '4095'
@ -149,4 +150,4 @@ ERROR 42S22: Unknown column 'max_binlog_cache_size' in 'field list'
SET @@global.max_binlog_cache_size = @start_value;
SELECT @@global.max_binlog_cache_size;
@@global.max_binlog_cache_size
18446744073709547520
max_binlog_cache_size

View File

@ -1,7 +1,7 @@
SET @start_value = @@global.max_binlog_stmt_cache_size;
SELECT @start_value;
@start_value
18446744073709547520
max_binlog_stmt_cache_size
'#--------------------FN_DYNVARS_072_01------------------------#'
SET @@global.max_binlog_stmt_cache_size = 5000;
Warnings:
@ -9,7 +9,7 @@ Warning 1292 Truncated incorrect max_binlog_stmt_cache_size value: '5000'
SET @@global.max_binlog_stmt_cache_size = DEFAULT;
SELECT @@global.max_binlog_stmt_cache_size;
@@global.max_binlog_stmt_cache_size
18446744073709547520
max_binlog_stmt_cache_size
'#---------------------FN_DYNVARS_072_02-------------------------#'
SET @@global.max_binlog_stmt_cache_size = @start_value;
SELECT @@global.max_binlog_stmt_cache_size = 4294967295;
@ -56,12 +56,13 @@ Warnings:
Warning 1292 Truncated incorrect max_binlog_stmt_cache_size value: '100000000000'
SELECT @@global.max_binlog_stmt_cache_size;
@@global.max_binlog_stmt_cache_size
99999997952
max_binlog_stmt_cache_size
SET @@global.max_binlog_stmt_cache_size = 1024*1024;
SET @@global.max_binlog_stmt_cache_size = 10000.01;
ERROR 42000: Incorrect argument type to variable 'max_binlog_stmt_cache_size'
SELECT @@global.max_binlog_stmt_cache_size;
@@global.max_binlog_stmt_cache_size
99999997952
1048576
SET @@global.max_binlog_stmt_cache_size = -1024;
Warnings:
Warning 1292 Truncated incorrect max_binlog_stmt_cache_size value: '-1024'
@ -77,7 +78,7 @@ SELECT @@global.max_binlog_stmt_cache_size;
SET @@global.max_binlog_stmt_cache_size = 4294967296;
SELECT @@global.max_binlog_stmt_cache_size;
@@global.max_binlog_stmt_cache_size
4294967296
max_binlog_stmt_cache_size
SET @@global.max_binlog_stmt_cache_size = 4095;
Warnings:
Warning 1292 Truncated incorrect max_binlog_stmt_cache_size value: '4095'
@ -149,4 +150,4 @@ ERROR 42S22: Unknown column 'max_binlog_stmt_cache_size' in 'field list'
SET @@global.max_binlog_stmt_cache_size = @start_value;
SELECT @@global.max_binlog_stmt_cache_size;
@@global.max_binlog_stmt_cache_size
18446744073709547520
max_binlog_stmt_cache_size

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