merge from 5.5 main
This commit is contained in:
commit
d1eb81f6ab
@ -846,12 +846,19 @@ static int process_options(int argc, char *argv[], char *operation)
|
||||
{
|
||||
i= (int)strlength(opt_basedir);
|
||||
if (opt_basedir[i-1] != FN_LIBCHAR || opt_basedir[i-1] != FN_LIBCHAR2)
|
||||
{
|
||||
char buff[FN_REFLEN];
|
||||
|
||||
strncpy(buff, opt_basedir, sizeof(buff) - 1);
|
||||
#ifdef __WIN__
|
||||
if (opt_basedir[i-1] != '/')
|
||||
strcat(opt_basedir, "//");
|
||||
strncat(buff, "/", sizeof(buff) - strlen(buff) - 1);
|
||||
#else
|
||||
strcat(opt_basedir, FN_DIRSEP);
|
||||
strncat(buff, FN_DIRSEP, sizeof(buff) - strlen(buff) - 1);
|
||||
#endif
|
||||
buff[sizeof(buff) - 1]= 0;
|
||||
my_delete(opt_basedir, MYF(0));
|
||||
opt_basedir= my_strdup(buff, MYF(MY_FAE));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1157,10 +1164,13 @@ static int bootstrap_server(char *server_path, char *bootstrap_file)
|
||||
|
||||
#ifdef __WIN__
|
||||
char *format_str= 0;
|
||||
char *verbose_str= "";
|
||||
const char *verbose_str= NULL;
|
||||
|
||||
|
||||
if (opt_verbose)
|
||||
strcat(verbose_str, "--console");
|
||||
verbose_str= "--console";
|
||||
else
|
||||
verbose_str= "";
|
||||
if (has_spaces(opt_datadir) || has_spaces(opt_basedir) ||
|
||||
has_spaces(bootstrap_file))
|
||||
format_str= "\"%s %s --bootstrap --datadir=%s --basedir=%s < %s\"";
|
||||
|
@ -94,8 +94,8 @@ ENDIF()
|
||||
IF(NOT CPACK_SOURCE_PACKAGE_FILE_NAME)
|
||||
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "mysql-${VERSION}")
|
||||
ENDIF()
|
||||
SET(CPACK_PACKAGE_CONTACT "MySQL Build Team <build@mysql.com>")
|
||||
SET(CPACK_PACKAGE_VENDOR "Sun Microsystems, Inc")
|
||||
SET(CPACK_PACKAGE_CONTACT "MySQL Release Engineering <mysql-build@oss.oracle.com>")
|
||||
SET(CPACK_PACKAGE_VENDOR "Oracle Corporation")
|
||||
SET(CPACK_SOURCE_GENERATOR "TGZ")
|
||||
INCLUDE(cpack_source_ignore_files)
|
||||
|
||||
|
@ -196,6 +196,10 @@ MACRO(MYSQL_ADD_PLUGIN)
|
||||
# Install dynamic library
|
||||
MYSQL_INSTALL_TARGETS(${target} DESTINATION ${INSTALL_PLUGINDIR} COMPONENT Server)
|
||||
INSTALL_DEBUG_TARGET(${target} DESTINATION ${INSTALL_PLUGINDIR}/debug)
|
||||
# Add installed files to list for RPMs
|
||||
FILE(APPEND ${CMAKE_BINARY_DIR}/support-files/plugins.files
|
||||
"%attr(755, root, root) %{_prefix}/${INSTALL_PLUGINDIR}/${ARG_MODULE_OUTPUT_NAME}.so\n"
|
||||
"%attr(755, root, root) %{_prefix}/${INSTALL_PLUGINDIR}/debug/${ARG_MODULE_OUTPUT_NAME}.so\n")
|
||||
# For internal testing in PB2, append collections files
|
||||
IF(DEFINED ENV{PB2WORKDIR})
|
||||
PLUGIN_APPEND_COLLECTIONS(${plugin})
|
||||
|
@ -71,7 +71,7 @@ typedef struct st_mysql_xid MYSQL_XID;
|
||||
Plugin API. Common for all plugin types.
|
||||
*/
|
||||
|
||||
#define MYSQL_PLUGIN_INTERFACE_VERSION 0x0102
|
||||
#define MYSQL_PLUGIN_INTERFACE_VERSION 0x0103
|
||||
|
||||
/*
|
||||
The allowable types of plugins
|
||||
@ -120,7 +120,7 @@ __MYSQL_DECLARE_PLUGIN(NAME, \
|
||||
builtin_ ## NAME ## _sizeof_struct_st_plugin, \
|
||||
builtin_ ## NAME ## _plugin)
|
||||
|
||||
#define mysql_declare_plugin_end ,{0,0,0,0,0,0,0,0,0,0,0,0}}
|
||||
#define mysql_declare_plugin_end ,{0,0,0,0,0,0,0,0,0,0,0,0,0}}
|
||||
|
||||
/*
|
||||
declarations for SHOW STATUS support in plugins
|
||||
@ -143,6 +143,14 @@ struct st_mysql_show_var {
|
||||
typedef int (*mysql_show_var_func)(MYSQL_THD, struct st_mysql_show_var*, char *);
|
||||
|
||||
|
||||
/*
|
||||
Constants for plugin flags.
|
||||
*/
|
||||
|
||||
#define PLUGIN_OPT_NO_INSTALL 1UL /* Not dynamically loadable */
|
||||
#define PLUGIN_OPT_NO_UNINSTALL 2UL /* Not dynamically unloadable */
|
||||
|
||||
|
||||
/*
|
||||
declarations for server variables and command line options
|
||||
*/
|
||||
@ -415,6 +423,7 @@ struct st_mysql_plugin
|
||||
struct st_mysql_show_var *status_vars;
|
||||
struct st_mysql_sys_var **system_vars;
|
||||
void * __reserved1; /* reserved for dependency checking */
|
||||
unsigned long flags; /* flags for plugin */
|
||||
};
|
||||
|
||||
/*************************************************************************
|
||||
|
@ -101,6 +101,7 @@ struct st_mysql_plugin
|
||||
struct st_mysql_show_var *status_vars;
|
||||
struct st_mysql_sys_var **system_vars;
|
||||
void * __reserved1;
|
||||
unsigned long flags;
|
||||
};
|
||||
#include "plugin_ftparser.h"
|
||||
#include "plugin.h"
|
||||
|
@ -101,6 +101,7 @@ struct st_mysql_plugin
|
||||
struct st_mysql_show_var *status_vars;
|
||||
struct st_mysql_sys_var **system_vars;
|
||||
void * __reserved1;
|
||||
unsigned long flags;
|
||||
};
|
||||
#include "plugin_ftparser.h"
|
||||
#include "plugin.h"
|
||||
|
@ -43,7 +43,7 @@ typedef enum _thd_wait_type_e {
|
||||
THD_WAIT_BINLOG= 8,
|
||||
THD_WAIT_GROUP_COMMIT= 9,
|
||||
THD_WAIT_SYNC= 10,
|
||||
THD_WAIT_LAST= 11
|
||||
THD_WAIT_LAST= 11
|
||||
} thd_wait_type;
|
||||
extern struct thd_wait_service_st {
|
||||
void (*thd_wait_begin_func)(void*, int);
|
||||
@ -101,6 +101,7 @@ struct st_mysql_plugin
|
||||
struct st_mysql_show_var *status_vars;
|
||||
struct st_mysql_sys_var **system_vars;
|
||||
void * __reserved1;
|
||||
unsigned long flags;
|
||||
};
|
||||
#include "plugin_ftparser.h"
|
||||
struct st_mysql_daemon
|
||||
|
@ -22,6 +22,24 @@ template <> void error_log_print<error_log_level::INFO>(const char *fmt, ...);
|
||||
template <> void error_log_print<error_log_level::WARNING>(const char *fmt, ...);
|
||||
template <> void error_log_print<error_log_level::ERROR>(const char *fmt, ...);
|
||||
|
||||
/**
|
||||
Option indicating desired level of logging. Values:
|
||||
|
||||
0 - no logging
|
||||
1 - log only error messages
|
||||
2 - additionally log warnings
|
||||
3 - additionally log info notes
|
||||
4 - also log debug messages
|
||||
|
||||
Value of this option should be taken into account in the
|
||||
implementation of error_log_vprint() function (see
|
||||
log_client.cc).
|
||||
|
||||
Note: No error or debug messages are logged in production code
|
||||
(see logging macros in common.h).
|
||||
*/
|
||||
int opt_auth_win_log_level= 2;
|
||||
|
||||
|
||||
/** Connection class **************************************************/
|
||||
|
||||
|
@ -41,13 +41,15 @@ struct error_log_level
|
||||
typedef enum {INFO, WARNING, ERROR} type;
|
||||
};
|
||||
|
||||
extern "C" int opt_auth_win_log_level;
|
||||
unsigned int get_log_level(void);
|
||||
void set_log_level(unsigned int);
|
||||
|
||||
|
||||
/*
|
||||
If DEBUG_ERROR_LOG is defined then error logging happens only
|
||||
in debug-copiled code. Otherwise ERROR_LOG() expands to
|
||||
error_log_print() even in production code. Note that in client
|
||||
plugin, error_log_print() will print nothing if opt_auth_win_clinet_log
|
||||
is 0.
|
||||
error_log_print() even in production code.
|
||||
|
||||
Note: Macro ERROR_LOG() can use printf-like format string like this:
|
||||
|
||||
@ -57,8 +59,6 @@ struct error_log_level
|
||||
to fprintf() (see error_log_vprint() function).
|
||||
*/
|
||||
|
||||
extern "C" int opt_auth_win_client_log;
|
||||
|
||||
#if defined(DEBUG_ERROR_LOG) && defined(DBUG_OFF)
|
||||
#define ERROR_LOG(Level, Msg) do {} while (0)
|
||||
#else
|
||||
@ -67,7 +67,7 @@ extern "C" int opt_auth_win_client_log;
|
||||
|
||||
|
||||
void error_log_vprint(error_log_level::type level,
|
||||
const char *fmt, va_list args);
|
||||
const char *fmt, va_list args);
|
||||
|
||||
template <error_log_level::type Level>
|
||||
void error_log_print(const char *fmt, ...)
|
||||
@ -96,7 +96,7 @@ const char* get_last_error_message(Error_message_buf);
|
||||
|
||||
#define DBUG_PRINT_DO(Keyword, Msg) \
|
||||
do { \
|
||||
if (2 > opt_auth_win_client_log) break; \
|
||||
if (4 > get_log_level()) break; \
|
||||
fprintf(stderr, "winauth: %s: ", Keyword); \
|
||||
debug_msg Msg; \
|
||||
} while (0)
|
||||
|
@ -323,13 +323,13 @@ int win_auth_handshake_client(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql)
|
||||
int opt_val= opt ? atoi(opt) : 0;
|
||||
if (opt && !opt_val)
|
||||
{
|
||||
if (!strncasecmp("on", opt, 2)) opt_val= 1;
|
||||
if (!strncasecmp("yes", opt, 3)) opt_val= 1;
|
||||
if (!strncasecmp("true", opt, 4)) opt_val= 1;
|
||||
if (!strncasecmp("debug", opt, 5)) opt_val= 2;
|
||||
if (!strncasecmp("dbug", opt, 4)) opt_val= 2;
|
||||
if (!strncasecmp("on", opt, 2)) opt_val= 2;
|
||||
if (!strncasecmp("yes", opt, 3)) opt_val= 2;
|
||||
if (!strncasecmp("true", opt, 4)) opt_val= 2;
|
||||
if (!strncasecmp("debug", opt, 5)) opt_val= 4;
|
||||
if (!strncasecmp("dbug", opt, 4)) opt_val= 4;
|
||||
}
|
||||
opt_auth_win_client_log= opt_val;
|
||||
set_log_level(opt_val);
|
||||
}
|
||||
|
||||
ERROR_LOG(INFO, ("Authentication handshake for account %s", mysql->user));
|
||||
|
@ -16,36 +16,32 @@
|
||||
#include <my_global.h>
|
||||
#include "common.h"
|
||||
|
||||
/**
|
||||
This option is set in win_auth_handshake_client() function
|
||||
in handshake_client.cc.
|
||||
|
||||
Values:
|
||||
0 - no logging
|
||||
1 - log error/warning/info messages
|
||||
2 - also log debug messages
|
||||
|
||||
Note: No error or debug messages are logged in production code
|
||||
(see logging macros in common.h).
|
||||
*/
|
||||
int opt_auth_win_client_log= 0;
|
||||
|
||||
|
||||
// Client-side logging function
|
||||
|
||||
void error_log_vprint(error_log_level::type level,
|
||||
const char *fmt, va_list args)
|
||||
{
|
||||
if (0 == opt_auth_win_client_log)
|
||||
return;
|
||||
|
||||
const char *level_string= "";
|
||||
int log_level= get_log_level();
|
||||
|
||||
switch (level)
|
||||
{
|
||||
case error_log_level::INFO: level_string= "Note"; break;
|
||||
case error_log_level::WARNING: level_string= "Warning"; break;
|
||||
case error_log_level::ERROR: level_string= "ERROR"; break;
|
||||
case error_log_level::INFO:
|
||||
if (3 > log_level)
|
||||
return;
|
||||
level_string= "Note";
|
||||
break;
|
||||
case error_log_level::WARNING:
|
||||
if (2 > log_level)
|
||||
return;
|
||||
level_string= "Warning";
|
||||
break;
|
||||
case error_log_level::ERROR:
|
||||
if (1 > log_level)
|
||||
return;
|
||||
level_string= "ERROR";
|
||||
break;
|
||||
}
|
||||
|
||||
fprintf(stderr, "Windows Authentication Plugin %s: ", level_string);
|
||||
@ -53,3 +49,17 @@ void error_log_vprint(error_log_level::type level,
|
||||
fputc('\n', stderr);
|
||||
fflush(stderr);
|
||||
}
|
||||
|
||||
|
||||
// Trivial implementation of log-level setting storage.
|
||||
|
||||
void set_log_level(unsigned int level)
|
||||
{
|
||||
opt_auth_win_log_level= level;
|
||||
}
|
||||
|
||||
|
||||
unsigned int get_log_level(void)
|
||||
{
|
||||
return opt_auth_win_log_level;
|
||||
}
|
||||
|
@ -455,8 +455,9 @@ sub main {
|
||||
#
|
||||
read_plugin_defs("include/plugin.defs");
|
||||
|
||||
# Also read from any plugin local plugin.defs
|
||||
for (glob "$basedir/plugin/*/tests/mtr/plugin.defs") {
|
||||
# Also read from any plugin local or suite specific plugin.defs
|
||||
for (glob "$basedir/plugin/*/tests/mtr/plugin.defs".
|
||||
" suite/*/plugin.defs") {
|
||||
read_plugin_defs($_);
|
||||
}
|
||||
|
||||
|
@ -29,4 +29,14 @@ SET lc_messages=cs_CZ;
|
||||
SET NAMES UTF8;
|
||||
USE nonexistant;
|
||||
ERROR 42000: Nezn-Bámá databáze 'nonexistant'
|
||||
End of 5.4 tests
|
||||
#
|
||||
# Bug#12736295: Buffer overflow for variable converted_err
|
||||
# with non-latin1 server error message
|
||||
#
|
||||
# Connection con1
|
||||
SET lc_messages=ru_RU;
|
||||
SET NAMES latin1;
|
||||
SELECT '01234567890123456789012345678901234\';
|
||||
ERROR 42000: \0423 \0432\0430\0441 \043E\0448\0438\0431\043A\0430 \0432 \0437\0430\043F\0440\043E\0441\0435. \0418\0437\0443\0447\0438\0442\0435 \0434\043E\043A\0443\043C\0435\043D\0442\0430\0446\0438\044E \043F\043E \0438\0441\043F\043E\043B\044C\0437\0443\0435\043C\043E\0439 \0432\0435\0440\0441\0438\0438 MySQL \043D\0430 \043F\0440\0435\0434\043C\0435\0442 \043A\043E\0440\0440\0435\043A\0442\043D\043E\0433\043E \0441\0438\043D\0442\0430\043A\0441\0438\0441\0430 \043E\043A\043E\043B\043E ''012345678901234567890123456
|
||||
# Connection default
|
||||
End of 5.5 tests
|
||||
|
@ -2415,5 +2415,25 @@ HEX(s1)
|
||||
00000061
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #12319710 : INVALID MEMORY READ AND/OR CRASH IN
|
||||
# MY_UCA_CHARCMP WITH UTF32
|
||||
#
|
||||
SET collation_connection=utf32_unicode_ci;
|
||||
CREATE TABLE t1 (a TEXT CHARACTER SET utf32 COLLATE utf32_turkish_ci NOT NULL);
|
||||
INSERT INTO t1 VALUES ('a'), ('b');
|
||||
CREATE TABLE t2 (b VARBINARY(5) NOT NULL);
|
||||
#insert chars outside of BMP
|
||||
INSERT INTO t2 VALUEs (0x082837),(0x082837);
|
||||
#test for read-out-of-bounds with non-BMP chars as a LIKE pattern
|
||||
SELECT * FROM t1,t2 WHERE a LIKE b;
|
||||
a b
|
||||
#test the original statement
|
||||
SELECT 1 FROM t1 AS t1_0 NATURAL LEFT OUTER JOIN t2 AS t2_0
|
||||
RIGHT JOIN t1 AS t1_1 ON t1_0.a LIKE t2_0.b;
|
||||
1
|
||||
1
|
||||
1
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
# End of 5.5 tests
|
||||
#
|
||||
|
@ -1665,6 +1665,13 @@ a 1
|
||||
3 1
|
||||
2 1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#11765255 58201:
|
||||
# VALGRIND/CRASH WHEN ORDERING BY MULTIPLE AGGREGATE FUNCTIONS
|
||||
#
|
||||
select 1 order by max(1) + min(1);
|
||||
1
|
||||
1
|
||||
End of 5.1 tests
|
||||
#
|
||||
# Bug #38745: MySQL 5.1 optimizer uses filesort for ORDER BY
|
||||
|
@ -44,7 +44,7 @@ ERROR 28000: Access denied for user 'plug'@'localhost' (using password: YES)
|
||||
## test correct default plugin
|
||||
select USER(),CURRENT_USER();
|
||||
USER() CURRENT_USER()
|
||||
plug@localhost plug@%
|
||||
plug@localhost plug_dest@%
|
||||
## test no_auto_create_user sql mode with plugin users
|
||||
SET @@sql_mode=no_auto_create_user;
|
||||
GRANT INSERT ON TEST.* TO grant_user IDENTIFIED WITH 'test_plugin_server';
|
||||
@ -462,4 +462,24 @@ CREATE USER bug12610784@localhost;
|
||||
SET PASSWORD FOR bug12610784@localhost = PASSWORD('secret');
|
||||
ERROR 28000: Access denied for user 'bug12610784'@'localhost' (using password: NO)
|
||||
DROP USER bug12610784@localhost;
|
||||
#
|
||||
# Bug #12818542: PAM: ADDING PASSWORD FOR AN ACCOUNT DISABLES PAM
|
||||
# AUTHENTICATION SETTINGS
|
||||
#
|
||||
CREATE USER bug12818542@localhost
|
||||
IDENTIFIED WITH 'test_plugin_server' AS 'bug12818542_dest';
|
||||
CREATE USER bug12818542_dest@localhost
|
||||
IDENTIFIED BY 'bug12818542_dest_passwd';
|
||||
GRANT PROXY ON bug12818542_dest@localhost TO bug12818542@localhost;
|
||||
SELECT USER(),CURRENT_USER();
|
||||
USER() CURRENT_USER()
|
||||
bug12818542@localhost bug12818542_dest@localhost
|
||||
SET PASSWORD = PASSWORD('bruhaha');
|
||||
Warnings:
|
||||
Note 1699 SET PASSWORD has no significance for users authenticating via plugins
|
||||
SELECT USER(),CURRENT_USER();
|
||||
USER() CURRENT_USER()
|
||||
bug12818542@localhost bug12818542_dest@localhost
|
||||
DROP USER bug12818542@localhost;
|
||||
DROP USER bug12818542_dest@localhost;
|
||||
End of 5.5 tests
|
||||
|
@ -1717,6 +1717,22 @@ ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function
|
||||
DROP PROCEDURE p1;
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#12428824 - PARSER STACK OVERFLOW AND CRASH IN SP_ADD_USED_ROUTINE
|
||||
# WITH OBSCURE QUERY
|
||||
#
|
||||
SELECT very_long_fn_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222225555555555555555555555555577777777777777777777777777777777777777777777777777777777777777777777777788888888999999999999999999999();
|
||||
ERROR 42000: Identifier name 'very_long_fn_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222' is too long
|
||||
CALL very_long_pr_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222225555555555555555555555555577777777777777777777777777777777777777777777777777777777777777777777777788888888999999999999999999999();
|
||||
ERROR 42000: Identifier name 'very_long_pr_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222' is too long
|
||||
SELECT very_long_db_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222225555555555555555555555555577777777777777777777777777777777777777777777777777777777777777777777777788888888999999999999999999999.simple_func();
|
||||
ERROR 42000: Incorrect database name 'very_long_db_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222'
|
||||
CALL very_long_db_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222225555555555555555555555555577777777777777777777777777777777777777777777777777777777777777777777777788888888999999999999999999999.simple_proc();
|
||||
ERROR 42000: Incorrect database name 'very_long_db_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222'
|
||||
SELECT db_name.very_long_fn_name_111111111111111111111111111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999999999999999999();
|
||||
ERROR 42000: Identifier name 'very_long_fn_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222' is too long
|
||||
CALL db_name.very_long_pr_name_111111111111111111111111111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999999999999999999();
|
||||
ERROR 42000: Identifier name 'very_long_pr_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222' is too long
|
||||
End of 5.1 tests
|
||||
#
|
||||
# Bug#23032: Handlers declared in a SP do not handle warnings generated in sub-SP
|
||||
|
@ -7162,6 +7162,21 @@ SET @@GLOBAL.init_connect= @old_init_connect;
|
||||
DROP PROCEDURE p2;
|
||||
DROP PROCEDURE p5;
|
||||
#
|
||||
# Bug#11840395 (formerly known as bug#60347):
|
||||
# The string "versiondata" seems
|
||||
# to be 'leaking' into the schema name space
|
||||
#
|
||||
DROP DATABASE IF EXISTS mixedCaseDbName;
|
||||
CREATE DATABASE mixedCaseDbName;
|
||||
CREATE PROCEDURE mixedCaseDbName.tryMyProc() begin end|
|
||||
CREATE FUNCTION mixedCaseDbName.tryMyFunc() returns text begin return 'IT WORKS'; end
|
||||
|
|
||||
call mixedCaseDbName.tryMyProc();
|
||||
select mixedCaseDbName.tryMyFunc();
|
||||
mixedCaseDbName.tryMyFunc()
|
||||
IT WORKS
|
||||
DROP DATABASE mixedCaseDbName;
|
||||
#
|
||||
# Bug#11766594 59736: SELECT DISTINCT.. INCORRECT RESULT WITH DETERMINISTIC FUNCTION IN WHERE C
|
||||
#
|
||||
CREATE TABLE t1 (a INT, b INT, KEY(b));
|
||||
|
@ -431,4 +431,19 @@ SELECT f1 FROM t1;
|
||||
f1
|
||||
-1.79769313486231e308
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#12406055 BUFFER OVERFLOW OF VARIABLE 'BUFF' IN STRING::SET_REAL
|
||||
#
|
||||
# Ignoring output from misc. float operations
|
||||
select format(-1.7976931348623157E+307,256) as foo;
|
||||
select least(-1.1111111111111111111111111,
|
||||
- group_concat(1.7976931348623157E+308)) as foo;
|
||||
select concat((truncate((-1.7976931348623157E+307),(0x1e))),
|
||||
(99999999999999999999999999999999999999999999999999999999999999999)) into @a;
|
||||
End of 5.0 tests
|
||||
#
|
||||
# Bug#12368853 FORMAT() CRASHES WITH LARGE NUMBERS AFTER TRUNCATE...
|
||||
#
|
||||
select format(truncate('1.7976931348623157E+308',-12),1,'fr_BE') as foo;
|
||||
foo
|
||||
0
|
||||
|
@ -1643,6 +1643,63 @@ b
|
||||
1
|
||||
2
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
# Bug#11765255 58201:
|
||||
# VALGRIND/CRASH WHEN ORDERING BY MULTIPLE AGGREGATE FUNCTIONS
|
||||
#
|
||||
select 1 as foo
|
||||
union
|
||||
select 2
|
||||
union
|
||||
select 3
|
||||
union
|
||||
select 4
|
||||
order by max(42) + max(1) + max(1) + max(1) + max(1) + max(1)
|
||||
;
|
||||
foo
|
||||
1
|
||||
prepare stmt1 from 'select 1 as foo
|
||||
union
|
||||
select 2
|
||||
union
|
||||
select 3
|
||||
union
|
||||
select 4
|
||||
order by max(42) + max(1) + max(1) + max(1) + max(1) + max(1)
|
||||
';
|
||||
execute stmt1;
|
||||
foo
|
||||
1
|
||||
execute stmt1;
|
||||
foo
|
||||
1
|
||||
select 1 as foo
|
||||
union
|
||||
select 2
|
||||
union
|
||||
select 3
|
||||
union
|
||||
(select 4)
|
||||
order by max(42) + max(1) + max(1) + max(1) + max(1) + max(1)
|
||||
;
|
||||
foo
|
||||
1
|
||||
prepare stmt1 from 'select 1 as foo
|
||||
union
|
||||
select 2
|
||||
union
|
||||
select 3
|
||||
union
|
||||
(select 4)
|
||||
order by max(42) + max(1) + max(1) + max(1) + max(1) + max(1)
|
||||
';
|
||||
execute stmt1;
|
||||
foo
|
||||
1
|
||||
execute stmt1;
|
||||
foo
|
||||
1
|
||||
deallocate prepare stmt1;
|
||||
End of 5.1 tests
|
||||
#
|
||||
# Bug#57986 ORDER BY clause is not used after a UNION,
|
||||
|
@ -39,6 +39,81 @@ DELETE FROM t1_purge;
|
||||
DELETE FROM t2_purge;
|
||||
DELETE FROM t3_purge;
|
||||
DELETE FROM t4_purge;
|
||||
SET @r=REPEAT('a',500);
|
||||
CREATE TABLE t12637786(a INT,
|
||||
v1 VARCHAR(500), v2 VARCHAR(500), v3 VARCHAR(500),
|
||||
v4 VARCHAR(500), v5 VARCHAR(500), v6 VARCHAR(500),
|
||||
v7 VARCHAR(500), v8 VARCHAR(500), v9 VARCHAR(500),
|
||||
v10 VARCHAR(500), v11 VARCHAR(500), v12 VARCHAR(500),
|
||||
v13 VARCHAR(500), v14 VARCHAR(500), v15 VARCHAR(500),
|
||||
v16 VARCHAR(500), v17 VARCHAR(500), v18 VARCHAR(500)
|
||||
) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
|
||||
CREATE INDEX idx1 ON t12637786(a,v1);
|
||||
INSERT INTO t12637786 VALUES(9,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
|
||||
UPDATE t12637786 SET a=1000;
|
||||
DELETE FROM t12637786;
|
||||
create table t12963823(a blob,b blob,c blob,d blob,e blob,f blob,g blob,h blob,
|
||||
i blob,j blob,k blob,l blob,m blob,n blob,o blob,p blob)
|
||||
engine=innodb row_format=dynamic;
|
||||
SET @r = repeat('a', 767);
|
||||
insert into t12963823 values (@r,@r,@r,@r, @r,@r,@r,@r, @r,@r,@r,@r, @r,@r,@r,@r);
|
||||
create index ndx_a on t12963823 (a(500));
|
||||
create index ndx_b on t12963823 (b(500));
|
||||
create index ndx_c on t12963823 (c(500));
|
||||
create index ndx_d on t12963823 (d(500));
|
||||
create index ndx_e on t12963823 (e(500));
|
||||
create index ndx_f on t12963823 (f(500));
|
||||
create index ndx_k on t12963823 (k(500));
|
||||
create index ndx_l on t12963823 (l(500));
|
||||
SET @r = repeat('b', 500);
|
||||
update t12963823 set a=@r,b=@r,c=@r,d=@r;
|
||||
update t12963823 set e=@r,f=@r,g=@r,h=@r;
|
||||
update t12963823 set i=@r,j=@r,k=@r,l=@r;
|
||||
update t12963823 set m=@r,n=@r,o=@r,p=@r;
|
||||
alter table t12963823 drop index ndx_a;
|
||||
alter table t12963823 drop index ndx_b;
|
||||
create index ndx_g on t12963823 (g(500));
|
||||
create index ndx_h on t12963823 (h(500));
|
||||
create index ndx_i on t12963823 (i(500));
|
||||
create index ndx_j on t12963823 (j(500));
|
||||
create index ndx_m on t12963823 (m(500));
|
||||
create index ndx_n on t12963823 (n(500));
|
||||
create index ndx_o on t12963823 (o(500));
|
||||
create index ndx_p on t12963823 (p(500));
|
||||
show create table t12963823;
|
||||
Table Create Table
|
||||
t12963823 CREATE TABLE `t12963823` (
|
||||
`a` blob,
|
||||
`b` blob,
|
||||
`c` blob,
|
||||
`d` blob,
|
||||
`e` blob,
|
||||
`f` blob,
|
||||
`g` blob,
|
||||
`h` blob,
|
||||
`i` blob,
|
||||
`j` blob,
|
||||
`k` blob,
|
||||
`l` blob,
|
||||
`m` blob,
|
||||
`n` blob,
|
||||
`o` blob,
|
||||
`p` blob,
|
||||
KEY `ndx_c` (`c`(500)),
|
||||
KEY `ndx_d` (`d`(500)),
|
||||
KEY `ndx_e` (`e`(500)),
|
||||
KEY `ndx_f` (`f`(500)),
|
||||
KEY `ndx_k` (`k`(500)),
|
||||
KEY `ndx_l` (`l`(500)),
|
||||
KEY `ndx_g` (`g`(500)),
|
||||
KEY `ndx_h` (`h`(500)),
|
||||
KEY `ndx_i` (`i`(500)),
|
||||
KEY `ndx_j` (`j`(500)),
|
||||
KEY `ndx_m` (`m`(500)),
|
||||
KEY `ndx_n` (`n`(500)),
|
||||
KEY `ndx_o` (`o`(500)),
|
||||
KEY `ndx_p` (`p`(500))
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
|
||||
set global innodb_file_per_table=0;
|
||||
set global innodb_file_format=Antelope;
|
||||
create table t1(a int not null, b int, c char(10) not null, d varchar(20)) engine = innodb;
|
||||
@ -961,20 +1036,6 @@ ERROR HY000: Too big row
|
||||
alter table t1 row_format=compact;
|
||||
create index t1u on t1 (u(767));
|
||||
drop table t1;
|
||||
SET @r=REPEAT('a',500);
|
||||
CREATE TABLE t1(a INT,
|
||||
v1 VARCHAR(500), v2 VARCHAR(500), v3 VARCHAR(500),
|
||||
v4 VARCHAR(500), v5 VARCHAR(500), v6 VARCHAR(500),
|
||||
v7 VARCHAR(500), v8 VARCHAR(500), v9 VARCHAR(500),
|
||||
v10 VARCHAR(500), v11 VARCHAR(500), v12 VARCHAR(500),
|
||||
v13 VARCHAR(500), v14 VARCHAR(500), v15 VARCHAR(500),
|
||||
v16 VARCHAR(500), v17 VARCHAR(500), v18 VARCHAR(500)
|
||||
) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
|
||||
CREATE INDEX idx1 ON t1(a,v1);
|
||||
INSERT INTO t1 VALUES(9,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
|
||||
UPDATE t1 SET a=1000;
|
||||
DELETE FROM t1;
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE bug12547647(
|
||||
a INT NOT NULL, b BLOB NOT NULL, c TEXT,
|
||||
PRIMARY KEY (b(10), a), INDEX (c(767)), INDEX(b(767))
|
||||
@ -1155,3 +1216,5 @@ SELECT SLEEP(10);
|
||||
SLEEP(10)
|
||||
0
|
||||
DROP TABLE t1_purge, t2_purge, t3_purge, t4_purge;
|
||||
DROP TABLE t12637786;
|
||||
DROP TABLE t12963823;
|
||||
|
@ -9,7 +9,7 @@ let $format=`select @@innodb_file_format`;
|
||||
set global innodb_file_per_table=on;
|
||||
set global innodb_file_format='Barracuda';
|
||||
|
||||
# Test an assertion failure on purge.
|
||||
# Bug #12429576 - Test an assertion failure on purge.
|
||||
CREATE TABLE t1_purge (
|
||||
A INT,
|
||||
B BLOB, C BLOB, D BLOB, E BLOB,
|
||||
@ -59,6 +59,68 @@ DELETE FROM t1_purge;
|
||||
DELETE FROM t2_purge;
|
||||
DELETE FROM t3_purge;
|
||||
DELETE FROM t4_purge;
|
||||
# Instead of doing a --sleep 10, wait until the rest of the tests in
|
||||
# this file complete before dropping the tables. By then, the purge thread
|
||||
# will have delt with the updates above.
|
||||
|
||||
# Bug#12637786 - Bad assert by purge thread for records with external data
|
||||
# used in secondary indexes.
|
||||
SET @r=REPEAT('a',500);
|
||||
CREATE TABLE t12637786(a INT,
|
||||
v1 VARCHAR(500), v2 VARCHAR(500), v3 VARCHAR(500),
|
||||
v4 VARCHAR(500), v5 VARCHAR(500), v6 VARCHAR(500),
|
||||
v7 VARCHAR(500), v8 VARCHAR(500), v9 VARCHAR(500),
|
||||
v10 VARCHAR(500), v11 VARCHAR(500), v12 VARCHAR(500),
|
||||
v13 VARCHAR(500), v14 VARCHAR(500), v15 VARCHAR(500),
|
||||
v16 VARCHAR(500), v17 VARCHAR(500), v18 VARCHAR(500)
|
||||
) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
|
||||
CREATE INDEX idx1 ON t12637786(a,v1);
|
||||
INSERT INTO t12637786 VALUES(9,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
|
||||
UPDATE t12637786 SET a=1000;
|
||||
DELETE FROM t12637786;
|
||||
# We need to activate the purge thread at this point to make sure it does not
|
||||
# assert and is able to clean up the old versions of secondary index entries.
|
||||
# But instead of doing a --sleep 10, wait until the rest of the tests in
|
||||
# this file complete before dropping the table. By then, the purge thread
|
||||
# will have delt with the updates above.
|
||||
|
||||
# Bug#12963823 - Test that the purge thread does not crash when
|
||||
# the number of indexes has changed since the UNDO record was logged.
|
||||
create table t12963823(a blob,b blob,c blob,d blob,e blob,f blob,g blob,h blob,
|
||||
i blob,j blob,k blob,l blob,m blob,n blob,o blob,p blob)
|
||||
engine=innodb row_format=dynamic;
|
||||
SET @r = repeat('a', 767);
|
||||
insert into t12963823 values (@r,@r,@r,@r, @r,@r,@r,@r, @r,@r,@r,@r, @r,@r,@r,@r);
|
||||
create index ndx_a on t12963823 (a(500));
|
||||
create index ndx_b on t12963823 (b(500));
|
||||
create index ndx_c on t12963823 (c(500));
|
||||
create index ndx_d on t12963823 (d(500));
|
||||
create index ndx_e on t12963823 (e(500));
|
||||
create index ndx_f on t12963823 (f(500));
|
||||
create index ndx_k on t12963823 (k(500));
|
||||
create index ndx_l on t12963823 (l(500));
|
||||
|
||||
SET @r = repeat('b', 500);
|
||||
update t12963823 set a=@r,b=@r,c=@r,d=@r;
|
||||
update t12963823 set e=@r,f=@r,g=@r,h=@r;
|
||||
update t12963823 set i=@r,j=@r,k=@r,l=@r;
|
||||
update t12963823 set m=@r,n=@r,o=@r,p=@r;
|
||||
alter table t12963823 drop index ndx_a;
|
||||
alter table t12963823 drop index ndx_b;
|
||||
create index ndx_g on t12963823 (g(500));
|
||||
create index ndx_h on t12963823 (h(500));
|
||||
create index ndx_i on t12963823 (i(500));
|
||||
create index ndx_j on t12963823 (j(500));
|
||||
create index ndx_m on t12963823 (m(500));
|
||||
create index ndx_n on t12963823 (n(500));
|
||||
create index ndx_o on t12963823 (o(500));
|
||||
create index ndx_p on t12963823 (p(500));
|
||||
show create table t12963823;
|
||||
# We need to activate the purge thread at this point to see if it crashes
|
||||
# but instead of doing a --sleep 10, wait until the rest of the tests in
|
||||
# this file complete before dropping the table. By then, the purge thread
|
||||
# will have delt with the updates above.
|
||||
|
||||
|
||||
eval set global innodb_file_per_table=$per_table;
|
||||
eval set global innodb_file_format=$format;
|
||||
@ -459,24 +521,6 @@ create index t1u on t1 (u(767));
|
||||
|
||||
drop table t1;
|
||||
|
||||
# Bug#12637786
|
||||
SET @r=REPEAT('a',500);
|
||||
CREATE TABLE t1(a INT,
|
||||
v1 VARCHAR(500), v2 VARCHAR(500), v3 VARCHAR(500),
|
||||
v4 VARCHAR(500), v5 VARCHAR(500), v6 VARCHAR(500),
|
||||
v7 VARCHAR(500), v8 VARCHAR(500), v9 VARCHAR(500),
|
||||
v10 VARCHAR(500), v11 VARCHAR(500), v12 VARCHAR(500),
|
||||
v13 VARCHAR(500), v14 VARCHAR(500), v15 VARCHAR(500),
|
||||
v16 VARCHAR(500), v17 VARCHAR(500), v18 VARCHAR(500)
|
||||
) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
|
||||
CREATE INDEX idx1 ON t1(a,v1);
|
||||
INSERT INTO t1 VALUES(9,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
|
||||
UPDATE t1 SET a=1000;
|
||||
DELETE FROM t1;
|
||||
# Let the purge thread clean up this file.
|
||||
-- sleep 10
|
||||
DROP TABLE t1;
|
||||
|
||||
# Bug#12547647 UPDATE LOGGING COULD EXCEED LOG PAGE SIZE
|
||||
CREATE TABLE bug12547647(
|
||||
a INT NOT NULL, b BLOB NOT NULL, c TEXT,
|
||||
@ -636,6 +680,8 @@ DROP TABLE t1;
|
||||
#this delay is needed because 45225_2 is disabled, to allow the purge to run
|
||||
SELECT SLEEP(10);
|
||||
DROP TABLE t1_purge, t2_purge, t3_purge, t4_purge;
|
||||
DROP TABLE t12637786;
|
||||
DROP TABLE t12963823;
|
||||
|
||||
#
|
||||
# restore environment to the state it was before this test execution
|
||||
|
@ -11,5 +11,7 @@ There should be *no* long test name listed below:
|
||||
select variable_name as `There should be *no* variables listed below:` from t2
|
||||
left join t1 on variable_name=test_name where test_name is null;
|
||||
There should be *no* variables listed below:
|
||||
INNODB_LARGE_PREFIX
|
||||
INNODB_LARGE_PREFIX
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
|
@ -44,4 +44,19 @@ USE nonexistant;
|
||||
disconnect con1;
|
||||
connection default;
|
||||
|
||||
--echo End of 5.4 tests
|
||||
--echo #
|
||||
--echo # Bug#12736295: Buffer overflow for variable converted_err
|
||||
--echo # with non-latin1 server error message
|
||||
--echo #
|
||||
|
||||
connect (con1,localhost,root,,test);
|
||||
--echo # Connection con1
|
||||
SET lc_messages=ru_RU;
|
||||
SET NAMES latin1;
|
||||
--error ER_PARSE_ERROR
|
||||
--query SELECT '01234567890123456789012345678901234\'
|
||||
disconnect con1;
|
||||
--echo # Connection default
|
||||
connection default;
|
||||
|
||||
--echo End of 5.5 tests
|
||||
|
@ -293,6 +293,27 @@ SET collation_connection=utf32_czech_ci;
|
||||
--source include/ctype_czech.inc
|
||||
--source include/ctype_like_ignorable.inc
|
||||
|
||||
--echo #
|
||||
--echo # Bug #12319710 : INVALID MEMORY READ AND/OR CRASH IN
|
||||
--echo # MY_UCA_CHARCMP WITH UTF32
|
||||
--echo #
|
||||
|
||||
SET collation_connection=utf32_unicode_ci;
|
||||
CREATE TABLE t1 (a TEXT CHARACTER SET utf32 COLLATE utf32_turkish_ci NOT NULL);
|
||||
INSERT INTO t1 VALUES ('a'), ('b');
|
||||
CREATE TABLE t2 (b VARBINARY(5) NOT NULL);
|
||||
|
||||
--echo #insert chars outside of BMP
|
||||
INSERT INTO t2 VALUEs (0x082837),(0x082837);
|
||||
|
||||
--echo #test for read-out-of-bounds with non-BMP chars as a LIKE pattern
|
||||
SELECT * FROM t1,t2 WHERE a LIKE b;
|
||||
|
||||
--echo #test the original statement
|
||||
SELECT 1 FROM t1 AS t1_0 NATURAL LEFT OUTER JOIN t2 AS t2_0
|
||||
RIGHT JOIN t1 AS t1_1 ON t1_0.a LIKE t2_0.b;
|
||||
|
||||
DROP TABLE t1,t2;
|
||||
|
||||
--echo #
|
||||
--echo # End of 5.5 tests
|
||||
|
@ -223,6 +223,7 @@ let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=/data_not_there/ --basedir=$MY
|
||||
--echo # Attempt to use bad paths - basedir
|
||||
--echo #
|
||||
let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --basedir=/basedir_not_there/ --plugin-dir=$PLUGIN_DIR --mysqld=$MYSQLD_BASEDIR --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
|
||||
replace_result "/basedir_not_there//" "/basedir_not_there/";
|
||||
--error 1,2,256
|
||||
--exec $MYSQL_PLUGIN_CMD DISABLE daemon_example 2>&1
|
||||
|
||||
|
@ -1509,6 +1509,13 @@ SELECT DISTINCT a,1 FROM t1 WHERE a <> 1 ORDER BY a DESC;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#11765255 58201:
|
||||
--echo # VALGRIND/CRASH WHEN ORDERING BY MULTIPLE AGGREGATE FUNCTIONS
|
||||
--echo #
|
||||
|
||||
select 1 order by max(1) + min(1);
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
||||
|
||||
|
@ -540,4 +540,35 @@ connection default;
|
||||
disconnect b12610784;
|
||||
DROP USER bug12610784@localhost;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug #12818542: PAM: ADDING PASSWORD FOR AN ACCOUNT DISABLES PAM
|
||||
--echo # AUTHENTICATION SETTINGS
|
||||
--echo #
|
||||
|
||||
CREATE USER bug12818542@localhost
|
||||
IDENTIFIED WITH 'test_plugin_server' AS 'bug12818542_dest';
|
||||
CREATE USER bug12818542_dest@localhost
|
||||
IDENTIFIED BY 'bug12818542_dest_passwd';
|
||||
GRANT PROXY ON bug12818542_dest@localhost TO bug12818542@localhost;
|
||||
|
||||
connect(bug12818542_con,localhost,bug12818542,bug12818542_dest);
|
||||
connection bug12818542_con;
|
||||
SELECT USER(),CURRENT_USER();
|
||||
|
||||
SET PASSWORD = PASSWORD('bruhaha');
|
||||
|
||||
connection default;
|
||||
disconnect bug12818542_con;
|
||||
|
||||
connect(bug12818542_con2,localhost,bug12818542,bug12818542_dest);
|
||||
connection bug12818542_con2;
|
||||
SELECT USER(),CURRENT_USER();
|
||||
|
||||
connection default;
|
||||
disconnect bug12818542_con2;
|
||||
|
||||
DROP USER bug12818542@localhost;
|
||||
DROP USER bug12818542_dest@localhost;
|
||||
|
||||
--echo End of 5.5 tests
|
||||
|
@ -2541,6 +2541,28 @@ DROP PROCEDURE p1;
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#12428824 - PARSER STACK OVERFLOW AND CRASH IN SP_ADD_USED_ROUTINE
|
||||
--echo # WITH OBSCURE QUERY
|
||||
--echo #
|
||||
|
||||
--error ER_TOO_LONG_IDENT
|
||||
SELECT very_long_fn_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222225555555555555555555555555577777777777777777777777777777777777777777777777777777777777777777777777788888888999999999999999999999();
|
||||
|
||||
--error ER_TOO_LONG_IDENT
|
||||
CALL very_long_pr_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222225555555555555555555555555577777777777777777777777777777777777777777777777777777777777777777777777788888888999999999999999999999();
|
||||
|
||||
--error ER_WRONG_DB_NAME
|
||||
SELECT very_long_db_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222225555555555555555555555555577777777777777777777777777777777777777777777777777777777777777777777777788888888999999999999999999999.simple_func();
|
||||
|
||||
--error ER_WRONG_DB_NAME
|
||||
CALL very_long_db_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222225555555555555555555555555577777777777777777777777777777777777777777777777777777777777777777777777788888888999999999999999999999.simple_proc();
|
||||
|
||||
--error ER_TOO_LONG_IDENT
|
||||
SELECT db_name.very_long_fn_name_111111111111111111111111111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999999999999999999();
|
||||
|
||||
--error ER_TOO_LONG_IDENT
|
||||
CALL db_name.very_long_pr_name_111111111111111111111111111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999999999999999999();
|
||||
--echo End of 5.1 tests
|
||||
|
||||
--echo #
|
||||
|
@ -8376,6 +8376,26 @@ SET @@GLOBAL.init_connect= @old_init_connect;
|
||||
DROP PROCEDURE p2;
|
||||
DROP PROCEDURE p5;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug#11840395 (formerly known as bug#60347):
|
||||
--echo # The string "versiondata" seems
|
||||
--echo # to be 'leaking' into the schema name space
|
||||
--echo #
|
||||
--disable_warnings
|
||||
DROP DATABASE IF EXISTS mixedCaseDbName;
|
||||
--enable_warnings
|
||||
CREATE DATABASE mixedCaseDbName;
|
||||
DELIMITER |;
|
||||
CREATE PROCEDURE mixedCaseDbName.tryMyProc() begin end|
|
||||
CREATE FUNCTION mixedCaseDbName.tryMyFunc() returns text begin return 'IT WORKS'; end
|
||||
|
|
||||
DELIMITER ;|
|
||||
call mixedCaseDbName.tryMyProc();
|
||||
select mixedCaseDbName.tryMyFunc();
|
||||
DROP DATABASE mixedCaseDbName;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug#11766594 59736: SELECT DISTINCT.. INCORRECT RESULT WITH DETERMINISTIC FUNCTION IN WHERE C
|
||||
--echo #
|
||||
|
@ -307,4 +307,27 @@ INSERT INTO t1 VALUES(-1.79769313486231e+308);
|
||||
SELECT f1 FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#12406055 BUFFER OVERFLOW OF VARIABLE 'BUFF' IN STRING::SET_REAL
|
||||
--echo #
|
||||
|
||||
--echo # Ignoring output from misc. float operations
|
||||
--disable_result_log
|
||||
|
||||
let $nine_65=
|
||||
99999999999999999999999999999999999999999999999999999999999999999;
|
||||
|
||||
select format(-1.7976931348623157E+307,256) as foo;
|
||||
select least(-1.1111111111111111111111111,
|
||||
- group_concat(1.7976931348623157E+308)) as foo;
|
||||
eval select concat((truncate((-1.7976931348623157E+307),(0x1e))),
|
||||
($nine_65)) into @a;
|
||||
--enable_result_log
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
||||
--echo #
|
||||
--echo # Bug#12368853 FORMAT() CRASHES WITH LARGE NUMBERS AFTER TRUNCATE...
|
||||
--echo #
|
||||
|
||||
select format(truncate('1.7976931348623157E+308',-12),1,'fr_BE') as foo;
|
||||
|
@ -1116,6 +1116,47 @@ SELECT * FROM t2 UNION SELECT * FROM t2
|
||||
DROP TABLE t1,t2;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug#11765255 58201:
|
||||
--echo # VALGRIND/CRASH WHEN ORDERING BY MULTIPLE AGGREGATE FUNCTIONS
|
||||
--echo #
|
||||
|
||||
let $my_stmt=
|
||||
select 1 as foo
|
||||
union
|
||||
select 2
|
||||
union
|
||||
select 3
|
||||
union
|
||||
select 4
|
||||
order by max(42) + max(1) + max(1) + max(1) + max(1) + max(1)
|
||||
;
|
||||
|
||||
eval $my_stmt;
|
||||
|
||||
eval prepare stmt1 from '$my_stmt';
|
||||
execute stmt1;
|
||||
execute stmt1;
|
||||
|
||||
let $my_stmt=
|
||||
select 1 as foo
|
||||
union
|
||||
select 2
|
||||
union
|
||||
select 3
|
||||
union
|
||||
(select 4)
|
||||
order by max(42) + max(1) + max(1) + max(1) + max(1) + max(1)
|
||||
;
|
||||
|
||||
eval $my_stmt;
|
||||
|
||||
eval prepare stmt1 from '$my_stmt';
|
||||
execute stmt1;
|
||||
execute stmt1;
|
||||
|
||||
deallocate prepare stmt1;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
||||
--echo #
|
||||
|
@ -154,7 +154,8 @@ mysql_declare_plugin(audit_null)
|
||||
0x0002, /* version */
|
||||
simple_status, /* status variables */
|
||||
NULL, /* system variables */
|
||||
NULL
|
||||
NULL,
|
||||
0,
|
||||
}
|
||||
mysql_declare_plugin_end;
|
||||
|
||||
|
@ -88,7 +88,8 @@ mysql_declare_plugin(socket_auth)
|
||||
0x0100,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
NULL,
|
||||
0,
|
||||
}
|
||||
mysql_declare_plugin_end;
|
||||
|
||||
|
@ -153,7 +153,8 @@ mysql_declare_plugin(dialog)
|
||||
0x0100,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
NULL,
|
||||
0,
|
||||
},
|
||||
{
|
||||
MYSQL_AUTHENTICATION_PLUGIN,
|
||||
@ -167,7 +168,8 @@ mysql_declare_plugin(dialog)
|
||||
0x0100,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
NULL,
|
||||
0,
|
||||
}
|
||||
mysql_declare_plugin_end;
|
||||
|
||||
|
@ -162,7 +162,8 @@ mysql_declare_plugin(test_plugin)
|
||||
0x0100,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
NULL,
|
||||
0,
|
||||
}
|
||||
mysql_declare_plugin_end;
|
||||
|
||||
|
@ -82,6 +82,7 @@ mysql_declare_plugin(test_plugin)
|
||||
0x0100,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
NULL,
|
||||
0,
|
||||
}
|
||||
mysql_declare_plugin_end;
|
||||
|
@ -125,7 +125,8 @@ mysql_declare_plugin(test_plugin)
|
||||
0x0100,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
NULL,
|
||||
0,
|
||||
},
|
||||
{
|
||||
MYSQL_AUTHENTICATION_PLUGIN,
|
||||
@ -139,7 +140,8 @@ mysql_declare_plugin(test_plugin)
|
||||
0x0100,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
NULL,
|
||||
0,
|
||||
}
|
||||
mysql_declare_plugin_end;
|
||||
|
||||
|
@ -201,6 +201,7 @@ mysql_declare_plugin(daemon_example)
|
||||
0x0100 /* 1.0 */,
|
||||
NULL, /* status variables */
|
||||
NULL, /* system variables */
|
||||
NULL /* config options */
|
||||
NULL, /* config options */
|
||||
0, /* flags */
|
||||
}
|
||||
mysql_declare_plugin_end;
|
||||
|
@ -267,7 +267,8 @@ mysql_declare_plugin(ftexample)
|
||||
0x0001, /* version */
|
||||
simple_status, /* status variables */
|
||||
simple_system_variables, /* system variables */
|
||||
NULL
|
||||
NULL,
|
||||
0,
|
||||
}
|
||||
mysql_declare_plugin_end;
|
||||
|
||||
|
@ -429,6 +429,7 @@ mysql_declare_plugin(semi_sync_master)
|
||||
0x0100 /* 1.0 */,
|
||||
semi_sync_master_status_vars, /* status variables */
|
||||
semi_sync_master_system_vars, /* system variables */
|
||||
NULL /* config options */
|
||||
NULL, /* config options */
|
||||
0, /* flags */
|
||||
}
|
||||
mysql_declare_plugin_end;
|
||||
|
@ -225,6 +225,7 @@ mysql_declare_plugin(semi_sync_slave)
|
||||
0x0100 /* 1.0 */,
|
||||
semi_sync_slave_status_vars, /* status variables */
|
||||
semi_sync_slave_system_vars, /* system variables */
|
||||
NULL /* config options */
|
||||
NULL, /* config options */
|
||||
0, /* flags */
|
||||
}
|
||||
mysql_declare_plugin_end;
|
||||
|
@ -100,6 +100,14 @@ ENDIF()
|
||||
|
||||
MYSQL_ADD_EXECUTABLE(mysqld ${MYSQLD_SOURCE} DESTINATION ${INSTALL_SBINDIR} COMPONENT Server)
|
||||
|
||||
IF(APPLE)
|
||||
# Add CoreServices framework since some dloadable plugins may need it
|
||||
FIND_LIBRARY(CORESERVICES NAMES CoreServices)
|
||||
IF(CORESERVICES)
|
||||
TARGET_LINK_LIBRARIES(mysqld ${CORESERVICES})
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
IF(NOT WITHOUT_DYNAMIC_PLUGINS)
|
||||
SET_TARGET_PROPERTIES(mysqld PROPERTIES ENABLE_EXPORTS TRUE)
|
||||
GET_TARGET_PROPERTY(mysqld_link_flags mysqld LINK_FLAGS)
|
||||
|
@ -11023,7 +11023,8 @@ mysql_declare_plugin(ndbcluster)
|
||||
0x0100 /* 1.0 */,
|
||||
ndb_status_variables_export,/* status variables */
|
||||
system_variables, /* system variables */
|
||||
NULL /* config options */
|
||||
NULL, /* config options */
|
||||
0, /* flags */
|
||||
}
|
||||
mysql_declare_plugin_end;
|
||||
|
||||
|
@ -7183,7 +7183,8 @@ mysql_declare_plugin(partition)
|
||||
0x0100, /* 1.0 */
|
||||
NULL, /* status variables */
|
||||
NULL, /* system variables */
|
||||
NULL /* config options */
|
||||
NULL, /* config options */
|
||||
0, /* flags */
|
||||
}
|
||||
mysql_declare_plugin_end;
|
||||
|
||||
|
@ -2316,7 +2316,7 @@ String *Item_func_format::val_str_ascii(String *str)
|
||||
return 0; /* purecov: inspected */
|
||||
nr= my_double_round(nr, (longlong) dec, FALSE, FALSE);
|
||||
str->set_real(nr, dec, &my_charset_numeric);
|
||||
if (isnan(nr))
|
||||
if (isnan(nr) || my_isinf(nr))
|
||||
return str;
|
||||
str_length=str->length();
|
||||
}
|
||||
@ -2372,6 +2372,7 @@ String *Item_func_format::val_str_ascii(String *str)
|
||||
For short values without thousands (<1000)
|
||||
replace decimal point to localized value.
|
||||
*/
|
||||
DBUG_ASSERT(dec_length <= str_length);
|
||||
((char*) str->ptr())[str_length - dec_length]= lc->decimal_point;
|
||||
}
|
||||
return str;
|
||||
|
@ -6604,6 +6604,7 @@ mysql_declare_plugin(binlog)
|
||||
0x0100 /* 1.0 */,
|
||||
NULL, /* status variables */
|
||||
NULL, /* system variables */
|
||||
NULL /* config options */
|
||||
NULL, /* config options */
|
||||
0, /* flags */
|
||||
}
|
||||
mysql_declare_plugin_end;
|
||||
|
@ -6420,3 +6420,9 @@ ER_INDEX_CORRUPT
|
||||
|
||||
ER_UNDO_RECORD_TOO_BIG
|
||||
eng "Undo log record is too big."
|
||||
|
||||
ER_PLUGIN_NO_UNINSTALL
|
||||
eng "Plugin '%s' is marked as not dynamically uninstallable. You have to stop the server to uninstall it."
|
||||
|
||||
ER_PLUGIN_NO_INSTALL
|
||||
eng "Plugin '%s' is marked as not dynamically installable. You have to stop the server to install it."
|
||||
|
@ -1881,17 +1881,17 @@ bool change_password(THD *thd, const char *host, const char *user,
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* update loaded acl entry: */
|
||||
set_user_salt(acl_user, new_password, new_password_len);
|
||||
|
||||
if (my_strcasecmp(system_charset_info, acl_user->plugin.str,
|
||||
native_password_plugin_name.str) &&
|
||||
my_strcasecmp(system_charset_info, acl_user->plugin.str,
|
||||
old_password_plugin_name.str))
|
||||
{
|
||||
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
|
||||
ER_SET_PASSWORD_AUTH_PLUGIN, ER(ER_SET_PASSWORD_AUTH_PLUGIN));
|
||||
}
|
||||
/* update loaded acl entry: */
|
||||
set_user_salt(acl_user, new_password, new_password_len);
|
||||
set_user_plugin(acl_user, new_password_len);
|
||||
else
|
||||
set_user_plugin(acl_user, new_password_len);
|
||||
|
||||
if (update_user_table(thd, table,
|
||||
acl_user->host.hostname ? acl_user->host.hostname : "",
|
||||
@ -8820,24 +8820,18 @@ static ulong parse_client_handshake_packet(MPVIO_EXT *mpvio,
|
||||
|
||||
|
||||
/**
|
||||
Make sure that when sending plugin supplued data to the client they
|
||||
Make sure that when sending plugin supplied data to the client they
|
||||
are not considered a special out-of-band command, like e.g.
|
||||
\255 (error) or \254 (change user request packet).
|
||||
To avoid this we send plugin data packets starting with one of these
|
||||
2 bytes "wrapped" in a command \1.
|
||||
For the above reason we have to wrap plugin data packets starting with
|
||||
\1 as well.
|
||||
\255 (error) or \254 (change user request packet) or \0 (OK).
|
||||
To avoid this the server will send all plugin data packets "wrapped"
|
||||
in a command \1.
|
||||
Note that the client will continue sending its replies unrwapped.
|
||||
*/
|
||||
|
||||
#define IS_OUT_OF_BAND_PACKET(packet,packet_len) \
|
||||
((packet_len) > 0 && \
|
||||
(*(packet) == 1 || *(packet) == 255 || *(packet) == 254))
|
||||
|
||||
static inline int
|
||||
wrap_plguin_data_into_proper_command(NET *net,
|
||||
const uchar *packet, int packet_len)
|
||||
{
|
||||
DBUG_ASSERT(IS_OUT_OF_BAND_PACKET(packet, packet_len));
|
||||
return net_write_command(net, 1, (uchar *) "", 0, packet, packet_len);
|
||||
}
|
||||
|
||||
@ -8874,13 +8868,8 @@ static int server_mpvio_write_packet(MYSQL_PLUGIN_VIO *param,
|
||||
res= send_server_handshake_packet(mpvio, (char*) packet, packet_len);
|
||||
else if (mpvio->status == MPVIO_EXT::RESTART)
|
||||
res= send_plugin_request_packet(mpvio, packet, packet_len);
|
||||
else if (IS_OUT_OF_BAND_PACKET(packet, packet_len))
|
||||
res= wrap_plguin_data_into_proper_command(mpvio->net, packet, packet_len);
|
||||
else
|
||||
{
|
||||
res= my_net_write(mpvio->net, packet, packet_len) ||
|
||||
net_flush(mpvio->net);
|
||||
}
|
||||
res= wrap_plguin_data_into_proper_command(mpvio->net, packet, packet_len);
|
||||
mpvio->packets_written++;
|
||||
DBUG_RETURN(res);
|
||||
}
|
||||
@ -9651,7 +9640,8 @@ mysql_declare_plugin(mysql_password)
|
||||
0x0100, /* Version (1.0) */
|
||||
NULL, /* status variables */
|
||||
NULL, /* system variables */
|
||||
NULL /* config options */
|
||||
NULL, /* config options */
|
||||
0, /* flags */
|
||||
},
|
||||
{
|
||||
MYSQL_AUTHENTICATION_PLUGIN, /* type constant */
|
||||
@ -9665,7 +9655,8 @@ mysql_declare_plugin(mysql_password)
|
||||
0x0100, /* Version (1.0) */
|
||||
NULL, /* status variables */
|
||||
NULL, /* system variables */
|
||||
NULL /* config options */
|
||||
NULL, /* config options */
|
||||
0, /* flags */
|
||||
}
|
||||
mysql_declare_plugin_end;
|
||||
|
||||
|
@ -641,7 +641,7 @@ char *thd_security_context(THD *thd, char *buffer, unsigned int length,
|
||||
{
|
||||
String str(buffer, length, &my_charset_latin1);
|
||||
const Security_context *sctx= &thd->main_security_ctx;
|
||||
char header[64];
|
||||
char header[256];
|
||||
int len;
|
||||
/*
|
||||
The pointers thd->query and thd->proc_info might change since they are
|
||||
|
@ -803,14 +803,16 @@ uint32 convert_error_message(char *to, uint32 to_length, CHARSET_INFO *to_cs,
|
||||
my_wc_t wc;
|
||||
const uchar *from_end= (const uchar*) from+from_length;
|
||||
char *to_start= to;
|
||||
uchar *to_end= (uchar*) to+to_length;
|
||||
uchar *to_end;
|
||||
my_charset_conv_mb_wc mb_wc= from_cs->cset->mb_wc;
|
||||
my_charset_conv_wc_mb wc_mb;
|
||||
uint error_count= 0;
|
||||
uint length;
|
||||
|
||||
DBUG_ASSERT(to_length > 0);
|
||||
/* Make room for the null terminator. */
|
||||
to_length--;
|
||||
to_end= (uchar*) (to + to_length);
|
||||
|
||||
if (!to_cs || from_cs == to_cs || to_cs == &my_charset_bin)
|
||||
{
|
||||
|
@ -435,6 +435,7 @@ void lex_start(THD *thd)
|
||||
|
||||
lex->is_lex_started= TRUE;
|
||||
lex->used_tables= 0;
|
||||
lex->reset_slave_info.all= false;
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
@ -2121,6 +2122,9 @@ bool st_select_lex::setup_ref_array(THD *thd, uint order_group_num)
|
||||
if (ref_pointer_array)
|
||||
return 0;
|
||||
|
||||
// find_order_in_list() may need some extra space, so multiply by two.
|
||||
order_group_num*= 2;
|
||||
|
||||
/*
|
||||
We have to create array in prepared statement memory if it is
|
||||
prepared statement
|
||||
|
@ -539,6 +539,11 @@ static st_plugin_dl *plugin_dl_add(const LEX_STRING *dl, int report)
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
What's the purpose of this loop? If the goal is to catch a
|
||||
missing 0 record at the end of a list, it will fail miserably
|
||||
since the compiler is likely to optimize this away. /Matz
|
||||
*/
|
||||
for (i= 0;
|
||||
((struct st_mysql_plugin *)(ptr+i*sizeof_st_plugin))->info;
|
||||
i++)
|
||||
@ -567,6 +572,23 @@ static st_plugin_dl *plugin_dl_add(const LEX_STRING *dl, int report)
|
||||
}
|
||||
plugin_dl.plugins= (struct st_mysql_plugin *)sym;
|
||||
|
||||
/*
|
||||
If report is REPORT_TO_USER, we were called from
|
||||
mysql_install_plugin. Otherwise, we are called directly or
|
||||
indirectly from plugin_init.
|
||||
*/
|
||||
if (report == REPORT_TO_USER)
|
||||
{
|
||||
st_mysql_plugin *plugin= plugin_dl.plugins;
|
||||
for ( ; plugin->info ; ++plugin)
|
||||
if (plugin->flags & PLUGIN_OPT_NO_INSTALL)
|
||||
{
|
||||
report_error(report, ER_PLUGIN_NO_INSTALL, plugin->name);
|
||||
free_plugin_mem(&plugin_dl);
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
}
|
||||
|
||||
/* Duplicate and convert dll name */
|
||||
plugin_dl.dl.length= dl->length * files_charset_info->mbmaxlen + 1;
|
||||
if (! (plugin_dl.dl.str= (char*) my_malloc(plugin_dl.dl.length, MYF(0))))
|
||||
@ -1884,6 +1906,16 @@ bool mysql_uninstall_plugin(THD *thd, const LEX_STRING *name)
|
||||
my_error(ER_PLUGIN_IS_PERMANENT, MYF(0), name->str);
|
||||
goto err;
|
||||
}
|
||||
/*
|
||||
Error message for ER_PLUGIN_IS_PERMANENT is not suitable for
|
||||
plugins marked as not dynamically uninstallable, so we have a
|
||||
separate one instead of changing the old one.
|
||||
*/
|
||||
if (plugin->plugin->flags & PLUGIN_OPT_NO_UNINSTALL)
|
||||
{
|
||||
my_error(ER_PLUGIN_NO_UNINSTALL, MYF(0), plugin->plugin->name);
|
||||
goto err;
|
||||
}
|
||||
|
||||
plugin->state= PLUGIN_IS_DELETED;
|
||||
if (plugin->ref_count)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
/* Copyright (c) 2000, 2011, 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
|
||||
@ -404,15 +404,27 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
|
||||
fake_select_lex->table_list.empty();
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
|
||||
/*
|
||||
Fake st_select_lex should have item list for correct ref_array
|
||||
allocation.
|
||||
*/
|
||||
fake_select_lex->item_list= item_list;
|
||||
|
||||
thd_arg->lex->current_select= fake_select_lex;
|
||||
|
||||
/*
|
||||
We need to add up n_sum_items in order to make the correct
|
||||
allocation in setup_ref_array().
|
||||
*/
|
||||
fake_select_lex->n_child_sum_items+= global_parameters->n_sum_items;
|
||||
|
||||
saved_error= fake_select_lex->join->
|
||||
prepare(&fake_select_lex->ref_pointer_array,
|
||||
fake_select_lex->table_list.first,
|
||||
0, 0,
|
||||
fake_select_lex->order_list.elements,
|
||||
fake_select_lex->order_list.first,
|
||||
global_parameters->order_list.elements, // og_num
|
||||
global_parameters->order_list.first, // order
|
||||
NULL, NULL, NULL,
|
||||
fake_select_lex, this);
|
||||
fake_select_lex->table_list.empty();
|
||||
@ -581,11 +593,21 @@ bool st_select_lex_unit::exec()
|
||||
}
|
||||
fake_select_lex->join->no_const_tables= TRUE;
|
||||
|
||||
/*
|
||||
Fake st_select_lex should have item list for correctref_array
|
||||
allocation.
|
||||
*/
|
||||
fake_select_lex->item_list= item_list;
|
||||
/*
|
||||
Fake st_select_lex should have item list for correct ref_array
|
||||
allocation.
|
||||
*/
|
||||
fake_select_lex->item_list= item_list;
|
||||
|
||||
/*
|
||||
We need to add up n_sum_items in order to make the correct
|
||||
allocation in setup_ref_array().
|
||||
Don't add more sum_items if we have already done JOIN::prepare
|
||||
for this (with a different join object)
|
||||
*/
|
||||
if (!fake_select_lex->ref_pointer_array)
|
||||
fake_select_lex->n_child_sum_items+= global_parameters->n_sum_items;
|
||||
|
||||
saved_error= mysql_select(thd, &fake_select_lex->ref_pointer_array,
|
||||
&result_table_list,
|
||||
0, item_list, NULL,
|
||||
|
@ -8644,6 +8644,11 @@ function_call_generic:
|
||||
Create_func *builder;
|
||||
Item *item= NULL;
|
||||
|
||||
if (check_routine_name(&$1))
|
||||
{
|
||||
MYSQL_YYABORT;
|
||||
}
|
||||
|
||||
/*
|
||||
Implementation note:
|
||||
names are resolved with the following order:
|
||||
@ -8707,6 +8712,16 @@ function_call_generic:
|
||||
version() (a vendor can specify any schema).
|
||||
*/
|
||||
|
||||
if (!$1.str || check_db_name(&$1))
|
||||
{
|
||||
my_error(ER_WRONG_DB_NAME, MYF(0), $1.str);
|
||||
MYSQL_YYABORT;
|
||||
}
|
||||
if (check_routine_name(&$3))
|
||||
{
|
||||
MYSQL_YYABORT;
|
||||
}
|
||||
|
||||
builder= find_qualified_function_builder(thd);
|
||||
DBUG_ASSERT(builder);
|
||||
item= builder->create(thd, $1, $3, true, $5);
|
||||
|
@ -1766,7 +1766,8 @@ mysql_declare_plugin(archive)
|
||||
0x0300 /* 3.0 */,
|
||||
NULL, /* status variables */
|
||||
NULL, /* system variables */
|
||||
NULL /* config options */
|
||||
NULL, /* config options */
|
||||
0, /* flags */
|
||||
}
|
||||
mysql_declare_plugin_end;
|
||||
|
||||
|
@ -448,6 +448,7 @@ mysql_declare_plugin(blackhole)
|
||||
0x0100 /* 1.0 */,
|
||||
NULL, /* status variables */
|
||||
NULL, /* system variables */
|
||||
NULL /* config options */
|
||||
NULL, /* config options */
|
||||
0, /* flags */
|
||||
}
|
||||
mysql_declare_plugin_end;
|
||||
|
@ -1766,7 +1766,8 @@ mysql_declare_plugin(csv)
|
||||
0x0100 /* 1.0 */,
|
||||
NULL, /* status variables */
|
||||
NULL, /* system variables */
|
||||
NULL /* config options */
|
||||
NULL, /* config options */
|
||||
0, /* flags */
|
||||
}
|
||||
mysql_declare_plugin_end;
|
||||
|
||||
|
@ -1008,6 +1008,7 @@ mysql_declare_plugin(example)
|
||||
0x0001 /* 0.1 */,
|
||||
func_status, /* status variables */
|
||||
example_system_variables, /* system variables */
|
||||
NULL /* config options */
|
||||
NULL, /* config options */
|
||||
0, /* flags */
|
||||
}
|
||||
mysql_declare_plugin_end;
|
||||
|
@ -3481,6 +3481,7 @@ mysql_declare_plugin(federated)
|
||||
0x0100 /* 1.0 */,
|
||||
NULL, /* status variables */
|
||||
NULL, /* system variables */
|
||||
NULL /* config options */
|
||||
NULL, /* config options */
|
||||
0, /* flags */
|
||||
}
|
||||
mysql_declare_plugin_end;
|
||||
|
@ -825,6 +825,7 @@ mysql_declare_plugin(heap)
|
||||
0x0100, /* 1.0 */
|
||||
NULL, /* status variables */
|
||||
NULL, /* system variables */
|
||||
NULL /* config options */
|
||||
NULL, /* config options */
|
||||
0, /* flags */
|
||||
}
|
||||
mysql_declare_plugin_end;
|
||||
|
@ -358,33 +358,6 @@ btr_pcur_restore_position_func(
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
/**************************************************************//**
|
||||
If the latch mode of the cursor is BTR_LEAF_SEARCH or BTR_LEAF_MODIFY,
|
||||
releases the page latch and bufferfix reserved by the cursor.
|
||||
NOTE! In the case of BTR_LEAF_MODIFY, there should not exist changes
|
||||
made by the current mini-transaction to the data protected by the
|
||||
cursor latch, as then the latch must not be released until mtr_commit. */
|
||||
UNIV_INTERN
|
||||
void
|
||||
btr_pcur_release_leaf(
|
||||
/*==================*/
|
||||
btr_pcur_t* cursor, /*!< in: persistent cursor */
|
||||
mtr_t* mtr) /*!< in: mtr */
|
||||
{
|
||||
buf_block_t* block;
|
||||
|
||||
ut_a(cursor->pos_state == BTR_PCUR_IS_POSITIONED);
|
||||
ut_ad(cursor->latch_mode != BTR_NO_LATCHES);
|
||||
|
||||
block = btr_pcur_get_block(cursor);
|
||||
|
||||
btr_leaf_page_release(block, cursor->latch_mode, mtr);
|
||||
|
||||
cursor->latch_mode = BTR_NO_LATCHES;
|
||||
|
||||
cursor->pos_state = BTR_PCUR_WAS_POSITIONED;
|
||||
}
|
||||
|
||||
/*********************************************************//**
|
||||
Moves the persistent cursor to the first record on the next page. Releases the
|
||||
latch on the current page, and bufferunfixes it. Note that there must not be
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 2000, 2011, MySQL AB & Innobase Oy. All Rights Reserved.
|
||||
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2008, 2009 Google Inc.
|
||||
Copyright (c) 2009, Percona Inc.
|
||||
|
||||
@ -4064,25 +4064,6 @@ field_in_record_is_null(
|
||||
return(0);
|
||||
}
|
||||
|
||||
/**************************************************************//**
|
||||
Sets a field in a record to SQL NULL. Uses the record format
|
||||
information in table to track the null bit in record. */
|
||||
static inline
|
||||
void
|
||||
set_field_in_record_to_null(
|
||||
/*========================*/
|
||||
TABLE* table, /*!< in: MySQL table object */
|
||||
Field* field, /*!< in: MySQL field object */
|
||||
char* record) /*!< in: a row in MySQL format */
|
||||
{
|
||||
int null_offset;
|
||||
|
||||
null_offset = (uint) ((char*) field->null_ptr
|
||||
- (char*) table->record[0]);
|
||||
|
||||
record[null_offset] = record[null_offset] | field->null_bit;
|
||||
}
|
||||
|
||||
/*************************************************************//**
|
||||
InnoDB uses this function to compare two data fields for which the data type
|
||||
is such that we must use MySQL code to compare them. NOTE that the prototype
|
||||
@ -11534,7 +11515,8 @@ mysql_declare_plugin(innobase)
|
||||
INNODB_VERSION_SHORT,
|
||||
innodb_status_variables_export,/* status variables */
|
||||
innobase_system_variables, /* system variables */
|
||||
NULL /* reserved */
|
||||
NULL, /* reserved */
|
||||
0, /* flags */
|
||||
},
|
||||
i_s_innodb_trx,
|
||||
i_s_innodb_locks,
|
||||
|
@ -638,7 +638,11 @@ UNIV_INTERN struct st_mysql_plugin i_s_innodb_trx =
|
||||
|
||||
/* reserved for dependency checking */
|
||||
/* void* */
|
||||
STRUCT_FLD(__reserved1, NULL)
|
||||
STRUCT_FLD(__reserved1, NULL),
|
||||
|
||||
/* Plugin flags */
|
||||
/* unsigned long */
|
||||
STRUCT_FLD(flags, 0UL),
|
||||
};
|
||||
|
||||
/* Fields of the dynamic table INFORMATION_SCHEMA.innodb_locks */
|
||||
@ -904,7 +908,11 @@ UNIV_INTERN struct st_mysql_plugin i_s_innodb_locks =
|
||||
|
||||
/* reserved for dependency checking */
|
||||
/* void* */
|
||||
STRUCT_FLD(__reserved1, NULL)
|
||||
STRUCT_FLD(__reserved1, NULL),
|
||||
|
||||
/* Plugin flags */
|
||||
/* unsigned long */
|
||||
STRUCT_FLD(flags, 0UL),
|
||||
};
|
||||
|
||||
/* Fields of the dynamic table INFORMATION_SCHEMA.innodb_lock_waits */
|
||||
@ -1087,7 +1095,11 @@ UNIV_INTERN struct st_mysql_plugin i_s_innodb_lock_waits =
|
||||
|
||||
/* reserved for dependency checking */
|
||||
/* void* */
|
||||
STRUCT_FLD(__reserved1, NULL)
|
||||
STRUCT_FLD(__reserved1, NULL),
|
||||
|
||||
/* Plugin flags */
|
||||
/* unsigned long */
|
||||
STRUCT_FLD(flags, 0UL),
|
||||
};
|
||||
|
||||
/*******************************************************************//**
|
||||
@ -1420,7 +1432,11 @@ UNIV_INTERN struct st_mysql_plugin i_s_innodb_cmp =
|
||||
|
||||
/* reserved for dependency checking */
|
||||
/* void* */
|
||||
STRUCT_FLD(__reserved1, NULL)
|
||||
STRUCT_FLD(__reserved1, NULL),
|
||||
|
||||
/* Plugin flags */
|
||||
/* unsigned long */
|
||||
STRUCT_FLD(flags, 0UL),
|
||||
};
|
||||
|
||||
UNIV_INTERN struct st_mysql_plugin i_s_innodb_cmp_reset =
|
||||
@ -1470,7 +1486,11 @@ UNIV_INTERN struct st_mysql_plugin i_s_innodb_cmp_reset =
|
||||
|
||||
/* reserved for dependency checking */
|
||||
/* void* */
|
||||
STRUCT_FLD(__reserved1, NULL)
|
||||
STRUCT_FLD(__reserved1, NULL),
|
||||
|
||||
/* Plugin flags */
|
||||
/* unsigned long */
|
||||
STRUCT_FLD(flags, 0UL),
|
||||
};
|
||||
|
||||
/* Fields of the dynamic table information_schema.innodb_cmpmem. */
|
||||
@ -1711,7 +1731,11 @@ UNIV_INTERN struct st_mysql_plugin i_s_innodb_cmpmem =
|
||||
|
||||
/* reserved for dependency checking */
|
||||
/* void* */
|
||||
STRUCT_FLD(__reserved1, NULL)
|
||||
STRUCT_FLD(__reserved1, NULL),
|
||||
|
||||
/* Plugin flags */
|
||||
/* unsigned long */
|
||||
STRUCT_FLD(flags, 0UL),
|
||||
};
|
||||
|
||||
UNIV_INTERN struct st_mysql_plugin i_s_innodb_cmpmem_reset =
|
||||
@ -1761,7 +1785,11 @@ UNIV_INTERN struct st_mysql_plugin i_s_innodb_cmpmem_reset =
|
||||
|
||||
/* reserved for dependency checking */
|
||||
/* void* */
|
||||
STRUCT_FLD(__reserved1, NULL)
|
||||
STRUCT_FLD(__reserved1, NULL),
|
||||
|
||||
/* Plugin flags */
|
||||
/* unsigned long */
|
||||
STRUCT_FLD(flags, 0UL),
|
||||
};
|
||||
|
||||
/*******************************************************************//**
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1996, 2010, Innobase Oy. All Rights Reserved.
|
||||
Copyright (c) 1996, 2011, 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
|
||||
@ -244,18 +244,6 @@ btr_pcur_restore_position_func(
|
||||
mtr_t* mtr); /*!< in: mtr */
|
||||
#define btr_pcur_restore_position(l,cur,mtr) \
|
||||
btr_pcur_restore_position_func(l,cur,__FILE__,__LINE__,mtr)
|
||||
/**************************************************************//**
|
||||
If the latch mode of the cursor is BTR_LEAF_SEARCH or BTR_LEAF_MODIFY,
|
||||
releases the page latch and bufferfix reserved by the cursor.
|
||||
NOTE! In the case of BTR_LEAF_MODIFY, there should not exist changes
|
||||
made by the current mini-transaction to the data protected by the
|
||||
cursor latch, as then the latch must not be released until mtr_commit. */
|
||||
UNIV_INTERN
|
||||
void
|
||||
btr_pcur_release_leaf(
|
||||
/*==================*/
|
||||
btr_pcur_t* cursor, /*!< in: persistent cursor */
|
||||
mtr_t* mtr); /*!< in: mtr */
|
||||
/*********************************************************//**
|
||||
Gets the rel_pos field for a cursor whose position has been stored.
|
||||
@return BTR_PCUR_ON, ... */
|
||||
@ -266,10 +254,9 @@ btr_pcur_get_rel_pos(
|
||||
const btr_pcur_t* cursor);/*!< in: persistent cursor */
|
||||
/**************************************************************//**
|
||||
Commits the mtr and sets the pcur latch mode to BTR_NO_LATCHES,
|
||||
that is, the cursor becomes detached. If there have been modifications
|
||||
to the page where pcur is positioned, this can be used instead of
|
||||
btr_pcur_release_leaf. Function btr_pcur_store_position should be used
|
||||
before calling this, if restoration of cursor is wanted later. */
|
||||
that is, the cursor becomes detached.
|
||||
Function btr_pcur_store_position should be used before calling this,
|
||||
if restoration of cursor is wanted later. */
|
||||
UNIV_INLINE
|
||||
void
|
||||
btr_pcur_commit_specify_mtr(
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1996, 2010, Innobase Oy. All Rights Reserved.
|
||||
Copyright (c) 1996, 2011, 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
|
||||
@ -369,10 +369,9 @@ btr_pcur_move_to_next(
|
||||
|
||||
/**************************************************************//**
|
||||
Commits the mtr and sets the pcur latch mode to BTR_NO_LATCHES,
|
||||
that is, the cursor becomes detached. If there have been modifications
|
||||
to the page where pcur is positioned, this can be used instead of
|
||||
btr_pcur_release_leaf. Function btr_pcur_store_position should be used
|
||||
before calling this, if restoration of cursor is wanted later. */
|
||||
that is, the cursor becomes detached.
|
||||
Function btr_pcur_store_position should be used before calling this,
|
||||
if restoration of cursor is wanted later. */
|
||||
UNIV_INLINE
|
||||
void
|
||||
btr_pcur_commit_specify_mtr(
|
||||
|
@ -215,16 +215,6 @@ ulint
|
||||
mtr_set_savepoint(
|
||||
/*==============*/
|
||||
mtr_t* mtr); /*!< in: mtr */
|
||||
/**********************************************************//**
|
||||
Releases the latches stored in an mtr memo down to a savepoint.
|
||||
NOTE! The mtr must not have made changes to buffer pages after the
|
||||
savepoint, as these can be handled only by mtr_commit. */
|
||||
UNIV_INTERN
|
||||
void
|
||||
mtr_rollback_to_savepoint(
|
||||
/*======================*/
|
||||
mtr_t* mtr, /*!< in: mtr */
|
||||
ulint savepoint); /*!< in: savepoint */
|
||||
#ifndef UNIV_HOTBACKUP
|
||||
/**********************************************************//**
|
||||
Releases the (index tree) s-latch stored in an mtr memo after a
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1994, 2009, Innobase Oy. All Rights Reserved.
|
||||
Copyright (c) 1994, 2011, 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
|
||||
@ -209,43 +209,6 @@ ut_strlcpy_rev(
|
||||
const char* src, /*!< in: source buffer */
|
||||
ulint size); /*!< in: size of destination buffer */
|
||||
|
||||
/**********************************************************************//**
|
||||
Compute strlen(ut_strcpyq(str, q)).
|
||||
@return length of the string when quoted */
|
||||
UNIV_INLINE
|
||||
ulint
|
||||
ut_strlenq(
|
||||
/*=======*/
|
||||
const char* str, /*!< in: null-terminated string */
|
||||
char q); /*!< in: the quote character */
|
||||
|
||||
/**********************************************************************//**
|
||||
Make a quoted copy of a NUL-terminated string. Leading and trailing
|
||||
quotes will not be included; only embedded quotes will be escaped.
|
||||
See also ut_strlenq() and ut_memcpyq().
|
||||
@return pointer to end of dest */
|
||||
UNIV_INTERN
|
||||
char*
|
||||
ut_strcpyq(
|
||||
/*=======*/
|
||||
char* dest, /*!< in: output buffer */
|
||||
char q, /*!< in: the quote character */
|
||||
const char* src); /*!< in: null-terminated string */
|
||||
|
||||
/**********************************************************************//**
|
||||
Make a quoted copy of a fixed-length string. Leading and trailing
|
||||
quotes will not be included; only embedded quotes will be escaped.
|
||||
See also ut_strlenq() and ut_strcpyq().
|
||||
@return pointer to end of dest */
|
||||
UNIV_INTERN
|
||||
char*
|
||||
ut_memcpyq(
|
||||
/*=======*/
|
||||
char* dest, /*!< in: output buffer */
|
||||
char q, /*!< in: the quote character */
|
||||
const char* src, /*!< in: string to be quoted */
|
||||
ulint len); /*!< in: length of src */
|
||||
|
||||
/**********************************************************************//**
|
||||
Return the number of times s2 occurs in s1. Overlapping instances of s2
|
||||
are only counted once.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1994, 2009, Innobase Oy. All Rights Reserved.
|
||||
Copyright (c) 1994, 2011, 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
|
||||
@ -98,27 +98,6 @@ ut_strcmp(const char* str1, const char* str2)
|
||||
return(strcmp(str1, str2));
|
||||
}
|
||||
|
||||
/**********************************************************************//**
|
||||
Compute strlen(ut_strcpyq(str, q)).
|
||||
@return length of the string when quoted */
|
||||
UNIV_INLINE
|
||||
ulint
|
||||
ut_strlenq(
|
||||
/*=======*/
|
||||
const char* str, /*!< in: null-terminated string */
|
||||
char q) /*!< in: the quote character */
|
||||
{
|
||||
ulint len;
|
||||
|
||||
for (len = 0; *str; len++, str++) {
|
||||
if (*str == q) {
|
||||
len++;
|
||||
}
|
||||
}
|
||||
|
||||
return(len);
|
||||
}
|
||||
|
||||
/**********************************************************************//**
|
||||
Converts a raw binary data to a NUL-terminated hex string. The output is
|
||||
truncated if there is not enough space in "hex", make sure "hex_size" is at
|
||||
|
@ -281,44 +281,6 @@ mtr_commit(
|
||||
}
|
||||
|
||||
#ifndef UNIV_HOTBACKUP
|
||||
/**********************************************************//**
|
||||
Releases the latches stored in an mtr memo down to a savepoint.
|
||||
NOTE! The mtr must not have made changes to buffer pages after the
|
||||
savepoint, as these can be handled only by mtr_commit. */
|
||||
UNIV_INTERN
|
||||
void
|
||||
mtr_rollback_to_savepoint(
|
||||
/*======================*/
|
||||
mtr_t* mtr, /*!< in: mtr */
|
||||
ulint savepoint) /*!< in: savepoint */
|
||||
{
|
||||
mtr_memo_slot_t* slot;
|
||||
dyn_array_t* memo;
|
||||
ulint offset;
|
||||
|
||||
ut_ad(mtr);
|
||||
ut_ad(mtr->magic_n == MTR_MAGIC_N);
|
||||
ut_ad(mtr->state == MTR_ACTIVE);
|
||||
|
||||
memo = &(mtr->memo);
|
||||
|
||||
offset = dyn_array_get_data_size(memo);
|
||||
ut_ad(offset >= savepoint);
|
||||
|
||||
while (offset > savepoint) {
|
||||
offset -= sizeof(mtr_memo_slot_t);
|
||||
|
||||
slot = dyn_array_get_element(memo, offset);
|
||||
|
||||
ut_ad(slot->type != MTR_MEMO_MODIFY);
|
||||
|
||||
/* We do not call mtr_memo_slot_note_modification()
|
||||
because there MUST be no changes made to the buffer
|
||||
pages after the savepoint */
|
||||
mtr_memo_slot_release(mtr, slot);
|
||||
}
|
||||
}
|
||||
|
||||
/***************************************************//**
|
||||
Releases an object in the memo stack. */
|
||||
UNIV_INTERN
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1997, 2010, Innobase Oy. All Rights Reserved.
|
||||
Copyright (c) 1997, 2011, 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
|
||||
@ -11,8 +11,8 @@ 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., 59 Temple
|
||||
Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
@ -515,7 +515,8 @@ row_purge_upd_exist_or_extern_func(
|
||||
|
||||
ut_ad(node);
|
||||
|
||||
if (node->rec_type == TRX_UNDO_UPD_DEL_REC) {
|
||||
if (node->rec_type == TRX_UNDO_UPD_DEL_REC
|
||||
|| (node->cmpl_info & UPD_NODE_NO_ORD_CHANGE)) {
|
||||
|
||||
goto skip_secondaries;
|
||||
}
|
||||
@ -645,14 +646,14 @@ row_purge_parse_undo_rec(
|
||||
roll_ptr_t roll_ptr;
|
||||
ulint info_bits;
|
||||
ulint type;
|
||||
ulint cmpl_info;
|
||||
|
||||
ut_ad(node && thr);
|
||||
|
||||
trx = thr_get_trx(thr);
|
||||
|
||||
ptr = trx_undo_rec_get_pars(node->undo_rec, &type, &cmpl_info,
|
||||
updated_extern, &undo_no, &table_id);
|
||||
ptr = trx_undo_rec_get_pars(
|
||||
node->undo_rec, &type, &node->cmpl_info,
|
||||
updated_extern, &undo_no, &table_id);
|
||||
node->rec_type = type;
|
||||
|
||||
if (type == TRX_UNDO_UPD_DEL_REC && !(*updated_extern)) {
|
||||
@ -665,7 +666,8 @@ row_purge_parse_undo_rec(
|
||||
node->table = NULL;
|
||||
|
||||
if (type == TRX_UNDO_UPD_EXIST_REC
|
||||
&& cmpl_info & UPD_NODE_NO_ORD_CHANGE && !(*updated_extern)) {
|
||||
&& node->cmpl_info & UPD_NODE_NO_ORD_CHANGE
|
||||
&& !(*updated_extern)) {
|
||||
|
||||
/* Purge requires no changes to indexes: we may return */
|
||||
|
||||
@ -715,7 +717,7 @@ err_exit:
|
||||
|
||||
/* Read to the partial row the fields that occur in indexes */
|
||||
|
||||
if (!(cmpl_info & UPD_NODE_NO_ORD_CHANGE)) {
|
||||
if (!(node->cmpl_info & UPD_NODE_NO_ORD_CHANGE)) {
|
||||
ptr = trx_undo_rec_get_partial_row(
|
||||
ptr, clust_index, &node->row,
|
||||
type == TRX_UNDO_UPD_DEL_REC,
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1994, 2009, Innobase Oy. All Rights Reserved.
|
||||
Copyright (c) 1994, 2011, 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
|
||||
@ -483,53 +483,6 @@ ut_strlcpy_rev(
|
||||
return(src_size);
|
||||
}
|
||||
|
||||
/**********************************************************************//**
|
||||
Make a quoted copy of a NUL-terminated string. Leading and trailing
|
||||
quotes will not be included; only embedded quotes will be escaped.
|
||||
See also ut_strlenq() and ut_memcpyq().
|
||||
@return pointer to end of dest */
|
||||
UNIV_INTERN
|
||||
char*
|
||||
ut_strcpyq(
|
||||
/*=======*/
|
||||
char* dest, /*!< in: output buffer */
|
||||
char q, /*!< in: the quote character */
|
||||
const char* src) /*!< in: null-terminated string */
|
||||
{
|
||||
while (*src) {
|
||||
if ((*dest++ = *src++) == q) {
|
||||
*dest++ = q;
|
||||
}
|
||||
}
|
||||
|
||||
return(dest);
|
||||
}
|
||||
|
||||
/**********************************************************************//**
|
||||
Make a quoted copy of a fixed-length string. Leading and trailing
|
||||
quotes will not be included; only embedded quotes will be escaped.
|
||||
See also ut_strlenq() and ut_strcpyq().
|
||||
@return pointer to end of dest */
|
||||
UNIV_INTERN
|
||||
char*
|
||||
ut_memcpyq(
|
||||
/*=======*/
|
||||
char* dest, /*!< in: output buffer */
|
||||
char q, /*!< in: the quote character */
|
||||
const char* src, /*!< in: string to be quoted */
|
||||
ulint len) /*!< in: length of src */
|
||||
{
|
||||
const char* srcend = src + len;
|
||||
|
||||
while (src < srcend) {
|
||||
if ((*dest++ = *src++) == q) {
|
||||
*dest++ = q;
|
||||
}
|
||||
}
|
||||
|
||||
return(dest);
|
||||
}
|
||||
|
||||
#ifndef UNIV_HOTBACKUP
|
||||
/**********************************************************************//**
|
||||
Return the number of times s2 occurs in s1. Overlapping instances of s2
|
||||
|
@ -2086,7 +2086,8 @@ mysql_declare_plugin(myisam)
|
||||
0x0100, /* 1.0 */
|
||||
NULL, /* status variables */
|
||||
myisam_sysvars, /* system variables */
|
||||
NULL
|
||||
NULL,
|
||||
0,
|
||||
}
|
||||
mysql_declare_plugin_end;
|
||||
|
||||
|
@ -1687,6 +1687,7 @@ mysql_declare_plugin(myisammrg)
|
||||
0x0100, /* 1.0 */
|
||||
NULL, /* status variables */
|
||||
NULL, /* system variables */
|
||||
NULL /* config options */
|
||||
NULL, /* config options */
|
||||
0, /* flags */
|
||||
}
|
||||
mysql_declare_plugin_end;
|
||||
|
@ -166,7 +166,8 @@ mysql_declare_plugin(perfschema)
|
||||
0x0001 /* 0.1 */,
|
||||
pfs_status_vars, /* status variables */
|
||||
NULL, /* system variables */
|
||||
NULL /* config options */
|
||||
NULL, /* config options */
|
||||
0, /* flags */
|
||||
}
|
||||
mysql_declare_plugin_end;
|
||||
|
||||
|
@ -42,6 +42,7 @@
|
||||
#define MY_UCA_NCHARS 256
|
||||
#define MY_UCA_CMASK 255
|
||||
#define MY_UCA_PSHIFT 8
|
||||
#define MAX_UCA_CHAR_WITH_EXPLICIT_WEIGHT 0xFFFF
|
||||
|
||||
uint16 page000data[]= { /* 0000 (4 weights per char) */
|
||||
0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,
|
||||
@ -6984,7 +6985,7 @@ static int my_uca_scanner_next_any(my_uca_scanner *scanner)
|
||||
return -1;
|
||||
|
||||
scanner->sbeg+= mb_len;
|
||||
if (wc > 0xFFFF)
|
||||
if (wc > MAX_UCA_CHAR_WITH_EXPLICIT_WEIGHT)
|
||||
{
|
||||
/* Return 0xFFFD as weight for all characters outside BMP */
|
||||
scanner->wbeg= nochar;
|
||||
@ -7322,6 +7323,33 @@ static size_t my_strnxfrm_uca(CHARSET_INFO *cs,
|
||||
|
||||
|
||||
|
||||
/**
|
||||
Helper function:
|
||||
Find address of weights of the given character.
|
||||
|
||||
@param weights UCA weight array
|
||||
@param lengths UCA length array
|
||||
@param ch character Unicode code point
|
||||
|
||||
@return Weight array
|
||||
@retval pointer to weight array for the given character,
|
||||
or NULL if this page does not have implicit weights.
|
||||
*/
|
||||
|
||||
static inline uint16 *
|
||||
my_char_weight_addr(CHARSET_INFO *cs, uint wc)
|
||||
{
|
||||
uint page, ofst;
|
||||
uchar *ucal= cs->sort_order;
|
||||
uint16 **ucaw= cs->sort_order_big;
|
||||
|
||||
return wc > MAX_UCA_CHAR_WITH_EXPLICIT_WEIGHT ? NULL :
|
||||
(ucaw[page= (wc >> 8)] ?
|
||||
ucaw[page] + (ofst= (wc & 0xFF)) * ucal[page] :
|
||||
NULL);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
This function compares if two characters are the same.
|
||||
The sign +1 or -1 does not matter. The only
|
||||
@ -7332,17 +7360,20 @@ static size_t my_strnxfrm_uca(CHARSET_INFO *cs,
|
||||
|
||||
static int my_uca_charcmp(CHARSET_INFO *cs, my_wc_t wc1, my_wc_t wc2)
|
||||
{
|
||||
size_t page1= wc1 >> MY_UCA_PSHIFT;
|
||||
size_t page2= wc2 >> MY_UCA_PSHIFT;
|
||||
uchar *ucal= cs->sort_order;
|
||||
uint16 **ucaw= cs->sort_order_big;
|
||||
size_t length1= ucal[page1];
|
||||
size_t length2= ucal[page2];
|
||||
uint16 *weight1= ucaw[page1] + (wc1 & MY_UCA_CMASK) * ucal[page1];
|
||||
uint16 *weight2= ucaw[page2] + (wc2 & MY_UCA_CMASK) * ucal[page2];
|
||||
size_t length1, length2;
|
||||
uint16 *weight1= my_char_weight_addr(cs, wc1);
|
||||
uint16 *weight2= my_char_weight_addr(cs, wc2);
|
||||
|
||||
if (!weight1 || !weight2)
|
||||
return wc1 != wc2;
|
||||
|
||||
/* Quickly compare first weights */
|
||||
if (weight1[0] != weight2[0])
|
||||
return 1;
|
||||
|
||||
/* Thoroughly compare all weights */
|
||||
length1= cs->sort_order[wc1 >> MY_UCA_PSHIFT];
|
||||
length2= cs->sort_order[wc2 >> MY_UCA_PSHIFT];
|
||||
|
||||
if (length1 > length2)
|
||||
return memcmp((const void*)weight1, (const void*)weight2, length2*2) ?
|
||||
@ -7924,6 +7955,11 @@ static my_bool create_tailoring(CHARSET_INFO *cs, void *(*alloc)(size_t))
|
||||
*/
|
||||
for (i=0; i < rc; i++)
|
||||
{
|
||||
/* check if the shift or the reset characters are out of range */
|
||||
if (rule[i].curr[0] > MAX_UCA_CHAR_WITH_EXPLICIT_WEIGHT ||
|
||||
rule[i].base > MAX_UCA_CHAR_WITH_EXPLICIT_WEIGHT)
|
||||
return 1;
|
||||
|
||||
if (!rule[i].curr[1]) /* If not a contraction */
|
||||
{
|
||||
uint pageb= (rule[i].base >> 8) & 0xFF;
|
||||
|
@ -1009,6 +1009,7 @@ static Bigint *pow5mult(Bigint *b, int k, Stack_alloc *alloc)
|
||||
Bigint *b1, *p5, *p51=NULL;
|
||||
int i;
|
||||
static int p05[3]= { 5, 25, 125 };
|
||||
my_bool overflow= FALSE;
|
||||
|
||||
if ((i= k & 3))
|
||||
b= multadd(b, p05[i-1], 0, alloc);
|
||||
@ -1027,16 +1028,19 @@ static Bigint *pow5mult(Bigint *b, int k, Stack_alloc *alloc)
|
||||
if (!(k>>= 1))
|
||||
break;
|
||||
/* Calculate next power of 5 */
|
||||
if (p5 < p5_a + P5A_MAX)
|
||||
++p5;
|
||||
else if (p5 == p5_a + P5A_MAX)
|
||||
p5= mult(p5, p5, alloc);
|
||||
else
|
||||
if (overflow)
|
||||
{
|
||||
p51= mult(p5, p5, alloc);
|
||||
Bfree(p5, alloc);
|
||||
p5= p51;
|
||||
}
|
||||
else if (p5 < p5_a + P5A_MAX)
|
||||
++p5;
|
||||
else if (p5 == p5_a + P5A_MAX)
|
||||
{
|
||||
p5= mult(p5, p5, alloc);
|
||||
overflow= TRUE;
|
||||
}
|
||||
}
|
||||
if (p51)
|
||||
Bfree(p51, alloc);
|
||||
|
@ -247,7 +247,7 @@ Distribution: %{distro_description}
|
||||
License: Copyright (c) 2000, @MYSQL_COPYRIGHT_YEAR@, %{mysql_vendor}. All rights reserved. Under %{license_type} license as shown in the Description field.
|
||||
Source: http://www.mysql.com/Downloads/MySQL-@MYSQL_BASE_VERSION@/%{src_dir}.tar.gz
|
||||
URL: http://www.mysql.com/
|
||||
Packager: MySQL Build Team <build@mysql.com>
|
||||
Packager: MySQL Release Engineering <mysql-build@oss.oracle.com>
|
||||
Vendor: %{mysql_vendor}
|
||||
Provides: msqlormysql MySQL-server mysql
|
||||
BuildRequires: %{distro_buildreq}
|
||||
@ -961,7 +961,7 @@ echo "=====" >> $STATUS_HISTORY
|
||||
# Files section
|
||||
##############################################################################
|
||||
|
||||
%files -n MySQL-server%{product_suffix}
|
||||
%files -n MySQL-server%{product_suffix} -f release/support-files/plugins.files
|
||||
%defattr(-,root,root,0755)
|
||||
|
||||
%if %{defined license_files_server}
|
||||
@ -1002,6 +1002,7 @@ echo "=====" >> $STATUS_HISTORY
|
||||
%doc %attr(644, root, man) %{_mandir}/man1/replace.1*
|
||||
%doc %attr(644, root, man) %{_mandir}/man1/resolve_stack_dump.1*
|
||||
%doc %attr(644, root, man) %{_mandir}/man1/resolveip.1*
|
||||
%doc %attr(644, root, man) %{_mandir}/man1/mysql_plugin.1*
|
||||
|
||||
%ghost %config(noreplace,missingok) %{_sysconfdir}/my.cnf
|
||||
|
||||
@ -1019,6 +1020,7 @@ echo "=====" >> $STATUS_HISTORY
|
||||
%attr(755, root, root) %{_bindir}/mysql_setpermission
|
||||
%attr(755, root, root) %{_bindir}/mysql_tzinfo_to_sql
|
||||
%attr(755, root, root) %{_bindir}/mysql_upgrade
|
||||
%attr(755, root, root) %{_bindir}/mysql_plugin
|
||||
%attr(755, root, root) %{_bindir}/mysql_zap
|
||||
%attr(755, root, root) %{_bindir}/mysqlbug
|
||||
%attr(755, root, root) %{_bindir}/mysqld_multi
|
||||
@ -1034,29 +1036,7 @@ echo "=====" >> $STATUS_HISTORY
|
||||
%attr(755, root, root) %{_sbindir}/mysqld
|
||||
%attr(755, root, root) %{_sbindir}/mysqld-debug
|
||||
%attr(755, root, root) %{_sbindir}/rcmysql
|
||||
%attr(755, root, root) %{_libdir}/mysql/plugin/adt_null.so
|
||||
%attr(755, root, root) %{_libdir}/mysql/plugin/libdaemon_example.so
|
||||
%attr(755, root, root) %{_libdir}/mysql/plugin/daemon_example.ini
|
||||
%attr(755, root, root) %{_libdir}/mysql/plugin/mypluglib.so
|
||||
%attr(755, root, root) %{_libdir}/mysql/plugin/semisync_master.so
|
||||
%attr(755, root, root) %{_libdir}/mysql/plugin/semisync_slave.so
|
||||
%attr(755, root, root) %{_libdir}/mysql/plugin/auth.so
|
||||
%attr(755, root, root) %{_libdir}/mysql/plugin/auth_socket.so
|
||||
%attr(755, root, root) %{_libdir}/mysql/plugin/auth_test_plugin.so
|
||||
%attr(755, root, root) %{_libdir}/mysql/plugin/qa_auth_client.so
|
||||
%attr(755, root, root) %{_libdir}/mysql/plugin/qa_auth_interface.so
|
||||
%attr(755, root, root) %{_libdir}/mysql/plugin/qa_auth_server.so
|
||||
%attr(755, root, root) %{_libdir}/mysql/plugin/debug/adt_null.so
|
||||
%attr(755, root, root) %{_libdir}/mysql/plugin/debug/libdaemon_example.so
|
||||
%attr(755, root, root) %{_libdir}/mysql/plugin/debug/mypluglib.so
|
||||
%attr(755, root, root) %{_libdir}/mysql/plugin/debug/semisync_master.so
|
||||
%attr(755, root, root) %{_libdir}/mysql/plugin/debug/semisync_slave.so
|
||||
%attr(755, root, root) %{_libdir}/mysql/plugin/debug/auth.so
|
||||
%attr(755, root, root) %{_libdir}/mysql/plugin/debug/auth_socket.so
|
||||
%attr(755, root, root) %{_libdir}/mysql/plugin/debug/auth_test_plugin.so
|
||||
%attr(755, root, root) %{_libdir}/mysql/plugin/debug/qa_auth_client.so
|
||||
%attr(755, root, root) %{_libdir}/mysql/plugin/debug/qa_auth_interface.so
|
||||
%attr(755, root, root) %{_libdir}/mysql/plugin/debug/qa_auth_server.so
|
||||
|
||||
%if %{WITH_TCMALLOC}
|
||||
%attr(755, root, root) %{_libdir}/mysql/%{malloc_lib_target}
|
||||
@ -1162,6 +1142,10 @@ echo "=====" >> $STATUS_HISTORY
|
||||
|
||||
- "make_win_bin_dist" and its manual are dropped, cmake does it different.
|
||||
|
||||
* Thu Sep 08 2011 Daniel Fischer <daniel.fischer@oracle.com>
|
||||
|
||||
- Add mysql_plugin man page.
|
||||
|
||||
* Tue Aug 30 2011 Joerg Bruehe <joerg.bruehe@oracle.com>
|
||||
|
||||
- Add the manual page for "mysql_plugin" to the server package.
|
||||
@ -1171,6 +1155,10 @@ echo "=====" >> $STATUS_HISTORY
|
||||
- Null-upmerge the fix of bug#37165: This spec file is not affected.
|
||||
- Replace "/var/lib/mysql" by the spec file variable "%{mysqldatadir}".
|
||||
|
||||
* Fri Aug 12 2011 Daniel Fischer <daniel.fischer@oracle.com>
|
||||
|
||||
- Source plugin library files list from cmake-generated file.
|
||||
|
||||
* Mon Jul 25 2011 Chuck Bell <chuck.bell@oracle.com>
|
||||
|
||||
- Added the mysql_plugin client - enables or disables plugins.
|
||||
|
Loading…
x
Reference in New Issue
Block a user