mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
Merge alik.:/mnt/raid/alik/MySQL/devel/5.1
into alik.:/mnt/raid/alik/MySQL/devel/5.1-rt-merged-2 configure.in: Auto merged include/my_time.h: Auto merged mysql-test/r/func_time.result: Auto merged mysql-test/r/kill.result: Auto merged mysql-test/r/ps.result: Auto merged mysql-test/r/rename.result: Auto merged mysql-test/r/view.result: Auto merged mysql-test/t/func_time.test: Auto merged mysql-test/t/ps.test: Auto merged mysql-test/t/rename.test: Auto merged mysql-test/t/view.test: Auto merged sql/Makefile.am: Auto merged sql/handler.cc: Auto merged sql/item_timefunc.cc: Auto merged sql/lex.h: Auto merged sql/log.cc: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_insert.cc: Auto merged sql/sql_lex.cc: Auto merged sql/sql_lex.h: Auto merged sql-common/my_time.c: Auto merged sql/sql_select.cc: Auto merged sql/sql_view.cc: Auto merged sql/sql_yacc.yy: Auto merged sql/table.cc: Auto merged sql/time.cc: Auto merged tests/mysql_client_test.c: Auto merged mysql-test/mysql-test-run.pl: Manually merged. sql/sql_parse.cc: Manually merged.
This commit is contained in:
commit
e50678f1ce
207 changed files with 11074 additions and 4902 deletions
|
@ -567,8 +567,10 @@ heap/hp_test2
|
|||
help
|
||||
help.c
|
||||
help.h
|
||||
include/check_abi
|
||||
include/my_config.h
|
||||
include/my_global.h
|
||||
include/mysql_h.ic
|
||||
include/mysql_version.h
|
||||
include/mysqld_ername.h
|
||||
include/mysqld_error.h
|
||||
|
@ -1260,6 +1262,7 @@ mysql-test/r/bdb-deadlock.err
|
|||
mysql-test/r/bdb.err
|
||||
mysql-test/r/bdb.log
|
||||
mysql-test/r/bdb_cache.err
|
||||
mysql-test/r/blackhole.log
|
||||
mysql-test/r/client_test.err
|
||||
mysql-test/r/csv.err
|
||||
mysql-test/r/ctype_ucs.err
|
||||
|
|
|
@ -5,5 +5,13 @@
|
|||
45001f7c3b2hhCXDKfUvzkX9TNe6VA
|
||||
45002051rHJfMEXAIMiAZV0clxvKSA
|
||||
4513d8e4Af4dQWuk13sArwofRgFDQw
|
||||
45143312u0Tz4r0wPXCbUKwdHa2jWA
|
||||
45143b90ewOQuTW8-jrB3ZSAQvMRJw
|
||||
45184588w9U72A6KX1hUFeAC4shSHA
|
||||
45185df8mZbxfp85FbA0VxUXkmDewA
|
||||
4519a6c5BVUxEHTf5iJnjZkixMBs8g
|
||||
451ab499rgdjXyOnUDqHu-wBDoS-OQ
|
||||
451b110a3ZV6MITl93ehXk2wxrbW7g
|
||||
45214442pBGT9KuZEGixBH71jTzbOA
|
||||
45214a07hVsIGwvwa-WrO-jpeaSwVw
|
||||
452a92d0-31-8wSzSfZi165fcGcXPA
|
||||
|
|
|
@ -9,8 +9,6 @@ unless($event eq 'outgoing pull' || $event eq 'outgoing push' ||
|
|||
exit 0;
|
||||
}
|
||||
|
||||
print "Checking for bad changesets from old crashed 5.1 tree...\n";
|
||||
|
||||
my @bad_csets=
|
||||
( 'monty@mysql.com|ChangeSet|20060418090255|16983',
|
||||
'monty@mysql.com|ChangeSet|20060418090458|02628',
|
||||
|
@ -80,6 +78,4 @@ END
|
|||
}
|
||||
}
|
||||
|
||||
print "No bad changesets found, proceeding.\n";
|
||||
|
||||
exit 0;
|
||||
|
|
|
@ -9,8 +9,6 @@ unless($event eq 'outgoing pull' || $event eq 'outgoing push' ||
|
|||
exit 0;
|
||||
}
|
||||
|
||||
print "Checking for bad changesets from old crashed 5.1 tree...\n";
|
||||
|
||||
my @bad_csets=
|
||||
( 'monty@mysql.com|ChangeSet|20060418090255|16983',
|
||||
'monty@mysql.com|ChangeSet|20060418090458|02628',
|
||||
|
@ -80,6 +78,4 @@ END
|
|||
}
|
||||
}
|
||||
|
||||
print "No bad changesets found, proceeding.\n";
|
||||
|
||||
exit 0;
|
||||
|
|
|
@ -46,7 +46,8 @@ mysqladmin_SOURCES = mysqladmin.cc
|
|||
mysql_LDADD = @readline_link@ @TERMCAP_LIB@ $(LDADD) $(CXXLDFLAGS)
|
||||
mysqltest_SOURCES= mysqltest.c $(top_srcdir)/mysys/my_getsystime.c \
|
||||
$(yassl_dummy_link_fix)
|
||||
mysqltest_LDADD = $(top_builddir)/regex/libregex.a $(LDADD)
|
||||
mysqltest_LDADD = $(top_builddir)/regex/libregex.a $(LDADD) \
|
||||
$(top_builddir)/mysys/libmysys.a
|
||||
mysqlbinlog_SOURCES = mysqlbinlog.cc $(top_srcdir)/mysys/mf_tempdir.c \
|
||||
$(top_srcdir)/mysys/my_new.cc \
|
||||
$(top_srcdir)/mysys/my_bit.c \
|
||||
|
|
|
@ -386,6 +386,21 @@ int main(int argc,char *argv[])
|
|||
else
|
||||
status.add_to_history=1;
|
||||
status.exit_status=1;
|
||||
|
||||
{
|
||||
/*
|
||||
The file descriptor-layer may be out-of-sync with the file-number layer,
|
||||
so we make sure that "stdout" is really open. If its file is closed then
|
||||
explicitly close the FD layer.
|
||||
*/
|
||||
int stdout_fileno_copy;
|
||||
stdout_fileno_copy= dup(fileno(stdout)); /* Okay if fileno fails. */
|
||||
if (stdout_fileno_copy == -1)
|
||||
fclose(stdout);
|
||||
else
|
||||
close(stdout_fileno_copy); /* Clean up dup(). */
|
||||
}
|
||||
|
||||
load_defaults("my",load_default_groups,&argc,&argv);
|
||||
defaults_argv=argv;
|
||||
if (get_options(argc, (char **) argv))
|
||||
|
@ -2091,6 +2106,8 @@ com_go(String *buffer,char *line __attribute__((unused)))
|
|||
(long) mysql_num_rows(result),
|
||||
(long) mysql_num_rows(result) == 1 ? "row" : "rows");
|
||||
end_pager();
|
||||
if (mysql_errno(&mysql))
|
||||
error= put_error(&mysql);
|
||||
}
|
||||
}
|
||||
else if (mysql_affected_rows(&mysql) == ~(ulonglong) 0)
|
||||
|
@ -2905,7 +2922,11 @@ com_connect(String *buffer, char *line)
|
|||
bzero(buff, sizeof(buff));
|
||||
if (buffer)
|
||||
{
|
||||
strmake(buff, line, sizeof(buff) - 1);
|
||||
/*
|
||||
Two null bytes are needed in the end of buff to allow
|
||||
get_arg to find end of string the second time it's called.
|
||||
*/
|
||||
strmake(buff, line, sizeof(buff)-2);
|
||||
tmp= get_arg(buff, 0);
|
||||
if (tmp && *tmp)
|
||||
{
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
#include <m_string.h>
|
||||
#include <m_ctype.h>
|
||||
#include <hash.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "client_priv.h"
|
||||
#include "mysql.h"
|
||||
|
@ -536,6 +537,8 @@ static void write_header(FILE *sql_file, char *db_name)
|
|||
if (opt_xml)
|
||||
{
|
||||
fputs("<?xml version=\"1.0\"?>\n", sql_file);
|
||||
/* Schema reference. Allows use of xsi:nil for NULL values and
|
||||
xsi:type to define an element's data type. */
|
||||
fputs("<mysqldump ", sql_file);
|
||||
fputs("xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"",
|
||||
sql_file);
|
||||
|
@ -1136,7 +1139,7 @@ static char *quote_for_like(const char *name, char *buff)
|
|||
|
||||
SYNOPSIS
|
||||
print_quoted_xml()
|
||||
output - output file
|
||||
xml_file - output file
|
||||
str - string to print
|
||||
len - its length
|
||||
|
||||
|
@ -1173,34 +1176,63 @@ static void print_quoted_xml(FILE *xml_file, const char *str, ulong len)
|
|||
|
||||
|
||||
/*
|
||||
Print xml tag with one attribute.
|
||||
Print xml tag. Optionally add attribute(s).
|
||||
|
||||
SYNOPSIS
|
||||
print_xml_tag1()
|
||||
xml_file - output file
|
||||
sbeg - line beginning
|
||||
stag_atr - tag and attribute
|
||||
sval - value of attribute
|
||||
send - line ending
|
||||
print_xml_tag(xml_file, sbeg, send, tag_name, first_attribute_name,
|
||||
..., attribute_name_n, attribute_value_n, NullS)
|
||||
xml_file - output file
|
||||
sbeg - line beginning
|
||||
send - line ending
|
||||
tag_name - XML tag name.
|
||||
first_attribute_name - tag and first attribute
|
||||
first_attribute_value - (Implied) value of first attribute
|
||||
attribute_name_n - attribute n
|
||||
attribute_value_n - value of attribute n
|
||||
|
||||
DESCRIPTION
|
||||
Print tag with one attribute to the xml_file. Format is:
|
||||
sbeg<stag_atr="sval">send
|
||||
Print XML tag with any number of attribute="value" pairs to the xml_file.
|
||||
|
||||
Format is:
|
||||
sbeg<tag_name first_attribute_name="first_attribute_value" ...
|
||||
attribute_name_n="attribute_value_n">send
|
||||
NOTE
|
||||
sval MUST be a NULL terminated string.
|
||||
sval string will be qouted before output.
|
||||
Additional arguments must be present in attribute/value pairs.
|
||||
The last argument should be the null character pointer.
|
||||
All attribute_value arguments MUST be NULL terminated strings.
|
||||
All attribute_value arguments will be quoted before output.
|
||||
*/
|
||||
|
||||
static void print_xml_tag1(FILE * xml_file, const char* sbeg,
|
||||
const char* stag_atr, const char* sval,
|
||||
const char* send)
|
||||
static void print_xml_tag(FILE * xml_file, const char* sbeg, const char* send,
|
||||
const char* tag_name,
|
||||
const char* first_attribute_name, ...)
|
||||
{
|
||||
va_list arg_list;
|
||||
const char *attribute_name, *attribute_value;
|
||||
|
||||
fputs(sbeg, xml_file);
|
||||
fputs("<", xml_file);
|
||||
fputs(stag_atr, xml_file);
|
||||
fputs("\"", xml_file);
|
||||
print_quoted_xml(xml_file, sval, strlen(sval));
|
||||
fputs("\">", xml_file);
|
||||
fputc('<', xml_file);
|
||||
fputs(tag_name, xml_file);
|
||||
|
||||
va_start(arg_list, first_attribute_name);
|
||||
attribute_name= first_attribute_name;
|
||||
while (attribute_name != NullS)
|
||||
{
|
||||
attribute_value= va_arg(arg_list, char *);
|
||||
DBUG_ASSERT(attribute_value != NullS);
|
||||
|
||||
fputc(' ', xml_file);
|
||||
fputs(attribute_name, xml_file);
|
||||
fputc('\"', xml_file);
|
||||
|
||||
print_quoted_xml(xml_file, attribute_value, strlen(attribute_value));
|
||||
fputc('\"', xml_file);
|
||||
|
||||
attribute_name= va_arg(arg_list, char *);
|
||||
}
|
||||
va_end(arg_list);
|
||||
|
||||
fputc('>', xml_file);
|
||||
fputs(send, xml_file);
|
||||
check_io(xml_file);
|
||||
}
|
||||
|
@ -1410,6 +1442,28 @@ static uint dump_events_for_db(char *db)
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
Print hex value for blob data.
|
||||
|
||||
SYNOPSIS
|
||||
print_blob_as_hex()
|
||||
output_file - output file
|
||||
str - string to print
|
||||
len - its length
|
||||
|
||||
DESCRIPTION
|
||||
Print hex value for blob data.
|
||||
*/
|
||||
|
||||
static void print_blob_as_hex(FILE *output_file, const char *str, ulong len)
|
||||
{
|
||||
/* sakaik got the idea to to provide blob's in hex notation. */
|
||||
const char *ptr= str, *end= ptr + len;
|
||||
for (; ptr < end ; ptr++)
|
||||
fprintf(output_file, "%02X", *((uchar *)ptr));
|
||||
check_io(output_file);
|
||||
}
|
||||
|
||||
/*
|
||||
dump_routines_for_db
|
||||
-- retrieves list of routines for a given db, and prints out
|
||||
|
@ -1857,7 +1911,8 @@ static uint get_table_structure(char *table, char *db, char *table_type,
|
|||
if (!opt_xml)
|
||||
fprintf(sql_file, "CREATE TABLE %s (\n", result_table);
|
||||
else
|
||||
print_xml_tag1(sql_file, "\t", "table_structure name=", table, "\n");
|
||||
print_xml_tag(sql_file, "\t", "\n", "table_structure", "name=", table,
|
||||
NullS);
|
||||
check_io(sql_file);
|
||||
}
|
||||
|
||||
|
@ -2429,8 +2484,8 @@ static void dump_table(char *table, char *db)
|
|||
rownr=0;
|
||||
init_length=(uint) insert_pat.length+4;
|
||||
if (opt_xml)
|
||||
print_xml_tag1(md_result_file, "\t", "table_data name=", table, "\n");
|
||||
|
||||
print_xml_tag(md_result_file, "\t", "\n", "table_data", "name=", table,
|
||||
NullS);
|
||||
if (opt_autocommit)
|
||||
{
|
||||
fprintf(md_result_file, "set autocommit=0;\n");
|
||||
|
@ -2484,7 +2539,7 @@ static void dump_table(char *table, char *db)
|
|||
field->type == MYSQL_TYPE_LONG_BLOB ||
|
||||
field->type == MYSQL_TYPE_MEDIUM_BLOB ||
|
||||
field->type == MYSQL_TYPE_TINY_BLOB)) ? 1 : 0;
|
||||
if (extended_insert)
|
||||
if (extended_insert && !opt_xml)
|
||||
{
|
||||
if (i == 0)
|
||||
dynstr_set(&extended_row,"(");
|
||||
|
@ -2573,18 +2628,25 @@ static void dump_table(char *table, char *db)
|
|||
{
|
||||
if (opt_xml)
|
||||
{
|
||||
print_xml_tag1(md_result_file, "\t\t", "field name=",
|
||||
field->name, "");
|
||||
print_quoted_xml(md_result_file, row[i], length);
|
||||
if (opt_hex_blob && is_blob && length)
|
||||
{
|
||||
/* Define xsi:type="xs:hexBinary" for hex encoded data */
|
||||
print_xml_tag(md_result_file, "\t\t", "", "field", "name=",
|
||||
field->name, "xsi:type=", "xs:hexBinary", NullS);
|
||||
print_blob_as_hex(md_result_file, row[i], length);
|
||||
}
|
||||
else
|
||||
{
|
||||
print_xml_tag(md_result_file, "\t\t", "", "field", "name=",
|
||||
field->name, NullS);
|
||||
print_quoted_xml(md_result_file, row[i], length);
|
||||
}
|
||||
fputs("</field>\n", md_result_file);
|
||||
}
|
||||
else if (opt_hex_blob && is_blob && length)
|
||||
{
|
||||
/* sakaik got the idea to to provide blob's in hex notation. */
|
||||
char *ptr= row[i], *end= ptr + length;
|
||||
fputs("0x", md_result_file);
|
||||
for (; ptr < end ; ptr++)
|
||||
fprintf(md_result_file, "%02X", *((uchar *)ptr));
|
||||
print_blob_as_hex(md_result_file, row[i], length);
|
||||
}
|
||||
else
|
||||
unescape(md_result_file, row[i], length);
|
||||
|
@ -2595,8 +2657,8 @@ static void dump_table(char *table, char *db)
|
|||
char *ptr= row[i];
|
||||
if (opt_xml)
|
||||
{
|
||||
print_xml_tag1(md_result_file, "\t\t", "field name=",
|
||||
field->name, "");
|
||||
print_xml_tag(md_result_file, "\t\t", "", "field", "name=",
|
||||
field->name, NullS);
|
||||
fputs(!my_isalpha(charset_info, *ptr) ? ptr: "NULL",
|
||||
md_result_file);
|
||||
fputs("</field>\n", md_result_file);
|
||||
|
@ -3070,7 +3132,7 @@ static int dump_all_tables_in_db(char *database)
|
|||
if (init_dumping(database, init_dumping_tables))
|
||||
return 1;
|
||||
if (opt_xml)
|
||||
print_xml_tag1(md_result_file, "", "database name=", database, "\n");
|
||||
print_xml_tag(md_result_file, "", "\n", "database", "name=", database, NullS);
|
||||
if (lock_tables)
|
||||
{
|
||||
DYNAMIC_STRING query;
|
||||
|
@ -3153,7 +3215,7 @@ static my_bool dump_all_views_in_db(char *database)
|
|||
if (init_dumping(database, init_dumping_views))
|
||||
return 1;
|
||||
if (opt_xml)
|
||||
print_xml_tag1(md_result_file, "", "database name=", database, "\n");
|
||||
print_xml_tag(md_result_file, "", "\n", "database", "name=", database, NullS);
|
||||
if (lock_tables)
|
||||
{
|
||||
DYNAMIC_STRING query;
|
||||
|
@ -3292,7 +3354,7 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
|
|||
/* We shall countinue here, if --force was given */
|
||||
}
|
||||
if (opt_xml)
|
||||
print_xml_tag1(md_result_file, "", "database name=", db, "\n");
|
||||
print_xml_tag(md_result_file, "", "\n", "database", "name=", db, NullS);
|
||||
|
||||
/* Dump each selected table */
|
||||
for (pos= dump_tables; pos < end; pos++)
|
||||
|
@ -3405,7 +3467,7 @@ static int do_reset_master(MYSQL *mysql_con)
|
|||
}
|
||||
|
||||
|
||||
static int start_transaction(MYSQL *mysql_con, my_bool consistent_read_now)
|
||||
static int start_transaction(MYSQL *mysql_con)
|
||||
{
|
||||
/*
|
||||
We use BEGIN for old servers. --single-transaction --master-data will fail
|
||||
|
@ -3420,10 +3482,8 @@ static int start_transaction(MYSQL *mysql_con, my_bool consistent_read_now)
|
|||
"SET SESSION TRANSACTION ISOLATION "
|
||||
"LEVEL REPEATABLE READ") ||
|
||||
mysql_query_with_error_report(mysql_con, 0,
|
||||
consistent_read_now ?
|
||||
"START TRANSACTION "
|
||||
"WITH CONSISTENT SNAPSHOT" :
|
||||
"BEGIN"));
|
||||
"/*!40100 WITH CONSISTENT SNAPSHOT */"));
|
||||
}
|
||||
|
||||
|
||||
|
@ -3913,7 +3973,7 @@ int main(int argc, char **argv)
|
|||
if ((opt_lock_all_tables || opt_master_data) &&
|
||||
do_flush_tables_read_lock(mysql))
|
||||
goto err;
|
||||
if (opt_single_transaction && start_transaction(mysql, test(opt_master_data)))
|
||||
if (opt_single_transaction && start_transaction(mysql))
|
||||
goto err;
|
||||
if (opt_delete_master_logs && do_reset_master(mysql))
|
||||
goto err;
|
||||
|
|
6326
client/mysqltest.c
6326
client/mysqltest.c
File diff suppressed because it is too large
Load diff
16
configure.in
16
configure.in
|
@ -415,6 +415,10 @@ AC_SUBST(HOSTNAME)
|
|||
AC_SUBST(PERL)
|
||||
AC_SUBST(PERL5)
|
||||
|
||||
# icheck, used for ABI check
|
||||
AC_PATH_PROG(ICHECK, icheck, no)
|
||||
AC_SUBST(ICHECK)
|
||||
|
||||
# Lock for PS
|
||||
AC_PATH_PROG(PS, ps, ps)
|
||||
AC_MSG_CHECKING("how to check if pid exists")
|
||||
|
@ -1058,6 +1062,18 @@ EOF
|
|||
extra/Makefile.in)
|
||||
cat > $filesed << EOF
|
||||
s,\(extra/comp_err\)\$(EXEEXT),\1.linux,
|
||||
EOF
|
||||
;;
|
||||
libmysql/Makefile.in)
|
||||
cat > $filesed << EOF
|
||||
s,libyassl.la,.libs/libyassl.a,
|
||||
s,libtaocrypt.la,.libs/libtaocrypt.a,
|
||||
EOF
|
||||
;;
|
||||
libmysql_r/Makefile.in)
|
||||
cat > $filesed << EOF
|
||||
s,libyassl.la,.libs/libyassl.a,
|
||||
s,libtaocrypt.la,.libs/libtaocrypt.a,
|
||||
EOF
|
||||
;;
|
||||
client/Makefile.in)
|
||||
|
|
|
@ -40,6 +40,13 @@
|
|||
#include "lock.hpp"
|
||||
#include "openssl/ssl.h" // ASN1_STRING and DH
|
||||
|
||||
// Check if _POSIX_THREADS should be forced
|
||||
#if !defined(_POSIX_THREADS) && (defined(__NETWARE__) || defined(__hpux))
|
||||
// HPUX does not define _POSIX_THREADS as it's not _fully_ implemented
|
||||
// Netware supports pthreads but does not announce it
|
||||
#define _POSIX_THREADS
|
||||
#endif
|
||||
|
||||
#ifdef _POSIX_THREADS
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
|
|
|
@ -60,12 +60,12 @@ private:
|
|||
T mac_;
|
||||
|
||||
// MSVC 6 HACK, gives compiler error if calculated in array
|
||||
enum { BSIZE = T::BLOCK_SIZE / sizeof(word32),
|
||||
DSIZE = T::DIGEST_SIZE / sizeof(word32) };
|
||||
enum { HMAC_BSIZE = T::BLOCK_SIZE / sizeof(word32),
|
||||
HMAC_DSIZE = T::DIGEST_SIZE / sizeof(word32) };
|
||||
|
||||
word32 ip_[BSIZE]; // align ipad_ on word32
|
||||
word32 op_[BSIZE]; // align opad_ on word32
|
||||
word32 innerH_[DSIZE]; // align innerHash_ on word32
|
||||
word32 ip_[HMAC_BSIZE]; // align ipad_ on word32
|
||||
word32 op_[HMAC_BSIZE]; // align opad_ on word32
|
||||
word32 innerH_[HMAC_DSIZE]; // align innerHash_ on word32
|
||||
|
||||
void KeyInnerHash();
|
||||
|
||||
|
|
|
@ -27,9 +27,12 @@
|
|||
#endif /* _WIN32 */
|
||||
|
||||
|
||||
#if !defined(_SOCKLEN_T) && (defined(_WIN32) || defined(__NETWARE__))
|
||||
#if !defined(_SOCKLEN_T) && defined(_WIN32)
|
||||
typedef int socklen_t;
|
||||
#endif
|
||||
#if !defined(_SOCKLEN_T) && defined(__NETWARE__)
|
||||
typedef size_t socklen_t;
|
||||
#endif
|
||||
|
||||
|
||||
// Check type of third arg to accept
|
||||
|
|
|
@ -15,14 +15,14 @@
|
|||
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||
# MA 02111-1307, USA
|
||||
|
||||
BUILT_SOURCES = mysql_version.h m_ctype.h my_config.h
|
||||
BUILT_SOURCES = mysql_version.h my_config.h
|
||||
pkginclude_HEADERS = my_dbug.h m_string.h my_sys.h my_list.h my_xml.h \
|
||||
mysql.h mysql_com.h mysql_embed.h \
|
||||
my_semaphore.h my_pthread.h my_no_pthread.h \
|
||||
errmsg.h my_global.h my_net.h my_alloc.h \
|
||||
my_getopt.h sslopt-longopts.h my_dir.h typelib.h \
|
||||
sslopt-vars.h sslopt-case.h sql_common.h keycache.h \
|
||||
mysql_time.h mysql/plugin.h $(BUILT_SOURCES)
|
||||
mysql_time.h m_ctype.h mysql/plugin.h $(BUILT_SOURCES)
|
||||
noinst_HEADERS = config-win.h config-netware.h \
|
||||
heap.h my_bitmap.h my_uctype.h \
|
||||
myisam.h myisampack.h myisammrg.h ft_global.h\
|
||||
|
@ -35,8 +35,10 @@ noinst_HEADERS = config-win.h config-netware.h \
|
|||
atomic/rwlock.h atomic/x86-gcc.h atomic/x86-msvc.h \
|
||||
my_libwrap.h
|
||||
|
||||
# mysql_version.h are generated
|
||||
CLEANFILES = mysql_version.h my_config.h readline openssl
|
||||
# Remove built files and the symlinked directories
|
||||
CLEANFILES = $(BUILT_SOURCES) readline openssl
|
||||
|
||||
EXTRA_DIST = mysql_h.ic
|
||||
|
||||
# Some include files that may be moved and patched by configure
|
||||
DISTCLEANFILES = sched.h $(CLEANFILES)
|
||||
|
@ -54,5 +56,22 @@ my_config.h: ../config.h
|
|||
dist-hook:
|
||||
$(RM) -f $(distdir)/mysql_version.h $(distdir)/my_config.h
|
||||
|
||||
#
|
||||
# Rules for checking that ABI has not changed
|
||||
#
|
||||
|
||||
# Create a icheck file and compare it to the reference
|
||||
abi_check: mysql.h mysql_version.h mysql_com.h mysql_time.h my_list.h \
|
||||
my_alloc.h typelib.h mysql_h.ic
|
||||
@set -ex; \
|
||||
if [ @ICHECK@ != no ] ; then \
|
||||
@ICHECK@ --canonify --skip-from-re /usr/ -o $@.ic mysql.h; \
|
||||
@ICHECK@ --compare mysql_h.ic $@.ic; \
|
||||
fi; \
|
||||
touch abi_check;
|
||||
|
||||
#all: abi_check
|
||||
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
%::SCCS/s.%
|
||||
|
|
|
@ -39,7 +39,8 @@ extern void _db_enter_(const char *_func_,const char *_file_,uint _line_,
|
|||
extern void _db_return_(uint _line_,const char **_sfunc_,const char **_sfile_,
|
||||
uint *_slevel_);
|
||||
extern void _db_pargs_(uint _line_,const char *keyword);
|
||||
extern void _db_doprnt_ _VARARGS((const char *format,...));
|
||||
extern void _db_doprnt_ _VARARGS((const char *format,...))
|
||||
ATTRIBUTE_FORMAT(printf, 1, 2);
|
||||
extern void _db_dump_(uint _line_,const char *keyword,const char *memory,
|
||||
uint length);
|
||||
extern void _db_end_(void);
|
||||
|
|
|
@ -63,6 +63,16 @@ typedef long my_time_t;
|
|||
#define TIME_NO_ZERO_DATE (TIME_NO_ZERO_IN_DATE*2)
|
||||
#define TIME_INVALID_DATES (TIME_NO_ZERO_DATE*2)
|
||||
|
||||
#define MYSQL_TIME_WARN_TRUNCATED 1
|
||||
#define MYSQL_TIME_WARN_OUT_OF_RANGE 2
|
||||
|
||||
/* Limits for the TIME data type */
|
||||
#define TIME_MAX_HOUR 838
|
||||
#define TIME_MAX_MINUTE 59
|
||||
#define TIME_MAX_SECOND 59
|
||||
#define TIME_MAX_VALUE (TIME_MAX_HOUR*10000 + TIME_MAX_MINUTE*100 + \
|
||||
TIME_MAX_SECOND)
|
||||
|
||||
enum enum_mysql_timestamp_type
|
||||
str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
|
||||
uint flags, int *was_cut);
|
||||
|
@ -75,7 +85,9 @@ ulonglong TIME_to_ulonglong(const MYSQL_TIME *time);
|
|||
|
||||
|
||||
my_bool str_to_time(const char *str,uint length, MYSQL_TIME *l_time,
|
||||
int *was_cut);
|
||||
int *warning);
|
||||
|
||||
int check_time_range(struct st_mysql_time *time, int *warning);
|
||||
|
||||
long calc_daynr(uint year,uint month,uint day);
|
||||
uint calc_days_in_year(uint year);
|
||||
|
@ -127,17 +139,25 @@ int my_date_to_str(const MYSQL_TIME *l_time, char *to);
|
|||
int my_datetime_to_str(const MYSQL_TIME *l_time, char *to);
|
||||
int my_TIME_to_str(const MYSQL_TIME *l_time, char *to);
|
||||
|
||||
/*
|
||||
The following must be sorted so that simple intervals comes first.
|
||||
(get_interval_value() depends on this)
|
||||
When updating this enum please update
|
||||
LEX_STRING interval_type_to_name[] in sql/time.cc
|
||||
/*
|
||||
Available interval types used in any statement.
|
||||
|
||||
'interval_type' must be sorted so that simple intervals comes first,
|
||||
ie year, quarter, month, week, day, hour, etc. The order based on
|
||||
interval size is also important and the intervals should be kept in a
|
||||
large to smaller order. (get_interval_value() depends on this)
|
||||
|
||||
Note: If you change the order of elements in this enum you should fix
|
||||
order of elements in 'interval_type_to_name' and 'interval_names'
|
||||
arrays
|
||||
|
||||
See also interval_type_to_name, get_interval_value, interval_names
|
||||
*/
|
||||
|
||||
enum interval_type
|
||||
{
|
||||
INTERVAL_YEAR, INTERVAL_QUARTER, INTERVAL_MONTH, INTERVAL_DAY, INTERVAL_HOUR,
|
||||
INTERVAL_MINUTE, INTERVAL_WEEK, INTERVAL_SECOND, INTERVAL_MICROSECOND ,
|
||||
INTERVAL_YEAR, INTERVAL_QUARTER, INTERVAL_MONTH, INTERVAL_WEEK, INTERVAL_DAY,
|
||||
INTERVAL_HOUR, INTERVAL_MINUTE, INTERVAL_SECOND, INTERVAL_MICROSECOND,
|
||||
INTERVAL_YEAR_MONTH, INTERVAL_DAY_HOUR, INTERVAL_DAY_MINUTE,
|
||||
INTERVAL_DAY_SECOND, INTERVAL_HOUR_MINUTE, INTERVAL_HOUR_SECOND,
|
||||
INTERVAL_MINUTE_SECOND, INTERVAL_DAY_MICROSECOND, INTERVAL_HOUR_MICROSECOND,
|
||||
|
|
|
@ -14,6 +14,17 @@
|
|||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/*
|
||||
This file defines the client API to MySQL and also the ABI of the
|
||||
dynamically linked libmysqlclient.
|
||||
|
||||
The ABI should never be changed in a released product of MySQL
|
||||
thus you need to take great care when changing the file. In case
|
||||
the file is changed so the ABI is broken, you must also
|
||||
update the SHAREDLIB_MAJOR_VERSION in configure.in .
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _mysql_h
|
||||
#define _mysql_h
|
||||
|
||||
|
|
961
include/mysql_h.ic
Normal file
961
include/mysql_h.ic
Normal file
|
@ -0,0 +1,961 @@
|
|||
struct character_set;
|
||||
struct rand_struct;
|
||||
struct st_list;
|
||||
struct st_mem_root;
|
||||
struct st_mysql;
|
||||
struct st_mysql_bind;
|
||||
struct st_mysql_data;
|
||||
struct st_mysql_field;
|
||||
struct st_mysql_manager;
|
||||
struct st_mysql_methods;
|
||||
struct st_mysql_options;
|
||||
struct st_mysql_parameters;
|
||||
struct st_mysql_res;
|
||||
struct st_mysql_rows;
|
||||
struct st_mysql_stmt;
|
||||
struct st_mysql_time;
|
||||
struct st_net;
|
||||
struct st_typelib;
|
||||
struct st_udf_args;
|
||||
struct st_udf_init;
|
||||
struct st_used_mem;
|
||||
enum Item_result;
|
||||
enum enum_cursor_type;
|
||||
enum enum_field_types;
|
||||
enum enum_mysql_set_option;
|
||||
enum enum_mysql_stmt_state;
|
||||
enum enum_mysql_timestamp_type;
|
||||
enum enum_server_command;
|
||||
enum enum_stmt_attr_type;
|
||||
enum mysql_enum_shutdown_level;
|
||||
enum mysql_option;
|
||||
enum mysql_protocol_type;
|
||||
enum mysql_rpl_type;
|
||||
enum mysql_status;
|
||||
# 134 "mysql.h"
|
||||
typedef struct st_mysql_rows MYSQL_ROWS;
|
||||
# 24 "my_list.h"
|
||||
typedef struct st_list LIST;
|
||||
# 251 "mysql.h"
|
||||
typedef struct st_mysql MYSQL;
|
||||
# 653 "mysql.h"
|
||||
typedef struct st_mysql_bind MYSQL_BIND;
|
||||
# 93 "mysql.h"
|
||||
typedef struct st_mysql_field MYSQL_FIELD;
|
||||
# 117 "mysql.h"
|
||||
typedef unsigned int MYSQL_FIELD_OFFSET;
|
||||
# 340 "mysql.h"
|
||||
typedef struct st_mysql_manager MYSQL_MANAGER;
|
||||
# 354 "mysql.h"
|
||||
typedef struct st_mysql_parameters MYSQL_PARAMETERS;
|
||||
# 309 "mysql.h"
|
||||
typedef struct st_mysql_res MYSQL_RES;
|
||||
# 116 "mysql.h"
|
||||
typedef char * * MYSQL_ROW;
|
||||
# 140 "mysql.h"
|
||||
typedef MYSQL_ROWS * MYSQL_ROW_OFFSET;
|
||||
# 681 "mysql.h"
|
||||
typedef struct st_mysql_stmt MYSQL_STMT;
|
||||
# 236 "mysql.h"
|
||||
typedef struct character_set MY_CHARSET_INFO;
|
||||
# 184 "mysql_com.h"
|
||||
typedef struct st_net NET;
|
||||
# 21 "typelib.h"
|
||||
typedef struct st_typelib TYPELIB;
|
||||
# 174 "mysql_com.h"
|
||||
typedef struct st_vio Vio;
|
||||
# 57 "mysql.h"
|
||||
typedef char * gptr;
|
||||
# 29 "my_list.h"
|
||||
typedef int (* list_walk_action)(void *, void *);
|
||||
# 48 "mysql.h"
|
||||
typedef char my_bool;
|
||||
# 63 "mysql.h"
|
||||
typedef int my_socket;
|
||||
# 125 "mysql.h"
|
||||
typedef unsigned long long int my_ulonglong;
|
||||
# 144 "mysql.h"
|
||||
typedef struct embedded_query_result EMBEDDED_QUERY_RESULT;
|
||||
# 35 "my_alloc.h"
|
||||
typedef struct st_mem_root MEM_ROOT;
|
||||
# 145 "mysql.h"
|
||||
typedef struct st_mysql_data MYSQL_DATA;
|
||||
# 750 "mysql.h"
|
||||
typedef struct st_mysql_methods MYSQL_METHODS;
|
||||
# 48 "mysql_time.h"
|
||||
typedef struct st_mysql_time MYSQL_TIME;
|
||||
# 375 "mysql_com.h"
|
||||
typedef struct st_udf_args UDF_ARGS;
|
||||
# 388 "mysql_com.h"
|
||||
typedef struct st_udf_init UDF_INIT;
|
||||
# 27 "my_alloc.h"
|
||||
typedef struct st_used_mem USED_MEM;
|
||||
# 236 "mysql.h"
|
||||
struct __attribute__((aligned(__alignof__(unsigned int)), aligned(__alignof__(void *)))) character_set
|
||||
{
|
||||
unsigned int number;
|
||||
unsigned int state;
|
||||
char const * csname;
|
||||
char const * name;
|
||||
char const * comment;
|
||||
char const * dir;
|
||||
unsigned int mbminlen;
|
||||
unsigned int mbmaxlen;
|
||||
};
|
||||
# 361 "mysql_com.h"
|
||||
struct __attribute__((aligned(__alignof__(unsigned long int)), aligned(__alignof__(double)))) rand_struct
|
||||
{
|
||||
unsigned long int seed1;
|
||||
unsigned long int seed2;
|
||||
unsigned long int max_value;
|
||||
double max_value_dbl;
|
||||
};
|
||||
# 24 "my_list.h"
|
||||
struct __attribute__((aligned(__alignof__(void *)))) st_list
|
||||
{
|
||||
struct st_list * prev;
|
||||
struct st_list * next;
|
||||
void * data;
|
||||
};
|
||||
# 35 "my_alloc.h"
|
||||
struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned int)))) st_mem_root
|
||||
{
|
||||
USED_MEM * free;
|
||||
USED_MEM * used;
|
||||
USED_MEM * pre_alloc;
|
||||
unsigned int min_malloc;
|
||||
unsigned int block_size;
|
||||
unsigned int block_num;
|
||||
unsigned int first_block_usage;
|
||||
void (* error_handler)(void);
|
||||
};
|
||||
# 251 "mysql.h"
|
||||
struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long long int)))) st_mysql
|
||||
{
|
||||
NET net;
|
||||
gptr connector_fd;
|
||||
char * host;
|
||||
char * user;
|
||||
char * passwd;
|
||||
char * unix_socket;
|
||||
char * server_version;
|
||||
char * host_info;
|
||||
char * info;
|
||||
char * db;
|
||||
struct charset_info_st * charset;
|
||||
MYSQL_FIELD * fields;
|
||||
MEM_ROOT field_alloc;
|
||||
my_ulonglong affected_rows;
|
||||
my_ulonglong insert_id;
|
||||
my_ulonglong extra_info;
|
||||
unsigned long int thread_id;
|
||||
unsigned long int packet_length;
|
||||
unsigned int port;
|
||||
unsigned long int client_flag;
|
||||
unsigned long int server_capabilities;
|
||||
unsigned int protocol_version;
|
||||
unsigned int field_count;
|
||||
unsigned int server_status;
|
||||
unsigned int server_language;
|
||||
unsigned int warning_count;
|
||||
struct st_mysql_options options;
|
||||
enum mysql_status status;
|
||||
my_bool free_me;
|
||||
my_bool reconnect;
|
||||
char scramble[(20 + 1)];
|
||||
my_bool rpl_pivot;
|
||||
struct st_mysql * master;
|
||||
struct st_mysql * next_slave;
|
||||
struct st_mysql * last_used_slave;
|
||||
struct st_mysql * last_used_con;
|
||||
LIST * stmts;
|
||||
struct st_mysql_methods const * methods;
|
||||
void * thd;
|
||||
my_bool * unbuffered_fetch_owner;
|
||||
};
|
||||
# 653 "mysql.h"
|
||||
struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long int)))) st_mysql_bind
|
||||
{
|
||||
unsigned long int * length;
|
||||
my_bool * is_null;
|
||||
void * buffer;
|
||||
my_bool * error;
|
||||
enum enum_field_types buffer_type;
|
||||
unsigned long int buffer_length;
|
||||
unsigned char * row_ptr;
|
||||
unsigned long int offset;
|
||||
unsigned long int length_value;
|
||||
unsigned int param_number;
|
||||
unsigned int pack_length;
|
||||
my_bool error_value;
|
||||
my_bool is_unsigned;
|
||||
my_bool long_data_used;
|
||||
my_bool is_null_value;
|
||||
void (* store_param_func)(NET * net, struct st_mysql_bind * param);
|
||||
void (* fetch_result)(struct st_mysql_bind *, MYSQL_FIELD *, unsigned char * * row);
|
||||
void (* skip_result)(struct st_mysql_bind *, MYSQL_FIELD *, unsigned char * * row);
|
||||
};
|
||||
# 145 "mysql.h"
|
||||
struct __attribute__((aligned(__alignof__(unsigned long long int)), aligned(__alignof__(void *)))) st_mysql_data
|
||||
{
|
||||
my_ulonglong rows;
|
||||
unsigned int fields;
|
||||
MYSQL_ROWS * data;
|
||||
MEM_ROOT alloc;
|
||||
struct embedded_query_result * embedded_info;
|
||||
};
|
||||
# 93 "mysql.h"
|
||||
struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long int)))) st_mysql_field
|
||||
{
|
||||
char * name;
|
||||
char * org_name;
|
||||
char * table;
|
||||
char * org_table;
|
||||
char * db;
|
||||
char * catalog;
|
||||
char * def;
|
||||
unsigned long int length;
|
||||
unsigned long int max_length;
|
||||
unsigned int name_length;
|
||||
unsigned int org_name_length;
|
||||
unsigned int table_length;
|
||||
unsigned int org_table_length;
|
||||
unsigned int db_length;
|
||||
unsigned int catalog_length;
|
||||
unsigned int def_length;
|
||||
unsigned int flags;
|
||||
unsigned int decimals;
|
||||
unsigned int charsetnr;
|
||||
enum enum_field_types type;
|
||||
};
|
||||
# 340 "mysql.h"
|
||||
struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long int)))) st_mysql_manager
|
||||
{
|
||||
NET net;
|
||||
char * host;
|
||||
char * user;
|
||||
char * passwd;
|
||||
unsigned int port;
|
||||
my_bool free_me;
|
||||
my_bool eof;
|
||||
int cmd_status;
|
||||
int last_errno;
|
||||
char * net_buf;
|
||||
char * net_buf_pos;
|
||||
char * net_data_end;
|
||||
int net_buf_size;
|
||||
char last_error[256];
|
||||
};
|
||||
# 750 "mysql.h"
|
||||
struct __attribute__((aligned(__alignof__(void *)))) st_mysql_methods
|
||||
{
|
||||
my_bool (* read_query_result)(MYSQL * mysql);
|
||||
my_bool (* advanced_command)(MYSQL * mysql, enum enum_server_command, char const * header, unsigned long int, char const * arg, unsigned long int, my_bool, MYSQL_STMT * stmt);
|
||||
MYSQL_DATA * (* read_rows)(MYSQL * mysql, MYSQL_FIELD * mysql_fields, unsigned int);
|
||||
MYSQL_RES * (* use_result)(MYSQL * mysql);
|
||||
void (* fetch_lengths)(unsigned long int * to, MYSQL_ROW, unsigned int);
|
||||
void (* flush_use_result)(MYSQL * mysql);
|
||||
MYSQL_FIELD * (* list_fields)(MYSQL * mysql);
|
||||
my_bool (* read_prepare_result)(MYSQL * mysql, MYSQL_STMT * stmt);
|
||||
int (* stmt_execute)(MYSQL_STMT * stmt);
|
||||
int (* read_binary_rows)(MYSQL_STMT * stmt);
|
||||
int (* unbuffered_fetch)(MYSQL * mysql, char * * row);
|
||||
void (* free_embedded_thd)(MYSQL * mysql);
|
||||
char const * (* read_statistics)(MYSQL * mysql);
|
||||
my_bool (* next_result)(MYSQL * mysql);
|
||||
int (* read_change_user_result)(MYSQL * mysql, char * buff, char const * passwd);
|
||||
int (* read_rows_from_cursor)(MYSQL_STMT * stmt);
|
||||
};
|
||||
# 167 "mysql.h"
|
||||
struct __attribute__((aligned(__alignof__(unsigned long int)), aligned(__alignof__(void *)))) st_mysql_options
|
||||
{
|
||||
unsigned int connect_timeout;
|
||||
unsigned int read_timeout;
|
||||
unsigned int write_timeout;
|
||||
unsigned int port;
|
||||
unsigned int protocol;
|
||||
unsigned long int client_flag;
|
||||
char * host;
|
||||
char * user;
|
||||
char * password;
|
||||
char * unix_socket;
|
||||
char * db;
|
||||
struct st_dynamic_array * init_commands;
|
||||
char * my_cnf_file;
|
||||
char * my_cnf_group;
|
||||
char * charset_dir;
|
||||
char * charset_name;
|
||||
char * ssl_key;
|
||||
char * ssl_cert;
|
||||
char * ssl_ca;
|
||||
char * ssl_capath;
|
||||
char * ssl_cipher;
|
||||
char * shared_memory_base_name;
|
||||
unsigned long int max_allowed_packet;
|
||||
my_bool use_ssl;
|
||||
my_bool compress;
|
||||
my_bool named_pipe;
|
||||
my_bool rpl_probe;
|
||||
my_bool rpl_parse;
|
||||
my_bool no_master_reads;
|
||||
my_bool separate_thread;
|
||||
enum mysql_option methods_to_use;
|
||||
char * client_ip;
|
||||
my_bool secure_auth;
|
||||
my_bool report_data_truncation;
|
||||
int (* local_infile_init)(void * *, char const *, void *);
|
||||
int (* local_infile_read)(void *, char *, unsigned int);
|
||||
void (* local_infile_end)(void);
|
||||
int (* local_infile_error)(void *, char *, unsigned int);
|
||||
void * local_infile_userdata;
|
||||
};
|
||||
# 354 "mysql.h"
|
||||
struct __attribute__((aligned(__alignof__(void *)))) st_mysql_parameters
|
||||
{
|
||||
unsigned long int * p_max_allowed_packet;
|
||||
unsigned long int * p_net_buffer_length;
|
||||
};
|
||||
# 309 "mysql.h"
|
||||
struct __attribute__((aligned(__alignof__(unsigned long long int)), aligned(__alignof__(void *)))) st_mysql_res
|
||||
{
|
||||
my_ulonglong row_count;
|
||||
MYSQL_FIELD * fields;
|
||||
MYSQL_DATA * data;
|
||||
MYSQL_ROWS * data_cursor;
|
||||
unsigned long int * lengths;
|
||||
MYSQL * handle;
|
||||
MEM_ROOT field_alloc;
|
||||
unsigned int field_count;
|
||||
unsigned int current_field;
|
||||
MYSQL_ROW row;
|
||||
MYSQL_ROW current_row;
|
||||
my_bool eof;
|
||||
my_bool unbuffered_fetch_cancelled;
|
||||
struct st_mysql_methods const * methods;
|
||||
};
|
||||
# 134 "mysql.h"
|
||||
struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long int)))) st_mysql_rows
|
||||
{
|
||||
struct st_mysql_rows * next;
|
||||
MYSQL_ROW data;
|
||||
unsigned long int length;
|
||||
};
|
||||
# 681 "mysql.h"
|
||||
struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long long int)))) st_mysql_stmt
|
||||
{
|
||||
MEM_ROOT mem_root;
|
||||
LIST list;
|
||||
MYSQL * mysql;
|
||||
MYSQL_BIND * params;
|
||||
MYSQL_BIND * bind;
|
||||
MYSQL_FIELD * fields;
|
||||
MYSQL_DATA result;
|
||||
MYSQL_ROWS * data_cursor;
|
||||
my_ulonglong affected_rows;
|
||||
my_ulonglong insert_id;
|
||||
int (* read_row_func)(struct st_mysql_stmt * stmt, unsigned char * * row);
|
||||
unsigned long int stmt_id;
|
||||
unsigned long int flags;
|
||||
unsigned long int prefetch_rows;
|
||||
unsigned int server_status;
|
||||
unsigned int last_errno;
|
||||
unsigned int param_count;
|
||||
unsigned int field_count;
|
||||
enum enum_mysql_stmt_state state;
|
||||
char last_error[512];
|
||||
char sqlstate[(5 + 1)];
|
||||
my_bool send_types_to_server;
|
||||
my_bool bind_param_done;
|
||||
unsigned char bind_result_done;
|
||||
my_bool unbuffered_fetch_cancelled;
|
||||
my_bool update_max_length;
|
||||
};
|
||||
# 48 "mysql_time.h"
|
||||
struct __attribute__((aligned(__alignof__(unsigned long int)))) st_mysql_time
|
||||
{
|
||||
unsigned int year;
|
||||
unsigned int month;
|
||||
unsigned int day;
|
||||
unsigned int hour;
|
||||
unsigned int minute;
|
||||
unsigned int second;
|
||||
unsigned long int second_part;
|
||||
my_bool neg;
|
||||
enum enum_mysql_timestamp_type time_type;
|
||||
};
|
||||
# 184 "mysql_com.h"
|
||||
struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long int)))) st_net
|
||||
{
|
||||
Vio * vio;
|
||||
unsigned char * buff;
|
||||
unsigned char * buff_end;
|
||||
unsigned char * write_pos;
|
||||
unsigned char * read_pos;
|
||||
my_socket fd;
|
||||
unsigned long int max_packet;
|
||||
unsigned long int max_packet_size;
|
||||
unsigned int pkt_nr;
|
||||
unsigned int compress_pkt_nr;
|
||||
unsigned int write_timeout;
|
||||
unsigned int read_timeout;
|
||||
unsigned int retry_count;
|
||||
int fcntl;
|
||||
my_bool compress;
|
||||
unsigned long int remain_in_buf;
|
||||
unsigned long int length;
|
||||
unsigned long int buf_length;
|
||||
unsigned long int where_b;
|
||||
unsigned int * return_status;
|
||||
unsigned char reading_or_writing;
|
||||
char save_char;
|
||||
my_bool no_send_ok;
|
||||
my_bool no_send_eof;
|
||||
my_bool no_send_error;
|
||||
char last_error[512];
|
||||
char sqlstate[(5 + 1)];
|
||||
unsigned int last_errno;
|
||||
unsigned char error;
|
||||
gptr query_cache_query;
|
||||
my_bool report_error;
|
||||
my_bool return_errno;
|
||||
};
|
||||
# 21 "typelib.h"
|
||||
struct __attribute__((aligned(__alignof__(unsigned int)), aligned(__alignof__(void *)))) st_typelib
|
||||
{
|
||||
unsigned int count;
|
||||
char const * name;
|
||||
char const * * type_names;
|
||||
unsigned int * type_lengths;
|
||||
};
|
||||
# 375 "mysql_com.h"
|
||||
struct __attribute__((aligned(__alignof__(unsigned int)), aligned(__alignof__(void *)))) st_udf_args
|
||||
{
|
||||
unsigned int arg_count;
|
||||
enum Item_result * arg_type;
|
||||
char * * args;
|
||||
unsigned long int * lengths;
|
||||
char * maybe_null;
|
||||
char * * attributes;
|
||||
unsigned long int * attribute_lengths;
|
||||
};
|
||||
# 388 "mysql_com.h"
|
||||
struct __attribute__((aligned(__alignof__(unsigned long int)), aligned(__alignof__(void *)))) st_udf_init
|
||||
{
|
||||
my_bool maybe_null;
|
||||
unsigned int decimals;
|
||||
unsigned long int max_length;
|
||||
char * ptr;
|
||||
my_bool const_item;
|
||||
};
|
||||
# 27 "my_alloc.h"
|
||||
struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned int)))) st_used_mem
|
||||
{
|
||||
struct st_used_mem * next;
|
||||
unsigned int left;
|
||||
unsigned int size;
|
||||
};
|
||||
# 372 "mysql_com.h"
|
||||
enum Item_result
|
||||
{
|
||||
STRING_RESULT = 0,
|
||||
REAL_RESULT = 1,
|
||||
INT_RESULT = 2,
|
||||
ROW_RESULT = 3,
|
||||
DECIMAL_RESULT = 4,
|
||||
};
|
||||
# 318 "mysql_com.h"
|
||||
enum enum_cursor_type
|
||||
{
|
||||
CURSOR_TYPE_NO_CURSOR = 0,
|
||||
CURSOR_TYPE_READ_ONLY = 1,
|
||||
CURSOR_TYPE_FOR_UPDATE = 2,
|
||||
CURSOR_TYPE_SCROLLABLE = 4,
|
||||
};
|
||||
# 231 "mysql_com.h"
|
||||
enum enum_field_types
|
||||
{
|
||||
MYSQL_TYPE_DECIMAL = 0,
|
||||
MYSQL_TYPE_TINY = 1,
|
||||
MYSQL_TYPE_SHORT = 2,
|
||||
MYSQL_TYPE_LONG = 3,
|
||||
MYSQL_TYPE_FLOAT = 4,
|
||||
MYSQL_TYPE_DOUBLE = 5,
|
||||
MYSQL_TYPE_NULL = 6,
|
||||
MYSQL_TYPE_TIMESTAMP = 7,
|
||||
MYSQL_TYPE_LONGLONG = 8,
|
||||
MYSQL_TYPE_INT24 = 9,
|
||||
MYSQL_TYPE_DATE = 10,
|
||||
MYSQL_TYPE_TIME = 11,
|
||||
MYSQL_TYPE_DATETIME = 12,
|
||||
MYSQL_TYPE_YEAR = 13,
|
||||
MYSQL_TYPE_NEWDATE = 14,
|
||||
MYSQL_TYPE_VARCHAR = 15,
|
||||
MYSQL_TYPE_BIT = 16,
|
||||
MYSQL_TYPE_NEWDECIMAL = 246,
|
||||
MYSQL_TYPE_ENUM = 247,
|
||||
MYSQL_TYPE_SET = 248,
|
||||
MYSQL_TYPE_TINY_BLOB = 249,
|
||||
MYSQL_TYPE_MEDIUM_BLOB = 250,
|
||||
MYSQL_TYPE_LONG_BLOB = 251,
|
||||
MYSQL_TYPE_BLOB = 252,
|
||||
MYSQL_TYPE_VAR_STRING = 253,
|
||||
MYSQL_TYPE_STRING = 254,
|
||||
MYSQL_TYPE_GEOMETRY = 255,
|
||||
};
|
||||
# 328 "mysql_com.h"
|
||||
enum enum_mysql_set_option
|
||||
{
|
||||
MYSQL_OPTION_MULTI_STATEMENTS_ON = 0,
|
||||
MYSQL_OPTION_MULTI_STATEMENTS_OFF = 1,
|
||||
};
|
||||
# 583 "mysql.h"
|
||||
enum enum_mysql_stmt_state
|
||||
{
|
||||
MYSQL_STMT_INIT_DONE = 1,
|
||||
MYSQL_STMT_PREPARE_DONE = 2,
|
||||
MYSQL_STMT_EXECUTE_DONE = 3,
|
||||
MYSQL_STMT_FETCH_DONE = 4,
|
||||
};
|
||||
# 29 "mysql_time.h"
|
||||
enum enum_mysql_timestamp_type
|
||||
{
|
||||
MYSQL_TIMESTAMP_NONE = -(2),
|
||||
MYSQL_TIMESTAMP_ERROR = -(1),
|
||||
MYSQL_TIMESTAMP_DATE = 0,
|
||||
MYSQL_TIMESTAMP_DATETIME = 1,
|
||||
MYSQL_TIMESTAMP_TIME = 2,
|
||||
};
|
||||
# 52 "mysql_com.h"
|
||||
enum enum_server_command
|
||||
{
|
||||
COM_SLEEP = 0,
|
||||
COM_QUIT = 1,
|
||||
COM_INIT_DB = 2,
|
||||
COM_QUERY = 3,
|
||||
COM_FIELD_LIST = 4,
|
||||
COM_CREATE_DB = 5,
|
||||
COM_DROP_DB = 6,
|
||||
COM_REFRESH = 7,
|
||||
COM_SHUTDOWN = 8,
|
||||
COM_STATISTICS = 9,
|
||||
COM_PROCESS_INFO = 10,
|
||||
COM_CONNECT = 11,
|
||||
COM_PROCESS_KILL = 12,
|
||||
COM_DEBUG = 13,
|
||||
COM_PING = 14,
|
||||
COM_TIME = 15,
|
||||
COM_DELAYED_INSERT = 16,
|
||||
COM_CHANGE_USER = 17,
|
||||
COM_BINLOG_DUMP = 18,
|
||||
COM_TABLE_DUMP = 19,
|
||||
COM_CONNECT_OUT = 20,
|
||||
COM_REGISTER_SLAVE = 21,
|
||||
COM_STMT_PREPARE = 22,
|
||||
COM_STMT_EXECUTE = 23,
|
||||
COM_STMT_SEND_LONG_DATA = 24,
|
||||
COM_STMT_CLOSE = 25,
|
||||
COM_STMT_RESET = 26,
|
||||
COM_SET_OPTION = 27,
|
||||
COM_STMT_FETCH = 28,
|
||||
COM_DAEMON = 29,
|
||||
COM_END = 30,
|
||||
};
|
||||
# 727 "mysql.h"
|
||||
enum enum_stmt_attr_type
|
||||
{
|
||||
STMT_ATTR_UPDATE_MAX_LENGTH = 0,
|
||||
STMT_ATTR_CURSOR_TYPE = 1,
|
||||
STMT_ATTR_PREFETCH_ROWS = 2,
|
||||
};
|
||||
# 293 "mysql_com.h"
|
||||
enum mysql_enum_shutdown_level
|
||||
{
|
||||
SHUTDOWN_DEFAULT = 0,
|
||||
SHUTDOWN_WAIT_CONNECTIONS = (unsigned char)((1 << 0)),
|
||||
SHUTDOWN_WAIT_TRANSACTIONS = (unsigned char)((1 << 1)),
|
||||
SHUTDOWN_WAIT_UPDATES = (unsigned char)((1 << 3)),
|
||||
SHUTDOWN_WAIT_ALL_BUFFERS = ((unsigned char)((1 << 3)) << 1),
|
||||
SHUTDOWN_WAIT_CRITICAL_BUFFERS = (((unsigned char)((1 << 3)) << 1) + 1),
|
||||
KILL_CONNECTION = 255,
|
||||
};
|
||||
# 154 "mysql.h"
|
||||
enum mysql_option
|
||||
{
|
||||
MYSQL_OPT_CONNECT_TIMEOUT = 0,
|
||||
MYSQL_OPT_COMPRESS = 1,
|
||||
MYSQL_OPT_NAMED_PIPE = 2,
|
||||
MYSQL_INIT_COMMAND = 3,
|
||||
MYSQL_READ_DEFAULT_FILE = 4,
|
||||
MYSQL_READ_DEFAULT_GROUP = 5,
|
||||
MYSQL_SET_CHARSET_DIR = 6,
|
||||
MYSQL_SET_CHARSET_NAME = 7,
|
||||
MYSQL_OPT_LOCAL_INFILE = 8,
|
||||
MYSQL_OPT_PROTOCOL = 9,
|
||||
MYSQL_SHARED_MEMORY_BASE_NAME = 10,
|
||||
MYSQL_OPT_READ_TIMEOUT = 11,
|
||||
MYSQL_OPT_WRITE_TIMEOUT = 12,
|
||||
MYSQL_OPT_USE_RESULT = 13,
|
||||
MYSQL_OPT_USE_REMOTE_CONNECTION = 14,
|
||||
MYSQL_OPT_USE_EMBEDDED_CONNECTION = 15,
|
||||
MYSQL_OPT_GUESS_CONNECTION = 16,
|
||||
MYSQL_SET_CLIENT_IP = 17,
|
||||
MYSQL_SECURE_AUTH = 18,
|
||||
MYSQL_REPORT_DATA_TRUNCATION = 19,
|
||||
MYSQL_OPT_RECONNECT = 20,
|
||||
MYSQL_OPT_SSL_VERIFY_SERVER_CERT = 21,
|
||||
};
|
||||
# 221 "mysql.h"
|
||||
enum mysql_protocol_type
|
||||
{
|
||||
MYSQL_PROTOCOL_DEFAULT = 0,
|
||||
MYSQL_PROTOCOL_TCP = 1,
|
||||
MYSQL_PROTOCOL_SOCKET = 2,
|
||||
MYSQL_PROTOCOL_PIPE = 3,
|
||||
MYSQL_PROTOCOL_MEMORY = 4,
|
||||
};
|
||||
# 231 "mysql.h"
|
||||
enum mysql_rpl_type
|
||||
{
|
||||
MYSQL_RPL_MASTER = 0,
|
||||
MYSQL_RPL_SLAVE = 1,
|
||||
MYSQL_RPL_ADMIN = 2,
|
||||
};
|
||||
# 216 "mysql.h"
|
||||
enum mysql_status
|
||||
{
|
||||
MYSQL_STATUS_READY = 0,
|
||||
MYSQL_STATUS_GET_RESULT = 1,
|
||||
MYSQL_STATUS_USE_RESULT = 2,
|
||||
};
|
||||
# 427 "mysql_com.h"
|
||||
extern my_bool check_scramble(char const * reply, char const * message, unsigned char const * hash_stage2);
|
||||
# 420 "mysql_com.h"
|
||||
extern my_bool check_scramble_323(char const *, char const * message, unsigned long int * salt);
|
||||
# 415 "mysql_com.h"
|
||||
extern void create_random_string(char * to, unsigned int, struct rand_struct * rand_st);
|
||||
# 28 "typelib.h"
|
||||
extern int find_type(char * x, TYPELIB * typelib, unsigned int);
|
||||
# 429 "mysql_com.h"
|
||||
extern void get_salt_from_password(unsigned char * res, char const * password);
|
||||
# 422 "mysql_com.h"
|
||||
extern void get_salt_from_password_323(unsigned long int * res, char const * password);
|
||||
# 435 "mysql_com.h"
|
||||
extern char * get_tty_password(char const * opt_message);
|
||||
# 30 "typelib.h"
|
||||
extern char const * get_type(TYPELIB * typelib, unsigned int);
|
||||
# 417 "mysql_com.h"
|
||||
extern void hash_password(unsigned long int * to, char const * password, unsigned int);
|
||||
# 31 "my_list.h"
|
||||
extern LIST * list_add(LIST * root, LIST * element);
|
||||
# 33 "my_list.h"
|
||||
extern LIST * list_cons(void * data, LIST * root);
|
||||
# 32 "my_list.h"
|
||||
extern LIST * list_delete(LIST * root, LIST * element);
|
||||
# 35 "my_list.h"
|
||||
extern void list_free(LIST * root, unsigned int);
|
||||
# 36 "my_list.h"
|
||||
extern unsigned int list_length(LIST *);
|
||||
# 34 "my_list.h"
|
||||
extern LIST * list_reverse(LIST * root);
|
||||
# 37 "my_list.h"
|
||||
extern int list_walk(LIST *, list_walk_action, gptr);
|
||||
# 430 "mysql_com.h"
|
||||
extern void make_password_from_salt(char * to, unsigned char const * hash_stage2);
|
||||
# 423 "mysql_com.h"
|
||||
extern void make_password_from_salt_323(char * to, unsigned long int const * salt);
|
||||
# 425 "mysql_com.h"
|
||||
extern void make_scrambled_password(char * to, char const * password);
|
||||
# 418 "mysql_com.h"
|
||||
extern void make_scrambled_password_323(char * to, char const * password);
|
||||
# 29 "typelib.h"
|
||||
extern void make_type(char * to, unsigned int, TYPELIB * typelib);
|
||||
# 358 "mysql_com.h"
|
||||
extern int my_connect(my_socket, struct sockaddr const * name, unsigned int, unsigned int);
|
||||
# 340 "mysql_com.h"
|
||||
extern my_bool my_net_init(NET * net, Vio * vio);
|
||||
# 341 "mysql_com.h"
|
||||
extern void my_net_local_init(NET * net);
|
||||
# 351 "mysql_com.h"
|
||||
extern unsigned long int my_net_read(NET * net);
|
||||
# 346 "mysql_com.h"
|
||||
extern my_bool my_net_write(NET * net, char const * packet, unsigned long int);
|
||||
# 414 "mysql_com.h"
|
||||
extern double my_rnd(struct rand_struct *);
|
||||
# 441 "mysql_com.h"
|
||||
extern void my_thread_end(void);
|
||||
# 440 "mysql_com.h"
|
||||
extern my_bool my_thread_init(void);
|
||||
# 559 "mysql.h"
|
||||
extern void myodbc_remove_escape(MYSQL * mysql, char * name);
|
||||
# 501 "mysql.h"
|
||||
extern int mysql_add_slave(MYSQL * mysql, char const * host, unsigned int, char const * user, char const * passwd);
|
||||
# 410 "mysql.h"
|
||||
extern my_ulonglong mysql_affected_rows(MYSQL * mysql);
|
||||
# 823 "mysql.h"
|
||||
extern my_bool mysql_autocommit(MYSQL * mysql, my_bool);
|
||||
# 426 "mysql.h"
|
||||
extern my_bool mysql_change_user(MYSQL * mysql, char const * user, char const * passwd, char const * db);
|
||||
# 418 "mysql.h"
|
||||
extern char const * mysql_character_set_name(MYSQL * mysql);
|
||||
# 826 "mysql.h"
|
||||
extern void mysql_close(MYSQL * sock);
|
||||
# 821 "mysql.h"
|
||||
extern my_bool mysql_commit(MYSQL * mysql);
|
||||
# 530 "mysql.h"
|
||||
extern void mysql_data_seek(MYSQL_RES * result, my_ulonglong);
|
||||
# 548 "mysql.h"
|
||||
extern void mysql_debug(char const * debug);
|
||||
# 487 "mysql.h"
|
||||
extern void mysql_disable_reads_from_master(MYSQL * mysql);
|
||||
# 481 "mysql.h"
|
||||
extern void mysql_disable_rpl_parse(MYSQL * mysql);
|
||||
# 509 "mysql.h"
|
||||
extern int mysql_dump_debug_info(MYSQL * mysql);
|
||||
# 561 "mysql.h"
|
||||
extern my_bool mysql_embedded(void);
|
||||
# 486 "mysql.h"
|
||||
extern void mysql_enable_reads_from_master(MYSQL * mysql);
|
||||
# 480 "mysql.h"
|
||||
extern void mysql_enable_rpl_parse(MYSQL * mysql);
|
||||
# 402 "mysql.h"
|
||||
extern my_bool mysql_eof(MYSQL_RES * res);
|
||||
# 412 "mysql.h"
|
||||
extern unsigned int mysql_errno(MYSQL * mysql);
|
||||
# 436 "mysql_com.h"
|
||||
extern char const * mysql_errno_to_sqlstate(unsigned int);
|
||||
# 413 "mysql.h"
|
||||
extern char const * mysql_error(MYSQL * mysql);
|
||||
# 541 "mysql.h"
|
||||
extern unsigned long int mysql_escape_string(char * to, char const * from, unsigned long int);
|
||||
# 538 "mysql.h"
|
||||
extern MYSQL_FIELD * mysql_fetch_field(MYSQL_RES * result);
|
||||
# 403 "mysql.h"
|
||||
extern MYSQL_FIELD * mysql_fetch_field_direct(MYSQL_RES * res, unsigned int);
|
||||
# 405 "mysql.h"
|
||||
extern MYSQL_FIELD * mysql_fetch_fields(MYSQL_RES * res);
|
||||
# 537 "mysql.h"
|
||||
extern unsigned long int * mysql_fetch_lengths(MYSQL_RES * result);
|
||||
# 536 "mysql.h"
|
||||
extern MYSQL_ROW mysql_fetch_row(MYSQL_RES * result);
|
||||
# 409 "mysql.h"
|
||||
extern unsigned int mysql_field_count(MYSQL * mysql);
|
||||
# 534 "mysql.h"
|
||||
extern MYSQL_FIELD_OFFSET mysql_field_seek(MYSQL_RES * result, MYSQL_FIELD_OFFSET);
|
||||
# 407 "mysql.h"
|
||||
extern MYSQL_FIELD_OFFSET mysql_field_tell(MYSQL_RES * res);
|
||||
# 529 "mysql.h"
|
||||
extern void mysql_free_result(MYSQL_RES * result);
|
||||
# 454 "mysql.h"
|
||||
extern void mysql_get_character_set_info(MYSQL * mysql, MY_CHARSET_INFO * charset);
|
||||
# 519 "mysql.h"
|
||||
extern char const * mysql_get_client_info(void);
|
||||
# 520 "mysql.h"
|
||||
extern unsigned long int mysql_get_client_version(void);
|
||||
# 521 "mysql.h"
|
||||
extern char const * mysql_get_host_info(MYSQL * mysql);
|
||||
# 384 "mysql.h"
|
||||
extern MYSQL_PARAMETERS * mysql_get_parameters(void);
|
||||
# 523 "mysql.h"
|
||||
extern unsigned int mysql_get_proto_info(MYSQL * mysql);
|
||||
# 518 "mysql.h"
|
||||
extern char const * mysql_get_server_info(MYSQL * mysql);
|
||||
# 522 "mysql.h"
|
||||
extern unsigned long int mysql_get_server_version(MYSQL * mysql);
|
||||
# 425 "mysql.h"
|
||||
extern char const * mysql_get_ssl_cipher(MYSQL * mysql);
|
||||
# 543 "mysql.h"
|
||||
extern unsigned long int mysql_hex_string(char * to, char const * from, unsigned long int);
|
||||
# 416 "mysql.h"
|
||||
extern char const * mysql_info(MYSQL * mysql);
|
||||
# 421 "mysql.h"
|
||||
extern MYSQL * mysql_init(MYSQL * mysql);
|
||||
# 411 "mysql.h"
|
||||
extern my_ulonglong mysql_insert_id(MYSQL * mysql);
|
||||
# 512 "mysql.h"
|
||||
extern int mysql_kill(MYSQL * mysql, unsigned long int);
|
||||
# 524 "mysql.h"
|
||||
extern MYSQL_RES * mysql_list_dbs(MYSQL * mysql, char const * wild);
|
||||
# 539 "mysql.h"
|
||||
extern MYSQL_RES * mysql_list_fields(MYSQL * mysql, char const * table, char const * wild);
|
||||
# 526 "mysql.h"
|
||||
extern MYSQL_RES * mysql_list_processes(MYSQL * mysql);
|
||||
# 525 "mysql.h"
|
||||
extern MYSQL_RES * mysql_list_tables(MYSQL * mysql, char const * wild);
|
||||
# 568 "mysql.h"
|
||||
extern void mysql_manager_close(MYSQL_MANAGER * con);
|
||||
# 569 "mysql.h"
|
||||
extern int mysql_manager_command(MYSQL_MANAGER * con, char const * cmd, int);
|
||||
# 563 "mysql.h"
|
||||
extern MYSQL_MANAGER * mysql_manager_connect(MYSQL_MANAGER * con, char const * host, char const * user, char const * passwd, unsigned int);
|
||||
# 571 "mysql.h"
|
||||
extern int mysql_manager_fetch_line(MYSQL_MANAGER * con, char * res_buf, int);
|
||||
# 562 "mysql.h"
|
||||
extern MYSQL_MANAGER * mysql_manager_init(MYSQL_MANAGER * con);
|
||||
# 445 "mysql.h"
|
||||
extern my_bool mysql_master_query(MYSQL * mysql, char const * q, unsigned long int);
|
||||
# 447 "mysql.h"
|
||||
extern my_bool mysql_master_send_query(MYSQL * mysql, char const * q, unsigned long int);
|
||||
# 824 "mysql.h"
|
||||
extern my_bool mysql_more_results(MYSQL * mysql);
|
||||
# 825 "mysql.h"
|
||||
extern int mysql_next_result(MYSQL * mysql);
|
||||
# 401 "mysql.h"
|
||||
extern unsigned int mysql_num_fields(MYSQL_RES * res);
|
||||
# 400 "mysql.h"
|
||||
extern my_ulonglong mysql_num_rows(MYSQL_RES * res);
|
||||
# 549 "mysql.h"
|
||||
extern char * mysql_odbc_escape_string(MYSQL * mysql, char * to, unsigned long int, char const * from, unsigned long int, void * param, char * (* extend_buffer)(void *, char * to, unsigned long int * length));
|
||||
# 527 "mysql.h"
|
||||
extern int mysql_options(MYSQL * mysql, enum mysql_option, char const * arg);
|
||||
# 516 "mysql.h"
|
||||
extern int mysql_ping(MYSQL * mysql);
|
||||
# 75 "mysql.h"
|
||||
extern unsigned int mysql_port;
|
||||
# 436 "mysql.h"
|
||||
extern int mysql_query(MYSQL * mysql, char const * q);
|
||||
# 574 "mysql.h"
|
||||
extern my_bool mysql_read_query_result(MYSQL * mysql);
|
||||
# 489 "mysql.h"
|
||||
extern my_bool mysql_reads_from_master_enabled(MYSQL * mysql);
|
||||
# 428 "mysql.h"
|
||||
extern MYSQL * mysql_real_connect(MYSQL * mysql, char const * host, char const * user, char const * passwd, char const * db, unsigned int, char const * unix_socket, unsigned long int);
|
||||
# 545 "mysql.h"
|
||||
extern unsigned long int mysql_real_escape_string(MYSQL * mysql, char * to, char const * from, unsigned long int);
|
||||
# 439 "mysql.h"
|
||||
extern int mysql_real_query(MYSQL * mysql, char const * q, unsigned long int);
|
||||
# 510 "mysql.h"
|
||||
extern int mysql_refresh(MYSQL * mysql, unsigned int);
|
||||
# 822 "mysql.h"
|
||||
extern my_bool mysql_rollback(MYSQL * mysql);
|
||||
# 532 "mysql.h"
|
||||
extern MYSQL_ROW_OFFSET mysql_row_seek(MYSQL_RES * result, MYSQL_ROW_OFFSET);
|
||||
# 406 "mysql.h"
|
||||
extern MYSQL_ROW_OFFSET mysql_row_tell(MYSQL_RES * res);
|
||||
# 483 "mysql.h"
|
||||
extern int mysql_rpl_parse_enabled(MYSQL * mysql);
|
||||
# 494 "mysql.h"
|
||||
extern my_bool mysql_rpl_probe(MYSQL * mysql);
|
||||
# 491 "mysql.h"
|
||||
extern enum mysql_rpl_type mysql_rpl_query_type(char const * q, int);
|
||||
# 435 "mysql.h"
|
||||
extern int mysql_select_db(MYSQL * mysql, char const * db);
|
||||
# 437 "mysql.h"
|
||||
extern int mysql_send_query(MYSQL * mysql, char const * q, unsigned long int);
|
||||
# 371 "mysql.h"
|
||||
extern void mysql_server_end(void);
|
||||
# 370 "mysql.h"
|
||||
extern int mysql_server_init(int, char * * argv, char * * groups);
|
||||
# 419 "mysql.h"
|
||||
extern int mysql_set_character_set(MYSQL * mysql, char const * csname);
|
||||
# 472 "mysql.h"
|
||||
extern void mysql_set_local_infile_default(MYSQL * mysql);
|
||||
# 461 "mysql.h"
|
||||
extern void mysql_set_local_infile_handler(MYSQL * mysql, int (* local_infile_init)(void * *, char const *, void *), int (* local_infile_read)(void *, char *, unsigned int), void (* local_infile_end)(void), int (* local_infile_error)(void *, char *, unsigned int), void *);
|
||||
# 497 "mysql.h"
|
||||
extern int mysql_set_master(MYSQL * mysql, char const * host, unsigned int, char const * user, char const * passwd);
|
||||
# 513 "mysql.h"
|
||||
extern int mysql_set_server_option(MYSQL * mysql, enum enum_mysql_set_option);
|
||||
# 506 "mysql.h"
|
||||
extern int mysql_shutdown(MYSQL * mysql, enum mysql_enum_shutdown_level);
|
||||
# 450 "mysql.h"
|
||||
extern my_bool mysql_slave_query(MYSQL * mysql, char const * q, unsigned long int);
|
||||
# 452 "mysql.h"
|
||||
extern my_bool mysql_slave_send_query(MYSQL * mysql, char const * q, unsigned long int);
|
||||
# 414 "mysql.h"
|
||||
extern char const * mysql_sqlstate(MYSQL * mysql);
|
||||
# 422 "mysql.h"
|
||||
extern my_bool mysql_ssl_set(MYSQL * mysql, char const * key, char const * cert, char const * ca, char const * capath, char const * cipher);
|
||||
# 517 "mysql.h"
|
||||
extern char const * mysql_stat(MYSQL * mysql);
|
||||
# 817 "mysql.h"
|
||||
extern my_ulonglong mysql_stmt_affected_rows(MYSQL_STMT * stmt);
|
||||
# 795 "mysql.h"
|
||||
extern my_bool mysql_stmt_attr_get(MYSQL_STMT * stmt, enum enum_stmt_attr_type, void * attr);
|
||||
# 792 "mysql.h"
|
||||
extern my_bool mysql_stmt_attr_set(MYSQL_STMT * stmt, enum enum_stmt_attr_type, void const * attr);
|
||||
# 798 "mysql.h"
|
||||
extern my_bool mysql_stmt_bind_param(MYSQL_STMT * stmt, MYSQL_BIND * bnd);
|
||||
# 799 "mysql.h"
|
||||
extern my_bool mysql_stmt_bind_result(MYSQL_STMT * stmt, MYSQL_BIND * bnd);
|
||||
# 800 "mysql.h"
|
||||
extern my_bool mysql_stmt_close(MYSQL_STMT * stmt);
|
||||
# 815 "mysql.h"
|
||||
extern void mysql_stmt_data_seek(MYSQL_STMT * stmt, my_ulonglong);
|
||||
# 809 "mysql.h"
|
||||
extern unsigned int mysql_stmt_errno(MYSQL_STMT * stmt);
|
||||
# 810 "mysql.h"
|
||||
extern char const * mysql_stmt_error(MYSQL_STMT * stmt);
|
||||
# 785 "mysql.h"
|
||||
extern int mysql_stmt_execute(MYSQL_STMT * stmt);
|
||||
# 786 "mysql.h"
|
||||
extern int mysql_stmt_fetch(MYSQL_STMT * stmt);
|
||||
# 787 "mysql.h"
|
||||
extern int mysql_stmt_fetch_column(MYSQL_STMT * stmt, MYSQL_BIND * bind, unsigned int, unsigned long int);
|
||||
# 819 "mysql.h"
|
||||
extern unsigned int mysql_stmt_field_count(MYSQL_STMT * stmt);
|
||||
# 802 "mysql.h"
|
||||
extern my_bool mysql_stmt_free_result(MYSQL_STMT * stmt);
|
||||
# 782 "mysql.h"
|
||||
extern MYSQL_STMT * mysql_stmt_init(MYSQL * mysql);
|
||||
# 818 "mysql.h"
|
||||
extern my_ulonglong mysql_stmt_insert_id(MYSQL_STMT * stmt);
|
||||
# 816 "mysql.h"
|
||||
extern my_ulonglong mysql_stmt_num_rows(MYSQL_STMT * stmt);
|
||||
# 791 "mysql.h"
|
||||
extern unsigned long int mysql_stmt_param_count(MYSQL_STMT * stmt);
|
||||
# 808 "mysql.h"
|
||||
extern MYSQL_RES * mysql_stmt_param_metadata(MYSQL_STMT * stmt);
|
||||
# 783 "mysql.h"
|
||||
extern int mysql_stmt_prepare(MYSQL_STMT * stmt, char const * query, unsigned long int);
|
||||
# 801 "mysql.h"
|
||||
extern my_bool mysql_stmt_reset(MYSQL_STMT * stmt);
|
||||
# 807 "mysql.h"
|
||||
extern MYSQL_RES * mysql_stmt_result_metadata(MYSQL_STMT * stmt);
|
||||
# 812 "mysql.h"
|
||||
extern MYSQL_ROW_OFFSET mysql_stmt_row_seek(MYSQL_STMT * stmt, MYSQL_ROW_OFFSET);
|
||||
# 814 "mysql.h"
|
||||
extern MYSQL_ROW_OFFSET mysql_stmt_row_tell(MYSQL_STMT * stmt);
|
||||
# 803 "mysql.h"
|
||||
extern my_bool mysql_stmt_send_long_data(MYSQL_STMT * stmt, unsigned int, char const * data, unsigned long int);
|
||||
# 811 "mysql.h"
|
||||
extern char const * mysql_stmt_sqlstate(MYSQL_STMT * stmt);
|
||||
# 790 "mysql.h"
|
||||
extern int mysql_stmt_store_result(MYSQL_STMT * stmt);
|
||||
# 441 "mysql.h"
|
||||
extern MYSQL_RES * mysql_store_result(MYSQL * mysql);
|
||||
# 393 "mysql.h"
|
||||
extern void mysql_thread_end(void);
|
||||
# 417 "mysql.h"
|
||||
extern unsigned long int mysql_thread_id(MYSQL * mysql);
|
||||
# 392 "mysql.h"
|
||||
extern my_bool mysql_thread_init(void);
|
||||
# 560 "mysql.h"
|
||||
extern unsigned int mysql_thread_safe(void);
|
||||
# 76 "mysql.h"
|
||||
extern char * mysql_unix_port;
|
||||
# 442 "mysql.h"
|
||||
extern MYSQL_RES * mysql_use_result(MYSQL * mysql);
|
||||
# 415 "mysql.h"
|
||||
extern unsigned int mysql_warning_count(MYSQL * mysql);
|
||||
# 343 "mysql_com.h"
|
||||
extern void net_clear(NET * net);
|
||||
# 342 "mysql_com.h"
|
||||
extern void net_end(NET * net);
|
||||
# 345 "mysql_com.h"
|
||||
extern my_bool net_flush(NET * net);
|
||||
# 350 "mysql_com.h"
|
||||
extern int net_real_write(NET * net, char const * packet, unsigned long int);
|
||||
# 344 "mysql_com.h"
|
||||
extern my_bool net_realloc(NET * net, unsigned long int);
|
||||
# 347 "mysql_com.h"
|
||||
extern my_bool net_write_command(NET * net, unsigned char, char const * header, unsigned long int, char const * packet, unsigned long int);
|
||||
# 431 "mysql_com.h"
|
||||
extern char * octet2hex(char * to, char const * str, unsigned int);
|
||||
# 412 "mysql_com.h"
|
||||
extern void randominit(struct rand_struct *, unsigned long int, unsigned long int);
|
||||
# 426 "mysql_com.h"
|
||||
extern void scramble(char * to, char const * message, char const * password);
|
||||
# 419 "mysql_com.h"
|
||||
extern void scramble_323(char * to, char const * message, char const * password);
|
||||
# 32 "typelib.h"
|
||||
extern TYPELIB sql_protocol_typelib;
|
|
@ -7,6 +7,8 @@
|
|||
|
||||
-- source include/master-slave.inc
|
||||
|
||||
let $SERVER_VERSION=`select version()`;
|
||||
|
||||
create table t1 (a int);
|
||||
insert into t1 values (10);
|
||||
create table t2 (a int);
|
||||
|
|
|
@ -36,6 +36,7 @@ SELECT * FROM t1;
|
|||
--echo **** On Master ****
|
||||
connection master;
|
||||
DROP TABLE t1;
|
||||
let $SERVER_VERSION=`select version()`;
|
||||
--replace_result $SERVER_VERSION SERVER_VERSION
|
||||
--replace_regex /\/\* xid=[0-9]+ \*\//\/* xid= *\// /table_id: [0-9]+/table_id: #/
|
||||
SHOW BINLOG EVENTS;
|
||||
|
|
15
mysql-test/include/analyze_failure_sync_with_master.test
Normal file
15
mysql-test/include/analyze_failure_sync_with_master.test
Normal file
|
@ -0,0 +1,15 @@
|
|||
# Connect to both master and slave
|
||||
connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,);
|
||||
connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT,);
|
||||
|
||||
vertical_results;
|
||||
|
||||
echo == MASTER ===========================================================;
|
||||
connection master;
|
||||
show master status;
|
||||
show slave status;
|
||||
|
||||
echo == SLAVE ===========================================================;
|
||||
connection slave;
|
||||
show master status;
|
||||
show slave status;
|
|
@ -11,8 +11,8 @@ insert into t1 values('ab_def');
|
|||
insert into t1 values('abc_ef');
|
||||
insert into t1 values('abcd_f');
|
||||
insert into t1 values('abcde_');
|
||||
-- should return ab_def
|
||||
# should return ab_def
|
||||
select c1 as c1u from t1 where c1 like 'ab\_def';
|
||||
-- should return ab_def
|
||||
# should return ab_def
|
||||
select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
|
||||
drop table t1;
|
||||
|
|
|
@ -31,13 +31,6 @@ eval SET SESSION STORAGE_ENGINE = $engine_type;
|
|||
drop table if exists t1,t2,t1m,t1i,t2m,t2i,t4;
|
||||
--enable_warnings
|
||||
|
||||
#
|
||||
# Bug#17530: Incorrect key truncation on table creation caused server crash.
|
||||
#
|
||||
create table t1(f1 varchar(800) binary not null, key(f1))
|
||||
character set utf8 collate utf8_general_ci;
|
||||
insert into t1 values('aaa');
|
||||
drop table t1;
|
||||
|
||||
# BUG#16798: Uninitialized row buffer reads in ref-or-null optimizer
|
||||
# (repeatable only w/innodb).
|
||||
|
@ -153,6 +146,31 @@ INSERT INTO `t2`(`id1`,`id2`,`id3`,`id4`) VALUES
|
|||
SELECT `id1` FROM `t1` WHERE `id1` NOT IN (SELECT `id1` FROM `t2` WHERE `id2` = 1 AND `id3` = 2);
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
#
|
||||
# Bug #22728 - Handler_rollback value is growing
|
||||
#
|
||||
|
||||
let $before= `show /*!50002 GLOBAL */ status like 'Handler_rollback'`;
|
||||
create table t1 (c1 int) engine=innodb;
|
||||
connect (con1,localhost,root,,);
|
||||
connect (con2,localhost,root,,);
|
||||
connection con2;
|
||||
handler t1 open;
|
||||
handler t1 read first;
|
||||
disconnect con2;
|
||||
connection con1;
|
||||
let $after= `show /*!50002 GLOBAL */ status like 'Handler_rollback'`;
|
||||
# Compare the before and after value, it should be equal
|
||||
--disable_query_log
|
||||
eval select STRCMP("$before", "$after") as "Before and after comparison";
|
||||
--enable_query_log
|
||||
connection default;
|
||||
drop table t1;
|
||||
disconnect con1;
|
||||
|
||||
--echo End of 4.1 tests
|
||||
|
||||
|
||||
#
|
||||
# Bug #12882 min/max inconsistent on empty table
|
||||
#
|
||||
|
@ -425,6 +443,28 @@ create table t1(f1 varchar(800) binary not null, key(f1))
|
|||
insert into t1 values('aaa');
|
||||
drop table t1;
|
||||
|
||||
|
||||
#
|
||||
# Bug#22781: SQL_BIG_RESULT fails to influence sort plan
|
||||
#
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c FLOAT, KEY b(b)) ENGINE = INNODB;
|
||||
|
||||
INSERT INTO t1 VALUES ( 1 , 1 , 1);
|
||||
INSERT INTO t1 SELECT a + 1 , MOD(a + 1 , 20), 1 FROM t1;
|
||||
INSERT INTO t1 SELECT a + 2 , MOD(a + 2 , 20), 1 FROM t1;
|
||||
INSERT INTO t1 SELECT a + 4 , MOD(a + 4 , 20), 1 FROM t1;
|
||||
INSERT INTO t1 SELECT a + 8 , MOD(a + 8 , 20), 1 FROM t1;
|
||||
INSERT INTO t1 SELECT a + 16, MOD(a + 16, 20), 1 FROM t1;
|
||||
INSERT INTO t1 SELECT a + 32, MOD(a + 32, 20), 1 FROM t1;
|
||||
INSERT INTO t1 SELECT a + 64, MOD(a + 64, 20), 1 FROM t1;
|
||||
|
||||
EXPLAIN SELECT b, SUM(c) FROM t1 GROUP BY b;
|
||||
EXPLAIN SELECT SQL_BIG_RESULT b, SUM(c) FROM t1 GROUP BY b;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
||||
|
||||
# Fix for BUG#19243 "wrong LAST_INSERT_ID() after ON DUPLICATE KEY
|
||||
# UPDATE": if the row is updated, it's like a regular UPDATE:
|
||||
# LAST_INSERT_ID() is not affected.
|
||||
|
@ -476,3 +516,5 @@ select last_insert_id();
|
|||
select * from t2;
|
||||
|
||||
drop table t2;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
|
|
@ -1,137 +0,0 @@
|
|||
let $1 = 10;
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
while ($1)
|
||||
{
|
||||
echo $1;
|
||||
dec $1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
echo here is the sourced script;
|
|
@ -1 +0,0 @@
|
|||
--source include/sourced.inc
|
25
mysql-test/include/wait_for_query_to_suceed.inc
Normal file
25
mysql-test/include/wait_for_query_to_suceed.inc
Normal file
|
@ -0,0 +1,25 @@
|
|||
#
|
||||
# Run a query over and over until it suceeds ot timeout occurs
|
||||
#
|
||||
|
||||
|
||||
let $counter= 100;
|
||||
|
||||
disable_abort_on_error;
|
||||
disable_query_log;
|
||||
disable_result_log;
|
||||
eval $query;
|
||||
while ($mysql_errno)
|
||||
{
|
||||
eval $query;
|
||||
sleep 0.1;
|
||||
dec $counter;
|
||||
|
||||
if (!$counter)
|
||||
{
|
||||
die("Waited too long for query to suceed");
|
||||
}
|
||||
}
|
||||
enable_abort_on_error;
|
||||
enable_query_log;
|
||||
enable_result_log;
|
|
@ -59,7 +59,9 @@ sub collect_test_cases ($) {
|
|||
|
||||
if ( @::opt_cases )
|
||||
{
|
||||
foreach my $tname ( @::opt_cases ) { # Run in specified order, no sort
|
||||
foreach my $tname ( @::opt_cases )
|
||||
{
|
||||
# Run in specified order, no sort
|
||||
my $elem= undef;
|
||||
my $component_id= undef;
|
||||
|
||||
|
@ -85,7 +87,7 @@ sub collect_test_cases ($) {
|
|||
|
||||
# If target component is known, check that the specified test case
|
||||
# exists.
|
||||
#
|
||||
#
|
||||
# Otherwise, try to guess the target component.
|
||||
|
||||
if ( $component_id )
|
||||
|
@ -127,7 +129,8 @@ sub collect_test_cases ($) {
|
|||
}
|
||||
else
|
||||
{
|
||||
foreach my $elem ( sort readdir(TESTDIR) ) {
|
||||
foreach my $elem ( sort readdir(TESTDIR) )
|
||||
{
|
||||
my $component_id= undef;
|
||||
my $tname= undef;
|
||||
|
||||
|
@ -143,8 +146,10 @@ sub collect_test_cases ($) {
|
|||
{
|
||||
next;
|
||||
}
|
||||
|
||||
next if $::opt_do_test and ! defined mtr_match_prefix($elem,$::opt_do_test);
|
||||
|
||||
# Skip tests that does not match the --do-test= filter
|
||||
next if $::opt_do_test and
|
||||
! defined mtr_match_prefix($elem,$::opt_do_test);
|
||||
|
||||
collect_one_test_case($testdir,$resdir,$tname,$elem,$cases,\%disabled,
|
||||
$component_id);
|
||||
|
@ -152,43 +157,79 @@ sub collect_test_cases ($) {
|
|||
closedir TESTDIR;
|
||||
}
|
||||
|
||||
# To speed things up, we sort first in if the test require a restart
|
||||
# or not, second in alphanumeric order.
|
||||
|
||||
# Reorder the test cases in an order that will make them faster to run
|
||||
if ( $::opt_reorder )
|
||||
{
|
||||
|
||||
my %sort_criteria;
|
||||
my $tinfo;
|
||||
|
||||
# Make a mapping of test name to a string that represents how that test
|
||||
# should be sorted among the other tests. Put the most important criterion
|
||||
# first, then a sub-criterion, then sub-sub-criterion, et c.
|
||||
foreach $tinfo (@$cases)
|
||||
foreach my $tinfo (@$cases)
|
||||
{
|
||||
my @this_criteria = ();
|
||||
my @criteria = ();
|
||||
|
||||
# Append the criteria for sorting, in order of importance.
|
||||
push(@this_criteria, join("!", sort @{$tinfo->{'master_opt'}}) . "~"); # Ending with "~" makes empty sort later than filled
|
||||
push(@this_criteria, "ndb=" . ($tinfo->{'ndb_test'} ? "1" : "0"));
|
||||
push(@this_criteria, "restart=" . ($tinfo->{'master_restart'} ? "1" : "0"));
|
||||
push(@this_criteria, "big_test=" . ($tinfo->{'big_test'} ? "1" : "0"));
|
||||
push(@this_criteria, join("|", sort keys %{$tinfo})); # Group similar things together. The values may differ substantially. FIXME?
|
||||
push(@this_criteria, $tinfo->{'name'}); # Finally, order by the name
|
||||
|
||||
$sort_criteria{$tinfo->{"name"}} = join(" ", @this_criteria);
|
||||
# Look for tests that muct be in run in a defined order
|
||||
# that is defined by test having the same name except for
|
||||
# the ending digit
|
||||
|
||||
# Put variables into hash
|
||||
my $test_name= $tinfo->{'name'};
|
||||
my $depend_on_test_name;
|
||||
if ( $test_name =~ /^([\D]+)([0-9]{1})$/ )
|
||||
{
|
||||
my $base_name= $1;
|
||||
my $idx= $2;
|
||||
mtr_verbose("$test_name => $base_name idx=$idx");
|
||||
if ( $idx > 1 )
|
||||
{
|
||||
$idx-= 1;
|
||||
$base_name= "$base_name$idx";
|
||||
mtr_verbose("New basename $base_name");
|
||||
}
|
||||
|
||||
foreach my $tinfo2 (@$cases)
|
||||
{
|
||||
if ( $tinfo2->{'name'} eq $base_name )
|
||||
{
|
||||
mtr_verbose("found dependent test $tinfo2->{'name'}");
|
||||
$depend_on_test_name=$base_name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( defined $depend_on_test_name )
|
||||
{
|
||||
mtr_verbose("Giving $test_name same critera as $depend_on_test_name");
|
||||
$sort_criteria{$test_name} = $sort_criteria{$depend_on_test_name};
|
||||
}
|
||||
else
|
||||
{
|
||||
#
|
||||
# Append the criteria for sorting, in order of importance.
|
||||
#
|
||||
push(@criteria, "ndb=" . ($tinfo->{'ndb_test'} ? "1" : "0"));
|
||||
# Group test with equal options together.
|
||||
# Ending with "~" makes empty sort later than filled
|
||||
push(@criteria, join("!", sort @{$tinfo->{'master_opt'}}) . "~");
|
||||
|
||||
$sort_criteria{$test_name} = join(" ", @criteria);
|
||||
}
|
||||
}
|
||||
|
||||
@$cases = sort { $sort_criteria{$a->{"name"}} cmp $sort_criteria{$b->{"name"}}; } @$cases;
|
||||
@$cases = sort {
|
||||
$sort_criteria{$a->{'name'}} . $a->{'name'} cmp
|
||||
$sort_criteria{$b->{'name'}} . $b->{'name'}; } @$cases;
|
||||
|
||||
### For debugging the sort-order
|
||||
# foreach $tinfo (@$cases)
|
||||
# {
|
||||
# print $sort_criteria{$tinfo->{"name"}};
|
||||
# print " -> \t";
|
||||
# print $tinfo->{"name"};
|
||||
# print "\n";
|
||||
# }
|
||||
if ( $::opt_script_debug )
|
||||
{
|
||||
# For debugging the sort-order
|
||||
foreach my $tinfo (@$cases)
|
||||
{
|
||||
print("$sort_criteria{$tinfo->{'name'}} -> \t$tinfo->{'name'}\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $cases;
|
||||
|
@ -222,9 +263,6 @@ sub collect_one_test_case($$$$$$$) {
|
|||
return;
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# Skip some tests but include in list, just mark them to skip
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
my $tinfo= {};
|
||||
$tinfo->{'name'}= $tname;
|
||||
|
@ -232,6 +270,10 @@ sub collect_one_test_case($$$$$$$) {
|
|||
$tinfo->{'component_id'} = $component_id;
|
||||
push(@$cases, $tinfo);
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# Skip some tests but include in list, just mark them to skip
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
if ( $::opt_skip_test and defined mtr_match_prefix($tname,$::opt_skip_test) )
|
||||
{
|
||||
$tinfo->{'skip'}= 1;
|
||||
|
@ -245,6 +287,7 @@ sub collect_one_test_case($$$$$$$) {
|
|||
$tinfo->{'path'}= $path;
|
||||
$tinfo->{'timezone'}= "GMT-3"; # for UNIX_TIMESTAMP tests to work
|
||||
|
||||
$tinfo->{'slave_num'}= 0; # Default, no slave
|
||||
if ( defined mtr_match_prefix($tname,"rpl") )
|
||||
{
|
||||
if ( $::opt_skip_rpl )
|
||||
|
@ -254,7 +297,8 @@ sub collect_one_test_case($$$$$$$) {
|
|||
return;
|
||||
}
|
||||
|
||||
$tinfo->{'slave_num'}= 1; # Default, use one slave
|
||||
|
||||
$tinfo->{'slave_num'}= 1; # Default for rpl* tests, use one slave
|
||||
|
||||
if ( $tname eq 'rpl_failsafe' or $tname eq 'rpl_chain_temp_table' )
|
||||
{
|
||||
|
@ -268,40 +312,6 @@ sub collect_one_test_case($$$$$$$) {
|
|||
$tinfo->{'slave_num'}= 1;
|
||||
}
|
||||
|
||||
if ( $::opt_with_ndbcluster or defined mtr_match_substring($tname,"ndb") )
|
||||
{
|
||||
# This is an ndb test or all tests should be run with ndb cluster started
|
||||
$tinfo->{'ndb_test'}= 1;
|
||||
if ( $::opt_skip_ndbcluster )
|
||||
{
|
||||
# All ndb test's should be skipped
|
||||
$tinfo->{'skip'}= 1;
|
||||
$tinfo->{'comment'}= "No ndbcluster test(--skip-ndbcluster)";
|
||||
return;
|
||||
}
|
||||
if ( ! $::opt_ndbcluster_supported )
|
||||
{
|
||||
# Ndb is not supported, skip them
|
||||
$tinfo->{'skip'}= 1;
|
||||
$tinfo->{'comment'}= "No ndbcluster support";
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
# This is not a ndb test
|
||||
$tinfo->{'ndb_test'}= 0;
|
||||
if ( $::opt_with_ndbcluster_only )
|
||||
{
|
||||
# Only the ndb test should be run, all other should be skipped
|
||||
$tinfo->{'skip'}= 1;
|
||||
$tinfo->{'comment'}= "Only ndbcluster tests(--with-ndbcluster-only)";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
# FIXME what about embedded_server + ndbcluster, skip ?!
|
||||
|
||||
my $master_opt_file= "$testdir/$tname-master.opt";
|
||||
my $slave_opt_file= "$testdir/$tname-slave.opt";
|
||||
my $slave_mi_file= "$testdir/$tname.slave-mi";
|
||||
|
@ -316,57 +326,59 @@ sub collect_one_test_case($$$$$$$) {
|
|||
|
||||
if ( -f $master_opt_file )
|
||||
{
|
||||
$tinfo->{'master_restart'}= 1; # We think so for now
|
||||
|
||||
MASTER_OPT:
|
||||
my $master_opt= mtr_get_opts_from_file($master_opt_file);
|
||||
|
||||
foreach my $opt ( @$master_opt )
|
||||
{
|
||||
my $master_opt= mtr_get_opts_from_file($master_opt_file);
|
||||
my $value;
|
||||
|
||||
foreach my $opt ( @$master_opt )
|
||||
# The opt file is used both to send special options to the mysqld
|
||||
# as well as pass special test case specific options to this
|
||||
# script
|
||||
|
||||
$value= mtr_match_prefix($opt, "--timezone=");
|
||||
if ( defined $value )
|
||||
{
|
||||
my $value;
|
||||
|
||||
# This is a dirty hack from old mysql-test-run, we use the opt
|
||||
# file to flag other things as well, it is not a opt list at
|
||||
# all
|
||||
|
||||
$value= mtr_match_prefix($opt, "--timezone=");
|
||||
if ( defined $value )
|
||||
{
|
||||
$tinfo->{'timezone'}= $value;
|
||||
last MASTER_OPT;
|
||||
}
|
||||
|
||||
$value= mtr_match_prefix($opt, "--result-file=");
|
||||
if ( defined $value )
|
||||
{
|
||||
$tinfo->{'result_file'}= "r/$value.result";
|
||||
if ( $::opt_result_ext and $::opt_record or
|
||||
-f "$tinfo->{'result_file'}$::opt_result_ext")
|
||||
{
|
||||
$tinfo->{'result_file'}.= $::opt_result_ext;
|
||||
}
|
||||
$tinfo->{'master_restart'}= 0;
|
||||
last MASTER_OPT;
|
||||
}
|
||||
|
||||
# If we set default time zone, remove the one we have
|
||||
$value= mtr_match_prefix($opt, "--default-time-zone=");
|
||||
if ( defined $value )
|
||||
{
|
||||
$tinfo->{'master_opt'}= [];
|
||||
}
|
||||
|
||||
$tinfo->{'timezone'}= $value;
|
||||
next;
|
||||
}
|
||||
|
||||
# Ok, this was a real option list, add it
|
||||
push(@{$tinfo->{'master_opt'}}, @$master_opt);
|
||||
$value= mtr_match_prefix($opt, "--result-file=");
|
||||
if ( defined $value )
|
||||
{
|
||||
# Specifies the file mysqltest should compare
|
||||
# output against
|
||||
$tinfo->{'result_file'}= "r/$value.result";
|
||||
next;
|
||||
}
|
||||
|
||||
# If we set default time zone, remove the one we have
|
||||
$value= mtr_match_prefix($opt, "--default-time-zone=");
|
||||
if ( defined $value )
|
||||
{
|
||||
# Set timezone for this test case to something different
|
||||
$tinfo->{'timezone'}= "GMT-8";
|
||||
# Fallthrough, add the --default-time-zone option
|
||||
}
|
||||
|
||||
# The --restart option forces a restart even if no special
|
||||
# option is set. If the options are the same as next testcase
|
||||
# there is no need to restart after the testcase
|
||||
# has completed
|
||||
if ( $opt eq "--force-restart" )
|
||||
{
|
||||
$tinfo->{'force_restart'}= 1;
|
||||
next;
|
||||
}
|
||||
|
||||
# Ok, this was a real option, add it
|
||||
push(@{$tinfo->{'master_opt'}}, $opt);
|
||||
}
|
||||
}
|
||||
|
||||
if ( -f $slave_opt_file )
|
||||
{
|
||||
$tinfo->{'slave_restart'}= 1;
|
||||
my $slave_opt= mtr_get_opts_from_file($slave_opt_file);
|
||||
|
||||
foreach my $opt ( @$slave_opt )
|
||||
|
@ -381,7 +393,6 @@ sub collect_one_test_case($$$$$$$) {
|
|||
if ( -f $slave_mi_file )
|
||||
{
|
||||
$tinfo->{'slave_mi'}= mtr_get_opts_from_file($slave_mi_file);
|
||||
$tinfo->{'slave_restart'}= 1;
|
||||
}
|
||||
|
||||
if ( -f $master_sh )
|
||||
|
@ -395,7 +406,6 @@ sub collect_one_test_case($$$$$$$) {
|
|||
else
|
||||
{
|
||||
$tinfo->{'master_sh'}= $master_sh;
|
||||
$tinfo->{'master_restart'}= 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -410,7 +420,6 @@ sub collect_one_test_case($$$$$$$) {
|
|||
else
|
||||
{
|
||||
$tinfo->{'slave_sh'}= $slave_sh;
|
||||
$tinfo->{'slave_restart'}= 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -514,18 +523,50 @@ sub collect_one_test_case($$$$$$$) {
|
|||
$tinfo->{'comment'}= "Test need debug binaries";
|
||||
return;
|
||||
}
|
||||
|
||||
if ( $tinfo->{'ndb_test'} )
|
||||
{
|
||||
# This is a NDB test
|
||||
if ( ! $::glob_ndbcluster_supported )
|
||||
{
|
||||
# Ndb is not supported, skip it
|
||||
$tinfo->{'skip'}= 1;
|
||||
$tinfo->{'comment'}= "No ndbcluster support";
|
||||
return;
|
||||
}
|
||||
elsif ( $::opt_skip_ndbcluster )
|
||||
{
|
||||
# All ndb test's should be skipped
|
||||
$tinfo->{'skip'}= 1;
|
||||
$tinfo->{'comment'}= "No ndbcluster tests(--skip-ndbcluster)";
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
# This is not a ndb test
|
||||
if ( $::opt_with_ndbcluster_only )
|
||||
{
|
||||
# Only the ndb test should be run, all other should be skipped
|
||||
$tinfo->{'skip'}= 1;
|
||||
$tinfo->{'comment'}= "Only ndbcluster tests(--with-ndbcluster-only)";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if ( $tinfo->{'innodb_test'} )
|
||||
{
|
||||
# This is a test that need inndob
|
||||
if ( $::mysqld_variables{'innodb'} eq "FALSE" )
|
||||
{
|
||||
# innodb is not supported, skip it
|
||||
$tinfo->{'skip'}= 1;
|
||||
$tinfo->{'comment'}= "No innodb support";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
# We can't restart a running server that may be in use
|
||||
|
||||
if ( $::glob_use_running_server and
|
||||
( $tinfo->{'master_restart'} or $tinfo->{'slave_restart'} ) )
|
||||
{
|
||||
$tinfo->{'skip'}= 1;
|
||||
$tinfo->{'comment'}= "Can't restart a running server";
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -536,8 +577,10 @@ our @tags=
|
|||
["include/have_innodb.inc", "innodb_test", 1],
|
||||
["include/have_binlog_format_row.inc", "binlog_format", "row"],
|
||||
["include/have_binlog_format_statement.inc", "binlog_format", "stmt"],
|
||||
["include/have_binlog_format_mixed.inc", "binlog_format", "mixed"],
|
||||
["include/big_test.inc", "big_test", 1],
|
||||
["include/have_debug.inc", "need_debug", 1],
|
||||
["include/have_ndb.inc", "ndb_test", 1],
|
||||
["include/have_ndb_extra.inc", "ndb_extra", 1],
|
||||
["require_manager", "require_manager", 1],
|
||||
);
|
||||
|
@ -550,8 +593,6 @@ sub mtr_options_from_test_file($$) {
|
|||
|
||||
while ( my $line= <$F> )
|
||||
{
|
||||
next if ( $line !~ /^--/ );
|
||||
|
||||
# Match this line against tag in "tags" array
|
||||
foreach my $tag (@tags)
|
||||
{
|
||||
|
@ -563,14 +604,21 @@ sub mtr_options_from_test_file($$) {
|
|||
}
|
||||
|
||||
# If test sources another file, open it as well
|
||||
if ( $line =~ /^\-\-([[:space:]]*)source(.*)$/ )
|
||||
if ( $line =~ /^\-\-([[:space:]]*)source(.*)$/ or
|
||||
$line =~ /^([[:space:]]*)source(.*);$/ )
|
||||
{
|
||||
my $value= $2;
|
||||
$value =~ s/^\s+//; # Remove leading space
|
||||
$value =~ s/[[:space:]]+$//; # Remove ending space
|
||||
|
||||
my $sourced_file= "$::glob_mysql_test_dir/$value";
|
||||
mtr_options_from_test_file($tinfo, $sourced_file);
|
||||
if ( -f $sourced_file )
|
||||
{
|
||||
# Only source the file if it exists, we may get
|
||||
# false positives in the regexes above if someone
|
||||
# writes "source nnnn;" in a test case(such as mysqltest.test)
|
||||
mtr_options_from_test_file($tinfo, $sourced_file);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -23,12 +23,28 @@ sub gcov_prepare () {
|
|||
-or -name \*.da | xargs rm`;
|
||||
}
|
||||
|
||||
# Used by gcov
|
||||
our @mysqld_src_dirs=
|
||||
(
|
||||
"strings",
|
||||
"mysys",
|
||||
"include",
|
||||
"extra",
|
||||
"regex",
|
||||
"isam",
|
||||
"merge",
|
||||
"myisam",
|
||||
"myisammrg",
|
||||
"heap",
|
||||
"sql",
|
||||
);
|
||||
|
||||
sub gcov_collect () {
|
||||
|
||||
print "Collecting source coverage info...\n";
|
||||
-f $::opt_gcov_msg and unlink($::opt_gcov_msg);
|
||||
-f $::opt_gcov_err and unlink($::opt_gcov_err);
|
||||
foreach my $d ( @::mysqld_src_dirs )
|
||||
foreach my $d ( @mysqld_src_dirs )
|
||||
{
|
||||
chdir("$::glob_basedir/$d");
|
||||
foreach my $f ( (glob("*.h"), glob("*.cc"), glob("*.c")) )
|
||||
|
|
|
@ -12,6 +12,7 @@ sub mtr_fromfile ($);
|
|||
sub mtr_tofile ($@);
|
||||
sub mtr_tonewfile($@);
|
||||
sub mtr_lastlinefromfile($);
|
||||
sub mtr_appendfile_to_file ($$);
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
|
@ -36,18 +37,16 @@ sub mtr_get_pid_from_file ($) {
|
|||
open(FILE, '<', $pid_file_path)
|
||||
or mtr_error("can't open file \"$pid_file_path\": $!");
|
||||
|
||||
# Read pid number from file
|
||||
my $pid= <FILE>;
|
||||
|
||||
chomp($pid) if defined $pid;
|
||||
|
||||
close FILE;
|
||||
|
||||
return $pid if defined $pid && $pid ne '';
|
||||
return $pid if $pid=~ /^(\d+)/;
|
||||
|
||||
mtr_debug("Pid file '$pid_file_path' is empty. " .
|
||||
"Sleeping $timeout second(s)...");
|
||||
mtr_debug("Pid file '$pid_file_path' does not yet contain pid number.\n" .
|
||||
"Sleeping $timeout second(s) more...");
|
||||
|
||||
sleep(1);
|
||||
sleep($timeout);
|
||||
}
|
||||
|
||||
mtr_error("Pid file '$pid_file_path' is corrupted. " .
|
||||
|
@ -170,4 +169,17 @@ sub mtr_tonewfile ($@) {
|
|||
close FILE;
|
||||
}
|
||||
|
||||
sub mtr_appendfile_to_file ($$) {
|
||||
my $from_file= shift;
|
||||
my $to_file= shift;
|
||||
|
||||
open(TOFILE,">>",$to_file) or mtr_error("can't open file \"$to_file\": $!");
|
||||
open(FROMFILE,"<",$from_file)
|
||||
or mtr_error("can't open file \"$from_file\": $!");
|
||||
print TOFILE while (<FROMFILE>);
|
||||
close FROMFILE;
|
||||
close TOFILE;
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
|
|
@ -14,6 +14,7 @@ sub mtr_path_exists(@);
|
|||
sub mtr_script_exists(@);
|
||||
sub mtr_file_exists(@);
|
||||
sub mtr_exe_exists(@);
|
||||
sub mtr_exe_maybe_exists(@);
|
||||
sub mtr_copy_dir($$);
|
||||
sub mtr_same_opts($$);
|
||||
sub mtr_cmp_opts($$);
|
||||
|
@ -65,6 +66,10 @@ sub mtr_add_arg ($$@) {
|
|||
|
||||
##############################################################################
|
||||
|
||||
#
|
||||
# NOTE! More specific paths should be given before less specific.
|
||||
# For example /client/debug should be listed before /client
|
||||
#
|
||||
sub mtr_path_exists (@) {
|
||||
foreach my $path ( @_ )
|
||||
{
|
||||
|
@ -80,6 +85,11 @@ sub mtr_path_exists (@) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# NOTE! More specific paths should be given before less specific.
|
||||
# For example /client/debug should be listed before /client
|
||||
#
|
||||
sub mtr_script_exists (@) {
|
||||
foreach my $path ( @_ )
|
||||
{
|
||||
|
@ -102,6 +112,11 @@ sub mtr_script_exists (@) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# NOTE! More specific paths should be given before less specific.
|
||||
# For example /client/debug should be listed before /client
|
||||
#
|
||||
sub mtr_file_exists (@) {
|
||||
foreach my $path ( @_ )
|
||||
{
|
||||
|
@ -110,8 +125,14 @@ sub mtr_file_exists (@) {
|
|||
return "";
|
||||
}
|
||||
|
||||
sub mtr_exe_exists (@) {
|
||||
|
||||
#
|
||||
# NOTE! More specific paths should be given before less specific.
|
||||
# For example /client/debug should be listed before /client
|
||||
#
|
||||
sub mtr_exe_maybe_exists (@) {
|
||||
my @path= @_;
|
||||
|
||||
map {$_.= ".exe"} @path if $::glob_win32;
|
||||
foreach my $path ( @path )
|
||||
{
|
||||
|
@ -124,6 +145,21 @@ sub mtr_exe_exists (@) {
|
|||
return $path if -x $path;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# NOTE! More specific paths should be given before less specific.
|
||||
# For example /client/debug should be listed before /client
|
||||
#
|
||||
sub mtr_exe_exists (@) {
|
||||
my @path= @_;
|
||||
if (my $path= mtr_exe_maybe_exists(@path))
|
||||
{
|
||||
return $path;
|
||||
}
|
||||
# Could not find exe, show error
|
||||
if ( @path == 1 )
|
||||
{
|
||||
mtr_error("Could not find $path[0]");
|
||||
|
@ -139,7 +175,7 @@ sub mtr_copy_dir($$) {
|
|||
my $from_dir= shift;
|
||||
my $to_dir= shift;
|
||||
|
||||
# mtr_verbose("Copying from $from_dir to $to_dir");
|
||||
# mtr_verbose("Copying from $from_dir to $to_dir");
|
||||
|
||||
mkpath("$to_dir");
|
||||
opendir(DIR, "$from_dir")
|
||||
|
|
|
@ -4,12 +4,10 @@
|
|||
# and is part of the translation of the Bourne shell script with the
|
||||
# same name.
|
||||
|
||||
#use Carp qw(cluck);
|
||||
use Socket;
|
||||
use Errno;
|
||||
use strict;
|
||||
|
||||
#use POSIX ":sys_wait_h";
|
||||
use POSIX 'WNOHANG';
|
||||
|
||||
sub mtr_run ($$$$$$;$);
|
||||
|
@ -93,8 +91,6 @@ sub spawn_impl ($$$$$$$$) {
|
|||
my $pid_file= shift; # FIXME
|
||||
my $spawn_opts= shift;
|
||||
|
||||
mtr_error("Can't spawn with empty \"path\"") unless defined $path;
|
||||
|
||||
if ( $::opt_script_debug )
|
||||
{
|
||||
print STDERR "\n";
|
||||
|
@ -118,6 +114,9 @@ sub spawn_impl ($$$$$$$$) {
|
|||
print STDERR "#### ", "-" x 78, "\n";
|
||||
}
|
||||
|
||||
mtr_error("Can't spawn with empty \"path\"") unless defined $path;
|
||||
|
||||
|
||||
FORK:
|
||||
{
|
||||
my $pid= fork();
|
||||
|
@ -339,19 +338,6 @@ sub mtr_kill_leftovers () {
|
|||
mtr_report("Killing Possible Leftover Processes");
|
||||
mtr_debug("mtr_kill_leftovers(): started.");
|
||||
|
||||
mkpath("$::opt_vardir/log"); # Needed for mysqladmin log
|
||||
|
||||
# Stop or kill Instance Manager and all its children. If we failed to do
|
||||
# that, we can only abort -- there is nothing left to do.
|
||||
|
||||
mtr_error("Failed to stop Instance Manager.")
|
||||
unless mtr_im_stop($::instance_manager);
|
||||
|
||||
# Start shutdown of masters and slaves. Don't touch IM-managed mysqld
|
||||
# instances -- they should be stopped by mtr_im_stop().
|
||||
|
||||
mtr_debug("Shutting down mysqld-instances...");
|
||||
|
||||
my @kill_pids;
|
||||
my %admin_pids;
|
||||
|
||||
|
@ -377,40 +363,41 @@ sub mtr_kill_leftovers () {
|
|||
$srv->{'pid'}= 0; # Assume we are done with it
|
||||
}
|
||||
|
||||
# Start shutdown of clusters.
|
||||
|
||||
mtr_debug("Shutting down cluster...");
|
||||
|
||||
foreach my $cluster (@{$::clusters})
|
||||
if ( ! $::opt_skip_ndbcluster )
|
||||
{
|
||||
mtr_debug(" - cluster " .
|
||||
"(pid: $cluster->{pid}; " .
|
||||
"pid file: '$cluster->{path_pid})");
|
||||
# Start shutdown of clusters.
|
||||
mtr_debug("Shutting down cluster...");
|
||||
|
||||
my $pid= mtr_ndbmgm_start($cluster, "shutdown");
|
||||
|
||||
# Save the pid of the ndb_mgm process
|
||||
$admin_pids{$pid}= 1;
|
||||
|
||||
push(@kill_pids,{
|
||||
pid => $cluster->{'pid'},
|
||||
pidfile => $cluster->{'path_pid'}
|
||||
});
|
||||
|
||||
$cluster->{'pid'}= 0; # Assume we are done with it
|
||||
|
||||
|
||||
foreach my $ndbd (@{$cluster->{'ndbds'}})
|
||||
foreach my $cluster (@{$::clusters})
|
||||
{
|
||||
mtr_debug(" - ndbd " .
|
||||
"(pid: $ndbd->{pid}; " .
|
||||
"pid file: '$ndbd->{path_pid})");
|
||||
mtr_debug(" - cluster " .
|
||||
"(pid: $cluster->{pid}; " .
|
||||
"pid file: '$cluster->{path_pid})");
|
||||
|
||||
my $pid= mtr_ndbmgm_start($cluster, "shutdown");
|
||||
|
||||
# Save the pid of the ndb_mgm process
|
||||
$admin_pids{$pid}= 1;
|
||||
|
||||
push(@kill_pids,{
|
||||
pid => $ndbd->{'pid'},
|
||||
pidfile => $ndbd->{'path_pid'},
|
||||
pid => $cluster->{'pid'},
|
||||
pidfile => $cluster->{'path_pid'}
|
||||
});
|
||||
$ndbd->{'pid'}= 0; # Assume we are done with it
|
||||
|
||||
$cluster->{'pid'}= 0; # Assume we are done with it
|
||||
|
||||
foreach my $ndbd (@{$cluster->{'ndbds'}})
|
||||
{
|
||||
mtr_debug(" - ndbd " .
|
||||
"(pid: $ndbd->{pid}; " .
|
||||
"pid file: '$ndbd->{path_pid})");
|
||||
|
||||
push(@kill_pids,{
|
||||
pid => $ndbd->{'pid'},
|
||||
pidfile => $ndbd->{'path_pid'},
|
||||
});
|
||||
$ndbd->{'pid'}= 0; # Assume we are done with it
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -451,25 +438,35 @@ sub mtr_kill_leftovers () {
|
|||
|
||||
while ( my $elem= readdir(RUNDIR) )
|
||||
{
|
||||
my $pidfile= "$rundir/$elem";
|
||||
|
||||
if ( -f $pidfile )
|
||||
# Only read pid from files that end with .pid
|
||||
if ( $elem =~ /.*[.]pid$/)
|
||||
{
|
||||
mtr_debug("Processing PID file: '$pidfile'...");
|
||||
my $pidfile= "$rundir/$elem";
|
||||
|
||||
my $pid= mtr_get_pid_from_file($pidfile);
|
||||
if ( -f $pidfile )
|
||||
{
|
||||
mtr_debug("Processing PID file: '$pidfile'...");
|
||||
|
||||
mtr_debug("Got pid: $pid from file '$pidfile'");
|
||||
my $pid= mtr_get_pid_from_file($pidfile);
|
||||
|
||||
if ( $::glob_cygwin_perl or kill(0, $pid) )
|
||||
{
|
||||
mtr_debug("There is process with pid $pid -- scheduling for kill.");
|
||||
push(@pids, $pid); # We know (cygwin guess) it exists
|
||||
}
|
||||
else
|
||||
{
|
||||
mtr_debug("There is no process with pid $pid -- skipping.");
|
||||
}
|
||||
mtr_debug("Got pid: $pid from file '$pidfile'");
|
||||
|
||||
if ( $::glob_cygwin_perl or kill(0, $pid) )
|
||||
{
|
||||
mtr_debug("There is process with pid $pid -- scheduling for kill.");
|
||||
push(@pids, $pid); # We know (cygwin guess) it exists
|
||||
}
|
||||
else
|
||||
{
|
||||
mtr_debug("There is no process with pid $pid -- skipping.");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mtr_warning("Found non pid file $elem in $rundir")
|
||||
if -f "$rundir/$elem";
|
||||
next;
|
||||
}
|
||||
}
|
||||
closedir(RUNDIR);
|
||||
|
@ -1100,7 +1097,6 @@ sub mtr_kill_processes ($) {
|
|||
|
||||
sub mtr_exit ($) {
|
||||
my $code= shift;
|
||||
# cluck("Called mtr_exit()");
|
||||
mtr_timer_stop_all($::glob_timers);
|
||||
local $SIG{HUP} = 'IGNORE';
|
||||
# ToDo: Signalling -$$ will only work if we are the process group
|
||||
|
|
|
@ -53,13 +53,6 @@ sub mtr_show_failed_diff ($) {
|
|||
{
|
||||
$result_file= $eval_file;
|
||||
}
|
||||
elsif ( $::opt_result_ext and
|
||||
( $::opt_record or -f "$result_file$::opt_result_ext" ))
|
||||
{
|
||||
# If we have an special externsion for result files we use it if we are
|
||||
# recording or a result file with that extension exists.
|
||||
$result_file= "$result_file$::opt_result_ext";
|
||||
}
|
||||
|
||||
my $diffopts= $::opt_udiff ? "-u" : "-c";
|
||||
|
||||
|
@ -137,13 +130,9 @@ sub mtr_report_test_failed ($) {
|
|||
my $tinfo= shift;
|
||||
|
||||
$tinfo->{'result'}= 'MTR_RES_FAILED';
|
||||
if ( $tinfo->{'timeout'} )
|
||||
if ( defined $tinfo->{'timeout'} )
|
||||
{
|
||||
print "[ fail ] timeout\n";
|
||||
}
|
||||
elsif ( $tinfo->{'ndb_test'} and $::cluster->[0]->{'installed_ok'} eq "NO")
|
||||
{
|
||||
print "[ fail ] ndbcluster start failure\n";
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
@ -151,9 +140,11 @@ sub mtr_report_test_failed ($) {
|
|||
print "[ fail ]\n";
|
||||
}
|
||||
|
||||
# FIXME Instead of this test, and meaningless error message in 'else'
|
||||
# we should write out into $::path_timefile when the error occurs.
|
||||
if ( -f $::path_timefile )
|
||||
if ( $tinfo->{'comment'} )
|
||||
{
|
||||
print "\nERROR: $tinfo->{'comment'}\n";
|
||||
}
|
||||
elsif ( -f $::path_timefile )
|
||||
{
|
||||
print "\nErrors are (from $::path_timefile) :\n";
|
||||
print mtr_fromfile($::path_timefile); # FIXME print_file() instead
|
||||
|
@ -177,7 +168,7 @@ sub mtr_report_stats ($) {
|
|||
my $tot_failed= 0;
|
||||
my $tot_tests= 0;
|
||||
my $tot_restarts= 0;
|
||||
my $found_problems= 0; # Some warnings are errors...
|
||||
my $found_problems= 0; # Some warnings in the logfiles are errors...
|
||||
|
||||
foreach my $tinfo (@$tests)
|
||||
{
|
||||
|
@ -212,8 +203,9 @@ sub mtr_report_stats ($) {
|
|||
else
|
||||
{
|
||||
my $ratio= $tot_passed * 100 / $tot_tests;
|
||||
printf "Failed $tot_failed/$tot_tests tests, " .
|
||||
"%.2f\% were successful.\n\n", $ratio;
|
||||
print "Failed $tot_failed/$tot_tests tests, ";
|
||||
printf("%.2f", $ratio);
|
||||
print "\% were successful.\n\n";
|
||||
print
|
||||
"The log files in var/log may give you some hint\n",
|
||||
"of what went wrong.\n",
|
||||
|
@ -288,6 +280,7 @@ sub mtr_report_stats ($) {
|
|||
|
||||
print "\n";
|
||||
|
||||
# Print a list of testcases that failed
|
||||
if ( $tot_failed != 0 )
|
||||
{
|
||||
my $test_mode= join(" ", @::glob_test_mode) || "default";
|
||||
|
@ -301,7 +294,30 @@ sub mtr_report_stats ($) {
|
|||
}
|
||||
}
|
||||
print "\n";
|
||||
|
||||
}
|
||||
|
||||
# Print a list of check_testcases that failed(if any)
|
||||
if ( $::opt_check_testcases )
|
||||
{
|
||||
my @check_testcases= ();
|
||||
|
||||
foreach my $tinfo (@$tests)
|
||||
{
|
||||
if ( defined $tinfo->{'check_testcase_failed'} )
|
||||
{
|
||||
push(@check_testcases, $tinfo->{'name'});
|
||||
}
|
||||
}
|
||||
|
||||
if ( @check_testcases )
|
||||
{
|
||||
print "Check of testcase failed for: ";
|
||||
print join(" ", @check_testcases);
|
||||
print "\n\n";
|
||||
}
|
||||
}
|
||||
|
||||
if ( $tot_failed != 0 || $found_problems)
|
||||
{
|
||||
mtr_error("there where failing test cases");
|
||||
|
|
|
@ -122,7 +122,7 @@ sub run_stress_test ()
|
|||
|
||||
mtr_init_args(\$args);
|
||||
|
||||
mtr_add_arg($args, "--server-socket=%s", $::master->[0]->{'path_mysock'});
|
||||
mtr_add_arg($args, "--server-socket=%s", $::master->[0]->{'path_sock'});
|
||||
mtr_add_arg($args, "--server-user=%s", $::opt_user);
|
||||
mtr_add_arg($args, "--server-database=%s", "test");
|
||||
mtr_add_arg($args, "--stress-suite-basedir=%s", $::glob_mysql_test_dir);
|
||||
|
@ -140,7 +140,7 @@ sub run_stress_test ()
|
|||
|
||||
if ( $::opt_stress_init_file )
|
||||
{
|
||||
mtr_add_arg($args, "--stress-init-file=%", $::opt_stress_init_file);
|
||||
mtr_add_arg($args, "--stress-init-file=%s", $::opt_stress_init_file);
|
||||
}
|
||||
|
||||
if ( !$::opt_stress_loop_count && !$::opt_stress_test_count &&
|
||||
|
@ -168,10 +168,9 @@ sub run_stress_test ()
|
|||
|
||||
#Run stress test
|
||||
mtr_run("$::glob_mysql_test_dir/mysql-stress-test.pl", $args, "", "", "", "");
|
||||
|
||||
if ( ! $::glob_use_embedded_server )
|
||||
{
|
||||
stop_masters();
|
||||
stop_all_servers();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,23 +4,19 @@
|
|||
# and is part of the translation of the Bourne shell script with the
|
||||
# same name.
|
||||
|
||||
use Carp qw(cluck);
|
||||
use Socket;
|
||||
use Errno;
|
||||
use strict;
|
||||
|
||||
#use POSIX ":sys_wait_h";
|
||||
use POSIX 'WNOHANG';
|
||||
|
||||
sub mtr_init_timers ();
|
||||
sub mtr_timer_start($$$);
|
||||
sub mtr_timer_stop($$);
|
||||
sub mtr_timer_stop_all($);
|
||||
sub mtr_timer_waitpid($$$);
|
||||
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Initiate a structure shared by all timers
|
||||
# Initiate the structure shared by all timers
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
@ -35,17 +31,19 @@ sub mtr_init_timers () {
|
|||
# Start, stop and poll a timer
|
||||
#
|
||||
# As alarm() isn't portable to Windows, we use separate processes to
|
||||
# implement timers. That is why there is a mtr_timer_waitpid(), as this
|
||||
# is where we catch a timeout.
|
||||
# implement timers.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
sub mtr_timer_start($$$) {
|
||||
my ($timers,$name,$duration)= @_;
|
||||
|
||||
mtr_verbose("mtr_timer_start: $name, $duration");
|
||||
|
||||
if ( exists $timers->{'timers'}->{$name} )
|
||||
{
|
||||
# We have an old running timer, kill it
|
||||
mtr_verbose("There is an old timer running");
|
||||
mtr_timer_stop($timers,$name);
|
||||
}
|
||||
|
||||
|
@ -57,7 +55,7 @@ sub mtr_timer_start($$$) {
|
|||
{
|
||||
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;
|
||||
}
|
||||
|
@ -70,6 +68,7 @@ sub mtr_timer_start($$$) {
|
|||
if ( $tpid )
|
||||
{
|
||||
# Parent, record the information
|
||||
mtr_verbose("timer parent, record info($name, $tpid, $duration)");
|
||||
$timers->{'timers'}->{$name}->{'pid'}= $tpid;
|
||||
$timers->{'timers'}->{$name}->{'duration'}= $duration;
|
||||
$timers->{'pids'}->{$tpid}= $name;
|
||||
|
@ -85,6 +84,7 @@ sub mtr_timer_start($$$) {
|
|||
$SIG{INT}= 'DEFAULT';
|
||||
|
||||
$0= "mtr_timer(timers,$name,$duration)";
|
||||
mtr_verbose("timer child $name, sleep $duration");
|
||||
sleep($duration);
|
||||
exit(0);
|
||||
}
|
||||
|
@ -95,9 +95,12 @@ sub mtr_timer_start($$$) {
|
|||
sub mtr_timer_stop ($$) {
|
||||
my ($timers,$name)= @_;
|
||||
|
||||
mtr_verbose("mtr_timer_stop: $name");
|
||||
|
||||
if ( exists $timers->{'timers'}->{$name} )
|
||||
{
|
||||
my $tpid= $timers->{'timers'}->{$name}->{'pid'};
|
||||
mtr_verbose("Stopping timer with pid $tpid");
|
||||
|
||||
# FIXME as Cygwin reuses pids fast, maybe check that is
|
||||
# the expected process somehow?!
|
||||
|
@ -114,7 +117,7 @@ sub mtr_timer_stop ($$) {
|
|||
}
|
||||
else
|
||||
{
|
||||
mtr_debug("Asked to stop timer \"$name\" not started");
|
||||
mtr_error("Asked to stop timer \"$name\" not started");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -136,10 +139,8 @@ sub mtr_timer_timeout ($$) {
|
|||
|
||||
return "" unless exists $timers->{'pids'}->{$pid};
|
||||
|
||||
# We got a timeout
|
||||
my $name= $timers->{'pids'}->{$pid};
|
||||
mtr_timer_stop($timers, $timers->{'timers'}->{$name});
|
||||
return $name;
|
||||
# We got a timeout, return the name ot the timer
|
||||
return $timers->{'pids'}->{$pid};
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -220,7 +220,7 @@ select (@before:=unix_timestamp())*0;
|
|||
(@before:=unix_timestamp())*0
|
||||
0
|
||||
begin;
|
||||
select * from t1 for update;
|
||||
select * from t1 for update;
|
||||
insert into t2 values (20);
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
select (@after:=unix_timestamp())*0;
|
||||
|
|
|
@ -195,7 +195,7 @@ select (@before:=unix_timestamp())*0;
|
|||
(@before:=unix_timestamp())*0
|
||||
0
|
||||
begin;
|
||||
select * from t1 for update;
|
||||
select * from t1 for update;
|
||||
insert into t2 values (20);
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
select (@after:=unix_timestamp())*0;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
drop table if exists t1;
|
||||
create table t1(n int not null, key(n), key(n), key(n), key(n));
|
||||
check table t1 extended;
|
||||
check table t1 extended;
|
||||
insert into t1 values (200000);
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
|
|
|
@ -4913,8 +4913,7 @@ bonfire
|
|||
Colombo
|
||||
nondecreasing
|
||||
DROP TABLE t1;
|
||||
ALTER TABLE t2 RENAME t1
|
||||
#;
|
||||
ALTER TABLE t2 RENAME t1;
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (
|
||||
Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
|
||||
|
|
|
@ -79,9 +79,9 @@ drop table if exists t1;
|
|||
create table t1 (i int);
|
||||
lock tables t1 read;
|
||||
create database mysqltest;
|
||||
drop table t1;
|
||||
drop table t1;
|
||||
show open tables;
|
||||
drop database mysqltest;
|
||||
drop database mysqltest;
|
||||
select 1;
|
||||
1
|
||||
1
|
||||
|
|
|
@ -9,13 +9,13 @@ n
|
|||
flush tables with read lock;
|
||||
drop table t2;
|
||||
ERROR HY000: Can't execute the query because you have a conflicting read lock
|
||||
drop table t2;
|
||||
drop table t2;
|
||||
unlock tables;
|
||||
create database mysqltest;
|
||||
create table mysqltest.t1(n int);
|
||||
insert into mysqltest.t1 values (23);
|
||||
flush tables with read lock;
|
||||
drop database mysqltest;
|
||||
drop database mysqltest;
|
||||
select * from mysqltest.t1;
|
||||
n
|
||||
23
|
||||
|
@ -51,7 +51,7 @@ drop table t1, t2, t3;
|
|||
create table t1 (c1 int);
|
||||
create table t2 (c1 int);
|
||||
lock table t1 write;
|
||||
flush tables with read lock;
|
||||
insert into t2 values(1);
|
||||
flush tables with read lock;
|
||||
insert into t2 values(1);
|
||||
unlock tables;
|
||||
drop table t1, t2;
|
||||
|
|
|
@ -5,7 +5,7 @@ insert into t1 values(1);
|
|||
flush tables with read lock;
|
||||
select * from t1;
|
||||
a
|
||||
commit;
|
||||
commit;
|
||||
select * from t1;
|
||||
a
|
||||
unlock tables;
|
||||
|
@ -14,8 +14,8 @@ select * from t1 for update;
|
|||
a
|
||||
1
|
||||
begin;
|
||||
select * from t1 for update;
|
||||
flush tables with read lock;
|
||||
select * from t1 for update;
|
||||
flush tables with read lock;
|
||||
commit;
|
||||
a
|
||||
1
|
||||
|
@ -45,7 +45,7 @@ flush tables with read lock;
|
|||
show master status;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
master-bin.000001 102
|
||||
commit;
|
||||
commit;
|
||||
show master status;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
master-bin.000001 102
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
drop table if exists t1;
|
||||
create table t1 (kill_id int);
|
||||
insert into t1 values(connection_id());
|
||||
flush tables with read lock;
|
||||
flush tables with read lock;
|
||||
select ((@id := kill_id) - kill_id) from t1;
|
||||
((@id := kill_id) - kill_id)
|
||||
0
|
||||
|
|
|
@ -9,7 +9,7 @@ test.t1 check status OK
|
|||
unlock tables;
|
||||
lock table t1 read;
|
||||
lock table t1 read;
|
||||
flush table t1;
|
||||
flush table t1;
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
|
@ -19,7 +19,7 @@ a
|
|||
1
|
||||
unlock tables;
|
||||
lock table t1 write;
|
||||
lock table t1 read;
|
||||
lock table t1 read;
|
||||
flush table t1;
|
||||
select * from t1;
|
||||
a
|
||||
|
@ -27,7 +27,7 @@ a
|
|||
unlock tables;
|
||||
unlock tables;
|
||||
lock table t1 read;
|
||||
lock table t1 write;
|
||||
lock table t1 write;
|
||||
flush table t1;
|
||||
select * from t1;
|
||||
a
|
||||
|
|
|
@ -79,6 +79,16 @@ uncompress(a) uncompressed_length(a)
|
|||
NULL NULL
|
||||
a 1
|
||||
drop table t1;
|
||||
create table t1(a blob);
|
||||
insert into t1 values ('0'), (NULL), ('0');
|
||||
select compress(a), compress(a) from t1;
|
||||
select compress(a) is null from t1;
|
||||
compress(a) is null
|
||||
0
|
||||
1
|
||||
0
|
||||
drop table t1;
|
||||
End of 4.1 tests
|
||||
create table t1 (a varchar(32) not null);
|
||||
insert into t1 values ('foo');
|
||||
explain select * from t1 where uncompress(a) is null;
|
||||
|
|
|
@ -71,3 +71,17 @@ NULL
|
|||
NULL
|
||||
NULL
|
||||
drop table t1;
|
||||
End of 4.1 tests
|
||||
SELECT CAST('2006-09-26' AS DATE) + INTERVAL 1 DAY;
|
||||
CAST('2006-09-26' AS DATE) + INTERVAL 1 DAY
|
||||
2006-09-27
|
||||
SELECT CAST('2006-09-26' AS DATE) + INTERVAL 1 MONTH;
|
||||
CAST('2006-09-26' AS DATE) + INTERVAL 1 MONTH
|
||||
2006-10-26
|
||||
SELECT CAST('2006-09-26' AS DATE) + INTERVAL 1 YEAR;
|
||||
CAST('2006-09-26' AS DATE) + INTERVAL 1 YEAR
|
||||
2007-09-26
|
||||
SELECT CAST('2006-09-26' AS DATE) + INTERVAL 1 WEEK;
|
||||
CAST('2006-09-26' AS DATE) + INTERVAL 1 WEEK
|
||||
2006-10-03
|
||||
End of 5.0 tests
|
||||
|
|
|
@ -63,7 +63,7 @@ FROM t1
|
|||
WHERE conn = 'default';
|
||||
IS_USED_LOCK('bug16501') = connection_id
|
||||
1
|
||||
SELECT GET_LOCK('bug16501',600);
|
||||
SELECT GET_LOCK('bug16501',600);
|
||||
SELECT IS_USED_LOCK('bug16501') = CONNECTION_ID();
|
||||
IS_USED_LOCK('bug16501') = CONNECTION_ID()
|
||||
1
|
||||
|
|
|
@ -107,7 +107,9 @@ subtime("02:01:01.999999", "01:01:01.999999")
|
|||
01:00:00.000000
|
||||
select timediff("1997-01-01 23:59:59.000001","1995-12-31 23:59:59.000002");
|
||||
timediff("1997-01-01 23:59:59.000001","1995-12-31 23:59:59.000002")
|
||||
8807:59:59.999999
|
||||
838:59:59
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect time value: '8807:59:59.999999'
|
||||
select timediff("1997-12-31 23:59:59.000001","1997-12-30 01:01:01.000002");
|
||||
timediff("1997-12-31 23:59:59.000001","1997-12-30 01:01:01.000002")
|
||||
46:58:57.999999
|
||||
|
@ -219,13 +221,16 @@ SELECT TIMEDIFF(t1, t4) As ttt, TIMEDIFF(t2, t3) As qqq,
|
|||
TIMEDIFF(t3, t2) As eee, TIMEDIFF(t2, t4) As rrr from test;
|
||||
ttt qqq eee rrr
|
||||
-744:00:00 NULL NULL NULL
|
||||
26305:01:02 22:58:58 -22:58:58 NULL
|
||||
-26305:01:02 -22:58:58 22:58:58 NULL
|
||||
838:59:59 22:58:58 -22:58:58 NULL
|
||||
-838:59:59 -22:58:58 22:58:58 NULL
|
||||
NULL 26:02:02 -26:02:02 NULL
|
||||
00:00:00 -26:02:02 26:02:02 NULL
|
||||
NULL NULL NULL NULL
|
||||
NULL NULL NULL NULL
|
||||
00:00:00 -24:00:00 24:00:00 NULL
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect time value: '26305:01:02'
|
||||
Warning 1292 Truncated incorrect time value: '-26305:01:02'
|
||||
drop table t1, test;
|
||||
select addtime("-01:01:01.01", "-23:59:59.1") as a;
|
||||
a
|
||||
|
@ -235,7 +240,9 @@ a
|
|||
10000
|
||||
select microsecond(19971231235959.01) as a;
|
||||
a
|
||||
10000
|
||||
0
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect time value: '19971231235959.01'
|
||||
select date_add("1997-12-31",INTERVAL "10.09" SECOND_MICROSECOND) as a;
|
||||
a
|
||||
1997-12-31 00:00:10.090000
|
||||
|
|
|
@ -339,7 +339,9 @@ extract(DAY_MINUTE FROM "02 10:11:12")
|
|||
21011
|
||||
select extract(DAY_SECOND FROM "225 10:11:12");
|
||||
extract(DAY_SECOND FROM "225 10:11:12")
|
||||
225101112
|
||||
8385959
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect time value: '225 10:11:12'
|
||||
select extract(HOUR FROM "1999-01-02 10:11:12");
|
||||
extract(HOUR FROM "1999-01-02 10:11:12")
|
||||
10
|
||||
|
@ -648,7 +650,7 @@ date_add(date,INTERVAL "1 1:1:1" DAY_SECOND)
|
|||
2003-01-03 01:01:01
|
||||
select date_add(date,INTERVAL "1" WEEK) from t1;
|
||||
date_add(date,INTERVAL "1" WEEK)
|
||||
2003-01-09 00:00:00
|
||||
2003-01-09
|
||||
select date_add(date,INTERVAL "1" QUARTER) from t1;
|
||||
date_add(date,INTERVAL "1" QUARTER)
|
||||
2003-04-02
|
||||
|
@ -657,7 +659,7 @@ timestampadd(MINUTE, 1, date)
|
|||
2003-01-02 00:01:00
|
||||
select timestampadd(WEEK, 1, date) from t1;
|
||||
timestampadd(WEEK, 1, date)
|
||||
2003-01-09 00:00:00
|
||||
2003-01-09
|
||||
select timestampadd(SQL_TSI_SECOND, 1, date) from t1;
|
||||
timestampadd(SQL_TSI_SECOND, 1, date)
|
||||
2003-01-02 00:00:01
|
||||
|
@ -926,6 +928,93 @@ t1 CREATE TABLE `t1` (
|
|||
`from_unixtime(1) + 0` double(23,6) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
SELECT SEC_TO_TIME(3300000);
|
||||
SEC_TO_TIME(3300000)
|
||||
838:59:59
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect time value: '3300000'
|
||||
SELECT SEC_TO_TIME(3300000)+0;
|
||||
SEC_TO_TIME(3300000)+0
|
||||
8385959.000000
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect time value: '3300000'
|
||||
SELECT SEC_TO_TIME(3600 * 4294967296);
|
||||
SEC_TO_TIME(3600 * 4294967296)
|
||||
838:59:59
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect time value: '15461882265600'
|
||||
SELECT TIME_TO_SEC('916:40:00');
|
||||
TIME_TO_SEC('916:40:00')
|
||||
3020399
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect time value: '916:40:00'
|
||||
SELECT ADDTIME('500:00:00', '416:40:00');
|
||||
ADDTIME('500:00:00', '416:40:00')
|
||||
838:59:59
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect time value: '916:40:00'
|
||||
SELECT ADDTIME('916:40:00', '416:40:00');
|
||||
ADDTIME('916:40:00', '416:40:00')
|
||||
838:59:59
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect time value: '916:40:00'
|
||||
Warning 1292 Truncated incorrect time value: '1255:39:59'
|
||||
SELECT SUBTIME('916:40:00', '416:40:00');
|
||||
SUBTIME('916:40:00', '416:40:00')
|
||||
422:19:59
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect time value: '916:40:00'
|
||||
SELECT SUBTIME('-916:40:00', '416:40:00');
|
||||
SUBTIME('-916:40:00', '416:40:00')
|
||||
-838:59:59
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect time value: '-916:40:00'
|
||||
Warning 1292 Truncated incorrect time value: '-1255:39:59'
|
||||
SELECT MAKETIME(916,0,0);
|
||||
MAKETIME(916,0,0)
|
||||
838:59:59
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect time value: '916:00:00'
|
||||
SELECT MAKETIME(4294967296, 0, 0);
|
||||
MAKETIME(4294967296, 0, 0)
|
||||
838:59:59
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect time value: '4294967296:00:00'
|
||||
SELECT MAKETIME(-4294967296, 0, 0);
|
||||
MAKETIME(-4294967296, 0, 0)
|
||||
-838:59:59
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect time value: '-4294967296:00:00'
|
||||
SELECT MAKETIME(0, 4294967296, 0);
|
||||
MAKETIME(0, 4294967296, 0)
|
||||
NULL
|
||||
SELECT MAKETIME(0, 0, 4294967296);
|
||||
MAKETIME(0, 0, 4294967296)
|
||||
NULL
|
||||
SELECT MAKETIME(CAST(-1 AS UNSIGNED), 0, 0);
|
||||
MAKETIME(CAST(-1 AS UNSIGNED), 0, 0)
|
||||
838:59:59
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect time value: '18446744073709551615:00:00'
|
||||
SELECT EXTRACT(HOUR FROM '100000:02:03');
|
||||
EXTRACT(HOUR FROM '100000:02:03')
|
||||
838
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect time value: '100000:02:03'
|
||||
CREATE TABLE t1(f1 TIME);
|
||||
INSERT INTO t1 VALUES('916:00:00 a');
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f1' at row 1
|
||||
Warning 1264 Out of range value for column 'f1' at row 1
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
838:59:59
|
||||
DROP TABLE t1;
|
||||
SELECT SEC_TO_TIME(CAST(-1 AS UNSIGNED));
|
||||
SEC_TO_TIME(CAST(-1 AS UNSIGNED))
|
||||
838:59:59
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect time value: '18446744073709551615'
|
||||
SET NAMES latin1;
|
||||
SET character_set_results = NULL;
|
||||
SHOW VARIABLES LIKE 'character_set_results';
|
||||
|
@ -958,18 +1047,6 @@ union
|
|||
(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 HOUR)),'%k') As H);
|
||||
H
|
||||
5
|
||||
SET NAMES latin1;
|
||||
SET character_set_results = NULL;
|
||||
SHOW VARIABLES LIKE 'character_set_results';
|
||||
Variable_name Value
|
||||
character_set_results
|
||||
CREATE TABLE testBug8868 (field1 DATE, field2 VARCHAR(32) CHARACTER SET BINARY);
|
||||
INSERT INTO testBug8868 VALUES ('2006-09-04', 'abcd');
|
||||
SELECT DATE_FORMAT(field1,'%b-%e %l:%i%p') as fmtddate, field2 FROM testBug8868;
|
||||
fmtddate field2
|
||||
Sep-4 12:00AM abcd
|
||||
DROP TABLE testBug8868;
|
||||
SET NAMES DEFAULT;
|
||||
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;
|
||||
|
|
|
@ -336,12 +336,12 @@ drop database mysqltest_1;
|
|||
set password = password("changed");
|
||||
ERROR 42000: Access denied for user ''@'localhost' to database 'mysql'
|
||||
lock table mysql.user write;
|
||||
flush privileges;
|
||||
grant all on *.* to 'mysqltest_1'@'localhost';
|
||||
flush privileges;
|
||||
grant all on *.* to 'mysqltest_1'@'localhost';
|
||||
unlock tables;
|
||||
lock table mysql.user write;
|
||||
set password for 'mysqltest_1'@'localhost' = password('');
|
||||
revoke all on *.* from 'mysqltest_1'@'localhost';
|
||||
set password for 'mysqltest_1'@'localhost' = password('');
|
||||
revoke all on *.* from 'mysqltest_1'@'localhost';
|
||||
unlock tables;
|
||||
drop user 'mysqltest_1'@'localhost';
|
||||
create database TESTDB;
|
||||
|
|
|
@ -476,7 +476,7 @@ handler t1 read first;
|
|||
c1
|
||||
1
|
||||
send the below to another connection, do not wait for the result
|
||||
optimize table t1;
|
||||
optimize table t1;
|
||||
proceed with the normal connection
|
||||
handler t1 read next;
|
||||
c1
|
||||
|
@ -502,7 +502,7 @@ flush tables with read lock;
|
|||
drop table t1;
|
||||
ERROR HY000: Can't execute the query because you have a conflicting read lock
|
||||
send the below to another connection, do not wait for the result
|
||||
drop table t1;
|
||||
drop table t1;
|
||||
proceed with the normal connection
|
||||
select * from t1;
|
||||
c1
|
||||
|
|
|
@ -476,7 +476,7 @@ handler t1 read first;
|
|||
c1
|
||||
1
|
||||
send the below to another connection, do not wait for the result
|
||||
optimize table t1;
|
||||
optimize table t1;
|
||||
proceed with the normal connection
|
||||
handler t1 read next;
|
||||
c1
|
||||
|
@ -502,7 +502,7 @@ flush tables with read lock;
|
|||
drop table t1;
|
||||
ERROR HY000: Can't execute the query because you have a conflicting read lock
|
||||
send the below to another connection, do not wait for the result
|
||||
drop table t1;
|
||||
drop table t1;
|
||||
proceed with the normal connection
|
||||
select * from t1;
|
||||
c1
|
||||
|
|
|
@ -759,6 +759,7 @@ select table_schema,table_name, column_name from
|
|||
information_schema.columns
|
||||
where data_type = 'longtext';
|
||||
table_schema table_name column_name
|
||||
information_schema COLUMNS COLUMN_DEFAULT
|
||||
information_schema COLUMNS COLUMN_TYPE
|
||||
information_schema EVENTS EVENT_DEFINITION
|
||||
information_schema EVENTS SQL_MODE
|
||||
|
@ -1315,6 +1316,19 @@ WHERE table_name=(SELECT MAX(table_name)
|
|||
FROM information_schema.tables);
|
||||
table_name
|
||||
VIEWS
|
||||
DROP TABLE IF EXISTS bug23037;
|
||||
DROP FUNCTION IF EXISTS get_value;
|
||||
SELECT COLUMN_NAME, MD5(COLUMN_DEFAULT), LENGTH(COLUMN_DEFAULT) FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='bug23037';
|
||||
COLUMN_NAME MD5(COLUMN_DEFAULT) LENGTH(COLUMN_DEFAULT)
|
||||
fld1 7cf7a6782be951a1f2464a350da926a5 65532
|
||||
SELECT MD5(get_value());
|
||||
MD5(get_value())
|
||||
7cf7a6782be951a1f2464a350da926a5
|
||||
SELECT COLUMN_NAME, MD5(COLUMN_DEFAULT), LENGTH(COLUMN_DEFAULT), COLUMN_DEFAULT=get_value() FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='bug23037';
|
||||
COLUMN_NAME MD5(COLUMN_DEFAULT) LENGTH(COLUMN_DEFAULT) COLUMN_DEFAULT=get_value()
|
||||
fld1 7cf7a6782be951a1f2464a350da926a5 65532 1
|
||||
DROP TABLE bug23037;
|
||||
DROP FUNCTION get_value;
|
||||
End of 5.0 tests.
|
||||
select * from information_schema.engines WHERE ENGINE="MyISAM";
|
||||
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
SET SESSION STORAGE_ENGINE = InnoDB;
|
||||
drop table if exists t1,t2,t1m,t1i,t2m,t2i,t4;
|
||||
create table t1(f1 varchar(800) binary not null, key(f1))
|
||||
character set utf8 collate utf8_general_ci;
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 765 bytes
|
||||
insert into t1 values('aaa');
|
||||
drop table t1;
|
||||
create table t1 (
|
||||
c_id int(11) not null default '0',
|
||||
org_id int(11) default null,
|
||||
|
@ -111,6 +105,14 @@ SELECT `id1` FROM `t1` WHERE `id1` NOT IN (SELECT `id1` FROM `t2` WHERE `id2` =
|
|||
id1
|
||||
2
|
||||
DROP TABLE t1, t2;
|
||||
create table t1 (c1 int) engine=innodb;
|
||||
handler t1 open;
|
||||
handler t1 read first;
|
||||
c1
|
||||
Before and after comparison
|
||||
0
|
||||
drop table t1;
|
||||
End of 4.1 tests
|
||||
create table t1m (a int) engine = MEMORY;
|
||||
create table t1i (a int);
|
||||
create table t2m (a int) engine = MEMORY;
|
||||
|
@ -385,6 +387,23 @@ Warnings:
|
|||
Warning 1071 Specified key was too long; max key length is 765 bytes
|
||||
insert into t1 values('aaa');
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c FLOAT, KEY b(b)) ENGINE = INNODB;
|
||||
INSERT INTO t1 VALUES ( 1 , 1 , 1);
|
||||
INSERT INTO t1 SELECT a + 1 , MOD(a + 1 , 20), 1 FROM t1;
|
||||
INSERT INTO t1 SELECT a + 2 , MOD(a + 2 , 20), 1 FROM t1;
|
||||
INSERT INTO t1 SELECT a + 4 , MOD(a + 4 , 20), 1 FROM t1;
|
||||
INSERT INTO t1 SELECT a + 8 , MOD(a + 8 , 20), 1 FROM t1;
|
||||
INSERT INTO t1 SELECT a + 16, MOD(a + 16, 20), 1 FROM t1;
|
||||
INSERT INTO t1 SELECT a + 32, MOD(a + 32, 20), 1 FROM t1;
|
||||
INSERT INTO t1 SELECT a + 64, MOD(a + 64, 20), 1 FROM t1;
|
||||
EXPLAIN SELECT b, SUM(c) FROM t1 GROUP BY b;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index NULL b 5 NULL 128
|
||||
EXPLAIN SELECT SQL_BIG_RESULT b, SUM(c) FROM t1 GROUP BY b;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 128 Using filesort
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
CREATE TABLE `t2` (
|
||||
`k` int(11) NOT NULL auto_increment,
|
||||
`a` int(11) default NULL,
|
||||
|
@ -453,3 +472,4 @@ k a c
|
|||
11 15 1
|
||||
12 20 1
|
||||
drop table t2;
|
||||
End of 5.1 tests
|
||||
|
|
|
@ -10,7 +10,7 @@ start transaction;
|
|||
select f1();
|
||||
f1()
|
||||
100
|
||||
update t1 set col2=0 where col1=1;
|
||||
update t1 set col2=0 where col1=1;
|
||||
select * from t1;
|
||||
col1 col2
|
||||
1 100
|
||||
|
|
|
@ -22,7 +22,7 @@ create table t2 (id int unsigned not null);
|
|||
insert into t2 select id from t1;
|
||||
create table t3 (kill_id int);
|
||||
insert into t3 values(connection_id());
|
||||
select id from t1 where id in (select distinct id from t2);
|
||||
select id from t1 where id in (select distinct id from t2);
|
||||
select ((@id := kill_id) - kill_id) from t3;
|
||||
((@id := kill_id) - kill_id)
|
||||
0
|
||||
|
@ -32,7 +32,7 @@ drop table t1, t2, t3;
|
|||
select get_lock("a", 10);
|
||||
get_lock("a", 10)
|
||||
1
|
||||
select get_lock("a", 10);
|
||||
select get_lock("a", 10);
|
||||
get_lock("a", 10)
|
||||
NULL
|
||||
select 1;
|
||||
|
|
|
@ -2,8 +2,8 @@ drop table if exists t1,t2;
|
|||
create table t1(n int);
|
||||
insert into t1 values (1);
|
||||
lock tables t1 write;
|
||||
update low_priority t1 set n = 4;
|
||||
select n from t1;
|
||||
update low_priority t1 set n = 4;
|
||||
select n from t1;
|
||||
unlock tables;
|
||||
n
|
||||
4
|
||||
|
@ -11,8 +11,8 @@ drop table t1;
|
|||
create table t1(n int);
|
||||
insert into t1 values (1);
|
||||
lock tables t1 read;
|
||||
update low_priority t1 set n = 4;
|
||||
select n from t1;
|
||||
update low_priority t1 set n = 4;
|
||||
select n from t1;
|
||||
unlock tables;
|
||||
n
|
||||
1
|
||||
|
@ -23,7 +23,7 @@ insert into t1 values(1,1);
|
|||
insert into t1 values(2,2);
|
||||
insert into t2 values(1,2);
|
||||
lock table t1 read;
|
||||
update t1,t2 set c=a where b=d;
|
||||
update t1,t2 set c=a where b=d;
|
||||
select c from t2;
|
||||
c
|
||||
2
|
||||
|
@ -32,14 +32,14 @@ drop table t2;
|
|||
create table t1 (a int);
|
||||
create table t2 (a int);
|
||||
lock table t1 write, t2 write;
|
||||
insert t1 select * from t2;
|
||||
insert t1 select * from t2;
|
||||
drop table t2;
|
||||
ERROR 42S02: Table 'test.t2' doesn't exist
|
||||
drop table t1;
|
||||
create table t1 (a int);
|
||||
create table t2 (a int);
|
||||
lock table t1 write, t2 write, t1 as t1_2 write, t2 as t2_2 write;
|
||||
insert t1 select * from t2;
|
||||
insert t1 select * from t2;
|
||||
drop table t2;
|
||||
ERROR 42S02: Table 'test.t2' doesn't exist
|
||||
drop table t1;
|
||||
|
@ -54,7 +54,7 @@ use mysql;
|
|||
LOCK TABLES columns_priv WRITE, db WRITE, host WRITE, user WRITE;
|
||||
FLUSH TABLES;
|
||||
use mysql;
|
||||
SELECT user.Select_priv FROM user, db WHERE user.user = db.user LIMIT 1;
|
||||
SELECT user.Select_priv FROM user, db WHERE user.user = db.user LIMIT 1;
|
||||
OPTIMIZE TABLES columns_priv, db, host, user;
|
||||
Table Op Msg_type Msg_text
|
||||
mysql.columns_priv optimize status OK
|
||||
|
@ -68,14 +68,14 @@ use test;
|
|||
use test;
|
||||
CREATE TABLE t1 (c1 int);
|
||||
LOCK TABLE t1 WRITE;
|
||||
FLUSH TABLES WITH READ LOCK;
|
||||
FLUSH TABLES WITH READ LOCK;
|
||||
CREATE TABLE t2 (c1 int);
|
||||
UNLOCK TABLES;
|
||||
UNLOCK TABLES;
|
||||
DROP TABLE t1, t2;
|
||||
CREATE TABLE t1 (c1 int);
|
||||
LOCK TABLE t1 WRITE;
|
||||
FLUSH TABLES WITH READ LOCK;
|
||||
FLUSH TABLES WITH READ LOCK;
|
||||
CREATE TABLE t2 AS SELECT * FROM t1;
|
||||
ERROR HY000: Table 't2' was not locked with LOCK TABLES
|
||||
UNLOCK TABLES;
|
||||
|
@ -83,7 +83,7 @@ UNLOCK TABLES;
|
|||
DROP TABLE t1;
|
||||
CREATE DATABASE mysqltest_1;
|
||||
FLUSH TABLES WITH READ LOCK;
|
||||
DROP DATABASE mysqltest_1;
|
||||
DROP DATABASE mysqltest_1;
|
||||
DROP DATABASE mysqltest_1;
|
||||
ERROR HY000: Can't execute the query because you have a conflicting read lock
|
||||
UNLOCK TABLES;
|
||||
|
@ -91,7 +91,7 @@ DROP DATABASE mysqltest_1;
|
|||
ERROR HY000: Can't drop database 'mysqltest_1'; database doesn't exist
|
||||
create table t1 (f1 int(12) unsigned not null auto_increment, primary key(f1)) engine=innodb;
|
||||
lock tables t1 write;
|
||||
alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; //
|
||||
alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; //
|
||||
alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; //
|
||||
alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; //
|
||||
unlock tables;
|
||||
drop table t1;
|
||||
|
|
|
@ -39,14 +39,14 @@ ERROR HY000: You can't use usual read lock with log tables. Try READ LOCAL inste
|
|||
lock tables mysql.slow_log READ LOCAL, mysql.general_log READ LOCAL;
|
||||
unlock tables;
|
||||
lock tables mysql.general_log READ LOCAL;
|
||||
flush logs;
|
||||
flush logs;
|
||||
unlock tables;
|
||||
select "Mark that we woke up from flush logs in the test"
|
||||
as "test passed";
|
||||
test passed
|
||||
Mark that we woke up from flush logs in the test
|
||||
lock tables mysql.general_log READ LOCAL;
|
||||
truncate mysql.general_log;
|
||||
truncate mysql.general_log;
|
||||
unlock tables;
|
||||
select "Mark that we woke up from TRUNCATE in the test"
|
||||
as "test passed";
|
||||
|
|
|
@ -509,8 +509,8 @@ create table t2 (a int);
|
|||
insert into t2 values (10), (20), (30);
|
||||
create view v1 as select a as b, a/10 as a from t2;
|
||||
lock table t1 write;
|
||||
alter table t1 add column c int default 100 after a;
|
||||
update t1, v1 set t1.b=t1.a+t1.b+v1.b where t1.a=v1.a;
|
||||
alter table t1 add column c int default 100 after a;
|
||||
update t1, v1 set t1.b=t1.a+t1.b+v1.b where t1.a=v1.a;
|
||||
unlock tables;
|
||||
select * from t1;
|
||||
a c b
|
||||
|
|
|
@ -149,4 +149,33 @@ ERROR at line 1: USE must be followed by a database name
|
|||
\\
|
||||
';
|
||||
';
|
||||
create table t17583 (a int);
|
||||
insert into t17583 (a) values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
insert into t17583 select a from t17583;
|
||||
insert into t17583 select a from t17583;
|
||||
insert into t17583 select a from t17583;
|
||||
insert into t17583 select a from t17583;
|
||||
insert into t17583 select a from t17583;
|
||||
insert into t17583 select a from t17583;
|
||||
insert into t17583 select a from t17583;
|
||||
select count(*) from t17583;
|
||||
count(*)
|
||||
1280
|
||||
drop table t17583;
|
||||
Test connect without db- or host-name => reconnect
|
||||
Test connect with dbname only => new dbname, old hostname
|
||||
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'connecttest' at line 1
|
||||
Test connect with _invalid_ dbname only => new invalid dbname, old hostname
|
||||
ERROR 1049 (42000) at line 1: Unknown database 'invalid'
|
||||
ERROR 1049 (42000) at line 1: Unknown database 'invalid'
|
||||
Test connect with dbname + hostname
|
||||
Test connect with dbname + _invalid_ hostname
|
||||
ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errno)
|
||||
ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errno)
|
||||
The commands reported in the bug report
|
||||
ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyril has found a bug :)XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (errno)
|
||||
Too long dbname
|
||||
ERROR 1049 (42000) at line 1: Unknown database 'test_really_long_dbnamexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
|
||||
Too long hostname
|
||||
ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyrils_superlonghostnameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (errno)
|
||||
End of 5.0 tests
|
||||
|
|
|
@ -1,21 +1,4 @@
|
|||
drop table if exists t1;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 't1'
|
||||
drop table if exists t2;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 't2'
|
||||
drop table if exists t3;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 't3'
|
||||
drop table if exists t4;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 't4'
|
||||
drop table if exists t5;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 't5'
|
||||
drop table if exists t6;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 't6'
|
||||
drop table if exists t1, t2, t3, t4, t5, t6;
|
||||
create table t1 (id int(8), name varchar(32));
|
||||
create table t2 (id int(8), name varchar(32)) ENGINE="MyISAM";
|
||||
create table t3 (id int(8), name varchar(32)) ENGINE="MEMORY";
|
||||
|
|
|
@ -3195,6 +3195,28 @@ UNLOCK TABLES;
|
|||
|
||||
DROP TABLE `t1`;
|
||||
#
|
||||
# Bug #19745: mysqldump --xml produces invalid xml
|
||||
#
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (f1 int(10), data MEDIUMBLOB);
|
||||
INSERT INTO t1 VALUES(1,0xff00fef0);
|
||||
<?xml version="1.0"?>
|
||||
<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<database name="test">
|
||||
<table_structure name="t1">
|
||||
<field Field="f1" Type="int(10)" Null="YES" Key="" Extra="" />
|
||||
<field Field="data" Type="mediumblob" Null="YES" Key="" Extra="" />
|
||||
</table_structure>
|
||||
<table_data name="t1">
|
||||
<row>
|
||||
<field name="f1">1</field>
|
||||
<field name="data" xsi:type="xs:hexBinary">FF00FEF0</field>
|
||||
</row>
|
||||
</table_data>
|
||||
</database>
|
||||
</mysqldump>
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# End of 5.0 tests
|
||||
#
|
||||
drop table if exists t1;
|
||||
|
|
|
@ -152,8 +152,38 @@ mysqltest: At line 1: Missing delimiter
|
|||
mysqltest: At line 1: End of line junk detected: "sleep 7
|
||||
# Another comment
|
||||
"
|
||||
mysqltest: At line 1: Missing delimiter
|
||||
mysqltest: At line 1: Missing delimiter
|
||||
mysqltest: At line 1: End of line junk detected: "disconnect default
|
||||
|
||||
#
|
||||
# comment
|
||||
# comment2
|
||||
|
||||
# comment 3
|
||||
--disable_query_log
|
||||
"
|
||||
mysqltest: At line 1: End of line junk detected: "disconnect default # comment
|
||||
# comment part2
|
||||
|
||||
# comment 3
|
||||
--disable_query_log
|
||||
"
|
||||
mysqltest: At line 1: Extra delimiter ";" found
|
||||
mysqltest: At line 1: Extra delimiter ";" found
|
||||
mysqltest: At line 1: Missing argument(s) to 'error'
|
||||
mysqltest: At line 1: Missing argument(s) to 'error'
|
||||
mysqltest: At line 1: The sqlstate definition must start with an uppercase S
|
||||
mysqltest: At line 1: The error name definition must start with an uppercase E
|
||||
mysqltest: At line 1: Invalid argument to error: '9eeeee' - the errno may only consist of digits[0-9]
|
||||
mysqltest: At line 1: Invalid argument to error: '1sssss' - the errno may only consist of digits[0-9]
|
||||
mysqltest: At line 1: The sqlstate must be exactly 5 chars long
|
||||
mysqltest: At line 1: The sqlstate may only consist of digits[0-9] and _uppercase_ letters
|
||||
mysqltest: At line 1: The sqlstate must be exactly 5 chars long
|
||||
mysqltest: At line 1: Unknown SQL error name 'E9999'
|
||||
mysqltest: At line 1: Invalid argument to error: '999e9' - the errno may only consist of digits[0-9]
|
||||
mysqltest: At line 1: Invalid argument to error: '9b' - the errno may only consist of digits[0-9]
|
||||
mysqltest: At line 1: Too many errorcodes specified
|
||||
MySQL
|
||||
"MySQL"
|
||||
MySQL: The world''s most popular open source database
|
||||
|
@ -239,7 +269,7 @@ mysqltest: At line 1: Missing assignment operator in let
|
|||
1
|
||||
# Execute: echo $success ;
|
||||
1
|
||||
mysqltest: At line 1: Missing file name in source
|
||||
mysqltest: At line 1: Missing required argument 'filename' to command 'source'
|
||||
mysqltest: At line 1: Could not open file ./non_existingFile
|
||||
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/recursive.sql": At line 1: Source directives are nesting too deep
|
||||
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/error.sql": At line 1: query 'garbage ' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1
|
||||
|
@ -332,16 +362,16 @@ Counter is greater than 0, (counter=10)
|
|||
Counter is not 0, (counter=0)
|
||||
1
|
||||
Testing while with not
|
||||
mysqltest: In included file "./include/mysqltest_while.inc": At line 64: Nesting too deeply
|
||||
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest_while.inc": At line 64: Nesting too deeply
|
||||
mysqltest: At line 1: missing '(' in while
|
||||
mysqltest: At line 1: missing ')' in while
|
||||
mysqltest: At line 1: Missing '{' after while. Found "dec $i"
|
||||
mysqltest: At line 1: Stray '}' - end of block before beginning
|
||||
mysqltest: At line 1: Stray 'end' command - end of block before beginning
|
||||
mysqltest: At line 1: query '' failed: 1065: Query was empty
|
||||
mysqltest: At line 1: query '{' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '{' at line 1
|
||||
mysqltest: At line 1: Missing '{' after while. Found "echo hej"
|
||||
mysqltest: At line 3: Missing end of block
|
||||
mysqltest: At line 1: Missing newline between while and '{'
|
||||
mysqltest: At line 3: Missing end of block
|
||||
mysqltest: At line 1: missing '(' in if
|
||||
mysqltest: At line 1: Stray 'end' command - end of block before beginning
|
||||
select "b" bs col1, "c" bs col2;
|
||||
|
@ -371,17 +401,15 @@ mysqltest: At line 1: Wrong column number to replace_column in 'replace_column 1
|
|||
mysqltest: At line 1: Invalid integer argument "10!"
|
||||
mysqltest: At line 1: End of line junk detected: "!"
|
||||
mysqltest: At line 1: Invalid integer argument "a"
|
||||
mysqltest: At line 1: Syntax error in connect - expected '(' found 'mysqltest: At line 1: Missing connection host
|
||||
mysqltest: At line 1: Missing connection host
|
||||
mysqltest: At line 1: Missing connection user
|
||||
mysqltest: At line 1: Missing connection user
|
||||
mysqltest: At line 1: Missing connection password
|
||||
mysqltest: At line 1: Missing connection db
|
||||
mysqltest: At line 1: Could not open connection 'con2': 1049 Unknown database 'illegal_db'
|
||||
mysqltest: At line 1: Missing required argument 'connection name' to command 'connect'
|
||||
mysqltest: At line 1: Missing required argument 'connection name' to command 'connect'
|
||||
mysqltest: At line 1: Missing required argument 'host' to command 'connect'
|
||||
mysqltest: At line 1: Missing required argument 'host' to command 'connect'
|
||||
mysqltest: At line 1: query 'connect con2,localhost,root,,illegal_db' failed: 1049: Unknown database 'illegal_db'
|
||||
mysqltest: At line 1: Illegal argument for port: 'illegal_port'
|
||||
mysqltest: At line 1: Illegal option to connect: SMTP
|
||||
OK
|
||||
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": At line 7: Connection limit exhausted - increase MAX_CONS in mysqltest.c
|
||||
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": At line 7: Connection limit exhausted, you can have max 128 connections
|
||||
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": At line 3: connection 'test_con1' not found in connection pool
|
||||
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": At line 2: Connection test_con1 already exists
|
||||
connect(localhost,root,,test,MASTER_PORT,MASTER_SOCKET);
|
||||
|
@ -449,7 +477,6 @@ sleep;
|
|||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'sleep' at line 1
|
||||
;
|
||||
ERROR 42000: Query was empty
|
||||
End of 5.0 tests
|
||||
select "b" as col1, "c" as col2;
|
||||
col1 col2
|
||||
b c
|
||||
|
@ -477,4 +504,20 @@ a D
|
|||
1 1
|
||||
1 4
|
||||
drop table t1;
|
||||
End of 5.1 tests
|
||||
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 ";
|
||||
"
|
||||
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'
|
||||
hello
|
||||
hello
|
||||
hello
|
||||
mysqltest: At line 1: Max delimiter length(16) exceeded
|
||||
hello
|
||||
hello
|
||||
mysqltest: At line 1: test of die
|
||||
Some output
|
||||
End of tests
|
||||
|
|
2
mysql-test/r/not_partition.require
Normal file
2
mysql-test/r/not_partition.require
Normal file
|
@ -0,0 +1,2 @@
|
|||
Variable_name Value
|
||||
have_partitioning NO
|
48
mysql-test/r/not_partition.result
Normal file
48
mysql-test/r/not_partition.result
Normal file
|
@ -0,0 +1,48 @@
|
|||
CREATE TABLE t1 (
|
||||
firstname VARCHAR(25) NOT NULL,
|
||||
lastname VARCHAR(25) NOT NULL,
|
||||
username VARCHAR(16) NOT NULL,
|
||||
email VARCHAR(35),
|
||||
joined DATE NOT NULL
|
||||
)
|
||||
PARTITION BY KEY(joined)
|
||||
PARTITIONS 6;
|
||||
ERROR HY000: The 'partitioning' feature is disabled; you need MySQL built with '--with-partition' to have it working
|
||||
ALTER TABLE t1 PARTITION BY KEY(joined) PARTITIONS 2;
|
||||
ERROR HY000: The 'partitioning' feature is disabled; you need MySQL built with '--with-partition' to have it working
|
||||
drop table t1;
|
||||
ERROR 42S02: Unknown table 't1'
|
||||
CREATE TABLE t1 (
|
||||
firstname VARCHAR(25) NOT NULL,
|
||||
lastname VARCHAR(25) NOT NULL,
|
||||
username VARCHAR(16) NOT NULL,
|
||||
email VARCHAR(35),
|
||||
joined DATE NOT NULL
|
||||
)
|
||||
PARTITION BY RANGE( YEAR(joined) ) (
|
||||
PARTITION p0 VALUES LESS THAN (1960),
|
||||
PARTITION p1 VALUES LESS THAN (1970),
|
||||
PARTITION p2 VALUES LESS THAN (1980),
|
||||
PARTITION p3 VALUES LESS THAN (1990),
|
||||
PARTITION p4 VALUES LESS THAN MAXVALUE
|
||||
);
|
||||
ERROR HY000: The 'partitioning' feature is disabled; you need MySQL built with '--with-partition' to have it working
|
||||
drop table t1;
|
||||
ERROR 42S02: Unknown table 't1'
|
||||
CREATE TABLE t1 (id INT, purchased DATE)
|
||||
PARTITION BY RANGE( YEAR(purchased) )
|
||||
SUBPARTITION BY HASH( TO_DAYS(purchased) )
|
||||
SUBPARTITIONS 2 (
|
||||
PARTITION p0 VALUES LESS THAN (1990),
|
||||
PARTITION p1 VALUES LESS THAN (2000),
|
||||
PARTITION p2 VALUES LESS THAN MAXVALUE
|
||||
);
|
||||
ERROR HY000: The 'partitioning' feature is disabled; you need MySQL built with '--with-partition' to have it working
|
||||
drop table t1;
|
||||
ERROR 42S02: Unknown table 't1'
|
||||
create table t1 (a varchar(10) charset latin1 collate latin1_bin);
|
||||
insert into t1 values (''),(' '),('a'),('a '),('a ');
|
||||
explain partitions select * from t1 where a='a ' OR a='a';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 Using where
|
||||
drop table t1;
|
|
@ -1090,41 +1090,15 @@ drop table t1;
|
|||
create table t1 (a int) engine myisam
|
||||
partition by range (a)
|
||||
subpartition by hash (a)
|
||||
(partition p0 VALUES LESS THAN (1) DATA DIRECTORY = 'hello/master-data/tmpdata' INDEX DIRECTORY = 'hello/master-data/tmpinx'
|
||||
(partition p0 VALUES LESS THAN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpdata' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpinx'
|
||||
(SUBPARTITION subpart00, SUBPARTITION subpart01));
|
||||
hello/master-data/test/t1.frm
|
||||
hello/master-data/test/t1.par
|
||||
hello/master-data/test/t1#P#p0#SP#subpart00.MYD
|
||||
hello/master-data/test/t1#P#p0#SP#subpart00.MYI
|
||||
hello/master-data/test/t1#P#p0#SP#subpart01.MYD
|
||||
hello/master-data/test/t1#P#p0#SP#subpart01.MYI
|
||||
hello/master-data/tmpdata/t1#P#p0#SP#subpart00.MYD
|
||||
hello/master-data/tmpdata/t1#P#p0#SP#subpart01.MYD
|
||||
hello/master-data/tmpinx/t1#P#p0#SP#subpart00.MYI
|
||||
hello/master-data/tmpinx/t1#P#p0#SP#subpart01.MYI
|
||||
Checking if file exists before alter
|
||||
ALTER TABLE t1 REORGANIZE PARTITION p0 INTO
|
||||
(partition p1 VALUES LESS THAN (1) DATA DIRECTORY = 'hello/master-data/tmpdata' INDEX DIRECTORY = 'hello/master-data/tmpinx'
|
||||
(partition p1 VALUES LESS THAN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpdata' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpinx'
|
||||
(SUBPARTITION subpart10, SUBPARTITION subpart11),
|
||||
partition p2 VALUES LESS THAN (2) DATA DIRECTORY = 'hello/master-data/tmpdata' INDEX DIRECTORY = 'hello/master-data/tmpinx'
|
||||
partition p2 VALUES LESS THAN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpdata' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpinx'
|
||||
(SUBPARTITION subpart20, SUBPARTITION subpart21));
|
||||
hello/master-data/test/t1.frm
|
||||
hello/master-data/test/t1.par
|
||||
hello/master-data/test/t1#P#p1#SP#subpart10.MYD
|
||||
hello/master-data/test/t1#P#p1#SP#subpart10.MYI
|
||||
hello/master-data/test/t1#P#p1#SP#subpart11.MYD
|
||||
hello/master-data/test/t1#P#p1#SP#subpart11.MYI
|
||||
hello/master-data/test/t1#P#p2#SP#subpart20.MYD
|
||||
hello/master-data/test/t1#P#p2#SP#subpart20.MYI
|
||||
hello/master-data/test/t1#P#p2#SP#subpart21.MYD
|
||||
hello/master-data/test/t1#P#p2#SP#subpart21.MYI
|
||||
hello/master-data/tmpdata/t1#P#p1#SP#subpart10.MYD
|
||||
hello/master-data/tmpdata/t1#P#p1#SP#subpart11.MYD
|
||||
hello/master-data/tmpdata/t1#P#p2#SP#subpart20.MYD
|
||||
hello/master-data/tmpdata/t1#P#p2#SP#subpart21.MYD
|
||||
hello/master-data/tmpinx/t1#P#p1#SP#subpart10.MYI
|
||||
hello/master-data/tmpinx/t1#P#p1#SP#subpart11.MYI
|
||||
hello/master-data/tmpinx/t1#P#p2#SP#subpart20.MYI
|
||||
hello/master-data/tmpinx/t1#P#p2#SP#subpart21.MYI
|
||||
Checking if file exists after alter
|
||||
drop table t1;
|
||||
create table t1 (a bigint unsigned not null, primary key(a))
|
||||
engine = myisam
|
||||
|
|
|
@ -1478,6 +1478,23 @@ i
|
|||
DEALLOCATE PREPARE stmt;
|
||||
DROP TABLE t1, t2;
|
||||
DROP PROCEDURE IF EXISTS p1;
|
||||
flush status;
|
||||
prepare sq from 'show status like "slow_queries"';
|
||||
execute sq;
|
||||
Variable_name Value
|
||||
Slow_queries 0
|
||||
prepare no_index from 'select 1 from information_schema.tables limit 1';
|
||||
execute sq;
|
||||
Variable_name Value
|
||||
Slow_queries 0
|
||||
execute no_index;
|
||||
1
|
||||
1
|
||||
execute sq;
|
||||
Variable_name Value
|
||||
Slow_queries 1
|
||||
deallocate prepare no_index;
|
||||
deallocate prepare sq;
|
||||
End of 5.0 tests.
|
||||
create procedure proc_1() reset query cache;
|
||||
call proc_1();
|
||||
|
@ -1619,54 +1636,62 @@ flush tables;
|
|||
show open tables from mysql;
|
||||
Database Table In_use Name_locked
|
||||
mysql general_log 1 0
|
||||
mysql slow_log 1 0
|
||||
select Host, User from mysql.user limit 0;
|
||||
Host User
|
||||
select Host, Db from mysql.host limit 0;
|
||||
Host Db
|
||||
show open tables from mysql;
|
||||
Database Table In_use Name_locked
|
||||
mysql user 0 0
|
||||
mysql general_log 1 0
|
||||
mysql slow_log 1 0
|
||||
mysql host 0 0
|
||||
mysql user 0 0
|
||||
call proc_1();
|
||||
show open tables from mysql;
|
||||
Database Table In_use Name_locked
|
||||
mysql general_log 1 0
|
||||
mysql slow_log 1 0
|
||||
select Host, User from mysql.user limit 0;
|
||||
Host User
|
||||
select Host, Db from mysql.host limit 0;
|
||||
Host Db
|
||||
show open tables from mysql;
|
||||
Database Table In_use Name_locked
|
||||
mysql user 0 0
|
||||
mysql general_log 1 0
|
||||
mysql slow_log 1 0
|
||||
mysql host 0 0
|
||||
mysql user 0 0
|
||||
call proc_1();
|
||||
show open tables from mysql;
|
||||
Database Table In_use Name_locked
|
||||
mysql general_log 1 0
|
||||
mysql slow_log 1 0
|
||||
select Host, User from mysql.user limit 0;
|
||||
Host User
|
||||
select Host, Db from mysql.host limit 0;
|
||||
Host Db
|
||||
show open tables from mysql;
|
||||
Database Table In_use Name_locked
|
||||
mysql user 0 0
|
||||
mysql general_log 1 0
|
||||
mysql slow_log 1 0
|
||||
mysql host 0 0
|
||||
mysql user 0 0
|
||||
call proc_1();
|
||||
show open tables from mysql;
|
||||
Database Table In_use Name_locked
|
||||
mysql general_log 1 0
|
||||
mysql slow_log 1 0
|
||||
select Host, User from mysql.user limit 0;
|
||||
Host User
|
||||
select Host, Db from mysql.host limit 0;
|
||||
Host Db
|
||||
show open tables from mysql;
|
||||
Database Table In_use Name_locked
|
||||
mysql user 0 0
|
||||
mysql general_log 1 0
|
||||
mysql slow_log 1 0
|
||||
mysql host 0 0
|
||||
mysql user 0 0
|
||||
flush tables;
|
||||
create function func_1() returns int begin flush tables; return 1; end|
|
||||
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
||||
|
@ -1682,49 +1707,56 @@ select Host, Db from mysql.host limit 0;
|
|||
Host Db
|
||||
show open tables from mysql;
|
||||
Database Table In_use Name_locked
|
||||
mysql user 0 0
|
||||
mysql general_log 1 0
|
||||
mysql slow_log 1 0
|
||||
mysql host 0 0
|
||||
mysql user 0 0
|
||||
prepare abc from "flush tables";
|
||||
execute abc;
|
||||
show open tables from mysql;
|
||||
Database Table In_use Name_locked
|
||||
mysql general_log 1 0
|
||||
mysql slow_log 1 0
|
||||
select Host, User from mysql.user limit 0;
|
||||
Host User
|
||||
select Host, Db from mysql.host limit 0;
|
||||
Host Db
|
||||
show open tables from mysql;
|
||||
Database Table In_use Name_locked
|
||||
mysql user 0 0
|
||||
mysql general_log 1 0
|
||||
mysql slow_log 1 0
|
||||
mysql host 0 0
|
||||
mysql user 0 0
|
||||
execute abc;
|
||||
show open tables from mysql;
|
||||
Database Table In_use Name_locked
|
||||
mysql general_log 1 0
|
||||
mysql slow_log 1 0
|
||||
select Host, User from mysql.user limit 0;
|
||||
Host User
|
||||
select Host, Db from mysql.host limit 0;
|
||||
Host Db
|
||||
show open tables from mysql;
|
||||
Database Table In_use Name_locked
|
||||
mysql user 0 0
|
||||
mysql general_log 1 0
|
||||
mysql slow_log 1 0
|
||||
mysql host 0 0
|
||||
mysql user 0 0
|
||||
execute abc;
|
||||
show open tables from mysql;
|
||||
Database Table In_use Name_locked
|
||||
mysql general_log 1 0
|
||||
mysql slow_log 1 0
|
||||
select Host, User from mysql.user limit 0;
|
||||
Host User
|
||||
select Host, Db from mysql.host limit 0;
|
||||
Host Db
|
||||
show open tables from mysql;
|
||||
Database Table In_use Name_locked
|
||||
mysql user 0 0
|
||||
mysql general_log 1 0
|
||||
mysql slow_log 1 0
|
||||
mysql host 0 0
|
||||
mysql user 0 0
|
||||
flush tables;
|
||||
deallocate prepare abc;
|
||||
create procedure proc_1() flush logs;
|
||||
|
|
|
@ -130,3 +130,36 @@ prepare st_18492 from 'select * from t1 where 3 in (select (1+1) union select 1)
|
|||
execute st_18492;
|
||||
a
|
||||
drop table t1;
|
||||
create table t1 (a int, b varchar(4));
|
||||
create table t2 (a int, b varchar(4), primary key(a));
|
||||
prepare stmt1 from 'insert into t1 (a, b) values (?, ?)';
|
||||
prepare stmt2 from 'insert into t2 (a, b) values (?, ?)';
|
||||
set @intarg= 11;
|
||||
set @varchararg= '2222';
|
||||
execute stmt1 using @intarg, @varchararg;
|
||||
execute stmt2 using @intarg, @varchararg;
|
||||
set @intarg= 12;
|
||||
execute stmt1 using @intarg, @UNDEFINED;
|
||||
execute stmt2 using @intarg, @UNDEFINED;
|
||||
set @intarg= 13;
|
||||
execute stmt1 using @UNDEFINED, @varchararg;
|
||||
execute stmt2 using @UNDEFINED, @varchararg;
|
||||
ERROR 23000: Column 'a' cannot be null
|
||||
set @intarg= 14;
|
||||
set @nullarg= Null;
|
||||
execute stmt1 using @UNDEFINED, @nullarg;
|
||||
execute stmt2 using @nullarg, @varchararg;
|
||||
ERROR 23000: Column 'a' cannot be null
|
||||
select * from t1;
|
||||
a b
|
||||
11 2222
|
||||
12 NULL
|
||||
NULL 2222
|
||||
NULL NULL
|
||||
select * from t2;
|
||||
a b
|
||||
11 2222
|
||||
12 NULL
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
End of 5.0 tests.
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -326,7 +326,7 @@ insert into t1 values(3);
|
|||
set i_var = sleep(3);
|
||||
return 0;
|
||||
end;|
|
||||
select f1();
|
||||
select f1();
|
||||
select sleep(4);
|
||||
sleep(4)
|
||||
0
|
||||
|
|
|
@ -665,6 +665,16 @@ OR ((pk4 =1) AND (((pk1 IN ( 7, 2, 1 ))) OR (pk1 =522)) AND ((pk2 IN ( 0, 2635))
|
|||
pk1 pk2 pk3 pk4 filler
|
||||
2621 2635 1000015 0 filler
|
||||
drop table t1, t2;
|
||||
create table t1(a char(2), key(a(1)));
|
||||
insert into t1 values ('x'), ('xx');
|
||||
explain select a from t1 where a > 'x';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range a a 2 NULL 2 Using where
|
||||
select a from t1 where a > 'x';
|
||||
a
|
||||
xx
|
||||
drop table t1;
|
||||
End of 4.1 tests
|
||||
CREATE TABLE t1 (
|
||||
id int(11) NOT NULL auto_increment,
|
||||
status varchar(20),
|
||||
|
|
|
@ -43,7 +43,7 @@ Note 1051 Unknown table 't4'
|
|||
CREATE TABLE t1 (a int);
|
||||
CREATE TABLE t3 (a int);
|
||||
FLUSH TABLES WITH READ LOCK;
|
||||
RENAME TABLE t1 TO t2, t3 to t4;
|
||||
RENAME TABLE t1 TO t2, t3 to t4;
|
||||
show tables;
|
||||
Tables_in_test
|
||||
t1
|
||||
|
|
|
@ -26,7 +26,7 @@ create table t2 (a int primary key);
|
|||
insert into t2 values(1);
|
||||
create table t3 (id int);
|
||||
insert into t3 values(connection_id());
|
||||
update t2 set a = a + 1 + get_lock('crash_lock%20C', 10);
|
||||
update t2 set a = a + 1 + get_lock('crash_lock%20C', 10);
|
||||
select (@id := id) - id from t3;
|
||||
(@id := id) - id
|
||||
0
|
||||
|
|
|
@ -12,7 +12,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Warnings:
|
||||
Note 1003 select master_pos_wait(_latin1'master-bin.999999',0,2) AS `master_pos_wait('master-bin.999999',0,2)`
|
||||
select master_pos_wait('master-bin.999999',0);
|
||||
select master_pos_wait('master-bin.999999',0);
|
||||
stop slave sql_thread;
|
||||
master_pos_wait('master-bin.999999',0)
|
||||
NULL
|
||||
|
|
|
@ -21,7 +21,7 @@ END|
|
|||
SELECT get_lock("test", 200);
|
||||
get_lock("test", 200)
|
||||
1
|
||||
CALL test.p1();
|
||||
CALL test.p1();
|
||||
CALL test.p2();
|
||||
SELECT release_lock("test");
|
||||
release_lock("test")
|
||||
|
|
|
@ -21,7 +21,7 @@ END|
|
|||
SELECT get_lock("test", 200);
|
||||
get_lock("test", 200)
|
||||
1
|
||||
CALL test.p1();
|
||||
CALL test.p1();
|
||||
CALL test.p2();
|
||||
SELECT release_lock("test");
|
||||
release_lock("test")
|
||||
|
|
|
@ -44,7 +44,7 @@ create table t2(id int);
|
|||
insert into t2 values(connection_id());
|
||||
create temporary table t3(n int);
|
||||
insert into t3 select get_lock('crash_lock%20C', 1) from t2;
|
||||
update t1 set n = n + get_lock('crash_lock%20C', 2);
|
||||
update t1 set n = n + get_lock('crash_lock%20C', 2);
|
||||
select (@id := id) - id from t2;
|
||||
(@id := id) - id
|
||||
0
|
||||
|
|
|
@ -74,8 +74,6 @@ get_lock("bug12480",2)
|
|||
1
|
||||
create table t1 (a datetime,b datetime, c datetime);
|
||||
drop function if exists bug12480;
|
||||
Warnings:
|
||||
Note 1305 FUNCTION bug12480 does not exist
|
||||
create function bug12480() returns datetime
|
||||
begin
|
||||
set @a=get_lock("bug12480",2);
|
||||
|
|
|
@ -148,12 +148,14 @@ flush tables;
|
|||
show open tables;
|
||||
Database Table In_use Name_locked
|
||||
mysql general_log 1 0
|
||||
mysql slow_log 1 0
|
||||
create table t1(n int);
|
||||
insert into t1 values (1);
|
||||
show open tables;
|
||||
Database Table In_use Name_locked
|
||||
test t1 0 0
|
||||
mysql general_log 1 0
|
||||
mysql slow_log 1 0
|
||||
test t1 0 0
|
||||
drop table t1;
|
||||
create table t1 (a int not null, b VARCHAR(10), INDEX (b) ) AVG_ROW_LENGTH=10 CHECKSUM=1 COMMENT="test" ENGINE=MYISAM MIN_ROWS=10 MAX_ROWS=100 PACK_KEYS=1 DELAY_KEY_WRITE=1 ROW_FORMAT=fixed;
|
||||
show create table t1;
|
||||
|
@ -566,21 +568,23 @@ SELECT 1 FROM mysql.db, mysql.proc, mysql.user, mysql.time_zone, mysql.time_zone
|
|||
1
|
||||
SHOW OPEN TABLES;
|
||||
Database Table In_use Name_locked
|
||||
mysql db 0 0
|
||||
mysql proc 0 0
|
||||
test urkunde 0 0
|
||||
mysql time_zone 0 0
|
||||
mysql general_log 1 0
|
||||
mysql db 0 0
|
||||
test txt1 0 0
|
||||
mysql proc 0 0
|
||||
mysql slow_log 1 0
|
||||
test tyt2 0 0
|
||||
mysql general_log 1 0
|
||||
mysql user 0 0
|
||||
mysql time_zone_name 0 0
|
||||
SHOW OPEN TABLES FROM mysql;
|
||||
Database Table In_use Name_locked
|
||||
mysql db 0 0
|
||||
mysql time_zone 0 0
|
||||
mysql general_log 1 0
|
||||
mysql proc 0 0
|
||||
mysql time_zone 0 0
|
||||
mysql db 0 0
|
||||
mysql slow_log 1 0
|
||||
mysql general_log 1 0
|
||||
mysql user 0 0
|
||||
mysql time_zone_name 0 0
|
||||
SHOW OPEN TABLES FROM mysql LIKE 'u%';
|
||||
|
@ -594,14 +598,16 @@ test tyt2 0 0
|
|||
mysql time_zone_name 0 0
|
||||
SHOW OPEN TABLES LIKE '%o%';
|
||||
Database Table In_use Name_locked
|
||||
mysql time_zone 0 0
|
||||
mysql general_log 1 0
|
||||
mysql proc 0 0
|
||||
mysql time_zone 0 0
|
||||
mysql slow_log 1 0
|
||||
mysql general_log 1 0
|
||||
mysql time_zone_name 0 0
|
||||
FLUSH TABLES;
|
||||
SHOW OPEN TABLES;
|
||||
Database Table In_use Name_locked
|
||||
mysql general_log 1 0
|
||||
mysql slow_log 1 0
|
||||
DROP TABLE txt1;
|
||||
DROP TABLE tyt2;
|
||||
DROP TABLE urkunde;
|
||||
|
@ -672,6 +678,21 @@ SHOW TABLES FROM no_such_database;
|
|||
ERROR 42000: Unknown database 'no_such_database'
|
||||
SHOW COLUMNS FROM no_such_table;
|
||||
ERROR 42S02: Table 'test.no_such_table' doesn't exist
|
||||
flush status;
|
||||
show status like 'slow_queries';
|
||||
Variable_name Value
|
||||
Slow_queries 0
|
||||
show tables;
|
||||
Tables_in_test
|
||||
show status like 'slow_queries';
|
||||
Variable_name Value
|
||||
Slow_queries 1
|
||||
select 1 from information_schema.tables limit 1;
|
||||
1
|
||||
1
|
||||
show status like 'slow_queries';
|
||||
Variable_name Value
|
||||
Slow_queries 2
|
||||
End of 5.0 tests.
|
||||
SHOW AUTHORS;
|
||||
create database mysqltest;
|
||||
|
|
|
@ -31,7 +31,7 @@ create procedure bug9486()
|
|||
update t1, t2 set val= 1 where id1=id2;
|
||||
call bug9486();
|
||||
lock tables t2 write;
|
||||
call bug9486();
|
||||
call bug9486();
|
||||
show processlist;
|
||||
Id User Host db Command Time State Info
|
||||
# root localhost test Sleep # NULL
|
||||
|
@ -77,7 +77,7 @@ select * from t1;
|
|||
end|
|
||||
use test;
|
||||
lock table t1 write;
|
||||
call p2();
|
||||
call p2();
|
||||
use test;
|
||||
drop procedure p1;
|
||||
create procedure p1() select * from t1;
|
||||
|
|
|
@ -74,8 +74,7 @@ flush status|
|
|||
flush query cache|
|
||||
delete from t1|
|
||||
drop procedure bug3583|
|
||||
drop table t1;
|
||||
#|
|
||||
drop table t1|
|
||||
drop procedure if exists bug6807|
|
||||
create procedure bug6807()
|
||||
begin
|
||||
|
|
2159
mysql-test/r/ssl_des.result
Normal file
2159
mysql-test/r/ssl_des.result
Normal file
File diff suppressed because it is too large
Load diff
|
@ -2717,8 +2717,7 @@ select (1,2,3) = (select * from t1);
|
|||
ERROR 21000: Operand should contain 3 column(s)
|
||||
select (select * from t1) = (1,2,3);
|
||||
ERROR 21000: Operand should contain 2 column(s)
|
||||
drop table t1
|
||||
#;
|
||||
drop table t1;
|
||||
CREATE TABLE `t1` (
|
||||
`itemid` bigint(20) unsigned NOT NULL auto_increment,
|
||||
`sessionid` bigint(20) unsigned default NULL,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
drop table if exists t1;
|
||||
CREATE TABLE t1 (x1 int);
|
||||
ALTER TABLE t1 CHANGE x1 x2 int;
|
||||
ALTER TABLE t1 CHANGE x1 x2 int;
|
||||
CREATE TABLE t2 LIKE t1;
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
|
@ -8,7 +8,7 @@ t2 CREATE TABLE `t2` (
|
|||
`xx` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t2;
|
||||
ALTER TABLE t1 CHANGE x2 x1 int;
|
||||
ALTER TABLE t1 CHANGE x2 x1 int;
|
||||
CREATE TABLE t2 LIKE t1;
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
|
@ -16,7 +16,7 @@ t2 CREATE TABLE `t2` (
|
|||
`xx` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t2;
|
||||
ALTER TABLE t1 CHANGE x1 x2 int;
|
||||
ALTER TABLE t1 CHANGE x1 x2 int;
|
||||
CREATE TABLE t2 LIKE t1;
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
|
@ -24,7 +24,7 @@ t2 CREATE TABLE `t2` (
|
|||
`xx` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t2;
|
||||
ALTER TABLE t1 CHANGE x2 x1 int;
|
||||
ALTER TABLE t1 CHANGE x2 x1 int;
|
||||
CREATE TABLE t2 LIKE t1;
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
|
@ -32,7 +32,7 @@ t2 CREATE TABLE `t2` (
|
|||
`xx` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t2;
|
||||
ALTER TABLE t1 CHANGE x1 x2 int;
|
||||
ALTER TABLE t1 CHANGE x1 x2 int;
|
||||
CREATE TABLE t2 LIKE t1;
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
|
@ -40,7 +40,7 @@ t2 CREATE TABLE `t2` (
|
|||
`xx` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t2;
|
||||
ALTER TABLE t1 CHANGE x2 x1 int;
|
||||
ALTER TABLE t1 CHANGE x2 x1 int;
|
||||
CREATE TABLE t2 LIKE t1;
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
|
@ -48,7 +48,7 @@ t2 CREATE TABLE `t2` (
|
|||
`xx` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t2;
|
||||
ALTER TABLE t1 CHANGE x1 x2 int;
|
||||
ALTER TABLE t1 CHANGE x1 x2 int;
|
||||
CREATE TABLE t2 LIKE t1;
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
|
@ -56,7 +56,7 @@ t2 CREATE TABLE `t2` (
|
|||
`xx` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t2;
|
||||
ALTER TABLE t1 CHANGE x2 x1 int;
|
||||
ALTER TABLE t1 CHANGE x2 x1 int;
|
||||
CREATE TABLE t2 LIKE t1;
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
|
@ -64,7 +64,7 @@ t2 CREATE TABLE `t2` (
|
|||
`xx` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t2;
|
||||
ALTER TABLE t1 CHANGE x1 x2 int;
|
||||
ALTER TABLE t1 CHANGE x1 x2 int;
|
||||
CREATE TABLE t2 LIKE t1;
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
|
@ -72,7 +72,7 @@ t2 CREATE TABLE `t2` (
|
|||
`xx` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t2;
|
||||
ALTER TABLE t1 CHANGE x2 x1 int;
|
||||
ALTER TABLE t1 CHANGE x2 x1 int;
|
||||
CREATE TABLE t2 LIKE t1;
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
|
@ -80,7 +80,7 @@ t2 CREATE TABLE `t2` (
|
|||
`xx` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t2;
|
||||
ALTER TABLE t1 CHANGE x1 x2 int;
|
||||
ALTER TABLE t1 CHANGE x1 x2 int;
|
||||
CREATE TABLE t2 LIKE t1;
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
|
@ -88,7 +88,7 @@ t2 CREATE TABLE `t2` (
|
|||
`xx` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t2;
|
||||
ALTER TABLE t1 CHANGE x2 x1 int;
|
||||
ALTER TABLE t1 CHANGE x2 x1 int;
|
||||
CREATE TABLE t2 LIKE t1;
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
|
@ -96,7 +96,7 @@ t2 CREATE TABLE `t2` (
|
|||
`xx` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t2;
|
||||
ALTER TABLE t1 CHANGE x1 x2 int;
|
||||
ALTER TABLE t1 CHANGE x1 x2 int;
|
||||
CREATE TABLE t2 LIKE t1;
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
|
@ -104,7 +104,7 @@ t2 CREATE TABLE `t2` (
|
|||
`xx` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t2;
|
||||
ALTER TABLE t1 CHANGE x2 x1 int;
|
||||
ALTER TABLE t1 CHANGE x2 x1 int;
|
||||
CREATE TABLE t2 LIKE t1;
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
|
@ -112,7 +112,7 @@ t2 CREATE TABLE `t2` (
|
|||
`xx` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t2;
|
||||
ALTER TABLE t1 CHANGE x1 x2 int;
|
||||
ALTER TABLE t1 CHANGE x1 x2 int;
|
||||
CREATE TABLE t2 LIKE t1;
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
|
@ -120,7 +120,7 @@ t2 CREATE TABLE `t2` (
|
|||
`xx` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t2;
|
||||
ALTER TABLE t1 CHANGE x2 x1 int;
|
||||
ALTER TABLE t1 CHANGE x2 x1 int;
|
||||
CREATE TABLE t2 LIKE t1;
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
|
@ -128,7 +128,7 @@ t2 CREATE TABLE `t2` (
|
|||
`xx` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t2;
|
||||
ALTER TABLE t1 CHANGE x1 x2 int;
|
||||
ALTER TABLE t1 CHANGE x1 x2 int;
|
||||
CREATE TABLE t2 LIKE t1;
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
|
@ -136,7 +136,7 @@ t2 CREATE TABLE `t2` (
|
|||
`xx` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t2;
|
||||
ALTER TABLE t1 CHANGE x2 x1 int;
|
||||
ALTER TABLE t1 CHANGE x2 x1 int;
|
||||
CREATE TABLE t2 LIKE t1;
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
|
@ -144,7 +144,7 @@ t2 CREATE TABLE `t2` (
|
|||
`xx` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t2;
|
||||
ALTER TABLE t1 CHANGE x1 x2 int;
|
||||
ALTER TABLE t1 CHANGE x1 x2 int;
|
||||
CREATE TABLE t2 LIKE t1;
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
|
@ -152,7 +152,7 @@ t2 CREATE TABLE `t2` (
|
|||
`xx` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t2;
|
||||
ALTER TABLE t1 CHANGE x2 x1 int;
|
||||
ALTER TABLE t1 CHANGE x2 x1 int;
|
||||
CREATE TABLE t2 LIKE t1;
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
|
|
|
@ -978,8 +978,6 @@ t1 CREATE TABLE `t1` (
|
|||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
drop procedure if exists wg2;
|
||||
Warnings:
|
||||
Note 1305 PROCEDURE wg2 does not exist
|
||||
create procedure wg2()
|
||||
begin
|
||||
declare v int default 1;
|
||||
|
|
|
@ -215,6 +215,7 @@ select @@version;
|
|||
select @@global.version;
|
||||
@@global.version
|
||||
#
|
||||
End of 4.1 tests
|
||||
set @first_var= NULL;
|
||||
create table t1 select @first_var;
|
||||
show create table t1;
|
||||
|
@ -301,3 +302,11 @@ select @var;
|
|||
@var
|
||||
3
|
||||
drop table t1;
|
||||
insert into city 'blah';
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''blah'' at line 1
|
||||
SHOW COUNT(*) WARNINGS;
|
||||
@@session.warning_count
|
||||
1
|
||||
SHOW COUNT(*) ERRORS;
|
||||
@@session.error_count
|
||||
1
|
||||
|
|
|
@ -1980,7 +1980,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI
|
|||
drop view v1;
|
||||
drop table t1;
|
||||
set sql_mode='strict_all_tables';
|
||||
CREATE TABLE t1 (col1 INT NOT NULL, col2 INT NOT NULL) ENGINE = INNODB;
|
||||
CREATE TABLE t1 (col1 INT NOT NULL, col2 INT NOT NULL);
|
||||
CREATE VIEW v1 (vcol1) AS SELECT col1 FROM t1;
|
||||
CREATE VIEW v2 (vcol1) AS SELECT col1 FROM t1 WHERE col2 > 2;
|
||||
INSERT INTO t1 (col1) VALUES(12);
|
||||
|
@ -2032,7 +2032,7 @@ f3 f1
|
|||
1 3
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (f1 char) ENGINE = innodb;
|
||||
CREATE TABLE t1 (f1 char);
|
||||
INSERT INTO t1 VALUES ('A');
|
||||
CREATE VIEW v1 AS SELECT * FROM t1;
|
||||
INSERT INTO t1 VALUES('B');
|
||||
|
|
16
mysql-test/std_data/server-cert-des.pem
Normal file
16
mysql-test/std_data/server-cert-des.pem
Normal file
|
@ -0,0 +1,16 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIICljCCAX4CAQEwDQYJKoZIhvcNAQEEBQAwUTELMAkGA1UEBhMCU0UxEDAOBgNV
|
||||
BAgTB1VwcHNhbGExETAPBgNVBAoTCE15U1FMIEFCMRAwDgYDVQQLEwdTdXBwb3J0
|
||||
MQswCQYDVQQDEwJDQTAeFw0wNjA4MjgxMTA4NTlaFw0wOTA1MjQxMTA4NTlaMFUx
|
||||
CzAJBgNVBAYTAlNFMRAwDgYDVQQIEwdVcHBzYWxhMREwDwYDVQQKEwhNeVNRTCBB
|
||||
QjEQMA4GA1UECxMHU3VwcG9ydDEPMA0GA1UEAxMGc2VydmVyMIGfMA0GCSqGSIb3
|
||||
DQEBAQUAA4GNADCBiQKBgQDEiOVZcWYzZe7I8xhhUwCzvmkZifAXeMTH+8XKGLHX
|
||||
NWF3FLduAmeAad9oOZgBKb+oWTdRDWXqwu6nYYUBfrUpaY27/wLkgWRgewL3LZnw
|
||||
W2FjhNsjx3gI2NK+Pix47q9d+a+5T4AW5+lK499l0K0k2cvyFdIerhDW8R0t8Uru
|
||||
twIDAQABMA0GCSqGSIb3DQEBBAUAA4IBAQC2LQcqLg52RbelWrKutlJ5E6rzugnJ
|
||||
ZAlbN9sM98O2xFiIGDA3tb5j9LAEjE0E+RqdptEYnvy9b3szhLYXtIILZTkClf9r
|
||||
Uwu1nUYPTyp+9ZYCa4fovOU5h1Ogv+9UZPds/LPDwWEn8K+lvscB4X57wJyuoEck
|
||||
1Mu41OA6h77181MydSdgZo0oquJDWhdCsYHXVFVs0F6naMm2uPMCTDiQVlhHJuTO
|
||||
VQMNIwxRFtvsv2tpsXsaP/8sT32d5CFebfxxSVnqQvJ4ZdIrphl6L43XU01rsEcE
|
||||
K8KYujZQ6SKws+HVcGqsr7TPgJfJE6D+5RazvvIQISPvx4eduebqzqdC
|
||||
-----END CERTIFICATE-----
|
18
mysql-test/std_data/server-key-des.pem
Normal file
18
mysql-test/std_data/server-key-des.pem
Normal file
|
@ -0,0 +1,18 @@
|
|||
-----BEGIN RSA PRIVATE KEY-----
|
||||
Proc-Type: 4,ENCRYPTED
|
||||
DEK-Info: DES-EDE3-CBC,D2BE7598C7E3BDA5
|
||||
|
||||
1W3qPgw5ut80OhaAGVZZe/tfFiBAlwpX1SohdApWj+QYP+dK/mdEBhgI3BXTFNLW
|
||||
pJqDTzGlKtft7hHN6QDFEdZMKxej5+2iLu14V62o+5yQgUoqswoXcmmqJCJ7AvyJ
|
||||
yMBmGAzxRFlQsT8lf6o5TS1/efBvjvWhh3NG2Zq2LpyhWRRqA3kNhzktzt2WjDZe
|
||||
ZkKmZJJnArr/Aw7jEBC4sH+nmgxoR18GzDddRG12hv1AWyHc3+VisTBpyNzeBy17
|
||||
rxuQtqLzkAJmId723ddw83RVNSvBUUS3G0rx5O3HPobvZK89UqVxcXtIgc11WTVU
|
||||
N3DbcJq5it43Loo0W3gAngtESDm2E3rTadrmdUSDGv2wQ5dNFl6cQ1f397Sdd/WC
|
||||
A0grn1tKjJ6COp80Ymdyvn+stjv/+Rl1/KHSeG0lNeZxqjPPOJ7NHaKv7qjYsJ6W
|
||||
LT35/Xc3oCo5qk9FOlq/0tGjHxf6RcFr5U7k5ILKZs+RmvJ4Sv/VYShLfLTcfGbJ
|
||||
wBNfRKvcHZBQJQBb1+s/kRrjFFtvhrUwLz4+c9kskp+t4qRVYywUAnGGGsMs/GPm
|
||||
wYsLQZO6Bs5/taaVUyaJQW015J7FGGv+/7/A1dIhu73S/Xl/YcFbX/CMEVq2Lxxd
|
||||
hZdFIuaZ7LE+0MDQWsvYMYPDPLDH11diczb/jeKBdLPOzk/FUqVx3Fin1PpcaBxY
|
||||
b+7oZJhYdg/rAWDeQ/nji9qnEG8waK6x1hdkYPOrqqWQPfgM/LPsSrgWeuTSdx2B
|
||||
Ixi01UlBb5UP4K7UrjyddPobmcVjXaQLNe7zaq0+OS3UnIG85GtHrQ==
|
||||
-----END RSA PRIVATE KEY-----
|
|
@ -59,6 +59,7 @@ flush privileges;
|
|||
|
||||
connect (con10,localhost,test,gambling2,);
|
||||
connect (con5,localhost,test,gambling2,mysql);
|
||||
connection con5;
|
||||
set password="";
|
||||
--error 1372
|
||||
set password='gambling3';
|
||||
|
|
|
@ -20,6 +20,9 @@ SET SESSION debug="d,crash_commit_before";
|
|||
--error 2013
|
||||
COMMIT;
|
||||
|
||||
# Turn on reconnect
|
||||
--enable_reconnect
|
||||
|
||||
# Call script that will poll the server waiting for it to be back online again
|
||||
--source include/wait_until_connected_again.inc
|
||||
|
||||
|
|
|
@ -1295,7 +1295,7 @@ SELECT fld3 FROM t2;
|
|||
#
|
||||
|
||||
DROP TABLE t1;
|
||||
ALTER TABLE t2 RENAME t1
|
||||
ALTER TABLE t2 RENAME t1;
|
||||
|
||||
#
|
||||
# Drop and recreate
|
||||
|
|
|
@ -1233,17 +1233,21 @@ drop table if exists t1;
|
|||
# Bug#19960: Inconsistent results when joining
|
||||
# InnoDB tables using partial UTF8 indexes
|
||||
#
|
||||
--disable_warnings
|
||||
CREATE TABLE t1 (
|
||||
colA int(11) NOT NULL,
|
||||
colB varchar(255) character set utf8 NOT NULL,
|
||||
PRIMARY KEY (colA)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
--enable_warnings
|
||||
INSERT INTO t1 (colA, colB) VALUES (1, 'foo'), (2, 'foo bar');
|
||||
--disable_warnings
|
||||
CREATE TABLE t2 (
|
||||
colA int(11) NOT NULL,
|
||||
colB varchar(255) character set utf8 NOT NULL,
|
||||
KEY bad (colA,colB(3))
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
--enable_warnings
|
||||
INSERT INTO t2 (colA, colB) VALUES (1, 'foo'),(2, 'foo bar');
|
||||
SELECT * FROM t1 JOIN t2 ON t1.colA=t2.colA AND t1.colB=t2.colB
|
||||
WHERE t1.colA < 3;
|
||||
|
|
|
@ -9,26 +9,20 @@
|
|||
# Do not use any TAB characters for whitespace.
|
||||
#
|
||||
##############################################################################
|
||||
#events_bugs : BUG#17619 2006-02-21 andrey Race conditions
|
||||
#events_stress : BUG#17619 2006-02-21 andrey Race conditions
|
||||
#events : BUG#17619 2006-02-21 andrey Race conditions
|
||||
#events_scheduling : BUG#19170 2006-04-26 andrey Test case of 19170 fails on some platforms. Has to be checked.
|
||||
user_limits : Bug#23921 random failure of user_limits.test
|
||||
|
||||
im_options : Bug#20294 2006-07-24 stewart Instance manager test im_options fails randomly
|
||||
im_instance_conf : BUG#20294 2006-09-16 ingo Instance manager test im_instance_conf fails randomly
|
||||
concurrent_innodb : BUG#21579 2006-08-11 mleich innodb_concurrent random failures with varying differences
|
||||
ndb_autodiscover : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog
|
||||
ndb_autodiscover2 : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog
|
||||
#ndb_binlog_ignore_db : BUG#21279 2006-07-25 ingo Randomly throws a warning
|
||||
ndb_load : BUG#17233 2006-05-04 tomas failed load data from infile causes mysqld dbug_assert, binlog not flushed
|
||||
partition_03ndb : BUG#16385 2006-03-24 mikael Partitions: crash when updating a range partitioned NDB table
|
||||
ps_7ndb : BUG#18950 2006-02-16 jmiller create table like does not obtain LOCK_open
|
||||
rpl_ndb_2innodb : BUG#19227 2006-04-20 pekka pk delete apparently not replicated
|
||||
rpl_ndb_2myisam : BUG#19227 Seems to pass currently
|
||||
#rpl_ndb_commit_afterflush : BUG#19328 2006-05-04 tomas Slave timeout with COM_REGISTER_SLAVE error causing stop
|
||||
rpl_ndb_dd_partitions : BUG#19259 2006-04-21 rpl_ndb_dd_partitions fails on s/AMD
|
||||
rpl_ndb_ddl : BUG#18946 result file needs update + test needs to checked
|
||||
rpl_ndb_innodb2ndb : Bug #19710 Cluster replication to partition table fails on DELETE FROM statement
|
||||
#rpl_ndb_log : BUG#18947 2006-03-21 tomas CRBR: order in binlog of create table and insert (on different table) not determ
|
||||
rpl_ndb_myisam2ndb : Bug #19710 Cluster replication to partition table fails on DELETE FROM statement
|
||||
rpl_row_blob_innodb : BUG#18980 2006-04-10 kent Test fails randomly
|
||||
rpl_sp : BUG#16456 2006-02-16 jmiller
|
||||
|
@ -36,8 +30,5 @@ rpl_multi_engine : BUG#22583 2006-09-23 lars
|
|||
|
||||
# the below testcase have been reworked to avoid the bug, test contains comment, keep bug open
|
||||
#ndb_binlog_ddl_multi : BUG#18976 2006-04-10 kent CRBR: multiple binlog, second binlog may miss schema log events
|
||||
#rpl_ndb_idempotent : BUG#21298 2006-07-27 msvensson
|
||||
#rpl_row_basic_7ndb : BUG#21298 2006-07-27 msvensson
|
||||
#rpl_truncate_7ndb : BUG#21298 2006-07-27 msvensson
|
||||
ndb_binlog_discover : bug#21806 2006-08-24
|
||||
ndb_autodiscover3 : bug#21806
|
||||
|
|
|
@ -56,7 +56,19 @@ insert into t1 values(NULL), (compress('a'));
|
|||
select uncompress(a), uncompressed_length(a) from t1;
|
||||
drop table t1;
|
||||
|
||||
# End of 4.1 tests
|
||||
#
|
||||
# Bug #23254: problem with compress(NULL)
|
||||
#
|
||||
|
||||
create table t1(a blob);
|
||||
insert into t1 values ('0'), (NULL), ('0');
|
||||
--disable_result_log
|
||||
select compress(a), compress(a) from t1;
|
||||
--enable_result_log
|
||||
select compress(a) is null from t1;
|
||||
drop table t1;
|
||||
|
||||
--echo End of 4.1 tests
|
||||
|
||||
#
|
||||
# Bug #18539: uncompress(d) is null: impossible?
|
||||
|
|
|
@ -64,4 +64,17 @@ insert into t1 values (date_add('2000-01-04', INTERVAL NULL DAY));
|
|||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
# End of 4.1 tests
|
||||
--echo End of 4.1 tests
|
||||
|
||||
#
|
||||
# Bug#21811
|
||||
#
|
||||
# Make sure we end up with an appropriate
|
||||
# date format (DATE) after addition operation
|
||||
#
|
||||
SELECT CAST('2006-09-26' AS DATE) + INTERVAL 1 DAY;
|
||||
SELECT CAST('2006-09-26' AS DATE) + INTERVAL 1 MONTH;
|
||||
SELECT CAST('2006-09-26' AS DATE) + INTERVAL 1 YEAR;
|
||||
SELECT CAST('2006-09-26' AS DATE) + INTERVAL 1 WEEK;
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
|
|
@ -486,6 +486,49 @@ create table t1 select now() - now(), curtime() - curtime(),
|
|||
show create table t1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug #11655: Wrong time is returning from nested selects - maximum time exists
|
||||
#
|
||||
# check if SEC_TO_TIME() handles out-of-range values correctly
|
||||
SELECT SEC_TO_TIME(3300000);
|
||||
SELECT SEC_TO_TIME(3300000)+0;
|
||||
SELECT SEC_TO_TIME(3600 * 4294967296);
|
||||
|
||||
# check if TIME_TO_SEC() handles out-of-range values correctly
|
||||
SELECT TIME_TO_SEC('916:40:00');
|
||||
|
||||
# check if ADDTIME() handles out-of-range values correctly
|
||||
SELECT ADDTIME('500:00:00', '416:40:00');
|
||||
SELECT ADDTIME('916:40:00', '416:40:00');
|
||||
|
||||
# check if SUBTIME() handles out-of-range values correctly
|
||||
SELECT SUBTIME('916:40:00', '416:40:00');
|
||||
SELECT SUBTIME('-916:40:00', '416:40:00');
|
||||
|
||||
# check if MAKETIME() handles out-of-range values correctly
|
||||
SELECT MAKETIME(916,0,0);
|
||||
SELECT MAKETIME(4294967296, 0, 0);
|
||||
SELECT MAKETIME(-4294967296, 0, 0);
|
||||
SELECT MAKETIME(0, 4294967296, 0);
|
||||
SELECT MAKETIME(0, 0, 4294967296);
|
||||
SELECT MAKETIME(CAST(-1 AS UNSIGNED), 0, 0);
|
||||
|
||||
# check if EXTRACT() handles out-of-range values correctly
|
||||
SELECT EXTRACT(HOUR FROM '100000:02:03');
|
||||
|
||||
# check if we get proper warnings if both input string truncation
|
||||
# and out-of-range value occur
|
||||
CREATE TABLE t1(f1 TIME);
|
||||
INSERT INTO t1 VALUES('916:00:00 a');
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug #20927: sec_to_time treats big unsigned as signed
|
||||
#
|
||||
# check if SEC_TO_TIME() handles BIGINT UNSIGNED values correctly
|
||||
SELECT SEC_TO_TIME(CAST(-1 AS UNSIGNED));
|
||||
|
||||
#
|
||||
# 21913: DATE_FORMAT() Crashes mysql server if I use it through
|
||||
# mysql-connector-j driver.
|
||||
|
@ -504,7 +547,6 @@ DROP TABLE testBug8868;
|
|||
|
||||
SET NAMES DEFAULT;
|
||||
|
||||
|
||||
#
|
||||
# Bug #19844 time_format in Union truncates values
|
||||
#
|
||||
|
@ -523,24 +565,6 @@ union
|
|||
union
|
||||
(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 HOUR)),'%k') As H);
|
||||
|
||||
#
|
||||
# 21913: DATE_FORMAT() Crashes mysql server if I use it through
|
||||
# mysql-connector-j driver.
|
||||
#
|
||||
|
||||
SET NAMES latin1;
|
||||
SET character_set_results = NULL;
|
||||
SHOW VARIABLES LIKE 'character_set_results';
|
||||
|
||||
CREATE TABLE testBug8868 (field1 DATE, field2 VARCHAR(32) CHARACTER SET BINARY);
|
||||
INSERT INTO testBug8868 VALUES ('2006-09-04', 'abcd');
|
||||
|
||||
SELECT DATE_FORMAT(field1,'%b-%e %l:%i%p') as fmtddate, field2 FROM testBug8868;
|
||||
|
||||
DROP TABLE testBug8868;
|
||||
|
||||
SET NAMES DEFAULT;
|
||||
|
||||
--echo End of 4.1 tests
|
||||
|
||||
explain extended select timestampdiff(SQL_TSI_WEEK, '2001-02-01', '2001-05-01') as a1,
|
||||
|
|
|
@ -8,6 +8,9 @@
|
|||
|
||||
--source include/im_check_env.inc
|
||||
|
||||
# Turn on reconnect, not on by default anymore
|
||||
--enable_reconnect
|
||||
|
||||
###########################################################################
|
||||
|
||||
# Kill the IM main process and check that the IM Angel will restart the main
|
||||
|
|
|
@ -934,7 +934,46 @@ SELECT MAX(table_name) FROM information_schema.tables;
|
|||
SELECT table_name from information_schema.tables
|
||||
WHERE table_name=(SELECT MAX(table_name)
|
||||
FROM information_schema.tables);
|
||||
#
|
||||
# Bug #23037: Bug in field "Default" of query "SHOW COLUMNS FROM table"
|
||||
#
|
||||
# Note, MyISAM/InnoDB can't take more that 65532 chars, because the row
|
||||
# size is limited to 65535 bytes (BLOBs not counted)
|
||||
#
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS bug23037;
|
||||
DROP FUNCTION IF EXISTS get_value;
|
||||
--enable_warnings
|
||||
--disable_query_log
|
||||
DELIMITER |;
|
||||
CREATE FUNCTION get_value()
|
||||
RETURNS TEXT
|
||||
DETERMINISTIC
|
||||
BEGIN
|
||||
DECLARE col1, col2, col3, col4, col6 CHAR(255);
|
||||
DECLARE default_val VARCHAR(65532);
|
||||
DECLARE done INT DEFAULT 0;
|
||||
DECLARE cur1 CURSOR FOR SHOW COLUMNS FROM bug23037;
|
||||
DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1;
|
||||
OPEN cur1;
|
||||
FETCH cur1 INTO col1, col2, col3, col4, default_val, col6;
|
||||
CLOSE cur1;
|
||||
RETURN default_val;
|
||||
end|
|
||||
DELIMITER ;|
|
||||
|
||||
let $body=`SELECT REPEAT('A', 65532)`;
|
||||
eval CREATE TABLE bug23037(fld1 VARCHAR(65532) CHARACTER SET latin1 DEFAULT "$body");
|
||||
--enable_query_log
|
||||
|
||||
SELECT COLUMN_NAME, MD5(COLUMN_DEFAULT), LENGTH(COLUMN_DEFAULT) FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='bug23037';
|
||||
|
||||
SELECT MD5(get_value());
|
||||
|
||||
SELECT COLUMN_NAME, MD5(COLUMN_DEFAULT), LENGTH(COLUMN_DEFAULT), COLUMN_DEFAULT=get_value() FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='bug23037';
|
||||
|
||||
DROP TABLE bug23037;
|
||||
DROP FUNCTION get_value;
|
||||
--echo End of 5.0 tests.
|
||||
#
|
||||
# Show engines
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#
|
||||
# See mysql-test/std_data/init_file.dat and
|
||||
# mysql-test/t/init_file-master.opt for the actual test
|
||||
#
|
||||
#
|
||||
|
||||
--echo ok
|
||||
--echo end of 4.1 tests
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue