Merge with 5.1-release.
- Fixed problem with oqgraph and 'make dist' Note that after this merge we have a problem show in join_outer where we examine too many rows in one specific case (related to BUG#57024). This will be fixed when mwl#128 is merged into 5.3.
This commit is contained in:
commit
b7b25dc666
@ -108,7 +108,7 @@ if [ "x$warning_mode" != "xpedantic" ]; then
|
||||
# C++ warnings
|
||||
cxx_warnings="$warnings -Wno-unused-parameter"
|
||||
# cxx_warnings="$cxx_warnings -Woverloaded-virtual -Wsign-promo"
|
||||
cxx_warnings="$cxx_warnings -Wctor-dtor-privacy -Wnon-virtual-dtor"
|
||||
cxx_warnings="$cxx_warnings -Wnon-virtual-dtor"
|
||||
# Added unless --with-debug=full
|
||||
debug_extra_cflags="-O0 -g3 -gdwarf-2"
|
||||
else
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -16,12 +16,14 @@ check_cpu () {
|
||||
# on Linux (and others?) we can get detailed CPU information out of /proc
|
||||
cpuinfo="cat $CPUINFO"
|
||||
|
||||
# detect CPU architecture
|
||||
cpu_arch=`$cpuinfo | grep 'arch' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -1`
|
||||
|
||||
# detect CPU family
|
||||
cpu_family=`$cpuinfo | grep 'family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -1`
|
||||
if test -z "$cpu_family" ; then
|
||||
cpu_family=`$cpuinfo | grep 'cpu' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -1`
|
||||
fi
|
||||
|
||||
# detect CPU vendor and model
|
||||
cpu_vendor=`$cpuinfo | grep 'vendor_id' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -1`
|
||||
model_name=`$cpuinfo | grep 'model name' | cut -d ':' -f 2 | head -1`
|
||||
@ -56,8 +58,8 @@ check_cpu () {
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
cpu_family=`uname -m`;
|
||||
model_name=`uname -p`;
|
||||
cpu_family=`uname -p`;
|
||||
model_name=`uname -m`;
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
@ -65,9 +67,10 @@ check_cpu () {
|
||||
# detect CPU shortname as used by gcc options
|
||||
# this list is not complete, feel free to add further entries
|
||||
cpu_arg=""
|
||||
case "$cpu_family--$model_name" in
|
||||
low_cpu_arg=""
|
||||
case "$cpu_vendor--$cpu_family--$model_name--$cpu_arch" in
|
||||
# DEC Alpha
|
||||
Alpha*EV6*)
|
||||
*Alpha*EV6*)
|
||||
cpu_arg="ev6";
|
||||
;;
|
||||
#Core 2 Duo
|
||||
@ -96,6 +99,13 @@ check_cpu () {
|
||||
*Pentium*4*Mobile*)
|
||||
cpu_arg="pentium4m"
|
||||
;;
|
||||
*Pentium\(R\)*\ M*)
|
||||
cpu_arg="pentium-m"
|
||||
low_cpu_arg="pentium3"
|
||||
;;
|
||||
*Pentium\(R\)*\ D*)
|
||||
cpu_arg="prescott"
|
||||
;;
|
||||
*Pentium*4*)
|
||||
cpu_arg="pentium4"
|
||||
;;
|
||||
@ -120,6 +130,12 @@ check_cpu () {
|
||||
*Celeron*)
|
||||
cpu_arg="pentium2"
|
||||
;;
|
||||
*Atom*)
|
||||
cpu_arg="prescott"
|
||||
;;
|
||||
*GenuineIntel*)
|
||||
cpu_arg="pentium"
|
||||
;;
|
||||
*Turion*)
|
||||
cpu_arg="athlon64"
|
||||
;;
|
||||
@ -129,9 +145,30 @@ check_cpu () {
|
||||
*Athlon*)
|
||||
cpu_arg="athlon"
|
||||
;;
|
||||
*AMD-K7*)
|
||||
cpu_arg="athlon"
|
||||
;;
|
||||
*Athlon*XP\ *)
|
||||
cpu_arg="athlon-xp"
|
||||
;;
|
||||
*AMD*Sempron\(tm\)*)
|
||||
cpu_arg="athlon-mp"
|
||||
;;
|
||||
*AMD*Athlon\(tm\)\ 64*)
|
||||
cpu_arg="k8"
|
||||
;;
|
||||
*Opteron*)
|
||||
cpu_arg="opteron"
|
||||
;;
|
||||
*Phenom*)
|
||||
cpu_arg="k8"
|
||||
;;
|
||||
*AuthenticAMD*)
|
||||
cpu_arg="k6"
|
||||
;;
|
||||
*VIA\ *)
|
||||
cpu_arg="i686"
|
||||
;;
|
||||
# MacOSX / Intel
|
||||
*i386*i486*)
|
||||
cpu_arg="pentium-m"
|
||||
@ -143,8 +180,11 @@ check_cpu () {
|
||||
*Itanium*)
|
||||
cpu_arg="itanium"
|
||||
;;
|
||||
*IA-64*)
|
||||
cpu_arg="itanium"
|
||||
;;
|
||||
# Solaris Sparc
|
||||
*sparc*sun4u*)
|
||||
*sparc*sun4[uv]*)
|
||||
cpu_arg="sparc"
|
||||
;;
|
||||
# Power PC
|
||||
@ -160,6 +200,10 @@ check_cpu () {
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "x$low_cpu_arg" = "x" ; then
|
||||
low_cpu_arg="$cpu_arg"
|
||||
fi
|
||||
|
||||
if test -z "$cpu_arg" ; then
|
||||
if test "$CPUINFO" != " " ; then
|
||||
# fallback to uname if necessary
|
||||
@ -198,7 +242,7 @@ check_cpu () {
|
||||
case `gcc -dumpmachine` in
|
||||
i?86-* | x86_64-*)
|
||||
if test "$cc_comp" -lt 304 ; then
|
||||
check_cpu_cflags="-mcpu=${cpu_arg}"
|
||||
check_cpu_cflags="-mcpu=${low_cpu_arg}"
|
||||
elif test "$cc_comp" -ge 402 ; then
|
||||
check_cpu_cflags="-mtune=native"
|
||||
else
|
||||
|
@ -116,7 +116,7 @@ IF(MSVC)
|
||||
STRING(REPLACE "/MDd" "/MTd" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
|
||||
STRING(REPLACE "/MDd" "/MTd" CMAKE_CXX_FLAGS_DEBUG_INIT ${CMAKE_CXX_FLAGS_DEBUG_INIT})
|
||||
|
||||
# set stack size (see bug#20815)
|
||||
# generate map files, set stack size (see bug#20815)
|
||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /STACK:1048576")
|
||||
|
||||
# remove support for Exception handling
|
||||
|
@ -74,8 +74,7 @@ mysqlimport_SOURCES= mysqlimport.c
|
||||
mysqlimport_CFLAGS= -DTHREAD -UUNDEF_THREADS_HACK
|
||||
mysqlimport_LDADD = $(CXXLDFLAGS) $(CLIENT_THREAD_LIBS) \
|
||||
@CLIENT_EXTRA_LDFLAGS@ \
|
||||
$(LIBMYSQLCLIENT_LA) \
|
||||
$(top_builddir)/mysys/libmysys.a
|
||||
$(LIBMYSQLCLIENT_LA)
|
||||
|
||||
mysqlshow_SOURCES= mysqlshow.c
|
||||
|
||||
@ -83,16 +82,15 @@ mysqlslap_SOURCES= mysqlslap.c
|
||||
mysqlslap_CFLAGS= -DTHREAD -UMYSQL_CLIENT_NO_THREADS
|
||||
mysqlslap_LDADD = $(CXXLDFLAGS) $(CLIENT_THREAD_LIBS) \
|
||||
@CLIENT_EXTRA_LDFLAGS@ \
|
||||
$(LIBMYSQLCLIENT_LA) \
|
||||
$(top_builddir)/mysys/libmysys.a
|
||||
$(LIBMYSQLCLIENT_LA)
|
||||
|
||||
mysqltest_SOURCES= mysqltest.cc
|
||||
mysqltest_CXXFLAGS= -DTHREAD -UMYSQL_CLIENT_NO_THREADS
|
||||
mysqltest_LDADD = $(CXXLDFLAGS) $(CLIENT_THREAD_LIBS) \
|
||||
@CLIENT_EXTRA_LDFLAGS@ \
|
||||
$(LIBMYSQLCLIENT_LA) \
|
||||
$(top_builddir)/mysys/libmysys.a \
|
||||
$(top_builddir)/regex/libregex.a \
|
||||
$(LIBMYSQLCLIENT_LA) \
|
||||
$(top_builddir)/regex/libregex.la
|
||||
$(CLIENT_THREAD_LIBS)
|
||||
|
||||
mysql_upgrade_SOURCES= mysql_upgrade.c \
|
||||
|
@ -3750,7 +3750,8 @@ print_tab_data(MYSQL_RES *result)
|
||||
}
|
||||
|
||||
static int
|
||||
com_tee(String *buffer, char *line __attribute__((unused)))
|
||||
com_tee(String *buffer __attribute__((unused)),
|
||||
char *line __attribute__((unused)))
|
||||
{
|
||||
char file_name[FN_REFLEN], *end, *param;
|
||||
|
||||
@ -3809,7 +3810,8 @@ com_notee(String *buffer __attribute__((unused)),
|
||||
|
||||
#ifdef USE_POPEN
|
||||
static int
|
||||
com_pager(String *buffer, char *line __attribute__((unused)))
|
||||
com_pager(String *buffer __attribute__((unused)),
|
||||
char *line __attribute__((unused)))
|
||||
{
|
||||
char pager_name[FN_REFLEN], *end, *param;
|
||||
|
||||
@ -3941,7 +3943,8 @@ com_rehash(String *buffer __attribute__((unused)),
|
||||
|
||||
#ifdef USE_POPEN
|
||||
static int
|
||||
com_shell(String *buffer, char *line __attribute__((unused)))
|
||||
com_shell(String *buffer __attribute__((unused)),
|
||||
char *line __attribute__((unused)))
|
||||
{
|
||||
char *shell_cmd;
|
||||
|
||||
@ -4033,7 +4036,8 @@ com_connect(String *buffer, char *line)
|
||||
}
|
||||
|
||||
|
||||
static int com_source(String *buffer, char *line)
|
||||
static int com_source(String *buffer __attribute__((unused)),
|
||||
char *line)
|
||||
{
|
||||
char source_name[FN_REFLEN], *end, *param;
|
||||
LINE_BUFFER *line_buff;
|
||||
@ -5022,7 +5026,8 @@ static void init_username()
|
||||
}
|
||||
}
|
||||
|
||||
static int com_prompt(String *buffer, char *line)
|
||||
static int com_prompt(String *buffer __attribute__((unused)),
|
||||
char *line)
|
||||
{
|
||||
char *ptr=strchr(line, ' ');
|
||||
prompt_counter = 0;
|
||||
|
@ -110,6 +110,7 @@ static my_bool parsing_disabled= 0;
|
||||
static my_bool display_result_vertically= FALSE, display_result_lower= FALSE,
|
||||
display_metadata= FALSE, display_result_sorted= FALSE;
|
||||
static my_bool disable_query_log= 0, disable_result_log= 0;
|
||||
static my_bool disable_connect_log= 1;
|
||||
static my_bool disable_warnings= 0;
|
||||
static my_bool prepare_warnings_enabled= 0;
|
||||
static my_bool disable_info= 1;
|
||||
@ -256,7 +257,9 @@ struct st_connection
|
||||
int cur_query_len;
|
||||
pthread_mutex_t mutex;
|
||||
pthread_cond_t cond;
|
||||
pthread_t tid;
|
||||
int query_done;
|
||||
my_bool has_thread;
|
||||
#endif /*EMBEDDED_LIBRARY*/
|
||||
};
|
||||
|
||||
@ -287,6 +290,7 @@ enum enum_commands {
|
||||
Q_DISABLE_RPL_PARSE, Q_EVAL_RESULT,
|
||||
Q_ENABLE_QUERY_LOG, Q_DISABLE_QUERY_LOG,
|
||||
Q_ENABLE_RESULT_LOG, Q_DISABLE_RESULT_LOG,
|
||||
Q_ENABLE_CONNECT_LOG, Q_DISABLE_CONNECT_LOG,
|
||||
Q_WAIT_FOR_SLAVE_TO_STOP,
|
||||
Q_ENABLE_WARNINGS, Q_DISABLE_WARNINGS,
|
||||
Q_ENABLE_INFO, Q_DISABLE_INFO,
|
||||
@ -355,6 +359,8 @@ const char *command_names[]=
|
||||
/* Enable/disable that the _result_ from a query is logged to result file */
|
||||
"enable_result_log",
|
||||
"disable_result_log",
|
||||
"enable_connect_log",
|
||||
"disable_connect_log",
|
||||
"wait_for_slave_to_stop",
|
||||
"enable_warnings",
|
||||
"disable_warnings",
|
||||
@ -757,8 +763,6 @@ pthread_handler_t send_one_query(void *arg)
|
||||
static int do_send_query(struct st_connection *cn, const char *q, int q_len,
|
||||
int flags)
|
||||
{
|
||||
pthread_t tid;
|
||||
|
||||
if (flags & QUERY_REAP_FLAG)
|
||||
return mysql_send_query(&cn->mysql, q, q_len);
|
||||
|
||||
@ -769,9 +773,10 @@ static int do_send_query(struct st_connection *cn, const char *q, int q_len,
|
||||
cn->cur_query= q;
|
||||
cn->cur_query_len= q_len;
|
||||
cn->query_done= 0;
|
||||
if (pthread_create(&tid, &cn_thd_attrib, send_one_query, (void*)cn))
|
||||
if (pthread_create(&cn->tid, &cn_thd_attrib, send_one_query, (void*)cn))
|
||||
die("Cannot start new thread for query");
|
||||
|
||||
cn->has_thread= TRUE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -784,6 +789,14 @@ static void wait_query_thread_end(struct st_connection *con)
|
||||
pthread_cond_wait(&con->cond, &con->mutex);
|
||||
pthread_mutex_unlock(&con->mutex);
|
||||
}
|
||||
if (con->has_thread)
|
||||
{
|
||||
#ifndef __WIN__
|
||||
/* May hang on Windows, but the problem it solves is not seen there */
|
||||
pthread_join(con->tid, NULL);
|
||||
#endif
|
||||
con->has_thread= FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
#else /*EMBEDDED_LIBRARY*/
|
||||
@ -2223,8 +2236,14 @@ void var_query_set(VAR *var, const char *query, const char** query_end)
|
||||
DBUG_ENTER("var_query_set");
|
||||
LINT_INIT(res);
|
||||
|
||||
/* Only white space or ) allowed past ending ` */
|
||||
while (end > query && *end != '`')
|
||||
{
|
||||
if (*end && (*end != ' ' && *end != '\t' && *end != '\n' && *end != ')'))
|
||||
die("Spurious text after `query` expression");
|
||||
--end;
|
||||
}
|
||||
|
||||
if (query == end)
|
||||
die("Syntax error in query, missing '`'");
|
||||
++query;
|
||||
@ -3891,7 +3910,18 @@ void do_perl(struct st_command *command)
|
||||
if (!error)
|
||||
my_delete(temp_file_path, MYF(MY_WME));
|
||||
|
||||
handle_command_error(command, WEXITSTATUS(error), my_errno);
|
||||
/* Check for error code that indicates perl could not be started */
|
||||
int exstat= WEXITSTATUS(error);
|
||||
#ifdef __WIN__
|
||||
if (exstat == 1)
|
||||
/* Text must begin 'perl not found' as mtr looks for it */
|
||||
abort_not_supported_test("perl not found in path or did not start");
|
||||
#else
|
||||
if (exstat == 127)
|
||||
abort_not_supported_test("perl not found in path");
|
||||
#endif
|
||||
else
|
||||
handle_command_error(command, WEXITSTATUS(error), my_errno);
|
||||
}
|
||||
dynstr_free(&ds_delimiter);
|
||||
DBUG_VOID_RETURN;
|
||||
@ -4835,6 +4865,16 @@ void select_connection_name(const char *name)
|
||||
|
||||
set_current_connection(con);
|
||||
|
||||
/* Connection logging if enabled */
|
||||
if (!disable_connect_log && !disable_query_log)
|
||||
{
|
||||
DYNAMIC_STRING *ds= &ds_res;
|
||||
|
||||
dynstr_append_mem(ds, "connection ", 11);
|
||||
replace_dynstr_append(ds, name);
|
||||
dynstr_append_mem(ds, ";\n", 2);
|
||||
}
|
||||
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
@ -4921,6 +4961,17 @@ void do_close_connection(struct st_command *command)
|
||||
var_set_int("$mysql_get_server_version", 0xFFFFFFFF);
|
||||
var_set_string("$CURRENT_CONNECTION", con->name);
|
||||
}
|
||||
|
||||
/* Connection logging if enabled */
|
||||
if (!disable_connect_log && !disable_query_log)
|
||||
{
|
||||
DYNAMIC_STRING *ds= &ds_res;
|
||||
|
||||
dynstr_append_mem(ds, "disconnect ", 11);
|
||||
replace_dynstr_append(ds, ds_connection.str);
|
||||
dynstr_append_mem(ds, ";\n", 2);
|
||||
}
|
||||
|
||||
dynstr_free(&ds_connection);
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
@ -5056,6 +5107,13 @@ int connect_n_handle_errors(struct st_command *command,
|
||||
dynstr_append_mem(ds, delimiter, delimiter_length);
|
||||
dynstr_append_mem(ds, "\n", 1);
|
||||
}
|
||||
/* Simlified logging if enabled */
|
||||
if (!disable_connect_log && !disable_query_log)
|
||||
{
|
||||
replace_dynstr_append(ds, command->query);
|
||||
dynstr_append_mem(ds, ";\n", 2);
|
||||
}
|
||||
|
||||
while (!mysql_real_connect(con, host, user, pass, db, port, sock ? sock: 0,
|
||||
CLIENT_MULTI_STATEMENTS))
|
||||
{
|
||||
@ -5246,6 +5304,7 @@ void do_connect(struct st_command *command)
|
||||
|
||||
#ifdef EMBEDDED_LIBRARY
|
||||
con_slot->query_done= 1;
|
||||
con_slot->has_thread= FALSE;
|
||||
#endif
|
||||
if (!mysql_init(&con_slot->mysql))
|
||||
die("Failed on mysql_init()");
|
||||
@ -5262,8 +5321,13 @@ void do_connect(struct st_command *command)
|
||||
&opt_connect_timeout);
|
||||
|
||||
#ifdef HAVE_OPENSSL
|
||||
if (opt_use_ssl || con_ssl)
|
||||
if (opt_use_ssl)
|
||||
con_ssl= 1;
|
||||
#endif
|
||||
|
||||
if (con_ssl)
|
||||
{
|
||||
#ifdef HAVE_OPENSSL
|
||||
mysql_ssl_set(&con_slot->mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca,
|
||||
opt_ssl_capath, opt_ssl_cipher);
|
||||
#if MYSQL_VERSION_ID >= 50000
|
||||
@ -5272,15 +5336,15 @@ void do_connect(struct st_command *command)
|
||||
mysql_options(&con_slot->mysql, MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
|
||||
&opt_ssl_verify_server_cert);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef __WIN__
|
||||
if (con_pipe)
|
||||
{
|
||||
#ifdef __WIN__
|
||||
opt_protocol= MYSQL_PROTOCOL_PIPE;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (opt_protocol)
|
||||
mysql_options(&con_slot->mysql, MYSQL_OPT_PROTOCOL, (char*) &opt_protocol);
|
||||
@ -5568,6 +5632,8 @@ int read_line(char *buf, int size)
|
||||
char c, UNINIT_VAR(last_quote);
|
||||
char *p= buf, *buf_end= buf + size - 1;
|
||||
int skip_char= 0;
|
||||
my_bool have_slash= FALSE;
|
||||
|
||||
enum {R_NORMAL, R_Q, R_SLASH_IN_Q,
|
||||
R_COMMENT, R_LINE_START} state= R_LINE_START;
|
||||
DBUG_ENTER("read_line");
|
||||
@ -5639,9 +5705,13 @@ int read_line(char *buf, int size)
|
||||
}
|
||||
else if (c == '\'' || c == '"' || c == '`')
|
||||
{
|
||||
last_quote= c;
|
||||
state= R_Q;
|
||||
if (! have_slash)
|
||||
{
|
||||
last_quote= c;
|
||||
state= R_Q;
|
||||
}
|
||||
}
|
||||
have_slash= (c == '\\');
|
||||
break;
|
||||
|
||||
case R_COMMENT:
|
||||
@ -5716,7 +5786,7 @@ int read_line(char *buf, int size)
|
||||
/* Could be a multibyte character */
|
||||
/* This code is based on the code in "sql_load.cc" */
|
||||
#ifdef USE_MB
|
||||
int charlen = my_mbcharlen(charset_info, c);
|
||||
int charlen = my_mbcharlen(charset_info, (unsigned char) c);
|
||||
/* We give up if multibyte character is started but not */
|
||||
/* completed before we pass buf_end */
|
||||
if ((charlen > 1) && (p + charlen) <= buf_end)
|
||||
@ -5728,16 +5798,16 @@ int read_line(char *buf, int size)
|
||||
|
||||
for (i= 1; i < charlen; i++)
|
||||
{
|
||||
c= my_getc(cur_file->file);
|
||||
if (feof(cur_file->file))
|
||||
goto found_eof;
|
||||
c= my_getc(cur_file->file);
|
||||
*p++ = c;
|
||||
}
|
||||
if (! my_ismbchar(charset_info, mb_start, p))
|
||||
{
|
||||
/* It was not a multiline char, push back the characters */
|
||||
/* We leave first 'c', i.e. pretend it was a normal char */
|
||||
while (p > mb_start)
|
||||
while (p-1 > mb_start)
|
||||
my_ungetc(*--p);
|
||||
}
|
||||
}
|
||||
@ -7385,11 +7455,13 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags)
|
||||
(flags & QUERY_REAP_FLAG));
|
||||
DBUG_ENTER("run_query");
|
||||
|
||||
init_dynamic_string(&ds_warnings, NULL, 0, 256);
|
||||
|
||||
if (cn->pending && (flags & QUERY_SEND_FLAG))
|
||||
die ("Cannot run query on connection between send and reap");
|
||||
|
||||
if (!(flags & QUERY_SEND_FLAG) && !cn->pending)
|
||||
die ("Cannot reap on a connection without pending send");
|
||||
|
||||
init_dynamic_string(&ds_warnings, NULL, 0, 256);
|
||||
/*
|
||||
Evaluate query if this is an eval command
|
||||
*/
|
||||
@ -8130,6 +8202,8 @@ int main(int argc, char **argv)
|
||||
case Q_DISABLE_ABORT_ON_ERROR: abort_on_error=0; break;
|
||||
case Q_ENABLE_RESULT_LOG: disable_result_log=0; break;
|
||||
case Q_DISABLE_RESULT_LOG: disable_result_log=1; break;
|
||||
case Q_ENABLE_CONNECT_LOG: disable_connect_log=0; break;
|
||||
case Q_DISABLE_CONNECT_LOG: disable_connect_log=1; break;
|
||||
case Q_ENABLE_WARNINGS: disable_warnings=0; break;
|
||||
case Q_DISABLE_WARNINGS: disable_warnings=1; break;
|
||||
case Q_ENABLE_PREPARE_WARNINGS: prepare_warnings_enabled=1; break;
|
||||
@ -9796,6 +9870,7 @@ void free_pointer_array(POINTER_ARRAY *pa)
|
||||
void replace_dynstr_append_mem(DYNAMIC_STRING *ds,
|
||||
const char *val, int len)
|
||||
{
|
||||
char lower[512];
|
||||
#ifdef __WIN__
|
||||
fix_win_paths(val, len);
|
||||
#endif
|
||||
@ -9803,7 +9878,6 @@ void replace_dynstr_append_mem(DYNAMIC_STRING *ds,
|
||||
if (display_result_lower)
|
||||
{
|
||||
/* Convert to lower case, and do this first */
|
||||
char lower[512];
|
||||
char *c= lower;
|
||||
for (const char *v= val; *v; v++)
|
||||
*c++= my_tolower(charset_info, *v);
|
||||
|
@ -73,9 +73,13 @@ public:
|
||||
}
|
||||
static void *operator new(size_t size, MEM_ROOT *mem_root)
|
||||
{ return (void*) alloc_root(mem_root, (uint) size); }
|
||||
static void operator delete(void *ptr_arg,size_t size)
|
||||
{ TRASH(ptr_arg, size); }
|
||||
static void operator delete(void *ptr_arg, MEM_ROOT *mem_root)
|
||||
static void operator delete(void *ptr_arg, size_t size)
|
||||
{
|
||||
(void) ptr_arg;
|
||||
(void) size;
|
||||
TRASH(ptr_arg, size);
|
||||
}
|
||||
static void operator delete(void *, MEM_ROOT *)
|
||||
{ /* never called */ }
|
||||
~String() { free(); }
|
||||
|
||||
|
@ -136,7 +136,7 @@ ed_delete_prev_word(EditLine *el, int c __attribute__((__unused__)))
|
||||
*/
|
||||
protected el_action_t
|
||||
/*ARGSUSED*/
|
||||
ed_delete_next_char(EditLine *el, int c)
|
||||
ed_delete_next_char(EditLine *el, int c __attribute__((__unused__)))
|
||||
{
|
||||
#ifdef notdef /* XXX */
|
||||
#define EL el->el_line
|
||||
@ -431,7 +431,8 @@ ed_argument_digit(EditLine *el, int c)
|
||||
*/
|
||||
protected el_action_t
|
||||
/*ARGSUSED*/
|
||||
ed_unassigned(EditLine *el, int c __attribute__((__unused__)))
|
||||
ed_unassigned(EditLine *el __attribute__((__unused__)),
|
||||
int c __attribute__((__unused__)))
|
||||
{
|
||||
|
||||
return (CC_ERROR);
|
||||
|
@ -202,7 +202,7 @@ _move_history(int op)
|
||||
*/
|
||||
static int
|
||||
/*ARGSUSED*/
|
||||
_getc_function(EditLine *el, char *c)
|
||||
_getc_function(EditLine *el __attribute__((__unused__)), char *c)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -1613,7 +1613,8 @@ rl_insert(int count, int c)
|
||||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
rl_newline(int count, int c)
|
||||
rl_newline(int count __attribute__((__unused__)),
|
||||
int c __attribute__((__unused__)))
|
||||
{
|
||||
/*
|
||||
* Readline-4.0 appears to ignore the args.
|
||||
@ -1623,7 +1624,7 @@ rl_newline(int count, int c)
|
||||
|
||||
/*ARGSUSED*/
|
||||
static unsigned char
|
||||
rl_bind_wrapper(EditLine *el, unsigned char c)
|
||||
rl_bind_wrapper(EditLine *el __attribute__((__unused__)), unsigned char c)
|
||||
{
|
||||
if (map[c] == NULL)
|
||||
return CC_ERROR;
|
||||
@ -1718,7 +1719,7 @@ rl_get_previous_history(int count, int key)
|
||||
|
||||
void
|
||||
/*ARGSUSED*/
|
||||
rl_prep_terminal(int meta_flag)
|
||||
rl_prep_terminal(int meta_flag __attribute__((__unused__)))
|
||||
{
|
||||
el_set(e, EL_PREP_TERM, 1);
|
||||
}
|
||||
@ -1922,7 +1923,8 @@ _rl_qsort_string_compare(char **s1, char **s2)
|
||||
|
||||
int
|
||||
/*ARGSUSED*/
|
||||
rl_kill_text(int from, int to)
|
||||
rl_kill_text(int from __attribute__((__unused__)),
|
||||
int to __attribute__((__unused__)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -1941,20 +1943,25 @@ rl_get_keymap(void)
|
||||
|
||||
void
|
||||
/*ARGSUSED*/
|
||||
rl_set_keymap(Keymap k)
|
||||
rl_set_keymap(Keymap k __attribute__((__unused__)))
|
||||
{
|
||||
}
|
||||
|
||||
int
|
||||
/*ARGSUSED*/
|
||||
rl_generic_bind(int type, const char * keyseq, const char * data, Keymap k)
|
||||
rl_generic_bind(int type __attribute__((__unused__)),
|
||||
const char * keyseq __attribute__((__unused__)),
|
||||
const char * data __attribute__((__unused__)),
|
||||
Keymap k __attribute__((__unused__)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
/*ARGSUSED*/
|
||||
rl_bind_key_in_map(int key, Function *fun, Keymap k)
|
||||
rl_bind_key_in_map(int key __attribute__((__unused__)),
|
||||
Function *fun __attribute__((__unused__)),
|
||||
Keymap k __attribute__((__unused__)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ vi_paste_prev(EditLine *el, int c __attribute__((__unused__)))
|
||||
*/
|
||||
protected el_action_t
|
||||
/*ARGSUSED*/
|
||||
vi_prev_big_word(EditLine *el, int c)
|
||||
vi_prev_big_word(EditLine *el, int c __attribute__((__unused__)))
|
||||
{
|
||||
|
||||
if (el->el_line.cursor == el->el_line.buffer)
|
||||
@ -195,7 +195,7 @@ vi_prev_word(EditLine *el, int c __attribute__((__unused__)))
|
||||
*/
|
||||
protected el_action_t
|
||||
/*ARGSUSED*/
|
||||
vi_next_big_word(EditLine *el, int c)
|
||||
vi_next_big_word(EditLine *el, int c __attribute__((__unused__)))
|
||||
{
|
||||
|
||||
if (el->el_line.cursor >= el->el_line.lastchar - 1)
|
||||
@ -462,7 +462,7 @@ vi_delete_meta(EditLine *el, int c __attribute__((__unused__)))
|
||||
*/
|
||||
protected el_action_t
|
||||
/*ARGSUSED*/
|
||||
vi_end_big_word(EditLine *el, int c)
|
||||
vi_end_big_word(EditLine *el, int c __attribute__((__unused__)))
|
||||
{
|
||||
|
||||
if (el->el_line.cursor == el->el_line.lastchar)
|
||||
@ -797,7 +797,7 @@ vi_repeat_prev_char(EditLine *el, int c __attribute__((__unused__)))
|
||||
*/
|
||||
protected el_action_t
|
||||
/*ARGSUSED*/
|
||||
vi_match(EditLine *el, int c)
|
||||
vi_match(EditLine *el, int c __attribute__((__unused__)))
|
||||
{
|
||||
const char match_chars[] = "()[]{}";
|
||||
char *cp;
|
||||
@ -844,7 +844,7 @@ vi_match(EditLine *el, int c)
|
||||
*/
|
||||
protected el_action_t
|
||||
/*ARGSUSED*/
|
||||
vi_undo_line(EditLine *el, int c)
|
||||
vi_undo_line(EditLine *el, int c __attribute__((__unused__)))
|
||||
{
|
||||
|
||||
cv_undo(el);
|
||||
@ -858,7 +858,7 @@ vi_undo_line(EditLine *el, int c)
|
||||
*/
|
||||
protected el_action_t
|
||||
/*ARGSUSED*/
|
||||
vi_to_column(EditLine *el, int c)
|
||||
vi_to_column(EditLine *el, int c __attribute__((__unused__)))
|
||||
{
|
||||
|
||||
el->el_line.cursor = el->el_line.buffer;
|
||||
@ -872,7 +872,7 @@ vi_to_column(EditLine *el, int c)
|
||||
*/
|
||||
protected el_action_t
|
||||
/*ARGSUSED*/
|
||||
vi_yank_end(EditLine *el, int c)
|
||||
vi_yank_end(EditLine *el, int c __attribute__((__unused__)))
|
||||
{
|
||||
|
||||
cv_yank(el, el->el_line.cursor,
|
||||
@ -886,7 +886,7 @@ vi_yank_end(EditLine *el, int c)
|
||||
*/
|
||||
protected el_action_t
|
||||
/*ARGSUSED*/
|
||||
vi_yank(EditLine *el, int c)
|
||||
vi_yank(EditLine *el, int c __attribute__((__unused__)))
|
||||
{
|
||||
|
||||
return cv_action(el, YANK);
|
||||
@ -898,7 +898,7 @@ vi_yank(EditLine *el, int c)
|
||||
*/
|
||||
protected el_action_t
|
||||
/*ARGSUSED*/
|
||||
vi_comment_out(EditLine *el, int c)
|
||||
vi_comment_out(EditLine *el, int c __attribute__((__unused__)))
|
||||
{
|
||||
|
||||
el->el_line.cursor = el->el_line.buffer;
|
||||
@ -919,7 +919,8 @@ extern char *get_alias_text(const char *) __weak_reference(get_alias_text);
|
||||
#endif
|
||||
protected el_action_t
|
||||
/*ARGSUSED*/
|
||||
vi_alias(EditLine *el, int c)
|
||||
vi_alias(EditLine *el __attribute__((__unused__)),
|
||||
int c __attribute__((__unused__)))
|
||||
{
|
||||
#if defined(__weak_reference) && !defined(__FreeBSD__)
|
||||
char alias_name[3];
|
||||
@ -949,7 +950,7 @@ vi_alias(EditLine *el, int c)
|
||||
*/
|
||||
protected el_action_t
|
||||
/*ARGSUSED*/
|
||||
vi_to_history_line(EditLine *el, int c)
|
||||
vi_to_history_line(EditLine *el, int c __attribute__((__unused__)))
|
||||
{
|
||||
int sv_event_no = el->el_history.eventno;
|
||||
el_action_t rval;
|
||||
@ -994,7 +995,7 @@ vi_to_history_line(EditLine *el, int c)
|
||||
*/
|
||||
protected el_action_t
|
||||
/*ARGSUSED*/
|
||||
vi_histedit(EditLine *el, int c)
|
||||
vi_histedit(EditLine *el, int c __attribute__((__unused__)))
|
||||
{
|
||||
int fd;
|
||||
pid_t pid;
|
||||
@ -1050,7 +1051,7 @@ vi_histedit(EditLine *el, int c)
|
||||
*/
|
||||
protected el_action_t
|
||||
/*ARGSUSED*/
|
||||
vi_history_word(EditLine *el, int c)
|
||||
vi_history_word(EditLine *el, int c __attribute__((__unused__)))
|
||||
{
|
||||
const char *wp = HIST_FIRST(el);
|
||||
const char *wep, *wsp;
|
||||
@ -1099,7 +1100,7 @@ vi_history_word(EditLine *el, int c)
|
||||
*/
|
||||
protected el_action_t
|
||||
/*ARGSUSED*/
|
||||
vi_redo(EditLine *el, int c)
|
||||
vi_redo(EditLine *el, int c __attribute__((__unused__)))
|
||||
{
|
||||
c_redo_t *r = &el->el_chared.c_redo;
|
||||
|
||||
|
@ -32,6 +32,3 @@ noinst_HEADERS = readline.h chardefs.h keymaps.h \
|
||||
EXTRA_DIST= emacs_keymap.c vi_keymap.c
|
||||
|
||||
DEFS = -DMYSQL_CLIENT_NO_THREADS -DHAVE_CONFIG_H -DNO_KILL_INTR -D_GNU_SOURCE=1
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
%::SCCS/s.%
|
||||
|
@ -1839,8 +1839,11 @@ rl_username_completion_function (text, state)
|
||||
#else /* !__WIN32__ && !__OPENNT) */
|
||||
static char *username = (char *)NULL;
|
||||
static struct passwd *entry;
|
||||
static int namelen, first_char, first_char_loc;
|
||||
static int first_char, first_char_loc;
|
||||
char *value;
|
||||
#if defined (HAVE_GETPWENT)
|
||||
static int namelen;
|
||||
#endif
|
||||
|
||||
if (state == 0)
|
||||
{
|
||||
@ -1850,7 +1853,9 @@ rl_username_completion_function (text, state)
|
||||
first_char_loc = first_char == '~';
|
||||
|
||||
username = savestring (&text[first_char_loc]);
|
||||
#if defined (HAVE_GETPWENT)
|
||||
namelen = strlen (username);
|
||||
#endif
|
||||
setpwent ();
|
||||
}
|
||||
|
||||
|
@ -402,6 +402,7 @@ history_truncate_file (fname, lines)
|
||||
if (bp > buffer && ((file = open (filename, O_WRONLY|O_TRUNC|O_BINARY, 0600)) != -1))
|
||||
{
|
||||
bytes_written= write (file, bp, chars_read - (bp - buffer));
|
||||
(void) bytes_written;
|
||||
|
||||
#if defined (__BEOS__)
|
||||
/* BeOS ignores O_TRUNC. */
|
||||
|
@ -617,7 +617,7 @@ rl_search_history (direction, invoking_key)
|
||||
int direction, invoking_key __attribute__((unused));
|
||||
{
|
||||
_rl_search_cxt *cxt; /* local for now, but saved globally */
|
||||
int c, r;
|
||||
int r;
|
||||
|
||||
RL_SETSTATE(RL_STATE_ISEARCH);
|
||||
cxt = _rl_isearch_init (direction);
|
||||
@ -632,7 +632,7 @@ rl_search_history (direction, invoking_key)
|
||||
r = -1;
|
||||
for (;;)
|
||||
{
|
||||
c = _rl_search_getchar (cxt);
|
||||
_rl_search_getchar (cxt);
|
||||
/* We might want to handle EOF here (c == 0) */
|
||||
r = _rl_isearch_dispatch (cxt, cxt->lastc);
|
||||
if (r <= 0)
|
||||
@ -655,9 +655,9 @@ int
|
||||
_rl_isearch_callback (cxt)
|
||||
_rl_search_cxt *cxt;
|
||||
{
|
||||
int c, r;
|
||||
int r;
|
||||
|
||||
c = _rl_search_getchar (cxt);
|
||||
_rl_search_getchar (cxt);
|
||||
/* We might want to handle EOF here */
|
||||
r = _rl_isearch_dispatch (cxt, cxt->lastc);
|
||||
|
||||
|
@ -115,7 +115,7 @@ rl_insert_close (count, invoking_key)
|
||||
else
|
||||
{
|
||||
#if defined (HAVE_SELECT)
|
||||
int orig_point, match_point, ready;
|
||||
int orig_point, match_point;
|
||||
struct timeval timer;
|
||||
fd_set readfds;
|
||||
|
||||
@ -136,7 +136,7 @@ rl_insert_close (count, invoking_key)
|
||||
orig_point = rl_point;
|
||||
rl_point = match_point;
|
||||
(*rl_redisplay_function) ();
|
||||
ready = select (1, &readfds, (fd_set *)NULL, (fd_set *)NULL, &timer);
|
||||
select (1, &readfds, (fd_set *)NULL, (fd_set *)NULL, &timer);
|
||||
rl_point = orig_point;
|
||||
#else /* !HAVE_SELECT */
|
||||
_rl_insert_char (count, invoking_key);
|
||||
|
@ -446,11 +446,10 @@ readline_internal_char ()
|
||||
readline_internal_charloop ()
|
||||
#endif
|
||||
{
|
||||
static int lastc, eof_found;
|
||||
static int lastc;
|
||||
int c, code, lk;
|
||||
|
||||
lastc = -1;
|
||||
eof_found = 0;
|
||||
|
||||
#if !defined (READLINE_CALLBACKS)
|
||||
while (rl_done == 0)
|
||||
|
@ -268,7 +268,7 @@ _rl_get_screen_size (tty, ignore_env)
|
||||
|
||||
#if !defined (__DJGPP__)
|
||||
if (_rl_screenwidth <= 0 && term_string_buffer)
|
||||
_rl_screenwidth = tgetnum ("co");
|
||||
_rl_screenwidth = tgetnum ((char *)"co");
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -284,7 +284,7 @@ _rl_get_screen_size (tty, ignore_env)
|
||||
|
||||
#if !defined (__DJGPP__)
|
||||
if (_rl_screenheight <= 0 && term_string_buffer)
|
||||
_rl_screenheight = tgetnum ("li");
|
||||
_rl_screenheight = tgetnum ((char *)"li");
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -516,7 +516,7 @@ _rl_init_terminal_io (terminal_name)
|
||||
if (!_rl_term_cr)
|
||||
_rl_term_cr = "\r";
|
||||
|
||||
_rl_term_autowrap = tgetflag ("am") && tgetflag ("xn");
|
||||
_rl_term_autowrap = tgetflag ((char *)"am") && tgetflag ((char *)"xn");
|
||||
|
||||
/* Allow calling application to set default height and width, using
|
||||
rl_set_screen_size */
|
||||
@ -531,7 +531,7 @@ _rl_init_terminal_io (terminal_name)
|
||||
|
||||
/* Check to see if this terminal has a meta key and clear the capability
|
||||
variables if there is none. */
|
||||
term_has_meta = (tgetflag ("km") || tgetflag ("MT"));
|
||||
term_has_meta = (tgetflag ((char *)"km") || tgetflag ((char *)"MT"));
|
||||
if (!term_has_meta)
|
||||
_rl_term_mm = _rl_term_mo = (char *)NULL;
|
||||
|
||||
|
@ -811,11 +811,10 @@ _rl_overwrite_char (count, c)
|
||||
int i;
|
||||
#if defined (HANDLE_MULTIBYTE)
|
||||
char mbkey[MB_LEN_MAX];
|
||||
int k;
|
||||
|
||||
/* Read an entire multibyte character sequence to insert COUNT times. */
|
||||
if (count > 0 && MB_CUR_MAX > 1 && rl_byte_oriented == 0)
|
||||
k = _rl_read_mbstring (c, mbkey, MB_LEN_MAX);
|
||||
_rl_read_mbstring (c, mbkey, MB_LEN_MAX);
|
||||
#endif
|
||||
|
||||
rl_begin_undo_group ();
|
||||
|
@ -8,7 +8,8 @@ AC_DEFUN([MY_MAINTAINER_MODE], [
|
||||
[AS_HELP_STRING([--enable-mysql-maintainer-mode],
|
||||
[Enable a MySQL maintainer-specific development environment])],
|
||||
[USE_MYSQL_MAINTAINER_MODE=$enableval],
|
||||
[USE_MYSQL_MAINTAINER_MODE=no])
|
||||
[AS_IF([test "$with_debug" != "no" -a "$with_valgrind" = "no"],
|
||||
[USE_MYSQL_MAINTAINER_MODE=yes], [USE_MYSQL_MAINTAINER_MODE=no])])
|
||||
AC_MSG_RESULT([$USE_MYSQL_MAINTAINER_MODE])
|
||||
])
|
||||
|
||||
@ -16,7 +17,7 @@ AC_DEFUN([MY_MAINTAINER_MODE], [
|
||||
AC_DEFUN([MY_MAINTAINER_MODE_WARNINGS], [
|
||||
# Setup GCC warning options.
|
||||
AS_IF([test "$GCC" = "yes"], [
|
||||
C_WARNINGS="-Wall -Wextra -Wunused -Wwrite-strings -Werror"
|
||||
C_WARNINGS="-Wall -Wextra -Wunused -Wwrite-strings -Wno-strict-aliasing -Werror -DFORCE_INIT_OF_VARS"
|
||||
CXX_WARNINGS="${C_WARNINGS} -Wno-unused-parameter"
|
||||
])
|
||||
|
||||
|
@ -116,18 +116,32 @@ dnl ---------------------------------------------------------------------------
|
||||
dnl Macro: MYSQL_PLUGIN_STATIC
|
||||
dnl
|
||||
dnl SYNOPSIS
|
||||
dnl MYSQL_PLUGIN_STATIC([name],[libmyplugin.a])
|
||||
dnl MYSQL_PLUGIN_STATIC([name],[libmyplugin.a],[libmyplugin_embedded.a])
|
||||
dnl
|
||||
dnl DESCRIPTION
|
||||
dnl Declare the name for the static library
|
||||
dnl Declare the name for the static library
|
||||
dnl
|
||||
dnl Third argument is optional, only needed for special plugins that depend
|
||||
dnl on server internals and have source files that must be compiled specially
|
||||
dnl with -DEMBEDDED_LIBRARY for embedded server. If specified, the third
|
||||
dnl argument is used to link embedded server instead of the second.
|
||||
dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
AC_DEFUN([MYSQL_PLUGIN_STATIC],[
|
||||
MYSQL_REQUIRE_PLUGIN([$1])
|
||||
m4_define([MYSQL_PLUGIN_STATIC_]AS_TR_CPP([$1]), [$2])
|
||||
ifelse($#, 3, [
|
||||
m4_define([MYSQL_PLUGIN_EMBEDDED_]AS_TR_CPP([$1]), [$3])
|
||||
])
|
||||
])
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Substitution variable to use to compile source files specially for
|
||||
dnl embedded server.
|
||||
dnl To be used by plugins that have sources that depend on server internals.
|
||||
dnl ---------------------------------------------------------------------------
|
||||
AC_SUBST([plugin_embedded_defs], ["-DEMBEDDED_LIBRARY -DMYSQL_SERVER"])
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Macro: MYSQL_PLUGIN_DYNAMIC
|
||||
@ -222,7 +236,7 @@ AC_DEFUN([MYSQL_PLUGIN_WITHOUT],[
|
||||
if test "X[$with_plugin_]$1" = Xyes; then
|
||||
AC_MSG_ERROR([Plugin $1 cannot be built])
|
||||
else
|
||||
[with_plugin_]$1=no
|
||||
[mysql_plugin_]$1=no
|
||||
fi
|
||||
])
|
||||
|
||||
@ -278,28 +292,6 @@ AC_DEFUN([MYSQL_PLUGIN_ACTIONS],[
|
||||
])
|
||||
])
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Macro: MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS
|
||||
dnl
|
||||
dnl SYNOPSIS
|
||||
dnl MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS([name],[file name])
|
||||
dnl
|
||||
dnl DESCRIPTION
|
||||
dnl Some modules in plugins keep dependance on structures
|
||||
dnl declared in sql/ (THD class usually)
|
||||
dnl That has to be fixed in the future, but until then
|
||||
dnl we have to recompile these modules when we want to
|
||||
dnl to compile server parts with the different #defines
|
||||
dnl Normally it happens when we compile the embedded server
|
||||
dnl Thus one should mark such files in his handler using this macro
|
||||
dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
AC_DEFUN([MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS],[
|
||||
MYSQL_REQUIRE_PLUGIN([$1])
|
||||
m4_define([MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS_]AS_TR_CPP([$1]), [$2])
|
||||
])
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Macro: MYSQL_CONFIGURE_PLUGINS
|
||||
dnl
|
||||
@ -360,11 +352,25 @@ AC_DEFUN([_MYSQL_EMIT_CHECK_PLUGIN],[
|
||||
[MYSQL_PLUGIN_DYNAMIC_]AS_TR_CPP([$1]),
|
||||
[MYSQL_PLUGIN_MANDATORY_]AS_TR_CPP([$1]),
|
||||
[MYSQL_PLUGIN_DISABLED_]AS_TR_CPP([$1]),
|
||||
[MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS_]AS_TR_CPP([$1]),
|
||||
[MYSQL_PLUGIN_EMBEDDED_]AS_TR_CPP([$1]),
|
||||
[MYSQL_PLUGIN_ACTIONS_]AS_TR_CPP([$1])
|
||||
)
|
||||
])
|
||||
|
||||
dnl __MYSQL_EMIT_CHECK_PLUGIN arguments:
|
||||
dnl
|
||||
dnl 1 - plugin identifying name
|
||||
dnl 2 - plugin identifying name, with `-' replaced by `_'
|
||||
dnl 3 - plugin long name
|
||||
dnl 4 - plugin description
|
||||
dnl 5 - mysql_plugin_define (eg. WITH_xxx_STORAGE_ENGINE)
|
||||
dnl 6 - directory
|
||||
dnl 7 - static target (if supports static build)
|
||||
dnl 8 - dynamic target (if supports dynamic build)
|
||||
dnl 9 - mandatory flag
|
||||
dnl 10 - disabled flag
|
||||
dnl 11 - static target for libmysqld (if different from $7)
|
||||
dnl 12 - actions
|
||||
AC_DEFUN([__MYSQL_EMIT_CHECK_PLUGIN],[
|
||||
m4_ifdef([$5],[
|
||||
AH_TEMPLATE($5, [Include ]$3[ into mysqld])
|
||||
@ -381,6 +387,10 @@ AC_DEFUN([__MYSQL_EMIT_CHECK_PLUGIN],[
|
||||
__MYSQL_EMIT_CHECK_RESULT($3,[no])
|
||||
],[
|
||||
|
||||
if test "X[$mysql_plugin_]$2" = Xno; then
|
||||
[with_plugin_]$2=no
|
||||
fi
|
||||
|
||||
# Plugin is not disabled, determine if it should be built,
|
||||
# or only distributed
|
||||
|
||||
@ -439,11 +449,12 @@ AC_DEFUN([__MYSQL_EMIT_CHECK_PLUGIN],[
|
||||
])
|
||||
AC_SUBST([plugin_]$2[_shared_target], "$8")
|
||||
AC_SUBST([plugin_]$2[_static_target], [""])
|
||||
AC_SUBST([plugin_]$2[_embedded_static_target], [""])
|
||||
[with_plugin_]$2=yes
|
||||
__MYSQL_EMIT_CHECK_RESULT($3,[plugin])
|
||||
m4_ifdef([$6],[
|
||||
else
|
||||
[mysql_plugin_]$2=no
|
||||
[with_plugin_]$2=no
|
||||
__MYSQL_EMIT_CHECK_RESULT($3,[no])
|
||||
fi
|
||||
])
|
||||
@ -453,32 +464,47 @@ AC_DEFUN([__MYSQL_EMIT_CHECK_PLUGIN],[
|
||||
])
|
||||
else
|
||||
m4_ifdef([$7],[
|
||||
ifelse(m4_bregexp($7, [^lib[^.]+\.a$]), -2, [
|
||||
dnl change above "-2" to "0" to enable this section
|
||||
dnl Although this is "pretty", it breaks libmysqld build
|
||||
m4_ifdef([$6],[
|
||||
mysql_use_plugin_dir="$6"
|
||||
mysql_plugin_libs="$mysql_plugin_libs -L[\$(top_builddir)]/$6"
|
||||
])
|
||||
mysql_plugin_libs="$mysql_plugin_libs dnl
|
||||
[-l]m4_bregexp($7, [^lib\([^.]+\)], [\1])"
|
||||
], m4_bregexp($7, [^\\\$]), 0, [
|
||||
ifelse(m4_bregexp($7, [^\\\$]), 0, [
|
||||
m4_ifdef([$6],[
|
||||
mysql_use_plugin_dir="$6"
|
||||
])
|
||||
mysql_plugin_libs="$mysql_plugin_libs $7"
|
||||
m4_ifdef([$11],[
|
||||
mysql_embedded_plugin_libs="$mysql_embedded_plugin_libs $11"
|
||||
],[
|
||||
mysql_embedded_plugin_libs="$mysql_embedded_plugin_libs $7"
|
||||
])
|
||||
], [
|
||||
m4_ifdef([$6],[
|
||||
mysql_use_plugin_dir="$6"
|
||||
mysql_plugin_libs="$mysql_plugin_libs \$(top_builddir)/$6/$7"
|
||||
m4_ifdef([$11],[
|
||||
mysql_embedded_plugin_libs="$mysql_embedded_plugin_libs \$(top_builddir)/$6/$11"
|
||||
],[
|
||||
mysql_embedded_plugin_libs="$mysql_embedded_plugin_libs \$(top_builddir)/$6/$7"
|
||||
])
|
||||
],[
|
||||
mysql_plugin_libs="$mysql_plugin_libs $7"
|
||||
m4_ifdef([$11],[
|
||||
mysql_embedded_plugin_libs="$mysql_embedded_plugin_libs $11"
|
||||
],[
|
||||
mysql_embedded_plugin_libs="$mysql_embedded_plugin_libs $7"
|
||||
])
|
||||
])
|
||||
])
|
||||
m4_ifdef([$5],[
|
||||
AC_DEFINE($5)
|
||||
])
|
||||
AC_SUBST([plugin_]$2[_static_target], "$7")
|
||||
m4_ifdef([$11], [
|
||||
if test "$with_embedded_server" = "yes"; then
|
||||
AC_SUBST([plugin_]$2[_embedded_static_target], "$11")
|
||||
else
|
||||
AC_SUBST([plugin_]$2[_embedded_static_target], [""])
|
||||
fi
|
||||
], [
|
||||
AC_SUBST([plugin_]$2[_embedded_static_target], [""])
|
||||
])
|
||||
AC_SUBST([plugin_]$2[_shared_target], [""])
|
||||
],[
|
||||
m4_ifdef([$6],[
|
||||
@ -495,14 +521,6 @@ dnl Although this is "pretty", it breaks libmysqld build
|
||||
maria_plugin_defs="$maria_plugin_defs, [builtin_maria_]$2[_plugin]"
|
||||
[with_plugin_]$2=yes
|
||||
__MYSQL_EMIT_CHECK_RESULT($3,[yes])
|
||||
m4_ifdef([$11], [
|
||||
m4_foreach([plugin], [$11], [
|
||||
condition_dependent_plugin_modules="$condition_dependent_plugin_modules m4_bregexp(plugin, [[^/]+$], [\&])"
|
||||
condition_dependent_plugin_objects="$condition_dependent_plugin_objects m4_bregexp(plugin, [[^/]+\.], [\&o])"
|
||||
condition_dependent_plugin_links="$condition_dependent_plugin_links $6/plugin"
|
||||
condition_dependent_plugin_includes="$condition_dependent_plugin_includes -I[\$(top_srcdir)]/$6/m4_bregexp(plugin, [^.+[/$]], [\&])"
|
||||
])
|
||||
])
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -769,6 +787,10 @@ AC_DEFUN([_MYSQL_EMIT_PLUGINS],[
|
||||
])
|
||||
|
||||
AC_DEFUN([_MYSQL_EMIT_PLUGIN_ENABLE],[
|
||||
if test "X[$mysql_plugin_]$2" = Xno -a \
|
||||
"X[$with_plugin_]$2" != Xno; then
|
||||
AC_MSG_ERROR([Plugin $1 cannot be built])
|
||||
fi
|
||||
m4_ifdef([$5],m4_ifdef([$4],[
|
||||
[mysql_plugin_]$2=yes
|
||||
],[
|
||||
|
51
configure.in
51
configure.in
@ -109,7 +109,26 @@ AC_SUBST(SHARED_LIB_MAJOR_VERSION)
|
||||
AC_SUBST(SHARED_LIB_VERSION)
|
||||
AC_SUBST(AVAILABLE_LANGUAGES)
|
||||
|
||||
# Check whether a debug mode should be enabled.
|
||||
AC_ARG_WITH([debug],
|
||||
AS_HELP_STRING([--with-debug@<:@=full@:>@],
|
||||
[Enable various amounts of debugging support (full adds a slow memory checker).]),
|
||||
[with_debug=$withval],
|
||||
[with_debug=no])
|
||||
|
||||
AC_ARG_WITH([valgrind],
|
||||
[AS_HELP_STRING([--with-valgrind],
|
||||
[Valgrind instrumentation @<:@default=no@:>@])],
|
||||
[], [with_valgrind=no])
|
||||
|
||||
if test "$with_valgrind" != "no"
|
||||
then
|
||||
AC_CHECK_HEADERS([valgrind/valgrind.h valgrind/memcheck.h],
|
||||
[AC_DEFINE([HAVE_VALGRIND], [1], [Define for Valgrind support])])
|
||||
fi
|
||||
|
||||
# Whether the maintainer mode should be enabled.
|
||||
# Note that this uses $with_debug and $with_valgrind
|
||||
MY_MAINTAINER_MODE
|
||||
|
||||
# Canonicalize the configuration name.
|
||||
@ -255,7 +274,7 @@ AC_PROG_LIBTOOL
|
||||
|
||||
# Ensure that we have --preserve-dup-deps defines, otherwise we get link
|
||||
# problems of 'mysql' with CXX=g++
|
||||
LIBTOOL="$LIBTOOL --preserve-dup-deps"
|
||||
#LIBTOOL="$LIBTOOL --preserve-dup-deps"
|
||||
AC_SUBST(LIBTOOL)dnl
|
||||
|
||||
AC_SUBST(NM)dnl
|
||||
@ -1704,11 +1723,6 @@ then
|
||||
DEBUG_OPTIMIZE_CXX=""
|
||||
fi
|
||||
|
||||
AC_ARG_WITH(debug,
|
||||
[ --with-debug Add debug code
|
||||
--with-debug=full Add debug code (adds memory checker, very slow)],
|
||||
[with_debug=$withval],
|
||||
[with_debug=no])
|
||||
if test "$with_debug" = "yes"
|
||||
then
|
||||
# Medium debug.
|
||||
@ -1731,17 +1745,6 @@ else
|
||||
CXXFLAGS="$OPTIMIZE_CXXFLAGS $CXXFLAGS"
|
||||
fi
|
||||
|
||||
AC_ARG_WITH([valgrind],
|
||||
[AS_HELP_STRING([--with-valgrind],
|
||||
[Valgrind instrumentation @<:@default=no@:>@])],
|
||||
[], [with_valgrind=no])
|
||||
|
||||
if test "$with_valgrind" != "no"
|
||||
then
|
||||
AC_CHECK_HEADERS([valgrind/valgrind.h valgrind/memcheck.h],
|
||||
[AC_DEFINE([HAVE_VALGRIND], [1], [Define for Valgrind support])])
|
||||
fi
|
||||
|
||||
# Debug Sync Facility. NOTE: depends on 'with_debug'. Must be behind it.
|
||||
AC_MSG_CHECKING(if Debug Sync Facility should be enabled.)
|
||||
AC_ARG_ENABLE(debug_sync,
|
||||
@ -2111,6 +2114,13 @@ MYSQL_TYPE_QSORT
|
||||
AC_FUNC_UTIME_NULL
|
||||
AC_FUNC_VPRINTF
|
||||
|
||||
AC_CHECK_DECLS([fdatasync],,,
|
||||
[
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
])
|
||||
|
||||
AC_CHECK_FUNCS(alarm bcmp bfill bmove bsearch bzero \
|
||||
chsize cuserid fchmod fcntl \
|
||||
fconvert fdatasync fesetround finite fpresetsticky fpsetmask fsync ftruncate \
|
||||
@ -2537,9 +2547,8 @@ MYSQL_CHECK_LIBEVENT
|
||||
MYSQL_STORAGE_ENGINE(myisam,no, [MyISAM Storage Engine],
|
||||
[Traditional non-transactional MySQL tables])
|
||||
MYSQL_PLUGIN_DIRECTORY(myisam, [storage/myisam])
|
||||
MYSQL_PLUGIN_STATIC(myisam, [libmyisam.a])
|
||||
MYSQL_PLUGIN_STATIC(myisam, [libmyisam_s.la], [libmyisam_embedded.la])
|
||||
MYSQL_PLUGIN_MANDATORY(myisam) dnl Default
|
||||
MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS(myisam, [ha_myisam.cc])
|
||||
|
||||
MYSQL_STORAGE_ENGINE(partition, partition, [Partition Support],
|
||||
[MySQL Partitioning Support], [max,max-no-ndb])
|
||||
@ -2862,9 +2871,6 @@ if test "$with_server" != "no" -o "$THREAD_SAFE_CLIENT" != "no"
|
||||
then
|
||||
AC_DEFINE([THREAD], [1],
|
||||
[Define if you want to have threaded code. This may be undef on client code])
|
||||
# Avoid _PROGRAMS names
|
||||
THREAD_LOBJECTS="thr_alarm.o thr_lock.o thr_mutex.o thr_rwlock.o my_pthread.o my_thr_init.o mf_keycache.o mf_keycaches.o waiting_threads.o"
|
||||
AC_SUBST(THREAD_LOBJECTS)
|
||||
fi
|
||||
AM_CONDITIONAL(NEED_THREAD, test "$with_server" != "no" -o "$THREAD_SAFE_CLIENT" != "no")
|
||||
|
||||
@ -2893,6 +2899,7 @@ AC_SUBST(server_scripts)
|
||||
|
||||
AC_SUBST(mysql_plugin_dirs)
|
||||
AC_SUBST(mysql_plugin_libs)
|
||||
AC_SUBST(mysql_embedded_plugin_libs)
|
||||
AC_SUBST(maria_plugin_defs)
|
||||
|
||||
|
||||
|
@ -16,10 +16,11 @@
|
||||
# MA 02111-1307, USA
|
||||
|
||||
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include
|
||||
LDADD = libdbug.a ../mysys/libmysys.a ../strings/libmystrings.a
|
||||
LDADD = libdbug.a $(top_builddir)/mysys/libmysys.a $(top_builddir)/strings/libmystrings.a
|
||||
pkglib_LIBRARIES = libdbug.a
|
||||
noinst_LTLIBRARIES = libdbug.la
|
||||
noinst_HEADERS = dbug_long.h
|
||||
libdbug_a_SOURCES = dbug.c sanity.c
|
||||
libdbug_la_SOURCES = dbug.c sanity.c
|
||||
EXTRA_DIST = CMakeLists.txt example1.c example2.c example3.c \
|
||||
user.r monty.doc dbug_add_tags.pl \
|
||||
my_main.c main.c factorial.c dbug_analyze.c \
|
||||
@ -65,3 +66,7 @@ output5.r: factorial
|
||||
# a hack to have executable in builddir, not in srcdir
|
||||
tests-t: tests-t.pl
|
||||
cp -f $(srcdir)/tests-t.pl ./tests-t
|
||||
|
||||
libdbug_a_SOURCES=
|
||||
libdbug.a: libdbug.la
|
||||
$(CP) .libs/libdbug.a $@
|
||||
|
@ -926,6 +926,7 @@ void _db_set_init_(const char *control)
|
||||
CODE_STATE tmp_cs;
|
||||
bzero((uchar*) &tmp_cs, sizeof(tmp_cs));
|
||||
tmp_cs.stack= &init_settings;
|
||||
tmp_cs.process= db_process ? db_process : "dbug";
|
||||
DbugParse(&tmp_cs, control);
|
||||
}
|
||||
|
||||
@ -1637,8 +1638,8 @@ static void PushState(CODE_STATE *cs)
|
||||
struct settings *new_malloc;
|
||||
|
||||
new_malloc= (struct settings *) DbugMalloc(sizeof(struct settings));
|
||||
bzero(new_malloc, sizeof(struct settings));
|
||||
new_malloc->next= cs->stack;
|
||||
new_malloc->out_file= NULL;
|
||||
cs->stack= new_malloc;
|
||||
}
|
||||
|
||||
@ -2121,7 +2122,7 @@ static FILE *OpenProfile(CODE_STATE *cs, const char *name)
|
||||
|
||||
static void DBUGCloseFile(CODE_STATE *cs, FILE *fp)
|
||||
{
|
||||
if (fp != stderr && fp != stdout && fclose(fp) == EOF)
|
||||
if (fp != NULL && fp != stderr && fp != stdout && fclose(fp) == EOF)
|
||||
{
|
||||
if (!cs->locked)
|
||||
pthread_mutex_lock(&THR_LOCK_dbug);
|
||||
|
@ -15,8 +15,10 @@
|
||||
|
||||
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
|
||||
-I$(top_srcdir)/sql
|
||||
LDADD = @CLIENT_EXTRA_LDFLAGS@ ../mysys/libmysys.a \
|
||||
../dbug/libdbug.a ../strings/libmystrings.a \
|
||||
LDADD = @CLIENT_EXTRA_LDFLAGS@ \
|
||||
$(top_builddir)/mysys/libmysys.a \
|
||||
$(top_builddir)/strings/libmystrings.a \
|
||||
$(top_builddir)/dbug/libdbug.a \
|
||||
$(ZLIB_LIBS)
|
||||
BUILT_SOURCES= $(top_builddir)/include/mysqld_error.h \
|
||||
$(top_builddir)/include/sql_state.h \
|
||||
|
@ -155,8 +155,8 @@ epoll_init(struct event_base *base)
|
||||
}
|
||||
|
||||
static int
|
||||
epoll_recalc(struct event_base *base __attribute__((unused)),
|
||||
void *arg, int max)
|
||||
epoll_recalc(struct event_base *base __attribute__((unused)), void *arg,
|
||||
int max)
|
||||
{
|
||||
struct epollop *epollop = arg;
|
||||
|
||||
|
@ -75,8 +75,10 @@ bufferevent_add(struct event *ev, int timeout)
|
||||
*/
|
||||
|
||||
void
|
||||
bufferevent_read_pressure_cb(struct evbuffer *buf, size_t old __attribute__((unused)), size_t now,
|
||||
void *arg) {
|
||||
bufferevent_read_pressure_cb(struct evbuffer *buf,
|
||||
size_t old __attribute__((unused)), size_t now,
|
||||
void *arg)
|
||||
{
|
||||
struct bufferevent *bufev = arg;
|
||||
/*
|
||||
* If we are below the watermark then reschedule reading if it's
|
||||
|
@ -405,7 +405,7 @@ event_loopexit_cb(int fd __attribute__((unused)),
|
||||
int
|
||||
event_loopexit(struct timeval *tv)
|
||||
{
|
||||
return (event_once(-1, EV_TIMEOUT, event_loopexit_cb,
|
||||
return (event_once(-1, EV_TIMEOUT, &event_loopexit_cb,
|
||||
current_base, tv));
|
||||
}
|
||||
|
||||
|
@ -95,7 +95,7 @@ const struct eventop kqops = {
|
||||
};
|
||||
|
||||
static void *
|
||||
kq_init(struct event_base *base)
|
||||
kq_init(struct event_base *base __attribute__((unused)))
|
||||
{
|
||||
int kq;
|
||||
struct kqop *kqueueop;
|
||||
@ -203,13 +203,14 @@ kq_insert(struct kqop *kqop, struct kevent *kev)
|
||||
}
|
||||
|
||||
static void
|
||||
kq_sighandler(int sig)
|
||||
kq_sighandler(int sig __attribute__((unused)))
|
||||
{
|
||||
/* Do nothing here */
|
||||
}
|
||||
|
||||
static int
|
||||
kq_dispatch(struct event_base *base, void *arg, struct timeval *tv)
|
||||
kq_dispatch(struct event_base *base __attribute__((unused)), void *arg,
|
||||
struct timeval *tv)
|
||||
{
|
||||
struct kqop *kqop = arg;
|
||||
struct kevent *changes = kqop->changes;
|
||||
@ -408,7 +409,7 @@ kq_del(void *arg, struct event *ev)
|
||||
}
|
||||
|
||||
static void
|
||||
kq_dealloc(struct event_base *base, void *arg)
|
||||
kq_dealloc(struct event_base *base __attribute__((unused)), void *arg)
|
||||
{
|
||||
struct kqop *kqop = arg;
|
||||
|
||||
|
@ -69,7 +69,8 @@ static void evsignal_handler(int sig);
|
||||
|
||||
/* Callback for when the signal handler write a byte to our signaling socket */
|
||||
static void
|
||||
evsignal_cb(int fd, short what __attribute__((unused)), void *arg __attribute__((unused)))
|
||||
evsignal_cb(int fd, short what __attribute__((unused)),
|
||||
void *arg __attribute__((unused)))
|
||||
{
|
||||
static char signals[100];
|
||||
#ifdef WIN32
|
||||
@ -113,7 +114,7 @@ evsignal_init(struct event_base *base)
|
||||
evutil_make_socket_nonblocking(base->sig.ev_signal_pair[0]);
|
||||
|
||||
event_set(&base->sig.ev_signal, base->sig.ev_signal_pair[1],
|
||||
EV_READ | EV_PERSIST, evsignal_cb, &base->sig.ev_signal);
|
||||
EV_READ | EV_PERSIST, &evsignal_cb, &base->sig.ev_signal);
|
||||
base->sig.ev_signal.ev_base = base;
|
||||
base->sig.ev_signal.ev_flags |= EVLIST_INTERNAL;
|
||||
}
|
||||
|
@ -1085,7 +1085,7 @@ static int convert_file(REPLACE *rep, char * name)
|
||||
my_fclose(in,MYF(0)); my_fclose(out,MYF(0));
|
||||
|
||||
if (updated && ! error)
|
||||
my_redel(org_name,tempname,MYF(MY_WME | MY_LINK_WARNING));
|
||||
my_redel(org_name, tempname, 0, MYF(MY_WME | MY_LINK_WARNING));
|
||||
else
|
||||
my_delete(tempname,MYF(MY_WME));
|
||||
if (!silent && ! error)
|
||||
|
@ -1,5 +1,2 @@
|
||||
SUBDIRS = taocrypt src testsuite
|
||||
EXTRA_DIST = CMakeLists.txt
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
%::SCCS/s.%
|
||||
|
@ -6,7 +6,3 @@ libyassl_la_SOURCES = buffer.cpp cert_wrapper.cpp crypto_wrapper.cpp \
|
||||
template_instnt.cpp timer.cpp yassl_imp.cpp yassl_error.cpp yassl_int.cpp
|
||||
EXTRA_DIST = $(wildcard ../include/*.hpp) $(wildcard ../include/openssl/*.h)
|
||||
AM_CXXFLAGS = -DYASSL_PURE_C -DYASSL_PREFIX @yassl_thread_cxxflags@
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
%::SCCS/s.%
|
||||
|
||||
|
@ -1,5 +1,2 @@
|
||||
SUBDIRS = src test benchmark
|
||||
EXTRA_DIST = CMakeLists.txt $(wildcard mySTL/*.hpp)
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
%::SCCS/s.%
|
||||
|
@ -4,6 +4,3 @@ benchmark_SOURCES = benchmark.cpp
|
||||
benchmark_LDADD = $(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la
|
||||
benchmark_CXXFLAGS = -DYASSL_PURE_C @yassl_thread_cxxflags@
|
||||
EXTRA_DIST = benchmark.dsp rsa1024.der dh1024.der dsa1024.der make.bat
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
%::SCCS/s.%
|
||||
|
@ -12,7 +12,3 @@ libtaocrypt_la_CXXFLAGS = @yassl_taocrypt_extra_cxxflags@ -DYASSL_PURE_C \
|
||||
@yassl_thread_cxxflags@
|
||||
|
||||
EXTRA_DIST = $(wildcard ../include/*.hpp)
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
%::SCCS/s.%
|
||||
|
||||
|
@ -4,6 +4,3 @@ test_SOURCES = test.cpp
|
||||
test_LDADD = $(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la
|
||||
test_CXXFLAGS = -DYASSL_PURE_C @yassl_thread_cxxflags@
|
||||
EXTRA_DIST = make.bat
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
%::SCCS/s.%
|
||||
|
@ -8,7 +8,3 @@ testsuite_CXXFLAGS = -DYASSL_PURE_C -DYASSL_PREFIX -DNO_MAIN_DRIVER @yassl_threa
|
||||
testsuite_LDADD = $(top_builddir)/extra/yassl/src/libyassl.la \
|
||||
$(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la
|
||||
EXTRA_DIST = testsuite.dsp test.hpp input quit make.bat
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
%::SCCS/s.%
|
||||
|
||||
|
@ -434,7 +434,8 @@ int maria_repair_by_sort(HA_CHECK *param, MARIA_HA *info,
|
||||
int maria_repair_parallel(HA_CHECK *param, register MARIA_HA *info,
|
||||
const char *name, my_bool rep_quick);
|
||||
int maria_change_to_newfile(const char *filename, const char *old_ext,
|
||||
const char *new_ext, myf myflags);
|
||||
const char *new_ext, time_t backup_time,
|
||||
myf myflags);
|
||||
void maria_lock_memory(HA_CHECK *param);
|
||||
int maria_update_state_info(HA_CHECK *param, MARIA_HA *info, uint update);
|
||||
void maria_update_key_parts(MARIA_KEYDEF *keyinfo, double *rec_per_key_part,
|
||||
|
@ -30,10 +30,15 @@
|
||||
#ifndef __attribute__
|
||||
# if !defined(__GNUC__)
|
||||
# define __attribute__(A)
|
||||
# elif GCC_VERSION < 2008
|
||||
# define __attribute__(A)
|
||||
# elif defined(__cplusplus) && GCC_VERSION < 3004
|
||||
# define __attribute__(A)
|
||||
# else
|
||||
# ifndef GCC_VERSION
|
||||
# define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
|
||||
# endif
|
||||
# if GCC_VERSION < 2008
|
||||
# define __attribute__(A)
|
||||
# elif defined(__cplusplus) && GCC_VERSION < 3004
|
||||
# define __attribute__(A)
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
@ -32,8 +32,15 @@
|
||||
|
||||
/* GNU C/C++ */
|
||||
#if defined __GNUC__
|
||||
/* Convenience macro to test the minimum required GCC version. */
|
||||
# define MY_GNUC_PREREQ(maj, min) \
|
||||
((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
|
||||
/* Any after 2.95... */
|
||||
# define MY_ALIGN_EXT
|
||||
/* Comunicate to the compiler the unreachability of the code. */
|
||||
# if MY_GNUC_PREREQ(4,5)
|
||||
# define MY_ASSERT_UNREACHABLE() __builtin_unreachable()
|
||||
# endif
|
||||
|
||||
/* Microsoft Visual C++ */
|
||||
#elif defined _MSC_VER
|
||||
@ -67,7 +74,7 @@
|
||||
#endif
|
||||
|
||||
/**
|
||||
Generic compiler-dependent features.
|
||||
Generic (compiler-independent) features.
|
||||
*/
|
||||
#ifndef MY_ALIGNOF
|
||||
# ifdef __cplusplus
|
||||
@ -79,6 +86,10 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef MY_ASSERT_UNREACHABLE
|
||||
# define MY_ASSERT_UNREACHABLE() do { assert(0); } while (0)
|
||||
#endif
|
||||
|
||||
/**
|
||||
C++ Type Traits
|
||||
*/
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2000 MySQL AB & 2009 Monty Program Ab
|
||||
/* Copyright (C) 2000 MySQL AB & Oracle & 2009 Monty Program 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
|
||||
@ -13,8 +13,12 @@
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#ifndef _dbug_h
|
||||
#define _dbug_h
|
||||
#ifndef _my_dbug_h
|
||||
#define _my_dbug_h
|
||||
|
||||
#ifndef __WIN__
|
||||
#include <signal.h>
|
||||
#endif /* not __WIN__ */
|
||||
|
||||
#if defined(__cplusplus) && !defined(DBUG_OFF)
|
||||
class Dbug_violation_helper
|
||||
@ -128,8 +132,35 @@ extern void _db_flush_();
|
||||
#define DEBUGGER_OFF do { _dbug_on_= 0; } while(0)
|
||||
#define DEBUGGER_ON do { _dbug_on_= 1; } while(0)
|
||||
#define IF_DBUG(A) A
|
||||
#ifndef __WIN__
|
||||
#define DBUG_ABORT() (_db_flush_(), abort())
|
||||
#else /* No debugger */
|
||||
#else
|
||||
/*
|
||||
Avoid popup with abort/retry/ignore buttons. When BUG#31745 is fixed we can
|
||||
call abort() instead of _exit(3) (now it would cause a "test signal" popup).
|
||||
*/
|
||||
#include <crtdbg.h>
|
||||
#define DBUG_ABORT() (_db_flush_(),\
|
||||
(void)_CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE),\
|
||||
(void)_CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR),\
|
||||
_exit(3))
|
||||
#endif
|
||||
|
||||
/*
|
||||
Make the program fail, without creating a core file.
|
||||
abort() will send SIGABRT which (most likely) generates core.
|
||||
Use SIGKILL instead, which cannot be caught.
|
||||
We also pause the current thread, until the signal is actually delivered.
|
||||
An alternative would be to use _exit(EXIT_FAILURE),
|
||||
but then valgrind would report lots of memory leaks.
|
||||
*/
|
||||
#ifdef __WIN__
|
||||
#define DBUG_SUICIDE() DBUG_ABORT()
|
||||
#else
|
||||
#define DBUG_SUICIDE() (_db_flush_(), kill(getpid(), SIGKILL), pause())
|
||||
#endif
|
||||
|
||||
#else /* No debugger */
|
||||
|
||||
#define DBUG_ENTER(a1)
|
||||
#define DBUG_VIOLATION_HELPER_LEAVE do { } while(0)
|
||||
@ -159,9 +190,12 @@ extern void _db_flush_();
|
||||
#define DEBUGGER_OFF do { } while(0)
|
||||
#define DEBUGGER_ON do { } while(0)
|
||||
#define IF_DBUG(A)
|
||||
#define DBUG_ABORT() abort()
|
||||
#define DBUG_ABORT() do { } while(0)
|
||||
#define DBUG_SUICIDE() do { } while(0)
|
||||
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* _my_dbug_h */
|
||||
|
@ -128,8 +128,8 @@ struct tm *gmtime_r(const time_t *timep,struct tm *tmp);
|
||||
|
||||
void pthread_exit(void *a); /* was #define pthread_exit(A) ExitThread(A)*/
|
||||
|
||||
#ifndef ETIMEDOUT
|
||||
#define ETIMEDOUT 145
|
||||
#ifndef ETIMEDOUT
|
||||
#define ETIMEDOUT 145 /* Win32 doesn't have this */
|
||||
#endif
|
||||
#define getpid() GetCurrentThreadId()
|
||||
#define HAVE_LOCALTIME_R 1
|
||||
@ -517,7 +517,8 @@ int safe_mutex_destroy(safe_mutex_t *mp,const char *file, uint line);
|
||||
int safe_cond_wait(pthread_cond_t *cond, safe_mutex_t *mp,const char *file,
|
||||
uint line);
|
||||
int safe_cond_timedwait(pthread_cond_t *cond, safe_mutex_t *mp,
|
||||
struct timespec *abstime, const char *file, uint line);
|
||||
const struct timespec *abstime,
|
||||
const char *file, uint line);
|
||||
void safe_mutex_global_init(void);
|
||||
void safe_mutex_end(FILE *file);
|
||||
void safe_mutex_free_deadlock_data(safe_mutex_t *mp);
|
||||
|
@ -135,6 +135,9 @@ extern int NEAR my_errno; /* Last error in mysys */
|
||||
#define GETDATE_GMT 8
|
||||
#define GETDATE_FIXEDLENGTH 16
|
||||
|
||||
/* Extra length needed for filename if one calls my_create_backup_name */
|
||||
#define MY_BACKUP_NAME_EXTRA_LENGTH 17
|
||||
|
||||
/* defines when allocating data */
|
||||
#ifdef SAFEMALLOC
|
||||
#define my_malloc(SZ,FLAG) _mymalloc((SZ), __FILE__, __LINE__, FLAG )
|
||||
@ -689,7 +692,10 @@ extern int my_message_no_curses(uint my_err, const char *str,myf MyFlags);
|
||||
extern int my_message_curses(uint my_err, const char *str,myf MyFlags);
|
||||
extern my_bool my_init(void);
|
||||
extern void my_end(int infoflag);
|
||||
extern int my_redel(const char *from, const char *to, int MyFlags);
|
||||
extern int my_redel(const char *from, const char *to, time_t backup_time_stamp,
|
||||
myf MyFlags);
|
||||
void my_create_backup_name(char *to, const char *from,
|
||||
time_t backup_time_stamp);
|
||||
extern int my_copystat(const char *from, const char *to, int MyFlags);
|
||||
extern char * my_filename(File fd);
|
||||
|
||||
|
@ -295,6 +295,8 @@ extern int mi_is_changed(struct st_myisam_info *info);
|
||||
extern int mi_delete_all_rows(struct st_myisam_info *info);
|
||||
extern ulong _mi_calc_blob_length(uint length , const uchar *pos);
|
||||
extern uint mi_get_pointer_length(ulonglong file_length, uint def);
|
||||
extern int mi_make_backup_of_index(struct st_myisam_info *info,
|
||||
time_t backup_time, myf flags);
|
||||
|
||||
#define MEMMAP_EXTRA_MARGIN 7 /* Write this as a suffix for mmap file */
|
||||
/* this is used to pass to mysql_myisamchk_table */
|
||||
@ -390,7 +392,8 @@ int mi_repair_by_sort(HA_CHECK *param, register MI_INFO *info,
|
||||
int mi_repair_parallel(HA_CHECK *param, register MI_INFO *info,
|
||||
const char * name, int rep_quick);
|
||||
int change_to_newfile(const char * filename, const char * old_ext,
|
||||
const char * new_ext, uint raid_chunks,
|
||||
const char * new_ext, time_t backup_time,
|
||||
uint raid_chunks,
|
||||
myf myflags);
|
||||
int lock_file(HA_CHECK *param, File file, my_off_t start, int lock_type,
|
||||
const char *filetype, const char *filename);
|
||||
|
@ -74,7 +74,7 @@
|
||||
#define TT_USEFRM 1
|
||||
#define TT_FOR_UPGRADE 2
|
||||
|
||||
#define O_NEW_INDEX 1 /* Bits set in out_flag */
|
||||
/* Bits set in out_flag */
|
||||
#define O_NEW_DATA 2
|
||||
#define O_DATA_LOST 4
|
||||
|
||||
@ -141,6 +141,7 @@ typedef struct st_handler_check_param
|
||||
ulonglong use_buffers; /* Used as param to getopt() */
|
||||
size_t read_buffer_length, write_buffer_length;
|
||||
size_t sort_buffer_length, sort_key_blocks;
|
||||
time_t backup_time; /* To sign backup files */
|
||||
ulong rec_per_key_part[HA_MAX_KEY_SEG * HA_MAX_POSSIBLE_KEY];
|
||||
double new_rec_per_key_part[HA_MAX_KEY_SEG * HA_MAX_POSSIBLE_KEY];
|
||||
uint out_flag, warning_printed, error_printed, verbose;
|
||||
|
@ -230,7 +230,8 @@ struct st_mysql_options {
|
||||
|
||||
enum mysql_status
|
||||
{
|
||||
MYSQL_STATUS_READY,MYSQL_STATUS_GET_RESULT,MYSQL_STATUS_USE_RESULT
|
||||
MYSQL_STATUS_READY, MYSQL_STATUS_GET_RESULT, MYSQL_STATUS_USE_RESULT,
|
||||
MYSQL_STATUS_STATEMENT_GET_RESULT
|
||||
};
|
||||
|
||||
enum mysql_protocol_type
|
||||
|
@ -293,7 +293,8 @@ struct st_mysql_options {
|
||||
};
|
||||
enum mysql_status
|
||||
{
|
||||
MYSQL_STATUS_READY,MYSQL_STATUS_GET_RESULT,MYSQL_STATUS_USE_RESULT
|
||||
MYSQL_STATUS_READY, MYSQL_STATUS_GET_RESULT, MYSQL_STATUS_USE_RESULT,
|
||||
MYSQL_STATUS_STATEMENT_GET_RESULT
|
||||
};
|
||||
enum mysql_protocol_type
|
||||
{
|
||||
|
@ -6,12 +6,13 @@
|
||||
|
||||
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
|
||||
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 */
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
/*
|
||||
This is the header file for code which implements the Secure
|
||||
@ -25,6 +26,38 @@
|
||||
Please read the file sha1.c for more information.
|
||||
|
||||
Modified 2002 by Peter Zaitsev to better follow MySQL standards
|
||||
|
||||
Original Source from: http://www.faqs.org/rfcs/rfc3174.html
|
||||
|
||||
Copyright (C) The Internet Society (2001). All Rights Reserved.
|
||||
|
||||
This document and translations of it may be copied and furnished to
|
||||
others, and derivative works that comment on or otherwise explain it
|
||||
or assist in its implementation may be prepared, copied, published
|
||||
and distributed, in whole or in part, without restriction of any
|
||||
kind, provided that the above copyright notice and this paragraph are
|
||||
included on all such copies and derivative works. However, this
|
||||
document itself may not be modified in any way, such as by removing
|
||||
the copyright notice or references to the Internet Society or other
|
||||
Internet organizations, except as needed for the purpose of
|
||||
developing Internet standards in which case the procedures for
|
||||
copyrights defined in the Internet Standards process must be
|
||||
followed, or as required to translate it into languages other than
|
||||
English.
|
||||
|
||||
The limited permissions granted above are perpetual and will not be
|
||||
revoked by the Internet Society or its successors or assigns.
|
||||
|
||||
This document and the information contained herein is provided on an
|
||||
"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
|
||||
TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
|
||||
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
Acknowledgement
|
||||
Funding for the RFC Editor function is currently provided by the
|
||||
Internet Society.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -117,6 +117,3 @@ conf_to_src_LDADD=
|
||||
#force static linking of conf_to_src - essential when linking against
|
||||
#custom installation of libc
|
||||
conf_to_src_LDFLAGS=@NOINST_LDFLAGS@
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
%::SCCS/s.%
|
||||
|
@ -2455,6 +2455,8 @@ static my_bool execute(MYSQL_STMT *stmt, char *packet, ulong length)
|
||||
set_stmt_errmsg(stmt, net);
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
else if (mysql->status == MYSQL_STATUS_GET_RESULT)
|
||||
stmt->mysql->status= MYSQL_STATUS_STATEMENT_GET_RESULT;
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
@ -2593,7 +2595,7 @@ static int stmt_read_row_unbuffered(MYSQL_STMT *stmt, unsigned char **row)
|
||||
set_stmt_error(stmt, CR_SERVER_LOST, unknown_sqlstate, NULL);
|
||||
return 1;
|
||||
}
|
||||
if (mysql->status != MYSQL_STATUS_GET_RESULT)
|
||||
if (mysql->status != MYSQL_STATUS_STATEMENT_GET_RESULT)
|
||||
{
|
||||
set_stmt_error(stmt, stmt->unbuffered_fetch_cancelled ?
|
||||
CR_FETCH_CANCELED : CR_COMMANDS_OUT_OF_SYNC,
|
||||
@ -4799,7 +4801,7 @@ int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt)
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
}
|
||||
else if (mysql->status != MYSQL_STATUS_GET_RESULT)
|
||||
else if (mysql->status != MYSQL_STATUS_STATEMENT_GET_RESULT)
|
||||
{
|
||||
set_stmt_error(stmt, CR_COMMANDS_OUT_OF_SYNC, unknown_sqlstate, NULL);
|
||||
DBUG_RETURN(1);
|
||||
|
@ -34,10 +34,10 @@ INCLUDES= -I$(top_builddir)/include -I$(top_srcdir)/include \
|
||||
-I$(top_srcdir)/sql/examples \
|
||||
-I$(top_srcdir)/regex \
|
||||
$(openssl_includes) @ZLIB_INCLUDES@ \
|
||||
@condition_dependent_plugin_includes@
|
||||
@condition_dependent_plugin_includes@ \
|
||||
@ndbcluster_includes@
|
||||
|
||||
noinst_LIBRARIES = libmysqld_int.a
|
||||
pkglib_LIBRARIES = libmysqld.a
|
||||
pkglib_LTLIBRARIES = libmysqld.la
|
||||
SUBDIRS = . examples
|
||||
libmysqld_sources= libmysqld.c lib_sql.cc emb_qcache.cc
|
||||
libmysqlsources = errmsg.c get_password.c libmysql.c client.c pack.c \
|
||||
@ -83,104 +83,28 @@ sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \
|
||||
multi_range_read.cc opt_index_cond_pushdown.cc \
|
||||
sql_expression_cache.cc
|
||||
|
||||
libmysqld_int_a_SOURCES= $(libmysqld_sources)
|
||||
nodist_libmysqld_int_a_SOURCES= $(libmysqlsources) $(sqlsources)
|
||||
libmysqld_a_SOURCES=
|
||||
|
||||
sqlstoragesources = $(EXTRA_libmysqld_a_SOURCES)
|
||||
storagesources = @condition_dependent_plugin_modules@
|
||||
storageobjects = @condition_dependent_plugin_objects@
|
||||
storagesourceslinks = @condition_dependent_plugin_links@
|
||||
|
||||
# automake misses these
|
||||
sql_yacc.cc sql_yacc.h: $(top_srcdir)/sql/sql_yacc.yy
|
||||
|
||||
# The following libraries should be included in libmysqld.a
|
||||
INC_LIB= $(top_builddir)/regex/libregex.a \
|
||||
$(top_builddir)/mysys/libmysys.a \
|
||||
$(top_builddir)/strings/libmystrings.a \
|
||||
$(top_builddir)/dbug/libdbug.a \
|
||||
$(top_builddir)/vio/libvio.a \
|
||||
@NDB_SCI_LIBS@ \
|
||||
@mysql_plugin_libs@ \
|
||||
INC_LIB= $(top_builddir)/regex/libregex.la \
|
||||
$(top_builddir)/mysys/libmysys.la \
|
||||
$(top_builddir)/strings/libmystrings.la \
|
||||
$(top_builddir)/dbug/libdbug.la \
|
||||
$(top_builddir)/vio/libvio.la \
|
||||
@ndbcluster_libs@ @NDB_SCI_LIBS@ \
|
||||
@mysql_embedded_plugin_libs@ \
|
||||
$(libevent_inc_libs) \
|
||||
$(yassl_inc_libs)
|
||||
|
||||
if HAVE_YASSL
|
||||
yassl_inc_libs= $(top_builddir)/extra/yassl/src/.libs/libyassl.a \
|
||||
$(top_builddir)/extra/yassl/taocrypt/src/.libs/libtaocrypt.a
|
||||
yassl_inc_libs= $(top_builddir)/extra/yassl/src/libyassl.la \
|
||||
$(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la
|
||||
endif
|
||||
|
||||
# Storage engine specific compilation options
|
||||
ha_ndbcluster.o:ha_ndbcluster.cc
|
||||
$(CXXCOMPILE) @ndbcluster_includes@ $(LM_CFLAGS) -c $<
|
||||
|
||||
ha_ndbcluster_cond.o:ha_ndbcluster_cond.cc
|
||||
$(CXXCOMPILE) @ndbcluster_includes@ $(LM_CFLAGS) -c $<
|
||||
|
||||
ha_ndbcluster_binlog.o: ha_ndbcluster_binlog.cc
|
||||
$(CXXCOMPILE) @ndbcluster_includes@ $(LM_CFLAGS) -c $<
|
||||
|
||||
# Until we can remove dependency on ha_ndbcluster.h
|
||||
handler.o: handler.cc
|
||||
$(CXXCOMPILE) @ndbcluster_includes@ $(LM_CFLAGS) -c $<
|
||||
|
||||
# We need rules to compile these as no good way
|
||||
# found to append fileslists that collected by configure
|
||||
# to the sources list
|
||||
|
||||
ha_federatedx.o:ha_federatedx.cc
|
||||
$(CXXCOMPILE) $(LM_CFLAGS) -c $<
|
||||
|
||||
ha_heap.o:ha_heap.cc
|
||||
$(CXXCOMPILE) $(LM_CFLAGS) -c $<
|
||||
|
||||
ha_innodb.o:ha_innodb.cc
|
||||
$(CXXCOMPILE) $(LM_CFLAGS) -c $<
|
||||
|
||||
ha_myisam.o:ha_myisam.cc
|
||||
$(CXXCOMPILE) $(LM_CFLAGS) -c $<
|
||||
|
||||
ha_myisammrg.o:ha_myisammrg.cc
|
||||
$(CXXCOMPILE) $(LM_CFLAGS) -c $<
|
||||
|
||||
#
|
||||
# To make it easy for the end user to use the embedded library we
|
||||
# generate a total libmysqld.a from all library files,
|
||||
|
||||
# note - InnoDB libraries have circular dependencies, so in INC_LIB
|
||||
# few libraries are present two times. Metrowerks linker doesn't like
|
||||
# it at all. Traditional ar has no problems with it, but still there's no
|
||||
# need to add the same file twice to the library, so 'sort -u' save us
|
||||
# some time and spares unnecessary work.
|
||||
|
||||
libmysqld.a: libmysqld_int.a $(INC_LIB) $(libmysqld_a_DEPENDENCIES) $(storageobjects)
|
||||
if DARWIN_MWCC
|
||||
mwld -lib -o $@ libmysqld_int.a `echo $(INC_LIB) | sort -u` $(storageobjects)
|
||||
else
|
||||
-rm -f libmysqld.a
|
||||
if test "$(host_os)" = "netware" ; \
|
||||
then \
|
||||
$(libmysqld_a_AR) libmysqld.a $(INC_LIB) libmysqld_int.a $(storageobjects); \
|
||||
else \
|
||||
current_dir=`pwd`; \
|
||||
rm -rf tmp; mkdir tmp; \
|
||||
(for arc in $(INC_LIB) ./libmysqld_int.a; do \
|
||||
arpath=`echo $$arc|sed 's|[^/]*$$||'|sed 's|\.libs/$$||'`; \
|
||||
artmp=`echo $$arc|sed 's|^.*/|tmp/lib-|'`; \
|
||||
for F in `$(AR) t $$arc | grep -v SYMDEF`; do \
|
||||
if test -e "$$arpath/$$F" ; then echo "$$arpath/$$F"; else \
|
||||
mkdir $$artmp; cd $$artmp > /dev/null; \
|
||||
$(AR) x ../../$$arc; \
|
||||
cd $$current_dir > /dev/null; \
|
||||
ls $$artmp/* | grep -v SYMDEF; \
|
||||
continue 2; fi; done; \
|
||||
done; echo $(libmysqld_a_DEPENDENCIES) ) | sort -u | xargs $(AR) cq libmysqld.a ; \
|
||||
$(AR) r libmysqld.a $(storageobjects); \
|
||||
$(RANLIB) libmysqld.a ; \
|
||||
rm -rf tmp; \
|
||||
fi
|
||||
endif
|
||||
libmysqld_la_SOURCES= $(libmysqld_sources)
|
||||
nodist_libmysqld_la_SOURCES= $(libmysqlsources) $(sqlsources)
|
||||
libmysqld_la_LIBADD = $(INC_LIB)
|
||||
|
||||
## XXX: any time the client interface changes, we'll need to bump
|
||||
## the version info for libmysqld; however, it's possible for the
|
||||
@ -188,7 +112,7 @@ endif
|
||||
## libmysqlclient interface. Should we make a separate version
|
||||
## string for the two?
|
||||
#libmysqld_la_LDFLAGS = -version-info @SHARED_LIB_VERSION@
|
||||
#CLEANFILES = $(libmysqld_la_LIBADD) libmysqld.la
|
||||
#CLEANFILES = libmysqld.la
|
||||
|
||||
BUILT_SOURCES = link_sources
|
||||
|
||||
@ -213,20 +137,6 @@ link_sources:
|
||||
@LN_CP_F@ $(top_builddir)/libmysql/$$f $$f; \
|
||||
fi ; \
|
||||
done; \
|
||||
if test -n "$(sqlstoragesources)" ; \
|
||||
then \
|
||||
for f in "$(sqlstoragesources)"; do \
|
||||
rm -f "$$f"; \
|
||||
@LN_CP_F@ `find $(srcdir)/../sql -name "$$f"` "$$f"; \
|
||||
done; \
|
||||
fi; \
|
||||
if test -n "$(storagesources)" ; \
|
||||
then \
|
||||
rm -f $(storagesources); \
|
||||
for f in $(storagesourceslinks); do \
|
||||
@LN_CP_F@ $(top_srcdir)/$$f . ; \
|
||||
done; \
|
||||
fi; \
|
||||
rm -f client_settings.h; \
|
||||
@LN_CP_F@ $(top_srcdir)/libmysql/client_settings.h \
|
||||
client_settings.h; \
|
||||
@ -234,5 +144,5 @@ link_sources:
|
||||
|
||||
|
||||
clean-local:
|
||||
rm -f `echo $(sqlsources) $(libmysqlsources) $(sqlstoragesources) $(storagesources) | sed "s;\.lo;.c;g"`; \
|
||||
rm -f `echo $(sqlsources) $(libmysqlsources) | sed "s;\.lo;.c;g"`; \
|
||||
rm -f client_settings.h
|
||||
|
@ -37,12 +37,13 @@ INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(srcdir) \
|
||||
-I$(top_srcdir) -I$(top_srcdir)/client -I$(top_srcdir)/regex \
|
||||
$(openssl_includes)
|
||||
LIBS = @LIBS@ @WRAPLIBS@ @CLIENT_LIBS@ $(yassl_libs)
|
||||
LDADD = @CLIENT_EXTRA_LDFLAGS@ ../libmysqld.a @LIBDL@ $(CXXLDFLAGS) \
|
||||
@NDB_SCI_LIBS@
|
||||
LDADD = @CLIENT_EXTRA_LDFLAGS@ \
|
||||
$(top_builddir)/libmysqld/libmysqld.la @LIBDL@ $(CXXLDFLAGS) \
|
||||
@ndbcluster_libs@ @NDB_SCI_LIBS@
|
||||
|
||||
mysqltest_embedded_LINK = $(CXXLINK)
|
||||
nodist_mysqltest_embedded_SOURCES = mysqltest.cc
|
||||
mysqltest_embedded_LDADD = $(LDADD) $(top_builddir)/regex/libregex.a \
|
||||
mysqltest_embedded_LDADD = $(LDADD) $(top_builddir)/regex/libregex.la \
|
||||
@MYSQLD_EXTRA_LDFLAGS@
|
||||
|
||||
nodist_mysql_SOURCES = mysql.cc readline.cc completion_hash.cc \
|
||||
@ -51,6 +52,3 @@ mysql_LDADD = @readline_link@ @TERMCAP_LIB@ $(LDADD)
|
||||
|
||||
mysql_client_test_embedded_LINK = $(CXXLINK)
|
||||
nodist_mysql_client_test_embedded_SOURCES = mysql_client_test.c
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
%::SCCS/s.%
|
||||
|
@ -1,5 +1,3 @@
|
||||
perl mysql-test-run.pl --timer --force --comment=rpl_ndb_row --vardir=var-rpl_ndb_row --suite=rpl_ndb,ndb --mysqld=--binlog-format=row --experimental=collections/default.experimental
|
||||
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=n_mix --vardir=var-n_mix --mysqld=--binlog-format=mixed --experimental=collections/default.experimental
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=ps_row --vardir=var-ps_row --ps-protocol --mysqld=--binlog-format=row --experimental=collections/default.experimental
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=embedded --vardir=var-emebbed --embedded --experimental=collections/default.experimental
|
||||
|
@ -43,8 +43,6 @@ parts.partition_mgm_lc1_ndb # joro : NDB tests marked as experiment
|
||||
parts.partition_mgm_lc2_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
||||
parts.partition_syntax_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
||||
parts.partition_value_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
||||
main.mysqlhotcopy_myisam # horst: due to bug#54129
|
||||
main.mysqlhotcopy_archive # horst: due to bug#54129
|
||||
main.gis-rtree # svoj: due to BUG#38965
|
||||
main.type_float # svoj: due to BUG#38965
|
||||
main.type_newdecimal # svoj: due to BUG#38965
|
||||
|
@ -241,3 +241,60 @@ DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
SET SQL_MODE='';
|
||||
sync_slave_with_master;
|
||||
|
||||
#
|
||||
# Bug#54201: "SET INSERT_ID" event must be ignored if corresponding event is
|
||||
# ignored.
|
||||
#
|
||||
connection master;
|
||||
|
||||
CREATE TABLE t1(s VARCHAR(10)) ENGINE=myisam;
|
||||
# -slave.opt has --replicate-ignore-table=test.t_ignored1
|
||||
CREATE TABLE t_ignored1(id INT AUTO_INCREMENT PRIMARY KEY) ENGINE=myisam;
|
||||
sync_slave_with_master;
|
||||
|
||||
connection slave;
|
||||
|
||||
CREATE TABLE test.slave_only(id INT AUTO_INCREMENT PRIMARY KEY) ENGINE=myisam;
|
||||
INSERT INTO slave_only VALUES(NULL);
|
||||
CREATE TRIGGER t1_update AFTER UPDATE ON t1 FOR EACH ROW INSERT INTO slave_only VALUES(NULL);
|
||||
|
||||
connection master;
|
||||
|
||||
INSERT INTO t_ignored1 VALUES(NULL);
|
||||
INSERT INTO t1 VALUES('s');
|
||||
UPDATE t1 SET s='s1';
|
||||
|
||||
# With Bug#54201, slave stops with duplicate key error here due to trigger
|
||||
# using the insert_id from insert on master into t1_ignored1
|
||||
sync_slave_with_master;
|
||||
connection slave;
|
||||
SELECT * FROM t1;
|
||||
|
||||
connection master;
|
||||
CREATE TABLE t_ignored2(id INT AUTO_INCREMENT PRIMARY KEY) ENGINE=myisam;
|
||||
sync_slave_with_master;
|
||||
|
||||
connection slave;
|
||||
STOP SLAVE;
|
||||
# Ignore the next INSERT into t_ignored2 and the INSERT_ID event just before it.
|
||||
SET GLOBAL sql_slave_skip_counter = 2;
|
||||
START SLAVE;
|
||||
|
||||
connection master;
|
||||
INSERT INTO t_ignored2 VALUES(NULL);
|
||||
UPDATE t1 SET s='s2';
|
||||
sync_slave_with_master;
|
||||
|
||||
connection slave;
|
||||
SELECT * FROM t1;
|
||||
SHOW TABLES LIKE 't\_ignored_';
|
||||
SELECT * FROM t_ignored2;
|
||||
DROP TABLE slave_only;
|
||||
|
||||
connection master;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t_ignored1;
|
||||
DROP TABLE t_ignored2;
|
||||
|
||||
sync_slave_with_master;
|
||||
|
@ -34,7 +34,7 @@
|
||||
#
|
||||
|
||||
connection slave;
|
||||
if (`SELECT $debug_sync_action = ''`)
|
||||
if (!$debug_sync_action)
|
||||
{
|
||||
--die Cannot continue. Please set value for debug_sync_action.
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ connection master;
|
||||
# MTR is not case-sensitive.
|
||||
let $lower_stmt_head= load data;
|
||||
let $UPPER_STMT_HEAD= LOAD DATA;
|
||||
if (`SELECT '$lock_option' <> ''`)
|
||||
if ($lock_option)
|
||||
{
|
||||
#if $lock_option is null, an extra blank is added into the statement,
|
||||
#this will change the result of rpl_loaddata test case. so $lock_option
|
||||
|
61
mysql-test/extra/rpl_tests/rpl_stop_slave.test
Normal file
61
mysql-test/extra/rpl_tests/rpl_stop_slave.test
Normal file
@ -0,0 +1,61 @@
|
||||
#
|
||||
# Auxiliary file which is used to test BUG#56118
|
||||
#
|
||||
# Slave should apply all statements in the transaction before stop if any
|
||||
# temporary table is created or dropped.
|
||||
#
|
||||
# USEAGE:
|
||||
# --let $tmp_table_stm= a SQL statement
|
||||
# --source extra/rpl_tests/rpl_stop_slave.test
|
||||
#
|
||||
|
||||
if (`SELECT "$tmp_table_stm" = ''`)
|
||||
{
|
||||
--echo \$tmp_table_stm is NULL
|
||||
--die $tmp_table_stm is NULL
|
||||
}
|
||||
|
||||
--echo
|
||||
--echo [ On Master ]
|
||||
connection master;
|
||||
BEGIN;
|
||||
DELETE FROM t1;
|
||||
eval $tmp_table_stm;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
DROP TEMPORARY TABLE tt1;
|
||||
COMMIT;
|
||||
|
||||
--echo
|
||||
--echo [ On Slave ]
|
||||
connection slave;
|
||||
|
||||
# To check if slave SQL thread is applying INSERT statement
|
||||
let $show_statement= SHOW PROCESSLIST;
|
||||
let $field= Info;
|
||||
let $condition= LIKE 'INSERT%';
|
||||
source include/wait_show_condition.inc;
|
||||
|
||||
send STOP SLAVE SQL_THREAD;
|
||||
|
||||
--echo
|
||||
--echo [ On Slave1 ]
|
||||
connection slave1;
|
||||
--echo # To resume slave SQL thread
|
||||
SET DEBUG_SYNC= 'now SIGNAL signal.continue';
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
|
||||
--echo
|
||||
--echo [ On Slave ]
|
||||
connection slave;
|
||||
reap;
|
||||
source include/wait_for_slave_sql_to_stop.inc;
|
||||
|
||||
--echo # Slave should stop after the transaction has committed.
|
||||
--echo # So t1 on master is same to t1 on slave.
|
||||
let diff_table_1=master:test.t1;
|
||||
let diff_table_2=slave:test.t1;
|
||||
source include/diff_tables.inc;
|
||||
|
||||
connection slave;
|
||||
START SLAVE SQL_THREAD;
|
||||
source include/wait_for_slave_sql_to_start.inc;
|
@ -23,7 +23,7 @@
|
||||
# Reset DEBUG_SYNC facility for safety.
|
||||
set debug_sync= "RESET";
|
||||
|
||||
if (`SELECT '$restore_table' <> ''`)
|
||||
if ($restore_table)
|
||||
{
|
||||
--eval create temporary table t_backup select * from $restore_table;
|
||||
}
|
||||
@ -82,7 +82,7 @@ connection default;
|
||||
|
||||
--eval delete from $table where i = 0;
|
||||
|
||||
if (`SELECT '$restore_table' <> ''`)
|
||||
if ($restore_table)
|
||||
{
|
||||
--eval truncate table $restore_table;
|
||||
--eval insert into $restore_table select * from t_backup;
|
||||
|
@ -23,7 +23,7 @@
|
||||
# Reset DEBUG_SYNC facility for safety.
|
||||
set debug_sync= "RESET";
|
||||
|
||||
if (`SELECT '$restore_table' <> ''`)
|
||||
if ($restore_table)
|
||||
{
|
||||
--eval create temporary table t_backup select * from $restore_table;
|
||||
}
|
||||
@ -67,7 +67,7 @@ if (!$success)
|
||||
|
||||
--eval delete from $table where i = 0;
|
||||
|
||||
if (`SELECT '$restore_table' <> ''`)
|
||||
if ($restore_table)
|
||||
{
|
||||
--eval truncate table $restore_table;
|
||||
--eval insert into $restore_table select * from t_backup;
|
||||
|
@ -10,12 +10,12 @@
|
||||
# # at this point, get_relay_log_pos.inc sets $relay_log_pos. echo position
|
||||
# # in $relay_log_file: $relay_log_pos.
|
||||
|
||||
if (`SELECT '$relay_log_file' = ''`)
|
||||
if (!$relay_log_file)
|
||||
{
|
||||
--die 'variable $relay_log_file is null'
|
||||
}
|
||||
|
||||
if (`SELECT '$master_log_pos' = ''`)
|
||||
if (!$master_log_pos)
|
||||
{
|
||||
--die 'variable $master_log_pos is null'
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
disable_query_log;
|
||||
--require r/not_true.require
|
||||
select (PLUGIN_LIBRARY LIKE 'ha_innodb_plugin%') as `TRUE` from information_schema.plugins where PLUGIN_NAME='InnoDB';
|
||||
select (PLUGIN_LIBRARY LIKE 'ha_innodb_plugin%' OR PLUGIN_DESCRIPTION LIKE '%xtradb%') as `TRUE` from information_schema.plugins where PLUGIN_NAME='InnoDB';
|
||||
enable_query_log;
|
||||
|
@ -345,3 +345,55 @@ explain select * from t1 where (key3 > 30 and key3<35) or (key2 >32 and key2 < 4
|
||||
select * from t1 where (key3 > 30 and key3<35) or (key2 >32 and key2 < 40);
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#56423: Different count with SELECT and CREATE SELECT queries
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (
|
||||
a INT,
|
||||
b INT,
|
||||
c INT,
|
||||
d INT,
|
||||
PRIMARY KEY (a),
|
||||
KEY (c),
|
||||
KEY bd (b,d)
|
||||
);
|
||||
|
||||
INSERT INTO t1 VALUES
|
||||
(1, 0, 1, 0),
|
||||
(2, 1, 1, 1),
|
||||
(3, 1, 1, 1),
|
||||
(4, 0, 1, 1);
|
||||
|
||||
EXPLAIN
|
||||
SELECT a
|
||||
FROM t1
|
||||
WHERE c = 1 AND b = 1 AND d = 1;
|
||||
|
||||
CREATE TABLE t2 ( a INT )
|
||||
SELECT a
|
||||
FROM t1
|
||||
WHERE c = 1 AND b = 1 AND d = 1;
|
||||
|
||||
SELECT * FROM t2;
|
||||
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
CREATE TABLE t1( a INT, b INT, KEY(a), KEY(b) );
|
||||
INSERT INTO t1 VALUES (1, 2), (1, 2), (1, 2), (1, 2);
|
||||
SELECT * FROM t1 FORCE INDEX(a, b) WHERE a = 1 AND b = 2;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo # Code coverage of fix.
|
||||
CREATE TABLE t1 ( a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b INT);
|
||||
INSERT INTO t1 (b) VALUES (1);
|
||||
UPDATE t1 SET b = 2 WHERE a = 1;
|
||||
SELECT * FROM t1;
|
||||
|
||||
CREATE TABLE t2 ( a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(1) );
|
||||
INSERT INTO t2 (b) VALUES ('a');
|
||||
UPDATE t2 SET b = 'b' WHERE a = 1;
|
||||
SELECT * FROM t2;
|
||||
|
||||
DROP TABLE t1, t2;
|
||||
|
@ -126,3 +126,19 @@ WHERE
|
||||
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#50402 Optimizer producing wrong results when using Index Merge on InnoDB
|
||||
--echo #
|
||||
CREATE TABLE t1 (f1 INT, PRIMARY KEY (f1));
|
||||
INSERT INTO t1 VALUES (2);
|
||||
CREATE TABLE t2 (f1 INT, f2 INT, f3 char(1),
|
||||
PRIMARY KEY (f1), KEY (f2), KEY (f3) );
|
||||
INSERT INTO t2 VALUES (1, 1, 'h'), (2, 3, 'h'), (3, 2, ''), (4, 2, '');
|
||||
|
||||
SELECT t1.f1 FROM t1
|
||||
WHERE (SELECT COUNT(*) FROM t2 WHERE t2.f3 = 'h' AND t2.f2 = t1.f1) = 0 AND t1.f1 = 2;
|
||||
|
||||
EXPLAIN SELECT t1.f1 FROM t1
|
||||
WHERE (SELECT COUNT(*) FROM t2 WHERE t2.f3 = 'h' AND t2.f2 = t1.f1) = 0 AND t1.f1 = 2;
|
||||
|
||||
DROP TABLE t1,t2;
|
||||
|
@ -44,7 +44,7 @@ connection master;
|
||||
# kill the query that is waiting
|
||||
eval kill query $connection_id;
|
||||
|
||||
if (`SELECT '$debug_lock' != ''`)
|
||||
if ($debug_lock)
|
||||
{
|
||||
# release the lock to allow binlog continue
|
||||
eval SELECT RELEASE_LOCK($debug_lock);
|
||||
@ -57,7 +57,7 @@ reap;
|
||||
|
||||
connection master;
|
||||
|
||||
if (`SELECT '$debug_lock' != ''`)
|
||||
if ($debug_lock)
|
||||
{
|
||||
# get lock again to make the next query wait
|
||||
eval SELECT GET_LOCK($debug_lock, 10);
|
||||
|
@ -25,7 +25,7 @@ source include/kill_query.inc;
|
||||
connection master;
|
||||
disable_query_log;
|
||||
disable_result_log;
|
||||
if (`SELECT '$debug_lock' != ''`)
|
||||
if ($debug_lock)
|
||||
{
|
||||
eval SELECT RELEASE_LOCK($debug_lock);
|
||||
}
|
||||
@ -36,8 +36,8 @@ source include/diff_master_slave.inc;
|
||||
|
||||
# Acquire the debug lock again if used
|
||||
connection master;
|
||||
disable_query_log; disable_result_log; if (`SELECT '$debug_lock' !=
|
||||
''`) { eval SELECT GET_LOCK($debug_lock, 10); } enable_result_log;
|
||||
enable_query_log;
|
||||
disable_query_log; disable_result_log;
|
||||
if ($debug_lock) { eval SELECT GET_LOCK($debug_lock, 10); }
|
||||
enable_result_log; enable_query_log;
|
||||
|
||||
connection $connection_name;
|
||||
|
@ -1 +0,0 @@
|
||||
FLUSH QUERY_RESPONSE_TIME;
|
@ -1,8 +0,0 @@
|
||||
SELECT d.count,
|
||||
(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
|
||||
(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total,
|
||||
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count,
|
||||
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
|
||||
FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0;
|
||||
SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||
SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
@ -1,19 +0,0 @@
|
||||
SELECT SLEEP(0.31);
|
||||
SELECT SLEEP(0.32);
|
||||
SELECT SLEEP(0.33);
|
||||
SELECT SLEEP(0.34);
|
||||
SELECT SLEEP(0.35);
|
||||
SELECT SLEEP(0.36);
|
||||
SELECT SLEEP(0.37);
|
||||
SELECT SLEEP(0.38);
|
||||
SELECT SLEEP(0.39);
|
||||
SELECT SLEEP(0.40);
|
||||
SELECT SLEEP(1.1);
|
||||
SELECT SLEEP(1.2);
|
||||
SELECT SLEEP(1.3);
|
||||
SELECT SLEEP(1.5);
|
||||
SELECT SLEEP(1.4);
|
||||
SELECT SLEEP(0.5);
|
||||
SELECT SLEEP(2.1);
|
||||
SELECT SLEEP(2.3);
|
||||
SELECT SLEEP(2.5);
|
@ -56,7 +56,7 @@ if (`SELECT "$_sql_running" = "Yes" OR "$_io_running" = "Yes"`) {
|
||||
# Read server variables.
|
||||
let $MYSQLD_DATADIR= `SELECT @@datadir`;
|
||||
let $_fake_filename= query_get_value(SHOW VARIABLES LIKE 'relay_log', Value, 1);
|
||||
if (`SELECT '$_fake_filename' = ''`) {
|
||||
if (!$_fake_filename) {
|
||||
--echo Badly written test case: relay_log variable is empty. Please use the
|
||||
--echo server option --relay-log=FILE.
|
||||
}
|
||||
@ -72,7 +72,7 @@ copy_file $fake_relay_log $_fake_relay_log;
|
||||
|
||||
if (`SELECT LENGTH(@@secure_file_priv) > 0`)
|
||||
{
|
||||
-- let $_file_priv_dir= `SELECT @@secure_file_priv`;
|
||||
-- let $_file_priv_dir= `SELECT @@secure_file_priv`
|
||||
-- let $_suffix= `SELECT UUID()`
|
||||
-- let $_tmp_file= $_file_priv_dir/fake-index.$_suffix
|
||||
|
||||
|
@ -27,14 +27,14 @@ if (!$binlog_start)
|
||||
}
|
||||
|
||||
--let $_statement=show binlog events
|
||||
if (`SELECT '$binlog_file' <> ''`)
|
||||
if ($binlog_file)
|
||||
{
|
||||
--let $_statement= $_statement in '$binlog_file'
|
||||
}
|
||||
|
||||
--let $_statement= $_statement from $binlog_start
|
||||
|
||||
if (`SELECT '$binlog_limit' <> ''`)
|
||||
if ($binlog_limit)
|
||||
{
|
||||
--let $_statement= $_statement limit $binlog_limit
|
||||
}
|
||||
|
@ -48,13 +48,13 @@ let $binlog_name= query_get_value("SHOW MASTER STATUS", File, 1);
|
||||
eval SHOW BINLOG EVENTS IN '$binlog_name';
|
||||
|
||||
let $_master_con= $master_connection;
|
||||
if (`SELECT '$_master_con' = ''`)
|
||||
if (!$_master_con)
|
||||
{
|
||||
if (`SELECT '$_con' = 'slave'`)
|
||||
{
|
||||
let $_master_con= master;
|
||||
}
|
||||
if (`SELECT '$_master_con' = ''`)
|
||||
if (!$_master_con)
|
||||
{
|
||||
--echo Unable to determine master connection. No debug info printed for master.
|
||||
--echo Please fix the test case by setting $master_connection before sourcing
|
||||
@ -62,7 +62,7 @@ if (`SELECT '$_master_con' = ''`)
|
||||
}
|
||||
}
|
||||
|
||||
if (`SELECT '$_master_con' != ''`)
|
||||
if ($_master_con)
|
||||
{
|
||||
|
||||
let $master_binlog_name_io= query_get_value("SHOW SLAVE STATUS", Master_Log_File, 1);
|
||||
|
@ -31,7 +31,7 @@
|
||||
# $master_connection
|
||||
# See wait_for_slave_param.inc for description.
|
||||
|
||||
if (`SELECT '$slave_io_errno' = ''`) {
|
||||
if (!$slave_io_errno) {
|
||||
--die !!!ERROR IN TEST: you must set \$slave_io_errno before sourcing wait_for_slave_io_error.inc
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ if (!$_slave_timeout_counter)
|
||||
}
|
||||
|
||||
let $_slave_param_comparison= $slave_param_comparison;
|
||||
if (`SELECT '$_slave_param_comparison' = ''`)
|
||||
if (!$_slave_param_comparison)
|
||||
{
|
||||
let $_slave_param_comparison= =;
|
||||
}
|
||||
@ -71,7 +71,7 @@ while (`SELECT NOT('$_show_slave_status_value' $_slave_param_comparison '$slave_
|
||||
if (!$_slave_timeout_counter)
|
||||
{
|
||||
--echo **** ERROR: timeout after $slave_timeout seconds while waiting for slave parameter $slave_param $_slave_param_comparison $slave_param_value ****
|
||||
if (`SELECT '$slave_error_message' != ''`)
|
||||
if ($slave_error_message)
|
||||
{
|
||||
--echo Message: $slave_error_message
|
||||
}
|
||||
|
@ -24,7 +24,7 @@
|
||||
# $master_connection
|
||||
# See wait_for_slave_param.inc for description.
|
||||
|
||||
if (`SELECT '$slave_sql_errno' = ''`) {
|
||||
if (!$slave_sql_errno) {
|
||||
--die !!!ERROR IN TEST: you must set \$slave_sql_errno before sourcing wait_for_slave_sql_error.inc
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ if (!$_status_timeout_counter)
|
||||
}
|
||||
|
||||
let $_status_var_comparsion= $status_var_comparsion;
|
||||
if (`SELECT '$_status_var_comparsion' = ''`)
|
||||
if (!$_status_var_comparsion)
|
||||
{
|
||||
let $_status_var_comparsion= =;
|
||||
}
|
||||
|
@ -23,7 +23,3 @@ my_safe_process_SOURCES = safe_process.cc
|
||||
EXTRA_DIST = safe_kill_win.cc \
|
||||
safe_process_win.cc \
|
||||
CMakeLists.txt
|
||||
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
%::SCCS/s.%
|
||||
|
@ -678,6 +678,13 @@ sub process_opts {
|
||||
next;
|
||||
}
|
||||
|
||||
$value= mtr_match_prefix($opt, "--testcase-timeout=");
|
||||
if ( defined $value ) {
|
||||
# Overrides test case timeout for this test
|
||||
$tinfo->{'case-timeout'}= $value;
|
||||
next;
|
||||
}
|
||||
|
||||
# Ok, this was a real option, add it
|
||||
push(@{$tinfo->{$opt_name}}, $opt);
|
||||
}
|
||||
@ -688,6 +695,7 @@ sub process_opts {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Collect information about a single test case
|
||||
@ -900,7 +908,7 @@ sub collect_one_test_case {
|
||||
{
|
||||
# Ndb is not supported, skip it
|
||||
$tinfo->{'skip'}= 1;
|
||||
$tinfo->{'comment'}= "No ndbcluster support";
|
||||
$tinfo->{'comment'}= "No ndbcluster support or ndb tests not enabled";
|
||||
return $tinfo;
|
||||
}
|
||||
elsif ( $::opt_skip_ndbcluster )
|
||||
|
@ -111,12 +111,24 @@ my $path_vardir_trace; # unix formatted opt_vardir for trace files
|
||||
my $opt_tmpdir; # Path to use for tmp/ dir
|
||||
my $opt_tmpdir_pid;
|
||||
|
||||
my $opt_start;
|
||||
my $opt_start_dirty;
|
||||
my $opt_start_exit;
|
||||
my $start_only;
|
||||
|
||||
END {
|
||||
if ( defined $opt_tmpdir_pid and $opt_tmpdir_pid == $$ )
|
||||
{
|
||||
# Remove the tempdir this process has created
|
||||
mtr_verbose("Removing tmpdir '$opt_tmpdir");
|
||||
rmtree($opt_tmpdir);
|
||||
if (!$opt_start_exit)
|
||||
{
|
||||
# Remove the tempdir this process has created
|
||||
mtr_verbose("Removing tmpdir $opt_tmpdir");
|
||||
rmtree($opt_tmpdir);
|
||||
}
|
||||
else
|
||||
{
|
||||
mtr_warning("tmpdir $opt_tmpdir should be removed after the server has finished");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -216,20 +228,16 @@ my $opt_suite_timeout = $ENV{MTR_SUITE_TIMEOUT} || 360; # minutes
|
||||
my $opt_shutdown_timeout= $ENV{MTR_SHUTDOWN_TIMEOUT} || 10; # seconds
|
||||
my $opt_start_timeout = $ENV{MTR_START_TIMEOUT} || 180; # seconds
|
||||
|
||||
sub testcase_timeout { return $opt_testcase_timeout * 60; };
|
||||
sub suite_timeout { return $opt_suite_timeout * 60; };
|
||||
sub check_timeout { return $opt_testcase_timeout * 6; };
|
||||
|
||||
my $opt_start;
|
||||
my $opt_start_dirty;
|
||||
my $opt_start_exit;
|
||||
my $start_only;
|
||||
my $opt_wait_all;
|
||||
my $opt_user_args;
|
||||
my $opt_repeat= 1;
|
||||
my $opt_retry= 1;
|
||||
my $opt_retry_failure= env_or_val(MTR_RETRY_FAILURE => 2);
|
||||
my $opt_reorder= 1;
|
||||
my $opt_force_restart= 0;
|
||||
|
||||
my $opt_strace_client;
|
||||
|
||||
@ -247,9 +255,21 @@ my $opt_callgrind;
|
||||
my %mysqld_logs;
|
||||
my $opt_debug_sync_timeout= 300; # Default timeout for WAIT_FOR actions.
|
||||
|
||||
sub testcase_timeout ($) {
|
||||
my ($tinfo)= @_;
|
||||
if (exists $tinfo->{'case-timeout'}) {
|
||||
# Return test specific timeout if *longer* that the general timeout
|
||||
my $test_to= $tinfo->{'case-timeout'};
|
||||
$test_to*= 10 if $opt_valgrind;
|
||||
return $test_to * 60 if $test_to > $opt_testcase_timeout;
|
||||
}
|
||||
return $opt_testcase_timeout * 60;
|
||||
}
|
||||
|
||||
our $opt_warnings= 1;
|
||||
|
||||
our $opt_skip_ndbcluster= 0;
|
||||
our $opt_include_ndbcluster= 0;
|
||||
our $opt_skip_ndbcluster= 1;
|
||||
|
||||
my $exe_ndbd;
|
||||
my $exe_ndb_mgmd;
|
||||
@ -611,13 +631,15 @@ sub run_test_server ($$$) {
|
||||
if ($test_has_failed and $retries <= $opt_retry){
|
||||
# Test should be run one more time unless it has failed
|
||||
# too many times already
|
||||
my $tname= $result->{name};
|
||||
my $failures= $result->{failures};
|
||||
if ($opt_retry > 1 and $failures >= $opt_retry_failure){
|
||||
mtr_report("\nTest has failed $failures times,",
|
||||
mtr_report("\nTest $tname has failed $failures times,",
|
||||
"no more retries!\n");
|
||||
}
|
||||
else {
|
||||
mtr_report("\nRetrying test, attempt($retries/$opt_retry)...\n");
|
||||
mtr_report("\nRetrying test $tname, ".
|
||||
"attempt($retries/$opt_retry)...\n");
|
||||
delete($result->{result});
|
||||
$result->{retries}= $retries+1;
|
||||
$result->write_test($sock, 'TESTCASE');
|
||||
@ -903,6 +925,7 @@ sub command_line_setup {
|
||||
# Control what test suites or cases to run
|
||||
'force' => \$opt_force,
|
||||
'with-ndbcluster-only' => \&collect_option,
|
||||
'include-ndbcluster' => \$opt_include_ndbcluster,
|
||||
'skip-ndbcluster|skip-ndb' => \$opt_skip_ndbcluster,
|
||||
'suite|suites=s' => \$opt_suites,
|
||||
'skip-rpl' => \&collect_option,
|
||||
@ -986,6 +1009,7 @@ sub command_line_setup {
|
||||
'report-features' => \$opt_report_features,
|
||||
'comment=s' => \$opt_comment,
|
||||
'fast' => \$opt_fast,
|
||||
'force-restart' => \$opt_force_restart,
|
||||
'reorder!' => \$opt_reorder,
|
||||
'enable-disabled' => \&collect_option,
|
||||
'verbose+' => \$opt_verbose,
|
||||
@ -2178,6 +2202,12 @@ sub environment_setup {
|
||||
# Create an environment variable to make it possible
|
||||
# to detect that valgrind is being used from test cases
|
||||
$ENV{'VALGRIND_TEST'}= $opt_valgrind;
|
||||
|
||||
# Add dir of this perl to aid mysqltest in finding perl
|
||||
my $perldir= dirname($^X);
|
||||
my $pathsep= ":";
|
||||
$pathsep= ";" if IS_WINDOWS && ! IS_CYGWIN;
|
||||
$ENV{'PATH'}= "$ENV{'PATH'}".$pathsep.$perldir;
|
||||
}
|
||||
|
||||
|
||||
@ -2483,14 +2513,12 @@ sub fix_vs_config_dir () {
|
||||
my $modified = 1e30;
|
||||
$opt_vs_config="";
|
||||
|
||||
for my $dir (qw(client/*.dir libmysql/libmysql.dir sql/mysqld.dir
|
||||
sql/udf_example.dir storage/*/*.dir plugin/*/*.dir)) {
|
||||
for (<$basedir/$dir/*/BuildLog.htm>) {
|
||||
if (-M $_ < $modified)
|
||||
{
|
||||
$modified = -M _;
|
||||
$opt_vs_config = basename(dirname($_));
|
||||
}
|
||||
|
||||
for (<$basedir/sql/*/mysqld.exe>) {
|
||||
if (-M $_ < $modified)
|
||||
{
|
||||
$modified = -M _;
|
||||
$opt_vs_config = basename(dirname($_));
|
||||
}
|
||||
}
|
||||
|
||||
@ -2502,6 +2530,11 @@ sub fix_vs_config_dir () {
|
||||
sub check_ndbcluster_support ($) {
|
||||
my $mysqld_variables= shift;
|
||||
|
||||
if ($opt_include_ndbcluster)
|
||||
{
|
||||
$opt_skip_ndbcluster= 0;
|
||||
}
|
||||
|
||||
if ($opt_skip_ndbcluster)
|
||||
{
|
||||
mtr_report(" - skipping ndbcluster");
|
||||
@ -3341,7 +3374,8 @@ sub check_testcase($$)
|
||||
"\nMTR's internal check of the test case '$tname' failed.
|
||||
This means that the test case does not preserve the state that existed
|
||||
before the test case was executed. Most likely the test case did not
|
||||
do a proper clean-up.
|
||||
do a proper clean-up. It could also be caused by the previous test run
|
||||
by this thread, if the server wasn't restarted.
|
||||
This is the diff of the states of the servers before and after the
|
||||
test case was executed:\n";
|
||||
$tinfo->{check}.= $report;
|
||||
@ -3387,6 +3421,10 @@ test case was executed:\n";
|
||||
# Kill any check processes still running
|
||||
map($_->kill(), values(%started));
|
||||
|
||||
mtr_warning("Check-testcase failed, this could also be caused by the" .
|
||||
" previous test run by this worker thread")
|
||||
if $result > 1 && $mode eq "before";
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
@ -3841,7 +3879,7 @@ sub run_testcase ($$) {
|
||||
}
|
||||
}
|
||||
|
||||
my $test_timeout= start_timer(testcase_timeout());
|
||||
my $test_timeout= start_timer(testcase_timeout($tinfo));
|
||||
|
||||
do_before_run_mysqltest($tinfo);
|
||||
|
||||
@ -3946,6 +3984,9 @@ sub run_testcase ($$) {
|
||||
# Try to get reason from test log file
|
||||
find_testcase_skipped_reason($tinfo);
|
||||
mtr_report_test_skipped($tinfo);
|
||||
# Restart if skipped due to missing perl, it may have had side effects
|
||||
stop_all_servers($opt_shutdown_timeout)
|
||||
if ($tinfo->{'comment'} =~ /^perl not found/);
|
||||
}
|
||||
elsif ( $res == 65 )
|
||||
{
|
||||
@ -4052,7 +4093,7 @@ sub run_testcase ($$) {
|
||||
{
|
||||
my $log_file_name= $opt_vardir."/log/".$tinfo->{shortname}.".log";
|
||||
$tinfo->{comment}=
|
||||
"Test case timeout after ".testcase_timeout().
|
||||
"Test case timeout after ".testcase_timeout($tinfo).
|
||||
" seconds\n\n";
|
||||
# Add 20 last executed commands from test case log file
|
||||
if (-e $log_file_name)
|
||||
@ -4061,7 +4102,7 @@ sub run_testcase ($$) {
|
||||
"== $log_file_name == \n".
|
||||
mtr_lastlinesfromfile($log_file_name, 20)."\n";
|
||||
}
|
||||
$tinfo->{'timeout'}= testcase_timeout(); # Mark as timeout
|
||||
$tinfo->{'timeout'}= testcase_timeout($tinfo); # Mark as timeout
|
||||
run_on_all($tinfo, 'analyze-timeout');
|
||||
|
||||
report_failure_and_restart($tinfo);
|
||||
@ -4186,7 +4227,9 @@ sub get_log_from_proc ($$) {
|
||||
foreach my $mysqld (all_servers()) {
|
||||
if ($mysqld->{proc} eq $proc) {
|
||||
my @srv_lines= extract_server_log($mysqld->if_exist('#log-error'), $name);
|
||||
$srv_log= "\nServer log from this test:\n" . join ("", @srv_lines);
|
||||
$srv_log= "\nServer log from this test:\n" .
|
||||
"----------SERVER LOG START-----------\n". join ("", @srv_lines) .
|
||||
"----------SERVER LOG END-------------\n";
|
||||
last;
|
||||
}
|
||||
}
|
||||
@ -5017,6 +5060,11 @@ sub server_need_restart {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ( $opt_force_restart ) {
|
||||
mtr_verbose_restart($server, "forced restart turned on");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ( $tinfo->{template_path} ne $current_config_name)
|
||||
{
|
||||
mtr_verbose_restart($server, "using different config file");
|
||||
@ -5719,7 +5767,8 @@ Options to control what test suites or cases to run
|
||||
|
||||
force Continue to run the suite after failure
|
||||
with-ndbcluster-only Run only tests that include "ndb" in the filename
|
||||
skip-ndb[cluster] Skip all tests that need cluster
|
||||
skip-ndb[cluster] Skip all tests that need cluster. Default.
|
||||
include-ndb[cluster] Enable all tests that need cluster
|
||||
do-test=PREFIX or REGEX
|
||||
Run test cases which name are prefixed with PREFIX
|
||||
or fulfills REGEX
|
||||
@ -5843,7 +5892,8 @@ Misc options
|
||||
servers to exit before finishing the process
|
||||
fast Run as fast as possible, dont't wait for servers
|
||||
to shutdown etc.
|
||||
parallel=N Run tests in N parallel threads (default 1)
|
||||
force-restart Always restart servers between tests
|
||||
parallel=N Run tests in N parallel threads (default=1)
|
||||
Use parallel=auto for auto-setting of N
|
||||
repeat=N Run each test N number of times
|
||||
retry=N Retry tests that fail up to N times (default $opt_retry).
|
||||
|
@ -1900,3 +1900,34 @@ CONVERT(a, CHAR) CONVERT(b, CHAR)
|
||||
70000 1092
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
SELECT LENGTH(RPAD(0.0115E88, 61297, _utf8'яэюя'));
|
||||
LENGTH(RPAD(0.0115E88, 61297, _utf8'яэюя'))
|
||||
61297
|
||||
SELECT LENGTH(RPAD(0.0115E88, 61297, _utf8'йцуя'));
|
||||
LENGTH(RPAD(0.0115E88, 61297, _utf8'йцуя'))
|
||||
61297
|
||||
SELECT HEX(RPAD(0x20, 2, _utf8 0xD18F));
|
||||
HEX(RPAD(0x20, 2, _utf8 0xD18F))
|
||||
20D1
|
||||
SELECT HEX(RPAD(0x20, 4, _utf8 0xD18F));
|
||||
HEX(RPAD(0x20, 4, _utf8 0xD18F))
|
||||
20D18FD1
|
||||
SELECT HEX(LPAD(0x20, 2, _utf8 0xD18F));
|
||||
HEX(LPAD(0x20, 2, _utf8 0xD18F))
|
||||
D120
|
||||
SELECT HEX(LPAD(0x20, 4, _utf8 0xD18F));
|
||||
HEX(LPAD(0x20, 4, _utf8 0xD18F))
|
||||
D18FD120
|
||||
SELECT HEX(RPAD(_utf8 0xD18F, 3, 0x20));
|
||||
HEX(RPAD(_utf8 0xD18F, 3, 0x20))
|
||||
D18F20
|
||||
SELECT HEX(LPAD(_utf8 0xD18F, 3, 0x20));
|
||||
HEX(LPAD(_utf8 0xD18F, 3, 0x20))
|
||||
20D18F
|
||||
SELECT HEX(INSERT(_utf8 0xD18F, 2, 1, 0x20));
|
||||
HEX(INSERT(_utf8 0xD18F, 2, 1, 0x20))
|
||||
D120
|
||||
SELECT HEX(INSERT(_utf8 0xD18FD18E, 2, 1, 0x20));
|
||||
HEX(INSERT(_utf8 0xD18FD18E, 2, 1, 0x20))
|
||||
D120D18E
|
||||
End of 5.1 tests
|
||||
|
@ -251,4 +251,50 @@ EXPLAIN SELECT c1 FROM t1 WHERE c2 = 1 AND c4 = 1 AND c5 = 1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref c2,c2_2 c2 10 const,const 3 Using where
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#56814 Explain + subselect + fulltext crashes server
|
||||
#
|
||||
CREATE TABLE t1(f1 VARCHAR(6) NOT NULL,
|
||||
FULLTEXT KEY(f1),UNIQUE(f1));
|
||||
INSERT INTO t1 VALUES ('test');
|
||||
EXPLAIN SELECT 1 FROM t1
|
||||
WHERE 1 > ALL((SELECT 1 FROM t1 JOIN t1 a ON (MATCH(t1.f1) AGAINST (""))
|
||||
WHERE t1.f1 GROUP BY t1.f1));
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 system NULL NULL NULL NULL 1
|
||||
2 SUBQUERY a system NULL NULL NULL NULL 1 Using filesort
|
||||
2 SUBQUERY t1 fulltext f1 f1 0 1 Using where
|
||||
PREPARE stmt FROM
|
||||
'EXPLAIN SELECT 1 FROM t1
|
||||
WHERE 1 > ALL((SELECT 1 FROM t1 RIGHT OUTER JOIN t1 a
|
||||
ON (MATCH(t1.f1) AGAINST (""))
|
||||
WHERE t1.f1 GROUP BY t1.f1))';
|
||||
EXECUTE stmt;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 system NULL NULL NULL NULL 1
|
||||
2 SUBQUERY a system NULL NULL NULL NULL 1 Using filesort
|
||||
2 SUBQUERY t1 fulltext f1 f1 0 1 Using where
|
||||
EXECUTE stmt;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 system NULL NULL NULL NULL 1
|
||||
2 SUBQUERY a system NULL NULL NULL NULL 1 Using filesort
|
||||
2 SUBQUERY t1 fulltext f1 f1 0 1 Using where
|
||||
DEALLOCATE PREPARE stmt;
|
||||
PREPARE stmt FROM
|
||||
'EXPLAIN SELECT 1 FROM t1
|
||||
WHERE 1 > ALL((SELECT 1 FROM t1 JOIN t1 a
|
||||
ON (MATCH(t1.f1) AGAINST (""))
|
||||
WHERE t1.f1 GROUP BY t1.f1))';
|
||||
EXECUTE stmt;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 system NULL NULL NULL NULL 1
|
||||
2 SUBQUERY a system NULL NULL NULL NULL 1 Using filesort
|
||||
2 SUBQUERY t1 fulltext f1 f1 0 1 Using where
|
||||
EXECUTE stmt;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 system NULL NULL NULL NULL 1
|
||||
2 SUBQUERY a system NULL NULL NULL NULL 1 Using filesort
|
||||
2 SUBQUERY t1 fulltext f1 f1 0 1 Using where
|
||||
DEALLOCATE PREPARE stmt;
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests.
|
||||
|
@ -652,4 +652,40 @@ Table Op Msg_type Msg_text
|
||||
test.t1 repair status OK
|
||||
SET myisam_sort_buffer_size=@@global.myisam_sort_buffer_size;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#54484 explain + prepared statement: crash and Got error -1 from storage engine
|
||||
#
|
||||
CREATE TABLE t1(f1 VARCHAR(6) NOT NULL, FULLTEXT KEY(f1), UNIQUE(f1));
|
||||
INSERT INTO t1 VALUES ('test');
|
||||
SELECT 1 FROM t1 WHERE 1 >
|
||||
ALL((SELECT 1 FROM t1 JOIN t1 a
|
||||
ON (MATCH(t1.f1) against (""))
|
||||
WHERE t1.f1 GROUP BY t1.f1)) xor f1;
|
||||
1
|
||||
1
|
||||
PREPARE stmt FROM
|
||||
'SELECT 1 FROM t1 WHERE 1 >
|
||||
ALL((SELECT 1 FROM t1 RIGHT OUTER JOIN t1 a
|
||||
ON (MATCH(t1.f1) against (""))
|
||||
WHERE t1.f1 GROUP BY t1.f1)) xor f1';
|
||||
EXECUTE stmt;
|
||||
1
|
||||
1
|
||||
EXECUTE stmt;
|
||||
1
|
||||
1
|
||||
DEALLOCATE PREPARE stmt;
|
||||
PREPARE stmt FROM
|
||||
'SELECT 1 FROM t1 WHERE 1 >
|
||||
ALL((SELECT 1 FROM t1 JOIN t1 a
|
||||
ON (MATCH(t1.f1) against (""))
|
||||
WHERE t1.f1 GROUP BY t1.f1))';
|
||||
EXECUTE stmt;
|
||||
1
|
||||
1
|
||||
EXECUTE stmt;
|
||||
1
|
||||
1
|
||||
DEALLOCATE PREPARE stmt;
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
@ -1029,4 +1029,12 @@ GROUP_CONCAT(t1.a ORDER BY t1.a)
|
||||
1,1,2,2
|
||||
DEALLOCATE PREPARE stmt;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#57194 group_concat cause crash and/or invalid memory reads with type errors
|
||||
#
|
||||
CREATE TABLE t1(f1 int);
|
||||
INSERT INTO t1 values (0),(0);
|
||||
SELECT POLYGON((SELECT 1 FROM (SELECT 1 IN (GROUP_CONCAT(t1.f1)) FROM t1, t1 t GROUP BY t.f1 ) d));
|
||||
ERROR 22007: Illegal non geometric '(select 1 from (select (1 = group_concat(`test`.`t1`.`f1` separator ',')) AS `1 IN (GROUP_CONCAT(t1.f1))` from `test`.`t1` join `test`.`t1` `t` group by `t`.`f1`) `d`)' value found during parsing
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
@ -482,4 +482,20 @@ RAND(i)
|
||||
0.155220427694936
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#57477 SIGFPE when dividing a huge number a negative number
|
||||
#
|
||||
SELECT -9999999999999999991 DIV -1;
|
||||
-9999999999999999991 DIV -1
|
||||
-9223372036854775808
|
||||
Warnings:
|
||||
Error 1292 Truncated incorrect DECIMAL value: ''
|
||||
SELECT -9223372036854775808 DIV -1;
|
||||
-9223372036854775808 DIV -1
|
||||
-9223372036854775808
|
||||
SELECT -9223372036854775808 MOD -1;
|
||||
-9223372036854775808 MOD -1
|
||||
0
|
||||
SELECT -9223372036854775808999 MOD -1;
|
||||
-9223372036854775808999 MOD -1
|
||||
0
|
||||
End of 5.1 tests
|
||||
|
@ -258,4 +258,10 @@ GREATEST(a, (SELECT b FROM t1 LIMIT 1))
|
||||
3
|
||||
1
|
||||
DROP TABLE t1;
|
||||
SELECT INET_NTOA(0);
|
||||
INET_NTOA(0)
|
||||
0.0.0.0
|
||||
SELECT '1' IN ('1', INET_NTOA(0));
|
||||
'1' IN ('1', INET_NTOA(0))
|
||||
1
|
||||
End of tests
|
||||
|
@ -1430,3 +1430,14 @@ DROP USER 'testbug'@localhost;
|
||||
DROP TABLE db2.t1;
|
||||
DROP DATABASE db1;
|
||||
DROP DATABASE db2;
|
||||
#
|
||||
# Bug #36742
|
||||
#
|
||||
grant usage on Foo.* to myuser@Localhost identified by 'foo';
|
||||
grant select on Foo.* to myuser@localhost;
|
||||
select host,user from mysql.user where User='myuser';
|
||||
host user
|
||||
localhost myuser
|
||||
revoke select on Foo.* from myuser@localhost;
|
||||
delete from mysql.user where User='myuser';
|
||||
flush privileges;
|
||||
|
@ -21,123 +21,108 @@ grant select on test.* to CUser@LOCALHOST;
|
||||
flush privileges;
|
||||
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
|
||||
user host
|
||||
CUser LOCALHOST
|
||||
CUser localhost
|
||||
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser' order by 1,2;
|
||||
user host db select_priv
|
||||
CUser LOCALHOST test Y
|
||||
CUser localhost test Y
|
||||
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'LOCALHOST';
|
||||
flush privileges;
|
||||
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
|
||||
user host
|
||||
CUser LOCALHOST
|
||||
CUser localhost
|
||||
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser' order by 1,2;
|
||||
user host db select_priv
|
||||
CUser localhost test Y
|
||||
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'localhost';
|
||||
flush privileges;
|
||||
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
|
||||
user host
|
||||
CUser LOCALHOST
|
||||
CUser localhost
|
||||
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser' order by 1,2;
|
||||
user host db select_priv
|
||||
DROP USER CUser@localhost;
|
||||
DROP USER CUser@LOCALHOST;
|
||||
ERROR HY000: Operation DROP USER failed for 'CUser'@'localhost'
|
||||
create table t1 (a int);
|
||||
grant select on test.t1 to CUser@localhost;
|
||||
grant select on test.t1 to CUser@LOCALHOST;
|
||||
flush privileges;
|
||||
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
|
||||
user host
|
||||
CUser LOCALHOST
|
||||
CUser localhost
|
||||
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
|
||||
user host db Table_name Table_priv Column_priv
|
||||
CUser LOCALHOST test t1 Select
|
||||
CUser localhost test t1 Select
|
||||
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'LOCALHOST';
|
||||
flush privileges;
|
||||
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
|
||||
user host
|
||||
CUser LOCALHOST
|
||||
CUser localhost
|
||||
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
|
||||
user host db Table_name Table_priv Column_priv
|
||||
CUser localhost test t1 Select
|
||||
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'localhost';
|
||||
flush privileges;
|
||||
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
|
||||
user host
|
||||
CUser LOCALHOST
|
||||
CUser localhost
|
||||
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
|
||||
user host db Table_name Table_priv Column_priv
|
||||
DROP USER CUser@localhost;
|
||||
DROP USER CUser@LOCALHOST;
|
||||
ERROR HY000: Operation DROP USER failed for 'CUser'@'localhost'
|
||||
grant select(a) on test.t1 to CUser@localhost;
|
||||
grant select(a) on test.t1 to CUser@LOCALHOST;
|
||||
flush privileges;
|
||||
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
|
||||
user host
|
||||
CUser LOCALHOST
|
||||
CUser localhost
|
||||
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
|
||||
user host db Table_name Table_priv Column_priv
|
||||
CUser LOCALHOST test t1 Select
|
||||
CUser localhost test t1 Select
|
||||
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'LOCALHOST';
|
||||
flush privileges;
|
||||
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
|
||||
user host
|
||||
CUser LOCALHOST
|
||||
CUser localhost
|
||||
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
|
||||
user host db Table_name Table_priv Column_priv
|
||||
CUser localhost test t1 Select
|
||||
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'localhost';
|
||||
flush privileges;
|
||||
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
|
||||
user host
|
||||
CUser LOCALHOST
|
||||
CUser localhost
|
||||
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
|
||||
user host db Table_name Table_priv Column_priv
|
||||
DROP USER CUser@localhost;
|
||||
DROP USER CUser@LOCALHOST;
|
||||
ERROR HY000: Operation DROP USER failed for 'CUser'@'localhost'
|
||||
drop table t1;
|
||||
grant select on test.* to CUser2@localhost;
|
||||
grant select on test.* to CUser2@LOCALHOST;
|
||||
flush privileges;
|
||||
SELECT user, host FROM mysql.user where user = 'CUser2' order by 1,2;
|
||||
user host
|
||||
CUser2 LOCALHOST
|
||||
CUser2 localhost
|
||||
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser2' order by 1,2;
|
||||
user host db select_priv
|
||||
CUser2 LOCALHOST test Y
|
||||
CUser2 localhost test Y
|
||||
REVOKE SELECT ON test.* FROM 'CUser2'@'LOCALHOST';
|
||||
flush privileges;
|
||||
SELECT user, host FROM mysql.user where user = 'CUser2' order by 1,2;
|
||||
user host
|
||||
CUser2 LOCALHOST
|
||||
CUser2 localhost
|
||||
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser2' order by 1,2;
|
||||
user host db select_priv
|
||||
CUser2 localhost test Y
|
||||
REVOKE SELECT ON test.* FROM 'CUser2'@'localhost';
|
||||
ERROR 42000: There is no such grant defined for user 'CUser2' on host 'localhost'
|
||||
flush privileges;
|
||||
SELECT user, host FROM mysql.user where user = 'CUser2' order by 1,2;
|
||||
user host
|
||||
CUser2 LOCALHOST
|
||||
CUser2 localhost
|
||||
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser2' order by 1,2;
|
||||
user host db select_priv
|
||||
DROP USER CUser2@localhost;
|
||||
DROP USER CUser2@LOCALHOST;
|
||||
ERROR HY000: Operation DROP USER failed for 'CUser2'@'localhost'
|
||||
CREATE DATABASE mysqltest_1;
|
||||
CREATE TABLE mysqltest_1.t1 (a INT);
|
||||
CREATE USER 'mysqltest1'@'%';
|
||||
|
@ -1862,4 +1862,14 @@ SELECT SUBSTRING(a,1,10), LENGTH(a) FROM t1 GROUP BY a;
|
||||
SUBSTRING(a,1,10) LENGTH(a)
|
||||
1111111111 1300
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#57688 Assertion `!table || (!table->write_set || bitmap_is_set(table->write_set, field
|
||||
#
|
||||
CREATE TABLE t1(f1 INT NOT NULL);
|
||||
INSERT INTO t1 VALUES (16777214),(0);
|
||||
SELECT COUNT(*) FROM t1 LEFT JOIN t1 t2
|
||||
ON 1 WHERE t2.f1 > 1 GROUP BY t2.f1;
|
||||
COUNT(*)
|
||||
2
|
||||
DROP TABLE t1;
|
||||
# End of 5.1 tests
|
||||
|
@ -324,6 +324,61 @@ key1 key2 key3
|
||||
38 38 38
|
||||
39 39 39
|
||||
drop table t1;
|
||||
#
|
||||
# Bug#56423: Different count with SELECT and CREATE SELECT queries
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
a INT,
|
||||
b INT,
|
||||
c INT,
|
||||
d INT,
|
||||
PRIMARY KEY (a),
|
||||
KEY (c),
|
||||
KEY bd (b,d)
|
||||
);
|
||||
INSERT INTO t1 VALUES
|
||||
(1, 0, 1, 0),
|
||||
(2, 1, 1, 1),
|
||||
(3, 1, 1, 1),
|
||||
(4, 0, 1, 1);
|
||||
EXPLAIN
|
||||
SELECT a
|
||||
FROM t1
|
||||
WHERE c = 1 AND b = 1 AND d = 1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge c,bd c,bd 5,10 NULL 1 Using intersect(c,bd); Using where; Using index
|
||||
CREATE TABLE t2 ( a INT )
|
||||
SELECT a
|
||||
FROM t1
|
||||
WHERE c = 1 AND b = 1 AND d = 1;
|
||||
SELECT * FROM t2;
|
||||
a
|
||||
2
|
||||
3
|
||||
DROP TABLE t1, t2;
|
||||
CREATE TABLE t1( a INT, b INT, KEY(a), KEY(b) );
|
||||
INSERT INTO t1 VALUES (1, 2), (1, 2), (1, 2), (1, 2);
|
||||
SELECT * FROM t1 FORCE INDEX(a, b) WHERE a = 1 AND b = 2;
|
||||
a b
|
||||
1 2
|
||||
1 2
|
||||
1 2
|
||||
1 2
|
||||
DROP TABLE t1;
|
||||
# Code coverage of fix.
|
||||
CREATE TABLE t1 ( a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b INT);
|
||||
INSERT INTO t1 (b) VALUES (1);
|
||||
UPDATE t1 SET b = 2 WHERE a = 1;
|
||||
SELECT * FROM t1;
|
||||
a b
|
||||
1 2
|
||||
CREATE TABLE t2 ( a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(1) );
|
||||
INSERT INTO t2 (b) VALUES ('a');
|
||||
UPDATE t2 SET b = 'b' WHERE a = 1;
|
||||
SELECT * FROM t2;
|
||||
a b
|
||||
1 b
|
||||
DROP TABLE t1, t2;
|
||||
#---------------- 2-sweeps read Index merge test 2 -------------------------------
|
||||
SET SESSION STORAGE_ENGINE = InnoDB;
|
||||
drop table if exists t1;
|
||||
@ -581,6 +636,24 @@ WHERE
|
||||
`RUNID`= '' AND `SUBMITNR`= '' AND `ORDERNR`='' AND `PROGRAMM`='' AND
|
||||
`TESTID`='' AND `UCCHECK`='';
|
||||
drop table t1;
|
||||
#
|
||||
# Bug#50402 Optimizer producing wrong results when using Index Merge on InnoDB
|
||||
#
|
||||
CREATE TABLE t1 (f1 INT, PRIMARY KEY (f1));
|
||||
INSERT INTO t1 VALUES (2);
|
||||
CREATE TABLE t2 (f1 INT, f2 INT, f3 char(1),
|
||||
PRIMARY KEY (f1), KEY (f2), KEY (f3) );
|
||||
INSERT INTO t2 VALUES (1, 1, 'h'), (2, 3, 'h'), (3, 2, ''), (4, 2, '');
|
||||
SELECT t1.f1 FROM t1
|
||||
WHERE (SELECT COUNT(*) FROM t2 WHERE t2.f3 = 'h' AND t2.f2 = t1.f1) = 0 AND t1.f1 = 2;
|
||||
f1
|
||||
2
|
||||
EXPLAIN SELECT t1.f1 FROM t1
|
||||
WHERE (SELECT COUNT(*) FROM t2 WHERE t2.f3 = 'h' AND t2.f2 = t1.f1) = 0 AND t1.f1 = 2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 const PRIMARY PRIMARY 4 const 1 Using index
|
||||
2 DEPENDENT SUBQUERY t2 index_merge f2,f3 f3,f2 2,5 NULL 1 Using intersect(f3,f2); Using where; Using index
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
# BUG#56862/640419: Wrong result with sort_union index merge when one
|
||||
# of the merged index scans is the primary key scan
|
||||
|
@ -1156,6 +1156,61 @@ key1 key2 key3
|
||||
38 38 38
|
||||
39 39 39
|
||||
drop table t1;
|
||||
#
|
||||
# Bug#56423: Different count with SELECT and CREATE SELECT queries
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
a INT,
|
||||
b INT,
|
||||
c INT,
|
||||
d INT,
|
||||
PRIMARY KEY (a),
|
||||
KEY (c),
|
||||
KEY bd (b,d)
|
||||
);
|
||||
INSERT INTO t1 VALUES
|
||||
(1, 0, 1, 0),
|
||||
(2, 1, 1, 1),
|
||||
(3, 1, 1, 1),
|
||||
(4, 0, 1, 1);
|
||||
EXPLAIN
|
||||
SELECT a
|
||||
FROM t1
|
||||
WHERE c = 1 AND b = 1 AND d = 1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref c,bd bd 10 const,const 2 Using where
|
||||
CREATE TABLE t2 ( a INT )
|
||||
SELECT a
|
||||
FROM t1
|
||||
WHERE c = 1 AND b = 1 AND d = 1;
|
||||
SELECT * FROM t2;
|
||||
a
|
||||
2
|
||||
3
|
||||
DROP TABLE t1, t2;
|
||||
CREATE TABLE t1( a INT, b INT, KEY(a), KEY(b) );
|
||||
INSERT INTO t1 VALUES (1, 2), (1, 2), (1, 2), (1, 2);
|
||||
SELECT * FROM t1 FORCE INDEX(a, b) WHERE a = 1 AND b = 2;
|
||||
a b
|
||||
1 2
|
||||
1 2
|
||||
1 2
|
||||
1 2
|
||||
DROP TABLE t1;
|
||||
# Code coverage of fix.
|
||||
CREATE TABLE t1 ( a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b INT);
|
||||
INSERT INTO t1 (b) VALUES (1);
|
||||
UPDATE t1 SET b = 2 WHERE a = 1;
|
||||
SELECT * FROM t1;
|
||||
a b
|
||||
1 2
|
||||
CREATE TABLE t2 ( a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(1) );
|
||||
INSERT INTO t2 (b) VALUES ('a');
|
||||
UPDATE t2 SET b = 'b' WHERE a = 1;
|
||||
SELECT * FROM t2;
|
||||
a b
|
||||
1 b
|
||||
DROP TABLE t1, t2;
|
||||
#---------------- 2-sweeps read Index merge test 2 -------------------------------
|
||||
SET SESSION STORAGE_ENGINE = MyISAM;
|
||||
drop table if exists t1;
|
||||
@ -1413,6 +1468,24 @@ WHERE
|
||||
`RUNID`= '' AND `SUBMITNR`= '' AND `ORDERNR`='' AND `PROGRAMM`='' AND
|
||||
`TESTID`='' AND `UCCHECK`='';
|
||||
drop table t1;
|
||||
#
|
||||
# Bug#50402 Optimizer producing wrong results when using Index Merge on InnoDB
|
||||
#
|
||||
CREATE TABLE t1 (f1 INT, PRIMARY KEY (f1));
|
||||
INSERT INTO t1 VALUES (2);
|
||||
CREATE TABLE t2 (f1 INT, f2 INT, f3 char(1),
|
||||
PRIMARY KEY (f1), KEY (f2), KEY (f3) );
|
||||
INSERT INTO t2 VALUES (1, 1, 'h'), (2, 3, 'h'), (3, 2, ''), (4, 2, '');
|
||||
SELECT t1.f1 FROM t1
|
||||
WHERE (SELECT COUNT(*) FROM t2 WHERE t2.f3 = 'h' AND t2.f2 = t1.f1) = 0 AND t1.f1 = 2;
|
||||
f1
|
||||
2
|
||||
EXPLAIN SELECT t1.f1 FROM t1
|
||||
WHERE (SELECT COUNT(*) FROM t2 WHERE t2.f3 = 'h' AND t2.f2 = t1.f1) = 0 AND t1.f1 = 2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 system PRIMARY NULL NULL NULL 1
|
||||
2 DEPENDENT SUBQUERY t2 ref f2,f3 f2 5 1 Using where
|
||||
DROP TABLE t1,t2;
|
||||
create table t0 (a int);
|
||||
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
create table t1 (a int, b int, c int, filler char(100),
|
||||
|
@ -1449,4 +1449,92 @@ group by t2.pk;
|
||||
pk t
|
||||
2001 3001
|
||||
drop table t1,t2,t3,t4;
|
||||
#
|
||||
# Bug#57024: Poor performance when conjunctive condition over the outer
|
||||
# table is used in the on condition of an outer join
|
||||
#
|
||||
create table t1 (a int);
|
||||
insert into t1 values (NULL), (NULL), (NULL), (NULL);
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 values (4), (2), (1), (3);
|
||||
create table t2 like t1;
|
||||
insert into t2 select if(t1.a is null, 10, t1.a) from t1;
|
||||
create table t3 (a int, b int, index idx(a));
|
||||
insert into t3 values (1, 100), (3, 301), (4, 402), (1, 102), (1, 101);
|
||||
analyze table t1,t2,t3;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze status OK
|
||||
test.t2 analyze status OK
|
||||
test.t3 analyze status OK
|
||||
flush status;
|
||||
select sum(t3.b) from t1 left join t3 on t3.a=t1.a and t1.a is not null;
|
||||
sum(t3.b)
|
||||
1006
|
||||
show status like "handler_read%";
|
||||
Variable_name Value
|
||||
Handler_read_first 0
|
||||
Handler_read_key 4
|
||||
Handler_read_next 5
|
||||
Handler_read_prev 0
|
||||
Handler_read_rnd 0
|
||||
Handler_read_rnd_next 1048581
|
||||
flush status;
|
||||
select sum(t3.b) from t2 left join t3 on t3.a=t2.a and t2.a <> 10;
|
||||
sum(t3.b)
|
||||
1006
|
||||
show status like "handler_read%";
|
||||
Variable_name Value
|
||||
Handler_read_first 0
|
||||
Handler_read_key 1048580
|
||||
Handler_read_next 5
|
||||
Handler_read_prev 0
|
||||
Handler_read_rnd 0
|
||||
Handler_read_rnd_next 1048581
|
||||
drop table t1,t2,t3;
|
||||
# Bug#57688 Assertion `!table || (!table->write_set || bitmap_is_set(table->write_set, field
|
||||
#
|
||||
CREATE TABLE t1 (f1 INT NOT NULL, PRIMARY KEY (f1));
|
||||
CREATE TABLE t2 (f1 INT NOT NULL, f2 INT NOT NULL, PRIMARY KEY (f1, f2));
|
||||
INSERT INTO t1 VALUES (4);
|
||||
INSERT INTO t2 VALUES (3, 3);
|
||||
INSERT INTO t2 VALUES (7, 7);
|
||||
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 ON t2.f1 = t1.f1
|
||||
WHERE t1.f1 = 4
|
||||
GROUP BY t2.f1, t2.f2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 system PRIMARY NULL NULL NULL 1 Using temporary; Using filesort
|
||||
1 SIMPLE t2 ref PRIMARY PRIMARY 4 const 1 Using index
|
||||
SELECT * FROM t1 LEFT JOIN t2 ON t2.f1 = t1.f1
|
||||
WHERE t1.f1 = 4
|
||||
GROUP BY t2.f1, t2.f2;
|
||||
f1 f1 f2
|
||||
4 NULL NULL
|
||||
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 ON t2.f1 = t1.f1
|
||||
WHERE t1.f1 = 4 AND t2.f1 IS NOT NULL AND t2.f2 IS NOT NULL
|
||||
GROUP BY t2.f1, t2.f2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 system PRIMARY NULL NULL NULL 1 Using filesort
|
||||
1 SIMPLE t2 ref PRIMARY PRIMARY 4 const 1 Using where; Using index
|
||||
SELECT * FROM t1 LEFT JOIN t2 ON t2.f1 = t1.f1
|
||||
WHERE t1.f1 = 4 AND t2.f1 IS NOT NULL AND t2.f2 IS NOT NULL
|
||||
GROUP BY t2.f1, t2.f2;
|
||||
f1 f1 f2
|
||||
DROP TABLE t1,t2;
|
||||
End of 5.1 tests
|
||||
|
@ -1453,6 +1453,94 @@ group by t2.pk;
|
||||
pk t
|
||||
2001 3001
|
||||
drop table t1,t2,t3,t4;
|
||||
#
|
||||
# Bug#57024: Poor performance when conjunctive condition over the outer
|
||||
# table is used in the on condition of an outer join
|
||||
#
|
||||
create table t1 (a int);
|
||||
insert into t1 values (NULL), (NULL), (NULL), (NULL);
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
insert into t1 values (4), (2), (1), (3);
|
||||
create table t2 like t1;
|
||||
insert into t2 select if(t1.a is null, 10, t1.a) from t1;
|
||||
create table t3 (a int, b int, index idx(a));
|
||||
insert into t3 values (1, 100), (3, 301), (4, 402), (1, 102), (1, 101);
|
||||
analyze table t1,t2,t3;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze status OK
|
||||
test.t2 analyze status OK
|
||||
test.t3 analyze status OK
|
||||
flush status;
|
||||
select sum(t3.b) from t1 left join t3 on t3.a=t1.a and t1.a is not null;
|
||||
sum(t3.b)
|
||||
1006
|
||||
show status like "handler_read%";
|
||||
Variable_name Value
|
||||
Handler_read_first 0
|
||||
Handler_read_key 1048580
|
||||
Handler_read_next 5
|
||||
Handler_read_prev 0
|
||||
Handler_read_rnd 5
|
||||
Handler_read_rnd_next 1048581
|
||||
flush status;
|
||||
select sum(t3.b) from t2 left join t3 on t3.a=t2.a and t2.a <> 10;
|
||||
sum(t3.b)
|
||||
1006
|
||||
show status like "handler_read%";
|
||||
Variable_name Value
|
||||
Handler_read_first 0
|
||||
Handler_read_key 1048580
|
||||
Handler_read_next 5
|
||||
Handler_read_prev 0
|
||||
Handler_read_rnd 5
|
||||
Handler_read_rnd_next 1048581
|
||||
drop table t1,t2,t3;
|
||||
# Bug#57688 Assertion `!table || (!table->write_set || bitmap_is_set(table->write_set, field
|
||||
#
|
||||
CREATE TABLE t1 (f1 INT NOT NULL, PRIMARY KEY (f1));
|
||||
CREATE TABLE t2 (f1 INT NOT NULL, f2 INT NOT NULL, PRIMARY KEY (f1, f2));
|
||||
INSERT INTO t1 VALUES (4);
|
||||
INSERT INTO t2 VALUES (3, 3);
|
||||
INSERT INTO t2 VALUES (7, 7);
|
||||
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 ON t2.f1 = t1.f1
|
||||
WHERE t1.f1 = 4
|
||||
GROUP BY t2.f1, t2.f2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 system PRIMARY NULL NULL NULL 1 Using temporary; Using filesort
|
||||
1 SIMPLE t2 ref PRIMARY PRIMARY 4 const 1 Using index
|
||||
SELECT * FROM t1 LEFT JOIN t2 ON t2.f1 = t1.f1
|
||||
WHERE t1.f1 = 4
|
||||
GROUP BY t2.f1, t2.f2;
|
||||
f1 f1 f2
|
||||
4 NULL NULL
|
||||
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 ON t2.f1 = t1.f1
|
||||
WHERE t1.f1 = 4 AND t2.f1 IS NOT NULL AND t2.f2 IS NOT NULL
|
||||
GROUP BY t2.f1, t2.f2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 system PRIMARY NULL NULL NULL 1 Using filesort
|
||||
1 SIMPLE t2 ref PRIMARY PRIMARY 4 const 1 Using where; Using index
|
||||
SELECT * FROM t1 LEFT JOIN t2 ON t2.f1 = t1.f1
|
||||
WHERE t1.f1 = 4 AND t2.f1 IS NOT NULL AND t2.f2 IS NOT NULL
|
||||
GROUP BY t2.f1, t2.f2;
|
||||
f1 f1 f2
|
||||
DROP TABLE t1,t2;
|
||||
End of 5.1 tests
|
||||
set join_cache_level=default;
|
||||
show variables like 'join_cache_level';
|
||||
|
7
mysql-test/r/lowercase_table4.result
Executable file
7
mysql-test/r/lowercase_table4.result
Executable file
@ -0,0 +1,7 @@
|
||||
#
|
||||
# Bug#46941 crash with lower_case_table_names=2 and
|
||||
# foreign data dictionary confusion
|
||||
#
|
||||
CREATE DATABASE XY;
|
||||
USE XY;
|
||||
DROP DATABASE XY;
|
@ -2296,4 +2296,45 @@ t2 WHERE b SOUNDS LIKE e AND d = 1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||
DROP TABLE t2, t1;
|
||||
#
|
||||
# Bug#46339 - crash on REPAIR TABLE merge table USE_FRM
|
||||
#
|
||||
DROP TABLE IF EXISTS m1, t1;
|
||||
CREATE TABLE t1 (c1 INT) ENGINE=MYISAM;
|
||||
CREATE TABLE m1 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1) INSERT_METHOD=LAST;
|
||||
LOCK TABLE m1 READ;
|
||||
REPAIR TABLE m1 USE_FRM;
|
||||
Table Op Msg_type Msg_text
|
||||
test.m1 repair note The storage engine for the table doesn't support repair
|
||||
UNLOCK TABLES;
|
||||
REPAIR TABLE m1 USE_FRM;
|
||||
Table Op Msg_type Msg_text
|
||||
test.m1 repair note The storage engine for the table doesn't support repair
|
||||
DROP TABLE m1,t1;
|
||||
CREATE TABLE m1 (f1 BIGINT) ENGINE=MRG_MyISAM UNION(t1);
|
||||
REPAIR TABLE m1 USE_FRM;
|
||||
Table Op Msg_type Msg_text
|
||||
test.m1 repair Error Can't open table
|
||||
test.m1 repair error Corrupt
|
||||
CREATE TABLE t1 (f1 BIGINT) ENGINE = MyISAM;
|
||||
REPAIR TABLE m1 USE_FRM;
|
||||
Table Op Msg_type Msg_text
|
||||
test.m1 repair note The storage engine for the table doesn't support repair
|
||||
REPAIR TABLE m1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.m1 repair note The storage engine for the table doesn't support repair
|
||||
DROP TABLE m1, t1;
|
||||
CREATE TEMPORARY TABLE m1 (f1 BIGINT) ENGINE=MRG_MyISAM UNION(t1);
|
||||
REPAIR TABLE m1 USE_FRM;
|
||||
Table Op Msg_type Msg_text
|
||||
test.m1 repair Error Table 'test.m1' doesn't exist
|
||||
test.m1 repair error Corrupt
|
||||
CREATE TEMPORARY TABLE t1 (f1 BIGINT) ENGINE=MyISAM;
|
||||
REPAIR TABLE m1 USE_FRM;
|
||||
Table Op Msg_type Msg_text
|
||||
m1 repair error Cannot repair temporary table from .frm file
|
||||
REPAIR TABLE m1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.m1 repair note The storage engine for the table doesn't support repair
|
||||
DROP TABLE m1, t1;
|
||||
End of 5.1 tests
|
||||
|
@ -639,4 +639,24 @@ SET SESSION sql_safe_updates = 1;
|
||||
UPDATE IGNORE t1, t1 t1a SET t1.a = 1 WHERE t1a.a = 1;
|
||||
ERROR HY000: You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#54543: update ignore with incorrect subquery leads to assertion
|
||||
# failure: inited==INDEX
|
||||
#
|
||||
SET SESSION sql_safe_updates = 0;
|
||||
CREATE TABLE t1 ( a INT );
|
||||
INSERT INTO t1 VALUES (1), (2);
|
||||
CREATE TABLE t2 ( a INT );
|
||||
INSERT INTO t2 VALUES (1), (2);
|
||||
CREATE TABLE t3 ( a INT );
|
||||
INSERT INTO t3 VALUES (1), (2);
|
||||
# Should not crash
|
||||
UPDATE IGNORE
|
||||
( SELECT ( SELECT COUNT(*) FROM t1 GROUP BY a, @v ) a FROM t2 ) x, t3
|
||||
SET t3.a = 0;
|
||||
Warnings:
|
||||
Error 1242 Subquery returns more than 1 row
|
||||
Error 1242 Subquery returns more than 1 row
|
||||
DROP TABLE t1, t2, t3;
|
||||
SET SESSION sql_safe_updates = DEFAULT;
|
||||
end of tests
|
||||
|
@ -347,7 +347,7 @@ GROUP BY t2.pk
|
||||
);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
|
||||
2 SUBQUERY t2 ALL int_key int_key 5 3 33.33 Using index condition; Using filesort
|
||||
2 SUBQUERY t2 ref int_key int_key 5 1 100.00 Using index condition; Using where; Using filesort
|
||||
Warnings:
|
||||
Note 1003 select min(`test`.`t1`.`pk`) AS `MIN(t1.pk)` from `test`.`t1` where 0
|
||||
DROP TABLE t1, t2;
|
||||
|
@ -178,6 +178,9 @@ mysqltest: At line 1: End of line junk detected: "disconnect default # comment
|
||||
"
|
||||
mysqltest: At line 1: Extra delimiter ";" found
|
||||
mysqltest: At line 1: Extra delimiter ";" found
|
||||
mysqltest: At line 1: Spurious text after `query` expression
|
||||
mysqltest: At line 1: Spurious text after `query` expression
|
||||
mysqltest: At line 2: Spurious text after `query` expression
|
||||
mysqltest: At line 1: Missing argument(s) to 'error'
|
||||
mysqltest: At line 1: Missing argument(s) to 'error'
|
||||
mysqltest: At line 1: The sqlstate definition must start with an uppercase S
|
||||
@ -263,6 +266,9 @@ a long \$where variable content
|
||||
|
||||
banana = banana
|
||||
Not a banana: ba\$cat\$cat
|
||||
with\`some"escaped\'quotes
|
||||
with\`some"escaped\'quotes
|
||||
single'tick`backtick
|
||||
mysqltest: At line 1: Missing arguments to let
|
||||
mysqltest: At line 1: Missing variable name in let
|
||||
mysqltest: At line 1: Missing assignment operator in let
|
||||
@ -447,12 +453,16 @@ mysqltest: At line 1: Missing required argument 'host' to command 'connect'
|
||||
mysqltest: At line 1: query 'connect con2,localhost,root,,illegal_db' failed: 1049: Unknown database 'illegal_db'
|
||||
mysqltest: At line 1: Illegal argument for port: 'illegal_port'
|
||||
mysqltest: At line 1: Illegal option to connect: SMTP
|
||||
OK
|
||||
mysqltest: The test didn't produce any output
|
||||
200 connects succeeded
|
||||
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": At line 3: connection 'test_con1' not found in connection pool
|
||||
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": At line 2: Connection test_con1 already exists
|
||||
show tables;
|
||||
ERROR 3D000: No database selected
|
||||
connect con1,localhost,root,,;
|
||||
connection default;
|
||||
connection con1;
|
||||
disconnect con1;
|
||||
connection default;
|
||||
Output from mysqltest-x.inc
|
||||
Output from mysqltest-x.inc
|
||||
Output from mysqltest-x.inc
|
||||
|
@ -1622,4 +1622,25 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range a a 5 NULL 2 Using index condition; Using MRR; Using temporary; Using filesort
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 10 Using join buffer
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# Bug #50394: Regression in EXPLAIN with index scan, LIMIT, GROUP BY and
|
||||
# ORDER BY computed col
|
||||
#
|
||||
CREATE TABLE t1 ( a INT NOT NULL, b INT NOT NULL, KEY( a, b ) );
|
||||
INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5);
|
||||
INSERT INTO t1 SELECT a + 5, b + 5 FROM t1;
|
||||
CREATE TABLE t2( a INT PRIMARY KEY, b INT );
|
||||
INSERT INTO t2 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5);
|
||||
INSERT INTO t2 SELECT a + 5, b + 5 FROM t2;
|
||||
EXPLAIN
|
||||
SELECT count(*) AS c, t1.a
|
||||
FROM t1 JOIN t2 ON t1.b = t2.a
|
||||
WHERE t2.b = 1
|
||||
GROUP BY t1.a
|
||||
ORDER by c
|
||||
LIMIT 2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index NULL a 8 NULL 10 Using index; Using temporary; Using filesort
|
||||
1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.b 1 Using where
|
||||
DROP TABLE t1, t2;
|
||||
End of 5.1 tests
|
||||
|
@ -1,4 +1,44 @@
|
||||
drop table if exists t1, t2;
|
||||
#
|
||||
# Bug#57113: ha_partition::extra(ha_extra_function):
|
||||
# Assertion `m_extra_cache' failed
|
||||
CREATE TABLE t1
|
||||
(id INT NOT NULL PRIMARY KEY,
|
||||
name VARCHAR(16) NOT NULL,
|
||||
year YEAR,
|
||||
INDEX name (name(8))
|
||||
)
|
||||
PARTITION BY HASH(id) PARTITIONS 2;
|
||||
INSERT INTO t1 VALUES ( 1, 'FooBar', '1924' );
|
||||
CREATE TABLE t2 (id INT);
|
||||
INSERT INTO t2 VALUES (1),(2);
|
||||
UPDATE t1, t2 SET t1.year = '1955' WHERE t1.name = 'FooBar';
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# Bug#55458: Partitioned MyISAM table gets crashed by multi-table update
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
`id` int NOT NULL,
|
||||
`user_num` int DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM CHARSET=latin1;
|
||||
INSERT INTO t1 VALUES (1,8601);
|
||||
INSERT INTO t1 VALUES (2,8601);
|
||||
INSERT INTO t1 VALUES (3,8601);
|
||||
INSERT INTO t1 VALUES (4,8601);
|
||||
CREATE TABLE t2 (
|
||||
`id` int(11) NOT NULL,
|
||||
`user_num` int DEFAULT NULL,
|
||||
`name` varchar(64) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM CHARSET=latin1
|
||||
PARTITION BY HASH (id)
|
||||
PARTITIONS 2;
|
||||
INSERT INTO t2 VALUES (1,8601,'John');
|
||||
INSERT INTO t2 VALUES (2,8601,'JS');
|
||||
INSERT INTO t2 VALUES (3,8601,'John S');
|
||||
UPDATE t1, t2 SET t2.name = 'John Smith' WHERE t1.user_num = t2.user_num;
|
||||
DROP TABLE t1, t2;
|
||||
CREATE TABLE t1 (a INT, b INT)
|
||||
PARTITION BY LIST (a)
|
||||
SUBPARTITION BY HASH (b)
|
||||
@ -1382,7 +1422,7 @@ NULL
|
||||
2
|
||||
explain partitions select * from t1 where a is null or a < 0 or a > 1;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 pn,p2 ALL NULL NULL NULL NULL 4 Using where
|
||||
1 SIMPLE t1 pn,p2 ALL NULL NULL NULL NULL 2 Using where
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, name VARCHAR(20))
|
||||
ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user