Commit 34741c74 authored by unknown's avatar unknown

Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime

into  quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/mrg0306/51


client/mysqltest.c:
  Auto merged
include/my_pthread.h:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/sp.result:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
mysys/my_wincond.c:
  Auto merged
sql/event_queue.cc:
  Auto merged
sql/field.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_load.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_trigger.cc:
  Auto merged
client/mysql_upgrade.c:
  Manual merge; I chose to keep Magnus' changes because they make the code
  more simple; always use *only* the option file created by mysql_upgrade.
mysql-test/extra/binlog_tests/ctype_cp932.test:
  Manual merge
mysql-test/r/binlog_row_ctype_cp932.result:
  Manual merge
mysql-test/r/binlog_stm_ctype_cp932.result:
  Manual merge
mysql-test/r/mysqlbinlog.result:
  Manual merge
mysql-test/r/rpl_switch_stm_row_mixed.result:
  Manual merge
mysql-test/t/mysqlbinlog.test:
  Manual merge
mysql-test/t/rpl_switch_stm_row_mixed.test:
  Manual merge
parents a4cf4d97 409463b7
......@@ -1249,6 +1249,7 @@ mysql-test/*.ds?
mysql-test/*.vcproj
mysql-test/gmon.out
mysql-test/install_test_db
mysql-test/lib/init_db.sql
mysql-test/mtr
mysql-test/mysql-test-run
mysql-test/mysql-test-run-shell
......@@ -1813,6 +1814,7 @@ scripts/mysql_explain_log
scripts/mysql_find_rows
scripts/mysql_fix_extensions
scripts/mysql_fix_privilege_tables
scripts/mysql_fix_privilege_tables.sql
scripts/mysql_install_db
scripts/mysql_secure_installation
scripts/mysql_setpermission
......
......@@ -96,3 +96,6 @@ TARGET_LINK_LIBRARIES(mysqladmin mysqlclient mysys dbug yassl taocrypt zlib wsoc
ADD_EXECUTABLE(mysqlslap mysqlslap.c)
TARGET_LINK_LIBRARIES(mysqlslap mysqlclient mysys yassl taocrypt zlib wsock32 dbug)
ADD_EXECUTABLE(echo echo.c)
......@@ -96,6 +96,7 @@ DEFS = -DUNDEF_THREADS_HACK \
sql_src=log_event.h mysql_priv.h log_event.cc my_decimal.h my_decimal.cc
strings_src=decimal.c
EXTRA_DIST = get_password.c CMakeLists.txt echo.c
link_sources:
for f in $(sql_src) ; do \
......
/* Copyright (C) 2000 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/*
echo is a replacement for the "echo" command builtin to cmd.exe
on Windows, to get a Unix eqvivalent behaviour when running commands
like:
$> echo "hello" | mysql
The windows "echo" would have sent "hello" to mysql while
Unix echo will send hello without the enclosing hyphens
This is a very advanced high tech program so take care when
you change it and remember to valgrind it before production
use.
*/
#include <stdio.h>
int main(int argc, char **argv)
{
int i;
for (i= 1; i < argc; i++)
{
fprintf(stdout, "%s", argv[i]);
if (i < argc - 1)
fprintf(stdout, " ");
}
fprintf(stdout, "\n");
return 0;
}
......@@ -54,6 +54,8 @@ static char *default_dbug_option= (char*) "d:t:O,/tmp/mysql_upgrade.trace";
#endif
static my_bool info_flag= 0, tty_password= 0;
static char **defaults_argv;
static struct my_option my_long_options[]=
{
{"help", '?', "Display this help message and exit.", 0, 0, 0, GET_NO_ARG,
......@@ -282,6 +284,10 @@ static int create_defaults_file(const char *path, const char *forced_path)
DYNAMIC_STRING buf;
extra_default_t *d;
DBUG_ENTER("create_defaults_file");
DBUG_PRINT("enter", ("path: %s, forced_path: %s", path, forced_path));
/* Delete any previous defaults file generated by mysql_upgrade */
my_delete(path, MYF(0));
defaults_file= my_open(path, O_BINARY | O_CREAT | O_WRONLY | O_EXCL,
......@@ -298,6 +304,7 @@ static int create_defaults_file(const char *path, const char *forced_path)
goto error;
}
/* Copy forced_path file into the defaults_file being generated */
if (forced_path)
{
forced_file= my_open(forced_path, O_RDONLY, MYF(MY_FAE | MY_WME));
......@@ -306,6 +313,7 @@ static int create_defaults_file(const char *path, const char *forced_path)
ret= 1;
goto error;
}
DBUG_PRINT("info", ("Copying from %s to %s", forced_path, path));
do
{
cnt= my_read(forced_file, buf.str, buf.max_length, MYF(MY_WME));
......@@ -316,10 +324,12 @@ static int create_defaults_file(const char *path, const char *forced_path)
my_close(forced_file, MYF(0));
goto error;
}
DBUG_PRINT("info", ("%s", buf.str));
} while (cnt == buf.max_length);
my_close(forced_file, MYF(0));
}
/* Write all extra_default options into the [client] section */
dynstr_set(&buf, "\n[client]");
if (opt_password)
{
......@@ -330,6 +340,7 @@ static int create_defaults_file(const char *path, const char *forced_path)
goto error;
}
}
DBUG_PRINT("info", ("Writing extra_defaults to file"));
while (extra_defaults)
{
int len;
......@@ -338,6 +349,7 @@ static int create_defaults_file(const char *path, const char *forced_path)
len= d->n_len + d->v_len + 1;
if (buf.length + len >= buf.max_length) /* to avoid realloc() */
{
if (my_write(defaults_file, buf.str, buf.length, MYF(MY_FNABP | MY_WME)))
{
ret= 1;
......@@ -353,9 +365,8 @@ static int create_defaults_file(const char *path, const char *forced_path)
ret= 1;
goto error;
}
my_delete((gptr)d, MYF(0));
DBUG_PRINT("info", ("%s", buf.str));
my_free((gptr) d, MYF(0));
list_pop(extra_defaults); /* pop off the head */
}
if (my_write(defaults_file, buf.str, buf.length, MYF(MY_FNABP | MY_WME)))
......@@ -375,7 +386,7 @@ static int create_defaults_file(const char *path, const char *forced_path)
my_delete(path, MYF(0));
out:
return ret;
DBUG_RETURN(ret);
}
......@@ -452,12 +463,8 @@ int main(int argc, char **argv)
char *forced_defaults_file;
char *forced_extra_defaults;
char *local_defaults_group_suffix;
const char *script_line;
char *upgrade_defaults_path= NULL;
char *defaults_to_use= NULL;
int upgrade_defaults_created= 0;
int no_defaults;
char path[FN_REFLEN];
char path[FN_REFLEN], upgrade_defaults_path[FN_REFLEN];
DYNAMIC_STRING cmdline;
MY_INIT(argv[0]);
......@@ -466,15 +473,12 @@ int main(int argc, char **argv)
#endif
/* Check if we are forced to use specific defaults */
no_defaults= 0;
if (argc >= 2 && !strcmp(argv[1],"--no-defaults"))
no_defaults= 1;
get_defaults_options(argc, argv,
&forced_defaults_file, &forced_extra_defaults,
&local_defaults_group_suffix);
load_defaults("my", load_default_groups, &argc, &argv);
defaults_argv= argv;
/*
Must init_dynamic_string before handle_options because string is freed
......@@ -522,25 +526,19 @@ int main(int argc, char **argv)
goto error;
}
/*
Create the modified defaults file to be used by mysqlcheck
and mysql tools
/*
Create the modified defaults file to be used by mysqlcheck
and mysql command line client
*/
fn_format(path, UPGRADE_DEFAULTS_NAME, datadir, "", MYF(0));
upgrade_defaults_path= my_strdup(path, MYF(0));
if (extra_defaults)
{
ret= create_defaults_file(upgrade_defaults_path, forced_extra_defaults);
if (ret)
goto error;
defaults_to_use= upgrade_defaults_path;
upgrade_defaults_created= 1;
}
else
defaults_to_use= forced_extra_defaults;
fn_format(upgrade_defaults_path, UPGRADE_DEFAULTS_NAME, datadir, "", MYF(0));
create_defaults_file(upgrade_defaults_path, forced_extra_defaults);
/*
Read the mysql_upgrade_info file to check if mysql_upgrade
already has been done
Maybe this could be done a little earlier?
*/
if (!find_file(MYSQL_UPGRADE_INFO_NAME, datadir, MY_SEARCH_SELF,
path, sizeof(path), NULL, NullS)
&& !opt_force)
......@@ -559,7 +557,9 @@ int main(int argc, char **argv)
goto fix_priv_tables;
}
}
/* Find mysqlcheck */
if (find_file(mysqlcheck_name, basedir, MYF(0), path, sizeof(path),
"bin", EXTRA_CLIENT_PATHS, NullS))
{
......@@ -581,15 +581,13 @@ int main(int argc, char **argv)
dynstr_append_os_quoted(&cmdline, path, NullS);
}
if (defaults_to_use)
{
dynstr_append(&cmdline, " ");
dynstr_append_os_quoted(&cmdline,
(no_defaults ? "--defaults-file=" :
"--defaults-extra-file="),
defaults_to_use, NullS);
}
/*
All settings have been written to the "upgrade_defaults_path"
instruct mysqlcheck to only read options from that file
*/
dynstr_append(&cmdline, " ");
dynstr_append_os_quoted(&cmdline, "--defaults-file=",
upgrade_defaults_path, NullS);
dynstr_append(&cmdline, " ");
dynstr_append_os_quoted(&cmdline, "--check-upgrade", NullS);
dynstr_append(&cmdline, " ");
......@@ -602,9 +600,10 @@ int main(int argc, char **argv)
dynstr_append(&cmdline, "\"");
#endif /* __WIN__ */
/* Execute mysqlcheck */
if (opt_verbose)
printf("Running %s\n", cmdline.str);
DBUG_PRINT("info", ("Running: %s", cmdline.str));
ret= system(cmdline.str);
if (ret)
{
......@@ -618,6 +617,7 @@ int main(int argc, char **argv)
goto error;
fix_priv_tables:
/* Find mysql */
if (find_file(mysql_name, basedir, MYF(0), path, sizeof(path),
"bin", EXTRA_CLIENT_PATHS, NullS))
{
......@@ -639,6 +639,7 @@ int main(int argc, char **argv)
dynstr_append_os_quoted(&cmdline, path, NullS);
}
/* Find mysql_fix_privililege_tables.sql */
if (find_file(MYSQL_FIX_PRIV_TABLES_NAME, basedir, MYF(0),
path, sizeof(path),
"support_files", "share", "share/mysql", "scripts",
......@@ -654,17 +655,14 @@ int main(int argc, char **argv)
" where MySQL is installed");
goto error;
}
else
script_line= my_strdup(path, MYF(0));
if (defaults_to_use)
{
dynstr_append(&cmdline, " ");
dynstr_append_os_quoted(&cmdline,
(no_defaults ? "--defaults-file=" :
"--defaults-extra-file="),
defaults_to_use, NullS);
}
/*
All settings have been written to the "upgrade_defaults_path",
instruct mysql to only read options from that file
*/
dynstr_append(&cmdline, " ");
dynstr_append_os_quoted(&cmdline, "--defaults-file=",
upgrade_defaults_path, NullS);
dynstr_append(&cmdline, " ");
dynstr_append_os_quoted(&cmdline, "--force", NullS);
dynstr_append(&cmdline, " ");
......@@ -676,14 +674,15 @@ int main(int argc, char **argv)
dynstr_append(&cmdline, " ");
dynstr_append_os_quoted(&cmdline, "--database=mysql", NullS);
dynstr_append(&cmdline, " < ");
dynstr_append_os_quoted(&cmdline, script_line, NullS);
dynstr_append_os_quoted(&cmdline, path, NullS);
#ifdef __WIN__
dynstr_append(&cmdline, "\"");
#endif /* __WIN__ */
/* Execute "mysql --force < mysql_fix_privilege_tables.sql" */
if (opt_verbose)
printf("Running %s\n", cmdline.str);
DBUG_PRINT("info", ("Running: %s", cmdline.str));
ret= system(cmdline.str);
if (ret)
fprintf(stderr, "Error executing '%s'\n", cmdline.str);
......@@ -691,10 +690,10 @@ int main(int argc, char **argv)
error:
dynstr_free(&cmdline);
if (upgrade_defaults_created)
my_delete(upgrade_defaults_path, MYF(0));
my_free(upgrade_defaults_path, MYF(MY_ALLOW_ZERO_PTR));
/* Delete the generated defaults file */
my_delete(upgrade_defaults_path, MYF(0));
free_defaults(defaults_argv);
my_end(info_flag ? MY_CHECK_ERROR : 0);
return ret;
}
......
This diff is collapsed.
......@@ -19,7 +19,7 @@ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
ADD_EXECUTABLE(comp_err comp_err.c)
TARGET_LINK_LIBRARIES(comp_err dbug mysys strings wsock32)
TARGET_LINK_LIBRARIES(comp_err dbug mysys strings zlib wsock32)
GET_TARGET_PROPERTY(COMP_ERR_EXE comp_err LOCATION)
......
......@@ -16,7 +16,8 @@
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
-I$(top_srcdir)/sql
LDADD = @CLIENT_EXTRA_LDFLAGS@ ../mysys/libmysys.a \
../dbug/libdbug.a ../strings/libmystrings.a
../dbug/libdbug.a ../strings/libmystrings.a \
$(ZLIB_LIBS)
BUILT_SOURCES= $(top_builddir)/include/mysqld_error.h \
$(top_builddir)/include/sql_state.h \
$(top_builddir)/include/mysqld_ername.h
......
......@@ -134,6 +134,8 @@ static struct message *parse_message_string(struct message *new_message,
char *str);
static struct message *find_message(struct errors *err, const char *lang,
my_bool no_default);
static int check_message_format(struct errors *err,
const char* mess);
static int parse_input_file(const char *file_name, struct errors **top_error,
struct languages **top_language);
static int get_options(int *argc, char ***argv);
......@@ -462,6 +464,13 @@ static int parse_input_file(const char *file_name, struct errors **top_error,
current_error->er_name, current_message.lang_short_name);
DBUG_RETURN(0);
}
if (check_message_format(current_error, current_message.text))
{
fprintf(stderr, "Wrong formatspecifier of error message string"
" for error '%s' in language '%s'\n",
current_error->er_name, current_message.lang_short_name);
DBUG_RETURN(0);
}
if (insert_dynamic(&current_error->msg, (byte *) & current_message))
DBUG_RETURN(0);
continue;
......@@ -603,6 +612,116 @@ static struct message *find_message(struct errors *err, const char *lang,
}
/*
Check message format specifiers against error message for
previous language
SYNOPSIS
checksum_format_specifier()
msg String for which to generate checksum
for the format specifiers
RETURN VALUE
Returns the checksum for all the characters of the
format specifiers
Ex.
"text '%-64.s' text part 2 %d'"
^^^^^^ ^^
characters will be xored to form checksum
NOTE:
Does not support format specifiers with positional args
like "%2$s" but that is not yet supported by my_vsnprintf
either.
*/
static char checksum_format_specifier(const char* msg)
{
char chksum= 0;
const char* p= msg;
const char* start= 0;
int num_format_specifiers= 0;
while (*p)
{
if (*p == '%')
{
start= p+1; /* Entering format specifier */
num_format_specifiers++;
}
else if (start)
{
switch(*p)
{
case 'd':
case 'u':
case 'x':
case 's':
chksum= my_checksum(chksum, start, p-start);
start= 0; /* Not in format specifier anymore */
break;
default:
break;
}
}
p++;
}
if (start)
{
/* Still inside a format specifier after end of string */
fprintf(stderr, "Still inside formatspecifier after end of string"
" in'%s'\n", msg);
DBUG_ASSERT(start==0);
}
/* Add number of format specifiers to checksum as extra safeguard */
chksum+= num_format_specifiers;
return chksum;
}
/*
Check message format specifiers against error message for
previous language
SYNOPSIS
check_message_format()
err Error to check message for
mess Message to check
RETURN VALUE
Returns 0 if no previous error message or message format is ok
*/
static int check_message_format(struct errors *err,
const char* mess)
{
struct message *first;
DBUG_ENTER("check_message_format");
/* Get first message(if any) */
if ((err->msg).elements == 0)
DBUG_RETURN(0); /* No previous message to compare against */
first= dynamic_element(&err->msg, 0, struct message*);
DBUG_ASSERT(first != NULL);
if (checksum_format_specifier(first->text) !=
checksum_format_specifier(mess))
{
/* Check sum of format specifiers failed, they should be equal */
DBUG_RETURN(1);
}
DBUG_RETURN(0);
}
/*
Skips spaces and or tabs till the beginning of the next word
Returns pointer to the beginning of the first character of the word
......
......@@ -858,9 +858,9 @@ inline T1 SaturatingSubtract(T1 a, T2 b)
// declares
unsigned int BytePrecision(unsigned long value);
unsigned int BitPrecision(unsigned long);
unsigned long Crop(unsigned long value, unsigned int size);
unsigned int BytePrecision(word value);
unsigned int BitPrecision(word);
word Crop(word value, unsigned int size);
......
......@@ -122,7 +122,7 @@ void xorbuf(byte* buf, const byte* mask, unsigned int count)
}
unsigned int BytePrecision(unsigned long value)
unsigned int BytePrecision(word value)
{
unsigned int i;
for (i=sizeof(value); i; --i)
......@@ -133,7 +133,7 @@ unsigned int BytePrecision(unsigned long value)
}
unsigned int BitPrecision(unsigned long value)
unsigned int BitPrecision(word value)
{
if (!value)
return 0;
......@@ -154,7 +154,7 @@ unsigned int BitPrecision(unsigned long value)
}
unsigned long Crop(unsigned long value, unsigned int size)
word Crop(word value, unsigned int size)
{
if (size < 8*sizeof(value))
return (value & ((1L << size) - 1));
......
......@@ -30,15 +30,15 @@ extern uchar days_in_month[];
/*
Portable time_t replacement.
Should be signed and hold seconds for 1902-2038 range.
*/
#if defined(_WIN64) || defined(WIN64)
/* on Win64 long is still 4 bytes (not 8!) */
typedef LONG64 my_time_t;
#else
typedef time_t my_time_t;
Should be signed and hold seconds for 1902 -- 2038-01-19 range
i.e at least a 32bit variable
Using the system built in time_t is not an option as
we rely on the above requirements in the time functions
#endif
For example QNX has an unsigned time_t type
*/
typedef long my_time_t;
#define MY_TIME_T_MAX LONG_MAX
#define MY_TIME_T_MIN LONG_MIN
......
......@@ -1361,7 +1361,7 @@ mysql_stat(MYSQL *mysql)
{
DBUG_ENTER("mysql_stat");
if (simple_command(mysql,COM_STATISTICS,0,0,0))
return mysql->net.last_error;
DBUG_RETURN(mysql->net.last_error);
DBUG_RETURN((*mysql->methods->read_statistics)(mysql));
}
......
......@@ -70,7 +70,6 @@ dist-hook:
$(INSTALL_DATA) $(srcdir)/std_data/*.cnf $(distdir)/std_data
$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup50/BACKUP* $(distdir)/std_data/ndb_backup50
$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup51/BACKUP* $(distdir)/std_data/ndb_backup51
$(INSTALL_DATA) $(srcdir)/lib/init_db.sql $(distdir)/lib
$(INSTALL_DATA) $(srcdir)/lib/*.pl $(distdir)/lib
install-data-local:
......@@ -112,7 +111,6 @@ install-data-local:
$(INSTALL_DATA) $(srcdir)/std_data/*.cnf $(DESTDIR)$(testdir)/std_data
$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup50/BACKUP* $(DESTDIR)$(testdir)/std_data/ndb_backup50
$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup51/BACKUP* $(DESTDIR)$(testdir)/std_data/ndb_backup51
$(INSTALL_DATA) $(srcdir)/lib/init_db.sql $(DESTDIR)$(testdir)/lib
$(INSTALL_DATA) $(srcdir)/lib/*.pl $(DESTDIR)$(testdir)/lib
uninstall-local:
......
......@@ -424,3 +424,17 @@ show warnings;
select * from t1;
select hex(a) from t1;
drop table t1;
#
# BUG#16217 - MySQL client misinterpretes multi-byte char as escape `\'
#
# new command \C or charset
--exec $MYSQL --default-character-set=utf8 test -e "\C cp932 \g"
--exec $MYSQL --default-character-set=cp932 test -e "charset utf8;"
# its usage to switch internally in mysql to requested charset
--exec $MYSQL --default-character-set=utf8 test -e "charset cp932; select '\'; create table t1 (c_cp932 TEXT CHARACTER SET cp932); insert into t1 values('\'); select * from t1; drop table t1;"
--exec $MYSQL --default-character-set=utf8 test -e "charset cp932; select '\'"
--exec $MYSQL --default-character-set=utf8 test -e "/*charset cp932 */; set character_set_client= cp932; select '\'"
--exec $MYSQL --default-character-set=utf8 test -e "/*!\C cp932 */; set character_set_client= cp932; select '\'"
......@@ -125,6 +125,8 @@ show slave status;
--error 1220
show binlog events in 'slave-bin.000005' from 4;
connection master;
# The table drops caused Cluster Replication wrapper to fail as event ID would never be the same.# Moving drops here.
DROP TABLE t1;
......@@ -149,3 +151,5 @@ drop table t1;
# End of 4.1 tests
sync_with_master;
......@@ -72,7 +72,7 @@ DROP TABLE test.t2;
# will be created. You will need to go to the mysql-test dir and diff
# the files your self to see what is not matching :-)
--exec diff $MYSQLTEST_VARDIR/tmp/rpl_row_UUID_master.sql $MYSQLTEST_VARDIR/tmp/rpl_row_UUID_slave.sql;
diff_files $MYSQLTEST_VARDIR/tmp/rpl_row_UUID_master.sql $MYSQLTEST_VARDIR/tmp/rpl_row_UUID_slave.sql;
# Cleanup dump files.
# Long-term "system rm" is not portable; we could live without
......
......@@ -179,7 +179,7 @@ connection master;
--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/rpl_row_blob_master.sql
--exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/rpl_row_blob_slave.sql
--exec diff $MYSQLTEST_VARDIR/tmp/rpl_row_blob_master.sql $MYSQLTEST_VARDIR/tmp/rpl_row_blob_slave.sql
diff_files $MYSQLTEST_VARDIR/tmp/rpl_row_blob_master.sql $MYSQLTEST_VARDIR/tmp/rpl_row_blob_slave.sql;
DROP TABLE IF EXISTS test.t1;
DROP TABLE IF EXISTS test.t2;
......
......@@ -80,7 +80,7 @@ SET AUTOCOMMIT=1;
--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/func003_master.sql
--exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/func003_slave.sql
# First lets cleanupi
# First lets cleanup
DROP FUNCTION test.f1;
DROP TABLE test.t1;
......@@ -90,7 +90,7 @@ DROP TABLE test.t1;
# the files yourself to see what is not matching :-) File are located
# in $MYSQLTEST_VARDIR/tmp
exec diff $MYSQLTEST_VARDIR/tmp/func003_master.sql $MYSQLTEST_VARDIR/tmp/func003_slave.sql;
diff_files $MYSQLTEST_VARDIR/tmp/func003_master.sql $MYSQLTEST_VARDIR/tmp/func003_slave.sql;
# End of 5.0 test case
......@@ -84,7 +84,7 @@ DROP DATABASE mysqltest1;
# the files your self to see what is not matching :-) Failed test
# Dump files will be located in $MYSQLTEST_VARDIR/tmp.
exec diff $MYSQLTEST_VARDIR/tmp/sp006_master.sql $MYSQLTEST_VARDIR/tmp/sp006_slave.sql;
diff_files $MYSQLTEST_VARDIR/tmp/sp006_master.sql $MYSQLTEST_VARDIR/tmp/sp006_slave.sql;
sync_slave_with_master;
......
......@@ -12,6 +12,7 @@ DROP TABLE IF EXISTS t2,t3,t4,t5,t6,t9;
--enable_warnings
sync_slave_with_master;
STOP SLAVE;
SET @my_sql_mode= @@global.sql_mode;
SET GLOBAL SQL_MODE='STRICT_ALL_TABLES';
START SLAVE;
......@@ -238,3 +239,6 @@ DROP TABLE IF EXISTS t1_int,t1_bit,t1_char,t1_nodef;
DROP TABLE IF EXISTS t2,t3,t4,t5,t6,t7,t8,t9;
--enable_warnings
sync_slave_with_master;
# Restore sql_mode
SET @@global.sql_mode= @my_sql_mode;
# Allow anonymous users to connect
disable_warnings;
disable_query_log;
INSERT INTO mysql.user (host, user) VALUES ('localhost','');
FLUSH PRIVILEGES;
enable_query_log;
enable_warnings;
# Remove anonymous users added by add_anonymous_users.inc
disable_query_log;
DELETE FROM mysql.user where host='localhost' and user='';
FLUSH PRIVILEGES;
enable_query_log;
--exec $MYSQL test -e 'show processlist' | grep 'Binlog Dump' | cut -f1 > $MYSQLTEST_VARDIR/tmp/bl_dump_thread_id
--exec $MYSQL test -e "show processlist" > $MYSQLTEST_VARDIR/tmp/bl_dump_thread_id
--disable_warnings
drop table if exists t999;
--enable_warnings
create temporary table t999 (f int);
# Create a table to hold the process list
create temporary table t999(
id int,
user char(255),
host char(255),
db char(255),
Command char(255),
time int,
State char(255),
info char(255)
);
# Load processlist into table, headers will create seom warnings
--disable_warnings
--replace_result $MYSQLTEST_VARDIR "."
eval LOAD DATA INFILE "$MYSQLTEST_VARDIR/tmp/bl_dump_thread_id" into table t999;
let $id = `select f from t999`;
--enable_warnings
let $id = `select Id from t999 where Command="Binlog Dump"`;
drop table t999;
......@@ -166,14 +166,14 @@ insert IGNORE into t1 (a) values ('Garbage');
drop table t1;
create table t1 (pk integer primary key auto_increment, fl geometry);
create table t1 (pk integer primary key auto_increment, fl geometry not null);
--error 1416
insert into t1 (fl) values (1);
--error 1416
insert into t1 (fl) values (1.11);
--error 1416
insert into t1 (fl) values ("qwerty");
--error 1416
--error 1048
insert into t1 (fl) values (pointfromtext('point(1,1)'));
drop table t1;
......
This diff is collapsed.
This diff is collapsed.
......@@ -1152,19 +1152,19 @@ select '-- select .. where date/time column = .. --' as test_sequence ;
######## SELECT .. WHERE column(date/time/..)=value(CHAR(n)/LONGTEXT) ########
set @arg00= '1991-01-01 01:01:01' ;
select 'true' as found from t9
where c1= 20 and c13= '1991-01-01 01:01:01' and c14= '1991-01-01 01:01:01' and
where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and
c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and
c17= '1991-01-01 01:01:01' ;
select 'true' as found from t9
where c1= 20 and c13= @arg00 and c14= @arg00 and c15= @arg00 and c16= @arg00
where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00
and c17= @arg00 ;
prepare stmt1 from "select 'true' as found from t9
where c1= 20 and c13= '1991-01-01 01:01:01' and c14= '1991-01-01 01:01:01' and
where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and
c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and
c17= '1991-01-01 01:01:01'" ;
execute stmt1 ;
prepare stmt1 from "select 'true' as found from t9
where c1= 20 and c13= ? and c14= ? and c15= ? and c16= ? and c17= ?" ;
where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ;
execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ;
......@@ -1177,7 +1177,7 @@ where c1= 20 and c13= CAST('1991-01-01 01:01:01' as datetime) and
c16= CAST('1991-01-01 01:01:01' as datetime) and
c17= CAST('1991-01-01 01:01:01' as datetime) ;
select 'true' as found from t9
where c1= 20 and c13= @arg00 and c14= @arg00 and c15= @arg00 and c16= @arg00
where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00
and c17= @arg00 ;
prepare stmt1 from "select 'true' as found from t9
where c1= 20 and c13= CAST('1991-01-01 01:01:01' as datetime) and
......@@ -1187,7 +1187,7 @@ where c1= 20 and c13= CAST('1991-01-01 01:01:01' as datetime) and
c17= CAST('1991-01-01 01:01:01' as datetime)" ;
execute stmt1 ;
prepare stmt1 from "select 'true' as found from t9
where c1= 20 and c13= ? and c14= ? and c15= ? and c16= ? and c17= ?" ;
where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ;
execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ;
......
This diff is collapsed.
......@@ -22,6 +22,7 @@ use strict;
sub mtr_full_hostname ();
sub mtr_short_hostname ();
sub mtr_native_path($);
sub mtr_init_args ($);
sub mtr_add_arg ($$@);
sub mtr_path_exists(@);
......@@ -63,6 +64,16 @@ sub mtr_short_hostname () {
return $hostname;
}
# Convert path to OS native format
sub mtr_native_path($)
{
my $path= shift;
$path=~ s/\//\\/g
if ($::glob_win32);
return $path;
}
# FIXME move to own lib
sub mtr_init_args ($) {
......
......@@ -22,7 +22,7 @@ use Socket;
use Errno;
use strict;
use POSIX 'WNOHANG';
use POSIX qw(WNOHANG SIGHUP);
sub mtr_run ($$$$$$;$);
sub mtr_spawn ($$$$$$;$);
......@@ -139,19 +139,18 @@ sub spawn_impl ($$$$$$$$) {
{
if ( $! == $!{EAGAIN} ) # See "perldoc Errno"
{
mtr_debug("Got EAGAIN from fork(), sleep 1 second and redo");
mtr_warning("Got EAGAIN from fork(), sleep 1 second and redo");
sleep(1);
redo FORK;
}
else
{
mtr_error("$path ($pid) can't be forked");
}
mtr_error("$path ($pid) can't be forked, error: $!");
}
if ( $pid )
{
spawn_parent_impl($pid,$mode,$path);
return spawn_parent_impl($pid,$mode,$path);
}
else
{
......@@ -216,8 +215,11 @@ sub spawn_impl ($$$$$$$$) {
{
mtr_child_error("failed to execute \"$path\": $!");
}
mtr_error("Should never come here 1!");
}
mtr_error("Should never come here 2!");
}
mtr_error("Should never come here 3!");
}
......@@ -230,12 +232,21 @@ sub spawn_parent_impl {
{
if ( $mode eq 'run' )
{
# Simple run of command, we wait for it to return
# Simple run of command, wait blocking for it to return
my $ret_pid= waitpid($pid,0);
if ( $ret_pid != $pid )
{
mtr_error("waitpid($pid, 0) returned $ret_pid " .
"when waiting for '$path'");
# The "simple" waitpid has failed, print debug info
# and try to handle the error
mtr_warning("waitpid($pid, 0) returned $ret_pid " .
"when waiting for '$path', error: '$!'");
if ( $ret_pid == -1 )
{
# waitpid returned -1, that would indicate the process
# no longer exist and waitpid couldn't wait for it.
return 1;
}
mtr_error("Error handling failed");
}
return mtr_process_exit_status($?);
......@@ -1109,12 +1120,6 @@ sub mtr_kill_processes ($) {
#
##############################################################################
# FIXME something is wrong, we sometimes terminate with "Hangup" written
# to tty, and no STDERR output telling us why.
# FIXME for some reason, setting HUP to 'IGNORE' will cause exit() to
# write out "Hangup", and maybe loose some output. We insert a sleep...
sub mtr_exit ($) {
my $code= shift;
mtr_timer_stop_all($::glob_timers);
......@@ -1126,7 +1131,7 @@ sub mtr_exit ($) {
# set ourselves as the group leader at startup (with
# POSIX::setpgrp(0,0)), but then care must be needed to always do
# proper child process cleanup.
kill('HUP', -$$) if !$::glob_win32_perl and $$ == getpgrp();
POSIX::kill(SIGHUP, -$$) if !$::glob_win32_perl and $$ == getpgrp();
exit($code);
}
......
This diff is collapsed.
......@@ -450,7 +450,7 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert IGNORE into t1 (a) values ('Garbage');
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
drop table t1;
create table t1 (pk integer primary key auto_increment, fl geometry);
create table t1 (pk integer primary key auto_increment, fl geometry not null);
insert into t1 (fl) values (1);
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 (fl) values (1.11);
......@@ -458,5 +458,5 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 (fl) values ("qwerty");
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 (fl) values (pointfromtext('point(1,1)'));
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
ERROR 23000: Column 'fl' cannot be null
drop table t1;
......@@ -11365,3 +11365,13 @@ select hex(a) from t1;
hex(a)
82A0
drop table t1;
\
\
c_cp932
\
\
\
\
\
......@@ -11365,3 +11365,13 @@ select hex(a) from t1;
hex(a)
82A0
drop table t1;
\
\
c_cp932
\
\
\
\
\
drop table if exists t1;
drop table t1;
drop table t1;
ERROR 42S02: Unknown table 't1'
set @my_max_allowed_packet= @@max_allowed_packet;
set global max_allowed_packet=100*@@max_allowed_packet;
set global max_allowed_packet=@my_max_allowed_packet;
drop table t1;
......@@ -522,9 +522,11 @@ drop database mysqltest;
select database();
database()
NULL
create user mysqltest_1;
select database(), user();
database() user()
NULL mysqltest_1@localhost
drop user mysqltest_1;
use test;
create table t1 (a int, index `primary` (a));
ERROR 42000: Incorrect index name 'primary'
......
......@@ -5007,7 +5007,6 @@ Warnings:
Error 1194 Table 'test_repair_table2' is marked as crashed and should be repaired
SELECT * from test_repair_table2;
val
test_repair_table2.CSM
CHECK TABLE test_repair_table2;
Table Op Msg_type Msg_text
test.test_repair_table2 check status OK
......@@ -5210,15 +5209,9 @@ create table bug22080_3 (id int,string varchar(64)) Engine=CSV;
insert into bug22080_1 values(1,'string');
insert into bug22080_1 values(2,'string');
insert into bug22080_1 values(3,'string');
1,"string"
2","string"
3,"string"
check table bug22080_2;
Table Op Msg_type Msg_text
test.bug22080_2 check error Corrupt
1,"string"
2,"string"
3,"string"
check table bug22080_3;
Table Op Msg_type Msg_text
test.bug22080_3 check error Corrupt
......
......@@ -202,6 +202,7 @@ drop table t1,t2;
SELECT a.x FROM (SELECT 1 AS x) AS a HAVING a.x = 1;
x
1
create user mysqltest_1;
create table t1 select 1 as a;
select 2 as a from (select * from t1) b;
ERROR 3D000: No database selected
......@@ -380,3 +381,4 @@ ID DATA FID
select t2.* from (select * from t1) as A inner join t2 on A.ID = t2.FID;
ID DATA FID
drop table t1, t2;
drop user mysqltest_1;
......@@ -97,3 +97,4 @@ DROP TABLE slow_event_test;
SET GLOBAL long_query_time =@old_global_long_query_time;
SET SESSION long_query_time =@old_session_long_query_time;
DROP DATABASE events_test;
SET GLOBAL event_scheduler=off;
......@@ -83,3 +83,4 @@ DROP TABLE table_2;
DROP TABLE table_3;
DROP TABLE table_4;
DROP DATABASE events_test;
SET GLOBAL event_scheduler=OFF;
......@@ -49,7 +49,6 @@ SOCKET '',
OWNER 'root');
select * from mysql.servers;
Server_name Host Db Username Password Port Socket Wrapper Owner
test localhost test root 0 mysql root
server_one 127.0.0.1 first_db root SLAVE_PORT mysql root
server_two 127.0.0.1 second_db root SLAVE_PORT mysql root
DROP TABLE IF EXISTS federated.old;
......@@ -101,7 +100,6 @@ drop server 'server_one';
drop server 'server_two';
select * from mysql.servers;
Server_name Host Db Username Password Port Socket Wrapper Owner
test localhost test root 0 mysql root
drop table first_db.t1;
drop table second_db.t1;
drop database first_db;
......
......@@ -1171,11 +1171,11 @@ i count(*) std(s1/s2)
1 4 0.00000000
2 4 0.00000000
3 4 0.00000000
select i, count(*), std(o1/o2) from bug22555 group by i order by i;
i count(*) std(o1/o2)
1 4 0
2 4 0
3 4 0
select i, count(*), round(std(o1/o2), 16) from bug22555 group by i order by i;
i count(*) round(std(o1/o2), 16)
1 4 0.0000000000000000
2 4 0.0000000000000000
3 4 0.0000000000000000
select i, count(*), std(e1/e2) from bug22555 group by i order by i;
i count(*) std(e1/e2)
1 4 0.00000000
......@@ -1197,11 +1197,11 @@ i count(*) std(s1/s2)
1 4 0.000000000000000000000000000000
2 4 0.000000000000000000000000000000
3 4 0.000000000000000000000000000000
select i, count(*), std(o1/o2) from bug22555 group by i order by i;
i count(*) std(o1/o2)
1 4 0
2 4 0
3 4 0
select i, count(*), round(std(o1/o2), 16) from bug22555 group by i order by i;
i count(*) round(std(o1/o2), 16)
1 4 0.0000000000000000
2 4 0.0000000000000000
3 4 0.0000000000000000
select i, count(*), std(e1/e2) from bug22555 group by i order by i;
i count(*) std(e1/e2)
1 4 0.000000000000000000000000000000
......@@ -1222,11 +1222,11 @@ i count(*) std(s1/s2)
1 4 0.000000000000000000000000000000
2 4 0.000000000000000000000000000000
3 4 0.000000000000000000000000000000
select i, count(*), std(o1/o2) from bug22555 group by i order by i;
i count(*) std(o1/o2)
1 4 0
2 4 0
3 4 0
select i, count(*), round(std(o1/o2), 16) from bug22555 group by i order by i;
i count(*) round(std(o1/o2), 16)
1 4 0.0000000000000000
2 4 0.0000000000000000
3 4 0.0000000000000000
select i, count(*), std(e1/e2) from bug22555 group by i order by i;
i count(*) std(e1/e2)
1 4 0.000000000000000000000000000000
......
......@@ -240,9 +240,7 @@ a
10000
select microsecond(19971231235959.01) as a;
a
0
Warnings:
Warning 1292 Truncated incorrect time value: '19971231235959.01'
10000
select date_add("1997-12-31",INTERVAL "10.09" SECOND_MICROSECOND) as a;
a
1997-12-31 00:00:10.090000
......
......@@ -2273,4 +2273,18 @@ abcxx
select lpad('abc', cast(5 as unsigned integer), 'x');
lpad('abc', cast(5 as unsigned integer), 'x')
xxabc
DROP TABLE IF EXISTS t1;
CREATE TABLE `t1` (
`id` varchar(20) NOT NULL,
`tire` tinyint(3) unsigned NOT NULL,
PRIMARY KEY (`id`)
);
INSERT INTO `t1` (`id`, `tire`) VALUES ('A', 0), ('B', 1),('C', 2);
SELECT REPEAT( '#', tire ) AS A,
REPEAT( '#', tire % 999 ) AS B, tire FROM `t1`;
A B tire
0
# # 1
## ## 2
DROP TABLE t1;
End of 5.0 tests
......@@ -1050,6 +1050,10 @@ H
select last_day('0000-00-00');
last_day('0000-00-00')
NULL
select isnull(week(now() + 0)), isnull(week(now() + 0.2)),
week(20061108), week(20061108.01), week(20061108085411.000002);
isnull(week(now() + 0)) isnull(week(now() + 0.2)) week(20061108) week(20061108.01) week(20061108085411.000002)
0 0 45 45 45
End of 4.1 tests
explain extended select timestampdiff(SQL_TSI_WEEK, '2001-02-01', '2001-05-01') as a1,
timestampdiff(SQL_TSI_FRAC_SECOND, '2001-02-01 12:59:59.120000', '2001-05-01 12:58:58.119999') as a2;
......@@ -1183,6 +1187,23 @@ set time_zone= @@global.time_zone;
select str_to_date('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE;
str_to_date('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE
NULL
create table t1 (field DATE);
insert into t1 values ('2006-11-06');
select * from t1 where field < '2006-11-06 04:08:36.0';
field
2006-11-06
select * from t1 where field = '2006-11-06 04:08:36.0';
field
select * from t1 where field = '2006-11-06';
field
2006-11-06
select * from t1 where CAST(field as DATETIME) < '2006-11-06 04:08:36.0';
field
2006-11-06
select * from t1 where CAST(field as DATE) < '2006-11-06 04:08:36.0';
field
2006-11-06
drop table t1;
CREATE TABLE t1 (a int, t1 time, t2 time, d date, PRIMARY KEY (a));
INSERT INTO t1 VALUES (1, '10:00:00', NULL, NULL),
(2, '11:00:00', '11:15:00', '1972-02-06');
......@@ -1197,6 +1218,10 @@ t1 t2 SEC_TO_TIME( TIME_TO_SEC( t2 ) - TIME_TO_SEC( t1 ) ) QUARTER(d)
11:00:00 11:15:00 00:15:00 1
10:00:00 NULL NULL NULL
DROP TABLE t1;
SELECT TIME_FORMAT(SEC_TO_TIME(a),"%H:%i:%s") FROM (SELECT 3020399 AS a UNION SELECT 3020398 ) x GROUP BY 1;
TIME_FORMAT(SEC_TO_TIME(a),"%H:%i:%s")
838:59:58
838:59:59
End of 5.0 tests
select date_sub("0050-01-01 00:00:01",INTERVAL 2 SECOND);
date_sub("0050-01-01 00:00:01",INTERVAL 2 SECOND)
......
......@@ -578,7 +578,7 @@ create table t1 select GeomFromWKB(POINT(1,3));
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`GeomFromWKB(POINT(1,3))` geometry NOT NULL DEFAULT ''
`GeomFromWKB(POINT(1,3))` geometry DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
CREATE TABLE `t1` (`object_id` bigint(20) unsigned NOT NULL default '0', `geo`
......@@ -657,7 +657,7 @@ t1 where object_id=85984;
object_id geometrytype(geo) ISSIMPLE(GEO) ASTEXT(centroid(geo))
85984 MULTIPOLYGON 0 POINT(-114.87787186923 36.33101763469)
drop table t1;
create table t1 (fl geometry);
create table t1 (fl geometry not null);
insert into t1 values (1);
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 values (1.11);
......@@ -665,7 +665,7 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 values ("qwerty");
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 values (pointfromtext('point(1,1)'));
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
ERROR 23000: Column 'fl' cannot be null
drop table t1;
select (asWKT(geomfromwkb((0x000000000140240000000000004024000000000000))));
(asWKT(geomfromwkb((0x000000000140240000000000004024000000000000))))
......@@ -689,6 +689,48 @@ load data infile '../std_data_ln/bad_gis_data.dat' into table t1;
ERROR 22004: Column set to default value; NULL supplied to NOT NULL column 'b' at row 1
alter table t1 enable keys;
drop table t1;
create table t1 (a int, b blob);
insert into t1 values (1, ''), (2, NULL), (3, '1');
select * from t1;
a b
1
2 NULL
3 1
select
geometryfromtext(b) IS NULL, geometryfromwkb(b) IS NULL, astext(b) IS NULL,
aswkb(b) IS NULL, geometrytype(b) IS NULL, centroid(b) IS NULL,
envelope(b) IS NULL, startpoint(b) IS NULL, endpoint(b) IS NULL,
exteriorring(b) IS NULL, pointn(b, 1) IS NULL, geometryn(b, 1) IS NULL,
interiorringn(b, 1) IS NULL, multipoint(b) IS NULL, isempty(b) IS NULL,
issimple(b) IS NULL, isclosed(b) IS NULL, dimension(b) IS NULL,
numgeometries(b) IS NULL, numinteriorrings(b) IS NULL, numpoints(b) IS NULL,
area(b) IS NULL, glength(b) IS NULL, srid(b) IS NULL, x(b) IS NULL,
y(b) IS NULL
from t1;
geometryfromtext(b) IS NULL geometryfromwkb(b) IS NULL astext(b) IS NULL aswkb(b) IS NULL geometrytype(b) IS NULL centroid(b) IS NULL envelope(b) IS NULL startpoint(b) IS NULL endpoint(b) IS NULL exteriorring(b) IS NULL pointn(b, 1) IS NULL geometryn(b, 1) IS NULL interiorringn(b, 1) IS NULL multipoint(b) IS NULL isempty(b) IS NULL issimple(b) IS NULL isclosed(b) IS NULL dimension(b) IS NULL numgeometries(b) IS NULL numinteriorrings(b) IS NULL numpoints(b) IS NULL area(b) IS NULL glength(b) IS NULL srid(b) IS NULL x(b) IS NULL y(b) IS NULL
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
select
within(b, b) IS NULL, contains(b, b) IS NULL, overlaps(b, b) IS NULL,
equals(b, b) IS NULL, disjoint(b, b) IS NULL, touches(b, b) IS NULL,
intersects(b, b) IS NULL, crosses(b, b) IS NULL
from t1;
within(b, b) IS NULL contains(b, b) IS NULL overlaps(b, b) IS NULL equals(b, b) IS NULL disjoint(b, b) IS NULL touches(b, b) IS NULL intersects(b, b) IS NULL crosses(b, b) IS NULL
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
select
point(b, b) IS NULL, linestring(b) IS NULL, polygon(b) IS NULL, multipoint(b) IS NULL,
multilinestring(b) IS NULL, multipolygon(b) IS NULL,
geometrycollection(b) IS NULL
from t1;
point(b, b) IS NULL linestring(b) IS NULL polygon(b) IS NULL multipoint(b) IS NULL multilinestring(b) IS NULL multipolygon(b) IS NULL geometrycollection(b) IS NULL
0 1 1 1 1 1 1
1 1 1 1 1 1 1
0 1 1 1 1 1 1
drop table t1;
End of 4.1 tests
create table t1 (s1 geometry not null,s2 char(100));
create trigger t1_bu before update on t1 for each row set new.s1 = null;
insert into t1 values (null,null);
......@@ -716,7 +758,7 @@ drop table t1;
create table t1 select GeomFromText('point(1 1)');
desc t1;
Field Type Null Key Default Extra
GeomFromText('point(1 1)') geometry NO
GeomFromText('point(1 1)') geometry YES NULL
drop table t1;
create table t1 (g geometry not null);
insert into t1 values(default);
......
This diff is collapsed.
This diff is collapsed.
......@@ -450,7 +450,7 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert IGNORE into t1 (a) values ('Garbage');
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
drop table t1;
create table t1 (pk integer primary key auto_increment, fl geometry);
create table t1 (pk integer primary key auto_increment, fl geometry not null);
insert into t1 (fl) values (1);
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 (fl) values (1.11);
......@@ -458,7 +458,7 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 (fl) values ("qwerty");
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 (fl) values (pointfromtext('point(1,1)'));
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
ERROR 23000: Column 'fl' cannot be null
drop table t1;
create table t1 (g geometry not null, spatial gk(g)) engine=innodb;
ERROR HY000: The used table type doesn't support SPATIAL indexes
......@@ -383,3 +383,4 @@ id data
7 130
8 140
9 150
drop table t1;
......@@ -701,7 +701,7 @@ select * from information_schema.statistics join information_schema.columns
using(table_name,column_name) where table_name='user';
TABLE_NAME COLUMN_NAME TABLE_CATALOG TABLE_SCHEMA NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT TABLE_CATALOG TABLE_SCHEMA ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
user Host NULL mysql 0 mysql PRIMARY 1 A NULL NULL NULL BTREE NULL mysql 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI #
user User NULL mysql 0 mysql PRIMARY 2 A 5 NULL NULL BTREE NULL mysql 2 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI #
user User NULL mysql 0 mysql PRIMARY 2 A 3 NULL NULL BTREE NULL mysql 2 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI #
drop table t1;
drop table t2;
drop table t3;
......
......@@ -148,6 +148,22 @@ select * from t1;
a b c
10 NULL Ten
15 NULL Fifteen
show variables like "secure_file_pri%";
Variable_name Value
secure_file_priv MYSQLTEST_VARDIR/
select @@secure_file_priv;
@@secure_file_priv
MYSQLTEST_VARDIR/
set @@secure_file_priv= 0;
ERROR HY000: Variable 'secure_file_priv' is a read only variable
truncate table t1;
load data infile 'MYSQL_TEST_DIR/Makefile' into table t1;
ERROR HY000: The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
select * from t1;
a b c
select load_file("MYSQL_TEST_DIR/Makefile");
load_file("MYSQL_TEST_DIR/Makefile")
NULL
drop table t1, t2;
CREATE TABLE t1 (a int);
INSERT INTO t1 VALUES (1);
......
......@@ -94,8 +94,8 @@ Variable_name Value
log_output FILE,TABLE
set global general_log_file='/not exiting path/log.master';
ERROR 42000: Variable 'general_log_file' can't be set to the value of '/not exiting path/log.master'
set global general_log_file='/tmp';
ERROR 42000: Variable 'general_log_file' can't be set to the value of '/tmp'
set global general_log_file='MYSQLTEST_VARDIR';
ERROR 42000: Variable 'general_log_file' can't be set to the value of 'MYSQLTEST_VARDIR'
set global general_log_file='';
ERROR 42000: Variable 'general_log_file' can't be set to the value of ''
show variables like 'general_log_file';
......
This diff is collapsed.
This diff is collapsed.
......@@ -61,16 +61,6 @@ database()
test
unlock tables;
drop table t1;
\
\
c_cp932
\
\
\
\
\
+----------------------+------------+--------+
| concat('>',col1,'<') | col2 | col3 |
+----------------------+------------+--------+
......
\
\
c_cp932
\
\
\
\
\
Run mysql_upgrade once
mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
mysql.general_log OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.servers OK
mysql.slow_log OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
@hadGrantPriv:=1
1
1
1
@hadShowDbPriv:=1
1
1
1
@hadCreateViewPriv:=1
1
1
1
@hadCreateRoutinePriv:=1
1
1
1
@hadCreateUserPriv:=1
1
1
1
@hadEventPriv :=1
1
1
1
@hadTriggerPriv :=1
1
1
1
Run it again - should say already completed
@hadGrantPriv:=1
1
1
1
@hadShowDbPriv:=1
1
1
1
@hadCreateViewPriv:=1
1
1
1
@hadCreateRoutinePriv:=1
1
1
1
@hadCreateUserPriv:=1
1
1
1
@hadEventPriv :=1
1
1
1
@hadTriggerPriv :=1
1
1
1
Force should run it regardless of wheter it's been run before
mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
mysql.general_log OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.servers OK
mysql.slow_log OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
@hadGrantPriv:=1
1
1
1
@hadShowDbPriv:=1
1
1
1
@hadCreateViewPriv:=1
1
1
1
@hadCreateRoutinePriv:=1
1
1
1
@hadCreateUserPriv:=1
1
1
1
@hadEventPriv :=1
1
1
1
@hadTriggerPriv :=1
1
1
1
flush logs;
create table t3 (f text character set utf8);
create table t4 (f text character set cp932);
flush logs;
rename table t3 to t03, t4 to t04;
select HEX(f) from t03;
HEX(f)
E382BD
select HEX(f) from t3;
HEX(f)
E382BD
select HEX(f) from t04;
HEX(f)
835C
select HEX(f) from t4;
HEX(f)
835C
drop table t3, t4, t03, t04;
End of 5.0 tests
......@@ -194,24 +194,6 @@ ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
drop table t1,t2;
flush logs;
create table t3 (f text character set utf8);
create table t4 (f text character set cp932);
flush logs;
rename table t3 to t03, t4 to t04;
select HEX(f) from t03;
HEX(f)
E382BD
select HEX(f) from t3;
HEX(f)
E382BD
select HEX(f) from t04;
HEX(f)
835C
select HEX(f) from t4;
HEX(f)
835C
drop table t3,t4,t03,t04;
flush logs;
flush logs;
select * from t5 /* must be (1),(1) */;
a
......@@ -332,3 +314,4 @@ DELIMITER ;
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
flush logs;
End of 5.0 tests
......@@ -210,7 +210,6 @@ source database
"MySQL: The world's most popular ;open source database"
echo message echo message
mysqltest: At line 1: Empty variable
mysqltest: At line 1: command "false" failed
mysqltest: At line 1: Missing argument in exec
MySQL
......@@ -518,8 +517,10 @@ drop table t1;
mysqltest: At line 1: Missing required argument 'filename' to command 'remove_file'
mysqltest: At line 1: Missing required argument 'filename' to command 'write_file'
mysqltest: At line 1: End of file encountered before 'EOF' delimiter was found
mysqltest: At line 1: End of line junk detected: "write_file filename ";
"
Some data
for cat_file command
of mysqltest
mysqltest: At line 1: Failed to open file non_existing_file
mysqltest: At line 1: Missing required argument 'filename' to command 'file_exists'
mysqltest: At line 1: Missing required argument 'from_file' to command 'copy_file'
mysqltest: At line 1: Missing required argument 'to_file' to command 'copy_file'
......
......@@ -450,7 +450,7 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert IGNORE into t1 (a) values ('Garbage');
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
drop table t1;
create table t1 (pk integer primary key auto_increment, fl geometry);
create table t1 (pk integer primary key auto_increment, fl geometry not null);
insert into t1 (fl) values (1);
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 (fl) values (1.11);
......@@ -458,7 +458,7 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 (fl) values ("qwerty");
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 (fl) values (pointfromtext('point(1,1)'));
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
ERROR 23000: Column 'fl' cannot be null
drop table t1;
set engine_condition_pushdown = on;
DROP TABLE IF EXISTS t1, gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry;
......@@ -912,7 +912,7 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert IGNORE into t1 (a) values ('Garbage');
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
drop table t1;
create table t1 (pk integer primary key auto_increment, fl geometry);
create table t1 (pk integer primary key auto_increment, fl geometry not null);
insert into t1 (fl) values (1);
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 (fl) values (1.11);
......@@ -920,5 +920,5 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 (fl) values ("qwerty");
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 (fl) values (pointfromtext('point(1,1)'));
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
ERROR 23000: Column 'fl' cannot be null
drop table t1;
......@@ -874,6 +874,30 @@ num (select num + 2 FROM t1 LIMIT 1)
SELECT a.a + 1 AS num FROM t1 a JOIN t1 b ON num = b.a;
ERROR 42S22: Unknown column 'num' in 'on clause'
DROP TABLE t1;
CREATE TABLE bug25126 (
val int unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY
);
UPDATE bug25126 SET MissingCol = MissingCol;
ERROR 42S22: Unknown column 'MissingCol' in 'field list'
UPDATE bug25126 SET val = val ORDER BY MissingCol;
ERROR 42S22: Unknown column 'MissingCol' in 'order clause'
UPDATE bug25126 SET val = val ORDER BY val;
UPDATE bug25126 SET val = 1 ORDER BY val;
UPDATE bug25126 SET val = 1 ORDER BY MissingCol;
ERROR 42S22: Unknown column 'MissingCol' in 'order clause'
UPDATE bug25126 SET val = 1 ORDER BY val, MissingCol;
ERROR 42S22: Unknown column 'MissingCol' in 'order clause'
UPDATE bug25126 SET val = MissingCol ORDER BY MissingCol;
ERROR 42S22: Unknown column 'MissingCol' in 'order clause'
UPDATE bug25126 SET MissingCol = 1 ORDER BY val, MissingCol;
ERROR 42S22: Unknown column 'MissingCol' in 'order clause'
UPDATE bug25126 SET MissingCol = 1 ORDER BY MissingCol;
ERROR 42S22: Unknown column 'MissingCol' in 'order clause'
UPDATE bug25126 SET MissingCol = val ORDER BY MissingCol;
ERROR 42S22: Unknown column 'MissingCol' in 'order clause'
UPDATE bug25126 SET MissingCol = MissingCol ORDER BY MissingCol;
ERROR 42S22: Unknown column 'MissingCol' in 'order clause'
DROP TABLE bug25126;
CREATE TABLE t1 (a int);
SELECT p.a AS val, q.a AS val1 FROM t1 p, t1 q ORDER BY val > 1;
val val1
......
......@@ -3046,25 +3046,25 @@ test_sequence
-- select .. where date/time column = .. --
set @arg00= '1991-01-01 01:01:01' ;
select 'true' as found from t9
where c1= 20 and c13= '1991-01-01 01:01:01' and c14= '1991-01-01 01:01:01' and
where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and
c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and
c17= '1991-01-01 01:01:01' ;
found
true
select 'true' as found from t9
where c1= 20 and c13= @arg00 and c14= @arg00 and c15= @arg00 and c16= @arg00
where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00
and c17= @arg00 ;
found
true
prepare stmt1 from "select 'true' as found from t9
where c1= 20 and c13= '1991-01-01 01:01:01' and c14= '1991-01-01 01:01:01' and
where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and
c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and
c17= '1991-01-01 01:01:01'" ;
execute stmt1 ;
found
true
prepare stmt1 from "select 'true' as found from t9
where c1= 20 and c13= ? and c14= ? and c15= ? and c16= ? and c17= ?" ;
where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ;
execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ;
found
true
......@@ -3078,7 +3078,7 @@ c17= CAST('1991-01-01 01:01:01' as datetime) ;
found
true
select 'true' as found from t9
where c1= 20 and c13= @arg00 and c14= @arg00 and c15= @arg00 and c16= @arg00
where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00
and c17= @arg00 ;
found
true
......@@ -3092,7 +3092,7 @@ execute stmt1 ;
found
true
prepare stmt1 from "select 'true' as found from t9
where c1= 20 and c13= ? and c14= ? and c15= ? and c16= ? and c17= ?" ;
where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ;
execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ;
found
true
......
......@@ -3029,25 +3029,25 @@ test_sequence
-- select .. where date/time column = .. --
set @arg00= '1991-01-01 01:01:01' ;
select 'true' as found from t9
where c1= 20 and c13= '1991-01-01 01:01:01' and c14= '1991-01-01 01:01:01' and
where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and
c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and
c17= '1991-01-01 01:01:01' ;
found
true
select 'true' as found from t9
where c1= 20 and c13= @arg00 and c14= @arg00 and c15= @arg00 and c16= @arg00
where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00
and c17= @arg00 ;
found
true
prepare stmt1 from "select 'true' as found from t9
where c1= 20 and c13= '1991-01-01 01:01:01' and c14= '1991-01-01 01:01:01' and
where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and
c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and
c17= '1991-01-01 01:01:01'" ;
execute stmt1 ;
found
true
prepare stmt1 from "select 'true' as found from t9
where c1= 20 and c13= ? and c14= ? and c15= ? and c16= ? and c17= ?" ;
where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ;
execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ;
found
true
......@@ -3061,7 +3061,7 @@ c17= CAST('1991-01-01 01:01:01' as datetime) ;
found
true
select 'true' as found from t9
where c1= 20 and c13= @arg00 and c14= @arg00 and c15= @arg00 and c16= @arg00
where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00
and c17= @arg00 ;
found
true
......@@ -3075,7 +3075,7 @@ execute stmt1 ;
found
true
prepare stmt1 from "select 'true' as found from t9
where c1= 20 and c13= ? and c14= ? and c15= ? and c16= ? and c17= ?" ;
where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ;
execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ;
found
true
......
......@@ -3030,25 +3030,25 @@ test_sequence
-- select .. where date/time column = .. --
set @arg00= '1991-01-01 01:01:01' ;
select 'true' as found from t9
where c1= 20 and c13= '1991-01-01 01:01:01' and c14= '1991-01-01 01:01:01' and
where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and
c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and
c17= '1991-01-01 01:01:01' ;
found
true
select 'true' as found from t9
where c1= 20 and c13= @arg00 and c14= @arg00 and c15= @arg00 and c16= @arg00
where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00
and c17= @arg00 ;
found
true
prepare stmt1 from "select 'true' as found from t9
where c1= 20 and c13= '1991-01-01 01:01:01' and c14= '1991-01-01 01:01:01' and
where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and
c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and
c17= '1991-01-01 01:01:01'" ;
execute stmt1 ;
found
true
prepare stmt1 from "select 'true' as found from t9
where c1= 20 and c13= ? and c14= ? and c15= ? and c16= ? and c17= ?" ;
where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ;
execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ;
found
true
......@@ -3062,7 +3062,7 @@ c17= CAST('1991-01-01 01:01:01' as datetime) ;
found
true
select 'true' as found from t9
where c1= 20 and c13= @arg00 and c14= @arg00 and c15= @arg00 and c16= @arg00
where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00
and c17= @arg00 ;
found
true
......@@ -3076,7 +3076,7 @@ execute stmt1 ;
found
true
prepare stmt1 from "select 'true' as found from t9
where c1= 20 and c13= ? and c14= ? and c15= ? and c16= ? and c17= ?" ;
where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ;
execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ;
found
true
......
......@@ -2966,25 +2966,25 @@ test_sequence
-- select .. where date/time column = .. --
set @arg00= '1991-01-01 01:01:01' ;
select 'true' as found from t9
where c1= 20 and c13= '1991-01-01 01:01:01' and c14= '1991-01-01 01:01:01' and
where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and
c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and
c17= '1991-01-01 01:01:01' ;
found
true
select 'true' as found from t9
where c1= 20 and c13= @arg00 and c14= @arg00 and c15= @arg00 and c16= @arg00
where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00
and c17= @arg00 ;
found
true
prepare stmt1 from "select 'true' as found from t9
where c1= 20 and c13= '1991-01-01 01:01:01' and c14= '1991-01-01 01:01:01' and
where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and
c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and
c17= '1991-01-01 01:01:01'" ;
execute stmt1 ;
found
true
prepare stmt1 from "select 'true' as found from t9
where c1= 20 and c13= ? and c14= ? and c15= ? and c16= ? and c17= ?" ;
where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ;
execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ;
found
true
......@@ -2998,7 +2998,7 @@ c17= CAST('1991-01-01 01:01:01' as datetime) ;
found
true
select 'true' as found from t9
where c1= 20 and c13= @arg00 and c14= @arg00 and c15= @arg00 and c16= @arg00
where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00
and c17= @arg00 ;
found
true
......@@ -3012,7 +3012,7 @@ execute stmt1 ;
found
true
prepare stmt1 from "select 'true' as found from t9
where c1= 20 and c13= ? and c14= ? and c15= ? and c16= ? and c17= ?" ;
where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ;
execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ;
found
true
......@@ -5980,25 +5980,25 @@ test_sequence
-- select .. where date/time column = .. --
set @arg00= '1991-01-01 01:01:01' ;
select 'true' as found from t9
where c1= 20 and c13= '1991-01-01 01:01:01' and c14= '1991-01-01 01:01:01' and
where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and
c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and
c17= '1991-01-01 01:01:01' ;
found
true
select 'true' as found from t9
where c1= 20 and c13= @arg00 and c14= @arg00 and c15= @arg00 and c16= @arg00
where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00
and c17= @arg00 ;
found
true
prepare stmt1 from "select 'true' as found from t9
where c1= 20 and c13= '1991-01-01 01:01:01' and c14= '1991-01-01 01:01:01' and
where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and
c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and
c17= '1991-01-01 01:01:01'" ;
execute stmt1 ;
found
true
prepare stmt1 from "select 'true' as found from t9
where c1= 20 and c13= ? and c14= ? and c15= ? and c16= ? and c17= ?" ;
where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ;
execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ;
found
true
......@@ -6012,7 +6012,7 @@ c17= CAST('1991-01-01 01:01:01' as datetime) ;
found
true
select 'true' as found from t9
where c1= 20 and c13= @arg00 and c14= @arg00 and c15= @arg00 and c16= @arg00
where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00
and c17= @arg00 ;
found
true
......@@ -6026,7 +6026,7 @@ execute stmt1 ;
found
true
prepare stmt1 from "select 'true' as found from t9
where c1= 20 and c13= ? and c14= ? and c15= ? and c16= ? and c17= ?" ;
where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ;
execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ;
found
true
......
This diff is collapsed.
......@@ -624,7 +624,7 @@ word
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 1
load data infile 'TEST_DIR/std_data/words.dat' into table t1;
load data infile 'MYSQLTEST_VARDIR/std_data_ln/words.dat' into table t1;
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 0
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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