mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge joreland@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/jonas/src/mysql-4.1
This commit is contained in:
5
mysql-test/include/have_outfile.inc
Normal file
5
mysql-test/include/have_outfile.inc
Normal file
@ -0,0 +1,5 @@
|
||||
-- require r/have_outfile.require
|
||||
disable_query_log;
|
||||
select load_file(concat(@tmpdir,"/outfile.test"));
|
||||
--exec rm $MYSQL_TEST_DIR/var/tmp/outfile.test
|
||||
enable_query_log;
|
1
mysql-test/include/test_outfile.inc
Normal file
1
mysql-test/include/test_outfile.inc
Normal file
@ -0,0 +1 @@
|
||||
eval select "Outfile OK" into outfile "$MYSQL_TEST_DIR/var/tmp/outfile.test";
|
@ -1,4 +1,5 @@
|
||||
USE mysql;
|
||||
use mysql;
|
||||
set table_type=myisam;
|
||||
|
||||
CREATE TABLE db (
|
||||
Host char(60) binary DEFAULT '' NOT NULL,
|
||||
@ -193,7 +194,7 @@ INSERT INTO time_zone_name (Name, Time_Zone_id) VALUES
|
||||
|
||||
CREATE TABLE time_zone (
|
||||
Time_zone_id int unsigned NOT NULL auto_increment,
|
||||
Use_leap_seconds enum('Y','N') DEFAULT 'N' NOT NULL,
|
||||
Use_leap_seconds enum('Y','N') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
|
||||
PRIMARY KEY TzId (Time_zone_id)
|
||||
) engine=MyISAM
|
||||
CHARACTER SET utf8
|
||||
|
@ -344,7 +344,7 @@ sub mtr_kill_leftovers () {
|
||||
# We scan the "var/run/" directory for other process id's to kill
|
||||
|
||||
# FIXME $path_run_dir or something
|
||||
my $rundir= "$::glob_mysql_test_dir/var/run";
|
||||
my $rundir= "$::opt_vardir/run";
|
||||
|
||||
if ( -d $rundir )
|
||||
{
|
||||
|
@ -89,9 +89,10 @@ sub mtr_report_test_passed ($) {
|
||||
my $tinfo= shift;
|
||||
|
||||
my $timer= "";
|
||||
if ( $::opt_timer and -f "$::glob_mysql_test_dir/var/log/timer" )
|
||||
if ( $::opt_timer and -f "$::opt_vardir/log/timer" )
|
||||
{
|
||||
$timer= mtr_fromfile("$::glob_mysql_test_dir/var/log/timer");
|
||||
$timer= mtr_fromfile("$::opt_vardir/log/timer");
|
||||
$::glob_tot_real_time += $timer;
|
||||
$timer= sprintf "%12s", $timer;
|
||||
}
|
||||
$tinfo->{'result'}= 'MTR_RES_PASSED';
|
||||
@ -177,8 +178,8 @@ sub mtr_report_stats ($) {
|
||||
|
||||
# Report if there was any fatal warnings/errors in the log files
|
||||
#
|
||||
unlink("$::glob_mysql_test_dir/var/log/warnings");
|
||||
unlink("$::glob_mysql_test_dir/var/log/warnings.tmp");
|
||||
unlink("$::opt_vardir/log/warnings");
|
||||
unlink("$::opt_vardir/log/warnings.tmp");
|
||||
# Remove some non fatal warnings from the log files
|
||||
|
||||
# FIXME what is going on ????? ;-)
|
||||
@ -196,11 +197,11 @@ sub mtr_report_stats ($) {
|
||||
# found_error=1
|
||||
# }
|
||||
# done
|
||||
# unlink("$::glob_mysql_test_dir/var/log/warnings.tmp");
|
||||
# unlink("$::opt_vardir/log/warnings.tmp");
|
||||
# if ( $found_error= "1" )
|
||||
# {
|
||||
# print "WARNING: Got errors/warnings while running tests. Please examine\n"
|
||||
# print "$::glob_mysql_test_dir/var/log/warnings for details.\n"
|
||||
# print "$::opt_vardir/log/warnings for details.\n"
|
||||
# }
|
||||
# }
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ use Sys::Hostname;
|
||||
#use Carp;
|
||||
use IO::Socket;
|
||||
use IO::Socket::INET;
|
||||
#use Data::Dumper;
|
||||
use Data::Dumper;
|
||||
use strict;
|
||||
#use diagnostics;
|
||||
|
||||
@ -177,6 +177,7 @@ our $path_timefile;
|
||||
our $path_manager_log; # Used by mysqldadmin
|
||||
our $path_slave_load_tmpdir; # What is this?!
|
||||
our $path_my_basedir;
|
||||
our $opt_vardir; # A path but set directly on cmd line
|
||||
our $opt_tmpdir; # A path but set directly on cmd line
|
||||
|
||||
our $opt_usage;
|
||||
@ -447,8 +448,6 @@ sub initial_setup () {
|
||||
$glob_basedir= dirname($glob_mysql_test_dir);
|
||||
$glob_mysql_bench_dir= "$glob_basedir/mysql-bench"; # FIXME make configurable
|
||||
|
||||
$path_timefile= "$glob_mysql_test_dir/var/log/mysqltest-time";
|
||||
|
||||
# needs to be same length to test logging (FIXME what???)
|
||||
$path_slave_load_tmpdir= "../../var/tmp";
|
||||
|
||||
@ -469,11 +468,6 @@ sub command_line_setup () {
|
||||
# These are defaults for things that are set on the command line
|
||||
|
||||
$opt_suite= "main"; # Special default suite
|
||||
$opt_tmpdir= "$glob_mysql_test_dir/var/tmp";
|
||||
# FIXME maybe unneded?
|
||||
$path_manager_log= "$glob_mysql_test_dir/var/log/manager.log";
|
||||
$opt_current_test= "$glob_mysql_test_dir/var/log/current_test";
|
||||
|
||||
my $opt_master_myport= 9306;
|
||||
my $opt_slave_myport= 9308;
|
||||
$opt_ndbcluster_port= 9350;
|
||||
@ -549,6 +543,7 @@ sub command_line_setup () {
|
||||
'unified-diff|udiff' => \$opt_udiff,
|
||||
'user-test=s' => \$opt_user_test,
|
||||
'user=s' => \$opt_user,
|
||||
'vardir=s' => \$opt_vardir,
|
||||
'verbose' => \$opt_verbose,
|
||||
'wait-timeout=i' => \$opt_wait_timeout,
|
||||
'warnings|log-warnings' => \$opt_warnings,
|
||||
@ -564,51 +559,35 @@ sub command_line_setup () {
|
||||
|
||||
@opt_cases= @ARGV;
|
||||
|
||||
# Put this into a hash, will be a C struct
|
||||
# --------------------------------------------------------------------------
|
||||
# Set the "var/" directory, as it is the base for everything else
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
$master->[0]->{'path_myddir'}= "$glob_mysql_test_dir/var/master-data";
|
||||
$master->[0]->{'path_myerr'}= "$glob_mysql_test_dir/var/log/master.err";
|
||||
$master->[0]->{'path_mylog'}= "$glob_mysql_test_dir/var/log/master.log";
|
||||
$master->[0]->{'path_mypid'}= "$glob_mysql_test_dir/var/run/master.pid";
|
||||
$master->[0]->{'path_mysock'}= "$opt_tmpdir/master.sock";
|
||||
$master->[0]->{'path_myport'}= $opt_master_myport;
|
||||
$master->[0]->{'start_timeout'}= 400; # enough time create innodb tables
|
||||
if ( ! $opt_vardir )
|
||||
{
|
||||
$opt_vardir= "$glob_mysql_test_dir/var";
|
||||
}
|
||||
|
||||
$master->[0]->{'ndbcluster'}= 1; # ndbcluster not started
|
||||
if ( $opt_vardir !~ m,^/, )
|
||||
{
|
||||
# Make absolute path, relative test dir
|
||||
$opt_vardir= "$glob_mysql_test_dir/$opt_vardir";
|
||||
}
|
||||
|
||||
$master->[1]->{'path_myddir'}= "$glob_mysql_test_dir/var/master1-data";
|
||||
$master->[1]->{'path_myerr'}= "$glob_mysql_test_dir/var/log/master1.err";
|
||||
$master->[1]->{'path_mylog'}= "$glob_mysql_test_dir/var/log/master1.log";
|
||||
$master->[1]->{'path_mypid'}= "$glob_mysql_test_dir/var/run/master1.pid";
|
||||
$master->[1]->{'path_mysock'}= "$opt_tmpdir/master1.sock";
|
||||
$master->[1]->{'path_myport'}= $opt_master_myport + 1;
|
||||
$master->[1]->{'start_timeout'}= 400; # enough time create innodb tables
|
||||
# --------------------------------------------------------------------------
|
||||
# If not set, set these to defaults
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
$slave->[0]->{'path_myddir'}= "$glob_mysql_test_dir/var/slave-data";
|
||||
$slave->[0]->{'path_myerr'}= "$glob_mysql_test_dir/var/log/slave.err";
|
||||
$slave->[0]->{'path_mylog'}= "$glob_mysql_test_dir/var/log/slave.log";
|
||||
$slave->[0]->{'path_mypid'}= "$glob_mysql_test_dir/var/run/slave.pid";
|
||||
$slave->[0]->{'path_mysock'}= "$opt_tmpdir/slave.sock";
|
||||
$slave->[0]->{'path_myport'}= $opt_slave_myport;
|
||||
$slave->[0]->{'start_timeout'}= 400;
|
||||
|
||||
$slave->[1]->{'path_myddir'}= "$glob_mysql_test_dir/var/slave1-data";
|
||||
$slave->[1]->{'path_myerr'}= "$glob_mysql_test_dir/var/log/slave1.err";
|
||||
$slave->[1]->{'path_mylog'}= "$glob_mysql_test_dir/var/log/slave1.log";
|
||||
$slave->[1]->{'path_mypid'}= "$glob_mysql_test_dir/var/run/slave1.pid";
|
||||
$slave->[1]->{'path_mysock'}= "$opt_tmpdir/slave1.sock";
|
||||
$slave->[1]->{'path_myport'}= $opt_slave_myport + 1;
|
||||
$slave->[1]->{'start_timeout'}= 300;
|
||||
|
||||
$slave->[2]->{'path_myddir'}= "$glob_mysql_test_dir/var/slave2-data";
|
||||
$slave->[2]->{'path_myerr'}= "$glob_mysql_test_dir/var/log/slave2.err";
|
||||
$slave->[2]->{'path_mylog'}= "$glob_mysql_test_dir/var/log/slave2.log";
|
||||
$slave->[2]->{'path_mypid'}= "$glob_mysql_test_dir/var/run/slave2.pid";
|
||||
$slave->[2]->{'path_mysock'}= "$opt_tmpdir/slave2.sock";
|
||||
$slave->[2]->{'path_myport'}= $opt_slave_myport + 2;
|
||||
$slave->[2]->{'start_timeout'}= 300;
|
||||
$opt_tmpdir= "$opt_vardir/tmp" unless $opt_tmpdir;
|
||||
# FIXME maybe not needed?
|
||||
$path_manager_log= "$opt_vardir/log/manager.log"
|
||||
unless $path_manager_log;
|
||||
$opt_current_test= "$opt_vardir/log/current_test"
|
||||
unless $opt_current_test;
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# Do sanity checks of command line arguments
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
if ( $opt_extern and $opt_local )
|
||||
{
|
||||
@ -621,13 +600,6 @@ sub command_line_setup () {
|
||||
$opt_socket= "/tmp/mysql.sock"; # FIXME
|
||||
}
|
||||
|
||||
if ( $opt_extern )
|
||||
{
|
||||
$glob_use_running_server= 1;
|
||||
$opt_skip_rpl= 1; # We don't run rpl test cases
|
||||
$master->[0]->{'path_mysock'}= $opt_socket;
|
||||
}
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# Look at the command line options and set script flags
|
||||
# --------------------------------------------------------------------------
|
||||
@ -746,6 +718,58 @@ sub command_line_setup () {
|
||||
}
|
||||
}
|
||||
|
||||
# Put this into a hash, will be a C struct
|
||||
|
||||
$master->[0]->{'path_myddir'}= "$opt_vardir/master-data";
|
||||
$master->[0]->{'path_myerr'}= "$opt_vardir/log/master.err";
|
||||
$master->[0]->{'path_mylog'}= "$opt_vardir/log/master.log";
|
||||
$master->[0]->{'path_mypid'}= "$opt_vardir/run/master.pid";
|
||||
$master->[0]->{'path_mysock'}= "$opt_tmpdir/master.sock";
|
||||
$master->[0]->{'path_myport'}= $opt_master_myport;
|
||||
$master->[0]->{'start_timeout'}= 400; # enough time create innodb tables
|
||||
|
||||
$master->[0]->{'ndbcluster'}= 1; # ndbcluster not started
|
||||
|
||||
$master->[1]->{'path_myddir'}= "$opt_vardir/master1-data";
|
||||
$master->[1]->{'path_myerr'}= "$opt_vardir/log/master1.err";
|
||||
$master->[1]->{'path_mylog'}= "$opt_vardir/log/master1.log";
|
||||
$master->[1]->{'path_mypid'}= "$opt_vardir/run/master1.pid";
|
||||
$master->[1]->{'path_mysock'}= "$opt_tmpdir/master1.sock";
|
||||
$master->[1]->{'path_myport'}= $opt_master_myport + 1;
|
||||
$master->[1]->{'start_timeout'}= 400; # enough time create innodb tables
|
||||
|
||||
$slave->[0]->{'path_myddir'}= "$opt_vardir/slave-data";
|
||||
$slave->[0]->{'path_myerr'}= "$opt_vardir/log/slave.err";
|
||||
$slave->[0]->{'path_mylog'}= "$opt_vardir/log/slave.log";
|
||||
$slave->[0]->{'path_mypid'}= "$opt_vardir/run/slave.pid";
|
||||
$slave->[0]->{'path_mysock'}= "$opt_tmpdir/slave.sock";
|
||||
$slave->[0]->{'path_myport'}= $opt_slave_myport;
|
||||
$slave->[0]->{'start_timeout'}= 400;
|
||||
|
||||
$slave->[1]->{'path_myddir'}= "$opt_vardir/slave1-data";
|
||||
$slave->[1]->{'path_myerr'}= "$opt_vardir/log/slave1.err";
|
||||
$slave->[1]->{'path_mylog'}= "$opt_vardir/log/slave1.log";
|
||||
$slave->[1]->{'path_mypid'}= "$opt_vardir/run/slave1.pid";
|
||||
$slave->[1]->{'path_mysock'}= "$opt_tmpdir/slave1.sock";
|
||||
$slave->[1]->{'path_myport'}= $opt_slave_myport + 1;
|
||||
$slave->[1]->{'start_timeout'}= 300;
|
||||
|
||||
$slave->[2]->{'path_myddir'}= "$opt_vardir/slave2-data";
|
||||
$slave->[2]->{'path_myerr'}= "$opt_vardir/log/slave2.err";
|
||||
$slave->[2]->{'path_mylog'}= "$opt_vardir/log/slave2.log";
|
||||
$slave->[2]->{'path_mypid'}= "$opt_vardir/run/slave2.pid";
|
||||
$slave->[2]->{'path_mysock'}= "$opt_tmpdir/slave2.sock";
|
||||
$slave->[2]->{'path_myport'}= $opt_slave_myport + 2;
|
||||
$slave->[2]->{'start_timeout'}= 300;
|
||||
|
||||
if ( $opt_extern )
|
||||
{
|
||||
$glob_use_running_server= 1;
|
||||
$opt_skip_rpl= 1; # We don't run rpl test cases
|
||||
$master->[0]->{'path_mysock'}= $opt_socket;
|
||||
}
|
||||
|
||||
$path_timefile= "$opt_vardir/log/mysqltest-time";
|
||||
}
|
||||
|
||||
|
||||
@ -892,8 +916,8 @@ sub executable_setup () {
|
||||
}
|
||||
|
||||
$path_ndb_backup_dir=
|
||||
"$glob_mysql_test_dir/var/ndbcluster-$opt_ndbcluster_port";
|
||||
$file_ndb_testrun_log= "$glob_mysql_test_dir/var/log/ndb_testrun.log";
|
||||
"$opt_vardir/ndbcluster-$opt_ndbcluster_port";
|
||||
$file_ndb_testrun_log= "$opt_vardir/log/ndb_testrun.log";
|
||||
}
|
||||
|
||||
|
||||
@ -981,7 +1005,7 @@ sub kill_running_server () {
|
||||
# leftovers from previous runs.
|
||||
|
||||
mtr_report("Killing Possible Leftover Processes");
|
||||
mkpath("$glob_mysql_test_dir/var/log"); # Needed for mysqladmin log
|
||||
mkpath("$opt_vardir/log"); # Needed for mysqladmin log
|
||||
mtr_kill_leftovers();
|
||||
|
||||
ndbcluster_stop();
|
||||
@ -995,15 +1019,20 @@ sub kill_and_cleanup () {
|
||||
|
||||
mtr_report("Removing Stale Files");
|
||||
|
||||
rmtree("$glob_mysql_test_dir/var/log");
|
||||
rmtree("$glob_mysql_test_dir/var/ndbcluster-$opt_ndbcluster_port");
|
||||
rmtree("$glob_mysql_test_dir/var/run");
|
||||
rmtree("$glob_mysql_test_dir/var/tmp");
|
||||
if ( -l $opt_vardir and ! unlink($opt_vardir) )
|
||||
{
|
||||
mtr_error("Can't remove soft link \"$opt_vardir\"");
|
||||
}
|
||||
|
||||
mkpath("$glob_mysql_test_dir/var/log");
|
||||
mkpath("$glob_mysql_test_dir/var/run");
|
||||
mkpath("$glob_mysql_test_dir/var/tmp");
|
||||
mkpath($opt_tmpdir);
|
||||
rmtree("$opt_vardir/log");
|
||||
rmtree("$opt_vardir/ndbcluster-$opt_ndbcluster_port");
|
||||
rmtree("$opt_vardir/run");
|
||||
rmtree("$opt_vardir/tmp");
|
||||
|
||||
mkpath("$opt_vardir/log");
|
||||
mkpath("$opt_vardir/run");
|
||||
mkpath("$opt_vardir/tmp");
|
||||
mkpath($opt_tmpdir) if $opt_tmpdir ne "$opt_vardir/tmp";
|
||||
|
||||
# FIXME do we really need to create these all, or are they
|
||||
# created for us when tables are created?
|
||||
@ -1027,6 +1056,16 @@ sub kill_and_cleanup () {
|
||||
rmtree("$slave->[2]->{'path_myddir'}");
|
||||
mkpath("$slave->[2]->{'path_myddir'}/mysql");
|
||||
mkpath("$slave->[2]->{'path_myddir'}/test");
|
||||
|
||||
# To make some old test cases work, we create a soft
|
||||
# link from the old "var" location to the new one
|
||||
|
||||
if ( ! $glob_win32 and $opt_vardir ne "$glob_mysql_test_dir/var" )
|
||||
{
|
||||
# FIXME why bother with the above, why not always remove all of var?!
|
||||
rmtree("$glob_mysql_test_dir/var"); # Clean old var, FIXME or rename it?!
|
||||
symlink($opt_vardir, "$glob_mysql_test_dir/var");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1050,7 +1089,7 @@ sub ndbcluster_install () {
|
||||
if ( mtr_run("$glob_mysql_test_dir/ndb/ndbcluster",
|
||||
["--port=$opt_ndbcluster_port",
|
||||
"--port-base=$ndbcluster_port_base",
|
||||
"--data-dir=$glob_mysql_test_dir/var",
|
||||
"--data-dir=$opt_vardir",
|
||||
$ndbcluster_opts,
|
||||
"--initial"],
|
||||
"", "", "", "") )
|
||||
@ -1074,7 +1113,7 @@ sub ndbcluster_start () {
|
||||
# FIXME, we want to _append_ output to file $file_ndb_testrun_log instead of /dev/null
|
||||
if ( mtr_run("$glob_mysql_test_dir/ndb/ndbcluster",
|
||||
["--port=$opt_ndbcluster_port",
|
||||
"--data-dir=$glob_mysql_test_dir/var"],
|
||||
"--data-dir=$opt_vardir"],
|
||||
"", "/dev/null", "", "") )
|
||||
{
|
||||
mtr_error("Error ndbcluster_start");
|
||||
@ -1094,7 +1133,7 @@ sub ndbcluster_stop () {
|
||||
# FIXME, we want to _append_ output to file $file_ndb_testrun_log instead of /dev/null
|
||||
mtr_run("$glob_mysql_test_dir/ndb/ndbcluster",
|
||||
["--port=$opt_ndbcluster_port",
|
||||
"--data-dir=$glob_mysql_test_dir/var",
|
||||
"--data-dir=$opt_vardir",
|
||||
"--stop"],
|
||||
"", "/dev/null", "", "");
|
||||
|
||||
@ -1497,15 +1536,15 @@ sub run_testcase ($) {
|
||||
{
|
||||
mtr_report_test_passed($tinfo);
|
||||
}
|
||||
elsif ( $res == 2 )
|
||||
elsif ( $res == 62 )
|
||||
{
|
||||
# Testcase itself tell us to skip this one
|
||||
mtr_report_test_skipped($tinfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
# Test case failed
|
||||
if ( $res > 2 )
|
||||
# Test case failed, if in control mysqltest returns 1
|
||||
if ( $res != 1 )
|
||||
{
|
||||
mtr_tofile($path_timefile,
|
||||
"mysqltest returned unexpected code $res, " .
|
||||
@ -1566,17 +1605,17 @@ sub do_before_start_master ($$) {
|
||||
$tname ne "rpl_crash_binlog_ib_3b")
|
||||
{
|
||||
# FIXME we really want separate dir for binlogs
|
||||
foreach my $bin ( glob("$glob_mysql_test_dir/var/log/master*-bin.*") )
|
||||
foreach my $bin ( glob("$opt_vardir/log/master*-bin.*") )
|
||||
{
|
||||
unlink($bin);
|
||||
}
|
||||
}
|
||||
|
||||
# Remove old master.info and relay-log.info files
|
||||
unlink("$glob_mysql_test_dir/var/master-data/master.info");
|
||||
unlink("$glob_mysql_test_dir/var/master-data/relay-log.info");
|
||||
unlink("$glob_mysql_test_dir/var/master1-data/master.info");
|
||||
unlink("$glob_mysql_test_dir/var/master1-data/relay-log.info");
|
||||
unlink("$opt_vardir/master-data/master.info");
|
||||
unlink("$opt_vardir/master-data/relay-log.info");
|
||||
unlink("$opt_vardir/master1-data/master.info");
|
||||
unlink("$opt_vardir/master1-data/relay-log.info");
|
||||
|
||||
# Run master initialization shell script if one exists
|
||||
if ( $init_script )
|
||||
@ -1603,13 +1642,13 @@ sub do_before_start_slave ($$) {
|
||||
$tname ne "rpl_crash_binlog_ib_3b" )
|
||||
{
|
||||
# FIXME we really want separate dir for binlogs
|
||||
foreach my $bin ( glob("$glob_mysql_test_dir/var/log/slave*-bin.*") )
|
||||
foreach my $bin ( glob("$opt_vardir/log/slave*-bin.*") )
|
||||
{
|
||||
unlink($bin);
|
||||
}
|
||||
# FIXME really master?!
|
||||
unlink("$glob_mysql_test_dir/var/slave-data/master.info");
|
||||
unlink("$glob_mysql_test_dir/var/slave-data/relay-log.info");
|
||||
unlink("$opt_vardir/slave-data/master.info");
|
||||
unlink("$opt_vardir/slave-data/relay-log.info");
|
||||
}
|
||||
|
||||
# Run slave initialization shell script if one exists
|
||||
@ -1623,8 +1662,8 @@ sub do_before_start_slave ($$) {
|
||||
}
|
||||
}
|
||||
|
||||
`rm -f $glob_mysql_test_dir/var/slave-data/log.*`;
|
||||
# unlink("$glob_mysql_test_dir/var/slave-data/log.*");
|
||||
`rm -f $opt_vardir/slave-data/log.*`;
|
||||
# unlink("$opt_vardir/slave-data/log.*");
|
||||
}
|
||||
|
||||
sub mysqld_arguments ($$$$$) {
|
||||
@ -1670,8 +1709,7 @@ sub mysqld_arguments ($$$$$) {
|
||||
|
||||
if ( $type eq 'master' )
|
||||
{
|
||||
mtr_add_arg($args, "%s--log-bin=%s/var/log/master-bin", $prefix,
|
||||
$glob_mysql_test_dir);
|
||||
mtr_add_arg($args, "%s--log-bin=%s/log/master-bin", $prefix, $opt_vardir);
|
||||
mtr_add_arg($args, "%s--pid-file=%s", $prefix,
|
||||
$master->[$idx]->{'path_mypid'});
|
||||
mtr_add_arg($args, "%s--port=%d", $prefix,
|
||||
@ -1695,8 +1733,8 @@ sub mysqld_arguments ($$$$$) {
|
||||
# FIXME slave get this option twice?!
|
||||
mtr_add_arg($args, "%s--exit-info=256", $prefix);
|
||||
mtr_add_arg($args, "%s--init-rpl-role=slave", $prefix);
|
||||
mtr_add_arg($args, "%s--log-bin=%s/var/log/slave%s-bin", $prefix,
|
||||
$glob_mysql_test_dir, $sidx); # FIXME use own dir for binlogs
|
||||
mtr_add_arg($args, "%s--log-bin=%s/log/slave%s-bin", $prefix,
|
||||
$opt_vardir, $sidx); # FIXME use own dir for binlogs
|
||||
mtr_add_arg($args, "%s--log-slave-updates", $prefix);
|
||||
# FIXME option duplicated for slave
|
||||
mtr_add_arg($args, "%s--log=%s", $prefix,
|
||||
@ -1706,8 +1744,8 @@ sub mysqld_arguments ($$$$$) {
|
||||
$slave->[$idx]->{'path_mypid'});
|
||||
mtr_add_arg($args, "%s--port=%d", $prefix,
|
||||
$slave->[$idx]->{'path_myport'});
|
||||
mtr_add_arg($args, "%s--relay-log=%s/var/log/slave%s-relay-bin", $prefix,
|
||||
$glob_mysql_test_dir, $sidx);
|
||||
mtr_add_arg($args, "%s--relay-log=%s/log/slave%s-relay-bin", $prefix,
|
||||
$opt_vardir, $sidx);
|
||||
mtr_add_arg($args, "%s--report-host=127.0.0.1", $prefix);
|
||||
mtr_add_arg($args, "%s--report-port=%d", $prefix,
|
||||
$slave->[$idx]->{'path_myport'});
|
||||
@ -1745,13 +1783,13 @@ sub mysqld_arguments ($$$$$) {
|
||||
{
|
||||
if ( $type eq 'master' )
|
||||
{
|
||||
mtr_add_arg($args, "%s--debug=d:t:i:A,%s/var/log/master%s.trace",
|
||||
$prefix, $glob_mysql_test_dir, $sidx);
|
||||
mtr_add_arg($args, "%s--debug=d:t:i:A,%s/log/master%s.trace",
|
||||
$prefix, $opt_vardir, $sidx);
|
||||
}
|
||||
if ( $type eq 'slave' )
|
||||
{
|
||||
mtr_add_arg($args, "%s--debug=d:t:i:A,%s/var/log/slave%s.trace",
|
||||
$prefix, $glob_mysql_test_dir, $sidx);
|
||||
mtr_add_arg($args, "%s--debug=d:t:i:A,%s/log/slave%s.trace",
|
||||
$prefix, $opt_vardir, $sidx);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2003,7 +2041,7 @@ sub run_mysqltest ($$) {
|
||||
if ( $opt_debug )
|
||||
{
|
||||
$cmdline_mysqldump .=
|
||||
" --debug=d:t:A,$glob_mysql_test_dir/var/log/mysqldump.trace";
|
||||
" --debug=d:t:A,$opt_vardir/log/mysqldump.trace";
|
||||
}
|
||||
|
||||
my $cmdline_mysqlbinlog=
|
||||
@ -2012,7 +2050,7 @@ sub run_mysqltest ($$) {
|
||||
if ( $opt_debug )
|
||||
{
|
||||
$cmdline_mysqlbinlog .=
|
||||
" --debug=d:t:A,$glob_mysql_test_dir/var/log/mysqlbinlog.trace";
|
||||
" --debug=d:t:A,$opt_vardir/log/mysqlbinlog.trace";
|
||||
}
|
||||
|
||||
my $cmdline_mysql=
|
||||
@ -2075,13 +2113,13 @@ sub run_mysqltest ($$) {
|
||||
{
|
||||
$exe= "strace"; # FIXME there are ktrace, ....
|
||||
mtr_add_arg($args, "-o");
|
||||
mtr_add_arg($args, "%s/var/log/mysqltest.strace", $glob_mysql_test_dir);
|
||||
mtr_add_arg($args, "%s/log/mysqltest.strace", $opt_vardir);
|
||||
mtr_add_arg($args, "$exe_mysqltest");
|
||||
}
|
||||
|
||||
if ( $opt_timer )
|
||||
{
|
||||
mtr_add_arg($args, "--timer-file=%s/var/log/timer", $glob_mysql_test_dir);
|
||||
mtr_add_arg($args, "--timer-file=%s/log/timer", $opt_vardir);
|
||||
}
|
||||
|
||||
if ( $opt_big_test )
|
||||
@ -2106,8 +2144,7 @@ sub run_mysqltest ($$) {
|
||||
|
||||
if ( $opt_debug )
|
||||
{
|
||||
mtr_add_arg($args, "--debug=d:t:A,%s/var/log/mysqltest.trace",
|
||||
$glob_mysql_test_dir);
|
||||
mtr_add_arg($args, "--debug=d:t:A,%s/log/mysqltest.trace", $opt_vardir);
|
||||
}
|
||||
|
||||
if ( $opt_with_openssl )
|
||||
@ -2129,7 +2166,7 @@ sub run_mysqltest ($$) {
|
||||
mysqld_arguments($args,'master',0,$tinfo->{'master_opt'},[]);
|
||||
}
|
||||
|
||||
return mtr_run_test($exe_mysqltest,$args,$tinfo->{'path'},"",$path_timefile,"");
|
||||
return mtr_run_test($exe,$args,$tinfo->{'path'},"",$path_timefile,"");
|
||||
}
|
||||
|
||||
##############################################################################
|
||||
|
@ -569,10 +569,7 @@ if [ x$SOURCE_DIST = x1 ] ; then
|
||||
NDB_MGM="$BASEDIR/ndb/src/mgmclient/ndb_mgm"
|
||||
|
||||
if [ -n "$USE_PURIFY" ] ; then
|
||||
PSUP="$MYSQL_TEST_DIR/purify.suppress"
|
||||
echo "suppress UMR rw_read_held; mi_open; ha_myisam::open64; handler::ha_open; openfrm" > $PSUP
|
||||
echo "suppress UMR my_end; main" >> $PSUP
|
||||
echo "suppress UMR _doprnt; fprintf; my_end; main" >> $PSUP
|
||||
PSUP="$MYSQL_TEST_DIR/suppress.purify"
|
||||
PURIFYOPTIONS="-windows=no -log-file=%v.purifylog -append-logfile -add-suppression-files=$PSUP"
|
||||
if [ -f "${MYSQL_TEST}-purify" ] ; then
|
||||
MYSQL_TEST="${MYSQL_TEST}-purify"
|
||||
@ -694,7 +691,7 @@ fi
|
||||
MYSQL_DUMP="$MYSQL_DUMP --no-defaults -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLDUMP_OPT"
|
||||
MYSQL_BINLOG="$MYSQL_BINLOG --no-defaults --local-load=$MYSQL_TMP_DIR $EXTRA_MYSQLBINLOG_OPT"
|
||||
MYSQL_FIX_SYSTEM_TABLES="$MYSQL_FIX_SYSTEM_TABLES --no-defaults --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD --basedir=$BASEDIR --bindir=$CLIENT_BINDIR --verbose"
|
||||
MYSQL="$MYSQL --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD"
|
||||
MYSQL="$MYSQL --no-defaults --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD"
|
||||
export MYSQL MYSQL_DUMP MYSQL_BINLOG MYSQL_FIX_SYSTEM_TABLES
|
||||
export CLIENT_BINDIR MYSQL_CLIENT_TEST CHARSETSDIR
|
||||
export NDB_TOOLS_DIR
|
||||
@ -1660,11 +1657,11 @@ run_testcase ()
|
||||
$ECHO "$RES$RES_SPACE [ pass ] $TIMER"
|
||||
else
|
||||
# why the following ``if'' ? That is why res==1 is special ?
|
||||
if [ $res = 2 ]; then
|
||||
if [ $res = 62 ]; then
|
||||
skip_inc
|
||||
$ECHO "$RES$RES_SPACE [ skipped ]"
|
||||
else
|
||||
if [ $res -gt 2 ]; then
|
||||
if [ $res -ne 1 ]; then
|
||||
$ECHO "mysqltest returned unexpected code $res, it has probably crashed" >> $TIMEFILE
|
||||
fi
|
||||
total_inc
|
||||
|
@ -303,6 +303,120 @@ ALTER TABLE t1 DISABLE KEYS;
|
||||
INSERT DELAYED INTO t1 VALUES(1),(2),(3);
|
||||
ALTER TABLE t1 ENABLE KEYS;
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (
|
||||
Host varchar(16) binary NOT NULL default '',
|
||||
User varchar(16) binary NOT NULL default '',
|
||||
PRIMARY KEY (Host,User)
|
||||
) ENGINE=MyISAM;
|
||||
ALTER TABLE t1 DISABLE KEYS;
|
||||
LOCK TABLES t1 WRITE;
|
||||
INSERT INTO t1 VALUES ('localhost','root'),('localhost',''),('games','monty');
|
||||
SHOW INDEX FROM t1;
|
||||
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
|
||||
t1 0 PRIMARY 1 Host A NULL NULL NULL BTREE
|
||||
t1 0 PRIMARY 2 User A 3 NULL NULL BTREE
|
||||
ALTER TABLE t1 ENABLE KEYS;
|
||||
UNLOCK TABLES;
|
||||
CHECK TABLES t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (
|
||||
Host varchar(16) binary NOT NULL default '',
|
||||
User varchar(16) binary NOT NULL default '',
|
||||
PRIMARY KEY (Host,User),
|
||||
KEY (Host)
|
||||
) ENGINE=MyISAM;
|
||||
ALTER TABLE t1 DISABLE KEYS;
|
||||
SHOW INDEX FROM t1;
|
||||
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
|
||||
t1 0 PRIMARY 1 Host A NULL NULL NULL BTREE
|
||||
t1 0 PRIMARY 2 User A 0 NULL NULL BTREE
|
||||
t1 1 Host 1 Host A NULL NULL NULL BTREE disabled
|
||||
LOCK TABLES t1 WRITE;
|
||||
INSERT INTO t1 VALUES ('localhost','root'),('localhost','');
|
||||
SHOW INDEX FROM t1;
|
||||
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
|
||||
t1 0 PRIMARY 1 Host A NULL NULL NULL BTREE
|
||||
t1 0 PRIMARY 2 User A 2 NULL NULL BTREE
|
||||
t1 1 Host 1 Host A NULL NULL NULL BTREE disabled
|
||||
ALTER TABLE t1 ENABLE KEYS;
|
||||
SHOW INDEX FROM t1;
|
||||
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
|
||||
t1 0 PRIMARY 1 Host A NULL NULL NULL BTREE
|
||||
t1 0 PRIMARY 2 User A 2 NULL NULL BTREE
|
||||
t1 1 Host 1 Host A 1 NULL NULL BTREE
|
||||
UNLOCK TABLES;
|
||||
CHECK TABLES t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
LOCK TABLES t1 WRITE;
|
||||
ALTER TABLE t1 RENAME t2;
|
||||
UNLOCK TABLES;
|
||||
select * from t2;
|
||||
Host User
|
||||
localhost
|
||||
localhost root
|
||||
DROP TABLE t2;
|
||||
CREATE TABLE t1 (
|
||||
Host varchar(16) binary NOT NULL default '',
|
||||
User varchar(16) binary NOT NULL default '',
|
||||
PRIMARY KEY (Host,User),
|
||||
KEY (Host)
|
||||
) ENGINE=MyISAM;
|
||||
LOCK TABLES t1 WRITE;
|
||||
ALTER TABLE t1 DISABLE KEYS;
|
||||
SHOW INDEX FROM t1;
|
||||
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
|
||||
t1 0 PRIMARY 1 Host A NULL NULL NULL BTREE
|
||||
t1 0 PRIMARY 2 User A 0 NULL NULL BTREE
|
||||
t1 1 Host 1 Host A NULL NULL NULL BTREE disabled
|
||||
DROP TABLE t1;
|
||||
create table t1 (a int);
|
||||
alter table t1 rename to `t1\\`;
|
||||
ERROR 42000: Incorrect table name 't1\\'
|
||||
rename table t1 to `t1\\`;
|
||||
ERROR 42000: Incorrect table name 't1\\'
|
||||
drop table t1;
|
||||
drop table if exists t1, t2;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 't1'
|
||||
Note 1051 Unknown table 't2'
|
||||
create table t1 ( a varchar(10) not null primary key ) engine=myisam;
|
||||
create table t2 ( a varchar(10) not null primary key ) engine=merge union=(t1);
|
||||
flush tables;
|
||||
alter table t1 modify a varchar(10);
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` varchar(10) NOT NULL default '',
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t1`)
|
||||
flush tables;
|
||||
alter table t1 modify a varchar(10) not null;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` varchar(10) NOT NULL default '',
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t1`)
|
||||
drop table if exists t1, t2;
|
||||
create table t1 (a int, b int, c int, d int, e int, f int, g int, h int,i int, primary key (a,b,c,d,e,f,g,i,h)) engine=MyISAM;
|
||||
insert into t1 (a) values(1);
|
||||
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 MyISAM 9 Fixed 1 37 X X X X X X X X latin1_swedish_ci NULL
|
||||
alter table t1 modify a int;
|
||||
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 MyISAM 9 Fixed 1 37 X X X X X X X X latin1_swedish_ci NULL
|
||||
drop table t1;
|
||||
create table t1 (a int not null, b int not null, c int not null, d int not null, e int not null, f int not null, g int not null, h int not null,i int not null, primary key (a,b,c,d,e,f,g,i,h)) engine=MyISAM;
|
||||
insert into t1 (a) values(1);
|
||||
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 MyISAM 9 Fixed 1 37 X X X X X X X X latin1_swedish_ci NULL
|
||||
drop table t1;
|
||||
set names koi8r;
|
||||
create table t1 (a char(10) character set koi8r);
|
||||
insert into t1 values ('<27><><EFBFBD><EFBFBD>');
|
||||
@ -382,75 +496,6 @@ t1 CREATE TABLE `t1` (
|
||||
`mytext` longtext character set latin1 collate latin1_general_cs
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin2
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (
|
||||
Host varchar(16) binary NOT NULL default '',
|
||||
User varchar(16) binary NOT NULL default '',
|
||||
PRIMARY KEY (Host,User)
|
||||
) ENGINE=MyISAM;
|
||||
ALTER TABLE t1 DISABLE KEYS;
|
||||
LOCK TABLES t1 WRITE;
|
||||
INSERT INTO t1 VALUES ('localhost','root'),('localhost',''),('games','monty');
|
||||
SHOW INDEX FROM t1;
|
||||
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
|
||||
t1 0 PRIMARY 1 Host A NULL NULL NULL BTREE
|
||||
t1 0 PRIMARY 2 User A 3 NULL NULL BTREE
|
||||
ALTER TABLE t1 ENABLE KEYS;
|
||||
UNLOCK TABLES;
|
||||
CHECK TABLES t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (
|
||||
Host varchar(16) binary NOT NULL default '',
|
||||
User varchar(16) binary NOT NULL default '',
|
||||
PRIMARY KEY (Host,User),
|
||||
KEY (Host)
|
||||
) ENGINE=MyISAM;
|
||||
ALTER TABLE t1 DISABLE KEYS;
|
||||
SHOW INDEX FROM t1;
|
||||
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
|
||||
t1 0 PRIMARY 1 Host A NULL NULL NULL BTREE
|
||||
t1 0 PRIMARY 2 User A 0 NULL NULL BTREE
|
||||
t1 1 Host 1 Host A NULL NULL NULL BTREE disabled
|
||||
LOCK TABLES t1 WRITE;
|
||||
INSERT INTO t1 VALUES ('localhost','root'),('localhost','');
|
||||
SHOW INDEX FROM t1;
|
||||
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
|
||||
t1 0 PRIMARY 1 Host A NULL NULL NULL BTREE
|
||||
t1 0 PRIMARY 2 User A 2 NULL NULL BTREE
|
||||
t1 1 Host 1 Host A NULL NULL NULL BTREE disabled
|
||||
ALTER TABLE t1 ENABLE KEYS;
|
||||
SHOW INDEX FROM t1;
|
||||
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
|
||||
t1 0 PRIMARY 1 Host A NULL NULL NULL BTREE
|
||||
t1 0 PRIMARY 2 User A 2 NULL NULL BTREE
|
||||
t1 1 Host 1 Host A 1 NULL NULL BTREE
|
||||
UNLOCK TABLES;
|
||||
CHECK TABLES t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
LOCK TABLES t1 WRITE;
|
||||
ALTER TABLE t1 RENAME t2;
|
||||
UNLOCK TABLES;
|
||||
select * from t2;
|
||||
Host User
|
||||
localhost
|
||||
localhost root
|
||||
DROP TABLE t2;
|
||||
CREATE TABLE t1 (
|
||||
Host varchar(16) binary NOT NULL default '',
|
||||
User varchar(16) binary NOT NULL default '',
|
||||
PRIMARY KEY (Host,User),
|
||||
KEY (Host)
|
||||
) ENGINE=MyISAM;
|
||||
LOCK TABLES t1 WRITE;
|
||||
ALTER TABLE t1 DISABLE KEYS;
|
||||
SHOW INDEX FROM t1;
|
||||
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
|
||||
t1 0 PRIMARY 1 Host A NULL NULL NULL BTREE
|
||||
t1 0 PRIMARY 2 User A 0 NULL NULL BTREE
|
||||
t1 1 Host 1 Host A NULL NULL NULL BTREE disabled
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a int PRIMARY KEY, b INT UNIQUE);
|
||||
ALTER TABLE t1 DROP PRIMARY KEY;
|
||||
SHOW CREATE TABLE t1;
|
||||
@ -469,12 +514,6 @@ alter table t1 drop key no_such_key;
|
||||
ERROR 42000: Can't DROP 'no_such_key'; check that column/key exists
|
||||
alter table t1 drop key a;
|
||||
drop table t1;
|
||||
create table t1 (a int);
|
||||
alter table t1 rename to `t1\\`;
|
||||
ERROR 42000: Incorrect table name 't1\\'
|
||||
rename table t1 to `t1\\`;
|
||||
ERROR 42000: Incorrect table name 't1\\'
|
||||
drop table t1;
|
||||
create table t1 (a text) character set koi8r;
|
||||
insert into t1 values (_koi8r'<27><><EFBFBD><EFBFBD>');
|
||||
select hex(a) from t1;
|
||||
|
@ -341,3 +341,17 @@ a b
|
||||
2 3
|
||||
3 4
|
||||
drop table t1;
|
||||
CREATE TABLE t1 ( a INT AUTO_INCREMENT, b BLOB, PRIMARY KEY (a,b(10)));
|
||||
INSERT INTO t1 (b) VALUES ('aaaa');
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
INSERT INTO t1 (b) VALUES ('');
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
INSERT INTO t1 (b) VALUES ('bbbb');
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
DROP TABLE IF EXISTS t1;
|
||||
|
@ -1,5 +1,6 @@
|
||||
drop table if exists test.t1,mysqltest.t1,mysqltest.t2;
|
||||
drop database if exists mysqltest;
|
||||
set GLOBAL query_cache_size=1355776;
|
||||
reset query cache;
|
||||
flush status;
|
||||
show grants for current_user;
|
||||
@ -206,3 +207,4 @@ delete from mysql.columns_priv where user in ("mysqltest_1","mysqltest_2","mysql
|
||||
flush privileges;
|
||||
drop table test.t1,mysqltest.t1,mysqltest.t2;
|
||||
drop database mysqltest;
|
||||
set GLOBAL query_cache_size=default;
|
||||
|
3
mysql-test/r/have_outfile.require
Normal file
3
mysql-test/r/have_outfile.require
Normal file
@ -0,0 +1,3 @@
|
||||
load_file(concat(@tmpdir,"/outfile.test"))
|
||||
Outfile OK
|
||||
|
@ -1643,3 +1643,7 @@ select distinct concat(a, b) from t1;
|
||||
concat(a, b)
|
||||
11113333
|
||||
drop table t1;
|
||||
CREATE TABLE t1 ( a char(10) ) ENGINE=InnoDB;
|
||||
SELECT a FROM t1 WHERE MATCH (a) AGAINST ('test' IN BOOLEAN MODE);
|
||||
ERROR HY000: The used table type doesn't support FULLTEXT indexes
|
||||
DROP TABLE t1;
|
||||
|
@ -167,7 +167,7 @@ a b c VALUES(a)
|
||||
2 1 11 NULL
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
create table t1 (a int not null unique);
|
||||
create table t1 (a int not null unique) engine=myisam;
|
||||
insert into t1 values (1),(2);
|
||||
insert ignore into t1 select 1 on duplicate key update a=2;
|
||||
select * from t1;
|
||||
@ -179,4 +179,11 @@ select * from t1;
|
||||
a
|
||||
1
|
||||
3
|
||||
insert into t1 select 1 on duplicate key update a=2;
|
||||
select * from t1;
|
||||
a
|
||||
2
|
||||
3
|
||||
insert into t1 select a from t1 on duplicate key update a=a+1 ;
|
||||
ERROR 23000: Duplicate entry '3' for key 1
|
||||
drop table t1;
|
||||
|
@ -47,3 +47,13 @@ unlock tables;
|
||||
lock tables t1 write, t1 as t1_alias read;
|
||||
insert into t1 select index1,nr from t1 as t1_alias;
|
||||
drop table t1,t2;
|
||||
create table t1 ( a int(11) not null auto_increment, primary key(a));
|
||||
create table t2 ( a int(11) not null auto_increment, primary key(a));
|
||||
lock tables t1 write, t2 read;
|
||||
delete from t1 using t1,t2 where t1.a=t2.a;
|
||||
delete t1 from t1,t2 where t1.a=t2.a;
|
||||
delete from t2 using t1,t2 where t1.a=t2.a;
|
||||
ERROR HY000: Table 't2' was locked with a READ lock and can't be updated
|
||||
delete t2 from t1,t2 where t1.a=t2.a;
|
||||
ERROR HY000: Table 't2' was locked with a READ lock and can't be updated
|
||||
drop table t1,t2;
|
||||
|
@ -83,3 +83,9 @@ create table t2 like T1;
|
||||
drop table t1, t2;
|
||||
show tables;
|
||||
Tables_in_test
|
||||
use lpt1;
|
||||
ERROR 42000: Unknown database 'lpt1'
|
||||
use com1;
|
||||
ERROR 42000: Unknown database 'com1'
|
||||
use prn;
|
||||
ERROR 42000: Unknown database 'prn'
|
||||
|
@ -681,3 +681,13 @@ t3 1 a 1 a A NULL NULL NULL YES BTREE
|
||||
t3 1 a 2 b A NULL NULL NULL YES BTREE
|
||||
t3 1 a 3 c A NULL NULL NULL YES BTREE
|
||||
drop table t1, t2, t3;
|
||||
CREATE TABLE t1 ( a INT AUTO_INCREMENT PRIMARY KEY, b VARCHAR(10), UNIQUE (b) )
|
||||
ENGINE=MyISAM;
|
||||
CREATE TABLE t2 ( a INT AUTO_INCREMENT, b VARCHAR(10), INDEX (a), INDEX (b) )
|
||||
ENGINE=MERGE UNION (t1) INSERT_METHOD=FIRST;
|
||||
INSERT INTO t2 (b) VALUES (1) ON DUPLICATE KEY UPDATE b=2;
|
||||
INSERT INTO t2 (b) VALUES (1) ON DUPLICATE KEY UPDATE b=3;
|
||||
SELECT b FROM t2;
|
||||
b
|
||||
3
|
||||
DROP TABLE t1, t2;
|
||||
|
@ -581,3 +581,17 @@ check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
drop table t1;
|
||||
create table t1 (a int, key(a));
|
||||
insert into t1 values (1),(2),(3),(4),(NULL),(NULL),(NULL),(NULL);
|
||||
analyze table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze status OK
|
||||
show keys from t1;
|
||||
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
|
||||
t1 1 a 1 a A 8 NULL NULL YES BTREE
|
||||
alter table t1 disable keys;
|
||||
alter table t1 enable keys;
|
||||
show keys from t1;
|
||||
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
|
||||
t1 1 a 1 a A 8 NULL NULL YES BTREE
|
||||
drop table t1;
|
||||
|
File diff suppressed because one or more lines are too long
@ -405,3 +405,36 @@ a m
|
||||
2 2
|
||||
NULL 3
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a int(11));
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
SELECT a, SUM(a), SUM(a)+1 FROM (SELECT a FROM t1 UNION select 2) d
|
||||
GROUP BY a;
|
||||
a SUM(a) SUM(a)+1
|
||||
1 1 2
|
||||
2 2 3
|
||||
SELECT a, SUM(a), SUM(a)+1 FROM (SELECT a FROM t1 UNION select 2) d
|
||||
GROUP BY a WITH ROLLUP;
|
||||
a SUM(a) SUM(a)+1
|
||||
1 1 2
|
||||
2 2 3
|
||||
NULL 3 4
|
||||
SELECT a, SUM(a), SUM(a)+1 FROM (SELECT 1 a UNION select 2) d
|
||||
GROUP BY a;
|
||||
a SUM(a) SUM(a)+1
|
||||
1 1 2
|
||||
2 2 3
|
||||
SELECT a, SUM(a), SUM(a)+1 FROM (SELECT 1 a UNION select 2) d
|
||||
GROUP BY a WITH ROLLUP;
|
||||
a SUM(a) SUM(a)+1
|
||||
1 1 2
|
||||
2 2 3
|
||||
NULL 3 4
|
||||
SELECT a, SUM(a), SUM(a)+1, CONCAT(SUM(a),'x'), SUM(a)+SUM(a), SUM(a)
|
||||
FROM (SELECT 1 a, 2 b UNION SELECT 2,3 UNION SELECT 5,6 ) d
|
||||
GROUP BY a WITH ROLLUP;
|
||||
a SUM(a) SUM(a)+1 CONCAT(SUM(a),'x') SUM(a)+SUM(a) SUM(a)
|
||||
1 1 2 1x 2 1
|
||||
2 2 3 2x 4 2
|
||||
5 5 6 5x 10 5
|
||||
NULL 8 9 8x 16 8
|
||||
DROP TABLE t1;
|
||||
|
Binary file not shown.
@ -1,7 +1,3 @@
|
||||
prepare stmt4 from ' show full processlist ';
|
||||
execute stmt4;
|
||||
Id User Host db Command Time State Info
|
||||
number root localhost test Query time NULL show full processlist
|
||||
test_sequence
|
||||
------ grant/revoke/drop affects a parallel session test ------
|
||||
show grants for second_user@localhost ;
|
||||
@ -79,3 +75,7 @@ commit ;
|
||||
show grants for second_user@localhost ;
|
||||
ERROR 42000: There is no such grant defined for user 'second_user' on host 'localhost'
|
||||
drop database mysqltest;
|
||||
prepare stmt4 from ' show full processlist ';
|
||||
execute stmt4;
|
||||
Id User Host db Command Time State Info
|
||||
number root localhost test Query time NULL show full processlist
|
||||
|
2
mysql-test/r/reserved_win_names.require
Normal file
2
mysql-test/r/reserved_win_names.require
Normal file
@ -0,0 +1,2 @@
|
||||
Variable_name Value
|
||||
lower_case_table_names 1
|
7
mysql-test/r/reserved_win_names.result
Normal file
7
mysql-test/r/reserved_win_names.result
Normal file
@ -0,0 +1,7 @@
|
||||
use COM1;
|
||||
ERROR 42000: Unknown database 'com1'
|
||||
use LPT1;
|
||||
ERROR 42000: Unknown database 'lpt1'
|
||||
use PRN;
|
||||
ERROR 42000: Unknown database 'prn'
|
||||
|
@ -67,14 +67,14 @@ master-bin.000002 110 Query 1 110 use `test`; create table t1 (n int)
|
||||
master-bin.000002 168 Query 1 168 use `test`; insert into t1 values (1)
|
||||
master-bin.000002 228 Query 1 228 use `test`; drop table t1
|
||||
show binary logs;
|
||||
Log_name
|
||||
master-bin.000001
|
||||
master-bin.000002
|
||||
Log_name File_size
|
||||
master-bin.000001 0
|
||||
master-bin.000002 276
|
||||
start slave;
|
||||
show binary logs;
|
||||
Log_name
|
||||
slave-bin.000001
|
||||
slave-bin.000002
|
||||
Log_name File_size
|
||||
slave-bin.000001 0
|
||||
slave-bin.000002 170
|
||||
show binlog events in 'slave-bin.000001' from 4;
|
||||
Log_name Pos Event_type Server_id Orig_log_pos Info
|
||||
slave-bin.000001 4 Start 2 4 Server ver: VERSION, Binlog ver: 3
|
||||
|
@ -26,10 +26,10 @@ create table t2(m int not null auto_increment primary key);
|
||||
insert into t2 values (34),(67),(123);
|
||||
flush logs;
|
||||
show binary logs;
|
||||
Log_name
|
||||
master-bin.000001
|
||||
master-bin.000002
|
||||
master-bin.000003
|
||||
Log_name File_size
|
||||
master-bin.000001 0
|
||||
master-bin.000002 0
|
||||
master-bin.000003 4
|
||||
create table t3 select * from temp_table;
|
||||
select * from t3;
|
||||
a
|
||||
@ -42,18 +42,18 @@ set global sql_slave_skip_counter=1;
|
||||
start slave;
|
||||
purge master logs to 'master-bin.000002';
|
||||
show master logs;
|
||||
Log_name
|
||||
master-bin.000002
|
||||
master-bin.000003
|
||||
Log_name File_size
|
||||
master-bin.000002 0
|
||||
master-bin.000003 229
|
||||
purge binary logs to 'master-bin.000002';
|
||||
show binary logs;
|
||||
Log_name
|
||||
master-bin.000002
|
||||
master-bin.000003
|
||||
Log_name File_size
|
||||
master-bin.000002 0
|
||||
master-bin.000003 229
|
||||
purge master logs before now();
|
||||
show binary logs;
|
||||
Log_name
|
||||
master-bin.000003
|
||||
Log_name File_size
|
||||
master-bin.000003 229
|
||||
insert into t2 values (65);
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||
@ -73,9 +73,9 @@ count(*)
|
||||
100
|
||||
create table t4 select * from temp_table;
|
||||
show binary logs;
|
||||
Log_name
|
||||
master-bin.000003
|
||||
master-bin.000004
|
||||
Log_name File_size
|
||||
master-bin.000003 0
|
||||
master-bin.000004 2886
|
||||
show master status;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
master-bin.000004 2886
|
||||
|
@ -2451,7 +2451,61 @@ a
|
||||
select distinct distinct * from t1;
|
||||
a
|
||||
select all distinct * from t1;
|
||||
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 'distinct * from t1' at line 1
|
||||
ERROR HY000: Incorrect usage of ALL and DISTINCT
|
||||
select distinct all * from t1;
|
||||
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 'all * from t1' at line 1
|
||||
ERROR HY000: Incorrect usage of ALL and DISTINCT
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (
|
||||
kunde_intern_id int(10) unsigned NOT NULL default '0',
|
||||
kunde_id int(10) unsigned NOT NULL default '0',
|
||||
FK_firma_id int(10) unsigned NOT NULL default '0',
|
||||
aktuell enum('Ja','Nein') NOT NULL default 'Ja',
|
||||
vorname varchar(128) NOT NULL default '',
|
||||
nachname varchar(128) NOT NULL default '',
|
||||
geloescht enum('Ja','Nein') NOT NULL default 'Nein',
|
||||
firma varchar(128) NOT NULL default ''
|
||||
);
|
||||
INSERT INTO t1 VALUES
|
||||
(3964,3051,1,'Ja','Vorname1','1Nachname','Nein','Print Schau XXXX'),
|
||||
(3965,3051111,1,'Ja','Vorname1111','1111Nachname','Nein','Print Schau XXXX');
|
||||
SELECT kunde_id ,FK_firma_id ,aktuell, vorname, nachname, geloescht FROM t1
|
||||
WHERE
|
||||
(
|
||||
(
|
||||
( '' != '' AND firma LIKE CONCAT('%', '', '%'))
|
||||
OR
|
||||
(vorname LIKE CONCAT('%', 'Vorname1', '%') AND
|
||||
nachname LIKE CONCAT('%', '1Nachname', '%') AND
|
||||
'Vorname1' != '' AND 'xxxx' != '')
|
||||
)
|
||||
AND
|
||||
(
|
||||
aktuell = 'Ja' AND geloescht = 'Nein' AND FK_firma_id = 2
|
||||
)
|
||||
)
|
||||
;
|
||||
kunde_id FK_firma_id aktuell vorname nachname geloescht
|
||||
SELECT kunde_id ,FK_firma_id ,aktuell, vorname, nachname,
|
||||
geloescht FROM t1
|
||||
WHERE
|
||||
(
|
||||
(
|
||||
aktuell = 'Ja' AND geloescht = 'Nein' AND FK_firma_id = 2
|
||||
)
|
||||
AND
|
||||
(
|
||||
( '' != '' AND firma LIKE CONCAT('%', '', '%') )
|
||||
OR
|
||||
( vorname LIKE CONCAT('%', 'Vorname1', '%') AND
|
||||
nachname LIKE CONCAT('%', '1Nachname', '%') AND 'Vorname1' != '' AND
|
||||
'xxxx' != '')
|
||||
)
|
||||
)
|
||||
;
|
||||
kunde_id FK_firma_id aktuell vorname nachname geloescht
|
||||
SELECT COUNT(*) FROM t1 WHERE
|
||||
( 0 OR (vorname LIKE '%Vorname1%' AND nachname LIKE '%1Nachname%' AND 1))
|
||||
AND FK_firma_id = 2;
|
||||
COUNT(*)
|
||||
0
|
||||
drop table t1;
|
||||
|
@ -2697,3 +2697,27 @@ select (1,2,3) = (select * from t1);
|
||||
ERROR 21000: Operand should contain 3 column(s)
|
||||
select (select * from t1) = (1,2,3);
|
||||
ERROR 21000: Operand should contain 2 column(s)
|
||||
drop table t1
|
||||
#;
|
||||
CREATE TABLE `t1` (
|
||||
`itemid` bigint(20) unsigned NOT NULL auto_increment,
|
||||
`sessionid` bigint(20) unsigned default NULL,
|
||||
`time` int(10) unsigned NOT NULL default '0',
|
||||
`type` set('A','D','E','F','G','I','L','N','U') collate latin1_general_ci NOT
|
||||
NULL default '',
|
||||
`data` text collate latin1_general_ci NOT NULL,
|
||||
PRIMARY KEY (`itemid`)
|
||||
) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
|
||||
INSERT INTO `t1` VALUES (1, 1, 1, 'D', '');
|
||||
CREATE TABLE `t2` (
|
||||
`sessionid` bigint(20) unsigned NOT NULL auto_increment,
|
||||
`pid` int(10) unsigned NOT NULL default '0',
|
||||
`date` int(10) unsigned NOT NULL default '0',
|
||||
`ip` varchar(15) collate latin1_general_ci NOT NULL default '',
|
||||
PRIMARY KEY (`sessionid`)
|
||||
) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
|
||||
INSERT INTO `t2` VALUES (1, 1, 1, '10.10.10.1');
|
||||
SELECT s.ip, count( e.itemid ) FROM `t1` e JOIN t2 s ON s.sessionid = e.sessionid WHERE e.sessionid = ( SELECT sessionid FROM t2 ORDER BY sessionid DESC LIMIT 1 ) GROUP BY s.ip HAVING count( e.itemid ) >0 LIMIT 0 , 30;
|
||||
ip count( e.itemid )
|
||||
10.10.10.1 1
|
||||
drop tables t1,t2;
|
||||
|
10
mysql-test/suppress.purify
Normal file
10
mysql-test/suppress.purify
Normal file
@ -0,0 +1,10 @@
|
||||
suppress UMR rw_read_held; mi_open; ha_myisam::open64; handler::ha_open; openfrm
|
||||
suppress UMR my_end; main
|
||||
suppress UMR _doprnt; fprintf; my_end; main
|
||||
suppress umr rw_read_held; mi_open
|
||||
suppress umr _putmsg; putmsg; _tx_sndudata
|
||||
suppress umr rw_read_held; Query_cache::store_query(THD*,st_table_list*); mysql_execute_command(THD*)
|
||||
suppress sig ...; _select; select; handle_connections_sockets; main; _start
|
||||
suppress sig ...; read; vio_read; my_real_read(st_net*,unsigned long*); my_net_read; do_command(THD*)
|
||||
suppress sig ...; read; vio_read; my_real_read(st_net*,unsigned long*); my_net_read; net_safe_read
|
||||
suppress sig ...; write; vio_write; net_real_write; net_write_buff(st_net*,const char*,unsigned long); my_net_write
|
@ -165,56 +165,6 @@ INSERT DELAYED INTO t1 VALUES(1),(2),(3);
|
||||
ALTER TABLE t1 ENABLE KEYS;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Test that data get converted when character set is changed
|
||||
# Test that data doesn't get converted when src or dst is BINARY/BLOB
|
||||
#
|
||||
set names koi8r;
|
||||
create table t1 (a char(10) character set koi8r);
|
||||
insert into t1 values ('<27><><EFBFBD><EFBFBD>');
|
||||
select a,hex(a) from t1;
|
||||
alter table t1 change a a char(10) character set cp1251;
|
||||
select a,hex(a) from t1;
|
||||
alter table t1 change a a binary(10);
|
||||
select a,hex(a) from t1;
|
||||
alter table t1 change a a char(10) character set cp1251;
|
||||
select a,hex(a) from t1;
|
||||
alter table t1 change a a char(10) character set koi8r;
|
||||
select a,hex(a) from t1;
|
||||
alter table t1 change a a varchar(10) character set cp1251;
|
||||
select a,hex(a) from t1;
|
||||
alter table t1 change a a char(10) character set koi8r;
|
||||
select a,hex(a) from t1;
|
||||
alter table t1 change a a text character set cp1251;
|
||||
select a,hex(a) from t1;
|
||||
alter table t1 change a a char(10) character set koi8r;
|
||||
select a,hex(a) from t1;
|
||||
delete from t1;
|
||||
|
||||
#
|
||||
# Test ALTER TABLE .. CHARACTER SET ..
|
||||
#
|
||||
show create table t1;
|
||||
alter table t1 DEFAULT CHARACTER SET latin1;
|
||||
show create table t1;
|
||||
alter table t1 CONVERT TO CHARACTER SET latin1;
|
||||
show create table t1;
|
||||
alter table t1 DEFAULT CHARACTER SET cp1251;
|
||||
show create table t1;
|
||||
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug#2821
|
||||
# Test that table CHARACTER SET does not affect blobs
|
||||
#
|
||||
create table t1 (myblob longblob,mytext longtext)
|
||||
default charset latin1 collate latin1_general_cs;
|
||||
show create table t1;
|
||||
alter table t1 character set latin2;
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Test ALTER TABLE ENABLE/DISABLE keys when things are locked
|
||||
#
|
||||
@ -277,6 +227,97 @@ ALTER TABLE t1 DISABLE KEYS;
|
||||
SHOW INDEX FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# BUG#4717 - check for valid table names
|
||||
#
|
||||
create table t1 (a int);
|
||||
--error 1103
|
||||
alter table t1 rename to `t1\\`;
|
||||
--error 1103
|
||||
rename table t1 to `t1\\`;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# BUG#6236 - ALTER TABLE MODIFY should set implicit NOT NULL on PK columns
|
||||
#
|
||||
drop table if exists t1, t2;
|
||||
create table t1 ( a varchar(10) not null primary key ) engine=myisam;
|
||||
create table t2 ( a varchar(10) not null primary key ) engine=merge union=(t1);
|
||||
flush tables;
|
||||
alter table t1 modify a varchar(10);
|
||||
show create table t2;
|
||||
flush tables;
|
||||
alter table t1 modify a varchar(10) not null;
|
||||
show create table t2;
|
||||
drop table if exists t1, t2;
|
||||
|
||||
# The following is also part of bug #6236 (CREATE TABLE didn't properly count
|
||||
# not null columns for primary keys)
|
||||
|
||||
create table t1 (a int, b int, c int, d int, e int, f int, g int, h int,i int, primary key (a,b,c,d,e,f,g,i,h)) engine=MyISAM;
|
||||
insert into t1 (a) values(1);
|
||||
--replace_column 7 X 8 X 9 X 10 X 11 X 12 X 13 X 14 X
|
||||
show table status like 't1';
|
||||
alter table t1 modify a int;
|
||||
--replace_column 7 X 8 X 9 X 10 X 11 X 12 X 13 X 14 X
|
||||
show table status like 't1';
|
||||
drop table t1;
|
||||
create table t1 (a int not null, b int not null, c int not null, d int not null, e int not null, f int not null, g int not null, h int not null,i int not null, primary key (a,b,c,d,e,f,g,i,h)) engine=MyISAM;
|
||||
insert into t1 (a) values(1);
|
||||
--replace_column 7 X 8 X 9 X 10 X 11 X 12 X 13 X 14 X
|
||||
show table status like 't1';
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Test that data get converted when character set is changed
|
||||
# Test that data doesn't get converted when src or dst is BINARY/BLOB
|
||||
#
|
||||
set names koi8r;
|
||||
create table t1 (a char(10) character set koi8r);
|
||||
insert into t1 values ('<27><><EFBFBD><EFBFBD>');
|
||||
select a,hex(a) from t1;
|
||||
alter table t1 change a a char(10) character set cp1251;
|
||||
select a,hex(a) from t1;
|
||||
alter table t1 change a a binary(10);
|
||||
select a,hex(a) from t1;
|
||||
alter table t1 change a a char(10) character set cp1251;
|
||||
select a,hex(a) from t1;
|
||||
alter table t1 change a a char(10) character set koi8r;
|
||||
select a,hex(a) from t1;
|
||||
alter table t1 change a a varchar(10) character set cp1251;
|
||||
select a,hex(a) from t1;
|
||||
alter table t1 change a a char(10) character set koi8r;
|
||||
select a,hex(a) from t1;
|
||||
alter table t1 change a a text character set cp1251;
|
||||
select a,hex(a) from t1;
|
||||
alter table t1 change a a char(10) character set koi8r;
|
||||
select a,hex(a) from t1;
|
||||
delete from t1;
|
||||
|
||||
#
|
||||
# Test ALTER TABLE .. CHARACTER SET ..
|
||||
#
|
||||
show create table t1;
|
||||
alter table t1 DEFAULT CHARACTER SET latin1;
|
||||
show create table t1;
|
||||
alter table t1 CONVERT TO CHARACTER SET latin1;
|
||||
show create table t1;
|
||||
alter table t1 DEFAULT CHARACTER SET cp1251;
|
||||
show create table t1;
|
||||
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug#2821
|
||||
# Test that table CHARACTER SET does not affect blobs
|
||||
#
|
||||
create table t1 (myblob longblob,mytext longtext)
|
||||
default charset latin1 collate latin1_general_cs;
|
||||
show create table t1;
|
||||
alter table t1 character set latin2;
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug 2361 (Don't drop UNIQUE with DROP PRIMARY KEY)
|
||||
#
|
||||
@ -296,16 +337,6 @@ alter table t1 drop key no_such_key;
|
||||
alter table t1 drop key a;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# BUG#4717 - check for valid table names
|
||||
#
|
||||
create table t1 (a int);
|
||||
--error 1103
|
||||
alter table t1 rename to `t1\\`;
|
||||
--error 1103
|
||||
rename table t1 to `t1\\`;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug #6479 ALTER TABLE ... changing charset fails for TEXT columns
|
||||
#
|
||||
|
@ -206,3 +206,15 @@ alter table t1 modify b varchar(255);
|
||||
insert into t1 values (0,4);
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# BUG #10045: Problem with composite AUTO_INCREMENT + BLOB key
|
||||
|
||||
CREATE TABLE t1 ( a INT AUTO_INCREMENT, b BLOB, PRIMARY KEY (a,b(10)));
|
||||
INSERT INTO t1 (b) VALUES ('aaaa');
|
||||
CHECK TABLE t1;
|
||||
INSERT INTO t1 (b) VALUES ('');
|
||||
CHECK TABLE t1;
|
||||
INSERT INTO t1 (b) VALUES ('bbbb');
|
||||
CHECK TABLE t1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
|
@ -1 +0,0 @@
|
||||
--set-variable=query_cache_size=1355776
|
@ -10,6 +10,8 @@ drop table if exists test.t1,mysqltest.t1,mysqltest.t2;
|
||||
drop database if exists mysqltest;
|
||||
--enable_warnings
|
||||
|
||||
set GLOBAL query_cache_size=1355776;
|
||||
|
||||
reset query cache;
|
||||
flush status;
|
||||
connect (root,localhost,root,,test,$MASTER_MYPORT,master.sock);
|
||||
@ -145,3 +147,5 @@ delete from mysql.columns_priv where user in ("mysqltest_1","mysqltest_2","mysql
|
||||
flush privileges;
|
||||
drop table test.t1,mysqltest.t1,mysqltest.t2;
|
||||
drop database mysqltest;
|
||||
|
||||
set GLOBAL query_cache_size=default;
|
||||
|
@ -1177,3 +1177,13 @@ create table t1(a int(1) , b int(1)) engine=innodb;
|
||||
insert into t1 values ('1111', '3333');
|
||||
select distinct concat(a, b) from t1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# BUG#7709 test case - Boolean fulltext query against unsupported
|
||||
# engines does not fail
|
||||
#
|
||||
|
||||
CREATE TABLE t1 ( a char(10) ) ENGINE=InnoDB;
|
||||
--error 1214;
|
||||
SELECT a FROM t1 WHERE MATCH (a) AGAINST ('test' IN BOOLEAN MODE);
|
||||
DROP TABLE t1;
|
||||
|
@ -85,10 +85,14 @@ DROP TABLE t2;
|
||||
# Bug#9725 - "disapearing query/hang" and "unknown error" with "on duplicate key update"
|
||||
# INSERT INGORE...UPDATE gives bad error or breaks protocol.
|
||||
#
|
||||
create table t1 (a int not null unique);
|
||||
create table t1 (a int not null unique) engine=myisam;
|
||||
insert into t1 values (1),(2);
|
||||
insert ignore into t1 select 1 on duplicate key update a=2;
|
||||
select * from t1;
|
||||
insert ignore into t1 select a from t1 on duplicate key update a=a+1 ;
|
||||
select * from t1;
|
||||
insert into t1 select 1 on duplicate key update a=2;
|
||||
select * from t1;
|
||||
--error 1062
|
||||
insert into t1 select a from t1 on duplicate key update a=a+1 ;
|
||||
drop table t1;
|
||||
|
@ -59,3 +59,17 @@ unlock tables;
|
||||
lock tables t1 write, t1 as t1_alias read;
|
||||
insert into t1 select index1,nr from t1 as t1_alias;
|
||||
drop table t1,t2;
|
||||
|
||||
#
|
||||
# Bug7241 - Invalid response when DELETE .. USING and LOCK TABLES used.
|
||||
#
|
||||
create table t1 ( a int(11) not null auto_increment, primary key(a));
|
||||
create table t2 ( a int(11) not null auto_increment, primary key(a));
|
||||
lock tables t1 write, t2 read;
|
||||
delete from t1 using t1,t2 where t1.a=t2.a;
|
||||
delete t1 from t1,t2 where t1.a=t2.a;
|
||||
--error 1099
|
||||
delete from t2 using t1,t2 where t1.a=t2.a;
|
||||
--error 1099
|
||||
delete t2 from t1,t2 where t1.a=t2.a;
|
||||
drop table t1,t2;
|
||||
|
@ -82,3 +82,14 @@ create table t2 like T1;
|
||||
drop table t1, t2;
|
||||
|
||||
show tables;
|
||||
|
||||
#
|
||||
#Bug 9148: Denial of service
|
||||
#
|
||||
--error 1049
|
||||
use lpt1;
|
||||
--error 1049
|
||||
use com1;
|
||||
--error 1049
|
||||
use prn;
|
||||
|
||||
|
@ -306,3 +306,15 @@ show index from t3;
|
||||
|
||||
drop table t1, t2, t3;
|
||||
|
||||
#
|
||||
# Bug#10400 - Improperly-defined MERGE table crashes with INSERT ... ON DUPLICATE KEY UPDATE
|
||||
#
|
||||
CREATE TABLE t1 ( a INT AUTO_INCREMENT PRIMARY KEY, b VARCHAR(10), UNIQUE (b) )
|
||||
ENGINE=MyISAM;
|
||||
CREATE TABLE t2 ( a INT AUTO_INCREMENT, b VARCHAR(10), INDEX (a), INDEX (b) )
|
||||
ENGINE=MERGE UNION (t1) INSERT_METHOD=FIRST;
|
||||
INSERT INTO t2 (b) VALUES (1) ON DUPLICATE KEY UPDATE b=2;
|
||||
INSERT INTO t2 (b) VALUES (1) ON DUPLICATE KEY UPDATE b=3;
|
||||
SELECT b FROM t2;
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
|
@ -560,3 +560,18 @@ update t1 set c2='A B' where c1=2;
|
||||
check table t1;
|
||||
drop table t1;
|
||||
|
||||
|
||||
# BUG#9622 - ANALYZE TABLE and ALTER TABLE .. ENABLE INDEX produce
|
||||
# different statistics on the same table with NULL values.
|
||||
create table t1 (a int, key(a));
|
||||
|
||||
insert into t1 values (1),(2),(3),(4),(NULL),(NULL),(NULL),(NULL);
|
||||
analyze table t1;
|
||||
show keys from t1;
|
||||
|
||||
alter table t1 disable keys;
|
||||
alter table t1 enable keys;
|
||||
show keys from t1;
|
||||
|
||||
drop table t1;
|
||||
|
||||
|
@ -195,3 +195,342 @@ INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"),
|
||||
--exec $MYSQL_DUMP --insert-ignore --skip-comments test t1
|
||||
--exec $MYSQL_DUMP --insert-ignore --skip-comments --delayed-insert test t1
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug #10286: mysqldump -c crashes on table that has many fields with long
|
||||
# names
|
||||
#
|
||||
create table t1 (
|
||||
F_c4ca4238a0b923820dcc509a6f75849b int,
|
||||
F_c81e728d9d4c2f636f067f89cc14862c int,
|
||||
F_eccbc87e4b5ce2fe28308fd9f2a7baf3 int,
|
||||
F_a87ff679a2f3e71d9181a67b7542122c int,
|
||||
F_e4da3b7fbbce2345d7772b0674a318d5 int,
|
||||
F_1679091c5a880faf6fb5e6087eb1b2dc int,
|
||||
F_8f14e45fceea167a5a36dedd4bea2543 int,
|
||||
F_c9f0f895fb98ab9159f51fd0297e236d int,
|
||||
F_45c48cce2e2d7fbdea1afc51c7c6ad26 int,
|
||||
F_d3d9446802a44259755d38e6d163e820 int,
|
||||
F_6512bd43d9caa6e02c990b0a82652dca int,
|
||||
F_c20ad4d76fe97759aa27a0c99bff6710 int,
|
||||
F_c51ce410c124a10e0db5e4b97fc2af39 int,
|
||||
F_aab3238922bcc25a6f606eb525ffdc56 int,
|
||||
F_9bf31c7ff062936a96d3c8bd1f8f2ff3 int,
|
||||
F_c74d97b01eae257e44aa9d5bade97baf int,
|
||||
F_70efdf2ec9b086079795c442636b55fb int,
|
||||
F_6f4922f45568161a8cdf4ad2299f6d23 int,
|
||||
F_1f0e3dad99908345f7439f8ffabdffc4 int,
|
||||
F_98f13708210194c475687be6106a3b84 int,
|
||||
F_3c59dc048e8850243be8079a5c74d079 int,
|
||||
F_b6d767d2f8ed5d21a44b0e5886680cb9 int,
|
||||
F_37693cfc748049e45d87b8c7d8b9aacd int,
|
||||
F_1ff1de774005f8da13f42943881c655f int,
|
||||
F_8e296a067a37563370ded05f5a3bf3ec int,
|
||||
F_4e732ced3463d06de0ca9a15b6153677 int,
|
||||
F_02e74f10e0327ad868d138f2b4fdd6f0 int,
|
||||
F_33e75ff09dd601bbe69f351039152189 int,
|
||||
F_6ea9ab1baa0efb9e19094440c317e21b int,
|
||||
F_34173cb38f07f89ddbebc2ac9128303f int,
|
||||
F_c16a5320fa475530d9583c34fd356ef5 int,
|
||||
F_6364d3f0f495b6ab9dcf8d3b5c6e0b01 int,
|
||||
F_182be0c5cdcd5072bb1864cdee4d3d6e int,
|
||||
F_e369853df766fa44e1ed0ff613f563bd int,
|
||||
F_1c383cd30b7c298ab50293adfecb7b18 int,
|
||||
F_19ca14e7ea6328a42e0eb13d585e4c22 int,
|
||||
F_a5bfc9e07964f8dddeb95fc584cd965d int,
|
||||
F_a5771bce93e200c36f7cd9dfd0e5deaa int,
|
||||
F_d67d8ab4f4c10bf22aa353e27879133c int,
|
||||
F_d645920e395fedad7bbbed0eca3fe2e0 int,
|
||||
F_3416a75f4cea9109507cacd8e2f2aefc int,
|
||||
F_a1d0c6e83f027327d8461063f4ac58a6 int,
|
||||
F_17e62166fc8586dfa4d1bc0e1742c08b int,
|
||||
F_f7177163c833dff4b38fc8d2872f1ec6 int,
|
||||
F_6c8349cc7260ae62e3b1396831a8398f int,
|
||||
F_d9d4f495e875a2e075a1a4a6e1b9770f int,
|
||||
F_67c6a1e7ce56d3d6fa748ab6d9af3fd7 int,
|
||||
F_642e92efb79421734881b53e1e1b18b6 int,
|
||||
F_f457c545a9ded88f18ecee47145a72c0 int,
|
||||
F_c0c7c76d30bd3dcaefc96f40275bdc0a int,
|
||||
F_2838023a778dfaecdc212708f721b788 int,
|
||||
F_9a1158154dfa42caddbd0694a4e9bdc8 int,
|
||||
F_d82c8d1619ad8176d665453cfb2e55f0 int,
|
||||
F_a684eceee76fc522773286a895bc8436 int,
|
||||
F_b53b3a3d6ab90ce0268229151c9bde11 int,
|
||||
F_9f61408e3afb633e50cdf1b20de6f466 int,
|
||||
F_72b32a1f754ba1c09b3695e0cb6cde7f int,
|
||||
F_66f041e16a60928b05a7e228a89c3799 int,
|
||||
F_093f65e080a295f8076b1c5722a46aa2 int,
|
||||
F_072b030ba126b2f4b2374f342be9ed44 int,
|
||||
F_7f39f8317fbdb1988ef4c628eba02591 int,
|
||||
F_44f683a84163b3523afe57c2e008bc8c int,
|
||||
F_03afdbd66e7929b125f8597834fa83a4 int,
|
||||
F_ea5d2f1c4608232e07d3aa3d998e5135 int,
|
||||
F_fc490ca45c00b1249bbe3554a4fdf6fb int,
|
||||
F_3295c76acbf4caaed33c36b1b5fc2cb1 int,
|
||||
F_735b90b4568125ed6c3f678819b6e058 int,
|
||||
F_a3f390d88e4c41f2747bfa2f1b5f87db int,
|
||||
F_14bfa6bb14875e45bba028a21ed38046 int,
|
||||
F_7cbbc409ec990f19c78c75bd1e06f215 int,
|
||||
F_e2c420d928d4bf8ce0ff2ec19b371514 int,
|
||||
F_32bb90e8976aab5298d5da10fe66f21d int,
|
||||
F_d2ddea18f00665ce8623e36bd4e3c7c5 int,
|
||||
F_ad61ab143223efbc24c7d2583be69251 int,
|
||||
F_d09bf41544a3365a46c9077ebb5e35c3 int,
|
||||
F_fbd7939d674997cdb4692d34de8633c4 int,
|
||||
F_28dd2c7955ce926456240b2ff0100bde int,
|
||||
F_35f4a8d465e6e1edc05f3d8ab658c551 int,
|
||||
F_d1fe173d08e959397adf34b1d77e88d7 int,
|
||||
F_f033ab37c30201f73f142449d037028d int,
|
||||
F_43ec517d68b6edd3015b3edc9a11367b int,
|
||||
F_9778d5d219c5080b9a6a17bef029331c int,
|
||||
F_fe9fc289c3ff0af142b6d3bead98a923 int,
|
||||
F_68d30a9594728bc39aa24be94b319d21 int,
|
||||
F_3ef815416f775098fe977004015c6193 int,
|
||||
F_93db85ed909c13838ff95ccfa94cebd9 int,
|
||||
F_c7e1249ffc03eb9ded908c236bd1996d int,
|
||||
F_2a38a4a9316c49e5a833517c45d31070 int,
|
||||
F_7647966b7343c29048673252e490f736 int,
|
||||
F_8613985ec49eb8f757ae6439e879bb2a int,
|
||||
F_54229abfcfa5649e7003b83dd4755294 int,
|
||||
F_92cc227532d17e56e07902b254dfad10 int,
|
||||
F_98dce83da57b0395e163467c9dae521b int,
|
||||
F_f4b9ec30ad9f68f89b29639786cb62ef int,
|
||||
F_812b4ba287f5ee0bc9d43bbf5bbe87fb int,
|
||||
F_26657d5ff9020d2abefe558796b99584 int,
|
||||
F_e2ef524fbf3d9fe611d5a8e90fefdc9c int,
|
||||
F_ed3d2c21991e3bef5e069713af9fa6ca int,
|
||||
F_ac627ab1ccbdb62ec96e702f07f6425b int,
|
||||
F_f899139df5e1059396431415e770c6dd int,
|
||||
F_38b3eff8baf56627478ec76a704e9b52 int,
|
||||
F_ec8956637a99787bd197eacd77acce5e int,
|
||||
F_6974ce5ac660610b44d9b9fed0ff9548 int,
|
||||
F_c9e1074f5b3f9fc8ea15d152add07294 int,
|
||||
F_65b9eea6e1cc6bb9f0cd2a47751a186f int,
|
||||
F_f0935e4cd5920aa6c7c996a5ee53a70f int,
|
||||
F_a97da629b098b75c294dffdc3e463904 int,
|
||||
F_a3c65c2974270fd093ee8a9bf8ae7d0b int,
|
||||
F_2723d092b63885e0d7c260cc007e8b9d int,
|
||||
F_5f93f983524def3dca464469d2cf9f3e int,
|
||||
F_698d51a19d8a121ce581499d7b701668 int,
|
||||
F_7f6ffaa6bb0b408017b62254211691b5 int,
|
||||
F_73278a4a86960eeb576a8fd4c9ec6997 int,
|
||||
F_5fd0b37cd7dbbb00f97ba6ce92bf5add int,
|
||||
F_2b44928ae11fb9384c4cf38708677c48 int,
|
||||
F_c45147dee729311ef5b5c3003946c48f int,
|
||||
F_eb160de1de89d9058fcb0b968dbbbd68 int,
|
||||
F_5ef059938ba799aaa845e1c2e8a762bd int,
|
||||
F_07e1cd7dca89a1678042477183b7ac3f int,
|
||||
F_da4fb5c6e93e74d3df8527599fa62642 int,
|
||||
F_4c56ff4ce4aaf9573aa5dff913df997a int,
|
||||
F_a0a080f42e6f13b3a2df133f073095dd int,
|
||||
F_202cb962ac59075b964b07152d234b70 int,
|
||||
F_c8ffe9a587b126f152ed3d89a146b445 int,
|
||||
F_3def184ad8f4755ff269862ea77393dd int,
|
||||
F_069059b7ef840f0c74a814ec9237b6ec int,
|
||||
F_ec5decca5ed3d6b8079e2e7e7bacc9f2 int,
|
||||
F_76dc611d6ebaafc66cc0879c71b5db5c int,
|
||||
F_d1f491a404d6854880943e5c3cd9ca25 int,
|
||||
F_9b8619251a19057cff70779273e95aa6 int,
|
||||
F_1afa34a7f984eeabdbb0a7d494132ee5 int,
|
||||
F_65ded5353c5ee48d0b7d48c591b8f430 int,
|
||||
F_9fc3d7152ba9336a670e36d0ed79bc43 int,
|
||||
F_02522a2b2726fb0a03bb19f2d8d9524d int,
|
||||
F_7f1de29e6da19d22b51c68001e7e0e54 int,
|
||||
F_42a0e188f5033bc65bf8d78622277c4e int,
|
||||
F_3988c7f88ebcb58c6ce932b957b6f332 int,
|
||||
F_013d407166ec4fa56eb1e1f8cbe183b9 int,
|
||||
F_e00da03b685a0dd18fb6a08af0923de0 int,
|
||||
F_1385974ed5904a438616ff7bdb3f7439 int,
|
||||
F_0f28b5d49b3020afeecd95b4009adf4c int,
|
||||
F_a8baa56554f96369ab93e4f3bb068c22 int,
|
||||
F_903ce9225fca3e988c2af215d4e544d3 int,
|
||||
F_0a09c8844ba8f0936c20bd791130d6b6 int,
|
||||
F_2b24d495052a8ce66358eb576b8912c8 int,
|
||||
F_a5e00132373a7031000fd987a3c9f87b int,
|
||||
F_8d5e957f297893487bd98fa830fa6413 int,
|
||||
F_47d1e990583c9c67424d369f3414728e int,
|
||||
F_f2217062e9a397a1dca429e7d70bc6ca int,
|
||||
F_7ef605fc8dba5425d6965fbd4c8fbe1f int,
|
||||
F_a8f15eda80c50adb0e71943adc8015cf int,
|
||||
F_37a749d808e46495a8da1e5352d03cae int,
|
||||
F_b3e3e393c77e35a4a3f3cbd1e429b5dc int,
|
||||
F_1d7f7abc18fcb43975065399b0d1e48e int,
|
||||
F_2a79ea27c279e471f4d180b08d62b00a int,
|
||||
F_1c9ac0159c94d8d0cbedc973445af2da int,
|
||||
F_6c4b761a28b734fe93831e3fb400ce87 int,
|
||||
F_06409663226af2f3114485aa4e0a23b4 int,
|
||||
F_140f6969d5213fd0ece03148e62e461e int,
|
||||
F_b73ce398c39f506af761d2277d853a92 int,
|
||||
F_bd4c9ab730f5513206b999ec0d90d1fb int,
|
||||
F_82aa4b0af34c2313a562076992e50aa3 int,
|
||||
F_0777d5c17d4066b82ab86dff8a46af6f int,
|
||||
F_fa7cdfad1a5aaf8370ebeda47a1ff1c3 int,
|
||||
F_9766527f2b5d3e95d4a733fcfb77bd7e int,
|
||||
F_7e7757b1e12abcb736ab9a754ffb617a int,
|
||||
F_5878a7ab84fb43402106c575658472fa int,
|
||||
F_006f52e9102a8d3be2fe5614f42ba989 int,
|
||||
F_3636638817772e42b59d74cff571fbb3 int,
|
||||
F_149e9677a5989fd342ae44213df68868 int,
|
||||
F_a4a042cf4fd6bfb47701cbc8a1653ada int,
|
||||
F_1ff8a7b5dc7a7d1f0ed65aaa29c04b1e int,
|
||||
F_f7e6c85504ce6e82442c770f7c8606f0 int,
|
||||
F_bf8229696f7a3bb4700cfddef19fa23f int,
|
||||
F_82161242827b703e6acf9c726942a1e4 int,
|
||||
F_38af86134b65d0f10fe33d30dd76442e int,
|
||||
F_96da2f590cd7246bbde0051047b0d6f7 int,
|
||||
F_8f85517967795eeef66c225f7883bdcb int,
|
||||
F_8f53295a73878494e9bc8dd6c3c7104f int,
|
||||
F_045117b0e0a11a242b9765e79cbf113f int,
|
||||
F_fc221309746013ac554571fbd180e1c8 int,
|
||||
F_4c5bde74a8f110656874902f07378009 int,
|
||||
F_cedebb6e872f539bef8c3f919874e9d7 int,
|
||||
F_6cdd60ea0045eb7a6ec44c54d29ed402 int,
|
||||
F_eecca5b6365d9607ee5a9d336962c534 int,
|
||||
F_9872ed9fc22fc182d371c3e9ed316094 int,
|
||||
F_31fefc0e570cb3860f2a6d4b38c6490d int,
|
||||
F_9dcb88e0137649590b755372b040afad int,
|
||||
F_a2557a7b2e94197ff767970b67041697 int,
|
||||
F_cfecdb276f634854f3ef915e2e980c31 int,
|
||||
F_0aa1883c6411f7873cb83dacb17b0afc int,
|
||||
F_58a2fc6ed39fd083f55d4182bf88826d int,
|
||||
F_bd686fd640be98efaae0091fa301e613 int,
|
||||
F_a597e50502f5ff68e3e25b9114205d4a int,
|
||||
F_0336dcbab05b9d5ad24f4333c7658a0e int,
|
||||
F_084b6fbb10729ed4da8c3d3f5a3ae7c9 int,
|
||||
F_85d8ce590ad8981ca2c8286f79f59954 int,
|
||||
F_0e65972dce68dad4d52d063967f0a705 int,
|
||||
F_84d9ee44e457ddef7f2c4f25dc8fa865 int,
|
||||
F_3644a684f98ea8fe223c713b77189a77 int,
|
||||
F_757b505cfd34c64c85ca5b5690ee5293 int,
|
||||
F_854d6fae5ee42911677c739ee1734486 int,
|
||||
F_e2c0be24560d78c5e599c2a9c9d0bbd2 int,
|
||||
F_274ad4786c3abca69fa097b85867d9a4 int,
|
||||
F_eae27d77ca20db309e056e3d2dcd7d69 int,
|
||||
F_7eabe3a1649ffa2b3ff8c02ebfd5659f int,
|
||||
F_69adc1e107f7f7d035d7baf04342e1ca int,
|
||||
F_091d584fced301b442654dd8c23b3fc9 int,
|
||||
F_b1d10e7bafa4421218a51b1e1f1b0ba2 int,
|
||||
F_6f3ef77ac0e3619e98159e9b6febf557 int,
|
||||
F_eb163727917cbba1eea208541a643e74 int,
|
||||
F_1534b76d325a8f591b52d302e7181331 int,
|
||||
F_979d472a84804b9f647bc185a877a8b5 int,
|
||||
F_ca46c1b9512a7a8315fa3c5a946e8265 int,
|
||||
F_3b8a614226a953a8cd9526fca6fe9ba5 int,
|
||||
F_45fbc6d3e05ebd93369ce542e8f2322d int,
|
||||
F_63dc7ed1010d3c3b8269faf0ba7491d4 int,
|
||||
F_e96ed478dab8595a7dbda4cbcbee168f int,
|
||||
F_c0e190d8267e36708f955d7ab048990d int,
|
||||
F_ec8ce6abb3e952a85b8551ba726a1227 int,
|
||||
F_060ad92489947d410d897474079c1477 int,
|
||||
F_bcbe3365e6ac95ea2c0343a2395834dd int,
|
||||
F_115f89503138416a242f40fb7d7f338e int,
|
||||
F_13fe9d84310e77f13a6d184dbf1232f3 int,
|
||||
F_d1c38a09acc34845c6be3a127a5aacaf int,
|
||||
F_9cfdf10e8fc047a44b08ed031e1f0ed1 int,
|
||||
F_705f2172834666788607efbfca35afb3 int,
|
||||
F_74db120f0a8e5646ef5a30154e9f6deb int,
|
||||
F_57aeee35c98205091e18d1140e9f38cf int,
|
||||
F_6da9003b743b65f4c0ccd295cc484e57 int,
|
||||
F_9b04d152845ec0a378394003c96da594 int,
|
||||
F_be83ab3ecd0db773eb2dc1b0a17836a1 int,
|
||||
F_e165421110ba03099a1c0393373c5b43 int,
|
||||
F_289dff07669d7a23de0ef88d2f7129e7 int,
|
||||
F_577ef1154f3240ad5b9b413aa7346a1e int,
|
||||
F_01161aaa0b6d1345dd8fe4e481144d84 int,
|
||||
F_539fd53b59e3bb12d203f45a912eeaf2 int,
|
||||
F_ac1dd209cbcc5e5d1c6e28598e8cbbe8 int,
|
||||
F_555d6702c950ecb729a966504af0a635 int,
|
||||
F_335f5352088d7d9bf74191e006d8e24c int,
|
||||
F_f340f1b1f65b6df5b5e3f94d95b11daf int,
|
||||
F_e4a6222cdb5b34375400904f03d8e6a5 int,
|
||||
F_cb70ab375662576bd1ac5aaf16b3fca4 int,
|
||||
F_9188905e74c28e489b44e954ec0b9bca int,
|
||||
F_0266e33d3f546cb5436a10798e657d97 int,
|
||||
F_38db3aed920cf82ab059bfccbd02be6a int,
|
||||
F_3cec07e9ba5f5bb252d13f5f431e4bbb int,
|
||||
F_621bf66ddb7c962aa0d22ac97d69b793 int,
|
||||
F_077e29b11be80ab57e1a2ecabb7da330 int,
|
||||
F_6c9882bbac1c7093bd25041881277658 int,
|
||||
F_19f3cd308f1455b3fa09a282e0d496f4 int,
|
||||
F_03c6b06952c750899bb03d998e631860 int,
|
||||
F_c24cd76e1ce41366a4bbe8a49b02a028 int,
|
||||
F_c52f1bd66cc19d05628bd8bf27af3ad6 int,
|
||||
F_fe131d7f5a6b38b23cc967316c13dae2 int,
|
||||
F_f718499c1c8cef6730f9fd03c8125cab int,
|
||||
F_d96409bf894217686ba124d7356686c9 int,
|
||||
F_502e4a16930e414107ee22b6198c578f int,
|
||||
F_cfa0860e83a4c3a763a7e62d825349f7 int,
|
||||
F_a4f23670e1833f3fdb077ca70bbd5d66 int,
|
||||
F_b1a59b315fc9a3002ce38bbe070ec3f5 int,
|
||||
F_36660e59856b4de58a219bcf4e27eba3 int,
|
||||
F_8c19f571e251e61cb8dd3612f26d5ecf int,
|
||||
F_d6baf65e0b240ce177cf70da146c8dc8 int,
|
||||
F_e56954b4f6347e897f954495eab16a88 int,
|
||||
F_f7664060cc52bc6f3d620bcedc94a4b6 int,
|
||||
F_eda80a3d5b344bc40f3bc04f65b7a357 int,
|
||||
F_8f121ce07d74717e0b1f21d122e04521 int,
|
||||
F_06138bc5af6023646ede0e1f7c1eac75 int,
|
||||
F_39059724f73a9969845dfe4146c5660e int,
|
||||
F_7f100b7b36092fb9b06dfb4fac360931 int,
|
||||
F_7a614fd06c325499f1680b9896beedeb int,
|
||||
F_4734ba6f3de83d861c3176a6273cac6d int,
|
||||
F_d947bf06a885db0d477d707121934ff8 int,
|
||||
F_63923f49e5241343aa7acb6a06a751e7 int,
|
||||
F_db8e1af0cb3aca1ae2d0018624204529 int,
|
||||
F_20f07591c6fcb220ffe637cda29bb3f6 int,
|
||||
F_07cdfd23373b17c6b337251c22b7ea57 int,
|
||||
F_d395771085aab05244a4fb8fd91bf4ee int,
|
||||
F_92c8c96e4c37100777c7190b76d28233 int,
|
||||
F_e3796ae838835da0b6f6ea37bcf8bcb7 int,
|
||||
F_6a9aeddfc689c1d0e3b9ccc3ab651bc5 int,
|
||||
F_0f49c89d1e7298bb9930789c8ed59d48 int,
|
||||
F_46ba9f2a6976570b0353203ec4474217 int,
|
||||
F_0e01938fc48a2cfb5f2217fbfb00722d int,
|
||||
F_16a5cdae362b8d27a1d8f8c7b78b4330 int,
|
||||
F_918317b57931b6b7a7d29490fe5ec9f9 int,
|
||||
F_48aedb8880cab8c45637abc7493ecddd int,
|
||||
F_839ab46820b524afda05122893c2fe8e int,
|
||||
F_f90f2aca5c640289d0a29417bcb63a37 int,
|
||||
F_9c838d2e45b2ad1094d42f4ef36764f6 int,
|
||||
F_1700002963a49da13542e0726b7bb758 int,
|
||||
F_53c3bce66e43be4f209556518c2fcb54 int,
|
||||
F_6883966fd8f918a4aa29be29d2c386fb int,
|
||||
F_49182f81e6a13cf5eaa496d51fea6406 int,
|
||||
F_d296c101daa88a51f6ca8cfc1ac79b50 int,
|
||||
F_9fd81843ad7f202f26c1a174c7357585 int,
|
||||
F_26e359e83860db1d11b6acca57d8ea88 int,
|
||||
F_ef0d3930a7b6c95bd2b32ed45989c61f int,
|
||||
F_94f6d7e04a4d452035300f18b984988c int,
|
||||
F_34ed066df378efacc9b924ec161e7639 int,
|
||||
F_577bcc914f9e55d5e4e4f82f9f00e7d4 int,
|
||||
F_11b9842e0a271ff252c1903e7132cd68 int,
|
||||
F_37bc2f75bf1bcfe8450a1a41c200364c int,
|
||||
F_496e05e1aea0a9c4655800e8a7b9ea28 int,
|
||||
F_b2eb7349035754953b57a32e2841bda5 int,
|
||||
F_8e98d81f8217304975ccb23337bb5761 int,
|
||||
F_a8c88a0055f636e4a163a5e3d16adab7 int,
|
||||
F_eddea82ad2755b24c4e168c5fc2ebd40 int,
|
||||
F_06eb61b839a0cefee4967c67ccb099dc int,
|
||||
F_9dfcd5e558dfa04aaf37f137a1d9d3e5 int,
|
||||
F_950a4152c2b4aa3ad78bdd6b366cc179 int,
|
||||
F_158f3069a435b314a80bdcb024f8e422 int,
|
||||
F_758874998f5bd0c393da094e1967a72b int,
|
||||
F_ad13a2a07ca4b7642959dc0c4c740ab6 int,
|
||||
F_3fe94a002317b5f9259f82690aeea4cd int,
|
||||
F_5b8add2a5d98b1a652ea7fd72d942dac int,
|
||||
F_432aca3a1e345e339f35a30c8f65edce int,
|
||||
F_8d3bba7425e7c98c50f52ca1b52d3735 int,
|
||||
F_320722549d1751cf3f247855f937b982 int,
|
||||
F_caf1a3dfb505ffed0d024130f58c5cfa int,
|
||||
F_5737c6ec2e0716f3d8a7a5c4e0de0d9a int,
|
||||
F_bc6dc48b743dc5d013b1abaebd2faed2 int,
|
||||
F_f2fc990265c712c49d51a18a32b39f0c int,
|
||||
F_89f0fd5c927d466d6ec9a21b9ac34ffa int,
|
||||
F_a666587afda6e89aec274a3657558a27 int,
|
||||
F_b83aac23b9528732c23cc7352950e880 int,
|
||||
F_cd00692c3bfe59267d5ecfac5310286c int,
|
||||
F_6faa8040da20ef399b63a72d0e4ab575 int,
|
||||
F_fe73f687e5bc5280214e0486b273a5f9 int);
|
||||
insert into t1 (F_8d3bba7425e7c98c50f52ca1b52d3735) values (1);
|
||||
--exec $MYSQL_DUMP --skip-comments -c test
|
||||
drop table t1;
|
||||
|
@ -184,3 +184,27 @@ SELECT a, SUM(a) m FROM t1 GROUP BY a WITH ROLLUP;
|
||||
SELECT * FROM ( SELECT a, SUM(a) m FROM t1 GROUP BY a WITH ROLLUP ) t2;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Tests for bug #7914: ROLLUP over expressions on temporary table
|
||||
#
|
||||
|
||||
CREATE TABLE t1 (a int(11));
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
|
||||
SELECT a, SUM(a), SUM(a)+1 FROM (SELECT a FROM t1 UNION select 2) d
|
||||
GROUP BY a;
|
||||
SELECT a, SUM(a), SUM(a)+1 FROM (SELECT a FROM t1 UNION select 2) d
|
||||
GROUP BY a WITH ROLLUP;
|
||||
|
||||
SELECT a, SUM(a), SUM(a)+1 FROM (SELECT 1 a UNION select 2) d
|
||||
GROUP BY a;
|
||||
SELECT a, SUM(a), SUM(a)+1 FROM (SELECT 1 a UNION select 2) d
|
||||
GROUP BY a WITH ROLLUP;
|
||||
|
||||
SELECT a, SUM(a), SUM(a)+1, CONCAT(SUM(a),'x'), SUM(a)+SUM(a), SUM(a)
|
||||
FROM (SELECT 1 a, 2 b UNION SELECT 2,3 UNION SELECT 5,6 ) d
|
||||
GROUP BY a WITH ROLLUP;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
|
@ -1,3 +1,9 @@
|
||||
disable_query_log;
|
||||
-- source include/test_outfile.inc
|
||||
eval set @tmpdir="$MYSQL_TEST_DIR/var/tmp";
|
||||
enable_query_log;
|
||||
-- source include/have_outfile.inc
|
||||
|
||||
#
|
||||
# test of into outfile|dumpfile
|
||||
#
|
||||
@ -6,29 +12,45 @@
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
# We need to check that we have 'file' privilege.
|
||||
create table t1 (`a` blob);
|
||||
insert into t1 values("hello world"),("Hello mars"),(NULL);
|
||||
disable_query_log;
|
||||
eval select * into outfile "$MYSQL_TEST_DIR/var/tmp/outfile-test.1" from t1;
|
||||
enable_query_log;
|
||||
select load_file(concat(@tmpdir,"/outfile-test.1"));
|
||||
disable_query_log;
|
||||
eval select * into dumpfile "$MYSQL_TEST_DIR/var/tmp/outfile-test.2" from t1 limit 1;
|
||||
enable_query_log;
|
||||
select load_file(concat(@tmpdir,"/outfile-test.2"));
|
||||
disable_query_log;
|
||||
eval select * into dumpfile "$MYSQL_TEST_DIR/var/tmp/outfile-test.3" from t1 where a is null;
|
||||
enable_query_log;
|
||||
select load_file(concat(@tmpdir,"/outfile-test.3"));
|
||||
|
||||
#create table t1 (`a` blob);
|
||||
#insert into t1 values("hello world"),("Hello mars"),(NULL);
|
||||
#select * into outfile "/tmp/select-test.1" from t1;
|
||||
#select load_file("/tmp/select-test.1");
|
||||
#select * into dumpfile "/tmp/select-test.2" from t1 limit 1;
|
||||
#select load_file("/tmp/select-test.2");
|
||||
#select * into dumpfile "/tmp/select-test.3" from t1 where a is null;
|
||||
#select load_file("/tmp/select-test.3");
|
||||
#
|
||||
## the following should give errors
|
||||
#
|
||||
#select * into outfile "/tmp/select-test.1" from t1;
|
||||
#select * into dumpfile "/tmp/select-test.1" from t1;
|
||||
#select * into dumpfile "/tmp/select-test.99" from t1;
|
||||
#select load_file("/tmp/select-test.not-exist");
|
||||
#drop table t1;
|
||||
#drop table if exists t;
|
||||
#CREATE TABLE t ( t timestamp NOT NULL, c char(200) character set latin1 NOT NULL default '', i int(11), v varchar(200), b blob, KEY t (t)) ENGINE=MyISAM;
|
||||
#INSERT INTO t VALUES ('2002-12-20 12:01:20','',1,"aaa","bbb");
|
||||
#select * from t into outfile "check";
|
||||
#drop table if exists t;
|
||||
# the following should give errors
|
||||
|
||||
#disabled as error message has variable path
|
||||
#disable_query_log;
|
||||
#--error 1086
|
||||
#eval select * into outfile "$MYSQL_TEST_DIR/var/tmp/outfile-test.1" from t1;
|
||||
#--error 1086
|
||||
#eval select * into dumpfile "$MYSQL_TEST_DIR/var/tmp/outfile-test.2" from t1;
|
||||
#--error 1086
|
||||
#eval select * into dumpfile "$MYSQL_TEST_DIR/var/tmp/outfile-test.3" from t1;
|
||||
#enable_query_log;
|
||||
--error 13,2
|
||||
select load_file(concat(@tmpdir,"/outfile-test.not-exist"));
|
||||
--exec rm $MYSQL_TEST_DIR/var/tmp/outfile-test.1
|
||||
--exec rm $MYSQL_TEST_DIR/var/tmp/outfile-test.2
|
||||
--exec rm $MYSQL_TEST_DIR/var/tmp/outfile-test.3
|
||||
drop table t1;
|
||||
|
||||
# Bug#8191
|
||||
disable_query_log;
|
||||
eval select 1 into outfile "$MYSQL_TEST_DIR/var/tmp/outfile-test.4";
|
||||
enable_query_log;
|
||||
select load_file(concat(@tmpdir,"/outfile-test.4"));
|
||||
--exec rm $MYSQL_TEST_DIR/var/tmp/outfile-test.4
|
||||
|
||||
#
|
||||
# Bug #5382: 'explain select into outfile' crashes the server
|
||||
|
@ -1,10 +1,6 @@
|
||||
# Can't test grants with embedded server
|
||||
-- source include/not_embedded.inc
|
||||
|
||||
# Tested here simply so it is not tested with embedded server
|
||||
prepare stmt4 from ' show full processlist ';
|
||||
--replace_column 1 number 6 time 3 localhost
|
||||
execute stmt4;
|
||||
|
||||
let $type= 'MYISAM' ;
|
||||
|
||||
@ -116,4 +112,9 @@ show grants for second_user@localhost ;
|
||||
|
||||
drop database mysqltest;
|
||||
|
||||
# Tested here simply so it is not tested with embedded server
|
||||
prepare stmt4 from ' show full processlist ';
|
||||
--replace_column 1 number 6 time 3 localhost
|
||||
execute stmt4;
|
||||
|
||||
|
||||
|
@ -1,5 +1,3 @@
|
||||
-- source include/have_innodb.inc
|
||||
|
||||
#
|
||||
# Problem with range optimizer
|
||||
#
|
||||
|
12
mysql-test/t/reserved_win_names.test
Normal file
12
mysql-test/t/reserved_win_names.test
Normal file
@ -0,0 +1,12 @@
|
||||
#
|
||||
# Test of reserved Windows names
|
||||
#
|
||||
--require r/reserved_win_names.require
|
||||
|
||||
--error 1049
|
||||
use COM1;
|
||||
--error 1049
|
||||
use LPT1;
|
||||
--error 1049
|
||||
use PRN;
|
||||
|
@ -1950,7 +1950,6 @@ EXPLAIN SELECT * FROM t1 LEFT JOIN t2 FORCE INDEX (a) ON t1.a=t2.a;
|
||||
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
|
||||
#
|
||||
# Test case for bug 7098: substitution of a constant for a string field
|
||||
#
|
||||
@ -1987,11 +1986,68 @@ drop table t1;
|
||||
create table t1 (a int(11));
|
||||
select all all * from t1;
|
||||
select distinct distinct * from t1;
|
||||
--error 1064
|
||||
--error 1221
|
||||
select all distinct * from t1;
|
||||
--error 1064
|
||||
--error 1221
|
||||
select distinct all * from t1;
|
||||
drop table t1;
|
||||
|
||||
|
||||
#
|
||||
# Test for BUG#10095
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
kunde_intern_id int(10) unsigned NOT NULL default '0',
|
||||
kunde_id int(10) unsigned NOT NULL default '0',
|
||||
FK_firma_id int(10) unsigned NOT NULL default '0',
|
||||
aktuell enum('Ja','Nein') NOT NULL default 'Ja',
|
||||
vorname varchar(128) NOT NULL default '',
|
||||
nachname varchar(128) NOT NULL default '',
|
||||
geloescht enum('Ja','Nein') NOT NULL default 'Nein',
|
||||
firma varchar(128) NOT NULL default ''
|
||||
);
|
||||
|
||||
INSERT INTO t1 VALUES
|
||||
(3964,3051,1,'Ja','Vorname1','1Nachname','Nein','Print Schau XXXX'),
|
||||
(3965,3051111,1,'Ja','Vorname1111','1111Nachname','Nein','Print Schau XXXX');
|
||||
|
||||
|
||||
SELECT kunde_id ,FK_firma_id ,aktuell, vorname, nachname, geloescht FROM t1
|
||||
WHERE
|
||||
(
|
||||
(
|
||||
( '' != '' AND firma LIKE CONCAT('%', '', '%'))
|
||||
OR
|
||||
(vorname LIKE CONCAT('%', 'Vorname1', '%') AND
|
||||
nachname LIKE CONCAT('%', '1Nachname', '%') AND
|
||||
'Vorname1' != '' AND 'xxxx' != '')
|
||||
)
|
||||
AND
|
||||
(
|
||||
aktuell = 'Ja' AND geloescht = 'Nein' AND FK_firma_id = 2
|
||||
)
|
||||
)
|
||||
;
|
||||
|
||||
SELECT kunde_id ,FK_firma_id ,aktuell, vorname, nachname,
|
||||
geloescht FROM t1
|
||||
WHERE
|
||||
(
|
||||
(
|
||||
aktuell = 'Ja' AND geloescht = 'Nein' AND FK_firma_id = 2
|
||||
)
|
||||
AND
|
||||
(
|
||||
( '' != '' AND firma LIKE CONCAT('%', '', '%') )
|
||||
OR
|
||||
( vorname LIKE CONCAT('%', 'Vorname1', '%') AND
|
||||
nachname LIKE CONCAT('%', '1Nachname', '%') AND 'Vorname1' != '' AND
|
||||
'xxxx' != '')
|
||||
)
|
||||
)
|
||||
;
|
||||
|
||||
SELECT COUNT(*) FROM t1 WHERE
|
||||
( 0 OR (vorname LIKE '%Vorname1%' AND nachname LIKE '%1Nachname%' AND 1))
|
||||
AND FK_firma_id = 2;
|
||||
|
||||
drop table t1;
|
||||
|
@ -1722,3 +1722,27 @@ select (1,2,3) = (select * from t1);
|
||||
-- error 1241
|
||||
select (select * from t1) = (1,2,3);
|
||||
drop table t1
|
||||
|
||||
#
|
||||
# Item_int_with_ref check (BUG#10020)
|
||||
#
|
||||
CREATE TABLE `t1` (
|
||||
`itemid` bigint(20) unsigned NOT NULL auto_increment,
|
||||
`sessionid` bigint(20) unsigned default NULL,
|
||||
`time` int(10) unsigned NOT NULL default '0',
|
||||
`type` set('A','D','E','F','G','I','L','N','U') collate latin1_general_ci NOT
|
||||
NULL default '',
|
||||
`data` text collate latin1_general_ci NOT NULL,
|
||||
PRIMARY KEY (`itemid`)
|
||||
) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
|
||||
INSERT INTO `t1` VALUES (1, 1, 1, 'D', '');
|
||||
CREATE TABLE `t2` (
|
||||
`sessionid` bigint(20) unsigned NOT NULL auto_increment,
|
||||
`pid` int(10) unsigned NOT NULL default '0',
|
||||
`date` int(10) unsigned NOT NULL default '0',
|
||||
`ip` varchar(15) collate latin1_general_ci NOT NULL default '',
|
||||
PRIMARY KEY (`sessionid`)
|
||||
) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
|
||||
INSERT INTO `t2` VALUES (1, 1, 1, '10.10.10.1');
|
||||
SELECT s.ip, count( e.itemid ) FROM `t1` e JOIN t2 s ON s.sessionid = e.sessionid WHERE e.sessionid = ( SELECT sessionid FROM t2 ORDER BY sessionid DESC LIMIT 1 ) GROUP BY s.ip HAVING count( e.itemid ) >0 LIMIT 0 , 30;
|
||||
drop tables t1,t2;
|
||||
|
Reference in New Issue
Block a user