1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00
This commit is contained in:
Vladislav Vaintroub
2011-12-26 16:57:28 +01:00
604 changed files with 11358 additions and 8054 deletions

View File

@ -134,7 +134,7 @@ as cmake-gui. It is less user-friendly compared to cmake-gui but works also
on exotic Unixes like HPUX, AIX or Solaris. on exotic Unixes like HPUX, AIX or Solaris.
Besides storage engines, probably the most important parameter from a Besides storage engines, probably the most important parameter from a
developer's point of view is WITH_DEBUG (this allows to build server with developer's point of view is CMAKE_BUILD_TYPE (this allows to build server with
dbug tracing library and with debug compile flags). dbug tracing library and with debug compile flags).
After changing the configuration, recompile using After changing the configuration, recompile using

View File

@ -22,19 +22,6 @@ endif()
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake) SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
# First, decide about build type (debug or release)
# If custom compiler flags are set or cmake is invoked with -DCMAKE_BUILD_TYPE,
# respect user wishes and do not (re)define CMAKE_BUILD_TYPE. If WITH_DEBUG{_FULL}
# is given, set CMAKE_BUILD_TYPE = Debug. Otherwise, use Relwithdebinfo.
IF(DEFINED CMAKE_BUILD_TYPE)
SET(HAVE_CMAKE_BUILD_TYPE TRUE)
ENDIF()
SET(CUSTOM_C_FLAGS $ENV{CFLAGS})
OPTION(WITH_DEBUG "Use dbug/safemutex" OFF)
# Distinguish between community and non-community builds, with the # Distinguish between community and non-community builds, with the
# default being a community build. This does not impact the feature # default being a community build. This does not impact the feature
# set that will be compiled in; it's merely provided as a hint to # set that will be compiled in; it's merely provided as a hint to
@ -42,44 +29,34 @@ OPTION(WITH_DEBUG "Use dbug/safemutex" OFF)
OPTION(COMMUNITY_BUILD "Set to true if this is a community build" ON) OPTION(COMMUNITY_BUILD "Set to true if this is a community build" ON)
# Use a default manufacturer if no manufacturer was identified. # Use a default manufacturer if no manufacturer was identified.
SET(MANUFACTURER_DOCSTRING
"Set the entity that appears as the manufacturer of packages that support a manufacturer field.")
IF(NOT DEFINED MANUFACTURER) IF(NOT DEFINED MANUFACTURER)
SET(MANUFACTURER "Built from Source" CACHE STRING ${MANUFACTURER_DOCSTRING}) SET(MANUFACTURER "Built from Source" CACHE STRING
"Set the entity that appears as the manufacturer of packages that support a manufacturer field.")
MARK_AS_ADVANCED(MANUFACTURER) MARK_AS_ADVANCED(MANUFACTURER)
ENDIF() ENDIF()
# We choose to provide WITH_DEBUG as alias to standard CMAKE_BUILD_TYPE=Debug SET(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING
# which turns out to be not trivial, as this involves synchronization "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel")
# between CMAKE_BUILD_TYPE and WITH_DEBUG. Besides, we have to deal with cases
# where WITH_DEBUG is reset from ON to OFF and here we need to reset
# CMAKE_BUILD_TYPE to either none or default RelWithDebInfo
SET(BUILDTYPE_DOCSTRING
"Choose the type of build, options are: None(CMAKE_CXX_FLAGS or
CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel") IF(UNIX AND NOT APPLE)
# Note, that generally one should not change settings depending
IF(WITH_DEBUG) # on CMAKE_BUILD_TYPE, because VS and Xcode configure once (with
SET(CMAKE_BUILD_TYPE "Debug" CACHE STRING ${BUILDTYPE_DOCSTRING} FORCE) # the empty CMAKE_BUILD_TYPE) and the build many times for
SET(MYSQL_MAINTAINER_MODE ON CACHE BOOL # different build types without re-running cmake!
"MySQL maintainer-specific development environment") # But we only care about WITH_PIC on Unix, where the check for
IF(UNIX AND NOT APPLE) # CMAKE_BUILD_TYPE hapen to work.
# Compiling with PIC speeds up embedded build, on PIC sensitive systems IF (CMAKE_BUILD_TYPE MATCHES "Debug")
# Predefine it to ON, in case user chooses to build embedded. SET(WITH_PIC_DEFAULT ON)
SET(WITH_PIC ON CACHE BOOL "Compile with PIC") ELSE()
SET(WITH_PIC_DEFAULT OFF)
ENDIF() ENDIF()
SET(OLD_WITH_DEBUG 1 CACHE INTERNAL "" FORCE) # Compiling with PIC speeds up embedded build, on PIC sensitive systems
ELSEIF(NOT HAVE_CMAKE_BUILD_TYPE OR OLD_WITH_DEBUG) # Predefine it to OFF in release builds, because of the performance penalty
IF(CUSTOM_C_FLAGS) SET(WITH_PIC ${WITH_PIC_DEFAULT} CACHE BOOL "Compile with PIC.")
SET(CMAKE_BUILD_TYPE "" CACHE STRING ${BUILDTYPE_DOCSTRING} FORCE)
ELSE(CMAKE_BUILD_TYPE MATCHES "Debug" OR NOT HAVE_CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING
${BUILDTYPE_DOCSTRING} FORCE)
ENDIF()
SET(OLD_WITH_DEBUG 0 CACHE INTERNAL "" FORCE)
ENDIF() ENDIF()
PROJECT(MySQL) PROJECT(MySQL)
IF(BUILD_CONFIG) IF(BUILD_CONFIG)
INCLUDE( INCLUDE(
@ -117,23 +94,21 @@ ENDIF()
# #
INCLUDE(maintainer) INCLUDE(maintainer)
OPTION(MYSQL_MAINTAINER_MODE SET(MYSQL_MAINTAINER_MODE "AUTO" CACHE STRING "MySQL maintainer-specific development environment. Options are: ON OFF AUTO.")
"MySQL maintainer-specific development environment" OFF) MARK_AS_ADVANCED(MYSQL_MAINTAINER_MODE)
# Whether the maintainer mode compiler options should be enabled. # Whether the maintainer mode compiler options should be enabled.
IF(MYSQL_MAINTAINER_MODE) IF(CMAKE_C_COMPILER_ID MATCHES "GNU")
IF(CMAKE_C_COMPILER_ID MATCHES "GNU") SET_MYSQL_MAINTAINER_GNU_C_OPTIONS()
SET_MYSQL_MAINTAINER_GNU_C_OPTIONS() ENDIF()
ENDIF() IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU") SET_MYSQL_MAINTAINER_GNU_CXX_OPTIONS()
SET_MYSQL_MAINTAINER_GNU_CXX_OPTIONS() ENDIF()
ENDIF() IF(CMAKE_C_COMPILER_ID MATCHES "Intel")
IF(CMAKE_C_COMPILER_ID MATCHES "Intel") SET_MYSQL_MAINTAINER_INTEL_C_OPTIONS()
SET_MYSQL_MAINTAINER_INTEL_C_OPTIONS() ENDIF()
ENDIF() IF(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
IF(CMAKE_CXX_COMPILER_ID MATCHES "Intel") SET_MYSQL_MAINTAINER_INTEL_CXX_OPTIONS()
SET_MYSQL_MAINTAINER_INTEL_CXX_OPTIONS()
ENDIF()
ENDIF() ENDIF()
# Add macros # Add macros
@ -166,6 +141,7 @@ ENDIF()
OPTION (WITH_UNIT_TESTS "Compile MySQL with unit tests" ON) OPTION (WITH_UNIT_TESTS "Compile MySQL with unit tests" ON)
MARK_AS_ADVANCED(CYBOZU BACKUP_TEST WITHOUT_SERVER DISABLE_SHARED) MARK_AS_ADVANCED(CYBOZU BACKUP_TEST WITHOUT_SERVER DISABLE_SHARED)
OPTION(NOT_FOR_DISTRIBUTION "Allow linking with GPLv2-incompatible system libraries. Only set it you never plan to distribute the resulting binaries" OFF)
OPTION(ENABLE_DEBUG_SYNC "Enable debug sync (debug builds only)" ON) OPTION(ENABLE_DEBUG_SYNC "Enable debug sync (debug builds only)" ON)
IF(ENABLE_DEBUG_SYNC) IF(ENABLE_DEBUG_SYNC)
@ -190,8 +166,11 @@ MARK_AS_ADVANCED(WITH_FAST_MUTEXES)
# Set DBUG_OFF and other optional release-only flags for non-debug project types # Set DBUG_OFF and other optional release-only flags for non-debug project types
FOREACH(BUILD_TYPE RELEASE RELWITHDEBINFO MINSIZEREL) FOREACH(BUILD_TYPE RELEASE RELWITHDEBINFO MINSIZEREL)
FOREACH(LANG C CXX) FOREACH(LANG C CXX)
SET(CMAKE_${LANG}_FLAGS_${BUILD_TYPE} IF (NOT CMAKE_${LANG}_FLAGS_${BUILD_TYPE} MATCHES "DDBUG_" AND
"${CMAKE_${LANG}_FLAGS_${BUILD_TYPE}} -DDBUG_OFF") NOT CMAKE_${LANG}_FLAGS MATCHES "DDBUG_")
SET(CMAKE_${LANG}_FLAGS_${BUILD_TYPE}
"${CMAKE_${LANG}_FLAGS_${BUILD_TYPE}} -DDBUG_OFF")
ENDIF()
IF(WITH_FAST_MUTEXES) IF(WITH_FAST_MUTEXES)
SET(CMAKE_${LANG}_FLAGS_${BUILD_TYPE} SET(CMAKE_${LANG}_FLAGS_${BUILD_TYPE}
"${CMAKE_${LANG}_FLAGS_${BUILD_TYPE}} -DMY_PTHREAD_FASTMUTEX=1") "${CMAKE_${LANG}_FLAGS_${BUILD_TYPE}} -DMY_PTHREAD_FASTMUTEX=1")
@ -199,27 +178,28 @@ FOREACH(BUILD_TYPE RELEASE RELWITHDEBINFO MINSIZEREL)
ENDFOREACH() ENDFOREACH()
ENDFOREACH() ENDFOREACH()
IF(NOT CMAKE_BUILD_TYPE
AND NOT CMAKE_GENERATOR MATCHES "Visual Studio"
AND NOT CMAKE_GENERATOR MATCHES "Xcode")
# This is the case of no CMAKE_BUILD_TYPE choosen, typical for VS and Xcode
# or if custom C flags are set. In VS and Xcode for non-Debug configurations
# DBUG_OFF is already correctly set. Use DBUG_OFF for Makefile based projects
# without build type too, unless user specifically requests DBUG.
IF(NOT CMAKE_C_FLAGS MATCHES "-DDBUG_ON")
ADD_DEFINITIONS(-DDBUG_OFF)
ENDIF()
ENDIF()
# Add safemutex for debug configurations, except on Windows # Add safemutex for debug configurations, except on Windows
# (safemutex has never worked on Windows) # (safemutex has never worked on Windows)
IF(WITH_DEBUG AND NOT WIN32) IF(NOT WIN32)
FOREACH(LANG C CXX) FOREACH(LANG C CXX)
SET(CMAKE_${LANG}_FLAGS_DEBUG SET(CMAKE_${LANG}_FLAGS_DEBUG "${CMAKE_${LANG}_FLAGS_DEBUG} -DSAFE_MUTEX")
"${CMAKE_${LANG}_FLAGS_DEBUG} -DSAFE_MUTEX")
ENDFOREACH() ENDFOREACH()
ENDIF() ENDIF()
# safemalloc can be enabled and disabled independently
SET(WITH_SAFEMALLOC "AUTO" CACHE STRING "Use safemalloc memory debugger. Will result in slower execution. Options are: ON OFF AUTO.")
# force -DUSE_MYSYS_NEW unless already done by HAVE_CXX_NEW
IF(HAVE_CXX_NEW)
SET(DUSE_MYSYS_NEW "-DUSE_MYSYS_NEW")
ENDIF()
IF(WITH_SAFEMALLOC MATCHES "ON")
ADD_DEFINITIONS( -DSAFEMALLOC ${DUSE_MYSYS_NEW})
ELSEIF(WITH_SAFEMALLOC MATCHES "AUTO" AND NOT WIN32)
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC ${DUSE_MYSYS_NEW}")
ENDIF()
# Set commonly used variables # Set commonly used variables
IF(WIN32) IF(WIN32)
@ -262,12 +242,12 @@ MYSQL_CHECK_READLINE()
# not run with the warning options as to not perturb fragile checks # not run with the warning options as to not perturb fragile checks
# (i.e. do not make warnings into errors). # (i.e. do not make warnings into errors).
# #
IF(MYSQL_MAINTAINER_MODE) IF(MYSQL_MAINTAINER_MODE MATCHES "ON")
# Set compiler flags required under maintainer mode.
MESSAGE(STATUS "C warning options: ${MY_MAINTAINER_C_WARNINGS}")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MY_MAINTAINER_C_WARNINGS}") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MY_MAINTAINER_C_WARNINGS}")
MESSAGE(STATUS "C++ warning options: ${MY_MAINTAINER_CXX_WARNINGS}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MY_MAINTAINER_CXX_WARNINGS}") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MY_MAINTAINER_CXX_WARNINGS}")
ELSEIF(MYSQL_MAINTAINER_MODE MATCHES "AUTO")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${MY_MAINTAINER_C_WARNINGS}")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${MY_MAINTAINER_CXX_WARNINGS}")
ENDIF() ENDIF()
IF(WITH_UNIT_TESTS) IF(WITH_UNIT_TESTS)
@ -392,3 +372,9 @@ IF(NOT INSTALL_LAYOUT MATCHES "RPM")
PATTERN "sp-imp-spec.txt" EXCLUDE PATTERN "sp-imp-spec.txt" EXCLUDE
) )
ENDIF() ENDIF()
IF(NON_DISTRIBUTABLE_WARNING)
MESSAGE(WARNING "
You have linked MariaDB with GPLv3 libraries! You may not distribute the resulting binary. If you do, you will put yourself into a legal problem with Free Software Foundation.")
ENDIF()

View File

@ -1461,7 +1461,7 @@ shell> ./configure --with-debug
(http://forge.mysql.com/wiki/MySQL_Internals_Porting). (http://forge.mysql.com/wiki/MySQL_Internals_Porting).
As of MySQL 5.1.12, using --with-debug to configure MySQL with As of MySQL 5.1.12, using --with-debug to configure MySQL with
debugging support enables you to use the debugging support enables you to use the
--debug="d,parser_debug" option when you start the server. --debug-dbug="d,parser_debug" option when you start the server.
This causes the Bison parser that is used to process SQL This causes the Bison parser that is used to process SQL
statements to dump a parser trace to the server's standard statements to dump a parser trace to the server's standard
error output. Typically, this output is written to the error error output. Typically, this output is written to the error
@ -4725,7 +4725,7 @@ Note
the screen that may help solve the problem. the screen that may help solve the problem.
The last option is to start mysqld with the --standalone and The last option is to start mysqld with the --standalone and
--debug options. In this case, mysqld writes a log file --debug-dbug options. In this case, mysqld writes a log file
C:\mysqld.trace that should contain the reason why mysqld doesn't C:\mysqld.trace that should contain the reason why mysqld doesn't
start. See MySQL Internals: Porting start. See MySQL Internals: Porting
(http://forge.mysql.com/wiki/MySQL_Internals_Porting). (http://forge.mysql.com/wiki/MySQL_Internals_Porting).
@ -7716,7 +7716,7 @@ Can't start server: Bind on unix socket...
MIT-pthreads. MIT-pthreads.
If you cannot get mysqld to start, you can try to make a trace If you cannot get mysqld to start, you can try to make a trace
file to find the problem by using the --debug option. See MySQL file to find the problem by using the --debug-dbug option. See MySQL
Internals: Porting Internals: Porting
(http://forge.mysql.com/wiki/MySQL_Internals_Porting). (http://forge.mysql.com/wiki/MySQL_Internals_Porting).

View File

@ -21,16 +21,16 @@ INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/regex ${CMAKE_SOURCE_DIR}/regex
${CMAKE_SOURCE_DIR}/sql ${CMAKE_SOURCE_DIR}/sql
${CMAKE_SOURCE_DIR}/strings ${CMAKE_SOURCE_DIR}/strings
${READLINE_INCLUDE_DIR} ${MY_READLINE_INCLUDE_DIR}
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}
) )
ADD_DEFINITIONS(${READLINE_DEFINES})
ADD_DEFINITIONS(${SSL_DEFINES}) ADD_DEFINITIONS(${SSL_DEFINES})
MYSQL_ADD_EXECUTABLE(mysql completion_hash.cc mysql.cc readline.cc sql_string.cc) MYSQL_ADD_EXECUTABLE(mysql completion_hash.cc mysql.cc readline.cc
${CMAKE_SOURCE_DIR}/sql/sql_string.cc)
TARGET_LINK_LIBRARIES(mysql mysqlclient) TARGET_LINK_LIBRARIES(mysql mysqlclient)
IF(UNIX) IF(UNIX)
TARGET_LINK_LIBRARIES(mysql ${READLINE_LIBRARY}) TARGET_LINK_LIBRARIES(mysql ${MY_READLINE_LIBRARY})
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -rdynamic") SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -rdynamic")
ENDIF(UNIX) ENDIF(UNIX)

View File

@ -1786,11 +1786,13 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
break; break;
case 'V': case 'V':
usage(1); usage(1);
exit(0); status.exit_status= 0;
mysql_end(-1);
case 'I': case 'I':
case '?': case '?':
usage(0); usage(0);
exit(0); status.exit_status= 0;
mysql_end(-1);
} }
return 0; return 0;
} }

View File

@ -301,20 +301,17 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
int main(int argc,char *argv[]) int main(int argc,char *argv[])
{ {
int error= 0, ho_error; int error= 0;
MYSQL mysql; MYSQL mysql;
char **commands, **save_argv; char **commands, **save_argv;
MY_INIT(argv[0]); MY_INIT(argv[0]);
mysql_init(&mysql); mysql_init(&mysql);
if (load_defaults("my",load_default_groups,&argc,&argv)) if ((error= load_defaults("my",load_default_groups,&argc,&argv)))
exit(1); goto err1;
save_argv = argv; /* Save for free_defaults */ save_argv = argv; /* Save for free_defaults */
if ((ho_error=handle_options(&argc, &argv, my_long_options, get_one_option))) if ((error=handle_options(&argc, &argv, my_long_options, get_one_option)))
{ goto err2;
free_defaults(save_argv);
exit(ho_error);
}
if (debug_info_flag) if (debug_info_flag)
my_end_arg= MY_CHECK_ERROR | MY_GIVE_INFO; my_end_arg= MY_CHECK_ERROR | MY_GIVE_INFO;
if (debug_check_flag) if (debug_check_flag)
@ -463,6 +460,7 @@ int main(int argc,char *argv[])
} /* got connection */ } /* got connection */
mysql_close(&mysql); mysql_close(&mysql);
err2:
mysql_library_end(); mysql_library_end();
my_free(opt_password); my_free(opt_password);
my_free(user); my_free(user);
@ -470,8 +468,9 @@ int main(int argc,char *argv[])
my_free(shared_memory_base_name); my_free(shared_memory_base_name);
#endif #endif
free_defaults(save_argv); free_defaults(save_argv);
err1:
my_end(my_end_arg); my_end(my_end_arg);
exit(error ? 1 : 0); exit(error);
return 0; return 0;
} }

View File

@ -45,7 +45,7 @@
#include "mysqld.h" #include "mysqld.h"
Rpl_filter *binlog_filter; Rpl_filter *binlog_filter= 0;
#define BIN_LOG_HEADER_SIZE 4 #define BIN_LOG_HEADER_SIZE 4
#define PROBE_HEADER_LEN (EVENT_LEN_OFFSET+4) #define PROBE_HEADER_LEN (EVENT_LEN_OFFSET+4)
@ -77,7 +77,7 @@ static void error(const char *format, ...) ATTRIBUTE_FORMAT(printf, 1, 2);
static void warning(const char *format, ...) ATTRIBUTE_FORMAT(printf, 1, 2); static void warning(const char *format, ...) ATTRIBUTE_FORMAT(printf, 1, 2);
static bool one_database=0, to_last_remote_log= 0, disable_log_bin= 0; static bool one_database=0, to_last_remote_log= 0, disable_log_bin= 0;
static bool opt_hexdump= 0; static bool opt_hexdump= 0, opt_version= 0;
const char *base64_output_mode_names[]= const char *base64_output_mode_names[]=
{"NEVER", "AUTO", "ALWAYS", "UNSPEC", "DECODE-ROWS", NullS}; {"NEVER", "AUTO", "ALWAYS", "UNSPEC", "DECODE-ROWS", NullS};
TYPELIB base64_output_mode_typelib= TYPELIB base64_output_mode_typelib=
@ -1430,6 +1430,7 @@ static void cleanup()
my_free(user); my_free(user);
my_free(const_cast<char*>(dirname_for_local_load)); my_free(const_cast<char*>(dirname_for_local_load));
delete binlog_filter;
delete glob_description_event; delete glob_description_event;
if (mysql) if (mysql)
mysql_close(mysql); mysql_close(mysql);
@ -1588,10 +1589,12 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
break; break;
case 'V': case 'V':
print_version(); print_version();
exit(0); opt_version= 1;
break;
case '?': case '?':
usage(); usage();
exit(0); opt_version= 1;
break;
} }
if (tty_password) if (tty_password)
pass= get_tty_password(NullS); pass= get_tty_password(NullS);
@ -2303,24 +2306,26 @@ int main(int argc, char** argv)
my_init_time(); // for time functions my_init_time(); // for time functions
init_alloc_root(&s_mem_root, 16384, 0); init_alloc_root(&s_mem_root, 16384, 0);
if (load_defaults("my", load_groups, &argc, &argv))
exit(1);
if (!(binlog_filter= new Rpl_filter)) if (!(binlog_filter= new Rpl_filter))
{ {
error("Failed to create Rpl_filter"); error("Failed to create Rpl_filter");
exit(1); exit(1);
} }
if (load_defaults("my", load_groups, &argc, &argv))
exit(1);
defaults_argv= argv; defaults_argv= argv;
parse_args(&argc, (char***)&argv); parse_args(&argc, (char***)&argv);
if (!argc) if (!argc || opt_version)
{ {
usage(); if (!argc)
usage();
cleanup();
free_defaults(defaults_argv); free_defaults(defaults_argv);
my_end(my_end_arg); my_end(my_end_arg);
exit(1); exit(!opt_version);
} }
if (opt_base64_output_mode == BASE64_OUTPUT_UNSPEC) if (opt_base64_output_mode == BASE64_OUTPUT_UNSPEC)
@ -2407,7 +2412,6 @@ int main(int argc, char** argv)
my_fclose(result_file, MYF(0)); my_fclose(result_file, MYF(0));
cleanup(); cleanup();
free_annotate_event(); free_annotate_event();
delete binlog_filter;
free_root(&s_mem_root, MYF(0)); free_root(&s_mem_root, MYF(0));
free_defaults(defaults_argv); free_defaults(defaults_argv);
my_free_open_file_info(); my_free_open_file_info();

View File

@ -961,6 +961,7 @@ static void safe_exit(int error)
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
if (sock) if (sock)
mysql_close(sock); mysql_close(sock);
sf_leaking_memory= 1; /* don't check for memory leaks */
exit(error); exit(error);
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
@ -972,7 +973,6 @@ int main(int argc, char **argv)
char **defaults_argv; char **defaults_argv;
MY_INIT(argv[0]); MY_INIT(argv[0]);
mysql_library_init(-1, 0, 0);
/* /*
** Check out the args ** Check out the args
*/ */

View File

@ -62,6 +62,8 @@ static char *opt_plugin_dir= 0, *opt_default_auth= 0;
static longlong opt_ignore_lines= -1; static longlong opt_ignore_lines= -1;
#include <sslopt-vars.h> #include <sslopt-vars.h>
static char **argv_to_free;
#ifdef HAVE_SMEM #ifdef HAVE_SMEM
static char *shared_memory_base_name=0; static char *shared_memory_base_name=0;
#endif #endif
@ -475,10 +477,18 @@ static void db_disconnect(char *host, MYSQL *mysql)
static void safe_exit(int error, MYSQL *mysql) static void safe_exit(int error, MYSQL *mysql)
{ {
if (ignore_errors) if (error && ignore_errors)
return; return;
if (mysql) if (mysql)
mysql_close(mysql); mysql_close(mysql);
#ifdef HAVE_SMEM
my_free(shared_memory_base_name);
#endif
free_defaults(argv_to_free);
mysql_library_end();
my_free(opt_password);
my_end(my_end_arg);
exit(error); exit(error);
} }
@ -597,7 +607,6 @@ error:
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
int error=0; int error=0;
char **argv_to_free;
MY_INIT(argv[0]); MY_INIT(argv[0]);
if (load_defaults("my",load_default_groups,&argc,&argv)) if (load_defaults("my",load_default_groups,&argc,&argv))
@ -687,11 +696,6 @@ int main(int argc, char **argv)
exitcode= error; exitcode= error;
db_disconnect(current_host, mysql); db_disconnect(current_host, mysql);
} }
my_free(opt_password); safe_exit(0, 0);
#ifdef HAVE_SMEM
my_free(shared_memory_base_name);
#endif
free_defaults(argv_to_free);
my_end(my_end_arg);
return(exitcode); return(exitcode);
} }

View File

@ -1394,6 +1394,7 @@ static void cleanup_and_exit(int exit_code)
} }
} }
sf_leaking_memory= 0; /* all memory should be freed by now */
exit(exit_code); exit(exit_code);
} }
@ -8462,6 +8463,9 @@ int main(int argc, char **argv)
MY_INIT(argv[0]); MY_INIT(argv[0]);
DBUG_ENTER("main"); DBUG_ENTER("main");
/* mysqltest has no way to free all its memory correctly */
sf_leaking_memory= 1;
save_file[0]= 0; save_file[0]= 0;
TMPDIR[0]= 0; TMPDIR[0]= 0;

View File

@ -37,7 +37,7 @@ sjis swe7 tis620 ucs2 ujis utf8 utf8mb4 utf16 utf32)
SET (EXTRA_CHARSETS "all") SET (EXTRA_CHARSETS "all")
SET(WITH_EXTRA_CHARSETS ${EXTRA_CHARSETS} CACHE SET(WITH_EXTRA_CHARSETS ${EXTRA_CHARSETS} CACHE
STRING "Options are: none, complex, all") STRING "Options are: none complex all")
IF(WITH_EXTRA_CHARSETS MATCHES "complex") IF(WITH_EXTRA_CHARSETS MATCHES "complex")

View File

@ -149,6 +149,11 @@ foreach my $option (@ARGV)
$cmakeargs = $cmakeargs." -DWITH_SSL=yes"; $cmakeargs = $cmakeargs." -DWITH_SSL=yes";
next; next;
} }
if($option =~ /with-debug/)
{
$cmakeargs = $cmakeargs." -DCMAKE_BUILD_TYPE=Debug";
next;
}
if($option =~ /with-ssl/) if($option =~ /with-ssl/)
{ {
$cmakeargs = $cmakeargs." -DWITH_SSL=bundled"; $cmakeargs = $cmakeargs." -DWITH_SSL=bundled";

View File

@ -68,7 +68,7 @@ IF(NOT INSTALL_LAYOUT)
ENDIF() ENDIF()
SET(INSTALL_LAYOUT "${DEFAULT_INSTALL_LAYOUT}" SET(INSTALL_LAYOUT "${DEFAULT_INSTALL_LAYOUT}"
CACHE STRING "Installation directory layout. Options are: STANDALONE (as in zip or tar.gz installer), RPM, DEB, SVR4") CACHE STRING "Installation directory layout. Options are: STANDALONE (as in zip or tar.gz installer) RPM DEB SVR4")
IF(UNIX) IF(UNIX)
IF(INSTALL_LAYOUT MATCHES "RPM") IF(INSTALL_LAYOUT MATCHES "RPM")

View File

@ -27,7 +27,7 @@ MACRO(SET_MYSQL_MAINTAINER_GNU_C_OPTIONS)
ENDIF() ENDIF()
SET(MY_MAINTAINER_C_WARNINGS SET(MY_MAINTAINER_C_WARNINGS
"${MY_MAINTAINER_WARNINGS} ${MY_MAINTAINER_DECLARATION_AFTER_STATEMENT}" "${MY_MAINTAINER_WARNINGS} ${MY_MAINTAINER_DECLARATION_AFTER_STATEMENT}"
CACHE STRING "C warning options used in maintainer builds.") CACHE INTERNAL "C warning options used in maintainer builds.")
# Do not make warnings in checks into errors. # Do not make warnings in checks into errors.
SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Wno-error") SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Wno-error")
ENDMACRO() ENDMACRO()
@ -36,19 +36,19 @@ ENDMACRO()
MACRO(SET_MYSQL_MAINTAINER_GNU_CXX_OPTIONS) MACRO(SET_MYSQL_MAINTAINER_GNU_CXX_OPTIONS)
SET(MY_MAINTAINER_CXX_WARNINGS SET(MY_MAINTAINER_CXX_WARNINGS
"${MY_MAINTAINER_WARNINGS} -Wno-unused-parameter -Woverloaded-virtual" "${MY_MAINTAINER_WARNINGS} -Wno-unused-parameter -Woverloaded-virtual"
CACHE STRING "C++ warning options used in maintainer builds.") CACHE INTERNAL "C++ warning options used in maintainer builds.")
ENDMACRO() ENDMACRO()
# Setup ICC (Intel C Compiler) warning options. # Setup ICC (Intel C Compiler) warning options.
MACRO(SET_MYSQL_MAINTAINER_INTEL_C_OPTIONS) MACRO(SET_MYSQL_MAINTAINER_INTEL_C_OPTIONS)
SET(MY_MAINTAINER_WARNINGS "-Wcheck") SET(MY_MAINTAINER_WARNINGS "-Wcheck")
SET(MY_MAINTAINER_C_WARNINGS "${MY_MAINTAINER_WARNINGS}" SET(MY_MAINTAINER_C_WARNINGS "${MY_MAINTAINER_WARNINGS}"
CACHE STRING "C warning options used in maintainer builds.") CACHE INTERNAL "C warning options used in maintainer builds.")
ENDMACRO() ENDMACRO()
# Setup ICPC (Intel C++ Compiler) warning options. # Setup ICPC (Intel C++ Compiler) warning options.
MACRO(SET_MYSQL_MAINTAINER_INTEL_CXX_OPTIONS) MACRO(SET_MYSQL_MAINTAINER_INTEL_CXX_OPTIONS)
SET(MY_MAINTAINER_CXX_WARNINGS "${MY_MAINTAINER_WARNINGS}" SET(MY_MAINTAINER_CXX_WARNINGS "${MY_MAINTAINER_WARNINGS}"
CACHE STRING "C++ warning options used in maintainer builds.") CACHE INTERNAL "C++ warning options used in maintainer builds.")
ENDMACRO() ENDMACRO()

View File

@ -20,6 +20,7 @@
# different results. # different results.
IF(MSVC) IF(MSVC)
SET(BFD_H_EXISTS 0 CACHE INTERNAL "")
SET(HAVE_ACCESS 1 CACHE INTERNAL "") SET(HAVE_ACCESS 1 CACHE INTERNAL "")
SET(HAVE_AIO_H CACHE INTERNAL "") SET(HAVE_AIO_H CACHE INTERNAL "")
SET(HAVE_AIO_READ CACHE INTERNAL "") SET(HAVE_AIO_READ CACHE INTERNAL "")

View File

@ -14,6 +14,8 @@
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
INCLUDE(CheckCXXSourceCompiles)
MACRO (MYSQL_CHECK_MULTIBYTE) MACRO (MYSQL_CHECK_MULTIBYTE)
CHECK_INCLUDE_FILE(wctype.h HAVE_WCTYPE_H) CHECK_INCLUDE_FILE(wctype.h HAVE_WCTYPE_H)
CHECK_INCLUDE_FILE(wchar.h HAVE_WCHAR_H) CHECK_INCLUDE_FILE(wchar.h HAVE_WCHAR_H)
@ -112,56 +114,22 @@ ENDMACRO()
MACRO (MYSQL_USE_BUNDLED_READLINE) MACRO (MYSQL_USE_BUNDLED_READLINE)
SET(USE_NEW_READLINE_INTERFACE 1) SET(USE_NEW_READLINE_INTERFACE 1)
SET(HAVE_HIST_ENTRY) SET(HAVE_HIST_ENTRY)
SET(USE_LIBEDIT_INTERFACE)
SET(READLINE_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/cmd-line-utils) SET(READLINE_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/cmd-line-utils)
SET(READLINE_LIBRARY readline) SET(READLINE_LIBRARY readline)
FIND_CURSES() FIND_CURSES()
ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/cmd-line-utils/readline) ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/cmd-line-utils/readline)
ENDMACRO() ENDMACRO()
MACRO (MYSQL_USE_BUNDLED_LIBEDIT) MACRO (MYSQL_FIND_SYSTEM_READLINE)
SET(USE_LIBEDIT_INTERFACE 1)
SET(HAVE_HIST_ENTRY 1)
SET(READLINE_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/cmd-line-utils/libedit)
SET(READLINE_LIBRARY edit)
FIND_CURSES()
ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/cmd-line-utils/libedit)
ENDMACRO()
MACRO (MYSQL_FIND_SYSTEM_READLINE name)
FIND_PATH(${name}_INCLUDE_DIR readline/readline.h ) FIND_PATH(READLINE_INCLUDE_DIR readline/readline.h )
FIND_LIBRARY(${name}_LIBRARY NAMES ${name}) FIND_LIBRARY(READLINE_LIBRARY NAMES readline)
MARK_AS_ADVANCED(${name}_INCLUDE_DIR ${name}_LIBRARY) MARK_AS_ADVANCED(READLINE_INCLUDE_DIR READLINE_LIBRARY)
INCLUDE(CheckCXXSourceCompiles)
SET(CMAKE_REQUIRES_LIBRARIES ${${name}_LIBRARY})
IF(${name}_LIBRARY AND ${name}_INCLUDE_DIR)
SET(SYSTEM_READLINE_FOUND 1)
SET(CMAKE_REQUIRED_LIBRARIES ${${name}_LIBRARY})
CHECK_CXX_SOURCE_COMPILES("
#include <stdio.h>
#include <readline/readline.h>
int main(int argc, char **argv)
{
HIST_ENTRY entry;
return 0;
}"
${name}_HAVE_HIST_ENTRY)
CHECK_CXX_SOURCE_COMPILES("
#include <stdio.h>
#include <readline/readline.h>
int main(int argc, char **argv)
{
char res= *(*rl_completion_entry_function)(0,0);
completion_matches(0,0);
}"
${name}_USE_LIBEDIT_INTERFACE)
SET(CMAKE_REQUIRES_LIBRARIES ${READLINE_LIBRARY})
IF(READLINE_LIBRARY AND READLINE_INCLUDE_DIR)
SET(CMAKE_REQUIRED_LIBRARIES ${READLINE_LIBRARY})
CHECK_CXX_SOURCE_COMPILES(" CHECK_CXX_SOURCE_COMPILES("
#include <stdio.h> #include <stdio.h>
#include <readline/readline.h> #include <readline/readline.h>
@ -170,16 +138,64 @@ MACRO (MYSQL_FIND_SYSTEM_READLINE name)
rl_completion_func_t *func1= (rl_completion_func_t*)0; rl_completion_func_t *func1= (rl_completion_func_t*)0;
rl_compentry_func_t *func2= (rl_compentry_func_t*)0; rl_compentry_func_t *func2= (rl_compentry_func_t*)0;
}" }"
${name}_USE_NEW_READLINE_INTERFACE) NEW_READLINE_INTERFACE)
CHECK_CXX_SOURCE_COMPILES("
#include <stdio.h>
#include <readline/readline.h>
int main(int argc, char **argv)
{
HIST_ENTRY entry;
return 0;
}"
HAVE_HIST_ENTRY)
IF(${name}_USE_LIBEDIT_INTERFACE OR ${name}_USE_NEW_READLINE_INTERFACE) CHECK_C_SOURCE_COMPILES("
SET(READLINE_LIBRARY ${${name}_LIBRARY}) #include <stdio.h>
SET(READLINE_INCLUDE_DIR ${${name}_INCLUDE_DIR}) #include <readline/readline.h>
SET(HAVE_HIST_ENTRY ${${name}_HAVE_HIST_ENTRY}) #if RL_VERSION_MAJOR > 5
SET(USE_LIBEDIT_INTERFACE ${${name}_USE_LIBEDIT_INTERFACE}) #error
SET(USE_NEW_READLINE_INTERFACE ${${name}_USE_NEW_READLINE_INTERFACE}) #endif
SET(READLINE_FOUND 1) int main(int argc, char **argv)
ENDIF() {
return 0;
}"
READLINE_V5)
IF(NEW_READLINE_INTERFACE)
IF (READLINE_V5)
SET(USE_NEW_READLINE_INTERFACE 1)
ELSE()
IF(NOT_FOR_DISTRIBUTION)
SET(NON_DISTRIBUTABLE_WARNING 1)
SET(USE_NEW_READLINE_INTERFACE 1)
ELSE()
SET(USE_NEW_READLINE_INTERFACE 0)
ENDIF(NOT_FOR_DISTRIBUTION)
ENDIF(READLINE_V5)
ENDIF(NEW_READLINE_INTERFACE)
ENDIF()
ENDMACRO()
MACRO (MYSQL_FIND_SYSTEM_LIBEDIT)
FIND_PATH(READLINE_INCLUDE_DIR readline/readline.h )
FIND_LIBRARY(READLINE_LIBRARY NAMES readline)
MARK_AS_ADVANCED(READLINE_INCLUDE_DIR READLINE_LIBRARY)
SET(CMAKE_REQUIRES_LIBRARIES ${READLINE_LIBRARY})
IF(READLINE_LIBRARY AND READLINE_INCLUDE_DIR)
CHECK_CXX_SOURCE_COMPILES("
#include <stdio.h>
#include <readline/readline.h>
int main(int argc, char **argv)
{
char res= *(*rl_completion_entry_function)(0,0);
completion_matches(0,0);
}"
LIBEDIT_INTERFACE)
SET(USE_LIBEDIT_INTERFACE ${LIBEDIT_INTERFACE})
ENDIF() ENDIF()
ENDMACRO() ENDMACRO()
@ -187,44 +203,21 @@ ENDMACRO()
MACRO (MYSQL_CHECK_READLINE) MACRO (MYSQL_CHECK_READLINE)
IF (NOT WIN32) IF (NOT WIN32)
MYSQL_CHECK_MULTIBYTE() MYSQL_CHECK_MULTIBYTE()
IF(NOT CYGWIN) SET(WITH_READLINE OFF CACHE BOOL "Use bundled readline")
SET(WITH_LIBEDIT ON CACHE BOOL "Use bundled libedit")
SET(WITH_READLINE OFF CACHE BOOL "Use bundled readline")
ELSE()
# Bundled libedit does not compile on cygwin, only readline
SET(WITH_READLINE OFF CACHE BOOL "Use bundled readline")
ENDIF()
# Handle mutual exclusion of WITH_READLINE/WITH_LIBEDIT variables
# We save current setting to recognize when user switched between
# WITH_READLINE and WITH_LIBEDIT
IF(WITH_READLINE)
IF(NOT SAVE_READLINE_SETTING OR SAVE_READLINE_SETTING MATCHES
"WITH_LIBEDIT")
SET(WITH_LIBEDIT OFF CACHE BOOL "Use bundled libedit" FORCE)
ENDIF()
ELSEIF(WITH_LIBEDIT)
IF(NOT SAVE_READLINE_SETTING OR SAVE_READLINE_SETTING MATCHES
"WITH_READLINE")
SET(WITH_READLINE OFF CACHE BOOL "Use bundled readline" FORCE)
ENDIF()
ENDIF()
IF(WITH_READLINE) IF(WITH_READLINE)
MYSQL_USE_BUNDLED_READLINE() MYSQL_USE_BUNDLED_READLINE()
SET(SAVE_READLINE_SETTING WITH_READLINE CACHE INTERNAL "" FORCE)
ELSEIF(WITH_LIBEDIT)
MYSQL_USE_BUNDLED_LIBEDIT()
SET(SAVE_READLINE_SETTING WITH_LIBEDIT CACHE INTERNAL "" FORCE)
ELSE() ELSE()
MYSQL_FIND_SYSTEM_READLINE(readline) MYSQL_FIND_SYSTEM_READLINE()
IF(NOT READLINE_FOUND) IF(NOT USE_NEW_READLINE_INTERFACE)
MYSQL_FIND_SYSTEM_READLINE(edit) MYSQL_FIND_SYSTEM_LIBEDIT()
IF(NOT READLINE_FOUND) IF(NOT USE_LIBEDIT_INTERFACE)
MESSAGE(FATAL_ERROR "Cannot find system readline or libedit libraries.Use WITH_READLINE or WITH_LIBEDIT") MYSQL_USE_BUNDLED_READLINE()
ENDIF() ENDIF()
ENDIF() ENDIF()
ENDIF() ENDIF()
SET(MY_READLINE_INCLUDE_DIR ${READLINE_INCLUDE_DIR})
SET(MY_READLINE_LIBRARY ${READLINE_LIBRARY})
ENDIF(NOT WIN32) ENDIF(NOT WIN32)
ENDMACRO() ENDMACRO()

View File

@ -14,7 +14,7 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
MACRO (CHANGE_SSL_SETTINGS string) MACRO (CHANGE_SSL_SETTINGS string)
SET(WITH_SSL ${string} CACHE STRING "Options are : no, bundled, yes (prefer os library if present otherwise use bundled), system (use os library)" FORCE) SET(WITH_SSL ${string} CACHE STRING "Options are: no bundled yes(prefer os library if present otherwise use bundled) system(use os library)" FORCE)
ENDMACRO() ENDMACRO()
MACRO (MYSQL_USE_BUNDLED_SSL) MACRO (MYSQL_USE_BUNDLED_SSL)

View File

@ -28,6 +28,7 @@
#cmakedefine HAVE_CRYPT_H 1 #cmakedefine HAVE_CRYPT_H 1
#cmakedefine HAVE_CURSES_H 1 #cmakedefine HAVE_CURSES_H 1
#cmakedefine HAVE_CXXABI_H 1 #cmakedefine HAVE_CXXABI_H 1
#cmakedefine HAVE_BFD_H 1
#cmakedefine HAVE_NCURSES_H 1 #cmakedefine HAVE_NCURSES_H 1
#cmakedefine HAVE_NDIR_H 1 #cmakedefine HAVE_NDIR_H 1
#cmakedefine HAVE_DIRENT_H 1 #cmakedefine HAVE_DIRENT_H 1

View File

@ -178,6 +178,7 @@ ENDIF()
# Tests for header files # Tests for header files
# #
INCLUDE (CheckIncludeFiles) INCLUDE (CheckIncludeFiles)
INCLUDE (CheckIncludeFileCXX)
CHECK_INCLUDE_FILES ("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS) CHECK_INCLUDE_FILES ("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS)
CHECK_INCLUDE_FILES (sys/types.h HAVE_SYS_TYPES_H) CHECK_INCLUDE_FILES (sys/types.h HAVE_SYS_TYPES_H)
@ -185,7 +186,8 @@ CHECK_INCLUDE_FILES (alloca.h HAVE_ALLOCA_H)
CHECK_INCLUDE_FILES (aio.h HAVE_AIO_H) CHECK_INCLUDE_FILES (aio.h HAVE_AIO_H)
CHECK_INCLUDE_FILES (arpa/inet.h HAVE_ARPA_INET_H) CHECK_INCLUDE_FILES (arpa/inet.h HAVE_ARPA_INET_H)
CHECK_INCLUDE_FILES (crypt.h HAVE_CRYPT_H) CHECK_INCLUDE_FILES (crypt.h HAVE_CRYPT_H)
CHECK_INCLUDE_FILES (cxxabi.h HAVE_CXXABI_H) CHECK_INCLUDE_FILE_CXX (cxxabi.h HAVE_CXXABI_H)
CHECK_INCLUDE_FILES (bfd.h BFD_H_EXISTS)
CHECK_INCLUDE_FILES (dirent.h HAVE_DIRENT_H) CHECK_INCLUDE_FILES (dirent.h HAVE_DIRENT_H)
CHECK_INCLUDE_FILES (dlfcn.h HAVE_DLFCN_H) CHECK_INCLUDE_FILES (dlfcn.h HAVE_DLFCN_H)
CHECK_INCLUDE_FILES (execinfo.h HAVE_EXECINFO_H) CHECK_INCLUDE_FILES (execinfo.h HAVE_EXECINFO_H)
@ -259,6 +261,13 @@ CHECK_INCLUDE_FILES (wchar.h HAVE_WCHAR_H)
CHECK_INCLUDE_FILES (wctype.h HAVE_WCTYPE_H) CHECK_INCLUDE_FILES (wctype.h HAVE_WCTYPE_H)
CHECK_INCLUDE_FILES (sys/sockio.h HAVE_SYS_SOCKIO_H) CHECK_INCLUDE_FILES (sys/sockio.h HAVE_SYS_SOCKIO_H)
IF(BFD_H_EXISTS)
IF(NOT_FOR_DISTRIBUTION)
SET(NON_DISTRIBUTABLE_WARNING 1)
SET(HAVE_BFD_H 1)
ENDIF()
ENDIF()
IF(HAVE_SYS_STREAM_H) IF(HAVE_SYS_STREAM_H)
# Needs sys/stream.h on Solaris # Needs sys/stream.h on Solaris
CHECK_INCLUDE_FILES ("sys/stream.h;sys/ptem.h" HAVE_SYS_PTEM_H) CHECK_INCLUDE_FILES ("sys/stream.h;sys/ptem.h" HAVE_SYS_PTEM_H)

View File

@ -17,17 +17,6 @@ INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/dbug ${CMAKE_SOURCE_DIR}/dbug
${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/include
) )
IF(WIN32)
SET(DEFAULT_SAFEMALLOC OFF)
ELSE()
SET(DEFAULT_SAFEMALLOC ON)
ENDIF()
OPTION(WITH_SAFEMALLOC ${DEFAULT_SAFEMALLOC} "Use safemalloc for debug builds. Will result in slower execution.")
IF(WITH_SAFEMALLOC)
ADD_DEFINITIONS( -DSAFEMALLOC)
ENDIF()
SET(DBUG_SOURCES dbug.c) SET(DBUG_SOURCES dbug.c)
ADD_CONVENIENCE_LIBRARY(dbug ${DBUG_SOURCES}) ADD_CONVENIENCE_LIBRARY(dbug ${DBUG_SOURCES})
TARGET_LINK_LIBRARIES(dbug mysys) TARGET_LINK_LIBRARIES(dbug mysys)

View File

@ -98,9 +98,6 @@
#include <process.h> #include <process.h>
#endif #endif
#include <my_valgrind.h> /* TRASH */
#include <my_stacktrace.h> /* my_safe_print_str */
/* /*
* Manifest constants which may be "tuned" if desired. * Manifest constants which may be "tuned" if desired.
*/ */
@ -131,6 +128,7 @@
#define SANITY_CHECK_ON (1 << 12) /* Check memory on every DBUG_ENTER/RETURN */ #define SANITY_CHECK_ON (1 << 12) /* Check memory on every DBUG_ENTER/RETURN */
#define TRACE_ON ((uint)1 << 31) /* Trace enabled. MUST be the highest bit!*/ #define TRACE_ON ((uint)1 << 31) /* Trace enabled. MUST be the highest bit!*/
#define sf_sanity() (0)
#define TRACING (cs->stack->flags & TRACE_ON) #define TRACING (cs->stack->flags & TRACE_ON)
#define DEBUGGING (cs->stack->flags & DEBUG_ON) #define DEBUGGING (cs->stack->flags & DEBUG_ON)
@ -207,8 +205,6 @@ static BOOLEAN init_done= FALSE; /* Set to TRUE when initialization done */
static struct settings init_settings; static struct settings init_settings;
static const char *db_process= 0;/* Pointer to process name; argv[0] */ static const char *db_process= 0;/* Pointer to process name; argv[0] */
my_bool _dbug_on_= TRUE; /* FALSE if no debugging at all */ my_bool _dbug_on_= TRUE; /* FALSE if no debugging at all */
static const char *unknown_func= "?func";
static const char *unknown_file= "?file";
typedef struct _db_code_state_ { typedef struct _db_code_state_ {
const char *process; /* Pointer to process name; usually argv[0] */ const char *process; /* Pointer to process name; usually argv[0] */
@ -289,8 +285,6 @@ static void DbugExit(const char *why);
static const char *DbugStrTok(const char *s); static const char *DbugStrTok(const char *s);
static void DbugVfprintf(FILE *stream, const char* format, va_list args); static void DbugVfprintf(FILE *stream, const char* format, va_list args);
static void DbugErr(CODE_STATE *, uint, const char* format, ...);
/* /*
* Miscellaneous printf format strings. * Miscellaneous printf format strings.
*/ */
@ -313,9 +307,6 @@ static void DbugErr(CODE_STATE *, uint, const char* format, ...);
#define WRITABLE(pathname) (access(pathname, W_OK) == 0) #define WRITABLE(pathname) (access(pathname, W_OK) == 0)
#endif #endif
static int sf_sanity();
static void sf_terminate();
/* /*
** Macros to allow dbugging with threads ** Macros to allow dbugging with threads
*/ */
@ -323,9 +314,6 @@ static void sf_terminate();
#include <my_pthread.h> #include <my_pthread.h>
static pthread_mutex_t THR_LOCK_dbug; static pthread_mutex_t THR_LOCK_dbug;
/* this mutex protects all sf_* variables, and nothing else*/
static pthread_mutex_t sf_mutex;
static CODE_STATE *code_state(void) static CODE_STATE *code_state(void)
{ {
CODE_STATE *cs, **cs_ptr; CODE_STATE *cs, **cs_ptr;
@ -341,7 +329,6 @@ static CODE_STATE *code_state(void)
{ {
init_done=TRUE; init_done=TRUE;
pthread_mutex_init(&THR_LOCK_dbug, NULL); pthread_mutex_init(&THR_LOCK_dbug, NULL);
pthread_mutex_init(&sf_mutex, NULL);
bzero(&init_settings, sizeof(init_settings)); bzero(&init_settings, sizeof(init_settings));
init_settings.out_file=stderr; init_settings.out_file=stderr;
init_settings.flags=OPEN_APPEND; init_settings.flags=OPEN_APPEND;
@ -354,8 +341,8 @@ static CODE_STATE *code_state(void)
cs=(CODE_STATE*) DbugMalloc(sizeof(*cs)); cs=(CODE_STATE*) DbugMalloc(sizeof(*cs));
bzero((uchar*) cs,sizeof(*cs)); bzero((uchar*) cs,sizeof(*cs));
cs->process= db_process ? db_process : "dbug"; cs->process= db_process ? db_process : "dbug";
cs->func= unknown_func; cs->func= "?func";
cs->file= unknown_file; cs->file= "?file";
cs->stack=&init_settings; cs->stack=&init_settings;
*cs_ptr= cs; *cs_ptr= cs;
} }
@ -1637,7 +1624,6 @@ void _db_end_()
init_settings.keywords= 0; init_settings.keywords= 0;
init_settings.processes= 0; init_settings.processes= 0;
FreeState(cs, &tmp, 0); FreeState(cs, &tmp, 0);
sf_terminate();
} }
@ -2161,346 +2147,4 @@ const char* _db_get_func_(void)
return cs->func; return cs->func;
} }
/*
prints the error message, followed by a stack trace
of the specified depth
*/
static void DbugErr(CODE_STATE *cs, uint depth, const char* format, ...)
{
va_list args;
va_start(args,format);
vfprintf(stderr, format, args);
va_end(args);
if (cs || ((cs= code_state())))
{
uint i= depth;
struct _db_stack_frame_ *frame= cs->framep;
while (i-- && frame)
{
fprintf(stderr, ", at %s", frame->func);
frame= frame->prev;
}
}
fprintf(stderr, "\n");
}
/********************************************************************
memory debugger
based on safemalloc, memory sub-system, written by Bjorn Benson
********************************************************************/
#ifndef SF_REMEMBER_FRAMES
#define SF_REMEMBER_FRAMES 16
#endif
/*
Structure that stores information of an allocated memory block
The data is at &struct_adr+sizeof(struct irem)
Note that sizeof(struct st_irem) % sizeof(double) == 0
*/
struct st_irem
{
struct st_irem *next; /* Linked list of structures */
struct st_irem *prev; /* Other link */
size_t datasize; /* Size requested */
const char *frame[SF_REMEMBER_FRAMES]; /* call stack */
uint32 marker; /* Underrun marker value */
};
/*
DBUG_MALLOC/DBUG_REALLOC/DBUG_FREE can be called even
before dbug is initialized. We cannot properly take into account
these calls, but we can at least wrap allocated memory
in st_irem's and check for overrun/underruns.
These special irem's - that are not linked into a global list -
are distinguished by a special value in the 'next' pointer.
*/
#define NOT_LINKED ((struct st_irem *)1)
size_t sf_malloc_mem_limit= (intptr)~0ULL;
static size_t sf_malloc_cur_memory= 0L; /* Current memory usage */
static size_t sf_malloc_max_memory= 0L; /* Maximum memory usage */
static int sf_malloc_count= 0; /* Number of allocated chunks */
static void *sf_min_adress= (void*) (intptr)~0ULL,
*sf_max_adress= 0;
static struct st_irem *sf_malloc_root = 0;
#define MAGICSTART 0x14235296 /* A magic value for underrun key */
#define MAGICEND0 0x68 /* Magic values for overrun keys */
#define MAGICEND1 0x34 /* " */
#define MAGICEND2 0x7A /* " */
#define MAGICEND3 0x15 /* " */
static int bad_ptr(const char *where, void *ptr);
static void free_memory(void *ptr);
/*
* FUNCTION
*
* _db_malloc_ allocates memory
*
* SYNOPSIS
*
* void *_db_malloc_(size_t size)
* size_t size; Bytes to allocate
*/
void *_db_malloc_(size_t size)
{
#ifndef SAFEMALLOC
return malloc(size);
#else
CODE_STATE *cs= code_state();
struct st_irem *irem;
uchar *data;
struct _db_stack_frame_ *frame;
int i= 0;
if (size + sf_malloc_cur_memory > sf_malloc_mem_limit)
irem= 0;
else
irem= (struct st_irem *) malloc (sizeof(struct st_irem) + size + 4);
if (!irem)
return 0;
compile_time_assert(sizeof(struct st_irem) % sizeof(double) == 0);
/* Fill up the structure */
data= (uchar*) (irem + 1);
irem->datasize= size;
irem->prev= 0;
irem->marker= MAGICSTART;
data[size + 0]= MAGICEND0;
data[size + 1]= MAGICEND1;
data[size + 2]= MAGICEND2;
data[size + 3]= MAGICEND3;
if (cs && cs->framep)
{
for (frame= cs->framep;
i < SF_REMEMBER_FRAMES && frame->func != unknown_func;
i++, frame= frame->prev)
irem->frame[i]= frame->func;
}
if (i < SF_REMEMBER_FRAMES)
irem->frame[i]= unknown_func;
if (i==0)
irem->frame[0]= (char*)1;
if (init_done)
{
pthread_mutex_lock(&sf_mutex);
/* Add this structure to the linked list */
if ((irem->next= sf_malloc_root))
sf_malloc_root->prev= irem;
sf_malloc_root= irem;
/* Keep the statistics */
sf_malloc_count++;
sf_malloc_cur_memory+= size;
set_if_bigger(sf_malloc_max_memory, sf_malloc_cur_memory);
set_if_smaller(sf_min_adress, (void*)data);
set_if_bigger(sf_max_adress, (void*)data);
pthread_mutex_unlock(&sf_mutex);
}
else
{
set_if_bigger(sf_malloc_max_memory, sf_malloc_cur_memory);
set_if_smaller(sf_min_adress, (void*)data);
set_if_bigger(sf_max_adress, (void*)data);
irem->next= NOT_LINKED;
}
TRASH_ALLOC(data, size);
return data;
#endif
}
void *_db_realloc_(void *ptr, size_t size)
{
#ifndef SAFEMALLOC
return realloc(ptr, size);
#else
char *data;
if (!ptr)
return _db_malloc_(size);
if (bad_ptr("Reallocating", ptr))
return 0;
if ((data= _db_malloc_(size)))
{
struct st_irem *irem= (struct st_irem *)ptr - 1;
set_if_smaller(size, irem->datasize);
memcpy(data, ptr, size);
free_memory(ptr);
}
return data;
#endif
}
void _db_free_(void *ptr)
{
#ifndef SAFEMALLOC
free(ptr);
#else
if (!ptr || bad_ptr("Freeing", ptr))
return;
free_memory(ptr);
#endif
}
static void free_memory(void *ptr)
{
struct st_irem *irem= (struct st_irem *)ptr - 1;
if (irem->next != NOT_LINKED)
{
pthread_mutex_lock(&sf_mutex);
/* Remove this structure from the linked list */
if (irem->prev)
irem->prev->next= irem->next;
else
sf_malloc_root= irem->next;
if (irem->next)
irem->next->prev= irem->prev;
/* Handle the statistics */
sf_malloc_cur_memory-= irem->datasize;
sf_malloc_count--;
pthread_mutex_unlock(&sf_mutex);
}
/* only trash the data and magic values, but keep the stack trace */
TRASH_FREE((uchar*)(irem + 1) - 4, irem->datasize + 8);
free(irem);
return;
}
#define SF_ADD_NL 1
#define SF_USE_SAFE_PRINT 2
static void print_allocated_at(struct st_irem *irem, int flags)
{
int i;
const char *allocated= flags & SF_ADD_NL ? "Allocated" : ", allocated";
for (i=0;
i < SF_REMEMBER_FRAMES && irem->frame[i] != unknown_func;
i++)
{
fprintf(stderr, "%s at ", i ? "," : allocated);
if (flags & SF_USE_SAFE_PRINT)
my_safe_print_str(irem->frame[i], 80);
else
fputs(irem->frame[i], stderr);
}
if (i && (flags & SF_ADD_NL))
fprintf(stderr, "\n");
}
static int bad_ptr(const char *where, void *ptr)
{
struct st_irem *irem= (struct st_irem *)ptr - 1;
const uchar *magicend;
if (((intptr) ptr) % sizeof(double))
{
DbugErr(0, SF_REMEMBER_FRAMES, "Error: %s wrong aligned pointer", where);
return 1;
}
if (ptr < sf_min_adress || ptr > sf_max_adress)
{
DbugErr(0, SF_REMEMBER_FRAMES, "Error: %s pointer out of range", where);
return 1;
}
if (irem->marker != MAGICSTART)
{
DbugErr(0, SF_REMEMBER_FRAMES,
"Error: %s unallocated data or underrun buffer", where);
/*
we cannot use print_allocated_at here:
if the memory was not allocated, there's nothing to print,
if it was allocated and underrun, call stack may be corrupted
*/
return 1;
}
magicend= (uchar*)ptr + irem->datasize;
if (magicend[0] != MAGICEND0 ||
magicend[1] != MAGICEND1 ||
magicend[2] != MAGICEND2 ||
magicend[3] != MAGICEND3)
{
DbugErr(0, SF_REMEMBER_FRAMES, "Error: %s overrun buffer", where);
print_allocated_at(irem, SF_ADD_NL);
return 1;
}
return 0;
}
/* check all allocated memory list for consistency */
static int sf_sanity()
{
struct st_irem *irem;
int flag= 0;
int count= 0;
pthread_mutex_lock(&sf_mutex);
count= sf_malloc_count;
for (irem= sf_malloc_root; irem && count > 0; count--, irem= irem->next)
flag+= bad_ptr("Safemalloc", irem + 1);
pthread_mutex_unlock(&sf_mutex);
if (count || irem)
{
DbugErr(0, SF_REMEMBER_FRAMES, "Error: Safemalloc link list destroyed");
return 1;
}
return 0;
}
/*
* FUNCTION
*
* sf_terminate Report on all the memory pieces that have not been free'd
*
* SYNOPSIS
*
* void sf_terminate()
*/
static void sf_terminate()
{
struct st_irem *irem;
sf_sanity();
/* Report on all the memory that was allocated but not free'd */
if ((irem= sf_malloc_root))
{
while (irem)
{
fprintf(stderr, "Warning: %6lu bytes at %p are not freed", (ulong) irem->datasize, irem + 1);
print_allocated_at(irem, SF_USE_SAFE_PRINT);
fprintf(stderr, "\n");
irem= irem->next;
}
fprintf(stderr, "Memory lost: %lu bytes in %d chunks\n",
(ulong) sf_malloc_cur_memory, sf_malloc_count);
}
return;
}
#endif /* DBUG_OFF */ #endif /* DBUG_OFF */

View File

@ -4,6 +4,7 @@
*/ */
#include <my_global.h> /* This includes dbug.h */ #include <my_global.h> /* This includes dbug.h */
#include <my_sys.h>
#include <my_pthread.h> #include <my_pthread.h>
int main (argc, argv) int main (argc, argv)
@ -12,7 +13,7 @@ char *argv[];
{ {
register int result, ix; register int result, ix;
extern int factorial(int); extern int factorial(int);
my_thread_global_init(); MY_INIT(argv[0]);
{ {
DBUG_ENTER ("main"); DBUG_ENTER ("main");
@ -29,6 +30,8 @@ char *argv[];
result = factorial (atoi(argv[ix])); result = factorial (atoi(argv[ix]));
printf ("%d\n", result); printf ("%d\n", result);
} }
DBUG_RETURN (0); DBUG_LEAVE;
} }
my_end(0);
exit(0);
} }

View File

@ -201,7 +201,7 @@ func2: info: s=ko
| | <func3 | | <func3
<main <main
% ./tests t:d:-d,ret3:f:-f,func2 +d,dump,explain:P % ./tests t:d:-d,ret3:f:-f,func2 +d,dump,explain:P
dbug: >main dbug-tests: >main
dbug-tests: | >func1 dbug-tests: | >func1
dbug-tests: | | | >func3 dbug-tests: | | | >func3
dbug-tests: | | | <func3 dbug-tests: | | | <func3
@ -216,7 +216,7 @@ dbug-tests: | | >func3
dbug-tests: | | <func3 dbug-tests: | | <func3
dbug-tests: <main dbug-tests: <main
% ./tests t:d:-d,ret3:f:-f,func2 +d,dump,explain:P:F % ./tests t:d:-d,ret3:f:-f,func2 +d,dump,explain:P:F
dbug: tests.c: >main dbug-tests: tests.c: >main
dbug-tests: tests.c: | >func1 dbug-tests: tests.c: | >func1
dbug-tests: tests.c: | | | >func3 dbug-tests: tests.c: | | | >func3
dbug-tests: tests.c: | | | <func3 dbug-tests: tests.c: | | | <func3

View File

@ -5,6 +5,7 @@
char *push1=0; char *push1=0;
#include <my_global.h> /* This includes dbug.h */ #include <my_global.h> /* This includes dbug.h */
#include <my_sys.h>
#include <my_pthread.h> #include <my_pthread.h>
#include <string.h> #include <string.h>
@ -44,7 +45,7 @@ int main (int argc, char *argv[])
if (argc == 1) if (argc == 1)
return 0; return 0;
my_thread_global_init(); MY_INIT("dbug-tests");
dup2(1, 2); dup2(1, 2);
for (i = 1; i < argc; i++) for (i = 1; i < argc; i++)
@ -56,7 +57,6 @@ int main (int argc, char *argv[])
} }
{ {
DBUG_ENTER ("main"); DBUG_ENTER ("main");
DBUG_PROCESS ("dbug-tests");
func1(); func1();
DBUG_EXECUTE_IF("dump", DBUG_EXECUTE_IF("dump",
{ {
@ -78,6 +78,9 @@ int main (int argc, char *argv[])
DBUG_PRINT("explain", ("dbug explained: %s", s)); DBUG_PRINT("explain", ("dbug explained: %s", s));
} }
func2(); func2();
DBUG_RETURN (0); DBUG_LEAVE;
} }
DBUG_SET(""); /* to not have my_end() in the traces */
my_end(0);
return 0;
} }

View File

@ -881,20 +881,6 @@ Modifying
.I initial .I initial
value does not affect threads that are already running. Obviously, value does not affect threads that are already running. Obviously,
these macros are only useful in the multi-threaded environment. these macros are only useful in the multi-threaded environment.
.SP 1
.LI DBUG_MALLOC\
.LI DBUG_REALLOC\
.LI DBUG_FREE\
When these macros are used instead of system malloc(), realloc(), and free(),
.I dbug
built-in memory debugger performs checks for memory overwrites, underwrites,
memory leaks, and accesses to uninitialized or freed memory. Memory leaks are
found as memory not deallocated at shutdown. Memory overwrites and underwrites
are detected when this memory is about to be freed (by
.B DBUG_FREE
macro), unless
.B S
flag is present in the debug control string (see below).
.LE .LE
.SK .SK
@ -1003,11 +989,9 @@ Most useful with
macros used to temporarily alter the macros used to temporarily alter the
debugger state. debugger state.
.LI S .LI S
Check the memory allocated with When compiled with
.B DBUG_MALLOC .I safemalloc
and this flag invokes "sanity" memory checks (for overwrites/underwrites)
.B DBUG_REALLOC
for overwrites/underwrites
on each on each
.B DBUG_ENTER .B DBUG_ENTER
and and

View File

@ -419,6 +419,8 @@ int main(int argc,char *argv[])
if (unknown_error) if (unknown_error)
free(unknown_error); free(unknown_error);
my_handler_error_unregister();
my_end(0);
exit(error); exit(error);
return error; return error;
} }

View File

@ -60,9 +60,6 @@ extern void _db_unlock_file_(void);
extern FILE *_db_fp_(void); extern FILE *_db_fp_(void);
extern void _db_flush_(); extern void _db_flush_();
extern const char* _db_get_func_(void); extern const char* _db_get_func_(void);
extern void *_db_malloc_(size_t size);
extern void *_db_realloc_(void *ptr, size_t size);
extern void _db_free_(void *ptr);
#define DBUG_ENTER(a) struct _db_stack_frame_ _db_stack_frame_; \ #define DBUG_ENTER(a) struct _db_stack_frame_ _db_stack_frame_; \
_db_enter_ (a,__FILE__,__LINE__,&_db_stack_frame_) _db_enter_ (a,__FILE__,__LINE__,&_db_stack_frame_)
@ -95,9 +92,6 @@ extern void _db_free_(void *ptr);
#define DBUG_EXPLAIN_INITIAL(buf,len) _db_explain_init_((buf),(len)) #define DBUG_EXPLAIN_INITIAL(buf,len) _db_explain_init_((buf),(len))
#define DEBUGGER_OFF do { _dbug_on_= 0; } while(0) #define DEBUGGER_OFF do { _dbug_on_= 0; } while(0)
#define DEBUGGER_ON do { _dbug_on_= 1; } while(0) #define DEBUGGER_ON do { _dbug_on_= 1; } while(0)
#define DBUG_MALLOC(SIZE) _db_malloc_(SIZE)
#define DBUG_REALLOC(PTR,SIZE) _db_realloc_(PTR,SIZE)
#define DBUG_FREE(PTR) _db_free_(PTR)
#define IF_DBUG(A,B) A #define IF_DBUG(A,B) A
#ifndef __WIN__ #ifndef __WIN__
@ -156,9 +150,6 @@ extern void _db_suicide_();
#define DBUG_EXPLAIN_INITIAL(buf,len) #define DBUG_EXPLAIN_INITIAL(buf,len)
#define DEBUGGER_OFF do { } while(0) #define DEBUGGER_OFF do { } while(0)
#define DEBUGGER_ON do { } while(0) #define DEBUGGER_ON do { } while(0)
#define DBUG_MALLOC(SIZE) malloc(SIZE)
#define DBUG_REALLOC(PTR,SIZE) realloc(PTR,SIZE)
#define DBUG_FREE(PTR) free(PTR)
#define IF_DBUG(A,B) B #define IF_DBUG(A,B) B
#define DBUG_ABORT() do { } while(0) #define DBUG_ABORT() do { } while(0)
#define DBUG_CRASH_ENTER(func) #define DBUG_CRASH_ENTER(func)

View File

@ -55,6 +55,24 @@ void my_set_exception_pointers(EXCEPTION_POINTERS *ep);
#endif #endif
#endif #endif
#ifdef HAVE_BFD_H
#define HAVE_MY_ADDR_RESOLVE 1
#endif
typedef struct {
const char *file;
const char *func;
uint line;
} my_addr_loc;
#ifdef HAVE_MY_ADDR_RESOLVE
int my_addr_resolve(void *ptr, my_addr_loc *loc);
const char *my_addr_resolve_init();
#else
#define my_addr_resolve_init() (0)
#define my_addr_resolve(A,B) (1)
#endif
#ifdef HAVE_WRITE_CORE #ifdef HAVE_WRITE_CORE
void my_write_core(int sig); void my_write_core(int sig);
#endif #endif

View File

@ -153,8 +153,10 @@ extern void *my_realloc(void *oldpoint, size_t Size, myf MyFlags);
extern void my_free(void *ptr); extern void my_free(void *ptr);
extern void *my_memdup(const void *from,size_t length,myf MyFlags); extern void *my_memdup(const void *from,size_t length,myf MyFlags);
extern char *my_strdup(const char *from,myf MyFlags); extern char *my_strdup(const char *from,myf MyFlags);
extern char *my_strndup(const char *from, size_t length, extern char *my_strndup(const char *from, size_t length, myf MyFlags);
myf MyFlags);
extern int sf_leaking_memory; /* set to 1 to disable memleak detection */
#if defined(ENABLED_DEBUG_SYNC) #if defined(ENABLED_DEBUG_SYNC)
extern void (*debug_sync_C_callback_ptr)(const char *, size_t); extern void (*debug_sync_C_callback_ptr)(const char *, size_t);
#define DEBUG_SYNC_C(_sync_point_name_) do { \ #define DEBUG_SYNC_C(_sync_point_name_) do { \
@ -211,7 +213,7 @@ extern void (*error_handler_hook)(uint my_err, const char *str,myf MyFlags);
extern void (*fatal_error_handler_hook)(uint my_err, const char *str, extern void (*fatal_error_handler_hook)(uint my_err, const char *str,
myf MyFlags); myf MyFlags);
extern uint my_file_limit; extern uint my_file_limit;
extern ulong my_thread_stack_size; extern ulonglong my_thread_stack_size;
extern const char *(*proc_info_hook)(MYSQL_THD, const char *, const char *, extern const char *(*proc_info_hook)(MYSQL_THD, const char *, const char *,
const char *, const unsigned int); const char *, const unsigned int);

View File

@ -15,6 +15,7 @@
/* Some defines to make it easier to use valgrind */ /* Some defines to make it easier to use valgrind */
#include <m_string.h> /* bfill */
#ifdef HAVE_valgrind #ifdef HAVE_valgrind
#define IF_VALGRIND(A,B) A #define IF_VALGRIND(A,B) A

View File

@ -16,7 +16,8 @@
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/libmysqld/include ${CMAKE_SOURCE_DIR}/libmysqld/include
${CMAKE_SOURCE_DIR}/regex ${CMAKE_SOURCE_DIR}/regex
${READLINE_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/sql
${MY_READLINE_INCLUDE_DIR}
) )
@ -27,8 +28,7 @@ MYSQL_ADD_EXECUTABLE(mysql_embedded ../../client/completion_hash.cc
../../client/mysql.cc ../../client/readline.cc) ../../client/mysql.cc ../../client/readline.cc)
TARGET_LINK_LIBRARIES(mysql_embedded mysqlserver) TARGET_LINK_LIBRARIES(mysql_embedded mysqlserver)
IF(UNIX) IF(UNIX)
ADD_DEFINITIONS(${READLINE_DEFINES}) TARGET_LINK_LIBRARIES(mysql_embedded ${MY_READLINE_LIBRARY})
TARGET_LINK_LIBRARIES(mysql_embedded ${READLINE_LIBRARY})
ENDIF(UNIX) ENDIF(UNIX)
MYSQL_ADD_EXECUTABLE(mysqltest_embedded ../../client/mysqltest.cc) MYSQL_ADD_EXECUTABLE(mysqltest_embedded ../../client/mysqltest.cc)

View File

@ -22,5 +22,5 @@ SET(MYSQLSERVICES_SOURCES
my_thread_scheduler_service.c my_thread_scheduler_service.c
progress_report_service.c) progress_report_service.c)
ADD_LIBRARY(mysqlservices ${MYSQLSERVICES_SOURCES}) ADD_CONVENIENCE_LIBRARY(mysqlservices ${MYSQLSERVICES_SOURCES})
INSTALL(TARGETS mysqlservices DESTINATION ${INSTALL_LIBDIR} COMPONENT Development) INSTALL(TARGETS mysqlservices DESTINATION ${INSTALL_LIBDIR} COMPONENT Development)

View File

@ -42,7 +42,7 @@ if (!$debug_sync_action)
# Restart slave # Restart slave
--source include/stop_slave.inc --source include/stop_slave.inc
eval SET @@global.debug= "+d,$dbug_sync_point"; eval SET @@global.debug_dbug= "+d,$dbug_sync_point";
--source include/start_slave.inc --source include/start_slave.inc
--echo slave is going to hang in get_master_version_and_clock --echo slave is going to hang in get_master_version_and_clock
@ -71,7 +71,7 @@ source include/wait_for_slave_io_error.inc;
# now to avoid restarting IO-thread to re-enter it. # now to avoid restarting IO-thread to re-enter it.
# There will be a new IO thread forked out with its @@session.debug # There will be a new IO thread forked out with its @@session.debug
# unset. # unset.
eval set @@global.debug = "-d,$dbug_sync_point"; eval set @@global.debug_dbug= "-d,$dbug_sync_point";
--let $rpl_server_number= 1 --let $rpl_server_number= 1
--source include/rpl_start_server.inc --source include/rpl_start_server.inc

View File

@ -13,7 +13,7 @@ create table tm (a int auto_increment primary key) engine=myisam;
create table ti (a int auto_increment primary key) engine=innodb; create table ti (a int auto_increment primary key) engine=innodb;
sync_slave_with_master; sync_slave_with_master;
set @@global.debug="+d,stop_slave_middle_group"; set @@global.debug_dbug="+d,stop_slave_middle_group";
connection master; connection master;
@ -43,7 +43,7 @@ eval SELECT "NO$error" AS Last_SQL_Error, @check as `true`;
select count(*) as one from tm; select count(*) as one from tm;
select count(*) as one from ti; select count(*) as one from ti;
set @@global.debug="-d"; set @@global.debug_dbug="-d";
# #
# bug#45940 issues around rli->last_event_start_time # bug#45940 issues around rli->last_event_start_time
@ -67,8 +67,8 @@ truncate table ti;
#connection slave; #connection slave;
sync_slave_with_master; sync_slave_with_master;
set @@global.debug="+d,stop_slave_middle_group"; set @@global.debug_dbug="+d,stop_slave_middle_group";
set @@global.debug="+d,incomplete_group_in_relay_log"; set @@global.debug_dbug="+d,incomplete_group_in_relay_log";
connection master; connection master;
@ -96,7 +96,7 @@ eval SELECT "$error" AS Last_SQL_Error, @check as `true`;
select count(*) as one from tm; select count(*) as one from tm;
select count(*) as zero from ti; select count(*) as zero from ti;
set @@global.debug="-d"; set @@global.debug_dbug="-d";
# #
# The mixed multi-table update # The mixed multi-table update
@ -109,8 +109,8 @@ connection master;
#connection slave; #connection slave;
sync_slave_with_master; sync_slave_with_master;
set @@global.debug="+d,stop_slave_middle_group"; set @@global.debug_dbug="+d,stop_slave_middle_group";
set @@global.debug="+d,incomplete_group_in_relay_log"; set @@global.debug_dbug="+d,incomplete_group_in_relay_log";
connection master; connection master;
update tm as t1, ti as t2 set t1.a=t1.a * 2, t2.a=t2.a * 2; update tm as t1, ti as t2 set t1.a=t1.a * 2, t2.a=t2.a * 2;
@ -135,7 +135,7 @@ eval SELECT "$error" AS Last_SQL_Error, @check as `true`;
select max(a) as two from tm; select max(a) as two from tm;
select max(a) as one from ti; select max(a) as one from ti;
set @@global.debug="-d"; set @@global.debug_dbug="-d";
# #
# clean-up # clean-up

View File

@ -14,9 +14,9 @@
# source include/binlog_inject_error.inc; # source include/binlog_inject_error.inc;
# #
SET GLOBAL debug='d,injecting_fault_writing'; SET GLOBAL debug_dbug='d,injecting_fault_writing';
--echo $query; --echo $query;
--replace_regex /(errno: .*)/(errno: #)/ --replace_regex /(errno: .*)/(errno: #)/
--error ER_ERROR_ON_WRITE --error ER_ERROR_ON_WRITE
--eval $query --eval $query
SET GLOBAL debug=''; SET GLOBAL debug_dbug='';

View File

@ -14,7 +14,7 @@ set SQL_LOG_BIN=0;
# Turn off any debug crashes, allow the variable to be # Turn off any debug crashes, allow the variable to be
# non existent in release builds # non existent in release builds
--error 0,1193 --error 0,1193
set debug=""; set debug_dbug="";
use mtr; use mtr;

View File

@ -26,7 +26,7 @@ connect-timeout= 60
plugin-dir=@OPT.plugindir plugin-dir=@OPT.plugindir
log-basename=mysqld log-basename=mysqld
disable-sync-sys debug-no-sync
log-bin-trust-function-creators=1 log-bin-trust-function-creators=1
key_buffer_size= 1M key_buffer_size= 1M

View File

@ -8,13 +8,13 @@ SET @old_debug=@@global.debug;
-- disable_warnings -- disable_warnings
-- source include/stop_slave.inc -- source include/stop_slave.inc
-- enable_warnings -- enable_warnings
-- eval SET GLOBAL debug="+d,$io_thd_injection_fault_flag" -- eval SET GLOBAL debug_dbug="+d,$io_thd_injection_fault_flag"
START SLAVE io_thread; START SLAVE io_thread;
-- source include/wait_for_slave_io_error.inc -- source include/wait_for_slave_io_error.inc
-- eval SET GLOBAL debug="-d,$io_thd_injection_fault_flag" -- eval SET GLOBAL debug_dbug="-d,$io_thd_injection_fault_flag"
SET GLOBAL debug=@old_debug; SET GLOBAL debug_dbug=@old_debug;
# restart because slave is in bad shape # restart because slave is in bad shape
--let $rpl_server_number= 2 --let $rpl_server_number= 2

View File

@ -32,7 +32,7 @@ system echo wait-maria_verify_recovery.inc >> $MYSQLTEST_VARDIR/tmp/mysqld.1.exp
# but that would implicitely commit all work, which the tester may # but that would implicitely commit all work, which the tester may
# not want (tester may want to observe rollback happening). # not want (tester may want to observe rollback happening).
eval SET SESSION debug=$mvr_debug_option; eval SET SESSION debug_dbug=$mvr_debug_option;
--echo * crashing mysqld intentionally --echo * crashing mysqld intentionally
--error 2013 --error 2013
eval $mvr_crash_statement; # this will crash (DBUG magic) eval $mvr_crash_statement; # this will crash (DBUG magic)

View File

@ -79,7 +79,7 @@ if ($_slave_check_configured == 'No such row')
# mysqltest doesn't provide any better way to multiply by 10 # mysqltest doesn't provide any better way to multiply by 10
--let $_wait_for_slave_param_zero= 0 --let $_wait_for_slave_param_zero= 0
--let $_slave_timeout_counter= $_slave_timeout$zero --let $_slave_timeout_counter= $_slave_timeout$_wait_for_slave_param_zero
--let $_slave_continue= 1 --let $_slave_continue= 1
while ($_slave_continue) while ($_slave_continue)
{ {

View File

@ -40,7 +40,7 @@ BEGIN
eval 'sub USE_NETPING { $use_netping }'; eval 'sub USE_NETPING { $use_netping }';
} }
sub sleep_until_file_created ($$$); sub sleep_until_file_created ($$$$);
sub mtr_ping_port ($); sub mtr_ping_port ($);
sub mtr_ping_port ($) { sub mtr_ping_port ($) {
@ -102,10 +102,11 @@ sub mtr_ping_port ($) {
# FIXME check that the pidfile contains the expected pid! # FIXME check that the pidfile contains the expected pid!
sub sleep_until_file_created ($$$) { sub sleep_until_file_created ($$$$) {
my $pidfile= shift; my $pidfile= shift;
my $timeout= shift; my $timeout= shift;
my $proc= shift; my $proc= shift;
my $warn_seconds = shift;
my $sleeptime= 100; # Milliseconds my $sleeptime= 100; # Milliseconds
my $loops= ($timeout * 1000) / $sleeptime; my $loops= ($timeout * 1000) / $sleeptime;
@ -128,8 +129,8 @@ sub sleep_until_file_created ($$$) {
mtr_debug("Sleep $sleeptime milliseconds waiting for $pidfile"); mtr_debug("Sleep $sleeptime milliseconds waiting for $pidfile");
# Print extra message every 60 seconds # Print extra message every $warn_seconds seconds
if ( $seconds > 1 && int($seconds * 10) % 600 == 0 && $seconds < $timeout ) if ( $seconds > 1 && $seconds % $warn_seconds == 0 && $seconds < $timeout )
{ {
my $left= $timeout - $seconds; my $left= $timeout - $seconds;
mtr_warning("Waited $seconds seconds for $pidfile to be created, " . mtr_warning("Waited $seconds seconds for $pidfile to be created, " .

View File

@ -214,7 +214,7 @@ my $opt_cursor_protocol;
my $opt_view_protocol; my $opt_view_protocol;
our $opt_debug; our $opt_debug;
my $debug_d= "d"; my $debug_d= "d,*";
my $opt_debug_common; my $opt_debug_common;
our $opt_debug_server; our $opt_debug_server;
our @opt_cases; # The test cases names in argv our @opt_cases; # The test cases names in argv
@ -311,6 +311,7 @@ my $valgrind_reports= 0;
my $opt_callgrind; my $opt_callgrind;
my %mysqld_logs; my %mysqld_logs;
my $opt_debug_sync_timeout= 300; # Default timeout for WAIT_FOR actions. my $opt_debug_sync_timeout= 300; # Default timeout for WAIT_FOR actions.
my $warn_seconds = 60;
sub testcase_timeout ($) { sub testcase_timeout ($) {
my ($tinfo)= @_; my ($tinfo)= @_;
@ -1737,12 +1738,6 @@ sub command_line_setup {
$opt_valgrind= 1; $opt_valgrind= 1;
$opt_valgrind_mysqld= 1; $opt_valgrind_mysqld= 1;
$opt_valgrind_mysqltest= 1; $opt_valgrind_mysqltest= 1;
# Increase the timeouts when running with valgrind
$opt_testcase_timeout*= 10;
$opt_suite_timeout*= 6;
$opt_start_timeout*= 10;
} }
elsif ( $opt_valgrind_mysqld ) elsif ( $opt_valgrind_mysqld )
{ {
@ -1755,6 +1750,15 @@ sub command_line_setup {
$opt_valgrind= 1; $opt_valgrind= 1;
} }
if ($opt_valgrind)
{
# Increase the timeouts when running with valgrind
$opt_testcase_timeout*= 10;
$opt_suite_timeout*= 6;
$opt_start_timeout*= 10;
$warn_seconds*= 10;
}
if ( $opt_callgrind ) if ( $opt_callgrind )
{ {
mtr_report("Turning on valgrind with callgrind for mysqld(s)"); mtr_report("Turning on valgrind with callgrind for mysqld(s)");
@ -3229,7 +3233,8 @@ sub mysql_server_wait {
return not sleep_until_file_created($mysqld->value('pid-file'), return not sleep_until_file_created($mysqld->value('pid-file'),
$opt_start_timeout, $opt_start_timeout,
$mysqld->{'proc'}); $mysqld->{'proc'},
$warn_seconds);
} }
sub create_config_file_for_extern { sub create_config_file_for_extern {
@ -3468,7 +3473,7 @@ sub mysql_install_db {
if ( $opt_debug ) if ( $opt_debug )
{ {
mtr_add_arg($args, "--debug=$debug_d:t:i:A,%s/log/bootstrap.trace", mtr_add_arg($args, "--debug-dbug=$debug_d:t:i:A,%s/log/bootstrap.trace",
$path_vardir_trace); $path_vardir_trace);
} }
@ -4662,7 +4667,7 @@ sub extract_warning_lines ($$) {
$Ferr = undef; # Close error log file $Ferr = undef; # Close error log file
# mysql_client_test.test sends a COM_DEBUG packet to the server # mysql_client_test.test sends a COM_DEBUG packet to the server
# to provoke a SAFEMALLOC leak report, ignore any warnings # to provoke a safemalloc leak report, ignore any warnings
# between "Begin/end safemalloc memory dump" # between "Begin/end safemalloc memory dump"
if ( grep(/Begin safemalloc memory dump:/, @lines) > 0) if ( grep(/Begin safemalloc memory dump:/, @lines) > 0)
{ {
@ -5380,7 +5385,7 @@ sub mysqld_start ($$) {
if ( $opt_debug ) if ( $opt_debug )
{ {
mtr_add_arg($args, "--debug=$debug_d:t:i:A,%s/log/%s.trace", mtr_add_arg($args, "--debug-dbug=$debug_d:t:i:A,%s/log/%s.trace",
$path_vardir_trace, $mysqld->name()); $path_vardir_trace, $mysqld->name());
} }
@ -5474,7 +5479,8 @@ sub mysqld_start ($$) {
if ( $wait_for_pid_file && if ( $wait_for_pid_file &&
!sleep_until_file_created($mysqld->value('pid-file'), !sleep_until_file_created($mysqld->value('pid-file'),
$opt_start_timeout, $opt_start_timeout,
$mysqld->{'proc'})) $mysqld->{'proc'},
$warn_seconds))
{ {
my $mname= $mysqld->name(); my $mname= $mysqld->name();
mtr_error("Failed to start mysqld $mname with command $exe"); mtr_error("Failed to start mysqld $mname with command $exe");

View File

@ -81,59 +81,59 @@ insert into t1 values(1,2,3);
insert into t1 values(11,22,33); insert into t1 values(11,22,33);
insert into t2 values(99); insert into t2 values(99);
select t1.* as 'with_alias' from t1; select t1.* as 'with_alias' from t1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as 'with_alias' from t1' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'as 'with_alias' from t1' at line 1
select t2.* as 'with_alias' from t2; select t2.* as 'with_alias' from t2;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as 'with_alias' from t2' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'as 'with_alias' from t2' at line 1
select t1.*, t1.* as 'with_alias' from t1; select t1.*, t1.* as 'with_alias' from t1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as 'with_alias' from t1' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'as 'with_alias' from t1' at line 1
select t1.* as 'with_alias', t1.* from t1; select t1.* as 'with_alias', t1.* from t1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as 'with_alias', t1.* from t1' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'as 'with_alias', t1.* from t1' at line 1
select t1.* as 'with_alias', t1.* as 'alias2' from t1; select t1.* as 'with_alias', t1.* as 'alias2' from t1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as 'with_alias', t1.* as 'alias2' from t1' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'as 'with_alias', t1.* as 'alias2' from t1' at line 1
select t1.* as 'with_alias', a, t1.* as 'alias2' from t1; select t1.* as 'with_alias', a, t1.* as 'alias2' from t1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as 'with_alias', a, t1.* as 'alias2' from t1' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'as 'with_alias', a, t1.* as 'alias2' from t1' at line 1
select a, t1.* as 'with_alias' from t1; select a, t1.* as 'with_alias' from t1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as 'with_alias' from t1' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'as 'with_alias' from t1' at line 1
select t1.* as 'with_alias', a from t1; select t1.* as 'with_alias', a from t1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as 'with_alias', a from t1' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'as 'with_alias', a from t1' at line 1
select a, t1.* as 'with_alias', b from t1; select a, t1.* as 'with_alias', b from t1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as 'with_alias', b from t1' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'as 'with_alias', b from t1' at line 1
select (select d from t2 where d > a), t1.* as 'with_alias' from t1; select (select d from t2 where d > a), t1.* as 'with_alias' from t1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as 'with_alias' from t1' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'as 'with_alias' from t1' at line 1
select t1.* as 'with_alias', (select a from t2 where d > a) from t1; select t1.* as 'with_alias', (select a from t2 where d > a) from t1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as 'with_alias', (select a from t2 where d > a) from t1' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'as 'with_alias', (select a from t2 where d > a) from t1' at line 1
select a as 'x', t1.* as 'with_alias' from t1; select a as 'x', t1.* as 'with_alias' from t1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as 'with_alias' from t1' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'as 'with_alias' from t1' at line 1
select t1.* as 'with_alias', a as 'x' from t1; select t1.* as 'with_alias', a as 'x' from t1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as 'with_alias', a as 'x' from t1' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'as 'with_alias', a as 'x' from t1' at line 1
select a as 'x', t1.* as 'with_alias', b as 'x' from t1; select a as 'x', t1.* as 'with_alias', b as 'x' from t1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as 'with_alias', b as 'x' from t1' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'as 'with_alias', b as 'x' from t1' at line 1
select (select d from t2 where d > a) as 'x', t1.* as 'with_alias' from t1; select (select d from t2 where d > a) as 'x', t1.* as 'with_alias' from t1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as 'with_alias' from t1' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'as 'with_alias' from t1' at line 1
select t1.* as 'with_alias', (select a from t2 where d > a) as 'x' from t1; select t1.* as 'with_alias', (select a from t2 where d > a) as 'x' from t1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as 'with_alias', (select a from t2 where d > a) as 'x' from t1' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'as 'with_alias', (select a from t2 where d > a) as 'x' from t1' at line 1
select (select t2.* as 'x' from t2) from t1; select (select t2.* as 'x' from t2) from t1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as 'x' from t2) from t1' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'as 'x' from t2) from t1' at line 1
select a, (select t2.* as 'x' from t2) from t1; select a, (select t2.* as 'x' from t2) from t1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as 'x' from t2) from t1' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'as 'x' from t2) from t1' at line 1
select t1.*, (select t2.* as 'x' from t2) from t1; select t1.*, (select t2.* as 'x' from t2) from t1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as 'x' from t2) from t1' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'as 'x' from t2) from t1' at line 1
insert into t3 select t1.* as 'with_alias' from t1; insert into t3 select t1.* as 'with_alias' from t1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as 'with_alias' from t1' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'as 'with_alias' from t1' at line 1
insert into t3 select t2.* as 'with_alias', 1, 2 from t2; insert into t3 select t2.* as 'with_alias', 1, 2 from t2;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as 'with_alias', 1, 2 from t2' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'as 'with_alias', 1, 2 from t2' at line 1
insert into t3 select t2.* as 'with_alias', d as 'x', d as 'z' from t2; insert into t3 select t2.* as 'with_alias', d as 'x', d as 'z' from t2;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as 'with_alias', d as 'x', d as 'z' from t2' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'as 'with_alias', d as 'x', d as 'z' from t2' at line 1
insert into t3 select t2.*, t2.* as 'with_alias', 3 from t2; insert into t3 select t2.*, t2.* as 'with_alias', 3 from t2;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as 'with_alias', 3 from t2' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'as 'with_alias', 3 from t2' at line 1
create table t3 select t1.* as 'with_alias' from t1; create table t3 select t1.* as 'with_alias' from t1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as 'with_alias' from t1' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'as 'with_alias' from t1' at line 1
create table t3 select t2.* as 'with_alias', 1, 2 from t2; create table t3 select t2.* as 'with_alias', 1, 2 from t2;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as 'with_alias', 1, 2 from t2' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'as 'with_alias', 1, 2 from t2' at line 1
create table t3 select t2.* as 'with_alias', d as 'x', d as 'z' from t2; create table t3 select t2.* as 'with_alias', d as 'x', d as 'z' from t2;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as 'with_alias', d as 'x', d as 'z' from t2' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'as 'with_alias', d as 'x', d as 'z' from t2' at line 1
create table t3 select t2.*, t2.* as 'with_alias', 3 from t2; create table t3 select t2.*, t2.* as 'with_alias', 3 from t2;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as 'with_alias', 3 from t2' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'as 'with_alias', 3 from t2' at line 1
select t1.* from t1; select t1.* from t1;
a b c a b c
1 2 3 1 2 3

View File

@ -696,13 +696,13 @@ section subsection title reviewer
3 3 Stored Functions You 3 3 Stored Functions You
2 3 Server Me 2 3 Server Me
alter table table_24562 order by 12; alter table table_24562 order by 12;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '12' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '12' at line 1
alter table table_24562 order by (section + 12); alter table table_24562 order by (section + 12);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(section + 12)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '(section + 12)' at line 1
alter table table_24562 order by length(title); alter table table_24562 order by length(title);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(title)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '(title)' at line 1
alter table table_24562 order by (select 12 from dual); alter table table_24562 order by (select 12 from dual);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(select 12 from dual)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '(select 12 from dual)' at line 1
alter table table_24562 order by no_such_col; alter table table_24562 order by no_such_col;
ERROR 42S22: Unknown column 'no_such_col' in 'order clause' ERROR 42S22: Unknown column 'no_such_col' in 'order clause'
drop table table_24562; drop table table_24562;

View File

@ -59,8 +59,8 @@ drop table t1;
End of 4.1 tests End of 4.1 tests
create table t1(a int); create table t1(a int);
analyze table t1 extended; analyze table t1 extended;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'extended' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'extended' at line 1
optimize table t1 extended; optimize table t1 extended;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'extended' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'extended' at line 1
drop table t1; drop table t1;
End of 5.0 tests End of 5.0 tests

View File

@ -4,9 +4,9 @@
# #
CREATE TABLE t1(a INT) ENGINE=ARCHIVE; CREATE TABLE t1(a INT) ENGINE=ARCHIVE;
INSERT INTO t1 VALUES(1); INSERT INTO t1 VALUES(1);
SET SESSION debug='d,simulate_archive_open_failure'; SET SESSION debug_dbug='d,simulate_archive_open_failure';
CHECK TABLE t1; CHECK TABLE t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 check error Corrupt test.t1 check error Corrupt
SET SESSION debug=DEFAULT; SET SESSION debug_dbug=DEFAULT;
DROP TABLE t1; DROP TABLE t1;

View File

@ -2,7 +2,7 @@
# Bug#46261 Plugins can be installed with --skip-grant-tables # Bug#46261 Plugins can be installed with --skip-grant-tables
# #
INSTALL PLUGIN example SONAME 'ha_example.so'; INSTALL PLUGIN example SONAME 'ha_example.so';
ERROR HY000: The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement ERROR HY000: The MariaDB server is running with the --skip-grant-tables option so it cannot execute this statement
UNINSTALL PLUGIN example; UNINSTALL PLUGIN example;
ERROR HY000: The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement ERROR HY000: The MariaDB server is running with the --skip-grant-tables option so it cannot execute this statement
End of 5.1 tests End of 5.1 tests

View File

@ -12,6 +12,6 @@ SHOW VARIABLES LIKE "%read_only%";
Variable_name Value Variable_name Value
read_only ON read_only ON
INSERT INTO db1.t1 VALUES (1); INSERT INTO db1.t1 VALUES (1);
ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement
DROP DATABASE db1; DROP DATABASE db1;
DROP USER user1@localhost; DROP USER user1@localhost;

View File

@ -2,12 +2,12 @@ select CAST(1-2 AS UNSIGNED);
CAST(1-2 AS UNSIGNED) CAST(1-2 AS UNSIGNED)
18446744073709551615 18446744073709551615
Warnings: Warnings:
Warning 1105 Cast to unsigned converted negative integer to it's positive complement Note 1105 Cast to unsigned converted negative integer to it's positive complement
select CAST(CAST(1-2 AS UNSIGNED) AS SIGNED INTEGER); select CAST(CAST(1-2 AS UNSIGNED) AS SIGNED INTEGER);
CAST(CAST(1-2 AS UNSIGNED) AS SIGNED INTEGER) CAST(CAST(1-2 AS UNSIGNED) AS SIGNED INTEGER)
-1 -1
Warnings: Warnings:
Warning 1105 Cast to unsigned converted negative integer to it's positive complement Note 1105 Cast to unsigned converted negative integer to it's positive complement
select CAST('10 ' as unsigned integer); select CAST('10 ' as unsigned integer);
CAST('10 ' as unsigned integer) CAST('10 ' as unsigned integer)
10 10
@ -17,14 +17,14 @@ select cast(-5 as unsigned) | 1, cast(-5 as unsigned) & -1;
cast(-5 as unsigned) | 1 cast(-5 as unsigned) & -1 cast(-5 as unsigned) | 1 cast(-5 as unsigned) & -1
18446744073709551611 18446744073709551611 18446744073709551611 18446744073709551611
Warnings: Warnings:
Warning 1105 Cast to unsigned converted negative integer to it's positive complement Note 1105 Cast to unsigned converted negative integer to it's positive complement
Warning 1105 Cast to unsigned converted negative integer to it's positive complement Note 1105 Cast to unsigned converted negative integer to it's positive complement
select cast(-5 as unsigned) -1, cast(-5 as unsigned) + 1; select cast(-5 as unsigned) -1, cast(-5 as unsigned) + 1;
cast(-5 as unsigned) -1 cast(-5 as unsigned) + 1 cast(-5 as unsigned) -1 cast(-5 as unsigned) + 1
18446744073709551610 18446744073709551612 18446744073709551610 18446744073709551612
Warnings: Warnings:
Warning 1105 Cast to unsigned converted negative integer to it's positive complement Note 1105 Cast to unsigned converted negative integer to it's positive complement
Warning 1105 Cast to unsigned converted negative integer to it's positive complement Note 1105 Cast to unsigned converted negative integer to it's positive complement
select ~5, cast(~5 as signed); select ~5, cast(~5 as signed);
~5 cast(~5 as signed) ~5 cast(~5 as signed)
18446744073709551610 -6 18446744073709551610 -6
@ -359,12 +359,12 @@ select cast('9223372036854775809' as signed);
cast('9223372036854775809' as signed) cast('9223372036854775809' as signed)
-9223372036854775807 -9223372036854775807
Warnings: Warnings:
Warning 1105 Cast to signed converted positive out-of-range integer to it's negative complement Note 1105 Cast to signed converted positive out-of-range integer to it's negative complement
select cast('-1' as unsigned); select cast('-1' as unsigned);
cast('-1' as unsigned) cast('-1' as unsigned)
18446744073709551615 18446744073709551615
Warnings: Warnings:
Warning 1105 Cast to unsigned converted negative integer to it's positive complement Note 1105 Cast to unsigned converted negative integer to it's positive complement
select cast('abc' as signed); select cast('abc' as signed);
cast('abc' as signed) cast('abc' as signed)
0 0
@ -554,7 +554,7 @@ select cast('18446744073709551615' as signed);
cast('18446744073709551615' as signed) cast('18446744073709551615' as signed)
-1 -1
Warnings: Warnings:
Warning 1105 Cast to signed converted positive out-of-range integer to it's negative complement Note 1105 Cast to signed converted positive out-of-range integer to it's negative complement
select cast('9223372036854775807' as signed); select cast('9223372036854775807' as signed);
cast('9223372036854775807' as signed) cast('9223372036854775807' as signed)
9223372036854775807 9223372036854775807
@ -565,7 +565,7 @@ select cast(concat('184467440','73709551615') as signed);
cast(concat('184467440','73709551615') as signed) cast(concat('184467440','73709551615') as signed)
-1 -1
Warnings: Warnings:
Warning 1105 Cast to signed converted positive out-of-range integer to it's negative complement Note 1105 Cast to signed converted positive out-of-range integer to it's negative complement
select cast(repeat('1',20) as unsigned); select cast(repeat('1',20) as unsigned);
cast(repeat('1',20) as unsigned) cast(repeat('1',20) as unsigned)
11111111111111111111 11111111111111111111
@ -573,7 +573,7 @@ select cast(repeat('1',20) as signed);
cast(repeat('1',20) as signed) cast(repeat('1',20) as signed)
-7335632962598440505 -7335632962598440505
Warnings: Warnings:
Warning 1105 Cast to signed converted positive out-of-range integer to it's negative complement Note 1105 Cast to signed converted positive out-of-range integer to it's negative complement
select cast(1.0e+300 as signed int); select cast(1.0e+300 as signed int);
cast(1.0e+300 as signed int) cast(1.0e+300 as signed int)
9223372036854775807 9223372036854775807

View File

@ -39,11 +39,11 @@ select 2 /*M!99999 +1 */;
2 2
2 2
select 2 /*M!0000 +1 */; select 2 /*M!0000 +1 */;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0000 +1 */' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '0000 +1 */' at line 1
select 1/*!2*/; select 1/*!2*/;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2*/' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '2*/' at line 1
select 1/*!000002*/; select 1/*!000002*/;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2*/' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '2*/' at line 1
select 1/*!999992*/; select 1/*!999992*/;
1 1
1 1
@ -53,15 +53,15 @@ select 1 + /*!00000 2 */ + 3 /*!99999 noise*/ + 4;
drop table if exists table_28779; drop table if exists table_28779;
create table table_28779 (a int); create table table_28779 (a int);
prepare bar from "DELETE FROM table_28779 WHERE a = 7 OR 1=1/*' AND b = 'bar';"; prepare bar from "DELETE FROM table_28779 WHERE a = 7 OR 1=1/*' AND b = 'bar';";
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '/*' AND b = 'bar'' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '/*' AND b = 'bar'' at line 1
prepare bar from "DELETE FROM table_28779 WHERE a = 7 OR 1=1/*' AND b = 'bar';*"; prepare bar from "DELETE FROM table_28779 WHERE a = 7 OR 1=1/*' AND b = 'bar';*";
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '/*' AND b = 'bar';*' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '/*' AND b = 'bar';*' at line 1
prepare bar from "DELETE FROM table_28779 WHERE a = 7 OR 1=1/*! AND 2=2;"; prepare bar from "DELETE FROM table_28779 WHERE a = 7 OR 1=1/*! AND 2=2;";
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
prepare bar from "DELETE FROM table_28779 WHERE a = 7 OR 1=1/*! AND 2=2;*"; prepare bar from "DELETE FROM table_28779 WHERE a = 7 OR 1=1/*! AND 2=2;*";
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '*' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '*' at line 1
prepare bar from "DELETE FROM table_28779 WHERE a = 7 OR 1=1/*!98765' AND b = 'bar';"; prepare bar from "DELETE FROM table_28779 WHERE a = 7 OR 1=1/*!98765' AND b = 'bar';";
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '/*!98765' AND b = 'bar'' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '/*!98765' AND b = 'bar'' at line 1
prepare bar from "DELETE FROM table_28779 WHERE a = 7 OR 1=1/*!98765' AND b = 'bar';*"; prepare bar from "DELETE FROM table_28779 WHERE a = 7 OR 1=1/*!98765' AND b = 'bar';*";
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '/*!98765' AND b = 'bar';*' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '/*!98765' AND b = 'bar';*' at line 1
drop table table_28779; drop table table_28779;

View File

@ -29,17 +29,17 @@ t1 CREATE TABLE `t1` (
drop table t1; drop table t1;
drop table if exists t_illegal; drop table if exists t_illegal;
create table t_illegal (a int, b int, check a>b); create table t_illegal (a int, b int, check a>b);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'a>b)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'a>b)' at line 1
create table t_illegal (a int, b int, constraint abc check a>b); create table t_illegal (a int, b int, constraint abc check a>b);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'a>b)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'a>b)' at line 1
create table t_illegal (a int, b int, constraint abc); create table t_illegal (a int, b int, constraint abc);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 1
drop table if exists t_11714; drop table if exists t_11714;
create table t_11714(a int, b int); create table t_11714(a int, b int);
alter table t_11714 add constraint cons1; alter table t_11714 add constraint cons1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
drop table t_11714; drop table t_11714;
CREATE TABLE t_illegal (col_1 INT CHECK something (whatever)); CREATE TABLE t_illegal (col_1 INT CHECK something (whatever));
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'something (whatever))' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'something (whatever))' at line 1
CREATE TABLE t_illegal (col_1 INT CHECK something); CREATE TABLE t_illegal (col_1 INT CHECK something);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'something)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'something)' at line 1

View File

@ -1,7 +1,7 @@
CREATE TABLE t1(a int) engine=innodb; CREATE TABLE t1(a int) engine=innodb;
START TRANSACTION; START TRANSACTION;
insert into t1 values(9); insert into t1 values(9);
SET GLOBAL debug="d,crash_commit_before"; SET GLOBAL debug_dbug="d,crash_commit_before";
COMMIT; COMMIT;
ERROR HY000: Lost connection to MySQL server during query ERROR HY000: Lost connection to MySQL server during query
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;

View File

@ -303,11 +303,11 @@ ERROR 42000: Incorrect database name 'db1 '
create table t1(`a ` int); create table t1(`a ` int);
ERROR 42000: Incorrect column name 'a ' ERROR 42000: Incorrect column name 'a '
create table t1 (a int,); create table t1 (a int,);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 1
create table t1 (a int,,b int); create table t1 (a int,,b int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'b int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'b int)' at line 1
create table t1 (,b int); create table t1 (,b int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'b int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'b int)' at line 1
create table t1 (a int, key(a)); create table t1 (a int, key(a));
create table t2 (b int, foreign key(b) references t1(a), key(b)); create table t2 (b int, foreign key(b) references t1(a), key(b));
drop table if exists t1,t2; drop table if exists t1,t2;
@ -1942,7 +1942,7 @@ CREATE TRIGGER f BEFORE INSERT ON t1 FOR EACH ROW
BEGIN BEGIN
UPDATE A SET `pk`=1 WHERE `pk`=0 ; UPDATE A SET `pk`=1 WHERE `pk`=0 ;
END ;| END ;|
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table' ERROR 42000: This version of MariaDB doesn't yet support 'multiple triggers with the same action time and event for one table'
DROP TABLE t1; DROP TABLE t1;
DROP TABLE B; DROP TABLE B;
# #

View File

@ -37,6 +37,6 @@ ERROR 42000: Nezn-Bámá databáze 'nonexistant'
SET lc_messages=ru_RU; SET lc_messages=ru_RU;
SET NAMES latin1; SET NAMES latin1;
SELECT '01234567890123456789012345678901234\'; SELECT '01234567890123456789012345678901234\';
ERROR 42000: \0423 \0432\0430\0441 \043E\0448\0438\0431\043A\0430 \0432 \0437\0430\043F\0440\043E\0441\0435. \0418\0437\0443\0447\0438\0442\0435 \0434\043E\043A\0443\043C\0435\043D\0442\0430\0446\0438\044E \043F\043E \0438\0441\043F\043E\043B\044C\0437\0443\0435\043C\043E\0439 \0432\0435\0440\0441\0438\0438 MySQL \043D\0430 \043F\0440\0435\0434\043C\0435\0442 \043A\043E\0440\0440\0435\043A\0442\043D\043E\0433\043E \0441\0438\043D\0442\0430\043A\0441\0438\0441\0430 \043E\043A\043E\043B\043E ''012345678901234567890123456 ERROR 42000: \0423 \0432\0430\0441 \043E\0448\0438\0431\043A\0430 \0432 \0437\0430\043F\0440\043E\0441\0435. \0418\0437\0443\0447\0438\0442\0435 \0434\043E\043A\0443\043C\0435\043D\0442\0430\0446\0438\044E \043F\043E \0438\0441\043F\043E\043B\044C\0437\0443\0435\043C\043E\0439 \0432\0435\0440\0441\0438\0438 MariaDB \043D\0430 \043F\0440\0435\0434\043C\0435\0442 \043A\043E\0440\0440\0435\043A\0442\043D\043E\0433\043E \0441\0438\043D\0442\0430\043A\0441\0438\0441\0430 \043E\043A\043E\043B\043E ''0123456789012345678901234
# Connection default # Connection default
End of 5.5 tests End of 5.5 tests

View File

@ -365,7 +365,7 @@ c2h
ab_def ab_def
drop table t1; drop table t1;
CREATE TABLE <20>a (a int); CREATE TABLE <20>a (a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<27>a (a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '<27>a (a int)' at line 1
SELECT '<27>a' as str; SELECT '<27>a' as str;
str str
<EFBFBD>a <EFBFBD>a

View File

@ -251,13 +251,13 @@ a INT
); );
INSERT INTO db2.t1 (a) SELECT * FROM t2; INSERT INTO db2.t1 (a) SELECT * FROM t2;
DELETE FROM t1 alias USING t1, t2 alias WHERE t1.a = alias.a; DELETE FROM t1 alias USING t1, t2 alias WHERE t1.a = alias.a;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'alias USING t1, t2 alias WHERE t1.a = alias.a' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'alias USING t1, t2 alias WHERE t1.a = alias.a' at line 1
DELETE FROM alias USING t1, t2 alias WHERE t1.a = alias.a; DELETE FROM alias USING t1, t2 alias WHERE t1.a = alias.a;
DELETE FROM t1, alias USING t1, t2 alias WHERE t1.a = alias.a; DELETE FROM t1, alias USING t1, t2 alias WHERE t1.a = alias.a;
DELETE FROM t1, t2 USING t1, t2 alias WHERE t1.a = alias.a; DELETE FROM t1, t2 USING t1, t2 alias WHERE t1.a = alias.a;
ERROR 42S02: Unknown table 't2' in MULTI DELETE ERROR 42S02: Unknown table 't2' in MULTI DELETE
DELETE FROM db1.t1 alias USING db1.t1, db2.t1 alias WHERE db1.t1.a = alias.a; DELETE FROM db1.t1 alias USING db1.t1, db2.t1 alias WHERE db1.t1.a = alias.a;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'alias USING db1.t1, db2.t1 alias WHERE db1.t1.a = alias.a' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'alias USING db1.t1, db2.t1 alias WHERE db1.t1.a = alias.a' at line 1
DELETE FROM alias USING db1.t1, db2.t1 alias WHERE db1.t1.a = alias.a; DELETE FROM alias USING db1.t1, db2.t1 alias WHERE db1.t1.a = alias.a;
DELETE FROM db2.alias USING db1.t1, db2.t1 alias WHERE db1.t1.a = alias.a; DELETE FROM db2.alias USING db1.t1, db2.t1 alias WHERE db1.t1.a = alias.a;
ERROR 42S02: Unknown table 'alias' in MULTI DELETE ERROR 42S02: Unknown table 'alias' in MULTI DELETE
@ -265,7 +265,7 @@ DELETE FROM t1 USING t1 WHERE a = 1;
SELECT * FROM t1; SELECT * FROM t1;
a a
DELETE FROM t1 alias USING t1 alias WHERE a = 2; DELETE FROM t1 alias USING t1 alias WHERE a = 2;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'alias USING t1 alias WHERE a = 2' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'alias USING t1 alias WHERE a = 2' at line 1
SELECT * FROM t1; SELECT * FROM t1;
a a
DROP TABLE t1, t2; DROP TABLE t1, t2;

View File

@ -5,20 +5,20 @@ ERROR HY000: Unknown system variable 'table_type'
select @@table_type='MyISAM'; select @@table_type='MyISAM';
ERROR HY000: Unknown system variable 'table_type' ERROR HY000: Unknown system variable 'table_type'
backup table t1 to 'data.txt'; backup table t1 to 'data.txt';
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'backup table t1 to 'data.txt'' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'backup table t1 to 'data.txt'' at line 1
restore table t1 from 'data.txt'; restore table t1 from 'data.txt';
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'restore table t1 from 'data.txt'' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'restore table t1 from 'data.txt'' at line 1
show plugin; show plugin;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'plugin' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'plugin' at line 1
load table t1 from master; load table t1 from master;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'table t1 from master' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'table t1 from master' at line 1
load data from master; load data from master;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from master' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'from master' at line 1
SHOW INNODB STATUS; SHOW INNODB STATUS;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INNODB STATUS' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INNODB STATUS' at line 1
create table t1 (t6 timestamp) type=myisam; create table t1 (t6 timestamp) type=myisam;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'type=myisam' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'type=myisam' at line 1
show table types; show table types;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'types' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'types' at line 1
show mutex status; show mutex status;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mutex status' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'mutex status' at line 1

View File

@ -213,15 +213,15 @@ a
2 2
drop table t1; drop table t1;
select mail_id, if(folder.f_description!='', folder.f_description, folder.f_name) as folder_name, date, address_id, phrase, address, subject from folder, (select mail.mail_id as mail_id, date_format(mail.h_date, '%b %e, %Y %h:%i') as date, mail.folder_id, sender.address_id as address_id, sender.phrase as phrase, sender.address as address, mail.h_subject as subject from mail left join mxa as mxa_sender on mail.mail_id=mxa_sender.mail_id and mxa_sender.type='from' left join address as sender on mxa_sender.address_id=sender.address_id mxa as mxa_recipient, address as recipient, where 1 and mail.mail_id=mxa_recipient.mail_id and mxa_recipient.address_id=recipient.address_id and mxa_recipient.type='to' and match(sender.phrase, sender.address, sender.comment) against ('jeremy' in boolean mode) and match(recipient.phrase, recipient.address, recipient.comment) against ('monty' in boolean mode) order by mail.h_date desc limit 0, 25 ) as query where query.folder_id=folder.folder_id; select mail_id, if(folder.f_description!='', folder.f_description, folder.f_name) as folder_name, date, address_id, phrase, address, subject from folder, (select mail.mail_id as mail_id, date_format(mail.h_date, '%b %e, %Y %h:%i') as date, mail.folder_id, sender.address_id as address_id, sender.phrase as phrase, sender.address as address, mail.h_subject as subject from mail left join mxa as mxa_sender on mail.mail_id=mxa_sender.mail_id and mxa_sender.type='from' left join address as sender on mxa_sender.address_id=sender.address_id mxa as mxa_recipient, address as recipient, where 1 and mail.mail_id=mxa_recipient.mail_id and mxa_recipient.address_id=recipient.address_id and mxa_recipient.type='to' and match(sender.phrase, sender.address, sender.comment) against ('jeremy' in boolean mode) and match(recipient.phrase, recipient.address, recipient.comment) against ('monty' in boolean mode) order by mail.h_date desc limit 0, 25 ) as query where query.folder_id=folder.folder_id;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mxa as mxa_recipient, address as recipient, where 1 and mail.mail_id=mxa_r' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'mxa as mxa_recipient, address as recipient, where 1 and mail.mail_id=mxa_r' at line 1
create table t1 (a int); create table t1 (a int);
insert into t1 values (1),(2),(3); insert into t1 values (1),(2),(3);
update (select * from t1) as t1 set a = 5; update (select * from t1) as t1 set a = 5;
ERROR HY000: The target table t1 of the UPDATE is not updatable ERROR HY000: The target table t1 of the UPDATE is not updatable
delete from (select * from t1); delete from (select * from t1);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(select * from t1)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '(select * from t1)' at line 1
insert into (select * from t1) values (5); insert into (select * from t1) values (5);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(select * from t1) values (5)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '(select * from t1) values (5)' at line 1
drop table t1; drop table t1;
create table t1 (E1 INTEGER UNSIGNED NOT NULL, E2 INTEGER UNSIGNED NOT NULL, E3 INTEGER UNSIGNED NOT NULL, PRIMARY KEY(E1) create table t1 (E1 INTEGER UNSIGNED NOT NULL, E2 INTEGER UNSIGNED NOT NULL, E3 INTEGER UNSIGNED NOT NULL, PRIMARY KEY(E1)
); );

View File

@ -10,7 +10,7 @@ CREATE TABLE mysql_test.t1(a INT);
CREATE TABLE mysql_test.t2(b INT); CREATE TABLE mysql_test.t2(b INT);
CREATE TABLE mysql_test.t3(c INT); CREATE TABLE mysql_test.t3(c INT);
SET SESSION DEBUG = "+d,bug43138"; SET SESSION debug_dbug= "+d,bug43138";
DROP DATABASE mysql_test; DROP DATABASE mysql_test;
Warnings: Warnings:
@ -18,7 +18,7 @@ Error 1051 Unknown table 't1'
Error 1051 Unknown table 't2' Error 1051 Unknown table 't2'
Error 1051 Unknown table 't3' Error 1051 Unknown table 't3'
SET SESSION DEBUG = "-d,bug43138"; SET SESSION debug_dbug= "-d,bug43138";
# -- # --
# -- End of Bug#43138. # -- End of Bug#43138.

View File

@ -218,7 +218,7 @@ select column_get(column_create(1, -1212 AS int), 1 as unsigned int);
column_get(column_create(1, -1212 AS int), 1 as unsigned int) column_get(column_create(1, -1212 AS int), 1 as unsigned int)
18446744073709550404 18446744073709550404
Warnings: Warnings:
Warning 1105 Cast to unsigned converted negative integer to it's positive complement Note 1105 Cast to unsigned converted negative integer to it's positive complement
select column_get(column_create(1, 99999999999999999999999999999 AS decimal), 1 as unsigned int); select column_get(column_create(1, 99999999999999999999999999999 AS decimal), 1 as unsigned int);
column_get(column_create(1, 99999999999999999999999999999 AS decimal), 1 as unsigned int) column_get(column_create(1, 99999999999999999999999999999 AS decimal), 1 as unsigned int)
18446744073709551615 18446744073709551615
@ -309,7 +309,7 @@ select column_get(column_create(1, 18446744073709551615 AS unsigned int), 1 as i
column_get(column_create(1, 18446744073709551615 AS unsigned int), 1 as int) column_get(column_create(1, 18446744073709551615 AS unsigned int), 1 as int)
-1 -1
Warnings: Warnings:
Warning 1105 Cast to signed converted positive out-of-range integer to it's negative complement Note 1105 Cast to signed converted positive out-of-range integer to it's negative complement
select column_get(column_create(1, 99999999999999999999999999999 AS decimal), 1 as int); select column_get(column_create(1, 99999999999999999999999999999 AS decimal), 1 as int);
column_get(column_create(1, 99999999999999999999999999999 AS decimal), 1 as int) column_get(column_create(1, 99999999999999999999999999999 AS decimal), 1 as int)
9223372036854775807 9223372036854775807
@ -345,7 +345,7 @@ select column_get(COLUMN_CREATE(1, ~0), 1 as signed);
column_get(COLUMN_CREATE(1, ~0), 1 as signed) column_get(COLUMN_CREATE(1, ~0), 1 as signed)
-1 -1
Warnings: Warnings:
Warning 1105 Cast to signed converted positive out-of-range integer to it's negative complement Note 1105 Cast to signed converted positive out-of-range integer to it's negative complement
select column_get(COLUMN_CREATE(1, ~0), 1 as unsigned); select column_get(COLUMN_CREATE(1, ~0), 1 as unsigned);
column_get(COLUMN_CREATE(1, ~0), 1 as unsigned) column_get(COLUMN_CREATE(1, ~0), 1 as unsigned)
18446744073709551615 18446744073709551615
@ -356,7 +356,7 @@ select column_get(COLUMN_CREATE(1, -1), 1 as unsigned);
column_get(COLUMN_CREATE(1, -1), 1 as unsigned) column_get(COLUMN_CREATE(1, -1), 1 as unsigned)
18446744073709551615 18446744073709551615
Warnings: Warnings:
Warning 1105 Cast to unsigned converted negative integer to it's positive complement Note 1105 Cast to unsigned converted negative integer to it's positive complement
# #
#column get char #column get char
# #
@ -1146,7 +1146,7 @@ column_list(column_create(1, NULL as integer))
select HEX(COLUMN_CREATE(1, 5, 1, 5)); select HEX(COLUMN_CREATE(1, 5, 1, 5));
ERROR 22007: Illegal value used as argument of dynamic column function ERROR 22007: Illegal value used as argument of dynamic column function
select HEX(COLUMN_CREATE("", 1, 5, 1, 5)); select HEX(COLUMN_CREATE("", 1, 5, 1, 5));
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '))' at line 1
select COLUMN_LIST("a"); select COLUMN_LIST("a");
ERROR HY000: Encountered illegal format of dynamic column string ERROR HY000: Encountered illegal format of dynamic column string
select column_delete("a", 1); select column_delete("a", 1);

View File

@ -13,7 +13,7 @@ INSERT INTO t1 VALUES
('AAAAAAAAAH','AAAAAAAAAH'), ('AAAAAAAAAI','AAAAAAAAAI'), ('AAAAAAAAAH','AAAAAAAAAH'), ('AAAAAAAAAI','AAAAAAAAAI'),
('AAAAAAAAAJ','AAAAAAAAAJ'), ('AAAAAAAAAK','AAAAAAAAAK'); ('AAAAAAAAAJ','AAAAAAAAAJ'), ('AAAAAAAAAK','AAAAAAAAAK');
set tmp_table_size=1024; set tmp_table_size=1024;
set session debug="d,raise_error"; set session debug_dbug="d,raise_error";
SELECT MAX(a) FROM t1 GROUP BY a,b; SELECT MAX(a) FROM t1 GROUP BY a,b;
ERROR 23000: Can't write; duplicate key in table 'tmp_table' ERROR 23000: Can't write; duplicate key in table 'tmp_table'
set tmp_table_size=default; set tmp_table_size=default;
@ -23,9 +23,9 @@ DROP TABLE t1;
# #
CREATE TABLE t1 (a INT(100) NOT NULL); CREATE TABLE t1 (a INT(100) NOT NULL);
INSERT INTO t1 VALUES (1), (0), (2); INSERT INTO t1 VALUES (1), (0), (2);
SET SESSION debug='+d,alter_table_only_index_change'; SET SESSION debug_dbug='+d,alter_table_only_index_change';
ALTER TABLE t1 ADD INDEX a(a); ALTER TABLE t1 ADD INDEX a(a);
SET SESSION debug=DEFAULT; SET SESSION debug_dbug=DEFAULT;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
@ -42,10 +42,10 @@ DROP TABLE t1;
# Bug#42064: low memory crash when importing hex strings, in Item_hex_string::Item_hex_string # Bug#42064: low memory crash when importing hex strings, in Item_hex_string::Item_hex_string
# #
CREATE TABLE t1(a BLOB); CREATE TABLE t1(a BLOB);
SET SESSION debug="+d,bug42064_simulate_oom"; SET SESSION debug_dbug="+d,bug42064_simulate_oom";
INSERT INTO t1 VALUES(""); INSERT INTO t1 VALUES("");
Got one of the listed errors Got one of the listed errors
SET SESSION debug=DEFAULT; SET SESSION debug_dbug=DEFAULT;
DROP TABLE t1; DROP TABLE t1;
# #
# Bug#41660: Sort-index_merge for non-first join table may require # Bug#41660: Sort-index_merge for non-first join table may require
@ -62,7 +62,7 @@ INSERT INTO t2 VALUES (1, 1, 'data');
# re-scanned for every record in the outer table. if we used inner join, # re-scanned for every record in the outer table. if we used inner join,
# we would need to have thousands of records and/or more columns in both # we would need to have thousands of records and/or more columns in both
# tables so that the join buffer is filled and re-scans are triggered). # tables so that the join buffer is filled and re-scans are triggered).
SET SESSION debug = '+d,only_one_Unique_may_be_created'; SET SESSION debug_dbug= '+d,only_one_Unique_may_be_created';
EXPLAIN EXPLAIN
SELECT * FROM t1 LEFT JOIN t2 ON ( t2.a < 10 OR t2.b < 10 ); SELECT * FROM t1 LEFT JOIN t2 ON ( t2.a < 10 OR t2.b < 10 );
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
@ -80,7 +80,7 @@ a a b filler
7 1 1 data 7 1 1 data
8 1 1 data 8 1 1 data
9 1 1 data 9 1 1 data
SET SESSION debug = DEFAULT; SET SESSION debug_dbug= DEFAULT;
DROP TABLE t1, t2; DROP TABLE t1, t2;
# #
# End of 5.1 tests # End of 5.1 tests

View File

@ -223,9 +223,9 @@ user(),
'utf8_general_ci', 'utf8_general_ci',
'select 1'); 'select 1');
show create event root22; show create event root22;
ERROR 42000: This version of MySQL doesn't yet support 'MICROSECOND' ERROR 42000: This version of MariaDB doesn't yet support 'MICROSECOND'
SHOW EVENTS; SHOW EVENTS;
ERROR 42000: This version of MySQL doesn't yet support 'MICROSECOND' ERROR 42000: This version of MariaDB doesn't yet support 'MICROSECOND'
drop event root22; drop event root22;
create event root23 on schedule every -100 year do select 1; create event root23 on schedule every -100 year do select 1;
ERROR HY000: INTERVAL is either not positive or too big ERROR HY000: INTERVAL is either not positive or too big

View File

@ -41,11 +41,11 @@ Note 1588 Event execution time is in the past and ON COMPLETION NOT PRESERVE is
show events; show events;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
create event e_55 on schedule at 20200101000000 starts 10000101000000 do drop table t; create event e_55 on schedule at 20200101000000 starts 10000101000000 do drop table t;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'starts 10000101000000 do drop table t' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'starts 10000101000000 do drop table t' at line 1
create event e_55 on schedule at 20200101000000 ends 10000101000000 do drop table t; create event e_55 on schedule at 20200101000000 ends 10000101000000 do drop table t;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ends 10000101000000 do drop table t' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ends 10000101000000 do drop table t' at line 1
create event e_55 on schedule at 20200101000000 starts 10000101000000 ends 10000101000000 do drop table t; create event e_55 on schedule at 20200101000000 starts 10000101000000 ends 10000101000000 do drop table t;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'starts 10000101000000 ends 10000101000000 do drop table t' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'starts 10000101000000 ends 10000101000000 do drop table t' at line 1
create event e_55 on schedule every 10 hour starts 10000101000000 do drop table t; create event e_55 on schedule every 10 hour starts 10000101000000 do drop table t;
ERROR HY000: Incorrect STARTS value: '10000101000000' ERROR HY000: Incorrect STARTS value: '10000101000000'
set global event_scheduler=off; set global event_scheduler=off;
@ -218,13 +218,13 @@ drop event events_test.mysqltest_user1;
drop user mysqltest_user1@localhost; drop user mysqltest_user1@localhost;
drop database mysqltest_db1; drop database mysqltest_db1;
create event e_53 on schedule at (select s1 from ttx) do drop table t; create event e_53 on schedule at (select s1 from ttx) do drop table t;
ERROR 42000: This version of MySQL doesn't yet support 'Usage of subqueries or stored function calls as part of this statement' ERROR 42000: This version of MariaDB doesn't yet support 'Usage of subqueries or stored function calls as part of this statement'
create event e_53 on schedule every (select s1 from ttx) second do drop table t; create event e_53 on schedule every (select s1 from ttx) second do drop table t;
ERROR 42000: This version of MySQL doesn't yet support 'Usage of subqueries or stored function calls as part of this statement' ERROR 42000: This version of MariaDB doesn't yet support 'Usage of subqueries or stored function calls as part of this statement'
create event e_53 on schedule every 5 second starts (select s1 from ttx) do drop table t; create event e_53 on schedule every 5 second starts (select s1 from ttx) do drop table t;
ERROR 42000: This version of MySQL doesn't yet support 'Usage of subqueries or stored function calls as part of this statement' ERROR 42000: This version of MariaDB doesn't yet support 'Usage of subqueries or stored function calls as part of this statement'
create event e_53 on schedule every 5 second ends (select s1 from ttx) do drop table t; create event e_53 on schedule every 5 second ends (select s1 from ttx) do drop table t;
ERROR 42000: This version of MySQL doesn't yet support 'Usage of subqueries or stored function calls as part of this statement' ERROR 42000: This version of MariaDB doesn't yet support 'Usage of subqueries or stored function calls as part of this statement'
drop event if exists e_16; drop event if exists e_16;
drop procedure if exists p_16; drop procedure if exists p_16;
create event e_16 on schedule every 1 second do set @a=5; create event e_16 on schedule every 1 second do set @a=5;
@ -265,7 +265,7 @@ begin
call p22830_wait(); call p22830_wait();
select 123; select 123;
end| end|
ERROR 42000: This version of MySQL doesn't yet support 'Usage of subqueries or stored function calls as part of this statement' ERROR 42000: This version of MariaDB doesn't yet support 'Usage of subqueries or stored function calls as part of this statement'
create event e22830_1 on schedule every 1 hour do create event e22830_1 on schedule every 1 hour do
begin begin
call p22830_wait(); call p22830_wait();
@ -330,7 +330,7 @@ end 1 HOUR
drop procedure p22830_wait; drop procedure p22830_wait;
drop function f22830; drop function f22830;
drop event (select a from t2); drop event (select a from t2);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(select a from t2)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '(select a from t2)' at line 1
drop event e22830_1; drop event e22830_1;
drop event e22830_2; drop event e22830_2;
drop event e22830_3; drop event e22830_3;
@ -560,11 +560,11 @@ ERROR HY000: Incorrect AT value: '0every day'
CREATE EVENT new_event ON SCHEDULE AT (SELECT "every day") DO SELECT 1; CREATE EVENT new_event ON SCHEDULE AT (SELECT "every day") DO SELECT 1;
ERROR HY000: Incorrect AT value: 'every day' ERROR HY000: Incorrect AT value: 'every day'
CREATE EVENT new_event ON SCHEDULE AT NOW() STARTS NOW() DO SELECT 1; CREATE EVENT new_event ON SCHEDULE AT NOW() STARTS NOW() DO SELECT 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STARTS NOW() DO SELECT 1' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'STARTS NOW() DO SELECT 1' at line 1
CREATE EVENT new_event ON SCHEDULE AT NOW() ENDS NOW() DO SELECT 1; CREATE EVENT new_event ON SCHEDULE AT NOW() ENDS NOW() DO SELECT 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ENDS NOW() DO SELECT 1' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ENDS NOW() DO SELECT 1' at line 1
CREATE EVENT new_event ON SCHEDULE AT NOW() STARTS NOW() ENDS NOW() DO SELECT 1; CREATE EVENT new_event ON SCHEDULE AT NOW() STARTS NOW() ENDS NOW() DO SELECT 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STARTS NOW() ENDS NOW() DO SELECT 1' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'STARTS NOW() ENDS NOW() DO SELECT 1' at line 1
USE test; USE test;
SHOW GRANTS FOR CURRENT_USER; SHOW GRANTS FOR CURRENT_USER;
Grants for root@localhost Grants for root@localhost
@ -644,13 +644,13 @@ SET GLOBAL READ_ONLY = 1;
# #
CREATE EVENT e1 ON SCHEDULE AT '2020-01-01 00:00:00' DO SET @a = 1; CREATE EVENT e1 ON SCHEDULE AT '2020-01-01 00:00:00' DO SET @a = 1;
ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement
ALTER EVENT e1 COMMENT 'comment'; ALTER EVENT e1 COMMENT 'comment';
ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement
DROP EVENT e1; DROP EVENT e1;
ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement
# #
# Connection: root_con (root@localhost/events_test). # Connection: root_con (root@localhost/events_test).

View File

@ -1,13 +1,13 @@
create database if not exists events_test; create database if not exists events_test;
use events_test; use events_test;
CREATE EVENT micro_test ON SCHEDULE EVERY 100 MICROSECOND DO SELECT 1; CREATE EVENT micro_test ON SCHEDULE EVERY 100 MICROSECOND DO SELECT 1;
ERROR 42000: This version of MySQL doesn't yet support 'MICROSECOND' ERROR 42000: This version of MariaDB doesn't yet support 'MICROSECOND'
CREATE EVENT micro_test ON SCHEDULE EVERY 100 DAY_MICROSECOND DO SELECT 1; CREATE EVENT micro_test ON SCHEDULE EVERY 100 DAY_MICROSECOND DO SELECT 1;
ERROR 42000: This version of MySQL doesn't yet support 'MICROSECOND' ERROR 42000: This version of MariaDB doesn't yet support 'MICROSECOND'
CREATE EVENT micro_test ON SCHEDULE EVERY 100 HOUR_MICROSECOND DO SELECT 1; CREATE EVENT micro_test ON SCHEDULE EVERY 100 HOUR_MICROSECOND DO SELECT 1;
ERROR 42000: This version of MySQL doesn't yet support 'MICROSECOND' ERROR 42000: This version of MariaDB doesn't yet support 'MICROSECOND'
CREATE EVENT micro_test ON SCHEDULE EVERY 100 MINUTE_MICROSECOND DO SELECT 1; CREATE EVENT micro_test ON SCHEDULE EVERY 100 MINUTE_MICROSECOND DO SELECT 1;
ERROR 42000: This version of MySQL doesn't yet support 'MICROSECOND' ERROR 42000: This version of MariaDB doesn't yet support 'MICROSECOND'
CREATE EVENT micro_test ON SCHEDULE EVERY 100 SECOND_MICROSECOND DO SELECT 1; CREATE EVENT micro_test ON SCHEDULE EVERY 100 SECOND_MICROSECOND DO SELECT 1;
ERROR 42000: This version of MySQL doesn't yet support 'MICROSECOND' ERROR 42000: This version of MariaDB doesn't yet support 'MICROSECOND'
drop database events_test; drop database events_test;

View File

@ -4,11 +4,11 @@ SET @old_debug= @@session.debug;
# #
CREATE TABLE t1(f0 int auto_increment primary key, f1 int); CREATE TABLE t1(f0 int auto_increment primary key, f1 int);
INSERT INTO t1(f1) VALUES (0),(1),(2),(3),(4),(5); INSERT INTO t1(f1) VALUES (0),(1),(2),(3),(4),(5);
SET session debug= '+d,make_char_array_fail'; SET session debug_dbug= '+d,make_char_array_fail';
CALL mtr.add_suppression("Out of sort memory"); CALL mtr.add_suppression("Out of sort memory");
SELECT * FROM t1 ORDER BY f1 ASC, f0; SELECT * FROM t1 ORDER BY f1 ASC, f0;
ERROR HY001: Out of sort memory, consider increasing server sort buffer size ERROR HY001: Out of sort memory, consider increasing server sort buffer size
SET session debug= @old_debug; SET session debug_dbug= @old_debug;
CREATE FUNCTION f1() RETURNS INT RETURN 1; CREATE FUNCTION f1() RETURNS INT RETURN 1;
DELETE FROM t1 ORDER BY (f1(10)) LIMIT 1; DELETE FROM t1 ORDER BY (f1(10)) LIMIT 1;
ERROR 42000: Incorrect number of arguments for FUNCTION test.f1; expected 0, got 1 ERROR 42000: Incorrect number of arguments for FUNCTION test.f1; expected 0, got 1

View File

@ -117,15 +117,15 @@ drop tables t1, t2;
# I. Check the incompatible changes in the grammar. # I. Check the incompatible changes in the grammar.
# #
flush tables with read lock, hosts; flush tables with read lock, hosts;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' hosts' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' hosts' at line 1
flush privileges, tables; flush privileges, tables;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'tables' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'tables' at line 1
flush privileges, tables with read lock; flush privileges, tables with read lock;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'tables with read lock' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'tables with read lock' at line 1
flush privileges, tables; flush privileges, tables;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'tables' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'tables' at line 1
flush tables with read lock, tables; flush tables with read lock, tables;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' tables' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' tables' at line 1
show tables; show tables;
Tables_in_test Tables_in_test
# #

View File

@ -44,41 +44,41 @@ drop table if exists t_34455;
create table t_34455 ( create table t_34455 (
a int not null, a int not null,
foreign key (a) references t3 (a) match full match partial); foreign key (a) references t3 (a) match full match partial);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'match partial)' at line 3 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'match partial)' at line 3
create table t_34455 ( create table t_34455 (
a int not null, a int not null,
foreign key (a) references t3 (a) on delete set default match full); foreign key (a) references t3 (a) on delete set default match full);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'match full)' at line 3 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'match full)' at line 3
create table t_34455 ( create table t_34455 (
a int not null, a int not null,
foreign key (a) references t3 (a) on update set default match full); foreign key (a) references t3 (a) on update set default match full);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'match full)' at line 3 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'match full)' at line 3
create table t_34455 ( create table t_34455 (
a int not null, a int not null,
foreign key (a) references t3 (a) foreign key (a) references t3 (a)
on delete set default on delete set default); on delete set default on delete set default);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'delete set default)' at line 4 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'delete set default)' at line 4
create table t_34455 ( create table t_34455 (
a int not null, a int not null,
foreign key (a) references t3 (a) foreign key (a) references t3 (a)
on update set default on update set default); on update set default on update set default);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'update set default)' at line 4 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'update set default)' at line 4
create table t_34455 (a int not null); create table t_34455 (a int not null);
alter table t_34455 alter table t_34455
add foreign key (a) references t3 (a) match full match partial); add foreign key (a) references t3 (a) match full match partial);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'match partial)' at line 2 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'match partial)' at line 2
alter table t_34455 alter table t_34455
add foreign key (a) references t3 (a) on delete set default match full); add foreign key (a) references t3 (a) on delete set default match full);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'match full)' at line 2 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'match full)' at line 2
alter table t_34455 alter table t_34455
add foreign key (a) references t3 (a) on update set default match full); add foreign key (a) references t3 (a) on update set default match full);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'match full)' at line 2 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'match full)' at line 2
alter table t_34455 alter table t_34455
add foreign key (a) references t3 (a) add foreign key (a) references t3 (a)
on delete set default on delete set default); on delete set default on delete set default);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'delete set default)' at line 3 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'delete set default)' at line 3
alter table t_34455 alter table t_34455
add foreign key (a) references t3 (a) add foreign key (a) references t3 (a)
on update set default on update set default); on update set default on update set default);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'update set default)' at line 3 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'update set default)' at line 3
drop table t_34455; drop table t_34455;

View File

@ -49,7 +49,7 @@ a b
Full-text indexes are called collections Full-text indexes are called collections
Only MyISAM tables support collections Only MyISAM tables support collections
select * from t1 where MATCH(a,b) AGAINST ("indexes" IN BOOLEAN MODE WITH QUERY EXPANSION); select * from t1 where MATCH(a,b) AGAINST ("indexes" IN BOOLEAN MODE WITH QUERY EXPANSION);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'QUERY EXPANSION)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'QUERY EXPANSION)' at line 1
explain select * from t1 where MATCH(a,b) AGAINST ("collections"); explain select * from t1 where MATCH(a,b) AGAINST ("collections");
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 fulltext a a 0 1 Using where 1 SIMPLE t1 fulltext a a 0 1 Using where
@ -575,12 +575,12 @@ DROP TABLE t1;
# #
CREATE TABLE t1(col1 TEXT, CREATE TABLE t1(col1 TEXT,
FULLTEXT INDEX USING BTREE (col1)); FULLTEXT INDEX USING BTREE (col1));
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'USING BTREE (col1))' at line 2 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'USING BTREE (col1))' at line 2
CREATE TABLE t2(col1 TEXT); CREATE TABLE t2(col1 TEXT);
CREATE FULLTEXT INDEX USING BTREE ON t2(col); CREATE FULLTEXT INDEX USING BTREE ON t2(col);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'USING BTREE ON t2(col)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'USING BTREE ON t2(col)' at line 1
ALTER TABLE t2 ADD FULLTEXT INDEX USING BTREE (col1); ALTER TABLE t2 ADD FULLTEXT INDEX USING BTREE (col1);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'USING BTREE (col1)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'USING BTREE (col1)' at line 1
DROP TABLE t2; DROP TABLE t2;
End of 5.0 tests End of 5.0 tests
# #

View File

@ -286,54 +286,54 @@ select cast(-2 as unsigned), 18446744073709551614, -2;
cast(-2 as unsigned) 18446744073709551614 -2 cast(-2 as unsigned) 18446744073709551614 -2
18446744073709551614 18446744073709551614 -2 18446744073709551614 18446744073709551614 -2
Warnings: Warnings:
Warning 1105 Cast to unsigned converted negative integer to it's positive complement Note 1105 Cast to unsigned converted negative integer to it's positive complement
select abs(cast(-2 as unsigned)), abs(18446744073709551614), abs(-2); select abs(cast(-2 as unsigned)), abs(18446744073709551614), abs(-2);
abs(cast(-2 as unsigned)) abs(18446744073709551614) abs(-2) abs(cast(-2 as unsigned)) abs(18446744073709551614) abs(-2)
18446744073709551614 18446744073709551614 2 18446744073709551614 18446744073709551614 2
Warnings: Warnings:
Warning 1105 Cast to unsigned converted negative integer to it's positive complement Note 1105 Cast to unsigned converted negative integer to it's positive complement
select ceiling(cast(-2 as unsigned)), ceiling(18446744073709551614), ceiling(-2); select ceiling(cast(-2 as unsigned)), ceiling(18446744073709551614), ceiling(-2);
ceiling(cast(-2 as unsigned)) ceiling(18446744073709551614) ceiling(-2) ceiling(cast(-2 as unsigned)) ceiling(18446744073709551614) ceiling(-2)
18446744073709551614 18446744073709551614 -2 18446744073709551614 18446744073709551614 -2
Warnings: Warnings:
Warning 1105 Cast to unsigned converted negative integer to it's positive complement Note 1105 Cast to unsigned converted negative integer to it's positive complement
select floor(cast(-2 as unsigned)), floor(18446744073709551614), floor(-2); select floor(cast(-2 as unsigned)), floor(18446744073709551614), floor(-2);
floor(cast(-2 as unsigned)) floor(18446744073709551614) floor(-2) floor(cast(-2 as unsigned)) floor(18446744073709551614) floor(-2)
18446744073709551614 18446744073709551614 -2 18446744073709551614 18446744073709551614 -2
Warnings: Warnings:
Warning 1105 Cast to unsigned converted negative integer to it's positive complement Note 1105 Cast to unsigned converted negative integer to it's positive complement
select format(cast(-2 as unsigned), 2), format(18446744073709551614, 2), format(-2, 2); select format(cast(-2 as unsigned), 2), format(18446744073709551614, 2), format(-2, 2);
format(cast(-2 as unsigned), 2) format(18446744073709551614, 2) format(-2, 2) format(cast(-2 as unsigned), 2) format(18446744073709551614, 2) format(-2, 2)
18,446,744,073,709,551,614.00 18,446,744,073,709,551,614.00 -2.00 18,446,744,073,709,551,614.00 18,446,744,073,709,551,614.00 -2.00
Warnings: Warnings:
Warning 1105 Cast to unsigned converted negative integer to it's positive complement Note 1105 Cast to unsigned converted negative integer to it's positive complement
select sqrt(cast(-2 as unsigned)), sqrt(18446744073709551614), sqrt(-2); select sqrt(cast(-2 as unsigned)), sqrt(18446744073709551614), sqrt(-2);
sqrt(cast(-2 as unsigned)) sqrt(18446744073709551614) sqrt(-2) sqrt(cast(-2 as unsigned)) sqrt(18446744073709551614) sqrt(-2)
4294967296 4294967296 NULL 4294967296 4294967296 NULL
Warnings: Warnings:
Warning 1105 Cast to unsigned converted negative integer to it's positive complement Note 1105 Cast to unsigned converted negative integer to it's positive complement
select round(cast(-2 as unsigned), 1), round(18446744073709551614, 1), round(-2, 1); select round(cast(-2 as unsigned), 1), round(18446744073709551614, 1), round(-2, 1);
round(cast(-2 as unsigned), 1) round(18446744073709551614, 1) round(-2, 1) round(cast(-2 as unsigned), 1) round(18446744073709551614, 1) round(-2, 1)
18446744073709551614 18446744073709551614 -2 18446744073709551614 18446744073709551614 -2
Warnings: Warnings:
Warning 1105 Cast to unsigned converted negative integer to it's positive complement Note 1105 Cast to unsigned converted negative integer to it's positive complement
select round(4, cast(-2 as unsigned)), round(4, 18446744073709551614), round(4, -2); select round(4, cast(-2 as unsigned)), round(4, 18446744073709551614), round(4, -2);
round(4, cast(-2 as unsigned)) round(4, 18446744073709551614) round(4, -2) round(4, cast(-2 as unsigned)) round(4, 18446744073709551614) round(4, -2)
4 4 0 4 4 0
Warnings: Warnings:
Warning 1105 Cast to unsigned converted negative integer to it's positive complement Note 1105 Cast to unsigned converted negative integer to it's positive complement
Warning 1105 Cast to unsigned converted negative integer to it's positive complement Note 1105 Cast to unsigned converted negative integer to it's positive complement
select truncate(cast(-2 as unsigned), 1), truncate(18446744073709551614, 1), truncate(-2, 1); select truncate(cast(-2 as unsigned), 1), truncate(18446744073709551614, 1), truncate(-2, 1);
truncate(cast(-2 as unsigned), 1) truncate(18446744073709551614, 1) truncate(-2, 1) truncate(cast(-2 as unsigned), 1) truncate(18446744073709551614, 1) truncate(-2, 1)
18446744073709551614 18446744073709551614 -2 18446744073709551614 18446744073709551614 -2
Warnings: Warnings:
Warning 1105 Cast to unsigned converted negative integer to it's positive complement Note 1105 Cast to unsigned converted negative integer to it's positive complement
select truncate(4, cast(-2 as unsigned)), truncate(4, 18446744073709551614), truncate(4, -2); select truncate(4, cast(-2 as unsigned)), truncate(4, 18446744073709551614), truncate(4, -2);
truncate(4, cast(-2 as unsigned)) truncate(4, 18446744073709551614) truncate(4, -2) truncate(4, cast(-2 as unsigned)) truncate(4, 18446744073709551614) truncate(4, -2)
4 4 0 4 4 0
Warnings: Warnings:
Warning 1105 Cast to unsigned converted negative integer to it's positive complement Note 1105 Cast to unsigned converted negative integer to it's positive complement
Warning 1105 Cast to unsigned converted negative integer to it's positive complement Note 1105 Cast to unsigned converted negative integer to it's positive complement
select round(10000000000000000000, -19), truncate(10000000000000000000, -19); select round(10000000000000000000, -19), truncate(10000000000000000000, -19);
round(10000000000000000000, -19) truncate(10000000000000000000, -19) round(10000000000000000000, -19) truncate(10000000000000000000, -19)
10000000000000000000 10000000000000000000 10000000000000000000 10000000000000000000
@ -386,17 +386,17 @@ select mod(cast(-2 as unsigned), 3), mod(18446744073709551614, 3), mod(-2, 3);
mod(cast(-2 as unsigned), 3) mod(18446744073709551614, 3) mod(-2, 3) mod(cast(-2 as unsigned), 3) mod(18446744073709551614, 3) mod(-2, 3)
2 2 -2 2 2 -2
Warnings: Warnings:
Warning 1105 Cast to unsigned converted negative integer to it's positive complement Note 1105 Cast to unsigned converted negative integer to it's positive complement
select mod(5, cast(-2 as unsigned)), mod(5, 18446744073709551614), mod(5, -2); select mod(5, cast(-2 as unsigned)), mod(5, 18446744073709551614), mod(5, -2);
mod(5, cast(-2 as unsigned)) mod(5, 18446744073709551614) mod(5, -2) mod(5, cast(-2 as unsigned)) mod(5, 18446744073709551614) mod(5, -2)
5 5 1 5 5 1
Warnings: Warnings:
Warning 1105 Cast to unsigned converted negative integer to it's positive complement Note 1105 Cast to unsigned converted negative integer to it's positive complement
select pow(cast(-2 as unsigned), 5), pow(18446744073709551614, 5), pow(-2, 5); select pow(cast(-2 as unsigned), 5), pow(18446744073709551614, 5), pow(-2, 5);
pow(cast(-2 as unsigned), 5) pow(18446744073709551614, 5) pow(-2, 5) pow(cast(-2 as unsigned), 5) pow(18446744073709551614, 5) pow(-2, 5)
2.13598703592091e96 2.13598703592091e96 -32 2.13598703592091e96 2.13598703592091e96 -32
Warnings: Warnings:
Warning 1105 Cast to unsigned converted negative integer to it's positive complement Note 1105 Cast to unsigned converted negative integer to it's positive complement
CREATE TABLE t1 (a timestamp, b varchar(20), c bit(1)); CREATE TABLE t1 (a timestamp, b varchar(20), c bit(1));
INSERT INTO t1 VALUES('1998-09-23', 'str1', 1), ('2003-03-25', 'str2', 0); INSERT INTO t1 VALUES('1998-09-23', 'str1', 1), ('2003-03-25', 'str2', 0);
SELECT a DIV 900 y FROM t1 GROUP BY y; SELECT a DIV 900 y FROM t1 GROUP BY y;

View File

@ -1027,7 +1027,7 @@ SELECT MAKETIME(CAST(-1 AS UNSIGNED), 0, 0);
MAKETIME(CAST(-1 AS UNSIGNED), 0, 0) MAKETIME(CAST(-1 AS UNSIGNED), 0, 0)
838:59:59 838:59:59
Warnings: Warnings:
Warning 1105 Cast to unsigned converted negative integer to it's positive complement Note 1105 Cast to unsigned converted negative integer to it's positive complement
Warning 1292 Truncated incorrect time value: '18446744073709551615:00:00' Warning 1292 Truncated incorrect time value: '18446744073709551615:00:00'
SELECT EXTRACT(HOUR FROM '100000:02:03'); SELECT EXTRACT(HOUR FROM '100000:02:03');
EXTRACT(HOUR FROM '100000:02:03') EXTRACT(HOUR FROM '100000:02:03')
@ -1047,8 +1047,8 @@ SELECT SEC_TO_TIME(CAST(-1 AS UNSIGNED));
SEC_TO_TIME(CAST(-1 AS UNSIGNED)) SEC_TO_TIME(CAST(-1 AS UNSIGNED))
838:59:59 838:59:59
Warnings: Warnings:
Warning 1105 Cast to unsigned converted negative integer to it's positive complement Note 1105 Cast to unsigned converted negative integer to it's positive complement
Warning 1105 Cast to unsigned converted negative integer to it's positive complement Note 1105 Cast to unsigned converted negative integer to it's positive complement
Warning 1292 Truncated incorrect time value: '18446744073709551615' Warning 1292 Truncated incorrect time value: '18446744073709551615'
SET NAMES latin1; SET NAMES latin1;
SET character_set_results = NULL; SET character_set_results = NULL;

View File

@ -1017,12 +1017,12 @@ DROP TABLE t1;
# #
CREATE TABLE t1(col1 MULTIPOLYGON NOT NULL, CREATE TABLE t1(col1 MULTIPOLYGON NOT NULL,
SPATIAL INDEX USING BTREE (col1)); SPATIAL INDEX USING BTREE (col1));
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'USING BTREE (col1))' at line 2 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'USING BTREE (col1))' at line 2
CREATE TABLE t2(col1 MULTIPOLYGON NOT NULL); CREATE TABLE t2(col1 MULTIPOLYGON NOT NULL);
CREATE SPATIAL INDEX USING BTREE ON t2(col); CREATE SPATIAL INDEX USING BTREE ON t2(col);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'USING BTREE ON t2(col)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'USING BTREE ON t2(col)' at line 1
ALTER TABLE t2 ADD SPATIAL INDEX USING BTREE (col1); ALTER TABLE t2 ADD SPATIAL INDEX USING BTREE (col1);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'USING BTREE (col1)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'USING BTREE (col1)' at line 1
DROP TABLE t2; DROP TABLE t2;
End of 5.0 tests End of 5.0 tests
create table t1 (f1 tinyint(1), f2 char(1), f3 varchar(1), f4 geometry, f5 datetime); create table t1 (f1 tinyint(1), f2 char(1), f3 varchar(1), f4 geometry, f5 datetime);

View File

@ -247,7 +247,7 @@ drop user 'mysqltest_1b', 'mysqltest_2b', 'mysqltest_3b';
ERROR HY000: Operation DROP USER failed for 'mysqltest_2b'@'%' ERROR HY000: Operation DROP USER failed for 'mysqltest_2b'@'%'
create user 'mysqltest_2' identified by 'Mysqltest-2'; create user 'mysqltest_2' identified by 'Mysqltest-2';
drop user 'mysqltest_2' identified by 'Mysqltest-2'; drop user 'mysqltest_2' identified by 'Mysqltest-2';
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'identified by 'Mysqltest-2'' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'identified by 'Mysqltest-2'' at line 1
drop user 'mysqltest_2'; drop user 'mysqltest_2';
create user '%@b'@'b'; create user '%@b'@'b';
show grants for '%@b'@'b'; show grants for '%@b'@'b';

View File

@ -1511,9 +1511,9 @@ EXPLAIN SELECT a FROM t1 USE INDEX (i2) USE INDEX ();
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL i2 9 NULL 144 Using index 1 SIMPLE t1 index NULL i2 9 NULL 144 Using index
EXPLAIN SELECT a FROM t1 FORCE INDEX (); EXPLAIN SELECT a FROM t1 FORCE INDEX ();
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 1
EXPLAIN SELECT a FROM t1 IGNORE INDEX (); EXPLAIN SELECT a FROM t1 IGNORE INDEX ();
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 1
EXPLAIN SELECT a FROM t1 USE INDEX FOR JOIN (i2) EXPLAIN SELECT a FROM t1 USE INDEX FOR JOIN (i2)
USE INDEX FOR GROUP BY (i2) GROUP BY a; USE INDEX FOR GROUP BY (i2) GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra

View File

@ -237,7 +237,7 @@ count_col1 group_col2
20 hello 20 hello
30 hello 30 hello
select sum(col1) as co12 from t1 group by col2 having col2 10; select sum(col1) as co12 from t1 group by col2 having col2 10;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '10' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '10' at line 1
select sum(col1) as co2, count(col2) as cc from t1 group by col1 having col1 =10; select sum(col1) as co2, count(col2) as cc from t1 group by col1 having col1 =10;
co2 cc co2 cc
40 4 40 4

View File

@ -1090,7 +1090,7 @@ c int(11) YES NULL
drop view v1; drop view v1;
drop table t1; drop table t1;
alter database information_schema; alter database information_schema;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
drop database information_schema; drop database information_schema;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
drop table information_schema.tables; drop table information_schema.tables;
@ -1307,9 +1307,9 @@ delete from v1;
drop view v1,v2; drop view v1,v2;
drop table t1,t2; drop table t1,t2;
alter database; alter database;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
alter database test; alter database test;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
create database mysqltest; create database mysqltest;
create table mysqltest.t1(a int, b int, c int); create table mysqltest.t1(a int, b int, c int);
create trigger mysqltest.t1_ai after insert on mysqltest.t1 create trigger mysqltest.t1_ai after insert on mysqltest.t1

View File

@ -368,7 +368,7 @@ CREATE DATABASE i_s_parameters_test;
USE i_s_parameters_test; USE i_s_parameters_test;
CREATE FUNCTION test_func1 (s char(20) RETURNS CHAR(50) CREATE FUNCTION test_func1 (s char(20) RETURNS CHAR(50)
RETURN CONCAT('Hello', ,s,'!'); RETURN CONCAT('Hello', ,s,'!');
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'RETURNS CHAR(50) ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'RETURNS CHAR(50)
RETURN CONCAT('Hello', ,s,'!')' at line 1 RETURN CONCAT('Hello', ,s,'!')' at line 1
SELECT * FROM INFORMATION_SCHEMA.PARAMETERS SELECT * FROM INFORMATION_SCHEMA.PARAMETERS
WHERE SPECIFIC_SCHEMA = 'i_s_parameters_test' AND SPECIFIC_NAME = 'test_func1'; WHERE SPECIFIC_SCHEMA = 'i_s_parameters_test' AND SPECIFIC_NAME = 'test_func1';

View File

@ -698,7 +698,7 @@ CREATE DATABASE i_s_routines_test;
USE i_s_routines_test; USE i_s_routines_test;
CREATE FUNCTION test_func1 (s char(20) RETURNS CHAR(50) CREATE FUNCTION test_func1 (s char(20) RETURNS CHAR(50)
RETURN CONCAT('Hello', ,s,'!'); RETURN CONCAT('Hello', ,s,'!');
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'RETURNS CHAR(50) ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'RETURNS CHAR(50)
RETURN CONCAT('Hello', ,s,'!')' at line 1 RETURN CONCAT('Hello', ,s,'!')' at line 1
SELECT * FROM INFORMATION_SCHEMA.ROUTINES SELECT * FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_SCHEMA = 'i_s_routines_test' AND ROUTINE_NAME = 'test_func1'; WHERE ROUTINE_SCHEMA = 'i_s_routines_test' AND ROUTINE_NAME = 'test_func1';

View File

@ -173,7 +173,7 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1(a INT NOT NULL, b INT NOT NULL) engine=innodb; CREATE TABLE t1(a INT NOT NULL, b INT NOT NULL) engine=innodb;
INSERT INTO t1 VALUES (1, 12345), (2, 23456); INSERT INTO t1 VALUES (1, 12345), (2, 23456);
# Connection con1 # Connection con1
SET SESSION debug= "+d,alter_table_rollback_new_index"; SET SESSION debug_dbug= "+d,alter_table_rollback_new_index";
ALTER TABLE t1 ADD PRIMARY KEY(a); ALTER TABLE t1 ADD PRIMARY KEY(a);
ERROR HY000: Unknown error ERROR HY000: Unknown error
SELECT * FROM t1; SELECT * FROM t1;

View File

@ -127,13 +127,13 @@ a
1 1
2 2
select t1.a from t1 as t1 left join t1 as t2 using (a) left join t1 as t3 using (a) left join t1 as t4 using (a) left join t1 as t5 using (a) left join t1 as t6 using (a) left join t1 as t7 using (a) left join t1 as t8 using (a) left join t1 as t9 using (a) left join t1 as t10 using (a) left join t1 as t11 using (a) left join t1 as t12 using (a) left join t1 as t13 using (a) left join t1 as t14 using (a) left join t1 as t15 using (a) left join t1 as t16 using (a) left join t1 as t17 using (a) left join t1 as t18 using (a) left join t1 as t19 using (a) left join t1 as t20 using (a) left join t1 as t21 using (a) left join t1 as t22 using (a) left join t1 as t23 using (a) left join t1 as t24 using (a) left join t1 as t25 using (a) left join t1 as t26 using (a) left join t1 as t27 using (a) left join t1 as t28 using (a) left join t1 as t29 using (a) left join t1 as t30 using (a) left join t1 as t31 using (a) left join t1 as t32 using (a) left join t1 as t33 using (a) left join t1 as t34 using (a) left join t1 as t35 using (a) left join t1 as t36 using (a) left join t1 as t37 using (a) left join t1 as t38 using (a) left join t1 as t39 using (a) left join t1 as t40 using (a) left join t1 as t41 using (a) left join t1 as t42 using (a) left join t1 as t43 using (a) left join t1 as t44 using (a) left join t1 as t45 using (a) left join t1 as t46 using (a) left join t1 as t47 using (a) left join t1 as t48 using (a) left join t1 as t49 using (a) left join t1 as t50 using (a) left join t1 as t51 using (a) left join t1 as t52 using (a) left join t1 as t53 using (a) left join t1 as t54 using (a) left join t1 as t55 using (a) left join t1 as t56 using (a) left join t1 as t57 using (a) left join t1 as t58 using (a) left join t1 as t59 using (a) left join t1 as t60 using (a) left join t1 as t61 using (a) left join t1 as t62 using (a) left join t1 as t63 using (a) left join t1 as t64 using (a) left join t1 as t65 using (a); select t1.a from t1 as t1 left join t1 as t2 using (a) left join t1 as t3 using (a) left join t1 as t4 using (a) left join t1 as t5 using (a) left join t1 as t6 using (a) left join t1 as t7 using (a) left join t1 as t8 using (a) left join t1 as t9 using (a) left join t1 as t10 using (a) left join t1 as t11 using (a) left join t1 as t12 using (a) left join t1 as t13 using (a) left join t1 as t14 using (a) left join t1 as t15 using (a) left join t1 as t16 using (a) left join t1 as t17 using (a) left join t1 as t18 using (a) left join t1 as t19 using (a) left join t1 as t20 using (a) left join t1 as t21 using (a) left join t1 as t22 using (a) left join t1 as t23 using (a) left join t1 as t24 using (a) left join t1 as t25 using (a) left join t1 as t26 using (a) left join t1 as t27 using (a) left join t1 as t28 using (a) left join t1 as t29 using (a) left join t1 as t30 using (a) left join t1 as t31 using (a) left join t1 as t32 using (a) left join t1 as t33 using (a) left join t1 as t34 using (a) left join t1 as t35 using (a) left join t1 as t36 using (a) left join t1 as t37 using (a) left join t1 as t38 using (a) left join t1 as t39 using (a) left join t1 as t40 using (a) left join t1 as t41 using (a) left join t1 as t42 using (a) left join t1 as t43 using (a) left join t1 as t44 using (a) left join t1 as t45 using (a) left join t1 as t46 using (a) left join t1 as t47 using (a) left join t1 as t48 using (a) left join t1 as t49 using (a) left join t1 as t50 using (a) left join t1 as t51 using (a) left join t1 as t52 using (a) left join t1 as t53 using (a) left join t1 as t54 using (a) left join t1 as t55 using (a) left join t1 as t56 using (a) left join t1 as t57 using (a) left join t1 as t58 using (a) left join t1 as t59 using (a) left join t1 as t60 using (a) left join t1 as t61 using (a) left join t1 as t62 using (a) left join t1 as t63 using (a) left join t1 as t64 using (a) left join t1 as t65 using (a);
ERROR HY000: Too many tables; MySQL can only use XX tables in a join ERROR HY000: Too many tables; MariaDB can only use XX tables in a join
select a from t1 as t1 left join t1 as t2 using (a) left join t1 as t3 using (a) left join t1 as t4 using (a) left join t1 as t5 using (a) left join t1 as t6 using (a) left join t1 as t7 using (a) left join t1 as t8 using (a) left join t1 as t9 using (a) left join t1 as t10 using (a) left join t1 as t11 using (a) left join t1 as t12 using (a) left join t1 as t13 using (a) left join t1 as t14 using (a) left join t1 as t15 using (a) left join t1 as t16 using (a) left join t1 as t17 using (a) left join t1 as t18 using (a) left join t1 as t19 using (a) left join t1 as t20 using (a) left join t1 as t21 using (a) left join t1 as t22 using (a) left join t1 as t23 using (a) left join t1 as t24 using (a) left join t1 as t25 using (a) left join t1 as t26 using (a) left join t1 as t27 using (a) left join t1 as t28 using (a) left join t1 as t29 using (a) left join t1 as t30 using (a) left join t1 as t31 using (a); select a from t1 as t1 left join t1 as t2 using (a) left join t1 as t3 using (a) left join t1 as t4 using (a) left join t1 as t5 using (a) left join t1 as t6 using (a) left join t1 as t7 using (a) left join t1 as t8 using (a) left join t1 as t9 using (a) left join t1 as t10 using (a) left join t1 as t11 using (a) left join t1 as t12 using (a) left join t1 as t13 using (a) left join t1 as t14 using (a) left join t1 as t15 using (a) left join t1 as t16 using (a) left join t1 as t17 using (a) left join t1 as t18 using (a) left join t1 as t19 using (a) left join t1 as t20 using (a) left join t1 as t21 using (a) left join t1 as t22 using (a) left join t1 as t23 using (a) left join t1 as t24 using (a) left join t1 as t25 using (a) left join t1 as t26 using (a) left join t1 as t27 using (a) left join t1 as t28 using (a) left join t1 as t29 using (a) left join t1 as t30 using (a) left join t1 as t31 using (a);
a a
1 1
2 2
select a from t1 as t1 left join t1 as t2 using (a) left join t1 as t3 using (a) left join t1 as t4 using (a) left join t1 as t5 using (a) left join t1 as t6 using (a) left join t1 as t7 using (a) left join t1 as t8 using (a) left join t1 as t9 using (a) left join t1 as t10 using (a) left join t1 as t11 using (a) left join t1 as t12 using (a) left join t1 as t13 using (a) left join t1 as t14 using (a) left join t1 as t15 using (a) left join t1 as t16 using (a) left join t1 as t17 using (a) left join t1 as t18 using (a) left join t1 as t19 using (a) left join t1 as t20 using (a) left join t1 as t21 using (a) left join t1 as t22 using (a) left join t1 as t23 using (a) left join t1 as t24 using (a) left join t1 as t25 using (a) left join t1 as t26 using (a) left join t1 as t27 using (a) left join t1 as t28 using (a) left join t1 as t29 using (a) left join t1 as t30 using (a) left join t1 as t31 using (a) left join t1 as t32 using (a) left join t1 as t33 using (a) left join t1 as t34 using (a) left join t1 as t35 using (a) left join t1 as t36 using (a) left join t1 as t37 using (a) left join t1 as t38 using (a) left join t1 as t39 using (a) left join t1 as t40 using (a) left join t1 as t41 using (a) left join t1 as t42 using (a) left join t1 as t43 using (a) left join t1 as t44 using (a) left join t1 as t45 using (a) left join t1 as t46 using (a) left join t1 as t47 using (a) left join t1 as t48 using (a) left join t1 as t49 using (a) left join t1 as t50 using (a) left join t1 as t51 using (a) left join t1 as t52 using (a) left join t1 as t53 using (a) left join t1 as t54 using (a) left join t1 as t55 using (a) left join t1 as t56 using (a) left join t1 as t57 using (a) left join t1 as t58 using (a) left join t1 as t59 using (a) left join t1 as t60 using (a) left join t1 as t61 using (a) left join t1 as t62 using (a) left join t1 as t63 using (a) left join t1 as t64 using (a) left join t1 as t65 using (a); select a from t1 as t1 left join t1 as t2 using (a) left join t1 as t3 using (a) left join t1 as t4 using (a) left join t1 as t5 using (a) left join t1 as t6 using (a) left join t1 as t7 using (a) left join t1 as t8 using (a) left join t1 as t9 using (a) left join t1 as t10 using (a) left join t1 as t11 using (a) left join t1 as t12 using (a) left join t1 as t13 using (a) left join t1 as t14 using (a) left join t1 as t15 using (a) left join t1 as t16 using (a) left join t1 as t17 using (a) left join t1 as t18 using (a) left join t1 as t19 using (a) left join t1 as t20 using (a) left join t1 as t21 using (a) left join t1 as t22 using (a) left join t1 as t23 using (a) left join t1 as t24 using (a) left join t1 as t25 using (a) left join t1 as t26 using (a) left join t1 as t27 using (a) left join t1 as t28 using (a) left join t1 as t29 using (a) left join t1 as t30 using (a) left join t1 as t31 using (a) left join t1 as t32 using (a) left join t1 as t33 using (a) left join t1 as t34 using (a) left join t1 as t35 using (a) left join t1 as t36 using (a) left join t1 as t37 using (a) left join t1 as t38 using (a) left join t1 as t39 using (a) left join t1 as t40 using (a) left join t1 as t41 using (a) left join t1 as t42 using (a) left join t1 as t43 using (a) left join t1 as t44 using (a) left join t1 as t45 using (a) left join t1 as t46 using (a) left join t1 as t47 using (a) left join t1 as t48 using (a) left join t1 as t49 using (a) left join t1 as t50 using (a) left join t1 as t51 using (a) left join t1 as t52 using (a) left join t1 as t53 using (a) left join t1 as t54 using (a) left join t1 as t55 using (a) left join t1 as t56 using (a) left join t1 as t57 using (a) left join t1 as t58 using (a) left join t1 as t59 using (a) left join t1 as t60 using (a) left join t1 as t61 using (a) left join t1 as t62 using (a) left join t1 as t63 using (a) left join t1 as t64 using (a) left join t1 as t65 using (a);
ERROR HY000: Too many tables; MySQL can only use XX tables in a join ERROR HY000: Too many tables; MariaDB can only use XX tables in a join
drop table t1; drop table t1;
CREATE TABLE t1 ( CREATE TABLE t1 (
a int(11) NOT NULL, a int(11) NOT NULL,

View File

@ -41,7 +41,7 @@ SELECT @@medium.key_buffer_size;
0 0
SET @@global.key_buffer_size=@save_key_buffer_size; SET @@global.key_buffer_size=@save_key_buffer_size;
SELECT @@default.key_buffer_size; SELECT @@default.key_buffer_size;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'default.key_buffer_size' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'default.key_buffer_size' at line 1
SELECT @@skr.storage_engine="test"; SELECT @@skr.storage_engine="test";
ERROR HY000: Variable 'storage_engine' is not a variable component (can't be used as XXXX.variable_name) ERROR HY000: Variable 'storage_engine' is not a variable component (can't be used as XXXX.variable_name)
select @@keycache1.key_cache_block_size; select @@keycache1.key_cache_block_size;

View File

@ -24,7 +24,7 @@ SELECT 4;
4 4
4 4
KILL (SELECT COUNT(*) FROM mysql.user); KILL (SELECT COUNT(*) FROM mysql.user);
ERROR 42000: This version of MySQL doesn't yet support 'Usage of subqueries or stored function calls as part of this statement' ERROR 42000: This version of MariaDB doesn't yet support 'Usage of subqueries or stored function calls as part of this statement'
SET DEBUG_SYNC= 'thread_end SIGNAL con1_end'; SET DEBUG_SYNC= 'thread_end SIGNAL con1_end';
SET DEBUG_SYNC= 'before_do_command_net_read SIGNAL con1_read WAIT_FOR kill'; SET DEBUG_SYNC= 'before_do_command_net_read SIGNAL con1_read WAIT_FOR kill';
SET DEBUG_SYNC= 'now WAIT_FOR con1_read'; SET DEBUG_SYNC= 'now WAIT_FOR con1_read';

View File

@ -199,7 +199,7 @@ SELECT @@general_log, @@log;
1 1 1 1
SET GLOBAL log = 0; SET GLOBAL log = 0;
Warnings: Warnings:
Warning 1287 The syntax '@@log' is deprecated and will be removed in MySQL 7.0. Please use '@@general_log' instead Warning 1287 The syntax '@@log' is deprecated and will be removed in MariaDB 7.0. Please use '@@general_log' instead
SHOW VARIABLES LIKE 'general_log'; SHOW VARIABLES LIKE 'general_log';
Variable_name Value Variable_name Value
general_log OFF general_log OFF
@ -230,7 +230,7 @@ SELECT @@slow_query_log, @@log_slow_queries;
0 0 0 0
SET GLOBAL log_slow_queries = 0; SET GLOBAL log_slow_queries = 0;
Warnings: Warnings:
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MariaDB 7.0. Please use '@@slow_query_log' instead
SHOW VARIABLES LIKE 'slow_query_log'; SHOW VARIABLES LIKE 'slow_query_log';
Variable_name Value Variable_name Value
slow_query_log OFF slow_query_log OFF
@ -283,16 +283,16 @@ SET GLOBAL slow_query_log_file = @old_slow_query_log_file;
deprecated: deprecated:
SET GLOBAL log = 0; SET GLOBAL log = 0;
Warnings: Warnings:
Warning 1287 The syntax '@@log' is deprecated and will be removed in MySQL 7.0. Please use '@@general_log' instead Warning 1287 The syntax '@@log' is deprecated and will be removed in MariaDB 7.0. Please use '@@general_log' instead
SET GLOBAL log_slow_queries = 0; SET GLOBAL log_slow_queries = 0;
Warnings: Warnings:
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MariaDB 7.0. Please use '@@slow_query_log' instead
SET GLOBAL log = DEFAULT; SET GLOBAL log = DEFAULT;
Warnings: Warnings:
Warning 1287 The syntax '@@log' is deprecated and will be removed in MySQL 7.0. Please use '@@general_log' instead Warning 1287 The syntax '@@log' is deprecated and will be removed in MariaDB 7.0. Please use '@@general_log' instead
SET GLOBAL log_slow_queries = DEFAULT; SET GLOBAL log_slow_queries = DEFAULT;
Warnings: Warnings:
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MariaDB 7.0. Please use '@@slow_query_log' instead
not deprecated: not deprecated:
SELECT @@global.general_log_file INTO @my_glf; SELECT @@global.general_log_file INTO @my_glf;
SELECT @@global.slow_query_log_file INTO @my_sqlf; SELECT @@global.slow_query_log_file INTO @my_sqlf;

View File

@ -8,11 +8,11 @@ SET @old_slow_query_log_file= @@global.slow_query_log_file;
# #
SET @@global.general_log = ON; SET @@global.general_log = ON;
SET @@global.general_log_file = 'bug45387_general.log'; SET @@global.general_log_file = 'bug45387_general.log';
SET SESSION debug='+d,reset_log_last_time'; SET SESSION debug_dbug='+d,reset_log_last_time';
FLUSH LOGS; FLUSH LOGS;
SET @@global.general_log = @old_general_log; SET @@global.general_log = @old_general_log;
SET @@global.general_log_file = @old_general_log_file; SET @@global.general_log_file = @old_general_log_file;
SET SESSION debug='-d'; SET SESSION debug_dbug='-d';
Bug#45387: ID match. Bug#45387: ID match.
End of 5.1 tests End of 5.1 tests
# #

View File

@ -10,9 +10,9 @@ INSERT INTO crashed VALUES (10);
INSERT INTO t2 VALUES (20); INSERT INTO t2 VALUES (20);
INSERT INTO t3 VALUES (30); INSERT INTO t3 VALUES (30);
LOCK TABLES t3 WRITE, t2 WRITE, t4 WRITE, crashed WRITE; LOCK TABLES t3 WRITE, t2 WRITE, t4 WRITE, crashed WRITE;
SET GLOBAL debug="+d,myisam_pretend_crashed_table_on_open"; SET GLOBAL debug_dbug="+d,myisam_pretend_crashed_table_on_open";
CREATE TRIGGER t1_ai AFTER INSERT ON crashed FOR EACH ROW INSERT INTO t2 VALUES(29); CREATE TRIGGER t1_ai AFTER INSERT ON crashed FOR EACH ROW INSERT INTO t2 VALUES(29);
SET GLOBAL debug=@orig_debug; SET GLOBAL debug_dbug=@orig_debug;
INSERT INTO t4 VALUES (39); INSERT INTO t4 VALUES (39);
ERROR HY000: Table 'crashed' was not locked with LOCK TABLES ERROR HY000: Table 'crashed' was not locked with LOCK TABLES
INSERT INTO crashed VALUES (11); INSERT INTO crashed VALUES (11);

View File

@ -194,7 +194,7 @@ n d unix_timestamp(t)
1 10 1038401397 1 10 1038401397
2 20 1038401397 2 20 1038401397
UPDATE t1,t2 SET 1=2 WHERE t1.n=t2.n; UPDATE t1,t2 SET 1=2 WHERE t1.n=t2.n;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1=2 WHERE t1.n=t2.n' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1=2 WHERE t1.n=t2.n' at line 1
drop table t1,t2; drop table t1,t2;
set timestamp=0; set timestamp=0;
set sql_safe_updates=0; set sql_safe_updates=0;

View File

@ -1774,7 +1774,7 @@ create table t1 (c1 int) engine=myisam pack_keys=0;
create table t2 (c1 int) engine=myisam pack_keys=1; create table t2 (c1 int) engine=myisam pack_keys=1;
create table t3 (c1 int) engine=myisam pack_keys=default; create table t3 (c1 int) engine=myisam pack_keys=default;
create table t4 (c1 int) engine=myisam pack_keys=2; create table t4 (c1 int) engine=myisam pack_keys=2;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '2' at line 1
drop table t1, t2, t3; drop table t1, t2, t3;
CREATE TABLE t1(a INT, b INT, KEY inx (a), UNIQUE KEY uinx (b)) ENGINE=MyISAM; CREATE TABLE t1(a INT, b INT, KEY inx (a), UNIQUE KEY uinx (b)) ENGINE=MyISAM;
INSERT INTO t1(a,b) VALUES (1,1),(2,2),(3,3),(4,4),(5,5); INSERT INTO t1(a,b) VALUES (1,1),(2,2),(3,3),(4,4),(5,5);
@ -2051,9 +2051,9 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1; drop table t1;
create table t1 (a int not null, key key_block_size=1024 (a)); create table t1 (a int not null, key key_block_size=1024 (a));
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '=1024 (a))' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '=1024 (a))' at line 1
create table t1 (a int not null, key `a` key_block_size=1024 (a)); create table t1 (a int not null, key `a` key_block_size=1024 (a));
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_block_size=1024 (a))' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'key_block_size=1024 (a))' at line 1
CREATE TABLE t1 ( CREATE TABLE t1 (
c1 INT, c1 INT,
c2 VARCHAR(300), c2 VARCHAR(300),

View File

@ -12,7 +12,7 @@ PRIMARY KEY(a , b),
KEY(b)) ENGINE=MyISAM DELAY_KEY_WRITE = 1; KEY(b)) ENGINE=MyISAM DELAY_KEY_WRITE = 1;
INSERT INTO t1 VALUES (1,2),(2,3),(3,4),(4,5),(5,6); INSERT INTO t1 VALUES (1,2),(2,3),(3,4),(4,5),(5,6);
# Setup the mysqld to crash at certain point # Setup the mysqld to crash at certain point
SET SESSION debug="d,crash_before_flush_keys"; SET SESSION debug_dbug="d,crash_before_flush_keys";
# Write file to make mysql-test-run.pl expect crash # Write file to make mysql-test-run.pl expect crash
# Run the crashing query # Run the crashing query
FLUSH TABLE t1; FLUSH TABLE t1;

View File

@ -13,7 +13,7 @@ KEY (id1), KEY(id)
) ENGINE=MyISAM; ) ENGINE=MyISAM;
INSERT INTO t2 (id) VALUES (123); INSERT INTO t2 (id) VALUES (123);
# Switch to insert Connection # Switch to insert Connection
SET SESSION debug='+d,wait_in_enable_indexes'; SET SESSION debug_dbug='+d,wait_in_enable_indexes';
# Send insert data # Send insert data
INSERT INTO t1(id) SELECT id FROM t2; INSERT INTO t1(id) SELECT id FROM t2;
# Switch to default Connection # Switch to default Connection

View File

@ -135,7 +135,7 @@ c int(11) YES NULL
drop table t1; drop table t1;
1 1
1 1
ERROR 1064 (42000) at line 3: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 ERROR 1064 (42000) at line 3: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
ERROR at line 1: USE must be followed by a database name ERROR at line 1: USE must be followed by a database name
1 +1 1 +1
2 2
@ -164,7 +164,7 @@ count(*)
drop table t17583; drop table t17583;
Test connect without db- or host-name => reconnect Test connect without db- or host-name => reconnect
Test connect with dbname only => new dbname, old hostname Test connect with dbname only => new dbname, old hostname
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'connecttest' at line 1 ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'connecttest' at line 1
Test connect with _invalid_ dbname only => new invalid dbname, old hostname Test connect with _invalid_ dbname only => new invalid dbname, old hostname
ERROR 1049 (42000) at line 1: Unknown database 'invalid' ERROR 1049 (42000) at line 1: Unknown database 'invalid'
ERROR 1049 (42000) at line 1: Unknown database 'invalid' ERROR 1049 (42000) at line 1: Unknown database 'invalid'

View File

@ -4,9 +4,6 @@ The following options may be given as the first argument:
--defaults-file=# Only read default options from the given file #. --defaults-file=# Only read default options from the given file #.
--defaults-extra-file=# Read this file after the global files are read. --defaults-extra-file=# Read this file after the global files are read.
--abort-slave-event-count=#
Option used by mysql-test for debugging and testing of
replication.
--allow-suspicious-udfs --allow-suspicious-udfs
Allows use of UDFs consisting of only one symbol xxx() Allows use of UDFs consisting of only one symbol xxx()
without corresponding xxx_init() or xxx_deinit(). That without corresponding xxx_init() or xxx_deinit(). That
@ -151,9 +148,6 @@ The following options may be given as the first argument:
handling INSERT DELAYED. If the queue becomes full, any handling INSERT DELAYED. If the queue becomes full, any
client that does INSERT DELAYED will wait until there is client that does INSERT DELAYED will wait until there is
room in the queue again room in the queue again
--disconnect-slave-event-count=#
Option used by mysql-test for debugging and testing of
replication.
--div-precision-increment=# --div-precision-increment=#
Precision of the result of '/' operator will be increased Precision of the result of '/' operator will be increased
on that value on that value
@ -165,7 +159,6 @@ The following options may be given as the first argument:
Enable the event scheduler. Possible values are ON, OFF, Enable the event scheduler. Possible values are ON, OFF,
and DISABLED (keep the event scheduler completely and DISABLED (keep the event scheduler completely
deactivated, it cannot be activated run-time) deactivated, it cannot be activated run-time)
-T, --exit-info[=#] Used for debugging. Use at your own risk.
--expire-logs-days=# --expire-logs-days=#
If non-zero, binary logs will be purged after If non-zero, binary logs will be purged after
expire_logs_days days; possible purges happen at startup expire_logs_days days; possible purges happen at startup
@ -195,7 +188,7 @@ The following options may be given as the first argument:
Number of best matches to use for query expansion Number of best matches to use for query expansion
--ft-stopword-file=name --ft-stopword-file=name
Use stopwords from this file instead of built-in list Use stopwords from this file instead of built-in list
--gdb Set up signals usable for debugging. --gdb Set up signals usable for debugging. Deprecated, use
--general-log Log connections and queries to a table or log file. --general-log Log connections and queries to a table or log file.
Defaults logging to a file 'hostname'.log or a table Defaults logging to a file 'hostname'.log or a table
mysql.general_logif --log-output=TABLE is used mysql.general_logif --log-output=TABLE is used
@ -359,9 +352,6 @@ The following options may be given as the first argument:
Max packet length to send to or receive from the server Max packet length to send to or receive from the server
--max-binlog-cache-size=# --max-binlog-cache-size=#
Sets the total size of the transactional cache Sets the total size of the transactional cache
--max-binlog-dump-events=#
Option used by mysql-test for debugging and testing of
replication.
--max-binlog-size=# Binary log will be rotated automatically when the size --max-binlog-size=# Binary log will be rotated automatically when the size
exceeds this value. Will also apply to relay logs if exceeds this value. Will also apply to relay logs if
max_relay_log_size is 0 max_relay_log_size is 0
@ -771,9 +761,6 @@ The following options may be given as the first argument:
--sort-buffer-size=# --sort-buffer-size=#
Each thread that needs to do a sort allocates a buffer of Each thread that needs to do a sort allocates a buffer of
this size this size
--sporadic-binlog-dump-fail
Option used by mysql-test for debugging and testing of
replication.
--sql-mode=name Syntax: sql-mode=mode[,mode[,mode...]]. See the manual --sql-mode=name Syntax: sql-mode=mode[,mode[,mode...]]. See the manual
for the complete list of valid sql modes for the complete list of valid sql modes
--stack-trace Print a symbolic stack trace on failure --stack-trace Print a symbolic stack trace on failure
@ -793,9 +780,6 @@ The following options may be given as the first argument:
Synchronously flush relay log info to disk after every Synchronously flush relay log info to disk after every
#th transaction. Use 0 (default) to disable synchronous #th transaction. Use 0 (default) to disable synchronous
flushing flushing
--sync-sys Enable system sync calls. Disable only when running tests
or debugging!
(Defaults to on; use --skip-sync-sys to disable.)
--sysdate-is-now Non-default option to alias SYSDATE() to NOW() to make it --sysdate-is-now Non-default option to alias SYSDATE() to NOW() to make it
safe-replicable. Since 5.0, SYSDATE() returns a `dynamic' safe-replicable. Since 5.0, SYSDATE() returns a `dynamic'
value different for different invocations, even within value different for different invocations, even within
@ -808,9 +792,6 @@ The following options may be given as the first argument:
--tc-heuristic-recover=name --tc-heuristic-recover=name
Decision to use in heuristic recover process. Possible Decision to use in heuristic recover process. Possible
values are COMMIT or ROLLBACK. values are COMMIT or ROLLBACK.
--thread-alarm Enable system thread alarm calls. Disabling it may be
useful in debugging or testing, never do it in production
(Defaults to on; use --skip-thread-alarm to disable.)
--thread-cache-size=# --thread-cache-size=#
How many threads we should keep in a cache for reuse How many threads we should keep in a cache for reuse
--thread-stack=# The stack size for each thread --thread-stack=# The stack size for each thread
@ -848,7 +829,6 @@ The following options may be given as the first argument:
connection before closing it connection before closing it
Variables (--variable-name=value) Variables (--variable-name=value)
abort-slave-event-count 0
allow-suspicious-udfs FALSE allow-suspicious-udfs FALSE
auto-increment-increment 1 auto-increment-increment 1
auto-increment-offset 1 auto-increment-offset 1
@ -889,7 +869,6 @@ delay-key-write ON
delayed-insert-limit 100 delayed-insert-limit 100
delayed-insert-timeout 300 delayed-insert-timeout 300
delayed-queue-size 1000 delayed-queue-size 1000
disconnect-slave-event-count 0
div-precision-increment 4 div-precision-increment 4
engine-condition-pushdown FALSE engine-condition-pushdown FALSE
event-scheduler OFF event-scheduler OFF
@ -955,7 +934,6 @@ master-retry-count 86400
master-verify-checksum FALSE master-verify-checksum FALSE
max-allowed-packet 8388608 max-allowed-packet 8388608
max-binlog-cache-size 18446744073709547520 max-binlog-cache-size 18446744073709547520
max-binlog-dump-events 0
max-binlog-size 1073741824 max-binlog-size 1073741824
max-binlog-stmt-cache-size 18446744073709547520 max-binlog-stmt-cache-size 18446744073709547520
max-connect-errors 10 max-connect-errors 10
@ -1067,7 +1045,6 @@ slave-type-conversions
slow-launch-time 2 slow-launch-time 2
slow-query-log FALSE slow-query-log FALSE
sort-buffer-size 2097152 sort-buffer-size 2097152
sporadic-binlog-dump-fail FALSE
sql-mode sql-mode
stack-trace TRUE stack-trace TRUE
symbolic-links FALSE symbolic-links FALSE
@ -1076,13 +1053,11 @@ sync-frm FALSE
sync-master-info 0 sync-master-info 0
sync-relay-log 0 sync-relay-log 0
sync-relay-log-info 0 sync-relay-log-info 0
sync-sys TRUE
sysdate-is-now FALSE sysdate-is-now FALSE
table-cache 400 table-cache 400
table-definition-cache 400 table-definition-cache 400
table-open-cache 400 table-open-cache 400
tc-heuristic-recover COMMIT tc-heuristic-recover COMMIT
thread-alarm TRUE
thread-cache-size 0 thread-cache-size 0
thread-stack 294912 thread-stack 294912
time-format %H:%i:%s time-format %H:%i:%s

View File

@ -1917,8 +1917,8 @@ drop table t1, t2, t3;
# Bug#21288 mysqldump segmentation fault when using --where # Bug#21288 mysqldump segmentation fault when using --where
# #
create table t1 (a int); create table t1 (a int);
mysqldump: Couldn't execute 'SELECT /*!40001 SQL_NO_CACHE */ * FROM `t1` WHERE xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx': You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' at line 1 (1064) mysqldump: Couldn't execute 'SELECT /*!40001 SQL_NO_CACHE */ * FROM `t1` WHERE xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx': You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' at line 1 (1064)
mysqldump: Got error: 1064: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' at line 1" when retrieving data from server mysqldump: Got error: 1064: "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' at line 1" when retrieving data from server
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@ -4292,7 +4292,7 @@ Abernathy
aberrant aberrant
aberration aberration
drop table words; drop table words;
mysql-import: Error: 1146, Table 'test.words' doesn't exist, when using table: words mysqlimport: Error: 1146, Table 'test.words' doesn't exist, when using table: words
drop table t1; drop table t1;
drop table t2; drop table t2;
drop table words2; drop table words2;

View File

@ -29,40 +29,40 @@ select 0 as "after_successful_stmt_errno" ;
after_successful_stmt_errno after_successful_stmt_errno
0 0
garbage ; garbage ;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'garbage' at line 1
ER_PARSE_ERROR ER_PARSE_ERROR
select 1064 as "after_wrong_syntax_errno" ; select 1064 as "after_wrong_syntax_errno" ;
after_wrong_syntax_errno after_wrong_syntax_errno
1064 1064
garbage ; garbage ;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'garbage' at line 1
ER_PARSE_ERROR ER_PARSE_ERROR
select 1064 as "after_let_var_equal_value" ; select 1064 as "after_let_var_equal_value" ;
after_let_var_equal_value after_let_var_equal_value
1064 1064
garbage ; garbage ;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'garbage' at line 1
set @my_var= 'abc' ; set @my_var= 'abc' ;
select 0 as "after_set_var_equal_value" ; select 0 as "after_set_var_equal_value" ;
after_set_var_equal_value after_set_var_equal_value
0 0
garbage ; garbage ;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'garbage' at line 1
ER_PARSE_ERROR ER_PARSE_ERROR
select 1064 as "after_disable_warnings_command" ; select 1064 as "after_disable_warnings_command" ;
after_disable_warnings_command after_disable_warnings_command
1064 1064
drop table if exists t1 ; drop table if exists t1 ;
garbage ; garbage ;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'garbage' at line 1
drop table if exists t1 ; drop table if exists t1 ;
select 0 as "after_disable_warnings" ; select 0 as "after_disable_warnings" ;
after_disable_warnings after_disable_warnings
0 0
garbage ; garbage ;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'garbage' at line 1
select 3 from t1 ; select 3 from t1 ;
ERROR 42S02: Table 'test.t1' doesn't exist ERROR 42S02: Table 'test.t1' doesn't exist
ER_NO_SUCH_TABLE ER_NO_SUCH_TABLE
@ -70,7 +70,7 @@ select 1146 as "after_minus_masked" ;
after_minus_masked after_minus_masked
1146 1146
garbage ; garbage ;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'garbage' at line 1
select 3 from t1 ; select 3 from t1 ;
ERROR 42S02: Table 'test.t1' doesn't exist ERROR 42S02: Table 'test.t1' doesn't exist
ER_NO_SUCH_TABLE ER_NO_SUCH_TABLE
@ -78,12 +78,12 @@ select 1146 as "after_!_masked" ;
after_!_masked after_!_masked
1146 1146
garbage ; garbage ;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'garbage' at line 1
select -1 as "after_let_errno_equal_value" ; select -1 as "after_let_errno_equal_value" ;
after_let_errno_equal_value after_let_errno_equal_value
-1 -1
garbage ; garbage ;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'garbage' at line 1
prepare stmt from "select 3 from t1" ; prepare stmt from "select 3 from t1" ;
ERROR 42S02: Table 'test.t1' doesn't exist ERROR 42S02: Table 'test.t1' doesn't exist
ER_NO_SUCH_TABLE ER_NO_SUCH_TABLE
@ -92,14 +92,14 @@ after_failing_prepare
1146 1146
create table t1 ( f1 char(10)); create table t1 ( f1 char(10));
garbage ; garbage ;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'garbage' at line 1
prepare stmt from "select 3 from t1" ; prepare stmt from "select 3 from t1" ;
select 0 as "after_successful_prepare" ; select 0 as "after_successful_prepare" ;
after_successful_prepare after_successful_prepare
0 0
garbage ; garbage ;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'garbage' at line 1
execute stmt; execute stmt;
3 3
@ -108,7 +108,7 @@ after_successful_execute
0 0
drop table t1; drop table t1;
garbage ; garbage ;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'garbage' at line 1
execute stmt; execute stmt;
ERROR 42S02: Table 'test.t1' doesn't exist ERROR 42S02: Table 'test.t1' doesn't exist
ER_NO_SUCH_TABLE ER_NO_SUCH_TABLE
@ -116,7 +116,7 @@ select 1146 as "after_failing_execute" ;
after_failing_execute after_failing_execute
1146 1146
garbage ; garbage ;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'garbage' at line 1
execute __stmt_; execute __stmt_;
ERROR HY000: Unknown prepared statement handler (__stmt_) given to EXECUTE ERROR HY000: Unknown prepared statement handler (__stmt_) given to EXECUTE
ER_UNKNOWN_STMT_HANDLER ER_UNKNOWN_STMT_HANDLER
@ -124,14 +124,14 @@ select 1243 as "after_failing_execute" ;
after_failing_execute after_failing_execute
1243 1243
garbage ; garbage ;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'garbage' at line 1
deallocate prepare stmt; deallocate prepare stmt;
select 0 as "after_successful_deallocate" ; select 0 as "after_successful_deallocate" ;
after_successful_deallocate after_successful_deallocate
0 0
garbage ; garbage ;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'garbage' at line 1
deallocate prepare __stmt_; deallocate prepare __stmt_;
ERROR HY000: Unknown prepared statement handler (__stmt_) given to DEALLOCATE PREPARE ERROR HY000: Unknown prepared statement handler (__stmt_) given to DEALLOCATE PREPARE
ER_UNKNOWN_STMT_HANDLER ER_UNKNOWN_STMT_HANDLER
@ -139,7 +139,7 @@ select 1243 as "after_failing_deallocate" ;
after_failing_deallocate after_failing_deallocate
1243 1243
garbage ; garbage ;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'garbage' at line 1
ER_PARSE_ERROR ER_PARSE_ERROR
select 1064 as "after_--disable_abort_on_error" ; select 1064 as "after_--disable_abort_on_error" ;
after_--disable_abort_on_error after_--disable_abort_on_error
@ -156,12 +156,12 @@ after_!errno_masked_error
1146 1146
select 3 from t1; select 3 from t1;
mysqltest: At line 1: query 'select 3 from t1' failed with wrong errno 1146: 'Table 'test.t1' doesn't exist', instead of 1000... mysqltest: At line 1: query 'select 3 from t1' failed with wrong errno 1146: 'Table 'test.t1' doesn't exist', instead of 1000...
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'garbage' at line 1
is empty is empty
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'nonsense' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'nonsense' at line 1
is empty is empty
garbage ; garbage ;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'garbage' at line 1
ER_PARSE_ERROR ER_PARSE_ERROR
select 1064 as "after_--enable_abort_on_error" ; select 1064 as "after_--enable_abort_on_error" ;
after_--enable_abort_on_error after_--enable_abort_on_error
@ -171,7 +171,7 @@ ERROR 42S02: Table 'test.t1' doesn't exist
select 3 from t1; select 3 from t1;
mysqltest: At line 1: query 'select 3 from t1' failed with wrong errno 1146: 'Table 'test.t1' doesn't exist', instead of 1064... mysqltest: At line 1: query 'select 3 from t1' failed with wrong errno 1146: 'Table 'test.t1' doesn't exist', instead of 1064...
garbage; garbage;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'garbage' at line 1
select 2; select 2;
select 3; select 3;
3 3
@ -364,7 +364,7 @@ insert into t1 values ('$dollar');
$dollar $dollar
`select 42` `select 42`
drop table t1; drop table t1;
mysqltest: At line 1: query 'let $var2= `failing query`' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'failing query' at line 1 mysqltest: At line 1: query 'let $var2= `failing query`' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'failing query' at line 1
mysqltest: At line 1: Missing required argument 'filename' to command 'source' mysqltest: At line 1: Missing required argument 'filename' to command 'source'
mysqltest: At line 1: Could not open './non_existingFile' for reading, errno: 2 mysqltest: At line 1: Could not open './non_existingFile' for reading, errno: 2
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/recursive.sql": mysqltest: In included file "MYSQLTEST_VARDIR/tmp/recursive.sql":
@ -387,7 +387,7 @@ At line 1: Source directives are nesting too deep
garbage ; garbage ;
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/error.sql": mysqltest: In included file "MYSQLTEST_VARDIR/tmp/error.sql":
included from <stdin> at line 1: included from <stdin> at line 1:
At line 1: query 'garbage ' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1 At line 1: query 'garbage ' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'garbage' at line 1
2 = outer loop variable after while 2 = outer loop variable after while
here is the sourced script here is the sourced script
@ -406,7 +406,7 @@ outer=2 ifval=0
outer=1 ifval=1 outer=1 ifval=1
here is the sourced script here is the sourced script
ERROR 42S02: Table 'test.nowhere' doesn't exist ERROR 42S02: Table 'test.nowhere' doesn't exist
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'else' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'else' at line 1
In loop In loop
here is the sourced script here is the sourced script
@ -524,7 +524,7 @@ mysqltest: At line 1: Missing '{' after while. Found "dec $i"
mysqltest: At line 1: Stray '}' - end of block before beginning mysqltest: At line 1: Stray '}' - end of block before beginning
mysqltest: At line 1: Stray 'end' command - end of block before beginning mysqltest: At line 1: Stray 'end' command - end of block before beginning
{; {;
mysqltest: At line 1: query '{' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '{' at line 1 mysqltest: At line 1: query '{' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '{' at line 1
mysqltest: At line 1: Missing '{' after while. Found "echo hej" mysqltest: At line 1: Missing '{' after while. Found "echo hej"
mysqltest: At line 3: Missing end of block mysqltest: At line 3: Missing end of block
mysqltest: At line 3: Missing end of block mysqltest: At line 3: Missing end of block
@ -585,9 +585,9 @@ Output from mysqltest-x.inc
Output from mysqltest-x.inc Output from mysqltest-x.inc
mysqltest: Could not open './non_existing_file.inc' for reading, errno: 2 mysqltest: Could not open './non_existing_file.inc' for reading, errno: 2
failing_statement; failing_statement;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'failing_statement' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'failing_statement' at line 1
failing_statement; failing_statement;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'failing_statement' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'failing_statement' at line 1
SELECT 1 as a; SELECT 1 as a;
a a
1 1
@ -624,12 +624,12 @@ insertz 'error query'||||
mysqltest: At line 3: query 'create table t1 (a int primary key); mysqltest: At line 3: query 'create table t1 (a int primary key);
insert into t1 values (1); insert into t1 values (1);
select 'select-me'; select 'select-me';
insertz 'error query'' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'insertz 'error query'' at line 1 insertz 'error query'' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'insertz 'error query'' at line 1
drop table t1; drop table t1;
mysqltest: At line 3: query 'create table t1 (a int primary key); mysqltest: At line 3: query 'create table t1 (a int primary key);
insert into t1 values (1); insert into t1 values (1);
select 'select-me'; select 'select-me';
insertz 'error query'' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'insertz 'error query'' at line 1 insertz 'error query'' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'insertz 'error query'' at line 1
drop table t1; drop table t1;
Multi statement using expected error Multi statement using expected error
create table t1 (a int primary key); create table t1 (a int primary key);
@ -638,13 +638,13 @@ select 'select-me';
insertz error query|||| insertz error query||||
select-me select-me
select-me select-me
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'insertz error query' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'insertz error query' at line 1
drop table t1; drop table t1;
drop table t1; drop table t1;
sleep; sleep;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'sleep' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'sleep' at line 1
sleep; sleep;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'sleep' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'sleep' at line 1
; ;
ERROR 42000: Query was empty ERROR 42000: Query was empty
select "b" as col1, "c" as col2; select "b" as col1, "c" as col2;
@ -902,7 +902,7 @@ mysqltest: At line 1: Could not find column 'column_not_exists' in the result of
mysqltest: At line 1: Query 'SET @A = 1' didn't return a result set mysqltest: At line 1: Query 'SET @A = 1' didn't return a result set
mysqltest: At line 1: Could not find column '1 AS B' in the result of 'SELECT 1 AS A' mysqltest: At line 1: Could not find column '1 AS B' in the result of 'SELECT 1 AS A'
value= No such row value= No such row
mysqltest: At line 1: query 'let $value= query_get_value(SHOW COLNS FROM t1, Field, 1)' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'COLNS FROM t1' at line 1 mysqltest: At line 1: query 'let $value= query_get_value(SHOW COLNS FROM t1, Field, 1)' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COLNS FROM t1' at line 1
Field Type Null Key Default Extra Field Type Null Key Default Extra
a int(11) YES -><- NULL a int(11) YES -><- NULL

View File

@ -255,11 +255,11 @@ concat(':',product,':') sum(profit) avg(profit)
:TV: 600 120.00000 :TV: 600 120.00000
NULL 7785 519.00000 NULL 7785 519.00000
select product, country_id , year, sum(profit) from t1 group by product, country_id, year with cube; select product, country_id , year, sum(profit) from t1 group by product, country_id, year with cube;
ERROR 42000: This version of MySQL doesn't yet support 'CUBE' ERROR 42000: This version of MariaDB doesn't yet support 'CUBE'
explain select product, country_id , year, sum(profit) from t1 group by product, country_id, year with cube; explain select product, country_id , year, sum(profit) from t1 group by product, country_id, year with cube;
ERROR 42000: This version of MySQL doesn't yet support 'CUBE' ERROR 42000: This version of MariaDB doesn't yet support 'CUBE'
select product, country_id , year, sum(profit) from t1 group by product, country_id, year with cube union all select product, country_id , year, sum(profit) from t1 group by product, country_id, year with rollup; select product, country_id , year, sum(profit) from t1 group by product, country_id, year with cube union all select product, country_id , year, sum(profit) from t1 group by product, country_id, year with rollup;
ERROR 42000: This version of MySQL doesn't yet support 'CUBE' ERROR 42000: This version of MariaDB doesn't yet support 'CUBE'
drop table t1,t2; drop table t1,t2;
CREATE TABLE t1 (i int); CREATE TABLE t1 (i int);
INSERT INTO t1 VALUES(100); INSERT INTO t1 VALUES(100);

Binary file not shown.

View File

@ -5,47 +5,47 @@ drop table ADDDATE;
create table ADDDATE (a int); create table ADDDATE (a int);
drop table ADDDATE; drop table ADDDATE;
create table BIT_AND(a int); create table BIT_AND(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BIT_AND(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'BIT_AND(a int)' at line 1
create table BIT_AND (a int); create table BIT_AND (a int);
drop table BIT_AND; drop table BIT_AND;
create table BIT_OR(a int); create table BIT_OR(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BIT_OR(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'BIT_OR(a int)' at line 1
create table BIT_OR (a int); create table BIT_OR (a int);
drop table BIT_OR; drop table BIT_OR;
create table BIT_XOR(a int); create table BIT_XOR(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BIT_XOR(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'BIT_XOR(a int)' at line 1
create table BIT_XOR (a int); create table BIT_XOR (a int);
drop table BIT_XOR; drop table BIT_XOR;
create table CAST(a int); create table CAST(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CAST(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CAST(a int)' at line 1
create table CAST (a int); create table CAST (a int);
drop table CAST; drop table CAST;
create table COUNT(a int); create table COUNT(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'COUNT(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COUNT(a int)' at line 1
create table COUNT (a int); create table COUNT (a int);
drop table COUNT; drop table COUNT;
create table CURDATE(a int); create table CURDATE(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CURDATE(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CURDATE(a int)' at line 1
create table CURDATE (a int); create table CURDATE (a int);
drop table CURDATE; drop table CURDATE;
create table CURTIME(a int); create table CURTIME(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CURTIME(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CURTIME(a int)' at line 1
create table CURTIME (a int); create table CURTIME (a int);
drop table CURTIME; drop table CURTIME;
create table DATE_ADD(a int); create table DATE_ADD(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DATE_ADD(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'DATE_ADD(a int)' at line 1
create table DATE_ADD (a int); create table DATE_ADD (a int);
drop table DATE_ADD; drop table DATE_ADD;
create table DATE_SUB(a int); create table DATE_SUB(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DATE_SUB(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'DATE_SUB(a int)' at line 1
create table DATE_SUB (a int); create table DATE_SUB (a int);
drop table DATE_SUB; drop table DATE_SUB;
create table EXTRACT(a int); create table EXTRACT(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'EXTRACT(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'EXTRACT(a int)' at line 1
create table EXTRACT (a int); create table EXTRACT (a int);
drop table EXTRACT; drop table EXTRACT;
create table GROUP_CONCAT(a int); create table GROUP_CONCAT(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP_CONCAT(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'GROUP_CONCAT(a int)' at line 1
create table GROUP_CONCAT (a int); create table GROUP_CONCAT (a int);
drop table GROUP_CONCAT; drop table GROUP_CONCAT;
create table GROUP_UNIQUE_USERS(a int); create table GROUP_UNIQUE_USERS(a int);
@ -53,23 +53,23 @@ drop table GROUP_UNIQUE_USERS;
create table GROUP_UNIQUE_USERS (a int); create table GROUP_UNIQUE_USERS (a int);
drop table GROUP_UNIQUE_USERS; drop table GROUP_UNIQUE_USERS;
create table MAX(a int); create table MAX(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MAX(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'MAX(a int)' at line 1
create table MAX (a int); create table MAX (a int);
drop table MAX; drop table MAX;
create table MID(a int); create table MID(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MID(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'MID(a int)' at line 1
create table MID (a int); create table MID (a int);
drop table MID; drop table MID;
create table MIN(a int); create table MIN(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MIN(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'MIN(a int)' at line 1
create table MIN (a int); create table MIN (a int);
drop table MIN; drop table MIN;
create table NOW(a int); create table NOW(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NOW(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'NOW(a int)' at line 1
create table NOW (a int); create table NOW (a int);
drop table NOW; drop table NOW;
create table POSITION(a int); create table POSITION(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'POSITION(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'POSITION(a int)' at line 1
create table POSITION (a int); create table POSITION (a int);
drop table POSITION; drop table POSITION;
create table SESSION_USER(a int); create table SESSION_USER(a int);
@ -77,19 +77,19 @@ drop table SESSION_USER;
create table SESSION_USER (a int); create table SESSION_USER (a int);
drop table SESSION_USER; drop table SESSION_USER;
create table STD(a int); create table STD(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STD(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'STD(a int)' at line 1
create table STD (a int); create table STD (a int);
drop table STD; drop table STD;
create table STDDEV(a int); create table STDDEV(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STDDEV(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'STDDEV(a int)' at line 1
create table STDDEV (a int); create table STDDEV (a int);
drop table STDDEV; drop table STDDEV;
create table STDDEV_POP(a int); create table STDDEV_POP(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STDDEV_POP(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'STDDEV_POP(a int)' at line 1
create table STDDEV_POP (a int); create table STDDEV_POP (a int);
drop table STDDEV_POP; drop table STDDEV_POP;
create table STDDEV_SAMP(a int); create table STDDEV_SAMP(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STDDEV_SAMP(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'STDDEV_SAMP(a int)' at line 1
create table STDDEV_SAMP (a int); create table STDDEV_SAMP (a int);
drop table STDDEV_SAMP; drop table STDDEV_SAMP;
create table SUBDATE(a int); create table SUBDATE(a int);
@ -97,19 +97,19 @@ drop table SUBDATE;
create table SUBDATE (a int); create table SUBDATE (a int);
drop table SUBDATE; drop table SUBDATE;
create table SUBSTR(a int); create table SUBSTR(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUBSTR(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SUBSTR(a int)' at line 1
create table SUBSTR (a int); create table SUBSTR (a int);
drop table SUBSTR; drop table SUBSTR;
create table SUBSTRING(a int); create table SUBSTRING(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUBSTRING(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SUBSTRING(a int)' at line 1
create table SUBSTRING (a int); create table SUBSTRING (a int);
drop table SUBSTRING; drop table SUBSTRING;
create table SUM(a int); create table SUM(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUM(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SUM(a int)' at line 1
create table SUM (a int); create table SUM (a int);
drop table SUM; drop table SUM;
create table SYSDATE(a int); create table SYSDATE(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SYSDATE(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SYSDATE(a int)' at line 1
create table SYSDATE (a int); create table SYSDATE (a int);
drop table SYSDATE; drop table SYSDATE;
create table SYSTEM_USER(a int); create table SYSTEM_USER(a int);
@ -117,7 +117,7 @@ drop table SYSTEM_USER;
create table SYSTEM_USER (a int); create table SYSTEM_USER (a int);
drop table SYSTEM_USER; drop table SYSTEM_USER;
create table TRIM(a int); create table TRIM(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TRIM(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'TRIM(a int)' at line 1
create table TRIM (a int); create table TRIM (a int);
drop table TRIM; drop table TRIM;
create table UNIQUE_USERS(a int); create table UNIQUE_USERS(a int);
@ -125,15 +125,15 @@ drop table UNIQUE_USERS;
create table UNIQUE_USERS (a int); create table UNIQUE_USERS (a int);
drop table UNIQUE_USERS; drop table UNIQUE_USERS;
create table VARIANCE(a int); create table VARIANCE(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VARIANCE(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'VARIANCE(a int)' at line 1
create table VARIANCE (a int); create table VARIANCE (a int);
drop table VARIANCE; drop table VARIANCE;
create table VAR_POP(a int); create table VAR_POP(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VAR_POP(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'VAR_POP(a int)' at line 1
create table VAR_POP (a int); create table VAR_POP (a int);
drop table VAR_POP; drop table VAR_POP;
create table VAR_SAMP(a int); create table VAR_SAMP(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VAR_SAMP(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'VAR_SAMP(a int)' at line 1
create table VAR_SAMP (a int); create table VAR_SAMP (a int);
drop table VAR_SAMP; drop table VAR_SAMP;
set SQL_MODE='IGNORE_SPACE'; set SQL_MODE='IGNORE_SPACE';
@ -142,137 +142,137 @@ drop table ADDDATE;
create table ADDDATE (a int); create table ADDDATE (a int);
drop table ADDDATE; drop table ADDDATE;
create table BIT_AND(a int); create table BIT_AND(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BIT_AND(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'BIT_AND(a int)' at line 1
create table BIT_AND (a int); create table BIT_AND (a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BIT_AND (a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'BIT_AND (a int)' at line 1
create table BIT_OR(a int); create table BIT_OR(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BIT_OR(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'BIT_OR(a int)' at line 1
create table BIT_OR (a int); create table BIT_OR (a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BIT_OR (a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'BIT_OR (a int)' at line 1
create table BIT_XOR(a int); create table BIT_XOR(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BIT_XOR(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'BIT_XOR(a int)' at line 1
create table BIT_XOR (a int); create table BIT_XOR (a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BIT_XOR (a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'BIT_XOR (a int)' at line 1
create table CAST(a int); create table CAST(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CAST(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CAST(a int)' at line 1
create table CAST (a int); create table CAST (a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CAST (a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CAST (a int)' at line 1
create table COUNT(a int); create table COUNT(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'COUNT(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COUNT(a int)' at line 1
create table COUNT (a int); create table COUNT (a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'COUNT (a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COUNT (a int)' at line 1
create table CURDATE(a int); create table CURDATE(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CURDATE(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CURDATE(a int)' at line 1
create table CURDATE (a int); create table CURDATE (a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CURDATE (a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CURDATE (a int)' at line 1
create table CURTIME(a int); create table CURTIME(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CURTIME(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CURTIME(a int)' at line 1
create table CURTIME (a int); create table CURTIME (a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CURTIME (a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CURTIME (a int)' at line 1
create table DATE_ADD(a int); create table DATE_ADD(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DATE_ADD(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'DATE_ADD(a int)' at line 1
create table DATE_ADD (a int); create table DATE_ADD (a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DATE_ADD (a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'DATE_ADD (a int)' at line 1
create table DATE_SUB(a int); create table DATE_SUB(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DATE_SUB(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'DATE_SUB(a int)' at line 1
create table DATE_SUB (a int); create table DATE_SUB (a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DATE_SUB (a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'DATE_SUB (a int)' at line 1
create table EXTRACT(a int); create table EXTRACT(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'EXTRACT(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'EXTRACT(a int)' at line 1
create table EXTRACT (a int); create table EXTRACT (a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'EXTRACT (a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'EXTRACT (a int)' at line 1
create table GROUP_CONCAT(a int); create table GROUP_CONCAT(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP_CONCAT(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'GROUP_CONCAT(a int)' at line 1
create table GROUP_CONCAT (a int); create table GROUP_CONCAT (a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP_CONCAT (a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'GROUP_CONCAT (a int)' at line 1
create table GROUP_UNIQUE_USERS(a int); create table GROUP_UNIQUE_USERS(a int);
drop table GROUP_UNIQUE_USERS; drop table GROUP_UNIQUE_USERS;
create table GROUP_UNIQUE_USERS (a int); create table GROUP_UNIQUE_USERS (a int);
drop table GROUP_UNIQUE_USERS; drop table GROUP_UNIQUE_USERS;
create table MAX(a int); create table MAX(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MAX(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'MAX(a int)' at line 1
create table MAX (a int); create table MAX (a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MAX (a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'MAX (a int)' at line 1
create table MID(a int); create table MID(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MID(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'MID(a int)' at line 1
create table MID (a int); create table MID (a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MID (a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'MID (a int)' at line 1
create table MIN(a int); create table MIN(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MIN(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'MIN(a int)' at line 1
create table MIN (a int); create table MIN (a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MIN (a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'MIN (a int)' at line 1
create table NOW(a int); create table NOW(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NOW(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'NOW(a int)' at line 1
create table NOW (a int); create table NOW (a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NOW (a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'NOW (a int)' at line 1
create table POSITION(a int); create table POSITION(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'POSITION(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'POSITION(a int)' at line 1
create table POSITION (a int); create table POSITION (a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'POSITION (a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'POSITION (a int)' at line 1
create table SESSION_USER(a int); create table SESSION_USER(a int);
drop table SESSION_USER; drop table SESSION_USER;
create table SESSION_USER (a int); create table SESSION_USER (a int);
drop table SESSION_USER; drop table SESSION_USER;
create table STD(a int); create table STD(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STD(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'STD(a int)' at line 1
create table STD (a int); create table STD (a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STD (a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'STD (a int)' at line 1
create table STDDEV(a int); create table STDDEV(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STDDEV(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'STDDEV(a int)' at line 1
create table STDDEV (a int); create table STDDEV (a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STDDEV (a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'STDDEV (a int)' at line 1
create table STDDEV_POP(a int); create table STDDEV_POP(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STDDEV_POP(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'STDDEV_POP(a int)' at line 1
create table STDDEV_POP (a int); create table STDDEV_POP (a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STDDEV_POP (a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'STDDEV_POP (a int)' at line 1
create table STDDEV_SAMP(a int); create table STDDEV_SAMP(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STDDEV_SAMP(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'STDDEV_SAMP(a int)' at line 1
create table STDDEV_SAMP (a int); create table STDDEV_SAMP (a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STDDEV_SAMP (a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'STDDEV_SAMP (a int)' at line 1
create table SUBDATE(a int); create table SUBDATE(a int);
drop table SUBDATE; drop table SUBDATE;
create table SUBDATE (a int); create table SUBDATE (a int);
drop table SUBDATE; drop table SUBDATE;
create table SUBSTR(a int); create table SUBSTR(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUBSTR(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SUBSTR(a int)' at line 1
create table SUBSTR (a int); create table SUBSTR (a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUBSTR (a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SUBSTR (a int)' at line 1
create table SUBSTRING(a int); create table SUBSTRING(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUBSTRING(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SUBSTRING(a int)' at line 1
create table SUBSTRING (a int); create table SUBSTRING (a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUBSTRING (a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SUBSTRING (a int)' at line 1
create table SUM(a int); create table SUM(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUM(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SUM(a int)' at line 1
create table SUM (a int); create table SUM (a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUM (a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SUM (a int)' at line 1
create table SYSDATE(a int); create table SYSDATE(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SYSDATE(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SYSDATE(a int)' at line 1
create table SYSDATE (a int); create table SYSDATE (a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SYSDATE (a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SYSDATE (a int)' at line 1
create table SYSTEM_USER(a int); create table SYSTEM_USER(a int);
drop table SYSTEM_USER; drop table SYSTEM_USER;
create table SYSTEM_USER (a int); create table SYSTEM_USER (a int);
drop table SYSTEM_USER; drop table SYSTEM_USER;
create table TRIM(a int); create table TRIM(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TRIM(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'TRIM(a int)' at line 1
create table TRIM (a int); create table TRIM (a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TRIM (a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'TRIM (a int)' at line 1
create table UNIQUE_USERS(a int); create table UNIQUE_USERS(a int);
drop table UNIQUE_USERS; drop table UNIQUE_USERS;
create table UNIQUE_USERS (a int); create table UNIQUE_USERS (a int);
drop table UNIQUE_USERS; drop table UNIQUE_USERS;
create table VARIANCE(a int); create table VARIANCE(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VARIANCE(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'VARIANCE(a int)' at line 1
create table VARIANCE (a int); create table VARIANCE (a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VARIANCE (a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'VARIANCE (a int)' at line 1
create table VAR_POP(a int); create table VAR_POP(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VAR_POP(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'VAR_POP(a int)' at line 1
create table VAR_POP (a int); create table VAR_POP (a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VAR_POP (a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'VAR_POP (a int)' at line 1
create table VAR_SAMP(a int); create table VAR_SAMP(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VAR_SAMP(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'VAR_SAMP(a int)' at line 1
create table VAR_SAMP (a int); create table VAR_SAMP (a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VAR_SAMP (a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'VAR_SAMP (a int)' at line 1
DROP TABLE IF EXISTS table_25930_a; DROP TABLE IF EXISTS table_25930_a;
DROP TABLE IF EXISTS table_25930_b; DROP TABLE IF EXISTS table_25930_b;
SET SQL_MODE = 'ANSI_QUOTES'; SET SQL_MODE = 'ANSI_QUOTES';

View File

@ -50,44 +50,44 @@
# Bug#46527 "COMMIT AND CHAIN RELEASE does not make sense" # Bug#46527 "COMMIT AND CHAIN RELEASE does not make sense"
# #
COMMIT AND CHAIN RELEASE; COMMIT AND CHAIN RELEASE;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'RELEASE' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'RELEASE' at line 1
COMMIT AND NO CHAIN RELEASE; COMMIT AND NO CHAIN RELEASE;
COMMIT RELEASE; COMMIT RELEASE;
COMMIT CHAIN RELEASE; COMMIT CHAIN RELEASE;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CHAIN RELEASE' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CHAIN RELEASE' at line 1
COMMIT NO CHAIN RELEASE; COMMIT NO CHAIN RELEASE;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CHAIN RELEASE' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CHAIN RELEASE' at line 1
COMMIT AND NO RELEASE; COMMIT AND NO RELEASE;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'RELEASE' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'RELEASE' at line 1
COMMIT AND RELEASE; COMMIT AND RELEASE;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'RELEASE' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'RELEASE' at line 1
COMMIT NO RELEASE; COMMIT NO RELEASE;
COMMIT CHAIN NO RELEASE; COMMIT CHAIN NO RELEASE;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CHAIN NO RELEASE' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CHAIN NO RELEASE' at line 1
COMMIT NO CHAIN NO RELEASE; COMMIT NO CHAIN NO RELEASE;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CHAIN NO RELEASE' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CHAIN NO RELEASE' at line 1
COMMIT AND RELEASE CHAIN; COMMIT AND RELEASE CHAIN;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'RELEASE CHAIN' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'RELEASE CHAIN' at line 1
COMMIT AND NO CHAIN NO RELEASE; COMMIT AND NO CHAIN NO RELEASE;
ROLLBACK AND CHAIN RELEASE; ROLLBACK AND CHAIN RELEASE;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'RELEASE' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'RELEASE' at line 1
ROLLBACK AND NO CHAIN RELEASE; ROLLBACK AND NO CHAIN RELEASE;
ROLLBACK RELEASE; ROLLBACK RELEASE;
ROLLBACK CHAIN RELEASE; ROLLBACK CHAIN RELEASE;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CHAIN RELEASE' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CHAIN RELEASE' at line 1
ROLLBACK NO CHAIN RELEASE; ROLLBACK NO CHAIN RELEASE;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CHAIN RELEASE' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CHAIN RELEASE' at line 1
ROLLBACK AND NO RELEASE; ROLLBACK AND NO RELEASE;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'RELEASE' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'RELEASE' at line 1
ROLLBACK AND RELEASE; ROLLBACK AND RELEASE;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'RELEASE' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'RELEASE' at line 1
ROLLBACK NO RELEASE; ROLLBACK NO RELEASE;
ROLLBACK CHAIN NO RELEASE; ROLLBACK CHAIN NO RELEASE;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CHAIN NO RELEASE' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CHAIN NO RELEASE' at line 1
ROLLBACK NO CHAIN NO RELEASE; ROLLBACK NO CHAIN NO RELEASE;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CHAIN NO RELEASE' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CHAIN NO RELEASE' at line 1
ROLLBACK AND RELEASE CHAIN; ROLLBACK AND RELEASE CHAIN;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'RELEASE CHAIN' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'RELEASE CHAIN' at line 1
ROLLBACK AND NO CHAIN NO RELEASE; ROLLBACK AND NO CHAIN NO RELEASE;
# #
# End of 5.5 tests # End of 5.5 tests

View File

@ -398,17 +398,17 @@ select (NOT TRUE) IS NOT NULL, NOT (TRUE IS NOT NULL), NOT TRUE IS NOT NULL;
1 0 0 1 0 0
Testing that IS [NOT] TRUE/FALSE/UNKNOWN predicates are not associative Testing that IS [NOT] TRUE/FALSE/UNKNOWN predicates are not associative
select TRUE IS TRUE IS TRUE IS TRUE; select TRUE IS TRUE IS TRUE IS TRUE;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IS TRUE IS TRUE' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'IS TRUE IS TRUE' at line 1
select FALSE IS NOT TRUE IS NOT TRUE IS NOT TRUE; select FALSE IS NOT TRUE IS NOT TRUE IS NOT TRUE;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IS NOT TRUE IS NOT TRUE' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'IS NOT TRUE IS NOT TRUE' at line 1
select NULL IS FALSE IS FALSE IS FALSE; select NULL IS FALSE IS FALSE IS FALSE;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IS FALSE IS FALSE' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'IS FALSE IS FALSE' at line 1
select TRUE IS NOT FALSE IS NOT FALSE IS NOT FALSE; select TRUE IS NOT FALSE IS NOT FALSE IS NOT FALSE;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IS NOT FALSE IS NOT FALSE' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'IS NOT FALSE IS NOT FALSE' at line 1
select FALSE IS UNKNOWN IS UNKNOWN IS UNKNOWN; select FALSE IS UNKNOWN IS UNKNOWN IS UNKNOWN;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IS UNKNOWN IS UNKNOWN' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'IS UNKNOWN IS UNKNOWN' at line 1
select TRUE IS NOT UNKNOWN IS NOT UNKNOWN IS NOT UNKNOWN; select TRUE IS NOT UNKNOWN IS NOT UNKNOWN IS NOT UNKNOWN;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IS NOT UNKNOWN IS NOT UNKNOWN' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'IS NOT UNKNOWN IS NOT UNKNOWN' at line 1
Testing that IS [NOT] NULL predicates are associative Testing that IS [NOT] NULL predicates are associative
select FALSE IS NULL IS NULL IS NULL; select FALSE IS NULL IS NULL IS NULL;
FALSE IS NULL IS NULL IS NULL FALSE IS NULL IS NULL IS NULL

View File

@ -662,7 +662,7 @@ ERROR 42000: Only integers allowed as number here near '0.2+e1' at line 3
create table t1 (a int) create table t1 (a int)
partition by key(a) partition by key(a)
partitions -1; partitions -1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1' at line 3 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-1' at line 3
create table t1 (a int) create table t1 (a int)
partition by key(a) partition by key(a)
partitions 1.5; partitions 1.5;
@ -1216,11 +1216,11 @@ alter table t1
engine=heap engine=heap
partition by key (a) partition by key (a)
(partition p0 engine=heap, partition p1 engine=myisam); (partition p0 engine=heap, partition p1 engine=myisam);
ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MariaDB
alter table t1 alter table t1
partition by key (a) partition by key (a)
(partition p0 engine=heap, partition p1 engine=myisam); (partition p0 engine=heap, partition p1 engine=myisam);
ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MariaDB
drop table t1; drop table t1;
CREATE TABLE t1 ( CREATE TABLE t1 (
f_int1 INTEGER, f_int2 INTEGER, f_int1 INTEGER, f_int2 INTEGER,
@ -1333,7 +1333,7 @@ create table t1 (a int)
partition by list (a) partition by list (a)
(partition p0 values in (1)); (partition p0 values in (1));
alter table t1 rebuild partition; alter table t1 rebuild partition;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
drop table t1; drop table t1;
create table t1 (a int) create table t1 (a int)
partition by list (a) partition by list (a)
@ -1434,7 +1434,7 @@ create table t1 (a int)
partition by list (a) partition by list (a)
(partition p0 values in (1)); (partition p0 values in (1));
alter table t1 rebuild partition; alter table t1 rebuild partition;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
drop table t1; drop table t1;
create table t2 (s1 int not null auto_increment, primary key (s1)) partition by list (s1) (partition p1 values in (1),partition p2 values in (2),partition p3 values in (3),partition p4 values in (4)); create table t2 (s1 int not null auto_increment, primary key (s1)) partition by list (s1) (partition p1 values in (1),partition p2 values in (2),partition p3 values in (3),partition p4 values in (4));
insert into t2 values (null),(null),(null); insert into t2 values (null),(null),(null);
@ -1999,9 +1999,9 @@ PARTITION p1 VALUES LESS THAN (10),
PARTITION p2 VALUES LESS THAN (20) PARTITION p2 VALUES LESS THAN (20)
); );
ALTER TABLE t1 OPTIMIZE PARTITION p1 EXTENDED; ALTER TABLE t1 OPTIMIZE PARTITION p1 EXTENDED;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'EXTENDED' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'EXTENDED' at line 1
ALTER TABLE t1 ANALYZE PARTITION p1 EXTENDED; ALTER TABLE t1 ANALYZE PARTITION p1 EXTENDED;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'EXTENDED' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'EXTENDED' at line 1
ALTER TABLE t1 ANALYZE PARTITION p1; ALTER TABLE t1 ANALYZE PARTITION p1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 analyze status OK test.t1 analyze status OK

Some files were not shown because too many files have changed in this diff Show More