mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge with 5.2.
no_error handling for select (used by INSERT ... SELECT) still needs to be fixed, but I will do that in a separate commit
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2000, 2010, Oracle and/or its affiliates.
|
||||
# Copyright (c) 2000, 2011, Oracle and/or its affiliates.
|
||||
# Copyright (c) 2009-2011, Monty Program Ab
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
|
@ -2,7 +2,6 @@
|
||||
# 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,21 +13,23 @@ funcs_1.ndb* # joro : NDB tests marked as experiment
|
||||
|
||||
funcs_2.ndb_charset # joro : NDB tests marked as experimental as agreed with bochklin
|
||||
|
||||
innodb_plugin.* @solaris # Bug#56063 InnoDB Plugin mysql-tests fail on Solaris
|
||||
innodb_plugin.* @solaris # Bug#11763366 InnoDB Plugin mysql-tests fail on Solaris
|
||||
|
||||
main.ctype_gbk_binlog @solaris # Bug#11754407: main.ctype_gbk_binlog fails sporadically : Table 't2' already exists
|
||||
main.func_str @solaris # joro: Bug#11750406
|
||||
main.sp @solaris # joro : Bug#11761625
|
||||
main.query_cache_28249 # Bug#12584161 2009-03-25 main.query_cache_28249 fails sporadically
|
||||
|
||||
main.ctype_gbk_binlog @solaris # Bug#46010: main.ctype_gbk_binlog fails sporadically : Table 't2' already exists
|
||||
main.func_str @solaris # joro: Bug#40928
|
||||
main.sp @solaris # joro : Bug#54138
|
||||
main.outfile_loaddata @solaris # joro : Bug #46895
|
||||
|
||||
ndb.* # joro : NDB tests marked as experimental as agreed with bochklin
|
||||
|
||||
rpl.rpl_innodb_bug28430 @solaris # Bug#46029
|
||||
rpl.rpl_row_sp011 @solaris # Joro : Bug #45445
|
||||
rpl.rpl_innodb_bug28430 # Bug#11754425
|
||||
rpl.rpl_insert # Sven: BUG#12764817
|
||||
rpl.rpl_row_sp011 @solaris # Joro : Bug #11753919
|
||||
rpl.rpl_stop_slave # Sven : BUG#12345981
|
||||
|
||||
rpl_ndb.* # joro : NDB tests marked as experimental as agreed with bochklin
|
||||
rpl_ndb.rpl_ndb_log # Bug#38998
|
||||
rpl_ndb.rpl_ndb_log # Bug#11749433
|
||||
|
||||
stress.ddl_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
||||
|
||||
@ -46,6 +47,3 @@ parts.partition_mgm_lc1_ndb # joro : NDB tests marked as experiment
|
||||
parts.partition_mgm_lc2_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
||||
parts.partition_syntax_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
||||
parts.partition_value_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
||||
main.gis-rtree # svoj: due to BUG#38965
|
||||
main.type_float # svoj: due to BUG#38965
|
||||
main.type_newdecimal # svoj: due to BUG#38965
|
||||
|
@ -1,3 +1,18 @@
|
||||
# Copyright (c) 2007 MySQL AB, 2009, 2010 Sun Microsystems, Inc.
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
# Use default setting for mysqld processes
|
||||
!include default_mysqld.cnf
|
||||
|
||||
|
@ -1,3 +1,18 @@
|
||||
# Copyright (c) 2007, 2010, Oracle and/or its affiliates
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
# Default values that applies to all MySQL Servers
|
||||
[mysqld]
|
||||
open-files-limit= 1024
|
||||
|
@ -33,6 +33,7 @@ EXPLAIN
|
||||
SELECT COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)');
|
||||
SELECT COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)');
|
||||
|
||||
--replace_column 9 #
|
||||
EXPLAIN
|
||||
SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
|
||||
SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
|
||||
|
@ -1,3 +1,18 @@
|
||||
-- Copyright (c) 2008, 2010, Oracle and/or its affiliates
|
||||
--
|
||||
-- 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
|
||||
-- the Free Software Foundation; version 2 of the License.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program; if not, write to the Free Software Foundation,
|
||||
-- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
delimiter ||;
|
||||
|
||||
use mtr||
|
||||
@ -61,3 +76,13 @@ BEGIN
|
||||
mysql.user;
|
||||
|
||||
END||
|
||||
|
||||
--
|
||||
-- Procedure used by test case used to force all
|
||||
-- servers to restart after testcase and thus skipping
|
||||
-- check test case after test
|
||||
--
|
||||
CREATE DEFINER=root@localhost PROCEDURE force_restart()
|
||||
BEGIN
|
||||
SELECT 1 INTO OUTFILE 'force_restart';
|
||||
END||
|
||||
|
@ -1,3 +1,18 @@
|
||||
-- Copyright (c) 2008, 2011, Oracle and/or its affiliates
|
||||
--
|
||||
-- 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
|
||||
-- the Free Software Foundation; version 2 of the License.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program; if not, write to the Free Software Foundation,
|
||||
-- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
delimiter ||;
|
||||
|
||||
use mtr||
|
||||
|
@ -1,2 +1,18 @@
|
||||
# Copyright (c) 2007 MySQL AB
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
SET GLOBAL BINLOG_FORMAT=MIXED;
|
||||
SET SESSION BINLOG_FORMAT=MIXED;
|
||||
|
@ -1,2 +1,18 @@
|
||||
# Copyright (c) 2007 MySQL AB
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
SET GLOBAL BINLOG_FORMAT=ROW;
|
||||
SET SESSION BINLOG_FORMAT=ROW;
|
||||
|
@ -1,2 +1,18 @@
|
||||
# Copyright (c) 2007 MySQL AB
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
SET GLOBAL BINLOG_FORMAT=STATEMENT;
|
||||
SET SESSION BINLOG_FORMAT=STATEMENT;
|
||||
|
@ -1,5 +1,20 @@
|
||||
# -*- cperl -*-
|
||||
|
||||
# Copyright (c) 2007, 2010, Oracle and/or its affiliates
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
package My::Config::Option;
|
||||
|
||||
use strict;
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2007, 2011, Oracle and/or its affiliates
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Library General Public
|
||||
@ -146,7 +146,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,6 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
# Copyright (c) 2008 MySQL AB, 2008, 2009 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
# Copyright (c) 2007 MySQL AB, 2008, 2009 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (c) 2004, 2011, Oracle and/or its affiliates.
|
||||
# Copyright (c) 2007, 2011, Oracle and/or its affiliates.
|
||||
#
|
||||
# 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
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2008 MySQL AB
|
||||
# Copyright (c) 2008 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
|
@ -153,7 +153,7 @@ sub is_set {
|
||||
foreach my $set_opt (@$set_opts){
|
||||
my ($opt_name2, $value2)= _split_option($set_opt);
|
||||
|
||||
if ($opt_name1 eq $opt_name2){
|
||||
if ($opt_name1 eq $opt_name2 and $value1 eq $value2){
|
||||
# Option already set
|
||||
return 1;
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
# Copyright (c) 2008 MySQL AB, 2008, 2009 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
# Copyright (c) 2007 MySQL AB, 2008, 2009 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
|
@ -1,4 +1,5 @@
|
||||
# Copyright (C) 2008 MySQL AB
|
||||
# Copyright (c) 2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
@ -11,7 +12,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
testroot = $(prefix)
|
||||
safedir = $(testroot)/mysql-test/lib/My/SafeProcess
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Copyright (C) 2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
/* Copyright (c) 2007, 2008 MySQL AB, 2008, 2009 Sun Microsystems, Inc.
|
||||
Use is subject to license terms.
|
||||
|
||||
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
|
||||
@ -11,7 +12,8 @@
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
/* Copyright (c) 2008, 2010, Oracle and/or its affiliates
|
||||
|
||||
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
|
||||
@ -11,7 +11,8 @@
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
|
@ -1,6 +1,21 @@
|
||||
#!/usr/bin/perl
|
||||
# -*- cperl -*-
|
||||
|
||||
# Copyright (c) 2007, 2011, Oracle and/or its affiliates
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
@ -94,7 +109,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 +149,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,4 +1,5 @@
|
||||
/* Copyright (C) 2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
/* Copyright (c) 2007, 2008 MySQL AB, 2009, 2010 Sun Microsystems, Inc.
|
||||
Use is subject to license terms.
|
||||
|
||||
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
|
||||
@ -11,7 +12,8 @@
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2008 MySQL AB
|
||||
# Copyright (c) 2008 MySQL AB, 2008 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2008 MySQL AB
|
||||
# Copyright (c) 2008 MySQL AB, 2008 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2005, 2010, Oracle and/or its affiliates
|
||||
#
|
||||
# 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
|
||||
@ -226,8 +226,11 @@ sub collect_test_cases ($$$) {
|
||||
sub split_testname {
|
||||
my ($test_name)= @_;
|
||||
|
||||
# Get rid of directory part and split name on .'s
|
||||
my @parts= split(/\./, basename($test_name));
|
||||
# If .test file name is used, get rid of directory part
|
||||
$test_name= basename($test_name) if $test_name =~ /\.test$/;
|
||||
|
||||
# Now split name on .'s
|
||||
my @parts= split(/\./, $test_name);
|
||||
|
||||
if (@parts == 1){
|
||||
# Only testname given, ex: alias
|
||||
@ -332,10 +335,30 @@ sub collect_one_suite
|
||||
my %disabled;
|
||||
if ( open(DISABLED, "$testdir/disabled.def" ) )
|
||||
{
|
||||
# $^O on Windows considered not generic enough
|
||||
my $plat= (IS_WINDOWS) ? 'windows' : $^O;
|
||||
|
||||
while ( <DISABLED> )
|
||||
{
|
||||
chomp;
|
||||
if ( /^\s*(\S+)\s*:\s*(.*?)\s*$/ )
|
||||
#diasble the test case if platform matches
|
||||
if ( /\@/ )
|
||||
{
|
||||
if ( /\@$plat/ )
|
||||
{
|
||||
/^\s*(\S+)\s*\@$plat.*:\s*(.*?)\s*$/ ;
|
||||
$disabled{$1}= $2;
|
||||
}
|
||||
elsif ( /\@!(\S*)/ )
|
||||
{
|
||||
if ( $1 ne $plat)
|
||||
{
|
||||
/^\s*(\S+)\s*\@!.*:\s*(.*?)\s*$/ ;
|
||||
$disabled{$1}= $2;
|
||||
}
|
||||
}
|
||||
}
|
||||
elsif ( /^\s*(\S+)\s*:\s*(.*?)\s*$/ )
|
||||
{
|
||||
$disabled{$1}= $2;
|
||||
}
|
||||
@ -469,20 +492,32 @@ sub collect_one_suite
|
||||
#print_testcases(@cases);
|
||||
|
||||
my @new_cases;
|
||||
foreach my $comb (@combinations)
|
||||
TEST: foreach my $test (@cases)
|
||||
{
|
||||
foreach my $test (@cases)
|
||||
{
|
||||
if ( $test->{'skip'} )
|
||||
{
|
||||
push(@new_cases, $test);
|
||||
next;
|
||||
}
|
||||
|
||||
next if ( $test->{'skip'} );
|
||||
|
||||
# Skip this combination if the values it provides
|
||||
# already are set in master_opt or slave_opt
|
||||
foreach my $comb (@combinations)
|
||||
{
|
||||
# Skip all other combinations if the values they change
|
||||
# are already fixed in master_opt or slave_opt
|
||||
if (My::Options::is_set($test->{master_opt}, $comb->{comb_opt}) &&
|
||||
My::Options::is_set($test->{slave_opt}, $comb->{comb_opt}) ){
|
||||
next;
|
||||
}
|
||||
|
||||
# Add combination name short name
|
||||
$test->{combination}= $comb->{name};
|
||||
|
||||
# Add the test to new test cases list
|
||||
push(@new_cases, $test);
|
||||
next TEST;
|
||||
}
|
||||
}
|
||||
|
||||
foreach my $comb (@combinations)
|
||||
{
|
||||
# Copy test options
|
||||
my $new_test= My::Test->new();
|
||||
while (my ($key, $value) = each(%$test)) {
|
||||
@ -505,17 +540,6 @@ sub collect_one_suite
|
||||
}
|
||||
}
|
||||
|
||||
# Add the plain test if it was not already added
|
||||
# as part of a combination
|
||||
my %added;
|
||||
foreach my $new_test (@new_cases){
|
||||
$added{$new_test->{name}}= 1;
|
||||
}
|
||||
foreach my $test (@cases){
|
||||
push(@new_cases, $test) unless $added{$test->{name}};
|
||||
}
|
||||
|
||||
|
||||
#print_testcases(@new_cases);
|
||||
@cases= @new_cases;
|
||||
#print_testcases(@cases);
|
||||
@ -639,9 +663,6 @@ sub process_opts {
|
||||
my @opts= @{$tinfo->{$opt_name}};
|
||||
$tinfo->{$opt_name} = [];
|
||||
|
||||
my @plugins;
|
||||
my %seen;
|
||||
|
||||
foreach my $opt (@opts)
|
||||
{
|
||||
my $value;
|
||||
@ -657,14 +678,6 @@ sub process_opts {
|
||||
next;
|
||||
}
|
||||
|
||||
$value= mtr_match_prefix($opt, "--plugin-load=");
|
||||
if (defined $value)
|
||||
{
|
||||
push @plugins, $value unless $seen{$value};
|
||||
$seen{$value}=1;
|
||||
next;
|
||||
}
|
||||
|
||||
$value= mtr_match_prefix($opt, "--result-file=");
|
||||
if ( defined $value )
|
||||
{
|
||||
@ -711,11 +724,6 @@ sub process_opts {
|
||||
# Ok, this was a real option, add it
|
||||
push(@{$tinfo->{$opt_name}}, $opt);
|
||||
}
|
||||
|
||||
if (@plugins) {
|
||||
my $sep = (IS_WINDOWS) ? ';' : ':';
|
||||
push @{$tinfo->{$opt_name}}, "--plugin-load=" . join($sep, @plugins);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2004, 2006 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
# Copyright (c) 2004, 2006, 2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2004 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
# Copyright (c) 2004, 2011, Oracle and/or its affiliates
|
||||
#
|
||||
# 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
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2004-2007 MySQL AB, 2008 Sun Microsystems, Inc.
|
||||
# Copyright (c) 2004-2008 MySQL AB, 2008 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2004, 2010, Oracle and/or its affiliates
|
||||
#
|
||||
# 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
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2004-2007 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
# Copyright (c) 2004-2007 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2006-2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
# Copyright (c) 2006, 2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
|
@ -1,4 +1,21 @@
|
||||
# -*- cperl -*-
|
||||
|
||||
# Copyright (c) 2007 MySQL AB
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
use Test::More qw(no_plan);
|
||||
use strict;
|
||||
|
||||
|
@ -1,4 +1,21 @@
|
||||
# -*- cperl -*-
|
||||
|
||||
# Copyright (c) 2007 MySQL AB
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
use Test::More qw(no_plan);
|
||||
use strict;
|
||||
|
||||
|
@ -1,5 +1,21 @@
|
||||
|
||||
# -*- cperl -*-
|
||||
|
||||
# Copyright (c) 2008 MySQL AB
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
use Test::More qw(no_plan);
|
||||
use strict;
|
||||
|
||||
|
@ -1,4 +1,21 @@
|
||||
# -*- cperl -*-
|
||||
|
||||
# Copyright (c) 2008 MySQL AB
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
use Test::More qw(no_plan);
|
||||
use strict;
|
||||
|
||||
|
@ -1,5 +1,21 @@
|
||||
# -*- cperl -*-
|
||||
|
||||
# Copyright (c) 2007 MySQL AB
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
use strict;
|
||||
use FindBin;
|
||||
use IO::File;
|
||||
|
@ -1,6 +1,22 @@
|
||||
#!/usr/bin/perl
|
||||
# -*- cperl -*-
|
||||
|
||||
# Copyright (c) 2007, 2008 MySQL AB
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
use strict;
|
||||
use FindBin;
|
||||
use My::SafeProcess;
|
||||
|
@ -1,6 +1,22 @@
|
||||
#!/usr/bin/perl
|
||||
# -*- cperl -*-
|
||||
|
||||
# Copyright (c) 2007 MySQL AB
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
use strict;
|
||||
|
||||
use My::File::Path;
|
||||
|
@ -1,6 +1,22 @@
|
||||
#!/usr/bin/perl
|
||||
# -*- cperl -*-
|
||||
|
||||
# Copyright (c) 2007 MySQL AB
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
use strict;
|
||||
use Getopt::Long;
|
||||
use IO::File;
|
||||
|
@ -1,6 +1,22 @@
|
||||
#!/usr/bin/perl
|
||||
# -*- cperl -*-
|
||||
|
||||
# Copyright (c) 2007 MySQL AB
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
use strict;
|
||||
|
||||
use My::File::Path;
|
||||
|
@ -1,6 +1,22 @@
|
||||
#!/usr/bin/perl
|
||||
# -*- cperl -*-
|
||||
|
||||
# Copyright (c) 2007 MySQL AB
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use File::Temp qw / tempdir /;
|
||||
|
@ -1,6 +1,22 @@
|
||||
#!/usr/bin/perl
|
||||
# -*- cperl -*-
|
||||
|
||||
# Copyright (c) 2007 MySQL AB
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
|
@ -1,6 +1,22 @@
|
||||
#!/usr/bin/perl
|
||||
# -*- cperl -*-
|
||||
|
||||
# Copyright (c) 2007 MySQL AB
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
use strict;
|
||||
use Getopt::Long;
|
||||
|
||||
|
@ -1,5 +1,21 @@
|
||||
# -*- cperl -*-
|
||||
|
||||
# Copyright (c) 2008 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
package My::Config::Option;
|
||||
|
||||
use strict;
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2005-2006 MySQL AB
|
||||
# Copyright (c) 2005, 2006 MySQL AB, 2008, 2009 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2004, 2006 MySQL AB
|
||||
# Copyright (c) 2004, 2006 MySQL AB, 2008 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2004 MySQL AB
|
||||
# Copyright (c) 2004 MySQL AB, 2008 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2006 MySQL AB
|
||||
# Copyright (c) 2006 MySQL AB, 2008 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2004-2006 MySQL AB
|
||||
# Copyright (c) 2004-2006 MySQL AB, 2008 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2004-2006 MySQL AB
|
||||
# Copyright (c) 2004-2006 MySQL AB, 2008 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2004-2006 MySQL AB
|
||||
# Copyright (c) 2004-2006 MySQL AB, 2008 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2004-2006 MySQL AB
|
||||
# Copyright (c) 2004-2006 MySQL AB, 2008 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2004-2006 MySQL AB
|
||||
# Copyright (c) 2004-2006 MySQL AB, 2008 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2006 MySQL AB
|
||||
# Copyright (c) 2006 MySQL AB, 2008, 2009 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2005-2006 MySQL AB
|
||||
# Copyright (c) 2005, 2006 MySQL AB, 2008 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2006 MySQL AB
|
||||
# Copyright (c) 2006 MySQL AB, 2008 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
|
@ -1,7 +1,22 @@
|
||||
#!/usr/bin/perl
|
||||
# -*- cperl -*-
|
||||
|
||||
#
|
||||
# Copyright (c) 2008, 2009 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# mysql-test-run.pl
|
||||
|
@ -264,7 +264,7 @@ my $opt_strace_client;
|
||||
|
||||
our $opt_user = "root";
|
||||
|
||||
my $opt_valgrind= 0;
|
||||
our $opt_valgrind= 0;
|
||||
my @default_valgrind_args= ("--show-reachable=yes");
|
||||
my @valgrind_args;
|
||||
our $opt_valgrind_mysqld= 0;
|
||||
@ -2238,9 +2238,15 @@ sub environment_setup {
|
||||
$ENV{'MYSQLADMIN'}= native_path($exe_mysqladmin);
|
||||
$ENV{'MYSQL_CLIENT_TEST'}= mysql_client_test_arguments();
|
||||
$ENV{'MYSQL_FIX_SYSTEM_TABLES'}= mysql_fix_arguments();
|
||||
$ENV{'MYSQLD'}= mysqld_client_arguments();
|
||||
$ENV{'MYSQLD_SIMPLE_CMD'}= mysqld_client_arguments();
|
||||
$ENV{'EXE_MYSQL'}= $exe_mysql;
|
||||
|
||||
my $exe_mysqld= find_mysqld($basedir);
|
||||
$ENV{'MYSQLD'}= $exe_mysqld;
|
||||
my $extra_opts= join (" ", @opt_extra_mysqld_opt);
|
||||
$ENV{'MYSQLD_CMD'}= "$exe_mysqld --defaults-group-suffix=.1 ".
|
||||
"--defaults-file=$path_config_file $extra_opts";
|
||||
|
||||
# ----------------------------------------------------
|
||||
# bug25714 executable may _not_ exist in
|
||||
# some versions, test using it should be skipped
|
||||
@ -2606,7 +2612,7 @@ sub check_debug_support ($) {
|
||||
#
|
||||
# Helper function to find the correct value for the opt_vs_config
|
||||
# if it was not set explicitly.
|
||||
#
|
||||
#
|
||||
# the configuration with the most recent build dir in sql/ is selected.
|
||||
#
|
||||
# note: looking for all BuildLog.htm files everywhere in the tree with the
|
||||
@ -2635,6 +2641,33 @@ sub fix_vs_config_dir () {
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Helper function to handle configuration-based subdirectories which Visual
|
||||
# Studio uses for storing binaries. If opt_vs_config is set, this returns
|
||||
# a path based on that setting; if not, it returns paths for the default
|
||||
# /release/ and /debug/ subdirectories.
|
||||
#
|
||||
# $exe can be undefined, if the directory itself will be used
|
||||
#
|
||||
sub vs_config_dirs ($$) {
|
||||
my ($path_part, $exe) = @_;
|
||||
|
||||
$exe = "" if not defined $exe;
|
||||
|
||||
# Don't look in these dirs when not on windows
|
||||
return () unless IS_WINDOWS;
|
||||
|
||||
if ($opt_vs_config)
|
||||
{
|
||||
return ("$basedir/$path_part/$opt_vs_config/$exe");
|
||||
}
|
||||
|
||||
return ("$basedir/$path_part/release/$exe",
|
||||
"$basedir/$path_part/relwithdebinfo/$exe",
|
||||
"$basedir/$path_part/debug/$exe");
|
||||
}
|
||||
|
||||
|
||||
sub check_ndbcluster_support ($) {
|
||||
my $mysqld_variables= shift;
|
||||
|
||||
@ -3830,7 +3863,7 @@ sub run_testcase ($$) {
|
||||
# Allow only alpanumerics pluss _ - + . in combination names,
|
||||
# or anything beginning with -- (the latter comes from --combination)
|
||||
my $combination= $tinfo->{combination};
|
||||
if ($combination && $combination !~ /^\w[-\w\.\+]+$/
|
||||
if ($combination && $combination !~ /^\w[-\w\.\+]*$/
|
||||
&& $combination !~ /^--/)
|
||||
{
|
||||
mtr_error("Combination '$combination' contains illegal characters");
|
||||
@ -4290,6 +4323,11 @@ sub extract_server_log ($$) {
|
||||
else
|
||||
{
|
||||
push(@lines, $line);
|
||||
if (scalar(@lines) > 1000000) {
|
||||
$Ferr = undef;
|
||||
mtr_warning("Too much log from test, bailing out from extracting");
|
||||
return ();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -4966,6 +5004,9 @@ sub mysqld_arguments ($$$) {
|
||||
}
|
||||
|
||||
my $found_skip_core= 0;
|
||||
my @plugins;
|
||||
my %seen;
|
||||
my $plugin;
|
||||
foreach my $arg ( @$extra_opts )
|
||||
{
|
||||
# Allow --skip-core-file to be set in <testname>-[master|slave].opt file
|
||||
@ -4982,6 +5023,11 @@ sub mysqld_arguments ($$$) {
|
||||
{
|
||||
; # Dont add --skip-log-bin when mysqld have --log-slave-updates in config
|
||||
}
|
||||
elsif ($plugin = mtr_match_prefix($arg, "--plugin-load="))
|
||||
{
|
||||
push @plugins, $plugin unless $seen{$plugin};
|
||||
$seen{$plugin} = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
mtr_add_arg($args, "%s", $arg);
|
||||
@ -4998,6 +5044,11 @@ sub mysqld_arguments ($$$) {
|
||||
mtr_add_arg($args, "--loose-debug-sync-timeout=%s",
|
||||
$opt_debug_sync_timeout) unless $opt_user_args;
|
||||
|
||||
if (@plugins) {
|
||||
my $sep = (IS_WINDOWS) ? ';' : ':';
|
||||
mtr_add_arg($args, "--plugin-load=%s" . join($sep, @plugins));
|
||||
}
|
||||
|
||||
return $args;
|
||||
}
|
||||
|
||||
|
@ -1252,4 +1252,33 @@ DROP TABLE t1;
|
||||
CREATE TABLE t1 (a TEXT, id INT, b INT);
|
||||
ALTER TABLE t1 DROP COLUMN a, ADD COLUMN c TEXT FIRST;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Test for bug #12652385 - "61493: REORDERING COLUMNS TO POSITION
|
||||
# FIRST CAN CAUSE DATA TO BE CORRUPTED".
|
||||
#
|
||||
drop table if exists t1;
|
||||
# Use MyISAM engine as the fact that InnoDB doesn't support
|
||||
# in-place ALTER TABLE in cases when columns are being renamed
|
||||
# hides some bugs.
|
||||
create table t1 (i int, j int) engine=myisam;
|
||||
insert into t1 value (1, 2);
|
||||
# First, test for original problem described in the bug report.
|
||||
select * from t1;
|
||||
i j
|
||||
1 2
|
||||
# Change of column order by the below ALTER TABLE statement should
|
||||
# affect both column names and column contents.
|
||||
alter table t1 modify column j int first;
|
||||
select * from t1;
|
||||
j i
|
||||
2 1
|
||||
# Now test for similar problem with the same root.
|
||||
# The below ALTER TABLE should change not only the name but
|
||||
# also the value for the last column of the table.
|
||||
alter table t1 drop column i, add column k int default 0;
|
||||
select * from t1;
|
||||
j k
|
||||
2 0
|
||||
# Clean-up.
|
||||
drop table t1;
|
||||
End of 5.1 tests
|
||||
|
@ -12766,3 +12766,19 @@ select sum(length(a)),sum(b) from t1;
|
||||
sum(length(a)) sum(b)
|
||||
8670 187
|
||||
drop table t1;
|
||||
#
|
||||
# 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;
|
||||
|
12
mysql-test/r/archive_debug.result
Normal file
12
mysql-test/r/archive_debug.result
Normal file
@ -0,0 +1,12 @@
|
||||
#
|
||||
# BUG#12402794 - 60976: CRASH, VALGRIND WARNING AND MEMORY LEAK
|
||||
# WITH PARTITIONED ARCHIVE TABLES
|
||||
#
|
||||
CREATE TABLE t1(a INT) ENGINE=ARCHIVE;
|
||||
INSERT INTO t1 VALUES(1);
|
||||
SET SESSION debug='d,simulate_archive_open_failure';
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check error Corrupt
|
||||
SET SESSION debug=DEFAULT;
|
||||
DROP TABLE t1;
|
@ -706,6 +706,24 @@ 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 1105 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))
|
||||
a
|
||||
SELECT length(CONVERT(repeat('a',2048), CHAR(2049)));
|
||||
length(CONVERT(repeat('a',2048), CHAR(2049)))
|
||||
2048
|
||||
SET @@GLOBAL.max_allowed_packet=default;
|
||||
End of 5.1 tests
|
||||
select cast("2101-00-01 02:03:04" as datetime);
|
||||
cast("2101-00-01 02:03:04" as datetime)
|
||||
|
@ -83,5 +83,17 @@ a a b filler
|
||||
SET SESSION debug = DEFAULT;
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# Bug#11747970 34660: CRASH WHEN FEDERATED TABLE LOSES CONNECTION DURING INSERT ... SELECT
|
||||
#
|
||||
CREATE TABLE t1(f1 INT, KEY(f1));
|
||||
CREATE TABLE t2(f1 INT);
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
INSERT INTO t2 VALUES (1),(2);
|
||||
SET SESSION debug="d,bug11747970_raise_error";
|
||||
INSERT IGNORE INTO t2 SELECT f1 FROM t1 a WHERE NOT EXISTS (SELECT 1 FROM t2 b WHERE a.f1 = b.f1);
|
||||
ERROR HY000: Unknown error
|
||||
SET SESSION debug = DEFAULT;
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
# End of 5.1 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 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 1 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;
|
||||
|
@ -419,7 +419,7 @@ SET TIME_ZONE= '+04:00';
|
||||
ALTER EVENT e1 DO SELECT 2;
|
||||
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 e1 root@localhost -03:00 RECURRING NULL 1 DAY 2005-12-31 20:58:59 2030-01-03 00:00:00 ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
events_test e1 root@localhost -03:00 RECURRING NULL 1 DAY 2005-12-31 20:58:59 2030-01-03 00:00:00 DISABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
DROP EVENT e1;
|
||||
SET TIME_ZONE='+05:00';
|
||||
CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' DO
|
||||
@ -535,6 +535,7 @@ DROP EVENT e3;
|
||||
DROP EVENT e2;
|
||||
DROP EVENT e1;
|
||||
SET TIME_ZONE=@save_time_zone;
|
||||
SET TIMESTAMP=DEFAULT;
|
||||
drop event if exists new_event;
|
||||
CREATE EVENT new_event ON SCHEDULE EVERY 0 SECOND DO SELECT 1;
|
||||
ERROR HY000: INTERVAL is either not positive or too big
|
||||
@ -755,6 +756,59 @@ 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;
|
||||
#
|
||||
# Bug#12546938 (formerly known as bug#61005):
|
||||
# CREATE IF NOT EXIST EVENT WILL CREATE MULTIPLE RUNNING EVENTS
|
||||
#
|
||||
USE events_test;
|
||||
SET GLOBAL event_scheduler = ON;
|
||||
DROP TABLE IF EXISTS table_bug12546938;
|
||||
DROP EVENT IF EXISTS event_Bug12546938;
|
||||
CREATE TABLE table_bug12546938 (i INT);
|
||||
# Create an event which will be executed with a small delay
|
||||
# and won't be automatically dropped after that.
|
||||
CREATE EVENT event_Bug12546938
|
||||
ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 SECOND ON COMPLETION PRESERVE
|
||||
ENABLE DO
|
||||
BEGIN
|
||||
INSERT INTO table_bug12546938 VALUES(1);
|
||||
END
|
||||
|
|
||||
# Now try to create the same event using CREATE EVENT IF NOT EXISTS.
|
||||
# A warning should be emitted. A new event should not be created nor
|
||||
# the old event should be re-executed.
|
||||
CREATE EVENT IF NOT EXISTS event_bug12546938
|
||||
ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 SECOND ON COMPLETION PRESERVE
|
||||
ENABLE DO
|
||||
BEGIN
|
||||
INSERT INTO table_bug12546938 VALUES (1);
|
||||
END
|
||||
|
|
||||
Warnings:
|
||||
Note 1537 Event 'event_bug12546938' already exists
|
||||
# Wait until at least one instance of event is executed.
|
||||
# Check that only one instance of our event was executed.
|
||||
SELECT COUNT(*) FROM table_bug12546938;
|
||||
COUNT(*)
|
||||
1
|
||||
# Clean-up.
|
||||
DROP EVENT IF EXISTS event_Bug12546938;
|
||||
DROP TABLE table_bug12546938;
|
||||
SET GLOBAL EVENT_SCHEDULER = OFF;
|
||||
DROP DATABASE IF EXISTS event_test11764334;
|
||||
CREATE DATABASE event_test11764334;
|
||||
USE event_test11764334;
|
||||
CREATE EVENT ev1 ON SCHEDULE EVERY 3 SECOND DISABLE DO SELECT 1;
|
||||
SHOW EVENTS IN event_test11764334 WHERE NAME='ev1';
|
||||
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
|
||||
event_test11764334 ev1 root@localhost SYSTEM RECURRING NULL 3 SECOND # # DISABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
ALTER EVENT ev1 ON SCHEDULE EVERY 4 SECOND;
|
||||
SHOW EVENTS IN event_test11764334 WHERE NAME='ev1';
|
||||
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
|
||||
event_test11764334 ev1 root@localhost SYSTEM RECURRING NULL 4 SECOND # # DISABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
DROP EVENT ev1;
|
||||
DROP DATABASE event_test11764334;
|
||||
USE test;
|
||||
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;
|
||||
|
@ -568,4 +568,10 @@ ROUND(LEAST(15, -4939092, 0.2704), STDDEV('a'))
|
||||
-4939092.0000
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'a'
|
||||
#
|
||||
# Bug#12392636 ASSERTION FAILED: SCALE >= 0 && PRECISION > 0 && SCALE <= PRECISION
|
||||
#
|
||||
SELECT SUM(DISTINCT (TRUNCATE((.1), NULL)));
|
||||
SUM(DISTINCT (TRUNCATE((.1), NULL)))
|
||||
NULL
|
||||
End of 5.1 tests
|
||||
|
@ -1451,6 +1451,21 @@ NULL
|
||||
SELECT DATE_FORMAT('0000-00-11', '%w');
|
||||
DATE_FORMAT('0000-00-11', '%w')
|
||||
NULL
|
||||
#
|
||||
# Bug#12403504 AFTER FIX FOR #11889186 : ASSERTION FAILED: DELSUM+(INT) Y/4-TEMP > 0
|
||||
#
|
||||
SELECT MAKEDATE(11111111,1);
|
||||
MAKEDATE(11111111,1)
|
||||
NULL
|
||||
SELECT WEEK(DATE_ADD(FROM_DAYS(1),INTERVAL 1 MONTH), 1);
|
||||
WEEK(DATE_ADD(FROM_DAYS(1),INTERVAL 1 MONTH), 1)
|
||||
NULL
|
||||
#
|
||||
# Bug#12584302 AFTER FIX FOR #12403504: ASSERTION FAILED: DELSUM+(INT) Y/4-TEMP > 0,
|
||||
#
|
||||
DO WEEK((DATE_ADD((CAST(0 AS DATE)), INTERVAL 1 YEAR_MONTH)), 5);
|
||||
Warnings:
|
||||
Warning 1292 Incorrect datetime value: '0'
|
||||
End of 5.1 tests
|
||||
select time('10:10:10') > 10;
|
||||
time('10:10:10') > 10
|
||||
|
@ -1535,3 +1535,30 @@ HANDLER t1 READ a NEXT;
|
||||
HANDLER t1 CLOSE;
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests.
|
||||
#
|
||||
# Bug #57323/11764487: myisam corruption with insert ignore
|
||||
# and invalid spatial data
|
||||
#
|
||||
CREATE TABLE t1(a LINESTRING NOT NULL, b GEOMETRY NOT NULL,
|
||||
SPATIAL KEY(a), SPATIAL KEY(b)) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES(GEOMFROMTEXT("point (0 0)"), GEOMFROMTEXT("point (1 1)"));
|
||||
INSERT IGNORE INTO t1 SET a=GEOMFROMTEXT("point (-6 0)"), b=GEOMFROMTEXT("error");
|
||||
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
|
||||
INSERT IGNORE INTO t1 SET a=GEOMFROMTEXT("point (-6 0)"), b=NULL;
|
||||
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
|
||||
SELECT ASTEXT(a), ASTEXT(b) FROM t1;
|
||||
ASTEXT(a) ASTEXT(b)
|
||||
POINT(0 0) POINT(1 1)
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(a INT NOT NULL, b GEOMETRY NOT NULL,
|
||||
KEY(a), SPATIAL KEY(b)) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES(0, GEOMFROMTEXT("point (1 1)"));
|
||||
INSERT IGNORE INTO t1 SET a=0, b=GEOMFROMTEXT("error");
|
||||
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
|
||||
INSERT IGNORE INTO t1 SET a=1, b=NULL;
|
||||
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
|
||||
SELECT a, ASTEXT(b) FROM t1;
|
||||
a ASTEXT(b)
|
||||
0 POINT(1 1)
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
@ -968,7 +968,7 @@ COUNT(*)
|
||||
EXPLAIN
|
||||
SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ref p p 28 const 1 Using where
|
||||
1 SIMPLE t2 ref p p 28 const # Using where
|
||||
SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
|
||||
COUNT(*)
|
||||
2
|
||||
@ -1061,23 +1061,26 @@ drop table t1;
|
||||
#
|
||||
create table t1(a char(32) not null) engine=myisam;
|
||||
create spatial index i on t1 (a);
|
||||
ERROR 42000: A SPATIAL index may only contain a geometrical type column
|
||||
ERROR HY000: Incorrect arguments to SPATIAL INDEX
|
||||
drop table t1;
|
||||
End of 5.1 tests
|
||||
CREATE TABLE t0 (a BINARY(32) NOT NULL);
|
||||
CREATE SPATIAL INDEX i on t0 (a);
|
||||
ERROR HY000: Incorrect arguments to SPATIAL INDEX
|
||||
INSERT INTO t0 VALUES (1);
|
||||
CREATE TABLE t1(
|
||||
col0 BINARY NOT NULL,
|
||||
col2 TIMESTAMP,
|
||||
SPATIAL INDEX i1 (col0)
|
||||
) ENGINE=MyISAM;
|
||||
ERROR 42000: A SPATIAL index may only contain a geometrical type column
|
||||
ERROR HY000: Incorrect arguments to SPATIAL INDEX
|
||||
CREATE TABLE t1 (
|
||||
col0 BINARY NOT NULL,
|
||||
col2 TIMESTAMP
|
||||
) ENGINE=MyISAM;
|
||||
CREATE SPATIAL INDEX idx0 ON t1(col0);
|
||||
ERROR 42000: A SPATIAL index may only contain a geometrical type column
|
||||
ERROR HY000: Incorrect arguments to SPATIAL INDEX
|
||||
ALTER TABLE t1 ADD SPATIAL INDEX i1 (col0);
|
||||
ERROR 42000: A SPATIAL index may only contain a geometrical type column
|
||||
ERROR HY000: Incorrect arguments to SPATIAL INDEX
|
||||
CREATE TABLE t2 (
|
||||
col0 INTEGER NOT NULL,
|
||||
col1 POINT,
|
||||
@ -1092,8 +1095,8 @@ 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.1 tests
|
||||
select ST_AREA(ST_GEOMCOLLFROMTEXT(' GEOMETRYCOLLECTION(LINESTRING(100 100, 31 10, 77 80), POLYGON((0 0,4 7,1 1,0 0)), POINT(20 20))'));
|
||||
ST_AREA(ST_GEOMCOLLFROMTEXT(' GEOMETRYCOLLECTION(LINESTRING(100 100, 31 10, 77 80), POLYGON((0 0,4 7,1 1,0 0)), POINT(20 20))'))
|
||||
1.5
|
||||
|
@ -1909,6 +1909,38 @@ a AVG(t1.b) t11c t12c
|
||||
1 4.0000 6 6
|
||||
2 2.0000 7 7
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#11765254 (58200): Assertion failed: param.sort_length when grouping
|
||||
# by functions
|
||||
#
|
||||
SET SQL_BIG_TABLES=1;
|
||||
CREATE TABLE t1(a INT);
|
||||
INSERT INTO t1 VALUES (0),(0);
|
||||
SELECT 1 FROM t1 GROUP BY IF(`a`,'','');
|
||||
1
|
||||
1
|
||||
SELECT 1 FROM t1 GROUP BY TRIM(LEADING RAND() FROM '');
|
||||
1
|
||||
1
|
||||
SELECT 1 FROM t1 GROUP BY SUBSTRING('',SLEEP(0),'');
|
||||
1
|
||||
1
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect INTEGER value: ''
|
||||
Warning 1292 Truncated incorrect INTEGER value: ''
|
||||
Warning 1292 Truncated incorrect INTEGER value: ''
|
||||
SELECT 1 FROM t1 GROUP BY SUBSTRING(SYSDATE() FROM 'K' FOR 'jxW<');
|
||||
1
|
||||
1
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'K'
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'jxW<'
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'K'
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'jxW<'
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'K'
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'jxW<'
|
||||
DROP TABLE t1;
|
||||
SET SQL_BIG_TABLES=0;
|
||||
# End of 5.1 tests
|
||||
#
|
||||
# BUG#872702: Crash in add_ref_to_table_cond() when grouping by a PK
|
||||
|
@ -715,8 +715,8 @@ create table t1 (c char(10)) engine=memory;
|
||||
create table t2 (c varchar(10)) engine=memory;
|
||||
show table status like 't_';
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MEMORY 10 Fixed 0 11 0 # 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 0 12 0 # 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t1 MEMORY 10 Fixed 0 11 0 # 0 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 0 12 0 # 0 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
drop table t1, t2;
|
||||
CREATE TABLE t1(a VARCHAR(1), b VARCHAR(2), c VARCHAR(256),
|
||||
KEY(a), KEY(b), KEY(c)) ENGINE=MEMORY;
|
||||
|
366
mysql-test/r/implicit_char_to_num_conversion.result
Normal file
366
mysql-test/r/implicit_char_to_num_conversion.result
Normal file
@ -0,0 +1,366 @@
|
||||
DROP TABLE IF EXISTS t5;
|
||||
CREATE TABLE t5(c1 BIT(2) PRIMARY KEY) ENGINE = <default_engine>;
|
||||
INSERT INTO t5 VALUES (0), (1), (2);
|
||||
SELECT HEX(c1) FROM t5 ORDER BY c1;
|
||||
HEX(c1)
|
||||
0
|
||||
1
|
||||
2
|
||||
SELECT HEX(c1) FROM t5 WHERE c1 = b'1' ORDER BY c1;
|
||||
HEX(c1)
|
||||
1
|
||||
SELECT HEX(c1) FROM t5 WHERE c1 <=> b'1' ORDER BY c1;
|
||||
HEX(c1)
|
||||
1
|
||||
SELECT HEX(c1) FROM t5 WHERE c1 != b'1' ORDER BY c1;
|
||||
HEX(c1)
|
||||
0
|
||||
2
|
||||
SELECT HEX(c1) FROM t5 WHERE c1 >= '1' ORDER BY c1;
|
||||
HEX(c1)
|
||||
1
|
||||
2
|
||||
SELECT HEX(c1) FROM t5 WHERE c1 <= '1' ORDER BY c1;
|
||||
HEX(c1)
|
||||
0
|
||||
1
|
||||
SELECT HEX(c1) FROM t5 WHERE c1 < '1' ORDER BY c1;
|
||||
HEX(c1)
|
||||
0
|
||||
SELECT HEX(c1) FROM t5 WHERE c1 > '0' ORDER BY c1;
|
||||
HEX(c1)
|
||||
1
|
||||
2
|
||||
DROP TABLE t5;
|
||||
CREATE TABLE t5(c1 FLOAT(5,2) PRIMARY KEY) ENGINE = <default_engine>;
|
||||
INSERT INTO t5 VALUES (95.95), (-10.10), (1), (0);
|
||||
SELECT c1 FROM t5 ORDER BY c1;
|
||||
c1
|
||||
-10.10
|
||||
0.00
|
||||
1.00
|
||||
95.95
|
||||
SELECT c1 FROM t5 WHERE c1 >= '95' ORDER BY c1;
|
||||
c1
|
||||
95.95
|
||||
SELECT c1 FROM t5 WHERE c1 <= '10.10' ORDER BY c1;
|
||||
c1
|
||||
-10.10
|
||||
0.00
|
||||
1.00
|
||||
SELECT c1 FROM t5 WHERE c1 != '1' ORDER BY c1;
|
||||
c1
|
||||
-10.10
|
||||
0.00
|
||||
95.95
|
||||
SELECT c1 FROM t5 WHERE c1 < '1' ORDER BY c1;
|
||||
c1
|
||||
-10.10
|
||||
0.00
|
||||
SELECT c1 FROM t5 WHERE c1 > '0' ORDER BY c1;
|
||||
c1
|
||||
1.00
|
||||
95.95
|
||||
DROP TABLE t5;
|
||||
CREATE TABLE t5(c1 TINYINT PRIMARY KEY) ENGINE = <default_engine>;
|
||||
INSERT INTO t5 VALUES (95), (10),(11),(-8);
|
||||
SELECT c1 FROM t5 ORDER BY c1;
|
||||
c1
|
||||
-8
|
||||
10
|
||||
11
|
||||
95
|
||||
SELECT c1 FROM t5 WHERE c1 = '10' ORDER BY c1;
|
||||
c1
|
||||
10
|
||||
SELECT c1 FROM t5 WHERE c1 <=> '10' ORDER BY c1;
|
||||
c1
|
||||
10
|
||||
SELECT c1 FROM t5 WHERE c1 >= '95' ORDER BY c1;
|
||||
c1
|
||||
95
|
||||
SELECT c1 FROM t5 WHERE c1 <= '11' ORDER BY c1;
|
||||
c1
|
||||
-8
|
||||
10
|
||||
11
|
||||
SELECT c1 FROM t5 WHERE c1 != '-8' ORDER BY c1;
|
||||
c1
|
||||
10
|
||||
11
|
||||
95
|
||||
SELECT c1 FROM t5 WHERE c1 < '11' ORDER BY c1;
|
||||
c1
|
||||
-8
|
||||
10
|
||||
SELECT c1 FROM t5 WHERE c1 > '10' ORDER BY c1;
|
||||
c1
|
||||
11
|
||||
95
|
||||
DROP TABLE t5;
|
||||
CREATE TABLE t5(c1 SMALLINT PRIMARY KEY) ENGINE = <default_engine>;
|
||||
INSERT INTO t5 VALUES (395), (-200), (100), (111);
|
||||
SELECT c1 FROM t5 ORDER BY c1;
|
||||
c1
|
||||
-200
|
||||
100
|
||||
111
|
||||
395
|
||||
SELECT c1 FROM t5 WHERE c1 = '100' ORDER BY c1;
|
||||
c1
|
||||
100
|
||||
SELECT c1 FROM t5 WHERE c1 <=> '100' ORDER BY c1;
|
||||
c1
|
||||
100
|
||||
SELECT c1 FROM t5 WHERE c1 >= '395' ORDER BY c1;
|
||||
c1
|
||||
395
|
||||
SELECT c1 FROM t5 WHERE c1 <= '-200' ORDER BY c1;
|
||||
c1
|
||||
-200
|
||||
SELECT c1 FROM t5 WHERE c1 != '100' ORDER BY c1;
|
||||
c1
|
||||
-200
|
||||
111
|
||||
395
|
||||
SELECT c1 FROM t5 WHERE c1 < '111' ORDER BY c1;
|
||||
c1
|
||||
-200
|
||||
100
|
||||
SELECT c1 FROM t5 WHERE c1 > '111' ORDER BY c1;
|
||||
c1
|
||||
395
|
||||
DROP TABLE t5;
|
||||
CREATE TABLE t5(c1 MEDIUMINT PRIMARY KEY) ENGINE = <default_engine>;
|
||||
INSERT INTO t5 VALUES (-8388607), (311),(215),(88608);
|
||||
SELECT c1 FROM t5 ORDER BY c1;
|
||||
c1
|
||||
-8388607
|
||||
215
|
||||
311
|
||||
88608
|
||||
SELECT c1 FROM t5 WHERE c1 = '311' ORDER BY c1;
|
||||
c1
|
||||
311
|
||||
SELECT c1 FROM t5 WHERE c1 <=> '311' ORDER BY c1;
|
||||
c1
|
||||
311
|
||||
SELECT c1 FROM t5 WHERE c1 >= '215' ORDER BY c1;
|
||||
c1
|
||||
215
|
||||
311
|
||||
88608
|
||||
SELECT c1 FROM t5 WHERE c1 <= '88608' ORDER BY c1;
|
||||
c1
|
||||
-8388607
|
||||
215
|
||||
311
|
||||
88608
|
||||
SELECT c1 FROM t5 WHERE c1 != '-8388607' ORDER BY c1;
|
||||
c1
|
||||
215
|
||||
311
|
||||
88608
|
||||
SELECT c1 FROM t5 WHERE c1 < '215' ORDER BY c1;
|
||||
c1
|
||||
-8388607
|
||||
SELECT c1 FROM t5 WHERE c1 > '215' ORDER BY c1;
|
||||
c1
|
||||
311
|
||||
88608
|
||||
DROP TABLE t5;
|
||||
CREATE TABLE t5(c1 INT PRIMARY KEY) ENGINE = <default_engine>;
|
||||
INSERT INTO t5 VALUES (-2147483647), (1011),(15),(9388607);
|
||||
SELECT c1 FROM t5 ORDER BY c1;
|
||||
c1
|
||||
-2147483647
|
||||
15
|
||||
1011
|
||||
9388607
|
||||
SELECT c1 FROM t5 WHERE c1 = '9388607' ORDER BY c1;
|
||||
c1
|
||||
9388607
|
||||
SELECT c1 FROM t5 WHERE c1 <=> '9388607' ORDER BY c1;
|
||||
c1
|
||||
9388607
|
||||
SELECT c1 FROM t5 WHERE c1 >= '15' ORDER BY c1;
|
||||
c1
|
||||
15
|
||||
1011
|
||||
9388607
|
||||
SELECT c1 FROM t5 WHERE c1 <= '1011' ORDER BY c1;
|
||||
c1
|
||||
-2147483647
|
||||
15
|
||||
1011
|
||||
SELECT c1 FROM t5 WHERE c1 != '-2147483647' ORDER BY c1;
|
||||
c1
|
||||
15
|
||||
1011
|
||||
9388607
|
||||
SELECT c1 FROM t5 WHERE c1 < '15' ORDER BY c1;
|
||||
c1
|
||||
-2147483647
|
||||
SELECT c1 FROM t5 WHERE c1 > '15' ORDER BY c1;
|
||||
c1
|
||||
1011
|
||||
9388607
|
||||
DROP TABLE t5;
|
||||
CREATE TABLE t5(c1 BIGINT PRIMARY KEY) ENGINE = <default_engine>;
|
||||
INSERT INTO t5 VALUES (-9223372036854775807), (12011),(500),(3372036854775808);
|
||||
SELECT c1 FROM t5 ORDER BY c1;
|
||||
c1
|
||||
-9223372036854775807
|
||||
500
|
||||
12011
|
||||
3372036854775808
|
||||
SELECT c1 FROM t5 WHERE c1 = '-9223372036854775807' ORDER BY c1;
|
||||
c1
|
||||
-9223372036854775807
|
||||
SELECT c1 FROM t5 WHERE c1 <=> '-9223372036854775807' ORDER BY c1;
|
||||
c1
|
||||
-9223372036854775807
|
||||
SELECT c1 FROM t5 WHERE c1 >= '12011' ORDER BY c1;
|
||||
c1
|
||||
12011
|
||||
3372036854775808
|
||||
SELECT c1 FROM t5 WHERE c1 <= '500' ORDER BY c1;
|
||||
c1
|
||||
-9223372036854775807
|
||||
500
|
||||
SELECT c1 FROM t5 WHERE c1 != '3372036854775808' ORDER BY c1;
|
||||
c1
|
||||
-9223372036854775807
|
||||
500
|
||||
12011
|
||||
SELECT c1 FROM t5 WHERE c1 < '12011' ORDER BY c1;
|
||||
c1
|
||||
-9223372036854775807
|
||||
500
|
||||
SELECT c1 FROM t5 WHERE c1 > '12011' ORDER BY c1;
|
||||
c1
|
||||
3372036854775808
|
||||
DROP TABLE t5;
|
||||
CREATE TABLE t5(c1 DOUBLE(5,2) PRIMARY KEY) ENGINE = <default_engine>;
|
||||
INSERT INTO t5 VALUES (95.95), (11.11),(5),(-908.92);
|
||||
SELECT c1 FROM t5 ORDER BY c1;
|
||||
c1
|
||||
-908.92
|
||||
5.00
|
||||
11.11
|
||||
95.95
|
||||
SELECT c1 FROM t5 WHERE c1 = '11.11' ORDER BY c1;
|
||||
c1
|
||||
11.11
|
||||
SELECT c1 FROM t5 WHERE c1 <=> '11.11' ORDER BY c1;
|
||||
c1
|
||||
11.11
|
||||
SELECT c1 FROM t5 WHERE c1 >= '5' ORDER BY c1;
|
||||
c1
|
||||
5.00
|
||||
11.11
|
||||
95.95
|
||||
SELECT c1 FROM t5 WHERE c1 <= '95.95' ORDER BY c1;
|
||||
c1
|
||||
-908.92
|
||||
5.00
|
||||
11.11
|
||||
95.95
|
||||
SELECT c1 FROM t5 WHERE c1 != '-908.92' ORDER BY c1;
|
||||
c1
|
||||
5.00
|
||||
11.11
|
||||
95.95
|
||||
SELECT c1 FROM t5 WHERE c1 < '95.95' ORDER BY c1;
|
||||
c1
|
||||
-908.92
|
||||
5.00
|
||||
11.11
|
||||
SELECT c1 FROM t5 WHERE c1 > '-908.92' ORDER BY c1;
|
||||
c1
|
||||
5.00
|
||||
11.11
|
||||
95.95
|
||||
DROP TABLE t5;
|
||||
CREATE TABLE t5(c1 NUMERIC(5,2) PRIMARY KEY) ENGINE = <default_engine>;
|
||||
INSERT INTO t5 VALUES (95.95), (11.11),(5),(-908.92);
|
||||
SELECT c1 FROM t5 ORDER BY c1;
|
||||
c1
|
||||
-908.92
|
||||
5.00
|
||||
11.11
|
||||
95.95
|
||||
SELECT c1 FROM t5 WHERE c1 = '11.11' ORDER BY c1;
|
||||
c1
|
||||
11.11
|
||||
SELECT c1 FROM t5 WHERE c1 <=> '11.11' ORDER BY c1;
|
||||
c1
|
||||
11.11
|
||||
SELECT c1 FROM t5 WHERE c1 >= '5' ORDER BY c1;
|
||||
c1
|
||||
5.00
|
||||
11.11
|
||||
95.95
|
||||
SELECT c1 FROM t5 WHERE c1 <= '95.95' ORDER BY c1;
|
||||
c1
|
||||
-908.92
|
||||
5.00
|
||||
11.11
|
||||
95.95
|
||||
SELECT c1 FROM t5 WHERE c1 != '-908.92' ORDER BY c1;
|
||||
c1
|
||||
5.00
|
||||
11.11
|
||||
95.95
|
||||
SELECT c1 FROM t5 WHERE c1 < '95.95' ORDER BY c1;
|
||||
c1
|
||||
-908.92
|
||||
5.00
|
||||
11.11
|
||||
SELECT c1 FROM t5 WHERE c1 > '-908.92' ORDER BY c1;
|
||||
c1
|
||||
5.00
|
||||
11.11
|
||||
95.95
|
||||
DROP TABLE t5;
|
||||
CREATE TABLE t5(c1 DECIMAL(5,2) PRIMARY KEY) ENGINE = <default_engine>;
|
||||
INSERT INTO t5 VALUES (95.95), (11.11),(5),(-908.92);
|
||||
SELECT c1 FROM t5 ORDER BY c1;
|
||||
c1
|
||||
-908.92
|
||||
5.00
|
||||
11.11
|
||||
95.95
|
||||
SELECT c1 FROM t5 WHERE c1 = '11.11' ORDER BY c1;
|
||||
c1
|
||||
11.11
|
||||
SELECT c1 FROM t5 WHERE c1 <=> '11.11' ORDER BY c1;
|
||||
c1
|
||||
11.11
|
||||
SELECT c1 FROM t5 WHERE c1 >= '5' ORDER BY c1;
|
||||
c1
|
||||
5.00
|
||||
11.11
|
||||
95.95
|
||||
SELECT c1 FROM t5 WHERE c1 <= '95.95' ORDER BY c1;
|
||||
c1
|
||||
-908.92
|
||||
5.00
|
||||
11.11
|
||||
95.95
|
||||
SELECT c1 FROM t5 WHERE c1 != '-908.92' ORDER BY c1;
|
||||
c1
|
||||
5.00
|
||||
11.11
|
||||
95.95
|
||||
SELECT c1 FROM t5 WHERE c1 < '95.95' ORDER BY c1;
|
||||
c1
|
||||
-908.92
|
||||
5.00
|
||||
11.11
|
||||
SELECT c1 FROM t5 WHERE c1 > '-908.92' ORDER BY c1;
|
||||
c1
|
||||
5.00
|
||||
11.11
|
||||
95.95
|
||||
DROP TABLE t5;
|
@ -372,7 +372,7 @@ EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE Name BETWEEN 'G' AND 'K' AND Population > 500000 AND Country LIKE 'C%';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE City index_merge Population,Name,Country Population,Name,Country # NULL # Using sort_intersect(Population,Name,Country); Using where
|
||||
1 SIMPLE City index_merge Population,Name,Country Name,Population,Country # NULL # Using sort_intersect(Name,Population,Country); Using where
|
||||
SELECT * FROM City USE INDEX ()
|
||||
WHERE Name BETWEEN 'M' AND 'N' AND Population > 1000000 AND Country LIKE 'C%';
|
||||
ID Name Country Population
|
||||
@ -485,7 +485,7 @@ SELECT * FROM City
|
||||
WHERE ID BETWEEN 3001 AND 4000 AND Population > 600000
|
||||
AND Country BETWEEN 'S' AND 'Z' ;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Population,Country 4,4,3 NULL # Using sort_intersect(PRIMARY,Population,Country); Using where
|
||||
1 SIMPLE City index_merge PRIMARY,Population,Country PRIMARY,Country,Population 4,3,4 NULL # Using sort_intersect(PRIMARY,Country,Population); Using where
|
||||
SELECT * FROM City USE INDEX ()
|
||||
WHERE ID BETWEEN 501 AND 1000 AND Population > 700000 AND Country LIKE 'C%';
|
||||
ID Name Country Population
|
||||
|
@ -348,7 +348,7 @@ SELECT a
|
||||
FROM t1
|
||||
WHERE c = 1 AND b = 1 AND d = 1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge c,bd c,bd 5,10 NULL 1 Using intersect(c,bd); Using where; Using index
|
||||
1 SIMPLE t1 ref c,bd bd 10 const,const 2 Using where
|
||||
CREATE TABLE t2 ( a INT )
|
||||
SELECT a
|
||||
FROM t1
|
||||
@ -693,8 +693,8 @@ SELECT COUNT(*) FROM
|
||||
(SELECT * FROM t1 FORCE INDEX(primary,idx)
|
||||
WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 11419
|
||||
2 DERIVED t1 index_merge PRIMARY,idx idx,PRIMARY 5,4 NULL 11419 Using sort_union(idx,PRIMARY); Using where
|
||||
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 6144
|
||||
2 DERIVED t1 index_merge PRIMARY,idx idx,PRIMARY 5,4 NULL 6144 Using sort_union(idx,PRIMARY); Using where
|
||||
SELECT COUNT(*) FROM
|
||||
(SELECT * FROM t1 FORCE INDEX(primary,idx)
|
||||
WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
|
||||
|
@ -1,44 +0,0 @@
|
||||
call mtr.add_suppression("InnoDB: invalid innodb_file_format_check value");
|
||||
select @@innodb_file_format;
|
||||
@@innodb_file_format
|
||||
Antelope
|
||||
select @@innodb_file_format_check;
|
||||
@@innodb_file_format_check
|
||||
Antelope
|
||||
set global innodb_file_format=antelope;
|
||||
set global innodb_file_format=barracuda;
|
||||
set global innodb_file_format=cheetah;
|
||||
ERROR HY000: Incorrect arguments to SET
|
||||
select @@innodb_file_format;
|
||||
@@innodb_file_format
|
||||
Barracuda
|
||||
set global innodb_file_format=default;
|
||||
select @@innodb_file_format;
|
||||
@@innodb_file_format
|
||||
Antelope
|
||||
set global innodb_file_format=on;
|
||||
ERROR HY000: Incorrect arguments to SET
|
||||
set global innodb_file_format=off;
|
||||
ERROR HY000: Incorrect arguments to SET
|
||||
select @@innodb_file_format;
|
||||
@@innodb_file_format
|
||||
Antelope
|
||||
set global innodb_file_format_check=antelope;
|
||||
set global innodb_file_format_check=barracuda;
|
||||
set global innodb_file_format_check=cheetah;
|
||||
ERROR HY000: Incorrect arguments to SET
|
||||
select @@innodb_file_format_check;
|
||||
@@innodb_file_format_check
|
||||
Barracuda
|
||||
set global innodb_file_format_check=default;
|
||||
select @@innodb_file_format_check;
|
||||
@@innodb_file_format_check
|
||||
Barracuda
|
||||
set global innodb_file_format=on;
|
||||
ERROR HY000: Incorrect arguments to SET
|
||||
set global innodb_file_format=off;
|
||||
ERROR HY000: Incorrect arguments to SET
|
||||
select @@innodb_file_format_check;
|
||||
@@innodb_file_format_check
|
||||
Barracuda
|
||||
set global innodb_file_format_check=antelope;
|
@ -167,7 +167,7 @@ WHERE ts BETWEEN '0000-00-00' AND '2010-00-01 00:00:00'
|
||||
ORDER BY ts DESC
|
||||
LIMIT 2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 Using index condition
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 4 Using index condition
|
||||
|
||||
DROP TABLE t1;
|
||||
#
|
||||
|
@ -2339,4 +2339,33 @@ REPAIR TABLE m1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.m1 repair note The storage engine for the table doesn't support repair
|
||||
DROP TABLE m1, t1;
|
||||
#
|
||||
# BUG#11763712 - 56458: KILLING A FLUSH TABLE FOR A MERGE/CHILD
|
||||
# CRASHES SERVER
|
||||
#
|
||||
CREATE TABLE t1(a INT);
|
||||
CREATE TABLE t2(a INT);
|
||||
CREATE TABLE t3(a INT, b INT);
|
||||
CREATE TABLE m1(a INT) ENGINE=MERGE UNION=(t1, t2);
|
||||
# Test reopen merge parent failure
|
||||
LOCK TABLES m1 READ;
|
||||
# Remove 'm1' table using file operations.
|
||||
FLUSH TABLES;
|
||||
ERROR 42S02: Table 'test.m1' doesn't exist
|
||||
UNLOCK TABLES;
|
||||
CREATE TABLE m1(a INT) ENGINE=MERGE UNION=(t1, t2);
|
||||
# Test reopen merge child failure
|
||||
LOCK TABLES m1 READ;
|
||||
# Remove 't1' table using file operations.
|
||||
FLUSH TABLES;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist
|
||||
UNLOCK TABLES;
|
||||
CREATE TABLE t1(a INT);
|
||||
# Test reattach merge failure
|
||||
LOCK TABLES m1 READ;
|
||||
# Replace 't1' with 't3' table using file operations.
|
||||
FLUSH TABLES;
|
||||
ERROR HY000: Can't reopen table: 'm1'
|
||||
UNLOCK TABLES;
|
||||
DROP TABLE t1, t2, t3, m1;
|
||||
End of 5.1 tests
|
||||
|
@ -2468,6 +2468,30 @@ CARDINALITY
|
||||
DROP TABLE t1;
|
||||
SET myisam_sort_buffer_size=@@global.myisam_sort_buffer_size;
|
||||
SET myisam_repair_threads=@@global.myisam_repair_threads;
|
||||
#
|
||||
# BUG#11757032 - 49030: OPTIMIZE TABLE BREAKS MYISAM TABLE WHEN
|
||||
# USING MYISAM_USE_MMAP ON WINDOWS
|
||||
#
|
||||
SET GLOBAL myisam_use_mmap=1;
|
||||
CREATE TABLE t1(a INT);
|
||||
INSERT INTO t1 VALUES(1),(2);
|
||||
DELETE FROM t1 WHERE a=1;
|
||||
FLUSH TABLE t1;
|
||||
LOCK TABLE t1 WRITE;
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize status OK
|
||||
INSERT INTO t1 VALUES(3);
|
||||
UNLOCK TABLES;
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
2
|
||||
3
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
DROP TABLE t1;
|
||||
SET GLOBAL myisam_use_mmap=default;
|
||||
End of 5.1 tests
|
||||
show variables like 'myisam_block_size';
|
||||
Variable_name Value
|
||||
|
@ -87,3 +87,35 @@ COUNT(*)
|
||||
128
|
||||
DROP TABLE mysql_db1.t1;
|
||||
DROP DATABASE mysql_db1;
|
||||
#
|
||||
# BUG#11761180 - 53646: MYISAMPACK CORRUPTS TABLES WITH FULLTEXT INDEXES
|
||||
#
|
||||
CREATE TABLE t1(a CHAR(4), FULLTEXT(a));
|
||||
INSERT INTO t1 VALUES('aaaa'),('bbbb'),('cccc');
|
||||
FLUSH TABLE t1;
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
SELECT * FROM t1 WHERE MATCH(a) AGAINST('aaaa' IN BOOLEAN MODE);
|
||||
a
|
||||
aaaa
|
||||
SELECT * FROM t1 WHERE MATCH(a) AGAINST('aaaa');
|
||||
a
|
||||
aaaa
|
||||
DROP TABLE t1;
|
||||
# Test table with key_reflength > rec_reflength
|
||||
CREATE TABLE t1(a CHAR(30), FULLTEXT(a));
|
||||
# Populating a table, so it's index file exceeds 65K
|
||||
# Populating a table, so index file has second level fulltext tree
|
||||
FLUSH TABLE t1;
|
||||
# Compressing table
|
||||
# Fixing index (repair by sort)
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
FLUSH TABLE t1;
|
||||
# Fixing index (repair with keycache)
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
DROP TABLE t1;
|
||||
|
@ -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;
|
||||
|
@ -140,6 +140,10 @@ after_!errno_masked_error
|
||||
1146
|
||||
select 3 from t1;
|
||||
mysqltest: At line 1: query 'select 3 from t1' failed with wrong errno 1146: 'Table 'test.t1' doesn't exist', instead of 1000...
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1
|
||||
is empty
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'nonsense' at line 1
|
||||
is empty
|
||||
garbage ;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1
|
||||
select 1064 as "after_--enable_abort_on_error" ;
|
||||
@ -149,6 +153,9 @@ select 3 from t1 ;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist
|
||||
select 3 from t1;
|
||||
mysqltest: At line 1: query 'select 3 from t1' failed with wrong errno 1146: 'Table 'test.t1' doesn't exist', instead of 1064...
|
||||
is empty
|
||||
is empty
|
||||
"Yes it's empty"
|
||||
hello
|
||||
hello
|
||||
;;;;;;;;
|
||||
@ -321,7 +328,7 @@ insert into t1 values ('$dollar');
|
||||
$dollar
|
||||
`select 42`
|
||||
drop table t1;
|
||||
mysqltest: At line 1: Error running query 'failing query': 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'failing query' at line 1
|
||||
mysqltest: At line 1: query 'let $var2= `failing query`' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'failing query' at line 1
|
||||
mysqltest: At line 1: Missing required argument 'filename' to command 'source'
|
||||
mysqltest: At line 1: Could not open './non_existingFile' for reading, errno: 2
|
||||
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/recursive.sql":
|
||||
@ -825,7 +832,7 @@ mysqltest: At line 1: Could not find column 'column_not_exists' in the result of
|
||||
mysqltest: At line 1: Query 'SET @A = 1' didn't return a result set
|
||||
mysqltest: At line 1: Could not find column '1 AS B' in the result of 'SELECT 1 AS A'
|
||||
value= No such row
|
||||
mysqltest: At line 1: Error running query 'SHOW COLNS FROM t1': 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'COLNS FROM t1' at line 1
|
||||
mysqltest: At line 1: query 'let $value= query_get_value(SHOW COLNS FROM t1, Field, 1)' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'COLNS FROM t1' at line 1
|
||||
|
||||
Field Type Null Key Default Extra
|
||||
a int(11) YES -><- NULL
|
||||
|
@ -1718,4 +1718,11 @@ a 1
|
||||
3 1
|
||||
2 1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#11765255 58201:
|
||||
# VALGRIND/CRASH WHEN ORDERING BY MULTIPLE AGGREGATE FUNCTIONS
|
||||
#
|
||||
select 1 order by max(1) + min(1);
|
||||
1
|
||||
1
|
||||
End of 5.1 tests
|
||||
|
@ -1,5 +1,34 @@
|
||||
drop table if exists t1, t2;
|
||||
#
|
||||
# Bug#11765667: bug#58655: ASSERTION FAILED,
|
||||
# SERVER CRASHES WITH MYSQLD GOT SIGNAL 6
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
id MEDIUMINT NOT NULL AUTO_INCREMENT,
|
||||
dt DATE, st VARCHAR(255), uid INT,
|
||||
id2nd LONGBLOB, filler VARCHAR(255), PRIMARY KEY(id, dt)
|
||||
);
|
||||
INSERT INTO t1 (dt, st, uid, id2nd, filler) VALUES
|
||||
('1991-03-14', 'Initial Insert', 200, 1234567, 'No Data'),
|
||||
('1991-02-26', 'Initial Insert', 201, 1234567, 'No Data'),
|
||||
('1992-03-16', 'Initial Insert', 234, 1234567, 'No Data'),
|
||||
('1992-07-02', 'Initial Insert', 287, 1234567, 'No Data'),
|
||||
('1991-05-26', 'Initial Insert', 256, 1234567, 'No Data'),
|
||||
('1991-04-25', 'Initial Insert', 222, 1234567, 'No Data'),
|
||||
('1993-03-12', 'Initial Insert', 267, 1234567, 'No Data'),
|
||||
('1993-03-14', 'Initial Insert', 291, 1234567, 'No Data'),
|
||||
('1991-12-20', 'Initial Insert', 298, 1234567, 'No Data'),
|
||||
('1994-10-31', 'Initial Insert', 220, 1234567, 'No Data');
|
||||
ALTER TABLE t1 PARTITION BY LIST (YEAR(dt)) (
|
||||
PARTITION d1 VALUES IN (1991, 1994),
|
||||
PARTITION d2 VALUES IN (1993),
|
||||
PARTITION d3 VALUES IN (1992, 1995, 1996)
|
||||
);
|
||||
INSERT INTO t1 (dt, st, uid, id2nd, filler) VALUES
|
||||
('1991-07-14', 'After Partitioning Insert', 299, 1234567, 'Insert row');
|
||||
UPDATE t1 SET filler='Updating the row' WHERE uid=298;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#59297: Can't find record in 'tablename' on update inner join
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
|
@ -1,8 +1,30 @@
|
||||
#
|
||||
# Bug#11766879/Bug#60106: DIFF BETWEEN # OF INDEXES IN MYSQL VS INNODB,
|
||||
# PARTITONING, ON INDEX CREATE
|
||||
#
|
||||
call mtr.add_suppression("contains 2 indexes inside InnoDB, which is different from the number of indexes 1 defined in the MySQL");
|
||||
CREATE TABLE t1 (
|
||||
id bigint NOT NULL AUTO_INCREMENT,
|
||||
time date,
|
||||
id2 bigint not null,
|
||||
PRIMARY KEY (id,time)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8
|
||||
/*!50100 PARTITION BY RANGE(TO_DAYS(time))
|
||||
(PARTITION p10 VALUES LESS THAN (734708) ENGINE = InnoDB,
|
||||
PARTITION p20 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;
|
||||
INSERT INTO t1 (time,id2) VALUES ('2011-07-24',1);
|
||||
INSERT INTO t1 (time,id2) VALUES ('2011-07-25',1);
|
||||
INSERT INTO t1 (time,id2) VALUES ('2011-07-25',1);
|
||||
CREATE UNIQUE INDEX uk_time_id2 on t1(time,id2);
|
||||
ERROR 23000: Duplicate entry '2011-07-25-1' for key 'uk_time_id2'
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
3
|
||||
DROP TABLE t1;
|
||||
call mtr.add_suppression("nnoDB: Error: table `test`.`t1` .* Partition.* InnoDB internal");
|
||||
#
|
||||
# Bug#55091: Server crashes on ADD PARTITION after a failed attempt
|
||||
#
|
||||
SET @old_innodb_file_format_check = @@global.innodb_file_format_check;
|
||||
SET @old_innodb_file_format = @@global.innodb_file_format;
|
||||
SET @old_innodb_file_per_table = @@global.innodb_file_per_table;
|
||||
SET @old_innodb_strict_mode = @@global.innodb_strict_mode;
|
||||
@ -70,7 +92,6 @@ DROP TABLE t1;
|
||||
SET @@global.innodb_strict_mode = @old_innodb_strict_mode;
|
||||
SET @@global.innodb_file_format = @old_innodb_file_format;
|
||||
SET @@global.innodb_file_per_table = @old_innodb_file_per_table;
|
||||
SET @@global.innodb_file_format_check = @old_innodb_file_format_check;
|
||||
SET NAMES utf8;
|
||||
CREATE TABLE `t``\""e` (a INT, PRIMARY KEY (a))
|
||||
ENGINE=InnoDB
|
||||
|
@ -79,3 +79,12 @@ a
|
||||
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;
|
@ -912,13 +912,13 @@ a
|
||||
a
|
||||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 1
|
||||
Qcache_queries_in_cache 0
|
||||
show status like "Qcache_inserts";
|
||||
Variable_name Value
|
||||
Qcache_inserts 19
|
||||
Qcache_inserts 18
|
||||
show status like "Qcache_hits";
|
||||
Variable_name Value
|
||||
Qcache_hits 7
|
||||
Qcache_hits 6
|
||||
DROP TABLE t1;
|
||||
SET GLOBAL query_cache_size=0;
|
||||
SET SESSION query_cache_type = 2;
|
||||
@ -1070,10 +1070,10 @@ flush status;
|
||||
a
|
||||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 1
|
||||
Qcache_queries_in_cache 0
|
||||
show status like "Qcache_inserts";
|
||||
Variable_name Value
|
||||
Qcache_inserts 1
|
||||
Qcache_inserts 0
|
||||
show status like "Qcache_hits";
|
||||
Variable_name Value
|
||||
Qcache_hits 0
|
||||
@ -1081,13 +1081,13 @@ Qcache_hits 0
|
||||
a
|
||||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 1
|
||||
Qcache_queries_in_cache 0
|
||||
show status like "Qcache_inserts";
|
||||
Variable_name Value
|
||||
Qcache_inserts 1
|
||||
Qcache_inserts 0
|
||||
show status like "Qcache_hits";
|
||||
Variable_name Value
|
||||
Qcache_hits 1
|
||||
Qcache_hits 0
|
||||
drop table t1;
|
||||
create table t1 (a int);
|
||||
insert into t1 values (1),(2);
|
||||
|
@ -23,10 +23,10 @@ SELECT *, (SELECT COUNT(*) FROM t2) FROM t1;
|
||||
# Switch to connection user3
|
||||
# Poll till the select of connection user1 is blocked by the write lock on t1.
|
||||
SELECT user,command,state,info FROM information_schema.processlist
|
||||
WHERE state = 'Locked'
|
||||
WHERE state = "Table Lock"
|
||||
AND info = 'SELECT *, (SELECT COUNT(*) FROM t2) FROM t1';
|
||||
user command state info
|
||||
root Query Locked SELECT *, (SELECT COUNT(*) FROM t2) FROM t1
|
||||
root Query Table lock SELECT *, (SELECT COUNT(*) FROM t2) FROM t1
|
||||
INSERT INTO t1 VALUES (4);
|
||||
# Switch to connection user2
|
||||
UNLOCK TABLES;
|
||||
|
@ -336,7 +336,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
EXPLAIN
|
||||
SELECT * FROM City WHERE (ID < 600) OR (ID BETWEEN 900 AND 1500);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE City range PRIMARY PRIMARY 4 NULL 2006 Using index condition; Using where
|
||||
1 SIMPLE City range PRIMARY PRIMARY 4 NULL 1198 Using index condition; Using where
|
||||
EXPLAIN
|
||||
SELECT * FROM City WHERE Country > 'A' AND Country < 'ARG';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
@ -362,7 +362,7 @@ WHERE ((ID < 800) AND (Name LIKE 'Ha%' OR (Country > 'A' AND Country < 'ARG')))
|
||||
OR ((ID BETWEEN 900 AND 1500) AND
|
||||
(Name LIKE 'Pa%' OR (Population > 103000 AND Population < 104000)));
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE City index_merge PRIMARY,Population,Country,Name Name,Country,Population 35,3,4 NULL 188 Using sort_union(Name,Country,Population); Using where
|
||||
1 SIMPLE City index_merge PRIMARY,Population,Country,Name Name,Country,PRIMARY 35,3,4 NULL 681 Using sort_union(Name,Country,PRIMARY); Using where
|
||||
EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE ((ID < 200) AND (Name LIKE 'Ha%' OR (Country > 'A' AND Country < 'ARG')))
|
||||
@ -601,7 +601,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
EXPLAIN
|
||||
SELECT * FROM City WHERE ID BETWEEN 3400 AND 3800;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE City range PRIMARY PRIMARY 4 NULL 944 Using index condition
|
||||
1 SIMPLE City range PRIMARY PRIMARY 4 NULL 400 Using index condition
|
||||
EXPLAIN
|
||||
SELECT * FROM City WHERE ID BETWEEN 3790 AND 3800;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
@ -617,7 +617,7 @@ WHERE ((Population > 101000 AND Population < 102000) AND
|
||||
((ID BETWEEN 3400 AND 3800) AND
|
||||
(Country < 'AGO' OR Name LIKE 'Pa%'));
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE City index_merge PRIMARY,Population,Country,Name Country,Name,Population 3,35,4 NULL 114 Using sort_union(Country,Name,Population); Using where
|
||||
1 SIMPLE City index_merge PRIMARY,Population,Country,Name Population,PRIMARY 4,4 NULL 438 Using sort_union(Population,PRIMARY); Using where
|
||||
EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE ((Population > 101000 AND Population < 110000) AND
|
||||
@ -1434,7 +1434,7 @@ EXPLAIN
|
||||
SELECT * FROM t1
|
||||
WHERE a BETWEEN 4 AND 5 AND b IN (255,4) OR a IN (2,14,25) OR a!=2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range PRIMARY,idx PRIMARY 0 NULL 1 Using index condition; Using where
|
||||
1 SIMPLE t1 index PRIMARY,idx idx 5 NULL 2 Using where; Using index
|
||||
SELECT * FROM t1
|
||||
WHERE a BETWEEN 4 AND 5 AND b IN (255,4) OR a IN (2,14,25) OR a!=2;
|
||||
a b
|
||||
|
@ -15,7 +15,7 @@ insert into t1 values (-5, 1, 1),
|
||||
(10, 1, 1);
|
||||
explain select * from t1 force index(key1, key2) where key1 < 3 or key2 < 3;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge key1,key2 key1,key2 5,5 NULL 4 Using sort_union(key1,key2); Using where
|
||||
1 SIMPLE t1 index_merge key1,key2 key1,key2 5,5 NULL 5 Using sort_union(key1,key2); Using where
|
||||
select * from t1 force index(key1, key2) where key1 < 3 or key2 < 3;
|
||||
pk1 key1 key2
|
||||
-100 1 1
|
||||
|
38
mysql-test/r/secure_file_priv_win.result
Normal file
38
mysql-test/r/secure_file_priv_win.result
Normal file
@ -0,0 +1,38 @@
|
||||
CREATE TABLE t1 (c1 longtext);
|
||||
INSERT INTO t1 values ('a');
|
||||
SELECT * FROM t1 INTO OUTFILE 'MYSQL_TMP_DIR/B11764517.tmp';
|
||||
show global variables like 'secure_file_priv';
|
||||
Variable_name Value
|
||||
secure_file_priv MYSQL_TMP_DIR/
|
||||
SELECT load_file('MYSQL_TMP_DIR\\B11764517.tmp') AS x;
|
||||
x
|
||||
a
|
||||
|
||||
SELECT load_file('MYSQL_TMP_DIR/B11764517.tmp') AS x;
|
||||
x
|
||||
a
|
||||
|
||||
SELECT load_file('MYSQL_TMP_DIR_UCASE/B11764517.tmp') AS x;
|
||||
x
|
||||
a
|
||||
|
||||
SELECT load_file('MYSQL_TMP_DIR_LCASE/B11764517.tmp') AS x;
|
||||
x
|
||||
a
|
||||
|
||||
SELECT load_file('MYSQL_TMP_DIR\\..a..\\..\\..\\B11764517.tmp') AS x;
|
||||
x
|
||||
NULL
|
||||
LOAD DATA INFILE 'MYSQL_TMP_DIR\\B11764517.tmp' INTO TABLE t1;
|
||||
LOAD DATA INFILE 'MYSQL_TMP_DIR/B11764517.tmp' INTO TABLE t1;
|
||||
LOAD DATA INFILE 'MYSQL_TMP_DIR_UCASE/B11764517.tmp' INTO TABLE t1;
|
||||
LOAD DATA INFILE 'MYSQL_TMP_DIR_LCASE/B11764517.tmp' INTO TABLE t1;
|
||||
LOAD DATA INFILE "MYSQL_TMP_DIR\\..a..\\..\\..\\B11764517.tmp" into table t1;
|
||||
ERROR HY000: The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
|
||||
SELECT * FROM t1 INTO OUTFILE 'MYSQL_TMP_DIR\\..a..\\..\\..\\B11764517-2.tmp';
|
||||
ERROR HY000: The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
|
||||
SELECT * FROM t1 INTO OUTFILE 'MYSQL_TMP_DIR\\B11764517-2.tmp';
|
||||
SELECT * FROM t1 INTO OUTFILE 'MYSQL_TMP_DIR/B11764517-3.tmp';
|
||||
SELECT * FROM t1 INTO OUTFILE 'MYSQL_TMP_DIR_UCASE/B11764517-4.tmp';
|
||||
SELECT * FROM t1 INTO OUTFILE 'MYSQL_TMP_DIR_LCASE/B11764517-5.tmp';
|
||||
DROP TABLE t1;
|
@ -5018,6 +5018,33 @@ ON t3.f31 = t6.f61
|
||||
WHERE t7.f71>0;
|
||||
f23
|
||||
DROP TABLE t1,t2,t3,t4,t5,t6,t7;
|
||||
CREATE TABLE t1(f1 int UNSIGNED) engine=myisam;
|
||||
INSERT INTO t1 VALUES (3),(2),(1);
|
||||
set sql_buffer_result=0;
|
||||
SELECT f1 FROM t1 GROUP BY 1;
|
||||
f1
|
||||
1
|
||||
2
|
||||
3
|
||||
SELECT f1 FROM t1 GROUP BY '123' = 'abc';
|
||||
f1
|
||||
3
|
||||
SELECT 1 FROM t1 GROUP BY 1;
|
||||
1
|
||||
1
|
||||
set sql_buffer_result=1;
|
||||
SELECT f1 FROM t1 GROUP BY 1;
|
||||
f1
|
||||
1
|
||||
2
|
||||
3
|
||||
SELECT f1 FROM t1 GROUP BY '123' = 'abc';
|
||||
f1
|
||||
3
|
||||
SELECT 1 FROM t1 GROUP BY 1;
|
||||
1
|
||||
1
|
||||
drop table t1;
|
||||
End of 5.1 tests
|
||||
#
|
||||
# BUG#776274: substitution of a single row table
|
||||
|
@ -5027,6 +5027,33 @@ ON t3.f31 = t6.f61
|
||||
WHERE t7.f71>0;
|
||||
f23
|
||||
DROP TABLE t1,t2,t3,t4,t5,t6,t7;
|
||||
CREATE TABLE t1(f1 int UNSIGNED) engine=myisam;
|
||||
INSERT INTO t1 VALUES (3),(2),(1);
|
||||
set sql_buffer_result=0;
|
||||
SELECT f1 FROM t1 GROUP BY 1;
|
||||
f1
|
||||
1
|
||||
2
|
||||
3
|
||||
SELECT f1 FROM t1 GROUP BY '123' = 'abc';
|
||||
f1
|
||||
3
|
||||
SELECT 1 FROM t1 GROUP BY 1;
|
||||
1
|
||||
1
|
||||
set sql_buffer_result=1;
|
||||
SELECT f1 FROM t1 GROUP BY 1;
|
||||
f1
|
||||
1
|
||||
2
|
||||
3
|
||||
SELECT f1 FROM t1 GROUP BY '123' = 'abc';
|
||||
f1
|
||||
3
|
||||
SELECT 1 FROM t1 GROUP BY 1;
|
||||
1
|
||||
1
|
||||
drop table t1;
|
||||
End of 5.1 tests
|
||||
#
|
||||
# BUG#776274: substitution of a single row table
|
||||
|
@ -5018,6 +5018,33 @@ ON t3.f31 = t6.f61
|
||||
WHERE t7.f71>0;
|
||||
f23
|
||||
DROP TABLE t1,t2,t3,t4,t5,t6,t7;
|
||||
CREATE TABLE t1(f1 int UNSIGNED) engine=myisam;
|
||||
INSERT INTO t1 VALUES (3),(2),(1);
|
||||
set sql_buffer_result=0;
|
||||
SELECT f1 FROM t1 GROUP BY 1;
|
||||
f1
|
||||
1
|
||||
2
|
||||
3
|
||||
SELECT f1 FROM t1 GROUP BY '123' = 'abc';
|
||||
f1
|
||||
3
|
||||
SELECT 1 FROM t1 GROUP BY 1;
|
||||
1
|
||||
1
|
||||
set sql_buffer_result=1;
|
||||
SELECT f1 FROM t1 GROUP BY 1;
|
||||
f1
|
||||
1
|
||||
2
|
||||
3
|
||||
SELECT f1 FROM t1 GROUP BY '123' = 'abc';
|
||||
f1
|
||||
3
|
||||
SELECT 1 FROM t1 GROUP BY 1;
|
||||
1
|
||||
1
|
||||
drop table t1;
|
||||
End of 5.1 tests
|
||||
#
|
||||
# BUG#776274: substitution of a single row table
|
||||
|
@ -30,7 +30,7 @@ ERROR HY000: You are using safe update mode and you tried to update a table with
|
||||
delete from t1 where a+0=1;
|
||||
ERROR HY000: You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column
|
||||
select 1 from t1,t1 as t2,t1 as t3,t1 as t4,t1 as t5;
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
update t1 set b="a" limit 1;
|
||||
update t1 set b="a" where b="b" limit 2;
|
||||
delete from t1 where b="test" limit 1;
|
||||
@ -42,7 +42,7 @@ SELECT @@MAX_JOIN_SIZE, @@SQL_BIG_SELECTS;
|
||||
2 0
|
||||
insert into t1 values (null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a");
|
||||
SELECT * from t1 order by a;
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
SET SQL_BIG_SELECTS=1;
|
||||
SELECT * from t1 order by a;
|
||||
a b
|
||||
@ -52,7 +52,7 @@ a b
|
||||
5 a
|
||||
SET MAX_JOIN_SIZE=2;
|
||||
SELECT * from t1;
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
SET MAX_JOIN_SIZE=DEFAULT;
|
||||
SELECT * from t1;
|
||||
a b
|
||||
@ -84,12 +84,12 @@ insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
set local max_join_size=8;
|
||||
select * from (select * from t1) x;
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
set local max_join_size=1;
|
||||
select * from (select a.a as aa, b.a as ba from t1 a, t1 b) x;
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
set local max_join_size=1;
|
||||
select * from (select 1 union select 2 union select 3) x;
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
drop table t1;
|
||||
SET SQL_SAFE_UPDATES=0,SQL_SELECT_LIMIT=DEFAULT, SQL_MAX_JOIN_SIZE=DEFAULT;
|
||||
|
@ -456,57 +456,57 @@ insert into t2 values (1),(2);
|
||||
insert into t3 values (1,1),(2,2);
|
||||
show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MEMORY 10 Fixed 2 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 2 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 2 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t1 MEMORY 10 Fixed 2 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 2 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 2 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
insert into t1 values (3),(4);
|
||||
insert into t2 values (3),(4);
|
||||
insert into t3 values (3,3),(4,4);
|
||||
show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MEMORY 10 Fixed 4 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 4 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 4 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t1 MEMORY 10 Fixed 4 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 4 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 4 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
insert into t1 values (5);
|
||||
insert into t2 values (5);
|
||||
insert into t3 values (5,5);
|
||||
show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MEMORY 10 Fixed 5 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 5 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 5 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t1 MEMORY 10 Fixed 5 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 5 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 5 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
delete from t1 where a=3;
|
||||
delete from t2 where b=3;
|
||||
delete from t3 where a=3;
|
||||
show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MEMORY 10 Fixed 4 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 4 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 4 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t1 MEMORY 10 Fixed 4 # # # # # NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 4 # # # # # NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 4 # # # # # NULL # NULL NULL latin1_swedish_ci NULL
|
||||
truncate table t1;
|
||||
truncate table t2;
|
||||
truncate table t3;
|
||||
show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MEMORY 10 Fixed 0 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 0 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 0 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t1 MEMORY 10 Fixed 0 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 0 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 0 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
insert into t1 values (5);
|
||||
insert into t2 values (5);
|
||||
insert into t3 values (5,5);
|
||||
show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MEMORY 10 Fixed 1 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 1 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 1 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t1 MEMORY 10 Fixed 1 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 1 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 1 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
delete from t1 where a=5;
|
||||
delete from t2 where b=5;
|
||||
delete from t3 where a=5;
|
||||
show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MEMORY 10 Fixed 0 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 0 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 0 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t1 MEMORY 10 Fixed 0 # # # # # NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 0 # # # # # NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 0 # # # # # NULL # NULL NULL latin1_swedish_ci NULL
|
||||
drop table t1, t2, t3;
|
||||
create database mysqltest;
|
||||
show create database mysqltest;
|
||||
@ -657,7 +657,7 @@ DROP TABLE t1;
|
||||
flush tables;
|
||||
SHOW TABLE STATUS like 't1';
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 NULL NULL NULL NULL # # # # NULL NULL NULL NULL NULL NULL NULL NULL Incorrect information in file: './test/t1.frm'
|
||||
t1 NULL NULL NULL NULL # # # # NULL NULL # NULL NULL NULL NULL NULL Incorrect information in file: './test/t1.frm'
|
||||
Warnings:
|
||||
Warning 1033 Incorrect information in file: './test/t1.frm'
|
||||
show create table t1;
|
||||
|
@ -1685,4 +1685,20 @@ ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function
|
||||
DROP PROCEDURE p1;
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#12428824 - PARSER STACK OVERFLOW AND CRASH IN SP_ADD_USED_ROUTINE
|
||||
# WITH OBSCURE QUERY
|
||||
#
|
||||
SELECT very_long_fn_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222225555555555555555555555555577777777777777777777777777777777777777777777777777777777777777777777777788888888999999999999999999999();
|
||||
ERROR 42000: Identifier name 'very_long_fn_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222' is too long
|
||||
CALL very_long_pr_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222225555555555555555555555555577777777777777777777777777777777777777777777777777777777777777777777777788888888999999999999999999999();
|
||||
ERROR 42000: Identifier name 'very_long_pr_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222' is too long
|
||||
SELECT very_long_db_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222225555555555555555555555555577777777777777777777777777777777777777777777777777777777777777777777777788888888999999999999999999999.simple_func();
|
||||
ERROR 42000: Incorrect database name 'very_long_db_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222'
|
||||
CALL very_long_db_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222225555555555555555555555555577777777777777777777777777777777777777777777777777777777777777777777777788888888999999999999999999999.simple_proc();
|
||||
ERROR 42000: Incorrect database name 'very_long_db_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222'
|
||||
SELECT db_name.very_long_fn_name_111111111111111111111111111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999999999999999999();
|
||||
ERROR 42000: Identifier name 'very_long_fn_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222' is too long
|
||||
CALL db_name.very_long_pr_name_111111111111111111111111111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999999999999999999();
|
||||
ERROR 42000: Identifier name 'very_long_pr_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222' is too long
|
||||
End of 5.1 tests
|
||||
|
@ -567,3 +567,28 @@ DROP USER 'tester';
|
||||
DROP USER 'Tester';
|
||||
DROP DATABASE B48872;
|
||||
End of 5.0 tests.
|
||||
#
|
||||
# Bug#11882603 SELECT_ACL ON ANY COLUMN IN MYSQL.PROC ALLOWS TO SEE
|
||||
# DEFINITION OF ANY ROUTINE.
|
||||
#
|
||||
DROP DATABASE IF EXISTS db1;
|
||||
CREATE DATABASE db1;
|
||||
CREATE PROCEDURE db1.p1() SELECT 1;
|
||||
CREATE USER user2@localhost IDENTIFIED BY '';
|
||||
GRANT SELECT(db) ON mysql.proc TO user2@localhost;
|
||||
# Connection con2 as user2
|
||||
# The statement below before disclosed info from body_utf8 column.
|
||||
SHOW CREATE PROCEDURE db1.p1;
|
||||
ERROR 42000: PROCEDURE p1 does not exist
|
||||
# Check that SHOW works with SELECT grant on whole table
|
||||
# Connection default
|
||||
GRANT SELECT ON mysql.proc TO user2@localhost;
|
||||
# Connection con2
|
||||
# This should work
|
||||
SHOW CREATE PROCEDURE db1.p1;
|
||||
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
|
||||
p1 CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
|
||||
SELECT 1 latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
# Connection default
|
||||
DROP USER user2@localhost;
|
||||
DROP DATABASE db1;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user