mirror of
https://github.com/MariaDB/server.git
synced 2026-04-24 09:15:30 +02:00
10.0 merge
This commit is contained in:
commit
45912599ca
1230 changed files with 61414 additions and 36023 deletions
|
|
@ -1147,3 +1147,4 @@ storage/perfschema/gen_pfs_lex_token
|
|||
storage/perfschema/pfs_lex_token.h
|
||||
*.bak
|
||||
*.OLD
|
||||
mysql-test/collections/default.release.done
|
||||
|
|
|
|||
|
|
@ -132,14 +132,10 @@ IF (NOT CPACK_GENERATOR)
|
|||
ENDIF(WIN32)
|
||||
ENDIF(NOT CPACK_GENERATOR)
|
||||
|
||||
IF(DEB)
|
||||
SET(INSTALL_LAYOUT "DEB")
|
||||
ENDIF(DEB)
|
||||
|
||||
INCLUDE(mysql_version)
|
||||
INCLUDE(cpack_rpm)
|
||||
INCLUDE(cpack_source_ignore_files)
|
||||
INCLUDE(install_layout)
|
||||
INCLUDE(cpack_rpm)
|
||||
|
||||
# Add macros
|
||||
INCLUDE(character_sets)
|
||||
|
|
|
|||
8255
INSTALL-SOURCE
8255
INSTALL-SOURCE
File diff suppressed because it is too large
Load diff
|
|
@ -2312,17 +2312,19 @@ static bool add_line(String &buffer,char *line,char *in_string,
|
|||
{
|
||||
uint length=(uint) (out-line);
|
||||
|
||||
if (!truncated &&
|
||||
(length < 9 ||
|
||||
my_strnncoll (charset_info,
|
||||
(uchar *)line, 9, (const uchar *) "delimiter", 9)))
|
||||
if (!truncated && (length < 9 ||
|
||||
my_strnncoll (charset_info, (uchar *)line, 9,
|
||||
(const uchar *) "delimiter", 9) ||
|
||||
(*in_string || *ml_comment)))
|
||||
{
|
||||
/*
|
||||
Don't add a new line in case there's a DELIMITER command to be
|
||||
added to the glob buffer (e.g. on processing a line like
|
||||
"<command>;DELIMITER <non-eof>") : similar to how a new line is
|
||||
not added in the case when the DELIMITER is the first command
|
||||
entered with an empty glob buffer.
|
||||
entered with an empty glob buffer. However, if the delimiter is
|
||||
part of a string or a comment, the new line should be added. (e.g.
|
||||
SELECT '\ndelimiter\n';\n)
|
||||
*/
|
||||
*out++='\n';
|
||||
length++;
|
||||
|
|
@ -4727,7 +4729,13 @@ put_info(const char *str,INFO_TYPE info_type, uint error, const char *sqlstate)
|
|||
if (info_type == INFO_ERROR)
|
||||
{
|
||||
if (!opt_nobeep)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
MessageBeep(MB_ICONWARNING);
|
||||
#else
|
||||
putchar('\a'); /* This should make a bell */
|
||||
#endif
|
||||
}
|
||||
vidattr(A_STANDOUT);
|
||||
if (error)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -818,6 +818,88 @@ write_event_header_and_base64(Log_event *ev, FILE *result_file,
|
|||
}
|
||||
|
||||
|
||||
static bool print_base64(PRINT_EVENT_INFO *print_event_info, Log_event *ev)
|
||||
{
|
||||
/*
|
||||
These events must be printed in base64 format, if printed.
|
||||
base64 format requires a FD event to be safe, so if no FD
|
||||
event has been printed, we give an error. Except if user
|
||||
passed --short-form, because --short-form disables printing
|
||||
row events.
|
||||
*/
|
||||
if (!print_event_info->printed_fd_event && !short_form &&
|
||||
opt_base64_output_mode != BASE64_OUTPUT_DECODE_ROWS)
|
||||
{
|
||||
const char* type_str= ev->get_type_str();
|
||||
if (opt_base64_output_mode == BASE64_OUTPUT_NEVER)
|
||||
error("--base64-output=never specified, but binlog contains a "
|
||||
"%s event which must be printed in base64.",
|
||||
type_str);
|
||||
else
|
||||
error("malformed binlog: it does not contain any "
|
||||
"Format_description_log_event. I now found a %s event, which "
|
||||
"is not safe to process without a "
|
||||
"Format_description_log_event.",
|
||||
type_str);
|
||||
return 1;
|
||||
}
|
||||
ev->print(result_file, print_event_info);
|
||||
return print_event_info->head_cache.error == -1;
|
||||
}
|
||||
|
||||
|
||||
static bool print_row_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
|
||||
ulong table_id, bool is_stmt_end)
|
||||
{
|
||||
Table_map_log_event *ignored_map=
|
||||
print_event_info->m_table_map_ignored.get_table(table_id);
|
||||
bool skip_event= (ignored_map != NULL);
|
||||
|
||||
/*
|
||||
end of statement check:
|
||||
i) destroy/free ignored maps
|
||||
ii) if skip event, flush cache now
|
||||
*/
|
||||
if (is_stmt_end)
|
||||
{
|
||||
/*
|
||||
Now is safe to clear ignored map (clear_tables will also
|
||||
delete original table map events stored in the map).
|
||||
*/
|
||||
if (print_event_info->m_table_map_ignored.count() > 0)
|
||||
print_event_info->m_table_map_ignored.clear_tables();
|
||||
|
||||
/*
|
||||
If there is a kept Annotate event and all corresponding
|
||||
rbr-events were filtered away, the Annotate event was not
|
||||
freed and it is just the time to do it.
|
||||
*/
|
||||
free_annotate_event();
|
||||
|
||||
/*
|
||||
One needs to take into account an event that gets
|
||||
filtered but was last event in the statement. If this is
|
||||
the case, previous rows events that were written into
|
||||
IO_CACHEs still need to be copied from cache to
|
||||
result_file (as it would happen in ev->print(...) if
|
||||
event was not skipped).
|
||||
*/
|
||||
if (skip_event)
|
||||
{
|
||||
if ((copy_event_cache_to_file_and_reinit(&print_event_info->head_cache, result_file) ||
|
||||
copy_event_cache_to_file_and_reinit(&print_event_info->body_cache, result_file)))
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* skip the event check */
|
||||
if (skip_event)
|
||||
return 0;
|
||||
|
||||
return print_base64(print_event_info, ev);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Print the given event, and either delete it or delegate the deletion
|
||||
to someone else.
|
||||
|
|
@ -1130,86 +1212,29 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
|
|||
error("Could not rewrite database name");
|
||||
goto err;
|
||||
}
|
||||
if (print_base64(print_event_info, ev))
|
||||
goto err;
|
||||
break;
|
||||
}
|
||||
case WRITE_ROWS_EVENT:
|
||||
case DELETE_ROWS_EVENT:
|
||||
case UPDATE_ROWS_EVENT:
|
||||
{
|
||||
Rows_log_event *e= (Rows_log_event*) ev;
|
||||
if (print_row_event(print_event_info, ev, e->get_table_id(),
|
||||
e->get_flags(Rows_log_event::STMT_END_F)))
|
||||
goto err;
|
||||
break;
|
||||
}
|
||||
case PRE_GA_WRITE_ROWS_EVENT:
|
||||
case PRE_GA_DELETE_ROWS_EVENT:
|
||||
case PRE_GA_UPDATE_ROWS_EVENT:
|
||||
{
|
||||
if (ev_type != TABLE_MAP_EVENT)
|
||||
{
|
||||
Rows_log_event *e= (Rows_log_event*) ev;
|
||||
Table_map_log_event *ignored_map=
|
||||
print_event_info->m_table_map_ignored.get_table(e->get_table_id());
|
||||
bool skip_event= (ignored_map != NULL);
|
||||
|
||||
/*
|
||||
end of statement check:
|
||||
i) destroy/free ignored maps
|
||||
ii) if skip event, flush cache now
|
||||
*/
|
||||
if (e->get_flags(Rows_log_event::STMT_END_F))
|
||||
{
|
||||
/*
|
||||
Now is safe to clear ignored map (clear_tables will also
|
||||
delete original table map events stored in the map).
|
||||
*/
|
||||
if (print_event_info->m_table_map_ignored.count() > 0)
|
||||
print_event_info->m_table_map_ignored.clear_tables();
|
||||
|
||||
/*
|
||||
If there is a kept Annotate event and all corresponding
|
||||
rbr-events were filtered away, the Annotate event was not
|
||||
freed and it is just the time to do it.
|
||||
*/
|
||||
free_annotate_event();
|
||||
|
||||
/*
|
||||
One needs to take into account an event that gets
|
||||
filtered but was last event in the statement. If this is
|
||||
the case, previous rows events that were written into
|
||||
IO_CACHEs still need to be copied from cache to
|
||||
result_file (as it would happen in ev->print(...) if
|
||||
event was not skipped).
|
||||
*/
|
||||
if (skip_event)
|
||||
{
|
||||
if ((copy_event_cache_to_file_and_reinit(&print_event_info->head_cache, result_file) ||
|
||||
copy_event_cache_to_file_and_reinit(&print_event_info->body_cache, result_file)))
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
|
||||
/* skip the event check */
|
||||
if (skip_event)
|
||||
goto end;
|
||||
}
|
||||
/*
|
||||
These events must be printed in base64 format, if printed.
|
||||
base64 format requires a FD event to be safe, so if no FD
|
||||
event has been printed, we give an error. Except if user
|
||||
passed --short-form, because --short-form disables printing
|
||||
row events.
|
||||
*/
|
||||
if (!print_event_info->printed_fd_event && !short_form &&
|
||||
opt_base64_output_mode != BASE64_OUTPUT_DECODE_ROWS)
|
||||
{
|
||||
const char* type_str= ev->get_type_str();
|
||||
if (opt_base64_output_mode == BASE64_OUTPUT_NEVER)
|
||||
error("--base64-output=never specified, but binlog contains a "
|
||||
"%s event which must be printed in base64.",
|
||||
type_str);
|
||||
else
|
||||
error("malformed binlog: it does not contain any "
|
||||
"Format_description_log_event. I now found a %s event, which "
|
||||
"is not safe to process without a "
|
||||
"Format_description_log_event.",
|
||||
type_str);
|
||||
Old_rows_log_event *e= (Old_rows_log_event*) ev;
|
||||
if (print_row_event(print_event_info, ev, e->get_table_id(),
|
||||
e->get_flags(Old_rows_log_event::STMT_END_F)))
|
||||
goto err;
|
||||
}
|
||||
/* FALL THROUGH */
|
||||
break;
|
||||
}
|
||||
default:
|
||||
print_skip_replication_statement(print_event_info, ev);
|
||||
|
|
@ -2444,6 +2469,8 @@ int main(int argc, char** argv)
|
|||
else
|
||||
load_processor.init_by_cur_dir();
|
||||
|
||||
fprintf(result_file, "/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;\n");
|
||||
|
||||
fprintf(result_file,
|
||||
"/*!40019 SET @@session.max_insert_delayed_threads=0*/;\n");
|
||||
|
||||
|
|
@ -2494,6 +2521,8 @@ int main(int argc, char** argv)
|
|||
"/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n"
|
||||
"/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n");
|
||||
|
||||
fprintf(result_file, "/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;\n");
|
||||
|
||||
if (tmpdir.list)
|
||||
free_tmpdir(&tmpdir);
|
||||
if (result_file != stdout)
|
||||
|
|
|
|||
|
|
@ -2300,7 +2300,6 @@ static uint dump_routines_for_db(char *db)
|
|||
const char *routine_type[]= {"FUNCTION", "PROCEDURE"};
|
||||
char db_name_buff[NAME_LEN*2+3], name_buff[NAME_LEN*2+3];
|
||||
char *routine_name;
|
||||
char *query_str;
|
||||
int i;
|
||||
FILE *sql_file= md_result_file;
|
||||
MYSQL_RES *routine_res, *routine_list_res;
|
||||
|
|
@ -2394,17 +2393,6 @@ static uint dump_routines_for_db(char *db)
|
|||
fprintf(sql_file, "/*!50003 DROP %s IF EXISTS %s */;\n",
|
||||
routine_type[i], routine_name);
|
||||
|
||||
query_str= cover_definer_clause(row[2], strlen(row[2]),
|
||||
C_STRING_WITH_LEN("50020"),
|
||||
C_STRING_WITH_LEN("50003"),
|
||||
C_STRING_WITH_LEN(" FUNCTION"));
|
||||
|
||||
if (!query_str)
|
||||
query_str= cover_definer_clause(row[2], strlen(row[2]),
|
||||
C_STRING_WITH_LEN("50020"),
|
||||
C_STRING_WITH_LEN("50003"),
|
||||
C_STRING_WITH_LEN(" PROCEDURE"));
|
||||
|
||||
if (mysql_num_fields(routine_res) >= 6)
|
||||
{
|
||||
if (switch_db_collation(sql_file, db_name_buff, ";",
|
||||
|
|
@ -2442,9 +2430,9 @@ static uint dump_routines_for_db(char *db)
|
|||
|
||||
fprintf(sql_file,
|
||||
"DELIMITER ;;\n"
|
||||
"/*!50003 %s */;;\n"
|
||||
"%s ;;\n"
|
||||
"DELIMITER ;\n",
|
||||
(const char *) (query_str != NULL ? query_str : row[2]));
|
||||
(const char *) row[2]);
|
||||
|
||||
restore_sql_mode(sql_file, ";");
|
||||
|
||||
|
|
@ -2459,7 +2447,6 @@ static uint dump_routines_for_db(char *db)
|
|||
}
|
||||
}
|
||||
|
||||
my_free(query_str);
|
||||
}
|
||||
} /* end of routine printing */
|
||||
mysql_free_result(routine_res);
|
||||
|
|
|
|||
|
|
@ -3633,7 +3633,6 @@ void do_remove_files_wildcard(struct st_command *command)
|
|||
fn_format(dirname, ds_directory.str, "", "", MY_UNPACK_FILENAME);
|
||||
|
||||
DBUG_PRINT("info", ("listing directory: %s", dirname));
|
||||
/* Note that my_dir sorts the list if not given any flags */
|
||||
if (!(dir_info= my_dir(dirname, MYF(MY_DONT_SORT | MY_WANT_STAT | MY_WME))))
|
||||
{
|
||||
error= 1;
|
||||
|
|
@ -3648,7 +3647,7 @@ void do_remove_files_wildcard(struct st_command *command)
|
|||
/* Set default wild chars for wild_compare, is changed in embedded mode */
|
||||
set_wild_chars(1);
|
||||
|
||||
for (i= 0; i < (uint) dir_info->number_off_files; i++)
|
||||
for (i= 0; i < (uint) dir_info->number_of_files; i++)
|
||||
{
|
||||
file= dir_info->dir_entry + i;
|
||||
/* Remove only regular files, i.e. no directories etc. */
|
||||
|
|
@ -3911,17 +3910,12 @@ static int get_list_files(DYNAMIC_STRING *ds, const DYNAMIC_STRING *ds_dirname,
|
|||
DBUG_ENTER("get_list_files");
|
||||
|
||||
DBUG_PRINT("info", ("listing directory: %s", ds_dirname->str));
|
||||
/* Note that my_dir sorts the list if not given any flags */
|
||||
if (!(dir_info= my_dir(ds_dirname->str, MYF(0))))
|
||||
if (!(dir_info= my_dir(ds_dirname->str, MYF(MY_WANT_SORT))))
|
||||
DBUG_RETURN(1);
|
||||
set_wild_chars(1);
|
||||
for (i= 0; i < (uint) dir_info->number_off_files; i++)
|
||||
for (i= 0; i < (uint) dir_info->number_of_files; i++)
|
||||
{
|
||||
file= dir_info->dir_entry + i;
|
||||
if (file->name[0] == '.' &&
|
||||
(file->name[1] == '\0' ||
|
||||
(file->name[1] == '.' && file->name[2] == '\0')))
|
||||
continue; /* . or .. */
|
||||
if (ds_wild && ds_wild->length &&
|
||||
wild_compare(file->name, ds_wild->str, 0))
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ IF(RPM)
|
|||
|
||||
SET(CPACK_GENERATOR "RPM")
|
||||
SET(CPACK_RPM_PACKAGE_DEBUG 1)
|
||||
SET(INSTALL_LAYOUT "RPM")
|
||||
SET(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.7)
|
||||
|
||||
SET(CPACK_RPM_COMPONENT_INSTALL ON)
|
||||
|
|
@ -49,9 +49,13 @@ MariaDB bug reports should be submitted through https://mariadb.atlassian.net/
|
|||
SET(CPACK_RPM_SPEC_MORE_DEFINE "
|
||||
%define mysql_vendor ${CPACK_PACKAGE_VENDOR}
|
||||
%define mysqlversion ${MYSQL_NO_DASH_VERSION}
|
||||
%define mysqldatadir /var/lib/mysql
|
||||
%define mysqlbasedir ${CMAKE_INSTALL_PREFIX}
|
||||
%define mysqldatadir ${INSTALL_MYSQLDATADIR}
|
||||
%define mysqld_user mysql
|
||||
%define mysqld_group mysql
|
||||
%define _bindir ${CMAKE_INSTALL_PREFIX}/${INSTALL_BINDIR}
|
||||
%define _sbindir ${CMAKE_INSTALL_PREFIX}/${INSTALL_SBINDIR}
|
||||
%define _sysconfdir ${INSTALL_SYSCONFDIR}
|
||||
")
|
||||
|
||||
# this creative hack is described here: http://www.cmake.org/pipermail/cmake/2012-January/048416.html
|
||||
|
|
@ -68,18 +72,18 @@ SET(ignored
|
|||
"%ignore /etc"
|
||||
"%ignore /etc/init.d"
|
||||
"%ignore /etc/logrotate.d"
|
||||
"%ignore /usr"
|
||||
"%ignore /usr/bin"
|
||||
"%ignore /usr/include"
|
||||
"%ignore /usr/lib"
|
||||
"%ignore /usr/lib64"
|
||||
"%ignore /usr/sbin"
|
||||
"%ignore /usr/share"
|
||||
"%ignore /usr/share/aclocal"
|
||||
"%ignore /usr/share/doc"
|
||||
"%ignore /usr/share/man"
|
||||
"%ignore /usr/share/man/man1*"
|
||||
"%ignore /usr/share/man/man8*"
|
||||
"%ignore ${CMAKE_INSTALL_PREFIX}"
|
||||
"%ignore ${CMAKE_INSTALL_PREFIX}/bin"
|
||||
"%ignore ${CMAKE_INSTALL_PREFIX}/include"
|
||||
"%ignore ${CMAKE_INSTALL_PREFIX}/lib"
|
||||
"%ignore ${CMAKE_INSTALL_PREFIX}/lib64"
|
||||
"%ignore ${CMAKE_INSTALL_PREFIX}/sbin"
|
||||
"%ignore ${CMAKE_INSTALL_PREFIX}/share"
|
||||
"%ignore ${CMAKE_INSTALL_PREFIX}/share/aclocal"
|
||||
"%ignore ${CMAKE_INSTALL_PREFIX}/share/doc"
|
||||
"%ignore ${CMAKE_INSTALL_PREFIX}/share/man"
|
||||
"%ignore ${CMAKE_INSTALL_PREFIX}/share/man/man1*"
|
||||
"%ignore ${CMAKE_INSTALL_PREFIX}/share/man/man8*"
|
||||
)
|
||||
|
||||
SET(CPACK_RPM_server_USER_FILELIST ${ignored} "%config(noreplace) /etc/my.cnf.d/*")
|
||||
|
|
@ -103,7 +107,7 @@ SET(CPACK_RPM_devel_PACKAGE_OBSOLETES "mysql-devel MySQL-devel MySQL-OurDelta-de
|
|||
SET(CPACK_RPM_devel_PACKAGE_PROVIDES "MariaDB-devel MySQL-devel mysql-devel")
|
||||
|
||||
SET(CPACK_RPM_server_PACKAGE_OBSOLETES "MariaDB mysql mysql-server MySQL-server MySQL-OurDelta-server")
|
||||
SET(CPACK_RPM_server_PACKAGE_PROVIDES "MariaDB MariaDB-server MySQL-server config(MariaDB-server) msqlormysql mysql mysql-server")
|
||||
SET(CPACK_RPM_server_PACKAGE_PROVIDES "MariaDB MariaDB-server MySQL-server config(MariaDB-server) msqlormysql mysql mysql(x86-32) mysql(x86-64) mysql-server")
|
||||
SET(CPACK_RPM_server_PRE_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-prein.sh)
|
||||
SET(CPACK_RPM_server_PRE_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-preun.sh)
|
||||
SET(CPACK_RPM_server_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-postin.sh)
|
||||
|
|
|
|||
|
|
@ -67,7 +67,13 @@
|
|||
# http://forge.mysql.com/wiki/CMake#Fine-tuning_installation_paths
|
||||
|
||||
IF(NOT INSTALL_LAYOUT)
|
||||
SET(INSTALL_LAYOUT "STANDALONE")
|
||||
IF(DEB)
|
||||
SET(INSTALL_LAYOUT "DEB")
|
||||
ELSEIF(RPM)
|
||||
SET(INSTALL_LAYOUT "RPM")
|
||||
ELSE()
|
||||
SET(INSTALL_LAYOUT "STANDALONE")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
SET(INSTALL_LAYOUT "${INSTALL_LAYOUT}"
|
||||
|
|
@ -187,7 +193,7 @@ SET(INSTALL_SHAREDIR_DEB "share")
|
|||
SET(INSTALL_MYSQLSHAREDIR_DEB "share/mysql")
|
||||
SET(INSTALL_MYSQLTESTDIR_DEB "mysql-test")
|
||||
SET(INSTALL_SQLBENCHDIR_DEB ".")
|
||||
SET(INSTALL_SUPPORTFILESDIR_DEB "support-files")
|
||||
SET(INSTALL_SUPPORTFILESDIR_DEB "share/mysql")
|
||||
#
|
||||
SET(INSTALL_MYSQLDATADIR_DEB "/var/lib/mysql")
|
||||
SET(INSTALL_PLUGINTESTDIR_DEB ${plugin_tests})
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ INCLUDE(CheckCCompilerFlag)
|
|||
# Setup GCC (GNU C compiler) warning options.
|
||||
MACRO(SET_MYSQL_MAINTAINER_GNU_C_OPTIONS)
|
||||
SET(MY_MAINTAINER_WARNINGS
|
||||
"-Wall -Wextra -Wunused -Wwrite-strings -Wno-strict-aliasing -Wno-invalid-offsetof -DFORCE_INIT_OF_VARS")
|
||||
"-Wall -Wextra -Wunused -Wwrite-strings -Wno-strict-aliasing -DFORCE_INIT_OF_VARS")
|
||||
|
||||
CHECK_C_COMPILER_FLAG("-Wno-missing-field-initializers"
|
||||
HAVE_NO_MISSING_FIELD_INITIALIZERS)
|
||||
|
|
@ -44,7 +44,7 @@ ENDMACRO()
|
|||
# Setup G++ (GNU C++ compiler) warning options.
|
||||
MACRO(SET_MYSQL_MAINTAINER_GNU_CXX_OPTIONS)
|
||||
SET(MY_MAINTAINER_CXX_WARNINGS
|
||||
"${MY_MAINTAINER_WARNINGS} -Wno-unused-parameter -Woverloaded-virtual"
|
||||
"${MY_MAINTAINER_WARNINGS} -Wno-invalid-offsetof -Wno-unused-parameter -Woverloaded-virtual"
|
||||
CACHE INTERNAL "C++ warning options used in maintainer builds.")
|
||||
ENDMACRO()
|
||||
|
||||
|
|
|
|||
|
|
@ -267,6 +267,7 @@ SET(HAVE_SYNCH_H CACHE INTERNAL "")
|
|||
SET(HAVE_SYSENT_H CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_CDEFS_H CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_DIR_H CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_EVENT_H CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_ERRLIST CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_FILE_H CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_FPU_H CACHE INTERNAL "")
|
||||
|
|
|
|||
|
|
@ -171,12 +171,12 @@ MACRO(MYSQL_ADD_PLUGIN)
|
|||
|
||||
IF(ARG_MANDATORY)
|
||||
SET (mysql_mandatory_plugins
|
||||
"${mysql_mandatory_plugins} builtin_maria_${target}_plugin,"
|
||||
PARENT_SCOPE)
|
||||
"${mysql_mandatory_plugins} builtin_maria_${target}_plugin,")
|
||||
SET (mysql_mandatory_plugins ${mysql_mandatory_plugins} PARENT_SCOPE)
|
||||
ELSE()
|
||||
SET (mysql_optional_plugins
|
||||
"${mysql_optional_plugins} builtin_maria_${target}_plugin,"
|
||||
PARENT_SCOPE)
|
||||
"${mysql_optional_plugins} builtin_maria_${target}_plugin,")
|
||||
SET (mysql_optional_plugins ${mysql_optional_plugins} PARENT_SCOPE)
|
||||
ENDIF()
|
||||
ELSEIF(NOT WITHOUT_${plugin} AND NOT ARG_STATIC_ONLY AND NOT WITHOUT_DYNAMIC_PLUGINS)
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@
|
|||
#cmakedefine HAVE_IA64INTRIN_H 1
|
||||
#cmakedefine HAVE_IEEEFP_H 1
|
||||
#cmakedefine HAVE_INTTYPES_H 1
|
||||
#cmakedefine HAVE_KQUEUE 1
|
||||
#cmakedefine HAVE_LIMITS_H 1
|
||||
#cmakedefine HAVE_LINUX_UNISTD_H 1
|
||||
#cmakedefine HAVE_LOCALE_H 1
|
||||
|
|
@ -619,8 +620,8 @@
|
|||
|
||||
#cmakedefine SO_EXT "@CMAKE_SHARED_MODULE_SUFFIX@"
|
||||
|
||||
#define MYSQL_MAJOR_VERSION @MAJOR_VERSION@
|
||||
#define MYSQL_MINOR_VERSION @MINOR_VERSION@
|
||||
#define MYSQL_VERSION_MAJOR @MAJOR_VERSION@
|
||||
#define MYSQL_VERSION_MINOR @MINOR_VERSION@
|
||||
#define MYSQL_VERSION_PATCH @PATCH_VERSION@
|
||||
#define MYSQL_VERSION_EXTRA "@EXTRA_VERSION@"
|
||||
|
||||
|
|
|
|||
|
|
@ -153,6 +153,7 @@ IF(UNIX)
|
|||
SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} wrap)
|
||||
CHECK_C_SOURCE_COMPILES(
|
||||
"
|
||||
#include <sys/types.h>
|
||||
#include <tcpd.h>
|
||||
int allow_severity = 0;
|
||||
int deny_severity = 0;
|
||||
|
|
@ -210,6 +211,7 @@ CHECK_INCLUDE_FILES (sched.h HAVE_SCHED_H)
|
|||
CHECK_INCLUDE_FILES (select.h HAVE_SELECT_H)
|
||||
CHECK_INCLUDE_FILES (semaphore.h HAVE_SEMAPHORE_H)
|
||||
CHECK_INCLUDE_FILES ("sys/types.h;sys/dir.h" HAVE_SYS_DIR_H)
|
||||
CHECK_INCLUDE_FILES ("sys/types.h;sys/event.h" HAVE_SYS_EVENT_H)
|
||||
CHECK_INCLUDE_FILES (sys/ndir.h HAVE_SYS_NDIR_H)
|
||||
CHECK_INCLUDE_FILES (sys/pte.h HAVE_SYS_PTE_H)
|
||||
CHECK_INCLUDE_FILES (stddef.h HAVE_STDDEF_H)
|
||||
|
|
@ -223,13 +225,13 @@ CHECK_INCLUDE_FILES (sys/cdefs.h HAVE_SYS_CDEFS_H)
|
|||
CHECK_INCLUDE_FILES (sys/file.h HAVE_SYS_FILE_H)
|
||||
CHECK_INCLUDE_FILES (sys/fpu.h HAVE_SYS_FPU_H)
|
||||
CHECK_INCLUDE_FILES (sys/ioctl.h HAVE_SYS_IOCTL_H)
|
||||
CHECK_INCLUDE_FILES (sys/ipc.h HAVE_SYS_IPC_H)
|
||||
CHECK_INCLUDE_FILES (sys/malloc.h HAVE_SYS_MALLOC_H)
|
||||
CHECK_INCLUDE_FILES ("sys/types.h;sys/ipc.h" HAVE_SYS_IPC_H)
|
||||
CHECK_INCLUDE_FILES ("sys/types.h;sys/malloc.h" HAVE_SYS_MALLOC_H)
|
||||
CHECK_INCLUDE_FILES (sys/mman.h HAVE_SYS_MMAN_H)
|
||||
CHECK_INCLUDE_FILES (sys/prctl.h HAVE_SYS_PRCTL_H)
|
||||
CHECK_INCLUDE_FILES (sys/resource.h HAVE_SYS_RESOURCE_H)
|
||||
CHECK_INCLUDE_FILES (sys/select.h HAVE_SYS_SELECT_H)
|
||||
CHECK_INCLUDE_FILES (sys/shm.h HAVE_SYS_SHM_H)
|
||||
CHECK_INCLUDE_FILES ("sys/types.h;sys/shm.h" HAVE_SYS_SHM_H)
|
||||
CHECK_INCLUDE_FILES (sys/socket.h HAVE_SYS_SOCKET_H)
|
||||
CHECK_INCLUDE_FILES (sys/stat.h HAVE_SYS_STAT_H)
|
||||
CHECK_INCLUDE_FILES (sys/stream.h HAVE_SYS_STREAM_H)
|
||||
|
|
@ -459,6 +461,10 @@ CHECK_FUNCTION_EXISTS (memalign HAVE_MEMALIGN)
|
|||
CHECK_FUNCTION_EXISTS (chown HAVE_CHOWN)
|
||||
CHECK_FUNCTION_EXISTS (nl_langinfo HAVE_NL_LANGINFO)
|
||||
|
||||
IF(HAVE_SYS_EVENT_H)
|
||||
CHECK_FUNCTION_EXISTS (kqueue HAVE_KQUEUE)
|
||||
ENDIF()
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Support for WL#2373 (Use cycle counter for timing)
|
||||
#--------------------------------------------------------------------
|
||||
|
|
|
|||
4
debian/autobake-deb.sh
vendored
4
debian/autobake-deb.sh
vendored
|
|
@ -21,8 +21,8 @@ source ./VERSION
|
|||
UPSTREAM="${MYSQL_VERSION_MAJOR}.${MYSQL_VERSION_MINOR}.${MYSQL_VERSION_PATCH}${MYSQL_VERSION_EXTRA}"
|
||||
RELEASE_EXTRA=""
|
||||
|
||||
RELEASE_NAME=mariadb
|
||||
PATCHLEVEL=""
|
||||
RELEASE_NAME=""
|
||||
PATCHLEVEL="+maria"
|
||||
LOGSTRING="MariaDB build"
|
||||
|
||||
# Look up distro-version specific stuff.
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ invoke() {
|
|||
fi
|
||||
}
|
||||
|
||||
MYSQL_BOOTSTRAP="/usr/sbin/mysqld --bootstrap --user=mysql --skip-grant-tables --loose-innodb=OFF --default-storage-engine=myisam"
|
||||
MYSQL_BOOTSTRAP="/usr/sbin/mysqld --bootstrap --user=mysql --skip-grant-tables --default-storage-engine=myisam"
|
||||
|
||||
test_mysql_access() {
|
||||
mysql --no-defaults -u root -h localhost </dev/null >/dev/null 2>&1
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ invoke() {
|
|||
fi
|
||||
}
|
||||
|
||||
MYSQL_BOOTSTRAP="/usr/sbin/mysqld --bootstrap --user=mysql --skip-grant-tables --loose-innodb=OFF --default-storage-engine=myisam"
|
||||
MYSQL_BOOTSTRAP="/usr/sbin/mysqld --bootstrap --user=mysql --skip-grant-tables --default-storage-engine=myisam"
|
||||
|
||||
test_mysql_access() {
|
||||
mysql --no-defaults -u root -h localhost </dev/null >/dev/null 2>&1
|
||||
|
|
|
|||
|
|
@ -26,8 +26,13 @@
|
|||
#include <my_sys.h>
|
||||
#include <m_string.h>
|
||||
#include <my_getopt.h>
|
||||
#include <mysql_version.h>
|
||||
|
||||
#define load_default_groups mysqld_groups
|
||||
#include <mysqld_default_groups.h>
|
||||
#undef load_default_groups
|
||||
|
||||
my_bool opt_mysqld;
|
||||
const char *config_file="my"; /* Default config file */
|
||||
uint verbose= 0, opt_defaults_file_used= 0;
|
||||
const char *default_dbug_option="d:t:o,/tmp/my_print_defaults.trace";
|
||||
|
|
@ -78,6 +83,8 @@ static struct my_option my_long_options[] =
|
|||
(void *)&my_defaults_extra_file,
|
||||
(void *)&my_defaults_extra_file, 0, GET_STR,
|
||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"mysqld", 0, "Read the same set of groups that the mysqld binary does.",
|
||||
&opt_mysqld, &opt_mysqld, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"no-defaults", 'n', "Return an empty string (useful for scripts).",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"help", '?', "Display this help message and exit.",
|
||||
|
|
@ -98,11 +105,12 @@ static void usage(my_bool version)
|
|||
return;
|
||||
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n");
|
||||
puts("Prints all arguments that is give to some program using the default files");
|
||||
printf("Usage: %s [OPTIONS] groups\n", my_progname);
|
||||
printf("Usage: %s [OPTIONS] [groups]\n", my_progname);
|
||||
my_print_help(my_long_options);
|
||||
my_print_default_files(config_file);
|
||||
my_print_variables(my_long_options);
|
||||
printf("\nExample usage:\n%s --defaults-file=example.cnf client client-server mysql\n", my_progname);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -115,17 +123,15 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
|||
opt_defaults_file_used= 1;
|
||||
break;
|
||||
case 'n':
|
||||
exit(0);
|
||||
exit(0);
|
||||
case 'I':
|
||||
case '?':
|
||||
usage(0);
|
||||
exit(0);
|
||||
usage(0);
|
||||
case 'v':
|
||||
verbose++;
|
||||
break;
|
||||
case 'V':
|
||||
usage(1);
|
||||
exit(0);
|
||||
usage(1);
|
||||
case '#':
|
||||
DBUG_PUSH(argument ? argument : default_dbug_option);
|
||||
break;
|
||||
|
|
@ -141,11 +147,6 @@ static int get_options(int *argc,char ***argv)
|
|||
if ((ho_error=handle_options(argc, argv, my_long_options, get_one_option)))
|
||||
exit(ho_error);
|
||||
|
||||
if (*argc < 1)
|
||||
{
|
||||
usage(0);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -153,9 +154,10 @@ static int get_options(int *argc,char ***argv)
|
|||
int main(int argc, char **argv)
|
||||
{
|
||||
int count, error, args_used;
|
||||
char **load_default_groups, *tmp_arguments[6];
|
||||
char **load_default_groups= 0, *tmp_arguments[6];
|
||||
char **argument, **arguments, **org_argv;
|
||||
char *defaults, *extra_defaults, *group_suffix;
|
||||
int nargs, i= 0;
|
||||
MY_INIT(argv[0]);
|
||||
|
||||
org_argv= argv;
|
||||
|
|
@ -169,13 +171,25 @@ int main(int argc, char **argv)
|
|||
arguments[count]= 0;
|
||||
|
||||
/* Check out the args */
|
||||
if (!(load_default_groups=(char**) my_malloc((argc+1)*sizeof(char*),
|
||||
MYF(MY_WME))))
|
||||
exit(1);
|
||||
if (get_options(&argc,&argv))
|
||||
exit(1);
|
||||
memcpy((char*) load_default_groups, (char*) argv, (argc + 1) * sizeof(*argv));
|
||||
|
||||
nargs= argc + 1;
|
||||
if (opt_mysqld)
|
||||
nargs+= array_elements(mysqld_groups);
|
||||
|
||||
if (nargs < 2)
|
||||
usage(0);
|
||||
|
||||
load_default_groups=(char**) my_malloc(nargs*sizeof(char*), MYF(MY_WME));
|
||||
if (!load_default_groups)
|
||||
exit(1);
|
||||
if (opt_mysqld)
|
||||
{
|
||||
for (; mysqld_groups[i]; i++)
|
||||
load_default_groups[i]= (char*) mysqld_groups[i];
|
||||
}
|
||||
memcpy(load_default_groups + i, argv, (argc + 1) * sizeof(*argv));
|
||||
if ((error= load_defaults(config_file, (const char **) load_default_groups,
|
||||
&count, &arguments)))
|
||||
{
|
||||
|
|
@ -198,6 +212,6 @@ int main(int argc, char **argv)
|
|||
puts(*argument);
|
||||
my_free(load_default_groups);
|
||||
free_defaults(arguments);
|
||||
|
||||
my_end(0);
|
||||
exit(0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -767,8 +767,14 @@ int DoProcessReply(SSL& ssl)
|
|||
|
||||
while (buffer.get_current() < hdr.length_ + RECORD_HEADER + offset) {
|
||||
// each message in record, can be more than 1 if not encrypted
|
||||
if (ssl.getSecurity().get_parms().pending_ == false) // cipher on
|
||||
if (ssl.getSecurity().get_parms().pending_ == false) { // cipher on
|
||||
// sanity check for malicious/corrupted/illegal input
|
||||
if (buffer.get_remaining() < hdr.length_) {
|
||||
ssl.SetError(bad_input);
|
||||
return 0;
|
||||
}
|
||||
decrypt_message(ssl, buffer, hdr.length_);
|
||||
}
|
||||
|
||||
mySTL::auto_ptr<Message> msg(mf.CreateObject(hdr.type_));
|
||||
if (!msg.get()) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
/* Copyright (c) 2000, 2010, Oracle and/or its affiliates.
|
||||
Copyright (c) 2011, 2013, Monty Program Ab.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -60,11 +61,8 @@ typedef struct st_hash {
|
|||
/* A search iterator state */
|
||||
typedef uint HASH_SEARCH_STATE;
|
||||
|
||||
#define my_hash_init(A,B,C,D,E,F,G,H) \
|
||||
_my_hash_init(A,0,B,C,D,E,F,G,H)
|
||||
#define my_hash_init2(A,B,C,D,E,F,G,H,I) \
|
||||
_my_hash_init(A,B,C,D,E,F,G,H,I)
|
||||
my_bool _my_hash_init(HASH *hash, uint growth_size, CHARSET_INFO *charset,
|
||||
#define my_hash_init(A,B,C,D,E,F,G,H) my_hash_init2(A,0,B,C,D,E,F,G,H)
|
||||
my_bool my_hash_init2(HASH *hash, uint growth_size, CHARSET_INFO *charset,
|
||||
ulong default_array_elements, size_t key_offset,
|
||||
size_t key_length, my_hash_get_key get_key,
|
||||
void (*free_element)(void*),
|
||||
|
|
@ -98,7 +96,7 @@ my_bool my_hash_iterate(HASH *hash, my_hash_walk_action action, void *argument);
|
|||
#define my_hash_clear(H) bzero((char*) (H), sizeof(*(H)))
|
||||
#define my_hash_inited(H) ((H)->blength != 0)
|
||||
#define my_hash_init_opt(A,B,C,D,E,F,G,H) \
|
||||
(!my_hash_inited(A) && _my_hash_init(A,0,B,C,D,E,F,G,H))
|
||||
(!my_hash_inited(A) && my_hash_init(A,B,C,D,E,F,G,H))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
/* Copyright (C) 2006-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
|
||||
Copyright (c) 2009, 2013, Monty Program Ab.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -60,31 +61,31 @@ extern "C" {
|
|||
sets all high keys.
|
||||
*/
|
||||
#define MARIA_KEYMAP_BITS (8 * SIZEOF_LONG_LONG)
|
||||
#define MARIA_KEYMAP_HIGH_MASK (ULL(1) << (MARIA_KEYMAP_BITS - 1))
|
||||
#define MARIA_KEYMAP_HIGH_MASK (1ULL << (MARIA_KEYMAP_BITS - 1))
|
||||
#define maria_get_mask_all_keys_active(_keys_) \
|
||||
(((_keys_) < MARIA_KEYMAP_BITS) ? \
|
||||
((ULL(1) << (_keys_)) - ULL(1)) : \
|
||||
(~ ULL(0)))
|
||||
((1ULL << (_keys_)) - 1ULL) : \
|
||||
(~ 0ULL))
|
||||
#if MARIA_MAX_KEY > MARIA_KEYMAP_BITS
|
||||
#define maria_is_key_active(_keymap_,_keyno_) \
|
||||
(((_keyno_) < MARIA_KEYMAP_BITS) ? \
|
||||
test((_keymap_) & (ULL(1) << (_keyno_))) : \
|
||||
test((_keymap_) & (1ULL << (_keyno_))) : \
|
||||
test((_keymap_) & MARIA_KEYMAP_HIGH_MASK))
|
||||
#define maria_set_key_active(_keymap_,_keyno_) \
|
||||
(_keymap_)|= (((_keyno_) < MARIA_KEYMAP_BITS) ? \
|
||||
(ULL(1) << (_keyno_)) : \
|
||||
(1ULL << (_keyno_)) : \
|
||||
MARIA_KEYMAP_HIGH_MASK)
|
||||
#define maria_clear_key_active(_keymap_,_keyno_) \
|
||||
(_keymap_)&= (((_keyno_) < MARIA_KEYMAP_BITS) ? \
|
||||
(~ (ULL(1) << (_keyno_))) : \
|
||||
(~ (ULL(0))) /*ignore*/ )
|
||||
(~ (1ULL << (_keyno_))) : \
|
||||
(~ (0ULL)) /*ignore*/ )
|
||||
#else
|
||||
#define maria_is_key_active(_keymap_,_keyno_) \
|
||||
test((_keymap_) & (ULL(1) << (_keyno_)))
|
||||
test((_keymap_) & (1ULL << (_keyno_)))
|
||||
#define maria_set_key_active(_keymap_,_keyno_) \
|
||||
(_keymap_)|= (ULL(1) << (_keyno_))
|
||||
(_keymap_)|= (1ULL << (_keyno_))
|
||||
#define maria_clear_key_active(_keymap_,_keyno_) \
|
||||
(_keymap_)&= (~ (ULL(1) << (_keyno_)))
|
||||
(_keymap_)&= (~ (1ULL << (_keyno_)))
|
||||
#endif
|
||||
#define maria_is_any_key_active(_keymap_) \
|
||||
test((_keymap_))
|
||||
|
|
|
|||
|
|
@ -313,12 +313,12 @@ enum ha_base_keytype {
|
|||
#define HA_OPTION_CHECKSUM 32
|
||||
#define HA_OPTION_DELAY_KEY_WRITE 64
|
||||
#define HA_OPTION_NO_PACK_KEYS 128 /* Reserved for MySQL */
|
||||
#define HA_OPTION_CREATE_FROM_ENGINE 256
|
||||
/* unused 256 */
|
||||
#define HA_OPTION_RELIES_ON_SQL_LAYER 512
|
||||
#define HA_OPTION_NULL_FIELDS 1024
|
||||
#define HA_OPTION_PAGE_CHECKSUM 2048
|
||||
/* .frm has extra create options in linked-list format */
|
||||
#define HA_OPTION_TEXT_CREATE_OPTIONS (1L << 14)
|
||||
#define HA_OPTION_TEXT_CREATE_OPTIONS_legacy (1L << 14) /* 5.2 to 5.5, unused since 10.0 */
|
||||
#define HA_OPTION_TEMP_COMPRESS_RECORD (1L << 15) /* set by isamchk */
|
||||
#define HA_OPTION_READ_ONLY_DATA (1L << 16) /* Set by isamchk */
|
||||
#define HA_OPTION_NO_CHECKSUM (1L << 17)
|
||||
|
|
@ -405,7 +405,7 @@ enum ha_base_keytype {
|
|||
#define HA_ERR_WRONG_INDEX 124 /* Wrong index given to function */
|
||||
#define HA_ERR_CRASHED 126 /* Indexfile is crashed */
|
||||
#define HA_ERR_WRONG_IN_RECORD 127 /* Record-file is crashed */
|
||||
#define HA_ERR_OUT_OF_MEM 128 /* Record-file is crashed */
|
||||
#define HA_ERR_OUT_OF_MEM 128 /* Out of memory */
|
||||
#define HA_ERR_NOT_A_TABLE 130 /* not a MYI file - no signature */
|
||||
#define HA_ERR_WRONG_COMMAND 131 /* Command not supported */
|
||||
#define HA_ERR_OLD_FILE 132 /* old databasfile */
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ extern const char* _db_get_func_(void);
|
|||
#define DBUG_END() _db_end_ ()
|
||||
#define DBUG_LOCK_FILE _db_lock_file_()
|
||||
#define DBUG_UNLOCK_FILE _db_unlock_file_()
|
||||
#define DBUG_ASSERT(A) do { _db_flush_(); assert(A); } while(0)
|
||||
#define DBUG_ASSERT(A) assert(A)
|
||||
#define DBUG_EXPLAIN(buf,len) _db_explain_(0, (buf),(len))
|
||||
#define DBUG_EXPLAIN_INITIAL(buf,len) _db_explain_init_((buf),(len))
|
||||
#define DEBUGGER_OFF do { _dbug_on_= 0; } while(0)
|
||||
|
|
|
|||
|
|
@ -46,8 +46,9 @@ extern "C" {
|
|||
#define MY_S_ISFIFO(m) (((m) & MY_S_IFMT) == MY_S_IFIFO)
|
||||
|
||||
/* Ensure these dosn't clash with anything in my_sys.h */
|
||||
#define MY_DONT_SORT 8192 /* my_lib; Don't sort files */
|
||||
#define MY_WANT_SORT 8192 /* my_lib; sort files */
|
||||
#define MY_WANT_STAT 16384 /* my_lib; stat files */
|
||||
#define MY_DONT_SORT 0
|
||||
|
||||
/* typedefs for my_dir & my_stat */
|
||||
|
||||
|
|
@ -94,7 +95,7 @@ typedef struct st_my_dir /* Struct returned from my_dir */
|
|||
we don't want to change code that uses my_dir.
|
||||
*/
|
||||
struct fileinfo *dir_entry;
|
||||
uint number_off_files;
|
||||
uint number_of_files;
|
||||
} MY_DIR;
|
||||
|
||||
extern MY_DIR *my_dir(const char *path,myf MyFlags);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
Copyright (c) 2001, 2012, Oracle and/or its affiliates.
|
||||
Copyright (c) 2010, 2013, Monty Program Ab.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -89,6 +90,12 @@
|
|||
#define IF_WIN(A,B) B
|
||||
#endif
|
||||
|
||||
#ifdef EMBEDDED_LIBRARY
|
||||
#define IF_EMBEDDED(A,B) A
|
||||
#else
|
||||
#define IF_EMBEDDED(A,B) B
|
||||
#endif
|
||||
|
||||
#if defined (_WIN32)
|
||||
/*
|
||||
off_t is 32 bit long. We do not use C runtime functions
|
||||
|
|
@ -379,7 +386,8 @@ C_MODE_END
|
|||
#define compile_time_assert(X) \
|
||||
do \
|
||||
{ \
|
||||
typedef char compile_time_assert[(X) ? 1 : -1]; \
|
||||
typedef char compile_time_assert[(X) ? 1 : -1] \
|
||||
__attribute__((unused)); \
|
||||
} while(0)
|
||||
#endif
|
||||
|
||||
|
|
@ -464,7 +472,7 @@ typedef unsigned int uint;
|
|||
typedef unsigned short ushort;
|
||||
#endif
|
||||
|
||||
#define swap_variables(t, a, b) { t dummy; dummy= a; a= b; b= dummy; }
|
||||
#define swap_variables(t, a, b) do { t dummy; dummy= a; a= b; b= dummy; } while(0)
|
||||
#define test(a) ((a) ? 1 : 0)
|
||||
#define set_if_bigger(a,b) do { if ((a) < (b)) (a)=(b); } while(0)
|
||||
#define set_if_smaller(a,b) do { if ((a) > (b)) (a)=(b); } while(0)
|
||||
|
|
@ -997,25 +1005,8 @@ typedef struct st_mysql_lex_string LEX_STRING;
|
|||
typedef ulong myf; /* Type of MyFlags in my_funcs */
|
||||
typedef char my_bool; /* Small bool */
|
||||
|
||||
/* Macros for converting *constants* to the right type */
|
||||
#define MYF(v) (myf) (v)
|
||||
|
||||
#ifndef LL
|
||||
#ifdef HAVE_LONG_LONG
|
||||
#define LL(A) A ## LL
|
||||
#else
|
||||
#define LL(A) A ## L
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef ULL
|
||||
#ifdef HAVE_LONG_LONG
|
||||
#define ULL(A) A ## ULL
|
||||
#else
|
||||
#define ULL(A) A ## UL
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
Defines to make it possible to prioritize register assignments. No
|
||||
longer that important with modern compilers.
|
||||
|
|
|
|||
|
|
@ -713,7 +713,6 @@ extern size_t cleanup_dirname(char * to,const char *from);
|
|||
extern size_t system_filename(char * to,const char *from);
|
||||
extern size_t unpack_filename(char * to,const char *from);
|
||||
extern char * intern_filename(char * to,const char *from);
|
||||
extern char * directory_file_name(char * dst, const char *src);
|
||||
extern int pack_filename(char * to, const char *name, size_t max_length);
|
||||
extern char * my_path(char * to,const char *progname,
|
||||
const char *own_pathname_part);
|
||||
|
|
@ -884,7 +883,7 @@ extern void *my_az_allocator(void *dummy, unsigned int items, unsigned int size)
|
|||
extern void my_az_free(void *dummy, void *address);
|
||||
extern int my_compress_buffer(uchar *dest, size_t *destLen,
|
||||
const uchar *source, size_t sourceLen);
|
||||
extern int packfrm(uchar *, size_t, uchar **, size_t *);
|
||||
extern int packfrm(const uchar *, size_t, uchar **, size_t *);
|
||||
extern int unpackfrm(uchar **, size_t *, const uchar *);
|
||||
|
||||
extern ha_checksum my_checksum(ha_checksum crc, const uchar *mem,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
Copyright (c) 2000, 2012, Oracle and/or its affiliates.
|
||||
Copyright (c) 2009, 2013, Monty Program Ab.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -57,35 +58,35 @@ extern "C" {
|
|||
sets all high keys.
|
||||
*/
|
||||
#define MI_KEYMAP_BITS (8 * SIZEOF_LONG_LONG)
|
||||
#define MI_KEYMAP_HIGH_MASK (ULL(1) << (MI_KEYMAP_BITS - 1))
|
||||
#define MI_KEYMAP_HIGH_MASK (1ULL << (MI_KEYMAP_BITS - 1))
|
||||
#define mi_get_mask_all_keys_active(_keys_) \
|
||||
(((_keys_) < MI_KEYMAP_BITS) ? \
|
||||
((ULL(1) << (_keys_)) - ULL(1)) : \
|
||||
(~ ULL(0)))
|
||||
((1ULL << (_keys_)) - 1ULL) : \
|
||||
(~ 0ULL))
|
||||
|
||||
#if MI_MAX_KEY > MI_KEYMAP_BITS
|
||||
|
||||
#define mi_is_key_active(_keymap_,_keyno_) \
|
||||
(((_keyno_) < MI_KEYMAP_BITS) ? \
|
||||
test((_keymap_) & (ULL(1) << (_keyno_))) : \
|
||||
test((_keymap_) & (1ULL << (_keyno_))) : \
|
||||
test((_keymap_) & MI_KEYMAP_HIGH_MASK))
|
||||
#define mi_set_key_active(_keymap_,_keyno_) \
|
||||
(_keymap_)|= (((_keyno_) < MI_KEYMAP_BITS) ? \
|
||||
(ULL(1) << (_keyno_)) : \
|
||||
(1ULL << (_keyno_)) : \
|
||||
MI_KEYMAP_HIGH_MASK)
|
||||
#define mi_clear_key_active(_keymap_,_keyno_) \
|
||||
(_keymap_)&= (((_keyno_) < MI_KEYMAP_BITS) ? \
|
||||
(~ (ULL(1) << (_keyno_))) : \
|
||||
(~ (ULL(0))) /*ignore*/ )
|
||||
(~ (1ULL << (_keyno_))) : \
|
||||
(~ (0ULL)) /*ignore*/ )
|
||||
|
||||
#else
|
||||
|
||||
#define mi_is_key_active(_keymap_,_keyno_) \
|
||||
test((_keymap_) & (ULL(1) << (_keyno_)))
|
||||
test((_keymap_) & (1ULL << (_keyno_)))
|
||||
#define mi_set_key_active(_keymap_,_keyno_) \
|
||||
(_keymap_)|= (ULL(1) << (_keyno_))
|
||||
(_keymap_)|= (1ULL << (_keyno_))
|
||||
#define mi_clear_key_active(_keymap_,_keyno_) \
|
||||
(_keymap_)&= (~ (ULL(1) << (_keyno_)))
|
||||
(_keymap_)&= (~ (1ULL << (_keyno_)))
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -140,9 +140,9 @@ typedef struct st_handler_check_param
|
|||
/* Following is used to check if rows are visible */
|
||||
ulonglong max_trid, max_found_trid;
|
||||
ulonglong not_visible_rows_found;
|
||||
ulonglong sort_buffer_length;
|
||||
ulonglong use_buffers; /* Used as param to getopt() */
|
||||
size_t read_buffer_length, write_buffer_length;
|
||||
size_t sort_buffer_length, sort_key_blocks;
|
||||
size_t read_buffer_length, write_buffer_length, sort_key_blocks;
|
||||
time_t backup_time; /* To sign backup files */
|
||||
ulong rec_per_key_part[HA_MAX_KEY_SEG * HA_MAX_POSSIBLE_KEY];
|
||||
double new_rec_per_key_part[HA_MAX_KEY_SEG * HA_MAX_POSSIBLE_KEY];
|
||||
|
|
|
|||
|
|
@ -172,8 +172,9 @@ enum mysql_option
|
|||
MYSQL_OPT_SSL_CA, MYSQL_OPT_SSL_CAPATH, MYSQL_OPT_SSL_CIPHER,
|
||||
MYSQL_OPT_SSL_CRL, MYSQL_OPT_SSL_CRLPATH,
|
||||
/* MariaDB options */
|
||||
MYSQL_OPT_NONBLOCK=6000,
|
||||
MYSQL_PROGRESS_CALLBACK
|
||||
MYSQL_PROGRESS_CALLBACK=5999,
|
||||
MYSQL_OPT_NONBLOCK,
|
||||
MYSQL_OPT_USE_THREAD_SPECIFIC_MEMORY
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -198,7 +199,7 @@ struct st_mysql_options {
|
|||
unsigned long max_allowed_packet;
|
||||
my_bool use_ssl; /* if to use SSL or not */
|
||||
my_bool compress,named_pipe;
|
||||
my_bool unused1;
|
||||
my_bool use_thread_specific_memory;
|
||||
my_bool unused2;
|
||||
my_bool unused3;
|
||||
my_bool unused4;
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ enum enum_mysql_set_option
|
|||
my_bool my_net_init(NET *net, Vio* vio, unsigned int my_flags);
|
||||
void my_net_local_init(NET *net);
|
||||
void net_end(NET *net);
|
||||
void net_clear(NET *net, my_bool clear_buffer);
|
||||
void net_clear(NET *net, my_bool clear_buffer);
|
||||
my_bool net_realloc(NET *net, size_t length);
|
||||
my_bool net_flush(NET *net);
|
||||
my_bool my_net_write(NET *net,const unsigned char *packet, size_t len);
|
||||
|
|
@ -266,8 +266,9 @@ enum mysql_option
|
|||
MYSQL_OPT_SSL_KEY, MYSQL_OPT_SSL_CERT,
|
||||
MYSQL_OPT_SSL_CA, MYSQL_OPT_SSL_CAPATH, MYSQL_OPT_SSL_CIPHER,
|
||||
MYSQL_OPT_SSL_CRL, MYSQL_OPT_SSL_CRLPATH,
|
||||
MYSQL_OPT_NONBLOCK=6000,
|
||||
MYSQL_PROGRESS_CALLBACK
|
||||
MYSQL_PROGRESS_CALLBACK=5999,
|
||||
MYSQL_OPT_NONBLOCK,
|
||||
MYSQL_OPT_USE_THREAD_SPECIFIC_MEMORY
|
||||
};
|
||||
struct st_mysql_options_extention;
|
||||
struct st_mysql_options {
|
||||
|
|
@ -286,7 +287,7 @@ struct st_mysql_options {
|
|||
unsigned long max_allowed_packet;
|
||||
my_bool use_ssl;
|
||||
my_bool compress,named_pipe;
|
||||
my_bool unused1;
|
||||
my_bool use_thread_specific_memory;
|
||||
my_bool unused2;
|
||||
my_bool unused3;
|
||||
my_bool unused4;
|
||||
|
|
|
|||
|
|
@ -52,14 +52,6 @@ extern struct thd_wait_service_st {
|
|||
} *thd_wait_service;
|
||||
void thd_wait_begin(void* thd, int wait_type);
|
||||
void thd_wait_end(void* thd);
|
||||
#include <mysql/service_thread_scheduler.h>
|
||||
struct scheduler_functions;
|
||||
extern struct my_thread_scheduler_service {
|
||||
int (*set)(struct scheduler_functions *scheduler);
|
||||
int (*reset)();
|
||||
} *my_thread_scheduler_service;
|
||||
int my_thread_scheduler_set(struct scheduler_functions *scheduler);
|
||||
int my_thread_scheduler_reset();
|
||||
#include <mysql/service_progress_report.h>
|
||||
extern struct progress_report_service_st {
|
||||
void (*thd_progress_init_func)(void* thd, unsigned int max_stage);
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
#include <mysql/plugin.h>
|
||||
|
||||
#define MYSQL_AUTHENTICATION_INTERFACE_VERSION 0x0100
|
||||
#define MYSQL_AUTHENTICATION_INTERFACE_VERSION 0x0200
|
||||
|
||||
#include <mysql/plugin_auth_common.h>
|
||||
|
||||
|
|
@ -78,7 +78,7 @@ typedef struct st_mysql_server_auth_info
|
|||
Not used by the server.
|
||||
Available through the @@EXTERNAL_USER variable.
|
||||
*/
|
||||
char external_user[512];
|
||||
char external_user[MYSQL_USERNAME_LENGTH+1];
|
||||
|
||||
/**
|
||||
This only affects the "Authentication failed. Password used: %s"
|
||||
|
|
|
|||
|
|
@ -52,14 +52,6 @@ extern struct thd_wait_service_st {
|
|||
} *thd_wait_service;
|
||||
void thd_wait_begin(void* thd, int wait_type);
|
||||
void thd_wait_end(void* thd);
|
||||
#include <mysql/service_thread_scheduler.h>
|
||||
struct scheduler_functions;
|
||||
extern struct my_thread_scheduler_service {
|
||||
int (*set)(struct scheduler_functions *scheduler);
|
||||
int (*reset)();
|
||||
} *my_thread_scheduler_service;
|
||||
int my_thread_scheduler_set(struct scheduler_functions *scheduler);
|
||||
int my_thread_scheduler_reset();
|
||||
#include <mysql/service_progress_report.h>
|
||||
extern struct progress_report_service_st {
|
||||
void (*thd_progress_init_func)(void* thd, unsigned int max_stage);
|
||||
|
|
@ -267,8 +259,8 @@ typedef struct st_mysql_server_auth_info
|
|||
unsigned int user_name_length;
|
||||
const char *auth_string;
|
||||
unsigned long auth_string_length;
|
||||
char authenticated_as[48 +1];
|
||||
char external_user[512];
|
||||
char authenticated_as[512 +1];
|
||||
char external_user[512 +1];
|
||||
int password_used;
|
||||
const char *host_or_ip;
|
||||
unsigned int host_or_ip_length;
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
#define MYSQL_PLUGIN_AUTH_COMMON_INCLUDED
|
||||
|
||||
/** the max allowed length for a user name */
|
||||
#define MYSQL_USERNAME_LENGTH 48
|
||||
#define MYSQL_USERNAME_LENGTH 512
|
||||
|
||||
/**
|
||||
return values of the plugin authenticate_user() method.
|
||||
|
|
|
|||
|
|
@ -52,14 +52,6 @@ extern struct thd_wait_service_st {
|
|||
} *thd_wait_service;
|
||||
void thd_wait_begin(void* thd, int wait_type);
|
||||
void thd_wait_end(void* thd);
|
||||
#include <mysql/service_thread_scheduler.h>
|
||||
struct scheduler_functions;
|
||||
extern struct my_thread_scheduler_service {
|
||||
int (*set)(struct scheduler_functions *scheduler);
|
||||
int (*reset)();
|
||||
} *my_thread_scheduler_service;
|
||||
int my_thread_scheduler_set(struct scheduler_functions *scheduler);
|
||||
int my_thread_scheduler_reset();
|
||||
#include <mysql/service_progress_report.h>
|
||||
extern struct progress_report_service_st {
|
||||
void (*thd_progress_init_func)(void* thd, unsigned int max_stage);
|
||||
|
|
|
|||
|
|
@ -29,6 +29,22 @@
|
|||
@{
|
||||
*/
|
||||
|
||||
#ifdef HAVE_PSI_TABLE_INTERFACE
|
||||
#define PSI_CALL_unbind_table PSI_CALL(unbind_table)
|
||||
#define PSI_CALL_rebind_table PSI_CALL(rebind_table)
|
||||
#define PSI_CALL_open_table PSI_CALL(open_table)
|
||||
#define PSI_CALL_close_table PSI_CALL(close_table)
|
||||
#define PSI_CALL_get_table_share PSI_CALL(get_table_share)
|
||||
#define PSI_CALL_drop_table_share PSI_CALL(drop_table_share)
|
||||
#else
|
||||
#define PSI_CALL_unbind_table(A1) /* no-op */
|
||||
#define PSI_CALL_rebind_table(A1,A2,A3) NULL
|
||||
#define PSI_CALL_close_table(A1) /* no-op */
|
||||
#define PSI_CALL_open_table(A1,A2) NULL
|
||||
#define PSI_CALL_get_table_share(A1,A2) NULL
|
||||
#define PSI_CALL_drop_table_share(A1,A2,A3,A4,A5) /* no-op */
|
||||
#endif
|
||||
|
||||
/**
|
||||
@def MYSQL_TABLE_WAIT_VARIABLES
|
||||
Instrumentation helper for table waits.
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@
|
|||
string will be quoted according to MySQL identifier quoting rules.
|
||||
|
||||
Both <width> and <precision> can be specified as numbers or '*'.
|
||||
If an asterisk is used, an argument of type int is consumed.
|
||||
|
||||
<length modifier> can be 'l', 'll', or 'z'.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,65 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef SERVICE_THREAD_SCHEDULER_INCLUDED
|
||||
#define SERVICE_THREAD_SCHEDULER_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct scheduler_functions;
|
||||
|
||||
extern struct my_thread_scheduler_service {
|
||||
int (*set)(struct scheduler_functions *scheduler);
|
||||
int (*reset)();
|
||||
} *my_thread_scheduler_service;
|
||||
|
||||
#ifdef MYSQL_DYNAMIC_PLUGIN
|
||||
|
||||
#define my_thread_scheduler_set(F) my_thread_scheduler_service->set((F))
|
||||
#define my_thread_scheduler_reset() my_thread_scheduler_service->reset()
|
||||
|
||||
#else
|
||||
|
||||
/**
|
||||
Set the thread scheduler to use for the server.
|
||||
|
||||
@param scheduler Pointer to scheduler callbacks to use.
|
||||
@retval 0 Scheduler installed correctly.
|
||||
@retval 1 Invalid value (NULL) used for scheduler.
|
||||
*/
|
||||
int my_thread_scheduler_set(struct scheduler_functions *scheduler);
|
||||
|
||||
/**
|
||||
Restore the previous thread scheduler.
|
||||
|
||||
@note If no thread scheduler was installed previously with
|
||||
thd_set_thread_scheduler, this function will report an error.
|
||||
|
||||
@retval 0 Scheduler installed correctly.
|
||||
@retval 1 No scheduler installed.
|
||||
*/
|
||||
int my_thread_scheduler_reset();
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* SERVICE_THREAD_SCHEDULER_INCLUDED */
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
#ifndef MYSQL_SERVICES_INCLUDED
|
||||
/* Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
/* Copyright (c) 2009, 2010, Oracle and/or its affiliates.
|
||||
Copyright (c) 2012, 2013, Monty Program Ab
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -21,7 +22,6 @@ extern "C" {
|
|||
#include <mysql/service_my_snprintf.h>
|
||||
#include <mysql/service_thd_alloc.h>
|
||||
#include <mysql/service_thd_wait.h>
|
||||
#include <mysql/service_thread_scheduler.h>
|
||||
#include <mysql/service_progress_report.h>
|
||||
#include <mysql/service_debug_sync.h>
|
||||
#include <mysql/service_kill_statement.h>
|
||||
|
|
|
|||
|
|
@ -34,6 +34,31 @@
|
|||
#define MYSQL50_TABLE_NAME_PREFIX_LENGTH (sizeof(MYSQL50_TABLE_NAME_PREFIX)-1)
|
||||
#define SAFE_NAME_LEN (NAME_LEN + MYSQL50_TABLE_NAME_PREFIX_LENGTH)
|
||||
|
||||
/*
|
||||
MDEV-4088
|
||||
|
||||
MySQL (and MariaDB 5.x before the fix) was using the first character of the
|
||||
server version string (as sent in the first handshake protocol packet) to
|
||||
decide on the replication event formats. And for 10.x the first character
|
||||
is "1", which the slave thought comes from some ancient 1.x version
|
||||
(ignoring the fact that the first ever MySQL version was 3.x).
|
||||
|
||||
To support replication to these old clients, we fake the version in the
|
||||
first handshake protocol packet to start from "5.5.5-" (for example,
|
||||
it might be "5.5.5-10.0.1-MariaDB-debug-log".
|
||||
|
||||
On the client side we remove this fake version prefix to restore the
|
||||
correct server version. The version "5.5.5" did not support
|
||||
pluggable authentication, so any version starting from "5.5.5-" and
|
||||
claiming to support pluggable auth, must be using this fake prefix.
|
||||
*/
|
||||
#ifdef EMBEDDED_LIBRARY
|
||||
#define RPL_VERSION_HACK ""
|
||||
#else
|
||||
/* this version must be the one that *does not* support pluggable auth */
|
||||
#define RPL_VERSION_HACK "5.5.5-"
|
||||
#endif
|
||||
|
||||
#define SERVER_VERSION_LENGTH 60
|
||||
#define SQLSTATE_LENGTH 5
|
||||
#define LIST_PROCESS_HOST_LEN 64
|
||||
|
|
@ -41,7 +66,7 @@
|
|||
/*
|
||||
Maximum length of comments
|
||||
*/
|
||||
#define TABLE_COMMENT_INLINE_MAXLEN 180 /* pre 6.0: 60 characters */
|
||||
#define TABLE_COMMENT_INLINE_MAXLEN 180 /* pre 5.5: 60 characters */
|
||||
#define TABLE_COMMENT_MAXLEN 2048
|
||||
#define COLUMN_COMMENT_MAXLEN 1024
|
||||
#define INDEX_COMMENT_MAXLEN 1024
|
||||
|
|
|
|||
8
include/mysqld_default_groups.h
Normal file
8
include/mysqld_default_groups.h
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
const char *load_default_groups[]= {
|
||||
#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
|
||||
"mysql_cluster",
|
||||
#endif
|
||||
"mysqld", "server", MYSQL_BASE_VERSION,
|
||||
"mariadb", MARIADB_BASE_VERSION,
|
||||
"client-server",
|
||||
0, 0};
|
||||
|
|
@ -6,121 +6,124 @@
|
|||
#define _PROBES_MYSQL_D
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define MYSQL_PROBES_FALSE false
|
||||
extern "C" {
|
||||
#else
|
||||
#define MYSQL_PROBES_FALSE 0
|
||||
#endif
|
||||
|
||||
#define MYSQL_CONNECTION_START(arg0, arg1, arg2)
|
||||
#define MYSQL_CONNECTION_START_ENABLED() (0)
|
||||
#define MYSQL_CONNECTION_START_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_CONNECTION_DONE(arg0, arg1)
|
||||
#define MYSQL_CONNECTION_DONE_ENABLED() (0)
|
||||
#define MYSQL_CONNECTION_DONE_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_COMMAND_START(arg0, arg1, arg2, arg3)
|
||||
#define MYSQL_COMMAND_START_ENABLED() (0)
|
||||
#define MYSQL_COMMAND_START_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_COMMAND_DONE(arg0)
|
||||
#define MYSQL_COMMAND_DONE_ENABLED() (0)
|
||||
#define MYSQL_COMMAND_DONE_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_QUERY_START(arg0, arg1, arg2, arg3, arg4)
|
||||
#define MYSQL_QUERY_START_ENABLED() (0)
|
||||
#define MYSQL_QUERY_START_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_QUERY_DONE(arg0)
|
||||
#define MYSQL_QUERY_DONE_ENABLED() (0)
|
||||
#define MYSQL_QUERY_DONE_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_QUERY_PARSE_START(arg0)
|
||||
#define MYSQL_QUERY_PARSE_START_ENABLED() (0)
|
||||
#define MYSQL_QUERY_PARSE_START_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_QUERY_PARSE_DONE(arg0)
|
||||
#define MYSQL_QUERY_PARSE_DONE_ENABLED() (0)
|
||||
#define MYSQL_QUERY_PARSE_DONE_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_QUERY_CACHE_HIT(arg0, arg1)
|
||||
#define MYSQL_QUERY_CACHE_HIT_ENABLED() (0)
|
||||
#define MYSQL_QUERY_CACHE_HIT_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_QUERY_CACHE_MISS(arg0)
|
||||
#define MYSQL_QUERY_CACHE_MISS_ENABLED() (0)
|
||||
#define MYSQL_QUERY_CACHE_MISS_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_QUERY_EXEC_START(arg0, arg1, arg2, arg3, arg4, arg5)
|
||||
#define MYSQL_QUERY_EXEC_START_ENABLED() (0)
|
||||
#define MYSQL_QUERY_EXEC_START_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_QUERY_EXEC_DONE(arg0)
|
||||
#define MYSQL_QUERY_EXEC_DONE_ENABLED() (0)
|
||||
#define MYSQL_QUERY_EXEC_DONE_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_INSERT_ROW_START(arg0, arg1)
|
||||
#define MYSQL_INSERT_ROW_START_ENABLED() (0)
|
||||
#define MYSQL_INSERT_ROW_START_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_INSERT_ROW_DONE(arg0)
|
||||
#define MYSQL_INSERT_ROW_DONE_ENABLED() (0)
|
||||
#define MYSQL_INSERT_ROW_DONE_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_UPDATE_ROW_START(arg0, arg1)
|
||||
#define MYSQL_UPDATE_ROW_START_ENABLED() (0)
|
||||
#define MYSQL_UPDATE_ROW_START_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_UPDATE_ROW_DONE(arg0)
|
||||
#define MYSQL_UPDATE_ROW_DONE_ENABLED() (0)
|
||||
#define MYSQL_UPDATE_ROW_DONE_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_DELETE_ROW_START(arg0, arg1)
|
||||
#define MYSQL_DELETE_ROW_START_ENABLED() (0)
|
||||
#define MYSQL_DELETE_ROW_START_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_DELETE_ROW_DONE(arg0)
|
||||
#define MYSQL_DELETE_ROW_DONE_ENABLED() (0)
|
||||
#define MYSQL_DELETE_ROW_DONE_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_READ_ROW_START(arg0, arg1, arg2)
|
||||
#define MYSQL_READ_ROW_START_ENABLED() (0)
|
||||
#define MYSQL_READ_ROW_START_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_READ_ROW_DONE(arg0)
|
||||
#define MYSQL_READ_ROW_DONE_ENABLED() (0)
|
||||
#define MYSQL_READ_ROW_DONE_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_INDEX_READ_ROW_START(arg0, arg1)
|
||||
#define MYSQL_INDEX_READ_ROW_START_ENABLED() (0)
|
||||
#define MYSQL_INDEX_READ_ROW_START_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_INDEX_READ_ROW_DONE(arg0)
|
||||
#define MYSQL_INDEX_READ_ROW_DONE_ENABLED() (0)
|
||||
#define MYSQL_INDEX_READ_ROW_DONE_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_HANDLER_RDLOCK_START(arg0, arg1)
|
||||
#define MYSQL_HANDLER_RDLOCK_START_ENABLED() (0)
|
||||
#define MYSQL_HANDLER_RDLOCK_START_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_HANDLER_WRLOCK_START(arg0, arg1)
|
||||
#define MYSQL_HANDLER_WRLOCK_START_ENABLED() (0)
|
||||
#define MYSQL_HANDLER_WRLOCK_START_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_HANDLER_UNLOCK_START(arg0, arg1)
|
||||
#define MYSQL_HANDLER_UNLOCK_START_ENABLED() (0)
|
||||
#define MYSQL_HANDLER_UNLOCK_START_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_HANDLER_RDLOCK_DONE(arg0)
|
||||
#define MYSQL_HANDLER_RDLOCK_DONE_ENABLED() (0)
|
||||
#define MYSQL_HANDLER_RDLOCK_DONE_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_HANDLER_WRLOCK_DONE(arg0)
|
||||
#define MYSQL_HANDLER_WRLOCK_DONE_ENABLED() (0)
|
||||
#define MYSQL_HANDLER_WRLOCK_DONE_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_HANDLER_UNLOCK_DONE(arg0)
|
||||
#define MYSQL_HANDLER_UNLOCK_DONE_ENABLED() (0)
|
||||
#define MYSQL_HANDLER_UNLOCK_DONE_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_FILESORT_START(arg0, arg1)
|
||||
#define MYSQL_FILESORT_START_ENABLED() (0)
|
||||
#define MYSQL_FILESORT_START_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_FILESORT_DONE(arg0, arg1)
|
||||
#define MYSQL_FILESORT_DONE_ENABLED() (0)
|
||||
#define MYSQL_FILESORT_DONE_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_SELECT_START(arg0)
|
||||
#define MYSQL_SELECT_START_ENABLED() (0)
|
||||
#define MYSQL_SELECT_START_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_SELECT_DONE(arg0, arg1)
|
||||
#define MYSQL_SELECT_DONE_ENABLED() (0)
|
||||
#define MYSQL_SELECT_DONE_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_INSERT_START(arg0)
|
||||
#define MYSQL_INSERT_START_ENABLED() (0)
|
||||
#define MYSQL_INSERT_START_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_INSERT_DONE(arg0, arg1)
|
||||
#define MYSQL_INSERT_DONE_ENABLED() (0)
|
||||
#define MYSQL_INSERT_DONE_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_INSERT_SELECT_START(arg0)
|
||||
#define MYSQL_INSERT_SELECT_START_ENABLED() (0)
|
||||
#define MYSQL_INSERT_SELECT_START_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_INSERT_SELECT_DONE(arg0, arg1)
|
||||
#define MYSQL_INSERT_SELECT_DONE_ENABLED() (0)
|
||||
#define MYSQL_INSERT_SELECT_DONE_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_UPDATE_START(arg0)
|
||||
#define MYSQL_UPDATE_START_ENABLED() (0)
|
||||
#define MYSQL_UPDATE_START_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_UPDATE_DONE(arg0, arg1, arg2)
|
||||
#define MYSQL_UPDATE_DONE_ENABLED() (0)
|
||||
#define MYSQL_UPDATE_DONE_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_MULTI_UPDATE_START(arg0)
|
||||
#define MYSQL_MULTI_UPDATE_START_ENABLED() (0)
|
||||
#define MYSQL_MULTI_UPDATE_START_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_MULTI_UPDATE_DONE(arg0, arg1, arg2)
|
||||
#define MYSQL_MULTI_UPDATE_DONE_ENABLED() (0)
|
||||
#define MYSQL_MULTI_UPDATE_DONE_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_DELETE_START(arg0)
|
||||
#define MYSQL_DELETE_START_ENABLED() (0)
|
||||
#define MYSQL_DELETE_START_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_DELETE_DONE(arg0, arg1)
|
||||
#define MYSQL_DELETE_DONE_ENABLED() (0)
|
||||
#define MYSQL_DELETE_DONE_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_MULTI_DELETE_START(arg0)
|
||||
#define MYSQL_MULTI_DELETE_START_ENABLED() (0)
|
||||
#define MYSQL_MULTI_DELETE_START_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_MULTI_DELETE_DONE(arg0, arg1)
|
||||
#define MYSQL_MULTI_DELETE_DONE_ENABLED() (0)
|
||||
#define MYSQL_MULTI_DELETE_DONE_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_NET_READ_START()
|
||||
#define MYSQL_NET_READ_START_ENABLED() (0)
|
||||
#define MYSQL_NET_READ_START_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_NET_READ_DONE(arg0, arg1)
|
||||
#define MYSQL_NET_READ_DONE_ENABLED() (0)
|
||||
#define MYSQL_NET_READ_DONE_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_NET_WRITE_START(arg0)
|
||||
#define MYSQL_NET_WRITE_START_ENABLED() (0)
|
||||
#define MYSQL_NET_WRITE_START_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_NET_WRITE_DONE(arg0)
|
||||
#define MYSQL_NET_WRITE_DONE_ENABLED() (0)
|
||||
#define MYSQL_NET_WRITE_DONE_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_KEYCACHE_READ_START(arg0, arg1, arg2, arg3)
|
||||
#define MYSQL_KEYCACHE_READ_START_ENABLED() (0)
|
||||
#define MYSQL_KEYCACHE_READ_START_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_KEYCACHE_READ_BLOCK(arg0)
|
||||
#define MYSQL_KEYCACHE_READ_BLOCK_ENABLED() (0)
|
||||
#define MYSQL_KEYCACHE_READ_BLOCK_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_KEYCACHE_READ_HIT()
|
||||
#define MYSQL_KEYCACHE_READ_HIT_ENABLED() (0)
|
||||
#define MYSQL_KEYCACHE_READ_HIT_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_KEYCACHE_READ_MISS()
|
||||
#define MYSQL_KEYCACHE_READ_MISS_ENABLED() (0)
|
||||
#define MYSQL_KEYCACHE_READ_MISS_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_KEYCACHE_READ_DONE(arg0, arg1)
|
||||
#define MYSQL_KEYCACHE_READ_DONE_ENABLED() (0)
|
||||
#define MYSQL_KEYCACHE_READ_DONE_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_KEYCACHE_WRITE_START(arg0, arg1, arg2, arg3)
|
||||
#define MYSQL_KEYCACHE_WRITE_START_ENABLED() (0)
|
||||
#define MYSQL_KEYCACHE_WRITE_START_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_KEYCACHE_WRITE_BLOCK(arg0)
|
||||
#define MYSQL_KEYCACHE_WRITE_BLOCK_ENABLED() (0)
|
||||
#define MYSQL_KEYCACHE_WRITE_BLOCK_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
#define MYSQL_KEYCACHE_WRITE_DONE(arg0, arg1)
|
||||
#define MYSQL_KEYCACHE_WRITE_DONE_ENABLED() (0)
|
||||
#define MYSQL_KEYCACHE_WRITE_DONE_ENABLED() (MYSQL_PROBES_FALSE)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
/* Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
/* Copyright (c) 2009, 2010, Oracle and/or its affiliates.
|
||||
Copyright (c) 2012, 2013, Monty Program Ab
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -22,7 +23,6 @@
|
|||
#define VERSION_my_snprintf 0x0100
|
||||
#define VERSION_thd_alloc 0x0100
|
||||
#define VERSION_thd_wait 0x0100
|
||||
#define VERSION_my_thread_scheduler 0x0100
|
||||
#define VERSION_progress_report 0x0100
|
||||
#define VERSION_debug_sync 0x1000
|
||||
#define VERSION_kill_statement 0x1000
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ uint thd_get_net_read_write(THD *thd);
|
|||
void thd_set_mysys_var(THD *thd, st_my_thread_var *mysys_var);
|
||||
ulong thd_get_net_wait_timeout(THD *thd);
|
||||
my_socket thd_get_fd(THD *thd);
|
||||
int thd_store_globals(THD* thd);
|
||||
|
||||
THD *first_global_thread();
|
||||
THD *next_global_thread(THD *thd);
|
||||
|
|
|
|||
|
|
@ -239,11 +239,7 @@ struct st_vio
|
|||
struct sockaddr_storage remote; /* Remote internet address */
|
||||
int addrLen; /* Length of remote address */
|
||||
enum enum_vio_type type; /* Type of connection */
|
||||
/*
|
||||
Description string. This member MUST NOT be used directly, but only
|
||||
via function "vio_description"
|
||||
*/
|
||||
char desc[VIO_DESCRIPTION_SIZE];
|
||||
const char *desc; /* String description */
|
||||
char *read_buffer; /* buffer for vio_read_buff */
|
||||
char *read_pos; /* start of unfetched data in the
|
||||
read buffer */
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2011, 2012, Oracle and/or its affiliates.
|
||||
/* Copyright (c) 2011, 2013, Oracle and/or its affiliates.
|
||||
Copyright (c) 2011, 2012, Monty Program Ab
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
#ifndef _welcome_copyright_notice_h_
|
||||
#define _welcome_copyright_notice_h_
|
||||
|
||||
#define COPYRIGHT_NOTICE_CURRENT_YEAR "2012"
|
||||
#define COPYRIGHT_NOTICE_CURRENT_YEAR "2013"
|
||||
|
||||
/*
|
||||
This define specifies copyright notice which is displayed by every MySQL
|
||||
|
|
|
|||
|
|
@ -141,13 +141,14 @@ mysql_load_plugin
|
|||
mysql_load_plugin_v
|
||||
mysql_plugin_options
|
||||
# Async API
|
||||
mysql_get_timeout_value
|
||||
mysql_get_timeout_value_ms
|
||||
mysql_get_socket
|
||||
mysql_autocommit_cont
|
||||
mysql_autocommit_start
|
||||
mysql_change_user_cont
|
||||
mysql_change_user_start
|
||||
mysql_close_cont
|
||||
mysql_close_slow_part_cont
|
||||
mysql_close_slow_part_start
|
||||
mysql_close_start
|
||||
mysql_commit_cont
|
||||
mysql_commit_start
|
||||
|
|
@ -262,17 +263,26 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
|||
|
||||
IF(RPM)
|
||||
# Fedora & Co declared following functions as part of API
|
||||
# These functions are alias of another function (given mysql_ prefix=. The
|
||||
# renaming is handled in rpm_support.cc below
|
||||
SET(CLIENT_API_EXTRA
|
||||
mysql_default_charset_info
|
||||
mysql_get_charset
|
||||
mysql_get_charset_by_csname
|
||||
mysql_net_realloc
|
||||
mysql_client_errors
|
||||
)
|
||||
|
||||
# Also export the non-renamed variants
|
||||
# (in case someone wants to rebuild mysqli-php or something similar)
|
||||
# See MDEV-4127
|
||||
default_charset_info
|
||||
get_charset
|
||||
get_charset_by_csname
|
||||
net_realloc
|
||||
client_errors
|
||||
THR_KEY_mysys
|
||||
)
|
||||
|
||||
# Add special script to fix symbols renames by Fedora
|
||||
SET(CLIENT_SOURCES_EXTRA ${CLIENT_SOURCES} rpm_support.cc)
|
||||
SET(CLIENT_SOURCES_EXTRA rpm_support.cc)
|
||||
SET(VERSION_SCRIPT_TEMPLATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/libmysql_rpm_version.in)
|
||||
ELSEIF(DEB)
|
||||
|
|
@ -361,7 +371,7 @@ IF(UNIX)
|
|||
ENDIF()
|
||||
|
||||
IF(NOT DISABLE_SHARED)
|
||||
MERGE_LIBRARIES(libmysql SHARED ${LIBS} EXPORTS ${CLIENT_API_FUNCTIONS} COMPONENT SharedLibraries)
|
||||
MERGE_LIBRARIES(libmysql SHARED ${LIBS} EXPORTS ${CLIENT_API_FUNCTIONS} ${CLIENT_API_EXTRA} COMPONENT SharedLibraries)
|
||||
IF(UNIX)
|
||||
# libtool compatability
|
||||
IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR APPLE)
|
||||
|
|
|
|||
|
|
@ -62,13 +62,35 @@
|
|||
/* were just going to fake it here and get input from the keyboard */
|
||||
void get_tty_password_buff(const char *opt_message, char *to, size_t length)
|
||||
{
|
||||
HANDLE consoleinput;
|
||||
DWORD oldstate;
|
||||
char *pos=to,*end=to+length-1;
|
||||
int i=0;
|
||||
|
||||
consoleinput= CreateFile("CONIN$", GENERIC_WRITE | GENERIC_READ, FILE_SHARE_READ ,
|
||||
NULL, OPEN_EXISTING, 0, NULL);
|
||||
if (consoleinput == NULL || consoleinput == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
/* This is a GUI application or service without console input, bail out. */
|
||||
*to= 0;
|
||||
return;
|
||||
}
|
||||
_cputs(opt_message ? opt_message : "Enter password: ");
|
||||
|
||||
/*
|
||||
Switch to raw mode (no line input, no echo input).
|
||||
Allow Ctrl-C handler with ENABLE_PROCESSED_INPUT.
|
||||
*/
|
||||
GetConsoleMode(consoleinput, &oldstate);
|
||||
SetConsoleMode(consoleinput, ENABLE_PROCESSED_INPUT);
|
||||
for (;;)
|
||||
{
|
||||
int tmp;
|
||||
tmp=_getch();
|
||||
char tmp;
|
||||
DWORD chars_read;
|
||||
if (!ReadConsole(consoleinput, &tmp, 1, &chars_read, NULL))
|
||||
break;
|
||||
if (chars_read == 0)
|
||||
break;
|
||||
if (tmp == '\b' || tmp == 127)
|
||||
{
|
||||
if (pos != to)
|
||||
|
|
@ -78,13 +100,16 @@ void get_tty_password_buff(const char *opt_message, char *to, size_t length)
|
|||
continue;
|
||||
}
|
||||
}
|
||||
if (tmp == -1 || tmp == '\n' || tmp == '\r' || tmp == 3)
|
||||
if (tmp == '\n' || tmp == '\r')
|
||||
break;
|
||||
if (iscntrl(tmp) || pos == end)
|
||||
continue;
|
||||
_cputs("*");
|
||||
*(pos++) = (char)tmp;
|
||||
*(pos++) = tmp;
|
||||
}
|
||||
/* Reset console mode after password input. */
|
||||
SetConsoleMode(consoleinput, oldstate);
|
||||
CloseHandle(consoleinput);
|
||||
*pos=0;
|
||||
_cputs("\n");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ libmysqlclient_16 {
|
|||
my_print_help;
|
||||
# pure-ftpd requires this
|
||||
my_make_scrambled_password;
|
||||
# fedora18 export
|
||||
THR_KEY_mysys;
|
||||
# hydra requires this
|
||||
scramble;
|
||||
# DBD::mysql requires this
|
||||
|
|
@ -34,15 +36,27 @@ libmysqlclient_18 {
|
|||
@CLIENT_API_5_5_LIST@
|
||||
#
|
||||
# Ideally the following symbols wouldn't be exported, but various applications
|
||||
# require them. We limit the namespace damage by prefixing mysql_
|
||||
# require them. Fedora limits the namespace damage by prefixing mysql_
|
||||
# (see mysql-dubious-exports.patch), which means the symbols are not present
|
||||
# in libmysqlclient_16.
|
||||
#
|
||||
# MariaDB does not do the Fedora-style function renaming via #define in headers,
|
||||
# however it exports mysql_ prefixed symbols in addition to the "normal" ones.
|
||||
#
|
||||
# To ensure successful recompilation of affected projects, as well as drop-in replacement
|
||||
# for MySQL libraries, provided by distribution, both original symbols and their mysql_
|
||||
# prefixed counterparts have to be exported.
|
||||
|
||||
# mysql-connector-odbc requires these
|
||||
mysql_default_charset_info;
|
||||
mysql_get_charset;
|
||||
mysql_get_charset_by_csname;
|
||||
mysql_net_realloc;
|
||||
default_charset_info;
|
||||
get_charset;
|
||||
get_charset_by_csname;
|
||||
net_realloc;
|
||||
# PHP's mysqli.so requires this (via the ER() macro)
|
||||
mysql_client_errors;
|
||||
client_errors;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -99,6 +99,7 @@ SET(SQL_EMBEDDED_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc
|
|||
../sql/rpl_reporting.cc
|
||||
../sql/sql_expression_cache.cc
|
||||
../sql/my_apc.cc ../sql/my_apc.h
|
||||
../sql/rpl_gtid.cc
|
||||
${GEN_SOURCES}
|
||||
${MYSYS_LIBWRAP_SOURCE}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -440,7 +440,7 @@ static MYSQL_RES * emb_store_result(MYSQL *mysql)
|
|||
int emb_read_change_user_result(MYSQL *mysql)
|
||||
{
|
||||
mysql->net.read_pos= (uchar*)""; // fake an OK packet
|
||||
return mysql_errno(mysql) ? packet_error : 1 /* length of the OK packet */;
|
||||
return mysql_errno(mysql) ? (int)packet_error : 1 /* length of the OK packet */;
|
||||
}
|
||||
|
||||
MYSQL_METHODS embedded_methods=
|
||||
|
|
@ -604,7 +604,7 @@ int init_embedded_server(int argc, char **argv, char **groups)
|
|||
// FIXME initialize binlog_filter and rpl_filter if not already done
|
||||
// corresponding delete is in clean_up()
|
||||
if(!binlog_filter) binlog_filter = new Rpl_filter;
|
||||
if(!rpl_filter) rpl_filter = new Rpl_filter;
|
||||
if(!global_rpl_filter) global_rpl_filter = new Rpl_filter;
|
||||
|
||||
if (opt_init_file)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) 2006 MySQL AB, 2010 Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2006 MySQL AB, 2010 Oracle and/or its affiliates.
|
||||
#
|
||||
# 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
|
||||
|
|
@ -19,7 +19,6 @@ SET(MYSQLSERVICES_SOURCES
|
|||
my_snprintf_service.c
|
||||
thd_alloc_service.c
|
||||
thd_wait_service.c
|
||||
my_thread_scheduler_service.c
|
||||
progress_report_service.c
|
||||
debug_sync_service.c
|
||||
kill_statement_service.c)
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ it should also declare all the accompanying data structures, as necessary
|
|||
==================================================================
|
||||
/* GPL header */
|
||||
#include <service_versions.h>
|
||||
SERVICE_VERSION *foo_service= (void*)VERSION_foo;
|
||||
SERVICE_VERSION foo_service= (void*)VERSION_foo;
|
||||
==================================================================
|
||||
|
||||
7. add the new file to libservices/CMakeLists.txt (MYSQLSERVICES_SOURCES)
|
||||
|
|
|
|||
|
|
@ -15,4 +15,4 @@
|
|||
*/
|
||||
|
||||
#include <service_versions.h>
|
||||
SERVICE_VERSION *debug_sync_service= (void*)VERSION_debug_sync;
|
||||
SERVICE_VERSION debug_sync_service= (void*)VERSION_debug_sync;
|
||||
|
|
|
|||
|
|
@ -1,20 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <service_versions.h>
|
||||
SERVICE_VERSION my_thread_scheduler_service=
|
||||
(void*)VERSION_my_thread_scheduler;
|
||||
|
|
@ -14,4 +14,4 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#include <service_versions.h>
|
||||
SERVICE_VERSION *progress_report_service= (void*)VERSION_progress_report;
|
||||
SERVICE_VERSION progress_report_service= (void*)VERSION_progress_report;
|
||||
|
|
|
|||
|
|
@ -15,4 +15,4 @@
|
|||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||
|
||||
#include <service_versions.h>
|
||||
SERVICE_VERSION *thd_alloc_service= (void*)VERSION_thd_alloc;
|
||||
SERVICE_VERSION thd_alloc_service= (void*)VERSION_thd_alloc;
|
||||
|
|
|
|||
|
|
@ -16,4 +16,4 @@
|
|||
*/
|
||||
|
||||
#include <service_versions.h>
|
||||
SERVICE_VERSION *thd_wait_service= (void*)VERSION_thd_wait;
|
||||
SERVICE_VERSION thd_wait_service= (void*)VERSION_thd_wait;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# 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
|
||||
|
|
@ -154,8 +154,10 @@ ENDMACRO()
|
|||
FILE(GLOB infiles "collections/*.in")
|
||||
FOREACH(collin ${infiles})
|
||||
STRING(REPLACE ".in" "" collection ${collin})
|
||||
STRING(REPLACE ".in" ".done" colldone ${collin})
|
||||
# Only generate file once
|
||||
IF(NOT EXISTS ${collection})
|
||||
IF(NOT EXISTS ${colldone})
|
||||
PROCESS_COLLECTION_INCLUDE(${collin} ${collection})
|
||||
FILE(APPEND ${colldone} "${collin}\n")
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=normal --vardir=var-normal --report-features --skip-test-list=collections/disabled-daily.list --unit-tests
|
||||
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=normal --vardir=var-normal --report-features --skip-test-list=collections/disabled-daily.list
|
||||
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=n_mix --vardir=var-n_mix --mysqld=--binlog-format=mixed --skip-test-list=collections/disabled-daily.list
|
||||
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=row --vardir=var-row --mysqld=--binlog-format=row --skip-test-list=collections/disabled-daily.list
|
||||
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=ps_row --vardir=var-ps_row --mysqld=--binlog-format=row --ps-protocol --skip-test-list=collections/disabled-daily.list
|
||||
|
|
|
|||
|
|
@ -18,9 +18,4 @@ rpl.rpl_row_sp011 @solaris # Bug#11753919 2011-07-25 sven Several
|
|||
sys_vars.max_sp_recursion_depth_func @solaris # Bug#11753919 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
||||
sys_vars.wait_timeout_func # Bug#11750645 2010-04-26 alik wait_timeout_func fails
|
||||
|
||||
# BUG #59055 : All ndb tests should be removed from the repository
|
||||
# Leaving the sys_vars tests for now. sys_vars.all_vars.test fails on removing ndb tests
|
||||
sys_vars.ndb_log_update_as_write_basic
|
||||
sys_vars.have_ndbcluster_basic
|
||||
sys_vars.ndb_log_updated_only_basic
|
||||
sys_vars.rpl_init_slave_func # Bug#12535301 2011-05-09 andrei sys_vars.rpl_init_slave_func mismatches in daily-5.5
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=n_mix --vardir=var-n_mix --mysqld=--binlog-format=mixed --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list --unit-tests
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=ps_row --vardir=var-ps_row --ps-protocol --mysqld=--binlog-format=row --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=embedded --vardir=var-emebbed --embedded --experimental=collections/default.experimental --skip-ndb
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=rpl_binlog_row --vardir=var-rpl_binlog_row --suite=rpl,binlog --mysqld=--binlog-format=row --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=funcs_1 --vardir=var-funcs_1 --suite=funcs_1 --experimental=collections/default.experimental --skip-ndb
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=n_mix --vardir=var-n_mix --mysqld=--binlog-format=mixed --experimental=collections/default.experimental --skip-test-list=collections/disabled-per-push.list
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=ps_row --vardir=var-ps_row --ps-protocol --mysqld=--binlog-format=row --experimental=collections/default.experimental --skip-test-list=collections/disabled-per-push.list
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=embedded --vardir=var-emebbed --embedded --experimental=collections/default.experimental
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=rpl_binlog_row --vardir=var-rpl_binlog_row --suite=rpl,binlog --mysqld=--binlog-format=row --experimental=collections/default.experimental --skip-test-list=collections/disabled-per-push.list
|
||||
perl mysql-test-run.pl --timer --force --parallel=auto --comment=funcs_1 --vardir=var-funcs_1 --suite=funcs_1 --experimental=collections/default.experimental
|
||||
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@
|
|||
# include default.daily
|
||||
# include default.weekly
|
||||
|
||||
perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=debug --vardir=var-debug --skip-ndbcluster --skip-rpl --report-features --debug-server
|
||||
perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=normal --vardir=var-normal --skip-ndbcluster --report-features
|
||||
perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=ps --vardir=var-ps --skip-ndbcluster --ps-protocol
|
||||
perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=debug --vardir=var-debug --skip-rpl --report-features --debug-server
|
||||
perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=normal --vardir=var-normal --report-features
|
||||
perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=ps --vardir=var-ps --ps-protocol
|
||||
perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=funcs1+ps --vardir=var-funcs_1_ps --suite=funcs_1 --ps-protocol
|
||||
perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=funcs2 --vardir=var-funcs2 --suite=funcs_2
|
||||
perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=partitions --vardir=var-parts --suite=parts
|
||||
perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=stress --vardir=var-stress --suite=stress
|
||||
perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=jp --vardir=var-jp --suite=jp
|
||||
perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=embedded --vardir=var-embedded --embedded-server --skip-rpl --skip-ndbcluster
|
||||
perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=embedded --vardir=var-embedded --embedded-server --skip-rpl
|
||||
perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=nist --vardir=var-nist --suite=nist
|
||||
perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=nist+ps --vardir=var-nist_ps --suite=nist --ps-protocol
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@ tablespace : disabled in MariaDB (no TABLESPACE table attribute)
|
|||
events_time_zone : Test is not predictable as it depends on precise timing.
|
||||
lowercase_table3 : Bug#11762269 2010-06-30 alik main.lowercase_table3 on Mac OSX
|
||||
read_many_rows_innodb : Bug#11748886 2010-11-15 mattiasj report already exists
|
||||
sum_distinct-big : Bug#11764126 2010-11-15 mattiasj was not tested
|
||||
archive-big : Bug#11817185 2011-03-10 Anitha Disabled since this leads to timeout on Solaris Sparc
|
||||
log_tables-big : Bug#11756699 2010-11-15 mattiasj report already exists
|
||||
mysql_embedded : Bug#12561297 2011-05-14 Anitha Dependent on PB2 changes - eventum#41836
|
||||
ssl_crl_clients_valid : broken upstream
|
||||
ssl_crl : broken upstream
|
||||
ssl_crl_clrpath : broken upstream
|
||||
show_explain : Psergey: random timeout in range-checked-for-each record query.
|
||||
|
|
|
|||
|
|
@ -318,8 +318,8 @@ connection con4;
|
|||
select get_lock("a",10); # wait for rollback to finish
|
||||
if (`select @@binlog_format = 'STATEMENT' || @@binlog_format = 'MIXED'`)
|
||||
{
|
||||
--let $binlog_rollback= query_get_value(SHOW BINLOG EVENTS, Pos, 8)
|
||||
--let $binlog_query= query_get_value(SHOW BINLOG EVENTS, Info, 8)
|
||||
--let $binlog_rollback= query_get_value(SHOW BINLOG EVENTS, Pos, 11)
|
||||
--let $binlog_query= query_get_value(SHOW BINLOG EVENTS, Info, 11)
|
||||
if ($binlog_query != ROLLBACK) {
|
||||
--echo Wrong query from SHOW BINLOG EVENTS. Expected ROLLBACK, got '$binlog_query'
|
||||
--source include/show_rpl_debug_info.inc
|
||||
|
|
|
|||
|
|
@ -325,8 +325,8 @@ if ($CRC_RET_stmt_sidef) {
|
|||
SHOW BINLOG EVENTS;
|
||||
--die Wrong number of warnings.
|
||||
}
|
||||
# There should be no events after format description and binlog checkpoint.
|
||||
--let $binlog_event= query_get_value(SHOW BINLOG EVENTS, Event_type, 3)
|
||||
# There should be no events after format description, Gtid list, and binlog checkpoint.
|
||||
--let $binlog_event= query_get_value(SHOW BINLOG EVENTS, Event_type, 4)
|
||||
if ($binlog_event != No such row) {
|
||||
--enable_query_log
|
||||
--echo ******** Failure! Something was written to the binlog despite SQL_LOG_BIN=0 ********
|
||||
|
|
@ -346,14 +346,14 @@ if ($CRC_RET_stmt_sidef) {
|
|||
SHOW BINLOG EVENTS;
|
||||
--die Warnings printed
|
||||
}
|
||||
--let $event_type= query_get_value(SHOW BINLOG EVENTS, Event_type, 4)
|
||||
# The first event is format_description, the second is Binlog_checkpoint,
|
||||
# the third Query_event('BEGIN'), and the fourth should be our Query
|
||||
# for 'INSERT DELAYED' unsafe_type 3, which is safe after
|
||||
--let $event_type= query_get_value(SHOW BINLOG EVENTS, Event_type, 5)
|
||||
# The first event is format_description, the second is Gtid list, the
|
||||
# third is Binlog_checkpoint, the fourth Gtid, and the fifth should be
|
||||
# our Query for 'INSERT DELAYED' unsafe_type 3, which is safe after
|
||||
# the fix of bug#54579.
|
||||
if (`SELECT $unsafe_type = 3 AND '$event_type' != 'Query'`) {
|
||||
--enable_query_log
|
||||
--echo ******** Failure! Event number 4 was a '$event_type', not a 'Query'. ********
|
||||
--echo ******** Failure! Event number 5 was a '$event_type', not a 'Query'. ********
|
||||
SHOW BINLOG EVENTS;
|
||||
--die Wrong events in binlog.
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ INSERT INTO t3 VALUES (3);
|
|||
COMMIT;
|
||||
save_master_pos;
|
||||
# Save BEGIN event into variable
|
||||
let $master_pos_begin= query_get_value(SHOW BINLOG EVENTS, Pos, 6);
|
||||
let $master_pos_begin= query_get_value(SHOW BINLOG EVENTS, Pos, 10);
|
||||
--echo
|
||||
|
||||
# 1) Test deadlock
|
||||
|
|
|
|||
|
|
@ -137,7 +137,10 @@ if (`SELECT @@global.binlog_format = 'STATEMENT'`)
|
|||
{
|
||||
#must show two INSERT DELAYED
|
||||
--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
|
||||
--let $binlog_limit= 2,6
|
||||
# The show_binlog_events.inc already skips format_description, gtid list, and
|
||||
# one binlog checkpoint events. Skip three more, second binlog checkpoint,
|
||||
# Gtid, and CREATE TABLE, so we start at the first DML event
|
||||
--let $binlog_limit= 3,6
|
||||
--source include/show_binlog_events.inc
|
||||
}
|
||||
select * from t1;
|
||||
|
|
|
|||
|
|
@ -33,13 +33,13 @@ eval load data infile '$LOAD_FILE' into table t1 ignore 1 lines;
|
|||
select count(*) from t1;
|
||||
source include/show_binlog_events.inc;
|
||||
|
||||
let $binlog_limit= 1;
|
||||
source include/show_binlog_events.inc;
|
||||
|
||||
let $binlog_limit= 2;
|
||||
source include/show_binlog_events.inc;
|
||||
|
||||
let $binlog_limit= 1,4;
|
||||
let $binlog_limit= 3;
|
||||
source include/show_binlog_events.inc;
|
||||
|
||||
let $binlog_limit= 2,4;
|
||||
source include/show_binlog_events.inc;
|
||||
let $binlog_limit=;
|
||||
flush logs;
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
--let $binlog_limit=
|
||||
--source extra/rpl_tests/rpl_show_binlog_events.inc
|
||||
--let $binlog_limit= 1
|
||||
--let $binlog_limit= 2
|
||||
--source extra/rpl_tests/rpl_show_binlog_events.inc
|
||||
--let $binlog_limit= 1,3
|
||||
--let $binlog_limit= 2,3
|
||||
--source extra/rpl_tests/rpl_show_binlog_events.inc
|
||||
--let $binlog_limit=
|
||||
--let $binlog_file=
|
||||
|
|
|
|||
|
|
@ -15,14 +15,14 @@
|
|||
# 1 /* Checksum algorithm */ +
|
||||
# 4 /* CRC32 length */
|
||||
#
|
||||
# With current number of events = 161,
|
||||
# With current number of events = 163,
|
||||
#
|
||||
# binlog_start_pos = 4 + 19 + 57 + 161 + 1 + 4 = 246.
|
||||
# binlog_start_pos = 4 + 19 + 57 + 163 + 1 + 4 = 248.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
let $binlog_start_pos=246;
|
||||
let $binlog_start_pos=248;
|
||||
--disable_query_log
|
||||
SET @binlog_start_pos=246;
|
||||
SET @binlog_start_pos=248;
|
||||
--enable_query_log
|
||||
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ if ($tmp)
|
|||
--echo Master_Server_Id #
|
||||
--echo Master_SSL_Crl #
|
||||
--echo Master_SSL_Crlpath #
|
||||
--echo Using_Gtid 0
|
||||
}
|
||||
if (!$tmp) {
|
||||
# Note: after WL#5177, fields 13-18 shall not be filtered-out.
|
||||
|
|
|
|||
|
|
@ -1,22 +0,0 @@
|
|||
--exec $MYSQL test -e "show processlist" > $MYSQLTEST_VARDIR/tmp/bl_dump_thread_id
|
||||
--disable_warnings
|
||||
drop table if exists t999;
|
||||
--enable_warnings
|
||||
# Create a table to hold the process list
|
||||
create temporary table t999(
|
||||
id int,
|
||||
user char(255),
|
||||
host char(255),
|
||||
db char(255),
|
||||
Command char(255),
|
||||
time int,
|
||||
State char(255),
|
||||
info char(255)
|
||||
);
|
||||
# Load processlist into table, headers will create seom warnings
|
||||
--disable_warnings
|
||||
--replace_result $MYSQLTEST_VARDIR "."
|
||||
eval LOAD DATA INFILE "$MYSQLTEST_VARDIR/tmp/bl_dump_thread_id" into table t999;
|
||||
--enable_warnings
|
||||
let $id = `select Id from t999 where Command="Binlog Dump"`;
|
||||
drop table t999;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
if (`SELECT COUNT(*) = 0 FROM information_schema.session_variables WHERE
|
||||
variable_name = 'debug_sync' AND variable_value LIKE 'ON %'`) {
|
||||
--skip Needs debug_sync enabled
|
||||
if (`select count(*) = 0 from information_schema.session_variables where variable_name = 'debug_sync' and variable_value like 'on %'`)
|
||||
{
|
||||
skip debug_sync is not available;
|
||||
}
|
||||
|
|
|
|||
4
mysql-test/include/have_semisync.inc
Normal file
4
mysql-test/include/have_semisync.inc
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
if (`select count(*) < 2 from information_schema.plugins where plugin_name like 'rpl_semi_sync_%'`)
|
||||
{
|
||||
--skip Test requires semisync plugins
|
||||
}
|
||||
4
mysql-test/include/have_semisync.opt
Normal file
4
mysql-test/include/have_semisync.opt
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
--plugin-load=$SEMISYNC_MASTER_SO
|
||||
--plugin-load=$SEMISYNC_SLAVE_SO
|
||||
--loose-rpl-semi-sync-master
|
||||
--loose-rpl-semi-sync-slave
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
#
|
||||
# Check if server has support for loading plugins
|
||||
#
|
||||
if (`SELECT @@have_dynamic_loading != 'YES'`) {
|
||||
--skip Requires dynamic loading
|
||||
}
|
||||
|
||||
#
|
||||
# Check if the variable SEMISYNC_MASTER_SO is set
|
||||
#
|
||||
if (!$SEMISYNC_MASTER_SO)
|
||||
{
|
||||
skip Need semisync plugins;
|
||||
}
|
||||
|
||||
|
|
@ -627,17 +627,12 @@ DROP TABLE t1,t2,t3;
|
|||
create table t1 (a int) engine=innodb;
|
||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||
copy_file $MYSQLD_DATADIR/test/t1.frm $MYSQLD_DATADIR/test/bug29807.frm;
|
||||
--error 1146
|
||||
--error ER_NO_SUCH_TABLE_IN_ENGINE
|
||||
select * from bug29807;
|
||||
drop table t1;
|
||||
--error 1051
|
||||
drop table bug29807;
|
||||
create table bug29807 (a int);
|
||||
drop table bug29807;
|
||||
--disable_query_log
|
||||
call mtr.add_suppression("InnoDB: Error: table .test...bug29807. does not exist in the InnoDB internal");
|
||||
call mtr.add_suppression("Cannot find or open table test\/bug29807 from");
|
||||
--enable_query_log
|
||||
|
||||
|
||||
#
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ BEGIN
|
|||
AND variable_name not like "Last_IO_Err*"
|
||||
AND variable_name != 'INNODB_IBUF_MAX_SIZE'
|
||||
AND variable_name != 'INNODB_USE_NATIVE_AIO'
|
||||
AND variable_name != 'GTID_POS'
|
||||
ORDER BY variable_name;
|
||||
|
||||
-- Dump all databases, there should be none
|
||||
|
|
|
|||
|
|
@ -79,6 +79,22 @@ while ($_rpl_server)
|
|||
--source include/rpl_sync.inc
|
||||
--source include/rpl_stop_slaves.inc
|
||||
|
||||
if (!$rpl_debug)
|
||||
{
|
||||
--disable_query_log
|
||||
}
|
||||
--let $_rpl_server= $rpl_server_count
|
||||
while ($_rpl_server)
|
||||
{
|
||||
--let $rpl_connection_name= server_$_rpl_server
|
||||
--source include/rpl_connection.inc
|
||||
|
||||
# Clear Using_Gtid in SHOW SLAVE STATUS to keep check_testcase happy.
|
||||
CHANGE MASTER TO master_log_file='';
|
||||
|
||||
--dec $_rpl_server
|
||||
}
|
||||
|
||||
# mtr configures server 2 to be a slave before it runs the test. We
|
||||
# have to restore that state now, so we change topology to 1->2.
|
||||
--let $rpl_topology= none
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ if ($binlog_start)
|
|||
}
|
||||
if (!$binlog_start)
|
||||
{
|
||||
--let $_binlog_start=246
|
||||
--let $_binlog_start=248
|
||||
}
|
||||
if ($binlog_file)
|
||||
{
|
||||
|
|
@ -12,5 +12,5 @@ if ($binlog_file)
|
|||
}
|
||||
--replace_result $_binlog_start <binlog_start> $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /file_id=[0-9]+/file_id=#/
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /file_id=[0-9]+/file_id=#/ /GTID [0-9]+-[0-9]+-[0-9]+/GTID #-#-#/
|
||||
--eval show binlog events $_in_binlog_file from $_binlog_start
|
||||
|
|
|
|||
|
|
@ -10,30 +10,6 @@
|
|||
--let $include_filename= show_events.inc
|
||||
--source include/begin_include_file.inc
|
||||
|
||||
# Do not modify $binlog_start - if we did, it could wrongly persist until a
|
||||
# later call of show_events.inc.
|
||||
if ($binlog_start)
|
||||
{
|
||||
--let $_binlog_start= $binlog_start
|
||||
}
|
||||
if (!$binlog_start)
|
||||
{
|
||||
# If $binlog_start is not set, we will set it as the third event's
|
||||
# position (second in relay log which has not Binlog Checkpoing event).
|
||||
# The first two events (Description Event and Binlog Checkpoint
|
||||
# event) are always ignored. For description event's length might be changed
|
||||
# because of adding new events, 'SHOW BINLOG EVENTS LIMIT 2' is used to get
|
||||
# the right value.
|
||||
if ($is_relay_log)
|
||||
{
|
||||
--let $_binlog_start= query_get_value(SHOW BINLOG EVENTS LIMIT 1, End_log_pos, 1)
|
||||
}
|
||||
if (!$is_relay_log)
|
||||
{
|
||||
--let $_binlog_start= query_get_value(SHOW BINLOG EVENTS LIMIT 2, End_log_pos, 2)
|
||||
}
|
||||
}
|
||||
|
||||
--let $_se_old_statement= $statement
|
||||
|
||||
--let $statement=show BINLOG events
|
||||
|
|
@ -59,6 +35,32 @@ if ($binlog_file)
|
|||
--let $statement= $statement in '$_binlog_file'
|
||||
}
|
||||
|
||||
# Do not modify $binlog_start - if we did, it could wrongly persist until a
|
||||
# later call of show_events.inc.
|
||||
if ($binlog_start)
|
||||
{
|
||||
--let $_binlog_start= $binlog_start
|
||||
}
|
||||
|
||||
if (!$binlog_start)
|
||||
{
|
||||
# If $binlog_start is not set, we will set it as the fourth event's
|
||||
# position (second in relay log which has not Binlog Checkpoint nor
|
||||
# Gtid_list events).
|
||||
# The first three events (Description Event, Gtid list, and Binlog Checkpoint
|
||||
# event) are always ignored. For description event's length might be changed
|
||||
# because of adding new events, 'SHOW BINLOG EVENTS LIMIT 3' is used to get
|
||||
# the right value.
|
||||
if ($is_relay_log)
|
||||
{
|
||||
--let $_binlog_start= query_get_value($statement LIMIT 1, End_log_pos, 1)
|
||||
}
|
||||
if (!$is_relay_log)
|
||||
{
|
||||
--let $_binlog_start= query_get_value($statement LIMIT 3, End_log_pos, 3)
|
||||
}
|
||||
}
|
||||
|
||||
--let $statement= $statement from $_binlog_start
|
||||
|
||||
if ($binlog_limit != '')
|
||||
|
|
@ -80,24 +82,14 @@ let $script=
|
|||
s{file_id=[0-9]+}{file_id=#};
|
||||
s{block_len=[0-9]+}{block_len=#};
|
||||
s{Server ver:.*DOLLAR}{SERVER_VERSION, BINLOG_VERSION};
|
||||
s{GTID [0-9]+-[0-9]+-[0-9]+}{GTID #-#-#};
|
||||
s{\[[0-9]-[0-9]-[0-9]+\]}{[#-#-#]};
|
||||
s{SQL_LOAD-[a-z,0-9,-]*.[a-z]*}{SQL_LOAD-<SERVER UUID>-<MASTER server-id>-<file-id>.<extension>};
|
||||
s{rand_seed1=[0-9]*,rand_seed2=[0-9]*}{rand_seed1=<seed 1>,rand_seed2=<seed 2>};
|
||||
s{((?:master|slave|slave-relay)-bin\.[0-9]{6};pos=)[0-9]+DOLLAR}{DOLLAR1POS};
|
||||
s{DOLLARmysqltest_vardir}{MYSQLTEST_VARDIR}g;
|
||||
||
|
||||
--let $pre_script= my DOLLARmysqltest_vardir = DOLLARENV{'MYSQLTEST_VARDIR'};
|
||||
if (!$keep_gtid_events)
|
||||
{
|
||||
--let $script= $script DOLLAR_ = '' if (m{\t(?:Gtid|Previous_gtids)\t});
|
||||
}
|
||||
if ($keep_gtid_events)
|
||||
{
|
||||
let $pre_script= $pre_script
|
||||
my DOLLARuuid_regex = '[0-9A-F]{8}-(?:[0-9A-F]{4}-){3}[0-9A-F]{12}';
|
||||
my DOLLARuuid_sidno_regex = DOLLARuuid_regex.'(?::[0-9]+(?:-[0-9]+)?)+';
|
||||
||
|
||||
--let $script= $script s{DOLLARuuid_sidno_regex(?:,DOLLARuuid_sidno_regex)*}{Gtid_set};
|
||||
}
|
||||
--delimiter ;
|
||||
|
||||
#--let $select_columns= 1 3 6
|
||||
|
|
|
|||
37
mysql-test/include/support_long_file_names.inc
Normal file
37
mysql-test/include/support_long_file_names.inc
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
--error 0,3
|
||||
--perl
|
||||
my $n = 254 - length($ENV{MYSQLTEST_VARDIR});
|
||||
my $name = $ENV{MYSQLTEST_VARDIR} . '/' . sprintf("%0${n}d", $$);
|
||||
if (!open(LONG_NAME,">$name"))
|
||||
{
|
||||
# We cannot rely either on a particular error code, or error string
|
||||
# to check that we indeed hit "File name too long".
|
||||
# Instead, we will try to create a file with a short name
|
||||
# the same way, in the same location. If it goes all right,
|
||||
# we will assume the problem was with the file name length
|
||||
|
||||
open(SHORT_NAME,">$ENV{MYSQLTEST_VARDIR}/$$") ||
|
||||
# Even a shorter name could not be created, something else is wrong
|
||||
die "Could not create file $ENV{MYSQLTEST_VARDIR}/$$: $!";
|
||||
close(SHORT_NAME);
|
||||
unlink("$ENV{MYSQLTEST_VARDIR}/$$");
|
||||
exit(3);
|
||||
} else {
|
||||
close(LONG_NAME);
|
||||
unlink($name);
|
||||
exit(0);
|
||||
}
|
||||
EOF
|
||||
|
||||
# If perl exited with error code 0, the check has passed,
|
||||
# so the calling test will be executed.
|
||||
# If perl exited with error code 3, it will be caught by
|
||||
# --error above, and processed by the check below.
|
||||
# If perl exited with some other error code, something went wrong,
|
||||
# so the test will fail.
|
||||
|
||||
if ($errno)
|
||||
{
|
||||
--skip Long file names are not supported
|
||||
}
|
||||
|
||||
53
mysql-test/include/wait_for_purge.inc
Normal file
53
mysql-test/include/wait_for_purge.inc
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
# include/wait_for_purge.inc
|
||||
#
|
||||
# SUMMARY
|
||||
#
|
||||
# Repeatedly attempt to purge binlogs up to a specific point, until
|
||||
# SHOW BINARY LOGS shows it has succeeded.
|
||||
# This can be useful to avoid races where slaves are stopped but the
|
||||
# corresponding binlog dump thread on the master has not yet terminated.
|
||||
# Async binlog checkpoints can also delay purge.
|
||||
#
|
||||
# Note that it may be necessary to inject at least one event in the binlog
|
||||
# after stopping slaves, or master may not detect stop of slave for a long
|
||||
# time (or forever), depending on details of test case, if replication
|
||||
# heartbeat is enabled, etc.
|
||||
#
|
||||
# USAGE:
|
||||
#
|
||||
# --let $purge_binlogs_to=master-bin.000003
|
||||
# --source include/wait_for_purge.inc
|
||||
#
|
||||
# SIDE EFFECTS:
|
||||
#
|
||||
# Disables --query_log while running, enables it afterwards.
|
||||
|
||||
--echo include/wait_for_purge.inc "$purge_binlogs_to"
|
||||
|
||||
let $_wait_count= 300;
|
||||
let $_done= 0;
|
||||
|
||||
--disable_query_log
|
||||
while ($_wait_count)
|
||||
{
|
||||
dec $_wait_count;
|
||||
eval PURGE BINARY LOGS TO "$purge_binlogs_to";
|
||||
let $_cur_binlog= query_get_value(SHOW BINARY LOGS, Log_name, 1);
|
||||
if (`SELECT "$_cur_binlog" = "$purge_binlogs_to"`)
|
||||
{
|
||||
let $_done= 1;
|
||||
let $_wait_count= 0;
|
||||
}
|
||||
if ($_wait_count)
|
||||
{
|
||||
real_sleep 0.1;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$_done)
|
||||
{
|
||||
SHOW FULL PROCESSLIST;
|
||||
eval SHOW BINARY LOGS;
|
||||
--die ERROR: failed while waiting for binlog purge to $purge_binlogs_to
|
||||
}
|
||||
--enable_query_log
|
||||
|
|
@ -29,4 +29,4 @@ INSTALL(TARGETS my_safe_process DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/Safe
|
|||
IF(WIN32)
|
||||
INSTALL(TARGETS my_safe_kill DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess" COMPONENT Test)
|
||||
ENDIF()
|
||||
INSTALL(FILES safe_process.pl Base.pm DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess" COMPONENT Test)
|
||||
INSTALL(FILES Base.pm DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess" COMPONENT Test)
|
||||
|
|
|
|||
|
|
@ -153,12 +153,19 @@ int main(int argc, char* const argv[] )
|
|||
pid_t own_pid= getpid();
|
||||
pid_t parent_pid= getppid();
|
||||
bool nocore = false;
|
||||
struct sigaction sa,sa_abort;
|
||||
|
||||
sa.sa_handler= handle_signal;
|
||||
sa.sa_flags= SA_NOCLDSTOP;
|
||||
sigemptyset(&sa.sa_mask);
|
||||
|
||||
sa_abort.sa_handler= handle_abort;
|
||||
sigemptyset(&sa_abort.sa_mask);
|
||||
/* Install signal handlers */
|
||||
signal(SIGTERM, handle_signal);
|
||||
signal(SIGINT, handle_signal);
|
||||
signal(SIGCHLD, handle_signal);
|
||||
signal(SIGABRT, handle_abort);
|
||||
sigaction(SIGTERM, &sa,NULL);
|
||||
sigaction(SIGINT, &sa,NULL);
|
||||
sigaction(SIGCHLD, &sa,NULL);
|
||||
sigaction(SIGABRT, &sa_abort,NULL);
|
||||
|
||||
sprintf(safe_process_name, "safe_process[%ld]", (long) own_pid);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,166 +0,0 @@
|
|||
#!/usr/bin/perl
|
||||
# -*- cperl -*-
|
||||
|
||||
# Copyright (c) 2007, 2011, Oracle and/or its affiliates
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use lib 'lib';
|
||||
use My::SafeProcess::Base;
|
||||
use POSIX qw(WNOHANG);
|
||||
|
||||
###########################################################################
|
||||
# Util functions
|
||||
###########################################################################
|
||||
|
||||
#
|
||||
#Print message to stderr
|
||||
#
|
||||
my $verbose= 0;
|
||||
sub message {
|
||||
if ($verbose > 0){
|
||||
use Time::localtime;
|
||||
my $tm= localtime();
|
||||
my $timestamp= sprintf("%02d%02d%02d %2d:%02d:%02d",
|
||||
$tm->year % 100, $tm->mon+1, $tm->mday,
|
||||
$tm->hour, $tm->min, $tm->sec);
|
||||
print STDERR $timestamp, " monitor[$$]: ", @_, "\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
###########################################################################
|
||||
# Main program
|
||||
###########################################################################
|
||||
|
||||
my $terminated= 0;
|
||||
|
||||
# Protect against being killed in the middle
|
||||
# of child creation, just set the terminated flag
|
||||
# to make sure the child will be killed off
|
||||
# when program is ready to do that
|
||||
$SIG{TERM}= sub { message("!Got signal @_"); $terminated= 1; };
|
||||
$SIG{INT}= sub { message("!Got signal @_"); $terminated= 1; };
|
||||
|
||||
my $parent_pid= getppid();
|
||||
|
||||
my $found_double_dash= 0;
|
||||
while (my $arg= shift(@ARGV)){
|
||||
|
||||
if ($arg =~ /^--$/){
|
||||
$found_double_dash= 1;
|
||||
last;
|
||||
}
|
||||
elsif ($arg =~ /^--verbose$/){
|
||||
$verbose= 1;
|
||||
}
|
||||
else {
|
||||
die "Unknown option: $arg";
|
||||
}
|
||||
}
|
||||
|
||||
my $path= shift(@ARGV); # Executable
|
||||
|
||||
die "usage:\n" .
|
||||
" safe_process.pl [opts] -- <path> [<args> [...<args_n>]]"
|
||||
unless defined $path || $found_double_dash;
|
||||
|
||||
|
||||
message("started");
|
||||
#message("path: '$path'");
|
||||
message("parent: $parent_pid");
|
||||
|
||||
# Start process to monitor
|
||||
my $child_pid=
|
||||
create_process(
|
||||
path => $path,
|
||||
args => \@ARGV,
|
||||
setpgrp => 1,
|
||||
);
|
||||
message("Started child $child_pid");
|
||||
|
||||
eval {
|
||||
sub handle_signal {
|
||||
$terminated= 1;
|
||||
message("Got signal @_");
|
||||
|
||||
# Ignore all signals
|
||||
foreach my $name (keys %SIG){
|
||||
$SIG{$name}= 'IGNORE';
|
||||
}
|
||||
|
||||
die "signaled\n";
|
||||
};
|
||||
local $SIG{TERM}= \&handle_signal;
|
||||
local $SIG{INT}= \&handle_signal;
|
||||
local $SIG{CHLD}= sub {
|
||||
message("Got signal @_");
|
||||
kill('KILL', -$child_pid);
|
||||
my $ret= waitpid($child_pid, 0);
|
||||
if ($? & 127){
|
||||
exit(65); # Killed by signal
|
||||
}
|
||||
exit($? >> 8);
|
||||
};
|
||||
|
||||
# Monitoring loop
|
||||
while(!$terminated) {
|
||||
|
||||
# Check if parent is still alive
|
||||
if (kill(0, $parent_pid) < 1){
|
||||
message("Parent is not alive anymore");
|
||||
last;
|
||||
}
|
||||
|
||||
# Wait for child to terminate but wakeup every
|
||||
# second to also check that parent is still alive
|
||||
my $ret_pid;
|
||||
$ret_pid= waitpid($child_pid, &WNOHANG);
|
||||
if ($ret_pid == $child_pid) {
|
||||
# Process has exited, collect return status
|
||||
my $ret_code= $? >> 8;
|
||||
message("Child exit: $ret_code");
|
||||
# Exit with exit status of the child
|
||||
exit ($ret_code);
|
||||
}
|
||||
sleep(1);
|
||||
}
|
||||
};
|
||||
if ( $@ ) {
|
||||
# The monitoring loop should have been
|
||||
# broken by handle_signal
|
||||
warn "Unexpected: $@" unless ( $@ =~ /signaled/ );
|
||||
}
|
||||
|
||||
# Use negative pid in order to kill the whole
|
||||
# process group
|
||||
#
|
||||
my $ret= kill('KILL', -$child_pid);
|
||||
message("Killed child: $child_pid, ret: $ret");
|
||||
if ($ret > 0) {
|
||||
message("Killed child: $child_pid");
|
||||
# Wait blocking for the child to return
|
||||
my $ret_pid= waitpid($child_pid, 0);
|
||||
if ($ret_pid != $child_pid){
|
||||
message("unexpected pid $ret_pid returned from waitpid($child_pid)");
|
||||
}
|
||||
}
|
||||
|
||||
message("DONE!");
|
||||
exit (1);
|
||||
|
||||
|
||||
|
|
@ -769,18 +769,11 @@ sub collect_one_test_case {
|
|||
if ( $tinfo->{'ndb_test'} )
|
||||
{
|
||||
# This is a NDB test
|
||||
if ( $::opt_skip_ndbcluster == 2 )
|
||||
if ( $::ndbcluster_enabled == 0)
|
||||
{
|
||||
# Ndb is not supported, skip it
|
||||
# ndbcluster is disabled
|
||||
$tinfo->{'skip'}= 1;
|
||||
$tinfo->{'comment'}= "No ndbcluster support or ndb tests not enabled";
|
||||
return $tinfo;
|
||||
}
|
||||
elsif ( $::opt_skip_ndbcluster )
|
||||
{
|
||||
# All ndb test's should be skipped
|
||||
$tinfo->{'skip'}= 1;
|
||||
$tinfo->{'comment'}= "No ndbcluster";
|
||||
$tinfo->{'comment'}= "ndbcluster disabled";
|
||||
return $tinfo;
|
||||
}
|
||||
}
|
||||
|
|
@ -975,6 +968,8 @@ sub get_tags_from_file($$) {
|
|||
} elsif ($over and $file =~ m@^$pdir/(.*)$@) {
|
||||
$suffix = $1;
|
||||
@prefix = map { "$_/" } $sdir, $pdir;
|
||||
} else {
|
||||
$over = 0; # file neither in $sdir nor in $pdir
|
||||
}
|
||||
|
||||
while (my $line= <$F>)
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ our @EXPORT= qw(report_option mtr_print_line mtr_print_thick_line
|
|||
mtr_warning mtr_error mtr_debug mtr_verbose
|
||||
mtr_verbose_restart mtr_report_test_passed
|
||||
mtr_report_test_skipped mtr_print
|
||||
mtr_report_test);
|
||||
mtr_report_test isotime);
|
||||
|
||||
use mtr_match;
|
||||
use My::Platform;
|
||||
|
|
@ -106,6 +106,8 @@ sub mtr_report_test_passed ($) {
|
|||
$tinfo->{'result'}= 'MTR_RES_PASSED';
|
||||
|
||||
mtr_report_test($tinfo);
|
||||
|
||||
resfile_global("endtime ", isotime (time));
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -550,4 +552,12 @@ sub mtr_verbose_restart (@) {
|
|||
}
|
||||
|
||||
|
||||
# Used by --result-file for for formatting times
|
||||
|
||||
sub isotime($) {
|
||||
my ($sec,$min,$hr,$day,$mon,$yr)= gmtime($_[0]);
|
||||
return sprintf "%d-%02d-%02dT%02d:%02d:%02dZ",
|
||||
$yr+1900, $mon+1, $day, $hr, $min, $sec;
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -208,6 +208,8 @@ our @opt_mysqld_envs;
|
|||
|
||||
my $opt_stress;
|
||||
|
||||
my $opt_dry_run;
|
||||
|
||||
my $opt_compress;
|
||||
my $opt_ssl;
|
||||
my $opt_skip_ssl;
|
||||
|
|
@ -334,8 +336,9 @@ sub check_timeout ($) { return testcase_timeout($_[0]) / 10; }
|
|||
|
||||
our $opt_warnings= 1;
|
||||
|
||||
our $opt_include_ndbcluster= 0;
|
||||
our $opt_skip_ndbcluster= 1;
|
||||
our $ndbcluster_enabled= 0;
|
||||
my $opt_include_ndbcluster= 0;
|
||||
my $opt_skip_ndbcluster= 0;
|
||||
|
||||
my $exe_ndbd;
|
||||
my $exe_ndbmtd;
|
||||
|
|
@ -346,7 +349,7 @@ my $exe_ndb_mgm;
|
|||
our %mysqld_variables;
|
||||
our @optional_plugins;
|
||||
|
||||
my $source_dist= 0;
|
||||
my $source_dist= -d "../sql";
|
||||
|
||||
my $opt_max_save_core= env_or_val(MTR_MAX_SAVE_CORE => 5);
|
||||
my $opt_max_save_datadir= env_or_val(MTR_MAX_SAVE_DATADIR => 20);
|
||||
|
|
@ -362,14 +365,6 @@ my $opt_stop_keep_alive= $ENV{MTR_STOP_KEEP_ALIVE};
|
|||
select(STDOUT);
|
||||
$| = 1; # Automatically flush STDOUT
|
||||
|
||||
# Used by --result-file for for formatting times
|
||||
|
||||
sub isotime($) {
|
||||
my ($sec,$min,$hr,$day,$mon,$yr)= gmtime($_[0]);
|
||||
return sprintf "%d-%02d-%02dT%02d:%02d:%02dZ",
|
||||
$yr+1900, $mon+1, $day, $hr, $min, $sec;
|
||||
}
|
||||
|
||||
main();
|
||||
|
||||
|
||||
|
|
@ -382,6 +377,8 @@ sub main {
|
|||
# directly before it executes them, like "make test-force-pl" in RPM builds.
|
||||
mtr_report("Logging: $0 ", join(" ", @ARGV));
|
||||
|
||||
$DEFAULT_SUITES.=",sequence,sql_discovery" if $source_dist;
|
||||
|
||||
command_line_setup();
|
||||
|
||||
# --help will not reach here, so now it's safe to assume we have binaries
|
||||
|
|
@ -394,26 +391,6 @@ sub main {
|
|||
|
||||
if (!$opt_suites) {
|
||||
$opt_suites= $DEFAULT_SUITES;
|
||||
|
||||
# Check for any extra suites to enable based on the path name
|
||||
my %extra_suites=
|
||||
(
|
||||
"mysql-5.1-new-ndb" => "ndb_team",
|
||||
"mysql-5.1-new-ndb-merge" => "ndb_team",
|
||||
"mysql-5.1-telco-6.2" => "ndb_team",
|
||||
"mysql-5.1-telco-6.2-merge" => "ndb_team",
|
||||
"mysql-5.1-telco-6.3" => "ndb_team",
|
||||
"mysql-6.0-ndb" => "ndb_team",
|
||||
);
|
||||
|
||||
foreach my $dir ( reverse splitdir($basedir) ) {
|
||||
my $extra_suite= $extra_suites{$dir};
|
||||
if (defined $extra_suite) {
|
||||
mtr_report("Found extra suite: $extra_suite");
|
||||
$opt_suites= "$extra_suite,$opt_suites";
|
||||
last;
|
||||
}
|
||||
}
|
||||
}
|
||||
mtr_report("Using suites: $opt_suites") unless @opt_cases;
|
||||
|
||||
|
|
@ -447,6 +424,14 @@ sub main {
|
|||
my $tests= collect_test_cases($opt_reorder, $opt_suites, \@opt_cases, \@opt_skip_test_list);
|
||||
mark_time_used('collect');
|
||||
|
||||
if ($opt_dry_run)
|
||||
{
|
||||
for (@$tests) {
|
||||
print $_->fullname(), "\n";
|
||||
}
|
||||
exit 0;
|
||||
}
|
||||
|
||||
if ( $opt_report_features ) {
|
||||
# Put "report features" as the first test to run
|
||||
my $tinfo = My::Test->new
|
||||
|
|
@ -763,6 +748,10 @@ sub run_test_server ($$$) {
|
|||
else {
|
||||
mtr_report("\nRetrying test $tname, ".
|
||||
"attempt($retries/$opt_retry)...\n");
|
||||
#saving the log file as filename.failed in case of retry
|
||||
my $worker_logdir= $result->{savedir};
|
||||
my $log_file_name=dirname($worker_logdir)."/".$result->{shortname}.".log";
|
||||
rename $log_file_name,$log_file_name.".failed";
|
||||
delete($result->{result});
|
||||
$result->{retries}= $retries+1;
|
||||
$result->write_test($sock, 'TESTCASE');
|
||||
|
|
@ -1139,7 +1128,7 @@ sub command_line_setup {
|
|||
# Control what test suites or cases to run
|
||||
'force+' => \$opt_force,
|
||||
'with-ndbcluster-only' => \&collect_option,
|
||||
'include-ndbcluster' => \$opt_include_ndbcluster,
|
||||
'ndb|include-ndbcluster' => \$opt_include_ndbcluster,
|
||||
'skip-ndbcluster|skip-ndb' => \$opt_skip_ndbcluster,
|
||||
'suite|suites=s' => \$opt_suites,
|
||||
'skip-rpl' => \&collect_option,
|
||||
|
|
@ -1260,6 +1249,7 @@ sub command_line_setup {
|
|||
'report-times' => \$opt_report_times,
|
||||
'result-file' => \$opt_resfile,
|
||||
'stress=s' => \$opt_stress,
|
||||
'dry-run' => \$opt_dry_run,
|
||||
|
||||
'help|h' => \$opt_usage,
|
||||
# list-options is internal, not listed in help
|
||||
|
|
@ -1278,11 +1268,6 @@ sub command_line_setup {
|
|||
report_option('verbose', $opt_verbose);
|
||||
}
|
||||
|
||||
if ( -d "../sql" )
|
||||
{
|
||||
$source_dist= 1;
|
||||
}
|
||||
|
||||
# Find the absolute path to the test directory
|
||||
$glob_mysql_test_dir= cwd();
|
||||
if ($glob_mysql_test_dir =~ / /)
|
||||
|
|
@ -1581,7 +1566,6 @@ sub command_line_setup {
|
|||
# --------------------------------------------------------------------------
|
||||
if ( $opt_embedded_server )
|
||||
{
|
||||
$opt_skip_ndbcluster= 1; # Turn off use of NDB cluster
|
||||
$opt_skip_ssl= 1; # Turn off use of SSL
|
||||
|
||||
# Turn off use of bin log
|
||||
|
|
@ -2037,7 +2021,7 @@ sub executable_setup () {
|
|||
|
||||
$exe_mysql_embedded= mtr_exe_maybe_exists("$basedir/libmysqld/examples/mysql_embedded");
|
||||
|
||||
if ( ! $opt_skip_ndbcluster )
|
||||
if ( $ndbcluster_enabled )
|
||||
{
|
||||
# Look for single threaded NDB
|
||||
$exe_ndbd=
|
||||
|
|
@ -2299,7 +2283,7 @@ sub environment_setup {
|
|||
# --------------------------------------------------------------------------
|
||||
# Add the path where libndbclient can be found
|
||||
# --------------------------------------------------------------------------
|
||||
if ( !$opt_skip_ndbcluster )
|
||||
if ( $ndbcluster_enabled )
|
||||
{
|
||||
push(@ld_library_paths, "$basedir/storage/ndb/src/.libs");
|
||||
}
|
||||
|
|
@ -2392,7 +2376,7 @@ sub environment_setup {
|
|||
# ----------------------------------------------------
|
||||
# Setup env for NDB
|
||||
# ----------------------------------------------------
|
||||
if ( ! $opt_skip_ndbcluster )
|
||||
if ( $ndbcluster_enabled )
|
||||
{
|
||||
$ENV{'NDB_MGM'}=
|
||||
my_find_bin($bindir,
|
||||
|
|
@ -2823,7 +2807,7 @@ sub fix_vs_config_dir () {
|
|||
$opt_vs_config="";
|
||||
|
||||
|
||||
for (<$bindir/sql/*/mysqld.exe>) {
|
||||
for (<$bindir/sql/*/mysqld.exe>) { #/
|
||||
if (-M $_ < $modified)
|
||||
{
|
||||
$modified = -M _;
|
||||
|
|
@ -2865,37 +2849,87 @@ sub vs_config_dirs ($$) {
|
|||
|
||||
sub check_ndbcluster_support {
|
||||
|
||||
my $ndbcluster_supported = 0;
|
||||
if ($mysqld_variables{'ndb-connectstring'})
|
||||
{
|
||||
$ndbcluster_supported = 1;
|
||||
}
|
||||
|
||||
if ($opt_skip_ndbcluster && $opt_include_ndbcluster)
|
||||
{
|
||||
# User is ambivalent. Theoretically the arg which was
|
||||
# given last on command line should win, but that order is
|
||||
# unknown at this time.
|
||||
mtr_error("Ambigous command, both --include-ndbcluster " .
|
||||
" and --skip-ndbcluster was specified");
|
||||
}
|
||||
|
||||
# Check if this is MySQL Cluster, ie. mysql version string ends
|
||||
# with -ndb-Y.Y.Y[-status]
|
||||
if ( defined $mysql_version_extra &&
|
||||
$mysql_version_extra =~ /^-ndb-/ )
|
||||
$mysql_version_extra =~ /-ndb-([0-9]*)\.([0-9]*)\.([0-9]*)/ )
|
||||
{
|
||||
mtr_report(" - MySQL Cluster");
|
||||
# Enable ndb engine and add more test suites
|
||||
$opt_include_ndbcluster = 1;
|
||||
$DEFAULT_SUITES.=",ndb";
|
||||
# MySQL Cluster tree
|
||||
mtr_report(" - MySQL Cluster detected");
|
||||
|
||||
if ($opt_skip_ndbcluster)
|
||||
{
|
||||
mtr_report(" - skipping ndbcluster(--skip-ndbcluster)");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!$ndbcluster_supported)
|
||||
{
|
||||
# MySQL Cluster tree, but mysqld was not compiled with
|
||||
# ndbcluster -> fail unless --skip-ndbcluster was used
|
||||
mtr_error("This is MySQL Cluster but mysqld does not " .
|
||||
"support ndbcluster. Use --skip-ndbcluster to " .
|
||||
"force mtr to run without it.");
|
||||
}
|
||||
|
||||
# mysqld was compiled with ndbcluster -> auto enable
|
||||
}
|
||||
else
|
||||
{
|
||||
# Not a MySQL Cluster tree
|
||||
if (!$ndbcluster_supported)
|
||||
{
|
||||
if ($opt_include_ndbcluster)
|
||||
{
|
||||
mtr_error("Could not detect ndbcluster support ".
|
||||
"requested with --include-ndbcluster");
|
||||
}
|
||||
|
||||
# Silently skip, mysqld was compiled without ndbcluster
|
||||
# which is the default case
|
||||
return;
|
||||
}
|
||||
|
||||
if ($opt_skip_ndbcluster)
|
||||
{
|
||||
# Compiled with ndbcluster but ndbcluster skipped
|
||||
mtr_report(" - skipping ndbcluster(--skip-ndbcluster)");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
# Not a MySQL Cluster tree, enable ndbcluster
|
||||
# if --include-ndbcluster was used
|
||||
if ($opt_include_ndbcluster)
|
||||
{
|
||||
# enable ndbcluster
|
||||
}
|
||||
else
|
||||
{
|
||||
mtr_report(" - skipping ndbcluster(disabled by default)");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if ($opt_include_ndbcluster)
|
||||
{
|
||||
$opt_skip_ndbcluster= 0;
|
||||
}
|
||||
|
||||
if ($opt_skip_ndbcluster)
|
||||
{
|
||||
mtr_report(" - skipping ndbcluster");
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! $mysqld_variables{'ndb-connectstring'} )
|
||||
{
|
||||
#mtr_report(" - skipping ndbcluster, mysqld not compiled with ndbcluster");
|
||||
$opt_skip_ndbcluster= 2;
|
||||
return;
|
||||
}
|
||||
|
||||
mtr_report(" - using ndbcluster when necessary, mysqld supports it");
|
||||
|
||||
mtr_report(" - enabling ndbcluster");
|
||||
$ndbcluster_enabled= 1;
|
||||
# Add MySQL Cluster test suites
|
||||
$DEFAULT_SUITES.=",ndb,ndb_binlog,rpl_ndb,ndb_rpl,ndb_memcache";
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -4751,6 +4785,10 @@ sub extract_warning_lines ($$) {
|
|||
qr|Error: io_setup\(\) failed|,
|
||||
qr|Warning: io_setup\(\) failed|,
|
||||
qr|Warning: io_setup\(\) attempt|,
|
||||
qr|setrlimit could not change the size of core files to 'infinity';|,
|
||||
qr|feedback plugin: failed to retrieve the MAC address|,
|
||||
qr|Plugin 'FEEDBACK' init function returned error|,
|
||||
qr|Plugin 'FEEDBACK' registration as a INFORMATION SCHEMA failed|,
|
||||
);
|
||||
|
||||
my $matched_lines= [];
|
||||
|
|
@ -6257,6 +6295,8 @@ Options to control what engine/variation to run
|
|||
all generated configs
|
||||
combination=<opt> Use at least twice to run tests with specified
|
||||
options to mysqld
|
||||
dry-run Don't run any tests, print the list of tests
|
||||
that were selected for execution
|
||||
|
||||
Options to control directories to use
|
||||
tmpdir=DIR The directory where temporary files are stored
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ plugin
|
|||
proc
|
||||
procs_priv
|
||||
proxies_priv
|
||||
rpl_slave_state
|
||||
servers
|
||||
slave_master_info
|
||||
slave_relay_log_info
|
||||
|
|
|
|||
|
|
@ -16,11 +16,12 @@ insert into t1 values (1, 1, 1);;
|
|||
set debug_sync='now SIGNAL go';
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; insert into t2 values (1)
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; alter table t1 enable keys
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; insert into t1 values (1, 1, 1)
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
drop tables t1, t2;
|
||||
|
|
@ -59,19 +60,28 @@ set debug_sync='alter_table_before_main_binlog SIGNAL parked WAIT_FOR go';
|
|||
set debug_sync='RESET';
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; alter table t1 change i c char(10) default 'Test1'
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; insert into t1 values ()
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; alter table t1 change c vc varchar(100) default 'Test2'
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; rename table t1 to t2
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE `t2` /* generated by server */
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; create table t1 (i int)
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; alter table t1 change i c char(10) default 'Test3', rename to t2
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; insert into t2 values()
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; alter table t2 change c vc varchar(100) default 'Test2', rename to t1
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; rename table t1 to t3
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE `t3` /* generated by server */
|
||||
End of 5.1 tests
|
||||
|
|
|
|||
|
|
@ -415,7 +415,7 @@ alter table t1 drop key a;
|
|||
drop table t1;
|
||||
CREATE TABLE T12207(a int) ENGINE=MYISAM;
|
||||
ALTER TABLE T12207 DISCARD TABLESPACE;
|
||||
ERROR HY000: Table storage engine for 'T12207' doesn't have this option
|
||||
ERROR HY000: Storage engine MyISAM of the table `test`.`T12207` doesn't have this option
|
||||
DROP TABLE T12207;
|
||||
create table t1 (a text) character set koi8r;
|
||||
insert into t1 values (_koi8r'ÔĹÓÔ');
|
||||
|
|
@ -978,7 +978,7 @@ SHOW CREATE TABLE `tt+2`;
|
|||
Table Create Table
|
||||
tt+2 CREATE TEMPORARY TABLE `tt+2` (
|
||||
`c1` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DELAY_KEY_WRITE=1
|
||||
DROP TABLE `tt+1`, `tt+2`;
|
||||
CREATE TABLE `#sql1` (c1 INT);
|
||||
CREATE TABLE `@0023sql2` (c1 INT);
|
||||
|
|
@ -1015,12 +1015,12 @@ SHOW CREATE TABLE `#sql2`;
|
|||
Table Create Table
|
||||
#sql2 CREATE TEMPORARY TABLE `#sql2` (
|
||||
`c1` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DELAY_KEY_WRITE=1
|
||||
SHOW CREATE TABLE `@0023sql1`;
|
||||
Table Create Table
|
||||
@0023sql1 CREATE TEMPORARY TABLE `@0023sql1` (
|
||||
`c1` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DELAY_KEY_WRITE=1
|
||||
DROP TABLE `#sql2`, `@0023sql1`;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP TABLE IF EXISTS t2;
|
||||
|
|
@ -1340,3 +1340,43 @@ rename table t2 to t1;
|
|||
execute stmt1;
|
||||
deallocate prepare stmt1;
|
||||
drop table t2;
|
||||
CREATE TABLE t1 (
|
||||
id INT(11) NOT NULL,
|
||||
x_param INT(11) DEFAULT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
ALTER TABLE t1 ADD COLUMN IF NOT EXISTS id INT,
|
||||
ADD COLUMN IF NOT EXISTS lol INT AFTER id;
|
||||
Warnings:
|
||||
Note 1060 Duplicate column name 'id'
|
||||
ALTER TABLE t1 ADD COLUMN IF NOT EXISTS lol INT AFTER id;
|
||||
Warnings:
|
||||
Note 1060 Duplicate column name 'lol'
|
||||
ALTER TABLE t1 DROP COLUMN IF EXISTS lol;
|
||||
ALTER TABLE t1 DROP COLUMN IF EXISTS lol;
|
||||
Warnings:
|
||||
Note 1091 Can't DROP 'lol'; check that column/key exists
|
||||
ALTER TABLE t1 ADD KEY IF NOT EXISTS x_param(x_param);
|
||||
ALTER TABLE t1 ADD KEY IF NOT EXISTS x_param(x_param);
|
||||
Warnings:
|
||||
Note 1061 Duplicate key name 'x_param'
|
||||
ALTER TABLE t1 MODIFY IF EXISTS lol INT;
|
||||
Warnings:
|
||||
Note 1054 Unknown column 'lol' in 't1'
|
||||
DROP INDEX IF EXISTS x_param ON t1;
|
||||
DROP INDEX IF EXISTS x_param ON t1;
|
||||
Warnings:
|
||||
Note 1091 Can't DROP 'x_param'; check that column/key exists
|
||||
CREATE INDEX IF NOT EXISTS x_param1 ON t1(x_param);
|
||||
CREATE INDEX IF NOT EXISTS x_param1 ON t1(x_param);
|
||||
Warnings:
|
||||
Note 1061 Duplicate key name 'x_param1'
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` int(11) NOT NULL,
|
||||
`x_param` int(11) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `x_param1` (`x_param`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@ drop table if exists t1,t2;
|
|||
CREATE TABLE t1 (a INT, INDEX(a)) engine=innodb;
|
||||
ALTER TABLE t1 RENAME TO t2, DISABLE KEYS;
|
||||
Warnings:
|
||||
Note 1031 Table storage engine for 't1' doesn't have this option
|
||||
Note 1031 Storage engine InnoDB of the table `test`.`t1` doesn't have this option
|
||||
DROP TABLE t2;
|
||||
|
|
|
|||
|
|
@ -4,18 +4,18 @@
|
|||
CREATE TABLE t1 (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`col432` bit(8) DEFAULT NULL,
|
||||
`col433` multipoint DEFAULT NULL,
|
||||
`col434` polygon DEFAULT NULL,
|
||||
`col433` geometry DEFAULT NULL,
|
||||
`col434` geometry DEFAULT NULL,
|
||||
`col435` decimal(50,17) unsigned DEFAULT NULL,
|
||||
`col436` geometry NOT NULL,
|
||||
`col437` tinyblob NOT NULL,
|
||||
`col438` multipolygon DEFAULT NULL,
|
||||
`col438` geometry DEFAULT NULL,
|
||||
`col439` mediumblob NOT NULL,
|
||||
`col440` tinyblob NOT NULL,
|
||||
`col441` double unsigned DEFAULT NULL
|
||||
);
|
||||
CREATE TABLE t2 (
|
||||
`a` multipoint DEFAULT NULL,
|
||||
`a` geometry DEFAULT NULL,
|
||||
`col460` date DEFAULT NULL,
|
||||
`col461` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`col462` date NOT NULL,
|
||||
|
|
@ -31,7 +31,7 @@ CREATE TABLE t3 (
|
|||
`col579` bit(38) NOT NULL,
|
||||
`col580` varchar(93) NOT NULL,
|
||||
`col581` datetime DEFAULT NULL,
|
||||
`col583` multipolygon DEFAULT NULL,
|
||||
`col583` geometry DEFAULT NULL,
|
||||
`col584` bit(47) NOT NULL
|
||||
);
|
||||
set session sort_buffer_size= 32768;
|
||||
|
|
|
|||
10
mysql-test/r/cache_temporal_4265.result
Normal file
10
mysql-test/r/cache_temporal_4265.result
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
create table t1 (a date);
|
||||
insert t1 values ('2000-01-02'), ('2001-02-03'), ('2002-03-04');
|
||||
set debug_dbug='d,str_to_datetime_warn';
|
||||
select * from t1 where a > date_add('2000-01-01', interval 5 day);
|
||||
a
|
||||
2001-02-03
|
||||
2002-03-04
|
||||
Warnings:
|
||||
Note 1003 2000-01-01
|
||||
drop table t1;
|
||||
|
|
@ -268,37 +268,37 @@ cast(010203101112.121314 as datetime)
|
|||
0001-02-03 10:11:12
|
||||
select cast(120010203101112.121314 as datetime);
|
||||
cast(120010203101112.121314 as datetime)
|
||||
NULL
|
||||
0000-00-00 00:00:00
|
||||
Warnings:
|
||||
Warning 1292 Incorrect datetime value: '120010203101112.121314'
|
||||
select cast(cast(1.1 as decimal) as datetime);
|
||||
cast(cast(1.1 as decimal) as datetime)
|
||||
NULL
|
||||
0000-00-00 00:00:00
|
||||
Warnings:
|
||||
Warning 1292 Incorrect datetime value: '1'
|
||||
select cast(cast(-1.1 as decimal) as datetime);
|
||||
cast(cast(-1.1 as decimal) as datetime)
|
||||
NULL
|
||||
0000-00-00 00:00:00
|
||||
Warnings:
|
||||
Warning 1292 Incorrect datetime value: '-1'
|
||||
select cast('0' as date);
|
||||
cast('0' as date)
|
||||
NULL
|
||||
0000-00-00
|
||||
Warnings:
|
||||
Warning 1292 Incorrect datetime value: '0'
|
||||
select cast('' as date);
|
||||
cast('' as date)
|
||||
NULL
|
||||
0000-00-00
|
||||
Warnings:
|
||||
Warning 1292 Incorrect datetime value: ''
|
||||
select cast('0' as datetime);
|
||||
cast('0' as datetime)
|
||||
NULL
|
||||
0000-00-00 00:00:00
|
||||
Warnings:
|
||||
Warning 1292 Incorrect datetime value: '0'
|
||||
select cast('' as datetime);
|
||||
cast('' as datetime)
|
||||
NULL
|
||||
0000-00-00 00:00:00
|
||||
Warnings:
|
||||
Warning 1292 Incorrect datetime value: ''
|
||||
select cast('0' as time);
|
||||
|
|
@ -306,7 +306,7 @@ cast('0' as time)
|
|||
00:00:00
|
||||
select cast('' as time);
|
||||
cast('' as time)
|
||||
NULL
|
||||
00:00:00
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect time value: ''
|
||||
select cast(NULL as DATE);
|
||||
|
|
@ -323,13 +323,13 @@ cast(NULL as BINARY)
|
|||
NULL
|
||||
select cast(cast(120010203101112.121314 as double) as datetime);
|
||||
cast(cast(120010203101112.121314 as double) as datetime)
|
||||
NULL
|
||||
0000-00-00 00:00:00
|
||||
select cast(cast(1.1 as double) as datetime);
|
||||
cast(cast(1.1 as double) as datetime)
|
||||
0000-00-00 00:00:01
|
||||
select cast(cast(-1.1 as double) as datetime);
|
||||
cast(cast(-1.1 as double) as datetime)
|
||||
NULL
|
||||
0000-00-00 00:00:00
|
||||
explain extended select cast(10 as double(5,2));
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ plugin
|
|||
proc
|
||||
procs_priv
|
||||
proxies_priv
|
||||
rpl_slave_state
|
||||
servers
|
||||
slave_master_info
|
||||
slave_relay_log_info
|
||||
|
|
@ -62,6 +63,7 @@ plugin
|
|||
proc
|
||||
procs_priv
|
||||
proxies_priv
|
||||
rpl_slave_state
|
||||
servers
|
||||
slave_master_info
|
||||
slave_relay_log_info
|
||||
|
|
@ -112,6 +114,7 @@ plugin
|
|||
proc
|
||||
procs_priv
|
||||
proxies_priv
|
||||
rpl_slave_state
|
||||
servers
|
||||
slave_master_info
|
||||
slave_relay_log_info
|
||||
|
|
|
|||
|
|
@ -188,11 +188,14 @@ t2 CREATE TABLE `t2` (
|
|||
drop table t2;
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; insert into t1 values (1)
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; create table t2 like t1
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE `t2` /* generated by server */
|
||||
create table t1 (i int);
|
||||
set debug_sync='create_table_like_before_binlog SIGNAL parked WAIT_FOR go';
|
||||
|
|
@ -216,13 +219,20 @@ drop table t2;
|
|||
set debug_sync='RESET';
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; create table t2 like t1
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; insert into t2 values (1)
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE `t2` /* generated by server */
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; create table t2 like t1
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE `t2` /* generated by server */
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; create table t2 like t1
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE `t2` /* generated by server */
|
||||
|
|
|
|||
|
|
@ -31,9 +31,9 @@ Warnings:
|
|||
Note 1051 Unknown table 't1'
|
||||
Note 1051 Unknown table 't2'
|
||||
create table t1 (b char(0) not null, index(b));
|
||||
ERROR 42000: The used storage engine can't index column 'b'
|
||||
ERROR 42000: The storage engine MyISAM can't index column `b`
|
||||
create table t1 (a int not null,b text) engine=heap;
|
||||
ERROR 42000: The used table type doesn't support BLOB/TEXT columns
|
||||
ERROR 42000: Storage engine MEMORY doesn't support BLOB/TEXT columns
|
||||
drop table if exists t1;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 't1'
|
||||
|
|
@ -1899,25 +1899,36 @@ create table t3 (a int) row_format=page;
|
|||
drop table t1,t2,t3;
|
||||
|
||||
# -- End of Bug#45829
|
||||
# new table creation/renaming blocked if old encoded table present
|
||||
create table `t-1` (a int) engine=myisam;
|
||||
insert into `t-1` values (1);
|
||||
show tables;
|
||||
Tables_in_test
|
||||
t-1
|
||||
flush tables;
|
||||
convert table files in mysql 5.0 file name encoding
|
||||
create table `#mysql50#t-1` (a int) engine=myisam;
|
||||
insert into `#mysql50#t-1` values (1);
|
||||
show tables;
|
||||
Tables_in_test
|
||||
#mysql50#t-1
|
||||
create table `t-1` (a int);
|
||||
ERROR 42S01: Table '#mysql50#t-1' already exists
|
||||
show tables;
|
||||
Tables_in_test
|
||||
#mysql50#t-1
|
||||
t-1
|
||||
select * from `t-1`;
|
||||
a
|
||||
select * from `#mysql50#t-1`;
|
||||
a
|
||||
1
|
||||
drop table `t-1`;
|
||||
create table t1 (a int);
|
||||
alter table t1 rename `t-1`;
|
||||
ERROR 42S01: Table '#mysql50#t-1' already exists
|
||||
show tables;
|
||||
Tables_in_test
|
||||
#mysql50#t-1
|
||||
t-1
|
||||
drop table `t-1`;
|
||||
create table t1 (a int);
|
||||
rename table t1 to `t-1`;
|
||||
ERROR 42S01: Table '#mysql50#t-1' already exists
|
||||
drop table `#mysql50#t-1`, t1;
|
||||
show tables;
|
||||
Tables_in_test
|
||||
#mysql50#t-1
|
||||
t-1
|
||||
drop table `#mysql50#t-1`, `t-1`;
|
||||
|
||||
End of 5.1 tests
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue