mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
auto-merge
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
# in alphabetical order. This also helps with merge conflict resolution.
|
||||
|
||||
binlog.binlog_multi_engine # joro : NDB tests marked as experimental as agreed with bochklin
|
||||
binlog.binlog_bug23533 # skozlov: BUG#12371924
|
||||
|
||||
funcs_1.charset_collation_1 # depends on compile-time decisions
|
||||
|
||||
@ -14,19 +15,13 @@ main.sp @solaris # Bug#47791 2010-01-20 alik Several tes
|
||||
main.type_float @freebsd # Bug#38965 2010-05-04 alik test cases gis-rtree, type_float, type_newdecimal fail in embedded server
|
||||
main.wait_timeout @solaris # Bug#51244 2010-04-26 alik wait_timeout fails on OpenSolaris
|
||||
|
||||
rpl.rpl_heartbeat_basic # BUG#12403008 2011-04-27 sven fails sporadically
|
||||
rpl.rpl_innodb_bug28430 # Bug#46029
|
||||
rpl.rpl_show_slave_hosts # BUG#12416700 2011-05-02 sven fails sporadically
|
||||
|
||||
sys_vars.max_sp_recursion_depth_func @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
||||
sys_vars.plugin_dir_basic # Bug#52223 2010-11-24 alik Test "plugin_dir_basic" does not support RPM build (test) directory structure
|
||||
sys_vars.slow_query_log_func @solaris # Bug#54819 2010-06-26 alik sys_vars.slow_query_log_func fails sporadically on Solaris 10
|
||||
sys_vars.wait_timeout_func # Bug#41255 2010-04-26 alik wait_timeout_func fails
|
||||
sys_vars.sys_vars # Bug #59148 2011-01-10 joro 'INSTALL PLUGIN rpl_semi_sync_master' fails in release build with debug binaries
|
||||
sys_vars.rpl_semi_sync_master_enabled_basic # Bug #59148 2011-01-10 joro 'INSTALL PLUGIN rpl_semi_sync_master' fails in release build with debug binaries
|
||||
sys_vars.rpl_semi_sync_master_timeout_basic # Bug #59148 2011-01-10 joro 'INSTALL PLUGIN rpl_semi_sync_master' fails in release build with debug binaries
|
||||
sys_vars.rpl_semi_sync_master_trace_level_basic # Bug #59148 2011-01-10 joro 'INSTALL PLUGIN rpl_semi_sync_master' fails in release build with debug binaries
|
||||
sys_vars.rpl_semi_sync_master_wait_no_slave_basic # Bug #59148 2011-01-10 joro 'INSTALL PLUGIN rpl_semi_sync_master' fails in release build with debug binaries
|
||||
rpl.rpl_semi_sync_event # Bug #59148 2011-02-02 svoj 'INSTALL PLUGIN rpl_semi_sync_master' fails in release build with debug binaries
|
||||
rpl.rpl_semi_sync # Bug #59148 2011-02-02 svoj 'INSTALL PLUGIN rpl_semi_sync_master' fails in release build with debug binaries
|
||||
|
||||
# BUG #59055 : All ndb tests should be removed from the repository
|
||||
# Leaving the sys_vars tests for now. sys_vars.all_vars.test fails on removing ndb tests
|
||||
|
@ -11,18 +11,28 @@
|
||||
# on the slave)
|
||||
# $can_convert True if conversion shall work, false if it
|
||||
# shall generate an error
|
||||
# $engine_type The storage engine to be used for storing table
|
||||
# on both master and slave
|
||||
|
||||
if (!$engine_type)
|
||||
{
|
||||
# Use the default storage engine
|
||||
let $engine_type=`SELECT @@storage_engine`;
|
||||
}
|
||||
|
||||
connection master;
|
||||
disable_warnings;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
enable_warnings;
|
||||
eval CREATE TABLE t1 (a $source_type);
|
||||
eval CREATE TABLE t1(
|
||||
pk INT NOT NULL PRIMARY KEY,
|
||||
a $source_type
|
||||
) ENGINE=$engine_type;
|
||||
sync_slave_with_master;
|
||||
eval ALTER TABLE t1 MODIFY a $target_type;
|
||||
|
||||
connection master;
|
||||
eval INSERT INTO t1 VALUES($source_value);
|
||||
eval INSERT INTO t1 VALUES(1, $source_value);
|
||||
if ($can_convert) {
|
||||
sync_slave_with_master;
|
||||
eval SELECT a = $target_value into @compare FROM t1;
|
||||
|
@ -122,11 +122,13 @@ SELECT f1,f2,f3,f4,f5,f6,f7,f8,f9,
|
||||
|
||||
#connection slave;
|
||||
|
||||
--disable_query_log
|
||||
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 2 type mismatch.* 1535");
|
||||
call mtr.add_suppression("Slave SQL.*Error .Can.t DROP .c7.; check that column.key exists. on query.* 1091");
|
||||
call mtr.add_suppression("Slave SQL.*Error .Unknown column .c7. in .t15.. on query.* 1054");
|
||||
call mtr.add_suppression("Slave SQL.*Error .Key column .c6. doesn.t exist in table. on query.* 1072");
|
||||
call mtr.add_suppression("Slave.*Can.t DROP .c7.; check that column.key exists.* Error_code: 1091");
|
||||
call mtr.add_suppression("Slave.*Unknown column .c7. in .t15.* Error_code: 1054");
|
||||
call mtr.add_suppression("Slave.*Key column .c6. doesn.t exist in table.* Error_code: 1072");
|
||||
call mtr.add_suppression("Slave SQL.*Column 2 of table .test.t1.. cannot be converted from type.* Error_code: 1677");
|
||||
--enable_query_log
|
||||
|
||||
sync_slave_with_master;
|
||||
--echo
|
||||
|
@ -396,7 +396,7 @@ sync_slave_with_master;
|
||||
# Error reaction is up to sql_mode of the slave sql (bug#38173)
|
||||
#--echo *** Create t9 on slave ***
|
||||
# Please, check BUG#47741 to see why you are not testing NDB.
|
||||
if ($engine_type != NDB)
|
||||
if (`SELECT UPPER(LEFT($engine_type, 3)) != 'NDB'`)
|
||||
{
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
@ -440,12 +440,13 @@ if ($engine_type != NDB)
|
||||
#--let $slave_skip_counter= 2
|
||||
#--let $show_slave_sql_error= 1
|
||||
#--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
}
|
||||
|
||||
#--echo *** Drop t9 ***
|
||||
connection master;
|
||||
DROP TABLE t9;
|
||||
sync_slave_with_master;
|
||||
#--echo *** Drop t9 ***
|
||||
connection master;
|
||||
DROP TABLE t9;
|
||||
sync_slave_with_master;
|
||||
|
||||
}
|
||||
|
||||
############################################
|
||||
# More columns in slave at middle of table #
|
||||
|
@ -62,4 +62,24 @@ UPDATE t1 SET c1= 0;
|
||||
DROP TABLE t1;
|
||||
-- sync_slave_with_master
|
||||
|
||||
#
|
||||
# BUG#11766865: 60091: RBR + NO PK + UPDATE NULL VALUE --> SLAVE BREAK WITH ERROR HA_ERR_END_OF_
|
||||
#
|
||||
|
||||
--connection master
|
||||
--source include/rpl_reset.inc
|
||||
--connection master
|
||||
|
||||
--eval CREATE TABLE t1 (c1 int(11) NOT NULL, c2 int(11) NOT NULL, c3 int(11) DEFAULT '-1') ENGINE=$engine DEFAULT CHARSET=latin1
|
||||
|
||||
INSERT INTO t1 VALUES (1,2,NULL);
|
||||
UPDATE t1 SET c1=1, c2=2, c3=-1 WHERE c1=1 AND c2=2 AND ISNULL(c3);
|
||||
|
||||
--sync_slave_with_master
|
||||
|
||||
--let $diff_tables=master:test.t1, slave:test.t1
|
||||
--source include/diff_tables.inc
|
||||
|
||||
--connection master
|
||||
DROP TABLE t1;
|
||||
--sync_slave_with_master
|
||||
|
@ -23,8 +23,8 @@ insert into tm set a=null; # to simulate killed status on the slave
|
||||
commit;
|
||||
|
||||
connection slave;
|
||||
call mtr.add_suppression("Slave SQL.*slave SQL thread is being stopped in the middle of applying of a group having updated a non-transaction table");
|
||||
call mtr.add_suppression("Slave SQL.*The slave SQL is stopped, leaving the current group of events unfinished with a non-transaction table changed.");
|
||||
call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
|
||||
call mtr.add_suppression("Slave SQL.*Slave SQL Thread stopped with incomplete event group having non-transactional changes");
|
||||
|
||||
# slave will catch the killed status but won't shut down immediately
|
||||
# only after the whole group has done (commit)
|
||||
|
@ -1765,6 +1765,22 @@ SELECT
|
||||
HEX(DATE_SUB(DATE('2007-08-03'), INTERVAL 1 DAY)) AS field_date,
|
||||
HEX(DATE_SUB(CAST('2007-08-03 17:33:00' AS DATETIME), INTERVAL 1 MINUTE)) AS field_datetime;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#11926811 / Bug#60625 Illegal mix of collations
|
||||
--echo #
|
||||
SELECT @@collation_connection;
|
||||
DELIMITER //;
|
||||
CREATE PROCEDURE p1()
|
||||
BEGIN
|
||||
DECLARE v_LastPaymentDate DATETIME DEFAULT NULL;
|
||||
SELECT v_LastPaymentDate < NOW();
|
||||
EXPLAIN EXTENDED SELECT v_LastPaymentDate < NOW();
|
||||
SHOW WARNINGS;
|
||||
EXPLAIN EXTENDED SELECT CONCAT(v_LastPaymentDate, NOW());
|
||||
END//
|
||||
DELIMITER ;//
|
||||
CALL p1;
|
||||
DROP PROCEDURE p1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#52159 returning time type from function and empty left join causes debug assertion
|
||||
|
@ -2,3 +2,4 @@ disable_query_log;
|
||||
--require r/true.require
|
||||
select (PLUGIN_LIBRARY LIKE 'auth_test_plugin%') as `TRUE` FROM INFORMATION_SCHEMA.PLUGINS
|
||||
WHERE PLUGIN_NAME='test_plugin_server';
|
||||
enable_query_log;
|
||||
|
@ -634,6 +634,10 @@ drop table t1;
|
||||
drop table bug29807;
|
||||
create table bug29807 (a int);
|
||||
drop table bug29807;
|
||||
--disable_query_log
|
||||
call mtr.add_suppression("InnoDB: Error: table .test...bug29807. does not exist in the InnoDB internal");
|
||||
call mtr.add_suppression("Cannot find or open table test\/bug29807 from");
|
||||
--enable_query_log
|
||||
|
||||
|
||||
#
|
||||
|
@ -71,7 +71,7 @@ SET @@collation_connection = @collation_connection_saved||
|
||||
-- Insert patterns that should always be suppressed
|
||||
--
|
||||
INSERT INTO global_suppressions VALUES
|
||||
("'SELECT UNIX_TIMESTAMP\\(\\)' failed on master"),
|
||||
(".SELECT UNIX_TIMESTAMP... failed on master"),
|
||||
("Aborted connection"),
|
||||
("Client requested master to start replication from impossible position"),
|
||||
("Could not find first log file name in binary log"),
|
||||
@ -128,7 +128,6 @@ INSERT INTO global_suppressions VALUES
|
||||
("Sort aborted"),
|
||||
("Time-out in NDB"),
|
||||
("Warning:\s+One can only use the --user.*root"),
|
||||
("Warning:\s+Setting lower_case_table_names=2"),
|
||||
("Warning:\s+Table:.* on (delete|rename)"),
|
||||
("You have an error in your SQL syntax"),
|
||||
("deprecated"),
|
||||
@ -141,53 +140,20 @@ INSERT INTO global_suppressions VALUES
|
||||
("slave SQL thread aborted"),
|
||||
("Slave: .*Duplicate entry"),
|
||||
|
||||
/*
|
||||
Special case, made as specific as possible, for:
|
||||
Bug #28436: Incorrect position in SHOW BINLOG EVENTS causes
|
||||
server coredump
|
||||
*/
|
||||
|
||||
("Error in Log_event::read_log_event\\\(\\\): 'Sanity check failed', data_len: 258, event_type: 49"),
|
||||
|
||||
("Statement may not be safe to log in statement format"),
|
||||
|
||||
/* test case for Bug#bug29807 copies a stray frm into database */
|
||||
("InnoDB: Error: table `test`.`bug29807` does not exist in the InnoDB internal"),
|
||||
("Cannot find or open table test\/bug29807 from"),
|
||||
|
||||
/* innodb foreign key tests that fail in ALTER or RENAME produce this */
|
||||
("InnoDB: Error: in ALTER TABLE `test`.`t[123]`"),
|
||||
("InnoDB: Error: in RENAME TABLE table `test`.`t1`"),
|
||||
("InnoDB: Error: table `test`.`t[123]` does not exist in the InnoDB internal"),
|
||||
|
||||
/* Test case for Bug#14233 produces the following warnings: */
|
||||
("Stored routine 'test'.'bug14233_1': invalid value in column mysql.proc"),
|
||||
("Stored routine 'test'.'bug14233_2': invalid value in column mysql.proc"),
|
||||
("Stored routine 'test'.'bug14233_3': invalid value in column mysql.proc"),
|
||||
|
||||
/*
|
||||
BUG#32080 - Excessive warnings on Solaris: setrlimit could not
|
||||
change the size of core files
|
||||
*/
|
||||
("setrlimit could not change the size of core files to 'infinity'"),
|
||||
|
||||
/*
|
||||
rpl_extrColmaster_*.test, the slave thread produces warnings
|
||||
when it get updates to a table that has more columns on the
|
||||
master
|
||||
*/
|
||||
("Slave: Unknown column 'c7' in 't15' Error_code: 1054"),
|
||||
("Slave: Can't DROP 'c7'.* 1091"),
|
||||
("Slave: Key column 'c6'.* 1072"),
|
||||
("The slave I.O thread stops because a fatal error is encountered when it try to get the value of SERVER_ID variable from master."),
|
||||
(".SELECT UNIX_TIMESTAMP... failed on master, do not trust column Seconds_Behind_Master of SHOW SLAVE STATUS"),
|
||||
|
||||
/* Special case for Bug #26402 in show_check.test
|
||||
- Question marks are not valid file name parts on Windows. Ignore
|
||||
this error message.
|
||||
*/
|
||||
("Can't find file: '.\\\\test\\\\\\?{8}.frm'"),
|
||||
("Slave: Unknown table 't1' Error_code: 1051"),
|
||||
|
||||
/* Added 2009-08-XX after fixing Bug #42408 */
|
||||
|
||||
@ -215,14 +181,6 @@ INSERT INTO global_suppressions VALUES
|
||||
("==[0-9]*== Warning: invalid file descriptor -1 in syscall write()"),
|
||||
("==[0-9]*== Warning: invalid file descriptor -1 in syscall read()"),
|
||||
|
||||
/*
|
||||
Transient network failures that cause warnings on reconnect.
|
||||
BUG#47743 and BUG#47983.
|
||||
*/
|
||||
("Slave I/O: Get master SERVER_ID failed with error:.*"),
|
||||
("Slave I/O: Get master clock failed with error:.*"),
|
||||
("Slave I/O: Get master COLLATION_SERVER failed with error:.*"),
|
||||
("Slave I/O: Get master TIME_ZONE failed with error:.*"),
|
||||
/*
|
||||
BUG#42147 - Concurrent DML and LOCK TABLE ... READ for InnoDB
|
||||
table cause warnings in errlog
|
||||
|
24
mysql-test/include/not_crashrep.inc
Normal file
24
mysql-test/include/not_crashrep.inc
Normal file
@ -0,0 +1,24 @@
|
||||
# Check if CrashReporter is enabled and would open a window
|
||||
|
||||
perl;
|
||||
sub skip_test {
|
||||
# Only relevant on Mac OS X
|
||||
return 0 unless $^O eq 'darwin';
|
||||
my $crep= `defaults read com.apple.CrashReporter DialogType`;
|
||||
return 0 if $?;
|
||||
chomp ($crep);
|
||||
$crep= lc $crep;
|
||||
return ($crep eq 'basic' || $crep eq 'developer');
|
||||
}
|
||||
my $skip= skip_test();
|
||||
open (F, ">" . $ENV{'MYSQL_TMP_DIR'} . "/crashrep.inc");
|
||||
print F "let \$crashrep= $skip;\n";
|
||||
close F;
|
||||
EOF
|
||||
|
||||
--source $MYSQL_TMP_DIR/crashrep.inc
|
||||
--remove_file $MYSQL_TMP_DIR/crashrep.inc
|
||||
|
||||
if ($crashrep) {
|
||||
--skip CrashReporter would popup a window
|
||||
}
|
@ -31,6 +31,21 @@
|
||||
# Created: 2009-02-18 mleich
|
||||
#
|
||||
|
||||
if (!$condition)
|
||||
{
|
||||
--die ERROR IN TEST: the "condition" variable must be set
|
||||
}
|
||||
|
||||
if (!$field)
|
||||
{
|
||||
--die ERROR IN TEST: the "field" variable must be set
|
||||
}
|
||||
|
||||
if (!$show_statement)
|
||||
{
|
||||
--die ERROR IN TEST: the "show_statement" variable must be set
|
||||
}
|
||||
|
||||
let $max_run_time= 30;
|
||||
if ($wait_timeout)
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2008, 2011, 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 Library General Public
|
||||
@ -150,7 +150,11 @@ sub fix_tmpdir {
|
||||
sub fix_log_error {
|
||||
my ($self, $config, $group_name, $group)= @_;
|
||||
my $dir= $self->{ARGS}->{vardir};
|
||||
return "$dir/log/$group_name.err";
|
||||
if ( $::opt_valgrind and $::opt_debug ) {
|
||||
return "$dir/log/$group_name.trace";
|
||||
} else {
|
||||
return "$dir/log/$group_name.err";
|
||||
}
|
||||
}
|
||||
|
||||
sub fix_log {
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2008 MySQL AB
|
||||
# Copyright (c) 2004, 2011, 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
|
||||
@ -156,8 +156,7 @@ sub my_find_paths {
|
||||
# User can select to look in a special build dir
|
||||
# which is a subdirectory of any of the paths
|
||||
my @extra_dirs;
|
||||
my $build_dir= $::opt_config_dir || $ENV{MTR_VS_CONFIG}
|
||||
|| $ENV{MTR_BUILD_DIR};
|
||||
my $build_dir= $::opt_vs_config || $ENV{MTR_VS_CONFIG} || $ENV{MTR_BUILD_DIR};
|
||||
push(@extra_dirs, $build_dir) if defined $build_dir;
|
||||
|
||||
if (defined $extension){
|
||||
|
@ -94,7 +94,7 @@ eval {
|
||||
local $SIG{INT}= \&handle_signal;
|
||||
local $SIG{CHLD}= sub {
|
||||
message("Got signal @_");
|
||||
kill(9, -$child_pid);
|
||||
kill('KILL', -$child_pid);
|
||||
my $ret= waitpid($child_pid, 0);
|
||||
if ($? & 127){
|
||||
exit(65); # Killed by signal
|
||||
@ -134,7 +134,7 @@ if ( $@ ) {
|
||||
# Use negative pid in order to kill the whole
|
||||
# process group
|
||||
#
|
||||
my $ret= kill(9, -$child_pid);
|
||||
my $ret= kill('KILL', -$child_pid);
|
||||
message("Killed child: $child_pid, ret: $ret");
|
||||
if ($ret > 0) {
|
||||
message("Killed child: $child_pid");
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2004, 2006 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
# Copyright (c) 2004, 2011, 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
|
||||
@ -31,7 +31,7 @@ sub gcov_prepare ($) {
|
||||
#
|
||||
# Collect gcov statistics.
|
||||
# Arguments:
|
||||
# $dir basedir, normally source directory
|
||||
# $dir basedir, normally build directory
|
||||
# $gcov gcov utility program [path] name
|
||||
# $gcov_msg message file name
|
||||
# $gcov_err error file name
|
||||
@ -43,29 +43,25 @@ sub gcov_collect ($$$) {
|
||||
my $start_dir= cwd();
|
||||
|
||||
print "Collecting source coverage info using '$gcov'...\n";
|
||||
-f "$start_dir/$gcov_msg" and unlink("$start_dir/$gcov_msg");
|
||||
-f "$start_dir/$gcov_err" and unlink("$start_dir/$gcov_err");
|
||||
-f "$dir/$gcov_msg" and unlink("$dir/$gcov_msg");
|
||||
-f "$dir/$gcov_err" and unlink("$dir/$gcov_err");
|
||||
|
||||
my @dirs= `find "$dir" -type d -print | sort`;
|
||||
#print "List of directories:\n@dirs\n";
|
||||
|
||||
foreach my $d ( @dirs ) {
|
||||
my $dir_reported= 0;
|
||||
chomp($d);
|
||||
chdir($d) or next;
|
||||
|
||||
foreach my $f ( (glob("*.h"), glob("*.cc"), glob("*.c")) ) {
|
||||
$f =~ /(.*)\.[ch]c?/;
|
||||
-f "$1.gcno" or next;
|
||||
if (!$dir_reported) {
|
||||
print "Collecting in '$d'...\n";
|
||||
$dir_reported= 1;
|
||||
}
|
||||
system("$gcov $f 2>>$start_dir/$gcov_err >>$start_dir/$gcov_msg");
|
||||
my @flist= glob("*.*.gcno");
|
||||
print ("Collecting in '$d'...\n") if @flist;
|
||||
|
||||
foreach my $f (@flist) {
|
||||
system("$gcov $f 2>>$dir/$gcov_err >>$dir/$gcov_msg");
|
||||
}
|
||||
chdir($start_dir);
|
||||
}
|
||||
print "gcov info in $gcov_msg, errors in $gcov_err\n";
|
||||
print "gcov info in $dir/$gcov_msg, errors in $dir/$gcov_err\n";
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2004, 2011, 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 Library General Public
|
||||
@ -36,6 +36,7 @@ sub start_timer($);
|
||||
sub has_expired($);
|
||||
sub init_timers();
|
||||
sub mark_time_used($);
|
||||
sub mark_time_idle();
|
||||
sub add_total_times($);
|
||||
sub print_times_used($$);
|
||||
sub print_total_times($);
|
||||
@ -224,6 +225,7 @@ my %time_used= (
|
||||
'ch-warn' => 0,
|
||||
'test' => 0,
|
||||
'init' => 0,
|
||||
'admin' => 0,
|
||||
);
|
||||
|
||||
my %time_text= (
|
||||
@ -232,7 +234,8 @@ my %time_text= (
|
||||
'check' => "Check-testcase",
|
||||
'ch-warn' => "Check for warnings",
|
||||
'test' => "Test execution",
|
||||
'init' => "Initialization etc.",
|
||||
'init' => "Initialization/cleanup",
|
||||
'admin' => "Test administration",
|
||||
);
|
||||
|
||||
# Counts number of reports from workers
|
||||
@ -255,6 +258,10 @@ sub mark_time_used($) {
|
||||
$last_timer_set= $curr_time;
|
||||
}
|
||||
|
||||
sub mark_time_idle() {
|
||||
$last_timer_set= gettimeofday() if $opt_report_times;
|
||||
}
|
||||
|
||||
sub add_total_times($) {
|
||||
my ($dummy, $num, @line)= split (" ", $_[0]);
|
||||
|
||||
|
@ -210,8 +210,8 @@ our $opt_clean_vardir= $ENV{'MTR_CLEAN_VARDIR'};
|
||||
|
||||
our $opt_gcov;
|
||||
our $opt_gcov_exe= "gcov";
|
||||
our $opt_gcov_err= "mysql-test-gcov.msg";
|
||||
our $opt_gcov_msg= "mysql-test-gcov.err";
|
||||
our $opt_gcov_err= "mysql-test-gcov.err";
|
||||
our $opt_gcov_msg= "mysql-test-gcov.msg";
|
||||
|
||||
our $opt_gprof;
|
||||
our %gprof_dirs;
|
||||
@ -219,9 +219,12 @@ our %gprof_dirs;
|
||||
our $glob_debugger= 0;
|
||||
our $opt_gdb;
|
||||
our $opt_client_gdb;
|
||||
our $opt_dbx;
|
||||
our $opt_client_dbx;
|
||||
our $opt_ddd;
|
||||
our $opt_client_ddd;
|
||||
our $opt_manual_gdb;
|
||||
our $opt_manual_dbx;
|
||||
our $opt_manual_ddd;
|
||||
our $opt_manual_debug;
|
||||
our $opt_debugger;
|
||||
@ -271,12 +274,13 @@ my $opt_strace_client;
|
||||
|
||||
our $opt_user = "root";
|
||||
|
||||
my $opt_valgrind= 0;
|
||||
our $opt_valgrind= 0;
|
||||
my $opt_valgrind_mysqld= 0;
|
||||
my $opt_valgrind_mysqltest= 0;
|
||||
my @default_valgrind_args= ("--show-reachable=yes");
|
||||
my @valgrind_args;
|
||||
my $opt_valgrind_path;
|
||||
my $valgrind_reports= 0;
|
||||
my $opt_callgrind;
|
||||
my %mysqld_logs;
|
||||
my $opt_debug_sync_timeout= 300; # Default timeout for WAIT_FOR actions.
|
||||
@ -501,10 +505,29 @@ sub main {
|
||||
|
||||
push @$completed, run_ctest() if $opt_ctest;
|
||||
|
||||
if ($opt_valgrind) {
|
||||
# Create minimalistic "test" for the reporting
|
||||
my $tinfo = My::Test->new
|
||||
(
|
||||
name => 'valgrind_report',
|
||||
);
|
||||
# Set dummy worker id to align report with normal tests
|
||||
$tinfo->{worker} = 0 if $opt_parallel > 1;
|
||||
if ($valgrind_reports) {
|
||||
$tinfo->{result}= 'MTR_RES_FAILED';
|
||||
$tinfo->{comment}= "Valgrind reported failures at shutdown, see above";
|
||||
$tinfo->{failures}= 1;
|
||||
} else {
|
||||
$tinfo->{result}= 'MTR_RES_PASSED';
|
||||
}
|
||||
mtr_report_test($tinfo);
|
||||
push @$completed, $tinfo;
|
||||
}
|
||||
|
||||
mtr_print_line();
|
||||
|
||||
if ( $opt_gcov ) {
|
||||
gcov_collect($basedir, $opt_gcov_exe,
|
||||
gcov_collect($bindir, $opt_gcov_exe,
|
||||
$opt_gcov_msg, $opt_gcov_err);
|
||||
}
|
||||
|
||||
@ -546,7 +569,9 @@ sub run_test_server ($$$) {
|
||||
my $s= IO::Select->new();
|
||||
$s->add($server);
|
||||
while (1) {
|
||||
mark_time_used('admin');
|
||||
my @ready = $s->can_read(1); # Wake up once every second
|
||||
mark_time_idle();
|
||||
foreach my $sock (@ready) {
|
||||
if ($sock == $server) {
|
||||
# New client connected
|
||||
@ -699,6 +724,9 @@ sub run_test_server ($$$) {
|
||||
elsif ($line =~ /^SPENT/) {
|
||||
add_total_times($line);
|
||||
}
|
||||
elsif ($line eq 'VALGREP' && $opt_valgrind) {
|
||||
$valgrind_reports= 1;
|
||||
}
|
||||
else {
|
||||
mtr_error("Unknown response: '$line' from client");
|
||||
}
|
||||
@ -884,11 +912,12 @@ sub run_worker ($) {
|
||||
my $valgrind_reports= 0;
|
||||
if ($opt_valgrind_mysqld) {
|
||||
$valgrind_reports= valgrind_exit_reports();
|
||||
print $server "VALGREP\n" if $valgrind_reports;
|
||||
}
|
||||
if ( $opt_gprof ) {
|
||||
gprof_collect (find_mysqld($basedir), keys %gprof_dirs);
|
||||
}
|
||||
mark_time_used('init');
|
||||
mark_time_used('admin');
|
||||
print_times_used($server, $thread_num);
|
||||
exit($valgrind_reports);
|
||||
}
|
||||
@ -1001,6 +1030,9 @@ sub command_line_setup {
|
||||
'ddd' => \$opt_ddd,
|
||||
'client-ddd' => \$opt_client_ddd,
|
||||
'manual-ddd' => \$opt_manual_ddd,
|
||||
'dbx' => \$opt_dbx,
|
||||
'client-dbx' => \$opt_client_dbx,
|
||||
'manual-dbx' => \$opt_manual_dbx,
|
||||
'debugger=s' => \$opt_debugger,
|
||||
'client-debugger=s' => \$opt_client_debugger,
|
||||
'strace-client:s' => \$opt_strace_client,
|
||||
@ -1190,7 +1222,7 @@ sub command_line_setup {
|
||||
chomp;
|
||||
# remove comments (# foo) at the beginning of the line, or after a
|
||||
# blank at the end of the line
|
||||
s/( +|^)#.*$//;
|
||||
s/(\s+|^)#.*$//;
|
||||
# If @ platform specifier given, use this entry only if it contains
|
||||
# @<platform> or @!<xxx> where xxx != platform
|
||||
if (/\@.*/)
|
||||
@ -1201,8 +1233,8 @@ sub command_line_setup {
|
||||
s/\@.*$//;
|
||||
}
|
||||
# remove whitespace
|
||||
s/^ +//;
|
||||
s/ +$//;
|
||||
s/^\s+//;
|
||||
s/\s+$//;
|
||||
# if nothing left, don't need to remember this line
|
||||
if ( $_ eq "" ) {
|
||||
next;
|
||||
@ -1426,6 +1458,12 @@ sub command_line_setup {
|
||||
$opt_ddd= undef;
|
||||
}
|
||||
|
||||
if ($opt_dbx) {
|
||||
mtr_warning("Silently converting --dbx to --client-dbx in embedded mode");
|
||||
$opt_client_dbx= $opt_dbx;
|
||||
$opt_dbx= undef;
|
||||
}
|
||||
|
||||
if ($opt_debugger)
|
||||
{
|
||||
mtr_warning("Silently converting --debugger to --client-debugger in embedded mode");
|
||||
@ -1434,7 +1472,7 @@ sub command_line_setup {
|
||||
}
|
||||
|
||||
if ( $opt_gdb || $opt_ddd || $opt_manual_gdb || $opt_manual_ddd ||
|
||||
$opt_manual_debug || $opt_debugger )
|
||||
$opt_manual_debug || $opt_debugger || $opt_dbx || $opt_manual_dbx)
|
||||
{
|
||||
mtr_error("You need to use the client debug options for the",
|
||||
"embedded server. Ex: --client-gdb");
|
||||
@ -1462,6 +1500,7 @@ sub command_line_setup {
|
||||
# --------------------------------------------------------------------------
|
||||
if ( $opt_gdb || $opt_client_gdb || $opt_ddd || $opt_client_ddd ||
|
||||
$opt_manual_gdb || $opt_manual_ddd || $opt_manual_debug ||
|
||||
$opt_dbx || $opt_client_dbx || $opt_manual_dbx ||
|
||||
$opt_debugger || $opt_client_debugger )
|
||||
{
|
||||
# Indicate that we are using debugger
|
||||
@ -2181,7 +2220,12 @@ sub environment_setup {
|
||||
$ENV{'DEFAULT_MASTER_PORT'}= $mysqld_variables{'port'};
|
||||
$ENV{'MYSQL_TMP_DIR'}= $opt_tmpdir;
|
||||
$ENV{'MYSQLTEST_VARDIR'}= $opt_vardir;
|
||||
# Used for guessing default plugin dir, we can't really know for sure
|
||||
$ENV{'MYSQL_LIBDIR'}= "$basedir/lib";
|
||||
# Override if this does not exist, but lib64 does (best effort)
|
||||
if (! -d "$basedir/lib" && -d "$basedir/lib64") {
|
||||
$ENV{'MYSQL_LIBDIR'}= "$basedir/lib64";
|
||||
}
|
||||
$ENV{'MYSQL_BINDIR'}= "$bindir";
|
||||
$ENV{'MYSQL_SHAREDIR'}= $path_language;
|
||||
$ENV{'MYSQL_CHARSETSDIR'}= $path_charsetsdir;
|
||||
@ -3762,7 +3806,7 @@ sub run_testcase ($) {
|
||||
|
||||
do_before_run_mysqltest($tinfo);
|
||||
|
||||
mark_time_used('init');
|
||||
mark_time_used('admin');
|
||||
|
||||
if ( $opt_check_testcases and check_testcase($tinfo, "before") ){
|
||||
# Failed to record state of server or server crashed
|
||||
@ -4077,6 +4121,9 @@ sub extract_warning_lines ($$) {
|
||||
);
|
||||
my $skip_valgrind= 0;
|
||||
|
||||
my $last_pat= "";
|
||||
my $num_rep= 0;
|
||||
|
||||
foreach my $line ( @lines )
|
||||
{
|
||||
if ($opt_valgrind_mysqld) {
|
||||
@ -4091,11 +4138,29 @@ sub extract_warning_lines ($$) {
|
||||
{
|
||||
if ( $line =~ /$pat/ )
|
||||
{
|
||||
print $Fwarn $line;
|
||||
# Remove initial timestamp and look for consecutive identical lines
|
||||
my $line_pat= $line;
|
||||
$line_pat =~ s/^[0-9: ]*//;
|
||||
if ($line_pat eq $last_pat) {
|
||||
$num_rep++;
|
||||
} else {
|
||||
# Previous line had been repeated, report that first
|
||||
if ($num_rep) {
|
||||
print $Fwarn ".... repeated $num_rep times: $last_pat";
|
||||
$num_rep= 0;
|
||||
}
|
||||
$last_pat= $line_pat;
|
||||
print $Fwarn $line;
|
||||
}
|
||||
last;
|
||||
}
|
||||
}
|
||||
}
|
||||
# Catch the case of last warning being repeated
|
||||
if ($num_rep) {
|
||||
print $Fwarn ".... repeated $num_rep times: $last_pat";
|
||||
}
|
||||
|
||||
$Fwarn = undef; # Close file
|
||||
|
||||
}
|
||||
@ -4704,6 +4769,9 @@ sub mysqld_start ($$) {
|
||||
{
|
||||
ddd_arguments(\$args, \$exe, $mysqld->name());
|
||||
}
|
||||
if ( $opt_dbx || $opt_manual_dbx ) {
|
||||
dbx_arguments(\$args, \$exe, $mysqld->name());
|
||||
}
|
||||
elsif ( $opt_debugger )
|
||||
{
|
||||
debugger_arguments(\$args, \$exe, $mysqld->name());
|
||||
@ -4729,13 +4797,6 @@ sub mysqld_start ($$) {
|
||||
unlink($mysqld->value('pid-file'));
|
||||
|
||||
my $output= $mysqld->value('#log-error');
|
||||
if ( $opt_valgrind and $opt_debug )
|
||||
{
|
||||
# When both --valgrind and --debug is selected, send
|
||||
# all output to the trace file, making it possible to
|
||||
# see the exact location where valgrind complains
|
||||
$output= "$opt_vardir/log/".$mysqld->name().".trace";
|
||||
}
|
||||
# Remember this log file for valgrind error report search
|
||||
$mysqld_logs{$output}= 1 if $opt_valgrind;
|
||||
# Remember data dir for gmon.out files if using gprof
|
||||
@ -5232,7 +5293,7 @@ sub start_mysqltest ($) {
|
||||
my $exe= $exe_mysqltest;
|
||||
my $args;
|
||||
|
||||
mark_time_used('init');
|
||||
mark_time_used('admin');
|
||||
|
||||
mtr_init_args(\$args);
|
||||
|
||||
@ -5374,6 +5435,9 @@ sub start_mysqltest ($) {
|
||||
{
|
||||
ddd_arguments(\$args, \$exe, "client");
|
||||
}
|
||||
if ( $opt_client_dbx ) {
|
||||
dbx_arguments(\$args, \$exe, "client");
|
||||
}
|
||||
elsif ( $opt_client_debugger )
|
||||
{
|
||||
debugger_arguments(\$args, \$exe, "client");
|
||||
@ -5408,23 +5472,11 @@ sub gdb_arguments {
|
||||
# Remove the old gdbinit file
|
||||
unlink($gdb_init_file);
|
||||
|
||||
if ( $type eq "client" )
|
||||
{
|
||||
# write init file for client
|
||||
mtr_tofile($gdb_init_file,
|
||||
"set args $str\n" .
|
||||
"break main\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
# write init file for mysqld
|
||||
mtr_tofile($gdb_init_file,
|
||||
"set args $str\n" .
|
||||
"break mysql_parse\n" .
|
||||
"commands 1\n" .
|
||||
"disable 1\n" .
|
||||
"end\n");
|
||||
}
|
||||
# write init file for mysqld or client
|
||||
mtr_tofile($gdb_init_file,
|
||||
"set args $str\n" .
|
||||
"break main\n" .
|
||||
"run");
|
||||
|
||||
if ( $opt_manual_gdb )
|
||||
{
|
||||
@ -5471,24 +5523,12 @@ sub ddd_arguments {
|
||||
# Remove the old gdbinit file
|
||||
unlink($gdb_init_file);
|
||||
|
||||
if ( $type eq "client" )
|
||||
{
|
||||
# write init file for client
|
||||
mtr_tofile($gdb_init_file,
|
||||
"set args $str\n" .
|
||||
"break main\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
# write init file for mysqld
|
||||
mtr_tofile($gdb_init_file,
|
||||
"file $$exe\n" .
|
||||
"set args $str\n" .
|
||||
"break mysql_parse\n" .
|
||||
"commands 1\n" .
|
||||
"disable 1\n" .
|
||||
"end");
|
||||
}
|
||||
# write init file for mysqld or client
|
||||
mtr_tofile($gdb_init_file,
|
||||
"file $$exe\n" .
|
||||
"set args $str\n" .
|
||||
"break main\n" .
|
||||
"run");
|
||||
|
||||
if ( $opt_manual_ddd )
|
||||
{
|
||||
@ -5517,6 +5557,46 @@ sub ddd_arguments {
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Modify the exe and args so that program is run in dbx in xterm
|
||||
#
|
||||
sub dbx_arguments {
|
||||
my $args= shift;
|
||||
my $exe= shift;
|
||||
my $type= shift;
|
||||
|
||||
# Put $args into a single string
|
||||
my $str= join " ", @$$args;
|
||||
|
||||
if ( $opt_manual_dbx ) {
|
||||
print "\nTo start dbx for $type, type in another window:\n";
|
||||
print "cd $glob_mysql_test_dir; dbx -c \"stop in main; " .
|
||||
"run $str\" $$exe\n";
|
||||
|
||||
# Indicate the exe should not be started
|
||||
$$exe= undef;
|
||||
return;
|
||||
}
|
||||
|
||||
$$args= [];
|
||||
mtr_add_arg($$args, "-title");
|
||||
mtr_add_arg($$args, "$type");
|
||||
mtr_add_arg($$args, "-e");
|
||||
|
||||
if ( $exe_libtool ) {
|
||||
mtr_add_arg($$args, $exe_libtool);
|
||||
mtr_add_arg($$args, "--mode=execute");
|
||||
}
|
||||
|
||||
mtr_add_arg($$args, "dbx");
|
||||
mtr_add_arg($$args, "-c");
|
||||
mtr_add_arg($$args, "stop in main; run $str");
|
||||
mtr_add_arg($$args, "$$exe");
|
||||
|
||||
$$exe= "xterm";
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Modify the exe and args so that program is run in the selected debugger
|
||||
#
|
||||
@ -5547,18 +5627,6 @@ sub debugger_arguments {
|
||||
# Set exe to debuggername
|
||||
$$exe= $debugger;
|
||||
|
||||
}
|
||||
elsif ( $debugger eq "dbx" )
|
||||
{
|
||||
# xterm -e dbx -r exe arg1 .. argn
|
||||
|
||||
unshift(@$$args, $$exe);
|
||||
unshift(@$$args, "-r");
|
||||
unshift(@$$args, $debugger);
|
||||
unshift(@$$args, "-e");
|
||||
|
||||
$$exe= "xterm";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -5635,6 +5703,7 @@ sub valgrind_exit_reports() {
|
||||
@culprits);
|
||||
mtr_print_line();
|
||||
print ("$valgrind_rep\n");
|
||||
$found_err= 1;
|
||||
$err_in_report= 0;
|
||||
}
|
||||
# Make ready to collect new report
|
||||
@ -5860,6 +5929,7 @@ Options for debugging the product
|
||||
client-ddd Start mysqltest client in ddd
|
||||
client-debugger=NAME Start mysqltest in the selected debugger
|
||||
client-gdb Start mysqltest client in gdb
|
||||
client-dbx Start mysqltest client in dbx
|
||||
ddd Start mysqld in ddd
|
||||
debug Dump trace output for all servers and client programs
|
||||
debug-common Same as debug, but sets 'd' debug flags to
|
||||
@ -5868,12 +5938,15 @@ Options for debugging the product
|
||||
tracing
|
||||
debugger=NAME Start mysqld in the selected debugger
|
||||
gdb Start the mysqld(s) in gdb
|
||||
dbx Start the mysqld(s) in dbx
|
||||
manual-debug Let user manually start mysqld in debugger, before
|
||||
running test(s)
|
||||
manual-gdb Let user manually start mysqld in gdb, before running
|
||||
test(s)
|
||||
manual-ddd Let user manually start mysqld in ddd, before running
|
||||
test(s)
|
||||
manual-dbx Let user manually start mysqld in dbx, before running
|
||||
test(s)
|
||||
strace-client[=path] Create strace output for mysqltest client, optionally
|
||||
specifying name and path to the trace program to use.
|
||||
Example: $0 --strace-client=ktrace
|
||||
|
@ -1391,3 +1391,16 @@ CREATE DATABASE db1 CHARACTER SET utf8;
|
||||
CREATE TABLE db1.t1 (bar TINYTEXT, KEY (bar(100)));
|
||||
ALTER TABLE db1.t1 ADD baz INT;
|
||||
DROP DATABASE db1;
|
||||
#
|
||||
# Bug#11938039 RE-EXECUTION OF FRM-ONLY ALTER TABLE WITH RENAME
|
||||
# CLAUSE FAILS OR ABORTS SERVER.
|
||||
#
|
||||
drop table if exists t1;
|
||||
create table t1 (a int);
|
||||
prepare stmt1 from 'alter table t1 alter column a set default 1, rename to t2';
|
||||
execute stmt1;
|
||||
rename table t2 to t1;
|
||||
# The below statement should succeed and not emit error or abort server.
|
||||
execute stmt1;
|
||||
deallocate prepare stmt1;
|
||||
drop table t2;
|
||||
|
@ -12807,3 +12807,19 @@ DROP TABLE t1;
|
||||
#
|
||||
CREATE TABLE `a/../`(a INT) ENGINE=ARCHIVE;
|
||||
DROP TABLE `a/../`;
|
||||
#
|
||||
# BUG#57162 - valgrind errors, random data when returning
|
||||
# ordered data from archive tables
|
||||
#
|
||||
SET sort_buffer_size=32804;
|
||||
CREATE TABLE t1(a INT, b CHAR(255), c CHAR(255), d CHAR(255),
|
||||
e CHAR(255), f INT) ENGINE=ARCHIVE DEFAULT CHARSET utf8;
|
||||
INSERT INTO t1 VALUES(-1,'b','c','d','e',1);
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT t1.* FROM t1,t1 t2,t1 t3,t1 t4,t1 t5,t1 t6;
|
||||
SELECT * FROM t1 ORDER BY f LIMIT 1;
|
||||
a b c d e f
|
||||
-1 b c d e 1
|
||||
DROP TABLE t1;
|
||||
SET sort_buffer_size=DEFAULT;
|
||||
|
@ -6,3 +6,15 @@ set @my_max_allowed_packet= @@max_allowed_packet;
|
||||
set global max_allowed_packet=100*@@max_allowed_packet;
|
||||
set global max_allowed_packet=@my_max_allowed_packet;
|
||||
drop table t1;
|
||||
End of 5.1 tests
|
||||
#
|
||||
# Bug #11766306: 59393: HAVE_INNODB=YES WHEN MYSQLD
|
||||
# STARTED WITH --SKIP-INNODB
|
||||
#
|
||||
SHOW VARIABLES LIKE 'have_innodb';
|
||||
Variable_name Value
|
||||
have_innodb DISABLED
|
||||
SELECT SUPPORT FROM INFORMATION_SCHEMA.ENGINES WHERE engine='innodb';
|
||||
SUPPORT
|
||||
NO
|
||||
End of 5.5 tests
|
||||
|
@ -451,4 +451,21 @@ SELECT CONVERT(t2.a USING UTF8) FROM t1, t1 t2 LIMIT 1
|
||||
1
|
||||
1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #11765023: 57934: DOS POSSIBLE SINCE BINARY CASTING
|
||||
# DOESN'T ADHERE TO MAX_ALLOWED_PACKET
|
||||
SET @@GLOBAL.max_allowed_packet=2048;
|
||||
Warnings:
|
||||
Warning 1708 The value of 'max_allowed_packet' should be no less than the value of 'net_buffer_length'
|
||||
SELECT CONVERT('a', BINARY(2049));
|
||||
CONVERT('a', BINARY(2049))
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1301 Result of cast_as_binary() was larger than max_allowed_packet (2048) - truncated
|
||||
SELECT CONVERT('a', CHAR(2049));
|
||||
CONVERT('a', CHAR(2049))
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1301 Result of cast_as_char() was larger than max_allowed_packet (2048) - truncated
|
||||
SET @@GLOBAL.max_allowed_packet=default;
|
||||
End of 5.1 tests
|
||||
|
@ -2046,7 +2046,7 @@ create table t2 as select concat(a) from t1;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`concat(a)` varbinary(2) DEFAULT NULL
|
||||
`concat(a)` varbinary(4) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1, t2;
|
||||
create table t1 (a year);
|
||||
@ -2355,7 +2355,7 @@ insert into t1 values (1);
|
||||
create view v1(a) as select concat(a) from t1;
|
||||
show columns from v1;
|
||||
Field Type Null Key Default Extra
|
||||
a varbinary(2) YES NULL
|
||||
a varbinary(4) YES NULL
|
||||
select hex(a) from v1;
|
||||
hex(a)
|
||||
3031
|
||||
@ -2807,6 +2807,32 @@ HEX(DATE_SUB(CAST('2007-08-03 17:33:00' AS DATETIME), INTERVAL 1 MINUTE)) AS fie
|
||||
field_str1 field1_str2 field_date field_datetime
|
||||
323030372D30382D30322032333A35393A3030 323030372D30382D30332031373A33323A3030 323030372D30382D3032 323030372D30382D30332031373A33323A3030
|
||||
#
|
||||
# Bug#11926811 / Bug#60625 Illegal mix of collations
|
||||
#
|
||||
SELECT @@collation_connection;
|
||||
@@collation_connection
|
||||
binary
|
||||
CREATE PROCEDURE p1()
|
||||
BEGIN
|
||||
DECLARE v_LastPaymentDate DATETIME DEFAULT NULL;
|
||||
SELECT v_LastPaymentDate < NOW();
|
||||
EXPLAIN EXTENDED SELECT v_LastPaymentDate < NOW();
|
||||
SHOW WARNINGS;
|
||||
EXPLAIN EXTENDED SELECT CONCAT(v_LastPaymentDate, NOW());
|
||||
END//
|
||||
CALL p1;
|
||||
v_LastPaymentDate < NOW()
|
||||
NULL
|
||||
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
|
||||
Level Code Message
|
||||
Note 1003 select (v_LastPaymentDate@0 < now()) AS `v_LastPaymentDate < NOW()`
|
||||
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
|
||||
Warnings:
|
||||
Note 1003 select concat(v_LastPaymentDate@0,now()) AS `CONCAT(v_LastPaymentDate, NOW())`
|
||||
DROP PROCEDURE p1;
|
||||
#
|
||||
# Bug#52159 returning time type from function and empty left join causes debug assertion
|
||||
#
|
||||
CREATE FUNCTION f1() RETURNS TIME RETURN 1;
|
||||
|
@ -2438,7 +2438,7 @@ create table t2 as select concat(a) from t1;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`concat(a)` varchar(2) CHARACTER SET cp1251 DEFAULT NULL
|
||||
`concat(a)` varchar(4) CHARACTER SET cp1251 DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1, t2;
|
||||
create table t1 (a year);
|
||||
@ -2747,7 +2747,7 @@ insert into t1 values (1);
|
||||
create view v1(a) as select concat(a) from t1;
|
||||
show columns from v1;
|
||||
Field Type Null Key Default Extra
|
||||
a varchar(2) YES NULL
|
||||
a varchar(4) YES NULL
|
||||
select hex(a) from v1;
|
||||
hex(a)
|
||||
3031
|
||||
@ -3199,6 +3199,32 @@ HEX(DATE_SUB(CAST('2007-08-03 17:33:00' AS DATETIME), INTERVAL 1 MINUTE)) AS fie
|
||||
field_str1 field1_str2 field_date field_datetime
|
||||
323030372D30382D30322032333A35393A3030 323030372D30382D30332031373A33323A3030 323030372D30382D3032 323030372D30382D30332031373A33323A3030
|
||||
#
|
||||
# Bug#11926811 / Bug#60625 Illegal mix of collations
|
||||
#
|
||||
SELECT @@collation_connection;
|
||||
@@collation_connection
|
||||
cp1251_general_ci
|
||||
CREATE PROCEDURE p1()
|
||||
BEGIN
|
||||
DECLARE v_LastPaymentDate DATETIME DEFAULT NULL;
|
||||
SELECT v_LastPaymentDate < NOW();
|
||||
EXPLAIN EXTENDED SELECT v_LastPaymentDate < NOW();
|
||||
SHOW WARNINGS;
|
||||
EXPLAIN EXTENDED SELECT CONCAT(v_LastPaymentDate, NOW());
|
||||
END//
|
||||
CALL p1;
|
||||
v_LastPaymentDate < NOW()
|
||||
NULL
|
||||
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
|
||||
Level Code Message
|
||||
Note 1003 select (v_LastPaymentDate@0 < now()) AS `v_LastPaymentDate < NOW()`
|
||||
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
|
||||
Warnings:
|
||||
Note 1003 select concat(convert(v_LastPaymentDate@0 using cp1251),now()) AS `CONCAT(v_LastPaymentDate, NOW())`
|
||||
DROP PROCEDURE p1;
|
||||
#
|
||||
# Bug#52159 returning time type from function and empty left join causes debug assertion
|
||||
#
|
||||
CREATE FUNCTION f1() RETURNS TIME RETURN 1;
|
||||
|
@ -2465,7 +2465,7 @@ create table t2 as select concat(a) from t1;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`concat(a)` varchar(2) DEFAULT NULL
|
||||
`concat(a)` varchar(4) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1, t2;
|
||||
create table t1 (a year);
|
||||
@ -2774,7 +2774,7 @@ insert into t1 values (1);
|
||||
create view v1(a) as select concat(a) from t1;
|
||||
show columns from v1;
|
||||
Field Type Null Key Default Extra
|
||||
a varchar(2) YES NULL
|
||||
a varchar(4) YES NULL
|
||||
select hex(a) from v1;
|
||||
hex(a)
|
||||
3031
|
||||
@ -3226,6 +3226,32 @@ HEX(DATE_SUB(CAST('2007-08-03 17:33:00' AS DATETIME), INTERVAL 1 MINUTE)) AS fie
|
||||
field_str1 field1_str2 field_date field_datetime
|
||||
323030372D30382D30322032333A35393A3030 323030372D30382D30332031373A33323A3030 323030372D30382D3032 323030372D30382D30332031373A33323A3030
|
||||
#
|
||||
# Bug#11926811 / Bug#60625 Illegal mix of collations
|
||||
#
|
||||
SELECT @@collation_connection;
|
||||
@@collation_connection
|
||||
latin1_swedish_ci
|
||||
CREATE PROCEDURE p1()
|
||||
BEGIN
|
||||
DECLARE v_LastPaymentDate DATETIME DEFAULT NULL;
|
||||
SELECT v_LastPaymentDate < NOW();
|
||||
EXPLAIN EXTENDED SELECT v_LastPaymentDate < NOW();
|
||||
SHOW WARNINGS;
|
||||
EXPLAIN EXTENDED SELECT CONCAT(v_LastPaymentDate, NOW());
|
||||
END//
|
||||
CALL p1;
|
||||
v_LastPaymentDate < NOW()
|
||||
NULL
|
||||
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
|
||||
Level Code Message
|
||||
Note 1003 select (v_LastPaymentDate@0 < now()) AS `v_LastPaymentDate < NOW()`
|
||||
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
|
||||
Warnings:
|
||||
Note 1003 select concat(v_LastPaymentDate@0,now()) AS `CONCAT(v_LastPaymentDate, NOW())`
|
||||
DROP PROCEDURE p1;
|
||||
#
|
||||
# Bug#52159 returning time type from function and empty left join causes debug assertion
|
||||
#
|
||||
CREATE FUNCTION f1() RETURNS TIME RETURN 1;
|
||||
|
@ -3299,7 +3299,7 @@ create table t2 as select concat(a) from t1;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`concat(a)` varchar(2) CHARACTER SET ucs2 DEFAULT NULL
|
||||
`concat(a)` varchar(4) CHARACTER SET ucs2 DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1, t2;
|
||||
create table t1 (a year);
|
||||
@ -3608,7 +3608,7 @@ insert into t1 values (1);
|
||||
create view v1(a) as select concat(a) from t1;
|
||||
show columns from v1;
|
||||
Field Type Null Key Default Extra
|
||||
a varchar(2) YES NULL
|
||||
a varchar(4) YES NULL
|
||||
select hex(a) from v1;
|
||||
hex(a)
|
||||
00300031
|
||||
@ -4060,6 +4060,32 @@ HEX(DATE_SUB(CAST('2007-08-03 17:33:00' AS DATETIME), INTERVAL 1 MINUTE)) AS fie
|
||||
field_str1 field1_str2 field_date field_datetime
|
||||
0032003000300037002D00300038002D00300032002000320033003A00350039003A00300030 0032003000300037002D00300038002D00300033002000310037003A00330032003A00300030 323030372D30382D3032 323030372D30382D30332031373A33323A3030
|
||||
#
|
||||
# Bug#11926811 / Bug#60625 Illegal mix of collations
|
||||
#
|
||||
SELECT @@collation_connection;
|
||||
@@collation_connection
|
||||
ucs2_general_ci
|
||||
CREATE PROCEDURE p1()
|
||||
BEGIN
|
||||
DECLARE v_LastPaymentDate DATETIME DEFAULT NULL;
|
||||
SELECT v_LastPaymentDate < NOW();
|
||||
EXPLAIN EXTENDED SELECT v_LastPaymentDate < NOW();
|
||||
SHOW WARNINGS;
|
||||
EXPLAIN EXTENDED SELECT CONCAT(v_LastPaymentDate, NOW());
|
||||
END//
|
||||
CALL p1;
|
||||
v_LastPaymentDate < NOW()
|
||||
NULL
|
||||
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
|
||||
Level Code Message
|
||||
Note 1003 select (v_LastPaymentDate@0 < now()) AS `v_LastPaymentDate < NOW()`
|
||||
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
|
||||
Warnings:
|
||||
Note 1003 select concat(convert(v_LastPaymentDate@0 using ucs2),convert(now() using ucs2)) AS `CONCAT(v_LastPaymentDate, NOW())`
|
||||
DROP PROCEDURE p1;
|
||||
#
|
||||
# Bug#52159 returning time type from function and empty left join causes debug assertion
|
||||
#
|
||||
CREATE FUNCTION f1() RETURNS TIME RETURN 1;
|
||||
|
@ -4177,7 +4177,7 @@ create table t2 as select concat(a) from t1;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`concat(a)` varchar(2) CHARACTER SET utf8 DEFAULT NULL
|
||||
`concat(a)` varchar(4) CHARACTER SET utf8 DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1, t2;
|
||||
create table t1 (a year);
|
||||
@ -4486,7 +4486,7 @@ insert into t1 values (1);
|
||||
create view v1(a) as select concat(a) from t1;
|
||||
show columns from v1;
|
||||
Field Type Null Key Default Extra
|
||||
a varchar(2) YES NULL
|
||||
a varchar(4) YES NULL
|
||||
select hex(a) from v1;
|
||||
hex(a)
|
||||
3031
|
||||
@ -4938,6 +4938,32 @@ HEX(DATE_SUB(CAST('2007-08-03 17:33:00' AS DATETIME), INTERVAL 1 MINUTE)) AS fie
|
||||
field_str1 field1_str2 field_date field_datetime
|
||||
323030372D30382D30322032333A35393A3030 323030372D30382D30332031373A33323A3030 323030372D30382D3032 323030372D30382D30332031373A33323A3030
|
||||
#
|
||||
# Bug#11926811 / Bug#60625 Illegal mix of collations
|
||||
#
|
||||
SELECT @@collation_connection;
|
||||
@@collation_connection
|
||||
utf8_general_ci
|
||||
CREATE PROCEDURE p1()
|
||||
BEGIN
|
||||
DECLARE v_LastPaymentDate DATETIME DEFAULT NULL;
|
||||
SELECT v_LastPaymentDate < NOW();
|
||||
EXPLAIN EXTENDED SELECT v_LastPaymentDate < NOW();
|
||||
SHOW WARNINGS;
|
||||
EXPLAIN EXTENDED SELECT CONCAT(v_LastPaymentDate, NOW());
|
||||
END//
|
||||
CALL p1;
|
||||
v_LastPaymentDate < NOW()
|
||||
NULL
|
||||
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
|
||||
Level Code Message
|
||||
Note 1003 select (v_LastPaymentDate@0 < now()) AS `v_LastPaymentDate < NOW()`
|
||||
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
|
||||
Warnings:
|
||||
Note 1003 select concat(convert(v_LastPaymentDate@0 using utf8),now()) AS `CONCAT(v_LastPaymentDate, NOW())`
|
||||
DROP PROCEDURE p1;
|
||||
#
|
||||
# Bug#52159 returning time type from function and empty left join causes debug assertion
|
||||
#
|
||||
CREATE FUNCTION f1() RETURNS TIME RETURN 1;
|
||||
|
@ -794,3 +794,14 @@ DROP TABLE t1;
|
||||
SET @@sort_buffer_size = @old_sort_buffer_size;
|
||||
SET @@max_heap_table_size = @old_max_heap_table_size;
|
||||
End of 5.1 tests
|
||||
#
|
||||
# Bug #11744875: 4082: integer lengths cause truncation with distinct concat and innodb
|
||||
#
|
||||
CREATE TABLE t1 (a INT(1), b INT(1));
|
||||
INSERT INTO t1 VALUES (1111, 2222), (3333, 4444);
|
||||
SELECT DISTINCT CONCAT(a,b) AS c FROM t1 ORDER BY 1;
|
||||
c
|
||||
11112222
|
||||
33334444
|
||||
DROP TABLE t1;
|
||||
End of 5.5 tests
|
||||
|
@ -1,3 +1,4 @@
|
||||
call mtr.add_suppression("Column count of mysql.event is wrong. Expected .*, found .*\. The table is probably corrupted");
|
||||
drop database if exists events_test;
|
||||
drop database if exists db_x;
|
||||
drop database if exists mysqltest_db2;
|
||||
@ -259,33 +260,36 @@ events_test intact_check root@localhost SYSTEM RECURRING NULL 10 # # NULL ENABLE
|
||||
Try to alter mysql.event: the server should fail to load
|
||||
event information after mysql.event was tampered with.
|
||||
|
||||
First, let's add a column to the end and make sure everything
|
||||
works as before
|
||||
First, let's add a column to the end and check the error is emitted.
|
||||
|
||||
ALTER TABLE mysql.event ADD dummy INT;
|
||||
SHOW EVENTS;
|
||||
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
|
||||
events_test intact_check root@localhost SYSTEM RECURRING NULL 10 # # NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
SELECT event_name FROM INFORMATION_SCHEMA.events;
|
||||
event_name
|
||||
intact_check
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
SHOW CREATE EVENT intact_check;
|
||||
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
|
||||
intact_check SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `intact_check` ON SCHEDULE EVERY 10 HOUR STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO SELECT "nothing" latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP EVENT no_such_event;
|
||||
ERROR HY000: Unknown event 'no_such_event'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
CREATE EVENT intact_check_1 ON SCHEDULE EVERY 5 HOUR DO SELECT 5;
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
ALTER EVENT intact_check_1 ON SCHEDULE EVERY 8 HOUR DO SELECT 8;
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
ALTER EVENT intact_check_1 RENAME TO intact_check_2;
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP EVENT intact_check_1;
|
||||
ERROR HY000: Unknown event 'intact_check_1'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP EVENT intact_check_2;
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP EVENT intact_check;
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP DATABASE IF EXISTS mysqltest_no_such_database;
|
||||
Warnings:
|
||||
Note 1008 Can't drop database 'mysqltest_no_such_database'; database doesn't exist
|
||||
CREATE DATABASE mysqltest_db2;
|
||||
DROP DATABASE mysqltest_db2;
|
||||
Warnings:
|
||||
Error 1545 Failed to open mysql.event
|
||||
SELECT @@event_scheduler;
|
||||
@@event_scheduler
|
||||
OFF
|
||||
@ -294,6 +298,7 @@ Variable_name Value
|
||||
event_scheduler OFF
|
||||
SET GLOBAL event_scheduler=OFF;
|
||||
ALTER TABLE mysql.event DROP dummy;
|
||||
DROP EVENT intact_check;
|
||||
CREATE EVENT intact_check ON SCHEDULE EVERY 10 HOUR DO SELECT "nothing";
|
||||
|
||||
Now let's add a column to the first position: the server
|
||||
@ -301,30 +306,32 @@ expects to see event schema name there
|
||||
|
||||
ALTER TABLE mysql.event ADD dummy INT FIRST;
|
||||
SHOW EVENTS;
|
||||
ERROR HY000: Cannot load from mysql.event. The table is probably corrupted
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
SELECT event_name FROM INFORMATION_SCHEMA.events;
|
||||
ERROR HY000: Cannot load from mysql.event. The table is probably corrupted
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
SHOW CREATE EVENT intact_check;
|
||||
ERROR HY000: Unknown event 'intact_check'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP EVENT no_such_event;
|
||||
ERROR HY000: Unknown event 'no_such_event'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
CREATE EVENT intact_check_1 ON SCHEDULE EVERY 5 HOUR DO SELECT 5;
|
||||
ERROR HY000: Failed to store event name. Error code 2 from storage engine.
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
ALTER EVENT intact_check_1 ON SCHEDULE EVERY 8 HOUR DO SELECT 8;
|
||||
ERROR HY000: Unknown event 'intact_check_1'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
ALTER EVENT intact_check_1 RENAME TO intact_check_2;
|
||||
ERROR HY000: Unknown event 'intact_check_1'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP EVENT intact_check_1;
|
||||
ERROR HY000: Unknown event 'intact_check_1'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP EVENT intact_check_2;
|
||||
ERROR HY000: Unknown event 'intact_check_2'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP EVENT intact_check;
|
||||
ERROR HY000: Unknown event 'intact_check'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP DATABASE IF EXISTS mysqltest_no_such_database;
|
||||
Warnings:
|
||||
Note 1008 Can't drop database 'mysqltest_no_such_database'; database doesn't exist
|
||||
CREATE DATABASE mysqltest_db2;
|
||||
DROP DATABASE mysqltest_db2;
|
||||
Warnings:
|
||||
Error 1545 Failed to open mysql.event
|
||||
SELECT @@event_scheduler;
|
||||
@@event_scheduler
|
||||
OFF
|
||||
@ -345,29 +352,32 @@ Drop some columns and try more checks.
|
||||
|
||||
ALTER TABLE mysql.event DROP comment, DROP starts;
|
||||
SHOW EVENTS;
|
||||
ERROR HY000: Cannot load from mysql.event. The table is probably corrupted
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
SELECT event_name FROM INFORMATION_SCHEMA.EVENTS;
|
||||
ERROR HY000: Cannot load from mysql.event. The table is probably corrupted
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
SHOW CREATE EVENT intact_check;
|
||||
ERROR HY000: Cannot load from mysql.event. The table is probably corrupted
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP EVENT no_such_event;
|
||||
ERROR HY000: Unknown event 'no_such_event'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
CREATE EVENT intact_check_1 ON SCHEDULE EVERY 5 HOUR DO SELECT 5;
|
||||
ERROR HY000: Column count of mysql.event is wrong. Expected 22, found 20. The table is probably corrupted
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
ALTER EVENT intact_check_1 ON SCHEDULE EVERY 8 HOUR DO SELECT 8;
|
||||
ERROR HY000: Unknown event 'intact_check_1'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
ALTER EVENT intact_check_1 RENAME TO intact_check_2;
|
||||
ERROR HY000: Unknown event 'intact_check_1'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP EVENT intact_check_1;
|
||||
ERROR HY000: Unknown event 'intact_check_1'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP EVENT intact_check_2;
|
||||
ERROR HY000: Unknown event 'intact_check_2'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP EVENT intact_check;
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP DATABASE IF EXISTS mysqltest_no_such_database;
|
||||
Warnings:
|
||||
Note 1008 Can't drop database 'mysqltest_no_such_database'; database doesn't exist
|
||||
CREATE DATABASE mysqltest_db2;
|
||||
DROP DATABASE mysqltest_db2;
|
||||
Warnings:
|
||||
Error 1545 Failed to open mysql.event
|
||||
SELECT @@event_scheduler;
|
||||
@@event_scheduler
|
||||
OFF
|
||||
@ -425,4 +435,42 @@ CREATE TABLE mysql.event like event_like;
|
||||
DROP TABLE event_like;
|
||||
SHOW EVENTS;
|
||||
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
|
||||
|
||||
#
|
||||
# Bug#12394306: the sever may crash if mysql.event is corrupted
|
||||
#
|
||||
|
||||
CREATE EVENT ev1 ON SCHEDULE EVERY 5 HOUR DO SELECT 5;
|
||||
ALTER EVENT ev1 ON SCHEDULE EVERY 8 HOUR DO SELECT 8;
|
||||
|
||||
CREATE TABLE event_original LIKE mysql.event;
|
||||
INSERT INTO event_original SELECT * FROM mysql.event;
|
||||
|
||||
ALTER TABLE mysql.event MODIFY modified CHAR(1);
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'modified' at row 1
|
||||
|
||||
SHOW EVENTS;
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
|
||||
SELECT event_name, created, last_altered FROM information_schema.events;
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
|
||||
CREATE EVENT ev2 ON SCHEDULE EVERY 5 HOUR DO SELECT 5;
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
|
||||
ALTER EVENT ev1 ON SCHEDULE EVERY 9 HOUR DO SELECT 9;
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
|
||||
DROP TABLE mysql.event;
|
||||
RENAME TABLE event_original TO mysql.event;
|
||||
|
||||
DROP EVENT ev1;
|
||||
|
||||
SHOW EVENTS;
|
||||
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
|
||||
|
||||
#
|
||||
# End of tests
|
||||
#
|
||||
drop database events_test;
|
||||
|
@ -747,6 +747,15 @@ event_name originator
|
||||
ev1 4294967295
|
||||
DROP EVENT ev1;
|
||||
SET GLOBAL server_id = @old_server_id;
|
||||
CREATE DATABASE event_test12;
|
||||
USE event_test12;
|
||||
CREATE EVENT ev1 ON SCHEDULE EVERY 1 DAY DO SELECT 1;
|
||||
CREATE DATABASE event_test1;
|
||||
USE event_test1;
|
||||
SHOW EVENTS;
|
||||
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
|
||||
DROP DATABASE event_test1;
|
||||
DROP DATABASE event_test12;
|
||||
DROP DATABASE events_test;
|
||||
SET GLOBAL event_scheduler= 'ON';
|
||||
SET @@global.concurrent_insert= @concurrent_insert;
|
||||
|
@ -1,3 +1,4 @@
|
||||
call mtr.add_suppression("Column count of mysql.event is wrong. Expected .*, found .*\. The table is probably corrupted");
|
||||
set global event_scheduler=off;
|
||||
drop database if exists events_test;
|
||||
create database events_test;
|
||||
@ -52,6 +53,8 @@ Warnings:
|
||||
Note 1008 Can't drop database 'mysqltest_database_not_exists'; database doesn't exist
|
||||
create database mysqltest_db1;
|
||||
drop database mysqltest_db1;
|
||||
Warnings:
|
||||
Error 1545 Failed to open mysql.event
|
||||
Restore the original mysql.event table
|
||||
drop table mysql.event;
|
||||
rename table event_like to mysql.event;
|
||||
|
@ -180,7 +180,6 @@ ERROR 42000: Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP col
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Error 1140 Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause
|
||||
Note 1003 select 1 AS `1` from `test`.`t1` where <not>(<exists>(...))
|
||||
SET SESSION sql_mode=@old_sql_mode;
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests.
|
||||
@ -318,3 +317,17 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
DEALLOCATE PREPARE stmt;
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests.
|
||||
#
|
||||
# Bug#11829785 EXPLAIN EXTENDED CRASH WITH RIGHT OUTER JOIN, SUBQUERIES
|
||||
#
|
||||
CREATE TABLE t1(a INT);
|
||||
INSERT INTO t1 VALUES (0), (0);
|
||||
PREPARE s FROM
|
||||
'EXPLAIN EXTENDED
|
||||
SELECT SUBSTRING(1, (SELECT 1 FROM t1 a1 RIGHT OUTER JOIN t1 ON 0)) AS d
|
||||
FROM t1 WHERE 0 > ANY (SELECT @a FROM t1)';
|
||||
EXECUTE s;
|
||||
ERROR 21000: Subquery returns more than 1 row
|
||||
DEALLOCATE PREPARE s;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
|
@ -135,4 +135,17 @@ SELECT * FROM t1 PROCEDURE ANALYSE();
|
||||
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
|
||||
test.t1.a e e- 1 2 0 0 1.3333 NULL ENUM('e','e-') NOT NULL
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#11756242 48137: PROCEDURE ANALYSE() LEAKS MEMORY WHEN RETURNING NULL
|
||||
#
|
||||
CREATE TABLE t1(f1 INT) ENGINE=MYISAM;
|
||||
CREATE TABLE t2(f2 INT) ENGINE=INNODB;
|
||||
INSERT INTO t2 VALUES (1);
|
||||
SELECT DISTINCTROW f1 FROM t1 NATURAL RIGHT OUTER JOIN t2 PROCEDURE ANALYSE();
|
||||
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
|
||||
test.t1.f1 NULL NULL 0 0 0 1 0.0 0.0 CHAR(0)
|
||||
SELECT * FROM t2 LIMIT 1 PROCEDURE ANALYSE();
|
||||
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
|
||||
test.t2.f2 1 1 1 1 0 0 1.0000 0.0000 ENUM('1') NOT NULL
|
||||
DROP TABLE t1, t2;
|
||||
End of 5.1 tests
|
||||
|
@ -1056,7 +1056,6 @@ ERROR HY000: Only constant XPATH queries are supported
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Error 1105 Only constant XPATH queries are supported
|
||||
Note 1003 select updatexml('1',`test`.`t1`.`a`,'1') AS `UPDATEXML('1', a, '1')` from `test`.`t1` order by (select group_concat(1 separator ',') from `test`.`t1`)
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
DROP TABLE IF EXISTS t1, t2;
|
||||
|
@ -1737,6 +1737,26 @@ SELECT MIN(GET_LOCK('aaaaaaaaaaaaaaaaa',0) / '0b11111111111111111111111111111111
|
||||
SELECT MIN(GET_LOCK('aaaaaaaaaaaaaaaaa',0) / '0b1111111111111111111111111111111111111111111111111111111111111111111111111' ^ (RAND()));
|
||||
SELECT RELEASE_LOCK('aaaaaaaaaaaaaaaaa');
|
||||
#
|
||||
# Bug #11766094 - 59132: MIN() AND MAX() REMOVE UNSIGNEDNESS
|
||||
#
|
||||
CREATE TABLE t1 (a BIGINT UNSIGNED);
|
||||
INSERT INTO t1 VALUES (18446668621106209655);
|
||||
SELECT MAX(LENGTH(a)), LENGTH(MAX(a)), MIN(a), MAX(a), CONCAT(MIN(a)), CONCAT(MAX(a)) FROM t1;
|
||||
MAX(LENGTH(a)) LENGTH(MAX(a)) MIN(a) MAX(a) CONCAT(MIN(a)) CONCAT(MAX(a))
|
||||
20 20 18446668621106209655 18446668621106209655 18446668621106209655 18446668621106209655
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #11766270 59343: YEAR(4): INCORRECT RESULT AND VALGRIND WARNINGS WITH MIN/MAX, UNION
|
||||
#
|
||||
CREATE TABLE t1(f1 YEAR(4));
|
||||
INSERT INTO t1 VALUES (0000),(2001);
|
||||
(SELECT MAX(f1) FROM t1) UNION (SELECT MAX(f1) FROM t1);
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def MAX(f1) MAX(f1) 13 4 4 Y 32864 0 63
|
||||
MAX(f1)
|
||||
2001
|
||||
DROP TABLE t1;
|
||||
#
|
||||
End of 5.1 tests
|
||||
#
|
||||
# Bug#52123 Assertion failed: aggregator == aggr->Aggrtype(),
|
||||
|
@ -770,4 +770,10 @@ CASE a WHEN a THEN a END
|
||||
NULL
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #11766212 59270: NOT IN (YEAR( ... ), ... ) PRODUCES MANY VALGRIND WARNINGS
|
||||
#
|
||||
SELECT 1 IN (YEAR(FROM_UNIXTIME(NULL)) ,1);
|
||||
1 IN (YEAR(FROM_UNIXTIME(NULL)) ,1)
|
||||
1
|
||||
#
|
||||
End of 5.1 tests
|
||||
|
@ -514,6 +514,35 @@ t1 CREATE TABLE `t1` (
|
||||
`C` varchar(23) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#11764994 57900: CREATE TABLE .. SELECT ASSERTS SCALE >= 0 && PRECISION > 0 && SCALE <= PR
|
||||
#
|
||||
CREATE TABLE t1 SELECT CEIL(LINESTRINGFROMWKB(1) DIV NULL);
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 SELECT FLOOR(LINESTRINGFROMWKB(1) DIV NULL);
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#11765923 58937: MANY VALGRIND ERRORS AFTER GROUPING BY RESULT OF DECIMAL COLUMN FUNCTION
|
||||
#
|
||||
CREATE TABLE t1(f1 DECIMAL(22,1));
|
||||
INSERT INTO t1 VALUES (0),(1);
|
||||
SELECT ROUND(f1, f1) FROM t1;
|
||||
ROUND(f1, f1)
|
||||
0.0
|
||||
1.0
|
||||
SELECT ROUND(f1, f1) FROM t1 GROUP BY 1;
|
||||
ROUND(f1, f1)
|
||||
0.0
|
||||
1.0
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#11764671 57533: UNINITIALISED VALUES IN COPY_AND_CONVERT (SQL_STRING.CC) WITH CERTAIN CHA
|
||||
#
|
||||
SELECT ROUND(LEAST(15, -4939092, 0.2704), STDDEV('a'));
|
||||
ROUND(LEAST(15, -4939092, 0.2704), STDDEV('a'))
|
||||
-4939092.0000
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'a'
|
||||
End of 5.1 tests
|
||||
#
|
||||
# Bug #8433: Overflow must be an error
|
||||
@ -656,3 +685,11 @@ Warning 1366 Incorrect decimal value: '' for column '' at row -1
|
||||
SELECT 1 div null;
|
||||
1 div null
|
||||
NULL
|
||||
#
|
||||
# Bug #11792200 - DIVIDING LARGE NUMBERS CAUSES STACK CORRUPTIONS
|
||||
#
|
||||
select (1.175494351E-37 div 1.7976931348623157E+308);
|
||||
(1.175494351E-37 div 1.7976931348623157E+308)
|
||||
0
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DECIMAL value: ''
|
||||
|
@ -1347,6 +1347,48 @@ Warning 1292 Truncated incorrect time value: ''
|
||||
Warning 1292 Truncated incorrect time value: ''
|
||||
Warning 1292 Truncated incorrect time value: ''
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#11766112 59151:UNINITIALIZED VALUES IN EXTRACT_DATE_TIME WITH STR_TO_DATE(SPACE(..) ...
|
||||
#
|
||||
SELECT STR_TO_DATE(SPACE(2),'1');
|
||||
STR_TO_DATE(SPACE(2),'1')
|
||||
0000-00-00
|
||||
#
|
||||
# Bug#11765216 58154: UNINITIALIZED VARIABLE FORMAT IN STR_TO_DATE FUNCTION
|
||||
#
|
||||
SET GLOBAL SQL_MODE='';
|
||||
DO STR_TO_DATE((''), FROM_DAYS(@@GLOBAL.SQL_MODE));
|
||||
SET GLOBAL SQL_MODE=DEFAULT;
|
||||
#
|
||||
# Bug#11766087 59125: VALGRIND UNINITIALISED VALUE WARNING IN ULL2DEC, LONGLONG2DECIMAL
|
||||
#
|
||||
SELECT FORMAT(YEAR(STR_TO_DATE('',GET_FORMAT(TIME,''))),1);
|
||||
FORMAT(YEAR(STR_TO_DATE('',GET_FORMAT(TIME,''))),1)
|
||||
NULL
|
||||
#
|
||||
# Bug#11766126 59166: ANOTHER DATETIME VALGRIND UNINITIALIZED WARNING
|
||||
#
|
||||
SELECT CAST((MONTH(FROM_UNIXTIME(@@GLOBAL.SQL_MODE))) AS BINARY(1025));
|
||||
CAST((MONTH(FROM_UNIXTIME(@@GLOBAL.SQL_MODE))) AS BINARY(1025))
|
||||
NULL
|
||||
#
|
||||
# Bug#11766124 59164: VALGRIND: UNINITIALIZED VALUE IN NUMBER_TO_DATETIME
|
||||
#
|
||||
SELECT ADDDATE(MONTH(FROM_UNIXTIME(NULL)),INTERVAL 1 HOUR);
|
||||
ADDDATE(MONTH(FROM_UNIXTIME(NULL)),INTERVAL 1 HOUR)
|
||||
NULL
|
||||
#
|
||||
# Bug#11889186 60503: CRASH IN MAKE_DATE_TIME WITH DATE_FORMAT / STR_TO_DATE COMBINATION
|
||||
#
|
||||
SELECT DATE_FORMAT('0000-00-11', '%W');
|
||||
DATE_FORMAT('0000-00-11', '%W')
|
||||
NULL
|
||||
SELECT DATE_FORMAT('0000-00-11', '%a');
|
||||
DATE_FORMAT('0000-00-11', '%a')
|
||||
NULL
|
||||
SELECT DATE_FORMAT('0000-00-11', '%w');
|
||||
DATE_FORMAT('0000-00-11', '%w')
|
||||
NULL
|
||||
End of 5.1 tests
|
||||
#
|
||||
# Bug#57039: constant subtime expression returns incorrect result.
|
||||
|
@ -1043,6 +1043,10 @@ create spatial index i on t1 (a);
|
||||
ERROR 42000: A SPATIAL index may only contain a geometrical type column
|
||||
drop table t1;
|
||||
End of 5.1 tests
|
||||
CREATE TABLE t0 (a BINARY(32) NOT NULL);
|
||||
CREATE SPATIAL INDEX i on t0 (a);
|
||||
ERROR 42000: A SPATIAL index may only contain a geometrical type column
|
||||
INSERT INTO t0 VALUES (1);
|
||||
CREATE TABLE t1(
|
||||
col0 BINARY NOT NULL,
|
||||
col2 TIMESTAMP,
|
||||
@ -1071,5 +1075,5 @@ col2 LINESTRING,
|
||||
SPATIAL INDEX i1 (col1, col2)
|
||||
);
|
||||
ERROR HY000: Incorrect arguments to SPATIAL INDEX
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
DROP TABLE t0, t1, t2;
|
||||
End of 5.5 tests
|
||||
|
@ -54,7 +54,7 @@ max_updates 0
|
||||
max_connections 0
|
||||
max_user_connections 0
|
||||
plugin
|
||||
authentication_string
|
||||
authentication_string NULL
|
||||
show grants for mysqltest_1@localhost;
|
||||
Grants for mysqltest_1@localhost
|
||||
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE CIPHER 'EDH-RSA-DES-CBC3-SHA'
|
||||
@ -125,7 +125,7 @@ max_updates 0
|
||||
max_connections 0
|
||||
max_user_connections 0
|
||||
plugin
|
||||
authentication_string
|
||||
authentication_string NULL
|
||||
show grants for mysqltest_1@localhost;
|
||||
Grants for mysqltest_1@localhost
|
||||
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' WITH MAX_QUERIES_PER_HOUR 10
|
||||
@ -172,7 +172,7 @@ max_updates 20
|
||||
max_connections 30
|
||||
max_user_connections 0
|
||||
plugin
|
||||
authentication_string
|
||||
authentication_string NULL
|
||||
show grants for mysqltest_1@localhost;
|
||||
Grants for mysqltest_1@localhost
|
||||
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' WITH MAX_QUERIES_PER_HOUR 10 MAX_UPDATES_PER_HOUR 20 MAX_CONNECTIONS_PER_HOUR 30
|
||||
@ -284,7 +284,6 @@ Warnings:
|
||||
Warning 1364 Field 'ssl_cipher' doesn't have a default value
|
||||
Warning 1364 Field 'x509_issuer' doesn't have a default value
|
||||
Warning 1364 Field 'x509_subject' doesn't have a default value
|
||||
Warning 1364 Field 'authentication_string' doesn't have a default value
|
||||
insert into mysql.db (host, db, user, select_priv) values
|
||||
('localhost', 'a%', 'test11', 'Y'), ('localhost', 'ab%', 'test11', 'Y');
|
||||
alter table mysql.db order by db asc;
|
||||
|
@ -287,7 +287,6 @@ Warnings:
|
||||
Warning 1364 Field 'ssl_cipher' doesn't have a default value
|
||||
Warning 1364 Field 'x509_issuer' doesn't have a default value
|
||||
Warning 1364 Field 'x509_subject' doesn't have a default value
|
||||
Warning 1364 Field 'authentication_string' doesn't have a default value
|
||||
create user mysqltest_A@'%';
|
||||
rename user mysqltest_B@'%' to mysqltest_C@'%';
|
||||
drop user mysqltest_C@'%';
|
||||
@ -355,7 +354,6 @@ Warnings:
|
||||
Warning 1364 Field 'ssl_cipher' doesn't have a default value
|
||||
Warning 1364 Field 'x509_issuer' doesn't have a default value
|
||||
Warning 1364 Field 'x509_subject' doesn't have a default value
|
||||
Warning 1364 Field 'authentication_string' doesn't have a default value
|
||||
INSERT INTO mysql.db (host, db, user, select_priv) VALUES
|
||||
('%','TESTDB','mysqltest_1','Y');
|
||||
FLUSH PRIVILEGES;
|
||||
|
@ -547,4 +547,26 @@ FROM t1 JOIN t2 ON t2.f2 LIKE 'x'
|
||||
HAVING field1 < 7;
|
||||
field1
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
# Bug#48916 Server incorrectly processing HAVING clauses with an ORDER BY clause
|
||||
#
|
||||
CREATE TABLE t1 (f1 INT, f2 INT);
|
||||
INSERT INTO t1 VALUES (1, 0), (2, 1), (3, 2);
|
||||
CREATE TABLE t2 (f1 INT, f2 INT);
|
||||
SELECT t1.f1
|
||||
FROM t1
|
||||
HAVING (3, 2) IN (SELECT f1, f2 FROM t2) AND t1.f1 >= 0
|
||||
ORDER BY t1.f1;
|
||||
f1
|
||||
SELECT t1.f1
|
||||
FROM t1
|
||||
HAVING (3, 2) IN (SELECT 4, 2) AND t1.f1 >= 0
|
||||
ORDER BY t1.f1;
|
||||
f1
|
||||
SELECT t1.f1
|
||||
FROM t1
|
||||
HAVING 2 IN (SELECT f2 FROM t2) AND t1.f1 >= 0
|
||||
ORDER BY t1.f1;
|
||||
f1
|
||||
DROP TABLE t1,t2;
|
||||
End of 5.1 tests
|
||||
|
@ -148,3 +148,25 @@ COMMIT;
|
||||
# Connection default
|
||||
DROP TABLE t1, t2;
|
||||
DROP VIEW v1;
|
||||
#
|
||||
# Bug#11815600 [ERROR] INNODB COULD NOT FIND INDEX PRIMARY
|
||||
# KEY NO 0 FOR TABLE IN ERROR LOG
|
||||
#
|
||||
DROP TABLE IF EXISTS t1;
|
||||
# Connection default
|
||||
CREATE TABLE t1 (id INT PRIMARY KEY, value INT) ENGINE = InnoDB;
|
||||
INSERT INTO t1 VALUES (1, 12345);
|
||||
START TRANSACTION;
|
||||
SELECT * FROM t1;
|
||||
id value
|
||||
1 12345
|
||||
# Connection con1
|
||||
SET lock_wait_timeout=1;
|
||||
ALTER TABLE t1 ADD INDEX idx(value);
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
# Connection default
|
||||
SELECT * FROM t1;
|
||||
id value
|
||||
1 12345
|
||||
COMMIT;
|
||||
DROP TABLE t1;
|
||||
|
@ -94,74 +94,6 @@ SET DEBUG_SYNC= 'RESET';
|
||||
# Bug#42230 during add index, cannot do queries on storage engines
|
||||
# that implement add_index
|
||||
#
|
||||
DROP DATABASE IF EXISTS db1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
# Test 1: Secondary index, should not block reads (original test case).
|
||||
# Connection default
|
||||
CREATE DATABASE db1;
|
||||
CREATE TABLE db1.t1(id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, value INT) engine=innodb;
|
||||
INSERT INTO db1.t1(value) VALUES (1), (2);
|
||||
SET DEBUG_SYNC= "alter_table_manage_keys SIGNAL manage WAIT_FOR query";
|
||||
# Sending:
|
||||
ALTER TABLE db1.t1 ADD INDEX(value);
|
||||
# Connection con1
|
||||
SET DEBUG_SYNC= "now WAIT_FOR manage";
|
||||
USE db1;
|
||||
SELECT * FROM t1;
|
||||
id value
|
||||
1 1
|
||||
2 2
|
||||
SET DEBUG_SYNC= "now SIGNAL query";
|
||||
# Connection default
|
||||
# Reaping: ALTER TABLE db1.t1 ADD INDEX(value)
|
||||
DROP DATABASE db1;
|
||||
# Test 2: Primary index (implicit), should block reads.
|
||||
CREATE TABLE t1(a INT NOT NULL, b INT NOT NULL) engine=innodb;
|
||||
SET DEBUG_SYNC= "alter_table_manage_keys SIGNAL manage WAIT_FOR query";
|
||||
# Sending:
|
||||
ALTER TABLE t1 ADD UNIQUE INDEX(a);
|
||||
# Connection con1
|
||||
SET DEBUG_SYNC= "now WAIT_FOR manage";
|
||||
USE test;
|
||||
# Sending:
|
||||
SELECT * FROM t1;
|
||||
# Connection con2
|
||||
# Waiting for SELECT to be blocked by the metadata lock on t1
|
||||
SET DEBUG_SYNC= "now SIGNAL query";
|
||||
# Connection default
|
||||
# Reaping: ALTER TABLE t1 ADD UNIQUE INDEX(a)
|
||||
# Connection con1
|
||||
# Reaping: SELECT * FROM t1
|
||||
a b
|
||||
# Test 3: Primary index (explicit), should block reads.
|
||||
# Connection default
|
||||
ALTER TABLE t1 DROP INDEX a;
|
||||
SET DEBUG_SYNC= "alter_table_manage_keys SIGNAL manage WAIT_FOR query";
|
||||
# Sending:
|
||||
ALTER TABLE t1 ADD PRIMARY KEY (a);
|
||||
# Connection con1
|
||||
SET DEBUG_SYNC= "now WAIT_FOR manage";
|
||||
# Sending:
|
||||
SELECT * FROM t1;
|
||||
# Connection con2
|
||||
# Waiting for SELECT to be blocked by the metadata lock on t1
|
||||
SET DEBUG_SYNC= "now SIGNAL query";
|
||||
# Connection default
|
||||
# Reaping: ALTER TABLE t1 ADD PRIMARY KEY (a)
|
||||
# Connection con1
|
||||
# Reaping: SELECT * FROM t1
|
||||
a b
|
||||
# Test 4: Secondary unique index, should not block reads.
|
||||
# Connection default
|
||||
SET DEBUG_SYNC= "alter_table_manage_keys SIGNAL manage WAIT_FOR query";
|
||||
# Sending:
|
||||
ALTER TABLE t1 ADD UNIQUE (b);
|
||||
# Connection con1
|
||||
SET DEBUG_SYNC= "now WAIT_FOR manage";
|
||||
SELECT * FROM t1;
|
||||
a b
|
||||
SET DEBUG_SYNC= "now SIGNAL query";
|
||||
# Connection default
|
||||
# Reaping: ALTER TABLE t1 ADD UNIQUE (b)
|
||||
SET DEBUG_SYNC= "RESET";
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# DISABLED due to Bug#11815600
|
||||
#
|
||||
|
@ -532,4 +532,20 @@ a
|
||||
0
|
||||
1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#11765139 58069: LOAD DATA INFILE: VALGRIND REPORTS INVALID MEMORY READS AND WRITES WITH U
|
||||
#
|
||||
CREATE TABLE t1(f1 INT);
|
||||
SELECT 0xE1BB30 INTO OUTFILE 't1.dat';
|
||||
LOAD DATA INFILE 't1.dat' IGNORE INTO TABLE t1 CHARACTER SET utf8;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#11765141 - 58072: LOAD DATA INFILE: LEAKS IO CACHE MEMORY
|
||||
# WHEN ERROR OCCURS
|
||||
#
|
||||
SELECT '1\n' INTO DUMPFILE 'MYSQLTEST_VARDIR/tmp/bug11735141.txt';
|
||||
create table t1(a point);
|
||||
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug11735141.txt' INTO TABLE t1;
|
||||
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
|
||||
drop table t1;
|
||||
End of 5.1 tests
|
||||
|
@ -175,6 +175,35 @@ TABLE_SCHEMA TABLE_NAME
|
||||
mysqltest_lc2 myUC
|
||||
use test;
|
||||
drop database mysqltest_LC2;
|
||||
#
|
||||
# Bug #11758687: 50924: object names not resolved correctly
|
||||
# on lctn2 systems
|
||||
#
|
||||
CREATE DATABASE BUP_XPFM_COMPAT_DB2;
|
||||
CREATE TABLE BUP_XPFM_COMPAT_DB2.TABLE2 (c13 INT) DEFAULT CHARSET latin1;
|
||||
CREATE TABLE BUP_XPFM_COMPAT_DB2.table1 (c13 INT) DEFAULT CHARSET latin1;
|
||||
CREATE TABLE bup_xpfm_compat_db2.table3 (c13 INT) DEFAULT CHARSET latin1;
|
||||
CREATE TRIGGER BUP_XPFM_COMPAT_DB2.trigger1 AFTER INSERT
|
||||
ON BUP_XPFM_COMPAT_DB2.table1 FOR EACH ROW
|
||||
update BUP_XPFM_COMPAT_DB2.table1 set c13=12;
|
||||
|
|
||||
CREATE TRIGGER BUP_XPFM_COMPAT_DB2.TRIGGER2 AFTER INSERT
|
||||
ON BUP_XPFM_COMPAT_DB2.TABLE2 FOR EACH ROW
|
||||
update BUP_XPFM_COMPAT_DB2.table1 set c13=12;
|
||||
|
|
||||
CREATE TRIGGER BUP_XPFM_COMPAT_DB2.TrigGer3 AFTER INSERT
|
||||
ON BUP_XPFM_COMPAT_DB2.TaBle3 FOR EACH ROW
|
||||
update BUP_XPFM_COMPAT_DB2.table1 set c13=12;
|
||||
|
|
||||
SELECT trigger_schema, trigger_name, event_object_table FROM
|
||||
INFORMATION_SCHEMA.TRIGGERS
|
||||
WHERE trigger_schema COLLATE utf8_bin = 'BUP_XPFM_COMPAT_DB2'
|
||||
ORDER BY trigger_schema, trigger_name;
|
||||
trigger_schema trigger_name event_object_table
|
||||
BUP_XPFM_COMPAT_DB2 trigger1 table1
|
||||
BUP_XPFM_COMPAT_DB2 TRIGGER2 TABLE2
|
||||
BUP_XPFM_COMPAT_DB2 TrigGer3 table3
|
||||
DROP DATABASE BUP_XPFM_COMPAT_DB2;
|
||||
# End of 5.1 tests
|
||||
#
|
||||
# Test for bug #44738 "fill_schema_table_from_frm() opens tables without
|
||||
|
@ -126,7 +126,7 @@ renamed
|
||||
1
|
||||
select * from v3 where renamed=1 group by renamed;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def v3 v3 renamed renamed 8 11 0 Y 32896 0 63
|
||||
def v3 v3 renamed renamed 8 12 0 Y 32896 0 63
|
||||
renamed
|
||||
drop table t1;
|
||||
drop view v1,v2,v3;
|
||||
|
@ -10,3 +10,10 @@ mysqld is alive
|
||||
# Displaying the output :
|
||||
mysqld is alive
|
||||
mysqld is alive
|
||||
#
|
||||
# BUG#11766184 - 59234: cmdline clients crash --defaults-extra-file
|
||||
# with no .cnf or .ini extension.
|
||||
#
|
||||
# Creating an empty file 'cnf_file'
|
||||
# Using --defaults-extra-file option with 'cnf_file'.
|
||||
mysqld is alive
|
||||
|
@ -903,3 +903,15 @@ master-bin.000002 # Query # # CREATE DATABASE test1
|
||||
master-bin.000002 # Query # # use `test1`; CREATE TABLE t1(id int)
|
||||
master-bin.000002 # Query # # use `test1`; DROP TABLE `t1` /* generated by server */
|
||||
master-bin.000002 # Query # # DROP DATABASE test1
|
||||
RESET MASTER;
|
||||
USE test;
|
||||
CREATE TABLE t1 (a INT);
|
||||
SET GLOBAL SERVER_ID = 2;
|
||||
DROP TABLE t1;
|
||||
FLUSH LOGS;
|
||||
SHOW TABLES IN test;
|
||||
Tables_in_test
|
||||
t1
|
||||
SHOW TABLES IN test;
|
||||
Tables_in_test
|
||||
SET GLOBAL SERVER_ID = 1;
|
||||
|
@ -109,3 +109,13 @@ count(*)
|
||||
35840
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
RESET MASTER;
|
||||
USE test;
|
||||
SET @old_binlog_format= @@binlog_format;
|
||||
SET SESSION binlog_format=ROW;
|
||||
CREATE TABLE t1(c1 INT);
|
||||
INSERT INTO t1 VALUES (1);
|
||||
FLUSH LOGS;
|
||||
DROP TABLE t1;
|
||||
SET SESSION binlog_format= @old_binlog_format;
|
||||
RESET MASTER;
|
||||
|
@ -4626,6 +4626,7 @@ DELIMITER ;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||
ALTER DATABASE `test-database` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||
DROP DATABASE `test-database`;
|
||||
USE test;
|
||||
#
|
||||
# End of 5.1 tests
|
||||
#
|
||||
|
@ -225,3 +225,25 @@ DROP SCHEMA IF EXISTS `mysqlslap`;
|
||||
DROP PROCEDURE IF EXISTS p1;
|
||||
CREATE PROCEDURE p1() SELECT 1;
|
||||
DROP PROCEDURE p1;
|
||||
#
|
||||
# Bug #11765157 - 58090: mysqlslap drops schema specified in
|
||||
# create_schema if auto-generate-sql also set.
|
||||
#
|
||||
# 'bug58090' database should not be present.
|
||||
SHOW DATABASES;
|
||||
Database
|
||||
information_schema
|
||||
mtr
|
||||
mysql
|
||||
performance_schema
|
||||
test
|
||||
# 'bug58090' database should be present.
|
||||
SHOW DATABASES;
|
||||
Database
|
||||
information_schema
|
||||
bug58090
|
||||
mtr
|
||||
mysql
|
||||
performance_schema
|
||||
test
|
||||
DROP DATABASE bug58090;
|
||||
|
@ -1429,6 +1429,7 @@ CALL mtr.add_suppression("Out of sort memory");
|
||||
select * from t1 order by b;
|
||||
ERROR HY001: Out of sort memory, consider increasing server sort buffer size
|
||||
drop table t1;
|
||||
call mtr.add_suppression("Out of sort memory; increase server sort buffer size");
|
||||
#
|
||||
# Bug #39844: Query Crash Mysql Server 5.0.67
|
||||
#
|
||||
|
@ -3,6 +3,7 @@ set @net_buffer_length=@@global.net_buffer_length;
|
||||
set global max_allowed_packet=100;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect max_allowed_packet value: '100'
|
||||
Warning 1708 The value of 'max_allowed_packet' should be no less than the value of 'net_buffer_length'
|
||||
set global net_buffer_length=100;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect net_buffer_length value: '100'
|
||||
|
@ -710,95 +710,8 @@ DROP TABLE t1;
|
||||
CREATE TABLE t1 (c TIMESTAMP)
|
||||
PARTITION BY HASH (c) PARTITIONS 4;
|
||||
ERROR HY000: Field 'c' is of a not allowed type for this type of partitioning
|
||||
# Moved to partition_myisam, since it was MyISAM specific
|
||||
# Added test with existing TIMESTAMP partitioning (when it was allowed).
|
||||
CREATE TABLE t1 (a TIMESTAMP)
|
||||
PARTITION BY HASH (UNIX_TIMESTAMP(a));
|
||||
INSERT INTO t1 VALUES ('2000-01-02 03:04:05');
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
2000-01-02 03:04:05
|
||||
FLUSH TABLES;
|
||||
# replacing t1.frm with TO_DAYS(a) which was allowed earlier.
|
||||
# Disable warnings, since the result would differ when running with
|
||||
# --ps-protocol (only for the 'SELECT * FROM t1' statement).
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
2000-01-02 03:04:05
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY HASH (TO_DAYS(a)) */
|
||||
INSERT INTO t1 VALUES ('2001-02-03 04:05:06');
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
2000-01-02 03:04:05
|
||||
2001-02-03 04:05:06
|
||||
ALTER TABLE t1 ADD PARTITION PARTITIONS 2;
|
||||
Warnings:
|
||||
Warning 1486 Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
ALTER TABLE t1
|
||||
PARTITION BY RANGE (TO_DAYS(a))
|
||||
(PARTITION p0 VALUES LESS THAN (10000),
|
||||
PARTITION p1 VALUES LESS THAN (MAXVALUE));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY HASH (TO_DAYS(a))
|
||||
PARTITIONS 3 */
|
||||
CREATE TABLE t2 LIKE t1;
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY HASH (TO_DAYS(a))
|
||||
PARTITIONS 3 */
|
||||
Warnings:
|
||||
Warning 1486 Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
DROP TABLE t2;
|
||||
CREATE TABLE t2 SELECT * FROM t1;
|
||||
DROP TABLE t2;
|
||||
ALTER TABLE t1 PARTITION BY HASH (UNIX_TIMESTAMP(a));
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY HASH (UNIX_TIMESTAMP(a)) */
|
||||
ALTER TABLE t1 ADD PARTITION PARTITIONS 2;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY HASH (UNIX_TIMESTAMP(a))
|
||||
PARTITIONS 3 */
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
2000-01-02 03:04:05
|
||||
2001-02-03 04:05:06
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#49161: Out of memory; restart server and try again (needed 2 bytes)
|
||||
#
|
||||
CREATE TABLE t1 (a INT) PARTITION BY HASH (a);
|
||||
FLUSH TABLES;
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check Error Failed to read from the .par file
|
||||
test.t1 check Error Incorrect information in file: './test/t1.frm'
|
||||
test.t1 check error Corrupt
|
||||
SELECT * FROM t1;
|
||||
ERROR HY000: Failed to read from the .par file
|
||||
# Note that it is currently impossible to drop a partitioned table
|
||||
# without the .par file
|
||||
DROP TABLE t1;
|
||||
ERROR 42S02: Unknown table 't1'
|
||||
#
|
||||
# Bug#49477: Assertion `0' failed in ha_partition.cc:5530
|
||||
# with temporary table and partitions
|
||||
@ -831,10 +744,10 @@ Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` int(11) DEFAULT NULL,
|
||||
`purchased` date DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
) ENGINE=<curr_engine> DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY RANGE (YEAR(purchased))
|
||||
SUBPARTITION BY HASH (TO_DAYS(purchased))
|
||||
(PARTITION p0 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */
|
||||
(PARTITION p0 VALUES LESS THAN MAXVALUE ENGINE = <curr_engine>) */
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (id INT, purchased DATE)
|
||||
PARTITION BY RANGE(YEAR(purchased))
|
||||
@ -852,12 +765,12 @@ Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` int(11) DEFAULT NULL,
|
||||
`purchased` date DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
) ENGINE=<curr_engine> DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY RANGE (YEAR(purchased))
|
||||
SUBPARTITION BY HASH (TO_DAYS(purchased))
|
||||
(PARTITION p0 VALUES LESS THAN MAXVALUE
|
||||
(SUBPARTITION sp0 ENGINE = MyISAM,
|
||||
SUBPARTITION sp1 ENGINE = MyISAM)) */
|
||||
(SUBPARTITION sp0 ENGINE = <curr_engine>,
|
||||
SUBPARTITION sp1 ENGINE = <curr_engine>)) */
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (id INT, purchased DATE)
|
||||
PARTITION BY RANGE(YEAR(purchased))
|
||||
@ -872,53 +785,11 @@ Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` int(11) DEFAULT NULL,
|
||||
`purchased` date DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
) ENGINE=<curr_engine> DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY RANGE (YEAR(purchased))
|
||||
(PARTITION p0 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */
|
||||
(PARTITION p0 VALUES LESS THAN MAXVALUE ENGINE = <curr_engine>) */
|
||||
DROP TABLE t1;
|
||||
SET @@sql_mode= @org_mode;
|
||||
#
|
||||
# Bug#50392: insert_id is not reset for partitioned tables
|
||||
# auto_increment on duplicate entry
|
||||
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY);
|
||||
SET INSERT_ID= 13;
|
||||
INSERT INTO t1 VALUES (NULL);
|
||||
SET INSERT_ID= 12;
|
||||
INSERT INTO t1 VALUES (NULL), (NULL), (NULL);
|
||||
ERROR 23000: Duplicate entry '13' for key 'PRIMARY'
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) NOT NULL AUTO_INCREMENT,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=14 DEFAULT CHARSET=latin1
|
||||
INSERT INTO t1 VALUES (NULL);
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
12
|
||||
13
|
||||
14
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY) PARTITION BY KEY(a);
|
||||
SET INSERT_ID= 13;
|
||||
INSERT INTO t1 VALUES (NULL);
|
||||
SET INSERT_ID= 12;
|
||||
INSERT INTO t1 VALUES (NULL), (NULL), (NULL);
|
||||
ERROR 23000: Duplicate entry '13' for key 'PRIMARY'
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) NOT NULL AUTO_INCREMENT,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=14 DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a) */
|
||||
INSERT INTO t1 VALUES (NULL);
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
12
|
||||
13
|
||||
14
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a INTEGER NOT NULL, PRIMARY KEY (a));
|
||||
INSERT INTO t1 VALUES (1),(1);
|
||||
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
||||
@ -928,19 +799,6 @@ PARTITION BY KEY (a) PARTITIONS 2;
|
||||
INSERT INTO t1 VALUES (1),(1);
|
||||
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (a)
|
||||
( PARTITION p0 ENGINE=MyISAM,
|
||||
PARTITION p1);
|
||||
ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY LIST (a)
|
||||
SUBPARTITION BY HASH (a)
|
||||
( PARTITION p0 VALUES IN (0)
|
||||
( SUBPARTITION s0, SUBPARTITION s1 ENGINE=MyISAM, SUBPARTITION s2),
|
||||
PARTITION p1 VALUES IN (1)
|
||||
( SUBPARTITION s3 ENGINE=MyISAM, SUBPARTITION s4, SUBPARTITION s5 ENGINE=MyISAM));
|
||||
ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL
|
||||
CREATE TABLE t1 (
|
||||
a int
|
||||
)
|
||||
|
250
mysql-test/r/partition_myisam.result
Normal file
250
mysql-test/r/partition_myisam.result
Normal file
@ -0,0 +1,250 @@
|
||||
DROP TABLE IF EXISTS t1, t2;
|
||||
#
|
||||
# Bug#50036: Inconsistent errors when using TIMESTAMP
|
||||
# columns/expressions
|
||||
# Added test with existing TIMESTAMP partitioning (when it was allowed).
|
||||
CREATE TABLE t1 (a TIMESTAMP)
|
||||
ENGINE = MyISAM
|
||||
PARTITION BY HASH (UNIX_TIMESTAMP(a));
|
||||
INSERT INTO t1 VALUES ('2000-01-02 03:04:05');
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
2000-01-02 03:04:05
|
||||
FLUSH TABLES;
|
||||
# replacing t1.frm with TO_DAYS(a) which was allowed earlier.
|
||||
# Disable warnings, since the result would differ when running with
|
||||
# --ps-protocol (only for the 'SELECT * FROM t1' statement).
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
2000-01-02 03:04:05
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
||||
) ENGINE=<curr_engine> DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY HASH (TO_DAYS(a)) */
|
||||
INSERT INTO t1 VALUES ('2001-02-03 04:05:06');
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
2000-01-02 03:04:05
|
||||
2001-02-03 04:05:06
|
||||
ALTER TABLE t1 ADD PARTITION PARTITIONS 2;
|
||||
Warnings:
|
||||
Warning 1486 Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
ALTER TABLE t1
|
||||
PARTITION BY RANGE (TO_DAYS(a))
|
||||
(PARTITION p0 VALUES LESS THAN (10000),
|
||||
PARTITION p1 VALUES LESS THAN (MAXVALUE));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY HASH (TO_DAYS(a))
|
||||
PARTITIONS 3 */
|
||||
CREATE TABLE t2 LIKE t1;
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY HASH (TO_DAYS(a))
|
||||
PARTITIONS 3 */
|
||||
Warnings:
|
||||
Warning 1486 Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
DROP TABLE t2;
|
||||
CREATE TABLE t2 SELECT * FROM t1;
|
||||
DROP TABLE t2;
|
||||
ALTER TABLE t1 PARTITION BY HASH (UNIX_TIMESTAMP(a));
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY HASH (UNIX_TIMESTAMP(a)) */
|
||||
ALTER TABLE t1 ADD PARTITION PARTITIONS 2;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY HASH (UNIX_TIMESTAMP(a))
|
||||
PARTITIONS 3 */
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
2000-01-02 03:04:05
|
||||
2001-02-03 04:05:06
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#31931: Mix of handlers error message
|
||||
#
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (a)
|
||||
( PARTITION p0 ENGINE=MyISAM,
|
||||
PARTITION p1);
|
||||
ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY LIST (a)
|
||||
SUBPARTITION BY HASH (a)
|
||||
( PARTITION p0 VALUES IN (0)
|
||||
( SUBPARTITION s0, SUBPARTITION s1 ENGINE=MyISAM, SUBPARTITION s2),
|
||||
PARTITION p1 VALUES IN (1)
|
||||
( SUBPARTITION s3 ENGINE=MyISAM, SUBPARTITION s4, SUBPARTITION s5 ENGINE=MyISAM));
|
||||
ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL
|
||||
#
|
||||
# Bug#49161: Out of memory; restart server and try again (needed 2 bytes)
|
||||
#
|
||||
CREATE TABLE t1 (a INT)
|
||||
ENGINE = MyISAM
|
||||
PARTITION BY HASH (a);
|
||||
FLUSH TABLES;
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check Error Failed to read from the .par file
|
||||
test.t1 check Error Incorrect information in file: './test/t1.frm'
|
||||
test.t1 check error Corrupt
|
||||
SELECT * FROM t1;
|
||||
ERROR HY000: Failed to read from the .par file
|
||||
# Note that it is currently impossible to drop a partitioned table
|
||||
# without the .par file
|
||||
DROP TABLE t1;
|
||||
ERROR 42S02: Unknown table 't1'
|
||||
#
|
||||
# Bug#50392: insert_id is not reset for partitioned tables
|
||||
# auto_increment on duplicate entry
|
||||
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY)
|
||||
ENGINE = MyISAM;
|
||||
SET INSERT_ID= 13;
|
||||
INSERT INTO t1 VALUES (NULL);
|
||||
SET INSERT_ID= 12;
|
||||
# For transactional engines, 12 will not be inserted, since the failing
|
||||
# statement is rolled back.
|
||||
INSERT INTO t1 VALUES (NULL), (NULL), (NULL);
|
||||
ERROR 23000: Duplicate entry '13' for key 'PRIMARY'
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) NOT NULL AUTO_INCREMENT,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=14 DEFAULT CHARSET=latin1
|
||||
INSERT INTO t1 VALUES (NULL);
|
||||
# NOTE: 12 exists only in non transactional engines!
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
12
|
||||
13
|
||||
14
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY)
|
||||
ENGINE = MyISAM
|
||||
PARTITION BY KEY(a);
|
||||
SET INSERT_ID= 13;
|
||||
INSERT INTO t1 VALUES (NULL);
|
||||
SET INSERT_ID= 12;
|
||||
INSERT INTO t1 VALUES (NULL), (NULL), (NULL);
|
||||
ERROR 23000: Duplicate entry '13' for key 'PRIMARY'
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) NOT NULL AUTO_INCREMENT,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=14 DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a) */
|
||||
INSERT INTO t1 VALUES (NULL);
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
12
|
||||
13
|
||||
14
|
||||
DROP TABLE t1;
|
||||
# Bug#30102 test
|
||||
CREATE TABLE t1 (a INT)
|
||||
ENGINE = MyISAM
|
||||
PARTITION BY RANGE (a)
|
||||
(PARTITION p0 VALUES LESS THAN (6),
|
||||
PARTITION `p1....................` VALUES LESS THAN (9),
|
||||
PARTITION p2 VALUES LESS THAN MAXVALUE);
|
||||
# List of files in database `test`, all original t1-files here
|
||||
t1#P#p0.MYD
|
||||
t1#P#p0.MYI
|
||||
t1#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYD
|
||||
t1#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYI
|
||||
t1#P#p2.MYD
|
||||
t1#P#p2.MYI
|
||||
t1.frm
|
||||
t1.par
|
||||
INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||
# Renaming to a file name where the first partition is 250 chars
|
||||
# and the second partition is 350 chars
|
||||
RENAME TABLE t1 TO `t2_new..............................................end`;
|
||||
Got one of the listed errors
|
||||
# List of files in database `test`, should not be any t2-files here
|
||||
# List of files in database `test`, should be all t1-files here
|
||||
t1#P#p0.MYD
|
||||
t1#P#p0.MYI
|
||||
t1#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYD
|
||||
t1#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYI
|
||||
t1#P#p2.MYD
|
||||
t1#P#p2.MYI
|
||||
t1.frm
|
||||
t1.par
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
1
|
||||
10
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# List of files in database `test`, should be all t1-files here
|
||||
t1#P#p0.MYD
|
||||
t1#P#p0.MYI
|
||||
t1#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYD
|
||||
t1#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYI
|
||||
t1#P#p2.MYD
|
||||
t1#P#p2.MYI
|
||||
t1.frm
|
||||
t1.par
|
||||
# Renaming to a file name where the first partition is 156 chars
|
||||
# and the second partition is 256 chars
|
||||
RENAME TABLE t1 TO `t2_............................_end`;
|
||||
Got one of the listed errors
|
||||
# List of files in database `test`, should not be any t2-files here
|
||||
# List of files in database `test`, should be all t1-files here
|
||||
t1#P#p0.MYD
|
||||
t1#P#p0.MYI
|
||||
t1#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYD
|
||||
t1#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYI
|
||||
t1#P#p2.MYD
|
||||
t1#P#p2.MYI
|
||||
t1.frm
|
||||
t1.par
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
1
|
||||
10
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
DROP TABLE t1;
|
||||
# Should not be any files left here
|
||||
# End of bug#30102 test.
|
||||
# Test of post-push fix for bug#11766249/59316
|
||||
CREATE TABLE t1 (a INT, b VARCHAR(255), PRIMARY KEY (a))
|
||||
ENGINE = MyISAM
|
||||
PARTITION BY RANGE (a)
|
||||
(PARTITION p0 VALUES LESS THAN (0) MAX_ROWS=100,
|
||||
PARTITION p1 VALUES LESS THAN (100) MAX_ROWS=100,
|
||||
PARTITION pMax VALUES LESS THAN MAXVALUE);
|
||||
INSERT INTO t1 VALUES (1, "Partition p1, first row");
|
||||
DROP TABLE t1;
|
@ -1,81 +0,0 @@
|
||||
DROP TABLE IF EXISTS t1, t2;
|
||||
# Bug#30102 test
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY RANGE (a)
|
||||
(PARTITION p0 VALUES LESS THAN (6),
|
||||
PARTITION `p1....................` VALUES LESS THAN (9),
|
||||
PARTITION p2 VALUES LESS THAN MAXVALUE);
|
||||
# List of files in database `test`, all original t1-files here
|
||||
t1#P#p0.MYD
|
||||
t1#P#p0.MYI
|
||||
t1#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYD
|
||||
t1#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYI
|
||||
t1#P#p2.MYD
|
||||
t1#P#p2.MYI
|
||||
t1.frm
|
||||
t1.par
|
||||
INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||
# Renaming to a file name where the first partition is 250 chars
|
||||
# and the second partition is 350 chars
|
||||
RENAME TABLE t1 TO `t2_new..............................................end`;
|
||||
Got one of the listed errors
|
||||
# List of files in database `test`, should not be any t2-files here
|
||||
# List of files in database `test`, should be all t1-files here
|
||||
t1#P#p0.MYD
|
||||
t1#P#p0.MYI
|
||||
t1#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYD
|
||||
t1#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYI
|
||||
t1#P#p2.MYD
|
||||
t1#P#p2.MYI
|
||||
t1.frm
|
||||
t1.par
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
1
|
||||
10
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# List of files in database `test`, should be all t1-files here
|
||||
t1#P#p0.MYD
|
||||
t1#P#p0.MYI
|
||||
t1#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYD
|
||||
t1#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYI
|
||||
t1#P#p2.MYD
|
||||
t1#P#p2.MYI
|
||||
t1.frm
|
||||
t1.par
|
||||
# Renaming to a file name where the first partition is 156 chars
|
||||
# and the second partition is 256 chars
|
||||
RENAME TABLE t1 TO `t2_............................_end`;
|
||||
Got one of the listed errors
|
||||
# List of files in database `test`, should not be any t2-files here
|
||||
# List of files in database `test`, should be all t1-files here
|
||||
t1#P#p0.MYD
|
||||
t1#P#p0.MYI
|
||||
t1#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYD
|
||||
t1#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYI
|
||||
t1#P#p2.MYD
|
||||
t1#P#p2.MYI
|
||||
t1.frm
|
||||
t1.par
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
1
|
||||
10
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
DROP TABLE t1;
|
||||
# Should not be any files left here
|
||||
# End of bug#30102 test.
|
@ -6,11 +6,12 @@ DROP DATABASE IF EXISTS mysqltest2;
|
||||
CREATE USER mysqltest_1@localhost;
|
||||
CREATE DATABASE mysqltest2;
|
||||
USE mysqltest2;
|
||||
CREATE TABLE t1 (a INT);
|
||||
CREATE TABLE t1 (a INT) ENGINE = MyISAM;
|
||||
INSERT INTO t1 VALUES (0);
|
||||
# user mysqltest_1:
|
||||
USE test;
|
||||
CREATE TABLE t1 (a INT)
|
||||
ENGINE = MyISAM
|
||||
PARTITION BY LIST (a) (
|
||||
PARTITION p0 VALUES IN (0)
|
||||
DATA DIRECTORY 'MYSQLTEST_VARDIR/tmp'
|
||||
@ -47,6 +48,7 @@ DROP DATABASE mysqltest2;
|
||||
CREATE DATABASE mysqltest2;
|
||||
USE mysqltest2;
|
||||
CREATE TABLE t1 (a INT)
|
||||
ENGINE = MyISAM
|
||||
PARTITION BY LIST (a) (
|
||||
PARTITION p0 VALUES IN (0)
|
||||
DATA DIRECTORY 'MYSQLTEST_VARDIR/tmp'
|
||||
@ -58,6 +60,7 @@ DATA DIRECTORY 'MYSQLTEST_VARDIR/tmp'
|
||||
# user mysqltest_1:
|
||||
USE test;
|
||||
CREATE TABLE t1 (a INT)
|
||||
ENGINE = MyISAM
|
||||
PARTITION BY LIST (a) (
|
||||
PARTITION p0 VALUES IN (0)
|
||||
DATA DIRECTORY 'MYSQLTEST_VARDIR/tmp'
|
||||
@ -68,6 +71,7 @@ DATA DIRECTORY 'MYSQLTEST_VARDIR/tmp'
|
||||
);
|
||||
Got one of the listed errors
|
||||
CREATE TABLE t1 (a INT)
|
||||
ENGINE = MyISAM
|
||||
PARTITION BY LIST (a) (
|
||||
PARTITION p0 VALUES IN (0)
|
||||
DATA DIRECTORY 'MYSQLTEST_VARDIR/tmp'
|
||||
@ -82,6 +86,7 @@ DROP DATABASE mysqltest2;
|
||||
USE test;
|
||||
DROP USER mysqltest_1@localhost;
|
||||
create table t2 (i int )
|
||||
ENGINE = MyISAM
|
||||
partition by range (i)
|
||||
(
|
||||
partition p01 values less than (1000)
|
||||
@ -94,6 +99,7 @@ select @@sql_mode;
|
||||
@@sql_mode
|
||||
NO_DIR_IN_CREATE
|
||||
create table t1 (i int )
|
||||
ENGINE = MyISAM
|
||||
partition by range (i)
|
||||
(
|
||||
partition p01 values less than (1000)
|
||||
@ -113,10 +119,12 @@ t2 CREATE TABLE `t2` (
|
||||
DROP TABLE t1, t2;
|
||||
set @@sql_mode=@org_mode;
|
||||
create table t1 (a int)
|
||||
ENGINE = MyISAM
|
||||
partition by key (a)
|
||||
(partition p0 DATA DIRECTORY 'part-data' INDEX DIRECTORY 'part-data');
|
||||
Got one of the listed errors
|
||||
create table t1 (a int)
|
||||
ENGINE = MyISAM
|
||||
partition by key (a)
|
||||
(partition p0,
|
||||
partition p1 DATA DIRECTORY 'part-data' INDEX DIRECTORY 'part-data');
|
||||
|
@ -342,4 +342,109 @@ select USER(),CURRENT_USER();
|
||||
USER() CURRENT_USER()
|
||||
uplain@localhost uplain@localhost
|
||||
DROP USER uplain@localhost;
|
||||
#
|
||||
# Bug #59038 : mysql.user.authentication_string column
|
||||
# causes configuration wizard to fail
|
||||
INSERT INTO mysql.user(
|
||||
Host,
|
||||
User,
|
||||
Password,
|
||||
Select_priv,
|
||||
Insert_priv,
|
||||
Update_priv,
|
||||
Delete_priv,
|
||||
Create_priv,
|
||||
Drop_priv,
|
||||
Reload_priv,
|
||||
Shutdown_priv,
|
||||
Process_priv,
|
||||
File_priv,
|
||||
Grant_priv,
|
||||
References_priv,
|
||||
Index_priv,
|
||||
Alter_priv,
|
||||
Show_db_priv,
|
||||
Super_priv,
|
||||
Create_tmp_table_priv,
|
||||
Lock_tables_priv,
|
||||
Execute_priv,
|
||||
Repl_slave_priv,
|
||||
Repl_client_priv,
|
||||
/*!50001
|
||||
Create_view_priv,
|
||||
Show_view_priv,
|
||||
Create_routine_priv,
|
||||
Alter_routine_priv,
|
||||
Create_user_priv,
|
||||
*/
|
||||
ssl_type,
|
||||
ssl_cipher,
|
||||
x509_issuer,
|
||||
x509_subject,
|
||||
max_questions,
|
||||
max_updates,
|
||||
max_connections)
|
||||
VALUES (
|
||||
'localhost',
|
||||
'inserttest', '',
|
||||
'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y',
|
||||
'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y',
|
||||
/*!50001 'Y', 'Y', 'Y', 'Y', 'Y', */'', '', '', '', '0', '0', '0');
|
||||
FLUSH PRIVILEGES;
|
||||
DROP USER inserttest@localhost;
|
||||
SELECT IS_NULLABLE, COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE
|
||||
COLUMN_NAME IN ('authentication_string', 'plugin') AND
|
||||
TABLE_NAME='user' AND
|
||||
TABLE_SCHEMA='mysql'
|
||||
ORDER BY COLUMN_NAME;
|
||||
IS_NULLABLE COLUMN_NAME
|
||||
YES authentication_string
|
||||
YES plugin
|
||||
#
|
||||
# Bug #11936829: diff. between mysql.user (authentication_string)
|
||||
# in fresh and upgraded 5.5.11
|
||||
#
|
||||
SELECT IS_NULLABLE, COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE TABLE_SCHEMA= 'mysql' AND TABLE_NAME= 'user' AND
|
||||
COLUMN_NAME IN ('plugin', 'authentication_string')
|
||||
ORDER BY COLUMN_NAME;
|
||||
IS_NULLABLE COLUMN_NAME
|
||||
YES authentication_string
|
||||
YES plugin
|
||||
ALTER TABLE mysql.user MODIFY plugin char(64) DEFAULT '' NOT NULL;
|
||||
ALTER TABLE mysql.user MODIFY authentication_string TEXT NOT NULL;
|
||||
Run mysql_upgrade on a 5.5.10 external authentication column layout
|
||||
mtr.global_suppressions OK
|
||||
mtr.test_suppressions OK
|
||||
mysql.columns_priv OK
|
||||
mysql.db OK
|
||||
mysql.event OK
|
||||
mysql.func OK
|
||||
mysql.general_log OK
|
||||
mysql.help_category OK
|
||||
mysql.help_keyword OK
|
||||
mysql.help_relation OK
|
||||
mysql.help_topic OK
|
||||
mysql.host OK
|
||||
mysql.ndb_binlog_index OK
|
||||
mysql.plugin OK
|
||||
mysql.proc OK
|
||||
mysql.procs_priv OK
|
||||
mysql.proxies_priv OK
|
||||
mysql.servers OK
|
||||
mysql.slow_log OK
|
||||
mysql.tables_priv OK
|
||||
mysql.time_zone OK
|
||||
mysql.time_zone_leap_second OK
|
||||
mysql.time_zone_name OK
|
||||
mysql.time_zone_transition OK
|
||||
mysql.time_zone_transition_type OK
|
||||
mysql.user OK
|
||||
SELECT IS_NULLABLE, COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE TABLE_SCHEMA= 'mysql' AND TABLE_NAME= 'user' AND
|
||||
COLUMN_NAME IN ('plugin', 'authentication_string')
|
||||
ORDER BY COLUMN_NAME;
|
||||
IS_NULLABLE COLUMN_NAME
|
||||
YES authentication_string
|
||||
YES plugin
|
||||
End of 5.5 tests
|
||||
|
@ -105,7 +105,7 @@ CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd';
|
||||
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
user plugin authentication_string
|
||||
plug test_plugin_server plug_dest
|
||||
plug_dest
|
||||
plug_dest NULL
|
||||
DROP USER plug, plug_dest;
|
||||
CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
|
||||
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
@ -115,7 +115,7 @@ DROP USER plug;
|
||||
CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd';
|
||||
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
user plugin authentication_string
|
||||
plug_dest
|
||||
plug_dest NULL
|
||||
DROP USER plug_dest;
|
||||
GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
|
||||
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
@ -125,7 +125,7 @@ CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd';
|
||||
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
user plugin authentication_string
|
||||
plug test_plugin_server plug_dest
|
||||
plug_dest
|
||||
plug_dest NULL
|
||||
DROP USER plug, plug_dest;
|
||||
GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH test_plugin_server AS 'plug_dest';
|
||||
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
@ -135,7 +135,7 @@ DROP USER plug;
|
||||
CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd';
|
||||
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
user plugin authentication_string
|
||||
plug_dest
|
||||
plug_dest NULL
|
||||
DROP USER plug_dest;
|
||||
CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
|
||||
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
@ -145,7 +145,7 @@ GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest IDENTIFIED BY 'plug_dest_pas
|
||||
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
user plugin authentication_string
|
||||
plug test_plugin_server plug_dest
|
||||
plug_dest
|
||||
plug_dest NULL
|
||||
DROP USER plug, plug_dest;
|
||||
CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
|
||||
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
@ -155,7 +155,7 @@ DROP USER plug;
|
||||
GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest IDENTIFIED BY 'plug_dest_passwd';
|
||||
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
user plugin authentication_string
|
||||
plug_dest
|
||||
plug_dest NULL
|
||||
DROP USER plug_dest;
|
||||
CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
|
||||
GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
|
||||
@ -210,7 +210,7 @@ DROP USER plüg;
|
||||
CREATE USER plüg_dest IDENTIFIED BY 'plug_dest_passwd';
|
||||
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
user plugin authentication_string
|
||||
plüg_dest
|
||||
plüg_dest NULL
|
||||
DROP USER plüg_dest;
|
||||
SET NAMES ascii;
|
||||
CREATE USER 'plüg' IDENTIFIED WITH 'test_plugin_server' AS 'plüg_dest';
|
||||
@ -221,7 +221,7 @@ DROP USER 'plüg';
|
||||
CREATE USER 'plüg_dest' IDENTIFIED BY 'plug_dest_passwd';
|
||||
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
user plugin authentication_string
|
||||
pl??g_dest
|
||||
pl??g_dest NULL
|
||||
DROP USER 'plüg_dest';
|
||||
SET NAMES latin1;
|
||||
========== test 1.1.1.5 ====================================
|
||||
@ -235,7 +235,7 @@ DROP USER 'plug';
|
||||
CREATE USER 'plüg_dest' IDENTIFIED BY 'plug_dest_passwd';
|
||||
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
user plugin authentication_string
|
||||
plüg_dest
|
||||
plüg_dest NULL
|
||||
DROP USER 'plüg_dest';
|
||||
SET NAMES utf8;
|
||||
CREATE USER plüg IDENTIFIED WITH 'test_plügin_server' AS 'plüg_dest';
|
||||
@ -248,7 +248,7 @@ DROP USER 'plüg';
|
||||
CREATE USER 'plüg_dest' IDENTIFIED BY 'plug_dest_passwd';
|
||||
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
user plugin authentication_string
|
||||
plüg_dest
|
||||
plüg_dest NULL
|
||||
DROP USER 'plüg_dest';
|
||||
CREATE USER plüg IDENTIFIED WITH test_plugin_server AS 'plüg_dest';
|
||||
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
@ -258,7 +258,7 @@ DROP USER plüg;
|
||||
CREATE USER plüg_dest IDENTIFIED BY 'plug_dest_passwd';
|
||||
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
user plugin authentication_string
|
||||
plüg_dest
|
||||
plüg_dest NULL
|
||||
DROP USER plüg_dest;
|
||||
========== test 1.1.1.2/1.1.2.2=============================
|
||||
SET @auth_name= 'test_plugin_server';
|
||||
@ -278,7 +278,7 @@ DROP USER plug;
|
||||
CREATE USER 'hh''s_plug_dest' IDENTIFIED BY 'plug_dest_passwd';
|
||||
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
user plugin authentication_string
|
||||
hh's_plug_dest
|
||||
hh's_plug_dest NULL
|
||||
DROP USER 'hh''s_plug_dest';
|
||||
========== test 1.1.1.4 ====================================
|
||||
CREATE USER plug IDENTIFIED WITH hh''s_test_plugin_server AS 'plug_dest';
|
||||
@ -294,7 +294,7 @@ GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest;
|
||||
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
user plugin authentication_string
|
||||
grant_user test_plugin_server plug_dest
|
||||
plug_dest
|
||||
plug_dest NULL
|
||||
DROP USER grant_user,plug_dest;
|
||||
set @save_sql_mode= @@sql_mode;
|
||||
SET @@sql_mode=no_auto_create_user;
|
||||
@ -315,13 +315,13 @@ CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd';
|
||||
SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
|
||||
user plugin authentication_string password
|
||||
grant_user test_plugin_server plug_dest
|
||||
plug_dest *939AEE68989794C0F408277411C26055CDF41119
|
||||
plug_dest NULL *939AEE68989794C0F408277411C26055CDF41119
|
||||
DROP USER plug_dest;
|
||||
GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest IDENTIFIED BY 'plug_user_passwd';
|
||||
SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
|
||||
user plugin authentication_string password
|
||||
grant_user test_plugin_server plug_dest
|
||||
plug_dest *560881EB651416CEF77314D07D55EDCD5FC1BD6D
|
||||
plug_dest NULL *560881EB651416CEF77314D07D55EDCD5FC1BD6D
|
||||
DROP USER grant_user,plug_dest;
|
||||
set @@sql_mode= @save_sql_mode;
|
||||
DROP DATABASE test_user_db;
|
||||
|
@ -20,7 +20,7 @@ GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest IDENTIFIED BY 'plug_dest_pas
|
||||
GRANT PROXY ON plug_dest TO plug_user;
|
||||
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
user plugin authentication_string
|
||||
plug_dest
|
||||
plug_dest NULL
|
||||
plug_user test_plugin_server plug_dest
|
||||
1)
|
||||
current_user()
|
||||
@ -73,7 +73,7 @@ GRANT PROXY ON new_dest TO plug_user;
|
||||
ERROR 1045 (28000): Access denied for user 'plug_user'@'localhost' (using password: YES)
|
||||
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
user plugin authentication_string
|
||||
new_dest
|
||||
new_dest NULL
|
||||
plug_user test_plugin_server plug_dest
|
||||
DROP USER plug_user,new_dest;
|
||||
CREATE USER plug_user
|
||||
@ -91,7 +91,7 @@ GRANT PROXY ON new_dest TO plug_user;
|
||||
ERROR 1045 (28000): Access denied for user 'plug_user'@'localhost' (using password: YES)
|
||||
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
user plugin authentication_string
|
||||
new_dest
|
||||
new_dest NULL
|
||||
plug_user test_plugin_server plug_dest
|
||||
DROP USER plug_user,new_dest;
|
||||
CREATE USER plug_user
|
||||
@ -113,13 +113,13 @@ connection default;
|
||||
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
user plugin authentication_string
|
||||
new_user test_plugin_server plug_dest
|
||||
plug_dest
|
||||
plug_dest NULL
|
||||
disconnect plug_user;
|
||||
UPDATE mysql.user SET user='plug_user' WHERE user='new_user';
|
||||
FLUSH PRIVILEGES;
|
||||
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
user plugin authentication_string
|
||||
plug_dest
|
||||
plug_dest NULL
|
||||
plug_user test_plugin_server plug_dest
|
||||
DROP USER plug_dest,plug_user;
|
||||
========== test 1.3 ========================================
|
||||
@ -135,26 +135,26 @@ connection default;
|
||||
disconnect plug_user;
|
||||
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
user plugin authentication_string
|
||||
plug_dest
|
||||
plug_dest NULL
|
||||
plug_user test_plugin_server plug_dest
|
||||
UPDATE mysql.user SET user='new_user' WHERE user='plug_user';
|
||||
FLUSH PRIVILEGES;
|
||||
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
user plugin authentication_string
|
||||
new_user test_plugin_server plug_dest
|
||||
plug_dest
|
||||
plug_dest NULL
|
||||
UPDATE mysql.user SET authentication_string='new_dest' WHERE user='new_user';
|
||||
FLUSH PRIVILEGES;
|
||||
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
user plugin authentication_string
|
||||
new_user test_plugin_server new_dest
|
||||
plug_dest
|
||||
plug_dest NULL
|
||||
UPDATE mysql.user SET plugin='new_plugin_server' WHERE user='new_user';
|
||||
FLUSH PRIVILEGES;
|
||||
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
user plugin authentication_string
|
||||
new_user new_plugin_server new_dest
|
||||
plug_dest
|
||||
plug_dest NULL
|
||||
connect(plug_user,localhost,new_user,new_dest);
|
||||
ERROR HY000: Plugin 'new_plugin_server' is not loaded
|
||||
UPDATE mysql.user SET plugin='test_plugin_server' WHERE user='new_user';
|
||||
@ -163,7 +163,7 @@ FLUSH PRIVILEGES;
|
||||
GRANT PROXY ON new_dest TO new_user;
|
||||
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
user plugin authentication_string
|
||||
new_dest
|
||||
new_dest NULL
|
||||
new_user test_plugin_server new_dest
|
||||
connect(plug_user,localhost,new_user,new_dest);
|
||||
select USER(),CURRENT_USER();
|
||||
@ -176,9 +176,9 @@ FLUSH PRIVILEGES;
|
||||
CREATE USER new_dest IDENTIFIED BY 'new_dest_passwd';
|
||||
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
user plugin authentication_string
|
||||
new_dest
|
||||
new_dest NULL
|
||||
new_user test_plugin_server new_dest
|
||||
plug_dest
|
||||
plug_dest NULL
|
||||
GRANT ALL PRIVILEGES ON test.* TO new_user;
|
||||
connect(plug_user,localhost,new_dest,new_dest_passwd);
|
||||
select USER(),CURRENT_USER();
|
||||
@ -193,7 +193,7 @@ CREATE USER proxied_user IDENTIFIED BY 'proxied_user_passwd';
|
||||
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
user plugin authentication_string
|
||||
test_plugin_server proxied_user
|
||||
proxied_user
|
||||
proxied_user NULL
|
||||
connect(proxy_con,localhost,proxied_user,proxied_user_passwd);
|
||||
SELECT USER(),CURRENT_USER();
|
||||
USER() CURRENT_USER()
|
||||
@ -230,7 +230,7 @@ CREATE USER proxied_user IDENTIFIED BY 'proxied_user_passwd';
|
||||
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
user plugin authentication_string
|
||||
test_plugin_server proxied_user
|
||||
proxied_user
|
||||
proxied_user NULL
|
||||
connect(proxy_con,localhost,proxied_user,proxied_user_passwd);
|
||||
SELECT USER(),CURRENT_USER();
|
||||
USER() CURRENT_USER()
|
||||
@ -273,11 +273,11 @@ GRANT PROXY ON proxied_user_5 TO ''@'';
|
||||
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
user plugin authentication_string
|
||||
test_plugin_server proxied_user
|
||||
proxied_user_1
|
||||
proxied_user_2
|
||||
proxied_user_3
|
||||
proxied_user_4
|
||||
proxied_user_5
|
||||
proxied_user_1 NULL
|
||||
proxied_user_2 NULL
|
||||
proxied_user_3 NULL
|
||||
proxied_user_4 NULL
|
||||
proxied_user_5 NULL
|
||||
connect(proxy_con_1,localhost,proxied_user_1,'proxied_user_1_pwd');
|
||||
connect(proxy_con_2,localhost,proxied_user_2,proxied_user_2_pwd);
|
||||
connect(proxy_con_3,localhost,proxied_user_3,proxied_user_3_pwd);
|
||||
|
@ -7,7 +7,7 @@ GRANT ALL PRIVILEGES ON test_user_db.* TO qa_test_1_dest identified by 'dest_pas
|
||||
GRANT PROXY ON qa_test_1_dest TO qa_test_1_user;
|
||||
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
user plugin authentication_string
|
||||
qa_test_1_dest
|
||||
qa_test_1_dest NULL
|
||||
qa_test_1_user qa_auth_interface qa_test_1_dest
|
||||
SELECT @@proxy_user;
|
||||
@@proxy_user
|
||||
@ -20,7 +20,7 @@ current_user() user() @@local.proxy_user @@local.external_user
|
||||
qa_test_1_user@% qa_test_1_user@localhost NULL NULL
|
||||
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
user plugin authentication_string
|
||||
qa_test_1_dest
|
||||
qa_test_1_dest NULL
|
||||
qa_test_1_user qa_auth_interface qa_test_1_dest
|
||||
DROP USER qa_test_1_user;
|
||||
DROP USER qa_test_1_dest;
|
||||
@ -33,8 +33,8 @@ GRANT PROXY ON qa_test_2_dest TO qa_test_2_user;
|
||||
GRANT PROXY ON authenticated_as TO qa_test_2_user;
|
||||
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
user plugin authentication_string
|
||||
authenticated_as
|
||||
qa_test_2_dest
|
||||
authenticated_as NULL
|
||||
qa_test_2_dest NULL
|
||||
qa_test_2_user qa_auth_interface qa_test_2_dest
|
||||
SELECT @@proxy_user;
|
||||
@@proxy_user
|
||||
@ -47,8 +47,8 @@ current_user() user() @@local.proxy_user @@local.external_user
|
||||
authenticated_as@% user_name@localhost 'qa_test_2_user'@'%' 'qa_test_2_user'@'%'
|
||||
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
user plugin authentication_string
|
||||
authenticated_as
|
||||
qa_test_2_dest
|
||||
authenticated_as NULL
|
||||
qa_test_2_dest NULL
|
||||
qa_test_2_user qa_auth_interface qa_test_2_dest
|
||||
DROP USER qa_test_2_user;
|
||||
DROP USER qa_test_2_dest;
|
||||
@ -83,8 +83,8 @@ GRANT PROXY ON qa_test_5_dest TO qa_test_5_user;
|
||||
GRANT PROXY ON qa_test_5_dest TO ''@'localhost';
|
||||
SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
|
||||
user plugin authentication_string password
|
||||
*DFCACE76914AD7BD801FC1A1ECF6562272621A22
|
||||
qa_test_5_dest *DFCACE76914AD7BD801FC1A1ECF6562272621A22
|
||||
NULL *DFCACE76914AD7BD801FC1A1ECF6562272621A22
|
||||
qa_test_5_dest NULL *DFCACE76914AD7BD801FC1A1ECF6562272621A22
|
||||
qa_test_5_user qa_auth_interface qa_test_5_dest
|
||||
exec MYSQL PLUGIN_AUTH_OPT -h localhost -P MASTER_MYPORT --user=qa_test_5_user --password=qa_test_5_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1
|
||||
ERROR 1045 (28000): Access denied for user 'qa_test_5_user'@'localhost' (using password: YES)
|
||||
@ -98,7 +98,7 @@ GRANT ALL PRIVILEGES ON test_user_db.* TO qa_test_6_dest identified by 'dest_pas
|
||||
GRANT PROXY ON qa_test_6_dest TO qa_test_6_user;
|
||||
SELECT user,plugin,authentication_string,password FROM mysql.user;
|
||||
user plugin authentication_string password
|
||||
qa_test_6_dest *DFCACE76914AD7BD801FC1A1ECF6562272621A22
|
||||
qa_test_6_dest NULL *DFCACE76914AD7BD801FC1A1ECF6562272621A22
|
||||
qa_test_6_user qa_auth_interface qa_test_6_dest
|
||||
root
|
||||
root
|
||||
@ -109,7 +109,7 @@ ERROR 1045 (28000): Access denied for user 'qa_test_6_user'@'localhost' (using p
|
||||
GRANT PROXY ON qa_test_6_dest TO root IDENTIFIED WITH qa_auth_interface AS 'qa_test_6_dest';
|
||||
SELECT user,plugin,authentication_string,password FROM mysql.user;
|
||||
user plugin authentication_string password
|
||||
qa_test_6_dest *DFCACE76914AD7BD801FC1A1ECF6562272621A22
|
||||
qa_test_6_dest NULL *DFCACE76914AD7BD801FC1A1ECF6562272621A22
|
||||
qa_test_6_user qa_auth_interface qa_test_6_dest
|
||||
root
|
||||
root
|
||||
@ -121,7 +121,7 @@ ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: Y
|
||||
REVOKE PROXY ON qa_test_6_dest FROM root;
|
||||
SELECT user,plugin,authentication_string FROM mysql.user;
|
||||
user plugin authentication_string
|
||||
qa_test_6_dest
|
||||
qa_test_6_dest NULL
|
||||
qa_test_6_user qa_auth_interface qa_test_6_dest
|
||||
root
|
||||
root
|
||||
|
@ -3731,5 +3731,19 @@ CREATE TABLE t1 (a INT);
|
||||
BEGIN;
|
||||
PREPARE stmt1 FROM "SELECT * FROM t1";
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# End of 6.0 tests.
|
||||
# Bug#56115: invalid memory reads when PS selecting from
|
||||
# information_schema tables
|
||||
# Bug#58701: crash in Field::make_field, cursor-protocol
|
||||
#
|
||||
# NOTE: MTR should be run both with --ps-protocol and --cursor-protocol.
|
||||
#
|
||||
|
||||
SELECT *
|
||||
FROM (SELECT 1 UNION SELECT 2) t;
|
||||
1
|
||||
1
|
||||
2
|
||||
#
|
||||
# End of 5.5 tests.
|
||||
|
@ -2155,6 +2155,8 @@ mysqld is alive
|
||||
SET @max_allowed_packet= @@global.max_allowed_packet;
|
||||
SET @net_buffer_length= @@global.net_buffer_length;
|
||||
SET GLOBAL max_allowed_packet= 1024;
|
||||
Warnings:
|
||||
Warning 1708 The value of 'max_allowed_packet' should be no less than the value of 'net_buffer_length'
|
||||
SET GLOBAL net_buffer_length= 1024;
|
||||
ERROR 1153 (08S01) at line 1: Got a packet bigger than 'max_allowed_packet' bytes
|
||||
SET GLOBAL max_allowed_packet= @max_allowed_packet;
|
||||
|
@ -1338,6 +1338,7 @@ Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length I
|
||||
DROP DATABASE `<60>`;
|
||||
show columns from `#mysql50#????????`;
|
||||
Got one of the listed errors
|
||||
call mtr.add_suppression("Can.t find file: '.\\\\test\\\\\\?{8}.frm'");
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP PROCEDURE IF EXISTS p1;
|
||||
CREATE TABLE t1(c1 INT);
|
||||
|
@ -1,4 +1,5 @@
|
||||
call mtr.add_suppression("Column count of mysql.proc is wrong. Expected 20, found 19. The table is probably corrupted");
|
||||
call mtr.add_suppression("Stored routine .test...bug14233_[123].: invalid value in column mysql.proc");
|
||||
use test;
|
||||
drop procedure if exists bug14233;
|
||||
drop function if exists bug14233;
|
||||
|
@ -7452,6 +7452,24 @@ c1
|
||||
# Cleanup
|
||||
drop table t1;
|
||||
drop procedure p1;
|
||||
#
|
||||
# BUG#11766234: 59299: ASSERT (TABLE_REF->TABLE || TABLE_REF->VIEW)
|
||||
# FAILS IN SET_FIELD_ITERATOR
|
||||
#
|
||||
CREATE TABLE t1 (a INT);
|
||||
CREATE TABLE t2 (a INT);
|
||||
CREATE VIEW v1 AS SELECT a FROM t2;
|
||||
CREATE PROCEDURE proc() SELECT * FROM t1 NATURAL JOIN v1;
|
||||
ALTER TABLE t2 CHANGE COLUMN a b CHAR;
|
||||
|
||||
CALL proc();
|
||||
ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
CALL proc();
|
||||
ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
|
||||
DROP TABLE t1,t2;
|
||||
DROP VIEW v1;
|
||||
DROP PROCEDURE proc;
|
||||
|
||||
# --
|
||||
# -- Bug 11765684 - 58674: SP-cache does not detect changes in
|
||||
|
@ -249,8 +249,6 @@ max_updates, max_connections, max_user_connections)
|
||||
VALUES('%', 'mysqltest_1', password(''), 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'N', 'N', 'N',
|
||||
'N', 'N', 'N', 'Y', 'Y', 'N', 'N', 'Y', 'Y', 'N', 'N', 'N', 'N', 'N', 'Y', 'Y', 'N', '',
|
||||
'', '', '', '0', '0', '0', '0');
|
||||
Warnings:
|
||||
Warning 1364 Field 'authentication_string' doesn't have a default value
|
||||
FLUSH PRIVILEGES;
|
||||
CREATE PROCEDURE p1(i INT) BEGIN END;
|
||||
DROP PROCEDURE p1;
|
||||
|
@ -5058,6 +5058,24 @@ i
|
||||
DROP TABLE t1,t1s,t2s;
|
||||
End of 5.1 tests
|
||||
#
|
||||
# Bug #11765713 58705:
|
||||
# OPTIMIZER LET ENGINE DEPEND ON UNINITIALIZED VALUES
|
||||
# CREATED BY OPT_SUM_QUERY
|
||||
#
|
||||
CREATE TABLE t1(a INT NOT NULL, KEY (a));
|
||||
INSERT INTO t1 VALUES (0), (1);
|
||||
SELECT 1 as foo FROM t1 WHERE a < SOME
|
||||
(SELECT a FROM t1 WHERE a <=>
|
||||
(SELECT a FROM t1)
|
||||
);
|
||||
ERROR 21000: Subquery returns more than 1 row
|
||||
SELECT 1 as foo FROM t1 WHERE a < SOME
|
||||
(SELECT a FROM t1 WHERE a <=>
|
||||
(SELECT a FROM t1 where a is null)
|
||||
);
|
||||
foo
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #57704: Cleanup code dies with void TABLE::set_keyread(bool):
|
||||
# Assertion `file' failed.
|
||||
#
|
||||
|
@ -865,9 +865,6 @@ Level Code Message
|
||||
Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #2
|
||||
Note 1276 Field or reference 'test.t1.c' of SELECT #3 was resolved in SELECT #2
|
||||
Error 1054 Unknown column 'c' in 'field list'
|
||||
Note 1003 select `c` AS `c` from (select (select count(`test`.`t1`.`a`) from dual group by `c`) AS `(SELECT COUNT(a) FROM
|
||||
(SELECT COUNT(b) FROM t1) AS x GROUP BY c
|
||||
)` from `test`.`t1` group by `test`.`t1`.`b`) `y`
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
create table t0 (a int);
|
||||
|
@ -120,8 +120,8 @@ user CREATE TABLE `user` (
|
||||
`max_updates` int(11) unsigned NOT NULL DEFAULT '0',
|
||||
`max_connections` int(11) unsigned NOT NULL DEFAULT '0',
|
||||
`max_user_connections` int(11) unsigned NOT NULL DEFAULT '0',
|
||||
`plugin` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||
`authentication_string` text COLLATE utf8_bin NOT NULL,
|
||||
`plugin` char(64) COLLATE utf8_bin DEFAULT '',
|
||||
`authentication_string` text COLLATE utf8_bin,
|
||||
PRIMARY KEY (`Host`,`User`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges'
|
||||
show create table func;
|
||||
|
112
mysql-test/r/tablespace.result
Normal file
112
mysql-test/r/tablespace.result
Normal file
@ -0,0 +1,112 @@
|
||||
CREATE TABLE t1(a int) TABLESPACE ts ENGINE=MyISAM;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) /*!50100 TABLESPACE ts */ ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(a int) TABLESPACE ts STORAGE DISK ENGINE=MyISAM;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(a int) TABLESPACE ts STORAGE MEMORY ENGINE=MyISAM;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) /*!50100 TABLESPACE ts STORAGE MEMORY */ ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(a int) STORAGE MEMORY ENGINE=MyISAM;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) /*!50100 STORAGE MEMORY */ ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(a int) STORAGE DISK ENGINE=MyISAM;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) /*!50100 STORAGE DISK */ ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(a int) TABLESPACE ts ENGINE=MyISAM;
|
||||
ALTER TABLE t1 ADD COLUMN b int;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`b` int(11) DEFAULT NULL
|
||||
) /*!50100 TABLESPACE ts */ ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(a int) TABLESPACE ts STORAGE DISK ENGINE=MyISAM;
|
||||
ALTER TABLE t1 ADD COLUMN b int;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`b` int(11) DEFAULT NULL
|
||||
) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(a int) ENGINE=MyISAM;
|
||||
ALTER TABLE t1 TABLESPACE ts;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) /*!50100 TABLESPACE ts */ ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t1 TABLESPACE ts2;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) /*!50100 TABLESPACE ts2 */ ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(a int) ENGINE=MyISAM;
|
||||
ALTER TABLE t1 STORAGE MEMORY;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) /*!50100 STORAGE MEMORY */ ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t1 STORAGE DISK;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) /*!50100 STORAGE DISK */ ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(a int) ENGINE=MyISAM;
|
||||
ALTER TABLE t1 STORAGE MEMORY TABLESPACE ts;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) /*!50100 TABLESPACE ts STORAGE MEMORY */ ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t1 STORAGE DISK TABLESPACE ts2;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) /*!50100 TABLESPACE ts2 STORAGE DISK */ ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) NOT NULL,
|
||||
`b` int(11) DEFAULT NULL,
|
||||
`c` int(11) DEFAULT NULL,
|
||||
`d` int(11) NOT NULL,
|
||||
`e` int(11) DEFAULT NULL,
|
||||
`f` int(11) DEFAULT NULL,
|
||||
`g` int(11) DEFAULT NULL,
|
||||
`h` int(11) NOT NULL,
|
||||
`i` int(11) DEFAULT NULL,
|
||||
`j` int(11) DEFAULT NULL,
|
||||
`k` int(11) DEFAULT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) /*!50100 TABLESPACE the_tablespacename STORAGE DISK */ ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
@ -2208,4 +2208,22 @@ trigger_name
|
||||
# Clean-up.
|
||||
drop temporary table t1;
|
||||
drop table t1;
|
||||
End of 6.0 tests.
|
||||
|
||||
#
|
||||
# Bug #12362125: SP INOUT HANDLING IS BROKEN FOR TEXT TYPE.
|
||||
#
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1(c TEXT);
|
||||
CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW
|
||||
BEGIN
|
||||
DECLARE v TEXT;
|
||||
SET v = 'aaa';
|
||||
SET NEW.c = v;
|
||||
END|
|
||||
INSERT INTO t1 VALUES('qazwsxedc');
|
||||
SELECT c FROM t1;
|
||||
c
|
||||
aaa
|
||||
DROP TABLE t1;
|
||||
|
||||
End of 5.5 tests.
|
||||
|
@ -271,7 +271,7 @@ drop table t2;
|
||||
create table t2 (primary key (auto)) select auto+1 as auto,1 as t1, 'a' as t2, repeat('a',256) as t3, binary repeat('b',256) as t4, repeat('a',4096) as t5, binary repeat('b',4096) as t6, '' as t7, binary '' as t8 from t1;
|
||||
show full columns from t2;
|
||||
Field Type Collation Null Key Default Extra Privileges Comment
|
||||
auto int(6) unsigned NULL NO PRI 0 #
|
||||
auto int(11) unsigned NULL NO PRI 0 #
|
||||
t1 int(1) NULL NO 0 #
|
||||
t2 varchar(1) latin1_swedish_ci NO #
|
||||
t3 varchar(256) latin1_swedish_ci NO #
|
||||
|
@ -523,6 +523,69 @@ a
|
||||
2000-01-01 00:00:01
|
||||
2000-01-01 00:00:01
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#50774: failed to get the correct resultset when timestamp values
|
||||
# are appended with .0
|
||||
#
|
||||
CREATE TABLE t1 ( a TIMESTAMP, KEY ( a ) );
|
||||
INSERT INTO t1 VALUES( '2010-02-01 09:31:01' );
|
||||
INSERT INTO t1 VALUES( '2010-02-01 09:31:02' );
|
||||
INSERT INTO t1 VALUES( '2010-02-01 09:31:03' );
|
||||
INSERT INTO t1 VALUES( '2010-02-01 09:31:04' );
|
||||
SELECT * FROM t1 WHERE a >= '2010-02-01 09:31:02.0';
|
||||
a
|
||||
2010-02-01 09:31:02
|
||||
2010-02-01 09:31:03
|
||||
2010-02-01 09:31:04
|
||||
SELECT * FROM t1 WHERE '2010-02-01 09:31:02.0' <= a;
|
||||
a
|
||||
2010-02-01 09:31:02
|
||||
2010-02-01 09:31:03
|
||||
2010-02-01 09:31:04
|
||||
SELECT * FROM t1 WHERE a <= '2010-02-01 09:31:02.0';
|
||||
a
|
||||
2010-02-01 09:31:01
|
||||
2010-02-01 09:31:02
|
||||
SELECT * FROM t1 WHERE '2010-02-01 09:31:02.0' >= a;
|
||||
a
|
||||
2010-02-01 09:31:01
|
||||
2010-02-01 09:31:02
|
||||
EXPLAIN
|
||||
SELECT * FROM t1 WHERE a >= '2010-02-01 09:31:02.0';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
x x x range x x x x x x
|
||||
SELECT * FROM t1 WHERE a >= '2010-02-01 09:31:02.0';
|
||||
a
|
||||
2010-02-01 09:31:02
|
||||
2010-02-01 09:31:03
|
||||
2010-02-01 09:31:04
|
||||
CREATE TABLE t2 ( a TIMESTAMP, KEY ( a DESC ) );
|
||||
INSERT INTO t2 VALUES( '2010-02-01 09:31:01' );
|
||||
INSERT INTO t2 VALUES( '2010-02-01 09:31:02' );
|
||||
INSERT INTO t2 VALUES( '2010-02-01 09:31:03' );
|
||||
INSERT INTO t2 VALUES( '2010-02-01 09:31:04' );
|
||||
INSERT INTO t2 VALUES( '2010-02-01 09:31:05' );
|
||||
INSERT INTO t2 VALUES( '2010-02-01 09:31:06' );
|
||||
INSERT INTO t2 VALUES( '2010-02-01 09:31:07' );
|
||||
INSERT INTO t2 VALUES( '2010-02-01 09:31:08' );
|
||||
INSERT INTO t2 VALUES( '2010-02-01 09:31:09' );
|
||||
INSERT INTO t2 VALUES( '2010-02-01 09:31:10' );
|
||||
INSERT INTO t2 VALUES( '2010-02-01 09:31:11' );
|
||||
# The bug would cause the range optimizer's comparison to use an open
|
||||
# interval here. This reveals itself only in the number of reads
|
||||
# performed.
|
||||
FLUSH STATUS;
|
||||
EXPLAIN
|
||||
SELECT * FROM t2 WHERE a < '2010-02-01 09:31:02.0';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
x x x range x x x x x x
|
||||
SELECT * FROM t2 WHERE a < '2010-02-01 09:31:02.0';
|
||||
a
|
||||
2010-02-01 09:31:01
|
||||
SHOW STATUS LIKE 'Handler_read_next';
|
||||
Variable_name Value
|
||||
Handler_read_next 1
|
||||
DROP TABLE t1, t2;
|
||||
End of 5.1 tests
|
||||
|
||||
Bug#50888 valgrind warnings in Field_timestamp::val_str
|
||||
|
@ -108,3 +108,27 @@ SET @@session.slave_skip_errors= 7;
|
||||
ERROR HY000: Variable 'slave_skip_errors' is a read only variable
|
||||
SET @@global.slave_skip_errors= 7;
|
||||
ERROR HY000: Variable 'slave_skip_errors' is a read only variable
|
||||
#
|
||||
# Bug #11766769 : 59959: SMALL VALUES OF --MAX-ALLOWED-PACKET
|
||||
# ARE NOT BEING HONORED
|
||||
#
|
||||
CREATE TABLE t1 (a MEDIUMTEXT);
|
||||
SET GLOBAL max_allowed_packet=2048;
|
||||
Warnings:
|
||||
Warning 1708 The value of 'max_allowed_packet' should be no less than the value of 'net_buffer_length'
|
||||
SET GLOBAL net_buffer_length=4096;
|
||||
Warnings:
|
||||
Warning 1708 The value of 'max_allowed_packet' should be no less than the value of 'net_buffer_length'
|
||||
SHOW SESSION VARIABLES LIKE 'max_allowed_packet';
|
||||
Variable_name Value
|
||||
max_allowed_packet 2048
|
||||
SHOW SESSION VARIABLES LIKE 'net_buffer_length';
|
||||
Variable_name Value
|
||||
net_buffer_length 4096
|
||||
ERROR 08S01: Got a packet bigger than 'max_allowed_packet' bytes
|
||||
SELECT LENGTH(a) FROM t1;
|
||||
LENGTH(a)
|
||||
SET GLOBAL max_allowed_packet=default;
|
||||
SET GLOBAL net_buffer_length=default;
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
@ -505,6 +505,7 @@ set low_priority_updates=1;
|
||||
set global max_allowed_packet=100;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect max_allowed_packet value: '100'
|
||||
Warning 1708 The value of 'max_allowed_packet' should be no less than the value of 'net_buffer_length'
|
||||
set global max_binlog_cache_size=100;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect max_binlog_cache_size value: '100'
|
||||
@ -1059,6 +1060,8 @@ set global max_write_lock_count =default;
|
||||
set global myisam_data_pointer_size =@my_myisam_data_pointer_size;
|
||||
set global myisam_max_sort_file_size =@my_myisam_max_sort_file_size;
|
||||
set global net_buffer_length =@my_net_buffer_length;
|
||||
Warnings:
|
||||
Warning 1708 The value of 'max_allowed_packet' should be no less than the value of 'net_buffer_length'
|
||||
set global net_write_timeout =@my_net_write_timeout;
|
||||
set global net_read_timeout =@my_net_read_timeout;
|
||||
set global query_cache_limit =@my_query_cache_limit;
|
||||
@ -1543,6 +1546,22 @@ Warning 1292 Truncated incorrect key_cache_block_size value: '0'
|
||||
select @@max_long_data_size;
|
||||
@@max_long_data_size
|
||||
1048576
|
||||
#
|
||||
# Bug#11766424 59527: DECIMAL_BIN_SIZE: ASSERTION `SCALE >= 0 && PRECISION > 0 && SCALE <= PRE
|
||||
#
|
||||
CREATE TABLE t1(f1 DECIMAL(1,1) UNSIGNED);
|
||||
INSERT INTO t1 VALUES (0.2),(0.1);
|
||||
SELECT 1 FROM t1 GROUP BY @a:= (SELECT ROUND(f1) FROM t1 WHERE @a=f1);
|
||||
1
|
||||
1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 AS SELECT @a:= CAST(1 AS UNSIGNED) AS a;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(1) unsigned NOT NULL DEFAULT '0'
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
SET @@global.max_binlog_cache_size=DEFAULT;
|
||||
SET @@global.max_join_size=DEFAULT;
|
||||
SET @@global.key_buffer_size=@kbs;
|
||||
|
@ -4012,6 +4012,15 @@ DROP TABLE t1;
|
||||
#
|
||||
CREATE VIEW v1 AS SELECT 1 IN (1 LIKE 2,0) AS f;
|
||||
DROP VIEW v1;
|
||||
#
|
||||
# Bug 11829681 - 60295: ERROR 1356 ON VIEW THAT EXECUTES FINE AS A QUERY
|
||||
#
|
||||
CREATE TABLE t1 (a INT);
|
||||
CREATE VIEW v1 AS SELECT s.* FROM t1 s, t1 b HAVING a;
|
||||
SELECT * FROM v1;
|
||||
a
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
# -----------------------------------------------------------------
|
||||
# -- End of 5.1 tests.
|
||||
# -----------------------------------------------------------------
|
||||
|
@ -316,3 +316,25 @@ SHOW ERRORS;
|
||||
Level Code Message
|
||||
Error 1051 Unknown table 't1'
|
||||
End of 5.0 tests
|
||||
|
||||
-- Bug#55847
|
||||
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP FUNCTION IF EXISTS f1;
|
||||
CREATE TABLE t1(a INT UNIQUE);
|
||||
CREATE FUNCTION f1(x INT) RETURNS INT
|
||||
BEGIN
|
||||
INSERT INTO t1 VALUES(x);
|
||||
INSERT INTO t1 VALUES(x);
|
||||
RETURN x;
|
||||
END|
|
||||
|
||||
SHOW TABLES WHERE f1(11) = 11;
|
||||
ERROR 23000: Duplicate entry '11' for key 'a'
|
||||
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Error 1062 Duplicate entry '11' for key 'a'
|
||||
|
||||
DROP TABLE t1;
|
||||
DROP FUNCTION f1;
|
||||
|
@ -166,3 +166,66 @@ ERROR XA102: XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was det
|
||||
XA END 'b';
|
||||
XA ROLLBACK 'b';
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#11766752 59936: multiple xa assertions - transactional
|
||||
# statement fuzzer
|
||||
#
|
||||
CREATE TABLE t1 (a INT) engine=InnoDB;
|
||||
XA START 'a';
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SAVEPOINT savep;
|
||||
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the ACTIVE state
|
||||
XA END 'a';
|
||||
SELECT * FROM t1;
|
||||
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the IDLE state
|
||||
INSERT INTO t1 VALUES (2);
|
||||
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the IDLE state
|
||||
SAVEPOINT savep;
|
||||
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the IDLE state
|
||||
SET @a=(SELECT * FROM t1);
|
||||
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the IDLE state
|
||||
XA PREPARE 'a';
|
||||
SELECT * FROM t1;
|
||||
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the PREPARED state
|
||||
INSERT INTO t1 VALUES (2);
|
||||
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the PREPARED state
|
||||
SAVEPOINT savep;
|
||||
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the PREPARED state
|
||||
SET @a=(SELECT * FROM t1);
|
||||
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the PREPARED state
|
||||
UPDATE t1 SET a=1 WHERE a=2;
|
||||
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the PREPARED state
|
||||
XA COMMIT 'a';
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#12352846 - TRANS_XA_START(THD*):
|
||||
# ASSERTION THD->TRANSACTION.XID_STATE.XID.IS_NULL()
|
||||
# FAILED
|
||||
#
|
||||
DROP TABLE IF EXISTS t1, t2;
|
||||
CREATE TABLE t1 (a INT);
|
||||
CREATE TABLE t2 (a INT);
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
# Connection con2
|
||||
XA START 'xid1';
|
||||
# Sending:
|
||||
INSERT INTO t2 SELECT a FROM t1;
|
||||
# Connection default
|
||||
# Waiting until INSERT ... is blocked
|
||||
DELETE FROM t1;
|
||||
COMMIT;
|
||||
# Connection con2
|
||||
# Reaping: INSERT INTO t2 SELECT a FROM t1
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
XA COMMIT 'xid1';
|
||||
ERROR XA102: XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected
|
||||
XA START 'xid1';
|
||||
XA END 'xid1';
|
||||
XA PREPARE 'xid1';
|
||||
XA ROLLBACK 'xid1';
|
||||
# Connection default
|
||||
DROP TABLE t1, t2;
|
||||
|
0
mysql-test/std_data/cluster_7022_table.MYD
Normal file
0
mysql-test/std_data/cluster_7022_table.MYD
Normal file
BIN
mysql-test/std_data/cluster_7022_table.MYI
Normal file
BIN
mysql-test/std_data/cluster_7022_table.MYI
Normal file
Binary file not shown.
BIN
mysql-test/std_data/cluster_7022_table.frm
Normal file
BIN
mysql-test/std_data/cluster_7022_table.frm
Normal file
Binary file not shown.
15
mysql-test/suite/binlog/r/binlog_bug23533.result
Normal file
15
mysql-test/suite/binlog/r/binlog_bug23533.result
Normal file
@ -0,0 +1,15 @@
|
||||
SET AUTOCOMMIT=0;
|
||||
CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b TEXT, PRIMARY KEY(a)) ENGINE=InnoDB;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
1000
|
||||
SET GLOBAL binlog_cache_size=4096;
|
||||
SET GLOBAL max_binlog_cache_size=4096;
|
||||
START TRANSACTION;
|
||||
CREATE TABLE t2 SELECT * FROM t1;
|
||||
ERROR HY000: Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage; increase this mysqld variable and try again
|
||||
COMMIT;
|
||||
SHOW TABLES LIKE 't%';
|
||||
Tables_in_test (t%)
|
||||
t1
|
||||
DROP TABLE t1;
|
10
mysql-test/suite/binlog/r/binlog_bug36391.result
Normal file
10
mysql-test/suite/binlog/r/binlog_bug36391.result
Normal file
@ -0,0 +1,10 @@
|
||||
CREATE TABLE t1(id INT);
|
||||
SHOW TABLES;
|
||||
Tables_in_test
|
||||
t1
|
||||
FLUSH LOGS;
|
||||
DROP TABLE t1;
|
||||
SHOW TABLES;
|
||||
Tables_in_test
|
||||
t1
|
||||
DROP TABLE t1;
|
@ -4,33 +4,47 @@
|
||||
#############################################################
|
||||
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_log_bin.inc
|
||||
--source include/have_binlog_format_row.inc
|
||||
--source include/master-slave.inc
|
||||
|
||||
SET AUTOCOMMIT=0;
|
||||
SET GLOBAL max_binlog_cache_size=4096;
|
||||
SHOW VARIABLES LIKE 'max_binlog_cache_size';
|
||||
|
||||
# Create 1st table
|
||||
CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b TEXT, PRIMARY KEY(a)) ENGINE=InnoDB;
|
||||
|
||||
--disable_query_log
|
||||
let $i= 1000;
|
||||
while ($i)
|
||||
{
|
||||
BEGIN;
|
||||
eval INSERT INTO t1 VALUES($i, REPEAT('x', 4096));
|
||||
COMMIT;
|
||||
dec $i;
|
||||
}
|
||||
--enable_query_log
|
||||
|
||||
SELECT COUNT(*) FROM t1;
|
||||
|
||||
# Set small value for max_binlog_cache_size
|
||||
let $saved_binlog_cache_size= query_get_value(SELECT @@binlog_cache_size AS Value, Value, 1);
|
||||
let $saved_max_binlog_cache_size= query_get_value(SELECT @@max_binlog_cache_size AS Value, Value, 1);
|
||||
SET GLOBAL binlog_cache_size=4096;
|
||||
SET GLOBAL max_binlog_cache_size=4096;
|
||||
|
||||
# New value of max_binlog_cache_size will apply to new session
|
||||
disconnect default;
|
||||
connect(default,localhost,root,,test);
|
||||
|
||||
# Copied data from t1 into t2 large than max_binlog_cache_size
|
||||
START TRANSACTION;
|
||||
--error 1534
|
||||
--error ER_TRANS_CACHE_FULL
|
||||
CREATE TABLE t2 SELECT * FROM t1;
|
||||
COMMIT;
|
||||
SHOW TABLES LIKE 't%';
|
||||
|
||||
|
||||
# 5.1 End of Test
|
||||
--source include/rpl_end.inc
|
||||
--disable_query_log
|
||||
eval SET GLOBAL max_binlog_cache_size=$saved_max_binlog_cache_size;
|
||||
eval SET GLOBAL binlog_cache_size=$saved_binlog_cache_size;
|
||||
--enable_query_log
|
||||
DROP TABLE t1;
|
||||
disconnect default;
|
||||
connect(default,localhost,root,,test);
|
@ -13,17 +13,18 @@
|
||||
#
|
||||
#
|
||||
|
||||
--source include/master-slave.inc
|
||||
--source include/have_log_bin.inc
|
||||
--source include/have_binlog_format_mixed.inc
|
||||
|
||||
create table t1(id int);
|
||||
CREATE TABLE t1(id INT);
|
||||
let $binlog= query_get_value(SHOW MASTER STATUS, File, 1);
|
||||
let $binlog_path= `SELECT CONCAT(@@DATADIR, '$binlog')`;
|
||||
SHOW TABLES;
|
||||
FLUSH LOGS;
|
||||
DROP TABLE t1;
|
||||
|
||||
show tables;
|
||||
--exec $MYSQL_BINLOG $binlog_path | $MYSQL test
|
||||
SHOW TABLES;
|
||||
|
||||
--source include/show_master_status.inc
|
||||
|
||||
flush logs;
|
||||
|
||||
--exec $MYSQL_BINLOG $MYSQL_TEST_DIR/var/log/master-bin.000001 | $MYSQL test
|
||||
|
||||
drop table t1;
|
||||
--source include/rpl_end.inc
|
||||
# Clean up
|
||||
DROP TABLE t1;
|
@ -6,6 +6,8 @@ source include/not_embedded.inc;
|
||||
# Don't test this under valgrind, memory leaks will occur
|
||||
--source include/not_valgrind.inc
|
||||
source include/have_debug.inc;
|
||||
# Avoid CrashReporter popup on Mac
|
||||
--source include/not_crashrep.inc
|
||||
call mtr.add_suppression('Attempting backtrace');
|
||||
call mtr.add_suppression('MSYQL_BIN_LOG::purge_logs failed to process registered files that would be purged.');
|
||||
call mtr.add_suppression('MSYQL_BIN_LOG::open failed to sync the index file');
|
||||
|
@ -11,4 +11,3 @@
|
||||
##############################################################################
|
||||
binlog_truncate_innodb : BUG#57291 2010-10-20 anitha Originally disabled due to BUG#42643. Product bug fixed, but test changes needed
|
||||
binlog_spurious_ddl_errors : BUG#54195 2010-06-03 alik binlog_spurious_ddl_errors.test fails, thus disabled
|
||||
binlog_row_failure_mixing_engines : BUG#58416 2010-11-23 ramil Fails on win x86 debug_max
|
||||
|
@ -1,8 +0,0 @@
|
||||
[row]
|
||||
binlog-format=row
|
||||
|
||||
[stmt]
|
||||
binlog-format=statement
|
||||
|
||||
[mix]
|
||||
binlog-format=mixed
|
@ -1,3 +0,0 @@
|
||||
a
|
||||
b
|
||||
c
|
@ -1,5 +0,0 @@
|
||||
INSTALL PLUGIN example SONAME 'ha_example.so';
|
||||
SELECT @@global.connect_timeout AS connect_timeout, @@global.local_infile AS local_infile;
|
||||
connect_timeout 4711
|
||||
local_infile 1
|
||||
UNINSTALL PLUGIN example;
|
@ -1,33 +0,0 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
|
||||
**** On Master ****
|
||||
CREATE TABLE t1 (b CHAR(10));
|
||||
|
||||
**** On Slave ****
|
||||
STOP SLAVE;
|
||||
|
||||
**** On Master ****
|
||||
LOAD DATA INFILE FILENAME
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
3
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (b CHAR(10))
|
||||
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
|
||||
master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/rpl_bug12691.dat' INTO TABLE `t1` FIELDS TERMINATED BY '|' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`b`) ;file_id=#
|
||||
|
||||
**** On Slave ****
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
||||
START SLAVE;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
0
|
||||
|
||||
**** On Master ****
|
||||
DROP TABLE t1;
|
@ -1,23 +0,0 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
DROP TABLE IF EXISTS t1,t2;
|
||||
SET AUTOCOMMIT=0;
|
||||
SET GLOBAL max_binlog_cache_size=4096;
|
||||
SHOW VARIABLES LIKE 'max_binlog_cache_size';
|
||||
Variable_name Value
|
||||
max_binlog_cache_size 4096
|
||||
CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b TEXT, PRIMARY KEY(a)) ENGINE=InnoDB;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
1000
|
||||
START TRANSACTION;
|
||||
CREATE TABLE t2 SELECT * FROM t1;
|
||||
ERROR HY000: Writing one row to the row-based binary log failed
|
||||
COMMIT;
|
||||
SHOW TABLES LIKE 't%';
|
||||
Tables_in_test (t%)
|
||||
t1
|
@ -1,16 +0,0 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES ('a');
|
||||
UPDATE t1 SET a = 'MyISAM';
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a
|
||||
MyISAM
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a
|
||||
MyISAM
|
||||
DROP TABLE t1;
|
@ -1,16 +0,0 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
CREATE TABLE t1 ( a INT, b INT DEFAULT -3 );
|
||||
INSERT INTO t1 VALUES (1, DEFAULT);
|
||||
UPDATE t1 SET a = 3;
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a b
|
||||
3 -3
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a b
|
||||
3 -3
|
||||
DROP TABLE t1;
|
@ -1,15 +0,0 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
create table `t1` (`id` int not null auto_increment primary key);
|
||||
create trigger `trg` before insert on `t1` for each row begin end;
|
||||
set @@global.debug="+d,simulate_bug33029";
|
||||
stop slave;
|
||||
start slave;
|
||||
insert into `t1` values ();
|
||||
select * from t1;
|
||||
id
|
||||
1
|
@ -1,18 +0,0 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
drop table if exists t1;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 't1'
|
||||
create table t1(id int);
|
||||
show tables;
|
||||
Tables_in_test
|
||||
t1
|
||||
show master status;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
|
||||
flush logs;
|
||||
drop table t1;
|
@ -1,17 +0,0 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
CREATE TABLE char128_utf8 (
|
||||
i1 INT NOT NULL,
|
||||
c CHAR(128) CHARACTER SET utf8 NOT NULL,
|
||||
i2 INT NOT NULL);
|
||||
INSERT INTO char128_utf8 VALUES ( 1, "123", 1 );
|
||||
SELECT * FROM char128_utf8;
|
||||
i1 c i2
|
||||
1 123 1
|
||||
SELECT * FROM char128_utf8;
|
||||
i1 c i2
|
||||
1 123 1
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user