Manual merge from next-mr.

This commit is contained in:
2010-01-12 20:07:09 +08:00
commit b805e3d4d6
813 changed files with 20643 additions and 16672 deletions

View file

@ -3072,3 +3072,5 @@ libmysqld/rpl_handler.cc
libmysqld/debug_sync.cc
libmysqld/rpl_handler.cc
dbug/tests
libmysqld/sys_vars.cc
libmysqld/keycaches.cc

View file

@ -107,6 +107,14 @@ IF(CMAKE_GENERATOR MATCHES "Visual Studio 7")
MESSAGE("Warning: Building MySQL with Visual Studio 2003.NET is no more supported.")
MESSAGE("Please use a newer version of Visual Studio.")
SET(WITHOUT_DYNAMIC_PLUGINS TRUE)
# VS2003 needs the /Op compiler option to disable floating point optimizations
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Op")
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Op")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Op")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /Op")
SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /Op")
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /Op")
ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 7")
# Settings for Visual Studio 7 and above.
@ -255,7 +263,11 @@ FOREACH(SUBDIR ${STORAGE_SUBDIRS})
SET(ENGINE_BUILD_TYPE "NONE")
ENDIF(WITH_${ENGINE}_STORAGE_ENGINE AND MYSQL_PLUGIN_STATIC)
IF (ENGINE_BUILD_TYPE STREQUAL "STATIC")
SET (mysql_plugin_defs "${mysql_plugin_defs},builtin_${ENGINE_LOWER}_plugin")
IF(MYSQL_PLUGIN_MANDATORY)
SET (mysql_mandatory_plugins "${mysql_mandatory_plugins}builtin_${ENGINE_LOWER}_plugin,")
ELSE(MYSQL_PLUGIN_MANDATORY)
SET (mysql_optional_plugins "${mysql_optional_plugins}builtin_${ENGINE_LOWER}_plugin,")
ENDIF(MYSQL_PLUGIN_MANDATORY)
SET (MYSQLD_STATIC_ENGINE_LIBS ${MYSQLD_STATIC_ENGINE_LIBS} ${ENGINE_LOWER})
SET (STORAGE_ENGINE_DEFS "${STORAGE_ENGINE_DEFS} -DWITH_${ENGINE}_STORAGE_ENGINE")
SET (WITH_${ENGINE}_STORAGE_ENGINE TRUE)
@ -274,12 +286,12 @@ ENDFOREACH(SUBDIR ${STORAGE_SUBDIRS})
# Special handling for partition(not really pluggable)
IF(NOT WITHOUT_PARTITION_STORAGE_ENGINE)
SET (STORAGE_ENGINE_DEFS "${STORAGE_ENGINE_DEFS} -DWITH_PARTITION_STORAGE_ENGINE")
SET (mysql_plugin_defs "${mysql_plugin_defs},builtin_partition_plugin")
SET (mysql_optional_plugins "${mysql_optional_plugins}builtin_partition_plugin,")
ENDIF(NOT WITHOUT_PARTITION_STORAGE_ENGINE)
ADD_DEFINITIONS(${STORAGE_ENGINE_DEFS})
# Now write out our mysql_plugin_defs struct
# Now write out our mysql_mandatory_plugins/mysql_optional_plugins structs
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/sql/sql_builtin.cc.in
${CMAKE_SOURCE_DIR}/sql/sql_builtin.cc @ONLY)

View file

@ -129,14 +129,14 @@ smoke:
test-full: test test-nr test-ps
test-force:
$(MAKE) force=--force test
$(MAKE) -k force=--force test
test-force-full:
$(MAKE) force=--force test-full
$(MAKE) -k force=--force test-full
#used by autopush.pl to run memory based tests
test-force-mem:
$(MAKE) force=--force mem=--mem test
$(MAKE) -k force=--force mem=--mem test
EXP = --experimental=collections/default.experimental
@ -204,10 +204,6 @@ test-bt-debug:
@PERL@ ./mysql-test-run.pl --comment=debug --force --timer \
--skip-ndbcluster --skip-rpl --report-features $(EXP)
test-bt-debug-fast:
test-bt-debug-fast:
# Keep these for a while
test-pl: test
test-full-pl: test-full

View file

@ -109,7 +109,7 @@ sql_src=log_event.h mysql_priv.h rpl_constants.h \
log_event_old.h log_event_old.cc \
rpl_utility.h rpl_utility.cc \
rpl_record_old.h rpl_record_old.cc
strings_src=decimal.c
strings_src=decimal.c dtoa.c
link_sources:
for f in $(sql_src) ; do \

View file

@ -100,7 +100,7 @@ extern "C" {
#define vidattr(A) {} // Can't get this to work
#endif
#ifdef FN_NO_CASE_SENCE
#ifdef FN_NO_CASE_SENSE
#define cmp_database(cs,A,B) my_strcasecmp((cs), (A), (B))
#else
#define cmp_database(cs,A,B) strcmp((A),(B))
@ -3652,7 +3652,7 @@ static void print_warnings()
mysql_store_result_for_lazy(&result);
/* Bail out when no warnings */
if (!(num_rows= mysql_num_rows(result)))
if (!result || !(num_rows= mysql_num_rows(result)))
goto end;
cur= mysql_fetch_row(result);

View file

@ -2227,7 +2227,7 @@ do_result_format_version(struct st_command *command)
long version;
static DYNAMIC_STRING ds_version;
const struct command_arg result_format_args[] = {
"version", ARG_STRING, TRUE, &ds_version, "Version to use",
{"version", ARG_STRING, TRUE, &ds_version, "Version to use"}
};
DBUG_ENTER("do_result_format_version");
@ -6154,6 +6154,8 @@ void init_win_path_patterns()
"$MYSQL_TMP_DIR",
"$MYSQLTEST_VARDIR",
"$MASTER_MYSOCK",
"$MYSQL_SHAREDIR",
"$MYSQL_LIBDIR",
"./test/" };
int num_paths= sizeof(paths)/sizeof(char*);
int i;
@ -7102,7 +7104,7 @@ int util_query(MYSQL* org_mysql, const char* query){
cur_con->util_mysql= mysql;
}
return mysql_query(mysql, query);
DBUG_RETURN(mysql_query(mysql, query));
}
@ -7740,6 +7742,7 @@ int main(int argc, char **argv)
cur_file->file_name= my_strdup("<stdin>", MYF(MY_WME));
cur_file->lineno= 1;
}
var_set_string("MYSQLTEST_FILE", cur_file->file_name);
init_re();
ps_protocol_enabled= ps_protocol;
sp_protocol_enabled= sp_protocol;

View file

@ -24,10 +24,6 @@
#include <m_string.h>
#include <m_ctype.h>
#include <mysql_com.h>
#ifdef HAVE_FCONVERT
#include <floatingpoint.h>
#endif
/*
The following extern declarations are ok as these are interface functions
required by the string function
@ -117,82 +113,19 @@ bool String::set(ulonglong num, CHARSET_INFO *cs)
bool String::set(double num,uint decimals, CHARSET_INFO *cs)
{
char buff[331];
char buff[FLOATING_POINT_BUFFER];
uint dummy_errors;
size_t len;
str_charset=cs;
if (decimals >= NOT_FIXED_DEC)
{
uint32 len= my_sprintf(buff,(buff, "%.15g",num));// Enough for a DATETIME
len= my_gcvt(num, MY_GCVT_ARG_DOUBLE, sizeof(buff) - 1, buff, NULL);
return copy(buff, len, &my_charset_latin1, cs, &dummy_errors);
}
#ifdef HAVE_FCONVERT
int decpt,sign;
char *pos,*to;
(void) fconvert(num,(int) decimals,&decpt,&sign,buff+1);
if (!my_isdigit(&my_charset_latin1, buff[1]))
{ // Nan or Inf
pos=buff+1;
if (sign)
{
buff[0]='-';
pos=buff;
}
uint dummy_errors;
return copy(pos,(uint32) strlen(pos), &my_charset_latin1, cs, &dummy_errors);
}
if (alloc((uint32) ((uint32) decpt+3+decimals)))
return TRUE;
to=Ptr;
if (sign)
*to++='-';
pos=buff+1;
if (decpt < 0)
{ /* value is < 0 */
*to++='0';
if (!decimals)
goto end;
*to++='.';
if ((uint32) -decpt > decimals)
decpt= - (int) decimals;
decimals=(uint32) ((int) decimals+decpt);
while (decpt++ < 0)
*to++='0';
}
else if (decpt == 0)
{
*to++= '0';
if (!decimals)
goto end;
*to++='.';
}
else
{
while (decpt-- > 0)
*to++= *pos++;
if (!decimals)
goto end;
*to++='.';
}
while (decimals--)
*to++= *pos++;
end:
*to=0;
str_length=(uint32) (to-Ptr);
return FALSE;
#else
#ifdef HAVE_SNPRINTF
buff[sizeof(buff)-1]=0; // Safety
snprintf(buff,sizeof(buff)-1, "%.*f",(int) decimals,num);
#else
sprintf(buff,"%.*f",(int) decimals,num);
#endif
return copy(buff,(uint32) strlen(buff), &my_charset_latin1, cs,
len= my_fcvt(num, decimals, buff, NULL);
return copy(buff, (uint32) len, &my_charset_latin1, cs,
&dummy_errors);
#endif
}
@ -675,7 +608,8 @@ void String::qs_append(const char *str, uint32 len)
void String::qs_append(double d)
{
char *buff = Ptr + str_length;
str_length+= my_sprintf(buff, (buff, "%.15g", d));
str_length+= my_gcvt(d, MY_GCVT_ARG_DOUBLE, FLOATING_POINT_BUFFER - 1, buff,
NULL);
}
void String::qs_append(double *d)

View file

@ -460,7 +460,11 @@ dnl Although this is "pretty", it breaks libmysqld build
])
])
])
mysql_plugin_defs="$mysql_plugin_defs, [builtin_]$2[_plugin]"
m4_ifdef([$9],[
mysql_mandatory_plugins="$mysql_mandatory_plugins [builtin_]$2[_plugin],"
],[
mysql_optional_plugins="$mysql_optional_plugins [builtin_]$2[_plugin],"
])
[with_plugin_]$2=yes
AC_MSG_RESULT([yes])
m4_ifdef([$11],[

View file

@ -25,7 +25,7 @@ AC_CANONICAL_SYSTEM
#
# When changing major version number please also check switch statement
# in client/mysqlbinlog.cc:check_master_version().
AM_INIT_AUTOMAKE(mysql, 5.5.99)
AM_INIT_AUTOMAKE(mysql, 5.5.99-m3)
AM_CONFIG_HEADER([include/config.h:config.h.in])
# Request support for automake silent-rules if available.
@ -375,6 +375,21 @@ case "$target_os" in
fi
;;
esac
# The following is required for portable results of floating point calculations
# on PowerPC. The same must also be done for IA-64, but this options is missing
# in the IA-64 gcc backend.
if test "$GCC" = "yes"
then
case "$host_cpu" in
*ppc* | *powerpc*)
CFLAGS="$CFLAGS -mno-fused-madd"
CXXFLAGS="$CXXFLAGS -mno-fused-madd"
;;
esac
fi
AC_SUBST(CC)
AC_SUBST(CFLAGS)
AC_SUBST(CXX)
@ -2236,7 +2251,7 @@ AC_FUNC_VPRINTF
AC_CHECK_FUNCS(alarm bcmp bfill bmove bsearch bzero \
chsize cuserid fchmod fcntl \
fconvert fdatasync fesetround finite fpresetsticky fpsetmask fsync ftruncate \
fdatasync fesetround finite fpresetsticky fpsetmask fsync ftruncate \
getcwd gethostbyaddr_r gethostbyname_r getpass getpassphrase getpwnam \
getpwuid getrlimit getrusage getwd index initgroups isnan \
localtime_r gethrtime gmtime_r \
@ -2875,7 +2890,7 @@ case $SYSTEM_TYPE in
fi
# if there is no readline, but we want to build with readline, we fail
if [test "$want_to_use_readline" = "yes"] && [test ! -d "./cmd-line-utils/readline"]
if [test "$want_to_use_readline" = "yes"] && [test ! -d "$srcdir/cmd-line-utils/readline"]
then
AC_MSG_ERROR([This commercially licensed MySQL source package can't
be built with libreadline. Please use --with-libedit to use
@ -3015,8 +3030,8 @@ AC_SUBST(server_scripts)
AC_SUBST(mysql_plugin_dirs)
AC_SUBST(mysql_plugin_libs)
AC_SUBST(mysql_plugin_defs)
AC_SUBST(mysql_optional_plugins)
AC_SUBST(mysql_mandatory_plugins)
# Now that sql_client_dirs and sql_server_dirs are stable, determine the union.
# We support client-only builds by "--without-server", but not vice versa,

View file

@ -50,11 +50,7 @@
# endif
#endif
#if defined(make_atomic_cas_body) || defined(MY_ATOMICS_MADE)
/*
* We have atomics that require no locking
*/
#define MY_ATOMIC_NOLOCK
#if defined(make_atomic_cas_body)
/*
Type not used so minimal size (emptry struct has different size between C
and C++, zero-length array is gcc-specific).

View file

@ -13,242 +13,54 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#ifndef _atomic_h_cleanup_
#define _atomic_h_cleanup_ "atomic/solaris.h"
#include <atomic.h>
#define MY_ATOMIC_MODE "solaris-atomic"
/*
* This is defined to indicate we fully define the my_atomic_* (inline)
* functions here, so there is no need to "make" them in my_atomic.h
* using make_atomic_* and make_atomic_*_body.
*/
#define MY_ATOMICS_MADE
#define uintptr_t void *
#define atomic_or_ptr_nv(X,Y) (void *)atomic_or_ulong_nv((volatile ulong_t *)X, Y)
STATIC_INLINE int
my_atomic_cas8(int8 volatile *a, int8 *cmp, int8 set)
{
int ret;
int8 sav;
sav = (int8) atomic_cas_8((volatile uint8_t *)a, (uint8_t)*cmp,
(uint8_t)set);
if (! (ret = (sav == *cmp)))
*cmp = sav;
return ret;
}
#define make_atomic_cas_body(S) \
uint ## S ## _t sav; \
sav = atomic_cas_ ## S( \
(volatile uint ## S ## _t *)a, \
(uint ## S ## _t)*cmp, \
(uint ## S ## _t)set); \
if (! (ret= (sav == *cmp))) \
*cmp= sav;
STATIC_INLINE int
my_atomic_cas16(int16 volatile *a, int16 *cmp, int16 set)
{
int ret;
int16 sav;
sav = (int16) atomic_cas_16((volatile uint16_t *)a, (uint16_t)*cmp,
(uint16_t)set);
if (! (ret = (sav == *cmp)))
*cmp = sav;
return ret;
}
STATIC_INLINE int
my_atomic_cas32(int32 volatile *a, int32 *cmp, int32 set)
{
int ret;
int32 sav;
sav = (int32) atomic_cas_32((volatile uint32_t *)a, (uint32_t)*cmp,
(uint32_t)set);
if (! (ret = (sav == *cmp)))
*cmp = sav;
return ret;
}
STATIC_INLINE int
my_atomic_cas64(int64 volatile *a, int64 *cmp, int64 set)
{
int ret;
int64 sav;
sav = (int64) atomic_cas_64((volatile uint64_t *)a, (uint64_t)*cmp,
(uint64_t)set);
if (! (ret = (sav == *cmp)))
*cmp = sav;
return ret;
}
STATIC_INLINE int
my_atomic_casptr(void * volatile *a, void **cmp, void *set)
{
int ret;
void *sav;
sav = atomic_cas_ptr(a, *cmp, set);
if (! (ret = (sav == *cmp)))
*cmp = sav;
return ret;
}
/* ------------------------------------------------------------------------ */
STATIC_INLINE int8
my_atomic_add8(int8 volatile *a, int8 v)
{
int8 nv;
nv = atomic_add_8_nv((volatile uint8_t *)a, v);
return (nv - v);
}
STATIC_INLINE int16
my_atomic_add16(int16 volatile *a, int16 v)
{
int16 nv;
nv = atomic_add_16_nv((volatile uint16_t *)a, v);
return (nv - v);
}
STATIC_INLINE int32
my_atomic_add32(int32 volatile *a, int32 v)
{
int32 nv;
nv = atomic_add_32_nv((volatile uint32_t *)a, v);
return (nv - v);
}
STATIC_INLINE int64
my_atomic_add64(int64 volatile *a, int64 v)
{
int64 nv;
nv = atomic_add_64_nv((volatile uint64_t *)a, v);
return (nv - v);
}
#define make_atomic_add_body(S) \
int ## S nv; /* new value */ \
nv= atomic_add_ ## S ## _nv((volatile uint ## S ## _t *)a, v); \
v= nv - v
/* ------------------------------------------------------------------------ */
#ifdef MY_ATOMIC_MODE_DUMMY
STATIC_INLINE int8
my_atomic_load8(int8 volatile *a) { return (*a); }
STATIC_INLINE int16
my_atomic_load16(int16 volatile *a) { return (*a); }
STATIC_INLINE int32
my_atomic_load32(int32 volatile *a) { return (*a); }
STATIC_INLINE int64
my_atomic_load64(int64 volatile *a) { return (*a); }
STATIC_INLINE void *
my_atomic_loadptr(void * volatile *a) { return (*a); }
/* ------------------------------------------------------------------------ */
STATIC_INLINE void
my_atomic_store8(int8 volatile *a, int8 v) { *a = v; }
STATIC_INLINE void
my_atomic_store16(int16 volatile *a, int16 v) { *a = v; }
STATIC_INLINE void
my_atomic_store32(int32 volatile *a, int32 v) { *a = v; }
STATIC_INLINE void
my_atomic_store64(int64 volatile *a, int64 v) { *a = v; }
STATIC_INLINE void
my_atomic_storeptr(void * volatile *a, void *v) { *a = v; }
/* ------------------------------------------------------------------------ */
#define make_atomic_load_body(S) ret= *a
#define make_atomic_store_body(S) *a= v
#else /* MY_ATOMIC_MODE_DUMMY */
STATIC_INLINE int8
my_atomic_load8(int8 volatile *a)
{
return ((int8) atomic_or_8_nv((volatile uint8_t *)a, 0));
}
#define make_atomic_load_body(S) \
ret= atomic_or_ ## S ## _nv((volatile uint ## S ## _t *)a, 0)
STATIC_INLINE int16
my_atomic_load16(int16 volatile *a)
{
return ((int16) atomic_or_16_nv((volatile uint16_t *)a, 0));
}
STATIC_INLINE int32
my_atomic_load32(int32 volatile *a)
{
return ((int32) atomic_or_32_nv((volatile uint32_t *)a, 0));
}
STATIC_INLINE int64
my_atomic_load64(int64 volatile *a)
{
return ((int64) atomic_or_64_nv((volatile uint64_t *)a, 0));
}
STATIC_INLINE void *
my_atomic_loadptr(void * volatile *a)
{
return ((void *) atomic_or_ulong_nv((volatile ulong_t *)a, 0));
}
/* ------------------------------------------------------------------------ */
STATIC_INLINE void
my_atomic_store8(int8 volatile *a, int8 v)
{
(void) atomic_swap_8((volatile uint8_t *)a, (uint8_t)v);
}
STATIC_INLINE void
my_atomic_store16(int16 volatile *a, int16 v)
{
(void) atomic_swap_16((volatile uint16_t *)a, (uint16_t)v);
}
STATIC_INLINE void
my_atomic_store32(int32 volatile *a, int32 v)
{
(void) atomic_swap_32((volatile uint32_t *)a, (uint32_t)v);
}
STATIC_INLINE void
my_atomic_store64(int64 volatile *a, int64 v)
{
(void) atomic_swap_64((volatile uint64_t *)a, (uint64_t)v);
}
STATIC_INLINE void
my_atomic_storeptr(void * volatile *a, void *v)
{
(void) atomic_swap_ptr(a, v);
}
#define make_atomic_store_body(S) \
(void) atomic_swap_ ## S((volatile uint ## S ## _t *)a, (uint ## S ## _t)v)
#endif
/* ------------------------------------------------------------------------ */
#define make_atomic_fas_body(S) \
v= atomic_swap_ ## S((volatile uint ## S ## _t *)a, (uint ## S ## _t)v)
STATIC_INLINE int8
my_atomic_fas8(int8 volatile *a, int8 v)
{
return ((int8) atomic_swap_8((volatile uint8_t *)a, (uint8_t)v));
}
#else /* cleanup */
STATIC_INLINE int16
my_atomic_fas16(int16 volatile *a, int16 v)
{
return ((int16) atomic_swap_16((volatile uint16_t *)a, (uint16_t)v));
}
#undef uintptr_t
#undef atomic_or_ptr_nv
STATIC_INLINE int32
my_atomic_fas32(int32 volatile *a, int32 v)
{
return ((int32) atomic_swap_32((volatile uint32_t *)a, (uint32_t)v));
}
#endif
STATIC_INLINE int64
my_atomic_fas64(int64 volatile *a, int64 v)
{
return ((int64) atomic_swap_64((volatile uint64_t *)a, (uint64_t)v));
}
STATIC_INLINE void *
my_atomic_fasptr(void * volatile *a, void *v)
{
return (atomic_swap_ptr(a, v));
}

View file

@ -100,7 +100,7 @@ extern "C" {
#define USE_OLD_FUNCTIONS 1
/* no case sensitivity */
#define FN_NO_CASE_SENCE 1
#define FN_NO_CASE_SENSE 1
/* the thread alarm is not used */
#define DONT_USE_THR_ALARM 1

View file

@ -318,10 +318,8 @@ inline ulonglong double2ulonglong(double d)
#define strcasecmp stricmp
#define strncasecmp strnicmp
#ifdef NOT_USED
#define HAVE_SNPRINTF /* Gave link error */
#define _snprintf snprintf
#endif
#define snprintf _snprintf
#ifdef _MSC_VER
#define HAVE_LDIV /* The optimizer breaks in zortech for ldiv */
@ -360,7 +358,7 @@ inline ulonglong double2ulonglong(double d)
#define FN_ROOTDIR "\\"
#define FN_DEVCHAR ':'
#define FN_NETWORK_DRIVES /* Uses \\ to indicate network drives */
#define FN_NO_CASE_SENCE /* Files are not case-sensitive */
#define FN_NO_CASE_SENSE /* Files are not case-sensitive */
#define OS_FILE_LIMIT UINT_MAX /* No limit*/
#define DO_NOT_REMOVE_THREAD_WRAPPERS

View file

@ -28,6 +28,8 @@ extern "C" {
#define HA_FT_MAXBYTELEN 254
#define HA_FT_MAXCHARLEN (HA_FT_MAXBYTELEN/3)
#define DEFAULT_FTB_SYNTAX "+ -><()~*:\"\"&|"
typedef struct st_ft_info FT_INFO;
struct _ft_vft
{
@ -51,7 +53,7 @@ extern const char *ft_precompiled_stopwords[];
extern ulong ft_min_word_len;
extern ulong ft_max_word_len;
extern ulong ft_query_expansion_limit;
extern char ft_boolean_syntax[15];
extern const char *ft_boolean_syntax;
extern struct st_mysql_ftparser ft_default_parser;
int ft_init_stopwords(void);

View file

@ -87,10 +87,10 @@ typedef struct st_key_cache
initializing the key cache.
*/
ulonglong param_buff_size; /* size the memory allocated for the cache */
ulong param_block_size; /* size of the blocks in the key cache */
ulong param_division_limit; /* min. percentage of warm blocks */
ulong param_age_threshold; /* determines when hot block is downgraded */
ulonglong param_buff_size; /* size the memory allocated for the cache */
ulonglong param_block_size; /* size of the blocks in the key cache */
ulonglong param_division_limit; /* min. percentage of warm blocks */
ulonglong param_age_threshold; /* determines when hot block is downgraded */
/* Statistics variables. These are reset in reset_key_cache_counters(). */
ulong global_blocks_changed; /* number of currently dirty blocks */

View file

@ -92,9 +92,6 @@ extern char *stpcpy(char *, const char *); /* For AIX with gcc 2.95.3 */
extern char NEAR _dig_vec_upper[];
extern char NEAR _dig_vec_lower[];
/* Defined in strtod.c */
extern const double log_10[309];
#ifdef BAD_STRING_COMPILER
#define strmov(A,B) (memccpy(A,B,0,INT_MAX)-1)
#else
@ -199,8 +196,42 @@ extern char *strstr(const char *, const char *);
extern int is_prefix(const char *, const char *);
/* Conversion routines */
typedef enum {
MY_GCVT_ARG_FLOAT,
MY_GCVT_ARG_DOUBLE
} my_gcvt_arg_type;
double my_strtod(const char *str, char **end, int *error);
double my_atof(const char *nptr);
size_t my_fcvt(double x, int precision, char *to, my_bool *error);
size_t my_gcvt(double x, my_gcvt_arg_type type, int width, char *to,
my_bool *error);
#define NOT_FIXED_DEC 31
/*
The longest string my_fcvt can return is 311 + "precision" bytes.
Here we assume that we never cal my_fcvt() with precision >= NOT_FIXED_DEC
(+ 1 byte for the terminating '\0').
*/
#define FLOATING_POINT_BUFFER (311 + NOT_FIXED_DEC)
/*
We want to use the 'e' format in some cases even if we have enough space
for the 'f' one just to mimic sprintf("%.15g") behavior for large integers,
and to improve it for numbers < 10^(-4).
That is, for |x| < 1 we require |x| >= 10^(-15), and for |x| > 1 we require
it to be integer and be <= 10^DBL_DIG for the 'f' format to be used.
We don't lose precision, but make cases like "1e200" or "0.00001" look nicer.
*/
#define MAX_DECPT_FOR_F_FORMAT DBL_DIG
/*
The maximum possible field width for my_gcvt() conversion.
(DBL_DIG + 2) significant digits + sign + "." + ("e-NNN" or
MAX_DECPT_FOR_F_FORMAT zeros for cases when |x|<1 and the 'f' format is used).
*/
#define MY_GCVT_MAX_FIELD_WIDTH (DBL_DIG + 4 + max(5, MAX_DECPT_FOR_F_FORMAT)) \
extern char *llstr(longlong value,char *buff);
extern char *ullstr(longlong value,char *buff);
@ -215,7 +246,7 @@ extern char *str2int(const char *src,int radix,long lower,long upper,
long *val);
longlong my_strtoll10(const char *nptr, char **endptr, int *error);
#if SIZEOF_LONG == SIZEOF_LONG_LONG
#define longlong2str(A,B,C) int2str((A),(B),(C),1)
#define ll2str(A,B,C,D) int2str((A),(B),(C),(D))
#define longlong10_to_str(A,B,C) int10_to_str((A),(B),(C))
#undef strtoll
#define strtoll(A,B,C) strtol((A),(B),(C))
@ -228,7 +259,7 @@ longlong my_strtoll10(const char *nptr, char **endptr, int *error);
#endif
#else
#ifdef HAVE_LONG_LONG
extern char *longlong2str(longlong val,char *dst,int radix);
extern char *ll2str(longlong val,char *dst,int radix, int upcase);
extern char *longlong10_to_str(longlong val,char *dst,int radix);
#if (!defined(HAVE_STRTOULL) || defined(NO_STRTOLL_PROTO))
extern longlong strtoll(const char *str, char **ptr, int base);
@ -236,6 +267,7 @@ extern ulonglong strtoull(const char *str, char **ptr, int base);
#endif
#endif
#endif
#define longlong2str(A,B,C) ll2str((A),(B),(C),1)
/* my_vsnprintf.c */
@ -260,6 +292,13 @@ typedef struct st_mysql_lex_string LEX_STRING;
#define USTRING_WITH_LEN(X) ((uchar*) X), ((size_t) (sizeof(X) - 1))
#define C_STRING_WITH_LEN(X) ((char *) (X)), ((size_t) (sizeof(X) - 1))
struct st_mysql_const_lex_string
{
const char *str;
size_t length;
};
typedef struct st_mysql_const_lex_string LEX_CSTRING;
/* SPACE_INT is a word that contains only spaces */
#if SIZEOF_INT == 4
#define SPACE_INT 0x20202020

View file

@ -68,12 +68,11 @@
#include "atomic/nolock.h"
#endif
#ifndef MY_ATOMIC_NOLOCK
#ifndef make_atomic_cas_body
/* nolock.h was not able to generate even a CAS function, fall back */
#include "atomic/rwlock.h"
#endif
#ifndef MY_ATOMICS_MADE
/* define missing functions by using the already generated ones */
#ifndef make_atomic_add_body
#define make_atomic_add_body(S) \
@ -287,7 +286,6 @@ make_atomic_store(ptr)
#undef make_atomic_load_body
#undef make_atomic_store_body
#undef make_atomic_fas_body
#endif
#undef intptr
/*

View file

@ -275,17 +275,6 @@ enum ha_base_keytype {
#define HA_USES_PARSER 16384 /* Fulltext index uses [pre]parser */
#define HA_USES_BLOCK_SIZE ((uint) 32768)
#define HA_SORT_ALLOWS_SAME 512 /* Intern bit when sorting records */
#if MYSQL_VERSION_ID < 0x50200
/*
Key has a part that can have end space. If this is an unique key
we have to handle it differently from other unique keys as we can find
many matching rows for one key (because end space are not compared)
*/
#define HA_END_SPACE_KEY 0 /* was: 4096 */
#else
#error HA_END_SPACE_KEY is obsolete, please remove it
#endif
/* These flags can be added to key-seg-flag */

View file

@ -32,6 +32,7 @@ C_MODE_START
#define GET_ENUM 12
#define GET_SET 13
#define GET_DOUBLE 14
#define GET_FLAGSET 15
#define GET_ASK_ADDR 128
#define GET_TYPE_MASK 127
@ -42,24 +43,40 @@ struct st_typelib;
struct my_option
{
const char *name; /* Name of the option */
int id; /* unique id or short option */
const char *comment; /* option comment, for autom. --help */
uchar **value; /* The variable value */
uchar **u_max_value; /* The user def. max variable value */
struct st_typelib *typelib; /* Pointer to possible values */
ulong var_type;
enum get_opt_arg_type arg_type;
longlong def_value; /* Default value */
longlong min_value; /* Min allowed value */
longlong max_value; /* Max allowed value */
longlong sub_size; /* Subtract this from given value */
long block_size; /* Value should be a mult. of this */
void *app_type; /* To be used by an application */
const char *name; /**< Name of the option. name=NULL
marks the end of the my_option[]
array.
*/
int id; /**< For 0<id<255 it's means one
character for a short option
(like -A), if >255 no short option
is created, but a long option still
can be identified uniquely in the
my_get_one_option() callback.
If an opton needs neither special
treatment in the my_get_one_option()
nor one-letter short equivalent
use id=0
*/
const char *comment; /**< option comment, for autom. --help.
if it's NULL the option is not
visible in --help.
*/
uchar **value; /**< A pointer to the variable value */
uchar **u_max_value; /**< The user def. max variable value */
struct st_typelib *typelib; /**< Pointer to possible values */
ulong var_type; /**< GET_BOOL, GET_ULL, etc */
enum get_opt_arg_type arg_type; /**< e.g. REQUIRED_ARG or OPT_ARG */
longlong def_value; /**< Default value */
longlong min_value; /**< Min allowed value (for numbers) */
longlong max_value; /**< Max allowed value (for numbers) */
longlong sub_size; /**< Unused */
long block_size; /**< Value should be a mult. of this (for numbers) */
void *app_type; /**< To be used by an application */
};
typedef my_bool (* my_get_one_option) (int, const struct my_option *, char * );
typedef void (* my_error_reporter) (enum loglevel level, const char *format, ... );
typedef my_bool (*my_get_one_option) (int, const struct my_option *, char * );
typedef void (*my_error_reporter) (enum loglevel level, const char *format, ... );
extern char *disabled_my_option;
extern my_bool my_getopt_print_errors;
@ -78,6 +95,8 @@ ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp,
my_bool *fix);
longlong getopt_ll_limit_value(longlong, const struct my_option *,
my_bool *fix);
double getopt_double_limit_value(double num, const struct my_option *optp,
my_bool *fix);
my_bool getopt_compare_strings(const char *s, const char *t, uint length);
C_MODE_END

View file

@ -93,11 +93,35 @@
#define HAVE_PSI_INTERFACE
#endif /* WITH_PERFSCHEMA_STORAGE_ENGINE */
/* Make it easier to add conditionl code for windows */
/* Make it easier to add conditional code in _expressions_ */
#ifdef __WIN__
#define IF_WIN(A,B) (A)
#define IF_WIN(A,B) A
#else
#define IF_WIN(A,B) (B)
#define IF_WIN(A,B) B
#endif
#ifdef __NETWARE__
#define IF_NETWARE(A,B) A
#else
#define IF_NETWARE(A,B) B
#endif
#ifndef DBUG_OFF
#define IF_DBUG(A,B) A
#else
#define IF_DBUG(A,B) B
#endif
#ifdef HAVE_purify
#define IF_PURIFY(A,B) A
#else
#define IF_PURIFY(A,B) B
#endif
#ifdef DISABLE_GRANT_OPTIONS
#define IF_DISABLE_GRANT_OPTIONS(A,B) A
#else
#define IF_DISABLE_GRANT_OPTIONS(A,B) B
#endif
#ifndef EMBEDDED_LIBRARY
@ -249,6 +273,8 @@
#define inline_test_2(X) inline_test_1(X)
#if inline_test_2(inline) != 1
#define HAVE_INLINE
#else
#warning No "inline" support in C, all "static inline" functions will be instantiated in every .o file!!!
#endif
#undef inline_test_2
#undef inline_test_1
@ -489,8 +515,7 @@ C_MODE_END
#define compile_time_assert(X) \
do \
{ \
char compile_time_assert[(X) ? 1 : -1] \
__attribute__ ((unused)); \
typedef char compile_time_assert[(X) ? 1 : -1]; \
} while(0)
#endif
@ -787,7 +812,7 @@ typedef SOCKET_SIZE_TYPE size_socket;
#endif
/* #define EXT_IN_LIBNAME */
/* #define FN_NO_CASE_SENCE */
/* #define FN_NO_CASE_SENSE */
/* #define FN_UPPER_CASE TRUE */
/*
@ -810,7 +835,7 @@ typedef SOCKET_SIZE_TYPE size_socket;
/* Typical record cash */
#define RECORD_CACHE_SIZE (uint) (64*1024-MALLOC_OVERHEAD)
/* Typical key cash */
#define KEY_CACHE_SIZE (uint) (8*1024*1024-MALLOC_OVERHEAD)
#define KEY_CACHE_SIZE (uint) (8*1024*1024)
/* Default size of a key cache block */
#define KEY_CACHE_BLOCK_SIZE (uint) 1024

View file

@ -154,8 +154,7 @@ int pthread_join(pthread_t thread, void **value_ptr);
#define pthread_detach_this_thread()
#define pthread_condattr_init(A)
#define pthread_condattr_destroy(A)
/* per the platform's documentation */
#define pthread_yield() Sleep(0)
#define pthread_yield() SwitchToThread()
#else /* Normal threads */

View file

@ -74,12 +74,12 @@ typedef long my_time_t;
TIME_MAX_MINUTE * 60L + TIME_MAX_SECOND)
my_bool check_date(const MYSQL_TIME *ltime, my_bool not_zero_date,
ulong flags, int *was_cut);
ulonglong flags, int *was_cut);
enum enum_mysql_timestamp_type
str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
uint flags, int *was_cut);
ulonglong flags, int *was_cut);
longlong number_to_datetime(longlong nr, MYSQL_TIME *time_res,
uint flags, int *was_cut);
ulonglong flags, int *was_cut);
ulonglong TIME_to_ulonglong_datetime(const MYSQL_TIME *);
ulonglong TIME_to_ulonglong_date(const MYSQL_TIME *);
ulonglong TIME_to_ulonglong_time(const MYSQL_TIME *);

View file

@ -251,7 +251,7 @@ typedef struct st_columndef /* column information */
extern char * myisam_log_filename; /* Name of logfile */
extern ulong myisam_block_size;
extern ulong myisam_concurrent_insert;
extern uint myisam_concurrent_insert;
extern my_bool myisam_flush,myisam_delay_key_write,myisam_single_user;
extern my_off_t myisam_max_temp_length;
extern ulong myisam_bulk_insert_tree_size, myisam_data_pointer_size;

View file

@ -233,6 +233,10 @@ extern void make_type(char *to,unsigned int nr,TYPELIB *typelib);
extern const char *get_type(TYPELIB *typelib,unsigned int nr);
extern TYPELIB *copy_typelib(MEM_ROOT *root, TYPELIB *from);
extern TYPELIB sql_protocol_typelib;
my_ulonglong find_set_from_flags(const TYPELIB *lib, uint default_name,
my_ulonglong cur_set, my_ulonglong default_set,
const char *str, uint length,
char **err_pos, uint *err_len);
typedef struct st_mysql_rows {
struct st_mysql_rows *next;
MYSQL_ROW data;

View file

@ -675,6 +675,7 @@ struct st_mysql_value
const char *(*val_str)(struct st_mysql_value *, char *buffer, int *length);
int (*val_real)(struct st_mysql_value *, double *realbuf);
int (*val_int)(struct st_mysql_value *, long long *intbuf);
int (*is_unsigned)(struct st_mysql_value *);
};

View file

@ -144,6 +144,7 @@ struct st_mysql_value
const char *(*val_str)(struct st_mysql_value *, char *buffer, int *length);
int (*val_real)(struct st_mysql_value *, double *realbuf);
int (*val_int)(struct st_mysql_value *, long long *intbuf);
int (*is_unsigned)(struct st_mysql_value *);
};
int thd_in_lock_tables(const void* thd);
int thd_tablespace_op(const void* thd);

View file

@ -53,7 +53,7 @@
<length modifier> can be 'l', 'll', or 'z'.
Supported formats are 's' (null pointer is accepted, printed as
"(null)"), 'b' (extension, see below), 'c', 'd', 'u', 'x',
"(null)"), 'b' (extension, see below), 'c', 'd', 'u', 'x', 'o',
'X', 'p' (works as 0x%x).
Standard syntax for positional arguments $n is supported.

View file

@ -19,8 +19,8 @@
#ifdef HAVE_OPENSSL
{"ssl", OPT_SSL_SSL,
"Enable SSL for connection (automatically enabled with other flags). Disable with --skip-ssl.",
(uchar **) &opt_use_ssl, (uchar **) &opt_use_ssl, 0, GET_BOOL, NO_ARG, 0, 0, 0,
"Enable SSL for connection (automatically enabled with other flags).",
(uchar **) &opt_use_ssl, (uchar **) &opt_use_ssl, 0, GET_BOOL, OPT_ARG, 0, 0, 0,
0, 0, 0},
{"ssl-ca", OPT_SSL_CA,
"CA file in PEM format (check OpenSSL docs, implies --ssl).",
@ -43,7 +43,7 @@
{"ssl-verify-server-cert", OPT_SSL_VERIFY_SERVER_CERT,
"Verify server's \"Common Name\" in its cert against hostname used when connecting. This option is disabled by default.",
(uchar **) &opt_ssl_verify_server_cert, (uchar **) &opt_ssl_verify_server_cert,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0},
#endif
#endif /* HAVE_OPENSSL */
#endif /* SSLOPT_LONGOPTS_INCLUDED */

View file

@ -36,4 +36,9 @@ extern TYPELIB *copy_typelib(MEM_ROOT *root, TYPELIB *from);
extern TYPELIB sql_protocol_typelib;
my_ulonglong find_set_from_flags(const TYPELIB *lib, uint default_name,
my_ulonglong cur_set, my_ulonglong default_set,
const char *str, uint length,
char **err_pos, uint *err_len);
#endif /* _typelib_h */

View file

@ -69,7 +69,7 @@ SET(CLIENT_SOURCES ../mysys/array.c ../strings/bchange.c ../strings/bmove.c
../strings/ctype-simple.c ../strings/ctype-sjis.c ../strings/ctype-tis620.c
../strings/ctype-uca.c ../strings/ctype-ucs2.c ../strings/ctype-ujis.c
../strings/ctype-utf8.c ../strings/ctype-win1250ch.c ../strings/ctype.c
../mysys/default.c errmsg.c ../mysys/errors.c
../mysys/default.c ../strings/dtoa.c errmsg.c ../mysys/errors.c
../mysys/hash.c ../mysys/my_sleep.c ../mysys/default_modify.c
get_password.c ../strings/int2str.c ../strings/is_prefix.c
libmysql.c ../mysys/list.c ../strings/llstr.c
@ -92,7 +92,7 @@ SET(CLIENT_SOURCES ../mysys/array.c ../strings/bchange.c ../strings/bmove.c
../mysys/safemalloc.c ../mysys/sha1.c ../strings/str2int.c
../strings/str_alloc.c ../strings/strcend.c ../strings/strcont.c ../strings/strend.c
../strings/strfill.c ../mysys/string.c ../strings/strinstr.c ../strings/strmake.c
../strings/strmov.c ../strings/strnlen.c ../strings/strnmov.c ../strings/strtod.c
../strings/strmov.c ../strings/strnlen.c ../strings/strnmov.c
../strings/strtoll.c ../strings/strtoull.c ../strings/strxmov.c ../strings/strxnmov.c
../mysys/thr_mutex.c ../mysys/typelib.c ../vio/vio.c ../vio/viosocket.c
../vio/viossl.c ../vio/viosslfactories.c ../strings/xml.c ../mysys/mf_qsort.c

View file

@ -35,7 +35,7 @@ target_sources = libmysql.c password.c \
get_password.c errmsg.c
mystringsobjects = strmov.lo strxmov.lo strxnmov.lo strnmov.lo \
strmake.lo strend.lo strtod.lo \
strmake.lo strend.lo \
strnlen.lo strfill.lo is_prefix.lo \
int2str.lo str2int.lo strinstr.lo strcont.lo \
strcend.lo bcmp.lo ctype-latin1.lo \
@ -46,7 +46,7 @@ mystringsobjects = strmov.lo strxmov.lo strxnmov.lo strnmov.lo \
ctype-win1250ch.lo ctype-utf8.lo ctype-extra.lo \
ctype-ucs2.lo ctype-gb2312.lo ctype-gbk.lo \
ctype-sjis.lo ctype-tis620.lo ctype-ujis.lo \
ctype-uca.lo xml.lo my_strtoll10.lo str_alloc.lo
ctype-uca.lo xml.lo my_strtoll10.lo str_alloc.lo dtoa.lo
mystringsextra= strto.c
dbugobjects = dbug.lo # IT IS IN SAFEMALLOC.C sanity.lo

View file

@ -3372,12 +3372,13 @@ static void fetch_long_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field,
param output buffer descriptor
field column metadata
value column data
width default number of significant digits used when converting
float/double to string
type either MY_GCVT_ARG_FLOAT or MY_GCVT_ARG_DOUBLE.
Affects the maximum number of significant digits
returned by my_gcvt().
*/
static void fetch_float_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field,
double value, int width)
double value, my_gcvt_arg_type type)
{
char *buffer= (char *)param->buffer;
double val64 = (value < 0 ? -floor(-value) : floor(value));
@ -3461,39 +3462,24 @@ static void fetch_float_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field,
floating point -> string conversion nicely, honor all typecodes
and param->offset possibly set in mysql_stmt_fetch_column
*/
char buff[MAX_DOUBLE_STRING_REP_LENGTH];
char *end;
char buff[FLOATING_POINT_BUFFER];
size_t len;
if (field->decimals >= NOT_FIXED_DEC)
{
/*
DBL_DIG below is to ensure that the server and client has the same
precisions. This will ensure that on the same machine you get the
same value as a string independent of the protocol you use.
*/
sprintf(buff, "%-*.*g", (int) min(sizeof(buff)-1,
param->buffer_length),
min(DBL_DIG, width), value);
end= strcend(buff, ' ');
*end= 0;
}
len= my_gcvt(value, type,
(int) min(sizeof(buff)-1, param->buffer_length),
buff, NULL);
else
{
sprintf(buff, "%.*f", (int) field->decimals, value);
end= strend(buff);
}
len= my_fcvt(value, (int) field->decimals, buff, NULL);
if (field->flags & ZEROFILL_FLAG && len < field->length &&
field->length < MAX_DOUBLE_STRING_REP_LENGTH - 1)
{
size_t length= end - buff;
if (field->flags & ZEROFILL_FLAG && length < field->length &&
field->length < MAX_DOUBLE_STRING_REP_LENGTH - 1)
{
bmove_upp((uchar*) buff + field->length, (uchar*) buff + length,
length);
bfill((char*) buff, field->length - length, '0');
length= field->length;
}
fetch_string_with_conversion(param, buff, length);
bmove_upp((uchar*) buff + field->length, (uchar*) buff + len,
len);
bfill((char*) buff, field->length - len, '0');
len= field->length;
}
fetch_string_with_conversion(param, buff, len);
break;
}
@ -3538,7 +3524,7 @@ static void fetch_datetime_with_conversion(MYSQL_BIND *param,
{
ulonglong value= TIME_to_ulonglong(my_time);
fetch_float_with_conversion(param, field,
ulonglong2double(value), DBL_DIG);
ulonglong2double(value), MY_GCVT_ARG_DOUBLE);
break;
}
case MYSQL_TYPE_TINY:
@ -3632,7 +3618,7 @@ static void fetch_result_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field,
{
float value;
float4get(value,*row);
fetch_float_with_conversion(param, field, value, FLT_DIG);
fetch_float_with_conversion(param, field, value, MY_GCVT_ARG_FLOAT);
*row+= 4;
break;
}
@ -3640,7 +3626,7 @@ static void fetch_result_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field,
{
double value;
float8get(value,*row);
fetch_float_with_conversion(param, field, value, DBL_DIG);
fetch_float_with_conversion(param, field, value, MY_GCVT_ARG_DOUBLE);
*row+= 8;
break;
}

View file

@ -117,7 +117,8 @@ SET(LIBMYSQLD_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc
../sql/sql_class.cc ../sql/sql_crypt.cc ../sql/sql_cursor.cc
../sql/sql_db.cc ../sql/sql_delete.cc ../sql/sql_derived.cc
../sql/sql_do.cc ../sql/sql_error.cc ../sql/sql_handler.cc
../sql/sql_help.cc ../sql/sql_insert.cc ../sql/sql_lex.cc
../sql/sql_help.cc ../sql/sql_insert.cc
../sql/sql_lex.cc ../sql/keycaches.cc
../sql/sql_list.cc ../sql/sql_load.cc ../sql/sql_locale.cc
../sql/sql_binlog.cc ../sql/sql_manager.cc ../sql/sql_map.cc
../sql/sql_parse.cc ../sql/sql_partition.cc ../sql/sql_plugin.cc

View file

@ -67,7 +67,7 @@ sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \
sql_lex.cc sql_list.cc sql_manager.cc sql_map.cc \
scheduler.cc sql_connect.cc sql_parse.cc \
sql_prepare.cc sql_derived.cc sql_rename.cc \
sql_select.cc sql_do.cc sql_show.cc set_var.cc \
sql_select.cc sql_do.cc sql_show.cc set_var.cc sys_vars.cc \
sql_string.cc sql_table.cc sql_test.cc sql_udf.cc \
sql_update.cc sql_yacc.cc table.cc thr_malloc.cc time.cc \
unireg.cc uniques.cc sql_union.cc hash_filo.cc \
@ -79,7 +79,7 @@ sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \
sql_tablespace.cc \
rpl_injector.cc my_user.c partition_info.cc \
sql_servers.cc event_parse_data.cc sql_signal.cc \
rpl_handler.cc
rpl_handler.cc keycaches.cc
libmysqld_int_a_SOURCES= $(libmysqld_sources)
nodist_libmysqld_int_a_SOURCES= $(libmysqlsources) $(sqlsources)

View file

@ -506,6 +506,9 @@ int init_embedded_server(int argc, char **argv, char **groups)
mysql_server_end();
return 1;
}
mysql_data_home= mysql_real_data_home;
mysql_data_home_len= mysql_real_data_home_len;
/* Get default temporary directory */
opt_mysql_tmpdir=getenv("TMPDIR"); /* Use this if possible */
@ -614,7 +617,7 @@ void *create_embedded_thd(int client_flag)
/* TODO - add init_connect command execution */
if (thd->variables.max_join_size == HA_POS_ERROR)
thd->options |= OPTION_BIG_SELECTS;
thd->variables.option_bits |= OPTION_BIG_SELECTS;
thd->proc_info=0; // Remove 'login'
thd->command=COM_SLEEP;
thd->version=refresh_version;

View file

@ -99,7 +99,8 @@ TEST_DIRS = t r include std_data std_data/parts collections \
suite/ndb suite/ndb/t suite/ndb/r \
suite/rpl_ndb suite/rpl_ndb/t suite/rpl_ndb/r \
suite/parts suite/parts/t suite/parts/r suite/parts/inc \
suite/innodb suite/innodb/t suite/innodb/r suite/innodb/include
suite/innodb suite/innodb/t suite/innodb/r suite/innodb/include \
suite/sys_vars suite/sys_vars/t suite/sys_vars/inc suite/sys_vars/r
# Used by dist-hook and install-data-local to copy all
# test files into either dist or install directory

View file

@ -1,4 +1,4 @@
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=n_mix --vardir=var-n_mix --mysqld=--binlog-format=mixed --suite=main,binlog,innodb,federated,rpl
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=n_mix --vardir=var-n_mix --mysqld=--binlog-format=mixed --suite=main,binlog,innodb,federated,rpl,sys_vars
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=ps_row --vardir=var-ps_row --ps-protocol --mysqld=--binlog-format=row --suite=main,binlog,innodb,federated,rpl
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=embedded --vardir=var-emebbed --embedded --suite=main,binlog,innodb,federated,rpl
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=rpl_binlog_row --vardir=var-rpl_binlog_row --mysqld=--binlog-format=row --suite=rpl,binlog

View file

@ -114,9 +114,7 @@ set @@character_set_server=latin5;
select @@character_set_server;
select @@character_set_server;
# ONE_SHOT on not charset/collation stuff is not allowed
-- error 1382
set one_shot max_join_size=10;
set one_shot max_join_size=1000000;
# Test of wrong character set numbers;
error 1115;

View file

@ -60,6 +60,7 @@ disable_query_log;
--error 0,1
--remove_file $MYSQLTEST_VARDIR/tmp/diff_table_2
let $_diff_table=$diff_table_2;
let $_diff_i=2;
while ($_diff_i) {

View file

@ -0,0 +1,10 @@
disable_query_log;
disable_result_log;
set @have_thread_concurrency=0;
select @have_thread_concurrency:=1 from information_schema.global_variables where variable_name='thread_concurrency';
if (`select @have_thread_concurrency = 0`)
{
skip Need @@thread_concurrency;
}
enable_result_log;
enable_query_log;

View file

@ -303,7 +303,7 @@ drop table t4;
create table t4 (a int);
insert into t4 values (1),(4),(3);
set @save_join_buffer_size=@@join_buffer_size;
set join_buffer_size= 4000;
set join_buffer_size= 4096;
explain select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5)
from t0 as A force index(i1,i2), t0 as B force index (i1,i2)
where (A.key1 < 500000 or A.key2 < 3)

View file

@ -0,0 +1,40 @@
#
# mysqld --help
#
--source include/not_embedded.inc
#
# force lower-case-table-names=1 (linux/macosx have different defaults)
# force symbolic-links=0 (valgrind build has a different default)
#
exec $MYSQLD_BOOTSTRAP_CMD --symbolic-links=0 --lower-case-table-names=1 --help --verbose > $MYSQL_TMP_DIR/mysqld--help.txt 2>&1;
perl;
@skipvars=qw/basedir open-files-limit general-log-file log
log-slow-queries pid-file slow-query-log-file/;
@plugins=qw/innodb ndb ndbcluster safemalloc debug temp-pool ssl des-key-file
thread-concurrency super-large-pages mutex-deadlock-detector/;
@env=qw/MYSQLTEST_VARDIR MYSQL_TEST_DIR MYSQL_LIBDIR MYSQL_SHAREDIR/;
$re1=join('|', @skipvars, @plugins);
$re2=join('|', @plugins);
$skip=0;
open(F, '<', "$ENV{MYSQL_TMP_DIR}/mysqld--help.txt") or die;
while (<F>) {
next if 1../The following groups are read/;
next if /^($re1) /;
next if /^($re2)-/;
$skip=0 if /^ -/;
$skip=1 if / --($re2)\b/;
# fixes for 32-bit
y!\\!/!;
s/\b4294967295\b/18446744073709551615/;
s/\b2146435072\b/9223372036853727232/;
s/\b196608\b/262144/;
foreach $var (@env) { s/$ENV{$var}/$var/ }
next if /use --skip-(use-)?symbolic-links to disable/; # for valgrind, again
next if $skip;
print;
}
close F;
EOF

View file

@ -114,7 +114,7 @@ connection default;
# This should be 'YES'.
SHOW VARIABLES LIKE 'have_query_cache';
SET GLOBAL query_cache_size = 200000;
SET GLOBAL query_cache_size = 204800;
flush status;
SET @@autocommit=1;
eval SET SESSION STORAGE_ENGINE = $engine_type;

View file

@ -27,7 +27,7 @@ connect (con1,localhost,root,,test,$MASTER_MYPORT,);
connection default;
set @initial_query_cache_size = @@global.query_cache_size;
set @@global.query_cache_size=100000;
set @@global.query_cache_size=102400;
flush status;
--disable_warnings
drop table if exists t1;
@ -178,7 +178,7 @@ show status like 'Qcache_hits';
# then QC is re-enabled for more EXECUTE.
--echo ---- switch to connection default ----
connection default;
set global query_cache_size=100000;
set global query_cache_size=102400;
# Expect to see additional Qcache_hits.
# The fact that the QC was temporary disabled should have no affect
# except that the first execute will not hit results from the
@ -235,7 +235,7 @@ prepare stmt3 from "select * from t1 where c1=10";
--echo ---- switch to connection default ----
connection default;
# then QC is enabled at EXECUTE
set global query_cache_size=100000;
set global query_cache_size=102400;
show status like 'Qcache_hits';
execute stmt1;
show status like 'Qcache_hits';
@ -260,7 +260,7 @@ connection default;
set global query_cache_size=0;
prepare stmt1 from "select * from t1 where c1=?";
# then QC is enabled at EXECUTE
set global query_cache_size=100000;
set global query_cache_size=102400;
show status like 'Qcache_hits';
set @a=1;
execute stmt1 using @a;
@ -509,7 +509,7 @@ execute stmt;
set @@global.query_cache_size=0;
alter table t1 add column b int;
execute stmt;
set @@global.query_cache_size=100000;
set @@global.query_cache_size=102400;
execute stmt;
execute stmt;
--echo #

View file

@ -3,6 +3,6 @@
# masked out log positions
--replace_result $MASTER_MYPORT MASTER_PORT
--replace_result $MASTER_MYPORT MASTER_PORT $DEFAULT_MASTER_PORT 3306
--replace_column 1 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
query_vertical SHOW SLAVE STATUS;

View file

@ -68,8 +68,8 @@ use My::File::Path; # Patched version of File::Path
use File::Basename;
use File::Copy;
use File::Find;
use File::Temp qw /tempdir/;
use File::Spec::Functions qw / splitdir /;
use File::Temp qw/tempdir/;
use File::Spec::Functions qw/splitdir/;
use My::Platform;
use My::SafeProcess;
use My::ConfigFactory;
@ -118,6 +118,8 @@ END {
}
}
sub env_or_val($$) { defined $ENV{$_[0]} ? $ENV{$_[0]} : $_[1] }
my $path_config_file; # The generated config file, var/my.cnf
# Visual Studio produces executables in different sub-directories based on the
@ -126,7 +128,7 @@ my $path_config_file; # The generated config file, var/my.cnf
# executables will be used by the test suite.
our $opt_vs_config = $ENV{'MTR_VS_CONFIG'};
my $DEFAULT_SUITES= "main,binlog,federated,rpl,rpl_ndb,ndb,innodb";
my $DEFAULT_SUITES= "main,sys_vars,binlog,federated,rpl,rpl_ndb,ndb,innodb";
my $opt_suites;
our $opt_verbose= 0; # Verbose output, enable with --verbose
@ -213,7 +215,7 @@ my $start_only;
my $opt_wait_all;
my $opt_repeat= 1;
my $opt_retry= 3;
my $opt_retry_failure= 2;
my $opt_retry_failure= env_or_val(MTR_RETRY_FAILURE => 2);
my $opt_strace_client;
@ -242,9 +244,9 @@ our %mysqld_variables;
my $source_dist= 0;
my $opt_max_save_core= $ENV{MTR_MAX_SAVE_CORE} || 5;
my $opt_max_save_datadir= $ENV{MTR_MAX_SAVE_DATADIR} || 20;
my $opt_max_test_fail= $ENV{MTR_MAX_TEST_FAIL} || 10;
my $opt_max_save_core= env_or_val(MTR_MAX_SAVE_CORE => 5);
my $opt_max_save_datadir= env_or_val(MTR_MAX_SAVE_DATADIR => 20);
my $opt_max_test_fail= env_or_val(MTR_MAX_TEST_FAIL => 10);
my $opt_parallel= $ENV{MTR_PARALLEL} || 1;
@ -783,11 +785,12 @@ sub set_vardir {
sub command_line_setup {
my $opt_comment;
my $opt_usage;
my $opt_list_options;
# Read the command line options
# Note: Keep list, and the order, in sync with usage at end of this file
Getopt::Long::Configure("pass_through");
GetOptions(
my %options=(
# Control what engine/variation to run
'embedded-server' => \$opt_embedded_server,
'ps-protocol' => \$opt_ps_protocol,
@ -905,9 +908,13 @@ sub command_line_setup {
'timediff' => \&report_option,
'help|h' => \$opt_usage,
) or usage("Can't read options");
'list-options' => \$opt_list_options,
);
GetOptions(%options) or usage("Can't read options");
usage("") if $opt_usage;
list_options(\%options) if $opt_list_options;
# --------------------------------------------------------------------------
# Setup verbosity
@ -1925,7 +1932,6 @@ sub environment_setup {
split(':', $ENV{'LIBPATH'}) : ());
mtr_debug("LIBPATH: $ENV{'LIBPATH'}");
$ENV{'CHARSETSDIR'}= $path_charsetsdir;
$ENV{'UMASK'}= "0660"; # The octal *string*
$ENV{'UMASK_DIR'}= "0770"; # The octal *string*
@ -1943,9 +1949,11 @@ sub environment_setup {
$ENV{'LC_COLLATE'}= "C";
$ENV{'USE_RUNNING_SERVER'}= using_extern();
$ENV{'MYSQL_TEST_DIR'}= $glob_mysql_test_dir;
$ENV{'DEFAULT_MASTER_PORT'}= $mysqld_variables{'master-port'} || 3306;
$ENV{'DEFAULT_MASTER_PORT'}= $mysqld_variables{'port'};
$ENV{'MYSQL_TMP_DIR'}= $opt_tmpdir;
$ENV{'MYSQLTEST_VARDIR'}= $opt_vardir;
$ENV{'MYSQL_LIBDIR'}= "$basedir/lib";
$ENV{'MYSQL_SHAREDIR'}= $path_language;
# ----------------------------------------------------
# Setup env for NDB
@ -3784,7 +3792,7 @@ sub start_check_warnings ($$) {
mtr_add_arg($args, "--defaults-file=%s", $path_config_file);
mtr_add_arg($args, "--defaults-group-suffix=%s", $mysqld->after('mysqld'));
mtr_add_arg($args, "--skip-safemalloc");
mtr_add_arg($args, "--loose-skip-safemalloc");
mtr_add_arg($args, "--test-file=%s", "include/check-warnings.test");
mtr_add_arg($args, "--verbose");
@ -4208,7 +4216,7 @@ sub mysqld_arguments ($$$) {
if ( $opt_valgrind_mysqld )
{
mtr_add_arg($args, "--skip-safemalloc");
mtr_add_arg($args, "--loose-skip-safemalloc");
if ( $mysql_version_id < 50100 )
{
@ -4993,7 +5001,7 @@ sub gdb_arguments {
my $type= shift;
# Write $args to gdb init file
my $str= join(" ", @$$args);
my $str= join " ", map { s/"/\\"/g; "\"$_\""; } @$$args;
my $gdb_init_file= "$opt_vardir/tmp/gdbinit.$type";
# Remove the old gdbinit file
@ -5057,7 +5065,7 @@ sub ddd_arguments {
my $type= shift;
# Write $args to ddd init file
my $str= join(" ", @$$args);
my $str= join " ", map { s/"/\\"/g; "\"$_\""; } @$$args;
my $gdb_init_file= "$opt_vardir/tmp/gdbinit.$type";
# Remove the old gdbinit file
@ -5122,8 +5130,8 @@ sub debugger_arguments {
# vc[express] /debugexe exe arg1 .. argn
# Add /debugexe and name of the exe before args
unshift(@$$args, "/debugexe");
unshift(@$$args, "$$exe");
unshift(@$$args, "/debugexe");
# Set exe to debuggername
$$exe= $debugger;
@ -5392,3 +5400,15 @@ HERE
}
sub list_options ($) {
my $hash= shift;
for (keys %$hash) {
s/([:=].*|[+!])$//;
s/\|/\n--/g;
print "--$_\n" unless /list-options/;
}
exit(1);
}

View file

@ -12708,7 +12708,7 @@ DATA_LENGTH AVG_ROW_LENGTH
8700 4350
DROP TABLE t1;
SET @save_join_buffer_size= @@join_buffer_size;
SET @@join_buffer_size= 8228;
SET @@join_buffer_size= 8192;
CREATE TABLE t1(a CHAR(255)) ENGINE=archive;
INSERT INTO t1 VALUES('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'),
('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'),

View file

@ -266,7 +266,7 @@ fid AsText(EndPoint(g))
107 POINT(40 10)
SELECT fid, GLength(g) FROM gis_line ORDER by fid;
fid GLength(g)
105 24.142135623731
105 24.14213562373095
106 40
107 30
SELECT fid, NumPoints(g) FROM gis_line ORDER by fid;
@ -292,7 +292,7 @@ Note 1003 select astext(startpoint(`test`.`gis_line`.`g`)) AS `AsText(StartPoint
SELECT fid, AsText(Centroid(g)) FROM gis_polygon ORDER by fid;
fid AsText(Centroid(g))
108 POINT(15 15)
109 POINT(25.4166666666667 25.4166666666667)
109 POINT(25.416666666666668 25.416666666666668)
110 POINT(20 10)
SELECT fid, Area(g) FROM gis_polygon ORDER by fid;
fid Area(g)
@ -326,8 +326,8 @@ fid IsClosed(g)
116 0
SELECT fid, AsText(Centroid(g)) FROM gis_multi_polygon ORDER by fid;
fid AsText(Centroid(g))
117 POINT(55.5885277530424 17.426536064114)
118 POINT(55.5885277530424 17.426536064114)
117 POINT(55.58852775304245 17.426536064113982)
118 POINT(55.58852775304245 17.426536064113982)
119 POINT(2 2)
SELECT fid, Area(g) FROM gis_multi_polygon ORDER by fid;
fid Area(g)

View file

@ -8,6 +8,8 @@ CREATE TABLE t1(a CHAR(255));
INSERT INTO t1 VALUES ('a');
SET @@SESSION.sort_buffer_size=5*16*1000000;
SET @@SESSION.max_heap_table_size=5*1000000;
Warnings:
Warning 1292 Truncated incorrect max_heap_table_size value: '5000000'
# Must not crash.
SELECT GROUP_CONCAT(a ORDER BY a) FROM t1 GROUP BY a;
DROP TABLE t1;

View file

@ -134,7 +134,7 @@ connection default
SHOW VARIABLES LIKE 'have_query_cache';
Variable_name Value
have_query_cache YES
SET GLOBAL query_cache_size = 200000;
SET GLOBAL query_cache_size = 204800;
flush status;
SET @@autocommit=1;
SET SESSION STORAGE_ENGINE = InnoDB;

View file

@ -342,11 +342,11 @@ INSERT INTO t1 SET f1 = -1.0e+30 ;
INSERT INTO t1 SET f1 = +1.0e+30 ;
SELECT f1 AS double_val, CAST(f1 AS SIGNED INT) AS cast_val FROM t1;
double_val cast_val
-1e+30 -9223372036854775808
1e+30 9223372036854775807
-1e30 -9223372036854775808
1e30 9223372036854775807
Warnings:
Warning 1292 Truncated incorrect INTEGER value: '-1e+30'
Warning 1292 Truncated incorrect INTEGER value: '1e+30'
Warning 1292 Truncated incorrect INTEGER value: '-1e30'
Warning 1292 Truncated incorrect INTEGER value: '1e30'
DROP TABLE t1;
select isnull(date(NULL)), isnull(cast(NULL as DATE));
isnull(date(NULL)) isnull(cast(NULL as DATE))
@ -363,7 +363,7 @@ cast('1.2' as decimal(3,2))
1.20
select 1e18 * cast('1.2' as decimal(3,2));
1e18 * cast('1.2' as decimal(3,2))
1.2e+18
1.2e18
select cast(cast('1.2' as decimal(3,2)) as signed);
cast(cast('1.2' as decimal(3,2)) as signed)
1

View file

@ -18,7 +18,7 @@ change_user
SELECT @@session.sql_big_selects;
@@session.sql_big_selects
0
SET @@global.max_join_size = -1;
SET @@global.max_join_size = 18446744073709551615;
SET @@session.max_join_size = default;
change_user
SELECT @@session.sql_big_selects;

View file

@ -228,7 +228,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=MEMORY DEFAULT CHARSET=latin1
drop table t1;
SET SESSION storage_engine="gemini";
ERROR 42000: Unknown table engine 'gemini'
ERROR 42000: Unknown storage engine 'gemini'
SELECT @@storage_engine;
@@storage_engine
MEMORY
@ -389,7 +389,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=MEMORY DEFAULT CHARSET=latin1
drop table t1;
SET SESSION storage_engine="gemini";
ERROR 42000: Unknown table engine 'gemini'
ERROR 42000: Unknown storage engine 'gemini'
SELECT @@storage_engine;
@@storage_engine
MEMORY

View file

@ -15,71 +15,6 @@ variable_name variable_value
DATETIME_FORMAT %Y-%m-%d %H:%i:%s
DATE_FORMAT %d.%m.%Y
TIME_FORMAT %H.%i.%s
SET time_format='%H%i%s';
SET time_format='%H:%i:%s.%f';
SET time_format='%h-%i-%s.%f%p';
SET time_format='%h:%i:%s.%f %p';
SET time_format='%h:%i:%s%p';
SET date_format='%Y%m%d';
SET date_format='%Y.%m.%d';
SET date_format='%d.%m.%Y';
SET date_format='%m-%d-%Y';
set datetime_format= '%Y%m%d%H%i%s';
set datetime_format= '%Y-%m-%d %H:%i:%s';
set datetime_format= '%m-%d-%y %H:%i:%s.%f';
set datetime_format= '%d-%m-%Y %h:%i:%s%p';
set datetime_format= '%H:%i:%s %Y-%m-%d';
set datetime_format= '%H:%i:%s.%f %m-%d-%Y';
set datetime_format= '%h:%i:%s %p %Y-%m-%d';
set datetime_format= '%h:%i:%s.%f %p %Y-%m-%d';
SELECT variable_name, variable_value
FROM information_schema.session_variables
WHERE variable_name IN ('date_format', 'datetime_format', 'time_format')
ORDER BY variable_name;
variable_name variable_value
DATETIME_FORMAT %h:%i:%s.%f %p %Y-%m-%d
DATE_FORMAT %m-%d-%Y
TIME_FORMAT %h:%i:%s%p
SET time_format='%h:%i:%s';
ERROR 42000: Variable 'time_format' can't be set to the value of '%h:%i:%s'
SET time_format='%H %i:%s';
ERROR 42000: Variable 'time_format' can't be set to the value of '%H %i:%s'
SET time_format='%H::%i:%s';
ERROR 42000: Variable 'time_format' can't be set to the value of '%H::%i:%s'
SET time_format='%H:%i:%s%f';
ERROR 42000: Variable 'time_format' can't be set to the value of '%H:%i:%s%f'
SET time_format='%H:%i.%f:%s';
ERROR 42000: Variable 'time_format' can't be set to the value of '%H:%i.%f:%s'
SET time_format='%H:%i:%s%p';
ERROR 42000: Variable 'time_format' can't be set to the value of '%H:%i:%s%p'
SET time_format='%h:%i:%s.%f %p %Y-%m-%d';
ERROR 42000: Variable 'time_format' can't be set to the value of '%h:%i:%s.%f %p %Y-%m-%d'
SET time_format='%H%i%s.%f';
ERROR 42000: Variable 'time_format' can't be set to the value of '%H%i%s.%f'
SET time_format='%H:%i-%s.%f';
ERROR 42000: Variable 'time_format' can't be set to the value of '%H:%i-%s.%f'
SET date_format='%d.%m.%d';
ERROR 42000: Variable 'date_format' can't be set to the value of '%d.%m.%d'
SET datetime_format='%h.%m.%y %d.%i.%s';
ERROR 42000: Variable 'datetime_format' can't be set to the value of '%h.%m.%y %d.%i.%s'
set datetime_format= '%H:%i:%s.%f %p %Y-%m-%d';
ERROR 42000: Variable 'datetime_format' can't be set to the value of '%H:%i:%s.%f %p %Y-%m-%d'
set GLOBAL datetime_format= '%H:%i:%s %Y-%m-%d';
SET SESSION datetime_format=default;
select @@global.datetime_format, @@session.datetime_format;
@@global.datetime_format @@session.datetime_format
%H:%i:%s %Y-%m-%d %H:%i:%s %Y-%m-%d
SET GLOBAL datetime_format=default;
SET SESSION datetime_format=default;
select @@global.datetime_format, @@session.datetime_format;
@@global.datetime_format @@session.datetime_format
%Y-%m-%d %H:%i:%s %Y-%m-%d %H:%i:%s
SET GLOBAL date_format=default;
SET GLOBAL time_format=default;
SET GLOBAL datetime_format=default;
SET time_format=default;
SET date_format=default;
SET datetime_format=default;
select str_to_date(concat('15-01-2001',' 2:59:58.999'),
concat('%d-%m-%Y',' ','%H:%i:%s.%f'));
str_to_date(concat('15-01-2001',' 2:59:58.999'),

View file

@ -109,10 +109,10 @@ SET sql_quote_show_create= _utf8 x'5452C39C45';
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TRÜE'
SET sql_quote_show_create=_latin1 x'5452DC45';
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TRÜE'
SET sql_quote_show_create='TR.E';
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TR.E'
SET sql_quote_show_create=TR.E;
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'E'
SET sql_quote_show_create='TRÜE';
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TRÜE'
SET sql_quote_show_create=TRÜE;
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TRÜE'
SET NAMES binary;
SET sql_quote_show_create= _binary x'5452C39C45';
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TR\xC3\x9CE'

View file

@ -13,12 +13,6 @@ ERROR HY000: Incorrect AT value: 'definitely not a datetime'
set names utf8;
create event задачка on schedule every 123 minute starts now() ends now() + interval 1 month do select 1;
drop event задачка;
set event_scheduler=off;
ERROR HY000: Variable 'event_scheduler' is a GLOBAL variable and should be set with SET GLOBAL
set global event_scheduler=3;
ERROR 42000: Variable 'event_scheduler' can't be set to the value of '3'
set global event_scheduler=disabled;
ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'disabled'
"DISABLE the scheduler. Testing that it does not work when the variable is 0"
set global event_scheduler=off;
select definer, name, db from mysql.event;

View file

@ -725,16 +725,15 @@ DROP USER mysqltest_u1@localhost;
drop procedure if exists p;
set @old_mode= @@sql_mode;
set @@sql_mode= pow(2,32)-1;
set @@sql_mode= cast(pow(2,32)-1 as unsigned integer);
create event e1 on schedule every 1 day do select 1;
select @@sql_mode;
@@sql_mode
REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,?,ONLY_FULL_GROUP_BY,NO_UNSIGNED_SUBTRACTION,NO_DIR_IN_CREATE,POSTGRESQL,ORACLE,MSSQL,DB2,MAXDB,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,MYSQL323,MYSQL40,ANSI,NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ALLOW_INVALID_DATES,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,HIGH_NOT_PRECEDENCE,NO_ENGINE_SUBSTITUTION,PAD_CHAR_TO_FULL_LENGTH
select @@sql_mode into @full_mode;
set @@sql_mode= @old_mode;
select replace(@full_mode, '?', 'NOT_USED') into @full_mode;
select replace(@full_mode, ',,,', ',NOT_USED,') into @full_mode;
select replace(@full_mode, 'ALLOW_INVALID_DATES', 'INVALID_DATES') into @full_mode;
select name from mysql.event where name = 'p' and sql_mode = @full_mode;
select name from mysql.event where name = 'e1' and sql_mode = @full_mode;
name
e1
drop event e1;
SET @old_server_id = @@GLOBAL.server_id;
SET GLOBAL server_id = (1 << 32) - 1;

View file

@ -61,7 +61,7 @@ grp sum
NULL NULL
1 7
2 20.25
3 45.4831632475944
3 45.48316324759439
create table t2 (grp int, a bigint unsigned, c char(10));
insert into t2 select grp,max(a)+max(grp),max(c) from t1 group by grp;
replace into t2 select grp, a, c from t1 limit 2,1;
@ -891,7 +891,7 @@ select 1e8 * sum(distinct df) from t1;
330000000
select 1e8 * min(df) from t1;
1e8 * min(df)
110000000
110000000.00000001
create table t3 (ifl int);
insert into t3 values(1), (2);
select cast(min(ifl) as decimal(5,2)) from t3;
@ -1186,7 +1186,7 @@ std(s1/s2)
0.21325764
select std(o1/o2) from bug22555;
std(o1/o2)
0.213257635866493
0.2132576358664934
select std(e1/e2) from bug22555;
std(e1/e2)
0.21325764
@ -1209,13 +1209,13 @@ i count(*) std(e1/e2)
3 4 0.000000000000000000000000000000
select round(std(s1/s2), 17) from bug22555;
round(std(s1/s2), 17)
0.21325763586649341
0.21325763586649340
select std(o1/o2) from bug22555;
std(o1/o2)
0.213257635866493
0.2132576358664934
select round(std(e1/e2), 17) from bug22555;
round(std(e1/e2), 17)
0.21325763586649341
0.21325763586649340
set div_precision_increment=20;
select i, count(*), std(s1/s2) from bug22555 group by i order by i;
i count(*) std(s1/s2)
@ -1234,13 +1234,13 @@ i count(*) std(e1/e2)
3 4 0.000000000000000000000000000000
select round(std(s1/s2), 17) from bug22555;
round(std(s1/s2), 17)
0.21325763586649341
0.21325763586649340
select std(o1/o2) from bug22555;
std(o1/o2)
0.213257635866493
0.2132576358664934
select round(std(e1/e2), 17) from bug22555;
round(std(e1/e2), 17)
0.21325763586649341
0.21325763586649340
set @@div_precision_increment=@saved_div_precision_increment;
drop table bug22555;
create table bug22555 (s smallint, o double, e decimal);

View file

@ -44,7 +44,7 @@ Warnings:
Note 1003 select abs(-(10)) AS `abs(-10)`,sign(-(5)) AS `sign(-5)`,sign(5) AS `sign(5)`,sign(0) AS `sign(0)`
select log(exp(10)),exp(log(sqrt(10))*2),log(-1),log(NULL),log(1,1),log(3,9),log(-1,2),log(NULL,2);
log(exp(10)) exp(log(sqrt(10))*2) log(-1) log(NULL) log(1,1) log(3,9) log(-1,2) log(NULL,2)
10 10 NULL NULL NULL 2 NULL NULL
10 10.000000000000002 NULL NULL NULL 2 NULL NULL
explain extended select log(exp(10)),exp(log(sqrt(10))*2),log(-1),log(NULL),log(1,1),log(3,9),log(-1,2),log(NULL,2);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
@ -52,7 +52,7 @@ Warnings:
Note 1003 select log(exp(10)) AS `log(exp(10))`,exp((log(sqrt(10)) * 2)) AS `exp(log(sqrt(10))*2)`,log(-(1)) AS `log(-1)`,log(NULL) AS `log(NULL)`,log(1,1) AS `log(1,1)`,log(3,9) AS `log(3,9)`,log(-(1),2) AS `log(-1,2)`,log(NULL,2) AS `log(NULL,2)`
select ln(exp(10)),exp(ln(sqrt(10))*2),ln(-1),ln(0),ln(NULL);
ln(exp(10)) exp(ln(sqrt(10))*2) ln(-1) ln(0) ln(NULL)
10 10 NULL NULL NULL
10 10.000000000000002 NULL NULL NULL
explain extended select ln(exp(10)),exp(ln(sqrt(10))*2),ln(-1),ln(0),ln(NULL);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
@ -60,7 +60,7 @@ Warnings:
Note 1003 select ln(exp(10)) AS `ln(exp(10))`,exp((ln(sqrt(10)) * 2)) AS `exp(ln(sqrt(10))*2)`,ln(-(1)) AS `ln(-1)`,ln(0) AS `ln(0)`,ln(NULL) AS `ln(NULL)`
select log2(8),log2(15),log2(-2),log2(0),log2(NULL);
log2(8) log2(15) log2(-2) log2(0) log2(NULL)
3 3.90689059560852 NULL NULL NULL
3 3.9068905956085187 NULL NULL NULL
explain extended select log2(8),log2(15),log2(-2),log2(0),log2(NULL);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
@ -68,7 +68,7 @@ Warnings:
Note 1003 select log2(8) AS `log2(8)`,log2(15) AS `log2(15)`,log2(-(2)) AS `log2(-2)`,log2(0) AS `log2(0)`,log2(NULL) AS `log2(NULL)`
select log10(100),log10(18),log10(-4),log10(0),log10(NULL);
log10(100) log10(18) log10(-4) log10(0) log10(NULL)
2 1.25527250510331 NULL NULL NULL
2 1.255272505103306 NULL NULL NULL
explain extended select log10(100),log10(18),log10(-4),log10(0),log10(NULL);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
@ -85,7 +85,7 @@ Note 1003 select pow(10,log10(10)) AS `pow(10,log10(10))`,pow(2,4) AS `power(2,4
set @@rand_seed1=10000000,@@rand_seed2=1000000;
select rand(999999),rand();
rand(999999) rand()
0.0142313651873091 0.028870999839968
0.014231365187309091 0.028870999839968048
explain extended select rand(999999),rand();
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
@ -101,7 +101,7 @@ Warnings:
Note 1003 select pi() AS `pi()`,format(sin((pi() / 2)),6) AS `format(sin(pi()/2),6)`,format(cos((pi() / 2)),6) AS `format(cos(pi()/2),6)`,format(abs(tan(pi())),6) AS `format(abs(tan(pi())),6)`,format((1 / tan(1)),6) AS `format(cot(1),6)`,format(asin(1),6) AS `format(asin(1),6)`,format(acos(0),6) AS `format(acos(0),6)`,format(atan(1),6) AS `format(atan(1),6)`
select degrees(pi()),radians(360);
degrees(pi()) radians(360)
180 6.28318530717959
180 6.283185307179586
select format(atan(-2, 2), 6);
format(atan(-2, 2), 6)
-0.785398
@ -119,7 +119,7 @@ ACOS(1.0)
0
SELECT ASIN(1.0);
ASIN(1.0)
1.5707963267949
1.5707963267948966
SELECT ACOS(0.2*5.0);
ACOS(0.2*5.0)
0
@ -128,10 +128,10 @@ ACOS(0.5*2.0)
0
SELECT ASIN(0.8+0.2);
ASIN(0.8+0.2)
1.5707963267949
1.5707963267948966
SELECT ASIN(1.2-0.2);
ASIN(1.2-0.2)
1.5707963267949
1.5707963267948966
select format(4.55, 1), format(4.551, 1);
format(4.55, 1) format(4.551, 1)
4.6 4.6
@ -368,7 +368,7 @@ mod(5, cast(-2 as unsigned)) mod(5, 18446744073709551614) mod(5, -2)
5 5 1
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)
2.13598703592091e+96 2.13598703592091e+96 -32
2.13598703592091e96 2.13598703592091e96 -32
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);
SELECT a DIV 900 y FROM t1 GROUP BY y;
@ -437,10 +437,10 @@ a ROUND(a)
2.5 2
-2.9 -3
2.9 3
-1e+16 -10000000000000000
1e+16 10000000000000000
-1e+16 -10000000000000002
1e+16 10000000000000002
-1e16 -10000000000000000
1e16 10000000000000000
-1.0000000000000002e16 -10000000000000002
1.0000000000000002e16 10000000000000002
DROP TABLE t1;
CREATE TABLE t1(f1 LONGTEXT) engine=myisam;
INSERT INTO t1 VALUES ('a');
@ -475,16 +475,16 @@ NULL
CREATE OR REPLACE VIEW v1 AS SELECT NULL AS a;
SELECT RAND(a) FROM v1;
RAND(a)
0.155220427694936
0.15522042769493574
DROP VIEW v1;
SELECT RAND(a) FROM (SELECT NULL AS a) b;
RAND(a)
0.155220427694936
0.15522042769493574
CREATE TABLE t1 (i INT);
INSERT INTO t1 VALUES (NULL);
SELECT RAND(i) FROM t1;
RAND(i)
0.155220427694936
0.15522042769493574
DROP TABLE t1;
#
select 123456789012345678901234567890.123456789012345678901234567890 div 1 as x;

View file

@ -1354,10 +1354,10 @@ cast(rtrim(ltrim(' 20.06 ')) as decimal(19,2))
20.06
select conv("18383815659218730760",10,10) + 0;
conv("18383815659218730760",10,10) + 0
1.83838156592187e+19
1.838381565921873e19
select "18383815659218730760" + 0;
"18383815659218730760" + 0
1.83838156592187e+19
1.838381565921873e19
CREATE TABLE t1 (code varchar(10));
INSERT INTO t1 VALUES ('a12'), ('A12'), ('a13');
SELECT ASCII(code), code FROM t1 WHERE code='A12';

View file

@ -258,7 +258,7 @@ fid AsText(EndPoint(g))
107 POINT(40 10)
SELECT fid, GLength(g) FROM gis_line;
fid GLength(g)
105 24.142135623731
105 24.14213562373095
106 40
107 30
SELECT fid, NumPoints(g) FROM gis_line;
@ -284,7 +284,7 @@ Note 1003 select astext(startpoint(`test`.`gis_line`.`g`)) AS `AsText(StartPoint
SELECT fid, AsText(Centroid(g)) FROM gis_polygon;
fid AsText(Centroid(g))
108 POINT(15 15)
109 POINT(25.4166666666667 25.4166666666667)
109 POINT(25.416666666666668 25.416666666666668)
110 POINT(20 10)
SELECT fid, Area(g) FROM gis_polygon;
fid Area(g)
@ -318,8 +318,8 @@ fid IsClosed(g)
116 0
SELECT fid, AsText(Centroid(g)) FROM gis_multi_polygon;
fid AsText(Centroid(g))
117 POINT(55.5885277530424 17.426536064114)
118 POINT(55.5885277530424 17.426536064114)
117 POINT(55.58852775304245 17.426536064113982)
118 POINT(55.58852775304245 17.426536064113982)
119 POINT(2 2)
SELECT fid, Area(g) FROM gis_multi_polygon;
fid Area(g)
@ -651,11 +651,11 @@ insert into t1 values ('85984',GeomFromText('MULTIPOLYGON(((-115.006363
select object_id, geometrytype(geo), ISSIMPLE(GEO), ASTEXT(centroid(geo)) from
t1 where object_id=85998;
object_id geometrytype(geo) ISSIMPLE(GEO) ASTEXT(centroid(geo))
85998 MULTIPOLYGON 0 POINT(115.318773152032 -36.2374728210215)
85998 MULTIPOLYGON 0 POINT(115.31877315203187 -36.23747282102153)
select object_id, geometrytype(geo), ISSIMPLE(GEO), ASTEXT(centroid(geo)) from
t1 where object_id=85984;
object_id geometrytype(geo) ISSIMPLE(GEO) ASTEXT(centroid(geo))
85984 MULTIPOLYGON 0 POINT(-114.877871869233 36.3310176346905)
85984 MULTIPOLYGON 0 POINT(-114.87787186923313 36.33101763469059)
drop table t1;
create table t1 (fl geometry not null);
insert into t1 values (1);

View file

@ -1,2 +1,2 @@
Variable_name Value
have_profiling YES
have_profiling YES

View file

@ -341,9 +341,7 @@ drop table t4;
create table t4 (a int);
insert into t4 values (1),(4),(3);
set @save_join_buffer_size=@@join_buffer_size;
set join_buffer_size= 4000;
Warnings:
Warning 1292 Truncated incorrect join_buffer_size value: '4000'
set join_buffer_size= 4096;
explain select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5)
from t0 as A force index(i1,i2), t0 as B force index (i1,i2)
where (A.key1 < 500000 or A.key2 < 3)
@ -1435,7 +1433,6 @@ select @@optimizer_switch;
@@optimizer_switch
index_merge=on,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on
set optimizer_switch=4;
ERROR 42000: Variable 'optimizer_switch' can't be set to the value of '4'
set optimizer_switch=NULL;
ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'NULL'
set optimizer_switch='default,index_merge';

View file

@ -1788,7 +1788,7 @@ Variable_name Value
innodb_thread_concurrency 0
set global innodb_thread_concurrency=1001;
Warnings:
Warning 1292 Truncated incorrect thread_concurrency value: '1001'
Warning 1292 Truncated incorrect innodb_thread_concurrency value: '1001'
show variables like "innodb_thread_concurrency";
Variable_name Value
innodb_thread_concurrency 1000
@ -1809,7 +1809,7 @@ Variable_name Value
innodb_concurrency_tickets 1000
set global innodb_concurrency_tickets=0;
Warnings:
Warning 1292 Truncated incorrect concurrency_tickets value: '0'
Warning 1292 Truncated incorrect innodb_concurrency_tickets value: '0'
show variables like "innodb_concurrency_tickets";
Variable_name Value
innodb_concurrency_tickets 1

View file

@ -1,5 +1,5 @@
set global innodb_commit_concurrency=0;
ERROR HY000: Incorrect arguments to SET
ERROR 42000: Variable 'innodb_commit_concurrency' can't be set to the value of '0'
select @@innodb_commit_concurrency;
@@innodb_commit_concurrency
1
@ -16,7 +16,7 @@ select @@innodb_commit_concurrency;
@@innodb_commit_concurrency
1
set global innodb_commit_concurrency=0;
ERROR HY000: Incorrect arguments to SET
ERROR 42000: Variable 'innodb_commit_concurrency' can't be set to the value of '0'
select @@innodb_commit_concurrency;
@@innodb_commit_concurrency
1

View file

@ -3,12 +3,12 @@ select @@innodb_commit_concurrency;
@@innodb_commit_concurrency
0
set global innodb_commit_concurrency=1;
ERROR HY000: Incorrect arguments to SET
ERROR 42000: Variable 'innodb_commit_concurrency' can't be set to the value of '1'
select @@innodb_commit_concurrency;
@@innodb_commit_concurrency
0
set global innodb_commit_concurrency=42;
ERROR HY000: Incorrect arguments to SET
ERROR 42000: Variable 'innodb_commit_concurrency' can't be set to the value of '42'
select @@innodb_commit_concurrency;
@@innodb_commit_concurrency
0

View file

@ -266,7 +266,7 @@ fid AsText(EndPoint(g))
107 POINT(40 10)
SELECT fid, GLength(g) FROM gis_line ORDER by fid;
fid GLength(g)
105 24.142135623731
105 24.14213562373095
106 40
107 30
SELECT fid, NumPoints(g) FROM gis_line ORDER by fid;
@ -292,7 +292,7 @@ Note 1003 select astext(startpoint(`test`.`gis_line`.`g`)) AS `AsText(StartPoint
SELECT fid, AsText(Centroid(g)) FROM gis_polygon ORDER by fid;
fid AsText(Centroid(g))
108 POINT(15 15)
109 POINT(25.4166666666667 25.4166666666667)
109 POINT(25.416666666666668 25.416666666666668)
110 POINT(20 10)
SELECT fid, Area(g) FROM gis_polygon ORDER by fid;
fid Area(g)
@ -326,8 +326,8 @@ fid IsClosed(g)
116 0
SELECT fid, AsText(Centroid(g)) FROM gis_multi_polygon ORDER by fid;
fid AsText(Centroid(g))
117 POINT(55.5885277530424 17.426536064114)
118 POINT(55.5885277530424 17.426536064114)
117 POINT(55.58852775304245 17.426536064113982)
118 POINT(55.58852775304245 17.426536064113982)
119 POINT(2 2)
SELECT fid, Area(g) FROM gis_multi_polygon ORDER by fid;
fid Area(g)

View file

@ -175,12 +175,12 @@ Warning 1264 Out of range value for column 'f_float_3_1_u' at row 1
select * from t1 where number =last_insert_id();
number 4
original_value 1e+1111111111a
f_double 1.79769313486232e+308
f_float 3.40282e+38
f_double 1.7976931348623157e308
f_float 3.40282e38
f_double_7_2 99999.99
f_float_4_3 9.999
f_double_u 1.79769313486232e+308
f_float_u 3.40282e+38
f_double_u 1.7976931348623157e308
f_float_u 3.40282e38
f_double_15_1_u 99999999999999.9
f_float_3_1_u 99.9
set @value= "-1e+1111111111a";
@ -204,8 +204,8 @@ Warning 1264 Out of range value for column 'f_float_3_1_u' at row 1
select * from t1 where number =last_insert_id();
number 5
original_value -1e+1111111111a
f_double -1.79769313486232e+308
f_float -3.40282e+38
f_double -1.7976931348623157e308
f_float -3.40282e38
f_double_7_2 -99999.99
f_float_4_3 -9.999
f_double_u 0
@ -227,13 +227,13 @@ Warning 1264 Out of range value for column 'f_double_15_1_u' at row 1
Warning 1264 Out of range value for column 'f_float_3_1_u' at row 1
select * from t1 where number =last_insert_id();
number 6
original_value 1e+111
f_double 1e+111
f_float 3.40282e+38
original_value 1e111
f_double 1e111
f_float 3.40282e38
f_double_7_2 99999.99
f_float_4_3 9.999
f_double_u 1e+111
f_float_u 3.40282e+38
f_double_u 1e111
f_float_u 3.40282e38
f_double_15_1_u 99999999999999.9
f_float_3_1_u 99.9
set @value= -1e+111;
@ -248,9 +248,9 @@ Warning 1264 Out of range value for column 'f_double_15_1_u' at row 1
Warning 1264 Out of range value for column 'f_float_3_1_u' at row 1
select * from t1 where number =last_insert_id();
number 7
original_value -1e+111
f_double -1e+111
f_float -3.40282e+38
original_value -1e111
f_double -1e111
f_float -3.40282e38
f_double_7_2 -99999.99
f_float_4_3 -9.999
f_double_u 0
@ -524,42 +524,36 @@ INSERT INTO t1(a,b) VALUES (1.25e-175, 1.25e-175);
INSERT INTO t1(a,c) VALUES (1.225e+0, 1.225e+0);
INSERT INTO t1(a,c) VALUES (1.37e+0, 1.37e+0);
INSERT INTO t1(a,c) VALUES (-1.37e+0, -1.37e+0);
Warnings:
Warning 1265 Data truncated for column 'c' at row 1
INSERT INTO t1(a,c) VALUES (1.87e-3, 1.87e-3);
Warnings:
Warning 1265 Data truncated for column 'c' at row 1
INSERT INTO t1(a,c) VALUES (-1.87e-2, -1.87e-2);
Warnings:
Warning 1265 Data truncated for column 'c' at row 1
INSERT INTO t1(a,c) VALUES (5000e+0, 5000e+0);
INSERT INTO t1(a,c) VALUES (-5000e+0, -5000e+0);
Warnings:
Warning 1265 Data truncated for column 'c' at row 1
SELECT * FROM t1;
a b c
9.999999 10 10
1.225e-05 1.2e-05 1e-0
0.0001225 0.00012 NULL
0.00001225 1.22e-5 1e-5
0.0001225 1.22e-4 NULL
0.1225 0.1225 NULL
0.1225877 0.12259 NULL
12.25 12.25 NULL
12.25 12.25 12.2
122500 122500 NULL
12250000000 1.2e+10 NULL
1.225e+15 1.2e+15 NULL
12250000000 1.22e10 NULL
1.225e15 1.22e15 NULL
5000000 5000000 NULL
1.25e+78 1.2e+78 NULL
1.25e78 1.25e78 NULL
1.25e-94 1.2e-94 NULL
1.25e+203 1e+203 NULL
1.25e203 1.2e203 NULL
1.25e-175 1e-175 NULL
1.225 NULL 1.23
1.37 NULL 1.37
-1.37 NULL -1.3
0.00187 NULL 0.00
-0.0187 NULL -0.0
-1.37 NULL -1.4
0.00187 NULL 2e-3
-0.0187 NULL 0
5000 NULL 5000
-5000 NULL -500
-5000 NULL -5e3
DROP TABLE t1;
CREATE TABLE t1 (
a char(20) NOT NULL,
@ -586,32 +580,30 @@ INSERT INTO t1(a,c) VALUES (1.37e+0, 1.37e+0);
INSERT INTO t1(a,c) VALUES (-1.37e+0, -1.37e+0);
INSERT INTO t1(a,c) VALUES (1.87e-3, 1.87e-3);
INSERT INTO t1(a,c) VALUES (-1.87e-2, -1.87e-2);
Warnings:
Warning 1265 Data truncated for column 'c' at row 1
INSERT INTO t1(a,c) VALUES (5000e+0, 5000e+0);
INSERT INTO t1(a,c) VALUES (-5000e+0, -5000e+0);
SELECT * FROM t1;
a b c
9.999999 10 9.999
1.225e-05 1.2e-05 1e-05
0.0001225 0.00012 NULL
0.00001225 1.22e-5 1e-5
0.0001225 1.22e-4 NULL
0.1225 0.1225 NULL
0.1225877 0.12259 NULL
12.25 12.25 NULL
12.25 12.25 12.25
122500 122500 NULL
12250000000 1.2e+10 NULL
1.225e+15 1.2e+15 NULL
12250000000 1.22e10 NULL
1.225e15 1.22e15 NULL
5000000 5000000 NULL
1.25e+78 1.2e+78 NULL
1.25e78 1.25e78 NULL
1.25e-94 1.2e-94 NULL
1.25e+203 1e+203 NULL
1.25e203 1.2e203 NULL
1.25e-175 1e-175 NULL
1.225 NULL 1.225
1.37 NULL 1.37
-1.37 NULL -1.37
0.00187 NULL 0.002
-0.0187 NULL -0.01
-0.0187 NULL -0.02
5000 NULL 5000
-5000 NULL -5000
DROP TABLE t1;

View file

@ -274,8 +274,26 @@ Key_blocks_used 4
show status like 'key_blocks_unused';
Variable_name Value
Key_blocks_unused KEY_BLOCKS_UNUSED
create table t1 (a int primary key);
cache index t1 in keycache2;
Table Op Msg_type Msg_text
test.t1 assign_to_keycache status OK
insert t1 values (1),(2),(3),(4),(5),(6),(7),(8);
set global keycache2.key_buffer_size=0;
select * from t1;
a
1
2
3
4
5
6
7
8
drop table t1;
set global keycache3.key_buffer_size=100;
Warnings:
Warning 1292 Truncated incorrect key_buffer_size value: '100'
set global keycache3.key_buffer_size=0;
create table t1 (mytext text, FULLTEXT (mytext));
insert t1 values ('aaabbb');
@ -334,8 +352,7 @@ test.t1 check status OK
DROP TABLE t1,t2;
set global key_cache_block_size= @my_key_cache_block_size;
set @@global.key_buffer_size=0;
Warnings:
Warning 1438 Cannot drop default keycache
ERROR HY000: Cannot drop default keycache
select @@global.key_buffer_size;
@@global.key_buffer_size
2097152

View file

@ -251,15 +251,15 @@ CREATE TABLE t1 (c1 INT, c2 TIMESTAMP, c3 REAL, c4 DOUBLE);
INSERT INTO t1 (c1, c2, c3, c4) VALUES (10, '1970-02-01 01:02:03', 1.1E-100, 1.1E+100);
SELECT * FROM t1;
c1 c2 c3 c4
10 1970-02-01 01:02:03 1.1e-100 1.1e+100
10 1970-02-01 01:02:03 1.1e-100 1.1e100
SELECT * INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1' FIELDS ENCLOSED BY '-' FROM t1;
-10- -1970\-02\-01 01:02:03- -1.1e\-100- -1.1e+100-
-10- -1970\-02\-01 01:02:03- -1.1e\-100- -1.1e100-
EOF
TRUNCATE t1;
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1' INTO TABLE t1 FIELDS ENCLOSED BY '-';
SELECT * FROM t1;
c1 c2 c3 c4
10 1970-02-01 01:02:03 1.1e-100 1.1e+100
10 1970-02-01 01:02:03 1.1e-100 1.1e100
DROP TABLE t1;
# --

View file

@ -249,7 +249,7 @@ set @save_storage_engine= @@session.storage_engine;
set storage_engine= MEMORY;
alter table mysql.slow_log engine=NonExistentEngine;
Warnings:
Warning 1286 Unknown table engine 'NonExistentEngine'
Warning 1286 Unknown storage engine 'NonExistentEngine'
alter table mysql.slow_log engine=memory;
ERROR HY000: This storage engine cannot be used for log tables"
set storage_engine= @save_storage_engine;

View file

@ -397,9 +397,9 @@ WARNING: --server-arg option not supported in this configuration.
+---+
| 1 |
+---+
Warning (Code 1286): Unknown table engine 'nonexistent'
Warning (Code 1286): Unknown storage engine 'nonexistent'
Warning (Code 1266): Using storage engine MyISAM for table 't2'
Warning (Code 1286): Unknown table engine 'nonexistent2'
Warning (Code 1286): Unknown storage engine 'nonexistent2'
Warning (Code 1266): Using storage engine MyISAM for table 't2'
Error (Code 1050): Table 't2' already exists
drop tables t1, t2;

View file

@ -495,10 +495,10 @@ c15 0000000000
c16 -9223372036854775808
c17 0
c18 00000000000000000000
c19 -3.40282e+38
c19 -3.40282e38
c20 1.17549e-38
c21 000000000000
c22 -1.7976931348623e+308
c22 -1.7976931348623e308
c23 2.2250738585072e-308
c24 0000000000000000000000
c25 -9999999999
@ -574,12 +574,12 @@ c15 4294967295
c16 9223372036854775807
c17 18446744073709551615
c18 18446744073709551615
c19 3.40282e+38
c20 3.40282e+38
c21 03.40282e+38
c22 1.7976931348623e+308
c23 1.7976931348623e+308
c24 001.7976931348623e+308
c19 3.40282e38
c20 3.40282e38
c21 003.40282e38
c22 1.7976931348623e308
c23 1.7976931348623e308
c24 0001.7976931348623e308
c25 9999999999
c26 9999999999
c27 9999999999
@ -1557,12 +1557,12 @@ c15 4294967295
c16 9223372036854775807
c17 18446744073709551615
c18 18446744073709551615
c19 3.40282e+38
c20 3.40282e+38
c21 03.40282e+38
c22 1.7976931348623e+308
c23 1.7976931348623e+308
c24 001.7976931348623e+308
c19 3.40282e38
c20 3.40282e38
c21 003.40282e38
c22 1.7976931348623e308
c23 1.7976931348623e308
c24 0001.7976931348623e308
c25 9999999999
c26 9999999999
c27 9999999999
@ -1636,10 +1636,10 @@ c15 0000000000
c16 -9223372036854775808
c17 0
c18 00000000000000000000
c19 -3.40282e+38
c19 -3.40282e38
c20 1.17549e-38
c21 000000000000
c22 -1.7976931348623e+308
c22 -1.7976931348623e308
c23 2.2250738585072e-308
c24 0000000000000000000000
c25 -9999999999

View file

@ -495,10 +495,10 @@ c15 0000000000
c16 -9223372036854775808
c17 0
c18 00000000000000000000
c19 -3.40282e+38
c19 -3.40282e38
c20 1.17549e-38
c21 000000000000
c22 -1.7976931348623e+308
c22 -1.7976931348623e308
c23 2.2250738585072e-308
c24 0000000000000000000000
c25 -9999999999
@ -574,12 +574,12 @@ c15 4294967295
c16 9223372036854775807
c17 18446744073709551615
c18 18446744073709551615
c19 3.40282e+38
c20 3.40282e+38
c21 03.40282e+38
c22 1.7976931348623e+308
c23 1.7976931348623e+308
c24 001.7976931348623e+308
c19 3.40282e38
c20 3.40282e38
c21 003.40282e38
c22 1.7976931348623e308
c23 1.7976931348623e308
c24 0001.7976931348623e308
c25 9999999999
c26 9999999999
c27 9999999999
@ -1557,12 +1557,12 @@ c15 4294967295
c16 9223372036854775807
c17 18446744073709551615
c18 18446744073709551615
c19 3.40282e+38
c20 3.40282e+38
c21 03.40282e+38
c22 1.7976931348623e+308
c23 1.7976931348623e+308
c24 001.7976931348623e+308
c19 3.40282e38
c20 3.40282e38
c21 003.40282e38
c22 1.7976931348623e308
c23 1.7976931348623e308
c24 0001.7976931348623e308
c25 9999999999
c26 9999999999
c27 9999999999
@ -1636,10 +1636,10 @@ c15 0000000000
c16 -9223372036854775808
c17 0
c18 00000000000000000000
c19 -3.40282e+38
c19 -3.40282e38
c20 1.17549e-38
c21 000000000000
c22 -1.7976931348623e+308
c22 -1.7976931348623e308
c23 2.2250738585072e-308
c24 0000000000000000000000
c25 -9999999999

View file

@ -0,0 +1,945 @@
The following options may be given as the first argument:
--print-defaults Print the program argument list and exit
--no-defaults Don't read default options from any options file
--defaults-file=# Only read default options from the given file #
--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
Allows use of UDFs consisting of only one symbol xxx()
without corresponding xxx_init() or xxx_deinit(). That
also means that one can load any function from any
library, for example exit() from libc.so
-a, --ansi Use ANSI SQL syntax instead of MySQL syntax. This mode
will also set transaction isolation level 'serializable'.
--archive[=name] Enable or disable ARCHIVE plugin. Possible values are ON,
OFF, FORCE (don't start if the plugin fails to load).
--auto-increment-increment[=#]
Auto-increment columns are incremented by this
--auto-increment-offset[=#]
Offset added to Auto-increment columns. Used when
auto-increment-increment != 1
--automatic-sp-privileges
Creating and dropping stored procedures alters ACLs
(Defaults to on; use --skip-automatic-sp-privileges to disable.)
--back-log=# The number of outstanding connection requests MySQL can
have. This comes into play when the main MySQL thread
gets very many connection requests in a very short time
-b, --basedir=name Path to installation directory. All paths are usually
resolved relative to this
--big-tables Allow big result sets by saving all temporary sets on
file (Solves most 'table full' errors)
--bind-address=name IP address to bind to.
--binlog-cache-size=#
The size of the cache to hold the SQL statements for the
binary log during a transaction. If you often use big,
multi-statement transactions you can increase this to get
more performance
--binlog-do-db=name Tells the master it should log updates for the specified
database, and exclude all others not explicitly
mentioned.
--binlog-format=name
What form of binary logging the master will use: either
ROW for row-based binary logging, STATEMENT for
statement-based binary logging, or MIXED. MIXED is
statement-based binary logging except for those
statements where only row-based is correct: those which
involve user-defined functions (i.e. UDFs) or the UUID()
function; for those, row-based binary logging is
automatically used. If NDBCLUSTER is enabled and
binlog-format is MIXED, the format switches to row-based
and back implicitly per each query accessing an
NDBCLUSTER table
--binlog-ignore-db=name
Tells the master that updates to the given database
should not be logged tothe binary log.
--binlog-row-event-max-size=#
The maximum size of a row-based binary log event in
bytes. Rows will be grouped into events smaller than this
size if possible. The value has to be a multiple of 256.
--blackhole[=name] Enable or disable BLACKHOLE plugin. Possible values are
ON, OFF, FORCE (don't start if the plugin fails to load).
--bootstrap Used by mysql installation scripts.
--bulk-insert-buffer-size=#
Size of tree cache used in bulk insert optimisation. Note
that this is a limit per thread!
--character-set-client-handshake
Don't ignore client side character set value sent during
handshake.
(Defaults to on; use --skip-character-set-client-handshake to disable.)
--character-set-filesystem=name
Set the filesystem character set.
-C, --character-set-server=name
Set the default character set.
--character-sets-dir=name
Directory where character sets are
-r, --chroot=name Chroot mysqld daemon during startup.
--collation-server=name
Set the default collation.
--completion-type=name
The transaction completion type, one of NO_CHAIN, CHAIN,
RELEASE
--concurrent-insert[=name]
Use concurrent insert with MyISAM. Possible values are
NEVER, AUTO, ALWAYS
--connect-timeout=# The number of seconds the mysqld server is waiting for a
connect packet before responding with 'Bad handshake'
--console Write error output on screen; Don't remove the console
window on windows.
--core-file Write core on errors.
-h, --datadir=name Path to the database root directory
--date-format=name The DATE format (ignored)
--datetime-format=name
The DATETIME format (ignored)
-C, --default-character-set=name
Set the default character set (deprecated option, use
--character-set-server instead).
--default-collation=name
Set the default collation (deprecated option, use
--collation-server instead).
--default-storage-engine=name
The default storage engine for new tables
--default-time-zone=name
Set the default time zone.
--default-week-format=#
The default week format used by WEEK() functions
--delay-key-write[=name]
Type of DELAY_KEY_WRITE
--delay-key-write-for-all-tables
Don't flush key buffers between writes for any MyISAM
table (Deprecated option, use --delay-key-write=all
instead).
--delayed-insert-limit=#
After inserting delayed_insert_limit rows, the INSERT
DELAYED handler will check if there are any SELECT
statements pending. If so, it allows these to execute
before continuing
--delayed-insert-timeout=#
How long a INSERT DELAYED thread should wait for INSERT
statements before terminating
--delayed-queue-size=#
What size queue (in rows) should be allocated for
handling INSERT DELAYED. If the queue becomes full, any
client that does INSERT DELAYED will wait until there is
room in the queue again
--disconnect-slave-event-count=#
Option used by mysql-test for debugging and testing of
replication.
--div-precision-increment=#
Precision of the result of '/' operator will be increased
on that value
--enable-locking Deprecated option, use --external-locking instead.
--engine-condition-pushdown
Push supported query conditions to the storage engine
(Defaults to on; use --skip-engine-condition-pushdown to disable.)
--event-scheduler[=name]
Enable the event scheduler. Possible values are ON, OFF,
and DISABLED (keep the event scheduler completely
deactivated, it cannot be activated run-time)
-T, --exit-info[=#] Used for debugging; Use at your own risk!
--expire-logs-days=#
If non-zero, binary logs will be purged after
expire_logs_days days; possible purges happen at startup
and at binary log rotation
--external-locking Use system (external) locking (disabled by default).
With this option enabled you can run myisamchk to test
(not repair) tables while the MySQL server is running.
Disable with --skip-external-locking.
--federated[=name] Enable or disable FEDERATED plugin. Possible values are
ON, OFF, FORCE (don't start if the plugin fails to load).
--flush Flush MyISAM tables to disk between SQL commands
--flush-time=# A dedicated thread is created to flush all tables at the
given interval
--ft-boolean-syntax=name
List of operators for MATCH ... AGAINST ( ... IN BOOLEAN
MODE)
--ft-max-word-len=# The maximum length of the word to be included in a
FULLTEXT index. Note: FULLTEXT indexes must be rebuilt
after changing this variable
--ft-min-word-len=# The minimum length of the word to be included in a
FULLTEXT index. Note: FULLTEXT indexes must be rebuilt
after changing this variable
--ft-query-expansion-limit=#
Number of best matches to use for query expansion
--ft-stopword-file=name
Use stopwords from this file instead of built-in list
--gdb Set up signals usable for debugging
--general-log Log connections and queries to a table or log file.
Defaults logging to a file hostname.log or a table
mysql.general_logif --log-output=TABLE is used
--general-log-file=name
Log connections and queries to given file
--group-concat-max-len=#
The maximum length of the result of function
GROUP_CONCAT()
-?, --help Display this help and exit.
--ignore-builtin-innodb
Disable initialization of builtin InnoDB plugin
--init-connect=name Command(s) that are executed for each new connection
--init-file=name Read SQL commands from this file at startup
--init-rpl-role=name
Set the replication role.
--init-slave=name Command(s) that are executed by a slave server each time
the SQL thread starts
--interactive-timeout=#
The number of seconds the server waits for activity on an
interactive connection before closing it
--join-buffer-size=#
The size of the buffer that is used for full joins
--keep-files-on-create
Don't overwrite stale .MYD and .MYI even if no directory
is specified
--key-buffer-size=# The size of the buffer used for index blocks for MyISAM
tables. Increase this to get better index handling (for
all reads and multiple writes) to as much as you can
afford
--key-cache-age-threshold=#
This characterizes the number of hits a hot block has to
be untouched until it is considered aged enough to be
downgraded to a warm block. This specifies the percentage
ratio of that number of hits to the total number of
blocks in key cache
--key-cache-block-size=#
The default size of key cache blocks
--key-cache-division-limit=#
The minimum percentage of warm blocks in key cache
-L, --language=name Client error messages in given language. May be given as
a full path. Deprecated. Use --lc-messages-dir instead.
--large-pages Enable support for large pages
--lc-messages=name Set the language used for the error messages.
-L, --lc-messages-dir=name
Directory where error messages are
--lc-time-names=name
Set the language used for the month names and the days of
the week.
--local-infile Enable LOAD DATA LOCAL INFILE
(Defaults to on; use --skip-local-infile to disable.)
-l, --log[=name] Log connections and queries to file (deprecated option,
use --general-log/--general-log-file instead).
--log-bin[=name] Log update queries in binary format. Optional (but
strongly recommended to avoid replication problems if
server's hostname changes) argument should be the chosen
location for the binary log files.
--log-bin-index=name
File that holds the names for last binary log files.
--log-bin-trust-function-creators
If set to FALSE (the default), then when --log-bin is
used, creation of a stored function (or trigger) is
allowed only to users having the SUPER privilege and only
if this stored function (trigger) may not break binary
logging. Note that if ALL connections to this server
ALWAYS use row-based binary logging, the security issues
do not exist and the binary logging cannot break, so you
can safely set this to TRUE
--log-error[=name] Error log file
--log-isam[=name] Log all MyISAM changes to file.
-0, --log-long-format
Log some extra information to update log. Please note
that this option is deprecated; see --log-short-format
option.
--log-output=name Syntax: log-output=value[,value...], where "value" could
be TABLE, FILE or NONE
--log-queries-not-using-indexes
Log queries that are executed without benefit of any
index to the slow log if it is open
--log-short-format Don't log extra information to update and slow-query
logs.
--log-slave-updates Tells the slave to log the updates from the slave thread
to the binary log. You will need to turn it on if you
plan to daisy-chain the slaves
--log-slow-admin-statements
Log slow OPTIMIZE, ANALYZE, ALTER and other
administrative statements to the slow log if it is open.
--log-slow-queries[=name]
Log slow queries to a table or log file. Defaults logging
to table mysql.slow_log or hostname-slow.log if
--log-output=file is used. Must be enabled to activate
other slow log options. Deprecated option, use
--slow-query-log/--slow-query-log-file instead.
--log-slow-slave-statements
Log slow statements executed by slave thread to the slow
log if it is open.
--log-tc=name Path to transaction coordinator log (used for
transactions that affect more than one storage engine,
when binary log is disabled)
--log-tc-size=# Size of transaction coordinator log.
--log-update[=name] The update log is deprecated since version 5.0, is
replaced by the binary log and this option justs turns on
--log-bin instead.
-W, --log-warnings[=#]
Log some not critical warnings to the log file
--long-query-time=# Log all queries that have taken more than long_query_time
seconds to execute to file. The argument will be treated
as a decimal value with microsecond precision
--low-priority-updates
INSERT/DELETE/UPDATE has lower priority than selects
--lower-case-table-names[=#]
If set to 1 table names are stored in lowercase on disk
and table names will be case-insensitive. Should be set
to 2 if you are using a case insensitive file system
--master-info-file=name
The location and name of the file that remembers the
master and where the I/O replication thread is in the
master's binlogs.
--master-retry-count=#
The number of tries the slave will make to connect to the
master before giving up.
--max-allowed-packet=#
Max packet length to send to or receive from the server
--max-binlog-cache-size=#
Can be used to restrict the total size used to cache a
multi-transaction query
--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
exceeds this value. Will also apply to relay logs if
max_relay_log_size is 0
--max-connect-errors=#
If there is more than this number of interrupted
connections from a host this host will be blocked from
further connections
--max-connections=# The number of simultaneous clients allowed
--max-delayed-threads=#
Don't start more than this number of threads to handle
INSERT DELAYED statements. If set to zero INSERT DELAYED
will be not used
--max-error-count=# Max number of errors/warnings to store for a statement
--max-heap-table-size=#
Don't allow creation of heap tables bigger than this
--max-join-size=# Joins that are probably going to read more than
max_join_size records return an error
--max-length-for-sort-data=#
Max number of bytes in sorted records
--max-prepared-stmt-count=#
Maximum number of prepared statements in the server
--max-relay-log-size=#
If non-zero: relay log will be rotated automatically when
the size exceeds this value; if zero: when the size
exceeds max_binlog_size
--max-seeks-for-key=#
Limit assumed max number of seeks when looking up rows
based on a key
--max-sort-length=# The number of bytes to use when sorting BLOB or TEXT
values (only the first max_sort_length bytes of each
value are used; the rest are ignored)
--max-sp-recursion-depth[=#]
Maximum stored procedure recursion depth
--max-tmp-tables=# Maximum number of temporary tables a client can keep open
at a time
--max-user-connections=#
The maximum number of active connections for a single
user (0 = no limit)
--max-write-lock-count=#
After this many write locks, allow some read locks to run
in between
--memlock Lock mysqld in memory.
--min-examined-row-limit=#
Don't write queries to slow log that examine fewer rows
than that
--multi-range-count=#
Number of key ranges to request at once
--myisam-block-size=#
Block size to be used for MyISAM index pages
--myisam-data-pointer-size=#
Default pointer size to be used for MyISAM tables
--myisam-max-sort-file-size=#
Don't use the fast sort index method to created index if
the temporary file would get bigger than this
--myisam-mmap-size=#
Restricts the total memory used for memory mapping of
MySQL tables
--myisam-recover-options[=name]
Syntax: myisam-recover-options[=option[,option...]],
where option can be DEFAULT, BACKUP, FORCE, QUICK, or OFF
--myisam-repair-threads=#
If larger than 1, when repairing a MyISAM table all
indexes will be created in parallel, with one thread per
index. The value of 1 disables parallel repair
--myisam-sort-buffer-size=#
The buffer that is allocated when sorting the index when
doing a REPAIR or when creating indexes with CREATE INDEX
or ALTER TABLE
--myisam-stats-method=name
Specifies how MyISAM index statistics collection code
should treat NULLs. Possible values of name are
NULLS_UNEQUAL (default behavior for 4.1 and later),
NULLS_EQUAL (emulate 4.0 behavior), and NULLS_IGNORED
--myisam-use-mmap Use memory mapping for reading and writing MyISAM tables
--net-buffer-length=#
Buffer length for TCP/IP and socket communication
--net-read-timeout=#
Number of seconds to wait for more data from a connection
before aborting the read
--net-retry-count=# If a read on a communication port is interrupted, retry
this many times before giving up
--net-write-timeout=#
Number of seconds to wait for a block to be written to a
connection before aborting the write
-n, --new Use very new possible "unsafe" functions
--old Use compatible behavior
--old-alter-table Use old, non-optimized alter table
--old-passwords Use old password encryption method (needed for 4.0 and
older clients)
--old-style-user-limits
Enable old-style user limits (before 5.0.3 user resources
were counted per each user+host vs. per account)
--one-thread (deprecated): Only use one thread (for debugging under
Linux). Use thread-handling=no-threads instead
--open-files-limit=#
If this is not 0, then mysqld will use this value to
reserve file descriptors to use with setrlimit(). If this
value is 0 then mysqld will reserve max_connections*5 or
max_connections + table_cache*2 (whichever is larger)
number of file descriptors
--optimizer-prune-level=#
Controls the heuristic(s) applied during query
optimization to prune less-promising partial plans from
the optimizer search space. Meaning: 0 - do not apply any
heuristic, thus perform exhaustive search; 1 - prune
plans based on number of retrieved rows
--optimizer-search-depth=#
Maximum depth of search performed by the query optimizer.
Values larger than the number of relations in a query
result in better query plans, but take longer to compile
a query. Values smaller than the number of tables in a
relation result in faster optimization, but may produce
very bad query plans. If set to 0, the system will
automatically pick a reasonable value; if set to 63, the
optimizer will switch to the original find_best
search(used for testing/comparison)
--optimizer-switch=name
optimizer_switch=option=val[,option=val...], where option
is one of {index_merge, index_merge_union,
index_merge_sort_union, index_merge_intersection} and val
is one of {on, off, default}
--partition[=name] Enable or disable partition plugin. Possible values are
ON, OFF, FORCE (don't start if the plugin fails to load).
--pid-file=name Pid file used by safe_mysqld
--plugin-dir=name Directory for plugins
--plugin-load=name Optional semicolon-separated list of plugins to load,
where each plugin is identified as name=library, where
name is the plugin name and library is the plugin library
in plugin_dir.
-P, --port=# Port number to use for connection or 0 to default to,
my.cnf, $MYSQL_TCP_PORT, /etc/services, built-in default
(3306), whatever comes first
--port-open-timeout=#
Maximum time in seconds to wait for the port to become
free. (Default: no wait)
--preload-buffer-size=#
The size of the buffer that is allocated when preloading
indexes
--profiling-history-size=#
Limit of query profiling memory
--query-alloc-block-size=#
Allocation block size for query parsing and execution
--query-cache-limit=#
Don't cache results that are bigger than this
--query-cache-min-res-unit=#
The minimum size for blocks allocated by the query cache
--query-cache-size=#
The memory allocated to store results from old queries
--query-cache-type=name
OFF = Don't cache or retrieve results. ON = Cache all
results except SELECT SQL_NO_CACHE ... queries. DEMAND =
Cache only SELECT SQL_CACHE ... queries
--query-cache-wlock-invalidate
Invalidate queries in query cache on LOCK for write
--query-prealloc-size=#
Persistent buffer for query parsing and execution
--range-alloc-block-size=#
Allocation block size for storing ranges during
optimization
--read-buffer-size=#
Each thread that does a sequential scan allocates a
buffer of this size for each table it scans. If you do
many sequential scans, you may want to increase this
value
--read-only Make all non-temporary tables read-only, with the
exception for replication (slave) threads and users with
the SUPER privilege
--read-rnd-buffer-size=#
When reading rows in sorted order after a sort, the rows
are read through this buffer to avoid a disk seeks. If
not set, then it's set to the value of record_buffer
--record-buffer=# Deprecated; use --read-buffer-size instead.
--relay-log=name The location and name to use for relay logs
--relay-log-index=name
The location and name to use for the file that keeps a
list of the last relay logs
--relay-log-info-file=name
The location and name of the file that remembers where
the SQL replication thread is in the relay logs
--relay-log-purge if disabled - do not purge relay logs. if enabled - purge
them as soon as they are no more needed
(Defaults to on; use --skip-relay-log-purge to disable.)
--relay-log-recovery
Enables automatic relay log recovery right after the
database startup, which means that the IO Thread starts
re-fetching from the master right after the last
transaction processed
--relay-log-space-limit=#
Maximum space to use for all relay logs
--replicate-do-db=name
Tells the slave thread to restrict replication to the
specified database. To specify more than one database,
use the directive multiple times, once for each database.
Note that this will only work if you do not use
cross-database queries such as UPDATE some_db.some_table
SET foo='bar' while having selected a different or no
database. If you need cross database updates to work,
make sure you have 3.23.28 or later, and use
replicate-wild-do-table=db_name.%.
--replicate-do-table=name
Tells the slave thread to restrict replication to the
specified table. To specify more than one table, use the
directive multiple times, once for each table. This will
work for cross-database updates, in contrast to
replicate-do-db.
--replicate-ignore-db=name
Tells the slave thread to not replicate to the specified
database. To specify more than one database to ignore,
use the directive multiple times, once for each database.
This option will not work if you use cross database
updates. If you need cross database updates to work, make
sure you have 3.23.28 or later, and use
replicate-wild-ignore-table=db_name.%.
--replicate-ignore-table=name
Tells the slave thread to not replicate to the specified
table. To specify more than one table to ignore, use the
directive multiple times, once for each table. This will
work for cross-datbase updates, in contrast to
replicate-ignore-db.
--replicate-rewrite-db=name
Updates to a database with a different name than the
original. Example:
replicate-rewrite-db=master_db_name->slave_db_name.
--replicate-same-server-id
In replication, if set to 1, do not skip events having
our server id. Default value is 0 (to break infinite
loops in circular replication). Can't be set to 1 if
--log-slave-updates is used.
--replicate-wild-do-table=name
Tells the slave thread to restrict replication to the
tables that match the specified wildcard pattern. To
specify more than one table, use the directive multiple
times, once for each table. This will work for
cross-database updates. Example:
replicate-wild-do-table=foo%.bar% will replicate only
updates to tables in all databases that start with foo
and whose table names start with bar.
--replicate-wild-ignore-table=name
Tells the slave thread to not replicate to the tables
that match the given wildcard pattern. To specify more
than one table to ignore, use the directive multiple
times, once for each table. This will work for
cross-database updates. Example:
replicate-wild-ignore-table=foo%.bar% will not do updates
to tables in databases that start with foo and whose
table names start with bar.
--report-host=name Hostname or IP of the slave to be reported to the master
during slave registration. Will appear in the output of
SHOW SLAVE HOSTS. Leave unset if you do not want the
slave to register itself with the master. Note that it is
not sufficient for the master to simply read the IP of
the slave off the socket once the slave connects. Due to
NAT and other routing issues, that IP may not be valid
for connecting to the slave from the master or other
hosts
--report-password=name
The account password of the slave to be reported to the
master during slave registration
--report-port=# Port for connecting to slave reported to the master
during slave registration. Set it only if the slave is
listening on a non-default port or if you have a special
tunnel from the master or other clients to the slave. If
not sure, leave this option unset
--report-user=name The account user name of the slave to be reported to the
master during slave registration
--rpl-recovery-rank=#
Unused, will be removed
--safe-mode Skip some optimize stages (for testing).
--safe-show-database
Deprecated option; use GRANT SHOW DATABASES instead...
--safe-user-create Don't allow new user creation by the user who has no
write privileges to the mysql.user table.
--secure-auth Disallow authentication for accounts that have old
(pre-4.1) passwords
--secure-file-priv=name
Limit LOAD DATA, SELECT ... OUTFILE, and LOAD_FILE() to
files within specified directory
--server-id=# Uniquely identifies the server instance in the community
of replication partners
-O, --set-variable=name
Change the value of a variable. Please note that this
option is deprecated;you can set variables directly with
--variable-name=value.
--show-slave-auth-info
Show user and password in SHOW SLAVE HOSTS on this master
--skip-grant-tables Start without grant tables. This gives all users FULL
ACCESS to all tables!
--skip-host-cache Don't cache host names.
--skip-locking Deprecated option, use --skip-external-locking instead.
--skip-name-resolve Don't resolve hostnames. All hostnames are IP's or
'localhost'.
--skip-networking Don't allow connection with TCP/IP
--skip-new Don't use new, possible wrong routines.
--skip-show-database
Don't allow 'SHOW DATABASE' commands
--skip-slave-start If set, slave is not autostarted.
--skip-stack-trace Don't print a stack trace on failure.
--skip-symlink Don't allow symlinking of tables. Deprecated option. Use
--skip-symbolic-links instead.
--skip-thread-priority
Don't give threads different priorities. This option is
deprecated because it has no effect; the implied behavior
is already the default.
--slave-compressed-protocol
Use compression on master/slave protocol
--slave-exec-mode=name
Modes for how replication events should be executed.
Legal values are STRICT (default) and IDEMPOTENT. In
IDEMPOTENT mode, replication will not stop for operations
that are idempotent. In STRICT mode, replication will
stop on any unexpected difference between the master and
the slave
--slave-load-tmpdir=name
The location where the slave should put its temporary
files when replicating a LOAD DATA INFILE command
--slave-net-timeout=#
Number of seconds to wait for more data from a
master/slave connection before aborting the read
--slave-skip-errors=name
Tells the slave thread to continue replication when a
query event returns an error from the provided list
--slave-transaction-retries=#
Number of times the slave SQL thread will retry a
transaction in case it failed with a deadlock or elapsed
lock wait timeout, before giving up and stopping
--slave-type-conversions=name
Set of slave type conversions that are enabled. Legal
values are: ALL_LOSSY to enable lossy conversions and
ALL_NON_LOSSY to enable non-lossy conversions. If the
variable is assigned the empty set, no conversions are
allowed and it is expected that the types match exactly.
--slow-launch-time=#
If creating the thread takes longer than this value (in
seconds), the Slow_launch_threads counter will be
incremented
--slow-query-log Log slow queries to a table or log file. Defaults logging
to a file hostname-slow.log or a table mysql.slow_log if
--log-output=TABLE is used. Must be enabled to activate
other slow log options
--slow-query-log-file=name
Log slow queries to given log file. Defaults logging to
hostname-slow.log. Must be enabled to activate other slow
log options
--socket=name Socket file to use for connection
--sort-buffer-size=#
Each thread that needs to do a sort allocates a buffer of
this size
--sporadic-binlog-dump-fail
Option used by mysql-test for debugging and testing of
replication.
--sql-bin-update-same
The update log is deprecated since version 5.0, is
replaced by the binary log and this option does nothing
anymore.
--sql-mode=name Syntax: sql-mode=mode[,mode[,mode...]]. See the manual
for the complete list of valid sql modes
-s, --symbolic-links
Enable symbolic link support.
--sync-binlog=# Synchronously flush binary log to disk after every #th
event. Use 0 (default) to disable synchronous flushing
--sync-frm Sync .frm files to disk on creation
(Defaults to on; use --skip-sync-frm to disable.)
--sync-master-info=#
Synchronously flush master info to disk after every #th
event. Use 0 (default) to disable synchronous flushing
--sync-relay-log=# Synchronously flush relay log to disk after every #th
event. Use 0 (default) to disable synchronous flushing
--sync-relay-log-info=#
Synchronously flush relay log info to disk after every
#th transaction. Use 0 (default) to disable synchronous
flushing
--sysdate-is-now Non-default option to alias SYSDATE() to NOW() to make it
safe-replicable. Since 5.0, SYSDATE() returns a `dynamic'
value different for different invocations, even within
the same statement.
--table-cache=# Deprecated; use --table-open-cache instead.
--table-definition-cache=#
The number of cached table definitions
--table-lock-wait-timeout=#
Timeout in seconds to wait for a table level lock before
returning an error. Used only if the connection has
active cursors
--table-open-cache=#
The number of cached open tables
--tc-heuristic-recover=name
Decision to use in heuristic recover process. Possible
values are COMMIT or ROLLBACK.
--thread-cache-size=#
How many threads we should keep in a cache for reuse
--thread-handling=name
Define threads usage for handling queries, one of
one-thread-per-connection, no-threads
--thread-stack=# The stack size for each thread
--time-format=name The TIME format (ignored)
--timed-mutexes Specify whether to time mutexes (only InnoDB mutexes are
currently supported)
--tmp-table-size=# If an internal in-memory temporary table exceeds this
size, MySQL will automatically convert it to an on-disk
MyISAM table
-t, --tmpdir=name Path for temporary files. Several paths may be specified,
separated by a colon (:), in this case they are used in a
round-robin fashion
--transaction-alloc-block-size=#
Allocation block size for transactions to be stored in
binary log
--transaction-isolation=name
Default transaction isolation level.
--transaction-prealloc-size=#
Persistent buffer for transactions to be stored in binary
log
--updatable-views-with-limit=name
YES = Don't issue an error message (warning only) if a
VIEW without presence of a key of the underlying table is
used in queries with a LIMIT clause for updating. NO =
Prohibit update of a VIEW, which does not contain a key
of the underlying table and the query uses a LIMIT clause
(usually get from GUI tools)
-s, --use-symbolic-links
Enable symbolic link support. Deprecated option; use
--symbolic-links instead.
-u, --user=name Run mysqld daemon as user.
-v, --verbose Used with --help option for detailed help
-V, --version Output version information and exit.
--wait-timeout=# The number of seconds the server waits for activity on a
connection before closing it
-W, --warnings[=#] Deprecated; use --log-warnings instead.
Variables (--variable-name=value)
and boolean options {FALSE|TRUE} Value (after reading options)
----------------------------------- --------------------------------------
abort-slave-event-count 0
allow-suspicious-udfs FALSE
archive ON
auto-increment-increment 1
auto-increment-offset 1
automatic-sp-privileges TRUE
back-log 50
big-tables FALSE
bind-address (No default value)
binlog-cache-size 32768
binlog-format STATEMENT
binlog-row-event-max-size 1024
blackhole ON
bulk-insert-buffer-size 8388608
character-set-client-handshake TRUE
character-set-filesystem binary
character-set-server latin1
character-sets-dir MYSQL_SHAREDIR/charsets/
chroot (No default value)
collation-server latin1_swedish_ci
completion-type NO_CHAIN
concurrent-insert AUTO
connect-timeout 10
console FALSE
datadir MYSQLTEST_VARDIR/install.db/
date-format %Y-%m-%d
datetime-format %Y-%m-%d %H:%i:%s
default-character-set latin1
default-collation latin1_swedish_ci
default-storage-engine MyISAM
default-time-zone (No default value)
default-week-format 0
delay-key-write ON
delayed-insert-limit 100
delayed-insert-timeout 300
delayed-queue-size 1000
disconnect-slave-event-count 0
div-precision-increment 4
enable-locking FALSE
engine-condition-pushdown TRUE
event-scheduler OFF
expire-logs-days 0
external-locking FALSE
federated ON
flush FALSE
flush-time 0
ft-boolean-syntax + -><()~*:""&|
ft-max-word-len 84
ft-min-word-len 4
ft-query-expansion-limit 20
ft-stopword-file (No default value)
gdb FALSE
general-log FALSE
group-concat-max-len 1024
help TRUE
ignore-builtin-innodb FALSE
init-connect
init-file (No default value)
init-rpl-role MASTER
init-slave
interactive-timeout 28800
join-buffer-size 131072
keep-files-on-create FALSE
key-buffer-size 8388608
key-cache-age-threshold 300
key-cache-block-size 1024
key-cache-division-limit 100
language MYSQL_SHAREDIR/
large-pages FALSE
lc-messages en_US
lc-messages-dir MYSQL_SHAREDIR/
lc-time-names en_US
local-infile TRUE
log-bin (No default value)
log-bin-index (No default value)
log-bin-trust-function-creators FALSE
log-error
log-isam myisam.log
log-output FILE
log-queries-not-using-indexes FALSE
log-short-format FALSE
log-slave-updates FALSE
log-slow-admin-statements FALSE
log-slow-slave-statements FALSE
log-tc tc.log
log-tc-size 24576
log-update (No default value)
log-warnings 1
long-query-time 10
low-priority-updates FALSE
lower-case-table-names 1
master-info-file master.info
master-retry-count 86400
max-allowed-packet 1048576
max-binlog-cache-size 18446744073709547520
max-binlog-dump-events 0
max-binlog-size 1073741824
max-connect-errors 10
max-connections 151
max-delayed-threads 20
max-error-count 64
max-heap-table-size 16777216
max-join-size 18446744073709551615
max-length-for-sort-data 1024
max-prepared-stmt-count 16382
max-relay-log-size 0
max-seeks-for-key 18446744073709551615
max-sort-length 1024
max-sp-recursion-depth 0
max-tmp-tables 32
max-user-connections 0
max-write-lock-count 18446744073709551615
memlock FALSE
min-examined-row-limit 0
multi-range-count 256
myisam-block-size 1024
myisam-data-pointer-size 6
myisam-max-sort-file-size 9223372036853727232
myisam-mmap-size 18446744073709551615
myisam-recover-options OFF
myisam-repair-threads 1
myisam-sort-buffer-size 8388608
myisam-stats-method nulls_unequal
myisam-use-mmap FALSE
net-buffer-length 16384
net-read-timeout 30
net-retry-count 10
net-write-timeout 60
new FALSE
old FALSE
old-alter-table FALSE
old-passwords FALSE
old-style-user-limits FALSE
optimizer-prune-level 1
optimizer-search-depth 62
optimizer-switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on
partition ON
plugin-dir MYSQL_LIBDIR/mysql/plugin
plugin-load (No default value)
port 3306
port-open-timeout 0
preload-buffer-size 32768
profiling-history-size 15
query-alloc-block-size 8192
query-cache-limit 1048576
query-cache-min-res-unit 4096
query-cache-size 0
query-cache-type ON
query-cache-wlock-invalidate FALSE
query-prealloc-size 8192
range-alloc-block-size 4096
read-buffer-size 131072
read-only FALSE
read-rnd-buffer-size 262144
record-buffer 131072
relay-log (No default value)
relay-log-index (No default value)
relay-log-info-file relay-log.info
relay-log-purge TRUE
relay-log-recovery FALSE
relay-log-space-limit 0
replicate-same-server-id FALSE
report-host (No default value)
report-password (No default value)
report-port 3306
report-user (No default value)
rpl-recovery-rank 0
safe-user-create FALSE
secure-auth FALSE
secure-file-priv (No default value)
server-id 0
show-slave-auth-info FALSE
skip-grant-tables TRUE
skip-networking FALSE
skip-show-database FALSE
skip-slave-start FALSE
slave-compressed-protocol FALSE
slave-exec-mode STRICT
slave-load-tmpdir MYSQLTEST_VARDIR/tmp/
slave-net-timeout 3600
slave-skip-errors (No default value)
slave-transaction-retries 10
slave-type-conversions
slow-launch-time 2
slow-query-log FALSE
socket /tmp/mysql.sock
sort-buffer-size 2097152
sporadic-binlog-dump-fail FALSE
sql-mode
symbolic-links FALSE
sync-binlog 0
sync-frm TRUE
sync-master-info 0
sync-relay-log 0
sync-relay-log-info 0
sysdate-is-now FALSE
table-cache 400
table-definition-cache 400
table-lock-wait-timeout 50
table-open-cache 400
tc-heuristic-recover COMMIT
thread-cache-size 0
thread-handling one-thread-per-connection
thread-stack 262144
time-format %H:%i:%s
timed-mutexes FALSE
tmp-table-size 16777216
tmpdir MYSQLTEST_VARDIR/tmp/
transaction-alloc-block-size 8192
transaction-isolation REPEATABLE-READ
transaction-prealloc-size 4096
updatable-views-with-limit YES
use-symbolic-links FALSE
verbose TRUE
wait-timeout 28800
warnings 1
To see what values a running MySQL server is using, type
'mysqladmin variables' instead of 'mysqld --verbose --help'.

View file

@ -0,0 +1,944 @@
The following options may be given as the first argument:
--print-defaults Print the program argument list and exit
--no-defaults Don't read default options from any options file
--defaults-file=# Only read default options from the given file #
--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
Allows use of UDFs consisting of only one symbol xxx()
without corresponding xxx_init() or xxx_deinit(). That
also means that one can load any function from any
library, for example exit() from libc.so
-a, --ansi Use ANSI SQL syntax instead of MySQL syntax. This mode
will also set transaction isolation level 'serializable'.
--archive[=name] Enable or disable ARCHIVE plugin. Possible values are ON,
OFF, FORCE (don't start if the plugin fails to load).
--auto-increment-increment[=#]
Auto-increment columns are incremented by this
--auto-increment-offset[=#]
Offset added to Auto-increment columns. Used when
auto-increment-increment != 1
--automatic-sp-privileges
Creating and dropping stored procedures alters ACLs
(Defaults to on; use --skip-automatic-sp-privileges to disable.)
--back-log=# The number of outstanding connection requests MySQL can
have. This comes into play when the main MySQL thread
gets very many connection requests in a very short time
-b, --basedir=name Path to installation directory. All paths are usually
resolved relative to this
--big-tables Allow big result sets by saving all temporary sets on
file (Solves most 'table full' errors)
--bind-address=name IP address to bind to.
--binlog-cache-size=#
The size of the cache to hold the SQL statements for the
binary log during a transaction. If you often use big,
multi-statement transactions you can increase this to get
more performance
--binlog-do-db=name Tells the master it should log updates for the specified
database, and exclude all others not explicitly
mentioned.
--binlog-format=name
What form of binary logging the master will use: either
ROW for row-based binary logging, STATEMENT for
statement-based binary logging, or MIXED. MIXED is
statement-based binary logging except for those
statements where only row-based is correct: those which
involve user-defined functions (i.e. UDFs) or the UUID()
function; for those, row-based binary logging is
automatically used. If NDBCLUSTER is enabled and
binlog-format is MIXED, the format switches to row-based
and back implicitly per each query accessing an
NDBCLUSTER table
--binlog-ignore-db=name
Tells the master that updates to the given database
should not be logged tothe binary log.
--binlog-row-event-max-size=#
The maximum size of a row-based binary log event in
bytes. Rows will be grouped into events smaller than this
size if possible. The value has to be a multiple of 256.
--blackhole[=name] Enable or disable BLACKHOLE plugin. Possible values are
ON, OFF, FORCE (don't start if the plugin fails to load).
--bootstrap Used by mysql installation scripts.
--bulk-insert-buffer-size=#
Size of tree cache used in bulk insert optimisation. Note
that this is a limit per thread!
--character-set-client-handshake
Don't ignore client side character set value sent during
handshake.
(Defaults to on; use --skip-character-set-client-handshake to disable.)
--character-set-filesystem=name
Set the filesystem character set.
-C, --character-set-server=name
Set the default character set.
--character-sets-dir=name
Directory where character sets are
-r, --chroot=name Chroot mysqld daemon during startup.
--collation-server=name
Set the default collation.
--completion-type=name
The transaction completion type, one of NO_CHAIN, CHAIN,
RELEASE
--concurrent-insert[=name]
Use concurrent insert with MyISAM. Possible values are
NEVER, AUTO, ALWAYS
--connect-timeout=# The number of seconds the mysqld server is waiting for a
connect packet before responding with 'Bad handshake'
--console Write error output on screen; Don't remove the console
window on windows.
--core-file Write core on errors.
-h, --datadir=name Path to the database root directory
--date-format=name The DATE format (ignored)
--datetime-format=name
The DATETIME format (ignored)
-C, --default-character-set=name
Set the default character set (deprecated option, use
--character-set-server instead).
--default-collation=name
Set the default collation (deprecated option, use
--collation-server instead).
--default-storage-engine=name
The default storage engine for new tables
--default-time-zone=name
Set the default time zone.
--default-week-format=#
The default week format used by WEEK() functions
--delay-key-write[=name]
Type of DELAY_KEY_WRITE
--delay-key-write-for-all-tables
Don't flush key buffers between writes for any MyISAM
table (Deprecated option, use --delay-key-write=all
instead).
--delayed-insert-limit=#
After inserting delayed_insert_limit rows, the INSERT
DELAYED handler will check if there are any SELECT
statements pending. If so, it allows these to execute
before continuing
--delayed-insert-timeout=#
How long a INSERT DELAYED thread should wait for INSERT
statements before terminating
--delayed-queue-size=#
What size queue (in rows) should be allocated for
handling INSERT DELAYED. If the queue becomes full, any
client that does INSERT DELAYED will wait until there is
room in the queue again
--disconnect-slave-event-count=#
Option used by mysql-test for debugging and testing of
replication.
--div-precision-increment=#
Precision of the result of '/' operator will be increased
on that value
--enable-locking Deprecated option, use --external-locking instead.
--engine-condition-pushdown
Push supported query conditions to the storage engine
(Defaults to on; use --skip-engine-condition-pushdown to disable.)
--event-scheduler[=name]
Enable the event scheduler. Possible values are ON, OFF,
and DISABLED (keep the event scheduler completely
deactivated, it cannot be activated run-time)
-T, --exit-info[=#] Used for debugging; Use at your own risk!
--expire-logs-days=#
If non-zero, binary logs will be purged after
expire_logs_days days; possible purges happen at startup
and at binary log rotation
--external-locking Use system (external) locking (disabled by default).
With this option enabled you can run myisamchk to test
(not repair) tables while the MySQL server is running.
Disable with --skip-external-locking.
--federated[=name] Enable or disable FEDERATED plugin. Possible values are
ON, OFF, FORCE (don't start if the plugin fails to load).
--flush Flush MyISAM tables to disk between SQL commands
--flush-time=# A dedicated thread is created to flush all tables at the
given interval
--ft-boolean-syntax=name
List of operators for MATCH ... AGAINST ( ... IN BOOLEAN
MODE)
--ft-max-word-len=# The maximum length of the word to be included in a
FULLTEXT index. Note: FULLTEXT indexes must be rebuilt
after changing this variable
--ft-min-word-len=# The minimum length of the word to be included in a
FULLTEXT index. Note: FULLTEXT indexes must be rebuilt
after changing this variable
--ft-query-expansion-limit=#
Number of best matches to use for query expansion
--ft-stopword-file=name
Use stopwords from this file instead of built-in list
--gdb Set up signals usable for debugging
--general-log Log connections and queries to a table or log file.
Defaults logging to a file hostname.log or a table
mysql.general_logif --log-output=TABLE is used
--general-log-file=name
Log connections and queries to given file
--group-concat-max-len=#
The maximum length of the result of function
GROUP_CONCAT()
-?, --help Display this help and exit.
--ignore-builtin-innodb
Disable initialization of builtin InnoDB plugin
--init-connect=name Command(s) that are executed for each new connection
--init-file=name Read SQL commands from this file at startup
--init-rpl-role=name
Set the replication role.
--init-slave=name Command(s) that are executed by a slave server each time
the SQL thread starts
--interactive-timeout=#
The number of seconds the server waits for activity on an
interactive connection before closing it
--join-buffer-size=#
The size of the buffer that is used for full joins
--keep-files-on-create
Don't overwrite stale .MYD and .MYI even if no directory
is specified
--key-buffer-size=# The size of the buffer used for index blocks for MyISAM
tables. Increase this to get better index handling (for
all reads and multiple writes) to as much as you can
afford
--key-cache-age-threshold=#
This characterizes the number of hits a hot block has to
be untouched until it is considered aged enough to be
downgraded to a warm block. This specifies the percentage
ratio of that number of hits to the total number of
blocks in key cache
--key-cache-block-size=#
The default size of key cache blocks
--key-cache-division-limit=#
The minimum percentage of warm blocks in key cache
-L, --language=name Client error messages in given language. May be given as
a full path. Deprecated. Use --lc-messages-dir instead.
--lc-messages=name Set the language used for the error messages.
-L, --lc-messages-dir=name
Directory where error messages are
--lc-time-names=name
Set the language used for the month names and the days of
the week.
--local-infile Enable LOAD DATA LOCAL INFILE
(Defaults to on; use --skip-local-infile to disable.)
-l, --log[=name] Log connections and queries to file (deprecated option,
use --general-log/--general-log-file instead).
--log-bin[=name] Log update queries in binary format. Optional (but
strongly recommended to avoid replication problems if
server's hostname changes) argument should be the chosen
location for the binary log files.
--log-bin-index=name
File that holds the names for last binary log files.
--log-bin-trust-function-creators
If set to FALSE (the default), then when --log-bin is
used, creation of a stored function (or trigger) is
allowed only to users having the SUPER privilege and only
if this stored function (trigger) may not break binary
logging. Note that if ALL connections to this server
ALWAYS use row-based binary logging, the security issues
do not exist and the binary logging cannot break, so you
can safely set this to TRUE
--log-error[=name] Error log file
--log-isam[=name] Log all MyISAM changes to file.
-0, --log-long-format
Log some extra information to update log. Please note
that this option is deprecated; see --log-short-format
option.
--log-output=name Syntax: log-output=value[,value...], where "value" could
be TABLE, FILE or NONE
--log-queries-not-using-indexes
Log queries that are executed without benefit of any
index to the slow log if it is open
--log-short-format Don't log extra information to update and slow-query
logs.
--log-slave-updates Tells the slave to log the updates from the slave thread
to the binary log. You will need to turn it on if you
plan to daisy-chain the slaves
--log-slow-admin-statements
Log slow OPTIMIZE, ANALYZE, ALTER and other
administrative statements to the slow log if it is open.
--log-slow-queries[=name]
Log slow queries to a table or log file. Defaults logging
to table mysql.slow_log or hostname-slow.log if
--log-output=file is used. Must be enabled to activate
other slow log options. Deprecated option, use
--slow-query-log/--slow-query-log-file instead.
--log-slow-slave-statements
Log slow statements executed by slave thread to the slow
log if it is open.
--log-tc=name Path to transaction coordinator log (used for
transactions that affect more than one storage engine,
when binary log is disabled)
--log-tc-size=# Size of transaction coordinator log.
--log-update[=name] The update log is deprecated since version 5.0, is
replaced by the binary log and this option justs turns on
--log-bin instead.
-W, --log-warnings[=#]
Log some not critical warnings to the log file
--long-query-time=# Log all queries that have taken more than long_query_time
seconds to execute to file. The argument will be treated
as a decimal value with microsecond precision
--low-priority-updates
INSERT/DELETE/UPDATE has lower priority than selects
--lower-case-table-names[=#]
If set to 1 table names are stored in lowercase on disk
and table names will be case-insensitive. Should be set
to 2 if you are using a case insensitive file system
--master-info-file=name
The location and name of the file that remembers the
master and where the I/O replication thread is in the
master's binlogs.
--master-retry-count=#
The number of tries the slave will make to connect to the
master before giving up.
--max-allowed-packet=#
Max packet length to send to or receive from the server
--max-binlog-cache-size=#
Can be used to restrict the total size used to cache a
multi-transaction query
--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
exceeds this value. Will also apply to relay logs if
max_relay_log_size is 0
--max-connect-errors=#
If there is more than this number of interrupted
connections from a host this host will be blocked from
further connections
--max-connections=# The number of simultaneous clients allowed
--max-delayed-threads=#
Don't start more than this number of threads to handle
INSERT DELAYED statements. If set to zero INSERT DELAYED
will be not used
--max-error-count=# Max number of errors/warnings to store for a statement
--max-heap-table-size=#
Don't allow creation of heap tables bigger than this
--max-join-size=# Joins that are probably going to read more than
max_join_size records return an error
--max-length-for-sort-data=#
Max number of bytes in sorted records
--max-prepared-stmt-count=#
Maximum number of prepared statements in the server
--max-relay-log-size=#
If non-zero: relay log will be rotated automatically when
the size exceeds this value; if zero: when the size
exceeds max_binlog_size
--max-seeks-for-key=#
Limit assumed max number of seeks when looking up rows
based on a key
--max-sort-length=# The number of bytes to use when sorting BLOB or TEXT
values (only the first max_sort_length bytes of each
value are used; the rest are ignored)
--max-sp-recursion-depth[=#]
Maximum stored procedure recursion depth
--max-tmp-tables=# Maximum number of temporary tables a client can keep open
at a time
--max-user-connections=#
The maximum number of active connections for a single
user (0 = no limit)
--max-write-lock-count=#
After this many write locks, allow some read locks to run
in between
--memlock Lock mysqld in memory.
--min-examined-row-limit=#
Don't write queries to slow log that examine fewer rows
than that
--multi-range-count=#
Number of key ranges to request at once
--myisam-block-size=#
Block size to be used for MyISAM index pages
--myisam-data-pointer-size=#
Default pointer size to be used for MyISAM tables
--myisam-max-sort-file-size=#
Don't use the fast sort index method to created index if
the temporary file would get bigger than this
--myisam-mmap-size=#
Restricts the total memory used for memory mapping of
MySQL tables
--myisam-recover-options[=name]
Syntax: myisam-recover-options[=option[,option...]],
where option can be DEFAULT, BACKUP, FORCE, QUICK, or OFF
--myisam-repair-threads=#
If larger than 1, when repairing a MyISAM table all
indexes will be created in parallel, with one thread per
index. The value of 1 disables parallel repair
--myisam-sort-buffer-size=#
The buffer that is allocated when sorting the index when
doing a REPAIR or when creating indexes with CREATE INDEX
or ALTER TABLE
--myisam-stats-method=name
Specifies how MyISAM index statistics collection code
should treat NULLs. Possible values of name are
NULLS_UNEQUAL (default behavior for 4.1 and later),
NULLS_EQUAL (emulate 4.0 behavior), and NULLS_IGNORED
--myisam-use-mmap Use memory mapping for reading and writing MyISAM tables
--named-pipe Enable the named pipe (NT)
--net-buffer-length=#
Buffer length for TCP/IP and socket communication
--net-read-timeout=#
Number of seconds to wait for more data from a connection
before aborting the read
--net-retry-count=# If a read on a communication port is interrupted, retry
this many times before giving up
--net-write-timeout=#
Number of seconds to wait for a block to be written to a
connection before aborting the write
-n, --new Use very new possible "unsafe" functions
--old Use compatible behavior
--old-alter-table Use old, non-optimized alter table
--old-passwords Use old password encryption method (needed for 4.0 and
older clients)
--old-style-user-limits
Enable old-style user limits (before 5.0.3 user resources
were counted per each user+host vs. per account)
--one-thread (deprecated): Only use one thread (for debugging under
Linux). Use thread-handling=no-threads instead
--open-files-limit=#
If this is not 0, then mysqld will use this value to
reserve file descriptors to use with setrlimit(). If this
value is 0 then mysqld will reserve max_connections*5 or
max_connections + table_cache*2 (whichever is larger)
number of file descriptors
--optimizer-prune-level=#
Controls the heuristic(s) applied during query
optimization to prune less-promising partial plans from
the optimizer search space. Meaning: 0 - do not apply any
heuristic, thus perform exhaustive search; 1 - prune
plans based on number of retrieved rows
--optimizer-search-depth=#
Maximum depth of search performed by the query optimizer.
Values larger than the number of relations in a query
result in better query plans, but take longer to compile
a query. Values smaller than the number of tables in a
relation result in faster optimization, but may produce
very bad query plans. If set to 0, the system will
automatically pick a reasonable value; if set to 63, the
optimizer will switch to the original find_best
search(used for testing/comparison)
--optimizer-switch=name
optimizer_switch=option=val[,option=val...], where option
is one of {index_merge, index_merge_union,
index_merge_sort_union, index_merge_intersection} and val
is one of {on, off, default}
--partition[=name] Enable or disable partition plugin. Possible values are
ON, OFF, FORCE (don't start if the plugin fails to load).
--pid-file=name Pid file used by safe_mysqld
--plugin-dir=name Directory for plugins
--plugin-load=name Optional semicolon-separated list of plugins to load,
where each plugin is identified as name=library, where
name is the plugin name and library is the plugin library
in plugin_dir.
-P, --port=# Port number to use for connection or 0 to default to,
my.cnf, $MYSQL_TCP_PORT, /etc/services, built-in default
(3306), whatever comes first
--port-open-timeout=#
Maximum time in seconds to wait for the port to become
free. (Default: no wait)
--preload-buffer-size=#
The size of the buffer that is allocated when preloading
indexes
--profiling-history-size=#
Limit of query profiling memory
--query-alloc-block-size=#
Allocation block size for query parsing and execution
--query-cache-limit=#
Don't cache results that are bigger than this
--query-cache-min-res-unit=#
The minimum size for blocks allocated by the query cache
--query-cache-size=#
The memory allocated to store results from old queries
--query-cache-type=name
OFF = Don't cache or retrieve results. ON = Cache all
results except SELECT SQL_NO_CACHE ... queries. DEMAND =
Cache only SELECT SQL_CACHE ... queries
--query-cache-wlock-invalidate
Invalidate queries in query cache on LOCK for write
--query-prealloc-size=#
Persistent buffer for query parsing and execution
--range-alloc-block-size=#
Allocation block size for storing ranges during
optimization
--read-buffer-size=#
Each thread that does a sequential scan allocates a
buffer of this size for each table it scans. If you do
many sequential scans, you may want to increase this
value
--read-only Make all non-temporary tables read-only, with the
exception for replication (slave) threads and users with
the SUPER privilege
--read-rnd-buffer-size=#
When reading rows in sorted order after a sort, the rows
are read through this buffer to avoid a disk seeks. If
not set, then it's set to the value of record_buffer
--record-buffer=# Deprecated; use --read-buffer-size instead.
--relay-log=name The location and name to use for relay logs
--relay-log-index=name
The location and name to use for the file that keeps a
list of the last relay logs
--relay-log-info-file=name
The location and name of the file that remembers where
the SQL replication thread is in the relay logs
--relay-log-purge if disabled - do not purge relay logs. if enabled - purge
them as soon as they are no more needed
(Defaults to on; use --skip-relay-log-purge to disable.)
--relay-log-recovery
Enables automatic relay log recovery right after the
database startup, which means that the IO Thread starts
re-fetching from the master right after the last
transaction processed
--relay-log-space-limit=#
Maximum space to use for all relay logs
--replicate-do-db=name
Tells the slave thread to restrict replication to the
specified database. To specify more than one database,
use the directive multiple times, once for each database.
Note that this will only work if you do not use
cross-database queries such as UPDATE some_db.some_table
SET foo='bar' while having selected a different or no
database. If you need cross database updates to work,
make sure you have 3.23.28 or later, and use
replicate-wild-do-table=db_name.%.
--replicate-do-table=name
Tells the slave thread to restrict replication to the
specified table. To specify more than one table, use the
directive multiple times, once for each table. This will
work for cross-database updates, in contrast to
replicate-do-db.
--replicate-ignore-db=name
Tells the slave thread to not replicate to the specified
database. To specify more than one database to ignore,
use the directive multiple times, once for each database.
This option will not work if you use cross database
updates. If you need cross database updates to work, make
sure you have 3.23.28 or later, and use
replicate-wild-ignore-table=db_name.%.
--replicate-ignore-table=name
Tells the slave thread to not replicate to the specified
table. To specify more than one table to ignore, use the
directive multiple times, once for each table. This will
work for cross-datbase updates, in contrast to
replicate-ignore-db.
--replicate-rewrite-db=name
Updates to a database with a different name than the
original. Example:
replicate-rewrite-db=master_db_name->slave_db_name.
--replicate-same-server-id
In replication, if set to 1, do not skip events having
our server id. Default value is 0 (to break infinite
loops in circular replication). Can't be set to 1 if
--log-slave-updates is used.
--replicate-wild-do-table=name
Tells the slave thread to restrict replication to the
tables that match the specified wildcard pattern. To
specify more than one table, use the directive multiple
times, once for each table. This will work for
cross-database updates. Example:
replicate-wild-do-table=foo%.bar% will replicate only
updates to tables in all databases that start with foo
and whose table names start with bar.
--replicate-wild-ignore-table=name
Tells the slave thread to not replicate to the tables
that match the given wildcard pattern. To specify more
than one table to ignore, use the directive multiple
times, once for each table. This will work for
cross-database updates. Example:
replicate-wild-ignore-table=foo%.bar% will not do updates
to tables in databases that start with foo and whose
table names start with bar.
--report-host=name Hostname or IP of the slave to be reported to the master
during slave registration. Will appear in the output of
SHOW SLAVE HOSTS. Leave unset if you do not want the
slave to register itself with the master. Note that it is
not sufficient for the master to simply read the IP of
the slave off the socket once the slave connects. Due to
NAT and other routing issues, that IP may not be valid
for connecting to the slave from the master or other
hosts
--report-password=name
The account password of the slave to be reported to the
master during slave registration
--report-port=# Port for connecting to slave reported to the master
during slave registration. Set it only if the slave is
listening on a non-default port or if you have a special
tunnel from the master or other clients to the slave. If
not sure, leave this option unset
--report-user=name The account user name of the slave to be reported to the
master during slave registration
--rpl-recovery-rank=#
Unused, will be removed
--safe-mode Skip some optimize stages (for testing).
--safe-show-database
Deprecated option; use GRANT SHOW DATABASES instead...
--safe-user-create Don't allow new user creation by the user who has no
write privileges to the mysql.user table.
--secure-auth Disallow authentication for accounts that have old
(pre-4.1) passwords
--secure-file-priv=name
Limit LOAD DATA, SELECT ... OUTFILE, and LOAD_FILE() to
files within specified directory
--server-id=# Uniquely identifies the server instance in the community
of replication partners
-O, --set-variable=name
Change the value of a variable. Please note that this
option is deprecated;you can set variables directly with
--variable-name=value.
--shared-memory Enable the shared memory
--shared-memory-base-name=name
Base name of shared memory
--show-slave-auth-info
Show user and password in SHOW SLAVE HOSTS on this master
--skip-grant-tables Start without grant tables. This gives all users FULL
ACCESS to all tables!
--skip-host-cache Don't cache host names.
--skip-locking Deprecated option, use --skip-external-locking instead.
--skip-name-resolve Don't resolve hostnames. All hostnames are IP's or
'localhost'.
--skip-networking Don't allow connection with TCP/IP
--skip-new Don't use new, possible wrong routines.
--skip-show-database
Don't allow 'SHOW DATABASE' commands
--skip-slave-start If set, slave is not autostarted.
--skip-stack-trace Don't print a stack trace on failure.
--skip-symlink Don't allow symlinking of tables. Deprecated option. Use
--skip-symbolic-links instead.
--skip-thread-priority
Don't give threads different priorities. This option is
deprecated because it has no effect; the implied behavior
is already the default.
--slave-compressed-protocol
Use compression on master/slave protocol
--slave-exec-mode=name
Modes for how replication events should be executed.
Legal values are STRICT (default) and IDEMPOTENT. In
IDEMPOTENT mode, replication will not stop for operations
that are idempotent. In STRICT mode, replication will
stop on any unexpected difference between the master and
the slave
--slave-load-tmpdir=name
The location where the slave should put its temporary
files when replicating a LOAD DATA INFILE command
--slave-net-timeout=#
Number of seconds to wait for more data from a
master/slave connection before aborting the read
--slave-skip-errors=name
Tells the slave thread to continue replication when a
query event returns an error from the provided list
--slave-transaction-retries=#
Number of times the slave SQL thread will retry a
transaction in case it failed with a deadlock or elapsed
lock wait timeout, before giving up and stopping
--slow-launch-time=#
If creating the thread takes longer than this value (in
seconds), the Slow_launch_threads counter will be
incremented
--slow-query-log Log slow queries to a table or log file. Defaults logging
to a file hostname-slow.log or a table mysql.slow_log if
--log-output=TABLE is used. Must be enabled to activate
other slow log options
--slow-query-log-file=name
Log slow queries to given log file. Defaults logging to
hostname-slow.log. Must be enabled to activate other slow
log options
--socket=name Socket file to use for connection
--sort-buffer-size=#
Each thread that needs to do a sort allocates a buffer of
this size
--sporadic-binlog-dump-fail
Option used by mysql-test for debugging and testing of
replication.
--sql-bin-update-same
The update log is deprecated since version 5.0, is
replaced by the binary log and this option does nothing
anymore.
--sql-mode=name Syntax: sql-mode=mode[,mode[,mode...]]. See the manual
for the complete list of valid sql modes
--standalone Dummy option to start as a standalone program (NT).
-s, --symbolic-links
Enable symbolic link support.
--sync-binlog=# Synchronously flush binary log to disk after every #th
event. Use 0 (default) to disable synchronous flushing
--sync-frm Sync .frm files to disk on creation
(Defaults to on; use --skip-sync-frm to disable.)
--sync-master-info=#
Synchronously flush master info to disk after every #th
event. Use 0 (default) to disable synchronous flushing
--sync-relay-log=# Synchronously flush relay log to disk after every #th
event. Use 0 (default) to disable synchronous flushing
--sync-relay-log-info=#
Synchronously flush relay log info to disk after every
#th transaction. Use 0 (default) to disable synchronous
flushing
--sysdate-is-now Non-default option to alias SYSDATE() to NOW() to make it
safe-replicable. Since 5.0, SYSDATE() returns a `dynamic'
value different for different invocations, even within
the same statement.
--table-cache=# Deprecated; use --table-open-cache instead.
--table-definition-cache=#
The number of cached table definitions
--table-lock-wait-timeout=#
Timeout in seconds to wait for a table level lock before
returning an error. Used only if the connection has
active cursors
--table-open-cache=#
The number of cached open tables
--tc-heuristic-recover=name
Decision to use in heuristic recover process. Possible
values are COMMIT or ROLLBACK.
--thread-cache-size=#
How many threads we should keep in a cache for reuse
--thread-handling=name
Define threads usage for handling queries, one of
one-thread-per-connection, no-threads
--thread-stack=# The stack size for each thread
--time-format=name The TIME format (ignored)
--timed-mutexes Specify whether to time mutexes (only InnoDB mutexes are
currently supported)
--tmp-table-size=# If an internal in-memory temporary table exceeds this
size, MySQL will automatically convert it to an on-disk
MyISAM table
-t, --tmpdir=name Path for temporary files. Several paths may be specified,
separated by a semicolon (;), in this case they are used
in a round-robin fashion
--transaction-alloc-block-size=#
Allocation block size for transactions to be stored in
binary log
--transaction-isolation=name
Default transaction isolation level.
--transaction-prealloc-size=#
Persistent buffer for transactions to be stored in binary
log
--updatable-views-with-limit=name
YES = Don't issue an error message (warning only) if a
VIEW without presence of a key of the underlying table is
used in queries with a LIMIT clause for updating. NO =
Prohibit update of a VIEW, which does not contain a key
of the underlying table and the query uses a LIMIT clause
(usually get from GUI tools)
-s, --use-symbolic-links
Enable symbolic link support. Deprecated option; use
--symbolic-links instead.
-u, --user=name Run mysqld daemon as user.
-v, --verbose Used with --help option for detailed help
-V, --version Output version information and exit.
--wait-timeout=# The number of seconds the server waits for activity on a
connection before closing it
-W, --warnings[=#] Deprecated; use --log-warnings instead.
Variables (--variable-name=value)
and boolean options {FALSE|TRUE} Value (after reading options)
--------------------------------- ----------------------------------------
abort-slave-event-count 0
allow-suspicious-udfs FALSE
archive ON
auto-increment-increment 1
auto-increment-offset 1
automatic-sp-privileges TRUE
back-log 50
big-tables FALSE
bind-address (No default value)
binlog-cache-size 32768
binlog-format STATEMENT
binlog-row-event-max-size 1024
blackhole ON
bulk-insert-buffer-size 8388608
character-set-client-handshake TRUE
character-set-filesystem binary
character-set-server latin1
character-sets-dir MYSQL_SHAREDIR/charsets/
chroot (No default value)
collation-server latin1_swedish_ci
completion-type NO_CHAIN
concurrent-insert AUTO
connect-timeout 10
console FALSE
datadir MYSQLTEST_VARDIR/install.db/
date-format %Y-%m-%d
datetime-format %Y-%m-%d %H:%i:%s
default-character-set latin1
default-collation latin1_swedish_ci
default-storage-engine MyISAM
default-time-zone (No default value)
default-week-format 0
delay-key-write ON
delayed-insert-limit 100
delayed-insert-timeout 300
delayed-queue-size 1000
disconnect-slave-event-count 0
div-precision-increment 4
enable-locking FALSE
engine-condition-pushdown TRUE
event-scheduler OFF
expire-logs-days 0
external-locking FALSE
federated ON
flush FALSE
flush-time 1800
ft-boolean-syntax + -><()~*:""&|
ft-max-word-len 84
ft-min-word-len 4
ft-query-expansion-limit 20
ft-stopword-file (No default value)
gdb FALSE
general-log FALSE
group-concat-max-len 1024
help TRUE
ignore-builtin-innodb FALSE
init-connect
init-file (No default value)
init-rpl-role MASTER
init-slave
interactive-timeout 28800
join-buffer-size 131072
keep-files-on-create FALSE
key-buffer-size 8388608
key-cache-age-threshold 300
key-cache-block-size 1024
key-cache-division-limit 100
language MYSQL_SHAREDIR/
lc-messages en_US
lc-messages-dir MYSQL_SHAREDIR/
lc-time-names en_US
local-infile TRUE
log-bin (No default value)
log-bin-index (No default value)
log-bin-trust-function-creators FALSE
log-error
log-isam myisam.log
log-output FILE
log-queries-not-using-indexes FALSE
log-short-format FALSE
log-slave-updates FALSE
log-slow-admin-statements FALSE
log-slow-slave-statements FALSE
log-tc tc.log
log-tc-size 24576
log-update (No default value)
log-warnings 1
long-query-time 10
low-priority-updates FALSE
lower-case-table-names 1
master-info-file master.info
master-retry-count 86400
max-allowed-packet 1048576
max-binlog-cache-size 18446744073709547520
max-binlog-dump-events 0
max-binlog-size 1073741824
max-connect-errors 10
max-connections 151
max-delayed-threads 20
max-error-count 64
max-heap-table-size 16777216
max-join-size 18446744073709551615
max-length-for-sort-data 1024
max-prepared-stmt-count 16382
max-relay-log-size 0
max-seeks-for-key 18446744073709551615
max-sort-length 1024
max-sp-recursion-depth 0
max-tmp-tables 32
max-user-connections 0
max-write-lock-count 18446744073709551615
memlock FALSE
min-examined-row-limit 0
multi-range-count 256
myisam-block-size 1024
myisam-data-pointer-size 6
myisam-max-sort-file-size 9223372036853727232
myisam-mmap-size 18446744073709551615
myisam-recover-options OFF
myisam-repair-threads 1
myisam-sort-buffer-size 8388608
myisam-stats-method nulls_unequal
myisam-use-mmap FALSE
named-pipe FALSE
net-buffer-length 16384
net-read-timeout 30
net-retry-count 10
net-write-timeout 60
new FALSE
old FALSE
old-alter-table FALSE
old-passwords FALSE
old-style-user-limits FALSE
optimizer-prune-level 1
optimizer-search-depth 62
optimizer-switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on
partition ON
plugin-dir MYSQL_LIBDIR/plugin
plugin-load (No default value)
port 3306
port-open-timeout 0
preload-buffer-size 32768
profiling-history-size 15
query-alloc-block-size 8192
query-cache-limit 1048576
query-cache-min-res-unit 4096
query-cache-size 0
query-cache-type ON
query-cache-wlock-invalidate FALSE
query-prealloc-size 8192
range-alloc-block-size 4096
read-buffer-size 131072
read-only FALSE
read-rnd-buffer-size 262144
record-buffer 131072
relay-log (No default value)
relay-log-index (No default value)
relay-log-info-file relay-log.info
relay-log-purge TRUE
relay-log-recovery FALSE
relay-log-space-limit 0
replicate-same-server-id FALSE
report-host (No default value)
report-password (No default value)
report-port 3306
report-user (No default value)
rpl-recovery-rank 0
safe-user-create FALSE
secure-auth FALSE
secure-file-priv (No default value)
server-id 0
shared-memory FALSE
shared-memory-base-name MYSQL
show-slave-auth-info FALSE
skip-grant-tables TRUE
skip-networking FALSE
skip-show-database FALSE
skip-slave-start FALSE
slave-compressed-protocol FALSE
slave-exec-mode STRICT
slave-load-tmpdir MYSQLTEST_VARDIR/tmp/
slave-net-timeout 3600
slave-skip-errors (No default value)
slave-transaction-retries 10
slow-launch-time 2
slow-query-log FALSE
socket MySQL
sort-buffer-size 2097152
sporadic-binlog-dump-fail FALSE
sql-mode
symbolic-links FALSE
sync-binlog 0
sync-frm TRUE
sync-master-info 0
sync-relay-log 0
sync-relay-log-info 0
sysdate-is-now FALSE
table-cache 400
table-definition-cache 400
table-lock-wait-timeout 50
table-open-cache 400
tc-heuristic-recover COMMIT
thread-cache-size 0
thread-handling one-thread-per-connection
thread-stack 262144
time-format %H:%i:%s
timed-mutexes FALSE
tmp-table-size 16777216
tmpdir MYSQLTEST_VARDIR/tmp/
transaction-alloc-block-size 8192
transaction-isolation REPEATABLE-READ
transaction-prealloc-size 4096
updatable-views-with-limit YES
use-symbolic-links FALSE
verbose TRUE
wait-timeout 28800
warnings 1
To see what values a running MySQL server is using, type
'mysqladmin variables' instead of 'mysqld --verbose --help'.

View file

@ -55,7 +55,7 @@ CREATE TABLE `t1` (
`a` double DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
INSERT INTO `t1` VALUES (RES);
INSERT INTO `t1` VALUES (-1.7976931348623157e308);
DROP TABLE t1;
#
# Bug#3361 mysqldump quotes DECIMAL values inconsistently

View file

@ -1,47 +1,47 @@
DROP TABLE IF EXISTS t1;
FLUSH TABLES;
SELECT * FROM t1;
ERROR 42000: Unknown table engine 'partition'
ERROR 42000: Unknown storage engine 'partition'
TRUNCATE TABLE t1;
ERROR 42000: Unknown table engine 'partition'
ERROR 42000: Unknown storage engine 'partition'
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze Error Unknown table engine 'partition'
test.t1 analyze Error Unknown storage engine 'partition'
test.t1 analyze error Corrupt
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check Error Unknown table engine 'partition'
test.t1 check Error Unknown storage engine 'partition'
test.t1 check error Corrupt
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize Error Unknown table engine 'partition'
test.t1 optimize Error Unknown storage engine 'partition'
test.t1 optimize error Corrupt
REPAIR TABLE t1;
Table Op Msg_type Msg_text
test.t1 repair Error Unknown table engine 'partition'
test.t1 repair Error Unknown storage engine 'partition'
test.t1 repair error Corrupt
ALTER TABLE t1 REPAIR PARTITION ALL;
Table Op Msg_type Msg_text
test.t1 repair Error Unknown table engine 'partition'
test.t1 repair Error Unknown storage engine 'partition'
test.t1 repair error Corrupt
ALTER TABLE t1 CHECK PARTITION ALL;
Table Op Msg_type Msg_text
test.t1 check Error Unknown table engine 'partition'
test.t1 check Error Unknown storage engine 'partition'
test.t1 check error Corrupt
ALTER TABLE t1 OPTIMIZE PARTITION ALL;
Table Op Msg_type Msg_text
test.t1 optimize Error Unknown table engine 'partition'
test.t1 optimize Error Unknown storage engine 'partition'
test.t1 optimize error Corrupt
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
test.t1 analyze Error Unknown table engine 'partition'
test.t1 analyze Error Unknown storage engine 'partition'
test.t1 analyze error Corrupt
ALTER TABLE t1 REBUILD PARTITION ALL;
ERROR 42000: Unknown table engine 'partition'
ERROR 42000: Unknown storage engine 'partition'
ALTER TABLE t1 ENGINE Memory;
ERROR 42000: Unknown table engine 'partition'
ERROR 42000: Unknown storage engine 'partition'
ALTER TABLE t1 ADD (new INT);
ERROR 42000: Unknown table engine 'partition'
ERROR 42000: Unknown storage engine 'partition'
DROP TABLE t1;
CREATE TABLE t1 (
firstname VARCHAR(25) NOT NULL,
@ -52,9 +52,9 @@ joined DATE NOT NULL
)
PARTITION BY KEY(joined)
PARTITIONS 6;
Got one of the listed errors
ERROR HY000: The 'partitioning' feature is disabled; you need MySQL built with '--with-plugin-partition' to have it working
ALTER TABLE t1 PARTITION BY KEY(joined) PARTITIONS 2;
Got one of the listed errors
ERROR HY000: The 'partitioning' feature is disabled; you need MySQL built with '--with-plugin-partition' to have it working
drop table t1;
ERROR 42S02: Unknown table 't1'
CREATE TABLE t1 (
@ -71,7 +71,7 @@ PARTITION p2 VALUES LESS THAN (1980),
PARTITION p3 VALUES LESS THAN (1990),
PARTITION p4 VALUES LESS THAN MAXVALUE
);
Got one of the listed errors
ERROR HY000: The 'partitioning' feature is disabled; you need MySQL built with '--with-plugin-partition' to have it working
drop table t1;
ERROR 42S02: Unknown table 't1'
CREATE TABLE t1 (id INT, purchased DATE)
@ -82,7 +82,7 @@ PARTITION p0 VALUES LESS THAN (1990),
PARTITION p1 VALUES LESS THAN (2000),
PARTITION p2 VALUES LESS THAN MAXVALUE
);
Got one of the listed errors
ERROR HY000: The 'partitioning' feature is disabled; you need MySQL built with '--with-plugin-partition' to have it working
drop table t1;
ERROR 42S02: Unknown table 't1'
create table t1 (a varchar(10) charset latin1 collate latin1_bin);

View file

@ -522,7 +522,7 @@ select conv(255 AS p1, 10 AS p2, 16 AS p3);
ERROR 42000: Incorrect parameters in the call to native function 'conv'
select atan(10);
atan(10)
1.47112767430373
1.4711276743037347
select atan(10 AS p1);
ERROR 42000: Incorrect parameters in the call to native function 'atan'
select atan(10 p1);
@ -533,7 +533,7 @@ select atan(10 "p1");
ERROR 42000: Incorrect parameters in the call to native function 'atan'
select atan(10, 20);
atan(10, 20)
0.463647609000806
0.4636476090008061
select atan(10 AS p1, 20);
ERROR 42000: Incorrect parameters in the call to native function 'atan'
select atan(10 p1, 20);

View file

@ -97,30 +97,30 @@ DROP TABLE t1;
CREATE TABLE t1 (a INT)
ENGINE=NonExistentEngine;
Warnings:
Warning 1286 Unknown table engine 'NonExistentEngine'
Warning 1286 Unknown storage engine 'NonExistentEngine'
Warning 1266 Using storage engine MyISAM for table 't1'
DROP TABLE t1;
CREATE TABLE t1 (a INT)
ENGINE=NonExistentEngine
PARTITION BY HASH (a);
Warnings:
Warning 1286 Unknown table engine 'NonExistentEngine'
Warning 1286 Unknown storage engine 'NonExistentEngine'
Warning 1266 Using storage engine MyISAM for table 't1'
DROP TABLE t1;
CREATE TABLE t1 (a INT)
ENGINE=Memory;
ALTER TABLE t1 ENGINE=NonExistentEngine;
Warnings:
Warning 1286 Unknown table engine 'NonExistentEngine'
Warning 1286 Unknown storage engine 'NonExistentEngine'
ALTER TABLE t1
PARTITION BY HASH (a)
(PARTITION p0 ENGINE=Memory,
PARTITION p1 ENGINE=NonExistentEngine);
Warnings:
Warning 1286 Unknown table engine 'NonExistentEngine'
Warning 1286 Unknown storage engine 'NonExistentEngine'
ALTER TABLE t1 ENGINE=NonExistentEngine;
Warnings:
Warning 1286 Unknown table engine 'NonExistentEngine'
Warning 1286 Unknown storage engine 'NonExistentEngine'
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (

View file

@ -196,7 +196,7 @@ create table t1 (a int)
engine = x
partition by key (a);
Warnings:
Warning 1286 Unknown table engine 'x'
Warning 1286 Unknown storage engine 'x'
Warning 1266 Using storage engine MyISAM for table 't1'
show create table t1;
Table Create Table
@ -211,7 +211,7 @@ partition by list (a)
(partition p0 values in (0));
alter table t1 engine = x;
Warnings:
Warning 1286 Unknown table engine 'x'
Warning 1286 Unknown storage engine 'x'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (

View file

@ -5,9 +5,7 @@ SELECT @org_key_cache_buffer_size:= @@global.default.key_buffer_size;
@org_key_cache_buffer_size:= @@global.default.key_buffer_size
1048576
# Minimize default key cache (almost disabled).
SET @@global.default.key_buffer_size = 1;
Warnings:
Warning 1292 Truncated incorrect key_buffer_size value: '1'
SET @@global.default.key_buffer_size = 4096;
CREATE TABLE t1 (
a INT,
b INT,

View file

@ -1,6 +1,6 @@
CREATE TABLE t1(a int) ENGINE=EXAMPLE;
Warnings:
Warning 1286 Unknown table engine 'EXAMPLE'
Warning 1286 Unknown storage engine 'EXAMPLE'
Warning 1266 Using storage engine MyISAM for table 't1'
DROP TABLE t1;
INSTALL PLUGIN example SONAME 'ha_example.so';
@ -34,7 +34,7 @@ INSTALL PLUGIN example SONAME 'ha_example.so';
SET GLOBAL example_enum_var= e1;
SET GLOBAL example_enum_var= e2;
SET GLOBAL example_enum_var= impossible;
ERROR 42000: Variable 'enum_var' can't be set to the value of 'impossible'
ERROR 42000: Variable 'example_enum_var' can't be set to the value of 'impossible'
UNINSTALL PLUGIN example;
INSTALL PLUGIN example SONAME 'ha_example.so';
select @@session.sql_mode into @old_sql_mode;
@ -45,7 +45,7 @@ select @@global.example_ulong_var;
500
set global example_ulong_var=1111;
Warnings:
Warning 1292 Truncated incorrect ulong_var value: '1111'
Warning 1292 Truncated incorrect example_ulong_var value: '1111'
select @@global.example_ulong_var;
@@global.example_ulong_var
1000
@ -55,7 +55,7 @@ select @@global.example_ulong_var;
@@global.example_ulong_var
500
set global example_ulong_var=1111;
ERROR 42000: Variable 'ulong_var' can't be set to the value of '1111'
ERROR 42000: Variable 'example_ulong_var' can't be set to the value of '1111'
select @@global.example_ulong_var;
@@global.example_ulong_var
500

View file

@ -9,8 +9,6 @@ profiling_history_size 15
select @@profiling;
@@profiling
0
set global profiling = ON;
ERROR HY000: Variable 'profiling' is a SESSION variable and can't be used with SET GLOBAL
set @start_value= @@global.profiling_history_size;
set global profiling_history_size=100;
show global variables like 'profil%';

View file

@ -2585,10 +2585,10 @@ c3 8388607
c4 2147483647
c5 2147483647
c6 9223372036854775807
c7 9.22337e+18
c8 9.22337203685478e+18
c9 9.22337203685478e+18
c10 9.22337203685478e+18
c7 9.22337e18
c8 9.223372036854776e18
c9 9.223372036854776e18
c10 9.223372036854776e18
c12 9999.9999
execute my_delete ;
set @arg00= '9223372036854775807' ;
@ -2608,10 +2608,10 @@ c3 8388607
c4 2147483647
c5 2147483647
c6 9223372036854775807
c7 9.22337e+18
c8 9.22337203685478e+18
c9 9.22337203685478e+18
c10 9.22337203685478e+18
c7 9.22337e18
c8 9.223372036854776e18
c9 9.223372036854776e18
c10 9.223372036854776e18
c12 9999.9999
execute my_delete ;
set @arg00= -9223372036854775808 ;
@ -2631,10 +2631,10 @@ c3 -8388608
c4 -2147483648
c5 -2147483648
c6 -9223372036854775808
c7 -9.22337e+18
c8 -9.22337203685478e+18
c9 -9.22337203685478e+18
c10 -9.22337203685478e+18
c7 -9.22337e18
c8 -9.223372036854776e18
c9 -9.223372036854776e18
c10 -9.223372036854776e18
c12 -9999.9999
execute my_delete ;
set @arg00= '-9223372036854775808' ;
@ -2654,10 +2654,10 @@ c3 -8388608
c4 -2147483648
c5 -2147483648
c6 -9223372036854775808
c7 -9.22337e+18
c8 -9.22337203685478e+18
c9 -9.22337203685478e+18
c10 -9.22337203685478e+18
c7 -9.22337e18
c8 -9.223372036854776e18
c9 -9.223372036854776e18
c10 -9.223372036854776e18
c12 -9999.9999
execute my_delete ;
set @arg00= 1.11111111111111111111e+50 ;
@ -2679,10 +2679,10 @@ c3 8388607
c4 2147483647
c5 2147483647
c6 9223372036854775807
c7 3.40282e+38
c8 1.11111111111111e+50
c9 1.11111111111111e+50
c10 1.11111111111111e+50
c7 3.40282e38
c8 1.111111111111111e50
c9 1.111111111111111e50
c10 1.111111111111111e50
c12 9999.9999
execute my_delete ;
set @arg00= '1.11111111111111111111e+50' ;
@ -2704,10 +2704,10 @@ c3 8388607
c4 2147483647
c5 2147483647
c6 9223372036854775807
c7 3.40282e+38
c8 1.11111111111111e+50
c9 1.11111111111111e+50
c10 1.11111111111111e+50
c7 3.40282e38
c8 1.111111111111111e50
c9 1.111111111111111e50
c10 1.111111111111111e50
c12 9999.9999
execute my_delete ;
set @arg00= -1.11111111111111111111e+50 ;
@ -2729,10 +2729,10 @@ c3 -8388608
c4 -2147483648
c5 -2147483648
c6 -9223372036854775808
c7 -3.40282e+38
c8 -1.11111111111111e+50
c9 -1.11111111111111e+50
c10 -1.11111111111111e+50
c7 -3.40282e38
c8 -1.111111111111111e50
c9 -1.111111111111111e50
c10 -1.111111111111111e50
c12 -9999.9999
execute my_delete ;
set @arg00= '-1.11111111111111111111e+50' ;
@ -2754,10 +2754,10 @@ c3 -8388608
c4 -2147483648
c5 -2147483648
c6 -9223372036854775808
c7 -3.40282e+38
c8 -1.11111111111111e+50
c9 -1.11111111111111e+50
c10 -1.11111111111111e+50
c7 -3.40282e38
c8 -1.111111111111111e50
c9 -1.111111111111111e50
c10 -1.111111111111111e50
c12 -9999.9999
execute my_delete ;
test_sequence
@ -2822,10 +2822,10 @@ c1 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30
51 5 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0
52 5 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0
53 5 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0
54 5 54 54 54.00 54.00 54.00 54.00 54.00 54.00 54.00 54.00
55 5 55 55 55 55 55 55 55 55 55 55
56 6 56 56 56.00 56.00 56.00 56.00 56.00 56.00 56.00 56.00
57 6 57 57 57.00 57.00 57.00 57.00 57.00 57.00 57.00 57.00
54 5 54 54 54 54 54 54 54 54 54 54
55 6 55 55 55 55 55 55 55 55 55 55
56 6 56 56 56 56 56 56 56 56 56 56
57 6 57 57 57 57 57 57 57 57 57 57
60 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
61 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
62 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
@ -3039,7 +3039,7 @@ c1 c13 c14 c15 c16 c17
42 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
43 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
50 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
51 2010-00-00 2010-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
51 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
52 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
53 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
60 NULL NULL 1991-01-01 01:01:01 NULL NULL

View file

@ -2568,10 +2568,10 @@ c3 8388607
c4 2147483647
c5 2147483647
c6 9223372036854775807
c7 9.22337e+18
c8 9.22337203685478e+18
c9 9.22337203685478e+18
c10 9.22337203685478e+18
c7 9.22337e18
c8 9.223372036854776e18
c9 9.223372036854776e18
c10 9.223372036854776e18
c12 9999.9999
execute my_delete ;
set @arg00= '9223372036854775807' ;
@ -2591,10 +2591,10 @@ c3 8388607
c4 2147483647
c5 2147483647
c6 9223372036854775807
c7 9.22337e+18
c8 9.22337203685478e+18
c9 9.22337203685478e+18
c10 9.22337203685478e+18
c7 9.22337e18
c8 9.223372036854776e18
c9 9.223372036854776e18
c10 9.223372036854776e18
c12 9999.9999
execute my_delete ;
set @arg00= -9223372036854775808 ;
@ -2614,10 +2614,10 @@ c3 -8388608
c4 -2147483648
c5 -2147483648
c6 -9223372036854775808
c7 -9.22337e+18
c8 -9.22337203685478e+18
c9 -9.22337203685478e+18
c10 -9.22337203685478e+18
c7 -9.22337e18
c8 -9.223372036854776e18
c9 -9.223372036854776e18
c10 -9.223372036854776e18
c12 -9999.9999
execute my_delete ;
set @arg00= '-9223372036854775808' ;
@ -2637,10 +2637,10 @@ c3 -8388608
c4 -2147483648
c5 -2147483648
c6 -9223372036854775808
c7 -9.22337e+18
c8 -9.22337203685478e+18
c9 -9.22337203685478e+18
c10 -9.22337203685478e+18
c7 -9.22337e18
c8 -9.223372036854776e18
c9 -9.223372036854776e18
c10 -9.223372036854776e18
c12 -9999.9999
execute my_delete ;
set @arg00= 1.11111111111111111111e+50 ;
@ -2662,10 +2662,10 @@ c3 8388607
c4 2147483647
c5 2147483647
c6 9223372036854775807
c7 3.40282e+38
c8 1.11111111111111e+50
c9 1.11111111111111e+50
c10 1.11111111111111e+50
c7 3.40282e38
c8 1.111111111111111e50
c9 1.111111111111111e50
c10 1.111111111111111e50
c12 9999.9999
execute my_delete ;
set @arg00= '1.11111111111111111111e+50' ;
@ -2687,10 +2687,10 @@ c3 8388607
c4 2147483647
c5 2147483647
c6 9223372036854775807
c7 3.40282e+38
c8 1.11111111111111e+50
c9 1.11111111111111e+50
c10 1.11111111111111e+50
c7 3.40282e38
c8 1.111111111111111e50
c9 1.111111111111111e50
c10 1.111111111111111e50
c12 9999.9999
execute my_delete ;
set @arg00= -1.11111111111111111111e+50 ;
@ -2712,10 +2712,10 @@ c3 -8388608
c4 -2147483648
c5 -2147483648
c6 -9223372036854775808
c7 -3.40282e+38
c8 -1.11111111111111e+50
c9 -1.11111111111111e+50
c10 -1.11111111111111e+50
c7 -3.40282e38
c8 -1.111111111111111e50
c9 -1.111111111111111e50
c10 -1.111111111111111e50
c12 -9999.9999
execute my_delete ;
set @arg00= '-1.11111111111111111111e+50' ;
@ -2737,10 +2737,10 @@ c3 -8388608
c4 -2147483648
c5 -2147483648
c6 -9223372036854775808
c7 -3.40282e+38
c8 -1.11111111111111e+50
c9 -1.11111111111111e+50
c10 -1.11111111111111e+50
c7 -3.40282e38
c8 -1.111111111111111e50
c9 -1.111111111111111e50
c10 -1.111111111111111e50
c12 -9999.9999
execute my_delete ;
test_sequence
@ -2805,10 +2805,10 @@ c1 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30
51 5 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0
52 5 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0
53 5 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0
54 5 54 54 54.00 54.00 54.00 54.00 54.00 54.00 54.00 54.00
55 5 55 55 55 55 55 55 55 55 55 55
56 6 56 56 56.00 56.00 56.00 56.00 56.00 56.00 56.00 56.00
57 6 57 57 57.00 57.00 57.00 57.00 57.00 57.00 57.00 57.00
54 5 54 54 54 54 54 54 54 54 54 54
55 6 55 55 55 55 55 55 55 55 55 55
56 6 56 56 56 56 56 56 56 56 56 56
57 6 57 57 57 57 57 57 57 57 57 57
60 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
61 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
62 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
@ -3022,7 +3022,7 @@ c1 c13 c14 c15 c16 c17
42 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
43 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
50 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
51 2010-00-00 2010-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
51 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
52 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
53 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
60 NULL NULL 1991-01-01 01:01:01 NULL NULL

View file

@ -2569,10 +2569,10 @@ c3 8388607
c4 2147483647
c5 2147483647
c6 9223372036854775807
c7 9.22337e+18
c8 9.22337203685478e+18
c9 9.22337203685478e+18
c10 9.22337203685478e+18
c7 9.22337e18
c8 9.223372036854776e18
c9 9.223372036854776e18
c10 9.223372036854776e18
c12 9999.9999
execute my_delete ;
set @arg00= '9223372036854775807' ;
@ -2592,10 +2592,10 @@ c3 8388607
c4 2147483647
c5 2147483647
c6 9223372036854775807
c7 9.22337e+18
c8 9.22337203685478e+18
c9 9.22337203685478e+18
c10 9.22337203685478e+18
c7 9.22337e18
c8 9.223372036854776e18
c9 9.223372036854776e18
c10 9.223372036854776e18
c12 9999.9999
execute my_delete ;
set @arg00= -9223372036854775808 ;
@ -2615,10 +2615,10 @@ c3 -8388608
c4 -2147483648
c5 -2147483648
c6 -9223372036854775808
c7 -9.22337e+18
c8 -9.22337203685478e+18
c9 -9.22337203685478e+18
c10 -9.22337203685478e+18
c7 -9.22337e18
c8 -9.223372036854776e18
c9 -9.223372036854776e18
c10 -9.223372036854776e18
c12 -9999.9999
execute my_delete ;
set @arg00= '-9223372036854775808' ;
@ -2638,10 +2638,10 @@ c3 -8388608
c4 -2147483648
c5 -2147483648
c6 -9223372036854775808
c7 -9.22337e+18
c8 -9.22337203685478e+18
c9 -9.22337203685478e+18
c10 -9.22337203685478e+18
c7 -9.22337e18
c8 -9.223372036854776e18
c9 -9.223372036854776e18
c10 -9.223372036854776e18
c12 -9999.9999
execute my_delete ;
set @arg00= 1.11111111111111111111e+50 ;
@ -2663,10 +2663,10 @@ c3 8388607
c4 2147483647
c5 2147483647
c6 9223372036854775807
c7 3.40282e+38
c8 1.11111111111111e+50
c9 1.11111111111111e+50
c10 1.11111111111111e+50
c7 3.40282e38
c8 1.111111111111111e50
c9 1.111111111111111e50
c10 1.111111111111111e50
c12 9999.9999
execute my_delete ;
set @arg00= '1.11111111111111111111e+50' ;
@ -2688,10 +2688,10 @@ c3 8388607
c4 2147483647
c5 2147483647
c6 9223372036854775807
c7 3.40282e+38
c8 1.11111111111111e+50
c9 1.11111111111111e+50
c10 1.11111111111111e+50
c7 3.40282e38
c8 1.111111111111111e50
c9 1.111111111111111e50
c10 1.111111111111111e50
c12 9999.9999
execute my_delete ;
set @arg00= -1.11111111111111111111e+50 ;
@ -2713,10 +2713,10 @@ c3 -8388608
c4 -2147483648
c5 -2147483648
c6 -9223372036854775808
c7 -3.40282e+38
c8 -1.11111111111111e+50
c9 -1.11111111111111e+50
c10 -1.11111111111111e+50
c7 -3.40282e38
c8 -1.111111111111111e50
c9 -1.111111111111111e50
c10 -1.111111111111111e50
c12 -9999.9999
execute my_delete ;
set @arg00= '-1.11111111111111111111e+50' ;
@ -2738,10 +2738,10 @@ c3 -8388608
c4 -2147483648
c5 -2147483648
c6 -9223372036854775808
c7 -3.40282e+38
c8 -1.11111111111111e+50
c9 -1.11111111111111e+50
c10 -1.11111111111111e+50
c7 -3.40282e38
c8 -1.111111111111111e50
c9 -1.111111111111111e50
c10 -1.111111111111111e50
c12 -9999.9999
execute my_delete ;
test_sequence
@ -2807,7 +2807,7 @@ c1 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30
52 5 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0
53 5 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0
54 5 54 54 54 54 54 54 54 54 54 54
55 5 55 55 55 55 55 55 55 55 55 55
55 6 55 55 55 55 55 55 55 55 55 55
56 6 56 56 56 56 56 56 56 56 56 56
57 6 57 57 57 57 57 57 57 57 57 57
60 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
@ -3023,7 +3023,7 @@ c1 c13 c14 c15 c16 c17
42 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
43 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
50 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
51 2010-00-00 2010-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
51 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
52 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
53 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
60 NULL NULL 1991-01-01 01:01:01 NULL NULL

View file

@ -2505,10 +2505,10 @@ c3 8388607
c4 2147483647
c5 2147483647
c6 9223372036854775807
c7 9.22337e+18
c8 9.22337203685478e+18
c9 9.22337203685478e+18
c10 9.22337203685478e+18
c7 9.22337e18
c8 9.223372036854776e18
c9 9.223372036854776e18
c10 9.223372036854776e18
c12 9999.9999
execute my_delete ;
set @arg00= '9223372036854775807' ;
@ -2528,10 +2528,10 @@ c3 8388607
c4 2147483647
c5 2147483647
c6 9223372036854775807
c7 9.22337e+18
c8 9.22337203685478e+18
c9 9.22337203685478e+18
c10 9.22337203685478e+18
c7 9.22337e18
c8 9.223372036854776e18
c9 9.223372036854776e18
c10 9.223372036854776e18
c12 9999.9999
execute my_delete ;
set @arg00= -9223372036854775808 ;
@ -2551,10 +2551,10 @@ c3 -8388608
c4 -2147483648
c5 -2147483648
c6 -9223372036854775808
c7 -9.22337e+18
c8 -9.22337203685478e+18
c9 -9.22337203685478e+18
c10 -9.22337203685478e+18
c7 -9.22337e18
c8 -9.223372036854776e18
c9 -9.223372036854776e18
c10 -9.223372036854776e18
c12 -9999.9999
execute my_delete ;
set @arg00= '-9223372036854775808' ;
@ -2574,10 +2574,10 @@ c3 -8388608
c4 -2147483648
c5 -2147483648
c6 -9223372036854775808
c7 -9.22337e+18
c8 -9.22337203685478e+18
c9 -9.22337203685478e+18
c10 -9.22337203685478e+18
c7 -9.22337e18
c8 -9.223372036854776e18
c9 -9.223372036854776e18
c10 -9.223372036854776e18
c12 -9999.9999
execute my_delete ;
set @arg00= 1.11111111111111111111e+50 ;
@ -2599,10 +2599,10 @@ c3 8388607
c4 2147483647
c5 2147483647
c6 9223372036854775807
c7 3.40282e+38
c8 1.11111111111111e+50
c9 1.11111111111111e+50
c10 1.11111111111111e+50
c7 3.40282e38
c8 1.111111111111111e50
c9 1.111111111111111e50
c10 1.111111111111111e50
c12 9999.9999
execute my_delete ;
set @arg00= '1.11111111111111111111e+50' ;
@ -2624,10 +2624,10 @@ c3 8388607
c4 2147483647
c5 2147483647
c6 9223372036854775807
c7 3.40282e+38
c8 1.11111111111111e+50
c9 1.11111111111111e+50
c10 1.11111111111111e+50
c7 3.40282e38
c8 1.111111111111111e50
c9 1.111111111111111e50
c10 1.111111111111111e50
c12 9999.9999
execute my_delete ;
set @arg00= -1.11111111111111111111e+50 ;
@ -2649,10 +2649,10 @@ c3 -8388608
c4 -2147483648
c5 -2147483648
c6 -9223372036854775808
c7 -3.40282e+38
c8 -1.11111111111111e+50
c9 -1.11111111111111e+50
c10 -1.11111111111111e+50
c7 -3.40282e38
c8 -1.111111111111111e50
c9 -1.111111111111111e50
c10 -1.111111111111111e50
c12 -9999.9999
execute my_delete ;
set @arg00= '-1.11111111111111111111e+50' ;
@ -2674,10 +2674,10 @@ c3 -8388608
c4 -2147483648
c5 -2147483648
c6 -9223372036854775808
c7 -3.40282e+38
c8 -1.11111111111111e+50
c9 -1.11111111111111e+50
c10 -1.11111111111111e+50
c7 -3.40282e38
c8 -1.111111111111111e50
c9 -1.111111111111111e50
c10 -1.111111111111111e50
c12 -9999.9999
execute my_delete ;
test_sequence
@ -2742,10 +2742,10 @@ c1 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30
51 5 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0
52 5 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0
53 5 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0
54 5 54 54 54.00 54.00 54.00 54.00 54.00 54.00 54.00 54.00
55 5 55 55 55 55 55 55 55 55 55 55
56 6 56 56 56.00 56.00 56.00 56.00 56.00 56.00 56.00 56.00
57 6 57 57 57.00 57.00 57.00 57.00 57.00 57.00 57.00 57.00
54 5 54 54 54 54 54 54 54 54 54 54
55 6 55 55 55 55 55 55 55 55 55 55
56 6 56 56 56 56 56 56 56 56 56 56
57 6 57 57 57 57 57 57 57 57 57 57
60 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
61 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
62 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
@ -2959,7 +2959,7 @@ c1 c13 c14 c15 c16 c17
42 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
43 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
50 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
51 2010-00-00 2010-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
51 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
52 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
53 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
60 NULL NULL 1991-01-01 01:01:01 NULL NULL
@ -5527,10 +5527,10 @@ c3 8388607
c4 2147483647
c5 2147483647
c6 9223372036854775807
c7 9.22337e+18
c8 9.22337203685478e+18
c9 9.22337203685478e+18
c10 9.22337203685478e+18
c7 9.22337e18
c8 9.223372036854776e18
c9 9.223372036854776e18
c10 9.223372036854776e18
c12 9999.9999
execute my_delete ;
set @arg00= '9223372036854775807' ;
@ -5550,10 +5550,10 @@ c3 8388607
c4 2147483647
c5 2147483647
c6 9223372036854775807
c7 9.22337e+18
c8 9.22337203685478e+18
c9 9.22337203685478e+18
c10 9.22337203685478e+18
c7 9.22337e18
c8 9.223372036854776e18
c9 9.223372036854776e18
c10 9.223372036854776e18
c12 9999.9999
execute my_delete ;
set @arg00= -9223372036854775808 ;
@ -5573,10 +5573,10 @@ c3 -8388608
c4 -2147483648
c5 -2147483648
c6 -9223372036854775808
c7 -9.22337e+18
c8 -9.22337203685478e+18
c9 -9.22337203685478e+18
c10 -9.22337203685478e+18
c7 -9.22337e18
c8 -9.223372036854776e18
c9 -9.223372036854776e18
c10 -9.223372036854776e18
c12 -9999.9999
execute my_delete ;
set @arg00= '-9223372036854775808' ;
@ -5596,10 +5596,10 @@ c3 -8388608
c4 -2147483648
c5 -2147483648
c6 -9223372036854775808
c7 -9.22337e+18
c8 -9.22337203685478e+18
c9 -9.22337203685478e+18
c10 -9.22337203685478e+18
c7 -9.22337e18
c8 -9.223372036854776e18
c9 -9.223372036854776e18
c10 -9.223372036854776e18
c12 -9999.9999
execute my_delete ;
set @arg00= 1.11111111111111111111e+50 ;
@ -5621,10 +5621,10 @@ c3 8388607
c4 2147483647
c5 2147483647
c6 9223372036854775807
c7 3.40282e+38
c8 1.11111111111111e+50
c9 1.11111111111111e+50
c10 1.11111111111111e+50
c7 3.40282e38
c8 1.111111111111111e50
c9 1.111111111111111e50
c10 1.111111111111111e50
c12 9999.9999
execute my_delete ;
set @arg00= '1.11111111111111111111e+50' ;
@ -5646,10 +5646,10 @@ c3 8388607
c4 2147483647
c5 2147483647
c6 9223372036854775807
c7 3.40282e+38
c8 1.11111111111111e+50
c9 1.11111111111111e+50
c10 1.11111111111111e+50
c7 3.40282e38
c8 1.111111111111111e50
c9 1.111111111111111e50
c10 1.111111111111111e50
c12 9999.9999
execute my_delete ;
set @arg00= -1.11111111111111111111e+50 ;
@ -5671,10 +5671,10 @@ c3 -8388608
c4 -2147483648
c5 -2147483648
c6 -9223372036854775808
c7 -3.40282e+38
c8 -1.11111111111111e+50
c9 -1.11111111111111e+50
c10 -1.11111111111111e+50
c7 -3.40282e38
c8 -1.111111111111111e50
c9 -1.111111111111111e50
c10 -1.111111111111111e50
c12 -9999.9999
execute my_delete ;
set @arg00= '-1.11111111111111111111e+50' ;
@ -5696,10 +5696,10 @@ c3 -8388608
c4 -2147483648
c5 -2147483648
c6 -9223372036854775808
c7 -3.40282e+38
c8 -1.11111111111111e+50
c9 -1.11111111111111e+50
c10 -1.11111111111111e+50
c7 -3.40282e38
c8 -1.111111111111111e50
c9 -1.111111111111111e50
c10 -1.111111111111111e50
c12 -9999.9999
execute my_delete ;
test_sequence
@ -5764,10 +5764,10 @@ c1 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30
51 5 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0
52 5 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0
53 5 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0
54 5 54 54 54.00 54.00 54.00 54.00 54.00 54.00 54.00 54.00
55 5 55 55 55 55 55 55 55 55 55 55
56 6 56 56 56.00 56.00 56.00 56.00 56.00 56.00 56.00 56.00
57 6 57 57 57.00 57.00 57.00 57.00 57.00 57.00 57.00 57.00
54 5 54 54 54 54 54 54 54 54 54 54
55 6 55 55 55 55 55 55 55 55 55 55
56 6 56 56 56 56 56 56 56 56 56 56
57 6 57 57 57 57 57 57 57 57 57 57
60 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
61 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
62 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
@ -5981,7 +5981,7 @@ c1 c13 c14 c15 c16 c17
42 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
43 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
50 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
51 2010-00-00 2010-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
51 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
52 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
53 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000
60 NULL NULL 1991-01-01 01:01:01 NULL NULL

View file

@ -508,6 +508,8 @@ AAA
drop table t1;
create table t1 (a int);
set GLOBAL query_cache_size=1000;
Warnings:
Warning 1292 Truncated incorrect query_cache_size value: '1000'
show global variables like "query_cache_size";
Variable_name Value
query_cache_size 0
@ -1342,9 +1344,9 @@ set global query_cache_size=0;
create table t1 (a int);
insert into t1 values (1),(2),(3);
set GLOBAL query_cache_type=1;
set GLOBAL query_cache_limit=10000;
set GLOBAL query_cache_limit=10240;
set GLOBAL query_cache_min_res_unit=0;
set GLOBAL query_cache_size= 100000;
set GLOBAL query_cache_size= 102400;
reset query cache;
set LOCAL default_week_format = 0;
select week('2007-01-04');
@ -1434,7 +1436,7 @@ set GLOBAL query_cache_type=default;
set GLOBAL query_cache_limit=default;
set GLOBAL query_cache_min_res_unit=default;
set GLOBAL query_cache_size= default;
set GLOBAL query_cache_size=1000000;
set GLOBAL query_cache_size=1024000;
create table t1 (a char);
insert into t1 values ('c');
a
@ -1562,7 +1564,7 @@ SET GLOBAL query_cache_size= default;
#
# Bug#25132 disabled query cache: Qcache_free_blocks = 1
#
set global query_cache_size=100000;
set global query_cache_size=102400;
set global query_cache_size=0;
set global query_cache_type=0;
show status like 'Qcache_free_blocks';
@ -1581,7 +1583,7 @@ CREATE TABLE t1 (c1 INT NOT NULL) ENGINE=MyISAM;
INSERT INTO t1 (c1) VALUES (1), (2);
SHOW GLOBAL VARIABLES LIKE 'concurrent_insert';
Variable_name Value
concurrent_insert 0
concurrent_insert NEVER
SHOW STATUS LIKE 'Qcache_hits';
Variable_name Value
Qcache_hits 0

View file

@ -1,7 +1,7 @@
---- establish connection con1 (root) ----
---- switch to connection default ----
set @initial_query_cache_size = @@global.query_cache_size;
set @@global.query_cache_size=100000;
set @@global.query_cache_size=102400;
flush status;
drop table if exists t1;
create table t1(c1 int);
@ -211,7 +211,7 @@ show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 16
---- switch to connection default ----
set global query_cache_size=100000;
set global query_cache_size=102400;
execute stmt1;
c1
10
@ -297,7 +297,7 @@ prepare stmt1 from "select * from t1 where c1=10";
---- switch to connection con1 ----
prepare stmt3 from "select * from t1 where c1=10";
---- switch to connection default ----
set global query_cache_size=100000;
set global query_cache_size=102400;
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 21
@ -344,7 +344,7 @@ Qcache_hits 21
---- switch to connection default ----
set global query_cache_size=0;
prepare stmt1 from "select * from t1 where c1=?";
set global query_cache_size=100000;
set global query_cache_size=102400;
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 21
@ -548,7 +548,7 @@ alter table t1 add column b int;
execute stmt;
a
Pack my box with five dozen liquor jugs.
set @@global.query_cache_size=100000;
set @@global.query_cache_size=102400;
execute stmt;
a
Pack my box with five dozen liquor jugs.

View file

@ -1,7 +1,7 @@
---- establish connection con1 (root) ----
---- switch to connection default ----
set @initial_query_cache_size = @@global.query_cache_size;
set @@global.query_cache_size=100000;
set @@global.query_cache_size=102400;
flush status;
drop table if exists t1;
create table t1(c1 int);
@ -211,7 +211,7 @@ show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 14
---- switch to connection default ----
set global query_cache_size=100000;
set global query_cache_size=102400;
execute stmt1;
c1
10
@ -297,7 +297,7 @@ prepare stmt1 from "select * from t1 where c1=10";
---- switch to connection con1 ----
prepare stmt3 from "select * from t1 where c1=10";
---- switch to connection default ----
set global query_cache_size=100000;
set global query_cache_size=102400;
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 19
@ -344,7 +344,7 @@ Qcache_hits 19
---- switch to connection default ----
set global query_cache_size=0;
prepare stmt1 from "select * from t1 where c1=?";
set global query_cache_size=100000;
set global query_cache_size=102400;
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 19
@ -548,7 +548,7 @@ alter table t1 add column b int;
execute stmt;
a
Pack my box with five dozen liquor jugs.
set @@global.query_cache_size=100000;
set @@global.query_cache_size=102400;
execute stmt;
a
Pack my box with five dozen liquor jugs.

View file

@ -2784,26 +2784,26 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
select max(key1) from t1 where key1 <= 0.6158;
max(key1)
0.615800023078918
0.6158000230789185
select max(key2) from t2 where key2 <= 1.6158;
max(key2)
1.61580002307892
1.6158000230789185
select min(key1) from t1 where key1 >= 0.3762;
min(key1)
0.376199990510941
0.37619999051094055
select min(key2) from t2 where key2 >= 1.3762;
min(key2)
1.37619996070862
1.3761999607086182
select max(key1), min(key2) from t1, t2
where key1 <= 0.6158 and key2 >= 1.3762;
max(key1) min(key2)
0.615800023078918 1.37619996070862
0.6158000230789185 1.3761999607086182
select max(key1) from t1 where key1 <= 0.6158 and rand() + 0.5 >= 0.5;
max(key1)
0.615800023078918
0.6158000230789185
select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5;
min(key1)
0.376199990510941
0.37619999051094055
DROP TABLE t1,t2;
CREATE TABLE t1 (i BIGINT UNSIGNED NOT NULL);
INSERT INTO t1 VALUES (10);

View file

@ -1,5 +1,5 @@
drop table if exists t1;
SET SQL_SAFE_UPDATES=1,SQL_SELECT_LIMIT=4, SQL_MAX_JOIN_SIZE=9;
SET SQL_SAFE_UPDATES=1,SQL_SELECT_LIMIT=4, MAX_JOIN_SIZE=9;
create table t1 (a int auto_increment primary key, b char(20));
insert into t1 values(1,"test");
SELECT SQL_BUFFER_RESULT * from t1;
@ -90,4 +90,4 @@ set local max_join_size=1;
select * from (select 1 union select 2 union select 3) x;
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
drop table t1;
SET SQL_SAFE_UPDATES=0,SQL_SELECT_LIMIT=DEFAULT, SQL_MAX_JOIN_SIZE=DEFAULT;
SET SQL_SAFE_UPDATES=0,SQL_SELECT_LIMIT=DEFAULT, MAX_JOIN_SIZE=DEFAULT;

View file

@ -1298,13 +1298,13 @@ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_par
drop table `mysqlttest\1`.`a\b`;
drop database `mysqlttest\1`;
show engine foobar status;
ERROR 42000: Unknown table engine 'foobar'
ERROR 42000: Unknown storage engine 'foobar'
show engine foobar logs;
ERROR 42000: Unknown table engine 'foobar'
ERROR 42000: Unknown storage engine 'foobar'
show engine foobar mutex;
ERROR 42000: Unknown table engine 'foobar'
ERROR 42000: Unknown storage engine 'foobar'
show engine mutex status;
ERROR 42000: Unknown table engine 'mutex'
ERROR 42000: Unknown storage engine 'mutex'
show engine csv status;
Type Name Status
show engine csv logs;

View file

@ -579,7 +579,7 @@ return 2.7182818284590452354|
set @e = e()|
select e(), @e|
e() @e
2.71828182845905 2.71828182845905
2.718281828459045 2.718281828459045
drop function if exists inc|
create function inc(i int) returns int
return i+1|
@ -616,23 +616,23 @@ create function fun(d double, i int, u int unsigned) returns double
return mul(inc(i), fac(u)) / e()|
select fun(2.3, 3, 5)|
fun(2.3, 3, 5)
176.582131762292
176.58213176229233
insert into t2 values (append("xxx", "yyy"), mul(4,3), e())|
insert into t2 values (append("a", "b"), mul(2,mul(3,4)), fun(1.7, 4, 6))|
select * from t2 where s = append("a", "b")|
s i d
ab 24 1324.36598821719
ab 24 1324.3659882171924
select * from t2 where i = mul(4,3) or i = mul(mul(3,4),2) order by i|
s i d
xxxyyy 12 2.71828182845905
ab 24 1324.36598821719
xxxyyy 12 2.718281828459045
ab 24 1324.3659882171924
select * from t2 where d = e()|
s i d
xxxyyy 12 2.71828182845905
xxxyyy 12 2.718281828459045
select * from t2 order by i|
s i d
xxxyyy 12 2.71828182845905
ab 24 1324.36598821719
xxxyyy 12 2.718281828459045
ab 24 1324.3659882171924
delete from t2|
drop function e|
drop function inc|
@ -3030,7 +3030,7 @@ set @x = @x + 1;
return @x;
end|
set @qcs1 = @@query_cache_size|
set global query_cache_size = 100000|
set global query_cache_size = 102400|
set @x = 1|
insert into t1 values ("qc", 42)|
select bug9902() from t1|
@ -5972,9 +5972,9 @@ CREATE TABLE t3 (f1 INT, f2 FLOAT)|
INSERT INTO t3 VALUES (1, 3.4), (1, 2), (1, 0.9), (2, 8), (2, 7)|
SELECT SUM(f2), bug25373(f1) FROM t3 GROUP BY bug25373(f1) WITH ROLLUP|
SUM(f2) bug25373(f1)
6.30000007152557 1
6.300000071525574 1
15 2
21.3000000715256 NULL
21.300000071525574 NULL
DROP FUNCTION bug25373|
DROP TABLE t3|
DROP DATABASE IF EXISTS mysqltest1|
@ -6903,15 +6903,12 @@ DROP FUNCTION f1;
drop procedure if exists p;
set @old_mode= @@sql_mode;
set @@sql_mode= pow(2,32)-1;
set @@sql_mode= cast(pow(2,32)-1 as unsigned integer);
select @@sql_mode into @full_mode;
create procedure p() begin end;
call p();
select @@sql_mode;
@@sql_mode
REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,?,ONLY_FULL_GROUP_BY,NO_UNSIGNED_SUBTRACTION,NO_DIR_IN_CREATE,POSTGRESQL,ORACLE,MSSQL,DB2,MAXDB,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,MYSQL323,MYSQL40,ANSI,NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ALLOW_INVALID_DATES,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,HIGH_NOT_PRECEDENCE,NO_ENGINE_SUBSTITUTION,PAD_CHAR_TO_FULL_LENGTH
set @@sql_mode= @old_mode;
select replace(@full_mode, '?', 'NOT_USED') into @full_mode;
select replace(@full_mode, ',,,', ',NOT_USED,') into @full_mode;
select replace(@full_mode, 'ALLOW_INVALID_DATES', 'INVALID_DATES') into @full_mode;
select name from mysql.proc where name = 'p' and sql_mode = @full_mode;
name

View file

@ -873,14 +873,14 @@ Warning 1264 Out of range value for column 'col2' at row 1
SELECT * FROM t1;
col1 col2
-1.1e-37 0
3.4e+38 3.4e+38
3.4e38 3.4e38
-1.1e-37 0
3.4e+38 3.4e+38
3.4e38 3.4e38
0 NULL
2 NULL
NULL NULL
3.40282e+38 0
3.40282e+38 0
3.40282e38 0
3.40282e38 0
DROP TABLE t1;
CREATE TABLE t1 (col1 DOUBLE PRECISION, col2 DOUBLE PRECISION UNSIGNED);
INSERT INTO t1 VALUES (-2.2E-307,0),(2E-307,0),(+1.7E+308,+1.7E+308);
@ -922,14 +922,14 @@ SELECT * FROM t1;
col1 col2
-2.2e-307 0
1e-303 0
NULL 1.7e+308
NULL 1.7e308
-2.2e-307 0
-2e-307 0
NULL 1.7e+308
NULL 1.7e308
0 NULL
2 NULL
NULL NULL
1.79769313486232e+308 0
1.7976931348623157e308 0
DROP TABLE t1;
CREATE TABLE t1 (col1 CHAR(5), col2 VARCHAR(6));
INSERT INTO t1 VALUES ('hello', 'hello'),('he', 'he'),('hello ', 'hello ');

View file

@ -3669,8 +3669,6 @@ CREATE TABLE t1 (a int, b int auto_increment, PRIMARY KEY (b));
CREATE TABLE t2 (x int auto_increment, y int, z int,
PRIMARY KEY (x), FOREIGN KEY (y) REFERENCES t1 (b));
SET SESSION sort_buffer_size = 32 * 1024;
Warnings:
Warning 1292 Truncated incorrect sort_buffer_size value: '32768'
SELECT SQL_NO_CACHE COUNT(*)
FROM (SELECT a, b, (SELECT x FROM t2 WHERE y=b ORDER BY z DESC LIMIT 1) c
FROM t1) t;

View file

@ -796,6 +796,18 @@ SELECT ROUND(qty,3), dps, ROUND(qty,dps) FROM t1;
ROUND(qty,3) dps ROUND(qty,dps)
1.133 3 1.133000
DROP TABLE t1;
create table t1 (c1 decimal(10,6));
insert into t1 (c1) values (9.99e-4);
insert into t1 (c1) values (9.98e-4);
insert into t1 (c1) values (0.000999);
insert into t1 (c1) values (cast(9.99e-4 as decimal(10,6)));
select * from t1;
c1
0.000999
0.000998
0.000999
0.000999
drop table t1;
SELECT 1 % .123456789123456789123456789123456789123456789123456789123456789123456789123456789 AS '%';
%
0.012345687012345687012345687012345687012345687012345687012345687012345687000000000

View file

@ -2,9 +2,9 @@ drop table if exists t1,t2;
SELECT 10,10.0,10.,.1e+2,100.0e-1;
10 10.0 10. .1e+2 100.0e-1
10 10.0 10 10 10
SELECT 6e-05, -6e-05, --6e-05, -6e-05+1.000000;
6e-05 -6e-05 --6e-05 -6e-05+1.000000
6e-05 -6e-05 6e-05 0.99994
SELECT 6e-16, -6e-16, --6e-16, -6e-16+1.000000;
6e-16 -6e-16 --6e-16 -6e-16+1.000000
6e-16 -6e-16 6e-16 0.9999999999999994
SELECT 1e1,1.e1,1.0e1,1e+1,1.e+1,1.0e+1,1e-1,1.e-1,1.0e-1;
1e1 1.e1 1.0e1 1e+1 1.e+1 1.0e+1 1e-1 1.e-1 1.0e-1
10 10 10 10 10 10 0.1 0.1 0.1
@ -31,16 +31,16 @@ select * from t1;
f1 f2
10 10
100000 100000
1.23457e+09 1234567890
1e+10 10000000000
1e+15 1e+15
1e+20 1e+20
3.40282e+38 1e+50
3.40282e+38 1e+150
1234570000 1234567890
10000000000 10000000000
1e15 1e15
1e20 1e20
3.40282e38 1e50
3.40282e38 1e150
-10 -10
1e-05 1e-05
1e-10 1e-10
1e-15 1e-15
0.00001 0.00001
0.0000000001 0.0000000001
0.000000000000001 0.000000000000001
1e-20 1e-20
0 1e-50
0 1e-150
@ -87,7 +87,7 @@ col
create table t2 select c1 + c1 * (c2 / 100) as col1, round(c1, 5) as col2, round(c1, 35) as col3, sqrt(c1*1e-15) col4 from t1;
select * from t2;
col1 col2 col3 col4
140.36 121.00000 121 3.47850542618522e-07
140.36 121.00000 121 0.00000034785054261852176
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
@ -201,9 +201,9 @@ insert into t1 values (2e5),(2e6),(2e-4),(2e-5);
select * from t1;
c
200000
2e+06
2e6
0.0002
2e-05
2e-5
drop table t1;
CREATE TABLE t1 (
reckey int unsigned NOT NULL,
@ -267,7 +267,7 @@ select 1e-308, 1.00000001e-300, 100000000e-300;
1e-308 1.00000001e-300 1e-292
select 10e307;
10e307
1e+308
1e308
create table t1(a int, b double(8, 2));
insert into t1 values
(1, 28.50), (1, 121.85), (1, 157.23), (1, 1351.00), (1, -1965.35), (1, 81.75),
@ -369,12 +369,12 @@ Warning 1264 Out of range value for column 'f1' at row 1
Warning 1264 Out of range value for column 'f1' at row 2
select f1 + 0e0 from t1;
f1 + 0e0
1e+199
-1e+199
1e+200
-1e+200
1e+200
-1e+200
1e199
-1e199
1e200
-1e200
1e200
-1e200
drop table t1;
create table t1 (f1 float(30, 0));
insert into t1 values (1e29), (-1e29);
@ -385,12 +385,36 @@ Warning 1264 Out of range value for column 'f1' at row 1
Warning 1264 Out of range value for column 'f1' at row 2
select f1 + 0e0 from t1;
f1 + 0e0
1.00000001504747e+29
-1.00000001504747e+29
1.00000001504747e+30
-1.00000001504747e+30
1.00000001504747e+30
-1.00000001504747e+30
1.0000000150474662e29
-1.0000000150474662e29
1.0000000150474662e30
-1.0000000150474662e30
1.0000000150474662e30
-1.0000000150474662e30
drop table t1;
create table t1 (c char(6));
insert into t1 values (2e6),(2e-5);
select * from t1;
c
2e6
2e-5
drop table t1;
CREATE TABLE d1 (d DOUBLE);
INSERT INTO d1 VALUES (1.7976931348623157E+308);
SELECT * FROM d1;
d
1.7976931348623157e308
INSERT INTO d1 VALUES (1.79769313486232e+308);
ERROR 22007: Illegal double '1.79769313486232e+308' value found during parsing
SELECT * FROM d1;
d
1.7976931348623157e308
DROP TABLE d1;
create table t1 (a char(20));
insert into t1 values (1.225e-05);
select a+0 from t1;
a+0
0.00001225
drop table t1;
create table t1(d double, u bigint unsigned);
insert into t1(d) values (9.22337203685479e18),
@ -405,6 +429,6 @@ CREATE TABLE t1 (f1 DOUBLE);
INSERT INTO t1 VALUES(-1.79769313486231e+308);
SELECT f1 FROM t1;
f1
-1.79769313486231e+308
-1.79769313486231e308
DROP TABLE t1;
End of 5.0 tests

View file

@ -917,7 +917,7 @@ cast('1.00000001335143196001808973960578441619873046875E-10' as decimal(30,15))
0.000000000100000
select ln(14000) c1, convert(ln(14000),decimal(5,3)) c2, cast(ln(14000) as decimal(5,3)) c3;
c1 c2 c3
9.5468126085974 9.547 9.547
9.546812608597396 9.547 9.547
select convert(ln(14000),decimal(2,3)) c1;
ERROR 42000: For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column '').
select cast(ln(14000) as decimal(2,3)) c1;
@ -1141,17 +1141,17 @@ my_float my_double my_varchar
1.17549e-18 1.175494345e-18 1.175494345e-18
1.17549e-17 1.175494345e-17 1.175494345e-17
1.17549e-16 1.175494345e-16 1.175494345e-16
1.17549e-15 1.175494345e-15 1.175494345e-15
1.17549e-14 1.175494345e-14 1.175494345e-14
1.17549e-13 1.175494345e-13 1.175494345e-13
1.17549e-12 1.175494345e-12 1.175494345e-12
1.17549e-11 1.175494345e-11 1.175494345e-11
1.17549e-10 1.175494345e-10 1.175494345e-10
1.17549e-09 1.175494345e-09 1.175494345e-9
1.17549e-08 1.175494345e-08 1.175494345e-8
1.17549e-07 1.175494345e-07 1.175494345e-7
1.17549e-06 1.175494345e-06 1.175494345e-6
1.17549e-05 1.175494345e-05 1.175494345e-5
0.00000000000000117549 0.000000000000001175494345 1.175494345e-15
0.0000000000000117549 0.00000000000001175494345 1.175494345e-14
0.000000000000117549 0.0000000000001175494345 1.175494345e-13
0.00000000000117549 0.000000000001175494345 1.175494345e-12
0.0000000000117549 0.00000000001175494345 1.175494345e-11
0.000000000117549 0.0000000001175494345 1.175494345e-10
0.00000000117549 0.000000001175494345 1.175494345e-9
0.0000000117549 0.00000001175494345 1.175494345e-8
0.000000117549 0.0000001175494345 1.175494345e-7
0.00000117549 0.000001175494345 1.175494345e-6
0.0000117549 0.00001175494345 1.175494345e-5
0.000117549 0.0001175494345 1.175494345e-4
0.00117549 0.001175494345 1.175494345e-3
0.0117549 0.01175494345 1.175494345e-2
@ -1175,21 +1175,21 @@ CAST(my_float AS DECIMAL(65,30)) my_float
0.000000000000000001175494374380 1.17549e-18
0.000000000000000011754943743802 1.17549e-17
0.000000000000000117549432474939 1.17549e-16
0.000000000000001175494324749389 1.17549e-15
0.000000000000011754943671010360 1.17549e-14
0.000000000000117549429933840000 1.17549e-13
0.000000000001175494380653563000 1.17549e-12
0.000000000011754943372854760000 1.17549e-11
0.000000000117549428524377200000 1.17549e-10
0.000000001175494368510499000000 1.17549e-09
0.000000011754943685104990000000 1.17549e-08
0.000000117549433298336200000000 1.17549e-07
0.000001175494389826781000000000 1.17549e-06
0.000011754943443520460000000000 1.17549e-05
0.000000000000001175494324749389 0.00000000000000117549
0.000000000000011754943671010362 0.0000000000000117549
0.000000000000117549429933840040 0.000000000000117549
0.000000000001175494380653563400 0.00000000000117549
0.000000000011754943372854765000 0.0000000000117549
0.000000000117549428524377220000 0.000000000117549
0.000000001175494368510499000000 0.00000000117549
0.000000011754943685104990000000 0.0000000117549
0.000000117549433298336230000000 0.000000117549
0.000001175494389826781100000000 0.00000117549
0.000011754943443520460000000000 0.0000117549
0.000117549432616215200000000000 0.000117549
0.001175494398921728000000000000 0.00117549
0.011754943057894710000000000000 0.0117549
0.117549434304237400000000000000 0.117549
0.001175494398921728100000000000 0.00117549
0.011754943057894707000000000000 0.0117549
0.117549434304237370000000000000 0.117549
SELECT CAST(my_double AS DECIMAL(65,30)), my_double FROM t1;
CAST(my_double AS DECIMAL(65,30)) my_double
0.000000000000000000000000000000 1.175494345e-32
@ -1209,17 +1209,17 @@ CAST(my_double AS DECIMAL(65,30)) my_double
0.000000000000000001175494345000 1.175494345e-18
0.000000000000000011754943450000 1.175494345e-17
0.000000000000000117549434500000 1.175494345e-16
0.000000000000001175494345000000 1.175494345e-15
0.000000000000011754943450000000 1.175494345e-14
0.000000000000117549434500000000 1.175494345e-13
0.000000000001175494345000000000 1.175494345e-12
0.000000000011754943450000000000 1.175494345e-11
0.000000000117549434500000000000 1.175494345e-10
0.000000001175494345000000000000 1.175494345e-09
0.000000011754943450000000000000 1.175494345e-08
0.000000117549434500000000000000 1.175494345e-07
0.000001175494345000000000000000 1.175494345e-06
0.000011754943450000000000000000 1.175494345e-05
0.000000000000001175494345000000 0.000000000000001175494345
0.000000000000011754943450000000 0.00000000000001175494345
0.000000000000117549434500000000 0.0000000000001175494345
0.000000000001175494345000000000 0.000000000001175494345
0.000000000011754943450000000000 0.00000000001175494345
0.000000000117549434500000000000 0.0000000001175494345
0.000000001175494345000000000000 0.000000001175494345
0.000000011754943450000000000000 0.00000001175494345
0.000000117549434500000000000000 0.0000001175494345
0.000001175494345000000000000000 0.000001175494345
0.000011754943450000000000000000 0.00001175494345
0.000117549434500000000000000000 0.0001175494345
0.001175494345000000000000000000 0.001175494345
0.011754943450000000000000000000 0.01175494345
@ -1278,21 +1278,21 @@ my_decimal my_float
0.000000000000000001175494374380 1.17549e-18
0.000000000000000011754943743802 1.17549e-17
0.000000000000000117549432474939 1.17549e-16
0.000000000000001175494324749389 1.17549e-15
0.000000000000011754943671010360 1.17549e-14
0.000000000000117549429933840000 1.17549e-13
0.000000000001175494380653563000 1.17549e-12
0.000000000011754943372854760000 1.17549e-11
0.000000000117549428524377200000 1.17549e-10
0.000000001175494368510499000000 1.17549e-09
0.000000011754943685104990000000 1.17549e-08
0.000000117549433298336200000000 1.17549e-07
0.000001175494389826781000000000 1.17549e-06
0.000011754943443520460000000000 1.17549e-05
0.000000000000001175494324749389 0.00000000000000117549
0.000000000000011754943671010362 0.0000000000000117549
0.000000000000117549429933840040 0.000000000000117549
0.000000000001175494380653563400 0.00000000000117549
0.000000000011754943372854765000 0.0000000000117549
0.000000000117549428524377220000 0.000000000117549
0.000000001175494368510499000000 0.00000000117549
0.000000011754943685104990000000 0.0000000117549
0.000000117549433298336230000000 0.000000117549
0.000001175494389826781100000000 0.00000117549
0.000011754943443520460000000000 0.0000117549
0.000117549432616215200000000000 0.000117549
0.001175494398921728000000000000 0.00117549
0.011754943057894710000000000000 0.0117549
0.117549434304237400000000000000 0.117549
0.001175494398921728100000000000 0.00117549
0.011754943057894707000000000000 0.0117549
0.117549434304237370000000000000 0.117549
UPDATE t1 SET my_decimal = my_double;
SELECT my_decimal, my_double FROM t1;
my_decimal my_double
@ -1313,17 +1313,17 @@ my_decimal my_double
0.000000000000000001175494345000 1.175494345e-18
0.000000000000000011754943450000 1.175494345e-17
0.000000000000000117549434500000 1.175494345e-16
0.000000000000001175494345000000 1.175494345e-15
0.000000000000011754943450000000 1.175494345e-14
0.000000000000117549434500000000 1.175494345e-13
0.000000000001175494345000000000 1.175494345e-12
0.000000000011754943450000000000 1.175494345e-11
0.000000000117549434500000000000 1.175494345e-10
0.000000001175494345000000000000 1.175494345e-09
0.000000011754943450000000000000 1.175494345e-08
0.000000117549434500000000000000 1.175494345e-07
0.000001175494345000000000000000 1.175494345e-06
0.000011754943450000000000000000 1.175494345e-05
0.000000000000001175494345000000 0.000000000000001175494345
0.000000000000011754943450000000 0.00000000000001175494345
0.000000000000117549434500000000 0.0000000000001175494345
0.000000000001175494345000000000 0.000000000001175494345
0.000000000011754943450000000000 0.00000000001175494345
0.000000000117549434500000000000 0.0000000001175494345
0.000000001175494345000000000000 0.000000001175494345
0.000000011754943450000000000000 0.00000001175494345
0.000000117549434500000000000000 0.0000001175494345
0.000001175494345000000000000000 0.000001175494345
0.000011754943450000000000000000 0.00001175494345
0.000117549434500000000000000000 0.0001175494345
0.001175494345000000000000000000 0.001175494345
0.011754943450000000000000000000 0.01175494345

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