Commit a3619d2e authored by Ramil Kalimullin's avatar Ramil Kalimullin

auto-merge

parents d59b3713 e000e4a2
...@@ -276,7 +276,8 @@ enum enum_commands { ...@@ -276,7 +276,8 @@ enum enum_commands {
Q_REPLACE_REGEX, Q_REMOVE_FILE, Q_FILE_EXIST, Q_REPLACE_REGEX, Q_REMOVE_FILE, Q_FILE_EXIST,
Q_WRITE_FILE, Q_COPY_FILE, Q_PERL, Q_DIE, Q_EXIT, Q_SKIP, Q_WRITE_FILE, Q_COPY_FILE, Q_PERL, Q_DIE, Q_EXIT, Q_SKIP,
Q_CHMOD_FILE, Q_APPEND_FILE, Q_CAT_FILE, Q_DIFF_FILES, Q_CHMOD_FILE, Q_APPEND_FILE, Q_CAT_FILE, Q_DIFF_FILES,
Q_SEND_QUIT, Q_CHANGE_USER, Q_MKDIR, Q_RMDIR, Q_SEND_QUIT, Q_CHANGE_USER, Q_MKDIR, Q_RMDIR, Q_LIST_FILES,
Q_LIST_FILES_WRITE_FILE, Q_LIST_FILES_APPEND_FILE,
Q_UNKNOWN, /* Unknown command. */ Q_UNKNOWN, /* Unknown command. */
Q_COMMENT, /* Comments, ignored. */ Q_COMMENT, /* Comments, ignored. */
...@@ -368,6 +369,9 @@ const char *command_names[]= ...@@ -368,6 +369,9 @@ const char *command_names[]=
"change_user", "change_user",
"mkdir", "mkdir",
"rmdir", "rmdir",
"list_files",
"list_files_write_file",
"list_files_append_file",
0 0
}; };
...@@ -2836,6 +2840,126 @@ void do_rmdir(struct st_command *command) ...@@ -2836,6 +2840,126 @@ void do_rmdir(struct st_command *command)
} }
/*
SYNOPSIS
get_list_files
ds output
ds_dirname dir to list
ds_wild wild-card file pattern (can be empty)
DESCRIPTION
list all entries in directory (matching ds_wild if given)
*/
static int get_list_files(DYNAMIC_STRING *ds, const DYNAMIC_STRING *ds_dirname,
const DYNAMIC_STRING *ds_wild)
{
uint i;
MY_DIR *dir_info;
FILEINFO *file;
DBUG_ENTER("get_list_files");
DBUG_PRINT("info", ("listing directory: %s", ds_dirname->str));
/* Note that my_dir sorts the list if not given any flags */
if (!(dir_info= my_dir(ds_dirname->str, MYF(0))))
DBUG_RETURN(1);
for (i= 0; i < (uint) dir_info->number_off_files; i++)
{
file= dir_info->dir_entry + i;
if (file->name[0] == '.' &&
(file->name[1] == '\0' ||
(file->name[1] == '.' && file->name[2] == '\0')))
continue; /* . or .. */
if (ds_wild && ds_wild->length &&
wild_compare(file->name, ds_wild->str, 0))
continue;
dynstr_append(ds, file->name);
dynstr_append(ds, "\n");
}
my_dirend(dir_info);
DBUG_RETURN(0);
}
/*
SYNOPSIS
do_list_files
command called command
DESCRIPTION
list_files <dir_name> [<file_name>]
List files and directories in directory <dir_name> (like `ls`)
[Matching <file_name>, where wild-cards are allowed]
*/
static void do_list_files(struct st_command *command)
{
int error;
static DYNAMIC_STRING ds_dirname;
static DYNAMIC_STRING ds_wild;
const struct command_arg list_files_args[] = {
{"dirname", ARG_STRING, TRUE, &ds_dirname, "Directory to list"},
{"file", ARG_STRING, FALSE, &ds_wild, "Filename (incl. wildcard)"}
};
DBUG_ENTER("do_list_files");
check_command_args(command, command->first_argument,
list_files_args,
sizeof(list_files_args)/sizeof(struct command_arg), ' ');
error= get_list_files(&ds_res, &ds_dirname, &ds_wild);
handle_command_error(command, error);
dynstr_free(&ds_dirname);
dynstr_free(&ds_wild);
DBUG_VOID_RETURN;
}
/*
SYNOPSIS
do_list_files_write_file_command
command called command
append append file, or create new
DESCRIPTION
list_files_{write|append}_file <filename> <dir_name> [<match_file>]
List files and directories in directory <dir_name> (like `ls`)
[Matching <match_file>, where wild-cards are allowed]
Note: File will be truncated if exists and append is not true.
*/
static void do_list_files_write_file_command(struct st_command *command,
my_bool append)
{
int error;
static DYNAMIC_STRING ds_content;
static DYNAMIC_STRING ds_filename;
static DYNAMIC_STRING ds_dirname;
static DYNAMIC_STRING ds_wild;
const struct command_arg list_files_args[] = {
{"filename", ARG_STRING, TRUE, &ds_filename, "Filename for write"},
{"dirname", ARG_STRING, TRUE, &ds_dirname, "Directory to list"},
{"file", ARG_STRING, FALSE, &ds_wild, "Filename (incl. wildcard)"}
};
DBUG_ENTER("do_list_files_write_file");
check_command_args(command, command->first_argument,
list_files_args,
sizeof(list_files_args)/sizeof(struct command_arg), ' ');
init_dynamic_string(&ds_content, "", 1024, 1024);
error= get_list_files(&ds_content, &ds_dirname, &ds_wild);
handle_command_error(command, error);
str_to_file2(ds_filename.str, ds_content.str, ds_content.length, append);
dynstr_free(&ds_content);
dynstr_free(&ds_filename);
dynstr_free(&ds_dirname);
dynstr_free(&ds_wild);
DBUG_VOID_RETURN;
}
/* /*
Read characters from line buffer or file. This is needed to allow Read characters from line buffer or file. This is needed to allow
my_ungetc() to buffer MAX_DELIMITER_LENGTH characters for a file my_ungetc() to buffer MAX_DELIMITER_LENGTH characters for a file
...@@ -7147,6 +7271,13 @@ int main(int argc, char **argv) ...@@ -7147,6 +7271,13 @@ int main(int argc, char **argv)
case Q_REMOVE_FILE: do_remove_file(command); break; case Q_REMOVE_FILE: do_remove_file(command); break;
case Q_MKDIR: do_mkdir(command); break; case Q_MKDIR: do_mkdir(command); break;
case Q_RMDIR: do_rmdir(command); break; case Q_RMDIR: do_rmdir(command); break;
case Q_LIST_FILES: do_list_files(command); break;
case Q_LIST_FILES_WRITE_FILE:
do_list_files_write_file_command(command, FALSE);
break;
case Q_LIST_FILES_APPEND_FILE:
do_list_files_write_file_command(command, TRUE);
break;
case Q_FILE_EXIST: do_file_exist(command); break; case Q_FILE_EXIST: do_file_exist(command); break;
case Q_WRITE_FILE: do_write_file(command); break; case Q_WRITE_FILE: do_write_file(command); break;
case Q_APPEND_FILE: do_append_file(command); break; case Q_APPEND_FILE: do_append_file(command); break;
......
...@@ -10,7 +10,7 @@ AC_CANONICAL_SYSTEM ...@@ -10,7 +10,7 @@ AC_CANONICAL_SYSTEM
# #
# When changing major version number please also check switch statement # When changing major version number please also check switch statement
# in mysqlbinlog::check_master_version(). # in mysqlbinlog::check_master_version().
AM_INIT_AUTOMAKE(mysql, 5.1.27) AM_INIT_AUTOMAKE(mysql, 5.1.28)
AM_CONFIG_HEADER([include/config.h:config.h.in]) AM_CONFIG_HEADER([include/config.h:config.h.in])
PROTOCOL_VERSION=10 PROTOCOL_VERSION=10
......
...@@ -447,7 +447,8 @@ int emb_load_querycache_result(THD *thd, Querycache_stream *src) ...@@ -447,7 +447,8 @@ int emb_load_querycache_result(THD *thd, Querycache_stream *src)
if (thd->protocol == &thd->protocol_binary) if (thd->protocol == &thd->protocol_binary)
{ {
uint length; uint length;
row= (MYSQL_ROWS *)alloc_root(&data->alloc, rows * sizeof(MYSQL_ROWS)); row= (MYSQL_ROWS *)alloc_root(&data->alloc,
(size_t) (rows * sizeof(MYSQL_ROWS)));
end_row= row + rows; end_row= row + rows;
data->data= row; data->data= row;
......
...@@ -569,4 +569,10 @@ insert into t1 values (),(),(),(),(),(),(),(),(),(); ...@@ -569,4 +569,10 @@ insert into t1 values (),(),(),(),(),(),(),(),(),();
select a from t1 where a not in (a,a,a) group by a; select a from t1 where a not in (a,a,a) group by a;
a a
drop table t1; drop table t1;
create table t1 (id int);
select * from t1 where NOT id in (select null union all select 1);
id
select * from t1 where NOT id in (null, 1);
id
drop table t1;
End of 5.1 tests End of 5.1 tests
...@@ -310,6 +310,20 @@ drop table t1; ...@@ -310,6 +310,20 @@ drop table t1;
SELECT NAME_CONST('var', 'value') COLLATE latin1_general_cs; SELECT NAME_CONST('var', 'value') COLLATE latin1_general_cs;
NAME_CONST('var', 'value') COLLATE latin1_general_cs NAME_CONST('var', 'value') COLLATE latin1_general_cs
value value
select @@session.time_zone into @save_tz;
set @@session.time_zone='UTC';
select uuid() into @my_uuid;
select mid(@my_uuid,15,1);
mid(@my_uuid,15,1)
1
select 24 * 60 * 60 * 1000 * 1000 * 10 into @my_uuid_one_day;
select concat('0',mid(@my_uuid,16,3),mid(@my_uuid,10,4),left(@my_uuid,8)) into @my_uuidate;
select floor(conv(@my_uuidate,16,10)/@my_uuid_one_day) into @my_uuid_date;
select 141427 + datediff(curdate(),'1970-01-01') into @my_uuid_synthetic;
select @my_uuid_date - @my_uuid_synthetic;
@my_uuid_date - @my_uuid_synthetic
0
set @@session.time_zone=@save_tz;
End of 5.0 tests End of 5.0 tests
select connection_id() > 0; select connection_id() > 0;
connection_id() > 0 connection_id() > 0
......
** Setup ** ** Setup **
SET @default_max_user_connections = @@max_user_connections; SET @default_max_user_connections = @@global.max_user_connections;
Set Global max_user_connections=2; Set Global max_user_connections=2;
'#--------------------FN_DYNVARS_114_01-------------------------#' '#--------------------FN_DYNVARS_114_01-------------------------#'
** Connecting conn1 using username 'root' ** ** Connecting conn1 using username 'root' **
...@@ -9,10 +9,11 @@ Set Global max_user_connections=2; ...@@ -9,10 +9,11 @@ Set Global max_user_connections=2;
ERROR 42000: User root already has more than 'max_user_connections' active connections ERROR 42000: User root already has more than 'max_user_connections' active connections
Expected error "too many connections" Expected error "too many connections"
** Disconnecting conn1 ** ** Disconnecting conn1 **
** Poll till disconnected conn1 disappears from processlist
'#--------------------FN_DYNVARS_114_02-------------------------#' '#--------------------FN_DYNVARS_114_02-------------------------#'
Set Global max_user_connections=3; Set Global max_user_connections=3;
** Connecting conn5 using username 'root' ** ** Connecting conn5 using username 'root' **
** Connecting conn6 using username 'root' ** ** Connecting conn6 using username 'root' **
** Connection default ** ** Connection default **
** Disconnecting conn5, conn6 ** ** Disconnecting conn5, conn6 **
SET GLOBAL max_user_connections = @default_max_user_connections; SET @@global.max_user_connections = @default_max_user_connections;
...@@ -725,6 +725,9 @@ drop table t1; ...@@ -725,6 +725,9 @@ drop table t1;
mysqltest: At line 1: change user failed: Unknown database 'inexistent' mysqltest: At line 1: change user failed: Unknown database 'inexistent'
mysqltest: At line 1: change user failed: Access denied for user 'inexistent'@'localhost' (using password: NO) mysqltest: At line 1: change user failed: Access denied for user 'inexistent'@'localhost' (using password: NO)
mysqltest: At line 1: change user failed: Access denied for user 'root'@'localhost' (using password: YES) mysqltest: At line 1: change user failed: Access denied for user 'root'@'localhost' (using password: YES)
file1.txt
file1.txt
file2.txt
SELECT 'c:\\a.txt' AS col; SELECT 'c:\\a.txt' AS col;
col col
z z
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
# #
# The amount and properties of character_sets/collations depend on the # The amount and properties of character_sets/collations depend on the
# build type # build type
# 2007-12 MySQL 5.0 # 2007-12 MySQL 5.0, 2008-06 MySQL 5.1
# --------------------------------------------------------------------- # ---------------------------------------------------------------------
# #
# Variant 1 fits to # Variant 1 fits to
...@@ -33,10 +33,22 @@ ...@@ -33,10 +33,22 @@
# Variant 3 fits to # Variant 3 fits to
# version_comment MySQL Community Server (GPL) # version_comment MySQL Community Server (GPL)
# version_comment MySQL Cluster Server (Commercial) # version_comment MySQL Cluster Server (Commercial)
# version_comment MySQL Advanced Server (GPL) 5.1
# version_comment MySQL Advanced Server (Commercial) 5.1
# #
# Difference between variant 3 and 2 is within the collation properties # Difference between variant 3 and 2 is within the collation properties
# IS_COMPILED and SORTLEN. # IS_COMPILED and SORTLEN.
# #
# 2008-06 All time excluded variant is "vanilla".
# How to build "vanilla":
# ./BUILD/autorun.sh
# ./configure
# ./make
# Some properties of "vanilla"
# version_comment Source distribution
# Compared to the variants 1 to 3 a lot of character sets are missing.
# Example: "ucs2_bin" is in variant 1 to 3 but not in "vanilla".
#
# Created: # Created:
# 2007-12-18 mleich - remove the unstable character_set/collation subtests # 2007-12-18 mleich - remove the unstable character_set/collation subtests
# from include/datadict-master.inc # from include/datadict-master.inc
......
...@@ -22,9 +22,11 @@ if (`SELECT EXISTS (SELECT 1 FROM information_schema.collations ...@@ -22,9 +22,11 @@ if (`SELECT EXISTS (SELECT 1 FROM information_schema.collations
OR ( @@version_comment NOT LIKE '%Source%' OR ( @@version_comment NOT LIKE '%Source%'
AND @@version_comment NOT LIKE '%Enterprise%' AND @@version_comment NOT LIKE '%Enterprise%'
AND @@version_comment NOT LIKE '%Classic%' AND @@version_comment NOT LIKE '%Classic%'
AND @@version_comment NOT LIKE '%Pushbuild%')`) AND @@version_comment NOT LIKE '%Pushbuild%')
OR (SELECT count(*) = 0 FROM information_schema.collations
WHERE collation_name = 'ucs2_bin')`)
{ {
skip Test needs Enterprise, Classic , Pushbuild or Source-without-max build; skip Test needs Enterprise, Classic , regular Pushbuild or Source-without-max build;
} }
--source suite/funcs_1/datadict/charset_collation.inc --source suite/funcs_1/datadict/charset_collation.inc
...@@ -16,9 +16,10 @@ ...@@ -16,9 +16,10 @@
# #
if (`SELECT @@version_comment NOT LIKE '%Community%' if (`SELECT @@version_comment NOT LIKE '%Community%'
AND @@version_comment NOT LIKE '%Cluster%'`) AND @@version_comment NOT LIKE '%Cluster%'
AND @@version_comment NOT LIKE '%Advanced%'`)
{ {
skip Test needs Community or Cluster build; skip Test needs Community, Cluster or Advanced build;
} }
--source suite/funcs_1/datadict/charset_collation.inc --source suite/funcs_1/datadict/charset_collation.inc
################################################################################# #################################################################################
# Author: Serge Kozlov # # Author: Serge Kozlov #
# Date: 09/21/2005 # # Date: 2005-09-21 #
# Purpose: used by ../t/*_charset.test # # Purpose: used by ../t/*_charset.test #
# Require: set $engine_type= [NDB,MyISAM,InnoDB,etc] before calling # # Require: set $engine_type= [NDB,MyISAM,InnoDB,etc] before calling #
# #
# Last modification: Matthias Leich #
# Date: 2008-07-02 #
# Purpose: Fix Bug#37160 funcs_2: The tests do not check if optional character #
# sets exist. #
# Add checking of prerequisites + minor cleanup #
################################################################################# #################################################################################
# #
# #
# #
# Check that all character sets needed are available
# Note(mleich):
# It is intentional that the common solution with
# "--source include/have_<character set>.inc"
# is not applied.
# - We currently do not have such a prerequisite test for every character set
# /collation needed.
# - There is also no real value in mentioning the first missing character set
# /collation within the "skip message" because it is most probably only
# one of many.
#
# Hint: 5 character_set_names per source line if possible
if (`SELECT COUNT(*) <> 36 FROM information_schema.character_sets
WHERE CHARACTER_SET_NAME IN (
'armscii8', 'ascii' , 'big5' , 'binary' , 'cp1250',
'cp1251' , 'cp1256' , 'cp1257' , 'cp850' , 'cp852' ,
'cp866' , 'cp932' , 'dec8' , 'eucjpms', 'euckr' ,
'gb2312' , 'gbk' , 'geostd8', 'greek' , 'hebrew',
'hp8' , 'keybcs2', 'koi8r' , 'koi8u' , 'latin1',
'latin2' , 'latin5' , 'latin7' , 'macce' , 'macroman',
'sjis' , 'swe7' , 'tis620' , 'ucs2' , 'ujis',
'utf8'
)`)
{
--skip Not all character sets required for this test are present
}
# Check that all collations needed are available
# Hint: 4 collation_names per source line if possible
if (`SELECT COUNT(*) <> 123 FROM information_schema.collations
WHERE collation_name IN (
'armscii8_bin', 'armscii8_general_ci', 'ascii_bin', 'ascii_general_ci',
'big5_bin', 'big5_chinese_ci', 'cp1250_bin', 'cp1250_croatian_ci',
'cp1250_czech_cs', 'cp1250_general_ci', 'cp1251_bin', 'cp1251_bulgarian_ci',
'cp1251_general_ci', 'cp1251_general_cs', 'cp1251_ukrainian_ci', 'cp1256_bin',
'cp1256_general_ci', 'cp1257_bin', 'cp1257_general_ci', 'cp1257_lithuanian_ci',
'cp850_bin', 'cp850_general_ci', 'cp852_bin', 'cp852_general_ci',
'cp866_bin', 'cp866_general_ci', 'cp932_bin', 'cp932_japanese_ci',
'dec8_bin', 'dec8_swedish_ci', 'eucjpms_bin', 'eucjpms_japanese_ci',
'euckr_bin', 'euckr_korean_ci', 'gb2312_bin', 'gb2312_chinese_ci',
'gbk_bin', 'gbk_chinese_ci', 'geostd8_bin', 'geostd8_general_ci',
'greek_bin', 'greek_general_ci', 'hebrew_bin', 'hebrew_general_ci',
'hp8_bin', 'hp8_english_ci', 'keybcs2_bin', 'keybcs2_general_ci',
'koi8r_bin', 'koi8r_general_ci', 'koi8u_bin', 'koi8u_general_ci',
'latin1_bin', 'latin1_danish_ci', 'latin1_general_ci', 'latin1_general_cs',
'latin1_german1_ci', 'latin1_german2_ci', 'latin1_spanish_ci', 'latin1_swedish_ci',
'latin2_bin', 'latin2_croatian_ci', 'latin2_czech_cs', 'latin2_general_ci',
'latin2_hungarian_ci', 'latin5_bin', 'latin5_turkish_ci', 'latin7_bin',
'latin7_estonian_cs', 'latin7_general_ci', 'latin7_general_cs', 'macce_bin',
'macce_general_ci', 'macroman_bin', 'macroman_general_ci', 'sjis_bin',
'sjis_japanese_ci', 'swe7_bin', 'swe7_swedish_ci', 'tis620_bin',
'tis620_thai_ci', 'ucs2_bin', 'ucs2_czech_ci', 'ucs2_danish_ci',
'ucs2_estonian_ci', 'ucs2_general_ci', 'ucs2_hungarian_ci', 'ucs2_icelandic_ci',
'ucs2_latvian_ci', 'ucs2_lithuanian_ci', 'ucs2_persian_ci', 'ucs2_polish_ci',
'ucs2_roman_ci', 'ucs2_romanian_ci', 'ucs2_slovak_ci', 'ucs2_slovenian_ci',
'ucs2_spanish2_ci', 'ucs2_spanish_ci', 'ucs2_swedish_ci', 'ucs2_turkish_ci',
'ucs2_unicode_ci', 'ujis_bin', 'ujis_japanese_ci', 'utf8_bin',
'utf8_czech_ci', 'utf8_danish_ci', 'utf8_estonian_ci', 'utf8_general_ci',
'utf8_hungarian_ci', 'utf8_icelandic_ci', 'utf8_latvian_ci', 'utf8_lithuanian_ci',
'utf8_persian_ci', 'utf8_polish_ci', 'utf8_roman_ci', 'utf8_romanian_ci',
'utf8_slovak_ci', 'utf8_slovenian_ci', 'utf8_spanish2_ci', 'utf8_spanish_ci',
'utf8_swedish_ci', 'utf8_turkish_ci', 'utf8_unicode_ci'
)`)
{
--skip Not all collations required for this test are present
}
################################
let $check_std_csets= 1;
let $check_ucs2_csets= 1;
let $check_utf8_csets= 1;
#
# Check all charsets/collation combinations
#
################################
let $check_std_csets= 1; let $check_std_csets= 1;
let $check_ucs2_csets= 1; let $check_ucs2_csets= 1;
let $check_utf8_csets= 1; let $check_utf8_csets= 1;
......
################################################################################# ################################################################################
# Author: Serge Kozlov # # Author: Serge Kozlov #
# Date: 09/21/2005 # # Date: 2005-09-21 #
# Purpose: Testing the charsets for InnoDB engine # # Purpose: Testing the charsets for InnoDB engine #
################################################################################# # #
# Checking of other prerequisites is in charset_master.test #
################################################################################
--source include/have_innodb.inc --source include/have_innodb.inc
......
################################################################################# ################################################################################
# Author: Serge Kozlov # # Author: Serge Kozlov #
# Date: 09/21/2005 # # Date: 2005-09-21 #
# Purpose: Testing the charsets for Memory engine # # Purpose: Testing the charsets for Memory engine #
################################################################################# # #
# Checking of other prerequisites is in charset_master.test #
################################################################################
let $engine_type= Memory; let $engine_type= Memory;
--source suite/funcs_2/charset/charset_master.test --source suite/funcs_2/charset/charset_master.test
......
################################################################################# ################################################################################
# Author: Serge Kozlov # # Author: Serge Kozlov #
# Date: 09/21/2005 # # Date: 2005-09-21 #
# Purpose: Testing the charsets for MyISAM engine # # Purpose: Testing the charsets for MyISAM engine #
################################################################################# # #
# Checking of other prerequisites is in charset_master.test #
################################################################################
let $engine_type= MyISAM; let $engine_type= MyISAM;
--source suite/funcs_2/charset/charset_master.test --source suite/funcs_2/charset/charset_master.test
......
################################################################################# ################################################################################
# Author: Serge Kozlov # # Author: Serge Kozlov #
# Date: 09/21/2005 # # Date: 09/21/2005 #
# Purpose: Testing the charsets for NDB engine # # Purpose: Testing the charsets for NDB engine #
################################################################################# # #
# Checking of other prerequisites is in charset_master.test #
################################################################################
--source include/have_ndb.inc --source include/have_ndb.inc
--source include/not_embedded.inc --source include/not_embedded.inc
......
...@@ -11,9 +11,6 @@ ...@@ -11,9 +11,6 @@
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
# Original Author: mleich # # Original Author: mleich #
# Original Date: 2006-05-12 # # Original Date: 2006-05-12 #
# Change Author: #
# Change Date: #
# Change: #
################################################################################ ################################################################################
if ($no_debug) if ($no_debug)
...@@ -23,25 +20,26 @@ if ($no_debug) ...@@ -23,25 +20,26 @@ if ($no_debug)
if ($do_file_tests) if ($do_file_tests)
{ {
let $ls_file= $MYSQLTEST_VARDIR/master-data/test/tmp2;
# List the files belonging to the table t1 # List the files belonging to the table t1
--exec ls $MYSQLTEST_VARDIR/master-data/test/t1* > $MYSQLTEST_VARDIR/master-data/test/tmp2 || true --list_files_write_file $ls_file $MYSQLTEST_VARDIR/master-data/test t1*
--chmod 0644 $ls_file
if ($with_directories) if ($with_directories)
{ {
--exec ls $MYSQLTEST_VARDIR/tmp/t1* >> $MYSQLTEST_VARDIR/master-data/test/tmp2 || true --list_files_append_file $ls_file $MYSQLTEST_VARDIR/tmp t1*
} }
eval SET @aux = CONCAT('load_file(''$MYSQLTEST_VARDIR','/master-data/test/tmp2'')'); eval SET @aux = load_file('$ls_file');
let $file_list= `SELECT @aux`;
} }
if (!$do_file_tests) if (!$do_file_tests)
{ {
let $file_list= '--- not determined ---'; SET @aux = '--- not determined ---';
} }
# UPDATE the current filelist of the table t1 within t0_definition # UPDATE the current filelist of the table t1 within t0_definition
# Note: This list should be empty, because the table t1 was dropped ! # Note: This list should be empty, because the table t1 was dropped !
eval INSERT INTO t0_definition SET state = 'old', file_list = $file_list eval INSERT INTO t0_definition SET state = 'old', file_list = @aux
ON DUPLICATE KEY UPDATE file_list = $file_list; ON DUPLICATE KEY UPDATE file_list = @aux;
# eval UPDATE t0_definition SET file_list = $file_list WHERE state = 'old'; # eval UPDATE t0_definition SET file_list = @aux WHERE state = 'old';
# Check if filelist is empty. # Check if filelist is empty.
let $found_garbage= `SELECT file_list <> '' FROM t0_definition WHERE state = 'old'`; let $found_garbage= `SELECT file_list <> '' FROM t0_definition WHERE state = 'old'`;
......
...@@ -10,5 +10,5 @@ eval SHOW CREATE TABLE t1; ...@@ -10,5 +10,5 @@ eval SHOW CREATE TABLE t1;
if ($ls) if ($ls)
{ {
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--exec ls $MYSQLTEST_VARDIR/master-data/test/t1* --list_files $MYSQLTEST_VARDIR/master-data/test t1*
} }
...@@ -38,12 +38,12 @@ if ($do_file_tests) ...@@ -38,12 +38,12 @@ if ($do_file_tests)
{ {
# List the files belonging to the table t1 # List the files belonging to the table t1
let $ls_file= $MYSQLTEST_VARDIR/master-data/test/tmp2; let $ls_file= $MYSQLTEST_VARDIR/master-data/test/tmp2;
let $err_file= $MYSQLTEST_VARDIR/master-data/test/err2; --list_files_write_file $ls_file $MYSQLTEST_VARDIR/master-data/test t1*
--exec ls $MYSQLTEST_VARDIR/master-data/test/t1* > $ls_file 2>$err_file || true --chmod 0644 $ls_file
if ($with_directories) if ($with_directories)
{ {
--exec ls $MYSQLTEST_VARDIR/mysql-test-data-dir/t1* >> $ls_file 2>>$err_file || true --list_files_append_file $ls_file $MYSQLTEST_VARDIR/mysql-test-data-dir t1*
--exec ls $MYSQLTEST_VARDIR/mysql-test-idx-dir/t1* >> $ls_file 2>>$err_file || true --list_files_append_file $ls_file $MYSQLTEST_VARDIR/mysql-test-idx-dir t1*
} }
eval SET @aux = load_file('$ls_file'); eval SET @aux = load_file('$ls_file');
} }
......
...@@ -14,9 +14,6 @@ ...@@ -14,9 +14,6 @@
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
# Original Author: mleich # # Original Author: mleich #
# Original Date: 2006-03-05 # # Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
# Change: #
################################################################################ ################################################################################
if ($no_debug) if ($no_debug)
...@@ -34,12 +31,12 @@ if ($do_file_tests) ...@@ -34,12 +31,12 @@ if ($do_file_tests)
{ {
# List the files belonging to the table t1 # List the files belonging to the table t1
let $ls_file= $MYSQLTEST_VARDIR/master-data/test/tmp2; let $ls_file= $MYSQLTEST_VARDIR/master-data/test/tmp2;
let $err_file= $MYSQLTEST_VARDIR/master-data/test/err2; --list_files_write_file $ls_file $MYSQLTEST_VARDIR/master-data/test t1*
--exec ls $MYSQLTEST_VARDIR/master-data/test/t1* > $ls_file 2>$err_file || true --chmod 0644 $ls_file
if ($with_directories) if ($with_directories)
{ {
--exec ls $MYSQLTEST_VARDIR/mysql-test-data-dir/t1* >> $ls_file 2>>$err_file || true --list_files_append_file $ls_file $MYSQLTEST_VARDIR/mysql-test-data-dir t1*
--exec ls $MYSQLTEST_VARDIR/mysql-test-idx-dir/t1* >> $ls_file 2>>$err_file || true --list_files_append_file $ls_file $MYSQLTEST_VARDIR/mysql-test-idx-dir t1*
} }
eval SET @aux = load_file('$ls_file'); eval SET @aux = load_file('$ls_file');
} }
......
...@@ -662,12 +662,12 @@ t1 CREATE TABLE `t1` ( ...@@ -662,12 +662,12 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,2)) (PARTITION part1 VALUES IN (NULL) ENGINE = MyISAM, PARTITION part3 VALUES IN (1) ENGINE = MyISAM) */ ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,2)) (PARTITION part1 VALUES IN (NULL) ENGINE = MyISAM, PARTITION part3 VALUES IN (1) ENGINE = MyISAM) */
unified filelist unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD t1#P#part1.MYD
$MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI t1#P#part1.MYI
$MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYD t1#P#part3.MYD
$MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYI t1#P#part3.MYI
$MYSQLTEST_VARDIR/master-data/test/t1.frm t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par t1.par
DROP TABLE t1; DROP TABLE t1;
# 3.5.3 Reveal that IN (...NULL) is not mapped to IN(0) # 3.5.3 Reveal that IN (...NULL) is not mapped to IN(0)
...@@ -694,14 +694,14 @@ t1 CREATE TABLE `t1` ( ...@@ -694,14 +694,14 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,2)) (PARTITION part1 VALUES IN (NULL) ENGINE = MyISAM, PARTITION part2 VALUES IN (0) ENGINE = MyISAM, PARTITION part3 VALUES IN (1) ENGINE = MyISAM) */ ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,2)) (PARTITION part1 VALUES IN (NULL) ENGINE = MyISAM, PARTITION part2 VALUES IN (0) ENGINE = MyISAM, PARTITION part3 VALUES IN (1) ENGINE = MyISAM) */
unified filelist unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD t1#P#part1.MYD
$MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI t1#P#part1.MYI
$MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD t1#P#part2.MYD
$MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI t1#P#part2.MYI
$MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYD t1#P#part3.MYD
$MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYI t1#P#part3.MYI
$MYSQLTEST_VARDIR/master-data/test/t1.frm t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par t1.par
DROP TABLE t1; DROP TABLE t1;
...@@ -734,10 +734,10 @@ t1 CREATE TABLE `t1` ( ...@@ -734,10 +734,10 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) */ ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) */
unified filelist unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD t1#P#p0.MYD
$MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI t1#P#p0.MYI
$MYSQLTEST_VARDIR/master-data/test/t1.frm t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par t1.par
DROP TABLE t1; DROP TABLE t1;
# 4.1.2 no partition number, named partitions # 4.1.2 no partition number, named partitions
...@@ -761,12 +761,12 @@ t1 CREATE TABLE `t1` ( ...@@ -761,12 +761,12 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION part1 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM) */ ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION part1 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM) */
unified filelist unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD t1#P#part1.MYD
$MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI t1#P#part1.MYI
$MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD t1#P#part2.MYD
$MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI t1#P#part2.MYI
$MYSQLTEST_VARDIR/master-data/test/t1.frm t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par t1.par
DROP TABLE t1; DROP TABLE t1;
# 4.1.3 variations on no partition/subpartition number, named partitions, # 4.1.3 variations on no partition/subpartition number, named partitions,
...@@ -852,20 +852,20 @@ t1 CREATE TABLE `t1` ( ...@@ -852,20 +852,20 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int1) (PARTITION part1 VALUES LESS THAN (10) (SUBPARTITION subpart11 ENGINE = MyISAM, SUBPARTITION subpart12 ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (20) (SUBPARTITION subpart21 ENGINE = MyISAM, SUBPARTITION subpart22 ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (2147483646) (SUBPARTITION subpart31 ENGINE = MyISAM, SUBPARTITION subpart32 ENGINE = MyISAM)) */ ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int1) (PARTITION part1 VALUES LESS THAN (10) (SUBPARTITION subpart11 ENGINE = MyISAM, SUBPARTITION subpart12 ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (20) (SUBPARTITION subpart21 ENGINE = MyISAM, SUBPARTITION subpart22 ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (2147483646) (SUBPARTITION subpart31 ENGINE = MyISAM, SUBPARTITION subpart32 ENGINE = MyISAM)) */
unified filelist unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD t1#P#part1#SP#subpart11.MYD
$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI t1#P#part1#SP#subpart11.MYI
$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD t1#P#part1#SP#subpart12.MYD
$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI t1#P#part1#SP#subpart12.MYI
$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD t1#P#part2#SP#subpart21.MYD
$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI t1#P#part2#SP#subpart21.MYI
$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD t1#P#part2#SP#subpart22.MYD
$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI t1#P#part2#SP#subpart22.MYI
$MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYD t1#P#part3#SP#subpart31.MYD
$MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYI t1#P#part3#SP#subpart31.MYI
$MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYD t1#P#part3#SP#subpart32.MYD
$MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYI t1#P#part3#SP#subpart32.MYI
$MYSQLTEST_VARDIR/master-data/test/t1.frm t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par t1.par
DROP TABLE t1; DROP TABLE t1;
#------------------------------------------------------------------------ #------------------------------------------------------------------------
...@@ -893,12 +893,12 @@ t1 CREATE TABLE `t1` ( ...@@ -893,12 +893,12 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) PARTITIONS 2 */ ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) PARTITIONS 2 */
unified filelist unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD t1#P#p0.MYD
$MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI t1#P#p0.MYI
$MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD t1#P#p1.MYD
$MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI t1#P#p1.MYI
$MYSQLTEST_VARDIR/master-data/test/t1.frm t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par t1.par
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 ( CREATE TABLE t1 (
...@@ -924,16 +924,16 @@ t1 CREATE TABLE `t1` ( ...@@ -924,16 +924,16 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION part1 VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION part2 VALUES LESS THAN (2147483646) ENGINE = MyISAM) */ ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION part1 VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION part2 VALUES LESS THAN (2147483646) ENGINE = MyISAM) */
unified filelist unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD t1#P#part1#SP#part1sp0.MYD
$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYI t1#P#part1#SP#part1sp0.MYI
$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYD t1#P#part1#SP#part1sp1.MYD
$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYI t1#P#part1#SP#part1sp1.MYI
$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYD t1#P#part2#SP#part2sp0.MYD
$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYI t1#P#part2#SP#part2sp0.MYI
$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYD t1#P#part2#SP#part2sp1.MYD
$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYI t1#P#part2#SP#part2sp1.MYI
$MYSQLTEST_VARDIR/master-data/test/t1.frm t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par t1.par
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 ( CREATE TABLE t1 (
...@@ -956,10 +956,10 @@ t1 CREATE TABLE `t1` ( ...@@ -956,10 +956,10 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) PARTITIONS 1 */ ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) PARTITIONS 1 */
unified filelist unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD t1#P#p0.MYD
$MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI t1#P#p0.MYI
$MYSQLTEST_VARDIR/master-data/test/t1.frm t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par t1.par
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 ( CREATE TABLE t1 (
...@@ -985,12 +985,12 @@ t1 CREATE TABLE `t1` ( ...@@ -985,12 +985,12 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 1 (PARTITION part1 VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION part2 VALUES LESS THAN (2147483646) ENGINE = MyISAM) */ ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 1 (PARTITION part1 VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION part2 VALUES LESS THAN (2147483646) ENGINE = MyISAM) */
unified filelist unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD t1#P#part1#SP#part1sp0.MYD
$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYI t1#P#part1#SP#part1sp0.MYI
$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYD t1#P#part2#SP#part2sp0.MYD
$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYI t1#P#part2#SP#part2sp0.MYI
$MYSQLTEST_VARDIR/master-data/test/t1.frm t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par t1.par
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 ( CREATE TABLE t1 (
...@@ -1732,12 +1732,12 @@ t1 CREATE TABLE `t1` ( ...@@ -1732,12 +1732,12 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION part1 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM) */ ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION part1 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM) */
unified filelist unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD t1#P#part1.MYD
$MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI t1#P#part1.MYI
$MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD t1#P#part2.MYD
$MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI t1#P#part2.MYI
$MYSQLTEST_VARDIR/master-data/test/t1.frm t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par t1.par
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 ( CREATE TABLE t1 (
...@@ -1766,16 +1766,16 @@ t1 CREATE TABLE `t1` ( ...@@ -1766,16 +1766,16 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int1) (PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11 ENGINE = MyISAM, SUBPARTITION subpart12 ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (2147483646) (SUBPARTITION subpart21 ENGINE = MyISAM, SUBPARTITION subpart22 ENGINE = MyISAM)) */ ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int1) (PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11 ENGINE = MyISAM, SUBPARTITION subpart12 ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (2147483646) (SUBPARTITION subpart21 ENGINE = MyISAM, SUBPARTITION subpart22 ENGINE = MyISAM)) */
unified filelist unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD t1#P#part1#SP#subpart11.MYD
$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI t1#P#part1#SP#subpart11.MYI
$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD t1#P#part1#SP#subpart12.MYD
$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI t1#P#part1#SP#subpart12.MYI
$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD t1#P#part2#SP#subpart21.MYD
$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI t1#P#part2#SP#subpart21.MYI
$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD t1#P#part2#SP#subpart22.MYD
$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI t1#P#part2#SP#subpart22.MYI
$MYSQLTEST_VARDIR/master-data/test/t1.frm t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par t1.par
DROP TABLE t1; DROP TABLE t1;
# 4.3.2 (positive) number of partition/subpartition , # 4.3.2 (positive) number of partition/subpartition ,
......
...@@ -417,4 +417,13 @@ insert into t1 values (),(),(),(),(),(),(),(),(),(); ...@@ -417,4 +417,13 @@ insert into t1 values (),(),(),(),(),(),(),(),(),();
select a from t1 where a not in (a,a,a) group by a; select a from t1 where a not in (a,a,a) group by a;
drop table t1; drop table t1;
#
# Bug #37761: IN handles NULL differently for table-subquery and value-list
#
create table t1 (id int);
select * from t1 where NOT id in (select null union all select 1);
select * from t1 where NOT id in (null, 1);
drop table t1;
--echo End of 5.1 tests --echo End of 5.1 tests
...@@ -426,6 +426,25 @@ drop table t1; ...@@ -426,6 +426,25 @@ drop table t1;
# #
SELECT NAME_CONST('var', 'value') COLLATE latin1_general_cs; SELECT NAME_CONST('var', 'value') COLLATE latin1_general_cs;
#
# Bug #35848: UUID() returns UUIDs with the wrong time
#
select @@session.time_zone into @save_tz;
# make sure all times are UTC so the DayNr won't differ
set @@session.time_zone='UTC';
select uuid() into @my_uuid;
# if version nibble isn't 1, the following calculations will be rubbish
select mid(@my_uuid,15,1);
select 24 * 60 * 60 * 1000 * 1000 * 10 into @my_uuid_one_day;
select concat('0',mid(@my_uuid,16,3),mid(@my_uuid,10,4),left(@my_uuid,8)) into @my_uuidate;
select floor(conv(@my_uuidate,16,10)/@my_uuid_one_day) into @my_uuid_date;
select 141427 + datediff(curdate(),'1970-01-01') into @my_uuid_synthetic;
# these should be identical; date part of UUID should be current date
select @my_uuid_date - @my_uuid_synthetic;
set @@session.time_zone=@save_tz;
--echo End of 5.0 tests --echo End of 5.0 tests
# #
......
This diff is collapsed.
...@@ -2117,10 +2117,22 @@ mkdir $MYSQLTEST_VARDIR/tmp/testdir; ...@@ -2117,10 +2117,22 @@ mkdir $MYSQLTEST_VARDIR/tmp/testdir;
write_file $MYSQLTEST_VARDIR/tmp/testdir/file1.txt; write_file $MYSQLTEST_VARDIR/tmp/testdir/file1.txt;
hello hello
EOF EOF
list_files $MYSQLTEST_VARDIR/tmp/testdir;
# list_files gets the directory list before creating the new file
list_files_write_file $MYSQLTEST_VARDIR/tmp/testdir/file2.txt $MYSQLTEST_VARDIR/tmp/testdir *;
list_files_append_file $MYSQLTEST_VARDIR/tmp/testdir/file2.txt $MYSQLTEST_VARDIR/tmp/testdir *2*;
list_files_write_file $MYSQLTEST_VARDIR/tmp/testdir/file2.txt $MYSQLTEST_VARDIR/tmp/testdir file?.txt;
list_files_append_file $MYSQLTEST_VARDIR/tmp/testdir/file3.txt $MYSQLTEST_VARDIR/tmp/testdir file*.txt;
diff_files $MYSQLTEST_VARDIR/tmp/testdir/file2.txt $MYSQLTEST_VARDIR/tmp/testdir/file3.txt;
--error 1 --error 1
rmdir $MYSQLTEST_VARDIR/tmp/testdir; rmdir $MYSQLTEST_VARDIR/tmp/testdir;
cat_file $MYSQLTEST_VARDIR/tmp/testdir/file3.txt;
remove_file $MYSQLTEST_VARDIR/tmp/testdir/file1.txt; remove_file $MYSQLTEST_VARDIR/tmp/testdir/file1.txt;
remove_file $MYSQLTEST_VARDIR/tmp/testdir/file2.txt;
remove_file $MYSQLTEST_VARDIR/tmp/testdir/file3.txt;
rmdir $MYSQLTEST_VARDIR/tmp/testdir; rmdir $MYSQLTEST_VARDIR/tmp/testdir;
# #
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment