Commit 210a1fe5 authored by joreland@mysql.com's avatar joreland@mysql.com

Merge mysql.com:/home/jonas/src/mysql-5.0

into mysql.com:/home/jonas/src/mysql-5.0-ndb
parents bd1c0ee2 fd5b9f7e
...@@ -1107,3 +1107,6 @@ vio/test-sslclient ...@@ -1107,3 +1107,6 @@ vio/test-sslclient
vio/test-sslserver vio/test-sslserver
vio/viotest-ssl vio/viotest-ssl
VC++Files/client/mysql_amd64.dsp VC++Files/client/mysql_amd64.dsp
client/mysqltestmanager-pwgen
client/mysqltestmanagerc
tools/mysqltestmanager
#! /bin/sh
path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="$pentium_cflags $fast_cflags -g"
extra_configs="$pentium_configs --with-charset=utf8 --with-collation=utf8_general_cs"
. "$path/FINISH.sh"
...@@ -9,6 +9,7 @@ Sinisa@sinisa.nasamreza.org ...@@ -9,6 +9,7 @@ Sinisa@sinisa.nasamreza.org
WAX@sergbook.mysql.com WAX@sergbook.mysql.com
acurtis@ltantony.rdg.cyberkinetica.homeunix.net acurtis@ltantony.rdg.cyberkinetica.homeunix.net
acurtis@pcgem.rdg.cyberkinetica.com acurtis@pcgem.rdg.cyberkinetica.com
acurtis@xiphis.org
administrador@light.hegel.local administrador@light.hegel.local
ahlentz@co3064164-a.rochd1.qld.optusnet.com.au ahlentz@co3064164-a.rochd1.qld.optusnet.com.au
akishkin@work.mysql.com akishkin@work.mysql.com
...@@ -59,6 +60,7 @@ gerberb@ou800.zenez.com ...@@ -59,6 +60,7 @@ gerberb@ou800.zenez.com
gluh@eagle.intranet.mysql.r18.ru gluh@eagle.intranet.mysql.r18.ru
gluh@gluh.(none) gluh@gluh.(none)
gluh@gluh.mysql.r18.ru gluh@gluh.mysql.r18.ru
gluh@mysql.com
gordon@zero.local.lan gordon@zero.local.lan
greg@gcw.ath.cx greg@gcw.ath.cx
greg@mysql.com greg@mysql.com
......
...@@ -27,6 +27,7 @@ then ...@@ -27,6 +27,7 @@ then
fi fi
CHANGESET=`bk -R prs -r+ -h -d':P:::I:' ChangeSet` CHANGESET=`bk -R prs -r+ -h -d':P:::I:' ChangeSet`
CSETKEY=`bk -R prs -r+ -h -d':KEY:' ChangeSet`
BUG=`bk -R prs -r+ -h -d':C:' ChangeSet | sed -ne 's/^.*[Bb][Uu][Gg] *# *\([0-9][0-9]*\).*$/\1/p'` BUG=`bk -R prs -r+ -h -d':C:' ChangeSet | sed -ne 's/^.*[Bb][Uu][Gg] *# *\([0-9][0-9]*\).*$/\1/p'`
WL=`bk -R prs -r+ -h -d':C:' ChangeSet | sed -ne 's/^.*[Ww][Ll] *# *\([0-9][0-9]*\).*$/ WL#\1/p'` WL=`bk -R prs -r+ -h -d':C:' ChangeSet | sed -ne 's/^.*[Ww][Ll] *# *\([0-9][0-9]*\).*$/ WL#\1/p'`
...@@ -52,6 +53,7 @@ List-ID: <bk.mysql-$VERSION> ...@@ -52,6 +53,7 @@ List-ID: <bk.mysql-$VERSION>
From: $FROM From: $FROM
To: $TO To: $TO
Subject: bk commit - $VERSION tree ($CHANGESET)${BS}${WL} Subject: bk commit - $VERSION tree ($CHANGESET)${BS}${WL}
X-CSetKey: <$CSETKEY>
$BH $BH
EOF EOF
bk changes -v -r+ bk changes -v -r+
...@@ -68,6 +70,7 @@ List-ID: <bk.mysql-$VERSION> ...@@ -68,6 +70,7 @@ List-ID: <bk.mysql-$VERSION>
From: $FROM From: $FROM
To: $INTERNALS To: $INTERNALS
Subject: bk commit into $VERSION tree ($CHANGESET)$BS Subject: bk commit into $VERSION tree ($CHANGESET)$BS
X-CSetKey: <$CSETKEY>
$BH $BH
Below is the list of changes that have just been committed into a local Below is the list of changes that have just been committed into a local
$VERSION repository of $USER. When $USER does a push these changes will $VERSION repository of $USER. When $USER does a push these changes will
......
...@@ -147,6 +147,10 @@ SOURCE="..\strings\ctype-bin.c" ...@@ -147,6 +147,10 @@ SOURCE="..\strings\ctype-bin.c"
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE="..\strings\ctype-cp932.c"
# End Source File
# Begin Source File
SOURCE="..\strings\ctype-czech.c" SOURCE="..\strings\ctype-czech.c"
# End Source File # End Source File
# Begin Source File # Begin Source File
...@@ -155,6 +159,10 @@ SOURCE="..\strings\ctype-euc_kr.c" ...@@ -155,6 +159,10 @@ SOURCE="..\strings\ctype-euc_kr.c"
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE="..\strings\ctype-eucjpms.c"
# End Source File
# Begin Source File
SOURCE="..\strings\ctype-extra.c" SOURCE="..\strings\ctype-extra.c"
# End Source File # End Source File
# Begin Source File # Begin Source File
......
...@@ -147,6 +147,10 @@ SOURCE="..\strings\ctype-bin.c" ...@@ -147,6 +147,10 @@ SOURCE="..\strings\ctype-bin.c"
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE="..\strings\ctype-cp932.c"
# End Source File
# Begin Source File
SOURCE="..\strings\ctype-czech.c" SOURCE="..\strings\ctype-czech.c"
# End Source File # End Source File
# Begin Source File # Begin Source File
...@@ -155,6 +159,10 @@ SOURCE="..\strings\ctype-euc_kr.c" ...@@ -155,6 +159,10 @@ SOURCE="..\strings\ctype-euc_kr.c"
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE="..\strings\ctype-eucjpms.c"
# End Source File
# Begin Source File
SOURCE="..\strings\ctype-extra.c" SOURCE="..\strings\ctype-extra.c"
# End Source File # End Source File
# Begin Source File # Begin Source File
......
...@@ -139,6 +139,10 @@ SOURCE="..\strings\ctype-bin.c" ...@@ -139,6 +139,10 @@ SOURCE="..\strings\ctype-bin.c"
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE="..\strings\ctype-cp932.c"
# End Source File
# Begin Source File
SOURCE="..\strings\ctype-czech.c" SOURCE="..\strings\ctype-czech.c"
# End Source File # End Source File
# Begin Source File # Begin Source File
...@@ -147,6 +151,10 @@ SOURCE="..\strings\ctype-euc_kr.c" ...@@ -147,6 +151,10 @@ SOURCE="..\strings\ctype-euc_kr.c"
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE="..\strings\ctype-eucjpms.c"
# End Source File
# Begin Source File
SOURCE="..\strings\ctype-extra.c" SOURCE="..\strings\ctype-extra.c"
# End Source File # End Source File
# Begin Source File # Begin Source File
......
...@@ -138,6 +138,10 @@ SOURCE="..\strings\ctype-bin.c" ...@@ -138,6 +138,10 @@ SOURCE="..\strings\ctype-bin.c"
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE="..\strings\ctype-cp932.c"
# End Source File
# Begin Source File
SOURCE="..\strings\ctype-czech.c" SOURCE="..\strings\ctype-czech.c"
# End Source File # End Source File
# Begin Source File # Begin Source File
...@@ -146,6 +150,10 @@ SOURCE="..\strings\ctype-euc_kr.c" ...@@ -146,6 +150,10 @@ SOURCE="..\strings\ctype-euc_kr.c"
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE="..\strings\ctype-eucjpms.c"
# End Source File
# Begin Source File
SOURCE="..\strings\ctype-extra.c" SOURCE="..\strings\ctype-extra.c"
# End Source File # End Source File
# Begin Source File # Begin Source File
......
...@@ -113,10 +113,18 @@ SOURCE=".\ctype-bin.c" ...@@ -113,10 +113,18 @@ SOURCE=".\ctype-bin.c"
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=".\ctype-cp932.c"
# End Source File
# Begin Source File
SOURCE=".\ctype-czech.c" SOURCE=".\ctype-czech.c"
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=".\ctype-eucjpms.c"
# End Source File
# Begin Source File
SOURCE=".\ctype-euc_kr.c" SOURCE=".\ctype-euc_kr.c"
# End Source File # End Source File
# Begin Source File # Begin Source File
......
...@@ -112,6 +112,10 @@ SOURCE=".\ctype-bin.c" ...@@ -112,6 +112,10 @@ SOURCE=".\ctype-bin.c"
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=".\ctype-cp932.c"
# End Source File
# Begin Source File
SOURCE=".\ctype-czech.c" SOURCE=".\ctype-czech.c"
# End Source File # End Source File
# Begin Source File # Begin Source File
...@@ -120,6 +124,10 @@ SOURCE=".\ctype-euc_kr.c" ...@@ -120,6 +124,10 @@ SOURCE=".\ctype-euc_kr.c"
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=".\ctype-eucjpms.c"
# End Source File
# Begin Source File
SOURCE=".\ctype-extra.c" SOURCE=".\ctype-extra.c"
# End Source File # End Source File
# Begin Source File # Begin Source File
......
...@@ -566,6 +566,7 @@ static void print_result() ...@@ -566,6 +566,7 @@ static void print_result()
my_bool found_error=0; my_bool found_error=0;
res = mysql_use_result(sock); res = mysql_use_result(sock);
prev[0] = '\0'; prev[0] = '\0';
for (i = 0; (row = mysql_fetch_row(res)); i++) for (i = 0; (row = mysql_fetch_row(res)); i++)
{ {
...@@ -595,7 +596,7 @@ static void print_result() ...@@ -595,7 +596,7 @@ static void print_result()
putchar('\n'); putchar('\n');
} }
if (found_error && opt_auto_repair && what_to_do != DO_REPAIR && if (found_error && opt_auto_repair && what_to_do != DO_REPAIR &&
(!opt_fast || strcmp(row[3],"OK"))) !opt_fast)
insert_dynamic(&tables4repair, prev); insert_dynamic(&tables4repair, prev);
mysql_free_result(res); mysql_free_result(res);
} }
......
...@@ -294,6 +294,7 @@ Q_QUERY_VERTICAL, Q_QUERY_HORIZONTAL, ...@@ -294,6 +294,7 @@ Q_QUERY_VERTICAL, Q_QUERY_HORIZONTAL,
Q_START_TIMER, Q_END_TIMER, Q_START_TIMER, Q_END_TIMER,
Q_CHARACTER_SET, Q_DISABLE_PS_PROTOCOL, Q_ENABLE_PS_PROTOCOL, Q_CHARACTER_SET, Q_DISABLE_PS_PROTOCOL, Q_ENABLE_PS_PROTOCOL,
Q_EXIT, Q_EXIT,
Q_DISABLE_RECONNECT, Q_ENABLE_RECONNECT,
Q_UNKNOWN, /* Unknown command. */ Q_UNKNOWN, /* Unknown command. */
Q_COMMENT, /* Comments, ignored. */ Q_COMMENT, /* Comments, ignored. */
...@@ -382,6 +383,8 @@ const char *command_names[]= ...@@ -382,6 +383,8 @@ const char *command_names[]=
"disable_ps_protocol", "disable_ps_protocol",
"enable_ps_protocol", "enable_ps_protocol",
"exit", "exit",
"disable_reconnect",
"enable_reconnect",
0 0
}; };
...@@ -642,6 +645,7 @@ int dyn_string_cmp(DYNAMIC_STRING* ds, const char* fname) ...@@ -642,6 +645,7 @@ int dyn_string_cmp(DYNAMIC_STRING* ds, const char* fname)
{ {
DBUG_PRINT("info",("Size differs: result size: %u file size: %u", DBUG_PRINT("info",("Size differs: result size: %u file size: %u",
ds->length, stat_info.st_size)); ds->length, stat_info.st_size));
DBUG_PRINT("info",("result: '%s'", ds->str));
DBUG_RETURN(2); DBUG_RETURN(2);
} }
if (!(tmp = (char*) my_malloc(stat_info.st_size + 1, MYF(MY_WME)))) if (!(tmp = (char*) my_malloc(stat_info.st_size + 1, MYF(MY_WME))))
...@@ -3620,8 +3624,8 @@ static void init_var_hash(MYSQL *mysql) ...@@ -3620,8 +3624,8 @@ static void init_var_hash(MYSQL *mysql)
if (hash_init(&var_hash, charset_info, if (hash_init(&var_hash, charset_info,
1024, 0, 0, get_var_key, var_free, MYF(0))) 1024, 0, 0, get_var_key, var_free, MYF(0)))
die("Variable hash initialization failed"); die("Variable hash initialization failed");
if (opt_big_test) my_hash_insert(&var_hash, (byte*) var_init(0,"BIG_TEST", 0,
my_hash_insert(&var_hash, (byte*) var_init(0,"BIG_TEST", 0, "1",0)); (opt_big_test) ? "1" : "0", 0));
v= var_init(0,"MAX_TABLES", 0, (sizeof(ulong) == 4) ? "31" : "62",0); v= var_init(0,"MAX_TABLES", 0, (sizeof(ulong) == 4) ? "31" : "62",0);
my_hash_insert(&var_hash, (byte*) v); my_hash_insert(&var_hash, (byte*) v);
v= var_init(0,"SERVER_VERSION", 0, mysql_get_server_info(mysql), 0); v= var_init(0,"SERVER_VERSION", 0, mysql_get_server_info(mysql), 0);
...@@ -3790,6 +3794,12 @@ int main(int argc, char **argv) ...@@ -3790,6 +3794,12 @@ int main(int argc, char **argv)
if (q->query == q->query_buf) if (q->query == q->query_buf)
q->query += q->first_word_len + 1; q->query += q->first_word_len + 1;
display_result_vertically= (q->type==Q_QUERY_VERTICAL); display_result_vertically= (q->type==Q_QUERY_VERTICAL);
if (save_file[0])
{
strmov(q->record_file,save_file);
q->require_file=require_file;
save_file[0]=0;
}
error|= run_query(&cur_con->mysql, q, QUERY_REAP|QUERY_SEND); error|= run_query(&cur_con->mysql, q, QUERY_REAP|QUERY_SEND);
display_result_vertically= old_display_result_vertically; display_result_vertically= old_display_result_vertically;
break; break;
...@@ -3895,6 +3905,12 @@ int main(int argc, char **argv) ...@@ -3895,6 +3905,12 @@ int main(int argc, char **argv)
case Q_ENABLE_PS_PROTOCOL: case Q_ENABLE_PS_PROTOCOL:
ps_protocol_enabled= ps_protocol; ps_protocol_enabled= ps_protocol;
break; break;
case Q_DISABLE_RECONNECT:
cur_con->mysql.reconnect= 0;
break;
case Q_ENABLE_RECONNECT:
cur_con->mysql.reconnect= 1;
break;
case Q_EXIT: case Q_EXIT:
abort_flag= 1; abort_flag= 1;
......
...@@ -359,16 +359,23 @@ case $default_charset in ...@@ -359,16 +359,23 @@ case $default_charset in
;; ;;
utf8) utf8)
default_charset_default_collation="utf8_general_ci" default_charset_default_collation="utf8_general_ci"
define(UTFC1, utf8_general_ci utf8_bin) if test "$default_collation" = "utf8_general_cs"; then
define(UTFC2, utf8_czech_ci utf8_danish_ci) # For those who explicitly desire "utf8_general_cs", support it,
define(UTFC3, utf8_estonian_ci utf8_icelandic_ci) # and then also set the CPP switch enabling that code.
define(UTFC4, utf8_latvian_ci utf8_lithuanian_ci) UTFC="utf8_general_cs"
define(UTFC5, utf8_persian_ci utf8_polish_ci utf8_romanian_ci) AC_DEFINE([HAVE_UTF8_GENERAL_CS], [1], [certain Japanese customer])
define(UTFC6, utf8_slovak_ci utf8_slovenian_ci) else
define(UTFC7, utf8_spanish2_ci utf8_spanish_ci) define(UTFC1, utf8_general_ci utf8_bin)
define(UTFC8, utf8_swedish_ci utf8_turkish_ci) define(UTFC2, utf8_czech_ci utf8_danish_ci)
define(UTFC9, utf8_unicode_ci) define(UTFC3, utf8_estonian_ci utf8_icelandic_ci)
UTFC="UTFC1 UTFC2 UTFC3 UTFC4 UTFC5 UTFC6 UTFC7 UTFC8 UTFC9" define(UTFC4, utf8_latvian_ci utf8_lithuanian_ci)
define(UTFC5, utf8_persian_ci utf8_polish_ci utf8_romanian_ci)
define(UTFC6, utf8_slovak_ci utf8_slovenian_ci)
define(UTFC7, utf8_spanish2_ci utf8_spanish_ci)
define(UTFC8, utf8_swedish_ci utf8_turkish_ci)
define(UTFC9, utf8_unicode_ci)
UTFC="UTFC1 UTFC2 UTFC3 UTFC4 UTFC5 UTFC6 UTFC7 UTFC8 UTFC9"
fi
default_charset_collations="$UTFC" default_charset_collations="$UTFC"
;; ;;
*) *)
......
AC_DEFUN([MYSQL_CHECK_ISAM], [
AC_ARG_WITH([isam], [
--with-isam Enable the ISAM table type],
[with_isam="$withval"],
[with_isam=no])
isam_libs=
if test X"$with_isam" = X"yes"
then
AC_DEFINE([HAVE_ISAM], [1], [Using old ISAM tables])
isam_libs="\$(top_builddir)/isam/libnisam.a\
\$(top_builddir)/merge/libmerge.a"
fi
AC_SUBST(isam_libs)
])
...@@ -6,7 +6,7 @@ AC_PREREQ(2.50)dnl Minimum Autoconf version required. ...@@ -6,7 +6,7 @@ AC_PREREQ(2.50)dnl Minimum Autoconf version required.
AC_INIT(sql/mysqld.cc) AC_INIT(sql/mysqld.cc)
AC_CANONICAL_SYSTEM AC_CANONICAL_SYSTEM
# Don't forget to also update the NDB lines below. # Don't forget to also update the NDB lines below.
AM_INIT_AUTOMAKE(mysql, 5.0.4-beta) AM_INIT_AUTOMAKE(mysql, 5.0.5-beta)
AM_CONFIG_HEADER(config.h) AM_CONFIG_HEADER(config.h)
PROTOCOL_VERSION=10 PROTOCOL_VERSION=10
...@@ -41,7 +41,6 @@ sinclude(config/ac-macros/ha_blackhole.m4) ...@@ -41,7 +41,6 @@ sinclude(config/ac-macros/ha_blackhole.m4)
sinclude(config/ac-macros/ha_example.m4) sinclude(config/ac-macros/ha_example.m4)
sinclude(config/ac-macros/ha_federated.m4) sinclude(config/ac-macros/ha_federated.m4)
sinclude(config/ac-macros/ha_innodb.m4) sinclude(config/ac-macros/ha_innodb.m4)
sinclude(config/ac-macros/ha_isam.m4)
sinclude(config/ac-macros/ha_ndbcluster.m4) sinclude(config/ac-macros/ha_ndbcluster.m4)
sinclude(config/ac-macros/ha_tina.m4) sinclude(config/ac-macros/ha_tina.m4)
sinclude(config/ac-macros/large_file.m4) sinclude(config/ac-macros/large_file.m4)
...@@ -352,6 +351,15 @@ then ...@@ -352,6 +351,15 @@ then
if echo $CXX | grep gcc > /dev/null 2>&1 if echo $CXX | grep gcc > /dev/null 2>&1
then then
GCC_VERSION=`gcc -v 2>&1 | grep version | sed -e 's/[[^0-9. ]]//g; s/^ *//g; s/ .*//g'` GCC_VERSION=`gcc -v 2>&1 | grep version | sed -e 's/[[^0-9. ]]//g; s/^ *//g; s/ .*//g'`
case $SYSTEM_TYPE in
*freebsd*)
# The libsupc++ library on freebsd with gcc 3.4.2 is dependent on
# libstdc++, disable it since other solution works fine
GCC_VERSION="NOSUPCPP_$GCC_VERSION"
;;
*)
;;
esac
echo "Using gcc version '$GCC_VERSION'" echo "Using gcc version '$GCC_VERSION'"
case "$GCC_VERSION" in case "$GCC_VERSION" in
3.4.*|3.5.*) 3.4.*|3.5.*)
......
...@@ -24,7 +24,7 @@ pkginclude_HEADERS = my_dbug.h m_string.h my_sys.h my_list.h my_xml.h \ ...@@ -24,7 +24,7 @@ pkginclude_HEADERS = my_dbug.h m_string.h my_sys.h my_list.h my_xml.h \
sslopt-vars.h sslopt-case.h sql_common.h keycache.h \ sslopt-vars.h sslopt-case.h sql_common.h keycache.h \
mysql_time.h $(BUILT_SOURCES) mysql_time.h $(BUILT_SOURCES)
noinst_HEADERS = config-win.h config-os2.h config-netware.h \ noinst_HEADERS = config-win.h config-os2.h config-netware.h \
nisam.h heap.h merge.h my_bitmap.h\ heap.h my_bitmap.h\
myisam.h myisampack.h myisammrg.h ft_global.h\ myisam.h myisampack.h myisammrg.h ft_global.h\
mysys_err.h my_base.h help_start.h help_end.h \ mysys_err.h my_base.h help_start.h help_end.h \
my_nosys.h my_alarm.h queues.h rijndael.h sha1.h \ my_nosys.h my_alarm.h queues.h rijndael.h sha1.h \
......
...@@ -351,7 +351,6 @@ inline double ulonglong2double(ulonglong value) ...@@ -351,7 +351,6 @@ inline double ulonglong2double(ulonglong value)
#define DO_NOT_REMOVE_THREAD_WRAPPERS #define DO_NOT_REMOVE_THREAD_WRAPPERS
#define thread_safe_increment(V,L) InterlockedIncrement((long*) &(V)) #define thread_safe_increment(V,L) InterlockedIncrement((long*) &(V))
#define thread_safe_decrement(V,L) InterlockedDecrement((long*) &(V)) #define thread_safe_decrement(V,L) InterlockedDecrement((long*) &(V))
#define thread_safe_dec_and_test(V, L) thread_safe_decrement(V,L)
/* The following is only used for statistics, so it should be good enough */ /* The following is only used for statistics, so it should be good enough */
#ifdef __NT__ /* This should also work on Win98 but .. */ #ifdef __NT__ /* This should also work on Win98 but .. */
#define thread_safe_add(V,C,L) InterlockedExchangeAdd((long*) &(V),(C)) #define thread_safe_add(V,C,L) InterlockedExchangeAdd((long*) &(V),(C))
...@@ -379,6 +378,7 @@ inline double ulonglong2double(ulonglong value) ...@@ -379,6 +378,7 @@ inline double ulonglong2double(ulonglong value)
/* #undef HAVE_CHARSET_armscii8 */ /* #undef HAVE_CHARSET_armscii8 */
/* #undef HAVE_CHARSET_ascii */ /* #undef HAVE_CHARSET_ascii */
#define HAVE_CHARSET_big5 1 #define HAVE_CHARSET_big5 1
#define HAVE_CHARSET_cp932
#define HAVE_CHARSET_cp1250 1 #define HAVE_CHARSET_cp1250 1
/* #undef HAVE_CHARSET_cp1251 */ /* #undef HAVE_CHARSET_cp1251 */
/* #undef HAVE_CHARSET_cp1256 */ /* #undef HAVE_CHARSET_cp1256 */
...@@ -387,6 +387,7 @@ inline double ulonglong2double(ulonglong value) ...@@ -387,6 +387,7 @@ inline double ulonglong2double(ulonglong value)
/* #undef HAVE_CHARSET_cp852 */ /* #undef HAVE_CHARSET_cp852 */
/* #undef HAVE_CHARSET_cp866 */ /* #undef HAVE_CHARSET_cp866 */
/* #undef HAVE_CHARSET_dec8 */ /* #undef HAVE_CHARSET_dec8 */
#define HAVE_CHARSET_eucjpms 1
#define HAVE_CHARSET_euckr 1 #define HAVE_CHARSET_euckr 1
#define HAVE_CHARSET_gb2312 1 #define HAVE_CHARSET_gb2312 1
#define HAVE_CHARSET_gbk 1 #define HAVE_CHARSET_gbk 1
......
...@@ -149,7 +149,8 @@ typedef struct my_charset_handler_st ...@@ -149,7 +149,8 @@ typedef struct my_charset_handler_st
uint (*numchars)(struct charset_info_st *, const char *b, const char *e); uint (*numchars)(struct charset_info_st *, const char *b, const char *e);
uint (*charpos)(struct charset_info_st *, const char *b, const char *e, uint pos); uint (*charpos)(struct charset_info_st *, const char *b, const char *e, uint pos);
uint (*well_formed_len)(struct charset_info_st *, uint (*well_formed_len)(struct charset_info_st *,
const char *b,const char *e, uint nchars); const char *b,const char *e,
uint nchars, int *error);
uint (*lengthsp)(struct charset_info_st *, const char *ptr, uint length); uint (*lengthsp)(struct charset_info_st *, const char *ptr, uint length);
uint (*numcells)(struct charset_info_st *, const char *b, const char *e); uint (*numcells)(struct charset_info_st *, const char *b, const char *e);
...@@ -186,7 +187,7 @@ typedef struct my_charset_handler_st ...@@ -186,7 +187,7 @@ typedef struct my_charset_handler_st
int base, char **e, int *err); int base, char **e, int *err);
double (*strntod)(struct charset_info_st *, char *s, uint l, char **e, double (*strntod)(struct charset_info_st *, char *s, uint l, char **e,
int *err); int *err);
longlong (*my_strtoll10)(struct charset_info_st *cs, longlong (*strtoll10)(struct charset_info_st *cs,
const char *nptr, char **endptr, int *error); const char *nptr, char **endptr, int *error);
ulong (*scan)(struct charset_info_st *, const char *b, const char *e, ulong (*scan)(struct charset_info_st *, const char *b, const char *e,
int sq); int sq);
...@@ -349,7 +350,8 @@ int my_wildcmp_8bit(CHARSET_INFO *, ...@@ -349,7 +350,8 @@ int my_wildcmp_8bit(CHARSET_INFO *,
uint my_numchars_8bit(CHARSET_INFO *, const char *b, const char *e); uint my_numchars_8bit(CHARSET_INFO *, const char *b, const char *e);
uint my_numcells_8bit(CHARSET_INFO *, const char *b, const char *e); uint my_numcells_8bit(CHARSET_INFO *, const char *b, const char *e);
uint my_charpos_8bit(CHARSET_INFO *, const char *b, const char *e, uint pos); uint my_charpos_8bit(CHARSET_INFO *, const char *b, const char *e, uint pos);
uint my_well_formed_len_8bit(CHARSET_INFO *, const char *b, const char *e, uint pos); uint my_well_formed_len_8bit(CHARSET_INFO *, const char *b, const char *e,
uint pos, int *error);
int my_mbcharlen_8bit(CHARSET_INFO *, uint c); int my_mbcharlen_8bit(CHARSET_INFO *, uint c);
...@@ -367,7 +369,8 @@ int my_wildcmp_mb(CHARSET_INFO *, ...@@ -367,7 +369,8 @@ int my_wildcmp_mb(CHARSET_INFO *,
uint my_numchars_mb(CHARSET_INFO *, const char *b, const char *e); uint my_numchars_mb(CHARSET_INFO *, const char *b, const char *e);
uint my_numcells_mb(CHARSET_INFO *, const char *b, const char *e); uint my_numcells_mb(CHARSET_INFO *, const char *b, const char *e);
uint my_charpos_mb(CHARSET_INFO *, const char *b, const char *e, uint pos); uint my_charpos_mb(CHARSET_INFO *, const char *b, const char *e, uint pos);
uint my_well_formed_len_mb(CHARSET_INFO *, const char *b, const char *e, uint pos); uint my_well_formed_len_mb(CHARSET_INFO *, const char *b, const char *e,
uint pos, int *error);
uint my_instr_mb(struct charset_info_st *, uint my_instr_mb(struct charset_info_st *,
const char *b, uint b_length, const char *b, uint b_length,
const char *s, uint s_length, const char *s, uint s_length,
......
/* Copyright (C) 2000 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* This file should be included when using merge_isam_funktions */
/* Author: Michael Widenius */
#ifndef _merge_h
#define _merge_h
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _my_base_h
#include <my_base.h>
#endif
#ifndef _nisam_h
#include <nisam.h>
#endif
#define MRG_NAME_EXT ".MRG"
/* Param to/from mrg_info */
typedef struct st_mrg_info /* Struct from h_info */
{
ulonglong records; /* Records in database */
ulonglong deleted; /* Deleted records in database */
ulonglong recpos; /* Pos for last used record */
ulonglong data_file_length;
uint reclength; /* Recordlength */
int errkey; /* With key was dupplicated on err */
uint options; /* HA_OPTION_... used */
} MERGE_INFO;
typedef struct st_mrg_table_info
{
N_INFO *table;
ulonglong file_offset;
} MRG_TABLE;
typedef struct st_merge
{
MRG_TABLE *open_tables,*current_table,*end_table,*last_used_table;
ulonglong records; /* records in tables */
ulonglong del; /* Removed records */
ulonglong data_file_length;
uint tables,options,reclength;
my_bool cache_in_use;
LIST open_list;
} MRG_INFO;
typedef ulong mrg_off_t;
/* Prototypes for merge-functions */
extern int mrg_close(MRG_INFO *file);
extern int mrg_delete(MRG_INFO *file,const byte *buff);
extern MRG_INFO *mrg_open(const char *name,int mode,int wait_if_locked);
extern int mrg_panic(enum ha_panic_function function);
extern int mrg_rfirst(MRG_INFO *file,byte *buf,int inx);
extern int mrg_rkey(MRG_INFO *file,byte *buf,int inx,const byte *key,
uint key_len, enum ha_rkey_function search_flag);
extern int mrg_rrnd(MRG_INFO *file,byte *buf, mrg_off_t pos);
extern int mrg_rsame(MRG_INFO *file,byte *record,int inx);
extern int mrg_update(MRG_INFO *file,const byte *old,const byte *new_rec);
extern int mrg_info(MRG_INFO *file,MERGE_INFO *x,int flag);
extern int mrg_lock_database(MRG_INFO *file,int lock_type);
extern int mrg_create(const char *name,const char **table_names);
extern int mrg_extra(MRG_INFO *file,enum ha_extra_function function);
extern ha_rows mrg_records_in_range(MRG_INFO *info,int inx,
const byte *start_key,uint start_key_len,
enum ha_rkey_function start_search_flag,
const byte *end_key,uint end_key_len,
enum ha_rkey_function end_search_flag);
extern mrg_off_t mrg_position(MRG_INFO *info);
#ifdef __cplusplus
}
#endif
#endif
...@@ -312,7 +312,9 @@ enum ha_base_keytype { ...@@ -312,7 +312,9 @@ enum ha_base_keytype {
#define HA_ERR_TABLE_EXIST 156 /* The table existed in storage engine */ #define HA_ERR_TABLE_EXIST 156 /* The table existed in storage engine */
#define HA_ERR_NO_CONNECTION 157 /* Could not connect to storage engine */ #define HA_ERR_NO_CONNECTION 157 /* Could not connect to storage engine */
#define HA_ERR_NULL_IN_SPATIAL 158 /* NULLs are not supported in spatial index */ #define HA_ERR_NULL_IN_SPATIAL 158 /* NULLs are not supported in spatial index */
#define HA_ERR_LAST 158 /*Copy last error nr.*/ #define HA_ERR_TABLE_DEF_CHANGED 159 /* The table changed in storage engine */
#define HA_ERR_LAST 159 /*Copy last error nr.*/
/* Add error numbers before HA_ERR_LAST and change it accordingly. */ /* Add error numbers before HA_ERR_LAST and change it accordingly. */
#define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1) #define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1)
......
...@@ -678,7 +678,6 @@ extern pthread_t shutdown_th, main_th, signal_th; ...@@ -678,7 +678,6 @@ extern pthread_t shutdown_th, main_th, signal_th;
#ifdef HAVE_ATOMIC_ADD #ifdef HAVE_ATOMIC_ADD
#define thread_safe_increment(V,L) atomic_inc((atomic_t*) &V) #define thread_safe_increment(V,L) atomic_inc((atomic_t*) &V)
#define thread_safe_decrement(V,L) atomic_dec((atomic_t*) &V) #define thread_safe_decrement(V,L) atomic_dec((atomic_t*) &V)
#define thread_safe_dec_and_test(V, L) atomic_dec_and_test((atomic_t*) &V)
#define thread_safe_add(V,C,L) atomic_add((C),(atomic_t*) &V) #define thread_safe_add(V,C,L) atomic_add((C),(atomic_t*) &V)
#define thread_safe_sub(V,C,L) atomic_sub((C),(atomic_t*) &V) #define thread_safe_sub(V,C,L) atomic_sub((C),(atomic_t*) &V)
#else #else
...@@ -689,22 +688,6 @@ extern pthread_t shutdown_th, main_th, signal_th; ...@@ -689,22 +688,6 @@ extern pthread_t shutdown_th, main_th, signal_th;
#define thread_safe_add(V,C,L) (pthread_mutex_lock((L)), (V)+=(C), pthread_mutex_unlock((L))) #define thread_safe_add(V,C,L) (pthread_mutex_lock((L)), (V)+=(C), pthread_mutex_unlock((L)))
#define thread_safe_sub(V,C,L) \ #define thread_safe_sub(V,C,L) \
(pthread_mutex_lock((L)), (V)-=(C), pthread_mutex_unlock((L))) (pthread_mutex_lock((L)), (V)-=(C), pthread_mutex_unlock((L)))
#ifdef __cplusplus
static inline bool thread_safe_dec_and_test(ulong &V, pthread_mutex_t *L)
{
ulong res;
pthread_mutex_lock(L);
res=--V;
pthread_mutex_unlock(L);
return res==0;
}
#else
/*
what should we do ? define it as static ?
a regular function somewhere in mysys/ ?
for now it's only used in c++ code, so there's no need to bother
*/
#endif
#endif /* HAVE_ATOMIC_ADD */ #endif /* HAVE_ATOMIC_ADD */
#ifdef SAFE_STATISTICS #ifdef SAFE_STATISTICS
#define statistic_increment(V,L) thread_safe_increment((V),(L)) #define statistic_increment(V,L) thread_safe_increment((V),(L))
......
...@@ -54,11 +54,10 @@ extern int NEAR my_errno; /* Last error in mysys */ ...@@ -54,11 +54,10 @@ extern int NEAR my_errno; /* Last error in mysys */
#define MY_FAE 8 /* Fatal if any error */ #define MY_FAE 8 /* Fatal if any error */
#define MY_WME 16 /* Write message on error */ #define MY_WME 16 /* Write message on error */
#define MY_WAIT_IF_FULL 32 /* Wait and try again if disk full error */ #define MY_WAIT_IF_FULL 32 /* Wait and try again if disk full error */
#define MY_RAID 64 /* Support for RAID (not the "Johnson&Johnson"-s one ;) */ #define MY_IGNORE_BADFD 32 /* my_sync: ignore 'bad descriptor' errors */
#define MY_FULL_IO 512 /* For my_read - loop intil I/O #define MY_RAID 64 /* Support for RAID */
is complete #define MY_FULL_IO 512 /* For my_read - loop intil I/O is complete */
*/ #define MY_DONT_CHECK_FILESIZE 128 /* Option to init_io_cache() */
#define MY_DONT_CHECK_FILESIZE 128 /* Option to init_io_cache() */
#define MY_LINK_WARNING 32 /* my_redel() gives warning if links */ #define MY_LINK_WARNING 32 /* my_redel() gives warning if links */
#define MY_COPYTIME 64 /* my_redel() copys time */ #define MY_COPYTIME 64 /* my_redel() copys time */
#define MY_DELETE_OLD 256 /* my_create_with_symlink() */ #define MY_DELETE_OLD 256 /* my_create_with_symlink() */
...@@ -72,7 +71,7 @@ extern int NEAR my_errno; /* Last error in mysys */ ...@@ -72,7 +71,7 @@ extern int NEAR my_errno; /* Last error in mysys */
#define MY_FREE_ON_ERROR 128 /* my_realloc() ; Free old ptr on error */ #define MY_FREE_ON_ERROR 128 /* my_realloc() ; Free old ptr on error */
#define MY_HOLD_ON_ERROR 256 /* my_realloc() ; Return old ptr on error */ #define MY_HOLD_ON_ERROR 256 /* my_realloc() ; Return old ptr on error */
#define MY_THREADSAFE 128 /* pread/pwrite: Don't allow interrupts */ #define MY_THREADSAFE 128 /* pread/pwrite: Don't allow interrupts */
#define MY_DONT_OVERWRITE_FILE 1024 /* my_copy; Don't overwrite file */ #define MY_DONT_OVERWRITE_FILE 1024 /* my_copy: Don't overwrite file */
#define MY_CHECK_ERROR 1 /* Params to my_end; Check open-close */ #define MY_CHECK_ERROR 1 /* Params to my_end; Check open-close */
#define MY_GIVE_INFO 2 /* Give time info about process*/ #define MY_GIVE_INFO 2 /* Give time info about process*/
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#undef HAVE_PSTACK /* No stacktrace */ #undef HAVE_PSTACK /* No stacktrace */
#undef HAVE_DLOPEN /* No udf functions */ #undef HAVE_DLOPEN /* No udf functions */
#undef HAVE_OPENSSL #undef HAVE_OPENSSL
#undef HAVE_ISAM
#undef HAVE_SMEM /* No shared memory */ #undef HAVE_SMEM /* No shared memory */
#undef HAVE_NDBCLUSTER_DB /* No NDB cluster */ #undef HAVE_NDBCLUSTER_DB /* No NDB cluster */
......
/* Copyright (C) 2000 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* This file should be included when using nisam_funktions */
/* Author: Michael Widenius */
#ifndef _nisam_h
#define _nisam_h
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _my_base_h
#include <my_base.h>
#endif
/* defines used by nisam-funktions */
#define N_MAXKEY 16 /* Max allowed keys */
#define N_MAXKEY_SEG 16 /* Max segments for key */
#define N_MAX_KEY_LENGTH 256 /* May be increased up to 500 */
#define N_MAX_KEY_BUFF (N_MAX_KEY_LENGTH+N_MAXKEY_SEG+sizeof(double)-1)
#define N_MAX_POSSIBLE_KEY_BUFF 500+9
#define N_NAME_IEXT ".ISM"
#define N_NAME_DEXT ".ISD"
#define NI_POS_ERROR (~ (ulong) 0)
/* Param to/from nisam_info */
typedef struct st_n_isaminfo /* Struct from h_info */
{
ulong records; /* Records in database */
ulong deleted; /* Deleted records in database */
ulong recpos; /* Pos for last used record */
ulong newrecpos; /* Pos if we write new record */
ulong dupp_key_pos; /* Position to record with dupp key */
ulong data_file_length, /* Length of data file */
max_data_file_length,
index_file_length,
max_index_file_length,
delete_length;
uint reclength; /* Recordlength */
uint mean_reclength; /* Mean recordlength (if packed) */
uint keys; /* How many keys used */
uint options; /* HA_OPTION_... used */
int errkey, /* With key was dupplicated on err */
sortkey; /* clustered by this key */
File filenr; /* (uniq) filenr for datafile */
time_t create_time; /* When table was created */
time_t isamchk_time;
time_t update_time;
ulong *rec_per_key; /* for sql optimizing */
} N_ISAMINFO;
/* Info saved on file for each info-part */
#ifdef __WATCOMC__
#pragma pack(2)
#define uint uint16 /* Same format as in MSDOS */
#endif
#ifdef __ZTC__
#pragma ZTC align 2
#define uint uint16 /* Same format as in MSDOS */
#endif
typedef struct st_n_save_keyseg /* Key-portion */
{
uint8 type; /* Typ av nyckel (f|r sort) */
uint8 flag; /* HA_DIFF_LENGTH */
uint16 start; /* Start of key in record */
uint16 length; /* Keylength */
} N_SAVE_KEYSEG;
typedef struct st_n_save_keydef /* Key definition with create & info */
{
uint8 flag; /* NOSAME, PACK_USED */
uint8 keysegs; /* Number of key-segment */
uint16 block_length; /* Length of keyblock (auto) */
uint16 keylength; /* Tot length of keyparts (auto) */
uint16 minlength; /* min length of (packed) key (auto) */
uint16 maxlength; /* max length of (packed) key (auto) */
} N_SAVE_KEYDEF;
typedef struct st_n_save_recinfo /* Info of record */
{
int16 type; /* en_fieldtype */
uint16 length; /* length of field */
} N_SAVE_RECINFO;
#ifdef __ZTC__
#pragma ZTC align
#undef uint
#endif
#ifdef __WATCOMC__
#pragma pack()
#undef uint
#endif
struct st_isam_info; /* For referense */
#ifndef ISAM_LIBRARY
typedef struct st_isam_info N_INFO;
#endif
typedef struct st_n_keyseg /* Key-portion */
{
N_SAVE_KEYSEG base;
} N_KEYSEG;
typedef struct st_n_keydef /* Key definition with open & info */
{
N_SAVE_KEYDEF base;
N_KEYSEG seg[N_MAXKEY_SEG+1];
int (*bin_search)(struct st_isam_info *info,struct st_n_keydef *keyinfo,
uchar *page,uchar *key,
uint key_len,uint comp_flag,uchar * *ret_pos,
uchar *buff);
uint (*get_key)(struct st_n_keydef *keyinfo,uint nod_flag,uchar * *page,
uchar *key);
} N_KEYDEF;
typedef struct st_decode_tree /* Decode huff-table */
{
uint16 *table;
uint quick_table_bits;
byte *intervalls;
} DECODE_TREE;
struct st_bit_buff;
typedef struct st_n_recinfo /* Info of record */
{
N_SAVE_RECINFO base;
#ifndef NOT_PACKED_DATABASES
void (*unpack)(struct st_n_recinfo *rec,struct st_bit_buff *buff,
uchar *start,uchar *end);
enum en_fieldtype base_type;
uint space_length_bits,pack_type;
DECODE_TREE *huff_tree;
#endif
} N_RECINFO;
extern my_string nisam_log_filename; /* Name of logfile */
extern uint nisam_block_size;
extern my_bool nisam_flush;
/* Prototypes for nisam-functions */
extern int nisam_close(struct st_isam_info *file);
extern int nisam_delete(struct st_isam_info *file,const byte *buff);
extern struct st_isam_info *nisam_open(const char *name,int mode,
uint wait_if_locked);
extern int nisam_panic(enum ha_panic_function function);
extern int nisam_rfirst(struct st_isam_info *file,byte *buf,int inx);
extern int nisam_rkey(struct st_isam_info *file,byte *buf,int inx,
const byte *key,
uint key_len, enum ha_rkey_function search_flag);
extern int nisam_rlast(struct st_isam_info *file,byte *buf,int inx);
extern int nisam_rnext(struct st_isam_info *file,byte *buf,int inx);
extern int nisam_rprev(struct st_isam_info *file,byte *buf,int inx);
extern int nisam_rrnd(struct st_isam_info *file,byte *buf,ulong pos);
extern int nisam_rsame(struct st_isam_info *file,byte *record,int inx);
extern int nisam_rsame_with_pos(struct st_isam_info *file,byte *record,
int inx,ulong pos);
extern int nisam_update(struct st_isam_info *file,const byte *old,
const byte *new_record);
extern int nisam_write(struct st_isam_info *file,const byte *buff);
extern int nisam_info(struct st_isam_info *file,N_ISAMINFO *x,int flag);
extern ulong nisam_position(struct st_isam_info *info);
extern int nisam_lock_database(struct st_isam_info *file,int lock_type);
extern int nisam_create(const char *name,uint keys,N_KEYDEF *keyinfo,
N_RECINFO *recinfo,ulong records,
ulong reloc,uint flags,uint options,
ulong data_file_length);
extern int nisam_extra(struct st_isam_info *file,
enum ha_extra_function function);
extern ulong nisam_records_in_range(struct st_isam_info *info,int inx,
const byte *start_key,uint start_key_len,
enum ha_rkey_function start_search_flag,
const byte *end_key,uint end_key_len,
enum ha_rkey_function end_search_flag);
extern int nisam_log(int activate_log);
extern int nisam_is_changed(struct st_isam_info *info);
extern uint _calc_blob_length(uint length , const byte *pos);
#ifdef __cplusplus
}
#endif
#endif
...@@ -14,6 +14,7 @@ Created 2/23/1996 Heikki Tuuri ...@@ -14,6 +14,7 @@ Created 2/23/1996 Heikki Tuuri
#include "ut0byte.h" #include "ut0byte.h"
#include "rem0cmp.h" #include "rem0cmp.h"
#include "trx0trx.h"
/****************************************************************** /******************************************************************
Allocates memory for a persistent cursor object and initializes the cursor. */ Allocates memory for a persistent cursor object and initializes the cursor. */
...@@ -206,7 +207,14 @@ btr_pcur_restore_position( ...@@ -206,7 +207,14 @@ btr_pcur_restore_position(
ut_a(cursor->pos_state == BTR_PCUR_WAS_POSITIONED ut_a(cursor->pos_state == BTR_PCUR_WAS_POSITIONED
|| cursor->pos_state == BTR_PCUR_IS_POSITIONED); || cursor->pos_state == BTR_PCUR_IS_POSITIONED);
ut_a(cursor->old_stored == BTR_PCUR_OLD_STORED); if (cursor->old_stored != BTR_PCUR_OLD_STORED) {
ut_print_buf(stderr, (const byte*)cursor, sizeof(btr_pcur_t));
if (cursor->trx_if_known) {
trx_print(stderr, cursor->trx_if_known);
}
ut_a(0);
}
if (cursor->rel_pos == BTR_PCUR_AFTER_LAST_IN_TREE if (cursor->rel_pos == BTR_PCUR_AFTER_LAST_IN_TREE
|| cursor->rel_pos == BTR_PCUR_BEFORE_FIRST_IN_TREE) { || cursor->rel_pos == BTR_PCUR_BEFORE_FIRST_IN_TREE) {
......
...@@ -3333,6 +3333,9 @@ try_find_index: ...@@ -3333,6 +3333,9 @@ try_find_index:
"Cannot find an index in the referenced table where the\n" "Cannot find an index in the referenced table where the\n"
"referenced columns appear as the first columns, or column types\n" "referenced columns appear as the first columns, or column types\n"
"in the table and the referenced table do not match for constraint.\n" "in the table and the referenced table do not match for constraint.\n"
"Note that the internal storage type of ENUM and SET changed in\n"
"tables created with >= InnoDB-4.1.12, and such columns in old tables\n"
"cannot be referenced by such columns in new tables.\n"
"See http://dev.mysql.com/doc/mysql/en/InnoDB_foreign_key_constraints.html\n" "See http://dev.mysql.com/doc/mysql/en/InnoDB_foreign_key_constraints.html\n"
"for correct foreign key definition.\n", "for correct foreign key definition.\n",
start_of_latest_foreign); start_of_latest_foreign);
......
...@@ -478,6 +478,10 @@ struct btr_pcur_struct{ ...@@ -478,6 +478,10 @@ struct btr_pcur_struct{
BTR_PCUR_WAS_POSITIONED, BTR_PCUR_WAS_POSITIONED,
BTR_PCUR_NOT_POSITIONED */ BTR_PCUR_NOT_POSITIONED */
ulint search_mode; /* PAGE_CUR_G, ... */ ulint search_mode; /* PAGE_CUR_G, ... */
trx_t* trx_if_known; /* the transaction, if we know it;
otherwise this field is not defined;
can ONLY BE USED in error prints in
fatal assertion failures! */
/*-----------------------------*/ /*-----------------------------*/
/* NOTE that the following fields may possess dynamically allocated /* NOTE that the following fields may possess dynamically allocated
memory which should be freed if not needed anymore! */ memory which should be freed if not needed anymore! */
......
...@@ -493,6 +493,8 @@ btr_pcur_open( ...@@ -493,6 +493,8 @@ btr_pcur_open(
btr_cur_search_to_nth_level(index, 0, tuple, mode, latch_mode, btr_cur_search_to_nth_level(index, 0, tuple, mode, latch_mode,
btr_cursor, 0, mtr); btr_cursor, 0, mtr);
cursor->pos_state = BTR_PCUR_IS_POSITIONED; cursor->pos_state = BTR_PCUR_IS_POSITIONED;
cursor->trx_if_known = NULL;
} }
/****************************************************************** /******************************************************************
...@@ -535,6 +537,8 @@ btr_pcur_open_with_no_init( ...@@ -535,6 +537,8 @@ btr_pcur_open_with_no_init(
cursor->pos_state = BTR_PCUR_IS_POSITIONED; cursor->pos_state = BTR_PCUR_IS_POSITIONED;
cursor->old_stored = BTR_PCUR_OLD_NOT_STORED; cursor->old_stored = BTR_PCUR_OLD_NOT_STORED;
cursor->trx_if_known = NULL;
} }
/********************************************************************* /*********************************************************************
...@@ -568,6 +572,8 @@ btr_pcur_open_at_index_side( ...@@ -568,6 +572,8 @@ btr_pcur_open_at_index_side(
pcur->pos_state = BTR_PCUR_IS_POSITIONED; pcur->pos_state = BTR_PCUR_IS_POSITIONED;
pcur->old_stored = BTR_PCUR_OLD_NOT_STORED; pcur->old_stored = BTR_PCUR_OLD_NOT_STORED;
pcur->trx_if_known = NULL;
} }
/************************************************************************** /**************************************************************************
...@@ -592,6 +598,8 @@ btr_pcur_open_at_rnd_pos( ...@@ -592,6 +598,8 @@ btr_pcur_open_at_rnd_pos(
btr_pcur_get_btr_cur(cursor), mtr); btr_pcur_get_btr_cur(cursor), mtr);
cursor->pos_state = BTR_PCUR_IS_POSITIONED; cursor->pos_state = BTR_PCUR_IS_POSITIONED;
cursor->old_stored = BTR_PCUR_OLD_NOT_STORED; cursor->old_stored = BTR_PCUR_OLD_NOT_STORED;
cursor->trx_if_known = NULL;
} }
/****************************************************************** /******************************************************************
...@@ -617,4 +625,6 @@ btr_pcur_close( ...@@ -617,4 +625,6 @@ btr_pcur_close(
cursor->latch_mode = BTR_NO_LATCHES; cursor->latch_mode = BTR_NO_LATCHES;
cursor->pos_state = BTR_PCUR_NOT_POSITIONED; cursor->pos_state = BTR_PCUR_NOT_POSITIONED;
cursor->trx_if_known = NULL;
} }
...@@ -68,6 +68,8 @@ log. */ ...@@ -68,6 +68,8 @@ log. */
#define OS_FILE_OVERWRITE 53 #define OS_FILE_OVERWRITE 53
#define OS_FILE_OPEN_RAW 54 #define OS_FILE_OPEN_RAW 54
#define OS_FILE_CREATE_PATH 55 #define OS_FILE_CREATE_PATH 55
#define OS_FILE_OPEN_RETRY 56 /* for os_file_create() on
the first ibdata file */
#define OS_FILE_READ_ONLY 333 #define OS_FILE_READ_ONLY 333
#define OS_FILE_READ_WRITE 444 #define OS_FILE_READ_WRITE 444
......
...@@ -413,8 +413,6 @@ os_file_lock( ...@@ -413,8 +413,6 @@ os_file_lock(
"InnoDB: using the same InnoDB data or log files.\n"); "InnoDB: using the same InnoDB data or log files.\n");
} }
close(fd);
return(-1); return(-1);
} }
...@@ -989,6 +987,7 @@ try_again: ...@@ -989,6 +987,7 @@ try_again:
} else if (access_type == OS_FILE_READ_WRITE } else if (access_type == OS_FILE_READ_WRITE
&& os_file_lock(file, name)) { && os_file_lock(file, name)) {
*success = FALSE; *success = FALSE;
close(file);
file = -1; file = -1;
#endif #endif
} else { } else {
...@@ -1101,6 +1100,7 @@ os_file_create_simple_no_error_handling( ...@@ -1101,6 +1100,7 @@ os_file_create_simple_no_error_handling(
} else if (access_type == OS_FILE_READ_WRITE } else if (access_type == OS_FILE_READ_WRITE
&& os_file_lock(file, name)) { && os_file_lock(file, name)) {
*success = FALSE; *success = FALSE;
close(file);
file = -1; file = -1;
#endif #endif
} else { } else {
...@@ -1152,7 +1152,8 @@ try_again: ...@@ -1152,7 +1152,8 @@ try_again:
if (create_mode == OS_FILE_OPEN_RAW) { if (create_mode == OS_FILE_OPEN_RAW) {
create_flag = OPEN_EXISTING; create_flag = OPEN_EXISTING;
share_mode = FILE_SHARE_WRITE; share_mode = FILE_SHARE_WRITE;
} else if (create_mode == OS_FILE_OPEN) { } else if (create_mode == OS_FILE_OPEN
|| create_mode == OS_FILE_OPEN_RETRY) {
create_flag = OPEN_EXISTING; create_flag = OPEN_EXISTING;
} else if (create_mode == OS_FILE_CREATE) { } else if (create_mode == OS_FILE_CREATE) {
create_flag = CREATE_NEW; create_flag = CREATE_NEW;
...@@ -1243,7 +1244,8 @@ try_again: ...@@ -1243,7 +1244,8 @@ try_again:
try_again: try_again:
ut_a(name); ut_a(name);
if (create_mode == OS_FILE_OPEN || create_mode == OS_FILE_OPEN_RAW) { if (create_mode == OS_FILE_OPEN || create_mode == OS_FILE_OPEN_RAW
|| create_mode == OS_FILE_OPEN_RETRY) {
mode_str = "OPEN"; mode_str = "OPEN";
create_flag = O_RDWR; create_flag = O_RDWR;
} else if (create_mode == OS_FILE_CREATE) { } else if (create_mode == OS_FILE_CREATE) {
...@@ -1316,6 +1318,23 @@ try_again: ...@@ -1316,6 +1318,23 @@ try_again:
} else if (create_mode != OS_FILE_OPEN_RAW } else if (create_mode != OS_FILE_OPEN_RAW
&& os_file_lock(file, name)) { && os_file_lock(file, name)) {
*success = FALSE; *success = FALSE;
if (create_mode == OS_FILE_OPEN_RETRY) {
int i;
ut_print_timestamp(stderr);
fputs(" InnoDB: Retrying to lock the first data file\n",
stderr);
for (i = 0; i < 100; i++) {
os_thread_sleep(1000000);
if (!os_file_lock(file, name)) {
*success = TRUE;
return(file);
}
}
ut_print_timestamp(stderr);
fputs(" InnoDB: Unable to open the first data file\n",
stderr);
}
close(file);
file = -1; file = -1;
#endif #endif
} else { } else {
......
...@@ -2364,7 +2364,9 @@ row_sel_field_store_in_mysql_format( ...@@ -2364,7 +2364,9 @@ row_sel_field_store_in_mysql_format(
ut_a(templ->mbmaxlen > templ->mbminlen ut_a(templ->mbmaxlen > templ->mbminlen
|| templ->mysql_col_len == len); || templ->mysql_col_len == len);
ut_a(!templ->mbmaxlen /* The following assertion would fail for old tables
containing UTF-8 ENUM columns due to Bug #9526. */
ut_ad(!templ->mbmaxlen
|| !(templ->mysql_col_len % templ->mbmaxlen)); || !(templ->mysql_col_len % templ->mbmaxlen));
ut_a(len * templ->mbmaxlen >= templ->mysql_col_len); ut_a(len * templ->mbmaxlen >= templ->mysql_col_len);
...@@ -2642,6 +2644,8 @@ row_sel_get_clust_rec_for_mysql( ...@@ -2642,6 +2644,8 @@ row_sel_get_clust_rec_for_mysql(
clust_rec = btr_pcur_get_rec(prebuilt->clust_pcur); clust_rec = btr_pcur_get_rec(prebuilt->clust_pcur);
prebuilt->clust_pcur->trx_if_known = trx;
/* Note: only if the search ends up on a non-infimum record is the /* Note: only if the search ends up on a non-infimum record is the
low_match value the real match to the search tuple */ low_match value the real match to the search tuple */
...@@ -3404,6 +3408,8 @@ shortcut_fails_too_big_rec: ...@@ -3404,6 +3408,8 @@ shortcut_fails_too_big_rec:
btr_pcur_open_with_no_init(index, search_tuple, mode, btr_pcur_open_with_no_init(index, search_tuple, mode,
BTR_SEARCH_LEAF, BTR_SEARCH_LEAF,
pcur, 0, &mtr); pcur, 0, &mtr);
pcur->trx_if_known = trx;
} else { } else {
if (mode == PAGE_CUR_G) { if (mode == PAGE_CUR_G) {
btr_pcur_open_at_index_side(TRUE, index, btr_pcur_open_at_index_side(TRUE, index,
......
...@@ -789,6 +789,11 @@ open_or_create_data_files( ...@@ -789,6 +789,11 @@ open_or_create_data_files(
files[i] = os_file_create( files[i] = os_file_create(
name, OS_FILE_OPEN_RAW, OS_FILE_NORMAL, name, OS_FILE_OPEN_RAW, OS_FILE_NORMAL,
OS_DATA_FILE, &ret); OS_DATA_FILE, &ret);
} else if (i == 0) {
files[i] = os_file_create(
name, OS_FILE_OPEN_RETRY,
OS_FILE_NORMAL,
OS_DATA_FILE, &ret);
} else { } else {
files[i] = os_file_create( files[i] = os_file_create(
name, OS_FILE_OPEN, OS_FILE_NORMAL, name, OS_FILE_OPEN, OS_FILE_NORMAL,
......
...@@ -32,38 +32,41 @@ endif ...@@ -32,38 +32,41 @@ endif
benchdir_root= $(prefix) benchdir_root= $(prefix)
testdir = $(benchdir_root)/mysql-test testdir = $(benchdir_root)/mysql-test
EXTRA_SCRIPTS = mysql-test-run.sh install_test_db.sh EXTRA_SCRIPTS = mysql-test-run.sh mysql-test-run.pl install_test_db.sh valgrind.supp
EXTRA_DIST = $(EXTRA_SCRIPTS) EXTRA_DIST = $(EXTRA_SCRIPTS)
test_SCRIPTS = mysql-test-run install_test_db test_SCRIPTS = mysql-test-run install_test_db
test_DATA = std_data/client-key.pem std_data/client-cert.pem std_data/cacert.pem test_DATA = std_data/client-key.pem std_data/client-cert.pem std_data/cacert.pem
CLEANFILES = $(test_SCRIPTS) $(test_DATA) CLEANFILES = $(test_SCRIPTS) $(test_DATA)
INCLUDES = -I$(srcdir)/../include -I../include -I.. INCLUDES = -I$(srcdir)/../include -I../include -I..
EXTRA_PROGRAMS = mysql_test_run_new EXTRA_PROGRAMS = mysql_test_run_new
noinst_HEADERS = my_manage.h noinst_HEADERS = my_manage.h
mysql_test_run_new_SOURCES= mysql_test_run_new.c my_manage.c my_create_tables.c mysql_test_run_new_SOURCES= mysql_test_run_new.c my_manage.c my_create_tables.c
dist-hook: dist-hook:
mkdir -p $(distdir)/t $(distdir)/r $(distdir)/include \ mkdir -p $(distdir)/t $(distdir)/r $(distdir)/include \
$(distdir)/std_data $(distdir)/std_data $(distdir)/lib
$(INSTALL_DATA) $(srcdir)/t/*.test $(distdir)/t $(INSTALL_DATA) $(srcdir)/t/*.test $(distdir)/t
-$(INSTALL_DATA) $(srcdir)/t/*.disabled $(distdir)/t -$(INSTALL_DATA) $(srcdir)/t/*.disabled $(distdir)/t
$(INSTALL_DATA) $(srcdir)/t/*.opt $(srcdir)/t/*.sh $(srcdir)/t/*.slave-mi $(distdir)/t $(INSTALL_DATA) $(srcdir)/t/*.opt $(srcdir)/t/*.sh $(srcdir)/t/*.slave-mi $(distdir)/t
$(INSTALL_DATA) $(srcdir)/include/*.inc $(distdir)/include $(INSTALL_DATA) $(srcdir)/include/*.inc $(distdir)/include
$(INSTALL_DATA) $(srcdir)/r/*.result $(srcdir)/r/*.result.es $(srcdir)/r/*.require $(distdir)/r $(INSTALL_DATA) $(srcdir)/r/*.result $(srcdir)/r/*.require $(distdir)/r
$(INSTALL_DATA) $(srcdir)/std_data/Moscow_leap $(distdir)/std_data $(INSTALL_DATA) $(srcdir)/std_data/Moscow_leap $(distdir)/std_data
$(INSTALL_DATA) $(srcdir)/std_data/*.dat $(srcdir)/std_data/*.000001 $(distdir)/std_data $(INSTALL_DATA) $(srcdir)/std_data/*.dat $(srcdir)/std_data/*.000001 $(distdir)/std_data
$(INSTALL_DATA) $(srcdir)/std_data/des_key_file $(distdir)/std_data $(INSTALL_DATA) $(srcdir)/std_data/des_key_file $(distdir)/std_data
$(INSTALL_DATA) $(srcdir)/std_data/*.pem $(distdir)/std_data $(INSTALL_DATA) $(srcdir)/std_data/*.pem $(distdir)/std_data
$(INSTALL_DATA) $(srcdir)/std_data/*.frm $(distdir)/std_data $(INSTALL_DATA) $(srcdir)/std_data/*.frm $(distdir)/std_data
$(INSTALL_DATA) $(srcdir)/lib/init_db.sql $(distdir)/lib
$(INSTALL_DATA) $(srcdir)/lib/*.pl $(distdir)/lib
install-data-local: install-data-local:
$(mkinstalldirs) \ $(mkinstalldirs) \
$(DESTDIR)$(testdir)/t \ $(DESTDIR)$(testdir)/t \
$(DESTDIR)$(testdir)/r \ $(DESTDIR)$(testdir)/r \
$(DESTDIR)$(testdir)/include \ $(DESTDIR)$(testdir)/include \
$(DESTDIR)$(testdir)/std_data $(DESTDIR)$(testdir)/std_data \
$(DESTDIR)$(testdir)/lib
$(INSTALL_DATA) $(srcdir)/README $(DESTDIR)$(testdir) $(INSTALL_DATA) $(srcdir)/README $(DESTDIR)$(testdir)
$(INSTALL_DATA) $(srcdir)/t/*.test $(DESTDIR)$(testdir)/t $(INSTALL_DATA) $(srcdir)/t/*.test $(DESTDIR)$(testdir)/t
-$(INSTALL_DATA) $(srcdir)/t/*.disabled $(DESTDIR)$(testdir)/t -$(INSTALL_DATA) $(srcdir)/t/*.disabled $(DESTDIR)$(testdir)/t
...@@ -71,7 +74,6 @@ install-data-local: ...@@ -71,7 +74,6 @@ install-data-local:
$(INSTALL_DATA) $(srcdir)/t/*.sh $(DESTDIR)$(testdir)/t $(INSTALL_DATA) $(srcdir)/t/*.sh $(DESTDIR)$(testdir)/t
$(INSTALL_DATA) $(srcdir)/t/*.slave-mi $(DESTDIR)$(testdir)/t $(INSTALL_DATA) $(srcdir)/t/*.slave-mi $(DESTDIR)$(testdir)/t
$(INSTALL_DATA) $(srcdir)/r/*.result $(DESTDIR)$(testdir)/r $(INSTALL_DATA) $(srcdir)/r/*.result $(DESTDIR)$(testdir)/r
$(INSTALL_DATA) $(srcdir)/r/*.result.es $(DESTDIR)$(testdir)/r
$(INSTALL_DATA) $(srcdir)/r/*.require $(DESTDIR)$(testdir)/r $(INSTALL_DATA) $(srcdir)/r/*.require $(DESTDIR)$(testdir)/r
$(INSTALL_DATA) $(srcdir)/include/*.inc $(DESTDIR)$(testdir)/include $(INSTALL_DATA) $(srcdir)/include/*.inc $(DESTDIR)$(testdir)/include
$(INSTALL_DATA) $(srcdir)/std_data/*.dat $(DESTDIR)$(testdir)/std_data $(INSTALL_DATA) $(srcdir)/std_data/*.dat $(DESTDIR)$(testdir)/std_data
...@@ -80,6 +82,8 @@ install-data-local: ...@@ -80,6 +82,8 @@ install-data-local:
$(INSTALL_DATA) $(srcdir)/std_data/Moscow_leap $(DESTDIR)$(testdir)/std_data $(INSTALL_DATA) $(srcdir)/std_data/Moscow_leap $(DESTDIR)$(testdir)/std_data
$(INSTALL_DATA) $(srcdir)/std_data/*.pem $(DESTDIR)$(testdir)/std_data $(INSTALL_DATA) $(srcdir)/std_data/*.pem $(DESTDIR)$(testdir)/std_data
$(INSTALL_DATA) $(srcdir)/std_data/*.frm $(DESTDIR)$(testdir)/std_data $(INSTALL_DATA) $(srcdir)/std_data/*.frm $(DESTDIR)$(testdir)/std_data
$(INSTALL_DATA) $(srcdir)/lib/init_db.sql $(DESTDIR)$(testdir)/lib
$(INSTALL_DATA) $(srcdir)/lib/*.pl $(DESTDIR)$(testdir)/lib
std_data/%.pem: std_data/%.pem:
@CP@ $(top_srcdir)/SSL/$(@F) $(srcdir)/std_data @CP@ $(top_srcdir)/SSL/$(@F) $(srcdir)/std_data
......
-- require r/have_isam.require --require r/big_test.require
disable_query_log; disable_query_log;
show variables like "have_isam"; eval select $BIG_TEST as using_big_test;
enable_query_log; enable_query_log;
...@@ -635,7 +635,6 @@ sub command_line_setup () { ...@@ -635,7 +635,6 @@ sub command_line_setup () {
{ {
mtr_error("Can't use --extern with --embedded-server"); mtr_error("Can't use --extern with --embedded-server");
} }
$opt_result_ext= ".es";
} }
# FIXME don't understand what this is # FIXME don't understand what this is
......
...@@ -416,7 +416,7 @@ while test $# -gt 0; do ...@@ -416,7 +416,7 @@ while test $# -gt 0; do
fi fi
# >=2.1.2 requires the --tool option, some versions write to stdout, some to stderr # >=2.1.2 requires the --tool option, some versions write to stdout, some to stderr
valgrind --help 2>&1 | grep "\-\-tool" > /dev/null && VALGRIND="$VALGRIND --tool=memcheck" valgrind --help 2>&1 | grep "\-\-tool" > /dev/null && VALGRIND="$VALGRIND --tool=memcheck"
VALGRIND="$VALGRIND --alignment=8 --leak-check=yes --num-callers=16" VALGRIND="$VALGRIND --alignment=8 --leak-check=yes --num-callers=16 --suppressions=$CWD/valgrind.supp"
EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT --skip-safemalloc --skip-bdb" EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT --skip-safemalloc --skip-bdb"
EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT --skip-safemalloc --skip-bdb" EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT --skip-safemalloc --skip-bdb"
SLEEP_TIME_AFTER_RESTART=10 SLEEP_TIME_AFTER_RESTART=10
...@@ -1179,7 +1179,7 @@ start_master() ...@@ -1179,7 +1179,7 @@ start_master()
--default-character-set=$CHARACTER_SET \ --default-character-set=$CHARACTER_SET \
--tmpdir=$MYSQL_TMP_DIR \ --tmpdir=$MYSQL_TMP_DIR \
--language=$LANGUAGE \ --language=$LANGUAGE \
--innodb_data_file_path=ibdata1:50M \ --innodb_data_file_path=ibdata1:128M:autoextend \
--open-files-limit=1024 \ --open-files-limit=1024 \
$MASTER_40_ARGS \ $MASTER_40_ARGS \
$SMALL_SERVER \ $SMALL_SERVER \
...@@ -1200,7 +1200,7 @@ start_master() ...@@ -1200,7 +1200,7 @@ start_master()
$USE_NDBCLUSTER \ $USE_NDBCLUSTER \
--tmpdir=$MYSQL_TMP_DIR \ --tmpdir=$MYSQL_TMP_DIR \
--language=$LANGUAGE \ --language=$LANGUAGE \
--innodb_data_file_path=ibdata1:50M \ --innodb_data_file_path=ibdata1:128M:autoextend \
$MASTER_40_ARGS \ $MASTER_40_ARGS \
$SMALL_SERVER \ $SMALL_SERVER \
$EXTRA_MASTER_OPT $EXTRA_MASTER_MYSQLD_OPT \ $EXTRA_MASTER_OPT $EXTRA_MASTER_MYSQLD_OPT \
......
...@@ -94,7 +94,7 @@ select 10.0+cast('a' as decimal); ...@@ -94,7 +94,7 @@ select 10.0+cast('a' as decimal);
10.0+cast('a' as decimal) 10.0+cast('a' as decimal)
10.00 10.00
Warnings: Warnings:
Error 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: 'a'
select 10E+0+'a'; select 10E+0+'a';
10E+0+'a' 10E+0+'a'
10 10
......
...@@ -267,11 +267,15 @@ drop table t1; ...@@ -267,11 +267,15 @@ drop table t1;
create table t1 (a int not null, b int, primary key (a)); create table t1 (a int not null, b int, primary key (a));
insert into t1 values (1,1); insert into t1 values (1,1);
create table if not exists t1 select 2; create table if not exists t1 select 2;
Warnings:
Warning 1364 Field 'a' doesn't have a default value
select * from t1; select * from t1;
a b a b
1 1 1 1
0 2 0 2
create table if not exists t1 select 3 as 'a',4 as 'b'; create table if not exists t1 select 3 as 'a',4 as 'b';
Warnings:
Warning 1364 Field 'a' doesn't have a default value
create table if not exists t1 select 3 as 'a',3 as 'b'; create table if not exists t1 select 3 as 'a',3 as 'b';
ERROR 23000: Duplicate entry '3' for key 1 ERROR 23000: Duplicate entry '3' for key 1
select * from t1; select * from t1;
......
...@@ -220,12 +220,12 @@ select * from t1 where match a against ("te*" in boolean mode)+0; ...@@ -220,12 +220,12 @@ select * from t1 where match a against ("te*" in boolean mode)+0;
a a
test test
drop table t1; drop table t1;
create table t1 (word varchar(255) not null, word2 varchar(255) not null, index(word)); create table t1 (word varchar(255) not null, word2 varchar(255) not null default '', index(word));
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`word` varchar(255) collate latin1_german2_ci NOT NULL, `word` varchar(255) collate latin1_german2_ci NOT NULL,
`word2` varchar(255) collate latin1_german2_ci NOT NULL, `word2` varchar(255) collate latin1_german2_ci NOT NULL default '',
KEY `word` (`word`) KEY `word` (`word`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci
insert into t1 (word) values ('ss'),(0xDF),(0xE4),('ae'); insert into t1 (word) values ('ss'),(0xDF),(0xE4),('ae');
......
No preview for this file type
...@@ -30,13 +30,13 @@ table7, table8, table9, table10, table11, table12, table13, ...@@ -30,13 +30,13 @@ table7, table8, table9, table10, table11, table12, table13,
table14, table15, table16, table17, table18, table19, table20, table14, table15, table16, table17, table18, table19, table20,
table21, table22, table23, table24, table25, table26, table27, table21, table22, table23, table24, table25, table26, table27,
table28; table28;
ERROR 42S02: Unknown table 'table1,table2,table3,table4,table5,table6,table7,table8,table9,table10,table11,table12,table13,table14,table15,table16,table17,table18,table19,table20,table21,table22,table23,table' ERROR 42S02: Unknown table 'table1,table2,table3,table4,table5,table6,table7,table8,table9,table10,table11,table12,table13,table'
drop table table1, table2, table3, table4, table5, table6, drop table table1, table2, table3, table4, table5, table6,
table7, table8, table9, table10, table11, table12, table13, table7, table8, table9, table10, table11, table12, table13,
table14, table15, table16, table17, table18, table19, table20, table14, table15, table16, table17, table18, table19, table20,
table21, table22, table23, table24, table25, table26, table27, table21, table22, table23, table24, table25, table26, table27,
table28, table29, table30; table28, table29, table30;
ERROR 42S02: Unknown table 'table1,table2,table3,table4,table5,table6,table7,table8,table9,table10,table11,table12,table13,table14,table15,table16,table17,table18,table19,table20,table21,table22,table23,table' ERROR 42S02: Unknown table 'table1,table2,table3,table4,table5,table6,table7,table8,table9,table10,table11,table12,table13,table'
use test; use test;
drop database mysqltest; drop database mysqltest;
flush tables with read lock; flush tables with read lock;
......
...@@ -758,7 +758,6 @@ SPATIAL KEY(g) ...@@ -758,7 +758,6 @@ SPATIAL KEY(g)
INSERT INTO t1 (g) VALUES (GeomFromText('LineString(1 2, 2 3)')),(GeomFromText('LineString(1 2, 2 4)')); INSERT INTO t1 (g) VALUES (GeomFromText('LineString(1 2, 2 3)')),(GeomFromText('LineString(1 2, 2 4)'));
drop table t1; drop table t1;
CREATE TABLE t1 ( CREATE TABLE t1 (
geoobjid INT NOT NULL,
line LINESTRING NOT NULL, line LINESTRING NOT NULL,
kind ENUM('po', 'pp', 'rr', 'dr', 'rd', 'ts', 'cl') NOT NULL DEFAULT 'po', kind ENUM('po', 'pp', 'rr', 'dr', 'rd', 'ts', 'cl') NOT NULL DEFAULT 'po',
name VARCHAR(32), name VARCHAR(32),
......
...@@ -157,6 +157,10 @@ select 1; ...@@ -157,6 +157,10 @@ select 1;
1 1
1 1
insert into mysql.user (host, user) values ('localhost', 'test11'); insert into mysql.user (host, user) values ('localhost', 'test11');
Warnings:
Warning 1364 Field 'ssl_cipher' doesn't have a default value
Warning 1364 Field 'x509_issuer' doesn't have a default value
Warning 1364 Field 'x509_subject' doesn't have a default value
insert into mysql.db (host, db, user, select_priv) values insert into mysql.db (host, db, user, select_priv) values
('localhost', 'a%', 'test11', 'Y'), ('localhost', 'ab%', 'test11', 'Y'); ('localhost', 'a%', 'test11', 'Y'), ('localhost', 'ab%', 'test11', 'Y');
alter table mysql.db order by db asc; alter table mysql.db order by db asc;
......
...@@ -261,6 +261,10 @@ GRANT INSERT, UPDATE, DELETE ON `mysql`.* TO 'mysqltest_3'@'localhost' ...@@ -261,6 +261,10 @@ GRANT INSERT, UPDATE, DELETE ON `mysql`.* TO 'mysqltest_3'@'localhost'
select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password; select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password;
ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for table 'user' ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for table 'user'
insert into mysql.user set host='%', user='mysqltest_B'; insert into mysql.user set host='%', user='mysqltest_B';
Warnings:
Warning 1364 Field 'ssl_cipher' doesn't have a default value
Warning 1364 Field 'x509_issuer' doesn't have a default value
Warning 1364 Field 'x509_subject' doesn't have a default value
create user mysqltest_A@'%'; create user mysqltest_A@'%';
rename user mysqltest_B@'%' to mysqltest_C@'%'; rename user mysqltest_B@'%' to mysqltest_C@'%';
drop user mysqltest_C@'%'; drop user mysqltest_C@'%';
......
Variable_name Value
have_isam YES
...@@ -436,30 +436,30 @@ f 10 ...@@ -436,30 +436,30 @@ f 10
g 10 g 10
h 10 h 10
i 10 i 10
select sql_big_result v,count(t) from t1 group by v limit 10; select sql_big_result trim(v),count(t) from t1 group by v limit 10;
v count(t) trim(v) count(t)
a 1 a 1
a 10 a 10
b 10 b 10
c 10 c 10
d 10 d 10
e 10 e 10
f 10 f 10
g 10 g 10
h 10 h 10
i 10 i 10
select sql_big_result v,count(c) from t1 group by v limit 10; select sql_big_result trim(v),count(c) from t1 group by v limit 10;
v count(c) trim(v) count(c)
a 1 a 1
a 10 a 10
b 10 b 10
c 10 c 10
d 10 d 10
e 10 e 10
f 10 f 10
g 10 g 10
h 10 h 10
i 10 i 10
select c,count(*) from t1 group by c limit 10; select c,count(*) from t1 group by c limit 10;
c count(*) c count(*)
a 1 a 1
...@@ -520,18 +520,18 @@ f 10 ...@@ -520,18 +520,18 @@ f 10
g 10 g 10
h 10 h 10
i 10 i 10
select sql_big_result t,count(t) from t1 group by t limit 10; select sql_big_result trim(t),count(t) from t1 group by t limit 10;
t count(t) trim(t) count(t)
a 1 a 1
a 10 a 10
b 10 b 10
c 10 c 10
d 10 d 10
e 10 e 10
f 10 f 10
g 10 g 10
h 10 h 10
i 10 i 10
drop table t1; drop table t1;
create table t1 (a char(10), unique (a)); create table t1 (a char(10), unique (a));
insert into t1 values ('a'); insert into t1 values ('a');
...@@ -667,14 +667,7 @@ drop table t1; ...@@ -667,14 +667,7 @@ drop table t1;
set storage_engine=MyISAM; set storage_engine=MyISAM;
create table t1 (a bigint unsigned auto_increment primary key, b int, create table t1 (a bigint unsigned auto_increment primary key, b int,
key (b, a)) engine=heap; key (b, a)) engine=heap;
insert t1 (b) values (1); insert t1 (b) values (1),(1),(1),(1),(1),(1),(1),(1);
insert t1 (b) values (1);
insert t1 (b) values (1);
insert t1 (b) values (1);
insert t1 (b) values (1);
insert t1 (b) values (1);
insert t1 (b) values (1);
insert t1 (b) values (1);
select * from t1; select * from t1;
a b a b
1 1 1 1
...@@ -688,14 +681,7 @@ a b ...@@ -688,14 +681,7 @@ a b
drop table t1; drop table t1;
create table t1 (a int not null, b int not null auto_increment, create table t1 (a int not null, b int not null auto_increment,
primary key(a, b), key(b)) engine=heap; primary key(a, b), key(b)) engine=heap;
insert t1 (a) values (1); insert t1 (a) values (1),(1),(1),(1),(1),(1),(1),(1);
insert t1 (a) values (1);
insert t1 (a) values (1);
insert t1 (a) values (1);
insert t1 (a) values (1);
insert t1 (a) values (1);
insert t1 (a) values (1);
insert t1 (a) values (1);
select * from t1; select * from t1;
a b a b
1 1 1 1
...@@ -707,3 +693,6 @@ a b ...@@ -707,3 +693,6 @@ a b
1 7 1 7
1 8 1 8
drop table t1; drop table t1;
create table t1 (a int not null, b int not null auto_increment,
primary key(a, b)) engine=heap;
ERROR 42000: Incorrect table definition; there can be only one auto column and it must be defined as a key
insert into mysql.help_category(help_category_id,name)values(1,'impossible_category_1'); insert into mysql.help_category(help_category_id,name)values(1,'impossible_category_1');
Warnings:
Warning 1364 Field 'url' doesn't have a default value
select @category1_id:= 1; select @category1_id:= 1;
@category1_id:= 1 @category1_id:= 1
1 1
insert into mysql.help_category(help_category_id,name)values(2,'impossible_category_2'); insert into mysql.help_category(help_category_id,name)values(2,'impossible_category_2');
Warnings:
Warning 1364 Field 'url' doesn't have a default value
select @category2_id:= 2; select @category2_id:= 2;
@category2_id:= 2 @category2_id:= 2
2 2
insert into mysql.help_category(help_category_id,name,parent_category_id)values(3,'impossible_category_3',@category2_id); insert into mysql.help_category(help_category_id,name,parent_category_id)values(3,'impossible_category_3',@category2_id);
Warnings:
Warning 1364 Field 'url' doesn't have a default value
select @category3_id:= 3; select @category3_id:= 3;
@category3_id:= 3 @category3_id:= 3
3 3
insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(1,'impossible_function_1',@category1_id,'description of \n impossible_function1\n','example of \n impossible_function1'); insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(1,'impossible_function_1',@category1_id,'description of \n impossible_function1\n','example of \n impossible_function1');
Warnings:
Warning 1364 Field 'url' doesn't have a default value
select @topic1_id:= 1; select @topic1_id:= 1;
@topic1_id:= 1 @topic1_id:= 1
1 1
insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(2,'impossible_function_2',@category1_id,'description of \n impossible_function2\n','example of \n impossible_function2'); insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(2,'impossible_function_2',@category1_id,'description of \n impossible_function2\n','example of \n impossible_function2');
Warnings:
Warning 1364 Field 'url' doesn't have a default value
select @topic2_id:= 2; select @topic2_id:= 2;
@topic2_id:= 2 @topic2_id:= 2
2 2
insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(3,'impossible_function_3',@category2_id,'description of \n impossible_function3\n','example of \n impossible_function3'); insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(3,'impossible_function_3',@category2_id,'description of \n impossible_function3\n','example of \n impossible_function3');
Warnings:
Warning 1364 Field 'url' doesn't have a default value
select @topic3_id:= 3; select @topic3_id:= 3;
@topic3_id:= 3 @topic3_id:= 3
3 3
insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(4,'impossible_function_4',@category2_id,'description of \n impossible_function4\n','example of \n impossible_function4'); insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(4,'impossible_function_4',@category2_id,'description of \n impossible_function4\n','example of \n impossible_function4');
Warnings:
Warning 1364 Field 'url' doesn't have a default value
select @topic4_id:= 4; select @topic4_id:= 4;
@topic4_id:= 4 @topic4_id:= 4
4 4
insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(5,'impossible_function_7',@category3_id,'description of \n impossible_function5\n','example of \n impossible_function7'); insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(5,'impossible_function_7',@category3_id,'description of \n impossible_function5\n','example of \n impossible_function7');
Warnings:
Warning 1364 Field 'url' doesn't have a default value
select @topic5_id:= 5; select @topic5_id:= 5;
@topic5_id:= 5 @topic5_id:= 5
5 5
......
...@@ -22,11 +22,11 @@ mysql ...@@ -22,11 +22,11 @@ mysql
test test
show databases where `database` = 't%'; show databases where `database` = 't%';
Database Database
create database testtets; create database mysqltest;
create table testtets.t1(a int, b VARCHAR(30), KEY string_data (b)); create table mysqltest.t1(a int, b VARCHAR(30), KEY string_data (b));
create table test.t2(a int); create table test.t2(a int);
create table t3(a int, KEY a_data (a)); create table t3(a int, KEY a_data (a));
create table testtets.t4(a int); create table mysqltest.t4(a int);
create view v1 (c) as select table_name from information_schema.TABLES; create view v1 (c) as select table_name from information_schema.TABLES;
select * from v1; select * from v1;
c c
...@@ -62,11 +62,11 @@ time_zone_name ...@@ -62,11 +62,11 @@ time_zone_name
time_zone_transition time_zone_transition
time_zone_transition_type time_zone_transition_type
user user
t1
t4
t2 t2
t3 t3
v1 v1
t1
t4
select c,table_name from v1 select c,table_name from v1
left join information_schema.TABLES v2 on (v1.c=v2.table_name) left join information_schema.TABLES v2 on (v1.c=v2.table_name)
where v1.c like "t%"; where v1.c like "t%";
...@@ -80,10 +80,10 @@ time_zone_leap_second time_zone_leap_second ...@@ -80,10 +80,10 @@ time_zone_leap_second time_zone_leap_second
time_zone_name time_zone_name time_zone_name time_zone_name
time_zone_transition time_zone_transition time_zone_transition time_zone_transition
time_zone_transition_type time_zone_transition_type time_zone_transition_type time_zone_transition_type
t2 t2
t3 t3
t1 t1 t1 t1
t4 t4 t4 t4
t2 t2
t3 t3
select c, v2.table_name from v1 select c, v2.table_name from v1
right join information_schema.TABLES v2 on (v1.c=v2.table_name) right join information_schema.TABLES v2 on (v1.c=v2.table_name)
where v1.c like "t%"; where v1.c like "t%";
...@@ -97,18 +97,18 @@ time_zone_leap_second time_zone_leap_second ...@@ -97,18 +97,18 @@ time_zone_leap_second time_zone_leap_second
time_zone_name time_zone_name time_zone_name time_zone_name
time_zone_transition time_zone_transition time_zone_transition time_zone_transition
time_zone_transition_type time_zone_transition_type time_zone_transition_type time_zone_transition_type
t2 t2
t3 t3
t1 t1 t1 t1
t4 t4 t4 t4
t2 t2
t3 t3
select table_name from information_schema.TABLES select table_name from information_schema.TABLES
where table_schema = "testtets" and table_name like "t%"; where table_schema = "mysqltest" and table_name like "t%";
table_name table_name
t1 t1
t4 t4
select * from information_schema.STATISTICS where TABLE_SCHEMA = "testtets"; select * from information_schema.STATISTICS where TABLE_SCHEMA = "mysqltest";
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT
NULL testtets t1 1 testtets string_data 1 b A NULL NULL NULL YES BTREE NULL mysqltest t1 1 mysqltest string_data 1 b A NULL NULL NULL YES BTREE
show keys from t3 where Key_name = "a_data"; show keys from t3 where Key_name = "a_data";
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t3 1 a_data 1 a A NULL NULL NULL YES BTREE t3 1 a_data 1 a A NULL NULL NULL YES BTREE
...@@ -133,13 +133,22 @@ c varchar(64) utf8_general_ci NO select,insert,update,references ...@@ -133,13 +133,22 @@ c varchar(64) utf8_general_ci NO select,insert,update,references
select * from information_schema.COLUMNS where table_name="t1" select * from information_schema.COLUMNS where table_name="t1"
and column_name= "a"; and column_name= "a";
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
NULL testtets t1 a 1 NULL YES int NULL NULL 11 0 NULL NULL int(11) select,insert,update,references NULL mysqltest t1 a 1 NULL YES int NULL NULL 11 0 NULL NULL int(11) select,insert,update,references
show columns from testtets.t1 where field like "%a%"; show columns from mysqltest.t1 where field like "%a%";
Field Type Null Key Default Extra
a int(11) YES NULL
grant select (a) on mysqltest.t1 to mysqltest_2@localhost;
select table_name, column_name, privileges from information_schema.columns
where table_schema = 'mysqltest' and table_name = 't1';
table_name column_name privileges
t1 a select
show columns from mysqltest.t1;
Field Type Null Key Default Extra Field Type Null Key Default Extra
a int(11) YES NULL a int(11) YES NULL
b varchar(30) YES MUL NULL
drop view v1; drop view v1;
drop tables testtets.t4, testtets.t1, t2, t3; drop tables mysqltest.t4, mysqltest.t1, t2, t3;
drop database testtets; drop database mysqltest;
select * from information_schema.CHARACTER_SETS select * from information_schema.CHARACTER_SETS
where CHARACTER_SET_NAME like 'latin1%'; where CHARACTER_SET_NAME like 'latin1%';
CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN
...@@ -352,8 +361,8 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRAN ...@@ -352,8 +361,8 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRAN
'mysqltest_1'@'localhost' NULL test t1 a REFERENCES NO 'mysqltest_1'@'localhost' NULL test t1 a REFERENCES NO
delete from mysql.user where user='mysqltest_1' or user='mysqltest_2'; delete from mysql.user where user='mysqltest_1' or user='mysqltest_2';
delete from mysql.db where user='mysqltest_1' or user='mysqltest_2'; delete from mysql.db where user='mysqltest_1' or user='mysqltest_2';
delete from mysql.tables_priv where user='mysqltest_1'; delete from mysql.tables_priv where user='mysqltest_1' or user='mysqltest_2';
delete from mysql.columns_priv where user='mysqltest_1'; delete from mysql.columns_priv where user='mysqltest_1' or user='mysqltest_2';
flush privileges; flush privileges;
drop table t1; drop table t1;
create table t1 (a int null, primary key(a)); create table t1 (a int null, primary key(a));
......
DROP TABLE IF EXISTS t1, t2, t3, t4;
CREATE TABLE t1 (id INTEGER) ENGINE=MYISAM;
CREATE TABLE t2 (id INTEGER primary key) ENGINE=INNODB;
CREATE TABLE t3 (a char(32) primary key,id INTEGER) ENGINE=INNODB;
CREATE TABLE t4 (a char(32) primary key,id INTEGER) ENGINE=MYISAM;
INSERT INTO t1 (id) VALUES (1);
INSERT INTO t1 SELECT id+1 FROM t1;
INSERT INTO t1 SELECT id+2 FROM t1;
INSERT INTO t1 SELECT id+4 FROM t1;
INSERT INTO t1 SELECT id+8 FROM t1;
INSERT INTO t1 SELECT id+16 FROM t1;
INSERT INTO t1 SELECT id+32 FROM t1;
INSERT INTO t1 SELECT id+64 FROM t1;
INSERT INTO t1 SELECT id+128 FROM t1;
INSERT INTO t1 SELECT id+256 FROM t1;
INSERT INTO t1 SELECT id+512 FROM t1;
INSERT INTO t1 SELECT id+1024 FROM t1;
INSERT INTO t1 SELECT id+2048 FROM t1;
INSERT INTO t1 SELECT id+4096 FROM t1;
INSERT INTO t1 SELECT id+8192 FROM t1;
INSERT INTO t1 SELECT id+16384 FROM t1;
INSERT INTO t1 SELECT id+32768 FROM t1;
INSERT INTO t1 SELECT id+65536 FROM t1;
INSERT INTO t1 SELECT id+131072 FROM t1;
INSERT INTO t1 SELECT id+262144 FROM t1;
INSERT INTO t1 SELECT id+524288 FROM t1;
INSERT INTO t1 SELECT id+1048576 FROM t1;
INSERT INTO t2 SELECT * FROM t1;
INSERT INTO t3 SELECT concat(id),id from t2 ORDER BY -id;
INSERT INTO t4 SELECT * from t3 ORDER BY concat(a);
select sum(id) from t3;
sum(id)
2199024304128
drop table t1,t2,t3,t4;
...@@ -924,3 +924,22 @@ a b a b ...@@ -924,3 +924,22 @@ a b a b
3 1 NULL NULL 3 1 NULL NULL
4 2 NULL NULL 4 2 NULL NULL
DROP TABLE t1,t2; DROP TABLE t1,t2;
set group_concat_max_len=5;
create table t1 (a int, b varchar(20));
create table t2 (a int, c varchar(20));
insert into t1 values (1,"aaaaaaaaaa"),(2,"bbbbbbbbbb");
insert into t2 values (1,"cccccccccc"),(2,"dddddddddd");
select group_concat(t1.b,t2.c) from t1 left join t2 using(a) group by t1.a;
group_concat(t1.b,t2.c)
aaaaa
bbbbb
Warnings:
Warning 1260 2 line(s) were cut by GROUP_CONCAT()
select group_concat(t1.b,t2.c) from t1 inner join t2 using(a) group by t1.a;
group_concat(t1.b,t2.c)
aaaaa
bbbbb
Warnings:
Warning 1260 2 line(s) were cut by GROUP_CONCAT()
drop table t1, t2;
set group_concat_max_len=default;
...@@ -5,6 +5,8 @@ select ((@id := kill_id) - kill_id) from t1; ...@@ -5,6 +5,8 @@ select ((@id := kill_id) - kill_id) from t1;
((@id := kill_id) - kill_id) ((@id := kill_id) - kill_id)
0 0
kill @id; kill @id;
select 1;
Got one of the listed errors
select ((@id := kill_id) - kill_id) from t1; select ((@id := kill_id) - kill_id) from t1;
((@id := kill_id) - kill_id) ((@id := kill_id) - kill_id)
0 0
......
drop table if exists t1; drop table if exists t1;
create table t1 (a int primary key, b int not null); create table t1 (a int not null default 0 primary key, b int not null default 0);
insert into t1 () values (); insert into t1 () values ();
insert into t1 values (1,1),(2,1),(3,1); insert into t1 values (1,1),(2,1),(3,1);
update t1 set a=4 where b=1 limit 1; update t1 set a=4 where b=1 limit 1;
......
...@@ -40,7 +40,7 @@ insert into t1 values ...@@ -40,7 +40,7 @@ insert into t1 values
(0,4,3,5,"PENDING",1,7),(NULL,4,3,5,"PENDING",1,7),(31,4,3,5,"PENDING",1,7), (7,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7), (100,4,3,5,"PENDING",1,7), (99,4,3,5,"PENDING",1,7), (8,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7); (0,4,3,5,"PENDING",1,7),(NULL,4,3,5,"PENDING",1,7),(31,4,3,5,"PENDING",1,7), (7,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7), (100,4,3,5,"PENDING",1,7), (99,4,3,5,"PENDING",1,7), (8,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7);
show table status; show table status;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 ndbcluster 10 Dynamic 9 96 # # 0 # 101 # # # latin1_swedish_ci NULL # t1 ndbcluster 10 Dynamic 9 96 # # 0 # 102 # # # latin1_swedish_ci NULL #
select * from t1 order by col1; select * from t1 order by col1;
col1 col2 col3 col4 col5 col6 to_be_deleted col1 col2 col3 col4 col5 col6 to_be_deleted
0 4 3 5 PENDING 1 7 0 4 3 5 PENDING 1 7
...@@ -179,7 +179,7 @@ a b c ...@@ -179,7 +179,7 @@ a b c
2 two two 2 two two
alter table t1 drop index c; alter table t1 drop index c;
select * from t1 where b = 'two'; select * from t1 where b = 'two';
ERROR 42S02: Table 'test.t1' doesn't exist ERROR HY000: Table definition has changed, please retry transaction
select * from t1 where b = 'two'; select * from t1 where b = 'two';
a b c a b c
2 two two 2 two two
......
...@@ -607,3 +607,63 @@ primary key (a)) ...@@ -607,3 +607,63 @@ primary key (a))
engine=ndb engine=ndb
max_rows=1; max_rows=1;
drop table t1; drop table t1;
create table t1
(counter int(64) NOT NULL auto_increment,
datavalue char(40) default 'XXXX',
primary key (counter)
) ENGINE=ndbcluster;
insert into t1 (datavalue) values ('newval');
insert into t1 (datavalue) values ('newval');
select * from t1 order by counter;
counter datavalue
1 newval
2 newval
insert into t1 (datavalue) select datavalue from t1 where counter < 100;
insert into t1 (datavalue) select datavalue from t1 where counter < 100;
select * from t1 order by counter;
counter datavalue
1 newval
2 newval
3 newval
4 newval
5 newval
6 newval
7 newval
8 newval
insert into t1 (datavalue) select datavalue from t1 where counter < 100;
insert into t1 (datavalue) select datavalue from t1 where counter < 100;
select * from t1 order by counter;
counter datavalue
1 newval
2 newval
3 newval
4 newval
5 newval
6 newval
7 newval
8 newval
35 newval
36 newval
37 newval
38 newval
39 newval
40 newval
41 newval
42 newval
43 newval
44 newval
45 newval
46 newval
47 newval
48 newval
49 newval
50 newval
51 newval
52 newval
53 newval
54 newval
55 newval
56 newval
57 newval
58 newval
drop table t1;
...@@ -1023,6 +1023,62 @@ auto ...@@ -1023,6 +1023,62 @@ auto
1 1
3 3
4 4
update t1
set medium = 17
where
string = "aaaa" and
vstring = "aaaa" and
bin = 0xAAAA and
vbin = 0xAAAA and
tiny = -1 and
short = -1 and
medium = -1 and
long_int = -1 and
longlong = -1 and
real_float > 1.0 and real_float < 2.0 and
real_double > 1.0 and real_double < 2.0 and
real_decimal > 1.0 and real_decimal < 2.0 and
utiny = 1 and
ushort = 1 and
umedium = 1 and
ulong = 1 and
ulonglong = 1 and
/* bits = b'001' and */
options = 'one' and
flags = 'one' and
date_field = '1901-01-01' and
year_field = '1901' and
time_field = '01:01:01' and
date_time = '1901-01-01 01:01:01';
delete from t1
where
string = "aaaa" and
vstring = "aaaa" and
bin = 0xAAAA and
vbin = 0xAAAA and
tiny = -1 and
short = -1 and
medium = 17 and
long_int = -1 and
longlong = -1 and
real_float > 1.0 and real_float < 2.0 and
real_double > 1.0 and real_double < 2.0 and
real_decimal > 1.0 and real_decimal < 2.0 and
utiny = 1 and
ushort = 1 and
umedium = 1 and
ulong = 1 and
ulonglong = 1 and
/* bits = b'001' and */
options = 'one' and
flags = 'one' and
date_field = '1901-01-01' and
year_field = '1901' and
time_field = '01:01:01' and
date_time = '1901-01-01 01:01:01';
select count(*) from t1;
count(*)
3
explain explain
select * from t2 where attr3 is null or attr1 > 2 and pk1= 3 order by pk1; select * from t2 where attr3 is null or attr1 > 2 and pk1= 3 order by pk1;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
...@@ -1078,7 +1134,7 @@ pk1 attr1 attr2 attr3 attr4 pk1 attr1 attr2 attr3 attr4 ...@@ -1078,7 +1134,7 @@ pk1 attr1 attr2 attr3 attr4 pk1 attr1 attr2 attr3 attr4
explain explain
select auto from t1 where string = "aaaa" collate latin1_general_ci order by auto; select auto from t1 where string = "aaaa" collate latin1_general_ci order by auto;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using where; Using filesort 1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where; Using filesort
explain explain
select * from t2 where (attr1 < 2) = (attr2 < 2) order by pk1; select * from t2 where (attr1 < 2) = (attr2 < 2) order by pk1;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
......
...@@ -47,3 +47,4 @@ t2 ...@@ -47,3 +47,4 @@ t2
t3 t3
t4 t4
drop table t1, t2, t3, t4; drop table t1, t2, t3, t4;
drop table t1, t3, t4;
...@@ -88,7 +88,7 @@ b ifnull(t2.b,"this is null") ...@@ -88,7 +88,7 @@ b ifnull(t2.b,"this is null")
NULL this is null NULL this is null
NULL this is null NULL this is null
drop table t1; drop table t1;
CREATE TABLE t1 (a varchar(16) NOT NULL, b smallint(6) NOT NULL, c datetime NOT NULL, d smallint(6) NOT NULL); CREATE TABLE t1 (a varchar(16) NOT NULL default '', b smallint(6) NOT NULL default 0, c datetime NOT NULL default '0000-00-00 00:00:00', d smallint(6) NOT NULL default 0);
INSERT INTO t1 SET a = "", d= "2003-01-14 03:54:55"; INSERT INTO t1 SET a = "", d= "2003-01-14 03:54:55";
Warnings: Warnings:
Warning 1265 Data truncated for column 'd' at row 1 Warning 1265 Data truncated for column 'd' at row 1
......
...@@ -257,7 +257,7 @@ favo_tijdschrift varchar(50) NOT NULL default '', ...@@ -257,7 +257,7 @@ favo_tijdschrift varchar(50) NOT NULL default '',
favo_tv varchar(50) NOT NULL default '', favo_tv varchar(50) NOT NULL default '',
favo_eten varchar(50) NOT NULL default '', favo_eten varchar(50) NOT NULL default '',
favo_muziek varchar(30) NOT NULL default '', favo_muziek varchar(30) NOT NULL default '',
info text NOT NULL, info text NOT NULL default '',
ipnr varchar(30) NOT NULL default '', ipnr varchar(30) NOT NULL default '',
PRIMARY KEY (member_id) PRIMARY KEY (member_id)
) ENGINE=MyISAM PACK_KEYS=1; ) ENGINE=MyISAM PACK_KEYS=1;
......
...@@ -524,3 +524,21 @@ execute stmt using @a, @b, @c; ...@@ -524,3 +524,21 @@ execute stmt using @a, @b, @c;
a b c a b c a b c a b c
deallocate prepare stmt; deallocate prepare stmt;
drop table t1,t2; drop table t1,t2;
SET @aux= "SELECT COUNT(*)
FROM INFORMATION_SCHEMA.COLUMNS A,
INFORMATION_SCHEMA.COLUMNS B
WHERE A.TABLE_SCHEMA = B.TABLE_SCHEMA
AND A.TABLE_NAME = B.TABLE_NAME
AND A.COLUMN_NAME = B.COLUMN_NAME AND
A.TABLE_NAME = 'user'";
prepare my_stmt from @aux;
execute my_stmt;
COUNT(*)
37
execute my_stmt;
COUNT(*)
37
execute my_stmt;
COUNT(*)
37
deallocate prepare my_stmt;
...@@ -3,12 +3,10 @@ CREATE TABLE t1 ( ...@@ -3,12 +3,10 @@ CREATE TABLE t1 (
gesuchnr int(11) DEFAULT '0' NOT NULL, gesuchnr int(11) DEFAULT '0' NOT NULL,
benutzer_id int(11) DEFAULT '0' NOT NULL, benutzer_id int(11) DEFAULT '0' NOT NULL,
PRIMARY KEY (gesuchnr,benutzer_id) PRIMARY KEY (gesuchnr,benutzer_id)
) engine=ISAM; );
replace into t1 (gesuchnr,benutzer_id) values (2,1); replace into t1 (gesuchnr,benutzer_id) values (2,1);
replace into t1 (gesuchnr,benutzer_id) values (1,1); replace into t1 (gesuchnr,benutzer_id) values (1,1);
replace into t1 (gesuchnr,benutzer_id) values (1,1); replace into t1 (gesuchnr,benutzer_id) values (1,1);
alter table t1 engine=myisam;
replace into t1 (gesuchnr,benutzer_id) values (1,1);
alter table t1 engine=heap; alter table t1 engine=heap;
replace into t1 (gesuchnr,benutzer_id) values (1,1); replace into t1 (gesuchnr,benutzer_id) values (1,1);
drop table t1; drop table t1;
......
...@@ -15,7 +15,7 @@ select row('a',1.5,3) IN (row(1,2,3), row('a',1.5,3), row('a','a','a')); ...@@ -15,7 +15,7 @@ select row('a',1.5,3) IN (row(1,2,3), row('a',1.5,3), row('a','a','a'));
row('a',1.5,3) IN (row(1,2,3), row('a',1.5,3), row('a','a','a')) row('a',1.5,3) IN (row(1,2,3), row('a',1.5,3), row('a','a','a'))
1 1
Warnings: Warnings:
Error 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect INTEGER value: 'a' Warning 1292 Truncated incorrect INTEGER value: 'a'
select row('a',0,3) IN (row(3,2,3), row('a','a','3'), row(1,3,3)); select row('a',0,3) IN (row(3,2,3), row('a','a','3'), row(1,3,3));
row('a',0,3) IN (row(3,2,3), row('a','a','3'), row(1,3,3)) row('a',0,3) IN (row(3,2,3), row('a','a','3'), row(1,3,3))
......
...@@ -61,6 +61,10 @@ create table t1 (n int); ...@@ -61,6 +61,10 @@ create table t1 (n int);
insert into t1 values(3456); insert into t1 values(3456);
insert into mysql.user (Host, User, Password) insert into mysql.user (Host, User, Password)
VALUES ("10.10.10.%", "blafasel2", password("blafasel2")); VALUES ("10.10.10.%", "blafasel2", password("blafasel2"));
Warnings:
Warning 1364 Field 'ssl_cipher' doesn't have a default value
Warning 1364 Field 'x509_issuer' doesn't have a default value
Warning 1364 Field 'x509_subject' doesn't have a default value
select select_priv,user from mysql.user where user = _binary'blafasel2'; select select_priv,user from mysql.user where user = _binary'blafasel2';
select_priv user select_priv user
N blafasel2 N blafasel2
......
...@@ -89,4 +89,5 @@ a b ...@@ -89,4 +89,5 @@ a b
2 row 2 2 row 2
3 row 3 3 row 3
0 0
drop database rewrite;
drop table t1; drop table t1;
...@@ -195,7 +195,7 @@ h float(3,2) NULL YES NULL select,insert,update,references ...@@ -195,7 +195,7 @@ h float(3,2) NULL YES NULL select,insert,update,references
i float(3,0) NULL YES NULL select,insert,update,references i float(3,0) NULL YES NULL select,insert,update,references
drop table t1; drop table t1;
create table t1 ( create table t1 (
type_bool bool not null, type_bool bool not null default 0,
type_tiny tinyint not null auto_increment primary key, type_tiny tinyint not null auto_increment primary key,
type_short smallint(3), type_short smallint(3),
type_mediumint mediumint, type_mediumint mediumint,
...@@ -206,9 +206,9 @@ empty_char char(0), ...@@ -206,9 +206,9 @@ empty_char char(0),
type_char char(2), type_char char(2),
type_varchar varchar(10), type_varchar varchar(10),
type_timestamp timestamp not null, type_timestamp timestamp not null,
type_date date not null, type_date date not null default '0000-00-00',
type_time time not null, type_time time not null default '00:00:00',
type_datetime datetime not null, type_datetime datetime not null default '0000-00-00 00:00:00',
type_year year, type_year year,
type_enum enum ('red', 'green', 'blue'), type_enum enum ('red', 'green', 'blue'),
type_set enum ('red', 'green', 'blue'), type_set enum ('red', 'green', 'blue'),
...@@ -221,7 +221,7 @@ index(type_short) ...@@ -221,7 +221,7 @@ index(type_short)
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`type_bool` tinyint(1) NOT NULL, `type_bool` tinyint(1) NOT NULL default '0',
`type_tiny` tinyint(4) NOT NULL auto_increment, `type_tiny` tinyint(4) NOT NULL auto_increment,
`type_short` smallint(3) default NULL, `type_short` smallint(3) default NULL,
`type_mediumint` mediumint(9) default NULL, `type_mediumint` mediumint(9) default NULL,
...@@ -232,9 +232,9 @@ t1 CREATE TABLE `t1` ( ...@@ -232,9 +232,9 @@ t1 CREATE TABLE `t1` (
`type_char` char(2) default NULL, `type_char` char(2) default NULL,
`type_varchar` varchar(10) default NULL, `type_varchar` varchar(10) default NULL,
`type_timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `type_timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`type_date` date NOT NULL, `type_date` date NOT NULL default '0000-00-00',
`type_time` time NOT NULL, `type_time` time NOT NULL default '00:00:00',
`type_datetime` datetime NOT NULL, `type_datetime` datetime NOT NULL default '0000-00-00 00:00:00',
`type_year` year(4) default NULL, `type_year` year(4) default NULL,
`type_enum` enum('red','green','blue') default NULL, `type_enum` enum('red','green','blue') default NULL,
`type_set` enum('red','green','blue') default NULL, `type_set` enum('red','green','blue') default NULL,
......
...@@ -503,4 +503,68 @@ ERROR 0A000: LOCK is not allowed in stored procedures ...@@ -503,4 +503,68 @@ ERROR 0A000: LOCK is not allowed in stored procedures
create procedure bug6600() create procedure bug6600()
unlock table t1| unlock table t1|
ERROR 0A000: UNLOCK is not allowed in stored procedures ERROR 0A000: UNLOCK is not allowed in stored procedures
drop procedure if exists bug9566|
create procedure bug9566()
begin
select * from t1;
end|
lock table t1 read|
call bug9566()|
ERROR HY000: Table 'proc' was not locked with LOCK TABLES
unlock tables|
drop procedure bug9566|
drop procedure if exists bug7299|
create procedure bug7299()
begin
declare v int;
declare c cursor for select val from t1;
declare exit handler for sqlexception select 'Error!';
open c;
fetch c into v;
end|
delete from t1|
call bug7299()|
ERROR 02000: No data to FETCH
drop procedure bug7299|
create procedure bug9073()
begin
declare continue handler for sqlexception select 1;
declare continue handler for sqlexception select 2;
end|
ERROR 42000: Duplicate handler declared in the same block
create procedure bug9073()
begin
declare condname1 condition for 1234;
declare continue handler for condname1 select 1;
declare exit handler for condname1 select 2;
end|
ERROR 42000: Duplicate handler declared in the same block
create procedure bug9073()
begin
declare condname1 condition for sqlstate '42000';
declare condname2 condition for sqlstate '42000';
declare exit handler for condname1 select 1;
declare continue handler for condname2 select 2;
end|
ERROR 42000: Duplicate handler declared in the same block
create procedure bug9073()
begin
declare condname1 condition for sqlstate '42000';
declare exit handler for condname1 select 1;
declare exit handler for sqlstate '42000' select 2;
end|
ERROR 42000: Duplicate handler declared in the same block
drop procedure if exists bug9073|
create procedure bug9073()
begin
declare condname1 condition for sqlstate '42000';
declare continue handler for condname1 select 1;
begin
declare exit handler for sqlstate '42000' select 2;
begin
declare continue handler for sqlstate '42000' select 3;
end;
end;
end|
drop procedure bug9073|
drop table t1| drop table t1|
use test; use test;
drop table if exists t1; drop table if exists t1;
create table t1 ( create table t1 (
id char(16) not null, id char(16) not null default '',
data int not null data int not null
); );
drop table if exists t2; drop table if exists t2;
...@@ -2164,7 +2164,7 @@ tinyint 1 -128 127 0 0 YES YES NO YES YES NO NULL,0 A very small integer ...@@ -2164,7 +2164,7 @@ tinyint 1 -128 127 0 0 YES YES NO YES YES NO NULL,0 A very small integer
tinyint unsigned 1 0 255 0 0 YES YES YES YES YES NO NULL,0 A very small integer tinyint unsigned 1 0 255 0 0 YES YES YES YES YES NO NULL,0 A very small integer
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`id` char(16) NOT NULL, `id` char(16) NOT NULL default '',
`data` int(11) NOT NULL `data` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
Database Create Database Database Create Database
...@@ -2218,7 +2218,7 @@ tinyint 1 -128 127 0 0 YES YES NO YES YES NO NULL,0 A very small integer ...@@ -2218,7 +2218,7 @@ tinyint 1 -128 127 0 0 YES YES NO YES YES NO NULL,0 A very small integer
tinyint unsigned 1 0 255 0 0 YES YES YES YES YES NO NULL,0 A very small integer tinyint unsigned 1 0 255 0 0 YES YES YES YES YES NO NULL,0 A very small integer
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`id` char(16) NOT NULL, `id` char(16) NOT NULL default '',
`data` int(11) NOT NULL `data` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
Database Create Database Database Create Database
...@@ -2779,4 +2779,69 @@ a ...@@ -2779,4 +2779,69 @@ a
3.2000 3.2000
drop procedure bug8937| drop procedure bug8937|
delete from t1| delete from t1|
drop procedure if exists bug6900|
drop procedure if exists bug9074|
drop procedure if exists bug6900_9074|
drop table if exists t3|
create table t3 (w char unique, x char)|
insert into t3 values ('a', 'b')|
create procedure bug6900()
begin
declare exit handler for sqlexception select '1';
begin
declare exit handler for sqlexception select '2';
insert into t3 values ('x', 'y', 'z');
end;
end|
create procedure bug9074()
begin
declare x1, x2, x3, x4, x5, x6 int default 0;
begin
declare continue handler for sqlstate '23000' set x5 = 1;
insert into t3 values ('a', 'b');
set x6 = 1;
end;
begin1_label:
begin
declare continue handler for sqlstate '23000' set x1 = 1;
insert into t3 values ('a', 'b');
set x2 = 1;
begin2_label:
begin
declare exit handler for sqlstate '23000' set x3 = 1;
set x4= 1;
insert into t3 values ('a','b');
set x4= 0;
end begin2_label;
end begin1_label;
select x1, x2, x3, x4, x5, x6;
end|
create procedure bug6900_9074(z int)
begin
declare exit handler for sqlstate '23000' select '23000';
begin
declare exit handler for sqlexception select 'sqlexception';
if z = 1 then
insert into t3 values ('a', 'b');
else
insert into t3 values ('x', 'y', 'z');
end if;
end;
end|
call bug6900()|
2
2
call bug9074()|
x1 x2 x3 x4 x5 x6
1 1 1 1 1 1
call bug6900_9074(0)|
sqlexception
sqlexception
call bug6900_9074(1)|
23000
23000
drop procedure bug6900|
drop procedure bug9074|
drop procedure bug6900_9074|
drop table t3|
drop table t1,t2; drop table t1,t2;
...@@ -1029,7 +1029,11 @@ Warnings: ...@@ -1029,7 +1029,11 @@ Warnings:
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'col1' at row 1 Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'col1' at row 1
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'col2' at row 1 Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'col2' at row 1
INSERT IGNORE INTO t1 (col1) values (3); INSERT IGNORE INTO t1 (col1) values (3);
Warnings:
Warning 1364 Field 'col2' doesn't have a default value
INSERT IGNORE INTO t1 () values (); INSERT IGNORE INTO t1 () values ();
Warnings:
Warning 1364 Field 'col2' doesn't have a default value
SELECT * FROM t1; SELECT * FROM t1;
col1 col2 col1 col2
1 hello 1 hello
...@@ -1180,9 +1184,51 @@ Note 1305 PROCEDURE t1 does not exist ...@@ -1180,9 +1184,51 @@ Note 1305 PROCEDURE t1 does not exist
create procedure t1 () begin declare exit handler for sqlexception create procedure t1 () begin declare exit handler for sqlexception
select'a'; insert into t1 values (200); end;| select'a'; insert into t1 values (200); end;|
call t1(); call t1();
ERROR 22003: Out of range value adjusted for column 'col1' at row 1 a
a
select * from t1; select * from t1;
col1 col1
drop procedure t1; drop procedure t1;
drop table t1; drop table t1;
set sql_mode=@org_mode; set sql_mode=@org_mode;
SET @@sql_mode = 'traditional';
CREATE TABLE t1 (i int not null);
INSERT INTO t1 VALUES ();
ERROR HY000: Field 'i' doesn't have a default value
INSERT INTO t1 VALUES (DEFAULT);
ERROR HY000: Field 'i' doesn't have a default value
INSERT INTO t1 VALUES (DEFAULT(i));
ERROR HY000: Field 'i' doesn't have a default value
ALTER TABLE t1 ADD j int;
INSERT INTO t1 SET j = 1;
ERROR HY000: Field 'i' doesn't have a default value
INSERT INTO t1 SET j = 1, i = DEFAULT;
ERROR HY000: Field 'i' doesn't have a default value
INSERT INTO t1 SET j = 1, i = DEFAULT(i);
ERROR HY000: Field 'i' doesn't have a default value
INSERT INTO t1 VALUES (DEFAULT,1);
ERROR HY000: Field 'i' doesn't have a default value
DROP TABLE t1;
SET @@sql_mode = '';
CREATE TABLE t1 (i int not null);
INSERT INTO t1 VALUES ();
Warnings:
Warning 1364 Field 'i' doesn't have a default value
INSERT INTO t1 VALUES (DEFAULT);
Warnings:
Warning 1364 Field 'i' doesn't have a default value
INSERT INTO t1 VALUES (DEFAULT(i));
ERROR HY000: Field 'i' doesn't have a default value
ALTER TABLE t1 ADD j int;
INSERT INTO t1 SET j = 1;
Warnings:
Warning 1364 Field 'i' doesn't have a default value
INSERT INTO t1 SET j = 1, i = DEFAULT;
Warnings:
Warning 1364 Field 'i' doesn't have a default value
INSERT INTO t1 SET j = 1, i = DEFAULT(i);
ERROR HY000: Field 'i' doesn't have a default value
INSERT INTO t1 VALUES (DEFAULT,1);
Warnings:
Warning 1364 Field 'i' doesn't have a default value
DROP TABLE t1;
using_big_test
0
CREATE TABLE t1 (id INTEGER);
CREATE TABLE t2 (id INTEGER);
INSERT INTO t1 (id) VALUES (1), (1), (1),(1);
INSERT INTO t1 (id) SELECT id FROM t1;
/* 8 */
INSERT INTO t1 (id) SELECT id FROM t1;
/* 12 */
INSERT INTO t1 (id) SELECT id FROM t1;
/* 16 */
INSERT INTO t1 (id) SELECT id FROM t1;
/* 20 */
INSERT INTO t1 (id) SELECT id FROM t1;
/* 24 */
INSERT INTO t1 SELECT id+1 FROM t1;
INSERT INTO t1 SELECT id+2 FROM t1;
INSERT INTO t1 SELECT id+4 FROM t1;
INSERT INTO t1 SELECT id+8 FROM t1;
INSERT INTO t1 SELECT id+16 FROM t1;
INSERT INTO t1 SELECT id+32 FROM t1;
INSERT INTO t1 SELECT id+64 FROM t1;
INSERT INTO t1 SELECT id+128 FROM t1;
INSERT INTO t1 SELECT id+256 FROM t1;
INSERT INTO t1 SELECT id+512 FROM t1;
SELECT AVG(DISTINCT id) FROM t1 GROUP BY id % 13;
AVG(DISTINCT id)
513.5000
508.0000
509.0000
510.0000
511.0000
512.0000
513.0000
514.0000
515.0000
516.0000
517.0000
511.5000
512.5000
SELECT SUM(DISTINCT id)/COUNT(DISTINCT id) FROM t1 GROUP BY id % 13;
SUM(DISTINCT id)/COUNT(DISTINCT id)
513.50000
508.00000
509.00000
510.00000
511.00000
512.00000
513.00000
514.00000
515.00000
516.00000
517.00000
511.50000
512.50000
INSERT INTO t1 SELECT id+1024 FROM t1;
INSERT INTO t1 SELECT id+2048 FROM t1;
INSERT INTO t1 SELECT id+4096 FROM t1;
INSERT INTO t1 SELECT id+8192 FROM t1;
INSERT INTO t2 SELECT id FROM t1 ORDER BY id*rand();
SELECT SUM(DISTINCT id) sm FROM t1;
sm
134225920
SELECT SUM(DISTINCT id) sm FROM t2;
sm
134225920
SELECT SUM(DISTINCT id) sm FROM t1 group by id % 13;
sm
10327590
10328851
10330112
10331373
10332634
10317510
10318770
10320030
10321290
10322550
10323810
10325070
10326330
SET max_heap_table_size=16384;
SHOW variables LIKE 'max_heap_table_size';
Variable_name Value
max_heap_table_size 16384
SELECT SUM(DISTINCT id) sm FROM t1;
sm
134225920
SELECT SUM(DISTINCT id) sm FROM t2;
sm
134225920
SELECT SUM(DISTINCT id) sm FROM t1 GROUP BY id % 13;
sm
10327590
10328851
10330112
10331373
10332634
10317510
10318770
10320030
10321290
10322550
10323810
10325070
10326330
DROP TABLE t1;
DROP TABLE t2;
...@@ -95,109 +95,3 @@ SELECT SUM(DISTINCT id % 11) FROM t1; ...@@ -95,109 +95,3 @@ SELECT SUM(DISTINCT id % 11) FROM t1;
SUM(DISTINCT id % 11) SUM(DISTINCT id % 11)
55 55
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (id INTEGER);
CREATE TABLE t2 (id INTEGER);
INSERT INTO t1 (id) VALUES (1), (1), (1),(1);
INSERT INTO t1 (id) SELECT id FROM t1;
/* 8 */
INSERT INTO t1 (id) SELECT id FROM t1;
/* 12 */
INSERT INTO t1 (id) SELECT id FROM t1;
/* 16 */
INSERT INTO t1 (id) SELECT id FROM t1;
/* 20 */
INSERT INTO t1 (id) SELECT id FROM t1;
/* 24 */
INSERT INTO t1 SELECT id+1 FROM t1;
INSERT INTO t1 SELECT id+2 FROM t1;
INSERT INTO t1 SELECT id+4 FROM t1;
INSERT INTO t1 SELECT id+8 FROM t1;
INSERT INTO t1 SELECT id+16 FROM t1;
INSERT INTO t1 SELECT id+32 FROM t1;
INSERT INTO t1 SELECT id+64 FROM t1;
INSERT INTO t1 SELECT id+128 FROM t1;
INSERT INTO t1 SELECT id+256 FROM t1;
INSERT INTO t1 SELECT id+512 FROM t1;
SELECT AVG(DISTINCT id) FROM t1 GROUP BY id % 13;
AVG(DISTINCT id)
513.5000
508.0000
509.0000
510.0000
511.0000
512.0000
513.0000
514.0000
515.0000
516.0000
517.0000
511.5000
512.5000
SELECT SUM(DISTINCT id)/COUNT(DISTINCT id) FROM t1 GROUP BY id % 13;
SUM(DISTINCT id)/COUNT(DISTINCT id)
513.50000
508.00000
509.00000
510.00000
511.00000
512.00000
513.00000
514.00000
515.00000
516.00000
517.00000
511.50000
512.50000
INSERT INTO t1 SELECT id+1024 FROM t1;
INSERT INTO t1 SELECT id+2048 FROM t1;
INSERT INTO t1 SELECT id+4096 FROM t1;
INSERT INTO t1 SELECT id+8192 FROM t1;
INSERT INTO t2 SELECT id FROM t1 ORDER BY id*rand();
SELECT SUM(DISTINCT id) sm FROM t1;
sm
134225920
SELECT SUM(DISTINCT id) sm FROM t2;
sm
134225920
SELECT SUM(DISTINCT id) sm FROM t1 group by id % 13;
sm
10327590
10328851
10330112
10331373
10332634
10317510
10318770
10320030
10321290
10322550
10323810
10325070
10326330
SET max_heap_table_size=16384;
SHOW variables LIKE 'max_heap_table_size';
Variable_name Value
max_heap_table_size 16384
SELECT SUM(DISTINCT id) sm FROM t1;
sm
134225920
SELECT SUM(DISTINCT id) sm FROM t2;
sm
134225920
SELECT SUM(DISTINCT id) sm FROM t1 GROUP BY id % 13;
sm
10327590
10328851
10330112
10331373
10332634
10317510
10318770
10320030
10321290
10322550
10323810
10325070
10326330
DROP TABLE t1;
DROP TABLE t2;
...@@ -377,3 +377,6 @@ hex(concat(a)) hex(concat(b)) ...@@ -377,3 +377,6 @@ hex(concat(a)) hex(concat(b))
07 0FFE 07 0FFE
01 01FF 01 01FF
drop table t1; drop table t1;
create table t1(a int, b bit not null);
alter table t1 add primary key (a);
drop table t1;
...@@ -502,7 +502,7 @@ select foobar, boggle from t1 where foobar = 'fish' and boggle = 10; ...@@ -502,7 +502,7 @@ select foobar, boggle from t1 where foobar = 'fish' and boggle = 10;
foobar boggle foobar boggle
fish 10 fish 10
drop table t1; drop table t1;
create table t1 (id integer auto_increment unique,imagem LONGBLOB not null); create table t1 (id integer auto_increment unique,imagem LONGBLOB not null default '');
insert into t1 (id) values (1); insert into t1 (id) values (1);
select select
charset(load_file('../../std_data/words.dat')), charset(load_file('../../std_data/words.dat')),
......
...@@ -21,10 +21,10 @@ time_field time, ...@@ -21,10 +21,10 @@ time_field time,
date_time datetime, date_time datetime,
blob_col blob, blob_col blob,
tinyblob_col tinyblob, tinyblob_col tinyblob,
mediumblob_col mediumblob not null, mediumblob_col mediumblob not null default '',
longblob_col longblob not null, longblob_col longblob not null default '',
options enum('one','two','tree') not null, options enum('one','two','tree') not null ,
flags set('one','two','tree') not null, flags set('one','two','tree') not null default '',
PRIMARY KEY (auto), PRIMARY KEY (auto),
KEY (utiny), KEY (utiny),
KEY (tiny), KEY (tiny),
......
...@@ -179,3 +179,6 @@ set @v1=null, @v2=1, @v3=1.1, @v4=now(); ...@@ -179,3 +179,6 @@ set @v1=null, @v2=1, @v3=1.1, @v4=now();
select coercibility(@v1),coercibility(@v2),coercibility(@v3),coercibility(@v4); select coercibility(@v1),coercibility(@v2),coercibility(@v3),coercibility(@v4);
coercibility(@v1) coercibility(@v2) coercibility(@v3) coercibility(@v4) coercibility(@v1) coercibility(@v2) coercibility(@v3) coercibility(@v4)
2 2 2 2 2 2 2 2
set session @honk=99;
set one_shot @honk=99;
ERROR HY000: The 'SET ONE_SHOT' syntax is reserved for purposes internal to the MySQL server
...@@ -117,10 +117,12 @@ Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' a ...@@ -117,10 +117,12 @@ Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' a
Warning 1265 Data truncated for column 'b' at row 4 Warning 1265 Data truncated for column 'b' at row 4
insert into t2(b) values('mysqlab'); insert into t2(b) values('mysqlab');
Warnings: Warnings:
Warning 1364 Field 'a' doesn't have a default value
Warning 1265 Data truncated for column 'b' at row 1 Warning 1265 Data truncated for column 'b' at row 1
set sql_warnings=1; set sql_warnings=1;
insert into t2(b) values('mysqlab'); insert into t2(b) values('mysqlab');
Warnings: Warnings:
Warning 1364 Field 'a' doesn't have a default value
Warning 1265 Data truncated for column 'b' at row 1 Warning 1265 Data truncated for column 'b' at row 1
set sql_warnings=0; set sql_warnings=0;
drop table t1, t2; drop table t1, t2;
......
drop table if exists t1, t2;
create table t1 (a int) engine=innodb;
xa start 'test1';
insert t1 values (10);
xa end 'test1';
xa prepare 'test1';
xa rollback 'test1';
select * from t1;
a
xa start 'test2';
xa start 'test-bad';
ERROR XAE07: XAER_RMFAIL: The command cannot be executed in the ACTIVE state
insert t1 values (20);
xa prepare 'test2';
ERROR XAE07: XAER_RMFAIL: The command cannot be executed in the ACTIVE state
xa end 'test2';
xa prepare 'test2';
xa commit 'test2';
select * from t1;
a
20
xa start 'testa','testb';
insert t1 values (30);
xa end 'testa','testb';
xa start 0x7465737462, 0x2030405060, 0xb;
insert t1 values (40);
xa end 'testb',' 0@P`',11;
xa prepare 'testb',0x2030405060,11;
xa recover;
formatID gtrid_length bqual_length data
11 5 5 testb 0@P`
xa prepare 'testa','testb';
xa recover;
formatID gtrid_length bqual_length data
11 5 5 testb 0@P`
1 5 5 testatestb
xa commit 'testb',0x2030405060,11;
xa rollback 'testa','testb';
xa start 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz';
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 '' at line 1
select * from t1;
a
20
40
drop table t1;
...@@ -66,7 +66,7 @@ drop table t1; ...@@ -66,7 +66,7 @@ drop table t1;
# #
# The below checks both binary and character comparisons. # The below checks both binary and character comparisons.
# #
create table t1 (word varchar(255) not null, word2 varchar(255) not null, index(word)); create table t1 (word varchar(255) not null, word2 varchar(255) not null default '', index(word));
show create table t1; show create table t1;
insert into t1 (word) values ('ss'),(0xDF),(0xE4),('ae'); insert into t1 (word) values ('ss'),(0xDF),(0xE4),('ae');
update t1 set word2=word; update t1 set word2=word;
......
...@@ -8,7 +8,7 @@ SET CHARACTER SET latin1; ...@@ -8,7 +8,7 @@ SET CHARACTER SET latin1;
CREATE TABLE t1 ( CREATE TABLE t1 (
comment CHAR(32) ASCII NOT NULL, comment CHAR(32) ASCII NOT NULL,
koi8_ru_f CHAR(32) CHARACTER SET koi8r NOT NULL koi8_ru_f CHAR(32) CHARACTER SET koi8r NOT NULL default ''
) CHARSET=latin5; ) CHARSET=latin5;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
...@@ -142,13 +142,13 @@ INSERT INTO t1 (koi8_ru_f,comment) VALUES (_koi8r' ...@@ -142,13 +142,13 @@ INSERT INTO t1 (koi8_ru_f,comment) VALUES (_koi8r'
SET CHARACTER SET utf8; SET CHARACTER SET utf8;
SELECT koi8_ru_f,MIN(comment),COUNT(*) FROM t1 GROUP BY 1; SELECT koi8_ru_f,MIN(comment),COUNT(*) FROM t1 GROUP BY 1;
ALTER TABLE t1 ADD utf8_f CHAR(32) CHARACTER SET utf8 NOT NULL; ALTER TABLE t1 ADD utf8_f CHAR(32) CHARACTER SET utf8 NOT NULL default '';
UPDATE t1 SET utf8_f=CONVERT(koi8_ru_f USING utf8); UPDATE t1 SET utf8_f=CONVERT(koi8_ru_f USING utf8);
SET CHARACTER SET koi8r; SET CHARACTER SET koi8r;
SELECT * FROM t1; SELECT * FROM t1;
ALTER TABLE t1 ADD bin_f CHAR(32) BYTE NOT NULL; ALTER TABLE t1 ADD bin_f CHAR(32) BYTE NOT NULL default '';
UPDATE t1 SET bin_f=koi8_ru_f; UPDATE t1 SET bin_f=koi8_ru_f;
SELECT COUNT(DISTINCT bin_f),COUNT(DISTINCT koi8_ru_f),COUNT(DISTINCT utf8_f) FROM t1; SELECT COUNT(DISTINCT bin_f),COUNT(DISTINCT koi8_ru_f),COUNT(DISTINCT utf8_f) FROM t1;
......
...@@ -120,7 +120,6 @@ INSERT INTO t1 (g) VALUES (GeomFromText('LineString(1 2, 2 3)')),(GeomFromText(' ...@@ -120,7 +120,6 @@ INSERT INTO t1 (g) VALUES (GeomFromText('LineString(1 2, 2 3)')),(GeomFromText('
drop table t1; drop table t1;
CREATE TABLE t1 ( CREATE TABLE t1 (
geoobjid INT NOT NULL,
line LINESTRING NOT NULL, line LINESTRING NOT NULL,
kind ENUM('po', 'pp', 'rr', 'dr', 'rd', 'ts', 'cl') NOT NULL DEFAULT 'po', kind ENUM('po', 'pp', 'rr', 'dr', 'rd', 'ts', 'cl') NOT NULL DEFAULT 'po',
name VARCHAR(32), name VARCHAR(32),
......
...@@ -280,14 +280,14 @@ explain select * from t1 where v='a'; ...@@ -280,14 +280,14 @@ explain select * from t1 where v='a';
select v,count(*) from t1 group by v limit 10; select v,count(*) from t1 group by v limit 10;
select v,count(t) from t1 group by v limit 10; select v,count(t) from t1 group by v limit 10;
select v,count(c) from t1 group by v limit 10; select v,count(c) from t1 group by v limit 10;
select sql_big_result v,count(t) from t1 group by v limit 10; select sql_big_result trim(v),count(t) from t1 group by v limit 10;
select sql_big_result v,count(c) from t1 group by v limit 10; select sql_big_result trim(v),count(c) from t1 group by v limit 10;
select c,count(*) from t1 group by c limit 10; select c,count(*) from t1 group by c limit 10;
select c,count(t) from t1 group by c limit 10; select c,count(t) from t1 group by c limit 10;
select sql_big_result c,count(t) from t1 group by c limit 10; select sql_big_result c,count(t) from t1 group by c limit 10;
select t,count(*) from t1 group by t limit 10; select t,count(*) from t1 group by t limit 10;
select t,count(t) from t1 group by t limit 10; select t,count(t) from t1 group by t limit 10;
select sql_big_result t,count(t) from t1 group by t limit 10; select sql_big_result trim(t),count(t) from t1 group by t limit 10;
drop table t1; drop table t1;
# #
...@@ -413,25 +413,16 @@ eval set storage_engine=$default; ...@@ -413,25 +413,16 @@ eval set storage_engine=$default;
create table t1 (a bigint unsigned auto_increment primary key, b int, create table t1 (a bigint unsigned auto_increment primary key, b int,
key (b, a)) engine=heap; key (b, a)) engine=heap;
insert t1 (b) values (1); insert t1 (b) values (1),(1),(1),(1),(1),(1),(1),(1);
insert t1 (b) values (1); select * from t1;
insert t1 (b) values (1);
insert t1 (b) values (1);
insert t1 (b) values (1);
insert t1 (b) values (1);
insert t1 (b) values (1);
insert t1 (b) values (1);
select * from t1;
drop table t1; drop table t1;
create table t1 (a int not null, b int not null auto_increment, create table t1 (a int not null, b int not null auto_increment,
primary key(a, b), key(b)) engine=heap; primary key(a, b), key(b)) engine=heap;
insert t1 (a) values (1); insert t1 (a) values (1),(1),(1),(1),(1),(1),(1),(1);
insert t1 (a) values (1); select * from t1;
insert t1 (a) values (1);
insert t1 (a) values (1);
insert t1 (a) values (1);
insert t1 (a) values (1);
insert t1 (a) values (1);
insert t1 (a) values (1);
select * from t1;
drop table t1; drop table t1;
--error 1075
create table t1 (a int not null, b int not null auto_increment,
primary key(a, b)) engine=heap;
...@@ -8,13 +8,13 @@ drop table if exists t0,t1,t2; ...@@ -8,13 +8,13 @@ drop table if exists t0,t1,t2;
create table t1 create table t1
( (
/* Field names reflect value(rowid) distribution, st=STairs, swt= SaWTooth */ /* Field names reflect value(rowid) distribution, st=STairs, swt= SaWTooth */
st_a int not null, st_a int not null default 0,
swt1a int not null, swt1a int not null default 0,
swt2a int not null, swt2a int not null default 0,
st_b int not null, st_b int not null default 0,
swt1b int not null, swt1b int not null default 0,
swt2b int not null, swt2b int not null default 0,
/* fields/keys for row retrieval tests */ /* fields/keys for row retrieval tests */
key1 int, key1 int,
......
...@@ -17,11 +17,11 @@ show databases where `database` = 't%'; ...@@ -17,11 +17,11 @@ show databases where `database` = 't%';
# Test for information_schema.tables & # Test for information_schema.tables &
# show tables # show tables
create database testtets; create database mysqltest;
create table testtets.t1(a int, b VARCHAR(30), KEY string_data (b)); create table mysqltest.t1(a int, b VARCHAR(30), KEY string_data (b));
create table test.t2(a int); create table test.t2(a int);
create table t3(a int, KEY a_data (a)); create table t3(a int, KEY a_data (a));
create table testtets.t4(a int); create table mysqltest.t4(a int);
create view v1 (c) as select table_name from information_schema.TABLES; create view v1 (c) as select table_name from information_schema.TABLES;
select * from v1; select * from v1;
select c,table_name from v1 select c,table_name from v1
...@@ -33,9 +33,9 @@ right join information_schema.TABLES v2 on (v1.c=v2.table_name) ...@@ -33,9 +33,9 @@ right join information_schema.TABLES v2 on (v1.c=v2.table_name)
where v1.c like "t%"; where v1.c like "t%";
select table_name from information_schema.TABLES select table_name from information_schema.TABLES
where table_schema = "testtets" and table_name like "t%"; where table_schema = "mysqltest" and table_name like "t%";
select * from information_schema.STATISTICS where TABLE_SCHEMA = "testtets"; select * from information_schema.STATISTICS where TABLE_SCHEMA = "mysqltest";
show keys from t3 where Key_name = "a_data"; show keys from t3 where Key_name = "a_data";
show tables like 't%'; show tables like 't%';
...@@ -46,11 +46,19 @@ show full columns from mysql.db like "Insert%"; ...@@ -46,11 +46,19 @@ show full columns from mysql.db like "Insert%";
show full columns from v1; show full columns from v1;
select * from information_schema.COLUMNS where table_name="t1" select * from information_schema.COLUMNS where table_name="t1"
and column_name= "a"; and column_name= "a";
show columns from testtets.t1 where field like "%a%"; show columns from mysqltest.t1 where field like "%a%";
grant select (a) on mysqltest.t1 to mysqltest_2@localhost;
connect (user3,localhost,mysqltest_2,,);
connection user3;
select table_name, column_name, privileges from information_schema.columns
where table_schema = 'mysqltest' and table_name = 't1';
show columns from mysqltest.t1;
connection default;
drop view v1; drop view v1;
drop tables testtets.t4, testtets.t1, t2, t3; drop tables mysqltest.t4, mysqltest.t1, t2, t3;
drop database testtets; drop database mysqltest;
# Test for information_schema.CHARACTER_SETS & # Test for information_schema.CHARACTER_SETS &
# SHOW CHARACTER SET # SHOW CHARACTER SET
...@@ -107,7 +115,6 @@ mysql.proc b where a.ROUTINE_NAME = convert(b.name using utf8); ...@@ -107,7 +115,6 @@ mysql.proc b where a.ROUTINE_NAME = convert(b.name using utf8);
select count(*) from information_schema.ROUTINES; select count(*) from information_schema.ROUTINES;
connect (user1,localhost,mysqltest_1,,); connect (user1,localhost,mysqltest_1,,);
connect (user3,localhost,mysqltest_2,,);
connection user1; connection user1;
select ROUTINE_NAME, ROUTINE_DEFINITION from information_schema.ROUTINES; select ROUTINE_NAME, ROUTINE_DEFINITION from information_schema.ROUTINES;
--error 1305 --error 1305
...@@ -166,8 +173,8 @@ select * from information_schema.TABLE_PRIVILEGES where grantee like '%mysqltest ...@@ -166,8 +173,8 @@ select * from information_schema.TABLE_PRIVILEGES where grantee like '%mysqltest
select * from information_schema.COLUMN_PRIVILEGES where grantee like '%mysqltest_1%'; select * from information_schema.COLUMN_PRIVILEGES where grantee like '%mysqltest_1%';
delete from mysql.user where user='mysqltest_1' or user='mysqltest_2'; delete from mysql.user where user='mysqltest_1' or user='mysqltest_2';
delete from mysql.db where user='mysqltest_1' or user='mysqltest_2'; delete from mysql.db where user='mysqltest_1' or user='mysqltest_2';
delete from mysql.tables_priv where user='mysqltest_1'; delete from mysql.tables_priv where user='mysqltest_1' or user='mysqltest_2';
delete from mysql.columns_priv where user='mysqltest_1'; delete from mysql.columns_priv where user='mysqltest_1' or user='mysqltest_2';
flush privileges; flush privileges;
drop table t1; drop table t1;
......
#
# Test some things that takes a long time
-- source include/big_test.inc
-- source include/have_innodb.inc
--disable_warnings
DROP TABLE IF EXISTS t1, t2, t3, t4;
--enable_warnings
#
# Test test how filesort and buffered-record-reads works with innodb
#
CREATE TABLE t1 (id INTEGER) ENGINE=MYISAM;
CREATE TABLE t2 (id INTEGER primary key) ENGINE=INNODB;
CREATE TABLE t3 (a char(32) primary key,id INTEGER) ENGINE=INNODB;
CREATE TABLE t4 (a char(32) primary key,id INTEGER) ENGINE=MYISAM;
INSERT INTO t1 (id) VALUES (1);
INSERT INTO t1 SELECT id+1 FROM t1;
INSERT INTO t1 SELECT id+2 FROM t1;
INSERT INTO t1 SELECT id+4 FROM t1;
INSERT INTO t1 SELECT id+8 FROM t1;
INSERT INTO t1 SELECT id+16 FROM t1;
INSERT INTO t1 SELECT id+32 FROM t1;
INSERT INTO t1 SELECT id+64 FROM t1;
INSERT INTO t1 SELECT id+128 FROM t1;
INSERT INTO t1 SELECT id+256 FROM t1;
INSERT INTO t1 SELECT id+512 FROM t1;
INSERT INTO t1 SELECT id+1024 FROM t1;
INSERT INTO t1 SELECT id+2048 FROM t1;
INSERT INTO t1 SELECT id+4096 FROM t1;
INSERT INTO t1 SELECT id+8192 FROM t1;
INSERT INTO t1 SELECT id+16384 FROM t1;
INSERT INTO t1 SELECT id+32768 FROM t1;
INSERT INTO t1 SELECT id+65536 FROM t1;
INSERT INTO t1 SELECT id+131072 FROM t1;
INSERT INTO t1 SELECT id+262144 FROM t1;
INSERT INTO t1 SELECT id+524288 FROM t1;
INSERT INTO t1 SELECT id+1048576 FROM t1;
INSERT INTO t2 SELECT * FROM t1;
INSERT INTO t3 SELECT concat(id),id from t2 ORDER BY -id;
INSERT INTO t4 SELECT * from t3 ORDER BY concat(a);
select sum(id) from t3;
drop table t1,t2,t3,t4;
This diff is collapsed.
...@@ -651,4 +651,13 @@ SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.a WHERE not(0+(t1.a=30 and t2.b=1)); ...@@ -651,4 +651,13 @@ SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.a WHERE not(0+(t1.a=30 and t2.b=1));
DROP TABLE t1,t2; DROP TABLE t1,t2;
# Bug #8681: Bad warning message when group_concat() exceeds max length
set group_concat_max_len=5;
create table t1 (a int, b varchar(20));
create table t2 (a int, c varchar(20));
insert into t1 values (1,"aaaaaaaaaa"),(2,"bbbbbbbbbb");
insert into t2 values (1,"cccccccccc"),(2,"dddddddddd");
select group_concat(t1.b,t2.c) from t1 left join t2 using(a) group by t1.a;
select group_concat(t1.b,t2.c) from t1 inner join t2 using(a) group by t1.a;
drop table t1, t2;
set group_concat_max_len=default;
...@@ -23,13 +23,15 @@ connection con2; ...@@ -23,13 +23,15 @@ connection con2;
select ((@id := kill_id) - kill_id) from t1; select ((@id := kill_id) - kill_id) from t1;
kill @id; kill @id;
# Wait for thread to do.
--sleep 5
# verify that con1 is doning a reconnect
connection con1; connection con1;
--ping
--ping --disable_reconnect
select ((@id := kill_id) - kill_id) from t1; # this statement should fail
--error 2006,2013
select 1;
--enable_reconnect
# this should work, and we should have a new connection_id()
select ((@id := kill_id) - kill_id) from t1;
select @id != connection_id(); select @id != connection_id();
#make sure the server is still alive #make sure the server is still alive
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
drop table if exists t1; drop table if exists t1;
--enable_warnings --enable_warnings
create table t1 (a int primary key, b int not null); create table t1 (a int not null default 0 primary key, b int not null default 0);
insert into t1 () values (); -- Testing default values insert into t1 () values (); -- Testing default values
insert into t1 values (1,1),(2,1),(3,1); insert into t1 values (1,1),(2,1),(3,1);
update t1 set a=4 where b=1 limit 1; update t1 set a=4 where b=1 limit 1;
......
...@@ -29,7 +29,7 @@ insert into t2 select * from t1; ...@@ -29,7 +29,7 @@ insert into t2 select * from t1;
commit; commit;
--replace_column 5 # --replace_column 5 #
--replace_result "xid=12" "xid=7" --replace_result "xid=15" "xid=8"
show binlog events from 98; show binlog events from 98;
delete from t1; delete from t1;
...@@ -58,7 +58,7 @@ rollback to savepoint my_savepoint; ...@@ -58,7 +58,7 @@ rollback to savepoint my_savepoint;
commit; commit;
--replace_column 5 # --replace_column 5 #
--replace_result "xid=45" "xid=24" --replace_result "xid=48" "xid=25"
show binlog events from 98; show binlog events from 98;
delete from t1; delete from t1;
...@@ -76,7 +76,7 @@ commit; ...@@ -76,7 +76,7 @@ commit;
select a from t1 order by a; # check that savepoints work :) select a from t1 order by a; # check that savepoints work :)
--replace_column 5 # --replace_column 5 #
--replace_result "xid=67" "xid=36" --replace_result "xid=70" "xid=37"
show binlog events from 98; show binlog events from 98;
# and when ROLLBACK is not explicit? # and when ROLLBACK is not explicit?
...@@ -109,7 +109,7 @@ insert into t1 values(9); ...@@ -109,7 +109,7 @@ insert into t1 values(9);
insert into t2 select * from t1; insert into t2 select * from t1;
--replace_column 5 # --replace_column 5 #
--replace_result "xid=116" "xid=59" --replace_result "xid=119" "xid=60"
show binlog events from 98; show binlog events from 98;
# Check that when the query updat1ng the MyISAM table is the first in the # Check that when the query updat1ng the MyISAM table is the first in the
...@@ -122,13 +122,13 @@ insert into t1 values(10); # first make t1 non-empty ...@@ -122,13 +122,13 @@ insert into t1 values(10); # first make t1 non-empty
begin; begin;
insert into t2 select * from t1; insert into t2 select * from t1;
--replace_column 5 # --replace_column 5 #
--replace_result "xid=130" "xid=65" --replace_result "xid=133" "xid=66"
show binlog events from 98; show binlog events from 98;
insert into t1 values(11); insert into t1 values(11);
commit; commit;
--replace_column 5 # --replace_column 5 #
--replace_result "xid=130" "xid=65" "xid=133" "xid=67" --replace_result "xid=133" "xid=66" "xid=136" "xid=68"
show binlog events from 98; show binlog events from 98;
...@@ -147,7 +147,7 @@ insert into t2 select * from t1; ...@@ -147,7 +147,7 @@ insert into t2 select * from t1;
commit; commit;
--replace_column 5 # --replace_column 5 #
--replace_result "xid=152" "xid=77" --replace_result "xid=155" "xid=78"
show binlog events from 98; show binlog events from 98;
delete from t1; delete from t1;
...@@ -175,7 +175,7 @@ rollback to savepoint my_savepoint; ...@@ -175,7 +175,7 @@ rollback to savepoint my_savepoint;
commit; commit;
--replace_column 5 # --replace_column 5 #
--replace_result "xid=184" "xid=93" --replace_result "xid=187" "xid=94"
show binlog events from 98; show binlog events from 98;
delete from t1; delete from t1;
...@@ -193,7 +193,7 @@ commit; ...@@ -193,7 +193,7 @@ commit;
select a from t1 order by a; # check that savepoints work :) select a from t1 order by a; # check that savepoints work :)
--replace_column 5 # --replace_column 5 #
--replace_result "xid=205" "xid=104" --replace_result "xid=208" "xid=105"
show binlog events from 98; show binlog events from 98;
# Test for BUG#5714, where a MyISAM update in the transaction used to # Test for BUG#5714, where a MyISAM update in the transaction used to
......
...@@ -147,7 +147,7 @@ select * from t1 where b = 'two'; ...@@ -147,7 +147,7 @@ select * from t1 where b = 'two';
connection server1; connection server1;
alter table t1 drop index c; alter table t1 drop index c;
connection server2; connection server2;
--error 1146 --error 1412
select * from t1 where b = 'two'; select * from t1 where b = 'two';
select * from t1 where b = 'two'; select * from t1 where b = 'two';
connection server1; connection server1;
......
...@@ -577,3 +577,30 @@ create table t1 ...@@ -577,3 +577,30 @@ create table t1
engine=ndb engine=ndb
max_rows=1; max_rows=1;
drop table t1; drop table t1;
#
# Test auto_increment
#
connect (con1,localhost,,,test);
connect (con2,localhost,,,test);
create table t1
(counter int(64) NOT NULL auto_increment,
datavalue char(40) default 'XXXX',
primary key (counter)
) ENGINE=ndbcluster;
connection con1;
insert into t1 (datavalue) values ('newval');
insert into t1 (datavalue) values ('newval');
select * from t1 order by counter;
insert into t1 (datavalue) select datavalue from t1 where counter < 100;
insert into t1 (datavalue) select datavalue from t1 where counter < 100;
select * from t1 order by counter;
connection con2;
insert into t1 (datavalue) select datavalue from t1 where counter < 100;
insert into t1 (datavalue) select datavalue from t1 where counter < 100;
select * from t1 order by counter;
drop table t1;
...@@ -954,6 +954,65 @@ bin not like concat(0xBB, '%') and ...@@ -954,6 +954,65 @@ bin not like concat(0xBB, '%') and
vbin not like concat(0xBB, '%') vbin not like concat(0xBB, '%')
order by auto; order by auto;
# Update test
update t1
set medium = 17
where
string = "aaaa" and
vstring = "aaaa" and
bin = 0xAAAA and
vbin = 0xAAAA and
tiny = -1 and
short = -1 and
medium = -1 and
long_int = -1 and
longlong = -1 and
real_float > 1.0 and real_float < 2.0 and
real_double > 1.0 and real_double < 2.0 and
real_decimal > 1.0 and real_decimal < 2.0 and
utiny = 1 and
ushort = 1 and
umedium = 1 and
ulong = 1 and
ulonglong = 1 and
/* bits = b'001' and */
options = 'one' and
flags = 'one' and
date_field = '1901-01-01' and
year_field = '1901' and
time_field = '01:01:01' and
date_time = '1901-01-01 01:01:01';
# Delete test
delete from t1
where
string = "aaaa" and
vstring = "aaaa" and
bin = 0xAAAA and
vbin = 0xAAAA and
tiny = -1 and
short = -1 and
medium = 17 and
long_int = -1 and
longlong = -1 and
real_float > 1.0 and real_float < 2.0 and
real_double > 1.0 and real_double < 2.0 and
real_decimal > 1.0 and real_decimal < 2.0 and
utiny = 1 and
ushort = 1 and
umedium = 1 and
ulong = 1 and
ulonglong = 1 and
/* bits = b'001' and */
options = 'one' and
flags = 'one' and
date_field = '1901-01-01' and
year_field = '1901' and
time_field = '01:01:01' and
date_time = '1901-01-01 01:01:01';
select count(*) from t1;
# Various tests # Various tests
explain explain
select * from t2 where attr3 is null or attr1 > 2 and pk1= 3 order by pk1; select * from t2 where attr3 is null or attr1 > 2 and pk1= 3 order by pk1;
......
...@@ -40,5 +40,7 @@ show status like 'handler_discover%'; ...@@ -40,5 +40,7 @@ show status like 'handler_discover%';
show tables; show tables;
drop table t1, t2, t3, t4; drop table t1, t2, t3, t4;
connection server2;
drop table t1, t3, t4;
...@@ -59,7 +59,7 @@ drop table t1; ...@@ -59,7 +59,7 @@ drop table t1;
# #
# Test inserting and updating with NULL # Test inserting and updating with NULL
# #
CREATE TABLE t1 (a varchar(16) NOT NULL, b smallint(6) NOT NULL, c datetime NOT NULL, d smallint(6) NOT NULL); CREATE TABLE t1 (a varchar(16) NOT NULL default '', b smallint(6) NOT NULL default 0, c datetime NOT NULL default '0000-00-00 00:00:00', d smallint(6) NOT NULL default 0);
INSERT INTO t1 SET a = "", d= "2003-01-14 03:54:55"; INSERT INTO t1 SET a = "", d= "2003-01-14 03:54:55";
UPDATE t1 SET d=1/NULL; UPDATE t1 SET d=1/NULL;
UPDATE t1 SET d=NULL; UPDATE t1 SET d=NULL;
......
...@@ -206,7 +206,7 @@ CREATE TABLE t1 ( ...@@ -206,7 +206,7 @@ CREATE TABLE t1 (
favo_tv varchar(50) NOT NULL default '', favo_tv varchar(50) NOT NULL default '',
favo_eten varchar(50) NOT NULL default '', favo_eten varchar(50) NOT NULL default '',
favo_muziek varchar(30) NOT NULL default '', favo_muziek varchar(30) NOT NULL default '',
info text NOT NULL, info text NOT NULL default '',
ipnr varchar(30) NOT NULL default '', ipnr varchar(30) NOT NULL default '',
PRIMARY KEY (member_id) PRIMARY KEY (member_id)
) ENGINE=MyISAM PACK_KEYS=1; ) ENGINE=MyISAM PACK_KEYS=1;
......
...@@ -540,3 +540,24 @@ deallocate prepare stmt; ...@@ -540,3 +540,24 @@ deallocate prepare stmt;
drop table t1,t2; drop table t1,t2;
#
# Bug#9383: INFORMATION_SCHEMA.COLUMNS, JOIN, Crash, prepared statement
#
eval SET @aux= "SELECT COUNT(*)
FROM INFORMATION_SCHEMA.COLUMNS A,
INFORMATION_SCHEMA.COLUMNS B
WHERE A.TABLE_SCHEMA = B.TABLE_SCHEMA
AND A.TABLE_NAME = B.TABLE_NAME
AND A.COLUMN_NAME = B.COLUMN_NAME AND
A.TABLE_NAME = 'user'";
let $exec_loop_count= 3;
eval prepare my_stmt from @aux;
while ($exec_loop_count)
{
eval execute my_stmt;
dec $exec_loop_count;
}
deallocate prepare my_stmt;
-- source include/have_isam.inc
# #
# Test of REPLACE with ISAM and MyISAM and HEAP # Test of REPLACE with MyISAM and HEAP
# #
--disable_warnings --disable_warnings
...@@ -12,13 +10,11 @@ CREATE TABLE t1 ( ...@@ -12,13 +10,11 @@ CREATE TABLE t1 (
gesuchnr int(11) DEFAULT '0' NOT NULL, gesuchnr int(11) DEFAULT '0' NOT NULL,
benutzer_id int(11) DEFAULT '0' NOT NULL, benutzer_id int(11) DEFAULT '0' NOT NULL,
PRIMARY KEY (gesuchnr,benutzer_id) PRIMARY KEY (gesuchnr,benutzer_id)
) engine=ISAM; );
replace into t1 (gesuchnr,benutzer_id) values (2,1); replace into t1 (gesuchnr,benutzer_id) values (2,1);
replace into t1 (gesuchnr,benutzer_id) values (1,1); replace into t1 (gesuchnr,benutzer_id) values (1,1);
replace into t1 (gesuchnr,benutzer_id) values (1,1); replace into t1 (gesuchnr,benutzer_id) values (1,1);
alter table t1 engine=myisam;
replace into t1 (gesuchnr,benutzer_id) values (1,1);
alter table t1 engine=heap; alter table t1 engine=heap;
replace into t1 (gesuchnr,benutzer_id) values (1,1); replace into t1 (gesuchnr,benutzer_id) values (1,1);
drop table t1; drop table t1;
......
...@@ -73,5 +73,8 @@ connection slave; ...@@ -73,5 +73,8 @@ connection slave;
# The empty line last comes from the end line field in the file # The empty line last comes from the end line field in the file
select * from rewrite.t1; select * from rewrite.t1;
drop database rewrite;
connection master; connection master;
drop table t1; drop table t1;
...@@ -106,7 +106,7 @@ drop table t1; ...@@ -106,7 +106,7 @@ drop table t1;
# Do a create table that tries to cover all types and options # Do a create table that tries to cover all types and options
# #
create table t1 ( create table t1 (
type_bool bool not null, type_bool bool not null default 0,
type_tiny tinyint not null auto_increment primary key, type_tiny tinyint not null auto_increment primary key,
type_short smallint(3), type_short smallint(3),
type_mediumint mediumint, type_mediumint mediumint,
...@@ -117,9 +117,9 @@ empty_char char(0), ...@@ -117,9 +117,9 @@ empty_char char(0),
type_char char(2), type_char char(2),
type_varchar varchar(10), type_varchar varchar(10),
type_timestamp timestamp not null, type_timestamp timestamp not null,
type_date date not null, type_date date not null default '0000-00-00',
type_time time not null, type_time time not null default '00:00:00',
type_datetime datetime not null, type_datetime datetime not null default '0000-00-00 00:00:00',
type_year year, type_year year,
type_enum enum ('red', 'green', 'blue'), type_enum enum ('red', 'green', 'blue'),
type_set enum ('red', 'green', 'blue'), type_set enum ('red', 'green', 'blue'),
......
...@@ -696,6 +696,101 @@ create procedure bug6600() ...@@ -696,6 +696,101 @@ create procedure bug6600()
create procedure bug6600() create procedure bug6600()
unlock table t1| unlock table t1|
#
# BUG#9566: explicit LOCK TABLE and store procedures result in illegal state
#
# We should not think that mysql.proc table does not exist if we are unable
# to open it under LOCK TABLE or in prelocked mode. Probably this test
# should be removed when Monty will allow access to mysql.proc without
# locking it.
#
--disable_warnings
drop procedure if exists bug9566|
--enable_warnings
create procedure bug9566()
begin
select * from t1;
end|
lock table t1 read|
# This should fail because we forgot to lock mysql.proc table explicitly
--error 1100
call bug9566()|
unlock tables|
# This should succeed
drop procedure bug9566|
#
# BUG#7299: Stored procedures: exception handler catches not-found conditions
#
--disable_warnings
drop procedure if exists bug7299|
--enable_warnings
create procedure bug7299()
begin
declare v int;
declare c cursor for select val from t1;
declare exit handler for sqlexception select 'Error!';
open c;
fetch c into v;
end|
delete from t1|
--error ER_SP_FETCH_NO_DATA
call bug7299()|
drop procedure bug7299|
#
# BUG#9073: Able to declare two handlers for same condition in same scope
#
--error ER_SP_DUP_HANDLER
create procedure bug9073()
begin
declare continue handler for sqlexception select 1;
declare continue handler for sqlexception select 2;
end|
--error ER_SP_DUP_HANDLER
create procedure bug9073()
begin
declare condname1 condition for 1234;
declare continue handler for condname1 select 1;
declare exit handler for condname1 select 2;
end|
--error ER_SP_DUP_HANDLER
create procedure bug9073()
begin
declare condname1 condition for sqlstate '42000';
declare condname2 condition for sqlstate '42000';
declare exit handler for condname1 select 1;
declare continue handler for condname2 select 2;
end|
--error ER_SP_DUP_HANDLER
create procedure bug9073()
begin
declare condname1 condition for sqlstate '42000';
declare exit handler for condname1 select 1;
declare exit handler for sqlstate '42000' select 2;
end|
# This should still work.
--disable_warnings
drop procedure if exists bug9073|
--enable_warnings
create procedure bug9073()
begin
declare condname1 condition for sqlstate '42000';
declare continue handler for condname1 select 1;
begin
declare exit handler for sqlstate '42000' select 2;
begin
declare continue handler for sqlstate '42000' select 3;
end;
end;
end|
drop procedure bug9073|
# #
# BUG#NNNN: New bug synopsis # BUG#NNNN: New bug synopsis
......
...@@ -24,7 +24,7 @@ use test; ...@@ -24,7 +24,7 @@ use test;
drop table if exists t1; drop table if exists t1;
--enable_warnings --enable_warnings
create table t1 ( create table t1 (
id char(16) not null, id char(16) not null default '',
data int not null data int not null
); );
--disable_warnings --disable_warnings
...@@ -3398,6 +3398,89 @@ drop procedure bug8937| ...@@ -3398,6 +3398,89 @@ drop procedure bug8937|
delete from t1| delete from t1|
#
# BUG#6900: Stored procedure inner handler ignored
# BUG#9074: STORED PROC: The scope of every handler declared is not
# properly applied
#
--disable_warnings
drop procedure if exists bug6900|
drop procedure if exists bug9074|
drop procedure if exists bug6900_9074|
drop table if exists t3|
--enable_warnings
create table t3 (w char unique, x char)|
insert into t3 values ('a', 'b')|
create procedure bug6900()
begin
declare exit handler for sqlexception select '1';
begin
declare exit handler for sqlexception select '2';
insert into t3 values ('x', 'y', 'z');
end;
end|
create procedure bug9074()
begin
declare x1, x2, x3, x4, x5, x6 int default 0;
begin
declare continue handler for sqlstate '23000' set x5 = 1;
insert into t3 values ('a', 'b');
set x6 = 1;
end;
begin1_label:
begin
declare continue handler for sqlstate '23000' set x1 = 1;
insert into t3 values ('a', 'b');
set x2 = 1;
begin2_label:
begin
declare exit handler for sqlstate '23000' set x3 = 1;
set x4= 1;
insert into t3 values ('a','b');
set x4= 0;
end begin2_label;
end begin1_label;
select x1, x2, x3, x4, x5, x6;
end|
create procedure bug6900_9074(z int)
begin
declare exit handler for sqlstate '23000' select '23000';
begin
declare exit handler for sqlexception select 'sqlexception';
if z = 1 then
insert into t3 values ('a', 'b');
else
insert into t3 values ('x', 'y', 'z');
end if;
end;
end|
call bug6900()|
call bug9074()|
call bug6900_9074(0)|
call bug6900_9074(1)|
drop procedure bug6900|
drop procedure bug9074|
drop procedure bug6900_9074|
drop table t3|
# #
# BUG#NNNN: New bug synopsis # BUG#NNNN: New bug synopsis
# #
......
...@@ -1040,7 +1040,6 @@ delimiter |; ...@@ -1040,7 +1040,6 @@ delimiter |;
create procedure t1 () begin declare exit handler for sqlexception create procedure t1 () begin declare exit handler for sqlexception
select'a'; insert into t1 values (200); end;| select'a'; insert into t1 values (200); end;|
delimiter ;| delimiter ;|
--error 1264
call t1(); call t1();
select * from t1; select * from t1;
drop procedure t1; drop procedure t1;
...@@ -1050,3 +1049,37 @@ drop table t1; ...@@ -1050,3 +1049,37 @@ drop table t1;
# Restore mode # Restore mode
# #
set sql_mode=@org_mode; set sql_mode=@org_mode;
# Test fields with no default value that are NOT NULL (Bug #5986)
SET @@sql_mode = 'traditional';
CREATE TABLE t1 (i int not null);
--error 1364
INSERT INTO t1 VALUES ();
--error 1364
INSERT INTO t1 VALUES (DEFAULT);
--error 1364
INSERT INTO t1 VALUES (DEFAULT(i));
ALTER TABLE t1 ADD j int;
--error 1364
INSERT INTO t1 SET j = 1;
--error 1364
INSERT INTO t1 SET j = 1, i = DEFAULT;
--error 1364
INSERT INTO t1 SET j = 1, i = DEFAULT(i);
--error 1364
INSERT INTO t1 VALUES (DEFAULT,1);
DROP TABLE t1;
SET @@sql_mode = '';
CREATE TABLE t1 (i int not null);
INSERT INTO t1 VALUES ();
INSERT INTO t1 VALUES (DEFAULT);
# DEFAULT(i) is an error even with the default sql_mode
--error 1364
INSERT INTO t1 VALUES (DEFAULT(i));
ALTER TABLE t1 ADD j int;
INSERT INTO t1 SET j = 1;
INSERT INTO t1 SET j = 1, i = DEFAULT;
--error 1364
INSERT INTO t1 SET j = 1, i = DEFAULT(i);
INSERT INTO t1 VALUES (DEFAULT,1);
DROP TABLE t1;
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment