mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge tag 'mariadb-5.5.44' into 5.5-galera
This commit is contained in:
23
.gitattributes
vendored
23
.gitattributes
vendored
@ -1,3 +1,26 @@
|
|||||||
|
# Set the default behavior, in case people don't have core.autocrlf set.
|
||||||
|
* text=auto
|
||||||
|
|
||||||
|
# Explicitly declare text files you want to always be normalized and converted
|
||||||
|
# to native line endings on checkout.
|
||||||
|
*.c text
|
||||||
|
*.ic text
|
||||||
|
*.cc text
|
||||||
|
*.cpp text
|
||||||
|
*.h text
|
||||||
|
*.test text
|
||||||
|
|
||||||
|
# These files should be checked out as is
|
||||||
|
*.result -text -whitespace
|
||||||
|
*.dat -text -whitespace
|
||||||
|
|
||||||
|
# Denote all files that are truly binary and should not be modified.
|
||||||
|
*.png binary
|
||||||
|
*.jpg binary
|
||||||
|
*.frm binary
|
||||||
|
*.MYD binary
|
||||||
|
*.MYI binary
|
||||||
|
|
||||||
*.c diff=cpp
|
*.c diff=cpp
|
||||||
*.h diff=cpp
|
*.h diff=cpp
|
||||||
*.cc diff=cpp
|
*.cc diff=cpp
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -193,6 +193,7 @@ storage/tokudb/ft-index/tools/tokudb_dump
|
|||||||
storage/tokudb/ft-index/tools/tokudb_gen
|
storage/tokudb/ft-index/tools/tokudb_gen
|
||||||
storage/tokudb/ft-index/tools/tokudb_load
|
storage/tokudb/ft-index/tools/tokudb_load
|
||||||
storage/tokudb/ft-index/tools/tokuftdump
|
storage/tokudb/ft-index/tools/tokuftdump
|
||||||
|
storage/tokudb/ft-index/tools/tokuft_logprint
|
||||||
storage/tokudb/ft-index/ft/ftverify
|
storage/tokudb/ft-index/ft/ftverify
|
||||||
storage/tokudb/ft-index/ft/tdb-recover
|
storage/tokudb/ft-index/ft/tdb-recover
|
||||||
storage/tokudb/ft-index/ft/tdb_logprint
|
storage/tokudb/ft-index/ft/tdb_logprint
|
||||||
|
2
VERSION
2
VERSION
@ -1,4 +1,4 @@
|
|||||||
MYSQL_VERSION_MAJOR=5
|
MYSQL_VERSION_MAJOR=5
|
||||||
MYSQL_VERSION_MINOR=5
|
MYSQL_VERSION_MINOR=5
|
||||||
MYSQL_VERSION_PATCH=43
|
MYSQL_VERSION_PATCH=44
|
||||||
MYSQL_VERSION_EXTRA=
|
MYSQL_VERSION_EXTRA=
|
||||||
|
@ -53,6 +53,7 @@ static char *opt_password = 0, *current_user = 0,
|
|||||||
static char *opt_plugin_dir= 0, *opt_default_auth= 0;
|
static char *opt_plugin_dir= 0, *opt_default_auth= 0;
|
||||||
static int first_error = 0;
|
static int first_error = 0;
|
||||||
DYNAMIC_ARRAY tables4repair, tables4rebuild, alter_table_cmds;
|
DYNAMIC_ARRAY tables4repair, tables4rebuild, alter_table_cmds;
|
||||||
|
DYNAMIC_ARRAY views4repair;
|
||||||
static char *shared_memory_base_name=0;
|
static char *shared_memory_base_name=0;
|
||||||
static uint opt_protocol=0;
|
static uint opt_protocol=0;
|
||||||
|
|
||||||
@ -867,11 +868,19 @@ static int handle_request_for_tables(char *tables, size_t length, my_bool view)
|
|||||||
switch (what_to_do) {
|
switch (what_to_do) {
|
||||||
case DO_CHECK:
|
case DO_CHECK:
|
||||||
op = "CHECK";
|
op = "CHECK";
|
||||||
if (opt_quick) end = strmov(end, " QUICK");
|
if (view)
|
||||||
if (opt_fast) end = strmov(end, " FAST");
|
{
|
||||||
if (opt_medium_check) end = strmov(end, " MEDIUM"); /* Default */
|
if (opt_fast || opt_check_only_changed)
|
||||||
if (opt_extended) end = strmov(end, " EXTENDED");
|
DBUG_RETURN(0);
|
||||||
if (opt_check_only_changed) end = strmov(end, " CHANGED");
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (opt_quick) end = strmov(end, " QUICK");
|
||||||
|
if (opt_fast) end = strmov(end, " FAST");
|
||||||
|
if (opt_extended) end = strmov(end, " EXTENDED");
|
||||||
|
if (opt_medium_check) end = strmov(end, " MEDIUM"); /* Default */
|
||||||
|
if (opt_check_only_changed) end = strmov(end, " CHANGED");
|
||||||
|
}
|
||||||
if (opt_upgrade) end = strmov(end, " FOR UPGRADE");
|
if (opt_upgrade) end = strmov(end, " FOR UPGRADE");
|
||||||
break;
|
break;
|
||||||
case DO_REPAIR:
|
case DO_REPAIR:
|
||||||
@ -954,6 +963,7 @@ static void print_result()
|
|||||||
uint length_of_db;
|
uint length_of_db;
|
||||||
uint i;
|
uint i;
|
||||||
my_bool found_error=0, table_rebuild=0;
|
my_bool found_error=0, table_rebuild=0;
|
||||||
|
DYNAMIC_ARRAY *array4repair= &tables4repair;
|
||||||
DBUG_ENTER("print_result");
|
DBUG_ENTER("print_result");
|
||||||
|
|
||||||
res = mysql_use_result(sock);
|
res = mysql_use_result(sock);
|
||||||
@ -990,9 +1000,10 @@ static void print_result()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
char *table_name= prev + (length_of_db+1);
|
char *table_name= prev + (length_of_db+1);
|
||||||
insert_dynamic(&tables4repair, (uchar*) table_name);
|
insert_dynamic(array4repair, (uchar*) table_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
array4repair= &tables4repair;
|
||||||
found_error=0;
|
found_error=0;
|
||||||
table_rebuild=0;
|
table_rebuild=0;
|
||||||
prev_alter[0]= 0;
|
prev_alter[0]= 0;
|
||||||
@ -1008,8 +1019,11 @@ static void print_result()
|
|||||||
we have to run upgrade on it. In this case we write a nicer message
|
we have to run upgrade on it. In this case we write a nicer message
|
||||||
than "Please do "REPAIR TABLE""...
|
than "Please do "REPAIR TABLE""...
|
||||||
*/
|
*/
|
||||||
if (!strcmp(row[2],"error") && strstr(row[3],"REPAIR TABLE"))
|
if (!strcmp(row[2],"error") && strstr(row[3],"REPAIR "))
|
||||||
|
{
|
||||||
printf("%-50s %s", row[0], "Needs upgrade");
|
printf("%-50s %s", row[0], "Needs upgrade");
|
||||||
|
array4repair= strstr(row[3], "VIEW") ? &views4repair : &tables4repair;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
printf("%s\n%-9s: %s", row[0], row[2], row[3]);
|
printf("%s\n%-9s: %s", row[0], row[2], row[3]);
|
||||||
if (opt_auto_repair && strcmp(row[2],"note"))
|
if (opt_auto_repair && strcmp(row[2],"note"))
|
||||||
@ -1059,7 +1073,7 @@ static void print_result()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
char *table_name= prev + (length_of_db+1);
|
char *table_name= prev + (length_of_db+1);
|
||||||
insert_dynamic(&tables4repair, (uchar*) table_name);
|
insert_dynamic(array4repair, (uchar*) table_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mysql_free_result(res);
|
mysql_free_result(res);
|
||||||
@ -1171,6 +1185,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
if (opt_auto_repair &&
|
if (opt_auto_repair &&
|
||||||
(my_init_dynamic_array(&tables4repair, sizeof(char)*(NAME_LEN*2+2),16,64) ||
|
(my_init_dynamic_array(&tables4repair, sizeof(char)*(NAME_LEN*2+2),16,64) ||
|
||||||
|
my_init_dynamic_array(&views4repair, sizeof(char)*(NAME_LEN*2+2),16,64) ||
|
||||||
my_init_dynamic_array(&tables4rebuild, sizeof(char)*(NAME_LEN*2+2),16,64) ||
|
my_init_dynamic_array(&tables4rebuild, sizeof(char)*(NAME_LEN*2+2),16,64) ||
|
||||||
my_init_dynamic_array(&alter_table_cmds, MAX_ALTER_STR_SIZE, 0, 1)))
|
my_init_dynamic_array(&alter_table_cmds, MAX_ALTER_STR_SIZE, 0, 1)))
|
||||||
goto end;
|
goto end;
|
||||||
@ -1199,6 +1214,13 @@ int main(int argc, char **argv)
|
|||||||
rebuild_table((char*) dynamic_array_ptr(&tables4rebuild, i));
|
rebuild_table((char*) dynamic_array_ptr(&tables4rebuild, i));
|
||||||
for (i = 0; i < alter_table_cmds.elements ; i++)
|
for (i = 0; i < alter_table_cmds.elements ; i++)
|
||||||
run_query((char*) dynamic_array_ptr(&alter_table_cmds, i));
|
run_query((char*) dynamic_array_ptr(&alter_table_cmds, i));
|
||||||
|
if (!opt_silent && views4repair.elements)
|
||||||
|
puts("\nRepairing views");
|
||||||
|
for (i = 0; i < views4repair.elements ; i++)
|
||||||
|
{
|
||||||
|
char *name= (char*) dynamic_array_ptr(&views4repair, i);
|
||||||
|
handle_request_for_tables(name, fixed_name_length(name), TRUE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ret= test(first_error);
|
ret= test(first_error);
|
||||||
|
|
||||||
@ -1206,8 +1228,10 @@ int main(int argc, char **argv)
|
|||||||
dbDisconnect(current_host);
|
dbDisconnect(current_host);
|
||||||
if (opt_auto_repair)
|
if (opt_auto_repair)
|
||||||
{
|
{
|
||||||
|
delete_dynamic(&views4repair);
|
||||||
delete_dynamic(&tables4repair);
|
delete_dynamic(&tables4repair);
|
||||||
delete_dynamic(&tables4rebuild);
|
delete_dynamic(&tables4rebuild);
|
||||||
|
delete_dynamic(&alter_table_cmds);
|
||||||
}
|
}
|
||||||
end1:
|
end1:
|
||||||
my_free(opt_password);
|
my_free(opt_password);
|
||||||
|
@ -58,7 +58,7 @@ FOREACH(file ${ABI_HEADERS})
|
|||||||
|
|
||||||
EXECUTE_PROCESS(
|
EXECUTE_PROCESS(
|
||||||
COMMAND ${COMPILER}
|
COMMAND ${COMPILER}
|
||||||
-E -nostdinc -dI -DMYSQL_ABI_CHECK -I${SOURCE_DIR}/include
|
-E -nostdinc -DMYSQL_ABI_CHECK -I${SOURCE_DIR}/include
|
||||||
-I${BINARY_DIR}/include -I${SOURCE_DIR}/include/mysql -I${SOURCE_DIR}/sql
|
-I${BINARY_DIR}/include -I${SOURCE_DIR}/include/mysql -I${SOURCE_DIR}/sql
|
||||||
${file}
|
${file}
|
||||||
ERROR_QUIET OUTPUT_FILE ${tmpfile})
|
ERROR_QUIET OUTPUT_FILE ${tmpfile})
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2009, 2015, Oracle and/or its affiliates.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -60,9 +60,9 @@ IF(NOT GIT_EXECUTABLE)
|
|||||||
|
|
||||||
# Save bison output first.
|
# Save bison output first.
|
||||||
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql/sql_yacc.cc
|
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql/sql_yacc.cc
|
||||||
${CMAKE_BINARY_DIR}/sql_yacc.cc COPY_ONLY)
|
${CMAKE_BINARY_DIR}/sql_yacc.cc COPYONLY)
|
||||||
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql/sql_yacc.h
|
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql/sql_yacc.h
|
||||||
${CMAKE_BINARY_DIR}/sql_yacc.h COPY_ONLY)
|
${CMAKE_BINARY_DIR}/sql_yacc.h COPYONLY)
|
||||||
|
|
||||||
IF(CMAKE_GENERATOR MATCHES "Makefiles")
|
IF(CMAKE_GENERATOR MATCHES "Makefiles")
|
||||||
# make clean
|
# make clean
|
||||||
@ -74,9 +74,9 @@ IF(NOT GIT_EXECUTABLE)
|
|||||||
|
|
||||||
# Restore bison output
|
# Restore bison output
|
||||||
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql_yacc.cc
|
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql_yacc.cc
|
||||||
${CMAKE_BINARY_DIR}/sql/sql_yacc.cc COPY_ONLY)
|
${CMAKE_BINARY_DIR}/sql/sql_yacc.cc COPYONLY)
|
||||||
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql_yacc.h
|
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql_yacc.h
|
||||||
${CMAKE_BINARY_DIR}/sql/sql_yacc.h COPY_ONLY)
|
${CMAKE_BINARY_DIR}/sql/sql_yacc.h COPYONLY)
|
||||||
FILE(REMOVE ${CMAKE_BINARY_DIR}/sql_yacc.cc)
|
FILE(REMOVE ${CMAKE_BINARY_DIR}/sql_yacc.cc)
|
||||||
FILE(REMOVE ${CMAKE_BINARY_DIR}/sql_yacc.h)
|
FILE(REMOVE ${CMAKE_BINARY_DIR}/sql_yacc.h)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
@ -1,56 +1,56 @@
|
|||||||
# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
# the Free Software Foundation; version 2 of the License.
|
# the Free Software Foundation; version 2 of the License.
|
||||||
#
|
#
|
||||||
# This program is distributed in the hope that it will be useful,
|
# This program is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
# Add executable plus some additional MySQL specific stuff
|
# Add executable plus some additional MySQL specific stuff
|
||||||
# Usage (same as for standard CMake's ADD_EXECUTABLE)
|
# Usage (same as for standard CMake's ADD_EXECUTABLE)
|
||||||
#
|
#
|
||||||
# MYSQL_ADD_EXECUTABLE(target source1...sourceN)
|
# MYSQL_ADD_EXECUTABLE(target source1...sourceN)
|
||||||
#
|
#
|
||||||
# MySQL specifics:
|
# MySQL specifics:
|
||||||
# - instruct CPack to install executable under ${CMAKE_INSTALL_PREFIX}/bin directory
|
# - instruct CPack to install executable under ${CMAKE_INSTALL_PREFIX}/bin directory
|
||||||
# On Windows :
|
# On Windows :
|
||||||
# - add version resource
|
# - add version resource
|
||||||
# - instruct CPack to do autenticode signing if SIGNCODE is set
|
# - instruct CPack to do autenticode signing if SIGNCODE is set
|
||||||
|
|
||||||
INCLUDE(cmake_parse_arguments)
|
INCLUDE(cmake_parse_arguments)
|
||||||
|
|
||||||
FUNCTION (MYSQL_ADD_EXECUTABLE)
|
FUNCTION (MYSQL_ADD_EXECUTABLE)
|
||||||
# Pass-through arguments for ADD_EXECUTABLE
|
# Pass-through arguments for ADD_EXECUTABLE
|
||||||
MYSQL_PARSE_ARGUMENTS(ARG
|
MYSQL_PARSE_ARGUMENTS(ARG
|
||||||
"WIN32;MACOSX_BUNDLE;EXCLUDE_FROM_ALL;DESTINATION;COMPONENT"
|
"WIN32;MACOSX_BUNDLE;EXCLUDE_FROM_ALL;DESTINATION;COMPONENT"
|
||||||
""
|
""
|
||||||
${ARGN}
|
${ARGN}
|
||||||
)
|
)
|
||||||
LIST(GET ARG_DEFAULT_ARGS 0 target)
|
LIST(GET ARG_DEFAULT_ARGS 0 target)
|
||||||
LIST(REMOVE_AT ARG_DEFAULT_ARGS 0)
|
LIST(REMOVE_AT ARG_DEFAULT_ARGS 0)
|
||||||
|
|
||||||
SET(sources ${ARG_DEFAULT_ARGS})
|
SET(sources ${ARG_DEFAULT_ARGS})
|
||||||
ADD_VERSION_INFO(${target} EXECUTABLE sources)
|
ADD_VERSION_INFO(${target} EXECUTABLE sources)
|
||||||
ADD_EXECUTABLE(${target} ${ARG_WIN32} ${ARG_MACOSX_BUNDLE} ${ARG_EXCLUDE_FROM_ALL} ${sources})
|
ADD_EXECUTABLE(${target} ${ARG_WIN32} ${ARG_MACOSX_BUNDLE} ${ARG_EXCLUDE_FROM_ALL} ${sources})
|
||||||
# tell CPack where to install
|
# tell CPack where to install
|
||||||
IF(NOT ARG_EXCLUDE_FROM_ALL)
|
IF(NOT ARG_EXCLUDE_FROM_ALL)
|
||||||
IF(NOT ARG_DESTINATION)
|
IF(NOT ARG_DESTINATION)
|
||||||
SET(ARG_DESTINATION ${INSTALL_BINDIR})
|
SET(ARG_DESTINATION ${INSTALL_BINDIR})
|
||||||
ENDIF()
|
ENDIF()
|
||||||
IF(ARG_COMPONENT)
|
IF(ARG_COMPONENT)
|
||||||
SET(COMP COMPONENT ${ARG_COMPONENT})
|
SET(COMP COMPONENT ${ARG_COMPONENT})
|
||||||
ELSEIF(MYSQL_INSTALL_COMPONENT)
|
ELSEIF(MYSQL_INSTALL_COMPONENT)
|
||||||
SET(COMP COMPONENT ${MYSQL_INSTALL_COMPONENT})
|
SET(COMP COMPONENT ${MYSQL_INSTALL_COMPONENT})
|
||||||
ELSE()
|
ELSE()
|
||||||
SET(COMP COMPONENT Client)
|
SET(COMP COMPONENT Client)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
MYSQL_INSTALL_TARGETS(${target} DESTINATION ${ARG_DESTINATION} ${COMP})
|
MYSQL_INSTALL_TARGETS(${target} DESTINATION ${ARG_DESTINATION} ${COMP})
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDFUNCTION()
|
ENDFUNCTION()
|
||||||
|
@ -1,38 +1,38 @@
|
|||||||
// Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
|
// Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||||
//
|
//
|
||||||
// This program is free software; you can redistribute it and/or modify
|
// This program is free software; you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation; version 2 of the License.
|
// the Free Software Foundation; version 2 of the License.
|
||||||
//
|
//
|
||||||
// This program is distributed in the hope that it will be useful,
|
// This program is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program; if not, write to the Free Software
|
// along with this program; if not, write to the Free Software
|
||||||
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH_VERSION@,@TINY_VERSION@
|
FILEVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH_VERSION@,@TINY_VERSION@
|
||||||
PRODUCTVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH_VERSION@,@TINY_VERSION@
|
PRODUCTVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH_VERSION@,@TINY_VERSION@
|
||||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||||
FILEFLAGS 0
|
FILEFLAGS 0
|
||||||
FILEOS VOS__WINDOWS32
|
FILEOS VOS__WINDOWS32
|
||||||
FILETYPE @FILETYPE@
|
FILETYPE @FILETYPE@
|
||||||
FILESUBTYPE VFT2_UNKNOWN
|
FILESUBTYPE VFT2_UNKNOWN
|
||||||
BEGIN
|
BEGIN
|
||||||
BLOCK "StringFileInfo"
|
BLOCK "StringFileInfo"
|
||||||
BEGIN
|
BEGIN
|
||||||
BLOCK "040904E4"
|
BLOCK "040904E4"
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "FileVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@.@TINY_VERSION@\0"
|
VALUE "FileVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@.@TINY_VERSION@\0"
|
||||||
VALUE "ProductVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@.@TINY_VERSION@\0"
|
VALUE "ProductVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@.@TINY_VERSION@\0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "Translation", 0x409, 1252
|
VALUE "Translation", 0x409, 1252
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/* $NetBSD: terminal.h,v 1.3 2011/07/29 23:44:45 christos Exp $ */
|
/* $NetBSD: terminal.h,v 1.3 2011/07/29 23:44:45 christos Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1992, 1993
|
* Copyright (c) 1992, 2015
|
||||||
* The Regents of the University of California. All rights reserved.
|
* The Regents of the University of California. All rights reserved.
|
||||||
*
|
*
|
||||||
* This code is derived from software contributed to Berkeley by
|
* This code is derived from software contributed to Berkeley by
|
||||||
@ -103,7 +103,7 @@ protected int terminal_settc(EditLine *, int, const Char **);
|
|||||||
protected int terminal_gettc(EditLine *, int, char **);
|
protected int terminal_gettc(EditLine *, int, char **);
|
||||||
protected int terminal_telltc(EditLine *, int, const Char **);
|
protected int terminal_telltc(EditLine *, int, const Char **);
|
||||||
protected int terminal_echotc(EditLine *, int, const Char **);
|
protected int terminal_echotc(EditLine *, int, const Char **);
|
||||||
protected void terminal_writec(EditLine *, Int);
|
protected int terminal_writec(EditLine *, Int);
|
||||||
protected int terminal__putc(EditLine *, Int);
|
protected int terminal__putc(EditLine *, Int);
|
||||||
protected void terminal__flush(EditLine *);
|
protected void terminal__flush(EditLine *);
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/* $NetBSD: emacs.c,v 1.25 2011/07/29 15:16:33 christos Exp $ */
|
/* $NetBSD: emacs.c,v 1.25 2011/07/29 15:16:33 christos Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1992, 1993
|
* Copyright (c) 1992, 2015
|
||||||
* The Regents of the University of California. All rights reserved.
|
* The Regents of the University of California. All rights reserved.
|
||||||
*
|
*
|
||||||
* This code is derived from software contributed to Berkeley by
|
* This code is derived from software contributed to Berkeley by
|
||||||
@ -58,8 +58,10 @@ em_delete_or_list(EditLine *el, Int c)
|
|||||||
/* if I'm at the end */
|
/* if I'm at the end */
|
||||||
if (el->el_line.cursor == el->el_line.buffer) {
|
if (el->el_line.cursor == el->el_line.buffer) {
|
||||||
/* and the beginning */
|
/* and the beginning */
|
||||||
terminal_writec(el, c); /* then do an EOF */
|
if(!(terminal_writec(el, c))) /* then do an EOF */
|
||||||
return CC_EOF;
|
return CC_EOF;
|
||||||
|
else
|
||||||
|
return CC_ERROR;
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
* Here we could list completions, but it is an
|
* Here we could list completions, but it is an
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/* $NetBSD: terminal.c,v 1.10 2011/10/04 15:27:04 christos Exp $ */
|
/* $NetBSD: terminal.c,v 1.10 2011/10/04 15:27:04 christos Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1992, 1993
|
* Copyright (c) 1992, 2015
|
||||||
* The Regents of the University of California. All rights reserved.
|
* The Regents of the University of California. All rights reserved.
|
||||||
*
|
*
|
||||||
* This code is derived from software contributed to Berkeley by
|
* This code is derived from software contributed to Berkeley by
|
||||||
@ -1271,14 +1271,19 @@ terminal__flush(EditLine *el)
|
|||||||
/* terminal_writec():
|
/* terminal_writec():
|
||||||
* Write the given character out, in a human readable form
|
* Write the given character out, in a human readable form
|
||||||
*/
|
*/
|
||||||
protected void
|
protected int
|
||||||
terminal_writec(EditLine *el, Int c)
|
terminal_writec(EditLine *el, Int c)
|
||||||
{
|
{
|
||||||
Char visbuf[VISUAL_WIDTH_MAX +1];
|
Char visbuf[VISUAL_WIDTH_MAX +1];
|
||||||
ssize_t vcnt = ct_visual_char(visbuf, VISUAL_WIDTH_MAX, c);
|
ssize_t vcnt = ct_visual_char(visbuf, VISUAL_WIDTH_MAX, c);
|
||||||
visbuf[vcnt] = '\0';
|
if(vcnt == -1)
|
||||||
terminal_overwrite(el, visbuf, (size_t)vcnt);
|
return 1; /* Error due to insufficient space */
|
||||||
terminal__flush(el);
|
else {
|
||||||
|
visbuf[vcnt] = '\0';
|
||||||
|
terminal_overwrite(el, visbuf, (size_t)vcnt);
|
||||||
|
terminal__flush(el);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/* $NetBSD: vi.c,v 1.41 2011/10/04 15:27:04 christos Exp $ */
|
/* $NetBSD: vi.c,v 1.41 2011/10/04 15:27:04 christos Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1992, 1993
|
* Copyright (c) 1992, 2015
|
||||||
* The Regents of the University of California. All rights reserved.
|
* The Regents of the University of California. All rights reserved.
|
||||||
*
|
*
|
||||||
* This code is derived from software contributed to Berkeley by
|
* This code is derived from software contributed to Berkeley by
|
||||||
@ -607,8 +607,10 @@ vi_list_or_eof(EditLine *el, Int c)
|
|||||||
|
|
||||||
if (el->el_line.cursor == el->el_line.lastchar) {
|
if (el->el_line.cursor == el->el_line.lastchar) {
|
||||||
if (el->el_line.cursor == el->el_line.buffer) {
|
if (el->el_line.cursor == el->el_line.buffer) {
|
||||||
terminal_writec(el, c); /* then do a EOF */
|
if(!(terminal_writec(el, c))) /* then do a EOF */
|
||||||
return CC_EOF;
|
return CC_EOF;
|
||||||
|
else
|
||||||
|
return CC_ERROR;
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
* Here we could list completions, but it is an
|
* Here we could list completions, but it is an
|
||||||
|
@ -204,7 +204,7 @@
|
|||||||
#cmakedefine HAVE_MADVISE 1
|
#cmakedefine HAVE_MADVISE 1
|
||||||
#cmakedefine HAVE_DECL_MADVISE 1
|
#cmakedefine HAVE_DECL_MADVISE 1
|
||||||
#cmakedefine HAVE_DECL_TGOTO 1
|
#cmakedefine HAVE_DECL_TGOTO 1
|
||||||
#cmakedefine HAVE_DECL_MHA_MAPSIZE_VA
|
#cmakedefine HAVE_DECL_MHA_MAPSIZE_VA 1
|
||||||
#cmakedefine HAVE_MALLINFO 1
|
#cmakedefine HAVE_MALLINFO 1
|
||||||
#cmakedefine HAVE_MEMCPY 1
|
#cmakedefine HAVE_MEMCPY 1
|
||||||
#cmakedefine HAVE_MEMMOVE 1
|
#cmakedefine HAVE_MEMMOVE 1
|
||||||
@ -397,7 +397,7 @@
|
|||||||
|
|
||||||
#cmakedefine SOCKET_SIZE_TYPE @SOCKET_SIZE_TYPE@
|
#cmakedefine SOCKET_SIZE_TYPE @SOCKET_SIZE_TYPE@
|
||||||
|
|
||||||
#cmakedefine HAVE_MBSTATE_T
|
#cmakedefine HAVE_MBSTATE_T 1
|
||||||
|
|
||||||
#define MAX_INDEXES 64
|
#define MAX_INDEXES 64
|
||||||
|
|
||||||
@ -432,15 +432,15 @@
|
|||||||
#cmakedefine HAVE_WCTYPE_H 1
|
#cmakedefine HAVE_WCTYPE_H 1
|
||||||
#cmakedefine HAVE_WCHAR_H 1
|
#cmakedefine HAVE_WCHAR_H 1
|
||||||
#cmakedefine HAVE_LANGINFO_H 1
|
#cmakedefine HAVE_LANGINFO_H 1
|
||||||
#cmakedefine HAVE_MBRLEN
|
#cmakedefine HAVE_MBRLEN 1
|
||||||
#cmakedefine HAVE_MBSCMP
|
#cmakedefine HAVE_MBSCMP 1
|
||||||
#cmakedefine HAVE_MBSRTOWCS
|
#cmakedefine HAVE_MBSRTOWCS 1
|
||||||
#cmakedefine HAVE_WCRTOMB
|
#cmakedefine HAVE_WCRTOMB 1
|
||||||
#cmakedefine HAVE_MBRTOWC
|
#cmakedefine HAVE_MBRTOWC 1
|
||||||
#cmakedefine HAVE_WCSCOLL
|
#cmakedefine HAVE_WCSCOLL 1
|
||||||
#cmakedefine HAVE_WCSDUP
|
#cmakedefine HAVE_WCSDUP 1
|
||||||
#cmakedefine HAVE_WCWIDTH
|
#cmakedefine HAVE_WCWIDTH 1
|
||||||
#cmakedefine HAVE_WCTYPE
|
#cmakedefine HAVE_WCTYPE 1
|
||||||
#cmakedefine HAVE_ISWLOWER 1
|
#cmakedefine HAVE_ISWLOWER 1
|
||||||
#cmakedefine HAVE_ISWUPPER 1
|
#cmakedefine HAVE_ISWUPPER 1
|
||||||
#cmakedefine HAVE_TOWLOWER 1
|
#cmakedefine HAVE_TOWLOWER 1
|
||||||
@ -454,7 +454,7 @@
|
|||||||
#cmakedefine HAVE_STRCASECMP 1
|
#cmakedefine HAVE_STRCASECMP 1
|
||||||
#cmakedefine HAVE_STRNCASECMP 1
|
#cmakedefine HAVE_STRNCASECMP 1
|
||||||
#cmakedefine HAVE_STRDUP 1
|
#cmakedefine HAVE_STRDUP 1
|
||||||
#cmakedefine HAVE_LANGINFO_CODESET
|
#cmakedefine HAVE_LANGINFO_CODESET 1
|
||||||
#cmakedefine HAVE_TCGETATTR 1
|
#cmakedefine HAVE_TCGETATTR 1
|
||||||
#cmakedefine HAVE_FLOCKFILE 1
|
#cmakedefine HAVE_FLOCKFILE 1
|
||||||
|
|
||||||
|
12
debian/dist/Debian/control
vendored
12
debian/dist/Debian/control
vendored
@ -4,12 +4,12 @@ Priority: optional
|
|||||||
Maintainer: MariaDB Developers <maria-developers@lists.launchpad.net>
|
Maintainer: MariaDB Developers <maria-developers@lists.launchpad.net>
|
||||||
XSBC-Original-Maintainer: Maria Developers <maria-developers@lists.launchpad.net>
|
XSBC-Original-Maintainer: Maria Developers <maria-developers@lists.launchpad.net>
|
||||||
Uploaders: MariaDB Developers <maria-developers@lists.launchpad.net>
|
Uploaders: MariaDB Developers <maria-developers@lists.launchpad.net>
|
||||||
Build-Depends: libtool (>= 1.4.2-7), procps | hurd, debhelper, file (>= 3.28),
|
Build-Depends: procps | hurd, debhelper, libncurses5-dev (>= 5.0-6),
|
||||||
libncurses5-dev (>= 5.0-6), perl (>= 5.6.0), libwrap0-dev (>= 7.6-8.3),
|
perl (>= 5.6.0), libwrap0-dev (>= 7.6-8.3),
|
||||||
zlib1g-dev (>= 1:1.1.3-5), ${LIBREADLINE_DEV}, libevent-dev, libssl-dev,
|
zlib1g-dev (>= 1:1.1.3-5), ${LIBREADLINE_DEV}, libevent-dev,
|
||||||
libpam0g-dev, psmisc, po-debconf, chrpath, automake1.9, doxygen,
|
libssl-dev, libpam0g-dev, psmisc, po-debconf, chrpath,
|
||||||
texlive-latex-base, ghostscript | gs-gpl, dpatch, gawk, bison, lsb-release,
|
dpatch, gawk, bison, lsb-release, hardening-wrapper,
|
||||||
hardening-wrapper, ${CMAKE_DEP}libaio-dev, libjemalloc-dev (>= 3.0.0)
|
${CMAKE_DEP}libaio-dev, libjemalloc-dev (>= 3.0.0)
|
||||||
Standards-Version: 3.8.3
|
Standards-Version: 3.8.3
|
||||||
Homepage: http://mariadb.org/
|
Homepage: http://mariadb.org/
|
||||||
Vcs-Browser: http://bazaar.launchpad.net/~maria-captains/maria/5.5/files
|
Vcs-Browser: http://bazaar.launchpad.net/~maria-captains/maria/5.5/files
|
||||||
|
12
debian/dist/Ubuntu/control
vendored
12
debian/dist/Ubuntu/control
vendored
@ -4,12 +4,12 @@ Priority: optional
|
|||||||
Maintainer: MariaDB Developers <maria-developers@lists.launchpad.net>
|
Maintainer: MariaDB Developers <maria-developers@lists.launchpad.net>
|
||||||
XSBC-Original-Maintainer: Maria Developers <maria-developers@lists.launchpad.net>
|
XSBC-Original-Maintainer: Maria Developers <maria-developers@lists.launchpad.net>
|
||||||
Uploaders: MariaDB Developers <maria-developers@lists.launchpad.net>
|
Uploaders: MariaDB Developers <maria-developers@lists.launchpad.net>
|
||||||
Build-Depends: libtool (>= 1.4.2-7), procps | hurd, debhelper, file (>= 3.28),
|
Build-Depends: procps | hurd, debhelper, libncurses5-dev (>= 5.0-6),
|
||||||
libncurses5-dev (>= 5.0-6), perl (>= 5.6.0), libwrap0-dev (>= 7.6-8.3),
|
perl (>= 5.6.0), libwrap0-dev (>= 7.6-8.3),
|
||||||
zlib1g-dev (>= 1:1.1.3-5), ${LIBREADLINE_DEV}, libevent-dev, libssl-dev,
|
zlib1g-dev (>= 1:1.1.3-5), ${LIBREADLINE_DEV}, libevent-dev,
|
||||||
libpam0g-dev, psmisc, po-debconf, chrpath, automake1.9, doxygen,
|
libssl-dev, libpam0g-dev, psmisc, po-debconf, chrpath,
|
||||||
texlive-latex-base, ghostscript | gs-gpl, dpatch, gawk, bison, lsb-release,
|
dpatch, gawk, bison, lsb-release, hardening-wrapper,
|
||||||
hardening-wrapper, ${CMAKE_DEP}libaio-dev, libjemalloc-dev (>= 3.0.0)
|
${CMAKE_DEP}libaio-dev, libjemalloc-dev (>= 3.0.0)
|
||||||
Standards-Version: 3.8.2
|
Standards-Version: 3.8.2
|
||||||
Homepage: http://mariadb.org/
|
Homepage: http://mariadb.org/
|
||||||
Vcs-Browser: http://bazaar.launchpad.net/~maria-captains/maria/5.5/files
|
Vcs-Browser: http://bazaar.launchpad.net/~maria-captains/maria/5.5/files
|
||||||
|
10
debian/po/it.po
vendored
10
debian/po/it.po
vendored
@ -1,8 +1,8 @@
|
|||||||
# Italian (it) translation of debconf templates for mysql-dfsg-5.1
|
# Italian (it) translation of debconf templates for mysql-dfsg-5.1
|
||||||
# Copyright (C) 2009 Software in the Public Interest
|
# Copyright (C) 2009 Software in the Public Interest
|
||||||
# This file is distributed under the same license as the mysql-dfsg-5.1 package.
|
# This file is distributed under the same license as the mysql-dfsg-5.1 package.
|
||||||
# Luca Monducci <luca.mo@tiscali.it>, 2006 - 2009.
|
# Luca Monducci <luca.mo@tiscali.it>, 2006 - 2009.
|
||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: mysql-dfsg-5.1 5.1.37 italian debconf templates\n"
|
"Project-Id-Version: mysql-dfsg-5.1 5.1.37 italian debconf templates\n"
|
||||||
|
12
debian/po/sv.po
vendored
12
debian/po/sv.po
vendored
@ -1,9 +1,9 @@
|
|||||||
# Translation of mysql-dfsg-5.1 debconf template to Swedish
|
# Translation of mysql-dfsg-5.1 debconf template to Swedish
|
||||||
# Copyright (C) 2009 Martin Bagge <brother@bsnet.se>
|
# Copyright (C) 2009 Martin Bagge <brother@bsnet.se>
|
||||||
# This file is distributed under the same license as the mysql-dfsg-5.1 package.
|
# This file is distributed under the same license as the mysql-dfsg-5.1 package.
|
||||||
#
|
#
|
||||||
# Andreas Henriksson <andreas@fatal.se>, 2007
|
# Andreas Henriksson <andreas@fatal.se>, 2007
|
||||||
# Martin Bagge <brother@bsnet.se>, 2009
|
# Martin Bagge <brother@bsnet.se>, 2009
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: mysql-dfsg-5.1 5.0.21-3\n"
|
"Project-Id-Version: mysql-dfsg-5.1 5.0.21-3\n"
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
typedef char my_bool;
|
typedef char my_bool;
|
||||||
typedef int my_socket;
|
typedef int my_socket;
|
||||||
#include "mysql_version.h"
|
|
||||||
#include "mysql_com.h"
|
|
||||||
enum enum_server_command
|
enum enum_server_command
|
||||||
{
|
{
|
||||||
COM_SLEEP, COM_QUIT, COM_INIT_DB, COM_QUERY, COM_FIELD_LIST,
|
COM_SLEEP, COM_QUIT, COM_INIT_DB, COM_QUERY, COM_FIELD_LIST,
|
||||||
@ -142,7 +140,6 @@ void get_tty_password_buff(const char *opt_message, char *to, size_t length);
|
|||||||
const char *mysql_errno_to_sqlstate(unsigned int mysql_errno);
|
const char *mysql_errno_to_sqlstate(unsigned int mysql_errno);
|
||||||
my_bool my_thread_init(void);
|
my_bool my_thread_init(void);
|
||||||
void my_thread_end(void);
|
void my_thread_end(void);
|
||||||
#include "mysql_time.h"
|
|
||||||
enum enum_mysql_timestamp_type
|
enum enum_mysql_timestamp_type
|
||||||
{
|
{
|
||||||
MYSQL_TIMESTAMP_NONE= -2, MYSQL_TIMESTAMP_ERROR= -1,
|
MYSQL_TIMESTAMP_NONE= -2, MYSQL_TIMESTAMP_ERROR= -1,
|
||||||
@ -155,7 +152,6 @@ typedef struct st_mysql_time
|
|||||||
my_bool neg;
|
my_bool neg;
|
||||||
enum enum_mysql_timestamp_type time_type;
|
enum enum_mysql_timestamp_type time_type;
|
||||||
} MYSQL_TIME;
|
} MYSQL_TIME;
|
||||||
#include "my_list.h"
|
|
||||||
typedef struct st_list {
|
typedef struct st_list {
|
||||||
struct st_list *prev,*next;
|
struct st_list *prev,*next;
|
||||||
void *data;
|
void *data;
|
||||||
@ -197,8 +193,6 @@ typedef struct st_mysql_field {
|
|||||||
typedef char **MYSQL_ROW;
|
typedef char **MYSQL_ROW;
|
||||||
typedef unsigned int MYSQL_FIELD_OFFSET;
|
typedef unsigned int MYSQL_FIELD_OFFSET;
|
||||||
typedef unsigned long long my_ulonglong;
|
typedef unsigned long long my_ulonglong;
|
||||||
#include "typelib.h"
|
|
||||||
#include "my_alloc.h"
|
|
||||||
typedef struct st_used_mem
|
typedef struct st_used_mem
|
||||||
{
|
{
|
||||||
struct st_used_mem *next;
|
struct st_used_mem *next;
|
||||||
@ -242,7 +236,6 @@ typedef struct st_mysql_rows {
|
|||||||
unsigned long length;
|
unsigned long length;
|
||||||
} MYSQL_ROWS;
|
} MYSQL_ROWS;
|
||||||
typedef MYSQL_ROWS *MYSQL_ROW_OFFSET;
|
typedef MYSQL_ROWS *MYSQL_ROW_OFFSET;
|
||||||
#include "my_alloc.h"
|
|
||||||
typedef struct embedded_query_result EMBEDDED_QUERY_RESULT;
|
typedef struct embedded_query_result EMBEDDED_QUERY_RESULT;
|
||||||
typedef struct st_mysql_data {
|
typedef struct st_mysql_data {
|
||||||
MYSQL_ROWS *data;
|
MYSQL_ROWS *data;
|
||||||
|
@ -3,7 +3,6 @@ struct st_mysql_client_plugin
|
|||||||
int type; unsigned int interface_version; const char *name; const char *author; const char *desc; unsigned int version[3]; const char *license; void *mysql_api; int (*init)(char *, size_t, int, va_list); int (*deinit)(); int (*options)(const char *option, const void *);
|
int type; unsigned int interface_version; const char *name; const char *author; const char *desc; unsigned int version[3]; const char *license; void *mysql_api; int (*init)(char *, size_t, int, va_list); int (*deinit)(); int (*options)(const char *option, const void *);
|
||||||
};
|
};
|
||||||
struct st_mysql;
|
struct st_mysql;
|
||||||
#include <mysql/plugin_auth_common.h>
|
|
||||||
typedef struct st_plugin_vio_info
|
typedef struct st_plugin_vio_info
|
||||||
{
|
{
|
||||||
enum { MYSQL_VIO_INVALID, MYSQL_VIO_TCP, MYSQL_VIO_SOCKET,
|
enum { MYSQL_VIO_INVALID, MYSQL_VIO_TCP, MYSQL_VIO_SOCKET,
|
||||||
@ -24,7 +23,6 @@ struct st_mysql_client_plugin_AUTHENTICATION
|
|||||||
int type; unsigned int interface_version; const char *name; const char *author; const char *desc; unsigned int version[3]; const char *license; void *mysql_api; int (*init)(char *, size_t, int, va_list); int (*deinit)(); int (*options)(const char *option, const void *);
|
int type; unsigned int interface_version; const char *name; const char *author; const char *desc; unsigned int version[3]; const char *license; void *mysql_api; int (*init)(char *, size_t, int, va_list); int (*deinit)(); int (*options)(const char *option, const void *);
|
||||||
int (*authenticate_user)(MYSQL_PLUGIN_VIO *vio, struct st_mysql *mysql);
|
int (*authenticate_user)(MYSQL_PLUGIN_VIO *vio, struct st_mysql *mysql);
|
||||||
};
|
};
|
||||||
#include <mysql/auth_dialog_client.h>
|
|
||||||
struct st_mysql;
|
struct st_mysql;
|
||||||
typedef char *(*mysql_authentication_dialog_ask_t)(struct st_mysql *mysql,
|
typedef char *(*mysql_authentication_dialog_ask_t)(struct st_mysql *mysql,
|
||||||
int type, const char *prompt, char *buf, int buf_len);
|
int type, const char *prompt, char *buf, int buf_len);
|
||||||
|
@ -1,13 +1,9 @@
|
|||||||
#include "plugin.h"
|
|
||||||
#include <mysql/services.h>
|
|
||||||
#include <mysql/service_my_snprintf.h>
|
|
||||||
extern struct my_snprintf_service_st {
|
extern struct my_snprintf_service_st {
|
||||||
size_t (*my_snprintf_type)(char*, size_t, const char*, ...);
|
size_t (*my_snprintf_type)(char*, size_t, const char*, ...);
|
||||||
size_t (*my_vsnprintf_type)(char *, size_t, const char*, va_list);
|
size_t (*my_vsnprintf_type)(char *, size_t, const char*, va_list);
|
||||||
} *my_snprintf_service;
|
} *my_snprintf_service;
|
||||||
size_t my_snprintf(char* to, size_t n, const char* fmt, ...);
|
size_t my_snprintf(char* to, size_t n, const char* fmt, ...);
|
||||||
size_t my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap);
|
size_t my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap);
|
||||||
#include <mysql/service_thd_alloc.h>
|
|
||||||
struct st_mysql_lex_string
|
struct st_mysql_lex_string
|
||||||
{
|
{
|
||||||
char *str;
|
char *str;
|
||||||
@ -31,7 +27,6 @@ void *thd_memdup(void* thd, const void* str, unsigned int size);
|
|||||||
MYSQL_LEX_STRING *thd_make_lex_string(void* thd, MYSQL_LEX_STRING *lex_str,
|
MYSQL_LEX_STRING *thd_make_lex_string(void* thd, MYSQL_LEX_STRING *lex_str,
|
||||||
const char *str, unsigned int size,
|
const char *str, unsigned int size,
|
||||||
int allocate_lex_string);
|
int allocate_lex_string);
|
||||||
#include <mysql/service_thd_wait.h>
|
|
||||||
typedef enum _thd_wait_type_e {
|
typedef enum _thd_wait_type_e {
|
||||||
THD_WAIT_SLEEP= 1,
|
THD_WAIT_SLEEP= 1,
|
||||||
THD_WAIT_DISKIO= 2,
|
THD_WAIT_DISKIO= 2,
|
||||||
@ -51,7 +46,6 @@ extern struct thd_wait_service_st {
|
|||||||
} *thd_wait_service;
|
} *thd_wait_service;
|
||||||
void thd_wait_begin(void* thd, int wait_type);
|
void thd_wait_begin(void* thd, int wait_type);
|
||||||
void thd_wait_end(void* thd);
|
void thd_wait_end(void* thd);
|
||||||
#include <mysql/service_thread_scheduler.h>
|
|
||||||
struct scheduler_functions;
|
struct scheduler_functions;
|
||||||
extern struct my_thread_scheduler_service {
|
extern struct my_thread_scheduler_service {
|
||||||
int (*set)(struct scheduler_functions *scheduler);
|
int (*set)(struct scheduler_functions *scheduler);
|
||||||
@ -59,7 +53,6 @@ extern struct my_thread_scheduler_service {
|
|||||||
} *my_thread_scheduler_service;
|
} *my_thread_scheduler_service;
|
||||||
int my_thread_scheduler_set(struct scheduler_functions *scheduler);
|
int my_thread_scheduler_set(struct scheduler_functions *scheduler);
|
||||||
int my_thread_scheduler_reset();
|
int my_thread_scheduler_reset();
|
||||||
#include <mysql/service_progress_report.h>
|
|
||||||
extern struct progress_report_service_st {
|
extern struct progress_report_service_st {
|
||||||
void (*thd_progress_init_func)(void* thd, unsigned int max_stage);
|
void (*thd_progress_init_func)(void* thd, unsigned int max_stage);
|
||||||
void (*thd_progress_report_func)(void* thd,
|
void (*thd_progress_report_func)(void* thd,
|
||||||
@ -80,9 +73,7 @@ void thd_progress_next_stage(void* thd);
|
|||||||
void thd_progress_end(void* thd);
|
void thd_progress_end(void* thd);
|
||||||
const char *set_thd_proc_info(void*, const char * info, const char *func,
|
const char *set_thd_proc_info(void*, const char * info, const char *func,
|
||||||
const char *file, unsigned int line);
|
const char *file, unsigned int line);
|
||||||
#include <mysql/service_debug_sync.h>
|
|
||||||
extern void (*debug_sync_C_callback_ptr)(void*, const char *, size_t);
|
extern void (*debug_sync_C_callback_ptr)(void*, const char *, size_t);
|
||||||
#include <mysql/service_kill_statement.h>
|
|
||||||
enum thd_kill_levels {
|
enum thd_kill_levels {
|
||||||
THD_IS_NOT_KILLED=0,
|
THD_IS_NOT_KILLED=0,
|
||||||
THD_ABORT_SOFTLY=50,
|
THD_ABORT_SOFTLY=50,
|
||||||
@ -92,7 +83,6 @@ extern struct kill_statement_service_st {
|
|||||||
enum thd_kill_levels (*thd_kill_level_func)(const void*);
|
enum thd_kill_levels (*thd_kill_level_func)(const void*);
|
||||||
} *thd_kill_statement_service;
|
} *thd_kill_statement_service;
|
||||||
enum thd_kill_levels thd_kill_level(const void*);
|
enum thd_kill_levels thd_kill_level(const void*);
|
||||||
#include <mysql/service_logger.h>
|
|
||||||
typedef struct logger_handle_st LOGGER_HANDLE;
|
typedef struct logger_handle_st LOGGER_HANDLE;
|
||||||
extern struct logger_service_st {
|
extern struct logger_service_st {
|
||||||
void (*logger_init_mutexes)();
|
void (*logger_init_mutexes)();
|
||||||
@ -175,8 +165,6 @@ struct st_maria_plugin
|
|||||||
const char *version_info;
|
const char *version_info;
|
||||||
unsigned int maturity;
|
unsigned int maturity;
|
||||||
};
|
};
|
||||||
#include "plugin_ftparser.h"
|
|
||||||
#include "plugin.h"
|
|
||||||
enum enum_ftparser_mode
|
enum enum_ftparser_mode
|
||||||
{
|
{
|
||||||
MYSQL_FTPARSER_SIMPLE_MODE= 0,
|
MYSQL_FTPARSER_SIMPLE_MODE= 0,
|
||||||
|
@ -1,13 +1,9 @@
|
|||||||
#include <mysql/plugin.h>
|
|
||||||
#include <mysql/services.h>
|
|
||||||
#include <mysql/service_my_snprintf.h>
|
|
||||||
extern struct my_snprintf_service_st {
|
extern struct my_snprintf_service_st {
|
||||||
size_t (*my_snprintf_type)(char*, size_t, const char*, ...);
|
size_t (*my_snprintf_type)(char*, size_t, const char*, ...);
|
||||||
size_t (*my_vsnprintf_type)(char *, size_t, const char*, va_list);
|
size_t (*my_vsnprintf_type)(char *, size_t, const char*, va_list);
|
||||||
} *my_snprintf_service;
|
} *my_snprintf_service;
|
||||||
size_t my_snprintf(char* to, size_t n, const char* fmt, ...);
|
size_t my_snprintf(char* to, size_t n, const char* fmt, ...);
|
||||||
size_t my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap);
|
size_t my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap);
|
||||||
#include <mysql/service_thd_alloc.h>
|
|
||||||
struct st_mysql_lex_string
|
struct st_mysql_lex_string
|
||||||
{
|
{
|
||||||
char *str;
|
char *str;
|
||||||
@ -31,7 +27,6 @@ void *thd_memdup(void* thd, const void* str, unsigned int size);
|
|||||||
MYSQL_LEX_STRING *thd_make_lex_string(void* thd, MYSQL_LEX_STRING *lex_str,
|
MYSQL_LEX_STRING *thd_make_lex_string(void* thd, MYSQL_LEX_STRING *lex_str,
|
||||||
const char *str, unsigned int size,
|
const char *str, unsigned int size,
|
||||||
int allocate_lex_string);
|
int allocate_lex_string);
|
||||||
#include <mysql/service_thd_wait.h>
|
|
||||||
typedef enum _thd_wait_type_e {
|
typedef enum _thd_wait_type_e {
|
||||||
THD_WAIT_SLEEP= 1,
|
THD_WAIT_SLEEP= 1,
|
||||||
THD_WAIT_DISKIO= 2,
|
THD_WAIT_DISKIO= 2,
|
||||||
@ -51,7 +46,6 @@ extern struct thd_wait_service_st {
|
|||||||
} *thd_wait_service;
|
} *thd_wait_service;
|
||||||
void thd_wait_begin(void* thd, int wait_type);
|
void thd_wait_begin(void* thd, int wait_type);
|
||||||
void thd_wait_end(void* thd);
|
void thd_wait_end(void* thd);
|
||||||
#include <mysql/service_thread_scheduler.h>
|
|
||||||
struct scheduler_functions;
|
struct scheduler_functions;
|
||||||
extern struct my_thread_scheduler_service {
|
extern struct my_thread_scheduler_service {
|
||||||
int (*set)(struct scheduler_functions *scheduler);
|
int (*set)(struct scheduler_functions *scheduler);
|
||||||
@ -59,7 +53,6 @@ extern struct my_thread_scheduler_service {
|
|||||||
} *my_thread_scheduler_service;
|
} *my_thread_scheduler_service;
|
||||||
int my_thread_scheduler_set(struct scheduler_functions *scheduler);
|
int my_thread_scheduler_set(struct scheduler_functions *scheduler);
|
||||||
int my_thread_scheduler_reset();
|
int my_thread_scheduler_reset();
|
||||||
#include <mysql/service_progress_report.h>
|
|
||||||
extern struct progress_report_service_st {
|
extern struct progress_report_service_st {
|
||||||
void (*thd_progress_init_func)(void* thd, unsigned int max_stage);
|
void (*thd_progress_init_func)(void* thd, unsigned int max_stage);
|
||||||
void (*thd_progress_report_func)(void* thd,
|
void (*thd_progress_report_func)(void* thd,
|
||||||
@ -80,9 +73,7 @@ void thd_progress_next_stage(void* thd);
|
|||||||
void thd_progress_end(void* thd);
|
void thd_progress_end(void* thd);
|
||||||
const char *set_thd_proc_info(void*, const char * info, const char *func,
|
const char *set_thd_proc_info(void*, const char * info, const char *func,
|
||||||
const char *file, unsigned int line);
|
const char *file, unsigned int line);
|
||||||
#include <mysql/service_debug_sync.h>
|
|
||||||
extern void (*debug_sync_C_callback_ptr)(void*, const char *, size_t);
|
extern void (*debug_sync_C_callback_ptr)(void*, const char *, size_t);
|
||||||
#include <mysql/service_kill_statement.h>
|
|
||||||
enum thd_kill_levels {
|
enum thd_kill_levels {
|
||||||
THD_IS_NOT_KILLED=0,
|
THD_IS_NOT_KILLED=0,
|
||||||
THD_ABORT_SOFTLY=50,
|
THD_ABORT_SOFTLY=50,
|
||||||
@ -92,7 +83,6 @@ extern struct kill_statement_service_st {
|
|||||||
enum thd_kill_levels (*thd_kill_level_func)(const void*);
|
enum thd_kill_levels (*thd_kill_level_func)(const void*);
|
||||||
} *thd_kill_statement_service;
|
} *thd_kill_statement_service;
|
||||||
enum thd_kill_levels thd_kill_level(const void*);
|
enum thd_kill_levels thd_kill_level(const void*);
|
||||||
#include <mysql/service_logger.h>
|
|
||||||
typedef struct logger_handle_st LOGGER_HANDLE;
|
typedef struct logger_handle_st LOGGER_HANDLE;
|
||||||
extern struct logger_service_st {
|
extern struct logger_service_st {
|
||||||
void (*logger_init_mutexes)();
|
void (*logger_init_mutexes)();
|
||||||
@ -175,8 +165,6 @@ struct st_maria_plugin
|
|||||||
const char *version_info;
|
const char *version_info;
|
||||||
unsigned int maturity;
|
unsigned int maturity;
|
||||||
};
|
};
|
||||||
#include "plugin_ftparser.h"
|
|
||||||
#include "plugin.h"
|
|
||||||
enum enum_ftparser_mode
|
enum enum_ftparser_mode
|
||||||
{
|
{
|
||||||
MYSQL_FTPARSER_SIMPLE_MODE= 0,
|
MYSQL_FTPARSER_SIMPLE_MODE= 0,
|
||||||
@ -266,7 +254,6 @@ void mysql_query_cache_invalidate4(void* thd,
|
|||||||
void *thd_get_ha_data(const void* thd, const struct handlerton *hton);
|
void *thd_get_ha_data(const void* thd, const struct handlerton *hton);
|
||||||
void thd_set_ha_data(void* thd, const struct handlerton *hton,
|
void thd_set_ha_data(void* thd, const struct handlerton *hton,
|
||||||
const void *ha_data);
|
const void *ha_data);
|
||||||
#include <mysql/plugin_auth_common.h>
|
|
||||||
typedef struct st_plugin_vio_info
|
typedef struct st_plugin_vio_info
|
||||||
{
|
{
|
||||||
enum { MYSQL_VIO_INVALID, MYSQL_VIO_TCP, MYSQL_VIO_SOCKET,
|
enum { MYSQL_VIO_INVALID, MYSQL_VIO_TCP, MYSQL_VIO_SOCKET,
|
||||||
|
@ -1,13 +1,9 @@
|
|||||||
#include "plugin.h"
|
|
||||||
#include <mysql/services.h>
|
|
||||||
#include <mysql/service_my_snprintf.h>
|
|
||||||
extern struct my_snprintf_service_st {
|
extern struct my_snprintf_service_st {
|
||||||
size_t (*my_snprintf_type)(char*, size_t, const char*, ...);
|
size_t (*my_snprintf_type)(char*, size_t, const char*, ...);
|
||||||
size_t (*my_vsnprintf_type)(char *, size_t, const char*, va_list);
|
size_t (*my_vsnprintf_type)(char *, size_t, const char*, va_list);
|
||||||
} *my_snprintf_service;
|
} *my_snprintf_service;
|
||||||
size_t my_snprintf(char* to, size_t n, const char* fmt, ...);
|
size_t my_snprintf(char* to, size_t n, const char* fmt, ...);
|
||||||
size_t my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap);
|
size_t my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap);
|
||||||
#include <mysql/service_thd_alloc.h>
|
|
||||||
struct st_mysql_lex_string
|
struct st_mysql_lex_string
|
||||||
{
|
{
|
||||||
char *str;
|
char *str;
|
||||||
@ -31,7 +27,6 @@ void *thd_memdup(void* thd, const void* str, unsigned int size);
|
|||||||
MYSQL_LEX_STRING *thd_make_lex_string(void* thd, MYSQL_LEX_STRING *lex_str,
|
MYSQL_LEX_STRING *thd_make_lex_string(void* thd, MYSQL_LEX_STRING *lex_str,
|
||||||
const char *str, unsigned int size,
|
const char *str, unsigned int size,
|
||||||
int allocate_lex_string);
|
int allocate_lex_string);
|
||||||
#include <mysql/service_thd_wait.h>
|
|
||||||
typedef enum _thd_wait_type_e {
|
typedef enum _thd_wait_type_e {
|
||||||
THD_WAIT_SLEEP= 1,
|
THD_WAIT_SLEEP= 1,
|
||||||
THD_WAIT_DISKIO= 2,
|
THD_WAIT_DISKIO= 2,
|
||||||
@ -51,7 +46,6 @@ extern struct thd_wait_service_st {
|
|||||||
} *thd_wait_service;
|
} *thd_wait_service;
|
||||||
void thd_wait_begin(void* thd, int wait_type);
|
void thd_wait_begin(void* thd, int wait_type);
|
||||||
void thd_wait_end(void* thd);
|
void thd_wait_end(void* thd);
|
||||||
#include <mysql/service_thread_scheduler.h>
|
|
||||||
struct scheduler_functions;
|
struct scheduler_functions;
|
||||||
extern struct my_thread_scheduler_service {
|
extern struct my_thread_scheduler_service {
|
||||||
int (*set)(struct scheduler_functions *scheduler);
|
int (*set)(struct scheduler_functions *scheduler);
|
||||||
@ -59,7 +53,6 @@ extern struct my_thread_scheduler_service {
|
|||||||
} *my_thread_scheduler_service;
|
} *my_thread_scheduler_service;
|
||||||
int my_thread_scheduler_set(struct scheduler_functions *scheduler);
|
int my_thread_scheduler_set(struct scheduler_functions *scheduler);
|
||||||
int my_thread_scheduler_reset();
|
int my_thread_scheduler_reset();
|
||||||
#include <mysql/service_progress_report.h>
|
|
||||||
extern struct progress_report_service_st {
|
extern struct progress_report_service_st {
|
||||||
void (*thd_progress_init_func)(void* thd, unsigned int max_stage);
|
void (*thd_progress_init_func)(void* thd, unsigned int max_stage);
|
||||||
void (*thd_progress_report_func)(void* thd,
|
void (*thd_progress_report_func)(void* thd,
|
||||||
@ -80,9 +73,7 @@ void thd_progress_next_stage(void* thd);
|
|||||||
void thd_progress_end(void* thd);
|
void thd_progress_end(void* thd);
|
||||||
const char *set_thd_proc_info(void*, const char * info, const char *func,
|
const char *set_thd_proc_info(void*, const char * info, const char *func,
|
||||||
const char *file, unsigned int line);
|
const char *file, unsigned int line);
|
||||||
#include <mysql/service_debug_sync.h>
|
|
||||||
extern void (*debug_sync_C_callback_ptr)(void*, const char *, size_t);
|
extern void (*debug_sync_C_callback_ptr)(void*, const char *, size_t);
|
||||||
#include <mysql/service_kill_statement.h>
|
|
||||||
enum thd_kill_levels {
|
enum thd_kill_levels {
|
||||||
THD_IS_NOT_KILLED=0,
|
THD_IS_NOT_KILLED=0,
|
||||||
THD_ABORT_SOFTLY=50,
|
THD_ABORT_SOFTLY=50,
|
||||||
@ -92,7 +83,6 @@ extern struct kill_statement_service_st {
|
|||||||
enum thd_kill_levels (*thd_kill_level_func)(const void*);
|
enum thd_kill_levels (*thd_kill_level_func)(const void*);
|
||||||
} *thd_kill_statement_service;
|
} *thd_kill_statement_service;
|
||||||
enum thd_kill_levels thd_kill_level(const void*);
|
enum thd_kill_levels thd_kill_level(const void*);
|
||||||
#include <mysql/service_logger.h>
|
|
||||||
typedef struct logger_handle_st LOGGER_HANDLE;
|
typedef struct logger_handle_st LOGGER_HANDLE;
|
||||||
extern struct logger_service_st {
|
extern struct logger_service_st {
|
||||||
void (*logger_init_mutexes)();
|
void (*logger_init_mutexes)();
|
||||||
@ -175,7 +165,6 @@ struct st_maria_plugin
|
|||||||
const char *version_info;
|
const char *version_info;
|
||||||
unsigned int maturity;
|
unsigned int maturity;
|
||||||
};
|
};
|
||||||
#include "plugin_ftparser.h"
|
|
||||||
struct st_mysql_daemon
|
struct st_mysql_daemon
|
||||||
{
|
{
|
||||||
int interface_version;
|
int interface_version;
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
#include "mysql/psi/psi.h"
|
|
||||||
C_MODE_START
|
C_MODE_START
|
||||||
struct PSI_mutex;
|
struct PSI_mutex;
|
||||||
struct PSI_rwlock;
|
struct PSI_rwlock;
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
#include "mysql/psi/psi.h"
|
|
||||||
C_MODE_START
|
C_MODE_START
|
||||||
struct PSI_mutex;
|
struct PSI_mutex;
|
||||||
struct PSI_rwlock;
|
struct PSI_rwlock;
|
||||||
|
@ -358,7 +358,7 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
|||||||
CONFIGURE_FILE(
|
CONFIGURE_FILE(
|
||||||
${VERSION_SCRIPT_TEMPLATE}
|
${VERSION_SCRIPT_TEMPLATE}
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/libmysql_versions.ld
|
${CMAKE_CURRENT_BINARY_DIR}/libmysql_versions.ld
|
||||||
@ONLY@
|
@ONLY
|
||||||
)
|
)
|
||||||
SET(VERSION_SCRIPT_LINK_FLAGS
|
SET(VERSION_SCRIPT_LINK_FLAGS
|
||||||
"-Wl,${CMAKE_CURRENT_BINARY_DIR}/libmysql_versions.ld")
|
"-Wl,${CMAKE_CURRENT_BINARY_DIR}/libmysql_versions.ld")
|
||||||
|
@ -5762,5 +5762,20 @@ DROP TABLE t1;
|
|||||||
# End of ctype_utf8_ilseq.inc
|
# End of ctype_utf8_ilseq.inc
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
# MDEV-8067 correct fix for MySQL Bug # 19699237: UNINITIALIZED VARIABLE IN ITEM_FIELD::STR_RESULT
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8);
|
||||||
|
CREATE TABLE t2 (a VARCHAR(10) CHARACTER SET latin1);
|
||||||
|
INSERT INTO t1 VALUES ('aaa');
|
||||||
|
INSERT INTO t2 VALUES ('aaa');
|
||||||
|
SELECT (SELECT CONCAT(a),1 FROM t1) <=> (SELECT CONCAT(a),1 FROM t2);
|
||||||
|
(SELECT CONCAT(a),1 FROM t1) <=> (SELECT CONCAT(a),1 FROM t2)
|
||||||
|
1
|
||||||
|
INSERT INTO t1 VALUES ('aaa');
|
||||||
|
INSERT INTO t2 VALUES ('aaa');
|
||||||
|
SELECT (SELECT CONCAT(a),1 FROM t1) <=> (SELECT CONCAT(a),1 FROM t2);
|
||||||
|
ERROR 21000: Subquery returns more than 1 row
|
||||||
|
DROP TABLE t1, t2;
|
||||||
|
#
|
||||||
# End of 5.5 tests
|
# End of 5.5 tests
|
||||||
#
|
#
|
||||||
|
@ -1444,3 +1444,9 @@ column_get(column_create(1, "18446744073709552001" as char), 1 as int)
|
|||||||
Warnings:
|
Warnings:
|
||||||
Warning 1918 Encountered illegal value '18446744073709552001' when converting to INT
|
Warning 1918 Encountered illegal value '18446744073709552001' when converting to INT
|
||||||
Note 1105 Cast to signed converted positive out-of-range integer to it's negative complement
|
Note 1105 Cast to signed converted positive out-of-range integer to it's negative complement
|
||||||
|
#
|
||||||
|
# MDEV-7505 - Too large scale in DECIMAL dynamic column getter crashes
|
||||||
|
# mysqld
|
||||||
|
#
|
||||||
|
SELECT COLUMN_GET(`x`, 'y' AS DECIMAL(5,34));
|
||||||
|
ERROR 42000: Too big scale 34 specified for ''y''. Maximum is 30.
|
||||||
|
1
mysql-test/r/empty_server_name-8224.result
Normal file
1
mysql-test/r/empty_server_name-8224.result
Normal file
@ -0,0 +1 @@
|
|||||||
|
create server '' foreign data wrapper w2 options (host '127.0.0.1');
|
@ -934,7 +934,7 @@ LINESTRING(0 0,1 1,2 2)
|
|||||||
create table t2 as select f2 as a from t1 union select f3 from t1;
|
create table t2 as select f2 as a from t1 union select f3 from t1;
|
||||||
desc t2;
|
desc t2;
|
||||||
Field Type Null Key Default Extra
|
Field Type Null Key Default Extra
|
||||||
a point YES NULL
|
a geometry YES NULL
|
||||||
select AsText(a) from t2;
|
select AsText(a) from t2;
|
||||||
AsText(a)
|
AsText(a)
|
||||||
POINT(1 1)
|
POINT(1 1)
|
||||||
|
@ -2342,7 +2342,7 @@ DROP TABLE t1;
|
|||||||
create table t1 (a int, b int);
|
create table t1 (a int, b int);
|
||||||
insert into t1 values (1,11), (1,12), (2,22),(2,23), (4,44),(4,45);
|
insert into t1 values (1,11), (1,12), (2,22),(2,23), (4,44),(4,45);
|
||||||
create table t2 (c int, d int);
|
create table t2 (c int, d int);
|
||||||
insert into t2 values (1,11), (1,12), (2,22),(2,23), (4,44),(4,45);
|
insert into t2 values (1,11), (2,22), (4,44);
|
||||||
select distinct a,sum(b), (select d from t2 where c=a order by max(b) limit 1) from t1 group by a order by max(b);
|
select distinct a,sum(b), (select d from t2 where c=a order by max(b) limit 1) from t1 group by a order by max(b);
|
||||||
a sum(b) (select d from t2 where c=a order by max(b) limit 1)
|
a sum(b) (select d from t2 where c=a order by max(b) limit 1)
|
||||||
1 23 11
|
1 23 11
|
||||||
|
@ -6,3 +6,15 @@ select variable_name from information_schema.session_variables where variable_na
|
|||||||
(select variable_name from information_schema.session_variables where variable_name = 'basedir');
|
(select variable_name from information_schema.session_variables where variable_name = 'basedir');
|
||||||
variable_name
|
variable_name
|
||||||
BASEDIR
|
BASEDIR
|
||||||
|
create table t1 (a char);
|
||||||
|
insert t1 values ('a'),('t'),('z');
|
||||||
|
flush status;
|
||||||
|
select a, exists (select 1 from information_schema.columns where table_schema=concat('tes',a)) from t1;
|
||||||
|
a exists (select 1 from information_schema.columns where table_schema=concat('tes',a))
|
||||||
|
a 0
|
||||||
|
t 1
|
||||||
|
z 0
|
||||||
|
show status like 'created_tmp_tables';
|
||||||
|
Variable_name Value
|
||||||
|
Created_tmp_tables 38
|
||||||
|
drop table t1;
|
||||||
|
@ -2522,6 +2522,17 @@ test.t1 check error Size of indexfile is: 1024 Should be: 2048
|
|||||||
test.t1 check warning Size of datafile is: 14 Should be: 7
|
test.t1 check warning Size of datafile is: 14 Should be: 7
|
||||||
test.t1 check error Corrupt
|
test.t1 check error Corrupt
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# MDEV-3870 - Valgrind warnings on OPTIMIZE MyISAM or Aria TABLE with
|
||||||
|
# disabled keys
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (a INT, KEY(a)) ENGINE=MyISAM;
|
||||||
|
INSERT INTO t1 VALUES (4),(3),(1),(0);
|
||||||
|
ALTER TABLE t1 DISABLE KEYS;
|
||||||
|
OPTIMIZE TABLE t1;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 optimize status OK
|
||||||
|
DROP TABLE t1;
|
||||||
show variables like 'myisam_block_size';
|
show variables like 'myisam_block_size';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
myisam_block_size 1024
|
myisam_block_size 1024
|
||||||
|
@ -60,3 +60,12 @@ INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset,
|
|||||||
#
|
#
|
||||||
TRUNCATE TABLE time_zone_leap_second;
|
TRUNCATE TABLE time_zone_leap_second;
|
||||||
ALTER TABLE time_zone_leap_second ORDER BY Transition_time;
|
ALTER TABLE time_zone_leap_second ORDER BY Transition_time;
|
||||||
|
#
|
||||||
|
# MDEV-6236 - [PATCH] mysql_tzinfo_to_sql may produce invalid SQL
|
||||||
|
#
|
||||||
|
TRUNCATE TABLE time_zone;
|
||||||
|
TRUNCATE TABLE time_zone_name;
|
||||||
|
TRUNCATE TABLE time_zone_transition;
|
||||||
|
TRUNCATE TABLE time_zone_transition_type;
|
||||||
|
ALTER TABLE time_zone_transition ORDER BY Time_zone_id, Transition_time;
|
||||||
|
ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id;
|
||||||
|
@ -3,6 +3,41 @@ drop table if exists t1,v1,v2,v3,v4,v1badcheck;
|
|||||||
drop view if exists t1,v1,v2,v3,v4,v1badcheck;
|
drop view if exists t1,v1,v2,v3,v4,v1badcheck;
|
||||||
create table t1(a int);
|
create table t1(a int);
|
||||||
create table kv(k varchar(30) NOT NULL PRIMARY KEY,v varchar(50));
|
create table kv(k varchar(30) NOT NULL PRIMARY KEY,v varchar(50));
|
||||||
|
create view v1 as select 1;
|
||||||
|
repair table t1 quick;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 repair status OK
|
||||||
|
repair table t1 extended;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 repair status OK
|
||||||
|
repair table t1 use_frm;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 repair status OK
|
||||||
|
repair table t1 from mysql;
|
||||||
|
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'from mysql' at line 1
|
||||||
|
repair view v1 quick;
|
||||||
|
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'quick' at line 1
|
||||||
|
repair view v1 extended;
|
||||||
|
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'extended' at line 1
|
||||||
|
repair view v1 use_frm;
|
||||||
|
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'use_frm' at line 1
|
||||||
|
repair view v1 from mysql;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.v1 repair status OK
|
||||||
|
check view v1 quick;
|
||||||
|
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'quick' at line 1
|
||||||
|
check view v1 fast;
|
||||||
|
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'fast' at line 1
|
||||||
|
check view v1 medium;
|
||||||
|
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'medium' at line 1
|
||||||
|
check view v1 extended;
|
||||||
|
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'extended' at line 1
|
||||||
|
check view v1 changed;
|
||||||
|
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'changed' at line 1
|
||||||
|
check view v1 for upgrade;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.v1 check status OK
|
||||||
|
drop view v1;
|
||||||
flush tables;
|
flush tables;
|
||||||
check view v1;
|
check view v1;
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
|
@ -316,3 +316,26 @@ CREATE TABLE test.`t.1` (id int);
|
|||||||
mysqlcheck test t.1
|
mysqlcheck test t.1
|
||||||
test.t.1 OK
|
test.t.1 OK
|
||||||
drop table test.`t.1`;
|
drop table test.`t.1`;
|
||||||
|
create view v1 as select 1;
|
||||||
|
mysqlcheck --process-views test
|
||||||
|
test.v1 OK
|
||||||
|
mysqlcheck --process-views --extended test
|
||||||
|
test.v1 OK
|
||||||
|
mysqlcheck --process-views --fast test
|
||||||
|
mysqlcheck --process-views --quick test
|
||||||
|
test.v1 OK
|
||||||
|
mysqlcheck --process-views --check-only-changed test
|
||||||
|
mysqlcheck --process-views --medium-check test
|
||||||
|
test.v1 OK
|
||||||
|
mysqlcheck --process-views --check-upgrade test
|
||||||
|
test.v1 OK
|
||||||
|
drop view v1;
|
||||||
|
create table t1(a int);
|
||||||
|
mysqlcheck --process-views --check-upgrade --auto-repair test
|
||||||
|
test.t1 OK
|
||||||
|
test.v1 Needs upgrade
|
||||||
|
|
||||||
|
Repairing views
|
||||||
|
test.v1 OK
|
||||||
|
drop view v1;
|
||||||
|
drop table t1;
|
||||||
|
@ -367,33 +367,33 @@ DROP TABLE t1;
|
|||||||
create table t1 (a int) engine=innodb partition by hash(a) ;
|
create table t1 (a int) engine=innodb partition by hash(a) ;
|
||||||
show table status like 't1';
|
show table status like 't1';
|
||||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||||
t1 InnoDB 10 Compact 2 8192 16384 0 0 # NULL NULL NULL NULL latin1_swedish_ci NULL partitioned
|
t1 InnoDB 10 Compact 2 8192 16384 0 0 # NULL # NULL NULL latin1_swedish_ci NULL partitioned
|
||||||
drop table t1;
|
drop table t1;
|
||||||
create table t1 (a int)
|
create table t1 (a int)
|
||||||
engine = innodb
|
engine = innodb
|
||||||
partition by key (a);
|
partition by key (a);
|
||||||
show table status;
|
show table status;
|
||||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||||
t1 InnoDB 10 Compact 2 8192 16384 0 0 # NULL NULL NULL NULL latin1_swedish_ci NULL partitioned
|
t1 InnoDB 10 Compact 2 8192 16384 0 0 # NULL # NULL NULL latin1_swedish_ci NULL partitioned
|
||||||
insert into t1 values (0), (1), (2), (3);
|
insert into t1 values (0), (1), (2), (3);
|
||||||
show table status;
|
show table status;
|
||||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||||
t1 InnoDB 10 Compact 4 4096 16384 0 0 # NULL NULL NULL NULL latin1_swedish_ci NULL partitioned
|
t1 InnoDB 10 Compact 4 4096 16384 0 0 # NULL # NULL NULL latin1_swedish_ci NULL partitioned
|
||||||
drop table t1;
|
drop table t1;
|
||||||
create table t1 (a int auto_increment primary key)
|
create table t1 (a int auto_increment primary key)
|
||||||
engine = innodb
|
engine = innodb
|
||||||
partition by key (a);
|
partition by key (a);
|
||||||
show table status;
|
show table status;
|
||||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||||
t1 InnoDB 10 Compact 2 8192 16384 0 0 # 1 NULL NULL NULL latin1_swedish_ci NULL partitioned
|
t1 InnoDB 10 Compact 2 8192 16384 0 0 # 1 # NULL NULL latin1_swedish_ci NULL partitioned
|
||||||
insert into t1 values (NULL), (NULL), (NULL), (NULL);
|
insert into t1 values (NULL), (NULL), (NULL), (NULL);
|
||||||
show table status;
|
show table status;
|
||||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||||
t1 InnoDB 10 Compact 4 4096 16384 0 0 # 5 NULL NULL NULL latin1_swedish_ci NULL partitioned
|
t1 InnoDB 10 Compact 4 4096 16384 0 0 # 5 # NULL NULL latin1_swedish_ci NULL partitioned
|
||||||
insert into t1 values (NULL), (NULL), (NULL), (NULL);
|
insert into t1 values (NULL), (NULL), (NULL), (NULL);
|
||||||
show table status;
|
show table status;
|
||||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||||
t1 InnoDB 10 Compact 8 2048 16384 0 0 # 9 NULL NULL NULL latin1_swedish_ci NULL partitioned
|
t1 InnoDB 10 Compact 8 2048 16384 0 0 # 9 # NULL NULL latin1_swedish_ci NULL partitioned
|
||||||
drop table t1;
|
drop table t1;
|
||||||
create table t1 (a int)
|
create table t1 (a int)
|
||||||
partition by key (a)
|
partition by key (a)
|
||||||
@ -575,6 +575,17 @@ a b
|
|||||||
0 1
|
0 1
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
#
|
#
|
||||||
|
# Bug #17299181 CREATE_TIME AND UPDATE_TIME ARE
|
||||||
|
# WRONG FOR PARTITIONED TABLES
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (a int, PRIMARY KEY (a)) ENGINE=InnoDB
|
||||||
|
PARTITION BY HASH (a) PARTITIONS 2;
|
||||||
|
SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE
|
||||||
|
CREATE_TIME IS NOT NULL AND TABLE_NAME='t1';
|
||||||
|
COUNT(*)
|
||||||
|
1
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
# BUG#12912171 - ASSERTION FAILED: QUICK->HEAD->READ_SET ==
|
# BUG#12912171 - ASSERTION FAILED: QUICK->HEAD->READ_SET ==
|
||||||
# SAVE_READ_SET
|
# SAVE_READ_SET
|
||||||
#
|
#
|
||||||
|
39
mysql-test/r/range_innodb.result
Normal file
39
mysql-test/r/range_innodb.result
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
#
|
||||||
|
# Range optimizer (and related) tests that need InnoDB.
|
||||||
|
#
|
||||||
|
drop table if exists t0, t1, t2;
|
||||||
|
#
|
||||||
|
# MDEV-6735: Range checked for each record used with key
|
||||||
|
#
|
||||||
|
create table t0(a int);
|
||||||
|
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||||
|
create table t1(a int);
|
||||||
|
insert into t1 select A.a + B.a* 10 + C.a * 100 + D.a * 1000
|
||||||
|
from t0 A, t0 B, t0 C, t0 D;
|
||||||
|
create table t2 (
|
||||||
|
a int,
|
||||||
|
b int,
|
||||||
|
filler1 char(100),
|
||||||
|
filler2 char(100),
|
||||||
|
filler3 char(100),
|
||||||
|
filler4 char(100),
|
||||||
|
key(a),
|
||||||
|
key(b)
|
||||||
|
) engine=innodb;
|
||||||
|
insert into t2
|
||||||
|
select
|
||||||
|
a,a,
|
||||||
|
repeat('0123456789', 10),
|
||||||
|
repeat('0123456789', 10),
|
||||||
|
repeat('0123456789', 10),
|
||||||
|
repeat('0123456789', 10)
|
||||||
|
from t1;
|
||||||
|
analyze table t2;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t2 analyze status OK
|
||||||
|
# The following must not use "Range checked for each record":
|
||||||
|
explain select * from t0 left join t2 on t2.a <t0.a and t2.b between 50 and 250;
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t0 ALL NULL NULL NULL NULL 10
|
||||||
|
1 SIMPLE t2 range a,b b 5 NULL 201 Using where; Using join buffer (flat, BNL join)
|
||||||
|
drop table t0,t1,t2;
|
15
mysql-test/r/ssl_7937,nossl.result
Normal file
15
mysql-test/r/ssl_7937,nossl.result
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
create procedure have_ssl()
|
||||||
|
select if(variable_value > '','yes','no') as 'have_ssl'
|
||||||
|
from information_schema.session_status
|
||||||
|
where variable_name='ssl_cipher';
|
||||||
|
mysql --ssl-ca=cacert.pem -e "call test.have_ssl()"
|
||||||
|
have_ssl
|
||||||
|
no
|
||||||
|
mysql --ssl -e "call test.have_ssl()"
|
||||||
|
have_ssl
|
||||||
|
no
|
||||||
|
mysql --ssl-ca=cacert.pem --ssl-verify-server-cert -e "call test.have_ssl()"
|
||||||
|
ERROR 2026 (HY000): SSL connection error: SSL is required, but the server does not support it
|
||||||
|
mysql --ssl --ssl-verify-server-cert -e "call test.have_ssl()"
|
||||||
|
ERROR 2026 (HY000): SSL connection error: SSL is required, but the server does not support it
|
||||||
|
drop procedure have_ssl;
|
16
mysql-test/r/ssl_7937.result
Normal file
16
mysql-test/r/ssl_7937.result
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
create procedure have_ssl()
|
||||||
|
select if(variable_value > '','yes','no') as 'have_ssl'
|
||||||
|
from information_schema.session_status
|
||||||
|
where variable_name='ssl_cipher';
|
||||||
|
mysql --ssl-ca=cacert.pem -e "call test.have_ssl()"
|
||||||
|
have_ssl
|
||||||
|
yes
|
||||||
|
mysql --ssl -e "call test.have_ssl()"
|
||||||
|
have_ssl
|
||||||
|
yes
|
||||||
|
mysql --ssl-ca=cacert.pem --ssl-verify-server-cert -e "call test.have_ssl()"
|
||||||
|
have_ssl
|
||||||
|
yes
|
||||||
|
mysql --ssl --ssl-verify-server-cert -e "call test.have_ssl()"
|
||||||
|
ERROR 2026 (HY000): SSL connection error: Failed to verify the server certificate
|
||||||
|
drop procedure have_ssl;
|
33
mysql-test/r/truncate-stale-6500.result
Normal file
33
mysql-test/r/truncate-stale-6500.result
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
SET GLOBAL query_cache_size=1024*1024*8;
|
||||||
|
CREATE TABLE `test` (
|
||||||
|
`uniqueId` INT NOT NULL,
|
||||||
|
`partitionId` INT NOT NULL,
|
||||||
|
PRIMARY KEY (`uniqueId`,`partitionId`)
|
||||||
|
) ENGINE=InnoDB PARTITION BY LIST (partitionId) (
|
||||||
|
PARTITION p01 VALUES IN (1),
|
||||||
|
PARTITION p02 VALUES IN (2)
|
||||||
|
);
|
||||||
|
INSERT INTO `test`(`uniqueId`,`partitionId`) VALUES(407237055, 2);
|
||||||
|
SELECT * FROM `test`;
|
||||||
|
uniqueId partitionId
|
||||||
|
407237055 2
|
||||||
|
#Confirms 1 row in partition 'p02'
|
||||||
|
SELECT TABLE_NAME, PARTITION_NAME, TABLE_ROWS FROM information_schema.PARTITIONS where TABLE_NAME = 'test';
|
||||||
|
TABLE_NAME PARTITION_NAME TABLE_ROWS
|
||||||
|
test p01 0
|
||||||
|
test p02 1
|
||||||
|
ALTER TABLE `test` TRUNCATE PARTITION `p02`;
|
||||||
|
#Confirms no more rows in partition 'p02'
|
||||||
|
SELECT TABLE_NAME, PARTITION_NAME, TABLE_ROWS FROM information_schema.PARTITIONS where TABLE_NAME = 'test';
|
||||||
|
TABLE_NAME PARTITION_NAME TABLE_ROWS
|
||||||
|
test p01 0
|
||||||
|
test p02 0
|
||||||
|
#Before the patch, this returned the previously existing values.
|
||||||
|
SELECT * FROM `test`;
|
||||||
|
uniqueId partitionId
|
||||||
|
SELECT SQL_CACHE * FROM `test`;
|
||||||
|
uniqueId partitionId
|
||||||
|
SELECT SQL_NO_CACHE * FROM `test`;
|
||||||
|
uniqueId partitionId
|
||||||
|
DROP TABLE test;
|
||||||
|
SET GLOBAL query_cache_size=DEFAULT;
|
@ -994,3 +994,24 @@ GROUP BY t2.col0
|
|||||||
WHERE CONCAT(t1.col1, CAST(subq.col0 AS DECIMAL));
|
WHERE CONCAT(t1.col1, CAST(subq.col0 AS DECIMAL));
|
||||||
1
|
1
|
||||||
DROP TABLE t1, t2;
|
DROP TABLE t1, t2;
|
||||||
|
#
|
||||||
|
# Start of 5.5 tests
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# MDEV-8267 Add /*old*/ comment into I_S.COLUMN_TYPE for old DECIMAL
|
||||||
|
#
|
||||||
|
SHOW CREATE TABLE t1dec102;
|
||||||
|
Table Create Table
|
||||||
|
t1dec102 CREATE TABLE `t1dec102` (
|
||||||
|
`a` decimal(10,2)/*old*/ DEFAULT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
SHOW COLUMNS FROM t1dec102;
|
||||||
|
Field Type Null Key Default Extra
|
||||||
|
a decimal(10,2)/*old*/ YES NULL
|
||||||
|
SELECT COLUMN_NAME, DATA_TYPE, COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='t1dec102';
|
||||||
|
COLUMN_NAME DATA_TYPE COLUMN_TYPE
|
||||||
|
a decimal decimal(10,2)/*old*/
|
||||||
|
DROP TABLE t1dec102;
|
||||||
|
#
|
||||||
|
# End of 5.5 tests
|
||||||
|
#
|
||||||
|
31
mysql-test/r/update_innodb.result
Normal file
31
mysql-test/r/update_innodb.result
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
CREATE TABLE `t1` (
|
||||||
|
`c1` int(11) NOT NULL,
|
||||||
|
`c2` datetime DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`c1`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||||
|
CREATE TABLE `t2` (
|
||||||
|
`c0` varchar(10) NOT NULL,
|
||||||
|
`c1` int(11) NOT NULL,
|
||||||
|
`c2` int(11) NOT NULL,
|
||||||
|
PRIMARY KEY (`c0`,`c1`),
|
||||||
|
KEY `c1` (`c1`),
|
||||||
|
KEY `c2` (`c2`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||||
|
CREATE TABLE `t3` (
|
||||||
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`c1` datetime NOT NULL,
|
||||||
|
`c2` bigint(20) NOT NULL,
|
||||||
|
`c3` int(4) unsigned NOT NULL,
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
KEY `c2` (`c2`),
|
||||||
|
KEY `c3` (`c3`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||||
|
CREATE TABLE `t4` (
|
||||||
|
`c1` int(11) NOT NULL,
|
||||||
|
`c2` bigint(20) DEFAULT NULL,
|
||||||
|
`c3` int(11) NOT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||||
|
CREATE ALGORITHM=UNDEFINED VIEW `v1` AS select `t4`.`c1` AS `c1`,`t4`.`c2` AS `c2`,`t4`.`c3` AS `c3` from `t4`;
|
||||||
|
UPDATE t1 a JOIN t2 b ON a.c1 = b.c1 JOIN v1 vw ON b.c2 = vw.c1 JOIN t3 del ON vw.c2 = del.c2 SET a.c2 = ( SELECT max(t.c1) FROM t3 t, v1 i WHERE del.c2 = t.c2 AND vw.c3 = i.c3 AND t.c3 = 4 ) WHERE a.c2 IS NULL OR a.c2 < '2011-05-01';
|
||||||
|
drop view v1;
|
||||||
|
drop table t1,t2,t3,t4;
|
@ -5411,6 +5411,24 @@ create view v2 as select t2.* from (t2 left join v1 using (id));
|
|||||||
update t3 left join v2 using (id) set flag=flag+1;
|
update t3 left join v2 using (id) set flag=flag+1;
|
||||||
drop view v2, v1;
|
drop view v2, v1;
|
||||||
drop table t1, t2, t3;
|
drop table t1, t2, t3;
|
||||||
|
#
|
||||||
|
# MDEV-7207 - ALTER VIEW does not change ALGORITM
|
||||||
|
#
|
||||||
|
create table t1 (a int, b int);
|
||||||
|
create algorithm=temptable view v2 (c) as select b+1 from t1;
|
||||||
|
show create view v2;
|
||||||
|
View Create View character_set_client collation_connection
|
||||||
|
v2 CREATE ALGORITHM=TEMPTABLE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select (`t1`.`b` + 1) AS `c` from `t1` latin1 latin1_swedish_ci
|
||||||
|
alter algorithm=undefined view v2 (c) as select b+1 from t1;
|
||||||
|
show create view v2;
|
||||||
|
View Create View character_set_client collation_connection
|
||||||
|
v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select (`t1`.`b` + 1) AS `c` from `t1` latin1 latin1_swedish_ci
|
||||||
|
alter algorithm=merge view v2 (c) as select b+1 from t1;
|
||||||
|
show create view v2;
|
||||||
|
View Create View character_set_client collation_connection
|
||||||
|
v2 CREATE ALGORITHM=MERGE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select (`t1`.`b` + 1) AS `c` from `t1` latin1 latin1_swedish_ci
|
||||||
|
drop view v2;
|
||||||
|
drop table t1;
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
# -- End of 5.5 tests.
|
# -- End of 5.5 tests.
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
|
1
mysql-test/std_data/old_decimal/t1dec102.MYD
Normal file
1
mysql-test/std_data/old_decimal/t1dec102.MYD
Normal file
@ -0,0 +1 @@
|
|||||||
|
<EFBFBD> 123.45<EFBFBD> 123.46<EFBFBD> 123.47
|
BIN
mysql-test/std_data/old_decimal/t1dec102.MYI
Normal file
BIN
mysql-test/std_data/old_decimal/t1dec102.MYI
Normal file
Binary file not shown.
BIN
mysql-test/std_data/old_decimal/t1dec102.frm
Normal file
BIN
mysql-test/std_data/old_decimal/t1dec102.frm
Normal file
Binary file not shown.
@ -327,6 +327,18 @@ INSERT INTO t2 SET a=1;
|
|||||||
INSERT INTO t2 SET b=1;
|
INSERT INTO t2 SET b=1;
|
||||||
UPDATE t1, t2 SET t1.a=10, t2.a=20;
|
UPDATE t1, t2 SET t1.a=10, t2.a=20;
|
||||||
DROP TABLE t1,t2;
|
DROP TABLE t1,t2;
|
||||||
|
INSERT INTO t1dec102 VALUES (-999.99);
|
||||||
|
INSERT INTO t1dec102 VALUES (0);
|
||||||
|
INSERT INTO t1dec102 VALUES (999.99);
|
||||||
|
SELECT * FROM t1dec102 ORDER BY a;
|
||||||
|
a
|
||||||
|
-999.99
|
||||||
|
0.00
|
||||||
|
123.45
|
||||||
|
123.46
|
||||||
|
123.47
|
||||||
|
999.99
|
||||||
|
DROP TABLE t1dec102;
|
||||||
flush logs;
|
flush logs;
|
||||||
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
|
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
|
||||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||||
@ -4131,6 +4143,59 @@ SET TIMESTAMP=1000000000/*!*/;
|
|||||||
DROP TABLE `t1`,`t2` /* generated by server */
|
DROP TABLE `t1`,`t2` /* generated by server */
|
||||||
/*!*/;
|
/*!*/;
|
||||||
# at #
|
# at #
|
||||||
|
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||||
|
SET TIMESTAMP=1000000000/*!*/;
|
||||||
|
BEGIN
|
||||||
|
/*!*/;
|
||||||
|
# at #
|
||||||
|
# at #
|
||||||
|
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1dec102` mapped to number #
|
||||||
|
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F
|
||||||
|
### INSERT INTO `test`.`t1dec102`
|
||||||
|
### SET
|
||||||
|
### @1=!! Old DECIMAL (mysql-4.1 or earlier). Not enough metadata to display the value. # at #
|
||||||
|
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||||
|
SET TIMESTAMP=1000000000/*!*/;
|
||||||
|
COMMIT
|
||||||
|
/*!*/;
|
||||||
|
# at #
|
||||||
|
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||||
|
SET TIMESTAMP=1000000000/*!*/;
|
||||||
|
BEGIN
|
||||||
|
/*!*/;
|
||||||
|
# at #
|
||||||
|
# at #
|
||||||
|
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1dec102` mapped to number #
|
||||||
|
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F
|
||||||
|
### INSERT INTO `test`.`t1dec102`
|
||||||
|
### SET
|
||||||
|
### @1=!! Old DECIMAL (mysql-4.1 or earlier). Not enough metadata to display the value. # at #
|
||||||
|
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||||
|
SET TIMESTAMP=1000000000/*!*/;
|
||||||
|
COMMIT
|
||||||
|
/*!*/;
|
||||||
|
# at #
|
||||||
|
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||||
|
SET TIMESTAMP=1000000000/*!*/;
|
||||||
|
BEGIN
|
||||||
|
/*!*/;
|
||||||
|
# at #
|
||||||
|
# at #
|
||||||
|
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1dec102` mapped to number #
|
||||||
|
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F
|
||||||
|
### INSERT INTO `test`.`t1dec102`
|
||||||
|
### SET
|
||||||
|
### @1=!! Old DECIMAL (mysql-4.1 or earlier). Not enough metadata to display the value. # at #
|
||||||
|
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||||
|
SET TIMESTAMP=1000000000/*!*/;
|
||||||
|
COMMIT
|
||||||
|
/*!*/;
|
||||||
|
# at #
|
||||||
|
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||||
|
SET TIMESTAMP=1000000000/*!*/;
|
||||||
|
DROP TABLE `t1dec102` /* generated by server */
|
||||||
|
/*!*/;
|
||||||
|
# at #
|
||||||
#010909 4:46:40 server id 1 end_log_pos # Rotate to master-bin.000002 pos: 4
|
#010909 4:46:40 server id 1 end_log_pos # Rotate to master-bin.000002 pos: 4
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
# End of log file
|
# End of log file
|
||||||
|
@ -438,9 +438,20 @@ INSERT INTO t2 SET b=1;
|
|||||||
UPDATE t1, t2 SET t1.a=10, t2.a=20;
|
UPDATE t1, t2 SET t1.a=10, t2.a=20;
|
||||||
DROP TABLE t1,t2;
|
DROP TABLE t1,t2;
|
||||||
|
|
||||||
|
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||||
|
|
||||||
|
--copy_file std_data/old_decimal/t1dec102.frm $MYSQLD_DATADIR/test/t1dec102.frm
|
||||||
|
--copy_file std_data/old_decimal/t1dec102.MYD $MYSQLD_DATADIR/test/t1dec102.MYD
|
||||||
|
--copy_file std_data/old_decimal/t1dec102.MYI $MYSQLD_DATADIR/test/t1dec102.MYI
|
||||||
|
|
||||||
|
INSERT INTO t1dec102 VALUES (-999.99);
|
||||||
|
INSERT INTO t1dec102 VALUES (0);
|
||||||
|
INSERT INTO t1dec102 VALUES (999.99);
|
||||||
|
SELECT * FROM t1dec102 ORDER BY a;
|
||||||
|
DROP TABLE t1dec102;
|
||||||
|
|
||||||
flush logs;
|
flush logs;
|
||||||
|
|
||||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
|
||||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9]*[.][0-9]{1,3})[0-9e+-]*[^ ]*(.*(FLOAT|DOUBLE).*[*].)/\1...\2/
|
--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9]*[.][0-9]{1,3})[0-9e+-]*[^ ]*(.*(FLOAT|DOUBLE).*[*].)/\1...\2/
|
||||||
--exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001
|
--exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001
|
||||||
|
@ -45,8 +45,8 @@ INSERT INTO t3 VALUES (1),(2);
|
|||||||
INSERT INTO test1.t1 VALUES (3,3);
|
INSERT INTO test1.t1 VALUES (3,3);
|
||||||
|
|
||||||
USE test1;
|
USE test1;
|
||||||
LOAD DATA INFILE '../../std_data/loaddata7.dat' INTO TABLE t1
|
LOAD DATA INFILE '../../std_data/loaddata7.dat' INTO TABLE t1
|
||||||
FIELDS TERMINATED BY ',' LINES TERMINATED BY '\r\n';
|
FIELDS TERMINATED BY ',' LINES TERMINATED BY '\r\n';
|
||||||
DELETE FROM test3.t3 WHERE a=1;
|
DELETE FROM test3.t3 WHERE a=1;
|
||||||
|
|
||||||
flush logs;
|
flush logs;
|
||||||
|
17
mysql-test/suite/innodb/r/xa_recovery.result
Normal file
17
mysql-test/suite/innodb/r/xa_recovery.result
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t1 VALUES (1);
|
||||||
|
XA START 'x';
|
||||||
|
UPDATE t1 set a=2;
|
||||||
|
XA END 'x';
|
||||||
|
XA PREPARE 'x';
|
||||||
|
call mtr.add_suppression("Found 1 prepared XA transactions");
|
||||||
|
SELECT * FROM t1 LOCK IN SHARE MODE;
|
||||||
|
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||||
|
SELECT * FROM t1;
|
||||||
|
a
|
||||||
|
2
|
||||||
|
XA ROLLBACK 'x';
|
||||||
|
SELECT * FROM t1;
|
||||||
|
a
|
||||||
|
1
|
||||||
|
DROP TABLE t1;
|
@ -1,11 +1,6 @@
|
|||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
--source include/have_debug.inc
|
--source include/have_debug.inc
|
||||||
|
|
||||||
if (`select plugin_auth_version <= "5.5.39-MariaDB-36.0" from information_schema.plugins where plugin_name='innodb'`)
|
|
||||||
{
|
|
||||||
--skip Not fixed in XtraDB as of 5.5.39-MariaDB-36.0 or earlier
|
|
||||||
}
|
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # Bug #19471516 SERVER CRASHES WHEN EXECUTING ALTER TABLE
|
--echo # Bug #19471516 SERVER CRASHES WHEN EXECUTING ALTER TABLE
|
||||||
--echo # ADD FOREIGN KEY
|
--echo # ADD FOREIGN KEY
|
||||||
|
@ -1,8 +1,3 @@
|
|||||||
if (`select plugin_auth_version <= "5.5.37-MariaDB-34.0" from information_schema.plugins where plugin_name='innodb'`)
|
|
||||||
{
|
|
||||||
--skip Not fixed in XtraDB as of 5.5.37-MariaDB-34.0 or earlier
|
|
||||||
}
|
|
||||||
|
|
||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
# embedded server ignores 'delayed', so skip this
|
# embedded server ignores 'delayed', so skip this
|
||||||
-- source include/not_embedded.inc
|
-- source include/not_embedded.inc
|
||||||
|
@ -2,11 +2,6 @@
|
|||||||
--source include/have_debug.inc
|
--source include/have_debug.inc
|
||||||
--source include/have_partition.inc
|
--source include/have_partition.inc
|
||||||
|
|
||||||
if (`select plugin_auth_version <= "5.5.40-MariaDB-36.1" from information_schema.plugins where plugin_name='innodb'`)
|
|
||||||
{
|
|
||||||
--skip Not fixed in XtraDB as of 5.5.40-MariaDB-36.1 or earlier
|
|
||||||
}
|
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # Bug#19904003 INNODB_LIMIT_OPTIMISTIC_INSERT_DEBUG=1
|
--echo # Bug#19904003 INNODB_LIMIT_OPTIMISTIC_INSERT_DEBUG=1
|
||||||
--echo # CAUSES INFINITE PAGE SPLIT
|
--echo # CAUSES INFINITE PAGE SPLIT
|
||||||
|
@ -1,11 +1,6 @@
|
|||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
--source include/big_test.inc
|
--source include/big_test.inc
|
||||||
|
|
||||||
if (`select plugin_auth_version <= "5.5.40-MariaDB-36.1" from information_schema.plugins where plugin_name='innodb'`)
|
|
||||||
{
|
|
||||||
--skip Not fixed in XtraDB as of 5.5.40-MariaDB-36.1 or earlier
|
|
||||||
}
|
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # Bug #19306524 FAILING ASSERTION WITH TEMP TABLE FOR A PROCEDURE
|
--echo # Bug #19306524 FAILING ASSERTION WITH TEMP TABLE FOR A PROCEDURE
|
||||||
--echo # CALLED FROM A FUNCTION
|
--echo # CALLED FROM A FUNCTION
|
||||||
|
@ -1,10 +1,5 @@
|
|||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
|
|
||||||
if (`select plugin_auth_version <= "5.5.40-MariaDB-36.1" from information_schema.plugins where plugin_name='innodb'`)
|
|
||||||
{
|
|
||||||
--skip Not fixed in XtraDB as of 5.5.40-MariaDB-36.1 or earlier
|
|
||||||
}
|
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # Bug #17852083 PRINT A WARNING WHEN DDL HAS AN ERROR IN
|
--echo # Bug #17852083 PRINT A WARNING WHEN DDL HAS AN ERROR IN
|
||||||
--echo # INNODB_STRICT_MODE = 1
|
--echo # INNODB_STRICT_MODE = 1
|
||||||
|
47
mysql-test/suite/innodb/t/xa_recovery.test
Normal file
47
mysql-test/suite/innodb/t/xa_recovery.test
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
if (`select plugin_auth_version <= "5.5.43-MariaDB-37.2" from information_schema.plugins where plugin_name='innodb'`)
|
||||||
|
{
|
||||||
|
--skip Not fixed in XtraDB as of 5.5.43-MariaDB-37.2 or earlier
|
||||||
|
}
|
||||||
|
--source include/have_innodb.inc
|
||||||
|
# Embedded server does not support restarting.
|
||||||
|
--source include/not_embedded.inc
|
||||||
|
|
||||||
|
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t1 VALUES (1);
|
||||||
|
connect (con1,localhost,root);
|
||||||
|
XA START 'x'; UPDATE t1 set a=2; XA END 'x'; XA PREPARE 'x';
|
||||||
|
connection default;
|
||||||
|
|
||||||
|
call mtr.add_suppression("Found 1 prepared XA transactions");
|
||||||
|
|
||||||
|
# Kill and restart the server.
|
||||||
|
-- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||||
|
-- shutdown_server 0
|
||||||
|
-- source include/wait_until_disconnected.inc
|
||||||
|
|
||||||
|
-- exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||||
|
-- enable_reconnect
|
||||||
|
-- source include/wait_until_connected_again.inc
|
||||||
|
-- disable_reconnect
|
||||||
|
|
||||||
|
disconnect con1;
|
||||||
|
connect (con1,localhost,root);
|
||||||
|
--send SELECT * FROM t1 LOCK IN SHARE MODE
|
||||||
|
|
||||||
|
connection default;
|
||||||
|
let $wait_condition=
|
||||||
|
select count(*) = 1 from information_schema.processlist
|
||||||
|
where state = 'Sending data' and
|
||||||
|
info = 'SELECT * FROM t1 LOCK IN SHARE MODE';
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
|
||||||
|
--source include/restart_mysqld.inc
|
||||||
|
|
||||||
|
disconnect con1;
|
||||||
|
|
||||||
|
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||||
|
SELECT * FROM t1;
|
||||||
|
XA ROLLBACK 'x';
|
||||||
|
SELECT * FROM t1;
|
||||||
|
|
||||||
|
DROP TABLE t1;
|
@ -6,3 +6,14 @@ OPTIMIZE TABLE t1;
|
|||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
test.t1 optimize status OK
|
test.t1 optimize status OK
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
#
|
||||||
|
# MDEV-3870 - Valgrind warnings on OPTIMIZE MyISAM or Aria TABLE with
|
||||||
|
# disabled keys
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (a INT, KEY(a)) ENGINE=Aria;
|
||||||
|
INSERT INTO t1 VALUES (4),(3),(1),(0);
|
||||||
|
ALTER TABLE t1 DISABLE KEYS;
|
||||||
|
OPTIMIZE TABLE t1;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 optimize status OK
|
||||||
|
DROP TABLE t1;
|
||||||
|
@ -160,3 +160,13 @@ INSERT /*! IGNORE */ INTO t1 VALUES ('urxjxqvwabikpugvexxbxdpxjkeqiuhhuadbcuhoz
|
|||||||
check table t1;
|
check table t1;
|
||||||
OPTIMIZE TABLE t1;
|
OPTIMIZE TABLE t1;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-3870 - Valgrind warnings on OPTIMIZE MyISAM or Aria TABLE with
|
||||||
|
--echo # disabled keys
|
||||||
|
--echo #
|
||||||
|
CREATE TABLE t1 (a INT, KEY(a)) ENGINE=Aria;
|
||||||
|
INSERT INTO t1 VALUES (4),(3),(1),(0);
|
||||||
|
ALTER TABLE t1 DISABLE KEYS;
|
||||||
|
OPTIMIZE TABLE t1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
File diff suppressed because one or more lines are too long
@ -58,7 +58,10 @@ t1.frm
|
|||||||
t1.par
|
t1.par
|
||||||
SET DEBUG_SYNC='before_open_in_get_all_tables SIGNAL parked WAIT_FOR open';
|
SET DEBUG_SYNC='before_open_in_get_all_tables SIGNAL parked WAIT_FOR open';
|
||||||
SET DEBUG_SYNC='partition_open_error SIGNAL alter WAIT_FOR finish';
|
SET DEBUG_SYNC='partition_open_error SIGNAL alter WAIT_FOR finish';
|
||||||
SELECT * FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME = 't1' AND TABLE_SCHEMA = 'test';
|
SELECT TABLE_SCHEMA, TABLE_NAME, PARTITION_NAME, PARTITION_ORDINAL_POSITION,
|
||||||
|
PARTITION_DESCRIPTION, TABLE_ROWS
|
||||||
|
FROM INFORMATION_SCHEMA.PARTITIONS
|
||||||
|
WHERE TABLE_NAME = 't1' AND TABLE_SCHEMA = 'test';
|
||||||
SET DEBUG_SYNC = 'now WAIT_FOR parked';
|
SET DEBUG_SYNC = 'now WAIT_FOR parked';
|
||||||
# When waiting for the name lock in get_all_tables in sql_show.cc
|
# When waiting for the name lock in get_all_tables in sql_show.cc
|
||||||
# this will not be concurrent any more, thus the TIMEOUT
|
# this will not be concurrent any more, thus the TIMEOUT
|
||||||
@ -70,9 +73,9 @@ ALTER TABLE t1 REORGANIZE PARTITION p0 INTO
|
|||||||
PARTITION p10 VALUES LESS THAN MAXVALUE);
|
PARTITION p10 VALUES LESS THAN MAXVALUE);
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1639 debug sync point wait timed out
|
Warning 1639 debug sync point wait timed out
|
||||||
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME
|
TABLE_SCHEMA TABLE_NAME PARTITION_NAME PARTITION_ORDINAL_POSITION PARTITION_DESCRIPTION TABLE_ROWS
|
||||||
def test t1 p0 NULL 1 NULL RANGE NULL a NULL 10 1 16384 16384 NULL 0 0 NULL NULL NULL NULL default NULL
|
test t1 p0 1 10 1
|
||||||
def test t1 p10 NULL 2 NULL RANGE NULL a NULL MAXVALUE 3 5461 16384 NULL 0 0 NULL NULL NULL NULL default NULL
|
test t1 p10 2 MAXVALUE 3
|
||||||
t1#P#p0.ibd
|
t1#P#p0.ibd
|
||||||
t1#P#p10.ibd
|
t1#P#p10.ibd
|
||||||
t1.frm
|
t1.frm
|
||||||
|
@ -62,7 +62,10 @@ SHOW CREATE TABLE t1;
|
|||||||
SET DEBUG_SYNC='before_open_in_get_all_tables SIGNAL parked WAIT_FOR open';
|
SET DEBUG_SYNC='before_open_in_get_all_tables SIGNAL parked WAIT_FOR open';
|
||||||
SET DEBUG_SYNC='partition_open_error SIGNAL alter WAIT_FOR finish';
|
SET DEBUG_SYNC='partition_open_error SIGNAL alter WAIT_FOR finish';
|
||||||
send
|
send
|
||||||
SELECT * FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME = 't1' AND TABLE_SCHEMA = 'test';
|
SELECT TABLE_SCHEMA, TABLE_NAME, PARTITION_NAME, PARTITION_ORDINAL_POSITION,
|
||||||
|
PARTITION_DESCRIPTION, TABLE_ROWS
|
||||||
|
FROM INFORMATION_SCHEMA.PARTITIONS
|
||||||
|
WHERE TABLE_NAME = 't1' AND TABLE_SCHEMA = 'test';
|
||||||
|
|
||||||
connect (con1, localhost, root,,);
|
connect (con1, localhost, root,,);
|
||||||
SET DEBUG_SYNC = 'now WAIT_FOR parked';
|
SET DEBUG_SYNC = 'now WAIT_FOR parked';
|
||||||
|
@ -45,6 +45,11 @@ id
|
|||||||
2
|
2
|
||||||
alter table t1 rename renamed_t1;
|
alter table t1 rename renamed_t1;
|
||||||
set global server_audit_events='connect,query';
|
set global server_audit_events='connect,query';
|
||||||
|
select 1,
|
||||||
|
2,
|
||||||
|
3;
|
||||||
|
1 2 3
|
||||||
|
1 2 3
|
||||||
insert into t2 values (1), (2);
|
insert into t2 values (1), (2);
|
||||||
select * from t2;
|
select * from t2;
|
||||||
id
|
id
|
||||||
@ -157,6 +162,8 @@ id
|
|||||||
CREATE USER u1 IDENTIFIED BY 'pwd-123';
|
CREATE USER u1 IDENTIFIED BY 'pwd-123';
|
||||||
GRANT ALL ON sa_db TO u2 IDENTIFIED BY "pwd-321";
|
GRANT ALL ON sa_db TO u2 IDENTIFIED BY "pwd-321";
|
||||||
SET PASSWORD FOR u1 = PASSWORD('pwd 098');
|
SET PASSWORD FOR u1 = PASSWORD('pwd 098');
|
||||||
|
SET PASSWORD FOR u1=<secret>;
|
||||||
|
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '=<secret>' at line 1
|
||||||
CREATE USER u3 IDENTIFIED BY '';
|
CREATE USER u3 IDENTIFIED BY '';
|
||||||
drop user u1, u2, u3;
|
drop user u1, u2, u3;
|
||||||
select 2;
|
select 2;
|
||||||
@ -244,6 +251,7 @@ TIME,HOSTNAME,root,localhost,ID,ID,ALTER,test,t1,
|
|||||||
TIME,HOSTNAME,root,localhost,ID,ID,RENAME,test,t1|test.renamed_t1,
|
TIME,HOSTNAME,root,localhost,ID,ID,RENAME,test,t1|test.renamed_t1,
|
||||||
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'alter table t1 rename renamed_t1',0
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'alter table t1 rename renamed_t1',0
|
||||||
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_events=\'connect,query\'',0
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_events=\'connect,query\'',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select 1, 2, 3',0
|
||||||
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'insert into t2 values (1), (2)',0
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'insert into t2 values (1), (2)',0
|
||||||
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t2',0
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t2',0
|
||||||
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t_doesnt_exist',ID
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t_doesnt_exist',ID
|
||||||
@ -318,6 +326,7 @@ TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'/*comment*/ select 2',0
|
|||||||
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER u1 IDENTIFIED BY *****',0
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER u1 IDENTIFIED BY *****',0
|
||||||
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'GRANT ALL ON sa_db TO u2 IDENTIFIED BY *****',0
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'GRANT ALL ON sa_db TO u2 IDENTIFIED BY *****',0
|
||||||
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'SET PASSWORD FOR u1 = PASSWORD(*****)',0
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'SET PASSWORD FOR u1 = PASSWORD(*****)',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'SET PASSWORD FOR u1=<secret>',ID
|
||||||
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER u3 IDENTIFIED BY *****',0
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER u3 IDENTIFIED BY *****',0
|
||||||
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop user u1, u2, u3',0
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop user u1, u2, u3',0
|
||||||
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_events=\'\'',0
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_events=\'\'',0
|
||||||
|
356
mysql-test/suite/plugins/r/thread_pool_server_audit.result
Normal file
356
mysql-test/suite/plugins/r/thread_pool_server_audit.result
Normal file
@ -0,0 +1,356 @@
|
|||||||
|
install plugin server_audit soname 'server_audit';
|
||||||
|
show variables like 'server_audit%';
|
||||||
|
Variable_name Value
|
||||||
|
server_audit_events
|
||||||
|
server_audit_excl_users
|
||||||
|
server_audit_file_path server_audit.log
|
||||||
|
server_audit_file_rotate_now OFF
|
||||||
|
server_audit_file_rotate_size 1000000
|
||||||
|
server_audit_file_rotations 9
|
||||||
|
server_audit_incl_users
|
||||||
|
server_audit_logging OFF
|
||||||
|
server_audit_mode 0
|
||||||
|
server_audit_output_type file
|
||||||
|
server_audit_query_log_limit 1024
|
||||||
|
server_audit_syslog_facility LOG_USER
|
||||||
|
server_audit_syslog_ident mysql-server_auditing
|
||||||
|
server_audit_syslog_info
|
||||||
|
server_audit_syslog_priority LOG_INFO
|
||||||
|
set global server_audit_file_path=null;
|
||||||
|
set global server_audit_incl_users=null;
|
||||||
|
set global server_audit_file_path='server_audit.log';
|
||||||
|
set global server_audit_output_type=file;
|
||||||
|
set global server_audit_logging=on;
|
||||||
|
connect(localhost,no_such_user,,mysql,MASTER_PORT,MASTER_SOCKET);
|
||||||
|
ERROR 28000: Access denied for user 'no_such_user'@'localhost' (using password: NO)
|
||||||
|
set global server_audit_incl_users='odin, dva, tri';
|
||||||
|
create table t1 (id int);
|
||||||
|
set global server_audit_incl_users='odin, root, dva, tri';
|
||||||
|
create table t2 (id int);
|
||||||
|
set global server_audit_excl_users='odin, dva, tri';
|
||||||
|
Warnings:
|
||||||
|
Warning 1 User 'odin' is in the server_audit_incl_users, so wasn't added.
|
||||||
|
Warning 1 User 'dva' is in the server_audit_incl_users, so wasn't added.
|
||||||
|
Warning 1 User 'tri' is in the server_audit_incl_users, so wasn't added.
|
||||||
|
insert into t1 values (1), (2);
|
||||||
|
select * from t1;
|
||||||
|
id
|
||||||
|
1
|
||||||
|
2
|
||||||
|
set global server_audit_incl_users='odin, root, dva, tri';
|
||||||
|
insert into t2 values (1), (2);
|
||||||
|
select * from t2;
|
||||||
|
id
|
||||||
|
1
|
||||||
|
2
|
||||||
|
alter table t1 rename renamed_t1;
|
||||||
|
set global server_audit_events='connect,query';
|
||||||
|
select 1,
|
||||||
|
2,
|
||||||
|
3;
|
||||||
|
1 2 3
|
||||||
|
1 2 3
|
||||||
|
insert into t2 values (1), (2);
|
||||||
|
select * from t2;
|
||||||
|
id
|
||||||
|
1
|
||||||
|
2
|
||||||
|
1
|
||||||
|
2
|
||||||
|
select * from t_doesnt_exist;
|
||||||
|
ERROR 42S02: Table 'test.t_doesnt_exist' doesn't exist
|
||||||
|
syntax_error_query;
|
||||||
|
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'syntax_error_query' at line 1
|
||||||
|
drop table renamed_t1, t2;
|
||||||
|
show variables like 'server_audit%';
|
||||||
|
Variable_name Value
|
||||||
|
server_audit_events CONNECT,QUERY
|
||||||
|
server_audit_excl_users
|
||||||
|
server_audit_file_path server_audit.log
|
||||||
|
server_audit_file_rotate_now OFF
|
||||||
|
server_audit_file_rotate_size 1000000
|
||||||
|
server_audit_file_rotations 9
|
||||||
|
server_audit_incl_users odin, root, dva, tri
|
||||||
|
server_audit_logging ON
|
||||||
|
server_audit_mode 0
|
||||||
|
server_audit_output_type file
|
||||||
|
server_audit_query_log_limit 1024
|
||||||
|
server_audit_syslog_facility LOG_USER
|
||||||
|
server_audit_syslog_ident mysql-server_auditing
|
||||||
|
server_audit_syslog_info
|
||||||
|
server_audit_syslog_priority LOG_INFO
|
||||||
|
set global server_audit_mode=1;
|
||||||
|
set global server_audit_events='';
|
||||||
|
create database sa_db;
|
||||||
|
create table t1 (id2 int);
|
||||||
|
insert into t1 values (1), (2);
|
||||||
|
select * from t1;
|
||||||
|
id2
|
||||||
|
1
|
||||||
|
2
|
||||||
|
drop table t1;
|
||||||
|
use sa_db;
|
||||||
|
create table sa_t1(id int);
|
||||||
|
insert into sa_t1 values (1), (2);
|
||||||
|
drop table sa_t1;
|
||||||
|
drop database sa_db;
|
||||||
|
create database sa_db;
|
||||||
|
use sa_db;
|
||||||
|
CREATE USER u1 IDENTIFIED BY 'pwd-123';
|
||||||
|
GRANT ALL ON sa_db TO u2 IDENTIFIED BY "pwd-321";
|
||||||
|
SET PASSWORD FOR u1 = PASSWORD('pwd 098');
|
||||||
|
CREATE USER u3 IDENTIFIED BY '';
|
||||||
|
drop user u1, u2, u3;
|
||||||
|
set global server_audit_events='query_ddl';
|
||||||
|
create table t1(id int);
|
||||||
|
insert into t1 values (1), (2);
|
||||||
|
select * from t1;
|
||||||
|
id
|
||||||
|
1
|
||||||
|
2
|
||||||
|
select 2;
|
||||||
|
2
|
||||||
|
2
|
||||||
|
(select 2);
|
||||||
|
2
|
||||||
|
2
|
||||||
|
/*! select 2*/;
|
||||||
|
2
|
||||||
|
2
|
||||||
|
/*comment*/ select 2;
|
||||||
|
2
|
||||||
|
2
|
||||||
|
drop table t1;
|
||||||
|
set global server_audit_events='query_ddl,query_dml';
|
||||||
|
create table t1(id int);
|
||||||
|
insert into t1 values (1), (2);
|
||||||
|
select * from t1;
|
||||||
|
id
|
||||||
|
1
|
||||||
|
2
|
||||||
|
select 2;
|
||||||
|
2
|
||||||
|
2
|
||||||
|
drop table t1;
|
||||||
|
set global server_audit_events='query_dml';
|
||||||
|
create table t1(id int);
|
||||||
|
insert into t1 values (1), (2);
|
||||||
|
select * from t1;
|
||||||
|
id
|
||||||
|
1
|
||||||
|
2
|
||||||
|
select 2;
|
||||||
|
2
|
||||||
|
2
|
||||||
|
(select 2);
|
||||||
|
2
|
||||||
|
2
|
||||||
|
/*! select 2*/;
|
||||||
|
2
|
||||||
|
2
|
||||||
|
/*comment*/ select 2;
|
||||||
|
2
|
||||||
|
2
|
||||||
|
drop table t1;
|
||||||
|
set global server_audit_events='query_dcl';
|
||||||
|
create table t1(id int);
|
||||||
|
insert into t1 values (1), (2);
|
||||||
|
select * from t1;
|
||||||
|
id
|
||||||
|
1
|
||||||
|
2
|
||||||
|
CREATE USER u1 IDENTIFIED BY 'pwd-123';
|
||||||
|
GRANT ALL ON sa_db TO u2 IDENTIFIED BY "pwd-321";
|
||||||
|
SET PASSWORD FOR u1 = PASSWORD('pwd 098');
|
||||||
|
SET PASSWORD FOR u1=<secret>;
|
||||||
|
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '=<secret>' at line 1
|
||||||
|
CREATE USER u3 IDENTIFIED BY '';
|
||||||
|
drop user u1, u2, u3;
|
||||||
|
select 2;
|
||||||
|
2
|
||||||
|
2
|
||||||
|
(select 2);
|
||||||
|
2
|
||||||
|
2
|
||||||
|
/*! select 2*/;
|
||||||
|
2
|
||||||
|
2
|
||||||
|
/*comment*/ select 2;
|
||||||
|
2
|
||||||
|
2
|
||||||
|
drop table t1;
|
||||||
|
set global server_audit_events='';
|
||||||
|
set global server_audit_query_log_limit= 15;
|
||||||
|
select (1), (2), (3), (4);
|
||||||
|
1 2 3 4
|
||||||
|
1 2 3 4
|
||||||
|
select 'A', 'B', 'C', 'D';
|
||||||
|
A B C D
|
||||||
|
A B C D
|
||||||
|
set global server_audit_query_log_limit= 1024;
|
||||||
|
drop database sa_db;
|
||||||
|
set global server_audit_file_path='.';
|
||||||
|
show status like 'server_audit_current_log';
|
||||||
|
Variable_name Value
|
||||||
|
server_audit_current_log HOME_DIR/server_audit.log
|
||||||
|
set global server_audit_file_path='';
|
||||||
|
show status like 'server_audit_current_log';
|
||||||
|
Variable_name Value
|
||||||
|
server_audit_current_log server_audit.log
|
||||||
|
set global server_audit_file_path=' ';
|
||||||
|
show status like 'server_audit_current_log';
|
||||||
|
Variable_name Value
|
||||||
|
server_audit_current_log server_audit.log
|
||||||
|
set global server_audit_file_path='nonexisting_dir/';
|
||||||
|
Warnings:
|
||||||
|
Warning 1 SERVER AUDIT plugin can't create file 'nonexisting_dir/'.
|
||||||
|
show status like 'server_audit_current_log';
|
||||||
|
Variable_name Value
|
||||||
|
server_audit_current_log server_audit.log
|
||||||
|
show variables like 'server_audit%';
|
||||||
|
Variable_name Value
|
||||||
|
server_audit_events
|
||||||
|
server_audit_excl_users
|
||||||
|
server_audit_file_path
|
||||||
|
server_audit_file_rotate_now OFF
|
||||||
|
server_audit_file_rotate_size 1000000
|
||||||
|
server_audit_file_rotations 9
|
||||||
|
server_audit_incl_users odin, root, dva, tri
|
||||||
|
server_audit_logging ON
|
||||||
|
server_audit_mode 1
|
||||||
|
server_audit_output_type file
|
||||||
|
server_audit_query_log_limit 1024
|
||||||
|
server_audit_syslog_facility LOG_USER
|
||||||
|
server_audit_syslog_ident mysql-server_auditing
|
||||||
|
server_audit_syslog_info
|
||||||
|
server_audit_syslog_priority LOG_INFO
|
||||||
|
uninstall plugin server_audit;
|
||||||
|
Warnings:
|
||||||
|
Warning 1620 Plugin is busy and will be uninstalled on shutdown
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_logging=on',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,0,CONNECT,mysql,,0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,0,DISCONNECT,mysql,,0
|
||||||
|
TIME,HOSTNAME,no_such_user,localhost,ID,0,FAILED_CONNECT,,,ID
|
||||||
|
TIME,HOSTNAME,no_such_user,localhost,ID,0,DISCONNECT,,,0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_incl_users=\'odin, root, dva, tri\'',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,CREATE,test,t2,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'create table t2 (id int)',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_excl_users=\'odin, dva, tri\'',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'SHOW WARNINGS',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,test,t1,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'insert into t1 values (1), (2)',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,READ,test,t1,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t1',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_incl_users=\'odin, root, dva, tri\'',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,test,t2,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'insert into t2 values (1), (2)',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,READ,test,t2,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t2',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,READ,test,t1,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,ALTER,test,t1,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,RENAME,test,t1|test.renamed_t1,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'alter table t1 rename renamed_t1',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_events=\'connect,query\'',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select 1, 2, 3',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'insert into t2 values (1), (2)',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t2',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t_doesnt_exist',ID
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'syntax_error_query',ID
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'drop table renamed_t1, t2',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'show variables like \'server_audit%\'',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_mode=1',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_events=\'\'',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'create database sa_db',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,0,CONNECT,test,,0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,CREATE,test,t1,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'create table t1 (id2 int)',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,test,t1,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'insert into t1 values (1), (2)',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,READ,test,t1,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t1',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,DROP,test,t1,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'drop table t1',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'use sa_db',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,CREATE,sa_db,sa_t1,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'create table sa_t1(id int)',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,sa_db,sa_t1,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'insert into sa_t1 values (1), (2)',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,DROP,sa_db,sa_t1,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop table sa_t1',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,proc,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proc,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,event,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop database sa_db',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,0,DISCONNECT,sa_db,,0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'create database sa_db',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'use sa_db',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER u1 IDENTIFIED BY *****',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'GRANT ALL ON sa_db TO u2 IDENTIFIED BY *****',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'SET PASSWORD FOR u1 = PASSWORD(*****)',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER u3 IDENTIFIED BY *****',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop user u1, u2, u3',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'create table t1(id int)',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop table t1',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'create table t1(id int)',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'insert into t1 values (1), (2)',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'select * from t1',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'select 2',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop table t1',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'insert into t1 values (1), (2)',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'select * from t1',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'select 2',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'(select 2)',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'/*! select 2*/',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'/*comment*/ select 2',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER u1 IDENTIFIED BY *****',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'GRANT ALL ON sa_db TO u2 IDENTIFIED BY *****',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'SET PASSWORD FOR u1 = PASSWORD(*****)',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'SET PASSWORD FOR u1=<secret>',ID
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER u3 IDENTIFIED BY *****',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop user u1, u2, u3',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_events=\'\'',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global serv',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'select (1), (2)',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'select \'A\', ',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_query_log_limit= 1024',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,proc,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proc,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,event,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop database sa_db',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_file_path=\'.\'',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_file_path=\'.\'',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'show status like \'server_audit_current_log\'',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_file_path=\'\'',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_file_path=\'\'',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'show status like \'server_audit_current_log\'',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_file_path=\' \'',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_file_path=\' \'',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'show status like \'server_audit_current_log\'',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_file_path=\'nonexisting_dir/\'',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_file_path=\'nonexisting_dir/\'',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'SHOW WARNINGS',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'show status like \'server_audit_current_log\'',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'show variables like \'server_audit%\'',0
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,plugin,
|
||||||
|
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'uninstall plugin server_audit',0
|
@ -13,6 +13,7 @@ set global server_audit_incl_users=null;
|
|||||||
set global server_audit_file_path='server_audit.log';
|
set global server_audit_file_path='server_audit.log';
|
||||||
set global server_audit_output_type=file;
|
set global server_audit_output_type=file;
|
||||||
set global server_audit_logging=on;
|
set global server_audit_logging=on;
|
||||||
|
--sleep 2
|
||||||
connect (con1,localhost,root,,mysql);
|
connect (con1,localhost,root,,mysql);
|
||||||
connection default;
|
connection default;
|
||||||
disconnect con1;
|
disconnect con1;
|
||||||
@ -35,6 +36,9 @@ insert into t2 values (1), (2);
|
|||||||
select * from t2;
|
select * from t2;
|
||||||
alter table t1 rename renamed_t1;
|
alter table t1 rename renamed_t1;
|
||||||
set global server_audit_events='connect,query';
|
set global server_audit_events='connect,query';
|
||||||
|
select 1,
|
||||||
|
2,
|
||||||
|
3;
|
||||||
insert into t2 values (1), (2);
|
insert into t2 values (1), (2);
|
||||||
select * from t2;
|
select * from t2;
|
||||||
--error ER_NO_SUCH_TABLE
|
--error ER_NO_SUCH_TABLE
|
||||||
@ -46,6 +50,7 @@ show variables like 'server_audit%';
|
|||||||
set global server_audit_mode=1;
|
set global server_audit_mode=1;
|
||||||
set global server_audit_events='';
|
set global server_audit_events='';
|
||||||
create database sa_db;
|
create database sa_db;
|
||||||
|
--sleep 2
|
||||||
connect (con1,localhost,root,,test);
|
connect (con1,localhost,root,,test);
|
||||||
connection con1;
|
connection con1;
|
||||||
--sleep 2
|
--sleep 2
|
||||||
@ -102,6 +107,8 @@ select * from t1;
|
|||||||
CREATE USER u1 IDENTIFIED BY 'pwd-123';
|
CREATE USER u1 IDENTIFIED BY 'pwd-123';
|
||||||
GRANT ALL ON sa_db TO u2 IDENTIFIED BY "pwd-321";
|
GRANT ALL ON sa_db TO u2 IDENTIFIED BY "pwd-321";
|
||||||
SET PASSWORD FOR u1 = PASSWORD('pwd 098');
|
SET PASSWORD FOR u1 = PASSWORD('pwd 098');
|
||||||
|
--error 1064
|
||||||
|
SET PASSWORD FOR u1=<secret>;
|
||||||
CREATE USER u3 IDENTIFIED BY '';
|
CREATE USER u3 IDENTIFIED BY '';
|
||||||
drop user u1, u2, u3;
|
drop user u1, u2, u3;
|
||||||
select 2;
|
select 2;
|
||||||
|
2
mysql-test/suite/plugins/t/thread_pool_server_audit.opt
Normal file
2
mysql-test/suite/plugins/t/thread_pool_server_audit.opt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
--thread_handling=pool-of-threads
|
||||||
|
|
144
mysql-test/suite/plugins/t/thread_pool_server_audit.test
Normal file
144
mysql-test/suite/plugins/t/thread_pool_server_audit.test
Normal file
@ -0,0 +1,144 @@
|
|||||||
|
--source include/not_embedded.inc
|
||||||
|
--source include/have_pool_of_threads.inc
|
||||||
|
|
||||||
|
if (!$SERVER_AUDIT_SO) {
|
||||||
|
skip No SERVER_AUDIT plugin;
|
||||||
|
}
|
||||||
|
|
||||||
|
install plugin server_audit soname 'server_audit';
|
||||||
|
|
||||||
|
show variables like 'server_audit%';
|
||||||
|
set global server_audit_file_path=null;
|
||||||
|
set global server_audit_incl_users=null;
|
||||||
|
set global server_audit_file_path='server_audit.log';
|
||||||
|
set global server_audit_output_type=file;
|
||||||
|
set global server_audit_logging=on;
|
||||||
|
--sleep 2
|
||||||
|
connect (con1,localhost,root,,mysql);
|
||||||
|
connection default;
|
||||||
|
disconnect con1;
|
||||||
|
--sleep 2
|
||||||
|
--sleep 2
|
||||||
|
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
|
||||||
|
--error ER_ACCESS_DENIED_ERROR
|
||||||
|
connect (con1,localhost,no_such_user,,mysql);
|
||||||
|
connection default;
|
||||||
|
--sleep 2
|
||||||
|
set global server_audit_incl_users='odin, dva, tri';
|
||||||
|
create table t1 (id int);
|
||||||
|
set global server_audit_incl_users='odin, root, dva, tri';
|
||||||
|
create table t2 (id int);
|
||||||
|
set global server_audit_excl_users='odin, dva, tri';
|
||||||
|
insert into t1 values (1), (2);
|
||||||
|
select * from t1;
|
||||||
|
set global server_audit_incl_users='odin, root, dva, tri';
|
||||||
|
insert into t2 values (1), (2);
|
||||||
|
select * from t2;
|
||||||
|
alter table t1 rename renamed_t1;
|
||||||
|
set global server_audit_events='connect,query';
|
||||||
|
select 1,
|
||||||
|
2,
|
||||||
|
3;
|
||||||
|
insert into t2 values (1), (2);
|
||||||
|
select * from t2;
|
||||||
|
--error ER_NO_SUCH_TABLE
|
||||||
|
select * from t_doesnt_exist;
|
||||||
|
--error 1064
|
||||||
|
syntax_error_query;
|
||||||
|
drop table renamed_t1, t2;
|
||||||
|
show variables like 'server_audit%';
|
||||||
|
set global server_audit_mode=1;
|
||||||
|
set global server_audit_events='';
|
||||||
|
create database sa_db;
|
||||||
|
--sleep 2
|
||||||
|
connect (con1,localhost,root,,test);
|
||||||
|
connection con1;
|
||||||
|
--sleep 2
|
||||||
|
--sleep 2
|
||||||
|
create table t1 (id2 int);
|
||||||
|
insert into t1 values (1), (2);
|
||||||
|
select * from t1;
|
||||||
|
drop table t1;
|
||||||
|
use sa_db;
|
||||||
|
create table sa_t1(id int);
|
||||||
|
insert into sa_t1 values (1), (2);
|
||||||
|
drop table sa_t1;
|
||||||
|
drop database sa_db;
|
||||||
|
connection default;
|
||||||
|
disconnect con1;
|
||||||
|
--sleep 2
|
||||||
|
--sleep 2
|
||||||
|
create database sa_db;
|
||||||
|
use sa_db;
|
||||||
|
CREATE USER u1 IDENTIFIED BY 'pwd-123';
|
||||||
|
GRANT ALL ON sa_db TO u2 IDENTIFIED BY "pwd-321";
|
||||||
|
SET PASSWORD FOR u1 = PASSWORD('pwd 098');
|
||||||
|
CREATE USER u3 IDENTIFIED BY '';
|
||||||
|
drop user u1, u2, u3;
|
||||||
|
|
||||||
|
set global server_audit_events='query_ddl';
|
||||||
|
create table t1(id int);
|
||||||
|
insert into t1 values (1), (2);
|
||||||
|
select * from t1;
|
||||||
|
select 2;
|
||||||
|
(select 2);
|
||||||
|
/*! select 2*/;
|
||||||
|
/*comment*/ select 2;
|
||||||
|
drop table t1;
|
||||||
|
set global server_audit_events='query_ddl,query_dml';
|
||||||
|
create table t1(id int);
|
||||||
|
insert into t1 values (1), (2);
|
||||||
|
select * from t1;
|
||||||
|
select 2;
|
||||||
|
drop table t1;
|
||||||
|
set global server_audit_events='query_dml';
|
||||||
|
create table t1(id int);
|
||||||
|
insert into t1 values (1), (2);
|
||||||
|
select * from t1;
|
||||||
|
select 2;
|
||||||
|
(select 2);
|
||||||
|
/*! select 2*/;
|
||||||
|
/*comment*/ select 2;
|
||||||
|
drop table t1;
|
||||||
|
set global server_audit_events='query_dcl';
|
||||||
|
create table t1(id int);
|
||||||
|
insert into t1 values (1), (2);
|
||||||
|
select * from t1;
|
||||||
|
CREATE USER u1 IDENTIFIED BY 'pwd-123';
|
||||||
|
GRANT ALL ON sa_db TO u2 IDENTIFIED BY "pwd-321";
|
||||||
|
SET PASSWORD FOR u1 = PASSWORD('pwd 098');
|
||||||
|
--error 1064
|
||||||
|
SET PASSWORD FOR u1=<secret>;
|
||||||
|
CREATE USER u3 IDENTIFIED BY '';
|
||||||
|
drop user u1, u2, u3;
|
||||||
|
select 2;
|
||||||
|
(select 2);
|
||||||
|
/*! select 2*/;
|
||||||
|
/*comment*/ select 2;
|
||||||
|
drop table t1;
|
||||||
|
set global server_audit_events='';
|
||||||
|
|
||||||
|
set global server_audit_query_log_limit= 15;
|
||||||
|
select (1), (2), (3), (4);
|
||||||
|
select 'A', 'B', 'C', 'D';
|
||||||
|
set global server_audit_query_log_limit= 1024;
|
||||||
|
drop database sa_db;
|
||||||
|
|
||||||
|
set global server_audit_file_path='.';
|
||||||
|
--replace_regex /\.[\\\/]/HOME_DIR\//
|
||||||
|
show status like 'server_audit_current_log';
|
||||||
|
set global server_audit_file_path='';
|
||||||
|
show status like 'server_audit_current_log';
|
||||||
|
set global server_audit_file_path=' ';
|
||||||
|
show status like 'server_audit_current_log';
|
||||||
|
set global server_audit_file_path='nonexisting_dir/';
|
||||||
|
show status like 'server_audit_current_log';
|
||||||
|
show variables like 'server_audit%';
|
||||||
|
uninstall plugin server_audit;
|
||||||
|
|
||||||
|
let $MYSQLD_DATADIR= `SELECT @@datadir`;
|
||||||
|
# replace the timestamp and the hostname with constant values
|
||||||
|
--replace_regex /[0-9]* [0-9][0-9]:[0-9][0-9]:[0-9][0-9]\,[^,]*\,/TIME,HOSTNAME,/ /\,[1-9][0-9]*\,/,1,/ /\,[1-9][0-9]*/,ID/
|
||||||
|
cat_file $MYSQLD_DATADIR/server_audit.log;
|
||||||
|
remove_file $MYSQLD_DATADIR/server_audit.log;
|
||||||
|
|
9
mysql-test/suite/rpl/r/rpl_old_decimal.result
Normal file
9
mysql-test/suite/rpl/r/rpl_old_decimal.result
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
include/master-slave.inc
|
||||||
|
[connection master]
|
||||||
|
CREATE TABLE t1dec102 (a DECIMAL(10,2));
|
||||||
|
INSERT INTO t1dec102 VALUES(999.99);
|
||||||
|
call mtr.add_suppression("Slave SQL.*Column 0 of table .* cannot be converted from type.* Error_code: 1677");
|
||||||
|
include/wait_for_slave_sql_error_and_skip.inc [errno=1677]
|
||||||
|
Last_SQL_Error = 'Column 0 of table 'test.t1dec102' cannot be converted from type 'decimal(0,?)/*old*/' to type 'decimal(10,2)''
|
||||||
|
DROP TABLE t1dec102;
|
||||||
|
include/rpl_end.inc
|
@ -182,6 +182,11 @@ DROP USER test_3@localhost;
|
|||||||
ERROR HY000: Table 'user' was not locked with LOCK TABLES
|
ERROR HY000: Table 'user' was not locked with LOCK TABLES
|
||||||
INSERT INTO t2 VALUES ("DROP USER test_3@localhost with table locked");
|
INSERT INTO t2 VALUES ("DROP USER test_3@localhost with table locked");
|
||||||
UNLOCK TABLE;
|
UNLOCK TABLE;
|
||||||
|
CREATE DATABASE db;
|
||||||
|
CREATE TABLE db.t1 LIKE t2;
|
||||||
|
CREATE TABLE t3 LIKE t2;
|
||||||
|
DROP TABLE t3;
|
||||||
|
DROP DATABASE db;
|
||||||
DROP USER test_3@localhost;
|
DROP USER test_3@localhost;
|
||||||
DROP FUNCTION f2;
|
DROP FUNCTION f2;
|
||||||
DROP PROCEDURE p2;
|
DROP PROCEDURE p2;
|
||||||
|
25
mysql-test/suite/rpl/t/rpl_old_decimal.test
Normal file
25
mysql-test/suite/rpl/t/rpl_old_decimal.test
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
--source include/have_binlog_format_row.inc
|
||||||
|
--source include/master-slave.inc
|
||||||
|
|
||||||
|
|
||||||
|
--connection slave
|
||||||
|
CREATE TABLE t1dec102 (a DECIMAL(10,2));
|
||||||
|
|
||||||
|
--connection master
|
||||||
|
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||||
|
|
||||||
|
--copy_file std_data/old_decimal/t1dec102.frm $MYSQLD_DATADIR/test/t1dec102.frm
|
||||||
|
--copy_file std_data/old_decimal/t1dec102.MYD $MYSQLD_DATADIR/test/t1dec102.MYD
|
||||||
|
--copy_file std_data/old_decimal/t1dec102.MYI $MYSQLD_DATADIR/test/t1dec102.MYI
|
||||||
|
INSERT INTO t1dec102 VALUES(999.99);
|
||||||
|
|
||||||
|
--let $slave_sql_errno=1677
|
||||||
|
--let $show_slave_sql_error= 1
|
||||||
|
call mtr.add_suppression("Slave SQL.*Column 0 of table .* cannot be converted from type.* Error_code: 1677");
|
||||||
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
|
|
||||||
|
--connection master
|
||||||
|
DROP TABLE t1dec102;
|
||||||
|
--sync_slave_with_master
|
||||||
|
|
||||||
|
--source include/rpl_end.inc
|
@ -150,6 +150,16 @@ DROP USER test_3@localhost;
|
|||||||
INSERT INTO t2 VALUES ("DROP USER test_3@localhost with table locked");
|
INSERT INTO t2 VALUES ("DROP USER test_3@localhost with table locked");
|
||||||
|
|
||||||
UNLOCK TABLE;
|
UNLOCK TABLE;
|
||||||
|
|
||||||
|
# Bug #20439913 CREATE TABLE DB.TABLE LIKE TMPTABLE IS
|
||||||
|
# BINLOGGED INCORRECTLY - BREAKS A SLAVE
|
||||||
|
CREATE DATABASE db;
|
||||||
|
CREATE TABLE db.t1 LIKE t2;
|
||||||
|
CREATE TABLE t3 LIKE t2;
|
||||||
|
DROP TABLE t3;
|
||||||
|
DROP DATABASE db;
|
||||||
|
# end of Bug #20439913 test
|
||||||
|
|
||||||
DROP USER test_3@localhost;
|
DROP USER test_3@localhost;
|
||||||
DROP FUNCTION f2;
|
DROP FUNCTION f2;
|
||||||
DROP PROCEDURE p2;
|
DROP PROCEDURE p2;
|
||||||
|
@ -16,7 +16,6 @@ mem_limit = 32M
|
|||||||
[searchd]
|
[searchd]
|
||||||
read_timeout = 5
|
read_timeout = 5
|
||||||
max_children = 30
|
max_children = 30
|
||||||
max_matches = 1000
|
|
||||||
seamless_rotate = 1
|
seamless_rotate = 1
|
||||||
preopen_indexes = 0
|
preopen_indexes = 0
|
||||||
unlink_old = 1
|
unlink_old = 1
|
||||||
@ -24,7 +23,7 @@ log = @ENV.MYSQLTEST_VARDIR/searchd/sphinx-searchd.log
|
|||||||
query_log = @ENV.MYSQLTEST_VARDIR/searchd/sphinx-query.log
|
query_log = @ENV.MYSQLTEST_VARDIR/searchd/sphinx-query.log
|
||||||
#log-error = @ENV.MYSQLTEST_VARDIR/searchd/sphinx.log
|
#log-error = @ENV.MYSQLTEST_VARDIR/searchd/sphinx.log
|
||||||
pid_file = @ENV.MYSQLTEST_VARDIR/run/searchd.pid
|
pid_file = @ENV.MYSQLTEST_VARDIR/run/searchd.pid
|
||||||
port = @ENV.SPHINXSEARCH_PORT
|
listen = @ENV.SPHINXSEARCH_PORT
|
||||||
|
|
||||||
[ENV]
|
[ENV]
|
||||||
SPHINXSEARCH_PORT = @OPT.port
|
SPHINXSEARCH_PORT = @OPT.port
|
||||||
|
@ -2,11 +2,6 @@
|
|||||||
# This is a debug variable for now
|
# This is a debug variable for now
|
||||||
-- source include/have_debug.inc
|
-- source include/have_debug.inc
|
||||||
|
|
||||||
if (`select plugin_auth_version <= "5.5.31-MariaDB-30.2" from information_schema.plugins where plugin_name='innodb'`)
|
|
||||||
{
|
|
||||||
--skip Not fixed in XtraDB 5.5.31-MariaDB-30.2 or earlier
|
|
||||||
}
|
|
||||||
|
|
||||||
SELECT @@global.innodb_buffer_pool_evict;
|
SELECT @@global.innodb_buffer_pool_evict;
|
||||||
|
|
||||||
SET GLOBAL innodb_buffer_pool_evict = 'uncompressed';
|
SET GLOBAL innodb_buffer_pool_evict = 'uncompressed';
|
||||||
|
@ -1,8 +1,3 @@
|
|||||||
if (`select plugin_auth_version <= "5.5.37-MariaDB-34.0" from information_schema.plugins where plugin_name='innodb'`)
|
|
||||||
{
|
|
||||||
--skip Not fixed in XtraDB as of 5.5.37-MariaDB-34.0 or earlier
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# 2010-01-27 - Added
|
# 2010-01-27 - Added
|
||||||
#
|
#
|
||||||
|
18
mysql-test/suite/tokudb.bugs/r/db805.result
Normal file
18
mysql-test/suite/tokudb.bugs/r/db805.result
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
drop table if exists t1,t3;
|
||||||
|
create table t3(a3 int,b3 decimal(0,0),c3 int,d3 int,primary key(a3,b3)) engine=TOKUDB;
|
||||||
|
LOCK TABLES t3 WRITE;
|
||||||
|
create temporary table t1(f1 int,index(f1)) engine=innodb;
|
||||||
|
INSERT INTO t1 VALUES(1),(1),(1);
|
||||||
|
select * from t1;
|
||||||
|
f1
|
||||||
|
1
|
||||||
|
1
|
||||||
|
1
|
||||||
|
ALTER TABLE t1 engine=TOKUDB;
|
||||||
|
select * from t1;
|
||||||
|
f1
|
||||||
|
1
|
||||||
|
1
|
||||||
|
1
|
||||||
|
unlock tables;
|
||||||
|
drop table t1,t3;
|
9
mysql-test/suite/tokudb.bugs/r/db806.result
Normal file
9
mysql-test/suite/tokudb.bugs/r/db806.result
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
drop table if exists t1,t3;
|
||||||
|
CREATE TABLE t3(a int,c int,d int)engine=TOKUDB;
|
||||||
|
lock table t3 read;
|
||||||
|
create temporary table t1 engine=tokudb as SELECT 1;
|
||||||
|
select * from t1;
|
||||||
|
1
|
||||||
|
1
|
||||||
|
unlock tables;
|
||||||
|
drop table t1,t3;
|
14
mysql-test/suite/tokudb.bugs/r/db811.result
Normal file
14
mysql-test/suite/tokudb.bugs/r/db811.result
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
drop table if exists t2,t3,t4;
|
||||||
|
CREATE TABLE t3(a INT,b INT,UNIQUE KEY (a,b)) engine=TOKUDB;
|
||||||
|
CREATE TABLE t4(c1 FLOAT ZEROFILL) engine=innodb;
|
||||||
|
CREATE TABLE t2(a int KEY,b CHAR (1)) engine=TOKUDB PARTITION BY HASH (a) PARTITIONS 13;
|
||||||
|
LOCK TABLES t4 WRITE,t3 WRITE,t2 WRITE;
|
||||||
|
INSERT INTO t2(a)VALUES (REPEAT(0,1));
|
||||||
|
ALTER TABLE t2 ADD COLUMN(c INT);
|
||||||
|
alter table t4 add column c int;
|
||||||
|
UPDATE t2 SET a=1;
|
||||||
|
select * from t2;
|
||||||
|
a b c
|
||||||
|
1 NULL NULL
|
||||||
|
unlock tables;
|
||||||
|
drop table t2,t3,t4;
|
14
mysql-test/suite/tokudb.bugs/r/db811s.result
Normal file
14
mysql-test/suite/tokudb.bugs/r/db811s.result
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
drop table if exists t2,t3,t4;
|
||||||
|
CREATE TABLE t3(a INT,b INT,UNIQUE KEY (a,b)) engine=TOKUDB;
|
||||||
|
CREATE TABLE t4(c1 FLOAT ZEROFILL) engine=innodb;
|
||||||
|
CREATE TABLE t2(a int KEY,b CHAR (1)) engine=TOKUDB PARTITION BY HASH (a) PARTITIONS 1;
|
||||||
|
LOCK TABLES t4 WRITE,t3 WRITE,t2 WRITE;
|
||||||
|
INSERT INTO t2(a)VALUES (REPEAT(0,1));
|
||||||
|
ALTER TABLE t2 ADD COLUMN(c INT);
|
||||||
|
alter table t4 add column c int;
|
||||||
|
UPDATE t2 SET a=1;
|
||||||
|
select * from t2;
|
||||||
|
a b c
|
||||||
|
1 NULL NULL
|
||||||
|
unlock tables;
|
||||||
|
drop table t2,t3,t4;
|
11
mysql-test/suite/tokudb.bugs/r/db823.result
Normal file
11
mysql-test/suite/tokudb.bugs/r/db823.result
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
drop table if exists s,t;
|
||||||
|
create table s (id int) engine=tokudb;
|
||||||
|
lock tables s write;
|
||||||
|
create temporary table t (id int, key(id)) engine=innodb;
|
||||||
|
insert into t values (1);
|
||||||
|
alter table t engine=tokudb;
|
||||||
|
select * from t;
|
||||||
|
id
|
||||||
|
1
|
||||||
|
unlock tables;
|
||||||
|
drop table s, t;
|
17
mysql-test/suite/tokudb.bugs/t/db805.test
Normal file
17
mysql-test/suite/tokudb.bugs/t/db805.test
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# DB-805 test that conversion of t1 from innodb to tokudb can write rows
|
||||||
|
source include/have_tokudb.inc;
|
||||||
|
source include/have_innodb.inc;
|
||||||
|
disable_warnings;
|
||||||
|
drop table if exists t1,t3;
|
||||||
|
enable_warnings;
|
||||||
|
|
||||||
|
create table t3(a3 int,b3 decimal(0,0),c3 int,d3 int,primary key(a3,b3)) engine=TOKUDB;
|
||||||
|
LOCK TABLES t3 WRITE;
|
||||||
|
create temporary table t1(f1 int,index(f1)) engine=innodb;
|
||||||
|
INSERT INTO t1 VALUES(1),(1),(1);
|
||||||
|
select * from t1;
|
||||||
|
ALTER TABLE t1 engine=TOKUDB;
|
||||||
|
select * from t1;
|
||||||
|
unlock tables;
|
||||||
|
|
||||||
|
drop table t1,t3;
|
13
mysql-test/suite/tokudb.bugs/t/db806.test
Normal file
13
mysql-test/suite/tokudb.bugs/t/db806.test
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# DB-806 test that lock tables and create select can write rows to the new table
|
||||||
|
source include/have_tokudb.inc;
|
||||||
|
disable_warnings;
|
||||||
|
drop table if exists t1,t3;
|
||||||
|
enable_warnings;
|
||||||
|
|
||||||
|
CREATE TABLE t3(a int,c int,d int)engine=TOKUDB;
|
||||||
|
lock table t3 read;
|
||||||
|
create temporary table t1 engine=tokudb as SELECT 1;
|
||||||
|
select * from t1;
|
||||||
|
unlock tables;
|
||||||
|
|
||||||
|
drop table t1,t3;
|
22
mysql-test/suite/tokudb.bugs/t/db811.test
Normal file
22
mysql-test/suite/tokudb.bugs/t/db811.test
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# DB-811 test that alter table t2 updates both the schema (FRM) and the data (tokudb files)
|
||||||
|
|
||||||
|
source include/have_tokudb.inc;
|
||||||
|
source include/have_innodb.inc;
|
||||||
|
source include/have_partition.inc;
|
||||||
|
disable_warnings;
|
||||||
|
drop table if exists t2,t3,t4;
|
||||||
|
enable_warnings;
|
||||||
|
|
||||||
|
CREATE TABLE t3(a INT,b INT,UNIQUE KEY (a,b)) engine=TOKUDB;
|
||||||
|
CREATE TABLE t4(c1 FLOAT ZEROFILL) engine=innodb;
|
||||||
|
CREATE TABLE t2(a int KEY,b CHAR (1)) engine=TOKUDB PARTITION BY HASH (a) PARTITIONS 13;
|
||||||
|
LOCK TABLES t4 WRITE,t3 WRITE,t2 WRITE;
|
||||||
|
INSERT INTO t2(a)VALUES (REPEAT(0,1));
|
||||||
|
ALTER TABLE t2 ADD COLUMN(c INT);
|
||||||
|
alter table t4 add column c int;
|
||||||
|
UPDATE t2 SET a=1;
|
||||||
|
select * from t2;
|
||||||
|
unlock tables;
|
||||||
|
|
||||||
|
drop table t2,t3,t4;
|
||||||
|
|
22
mysql-test/suite/tokudb.bugs/t/db811s.test
Normal file
22
mysql-test/suite/tokudb.bugs/t/db811s.test
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# DB-811 test that alter table t2 updates both the schema (FRM) and the data (tokudb files)
|
||||||
|
|
||||||
|
source include/have_tokudb.inc;
|
||||||
|
source include/have_innodb.inc;
|
||||||
|
source include/have_partition.inc;
|
||||||
|
disable_warnings;
|
||||||
|
drop table if exists t2,t3,t4;
|
||||||
|
enable_warnings;
|
||||||
|
|
||||||
|
CREATE TABLE t3(a INT,b INT,UNIQUE KEY (a,b)) engine=TOKUDB;
|
||||||
|
CREATE TABLE t4(c1 FLOAT ZEROFILL) engine=innodb;
|
||||||
|
CREATE TABLE t2(a int KEY,b CHAR (1)) engine=TOKUDB PARTITION BY HASH (a) PARTITIONS 1;
|
||||||
|
LOCK TABLES t4 WRITE,t3 WRITE,t2 WRITE;
|
||||||
|
INSERT INTO t2(a)VALUES (REPEAT(0,1));
|
||||||
|
ALTER TABLE t2 ADD COLUMN(c INT);
|
||||||
|
alter table t4 add column c int;
|
||||||
|
UPDATE t2 SET a=1;
|
||||||
|
select * from t2;
|
||||||
|
unlock tables;
|
||||||
|
|
||||||
|
drop table t2,t3,t4;
|
||||||
|
|
16
mysql-test/suite/tokudb.bugs/t/db823.test
Normal file
16
mysql-test/suite/tokudb.bugs/t/db823.test
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# test DB-823
|
||||||
|
# test that the conversion of table t from innodb to tokudb succeeds.
|
||||||
|
source include/have_tokudb.inc;
|
||||||
|
source include/have_innodb.inc;
|
||||||
|
disable_warnings;
|
||||||
|
drop table if exists s,t;
|
||||||
|
enable_warnings;
|
||||||
|
create table s (id int) engine=tokudb;
|
||||||
|
lock tables s write;
|
||||||
|
create temporary table t (id int, key(id)) engine=innodb;
|
||||||
|
insert into t values (1);
|
||||||
|
alter table t engine=tokudb;
|
||||||
|
select * from t;
|
||||||
|
unlock tables;
|
||||||
|
drop table s, t;
|
||||||
|
|
@ -1,28 +1,28 @@
|
|||||||
# Test case for MDEV-246, lp:992983
|
# Test case for MDEV-246, lp:992983
|
||||||
# Check that ordinary connect/disconnect does not increase aborted_clients
|
# Check that ordinary connect/disconnect does not increase aborted_clients
|
||||||
# status variable, but KILL connection does
|
# status variable, but KILL connection does
|
||||||
|
|
||||||
-- source include/not_embedded.inc
|
-- source include/not_embedded.inc
|
||||||
-- source include/count_sessions.inc
|
-- source include/count_sessions.inc
|
||||||
|
|
||||||
FLUSH STATUS;
|
FLUSH STATUS;
|
||||||
# Connect/Disconnect look that aborted_clients stays 0
|
# Connect/Disconnect look that aborted_clients stays 0
|
||||||
connect (con1,localhost,root,,);
|
connect (con1,localhost,root,,);
|
||||||
disconnect con1;
|
disconnect con1;
|
||||||
connection default;
|
connection default;
|
||||||
-- source include/wait_until_count_sessions.inc
|
-- source include/wait_until_count_sessions.inc
|
||||||
# Check that there is 0 aborted clients so far
|
# Check that there is 0 aborted clients so far
|
||||||
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='aborted_clients';
|
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='aborted_clients';
|
||||||
|
|
||||||
# Kill a connection, check that aborted_clients is incremented
|
# Kill a connection, check that aborted_clients is incremented
|
||||||
connect(con2,localhost,root,,);
|
connect(con2,localhost,root,,);
|
||||||
--disable_reconnect
|
--disable_reconnect
|
||||||
--error ER_CONNECTION_KILLED
|
--error ER_CONNECTION_KILLED
|
||||||
KILL CONNECTION_ID();
|
KILL CONNECTION_ID();
|
||||||
disconnect con2;
|
disconnect con2;
|
||||||
connection default;
|
connection default;
|
||||||
-- source include/wait_until_count_sessions.inc
|
-- source include/wait_until_count_sessions.inc
|
||||||
|
|
||||||
# aborted clients must be 1 now
|
# aborted clients must be 1 now
|
||||||
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='aborted_clients';
|
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='aborted_clients';
|
||||||
FLUSH STATUS;
|
FLUSH STATUS;
|
||||||
|
@ -1,66 +1,66 @@
|
|||||||
--source include/have_plugin_auth.inc
|
--source include/have_plugin_auth.inc
|
||||||
--source include/not_embedded.inc
|
--source include/not_embedded.inc
|
||||||
--source include/master-slave.inc
|
--source include/master-slave.inc
|
||||||
|
|
||||||
#
|
#
|
||||||
# Check that replication slave can connect to master using an account
|
# Check that replication slave can connect to master using an account
|
||||||
# which authenticates with an external authentication plugin (bug#12897501).
|
# which authenticates with an external authentication plugin (bug#12897501).
|
||||||
|
|
||||||
#
|
#
|
||||||
# First stop the slave to guarantee that nothing is replicated.
|
# First stop the slave to guarantee that nothing is replicated.
|
||||||
#
|
#
|
||||||
--connection slave
|
--connection slave
|
||||||
--echo [connection slave]
|
--echo [connection slave]
|
||||||
--source include/stop_slave.inc
|
--source include/stop_slave.inc
|
||||||
#
|
#
|
||||||
# Create an replication account on the master.
|
# Create an replication account on the master.
|
||||||
#
|
#
|
||||||
--connection master
|
--connection master
|
||||||
--echo [connection master]
|
--echo [connection master]
|
||||||
CREATE USER 'plug_user' IDENTIFIED WITH 'test_plugin_server' AS 'plug_user';
|
CREATE USER 'plug_user' IDENTIFIED WITH 'test_plugin_server' AS 'plug_user';
|
||||||
GRANT REPLICATION SLAVE ON *.* TO plug_user;
|
GRANT REPLICATION SLAVE ON *.* TO plug_user;
|
||||||
FLUSH PRIVILEGES;
|
FLUSH PRIVILEGES;
|
||||||
|
|
||||||
#
|
#
|
||||||
# Now go to slave and change the replication user.
|
# Now go to slave and change the replication user.
|
||||||
#
|
#
|
||||||
--connection slave
|
--connection slave
|
||||||
--echo [connection slave]
|
--echo [connection slave]
|
||||||
--let $master_user= query_get_value(SHOW SLAVE STATUS, Master_User, 1)
|
--let $master_user= query_get_value(SHOW SLAVE STATUS, Master_User, 1)
|
||||||
CHANGE MASTER TO
|
CHANGE MASTER TO
|
||||||
MASTER_USER= 'plug_user',
|
MASTER_USER= 'plug_user',
|
||||||
MASTER_PASSWORD= 'plug_user';
|
MASTER_PASSWORD= 'plug_user';
|
||||||
|
|
||||||
#
|
#
|
||||||
# Start slave with new replication account - this should trigger connection
|
# Start slave with new replication account - this should trigger connection
|
||||||
# to the master server.
|
# to the master server.
|
||||||
#
|
#
|
||||||
--source include/start_slave.inc
|
--source include/start_slave.inc
|
||||||
|
|
||||||
# Replicate all statements executed on master, in this case,
|
# Replicate all statements executed on master, in this case,
|
||||||
# (creation of the plug_user account).
|
# (creation of the plug_user account).
|
||||||
#
|
#
|
||||||
--connection master
|
--connection master
|
||||||
--sync_slave_with_master
|
--sync_slave_with_master
|
||||||
--echo # Slave in-sync with master now.
|
--echo # Slave in-sync with master now.
|
||||||
|
|
||||||
SELECT user, plugin, authentication_string FROM mysql.user WHERE user LIKE 'plug_user';
|
SELECT user, plugin, authentication_string FROM mysql.user WHERE user LIKE 'plug_user';
|
||||||
|
|
||||||
#
|
#
|
||||||
# Now we can stop the slave and clean up.
|
# Now we can stop the slave and clean up.
|
||||||
#
|
#
|
||||||
# Note: it is important that slave is stopped at this
|
# Note: it is important that slave is stopped at this
|
||||||
# moment - otherwise master's cleanup statements
|
# moment - otherwise master's cleanup statements
|
||||||
# would be replicated on slave!
|
# would be replicated on slave!
|
||||||
#
|
#
|
||||||
--echo # Cleanup (on slave).
|
--echo # Cleanup (on slave).
|
||||||
--source include/stop_slave.inc
|
--source include/stop_slave.inc
|
||||||
eval CHANGE MASTER TO MASTER_USER='$master_user';
|
eval CHANGE MASTER TO MASTER_USER='$master_user';
|
||||||
DROP USER 'plug_user';
|
DROP USER 'plug_user';
|
||||||
|
|
||||||
--echo # Cleanup (on master).
|
--echo # Cleanup (on master).
|
||||||
--connection master
|
--connection master
|
||||||
DROP USER 'plug_user';
|
DROP USER 'plug_user';
|
||||||
|
|
||||||
--let $rpl_only_running_threads= 1
|
--let $rpl_only_running_threads= 1
|
||||||
--source include/rpl_end.inc
|
--source include/rpl_end.inc
|
||||||
|
@ -1616,6 +1616,22 @@ SET NAMES utf8 COLLATE utf8_general_ci;
|
|||||||
--let ENGINE=HEAP
|
--let ENGINE=HEAP
|
||||||
--source include/ctype_utf8_ilseq.inc
|
--source include/ctype_utf8_ilseq.inc
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-8067 correct fix for MySQL Bug # 19699237: UNINITIALIZED VARIABLE IN ITEM_FIELD::STR_RESULT
|
||||||
|
--echo #
|
||||||
|
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8);
|
||||||
|
CREATE TABLE t2 (a VARCHAR(10) CHARACTER SET latin1);
|
||||||
|
INSERT INTO t1 VALUES ('aaa');
|
||||||
|
INSERT INTO t2 VALUES ('aaa');
|
||||||
|
SELECT (SELECT CONCAT(a),1 FROM t1) <=> (SELECT CONCAT(a),1 FROM t2);
|
||||||
|
INSERT INTO t1 VALUES ('aaa');
|
||||||
|
INSERT INTO t2 VALUES ('aaa');
|
||||||
|
# Running the below query crashed with two rows
|
||||||
|
--error ER_SUBQUERY_NO_1_ROW
|
||||||
|
SELECT (SELECT CONCAT(a),1 FROM t1) <=> (SELECT CONCAT(a),1 FROM t2);
|
||||||
|
DROP TABLE t1, t2;
|
||||||
|
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # End of 5.5 tests
|
--echo # End of 5.5 tests
|
||||||
--echo #
|
--echo #
|
||||||
|
@ -643,3 +643,9 @@ SELECT
|
|||||||
#
|
#
|
||||||
select column_get(column_create(1, "18446744073709552001" as char), 1 as int);
|
select column_get(column_create(1, "18446744073709552001" as char), 1 as int);
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-7505 - Too large scale in DECIMAL dynamic column getter crashes
|
||||||
|
--echo # mysqld
|
||||||
|
--echo #
|
||||||
|
--error ER_TOO_BIG_SCALE
|
||||||
|
SELECT COLUMN_GET(`x`, 'y' AS DECIMAL(5,34));
|
||||||
|
9
mysql-test/t/empty_server_name-8224.test
Normal file
9
mysql-test/t/empty_server_name-8224.test
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#
|
||||||
|
# MDEV-8224 Server crashes in get_server_from_table_to_cache on empty name
|
||||||
|
#
|
||||||
|
--source include/not_embedded.inc
|
||||||
|
create server '' foreign data wrapper w2 options (host '127.0.0.1');
|
||||||
|
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||||
|
--shutdown_server 10
|
||||||
|
--source include/wait_until_disconnected.inc
|
||||||
|
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
@ -49,9 +49,9 @@ select grp,group_concat(c order by grp desc) from t1 group by grp order by grp;
|
|||||||
|
|
||||||
# Test transfer to real values
|
# Test transfer to real values
|
||||||
|
|
||||||
select grp, group_concat(a separator "")+0 from t1 group by grp;
|
select grp, group_concat(a separator "")+0 from t1 group by grp;
|
||||||
select grp, group_concat(a separator "")+0.0 from t1 group by grp;
|
select grp, group_concat(a separator "")+0.0 from t1 group by grp;
|
||||||
select grp, ROUND(group_concat(a separator "")) from t1 group by grp;
|
select grp, ROUND(group_concat(a separator "")) from t1 group by grp;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
# Test NULL values
|
# Test NULL values
|
||||||
|
@ -1523,7 +1523,7 @@ DROP TABLE t1;
|
|||||||
create table t1 (a int, b int);
|
create table t1 (a int, b int);
|
||||||
insert into t1 values (1,11), (1,12), (2,22),(2,23), (4,44),(4,45);
|
insert into t1 values (1,11), (1,12), (2,22),(2,23), (4,44),(4,45);
|
||||||
create table t2 (c int, d int);
|
create table t2 (c int, d int);
|
||||||
insert into t2 values (1,11), (1,12), (2,22),(2,23), (4,44),(4,45);
|
insert into t2 values (1,11), (2,22), (4,44);
|
||||||
select distinct a,sum(b), (select d from t2 where c=a order by max(b) limit 1) from t1 group by a order by max(b);
|
select distinct a,sum(b), (select d from t2 where c=a order by max(b) limit 1) from t1 group by a order by max(b);
|
||||||
drop table t1, t2;
|
drop table t1, t2;
|
||||||
|
|
||||||
|
@ -7,3 +7,16 @@ select variable_name from information_schema.session_status where variable_name
|
|||||||
select variable_name from information_schema.session_variables where variable_name =
|
select variable_name from information_schema.session_variables where variable_name =
|
||||||
(select variable_name from information_schema.session_variables where variable_name = 'basedir');
|
(select variable_name from information_schema.session_variables where variable_name = 'basedir');
|
||||||
|
|
||||||
|
#
|
||||||
|
# information_schema tables inside subqueries, they should not be re-populated
|
||||||
|
# (i_s.columns needs to scan i_s itself, creating a tmp table for every i_s
|
||||||
|
# table. if it's re-populated, it'll do that multiple times)
|
||||||
|
#
|
||||||
|
create table t1 (a char);
|
||||||
|
insert t1 values ('a'),('t'),('z');
|
||||||
|
flush status;
|
||||||
|
select a, exists (select 1 from information_schema.columns where table_schema=concat('tes',a)) from t1;
|
||||||
|
# fix the result in ps-protocol
|
||||||
|
--replace_result 39 38
|
||||||
|
show status like 'created_tmp_tables';
|
||||||
|
drop table t1;
|
||||||
|
@ -1,108 +1,108 @@
|
|||||||
--source include/have_case_insensitive_file_system.inc
|
--source include/have_case_insensitive_file_system.inc
|
||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # Bug#46941 crash with lower_case_table_names=2 and
|
--echo # Bug#46941 crash with lower_case_table_names=2 and
|
||||||
--echo # foreign data dictionary confusion
|
--echo # foreign data dictionary confusion
|
||||||
--echo #
|
--echo #
|
||||||
|
|
||||||
CREATE DATABASE XY;
|
CREATE DATABASE XY;
|
||||||
USE XY;
|
USE XY;
|
||||||
|
|
||||||
#
|
#
|
||||||
# Logs are disabled, since the number of creates tables
|
# Logs are disabled, since the number of creates tables
|
||||||
# and subsequent select statements may vary between
|
# and subsequent select statements may vary between
|
||||||
# versions
|
# versions
|
||||||
#
|
#
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
--disable_result_log
|
--disable_result_log
|
||||||
|
|
||||||
let $tcs = `SELECT @@table_open_cache + 1`;
|
let $tcs = `SELECT @@table_open_cache + 1`;
|
||||||
|
|
||||||
let $i = $tcs;
|
let $i = $tcs;
|
||||||
|
|
||||||
while ($i)
|
while ($i)
|
||||||
{
|
{
|
||||||
eval CREATE TABLE XY.T_$i (a INT NOT NULL, b INT NOT NULL, c INT NOT NULL, d INT,
|
eval CREATE TABLE XY.T_$i (a INT NOT NULL, b INT NOT NULL, c INT NOT NULL, d INT,
|
||||||
primary key(a, b), unique(b)) ENGINE=InnoDB;
|
primary key(a, b), unique(b)) ENGINE=InnoDB;
|
||||||
dec $i;
|
dec $i;
|
||||||
}
|
}
|
||||||
|
|
||||||
eval ALTER TABLE XY.T_$tcs ADD INDEX I1 (c, b),
|
eval ALTER TABLE XY.T_$tcs ADD INDEX I1 (c, b),
|
||||||
ADD CONSTRAINT C1 FOREIGN KEY (c, b) REFERENCES XY.T_1 (a, b);
|
ADD CONSTRAINT C1 FOREIGN KEY (c, b) REFERENCES XY.T_1 (a, b);
|
||||||
|
|
||||||
eval ALTER TABLE XY.T_$tcs ADD INDEX I2 (b),
|
eval ALTER TABLE XY.T_$tcs ADD INDEX I2 (b),
|
||||||
ADD CONSTRAINT C2 FOREIGN KEY (b) REFERENCES XY.T_1(a);
|
ADD CONSTRAINT C2 FOREIGN KEY (b) REFERENCES XY.T_1(a);
|
||||||
|
|
||||||
let $i = $tcs;
|
let $i = $tcs;
|
||||||
while ($i)
|
while ($i)
|
||||||
{
|
{
|
||||||
eval SELECT * FROM XY.T_$i LIMIT 1;
|
eval SELECT * FROM XY.T_$i LIMIT 1;
|
||||||
dec $i;
|
dec $i;
|
||||||
}
|
}
|
||||||
|
|
||||||
DROP DATABASE XY;
|
DROP DATABASE XY;
|
||||||
CREATE DATABASE XY;
|
CREATE DATABASE XY;
|
||||||
USE XY;
|
USE XY;
|
||||||
eval CREATE TABLE XY.T_$tcs (a INT NOT NULL, b INT NOT NULL, c INT NOT NULL, d INT,
|
eval CREATE TABLE XY.T_$tcs (a INT NOT NULL, b INT NOT NULL, c INT NOT NULL, d INT,
|
||||||
PRIMARY KEY(a, b), UNIQUE(b)) ENGINE=InnoDB;
|
PRIMARY KEY(a, b), UNIQUE(b)) ENGINE=InnoDB;
|
||||||
#
|
#
|
||||||
# The bug causes this SELECT to err
|
# The bug causes this SELECT to err
|
||||||
eval SELECT * FROM XY.T_$tcs LIMIT 1;
|
eval SELECT * FROM XY.T_$tcs LIMIT 1;
|
||||||
|
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
--enable_result_log
|
--enable_result_log
|
||||||
DROP DATABASE XY;
|
DROP DATABASE XY;
|
||||||
USE TEST;
|
USE TEST;
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # Bug55222 Mysqldump table names case bug in REFERENCES clause
|
--echo # Bug55222 Mysqldump table names case bug in REFERENCES clause
|
||||||
--echo # InnoDB did not handle lower_case_table_names=2 for
|
--echo # InnoDB did not handle lower_case_table_names=2 for
|
||||||
--echo # foreign_table_names and referenced_table_names.
|
--echo # foreign_table_names and referenced_table_names.
|
||||||
--echo #
|
--echo #
|
||||||
|
|
||||||
SHOW VARIABLES LIKE 'lower_case_table_names';
|
SHOW VARIABLES LIKE 'lower_case_table_names';
|
||||||
|
|
||||||
--disable_warnings
|
--disable_warnings
|
||||||
DROP TABLE IF EXISTS `Table2`;
|
DROP TABLE IF EXISTS `Table2`;
|
||||||
DROP TABLE IF EXISTS `Table1`;
|
DROP TABLE IF EXISTS `Table1`;
|
||||||
--disable_warnings
|
--disable_warnings
|
||||||
|
|
||||||
CREATE TABLE `Table1`(c1 INT PRIMARY KEY) ENGINE=InnoDB;
|
CREATE TABLE `Table1`(c1 INT PRIMARY KEY) ENGINE=InnoDB;
|
||||||
CREATE TABLE `Table2`(c1 INT PRIMARY KEY, c2 INT) ENGINE=InnoDB;
|
CREATE TABLE `Table2`(c1 INT PRIMARY KEY, c2 INT) ENGINE=InnoDB;
|
||||||
ALTER TABLE `Table2` ADD CONSTRAINT fk1 FOREIGN KEY(c2) REFERENCES `Table1`(c1);
|
ALTER TABLE `Table2` ADD CONSTRAINT fk1 FOREIGN KEY(c2) REFERENCES `Table1`(c1);
|
||||||
query_vertical SHOW CREATE TABLE `Table2`;
|
query_vertical SHOW CREATE TABLE `Table2`;
|
||||||
query_vertical SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS;
|
query_vertical SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS;
|
||||||
DROP TABLE `Table2`;
|
DROP TABLE `Table2`;
|
||||||
DROP TABLE `Table1`;
|
DROP TABLE `Table1`;
|
||||||
|
|
||||||
--disable_warnings
|
--disable_warnings
|
||||||
DROP TABLE IF EXISTS Product_Order;
|
DROP TABLE IF EXISTS Product_Order;
|
||||||
DROP TABLE IF EXISTS Product;
|
DROP TABLE IF EXISTS Product;
|
||||||
DROP TABLE IF EXISTS Customer;
|
DROP TABLE IF EXISTS Customer;
|
||||||
--enable_warnings
|
--enable_warnings
|
||||||
|
|
||||||
CREATE TABLE Product (Category INT NOT NULL, Id INT NOT NULL,
|
CREATE TABLE Product (Category INT NOT NULL, Id INT NOT NULL,
|
||||||
Price DECIMAL, PRIMARY KEY(Category, Id)) ENGINE=InnoDB;
|
Price DECIMAL, PRIMARY KEY(Category, Id)) ENGINE=InnoDB;
|
||||||
CREATE TABLE Customer (Id INT NOT NULL, PRIMARY KEY (Id)) ENGINE=InnoDB;
|
CREATE TABLE Customer (Id INT NOT NULL, PRIMARY KEY (Id)) ENGINE=InnoDB;
|
||||||
CREATE TABLE Product_Order (No INT NOT NULL AUTO_INCREMENT,
|
CREATE TABLE Product_Order (No INT NOT NULL AUTO_INCREMENT,
|
||||||
Product_Category INT NOT NULL,
|
Product_Category INT NOT NULL,
|
||||||
Product_Id INT NOT NULL,
|
Product_Id INT NOT NULL,
|
||||||
Customer_Id INT NOT NULL,
|
Customer_Id INT NOT NULL,
|
||||||
PRIMARY KEY(No),
|
PRIMARY KEY(No),
|
||||||
INDEX (Product_Category, Product_Id),
|
INDEX (Product_Category, Product_Id),
|
||||||
FOREIGN KEY (Product_Category, Product_Id)
|
FOREIGN KEY (Product_Category, Product_Id)
|
||||||
REFERENCES Product(Category, Id) ON UPDATE CASCADE ON DELETE RESTRICT,
|
REFERENCES Product(Category, Id) ON UPDATE CASCADE ON DELETE RESTRICT,
|
||||||
INDEX (Customer_Id),
|
INDEX (Customer_Id),
|
||||||
FOREIGN KEY (Customer_Id)
|
FOREIGN KEY (Customer_Id)
|
||||||
REFERENCES Customer(Id)
|
REFERENCES Customer(Id)
|
||||||
) ENGINE=INNODB;
|
) ENGINE=INNODB;
|
||||||
|
|
||||||
query_vertical SHOW CREATE TABLE Product_Order;
|
query_vertical SHOW CREATE TABLE Product_Order;
|
||||||
query_vertical SHOW CREATE TABLE Product;
|
query_vertical SHOW CREATE TABLE Product;
|
||||||
query_vertical SHOW CREATE TABLE Customer;
|
query_vertical SHOW CREATE TABLE Customer;
|
||||||
query_vertical SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS;
|
query_vertical SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS;
|
||||||
DROP TABLE Product_Order;
|
DROP TABLE Product_Order;
|
||||||
DROP TABLE Product;
|
DROP TABLE Product;
|
||||||
DROP TABLE Customer;
|
DROP TABLE Customer;
|
||||||
|
|
||||||
|
@ -1749,6 +1749,16 @@ CHECK TABLE t1;
|
|||||||
|
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-3870 - Valgrind warnings on OPTIMIZE MyISAM or Aria TABLE with
|
||||||
|
--echo # disabled keys
|
||||||
|
--echo #
|
||||||
|
CREATE TABLE t1 (a INT, KEY(a)) ENGINE=MyISAM;
|
||||||
|
INSERT INTO t1 VALUES (4),(3),(1),(0);
|
||||||
|
ALTER TABLE t1 DISABLE KEYS;
|
||||||
|
OPTIMIZE TABLE t1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
#
|
#
|
||||||
# Check some variables
|
# Check some variables
|
||||||
#
|
#
|
||||||
|
@ -42,3 +42,14 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
--exec rm -rf $MYSQLTEST_VARDIR/zoneinfo
|
--exec rm -rf $MYSQLTEST_VARDIR/zoneinfo
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-6236 - [PATCH] mysql_tzinfo_to_sql may produce invalid SQL
|
||||||
|
--echo #
|
||||||
|
--exec mkdir $MYSQLTEST_VARDIR/zoneinfo
|
||||||
|
--copy_file std_data/zoneinfo/GMT $MYSQLTEST_VARDIR/zoneinfo/Factory
|
||||||
|
|
||||||
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
|
--exec $MYSQL_TZINFO_TO_SQL $MYSQLTEST_VARDIR/zoneinfo 2>&1
|
||||||
|
|
||||||
|
--exec rm -rf $MYSQLTEST_VARDIR/zoneinfo
|
||||||
|
@ -8,6 +8,35 @@ drop view if exists t1,v1,v2,v3,v4,v1badcheck;
|
|||||||
|
|
||||||
create table t1(a int);
|
create table t1(a int);
|
||||||
create table kv(k varchar(30) NOT NULL PRIMARY KEY,v varchar(50));
|
create table kv(k varchar(30) NOT NULL PRIMARY KEY,v varchar(50));
|
||||||
|
create view v1 as select 1;
|
||||||
|
|
||||||
|
repair table t1 quick;
|
||||||
|
repair table t1 extended;
|
||||||
|
repair table t1 use_frm;
|
||||||
|
--error ER_PARSE_ERROR
|
||||||
|
repair table t1 from mysql;
|
||||||
|
|
||||||
|
--error ER_PARSE_ERROR
|
||||||
|
repair view v1 quick;
|
||||||
|
--error ER_PARSE_ERROR
|
||||||
|
repair view v1 extended;
|
||||||
|
--error ER_PARSE_ERROR
|
||||||
|
repair view v1 use_frm;
|
||||||
|
repair view v1 from mysql;
|
||||||
|
|
||||||
|
--error ER_PARSE_ERROR
|
||||||
|
check view v1 quick;
|
||||||
|
--error ER_PARSE_ERROR
|
||||||
|
check view v1 fast;
|
||||||
|
--error ER_PARSE_ERROR
|
||||||
|
check view v1 medium;
|
||||||
|
--error ER_PARSE_ERROR
|
||||||
|
check view v1 extended;
|
||||||
|
--error ER_PARSE_ERROR
|
||||||
|
check view v1 changed;
|
||||||
|
check view v1 for upgrade;
|
||||||
|
|
||||||
|
drop view v1;
|
||||||
|
|
||||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
# check that CSV engine was compiled in, as the result of the test
|
# check that CSV engine was compiled in, as the result of the test
|
||||||
# depends on the presence of the log tables (which are CSV-based).
|
# depends on the presence of the log tables (which are CSV-based).
|
||||||
--source include/have_csv.inc
|
--source include/have_csv.inc
|
||||||
|
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||||
|
|
||||||
#
|
#
|
||||||
# Clean up after previous tests
|
# Clean up after previous tests
|
||||||
@ -65,7 +66,6 @@ create table t_bug25347 (a int) engine=myisam;
|
|||||||
create view v_bug25347 as select * from t_bug25347;
|
create view v_bug25347 as select * from t_bug25347;
|
||||||
insert into t_bug25347 values (1),(2),(3);
|
insert into t_bug25347 values (1),(2),(3);
|
||||||
flush tables;
|
flush tables;
|
||||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
|
||||||
--echo removing and creating
|
--echo removing and creating
|
||||||
--remove_file $MYSQLD_DATADIR/d_bug25347/t_bug25347.MYI
|
--remove_file $MYSQLD_DATADIR/d_bug25347/t_bug25347.MYI
|
||||||
--write_file $MYSQLD_DATADIR/d_bug25347/t_bug25347.MYI
|
--write_file $MYSQLD_DATADIR/d_bug25347/t_bug25347.MYI
|
||||||
@ -117,7 +117,6 @@ DROP TABLE t1, t2;
|
|||||||
create table t1(a int) engine=myisam;
|
create table t1(a int) engine=myisam;
|
||||||
create view v1 as select * from t1;
|
create view v1 as select * from t1;
|
||||||
show tables;
|
show tables;
|
||||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
|
||||||
--copy_file $MYSQLD_DATADIR/test/v1.frm $MYSQLD_DATADIR/test/v-1.frm
|
--copy_file $MYSQLD_DATADIR/test/v1.frm $MYSQLD_DATADIR/test/v-1.frm
|
||||||
show tables;
|
show tables;
|
||||||
--exec $MYSQL_CHECK --check-upgrade --databases test
|
--exec $MYSQL_CHECK --check-upgrade --databases test
|
||||||
@ -162,24 +161,23 @@ CREATE TABLE `#mysql50#c@d` (a INT) engine=myisam;
|
|||||||
CREATE TABLE t1 (a INT) engine=myisam;
|
CREATE TABLE t1 (a INT) engine=myisam;
|
||||||
|
|
||||||
# Create 5.0 like triggers
|
# Create 5.0 like triggers
|
||||||
let $MYSQLTEST_VARDIR= `select @@datadir`;
|
--write_file $MYSQLD_DATADIR/a@b/c@d.TRG
|
||||||
--write_file $MYSQLTEST_VARDIR/a@b/c@d.TRG
|
|
||||||
TYPE=TRIGGERS
|
TYPE=TRIGGERS
|
||||||
triggers='CREATE DEFINER=`root`@`localhost` TRIGGER tr1 BEFORE INSERT ON `c@d` FOR EACH ROW SET NEW.a = 10 * NEW.a'
|
triggers='CREATE DEFINER=`root`@`localhost` TRIGGER tr1 BEFORE INSERT ON `c@d` FOR EACH ROW SET NEW.a = 10 * NEW.a'
|
||||||
sql_modes=0
|
sql_modes=0
|
||||||
definers='root@localhost'
|
definers='root@localhost'
|
||||||
EOF
|
EOF
|
||||||
--write_file $MYSQLTEST_VARDIR/a@b/tr1.TRN
|
--write_file $MYSQLD_DATADIR/a@b/tr1.TRN
|
||||||
TYPE=TRIGGERNAME
|
TYPE=TRIGGERNAME
|
||||||
trigger_table=c@d
|
trigger_table=c@d
|
||||||
EOF
|
EOF
|
||||||
--write_file $MYSQLTEST_VARDIR/a@b/t1.TRG
|
--write_file $MYSQLD_DATADIR/a@b/t1.TRG
|
||||||
TYPE=TRIGGERS
|
TYPE=TRIGGERS
|
||||||
triggers='CREATE DEFINER=`root`@`localhost` TRIGGER tr2 BEFORE INSERT ON `a@b`.t1 FOR EACH ROW SET NEW.a = 100 * NEW.a'
|
triggers='CREATE DEFINER=`root`@`localhost` TRIGGER tr2 BEFORE INSERT ON `a@b`.t1 FOR EACH ROW SET NEW.a = 100 * NEW.a'
|
||||||
sql_modes=0
|
sql_modes=0
|
||||||
definers='root@localhost'
|
definers='root@localhost'
|
||||||
EOF
|
EOF
|
||||||
--write_file $MYSQLTEST_VARDIR/a@b/tr2.TRN
|
--write_file $MYSQLD_DATADIR/a@b/tr2.TRN
|
||||||
TYPE=TRIGGERNAME
|
TYPE=TRIGGERNAME
|
||||||
trigger_table=t1
|
trigger_table=t1
|
||||||
EOF
|
EOF
|
||||||
@ -253,7 +251,6 @@ INSERT INTO bug47205 VALUES ("foobar");
|
|||||||
FLUSH TABLE bug47205;
|
FLUSH TABLE bug47205;
|
||||||
|
|
||||||
--echo # Replace the FRM with a 5.0 FRM that will require upgrade
|
--echo # Replace the FRM with a 5.0 FRM that will require upgrade
|
||||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
|
||||||
--remove_file $MYSQLD_DATADIR/test/bug47205.frm
|
--remove_file $MYSQLD_DATADIR/test/bug47205.frm
|
||||||
--copy_file std_data/bug47205.frm $MYSQLD_DATADIR/test/bug47205.frm
|
--copy_file std_data/bug47205.frm $MYSQLD_DATADIR/test/bug47205.frm
|
||||||
|
|
||||||
@ -280,7 +277,6 @@ CREATE TABLE bug47205(a VARCHAR(20) PRIMARY KEY)
|
|||||||
FLUSH TABLE bug47205;
|
FLUSH TABLE bug47205;
|
||||||
|
|
||||||
--echo # Replace the FRM with a 5.0 FRM that will require upgrade
|
--echo # Replace the FRM with a 5.0 FRM that will require upgrade
|
||||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
|
||||||
--remove_file $MYSQLD_DATADIR/test/bug47205.frm
|
--remove_file $MYSQLD_DATADIR/test/bug47205.frm
|
||||||
--copy_file std_data/bug47205.frm $MYSQLD_DATADIR/test/bug47205.frm
|
--copy_file std_data/bug47205.frm $MYSQLD_DATADIR/test/bug47205.frm
|
||||||
|
|
||||||
@ -323,3 +319,34 @@ CREATE TABLE test.`t.1` (id int);
|
|||||||
--exec $MYSQL_CHECK test t.1
|
--exec $MYSQL_CHECK test t.1
|
||||||
|
|
||||||
drop table test.`t.1`;
|
drop table test.`t.1`;
|
||||||
|
|
||||||
|
#
|
||||||
|
# MDEV-8123 mysqlcheck: new --process-views option conflicts with --quick, --extended and such
|
||||||
|
#
|
||||||
|
create view v1 as select 1;
|
||||||
|
--echo mysqlcheck --process-views test
|
||||||
|
--exec $MYSQL_CHECK --process-views test
|
||||||
|
--echo mysqlcheck --process-views --extended test
|
||||||
|
--exec $MYSQL_CHECK --process-views --extended test
|
||||||
|
--echo mysqlcheck --process-views --fast test
|
||||||
|
--exec $MYSQL_CHECK --process-views --fast test
|
||||||
|
--echo mysqlcheck --process-views --quick test
|
||||||
|
--exec $MYSQL_CHECK --process-views --quick test
|
||||||
|
--echo mysqlcheck --process-views --check-only-changed test
|
||||||
|
--exec $MYSQL_CHECK --process-views --check-only-changed test
|
||||||
|
--echo mysqlcheck --process-views --medium-check test
|
||||||
|
--exec $MYSQL_CHECK --process-views --medium-check test
|
||||||
|
--echo mysqlcheck --process-views --check-upgrade test
|
||||||
|
--exec $MYSQL_CHECK --process-views --check-upgrade test
|
||||||
|
drop view v1;
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# MDEV-8124 mysqlcheck: --auto-repair runs REPAIR TABLE instead of REPAIR VIEW on views
|
||||||
|
#
|
||||||
|
create table t1(a int);
|
||||||
|
--copy_file $MYSQL_TEST_DIR/std_data/mysql_upgrade/v1.frm $MYSQLD_DATADIR/test/v1.frm
|
||||||
|
--echo mysqlcheck --process-views --check-upgrade --auto-repair test
|
||||||
|
--exec $MYSQL_CHECK --process-views --check-upgrade --auto-repair test
|
||||||
|
drop view v1;
|
||||||
|
drop table t1;
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
if (`select plugin_auth_version <= "5.5.43-MariaDB-37.2" from information_schema.plugins where plugin_name='innodb'`)
|
||||||
|
{
|
||||||
|
--skip Not fixed in XtraDB as of 5.5.43-MariaDB-37.2 or earlier
|
||||||
|
}
|
||||||
--source include/not_embedded.inc
|
--source include/not_embedded.inc
|
||||||
--source include/have_partition.inc
|
--source include/have_partition.inc
|
||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
@ -390,7 +394,7 @@ DROP TABLE t1;
|
|||||||
create table t1 (a int) engine=innodb partition by hash(a) ;
|
create table t1 (a int) engine=innodb partition by hash(a) ;
|
||||||
# Data_free for InnoDB tablespace varies depending on which
|
# Data_free for InnoDB tablespace varies depending on which
|
||||||
# tests have been run before this one
|
# tests have been run before this one
|
||||||
--replace_column 10 #
|
--replace_column 10 # 12 #
|
||||||
show table status like 't1';
|
show table status like 't1';
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
@ -402,12 +406,12 @@ engine = innodb
|
|||||||
partition by key (a);
|
partition by key (a);
|
||||||
# Data_free for InnoDB tablespace varies depending on which
|
# Data_free for InnoDB tablespace varies depending on which
|
||||||
# tests have been run before this one
|
# tests have been run before this one
|
||||||
--replace_column 10 #
|
--replace_column 10 # 12 #
|
||||||
show table status;
|
show table status;
|
||||||
insert into t1 values (0), (1), (2), (3);
|
insert into t1 values (0), (1), (2), (3);
|
||||||
# Data_free for InnoDB tablespace varies depending on which
|
# Data_free for InnoDB tablespace varies depending on which
|
||||||
# tests have been run before this one
|
# tests have been run before this one
|
||||||
--replace_column 10 #
|
--replace_column 10 # 12 #
|
||||||
show table status;
|
show table status;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
@ -416,17 +420,17 @@ engine = innodb
|
|||||||
partition by key (a);
|
partition by key (a);
|
||||||
# Data_free for InnoDB tablespace varies depending on which
|
# Data_free for InnoDB tablespace varies depending on which
|
||||||
# tests have been run before this one
|
# tests have been run before this one
|
||||||
--replace_column 10 #
|
--replace_column 10 # 12 #
|
||||||
show table status;
|
show table status;
|
||||||
insert into t1 values (NULL), (NULL), (NULL), (NULL);
|
insert into t1 values (NULL), (NULL), (NULL), (NULL);
|
||||||
# Data_free for InnoDB tablespace varies depending on which
|
# Data_free for InnoDB tablespace varies depending on which
|
||||||
# tests have been run before this one
|
# tests have been run before this one
|
||||||
--replace_column 10 #
|
--replace_column 10 # 12 #
|
||||||
show table status;
|
show table status;
|
||||||
insert into t1 values (NULL), (NULL), (NULL), (NULL);
|
insert into t1 values (NULL), (NULL), (NULL), (NULL);
|
||||||
# Data_free for InnoDB tablespace varies depending on which
|
# Data_free for InnoDB tablespace varies depending on which
|
||||||
# tests have been run before this one
|
# tests have been run before this one
|
||||||
--replace_column 10 #
|
--replace_column 10 # 12 #
|
||||||
show table status;
|
show table status;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
@ -661,6 +665,18 @@ ALTER TABLE t1 ADD UNIQUE KEY (b);
|
|||||||
--echo # have left table intact.
|
--echo # have left table intact.
|
||||||
SHOW CREATE TABLE t1;
|
SHOW CREATE TABLE t1;
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
--echo #
|
||||||
|
--echo # Bug #17299181 CREATE_TIME AND UPDATE_TIME ARE
|
||||||
|
--echo # WRONG FOR PARTITIONED TABLES
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
CREATE TABLE t1 (a int, PRIMARY KEY (a)) ENGINE=InnoDB
|
||||||
|
PARTITION BY HASH (a) PARTITIONS 2;
|
||||||
|
|
||||||
|
SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE
|
||||||
|
CREATE_TIME IS NOT NULL AND TABLE_NAME='t1';
|
||||||
|
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
|
47
mysql-test/t/range_innodb.test
Normal file
47
mysql-test/t/range_innodb.test
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
--echo #
|
||||||
|
--echo # Range optimizer (and related) tests that need InnoDB.
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
--source include/have_innodb.inc
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
drop table if exists t0, t1, t2;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-6735: Range checked for each record used with key
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
create table t0(a int);
|
||||||
|
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||||
|
|
||||||
|
create table t1(a int);
|
||||||
|
insert into t1 select A.a + B.a* 10 + C.a * 100 + D.a * 1000
|
||||||
|
from t0 A, t0 B, t0 C, t0 D;
|
||||||
|
|
||||||
|
create table t2 (
|
||||||
|
a int,
|
||||||
|
b int,
|
||||||
|
filler1 char(100),
|
||||||
|
filler2 char(100),
|
||||||
|
filler3 char(100),
|
||||||
|
filler4 char(100),
|
||||||
|
key(a),
|
||||||
|
key(b)
|
||||||
|
) engine=innodb;
|
||||||
|
|
||||||
|
insert into t2
|
||||||
|
select
|
||||||
|
a,a,
|
||||||
|
repeat('0123456789', 10),
|
||||||
|
repeat('0123456789', 10),
|
||||||
|
repeat('0123456789', 10),
|
||||||
|
repeat('0123456789', 10)
|
||||||
|
from t1;
|
||||||
|
|
||||||
|
analyze table t2;
|
||||||
|
--echo # The following must not use "Range checked for each record":
|
||||||
|
explain select * from t0 left join t2 on t2.a <t0.a and t2.b between 50 and 250;
|
||||||
|
|
||||||
|
drop table t0,t1,t2;
|
||||||
|
|
5
mysql-test/t/ssl_7937.combinations
Normal file
5
mysql-test/t/ssl_7937.combinations
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
[ssl]
|
||||||
|
--loose-enable-ssl
|
||||||
|
|
||||||
|
[nossl]
|
||||||
|
--loose-disable-ssl
|
35
mysql-test/t/ssl_7937.test
Normal file
35
mysql-test/t/ssl_7937.test
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#
|
||||||
|
# MDEV-7937: Enforce SSL when --ssl client option is used
|
||||||
|
#
|
||||||
|
|
||||||
|
source include/have_ssl_crypto_functs.inc;
|
||||||
|
|
||||||
|
# create a procedure instead of SHOW STATUS LIKE 'ssl_cipher'
|
||||||
|
# because the cipher depends on openssl (or yassl) version,
|
||||||
|
# and it's actual value doesn't matter here anyway
|
||||||
|
create procedure have_ssl()
|
||||||
|
select if(variable_value > '','yes','no') as 'have_ssl'
|
||||||
|
from information_schema.session_status
|
||||||
|
where variable_name='ssl_cipher';
|
||||||
|
|
||||||
|
--disable_abort_on_error
|
||||||
|
--echo mysql --ssl-ca=cacert.pem -e "call test.have_ssl()"
|
||||||
|
--exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/cacert.pem -e "call test.have_ssl()" 2>&1
|
||||||
|
--echo mysql --ssl -e "call test.have_ssl()"
|
||||||
|
--exec $MYSQL --ssl -e "call test.have_ssl()" 2>&1
|
||||||
|
--echo mysql --ssl-ca=cacert.pem --ssl-verify-server-cert -e "call test.have_ssl()"
|
||||||
|
--exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/cacert.pem --ssl-verify-server-cert -e "call test.have_ssl()" 2>&1
|
||||||
|
|
||||||
|
--echo mysql --ssl --ssl-verify-server-cert -e "call test.have_ssl()"
|
||||||
|
# this is the test where certificate verification fails.
|
||||||
|
# but yassl doesn't support certificate verification, so
|
||||||
|
# we fake the test result for yassl
|
||||||
|
let yassl=`select variable_value='Unknown' from information_schema.session_status where variable_name='Ssl_session_cache_mode'`;
|
||||||
|
if (!$yassl) {
|
||||||
|
--exec $MYSQL --ssl --ssl-verify-server-cert -e "call test.have_ssl()" 2>&1
|
||||||
|
}
|
||||||
|
if ($yassl) {
|
||||||
|
--echo ERROR 2026 (HY000): SSL connection error: Failed to verify the server certificate
|
||||||
|
}
|
||||||
|
|
||||||
|
drop procedure have_ssl;
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user