mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 11:01:52 +01:00
Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-target-5.1.22
into whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb-merge
This commit is contained in:
commit
0c38530b82
193 changed files with 6897 additions and 5218 deletions
|
@ -3,7 +3,13 @@
|
|||
# Assume Forte is installed in /opt/SUNWSpro and ld is installed in
|
||||
# /usr/ccs/bin
|
||||
|
||||
PATH=/opt/SUNWspro/bin/:/usr/ccs/bin:$PATH
|
||||
PATH=/opt/SUNWspro/bin:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin:$PATH
|
||||
|
||||
prefix="/usr/local/mysql"
|
||||
if test -n "$MYSQL_BUILD_PREFIX"
|
||||
then
|
||||
prefix="$MYSQL_BUILD_PREFIX"
|
||||
fi
|
||||
|
||||
make -k maintainer-clean || true
|
||||
/bin/rm -f */.deps/*.P config.cache
|
||||
|
@ -12,9 +18,9 @@ path=`dirname $0`
|
|||
. "$path/autorun.sh"
|
||||
|
||||
# For "optimal" code for this computer add -fast to EXTRA
|
||||
# To compile 64 bit, add -xarch=v9 to EXTRA_64_BIT
|
||||
# To compile 32/64 bit, uncomment/comment EXTRA_64_BIT
|
||||
|
||||
EXTRA_64_BIT="-xarch=v9" # Remove comment to get 64 bit binaries
|
||||
EXTRA_64_BIT="-m64"
|
||||
EXTRA="-fast" # Remove comment to target current machine
|
||||
|
||||
#
|
||||
|
@ -22,10 +28,9 @@ EXTRA="-fast" # Remove comment to target current machine
|
|||
#
|
||||
|
||||
STD="-mt -D_FORTEC_ $EXTRA $EXTRA_64_BIT"
|
||||
ASFLAGS="$EXTRA_64_BIT" \
|
||||
CC=cc-5.0 CFLAGS="-Xa -xstrconst $STD" \
|
||||
CXX=CC CXXFLAGS="-noex $STD" \
|
||||
./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client
|
||||
./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --prefix=$PREFIX
|
||||
|
||||
make -j 4
|
||||
if [ $? = 0 ]
|
||||
|
|
|
@ -21,22 +21,6 @@ INCLUDE(win/configure.data)
|
|||
# Hardcode support for CSV storage engine
|
||||
SET(WITH_CSV_STORAGE_ENGINE TRUE)
|
||||
|
||||
# CMAKE will not allow custom VS7+ configurations. mysqld and libmysqld
|
||||
# cannot be built at the same time as they require different configurations
|
||||
IF(EMBEDDED_ONLY)
|
||||
ADD_DEFINITIONS(-DEMBEDDED_LIBRARY)
|
||||
# By default, CMake will create Release, Debug, RelWithDebInfo and MinSizeRel
|
||||
# configurations. The EMBEDDED_ONLY build parameter is necessary because CMake
|
||||
# doesn't support custom build configurations for VS2005. Since the Debug
|
||||
# configuration does not work properly with USE_TLS defined
|
||||
# (see mysys/CMakeLists.txt) the easiest way to debug the Embedded Server is to
|
||||
# use the RelWithDebInfo configuration without optimizations.
|
||||
#
|
||||
# Debug default CXX_FLAGS "/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1"
|
||||
# RelWithDebInfo default CXX_FLAGS "/MD /Zi /O2 /Ob1 /D NDEBUG"
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MD /Zi /Od /Ob0 /D NDEBUG" CACHE STRING "No Optimization" FORCE)
|
||||
ENDIF(EMBEDDED_ONLY)
|
||||
|
||||
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/include/mysql_version.h.in
|
||||
${CMAKE_SOURCE_DIR}/include/mysql_version.h @ONLY)
|
||||
|
||||
|
@ -154,7 +138,9 @@ IF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR
|
|||
ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR
|
||||
CMAKE_GENERATOR MATCHES "Visual Studio 8")
|
||||
|
||||
ADD_DEFINITIONS("-D_WINDOWS -D__WIN__ -D_CRT_SECURE_NO_DEPRECATE")
|
||||
IF(WIN32)
|
||||
ADD_DEFINITIONS("-D_WINDOWS -D__WIN__ -D_CRT_SECURE_NO_DEPRECATE")
|
||||
ENDIF(WIN32)
|
||||
|
||||
IF(EMBED_MANIFESTS)
|
||||
# Search for the tools (mt, makecat, signtool) necessary for embedding
|
||||
|
@ -229,7 +215,7 @@ ADD_SUBDIRECTORY(extra)
|
|||
ADD_SUBDIRECTORY(storage/heap)
|
||||
ADD_SUBDIRECTORY(storage/myisam)
|
||||
ADD_SUBDIRECTORY(storage/myisammrg)
|
||||
|
||||
ADD_SUBDIRECTORY(client)
|
||||
IF(WITH_ARCHIVE_STORAGE_ENGINE)
|
||||
ADD_SUBDIRECTORY(storage/archive)
|
||||
ENDIF(WITH_ARCHIVE_STORAGE_ENGINE)
|
||||
|
@ -248,13 +234,11 @@ ENDIF(WITH_FEDERATED_STORAGE_ENGINE)
|
|||
IF(WITH_INNOBASE_STORAGE_ENGINE)
|
||||
ADD_SUBDIRECTORY(storage/innobase)
|
||||
ENDIF(WITH_INNOBASE_STORAGE_ENGINE)
|
||||
ADD_SUBDIRECTORY(sql)
|
||||
ADD_SUBDIRECTORY(server-tools/instance-manager)
|
||||
ADD_SUBDIRECTORY(libmysql)
|
||||
IF(EMBEDDED_ONLY)
|
||||
ADD_SUBDIRECTORY(tests)
|
||||
IF(WITH_EMBEDDED_SERVER)
|
||||
ADD_SUBDIRECTORY(libmysqld)
|
||||
ADD_SUBDIRECTORY(libmysqld/examples)
|
||||
ELSE(EMBEDDED_ONLY)
|
||||
ADD_SUBDIRECTORY(client)
|
||||
ADD_SUBDIRECTORY(sql)
|
||||
ADD_SUBDIRECTORY(server-tools/instance-manager)
|
||||
ADD_SUBDIRECTORY(tests)
|
||||
ENDIF(EMBEDDED_ONLY)
|
||||
ENDIF(WITH_EMBEDDED_SERVER)
|
||||
|
|
|
@ -196,6 +196,8 @@ void tee_putc(int c, FILE *file);
|
|||
static void tee_print_sized_data(const char *, unsigned int, unsigned int, bool);
|
||||
/* The names of functions that actually do the manipulation. */
|
||||
static int get_options(int argc,char **argv);
|
||||
extern "C" my_bool get_one_option(int optid, const struct my_option *opt,
|
||||
char *argument);
|
||||
static int com_quit(String *str,char*),
|
||||
com_go(String *str,char*), com_ego(String *str,char*),
|
||||
com_print(String *str,char*),
|
||||
|
@ -349,8 +351,8 @@ static ulong start_timer(void);
|
|||
static void end_timer(ulong start_time,char *buff);
|
||||
static void mysql_end_timer(ulong start_time,char *buff);
|
||||
static void nice_time(double sec,char *buff,bool part_second);
|
||||
static sig_handler mysql_end(int sig);
|
||||
static sig_handler handle_sigint(int sig);
|
||||
extern "C" sig_handler mysql_end(int sig);
|
||||
extern "C" sig_handler handle_sigint(int sig);
|
||||
|
||||
int main(int argc,char *argv[])
|
||||
{
|
||||
|
@ -814,7 +816,7 @@ and you are welcome to modify and redistribute it under the GPL license\n");
|
|||
}
|
||||
|
||||
|
||||
static my_bool
|
||||
my_bool
|
||||
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
char *argument)
|
||||
{
|
||||
|
@ -1427,7 +1429,7 @@ static bool add_line(String &buffer,char *line,char *in_string,
|
|||
#ifdef HAVE_READLINE
|
||||
|
||||
static char *new_command_generator(const char *text, int);
|
||||
static char **new_mysql_completion (const char *text, int start, int end);
|
||||
extern "C" char **new_mysql_completion (const char *text, int start, int end);
|
||||
|
||||
/*
|
||||
Tell the GNU Readline library how to complete. We want to try to complete
|
||||
|
@ -1436,9 +1438,9 @@ static char **new_mysql_completion (const char *text, int start, int end);
|
|||
*/
|
||||
|
||||
#if defined(USE_NEW_READLINE_INTERFACE) || defined(USE_LIBEDIT_INTERFACE)
|
||||
char *no_completion(const char*,int)
|
||||
extern "C" char *no_completion(const char*,int)
|
||||
#else
|
||||
char *no_completion()
|
||||
extern "C" char *no_completion()
|
||||
#endif
|
||||
{
|
||||
return 0; /* No filename completion */
|
||||
|
@ -1540,9 +1542,9 @@ static void initialize_readline (char *name)
|
|||
array of matches, or NULL if there aren't any.
|
||||
*/
|
||||
|
||||
static char **new_mysql_completion (const char *text,
|
||||
int start __attribute__((unused)),
|
||||
int end __attribute__((unused)))
|
||||
char **new_mysql_completion (const char *text,
|
||||
int start __attribute__((unused)),
|
||||
int end __attribute__((unused)))
|
||||
{
|
||||
if (!status.batch && !quick)
|
||||
#if defined(USE_NEW_READLINE_INTERFACE)
|
||||
|
|
|
@ -451,7 +451,7 @@ static int run_query(const char *query, DYNAMIC_STRING *ds_res,
|
|||
MYF(MY_WME))) < 0)
|
||||
die("Failed to create temporary file for defaults");
|
||||
|
||||
if (my_write(fd, query, strlen(query),
|
||||
if (my_write(fd, (uchar*) query, strlen(query),
|
||||
MYF(MY_FNABP | MY_WME)))
|
||||
die("Failed to write to '%s'", query_file_path);
|
||||
|
||||
|
|
|
@ -71,10 +71,12 @@ static uint ex_var_count, max_var_length, max_val_length;
|
|||
|
||||
static void print_version(void);
|
||||
static void usage(void);
|
||||
extern "C" my_bool get_one_option(int optid, const struct my_option *opt,
|
||||
char *argument);
|
||||
static my_bool sql_connect(MYSQL *mysql, uint wait);
|
||||
static int execute_commands(MYSQL *mysql,int argc, char **argv);
|
||||
static int drop_db(MYSQL *mysql,const char *db);
|
||||
static sig_handler endprog(int signal_number);
|
||||
extern "C" sig_handler endprog(int signal_number);
|
||||
static void nice_time(ulong sec,char *buff);
|
||||
static void print_header(MYSQL_RES *result);
|
||||
static void print_top(MYSQL_RES *result);
|
||||
|
@ -230,7 +232,7 @@ static struct my_option my_long_options[] =
|
|||
|
||||
static const char *load_default_groups[]= { "mysqladmin","client",0 };
|
||||
|
||||
static my_bool
|
||||
my_bool
|
||||
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
char *argument)
|
||||
{
|
||||
|
@ -430,7 +432,7 @@ int main(int argc,char *argv[])
|
|||
}
|
||||
|
||||
|
||||
static sig_handler endprog(int signal_number __attribute__((unused)))
|
||||
sig_handler endprog(int signal_number __attribute__((unused)))
|
||||
{
|
||||
interrupted=1;
|
||||
}
|
||||
|
|
|
@ -1030,14 +1030,14 @@ static int dump_log_entries(const char* logname)
|
|||
like CREATE PROCEDURE safely
|
||||
*/
|
||||
fprintf(result_file, "DELIMITER /*!*/;\n");
|
||||
strcpy(print_event_info.delimiter, "/*!*/;");
|
||||
strmov(print_event_info.delimiter, "/*!*/;");
|
||||
|
||||
rc= (remote_opt ? dump_remote_log_entries(&print_event_info, logname) :
|
||||
dump_local_log_entries(&print_event_info, logname));
|
||||
|
||||
/* Set delimiter back to semicolon */
|
||||
fprintf(result_file, "DELIMITER ;\n");
|
||||
strcpy(print_event_info.delimiter, ";");
|
||||
strmov(print_event_info.delimiter, ";");
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
|
@ -677,7 +677,7 @@ static void print_result()
|
|||
*/
|
||||
if (found_error && opt_auto_repair && what_to_do != DO_REPAIR &&
|
||||
strcmp(row[3],"OK"))
|
||||
insert_dynamic(&tables4repair, prev);
|
||||
insert_dynamic(&tables4repair, (uchar*) prev);
|
||||
found_error=0;
|
||||
if (opt_silent)
|
||||
continue;
|
||||
|
@ -697,7 +697,7 @@ static void print_result()
|
|||
}
|
||||
/* add the last table to be repaired to the list */
|
||||
if (found_error && opt_auto_repair && what_to_do != DO_REPAIR)
|
||||
insert_dynamic(&tables4repair, prev);
|
||||
insert_dynamic(&tables4repair, (uchar*) prev);
|
||||
mysql_free_result(res);
|
||||
}
|
||||
|
||||
|
|
|
@ -3913,9 +3913,9 @@ static int init_dumping(char *database, int init_func(char*))
|
|||
|
||||
/* Return 1 if we should copy the table */
|
||||
|
||||
my_bool include_table(const char* hash_key, uint len)
|
||||
my_bool include_table(const uchar *hash_key, size_t len)
|
||||
{
|
||||
return !hash_search(&ignore_table, (uchar*) hash_key, len);
|
||||
return !hash_search(&ignore_table, hash_key, len);
|
||||
}
|
||||
|
||||
|
||||
|
@ -3943,7 +3943,7 @@ static int dump_all_tables_in_db(char *database)
|
|||
for (numrows= 0 ; (table= getTableName(1)) ; )
|
||||
{
|
||||
char *end= strmov(afterdot, table);
|
||||
if (include_table(hash_key,end - hash_key))
|
||||
if (include_table((uchar*) hash_key,end - hash_key))
|
||||
{
|
||||
numrows++;
|
||||
dynstr_append_checked(&query, quote_name(table, table_buff, 1));
|
||||
|
@ -3964,7 +3964,7 @@ static int dump_all_tables_in_db(char *database)
|
|||
while ((table= getTableName(0)))
|
||||
{
|
||||
char *end= strmov(afterdot, table);
|
||||
if (include_table(hash_key, end - hash_key))
|
||||
if (include_table((uchar*) hash_key, end - hash_key))
|
||||
{
|
||||
dump_table(table,database);
|
||||
my_free(order_by, MYF(MY_ALLOW_ZERO_PTR));
|
||||
|
@ -4043,7 +4043,7 @@ static my_bool dump_all_views_in_db(char *database)
|
|||
for (numrows= 0 ; (table= getTableName(1)); )
|
||||
{
|
||||
char *end= strmov(afterdot, table);
|
||||
if (include_table(hash_key,end - hash_key))
|
||||
if (include_table((uchar*) hash_key,end - hash_key))
|
||||
{
|
||||
numrows++;
|
||||
dynstr_append_checked(&query, quote_name(table, table_buff, 1));
|
||||
|
@ -4064,7 +4064,7 @@ static my_bool dump_all_views_in_db(char *database)
|
|||
while ((table= getTableName(0)))
|
||||
{
|
||||
char *end= strmov(afterdot, table);
|
||||
if (include_table(hash_key, end - hash_key))
|
||||
if (include_table((uchar*) hash_key, end - hash_key))
|
||||
get_view_structure(table, database);
|
||||
}
|
||||
if (opt_xml)
|
||||
|
|
|
@ -1354,7 +1354,7 @@ get_options(int *argc,char ***argv)
|
|||
}
|
||||
tmp_string= (char *)my_malloc(sbuf.st_size + 1,
|
||||
MYF(MY_ZEROFILL|MY_FAE|MY_WME));
|
||||
my_read(data_file, tmp_string, sbuf.st_size, MYF(0));
|
||||
my_read(data_file, (uchar*) tmp_string, sbuf.st_size, MYF(0));
|
||||
tmp_string[sbuf.st_size]= '\0';
|
||||
my_close(data_file,MYF(0));
|
||||
parse_delimiter(tmp_string, &create_statements, delimiter[0]);
|
||||
|
@ -1381,7 +1381,7 @@ get_options(int *argc,char ***argv)
|
|||
}
|
||||
tmp_string= (char *)my_malloc(sbuf.st_size + 1,
|
||||
MYF(MY_ZEROFILL|MY_FAE|MY_WME));
|
||||
my_read(data_file, tmp_string, sbuf.st_size, MYF(0));
|
||||
my_read(data_file, (uchar*) tmp_string, sbuf.st_size, MYF(0));
|
||||
tmp_string[sbuf.st_size]= '\0';
|
||||
my_close(data_file,MYF(0));
|
||||
if (user_supplied_query)
|
||||
|
@ -1412,7 +1412,7 @@ get_options(int *argc,char ***argv)
|
|||
}
|
||||
tmp_string= (char *)my_malloc(sbuf.st_size + 1,
|
||||
MYF(MY_ZEROFILL|MY_FAE|MY_WME));
|
||||
my_read(data_file, tmp_string, sbuf.st_size, MYF(0));
|
||||
my_read(data_file, (uchar*) tmp_string, sbuf.st_size, MYF(0));
|
||||
tmp_string[sbuf.st_size]= '\0';
|
||||
my_close(data_file,MYF(0));
|
||||
if (user_supplied_pre_statements)
|
||||
|
@ -1443,7 +1443,7 @@ get_options(int *argc,char ***argv)
|
|||
}
|
||||
tmp_string= (char *)my_malloc(sbuf.st_size + 1,
|
||||
MYF(MY_ZEROFILL|MY_FAE|MY_WME));
|
||||
my_read(data_file, tmp_string, sbuf.st_size, MYF(0));
|
||||
my_read(data_file, (uchar*) tmp_string, sbuf.st_size, MYF(0));
|
||||
tmp_string[sbuf.st_size]= '\0';
|
||||
my_close(data_file,MYF(0));
|
||||
if (user_supplied_post_statements)
|
||||
|
@ -2076,7 +2076,7 @@ print_conclusions_csv(conclusions *con)
|
|||
con->users, /* Children used */
|
||||
con->avg_rows /* Queries run */
|
||||
);
|
||||
my_write(csv_file, buffer, (uint)strlen(buffer), MYF(0));
|
||||
my_write(csv_file, (uchar*) buffer, (uint)strlen(buffer), MYF(0));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -1514,7 +1514,7 @@ void var_query_set(VAR *var, const char *query, const char** query_end)
|
|||
|
||||
void var_set_query_get_value(struct st_command *command, VAR *var)
|
||||
{
|
||||
ulong row_no;
|
||||
long row_no;
|
||||
int col_no= -1;
|
||||
MYSQL_RES* res;
|
||||
MYSQL* mysql= &cur_con->mysql;
|
||||
|
@ -1591,7 +1591,7 @@ void var_set_query_get_value(struct st_command *command, VAR *var)
|
|||
|
||||
while ((row= mysql_fetch_row(res)))
|
||||
{
|
||||
if (++rows == row_no)
|
||||
if (++rows == (ulong) row_no)
|
||||
{
|
||||
|
||||
DBUG_PRINT("info", ("At row %ld, column %d is '%s'",
|
||||
|
@ -2584,7 +2584,7 @@ void do_send_quit(struct st_command *command)
|
|||
DBUG_PRINT("info", ("con->name: %s", con->name));
|
||||
if (!strcmp(con->name, name))
|
||||
{
|
||||
simple_command(&con->mysql,COM_QUIT,NullS,0,1);
|
||||
simple_command(&con->mysql,COM_QUIT,0,0,1);
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -805,10 +805,8 @@ copy_and_convert(char *to, uint32 to_length, CHARSET_INFO *to_cs,
|
|||
const uchar *from_end= (const uchar*) from+from_length;
|
||||
char *to_start= to;
|
||||
uchar *to_end= (uchar*) to+to_length;
|
||||
int (*mb_wc)(struct charset_info_st *, my_wc_t *, const uchar *,
|
||||
const uchar *) = from_cs->cset->mb_wc;
|
||||
int (*wc_mb)(struct charset_info_st *, my_wc_t, uchar *s, uchar *e)=
|
||||
to_cs->cset->wc_mb;
|
||||
my_charset_conv_mb_wc mb_wc= from_cs->cset->mb_wc;
|
||||
my_charset_conv_wc_mb wc_mb= to_cs->cset->wc_mb;
|
||||
uint error_count= 0;
|
||||
|
||||
while (1)
|
||||
|
|
|
@ -743,7 +743,7 @@ AC_CHECK_HEADERS(fcntl.h float.h floatingpoint.h ieeefp.h limits.h \
|
|||
unistd.h utime.h sys/utime.h termio.h termios.h sched.h crypt.h alloca.h \
|
||||
sys/ioctl.h malloc.h sys/malloc.h sys/ipc.h sys/shm.h linux/config.h \
|
||||
sys/prctl.h \
|
||||
sys/resource.h sys/param.h port.h)
|
||||
sys/resource.h sys/param.h port.h ieeefp.h)
|
||||
|
||||
AC_CHECK_HEADERS([xfs/xfs.h])
|
||||
|
||||
|
@ -757,6 +757,7 @@ AC_CHECK_LIB(m, floor, [], AC_CHECK_LIB(m, __infinity))
|
|||
AC_CHECK_LIB(nsl_r, gethostbyname_r, [],
|
||||
AC_CHECK_LIB(nsl, gethostbyname_r))
|
||||
AC_CHECK_FUNC(gethostbyname_r)
|
||||
AC_CHECK_LIB(mtmalloc, malloc)
|
||||
|
||||
AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
|
||||
AC_CHECK_FUNC(yp_get_default_domain, ,
|
||||
|
|
|
@ -309,9 +309,9 @@ static int insert_pointer_name(reg1 POINTER_ARRAY *pa,char * name)
|
|||
old_count*sizeof(*pa->flag));
|
||||
}
|
||||
pa->flag[pa->typelib.count]=0; /* Reset flag */
|
||||
pa->typelib.type_names[pa->typelib.count++]= pa->str+pa->length;
|
||||
pa->typelib.type_names[pa->typelib.count++]= (char*) (pa->str+pa->length);
|
||||
pa->typelib.type_names[pa->typelib.count]= NullS; /* Put end-mark */
|
||||
VOID(strmov(pa->str+pa->length,name));
|
||||
VOID(strmov((char*) pa->str + pa->length, name));
|
||||
pa->length+=length;
|
||||
DBUG_RETURN(0);
|
||||
} /* insert_pointer_name */
|
||||
|
@ -988,7 +988,8 @@ int n;
|
|||
return 0;
|
||||
|
||||
/* Read in new stuff. */
|
||||
if ((i=(int) my_read(fd, buffer + bufbytes, (uint) bufread,MYF(MY_WME))) < 0)
|
||||
if ((i=(int) my_read(fd, (uchar*) buffer + bufbytes,
|
||||
(size_t) bufread, MYF(MY_WME))) < 0)
|
||||
return -1;
|
||||
|
||||
/* Kludge to pretend every nonempty file ends with a newline. */
|
||||
|
@ -1039,7 +1040,7 @@ FILE *in,*out;
|
|||
return 1;
|
||||
if (!my_eof)
|
||||
out_buff[length++]=save_char; /* Don't write added newline */
|
||||
if (my_fwrite(out,out_buff,length,MYF(MY_WME | MY_NABP)))
|
||||
if (my_fwrite(out, (uchar*) out_buff, length, MYF(MY_WME | MY_NABP)))
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -170,6 +170,14 @@ extern MY_COLLATION_HANDLER my_collation_8bit_bin_handler;
|
|||
extern MY_COLLATION_HANDLER my_collation_8bit_simple_ci_handler;
|
||||
extern MY_COLLATION_HANDLER my_collation_ucs2_uca_handler;
|
||||
|
||||
/* Some typedef to make it easy for C++ to make function pointers */
|
||||
typedef int (*my_charset_conv_mb_wc)(struct charset_info_st *, my_wc_t *,
|
||||
const uchar *, const uchar *);
|
||||
typedef int (*my_charset_conv_wc_mb)(struct charset_info_st *, my_wc_t,
|
||||
uchar *, uchar *);
|
||||
typedef size_t (*my_charset_conv_case)(struct charset_info_st *,
|
||||
char *, size_t, char *, size_t);
|
||||
|
||||
|
||||
/* See strings/CHARSET_INFO.txt about information on this structure */
|
||||
typedef struct my_charset_handler_st
|
||||
|
@ -188,11 +196,9 @@ typedef struct my_charset_handler_st
|
|||
size_t (*numcells)(struct charset_info_st *, const char *b, const char *e);
|
||||
|
||||
/* Unicode conversion */
|
||||
int (*mb_wc)(struct charset_info_st *cs,my_wc_t *wc,
|
||||
const uchar *s,const uchar *e);
|
||||
int (*wc_mb)(struct charset_info_st *cs,my_wc_t wc,
|
||||
uchar *s,uchar *e);
|
||||
|
||||
my_charset_conv_mb_wc mb_wc;
|
||||
my_charset_conv_wc_mb wc_mb;
|
||||
|
||||
/* CTYPE scanner */
|
||||
int (*ctype)(struct charset_info_st *cs, int *ctype,
|
||||
const uchar *s, const uchar *e);
|
||||
|
@ -200,11 +206,10 @@ typedef struct my_charset_handler_st
|
|||
/* Functions for case and sort conversion */
|
||||
size_t (*caseup_str)(struct charset_info_st *, char *);
|
||||
size_t (*casedn_str)(struct charset_info_st *, char *);
|
||||
size_t (*caseup)(struct charset_info_st *, char *src, size_t srclen,
|
||||
char *dst, size_t dstlen);
|
||||
size_t (*casedn)(struct charset_info_st *, char *src, size_t srclen,
|
||||
char *dst, size_t dstlen);
|
||||
|
||||
|
||||
my_charset_conv_case caseup;
|
||||
my_charset_conv_case casedn;
|
||||
|
||||
/* Charset dependant snprintf() */
|
||||
size_t (*snprintf)(struct charset_info_st *, char *to, size_t n,
|
||||
const char *fmt,
|
||||
|
|
|
@ -225,6 +225,7 @@ extern CHARSET_INFO compiled_charsets[];
|
|||
|
||||
/* statistics */
|
||||
extern ulong my_file_opened,my_stream_opened, my_tmp_file_created;
|
||||
extern ulong my_file_total_opened;
|
||||
extern uint mysys_usage_id;
|
||||
extern my_bool my_init_done;
|
||||
|
||||
|
|
|
@ -455,7 +455,7 @@ typedef struct st_sort_info
|
|||
enum data_file_type new_data_file_type;
|
||||
MI_INFO *info;
|
||||
MI_CHECK *param;
|
||||
char *buff;
|
||||
uchar *buff;
|
||||
SORT_KEY_BLOCKS *key_block,*key_block_end;
|
||||
SORT_FT_BUF *ft_buf;
|
||||
/* sync things */
|
||||
|
|
|
@ -38,6 +38,7 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
|
|||
|
||||
# Include and add the directory path
|
||||
SET(SOURCE_SUBLIBS TRUE)
|
||||
SET(LIB_SOURCES "")
|
||||
|
||||
INCLUDE(${CMAKE_SOURCE_DIR}/zlib/CMakeLists.txt)
|
||||
FOREACH(rpath ${ZLIB_SOURCES})
|
||||
|
@ -118,16 +119,16 @@ ADD_LIBRARY(mysqlclient_notls STATIC ${CLIENT_SOURCES})
|
|||
ADD_DEPENDENCIES(mysqlclient_notls GenError)
|
||||
TARGET_LINK_LIBRARIES(mysqlclient_notls)
|
||||
|
||||
IF(NOT EMBEDDED_ONLY)
|
||||
ADD_LIBRARY(libmysql SHARED ${CLIENT_SOURCES} dll.c libmysql.def)
|
||||
ADD_LIBRARY(libmysql SHARED ${CLIENT_SOURCES} dll.c libmysql.def)
|
||||
IF(WIN32)
|
||||
SET_TARGET_PROPERTIES(libmysql mysqlclient PROPERTIES COMPILE_FLAGS "-DUSE_TLS")
|
||||
ADD_DEPENDENCIES(libmysql GenError)
|
||||
TARGET_LINK_LIBRARIES(libmysql wsock32)
|
||||
|
||||
ADD_EXECUTABLE(myTest mytest.c)
|
||||
TARGET_LINK_LIBRARIES(myTest libmysql)
|
||||
|
||||
IF(EMBED_MANIFESTS)
|
||||
MYSQL_EMBED_MANIFEST("myTest" "asInvoker")
|
||||
ENDIF(EMBED_MANIFESTS)
|
||||
ENDIF(NOT EMBEDDED_ONLY)
|
||||
ENDIF(WIN32)
|
||||
ADD_DEPENDENCIES(libmysql GenError)
|
||||
TARGET_LINK_LIBRARIES(libmysql wsock32)
|
||||
|
||||
ADD_EXECUTABLE(myTest mytest.c)
|
||||
TARGET_LINK_LIBRARIES(myTest libmysql)
|
||||
|
||||
IF(EMBED_MANIFESTS)
|
||||
MYSQL_EMBED_MANIFEST("myTest" "asInvoker")
|
||||
ENDIF(EMBED_MANIFESTS)
|
||||
|
|
|
@ -341,7 +341,7 @@ my_bool STDCALL mysql_master_send_query(MYSQL *mysql, const char *q,
|
|||
DBUG_RETURN(1);
|
||||
master->reconnect= 1;
|
||||
mysql->last_used_con = master;
|
||||
DBUG_RETURN(simple_command(master, COM_QUERY, q, length, 1));
|
||||
DBUG_RETURN(simple_command(master, COM_QUERY, (const uchar*) q, length, 1));
|
||||
}
|
||||
|
||||
|
||||
|
@ -375,7 +375,8 @@ my_bool STDCALL mysql_slave_send_query(MYSQL *mysql, const char *q,
|
|||
0,0,0,0))
|
||||
DBUG_RETURN(1);
|
||||
slave_to_use->reconnect= 1;
|
||||
DBUG_RETURN(simple_command(slave_to_use, COM_QUERY, q, length, 1));
|
||||
DBUG_RETURN(simple_command(slave_to_use, COM_QUERY, (const uchar*) q,
|
||||
length, 1));
|
||||
}
|
||||
|
||||
|
||||
|
@ -669,7 +670,8 @@ int cli_read_change_user_result(MYSQL *mysql, char *buff, const char *passwd)
|
|||
password in old format. The reply contains scramble_323.
|
||||
*/
|
||||
scramble_323(buff, mysql->scramble, passwd);
|
||||
if (my_net_write(net, buff, SCRAMBLE_LENGTH_323 + 1) || net_flush(net))
|
||||
if (my_net_write(net, (uchar*) buff, SCRAMBLE_LENGTH_323 + 1) ||
|
||||
net_flush(net))
|
||||
{
|
||||
net->last_errno= CR_SERVER_LOST;
|
||||
strmov(net->sqlstate, unknown_sqlstate);
|
||||
|
@ -720,7 +722,7 @@ my_bool STDCALL mysql_change_user(MYSQL *mysql, const char *user,
|
|||
end= strmov(end, db ? db : "") + 1;
|
||||
|
||||
/* Write authentication package */
|
||||
simple_command(mysql,COM_CHANGE_USER, buff,(ulong) (end-buff),1);
|
||||
simple_command(mysql,COM_CHANGE_USER, (uchar*) buff, (ulong) (end-buff), 1);
|
||||
|
||||
rc= (*mysql->methods->read_change_user_result)(mysql, buff, passwd);
|
||||
|
||||
|
@ -830,7 +832,7 @@ my_bool handle_local_infile(MYSQL *mysql, const char *net_filename)
|
|||
if ((*options->local_infile_init)(&li_ptr, net_filename,
|
||||
options->local_infile_userdata))
|
||||
{
|
||||
VOID(my_net_write(net,"",0)); /* Server needs one packet */
|
||||
VOID(my_net_write(net,(const uchar*) "",0)); /* Server needs one packet */
|
||||
net_flush(net);
|
||||
strmov(net->sqlstate, unknown_sqlstate);
|
||||
net->last_errno= (*options->local_infile_error)(li_ptr,
|
||||
|
@ -844,7 +846,7 @@ my_bool handle_local_infile(MYSQL *mysql, const char *net_filename)
|
|||
(*options->local_infile_read)(li_ptr, buf,
|
||||
packet_length)) > 0)
|
||||
{
|
||||
if (my_net_write(net,buf,readcount))
|
||||
if (my_net_write(net, (uchar*) buf, readcount))
|
||||
{
|
||||
DBUG_PRINT("error",
|
||||
("Lost connection to MySQL server during LOAD DATA of local file"));
|
||||
|
@ -856,7 +858,7 @@ my_bool handle_local_infile(MYSQL *mysql, const char *net_filename)
|
|||
}
|
||||
|
||||
/* Send empty packet to mark end of file */
|
||||
if (my_net_write(net,"",0) || net_flush(net))
|
||||
if (my_net_write(net, (const uchar*) "", 0) || net_flush(net))
|
||||
{
|
||||
strmov(net->sqlstate, unknown_sqlstate);
|
||||
net->last_errno=CR_SERVER_LOST;
|
||||
|
@ -1242,7 +1244,8 @@ mysql_list_fields(MYSQL *mysql, const char *table, const char *wild)
|
|||
|
||||
end=strmake(strmake(buff, table,128)+1,wild ? wild : "",128);
|
||||
free_old_query(mysql);
|
||||
if (simple_command(mysql,COM_FIELD_LIST,buff,(ulong) (end-buff),1) ||
|
||||
if (simple_command(mysql, COM_FIELD_LIST, (uchar*) buff,
|
||||
(ulong) (end-buff), 1) ||
|
||||
!(fields= (*mysql->methods->list_fields)(mysql)))
|
||||
DBUG_RETURN(NULL);
|
||||
|
||||
|
@ -1313,7 +1316,7 @@ mysql_shutdown(MYSQL *mysql, enum mysql_enum_shutdown_level shutdown_level)
|
|||
uchar level[1];
|
||||
DBUG_ENTER("mysql_shutdown");
|
||||
level[0]= (uchar) shutdown_level;
|
||||
DBUG_RETURN(simple_command(mysql, COM_SHUTDOWN, (char *)level, 1, 0));
|
||||
DBUG_RETURN(simple_command(mysql, COM_SHUTDOWN, level, 1, 0));
|
||||
}
|
||||
|
||||
|
||||
|
@ -1323,14 +1326,14 @@ mysql_refresh(MYSQL *mysql,uint options)
|
|||
uchar bits[1];
|
||||
DBUG_ENTER("mysql_refresh");
|
||||
bits[0]= (uchar) options;
|
||||
DBUG_RETURN(simple_command(mysql,COM_REFRESH,(char*) bits,1,0));
|
||||
DBUG_RETURN(simple_command(mysql, COM_REFRESH, bits, 1, 0));
|
||||
}
|
||||
|
||||
|
||||
int STDCALL
|
||||
mysql_kill(MYSQL *mysql,ulong pid)
|
||||
{
|
||||
char buff[4];
|
||||
uchar buff[4];
|
||||
DBUG_ENTER("mysql_kill");
|
||||
int4store(buff,pid);
|
||||
DBUG_RETURN(simple_command(mysql,COM_PROCESS_KILL,buff,sizeof(buff),0));
|
||||
|
@ -1340,7 +1343,7 @@ mysql_kill(MYSQL *mysql,ulong pid)
|
|||
int STDCALL
|
||||
mysql_set_server_option(MYSQL *mysql, enum enum_mysql_set_option option)
|
||||
{
|
||||
char buff[2];
|
||||
uchar buff[2];
|
||||
DBUG_ENTER("mysql_set_server_option");
|
||||
int2store(buff, (uint) option);
|
||||
DBUG_RETURN(simple_command(mysql, COM_SET_OPTION, buff, sizeof(buff), 0));
|
||||
|
@ -2059,7 +2062,7 @@ mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, ulong length)
|
|||
if ((int) stmt->state > (int) MYSQL_STMT_INIT_DONE)
|
||||
{
|
||||
/* This is second prepare with another statement */
|
||||
char buff[MYSQL_STMT_HEADER]; /* 4 bytes - stmt id */
|
||||
uchar buff[MYSQL_STMT_HEADER]; /* 4 bytes - stmt id */
|
||||
|
||||
if (reset_stmt_handle(stmt, RESET_LONG_DATA | RESET_STORE_RESULT))
|
||||
DBUG_RETURN(1);
|
||||
|
@ -2089,7 +2092,7 @@ mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, ulong length)
|
|||
}
|
||||
}
|
||||
|
||||
if (stmt_command(mysql, COM_STMT_PREPARE, query, length, stmt))
|
||||
if (stmt_command(mysql, COM_STMT_PREPARE, (const uchar*) query, length, stmt))
|
||||
{
|
||||
set_stmt_errmsg(stmt, mysql->net.last_error, mysql->net.last_errno,
|
||||
mysql->net.sqlstate);
|
||||
|
@ -2425,9 +2428,9 @@ static void store_param_str(NET *net, MYSQL_BIND *param)
|
|||
{
|
||||
/* param->length is always set in mysql_stmt_bind_param */
|
||||
ulong length= *param->length;
|
||||
char *to= (char *) net_store_length((char *) net->write_pos, length);
|
||||
uchar *to= net_store_length(net->write_pos, length);
|
||||
memcpy(to, param->buffer, length);
|
||||
net->write_pos= (uchar*) to+length;
|
||||
net->write_pos= to+length;
|
||||
}
|
||||
|
||||
|
||||
|
@ -2495,10 +2498,9 @@ static my_bool execute(MYSQL_STMT *stmt, char *packet, ulong length)
|
|||
{
|
||||
MYSQL *mysql= stmt->mysql;
|
||||
NET *net= &mysql->net;
|
||||
char buff[4 /* size of stmt id */ +
|
||||
5 /* execution flags */];
|
||||
uchar buff[4 /* size of stmt id */ +
|
||||
5 /* execution flags */];
|
||||
my_bool res;
|
||||
|
||||
DBUG_ENTER("execute");
|
||||
DBUG_DUMP("packet", packet, length);
|
||||
|
||||
|
@ -2508,7 +2510,7 @@ static my_bool execute(MYSQL_STMT *stmt, char *packet, ulong length)
|
|||
int4store(buff+5, 1); /* iteration count */
|
||||
|
||||
res= test(cli_advanced_command(mysql, COM_STMT_EXECUTE, buff, sizeof(buff),
|
||||
packet, length, 1, NULL) ||
|
||||
(uchar*) packet, length, 1, NULL) ||
|
||||
(*mysql->methods->read_query_result)(mysql));
|
||||
stmt->affected_rows= mysql->affected_rows;
|
||||
stmt->server_status= mysql->server_status;
|
||||
|
@ -2587,7 +2589,7 @@ int cli_stmt_execute(MYSQL_STMT *stmt)
|
|||
}
|
||||
length= (ulong) (net->write_pos - net->buff);
|
||||
/* TODO: Look into avoding the following memdup */
|
||||
if (!(param_data= my_memdup((const char*) net->buff, length, MYF(0))))
|
||||
if (!(param_data= my_memdup(net->buff, length, MYF(0))))
|
||||
{
|
||||
set_stmt_error(stmt, CR_OUT_OF_MEMORY, unknown_sqlstate);
|
||||
DBUG_RETURN(1);
|
||||
|
@ -2714,8 +2716,8 @@ stmt_read_row_from_cursor(MYSQL_STMT *stmt, unsigned char **row)
|
|||
MYSQL *mysql= stmt->mysql;
|
||||
NET *net= &mysql->net;
|
||||
MYSQL_DATA *result= &stmt->result;
|
||||
char buff[4 /* statement id */ +
|
||||
4 /* number of rows to fetch */];
|
||||
uchar buff[4 /* statement id */ +
|
||||
4 /* number of rows to fetch */];
|
||||
|
||||
free_root(&result->alloc, MYF(MY_KEEP_PREALLOC));
|
||||
result->data= NULL;
|
||||
|
@ -2724,7 +2726,7 @@ stmt_read_row_from_cursor(MYSQL_STMT *stmt, unsigned char **row)
|
|||
int4store(buff, stmt->stmt_id);
|
||||
int4store(buff + 4, stmt->prefetch_rows); /* number of rows to fetch */
|
||||
if ((*mysql->methods->advanced_command)(mysql, COM_STMT_FETCH,
|
||||
buff, sizeof(buff), NullS, 0,
|
||||
buff, sizeof(buff), (uchar*) 0, 0,
|
||||
1, NULL))
|
||||
{
|
||||
set_stmt_errmsg(stmt, net->last_error, net->last_errno, net->sqlstate);
|
||||
|
@ -3380,7 +3382,7 @@ mysql_stmt_send_long_data(MYSQL_STMT *stmt, uint param_number,
|
|||
{
|
||||
MYSQL *mysql= stmt->mysql;
|
||||
/* Packet header: stmt id (4 bytes), param no (2 bytes) */
|
||||
char buff[MYSQL_LONG_DATA_HEADER];
|
||||
uchar buff[MYSQL_LONG_DATA_HEADER];
|
||||
|
||||
int4store(buff, stmt->stmt_id);
|
||||
int2store(buff + 4, param_number);
|
||||
|
@ -3391,7 +3393,7 @@ mysql_stmt_send_long_data(MYSQL_STMT *stmt, uint param_number,
|
|||
This is intentional to save bandwidth.
|
||||
*/
|
||||
if ((*mysql->methods->advanced_command)(mysql, COM_STMT_SEND_LONG_DATA,
|
||||
buff, sizeof(buff), data,
|
||||
buff, sizeof(buff), (uchar*) data,
|
||||
length, 1, NULL))
|
||||
{
|
||||
set_stmt_errmsg(stmt, mysql->net.last_error,
|
||||
|
@ -3719,19 +3721,20 @@ static void fetch_long_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field,
|
|||
}
|
||||
default:
|
||||
{
|
||||
char buff[22]; /* Enough for longlong */
|
||||
char *end= longlong10_to_str(value, buff, is_unsigned ? 10: -10);
|
||||
uchar buff[22]; /* Enough for longlong */
|
||||
uchar *end= (uchar*) longlong10_to_str(value, (char*) buff,
|
||||
is_unsigned ? 10: -10);
|
||||
/* Resort to string conversion which supports all typecodes */
|
||||
uint length= (uint) (end-buff);
|
||||
|
||||
if (field->flags & ZEROFILL_FLAG && length < field->length &&
|
||||
field->length < 21)
|
||||
{
|
||||
bmove_upp((char*) buff+field->length,buff+length, length);
|
||||
bfill((char*) buff, field->length - length,'0');
|
||||
bmove_upp(buff+field->length,buff+length, length);
|
||||
bfill(buff, field->length - length,'0');
|
||||
length= field->length;
|
||||
}
|
||||
fetch_string_with_conversion(param, buff, length);
|
||||
fetch_string_with_conversion(param, (char*) buff, length);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -4785,14 +4788,14 @@ int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt)
|
|||
Server side cursor exist, tell server to start sending the rows
|
||||
*/
|
||||
NET *net= &mysql->net;
|
||||
char buff[4 /* statement id */ +
|
||||
4 /* number of rows to fetch */];
|
||||
uchar buff[4 /* statement id */ +
|
||||
4 /* number of rows to fetch */];
|
||||
|
||||
/* Send row request to the server */
|
||||
int4store(buff, stmt->stmt_id);
|
||||
int4store(buff + 4, (int)~0); /* number of rows to fetch */
|
||||
if (cli_advanced_command(mysql, COM_STMT_FETCH, buff, sizeof(buff),
|
||||
NullS, 0, 1, NULL))
|
||||
(uchar*) 0, 0, 1, NULL))
|
||||
{
|
||||
set_stmt_errmsg(stmt, net->last_error, net->last_errno, net->sqlstate);
|
||||
DBUG_RETURN(1);
|
||||
|
@ -4976,7 +4979,7 @@ static my_bool reset_stmt_handle(MYSQL_STMT *stmt, uint flags)
|
|||
Reset the server side statement and close the server side
|
||||
cursor if it exists.
|
||||
*/
|
||||
char buff[MYSQL_STMT_HEADER]; /* packet header: 4 bytes for stmt id */
|
||||
uchar buff[MYSQL_STMT_HEADER]; /* packet header: 4 bytes for stmt id */
|
||||
int4store(buff, stmt->stmt_id);
|
||||
if ((*mysql->methods->advanced_command)(mysql, COM_STMT_RESET, buff,
|
||||
sizeof(buff), 0, 0, 0, NULL))
|
||||
|
@ -5037,7 +5040,7 @@ my_bool STDCALL mysql_stmt_close(MYSQL_STMT *stmt)
|
|||
net_clear_error(&mysql->net);
|
||||
if ((int) stmt->state > (int) MYSQL_STMT_INIT_DONE)
|
||||
{
|
||||
char buff[MYSQL_STMT_HEADER]; /* 4 bytes - stmt id */
|
||||
uchar buff[MYSQL_STMT_HEADER]; /* 4 bytes - stmt id */
|
||||
|
||||
if (mysql->unbuffered_fetch_owner == &stmt->unbuffered_fetch_cancelled)
|
||||
mysql->unbuffered_fetch_owner= 0;
|
||||
|
|
|
@ -158,7 +158,7 @@ MYSQL_MANAGER* STDCALL mysql_manager_connect(MYSQL_MANAGER* con,
|
|||
}
|
||||
sprintf(msg_buf,"%-.16s %-.16s\n",user,passwd);
|
||||
msg_len=strlen(msg_buf);
|
||||
if (my_net_write(&con->net,msg_buf,msg_len) || net_flush(&con->net))
|
||||
if (my_net_write(&con->net,(uchar*) msg_buf,msg_len) || net_flush(&con->net))
|
||||
{
|
||||
con->last_errno=con->net.last_errno;
|
||||
strmov(con->last_error,"Write error on socket");
|
||||
|
@ -218,7 +218,7 @@ int STDCALL mysql_manager_command(MYSQL_MANAGER* con,const char* cmd,
|
|||
{
|
||||
if (!cmd_len)
|
||||
cmd_len=strlen(cmd);
|
||||
if (my_net_write(&con->net,(char*)cmd,cmd_len) || net_flush(&con->net))
|
||||
if (my_net_write(&con->net,(const uchar*)cmd,cmd_len) || net_flush(&con->net))
|
||||
{
|
||||
con->last_errno=errno;
|
||||
strmov(con->last_error,"Write error on socket");
|
||||
|
|
|
@ -18,7 +18,11 @@ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
|
|||
|
||||
# Need to set USE_TLS, since __declspec(thread) approach to thread local
|
||||
# storage does not work properly in DLLs.
|
||||
ADD_DEFINITIONS(-DUSE_TLS -DMYSQL_SERVER)
|
||||
IF(WIN32)
|
||||
ADD_DEFINITIONS(-DUSE_TLS)
|
||||
ENDIF(WIN32)
|
||||
|
||||
ADD_DEFINITIONS(-DMYSQL_SERVER -DEMBEDDED_LIBRARY)
|
||||
|
||||
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
|
||||
${CMAKE_SOURCE_DIR}/libmysqld
|
||||
|
@ -26,18 +30,124 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
|
|||
${CMAKE_SOURCE_DIR}/sql
|
||||
${CMAKE_SOURCE_DIR}/regex
|
||||
${CMAKE_SOURCE_DIR}/extra/yassl/include
|
||||
${CMAKE_SOURCE_DIR}/zlib
|
||||
)
|
||||
${CMAKE_SOURCE_DIR}/zlib)
|
||||
|
||||
SET_SOURCE_FILES_PROPERTIES(sql_yacc.cc
|
||||
sql_yacc.h
|
||||
message.h
|
||||
message.rc
|
||||
${CMAKE_SOURCE_DIR}/sql/sql_builtin.cc
|
||||
lex_hash.h
|
||||
PROPERTIES GENERATED 1)
|
||||
SET(GEN_SOURCES ${CMAKE_SOURCE_DIR}/sql/sql_yacc.cc
|
||||
${CMAKE_SOURCE_DIR}/sql/sql_yacc.h
|
||||
${CMAKE_SOURCE_DIR}/sql/message.h
|
||||
${CMAKE_SOURCE_DIR}/sql/message.rc
|
||||
${CMAKE_SOURCE_DIR}/sql/sql_builtin.cc
|
||||
${CMAKE_SOURCE_DIR}/sql/lex_hash.h)
|
||||
|
||||
SET_SOURCE_FILES_PROPERTIES(${GEN_SOURCES} PROPERTIES GENERATED 1)
|
||||
|
||||
# Include and add the directory path
|
||||
SET(SOURCE_SUBLIBS TRUE)
|
||||
SET(LIB_SOURCES "")
|
||||
|
||||
INCLUDE(${CMAKE_SOURCE_DIR}/zlib/CMakeLists.txt)
|
||||
FOREACH(rpath ${ZLIB_SOURCES})
|
||||
SET(LIB_SOURCES ${LIB_SOURCES} ../zlib/${rpath})
|
||||
ENDFOREACH(rpath)
|
||||
|
||||
# FIXME only needed if build type is "Debug", but CMAKE_BUILD_TYPE is
|
||||
# not set during configure time.
|
||||
INCLUDE(${CMAKE_SOURCE_DIR}/dbug/CMakeLists.txt)
|
||||
FOREACH(rpath ${DBUG_SOURCES})
|
||||
SET(LIB_SOURCES ${LIB_SOURCES} ../dbug/${rpath})
|
||||
ENDFOREACH(rpath)
|
||||
|
||||
INCLUDE(${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/CMakeLists.txt)
|
||||
FOREACH(rpath ${TAOCRYPT_SOURCES})
|
||||
SET(LIB_SOURCES ${LIB_SOURCES} ../extra/yassl/taocrypt/${rpath})
|
||||
ENDFOREACH(rpath)
|
||||
|
||||
INCLUDE(${CMAKE_SOURCE_DIR}/extra/yassl/CMakeLists.txt)
|
||||
FOREACH(rpath ${YASSL_SOURCES})
|
||||
SET(LIB_SOURCES ${LIB_SOURCES} ../extra/yassl/${rpath})
|
||||
ENDFOREACH(rpath)
|
||||
|
||||
INCLUDE(${CMAKE_SOURCE_DIR}/strings/CMakeLists.txt)
|
||||
FOREACH(rpath ${STRINGS_SOURCES})
|
||||
SET(LIB_SOURCES ${LIB_SOURCES} ../strings/${rpath})
|
||||
ENDFOREACH(rpath)
|
||||
|
||||
INCLUDE(${CMAKE_SOURCE_DIR}/regex/CMakeLists.txt)
|
||||
FOREACH(rpath ${REGEX_SOURCES})
|
||||
SET(LIB_SOURCES ${LIB_SOURCES} ../regex/${rpath})
|
||||
ENDFOREACH(rpath)
|
||||
|
||||
INCLUDE(${CMAKE_SOURCE_DIR}/mysys/CMakeLists.txt)
|
||||
FOREACH(rpath ${MYSYS_SOURCES})
|
||||
SET(LIB_SOURCES ${LIB_SOURCES} ../mysys/${rpath})
|
||||
ENDFOREACH(rpath)
|
||||
|
||||
INCLUDE(${CMAKE_SOURCE_DIR}/vio/CMakeLists.txt)
|
||||
FOREACH(rpath ${VIO_SOURCES})
|
||||
SET(LIB_SOURCES ${LIB_SOURCES} ../vio/${rpath})
|
||||
ENDFOREACH(rpath)
|
||||
|
||||
# Engines
|
||||
INCLUDE(${CMAKE_SOURCE_DIR}/storage/heap/CMakeLists.txt)
|
||||
FOREACH(rpath ${HEAP_SOURCES})
|
||||
SET(LIB_SOURCES ${LIB_SOURCES} ../storage/heap/${rpath})
|
||||
ENDFOREACH(rpath)
|
||||
|
||||
INCLUDE(${CMAKE_SOURCE_DIR}/storage/myisam/CMakeLists.txt)
|
||||
FOREACH(rpath ${MYISAM_SOURCES})
|
||||
SET(LIB_SOURCES ${LIB_SOURCES} ../storage/myisam/${rpath})
|
||||
ENDFOREACH(rpath)
|
||||
|
||||
INCLUDE(${CMAKE_SOURCE_DIR}/storage/myisammrg/CMakeLists.txt)
|
||||
FOREACH(rpath ${MYISAMMRG_SOURCES})
|
||||
SET(LIB_SOURCES ${LIB_SOURCES} ../storage/myisammrg/${rpath})
|
||||
ENDFOREACH(rpath)
|
||||
|
||||
IF(WITH_ARCHIVE_STORAGE_ENGINE)
|
||||
INCLUDE(${CMAKE_SOURCE_DIR}/storage/archive/CMakeLists.txt)
|
||||
FOREACH(rpath ${ARCHIVE_SOURCES})
|
||||
SET(LIB_SOURCES ${LIB_SOURCES} ../storage/archive/${rpath})
|
||||
ENDFOREACH(rpath)
|
||||
ENDIF(WITH_ARCHIVE_STORAGE_ENGINE)
|
||||
|
||||
IF(WITH_BLACKHOLE_STORAGE_ENGINE)
|
||||
INCLUDE(${CMAKE_SOURCE_DIR}/storage/blackhole/CMakeLists.txt)
|
||||
FOREACH(rpath ${BLACKHOLE_SOURCES})
|
||||
SET(LIB_SOURCES ${LIB_SOURCES} ../storage/blackhole/${rpath})
|
||||
ENDFOREACH(rpath)
|
||||
ENDIF(WITH_BLACKHOLE_STORAGE_ENGINE)
|
||||
|
||||
IF(WITH_EXAMPLE_STORAGE_ENGINE)
|
||||
INCLUDE(${CMAKE_SOURCE_DIR}/storage/example/CMakeLists.txt)
|
||||
FOREACH(rpath ${EXAMPLE_SOURCES})
|
||||
SET(LIB_SOURCES ${LIB_SOURCES} ../storage/example/${rpath})
|
||||
ENDFOREACH(rpath)
|
||||
ENDIF(WITH_EXAMPLE_STORAGE_ENGINE)
|
||||
|
||||
IF(WITH_FEDERATED_STORAGE_ENGINE)
|
||||
INCLUDE(${CMAKE_SOURCE_DIR}/storage/federated/CMakeLists.txt)
|
||||
FOREACH(rpath ${FEDERATED_SOURCES})
|
||||
SET(LIB_SOURCES ${LIB_SOURCES} ../storage/federated/${rpath})
|
||||
ENDFOREACH(rpath)
|
||||
ENDIF(WITH_FEDERATED_STORAGE_ENGINE)
|
||||
|
||||
IF(WITH_INNOBASE_STORAGE_ENGINE)
|
||||
INCLUDE(${CMAKE_SOURCE_DIR}/storage/innobase/CMakeLists.txt)
|
||||
FOREACH(rpath ${INNOBASE_SOURCES})
|
||||
SET(LIB_SOURCES ${LIB_SOURCES} ../storage/innobase/${rpath})
|
||||
ENDFOREACH(rpath)
|
||||
ENDIF(WITH_INNOBASE_STORAGE_ENGINE)
|
||||
|
||||
IF(WITH_CSV_STORAGE_ENGINE)
|
||||
INCLUDE(${CMAKE_SOURCE_DIR}/storage/csv/CMakeLists.txt)
|
||||
FOREACH(rpath ${CSV_SOURCES})
|
||||
SET(LIB_SOURCES ${LIB_SOURCES} ../storage/csv/${rpath})
|
||||
ENDFOREACH(rpath)
|
||||
ENDIF(WITH_CSV_STORAGE_ENGINE)
|
||||
|
||||
SET(SOURCE_SUBLIBS FALSE)
|
||||
|
||||
ADD_LIBRARY(mysqldemb emb_qcache.cc libmysqld.c lib_sql.cc
|
||||
SET(LIBMYSQLD_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc
|
||||
../libmysql/libmysql.c ../libmysql/errmsg.c ../client/get_password.c
|
||||
../sql-common/client.c ../sql-common/my_time.c
|
||||
../sql-common/my_user.c ../sql-common/pack.c
|
||||
|
@ -69,101 +179,30 @@ ADD_LIBRARY(mysqldemb emb_qcache.cc libmysqld.c lib_sql.cc
|
|||
../sql/sql_binlog.cc ../sql/sql_manager.cc ../sql/sql_map.cc
|
||||
../sql/sql_parse.cc ../sql/sql_partition.cc ../sql/sql_plugin.cc
|
||||
../sql/sql_prepare.cc ../sql/sql_rename.cc ../sql/sql_repl.cc
|
||||
../sql/sql_select.cc ../sql/sql_servers.cc ../sql/sql_builtin.cc
|
||||
../sql/sql_select.cc ../sql/sql_servers.cc
|
||||
../sql/sql_show.cc ../sql/sql_state.c ../sql/sql_string.cc
|
||||
../sql/sql_tablespace.cc ../sql/sql_table.cc ../sql/sql_test.cc
|
||||
../sql/sql_trigger.cc ../sql/sql_udf.cc ../sql/sql_union.cc
|
||||
../sql/sql_update.cc ../sql/sql_view.cc
|
||||
../sql/strfunc.cc ../sql/table.cc ../sql/thr_malloc.cc
|
||||
../sql/time.cc ../sql/tztime.cc ../sql/uniques.cc ../sql/unireg.cc
|
||||
../sql/partition_info.cc ../sql/sql_locale.cc ../sql/sql_connect.cc
|
||||
../sql/partition_info.cc ../sql/sql_connect.cc
|
||||
../sql/scheduler.cc
|
||||
../vio/vio.c ../vio/viosocket.c ../vio/viossl.c
|
||||
../vio/viosslfactories.c
|
||||
sql_yacc.cc
|
||||
sql_yacc.h
|
||||
message.h
|
||||
message.rc
|
||||
lex_hash.h)
|
||||
ADD_DEPENDENCIES(mysqldemb GenError)
|
||||
|
||||
# Sql Parser custom command
|
||||
ADD_CUSTOM_COMMAND(
|
||||
SOURCE ${PROJECT_SOURCE_DIR}/sql/sql_yacc.yy
|
||||
OUTPUT sql_yacc.cc
|
||||
COMMAND bison.exe
|
||||
ARGS -y -p MYSQL --defines=sql_yacc.h
|
||||
--output=sql_yacc.cc ${PROJECT_SOURCE_DIR}/sql/sql_yacc.yy
|
||||
DEPENDS ${PROJECT_SOURCE_DIR}/sql/sql_yacc.yy
|
||||
)
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT sql_yacc.h
|
||||
COMMAND echo
|
||||
DEPENDS ${PROJECT_SOURCE_DIR}/sql/sql_yacc.cc
|
||||
)
|
||||
|
||||
# Windows message file
|
||||
ADD_CUSTOM_COMMAND(
|
||||
SOURCE ${CMAKE_SOURCE_DIR}/sql/message.mc
|
||||
OUTPUT message.rc message.h
|
||||
COMMAND mc
|
||||
ARGS ${CMAKE_SOURCE_DIR}/sql/message.mc
|
||||
DEPENDS ${CMAKE_SOURCE_DIR}/sql/message.mc
|
||||
)
|
||||
|
||||
# Gen_lex_hash
|
||||
ADD_EXECUTABLE(gen_lex_hash ../sql/gen_lex_hash.cc)
|
||||
TARGET_LINK_LIBRARIES(gen_lex_hash dbug mysqlclient wsock32)
|
||||
GET_TARGET_PROPERTY(GEN_LEX_HASH_EXE gen_lex_hash LOCATION)
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT lex_hash.h
|
||||
COMMAND ${GEN_LEX_HASH_EXE} ARGS > lex_hash.h
|
||||
DEPENDS ${GEN_LEX_HASH_EXE}
|
||||
)
|
||||
|
||||
# Remove the auto-generated files as part of 'Clean Solution'
|
||||
SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES
|
||||
"lex_hash.h;message.rc;message.h;sql_yacc.h;sql_yacc.cc")
|
||||
|
||||
ADD_DEPENDENCIES(mysqldemb gen_lex_hash)
|
||||
${GEN_SOURCES}
|
||||
${LIB_SOURCES})
|
||||
|
||||
# Seems we cannot make a library without at least one source file. So use a
|
||||
# dummy empty file
|
||||
FILE(WRITE cmake_dummy.c " ")
|
||||
|
||||
ADD_LIBRARY(mysqlserver cmake_dummy.c)
|
||||
TARGET_LINK_LIBRARIES(mysqlserver wsock32)
|
||||
ADD_DEPENDENCIES(mysqlserver mysqldemb heap myisam myisammrg dbug mysys zlib strings mysqldemb regex
|
||||
yassl taocrypt vio)
|
||||
IF(WITH_ARCHIVE_STORAGE_ENGINE)
|
||||
ADD_DEPENDENCIES(mysqlserver archive)
|
||||
ENDIF(WITH_ARCHIVE_STORAGE_ENGINE)
|
||||
IF(WITH_EXAMPLE_STORAGE_ENGINE)
|
||||
ADD_DEPENDENCIES(mysqlserver example)
|
||||
ENDIF(WITH_EXAMPLE_STORAGE_ENGINE)
|
||||
IF(WITH_BLACKHOLE_STORAGE_ENGINE)
|
||||
TARGET_LINK_LIBRARIES(mysqlserver blackhole)
|
||||
ENDIF(WITH_BLACKHOLE_STORAGE_ENGINE)
|
||||
IF(WITH_CSV_STORAGE_ENGINE)
|
||||
TARGET_LINK_LIBRARIES(mysqlserver csv)
|
||||
ENDIF(WITH_CSV_STORAGE_ENGINE)
|
||||
IF(WITH_FEDERATED_STORAGE_ENGINE)
|
||||
ADD_DEPENDENCIES(mysqlserver federated)
|
||||
ENDIF(WITH_FEDERATED_STORAGE_ENGINE)
|
||||
IF(WITH_INNOBASE_STORAGE_ENGINE)
|
||||
ADD_DEPENDENCIES(mysqlserver innobase)
|
||||
ENDIF(WITH_INNOBASE_STORAGE_ENGINE)
|
||||
# Tried use the correct ${GEN_SOURCES} as dependency, worked on Unix
|
||||
# but not on Windows and Visual Studio generators. Likely because they
|
||||
# are no real targets from the Visual Studio project files view. Added
|
||||
# custom targets to "sql/CMakeLists.txt" and reference them here.
|
||||
ADD_LIBRARY(mysqlserver STATIC ${LIBMYSQLD_SOURCES})
|
||||
ADD_DEPENDENCIES(mysqlserver GenServerSource GenError)
|
||||
TARGET_LINK_LIBRARIES(mysqlserver)
|
||||
|
||||
ADD_LIBRARY(libmysqld MODULE cmake_dummy.c libmysqld.def)
|
||||
TARGET_LINK_LIBRARIES(libmysqld wsock32)
|
||||
ADD_DEPENDENCIES(libmysqld mysqlserver)
|
||||
IF(WITH_ARCHIVE_STORAGE_ENGINE)
|
||||
ADD_DEPENDENCIES(libmysqld archive)
|
||||
ENDIF(WITH_ARCHIVE_STORAGE_ENGINE)
|
||||
IF(WITH_BLACKHOLE_STORAGE_ENGINE)
|
||||
TARGET_LINK_LIBRARIES(libmysqld blackhole)
|
||||
ENDIF(WITH_BLACKHOLE_STORAGE_ENGINE)
|
||||
IF(WITH_CSV_STORAGE_ENGINE)
|
||||
TARGET_LINK_LIBRARIES(libmysqld csv)
|
||||
ENDIF(WITH_CSV_STORAGE_ENGINE)
|
||||
TARGET_LINK_LIBRARIES(libmysqld mysqlserver wsock32)
|
||||
|
|
|
@ -15,24 +15,24 @@
|
|||
|
||||
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
|
||||
${CMAKE_SOURCE_DIR}/libmysqld/include
|
||||
${CMAKE_SOURCE_DIR}/libmysqld/release
|
||||
${CMAKE_SOURCE_DIR}/regex
|
||||
${CMAKE_SOURCE_DIR}/zlib
|
||||
${CMAKE_SOURCE_DIR}/extra/yassl/include)
|
||||
|
||||
# Currently does not work with DBUG, there are missing symbols reported.
|
||||
ADD_DEFINITIONS(-DDBUG_OFF)
|
||||
ADD_DEFINITIONS(-DUSE_TLS)
|
||||
IF(WIN32)
|
||||
ADD_DEFINITIONS(-DUSE_TLS)
|
||||
ENDIF(WIN32)
|
||||
ADD_EXECUTABLE(mysql_embedded ../../client/completion_hash.cc
|
||||
../../client/mysql.cc ../../client/readline.cc
|
||||
../../client/sql_string.cc)
|
||||
TARGET_LINK_LIBRARIES(mysql_embedded mysys yassl taocrypt zlib dbug regex strings wsock32)
|
||||
TARGET_LINK_LIBRARIES(mysql_embedded mysys yassl taocrypt zlib debug dbug regex strings wsock32)
|
||||
ADD_DEPENDENCIES(mysql_embedded libmysqld)
|
||||
|
||||
ADD_EXECUTABLE(mysqltest_embedded ../../client/mysqltest.c)
|
||||
TARGET_LINK_LIBRARIES(mysqltest_embedded mysys yassl taocrypt zlib dbug regex strings wsock32)
|
||||
TARGET_LINK_LIBRARIES(mysqltest_embedded mysys yassl taocrypt zlib debug dbug regex strings wsock32)
|
||||
ADD_DEPENDENCIES(mysqltest_embedded libmysqld)
|
||||
|
||||
ADD_EXECUTABLE(mysql_client_test_embedded ../../tests/mysql_client_test.c)
|
||||
TARGET_LINK_LIBRARIES(mysql_client_test_embedded dbug mysys yassl taocrypt zlib strings wsock32)
|
||||
TARGET_LINK_LIBRARIES(mysql_client_test_embedded debug dbug mysys yassl taocrypt zlib strings wsock32)
|
||||
ADD_DEPENDENCIES(mysql_client_test_embedded libmysqld)
|
||||
|
|
|
@ -567,7 +567,7 @@ void init_embedded_mysql(MYSQL *mysql, int client_flag)
|
|||
void *create_embedded_thd(int client_flag)
|
||||
{
|
||||
THD * thd= new THD;
|
||||
thd->thread_id= thread_id++;
|
||||
thd->thread_id= thd->variables.pseudo_thread_id= thread_id++;
|
||||
|
||||
thd->thread_stack= (char*) &thd;
|
||||
if (thd->store_globals())
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
#
|
||||
--require r/have_bug25714.require
|
||||
disable_query_log;
|
||||
eval select LENGTH("MYSQL_BUG25714") > 0 as "have_bug25714_exe";
|
||||
eval select LENGTH("$MYSQL_BUG25714") > 0 as "have_bug25714_exe";
|
||||
enable_query_log;
|
||||
|
|
|
@ -4162,7 +4162,7 @@ sub stop_all_servers () {
|
|||
my $pid;
|
||||
|
||||
# Start shutdown of all started masters
|
||||
foreach my $mysqld (@{$master}, @{$slave})
|
||||
foreach my $mysqld (@{$slave}, @{$master})
|
||||
{
|
||||
if ( $mysqld->{'pid'} )
|
||||
{
|
||||
|
|
|
@ -41,8 +41,8 @@ BEGIN
|
|||
INSERT INTO t4 VALUES (ins1, ins2, ind);
|
||||
END
|
||||
master-bin.000001 783 Query 1 999 use `test`; INSERT INTO t4 VALUES ( NAME_CONST('ins1',_latin1 0x466F6F2773206120426172), NAME_CONST('ins2',_cp932 0xED40ED41ED42), NAME_CONST('ind',47.93))
|
||||
master-bin.000001 999 Query 1 1085 use `test`; DROP PROCEDURE bug18293
|
||||
master-bin.000001 1085 Query 1 1161 use `test`; DROP TABLE t4
|
||||
master-bin.000001 999 Query 1 1088 use `test`; DROP PROCEDURE bug18293
|
||||
master-bin.000001 1088 Query 1 1167 use `test`; DROP TABLE t4
|
||||
End of 5.0 tests
|
||||
SHOW BINLOG EVENTS FROM 364;
|
||||
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Wrong offset or I/O error
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
DROP TABLE IF EXISTS t1;
|
||||
select format(1.5555,0),format(123.5555,1),format(1234.5555,2),format(12345.55555,3),format(123456.5555,4),format(1234567.5555,5),format("12345.2399",2);
|
||||
format(1.5555,0) format(123.5555,1) format(1234.5555,2) format(12345.55555,3) format(123456.5555,4) format(1234567.5555,5) format("12345.2399",2)
|
||||
2 123.6 1,234.56 12,345.556 123,456.5555 1,234,567.55550 12,345.24
|
||||
|
@ -56,7 +57,6 @@ select a from t1 where mid(a+0,6,3) = ( mid(20040106123400,6,3) );
|
|||
a
|
||||
2004-01-06 12:34:00
|
||||
drop table t1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (conn CHAR(7), connection_id INT);
|
||||
INSERT INTO t1 VALUES ('default', CONNECTION_ID());
|
||||
SELECT GET_LOCK('bug16501',600);
|
||||
|
|
|
@ -1463,4 +1463,26 @@ where a.table_name='t1' and a.table_schema='test' and b.table_name=a.table_name;
|
|||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE a ALL NULL TABLE_SCHEMA,TABLE_NAME NULL NULL NULL Using where; Skip_open_table; Scanned 0 databases
|
||||
1 SIMPLE b ALL NULL NULL NULL NULL NULL Using where; Open_frm_only; Scanned all databases; Using join buffer
|
||||
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA
|
||||
WHERE SCHEMA_NAME = 'mysqltest';
|
||||
CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
|
||||
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA
|
||||
WHERE SCHEMA_NAME = '';
|
||||
CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
|
||||
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA
|
||||
WHERE SCHEMA_NAME = 'test';
|
||||
CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
|
||||
NULL test latin1 latin1_swedish_ci NULL
|
||||
select count(*) from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysql' AND TABLE_NAME='nonexisting';
|
||||
count(*)
|
||||
0
|
||||
select count(*) from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysql' AND TABLE_NAME='';
|
||||
count(*)
|
||||
0
|
||||
select count(*) from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='' AND TABLE_NAME='';
|
||||
count(*)
|
||||
0
|
||||
select count(*) from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='' AND TABLE_NAME='nonexisting';
|
||||
count(*)
|
||||
0
|
||||
End of 5.1 tests.
|
||||
|
|
|
@ -16,13 +16,11 @@ unlock tables;
|
|||
lock tables t1 read;
|
||||
update t1 set n = 3;
|
||||
unlock tables;
|
||||
show status like 'Table_lock%';
|
||||
show status like 'Table_locks_waited%';
|
||||
Variable_name Value
|
||||
Table_locks_immediate 17
|
||||
Table_locks_waited 1
|
||||
select * from information_schema.session_status where variable_name like 'Table_lock%';
|
||||
select * from information_schema.session_status where variable_name like 'Table_locks_waited%';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
TABLE_LOCKS_IMMEDIATE 18
|
||||
TABLE_LOCKS_WAITED 1
|
||||
drop table t1;
|
||||
select 1;
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -90,7 +90,7 @@ INSERT INTO result VALUES (@cur_val_sql_mode, 'value not restored');
|
|||
END if;
|
||||
END//
|
||||
SHOW CREATE PROCEDURE sp1;
|
||||
Procedure sql_mode Create Procedure
|
||||
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
|
||||
sp1 STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER CREATE DEFINER=`root`@`localhost` PROCEDURE `sp1`()
|
||||
BEGIN
|
||||
declare a tinyint;
|
||||
|
@ -104,7 +104,7 @@ INSERT INTO result VALUES (@cur_val_sql_mode, 'value restored');
|
|||
ELSE
|
||||
INSERT INTO result VALUES (@cur_val_sql_mode, 'value not restored');
|
||||
END if;
|
||||
END
|
||||
END latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
set @@sql_mode='';
|
||||
SHOW VARIABLES LIKE 'sql_mode';
|
||||
Variable_name Value
|
||||
|
@ -143,12 +143,12 @@ SET @@sql_mode='MAXDB';
|
|||
SHOW VARIABLES LIKE 'sql_mode';
|
||||
END//
|
||||
SHOW CREATE PROCEDURE sp2;
|
||||
Procedure sql_mode Create Procedure
|
||||
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
|
||||
sp2 STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER CREATE DEFINER=`root`@`localhost` PROCEDURE `sp2`()
|
||||
BEGIN
|
||||
SET @@sql_mode='MAXDB';
|
||||
SHOW VARIABLES LIKE 'sql_mode';
|
||||
END
|
||||
END latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
... show value prior calling procedure
|
||||
SHOW VARIABLES LIKE 'sql_mode';
|
||||
Variable_name Value
|
||||
|
|
|
@ -122,6 +122,9 @@ LAST_ALTERED <created>
|
|||
SQL_MODE
|
||||
ROUTINE_COMMENT
|
||||
DEFINER root@localhost
|
||||
CHARACTER_SET_CLIENT latin1
|
||||
COLLATION_CONNECTION latin1_swedish_ci
|
||||
DATABASE_COLLATION latin1_swedish_ci
|
||||
SPECIFIC_NAME fn_2
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
|
@ -146,6 +149,9 @@ LAST_ALTERED <created>
|
|||
SQL_MODE
|
||||
ROUTINE_COMMENT created with INVOKER
|
||||
DEFINER root@localhost
|
||||
CHARACTER_SET_CLIENT latin1
|
||||
COLLATION_CONNECTION latin1_swedish_ci
|
||||
DATABASE_COLLATION latin1_swedish_ci
|
||||
SPECIFIC_NAME sp_1
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
|
@ -168,6 +174,9 @@ LAST_ALTERED <created>
|
|||
SQL_MODE
|
||||
ROUTINE_COMMENT
|
||||
DEFINER root@localhost
|
||||
CHARACTER_SET_CLIENT latin1
|
||||
COLLATION_CONNECTION latin1_swedish_ci
|
||||
DATABASE_COLLATION latin1_swedish_ci
|
||||
SPECIFIC_NAME sp_2
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
|
@ -190,6 +199,9 @@ LAST_ALTERED <created>
|
|||
SQL_MODE
|
||||
ROUTINE_COMMENT created with INVOKER
|
||||
DEFINER root@localhost
|
||||
CHARACTER_SET_CLIENT latin1
|
||||
COLLATION_CONNECTION latin1_swedish_ci
|
||||
DATABASE_COLLATION latin1_swedish_ci
|
||||
SHOW CREATE FUNCTION fn_1;
|
||||
Function fn_1
|
||||
sql_mode
|
||||
|
@ -199,6 +211,9 @@ set @x=i1;
|
|||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW CREATE FUNCTION fn_2;
|
||||
Function fn_2
|
||||
sql_mode
|
||||
|
@ -210,6 +225,9 @@ set @x=i1;
|
|||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW CREATE PROCEDURE sp_1;
|
||||
Procedure sp_1
|
||||
sql_mode
|
||||
|
@ -217,6 +235,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
|
|||
BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW CREATE PROCEDURE sp_2;
|
||||
Procedure sp_2
|
||||
sql_mode
|
||||
|
@ -226,6 +247,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
|
|||
BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW FUNCTION STATUS LIKE 'fn_%';
|
||||
Db db_storedproc
|
||||
Name fn_1
|
||||
|
@ -235,6 +259,9 @@ Modified <modified>
|
|||
Created <created>
|
||||
Security_type DEFINER
|
||||
Comment
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
Db db_storedproc
|
||||
Name fn_2
|
||||
Type FUNCTION
|
||||
|
@ -243,6 +270,9 @@ Modified <modified>
|
|||
Created <created>
|
||||
Security_type INVOKER
|
||||
Comment created with INVOKER
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW PROCEDURE STATUS LIKE 'sp_%';
|
||||
Db db_storedproc
|
||||
Name sp_1
|
||||
|
@ -252,6 +282,9 @@ Modified <modified>
|
|||
Created <created>
|
||||
Security_type DEFINER
|
||||
Comment
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
Db db_storedproc
|
||||
Name sp_2
|
||||
Type PROCEDURE
|
||||
|
@ -260,6 +293,9 @@ Modified <modified>
|
|||
Created <created>
|
||||
Security_type INVOKER
|
||||
Comment created with INVOKER
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
|
||||
... now change some stuff:
|
||||
--------------------------
|
||||
|
@ -304,6 +340,9 @@ LAST_ALTERED <created>
|
|||
SQL_MODE
|
||||
ROUTINE_COMMENT new comment, FN changed to INVOKER
|
||||
DEFINER root@localhost
|
||||
CHARACTER_SET_CLIENT latin1
|
||||
COLLATION_CONNECTION latin1_swedish_ci
|
||||
DATABASE_COLLATION latin1_swedish_ci
|
||||
SPECIFIC_NAME fn_2
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
|
@ -328,6 +367,9 @@ LAST_ALTERED <created>
|
|||
SQL_MODE
|
||||
ROUTINE_COMMENT FN changed to DEFINER
|
||||
DEFINER root@localhost
|
||||
CHARACTER_SET_CLIENT latin1
|
||||
COLLATION_CONNECTION latin1_swedish_ci
|
||||
DATABASE_COLLATION latin1_swedish_ci
|
||||
SPECIFIC_NAME sp_1
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
|
@ -350,6 +392,9 @@ LAST_ALTERED <created>
|
|||
SQL_MODE
|
||||
ROUTINE_COMMENT new comment, SP changed to INVOKER
|
||||
DEFINER root@localhost
|
||||
CHARACTER_SET_CLIENT latin1
|
||||
COLLATION_CONNECTION latin1_swedish_ci
|
||||
DATABASE_COLLATION latin1_swedish_ci
|
||||
SPECIFIC_NAME sp_2
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
|
@ -372,6 +417,9 @@ LAST_ALTERED <created>
|
|||
SQL_MODE
|
||||
ROUTINE_COMMENT SP changed to DEFINER
|
||||
DEFINER root@localhost
|
||||
CHARACTER_SET_CLIENT latin1
|
||||
COLLATION_CONNECTION latin1_swedish_ci
|
||||
DATABASE_COLLATION latin1_swedish_ci
|
||||
SHOW CREATE FUNCTION fn_1;
|
||||
Function fn_1
|
||||
sql_mode
|
||||
|
@ -384,6 +432,9 @@ set @x=i1;
|
|||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW CREATE FUNCTION fn_2;
|
||||
Function fn_2
|
||||
sql_mode
|
||||
|
@ -395,6 +446,9 @@ set @x=i1;
|
|||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW CREATE PROCEDURE sp_1;
|
||||
Procedure sp_1
|
||||
sql_mode
|
||||
|
@ -404,6 +458,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
|
|||
BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW CREATE PROCEDURE sp_2;
|
||||
Procedure sp_2
|
||||
sql_mode
|
||||
|
@ -413,6 +470,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
|
|||
BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW FUNCTION STATUS LIKE 'fn_%';
|
||||
Db db_storedproc
|
||||
Name fn_1
|
||||
|
@ -422,6 +482,9 @@ Modified <modified>
|
|||
Created <created>
|
||||
Security_type INVOKER
|
||||
Comment new comment, FN changed to INVOKER
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
Db db_storedproc
|
||||
Name fn_2
|
||||
Type FUNCTION
|
||||
|
@ -430,6 +493,9 @@ Modified <modified>
|
|||
Created <created>
|
||||
Security_type DEFINER
|
||||
Comment FN changed to DEFINER
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW PROCEDURE STATUS LIKE 'sp_%';
|
||||
Db db_storedproc
|
||||
Name sp_1
|
||||
|
@ -439,6 +505,9 @@ Modified <modified>
|
|||
Created <created>
|
||||
Security_type INVOKER
|
||||
Comment new comment, SP changed to INVOKER
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
Db db_storedproc
|
||||
Name sp_2
|
||||
Type PROCEDURE
|
||||
|
@ -447,6 +516,9 @@ Modified <modified>
|
|||
Created <created>
|
||||
Security_type DEFINER
|
||||
Comment SP changed to DEFINER
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
|
||||
... change back to default and check result:
|
||||
--------------------------------------------
|
||||
|
@ -479,6 +551,9 @@ LAST_ALTERED <created>
|
|||
SQL_MODE
|
||||
ROUTINE_COMMENT new comment, FN changed to INVOKER
|
||||
DEFINER root@localhost
|
||||
CHARACTER_SET_CLIENT latin1
|
||||
COLLATION_CONNECTION latin1_swedish_ci
|
||||
DATABASE_COLLATION latin1_swedish_ci
|
||||
SPECIFIC_NAME fn_2
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
|
@ -503,6 +578,9 @@ LAST_ALTERED <created>
|
|||
SQL_MODE
|
||||
ROUTINE_COMMENT FN changed to DEFINER
|
||||
DEFINER root@localhost
|
||||
CHARACTER_SET_CLIENT latin1
|
||||
COLLATION_CONNECTION latin1_swedish_ci
|
||||
DATABASE_COLLATION latin1_swedish_ci
|
||||
SPECIFIC_NAME sp_1
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
|
@ -525,6 +603,9 @@ LAST_ALTERED <created>
|
|||
SQL_MODE
|
||||
ROUTINE_COMMENT new comment, SP changed to INVOKER
|
||||
DEFINER root@localhost
|
||||
CHARACTER_SET_CLIENT latin1
|
||||
COLLATION_CONNECTION latin1_swedish_ci
|
||||
DATABASE_COLLATION latin1_swedish_ci
|
||||
SPECIFIC_NAME sp_2
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
|
@ -547,6 +628,9 @@ LAST_ALTERED <created>
|
|||
SQL_MODE
|
||||
ROUTINE_COMMENT SP changed to DEFINER
|
||||
DEFINER root@localhost
|
||||
CHARACTER_SET_CLIENT latin1
|
||||
COLLATION_CONNECTION latin1_swedish_ci
|
||||
DATABASE_COLLATION latin1_swedish_ci
|
||||
SHOW CREATE FUNCTION fn_1;
|
||||
Function fn_1
|
||||
sql_mode
|
||||
|
@ -559,6 +643,9 @@ set @x=i1;
|
|||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW CREATE FUNCTION fn_2;
|
||||
Function fn_2
|
||||
sql_mode
|
||||
|
@ -569,6 +656,9 @@ set @x=i1;
|
|||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW CREATE PROCEDURE sp_1;
|
||||
Procedure sp_1
|
||||
sql_mode
|
||||
|
@ -578,6 +668,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
|
|||
BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW CREATE PROCEDURE sp_2;
|
||||
Procedure sp_2
|
||||
sql_mode
|
||||
|
@ -587,6 +680,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
|
|||
BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW FUNCTION STATUS LIKE 'fn_%';
|
||||
Db db_storedproc
|
||||
Name fn_1
|
||||
|
@ -596,6 +692,9 @@ Modified <modified>
|
|||
Created <created>
|
||||
Security_type INVOKER
|
||||
Comment new comment, FN changed to INVOKER
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
Db db_storedproc
|
||||
Name fn_2
|
||||
Type FUNCTION
|
||||
|
@ -604,6 +703,9 @@ Modified <modified>
|
|||
Created <created>
|
||||
Security_type DEFINER
|
||||
Comment FN changed to DEFINER
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW PROCEDURE STATUS LIKE 'sp_%';
|
||||
Db db_storedproc
|
||||
Name sp_1
|
||||
|
@ -613,6 +715,9 @@ Modified <modified>
|
|||
Created <created>
|
||||
Security_type INVOKER
|
||||
Comment new comment, SP changed to INVOKER
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
Db db_storedproc
|
||||
Name sp_2
|
||||
Type PROCEDURE
|
||||
|
@ -621,6 +726,9 @@ Modified <modified>
|
|||
Created <created>
|
||||
Security_type DEFINER
|
||||
Comment SP changed to DEFINER
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
|
||||
... cleanup
|
||||
-----------
|
||||
|
|
|
@ -263,7 +263,7 @@ select current_user;
|
|||
current_user
|
||||
root@localhost
|
||||
show triggers;
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
|
||||
grant select, insert, update on priv_db.t1 to test_yesprivs@localhost;
|
||||
show grants for test_yesprivs@localhost;
|
||||
Grants for test_yesprivs@localhost
|
||||
|
@ -296,7 +296,7 @@ select current_user;
|
|||
current_user
|
||||
root@localhost
|
||||
show triggers;
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
|
||||
show tables;
|
||||
Tables_in_priv_db
|
||||
t1
|
||||
|
@ -317,7 +317,7 @@ select current_user;
|
|||
current_user
|
||||
test_yesprivs@localhost
|
||||
show triggers;
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
|
||||
create trigger trg1_2 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 1_2-yes';
|
||||
select current_user;
|
||||
|
@ -453,9 +453,9 @@ ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for tabl
|
|||
create trigger trg1_4 before UPDATE on t1 for each row
|
||||
set new.f1 = 'trig 1_4-yes';
|
||||
show triggers;
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer
|
||||
trg1_3 INSERT t1 set new.f1 = 'trig 1_3-yes' BEFORE NULL test_yesprivs@localhost
|
||||
trg1_4 UPDATE t1 set new.f1 = 'trig 1_4-yes' BEFORE NULL test_yesprivs@localhost
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
|
||||
trg1_3 INSERT t1 set new.f1 = 'trig 1_3-yes' BEFORE NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
trg1_4 UPDATE t1 set new.f1 = 'trig 1_4-yes' BEFORE NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
select current_user;
|
||||
current_user
|
||||
test_noprivs@localhost
|
||||
|
@ -570,11 +570,11 @@ current_user
|
|||
test_yesprivs@localhost
|
||||
use priv_db;
|
||||
show triggers;
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer
|
||||
trg1_1 INSERT t1 set new.f1 = 'trig 1_1-yes' BEFORE NULL test_yesprivs@localhost
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
|
||||
trg1_1 INSERT t1 set new.f1 = 'trig 1_1-yes' BEFORE NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
select * from information_schema.triggers;
|
||||
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER
|
||||
NULL priv_db trg1_1 INSERT NULL priv_db t1 0 NULL set new.f1 = 'trig 1_1-yes' ROW BEFORE NULL NULL OLD NEW NULL test_yesprivs@localhost
|
||||
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
|
||||
NULL priv_db trg1_1 INSERT NULL priv_db t1 0 NULL set new.f1 = 'trig 1_1-yes' ROW BEFORE NULL NULL OLD NEW NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
drop trigger trg1_1;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
select current_user;
|
||||
|
@ -863,7 +863,7 @@ select current_user;
|
|||
current_user
|
||||
root@localhost
|
||||
show triggers;
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
|
||||
grant TRIGGER on priv1_db.t1 to test_yesprivs@localhost;
|
||||
show grants for test_yesprivs@localhost;
|
||||
Grants for test_yesprivs@localhost
|
||||
|
@ -878,7 +878,7 @@ select current_user;
|
|||
current_user
|
||||
test_yesprivs@localhost
|
||||
show triggers;
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
|
||||
create trigger trg1_2 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 1_2-yes';
|
||||
create trigger trg2_1 before INSERT on t2 for each row
|
||||
|
@ -990,7 +990,7 @@ select current_user;
|
|||
current_user
|
||||
root@localhost
|
||||
show triggers;
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
|
||||
grant select, insert, update ,trigger
|
||||
on priv_db.t1 to test_yesprivs@localhost
|
||||
with grant option;
|
||||
|
|
|
@ -863,31 +863,31 @@ CREATE TABLE t1 (f1 BIGINT);
|
|||
INSERT INTO t1 VALUES(1);
|
||||
CREATE VIEW test.v1 AS SELECT * FROM t1 limit 2;
|
||||
SHOW CREATE VIEW test.v1;
|
||||
View Create View
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` limit 2
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` limit 2 latin1 latin1_swedish_ci
|
||||
SELECT * FROM test.v1;
|
||||
f1
|
||||
1
|
||||
CREATE OR REPLACE ALGORITHM = TEMPTABLE VIEW test.v1
|
||||
AS SELECT * FROM t1 limit 2;
|
||||
SHOW CREATE VIEW test.v1;
|
||||
View Create View
|
||||
v1 CREATE ALGORITHM=TEMPTABLE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` limit 2
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=TEMPTABLE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` limit 2 latin1 latin1_swedish_ci
|
||||
SELECT * FROM test.v1;
|
||||
f1
|
||||
1
|
||||
CREATE OR REPLACE VIEW test.v1 AS SELECT * FROM tb2 limit 2;
|
||||
SHOW CREATE VIEW test.v1;
|
||||
View Create View
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `tb2`.`f59` AS `f59`,`tb2`.`f60` AS `f60`,`tb2`.`f61` AS `f61`,`tb2`.`f62` AS `f62`,`tb2`.`f63` AS `f63`,`tb2`.`f64` AS `f64`,`tb2`.`f65` AS `f65`,`tb2`.`f66` AS `f66`,`tb2`.`f67` AS `f67`,`tb2`.`f68` AS `f68`,`tb2`.`f69` AS `f69`,`tb2`.`f70` AS `f70`,`tb2`.`f71` AS `f71`,`tb2`.`f72` AS `f72`,`tb2`.`f73` AS `f73`,`tb2`.`f74` AS `f74`,`tb2`.`f75` AS `f75`,`tb2`.`f76` AS `f76`,`tb2`.`f77` AS `f77`,`tb2`.`f78` AS `f78`,`tb2`.`f79` AS `f79`,`tb2`.`f80` AS `f80`,`tb2`.`f81` AS `f81`,`tb2`.`f82` AS `f82`,`tb2`.`f83` AS `f83`,`tb2`.`f84` AS `f84`,`tb2`.`f85` AS `f85`,`tb2`.`f86` AS `f86`,`tb2`.`f87` AS `f87`,`tb2`.`f88` AS `f88`,`tb2`.`f89` AS `f89`,`tb2`.`f90` AS `f90`,`tb2`.`f91` AS `f91`,`tb2`.`f92` AS `f92`,`tb2`.`f93` AS `f93`,`tb2`.`f94` AS `f94`,`tb2`.`f95` AS `f95`,`tb2`.`f96` AS `f96`,`tb2`.`f97` AS `f97`,`tb2`.`f98` AS `f98`,`tb2`.`f99` AS `f99`,`tb2`.`f100` AS `f100`,`tb2`.`f101` AS `f101`,`tb2`.`f102` AS `f102`,`tb2`.`f103` AS `f103`,`tb2`.`f104` AS `f104`,`tb2`.`f105` AS `f105`,`tb2`.`f106` AS `f106`,`tb2`.`f107` AS `f107`,`tb2`.`f108` AS `f108`,`tb2`.`f109` AS `f109` from `tb2` limit 2
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `tb2`.`f59` AS `f59`,`tb2`.`f60` AS `f60`,`tb2`.`f61` AS `f61`,`tb2`.`f62` AS `f62`,`tb2`.`f63` AS `f63`,`tb2`.`f64` AS `f64`,`tb2`.`f65` AS `f65`,`tb2`.`f66` AS `f66`,`tb2`.`f67` AS `f67`,`tb2`.`f68` AS `f68`,`tb2`.`f69` AS `f69`,`tb2`.`f70` AS `f70`,`tb2`.`f71` AS `f71`,`tb2`.`f72` AS `f72`,`tb2`.`f73` AS `f73`,`tb2`.`f74` AS `f74`,`tb2`.`f75` AS `f75`,`tb2`.`f76` AS `f76`,`tb2`.`f77` AS `f77`,`tb2`.`f78` AS `f78`,`tb2`.`f79` AS `f79`,`tb2`.`f80` AS `f80`,`tb2`.`f81` AS `f81`,`tb2`.`f82` AS `f82`,`tb2`.`f83` AS `f83`,`tb2`.`f84` AS `f84`,`tb2`.`f85` AS `f85`,`tb2`.`f86` AS `f86`,`tb2`.`f87` AS `f87`,`tb2`.`f88` AS `f88`,`tb2`.`f89` AS `f89`,`tb2`.`f90` AS `f90`,`tb2`.`f91` AS `f91`,`tb2`.`f92` AS `f92`,`tb2`.`f93` AS `f93`,`tb2`.`f94` AS `f94`,`tb2`.`f95` AS `f95`,`tb2`.`f96` AS `f96`,`tb2`.`f97` AS `f97`,`tb2`.`f98` AS `f98`,`tb2`.`f99` AS `f99`,`tb2`.`f100` AS `f100`,`tb2`.`f101` AS `f101`,`tb2`.`f102` AS `f102`,`tb2`.`f103` AS `f103`,`tb2`.`f104` AS `f104`,`tb2`.`f105` AS `f105`,`tb2`.`f106` AS `f106`,`tb2`.`f107` AS `f107`,`tb2`.`f108` AS `f108`,`tb2`.`f109` AS `f109` from `tb2` limit 2 latin1 latin1_swedish_ci
|
||||
SELECT * FROM test.v1 ;
|
||||
f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
|
||||
1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set
|
||||
2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set
|
||||
CREATE OR REPLACE VIEW test.v1 AS SELECT F59 FROM tb2 limit 10,100;
|
||||
SHOW CREATE VIEW test.v1;
|
||||
View Create View
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `tb2`.`f59` AS `F59` from `tb2` limit 10,100
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `tb2`.`f59` AS `F59` from `tb2` limit 10,100 latin1 latin1_swedish_ci
|
||||
SELECT * FROM test.v1;
|
||||
F59
|
||||
76710
|
||||
|
@ -965,38 +965,38 @@ CREATE TABLE t1 (f1 NUMERIC(15,3));
|
|||
INSERT INTO t1 VALUES(8.8);
|
||||
CREATE VIEW v1 AS SELECT * FROM t1;
|
||||
SHOW CREATE VIEW v1;
|
||||
View Create View
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1`
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci
|
||||
SELECT * FROM v1;
|
||||
f1
|
||||
8.800
|
||||
CREATE OR REPLACE VIEW v1 AS SELECT f1 FROM t1;
|
||||
SHOW CREATE VIEW v1;
|
||||
View Create View
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1`
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci
|
||||
SELECT * FROM v1;
|
||||
f1
|
||||
8.800
|
||||
CREATE OR REPLACE VIEW v1 AS SELECT f1 As my_column FROM t1;
|
||||
SHOW CREATE VIEW v1;
|
||||
View Create View
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `my_column` from `t1`
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `my_column` from `t1` latin1 latin1_swedish_ci
|
||||
SELECT * FROM v1;
|
||||
my_column
|
||||
8.800
|
||||
CREATE OR REPLACE VIEW v1(column1,column2)
|
||||
AS SELECT f1 As my_column, f1 FROM t1;
|
||||
SHOW CREATE VIEW v1;
|
||||
View Create View
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `column1`,`t1`.`f1` AS `column2` from `t1`
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `column1`,`t1`.`f1` AS `column2` from `t1` latin1 latin1_swedish_ci
|
||||
SELECT * FROM v1;
|
||||
column1 column2
|
||||
8.800 8.800
|
||||
CREATE OR REPLACE VIEW test.v1(column1,column2)
|
||||
AS SELECT f1 As my_column, f1 FROM test.t1;
|
||||
SHOW CREATE VIEW v1;
|
||||
View Create View
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `column1`,`t1`.`f1` AS `column2` from `t1`
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `column1`,`t1`.`f1` AS `column2` from `t1` latin1 latin1_swedish_ci
|
||||
SELECT * FROM v1;
|
||||
column1 column2
|
||||
8.800 8.800
|
||||
|
@ -10250,8 +10250,8 @@ CREATE VIEW test3.v30 AS SELECT * FROM test3.v29;
|
|||
CREATE VIEW test3.v31 AS SELECT * FROM test3.v30;
|
||||
CREATE VIEW test3.v32 AS SELECT * FROM test3.v31;
|
||||
SHOW CREATE VIEW test3.v32;
|
||||
View Create View
|
||||
v32 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test3`.`v32` AS select `v31`.`f1` AS `f1` from `test3`.`v31`
|
||||
View Create View character_set_client collation_connection
|
||||
v32 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test3`.`v32` AS select `v31`.`f1` AS `f1` from `test3`.`v31` latin1 latin1_swedish_ci
|
||||
SELECT * FROM test3.v32;
|
||||
f1
|
||||
1.000
|
||||
|
@ -10260,8 +10260,8 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
1 SIMPLE t1 ALL NULL NULL NULL NULL 1
|
||||
DROP VIEW test3.v0;
|
||||
SHOW CREATE VIEW test3.v32;
|
||||
View Create View
|
||||
v32 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test3`.`v32` AS select `v31`.`f1` AS `f1` from `test3`.`v31`
|
||||
View Create View character_set_client collation_connection
|
||||
v32 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test3`.`v32` AS select `v31`.`f1` AS `f1` from `test3`.`v31` latin1 latin1_swedish_ci
|
||||
Warnings:
|
||||
Warning 1356 View 'test3.v32' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
SELECT * FROM test3.v32;
|
||||
|
@ -10389,8 +10389,8 @@ FROM test2.t1 tab1 NATURAL JOIN test1.v27 tab2;
|
|||
CREATE OR REPLACE VIEW test1.v29 AS SELECT f1, f2
|
||||
FROM test3.t1 tab1 NATURAL JOIN test1.v28 tab2;
|
||||
SHOW CREATE VIEW test1.v29;
|
||||
View Create View
|
||||
v29 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test1`.`v29` AS select `tab1`.`f1` AS `f1`,`tab1`.`f2` AS `f2` from (`test3`.`t1` `tab1` join `test1`.`v28` `tab2` on(((`tab1`.`f1` = `tab2`.`f1`) and (`tab1`.`f2` = `tab2`.`f2`))))
|
||||
View Create View character_set_client collation_connection
|
||||
v29 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test1`.`v29` AS select `tab1`.`f1` AS `f1`,`tab1`.`f2` AS `f2` from (`test3`.`t1` `tab1` join `test1`.`v28` `tab2` on(((`tab1`.`f1` = `tab2`.`f1`) and (`tab1`.`f2` = `tab2`.`f2`)))) latin1 latin1_swedish_ci
|
||||
SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
|
||||
CAST(f2 AS CHAR) AS f2 FROM test1.v29;
|
||||
f1 f2
|
||||
|
@ -10405,8 +10405,8 @@ CAST(f2 AS CHAR) AS f2 FROM test1.v29;
|
|||
CREATE VIEW test1.v30 AS SELECT f1, f2
|
||||
FROM test3.t1 tab1 NATURAL JOIN test1.v29 tab2;
|
||||
SHOW CREATE VIEW test1.v30;
|
||||
View Create View
|
||||
v30 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test1`.`v30` AS select `tab1`.`f1` AS `f1`,`tab1`.`f2` AS `f2` from (`test3`.`t1` `tab1` join `test1`.`v29` `tab2` on(((`tab1`.`f1` = `tab2`.`f1`) and (`tab1`.`f2` = `tab2`.`f2`))))
|
||||
View Create View character_set_client collation_connection
|
||||
v30 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test1`.`v30` AS select `tab1`.`f1` AS `f1`,`tab1`.`f2` AS `f2` from (`test3`.`t1` `tab1` join `test1`.`v29` `tab2` on(((`tab1`.`f1` = `tab2`.`f1`) and (`tab1`.`f2` = `tab2`.`f2`)))) latin1 latin1_swedish_ci
|
||||
SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
|
||||
CAST(f2 AS CHAR) AS f2 FROM test1.v30;
|
||||
f1 f2
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -90,7 +90,7 @@ INSERT INTO result VALUES (@cur_val_sql_mode, 'value not restored');
|
|||
END if;
|
||||
END//
|
||||
SHOW CREATE PROCEDURE sp1;
|
||||
Procedure sql_mode Create Procedure
|
||||
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
|
||||
sp1 STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER CREATE DEFINER=`root`@`localhost` PROCEDURE `sp1`()
|
||||
BEGIN
|
||||
declare a tinyint;
|
||||
|
@ -104,7 +104,7 @@ INSERT INTO result VALUES (@cur_val_sql_mode, 'value restored');
|
|||
ELSE
|
||||
INSERT INTO result VALUES (@cur_val_sql_mode, 'value not restored');
|
||||
END if;
|
||||
END
|
||||
END latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
set @@sql_mode='';
|
||||
SHOW VARIABLES LIKE 'sql_mode';
|
||||
Variable_name Value
|
||||
|
@ -143,12 +143,12 @@ SET @@sql_mode='MAXDB';
|
|||
SHOW VARIABLES LIKE 'sql_mode';
|
||||
END//
|
||||
SHOW CREATE PROCEDURE sp2;
|
||||
Procedure sql_mode Create Procedure
|
||||
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
|
||||
sp2 STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER CREATE DEFINER=`root`@`localhost` PROCEDURE `sp2`()
|
||||
BEGIN
|
||||
SET @@sql_mode='MAXDB';
|
||||
SHOW VARIABLES LIKE 'sql_mode';
|
||||
END
|
||||
END latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
... show value prior calling procedure
|
||||
SHOW VARIABLES LIKE 'sql_mode';
|
||||
Variable_name Value
|
||||
|
|
|
@ -122,6 +122,9 @@ LAST_ALTERED <created>
|
|||
SQL_MODE
|
||||
ROUTINE_COMMENT
|
||||
DEFINER root@localhost
|
||||
CHARACTER_SET_CLIENT latin1
|
||||
COLLATION_CONNECTION latin1_swedish_ci
|
||||
DATABASE_COLLATION latin1_swedish_ci
|
||||
SPECIFIC_NAME fn_2
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
|
@ -146,6 +149,9 @@ LAST_ALTERED <created>
|
|||
SQL_MODE
|
||||
ROUTINE_COMMENT created with INVOKER
|
||||
DEFINER root@localhost
|
||||
CHARACTER_SET_CLIENT latin1
|
||||
COLLATION_CONNECTION latin1_swedish_ci
|
||||
DATABASE_COLLATION latin1_swedish_ci
|
||||
SPECIFIC_NAME sp_1
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
|
@ -168,6 +174,9 @@ LAST_ALTERED <created>
|
|||
SQL_MODE
|
||||
ROUTINE_COMMENT
|
||||
DEFINER root@localhost
|
||||
CHARACTER_SET_CLIENT latin1
|
||||
COLLATION_CONNECTION latin1_swedish_ci
|
||||
DATABASE_COLLATION latin1_swedish_ci
|
||||
SPECIFIC_NAME sp_2
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
|
@ -190,6 +199,9 @@ LAST_ALTERED <created>
|
|||
SQL_MODE
|
||||
ROUTINE_COMMENT created with INVOKER
|
||||
DEFINER root@localhost
|
||||
CHARACTER_SET_CLIENT latin1
|
||||
COLLATION_CONNECTION latin1_swedish_ci
|
||||
DATABASE_COLLATION latin1_swedish_ci
|
||||
SHOW CREATE FUNCTION fn_1;
|
||||
Function fn_1
|
||||
sql_mode
|
||||
|
@ -199,6 +211,9 @@ set @x=i1;
|
|||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW CREATE FUNCTION fn_2;
|
||||
Function fn_2
|
||||
sql_mode
|
||||
|
@ -210,6 +225,9 @@ set @x=i1;
|
|||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW CREATE PROCEDURE sp_1;
|
||||
Procedure sp_1
|
||||
sql_mode
|
||||
|
@ -217,6 +235,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
|
|||
BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW CREATE PROCEDURE sp_2;
|
||||
Procedure sp_2
|
||||
sql_mode
|
||||
|
@ -226,6 +247,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
|
|||
BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW FUNCTION STATUS LIKE 'fn_%';
|
||||
Db db_storedproc
|
||||
Name fn_1
|
||||
|
@ -235,6 +259,9 @@ Modified <modified>
|
|||
Created <created>
|
||||
Security_type DEFINER
|
||||
Comment
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
Db db_storedproc
|
||||
Name fn_2
|
||||
Type FUNCTION
|
||||
|
@ -243,6 +270,9 @@ Modified <modified>
|
|||
Created <created>
|
||||
Security_type INVOKER
|
||||
Comment created with INVOKER
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW PROCEDURE STATUS LIKE 'sp_%';
|
||||
Db db_storedproc
|
||||
Name sp_1
|
||||
|
@ -252,6 +282,9 @@ Modified <modified>
|
|||
Created <created>
|
||||
Security_type DEFINER
|
||||
Comment
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
Db db_storedproc
|
||||
Name sp_2
|
||||
Type PROCEDURE
|
||||
|
@ -260,6 +293,9 @@ Modified <modified>
|
|||
Created <created>
|
||||
Security_type INVOKER
|
||||
Comment created with INVOKER
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
|
||||
... now change some stuff:
|
||||
--------------------------
|
||||
|
@ -304,6 +340,9 @@ LAST_ALTERED <created>
|
|||
SQL_MODE
|
||||
ROUTINE_COMMENT new comment, FN changed to INVOKER
|
||||
DEFINER root@localhost
|
||||
CHARACTER_SET_CLIENT latin1
|
||||
COLLATION_CONNECTION latin1_swedish_ci
|
||||
DATABASE_COLLATION latin1_swedish_ci
|
||||
SPECIFIC_NAME fn_2
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
|
@ -328,6 +367,9 @@ LAST_ALTERED <created>
|
|||
SQL_MODE
|
||||
ROUTINE_COMMENT FN changed to DEFINER
|
||||
DEFINER root@localhost
|
||||
CHARACTER_SET_CLIENT latin1
|
||||
COLLATION_CONNECTION latin1_swedish_ci
|
||||
DATABASE_COLLATION latin1_swedish_ci
|
||||
SPECIFIC_NAME sp_1
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
|
@ -350,6 +392,9 @@ LAST_ALTERED <created>
|
|||
SQL_MODE
|
||||
ROUTINE_COMMENT new comment, SP changed to INVOKER
|
||||
DEFINER root@localhost
|
||||
CHARACTER_SET_CLIENT latin1
|
||||
COLLATION_CONNECTION latin1_swedish_ci
|
||||
DATABASE_COLLATION latin1_swedish_ci
|
||||
SPECIFIC_NAME sp_2
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
|
@ -372,6 +417,9 @@ LAST_ALTERED <created>
|
|||
SQL_MODE
|
||||
ROUTINE_COMMENT SP changed to DEFINER
|
||||
DEFINER root@localhost
|
||||
CHARACTER_SET_CLIENT latin1
|
||||
COLLATION_CONNECTION latin1_swedish_ci
|
||||
DATABASE_COLLATION latin1_swedish_ci
|
||||
SHOW CREATE FUNCTION fn_1;
|
||||
Function fn_1
|
||||
sql_mode
|
||||
|
@ -384,6 +432,9 @@ set @x=i1;
|
|||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW CREATE FUNCTION fn_2;
|
||||
Function fn_2
|
||||
sql_mode
|
||||
|
@ -395,6 +446,9 @@ set @x=i1;
|
|||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW CREATE PROCEDURE sp_1;
|
||||
Procedure sp_1
|
||||
sql_mode
|
||||
|
@ -404,6 +458,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
|
|||
BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW CREATE PROCEDURE sp_2;
|
||||
Procedure sp_2
|
||||
sql_mode
|
||||
|
@ -413,6 +470,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
|
|||
BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW FUNCTION STATUS LIKE 'fn_%';
|
||||
Db db_storedproc
|
||||
Name fn_1
|
||||
|
@ -422,6 +482,9 @@ Modified <modified>
|
|||
Created <created>
|
||||
Security_type INVOKER
|
||||
Comment new comment, FN changed to INVOKER
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
Db db_storedproc
|
||||
Name fn_2
|
||||
Type FUNCTION
|
||||
|
@ -430,6 +493,9 @@ Modified <modified>
|
|||
Created <created>
|
||||
Security_type DEFINER
|
||||
Comment FN changed to DEFINER
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW PROCEDURE STATUS LIKE 'sp_%';
|
||||
Db db_storedproc
|
||||
Name sp_1
|
||||
|
@ -439,6 +505,9 @@ Modified <modified>
|
|||
Created <created>
|
||||
Security_type INVOKER
|
||||
Comment new comment, SP changed to INVOKER
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
Db db_storedproc
|
||||
Name sp_2
|
||||
Type PROCEDURE
|
||||
|
@ -447,6 +516,9 @@ Modified <modified>
|
|||
Created <created>
|
||||
Security_type DEFINER
|
||||
Comment SP changed to DEFINER
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
|
||||
... change back to default and check result:
|
||||
--------------------------------------------
|
||||
|
@ -479,6 +551,9 @@ LAST_ALTERED <created>
|
|||
SQL_MODE
|
||||
ROUTINE_COMMENT new comment, FN changed to INVOKER
|
||||
DEFINER root@localhost
|
||||
CHARACTER_SET_CLIENT latin1
|
||||
COLLATION_CONNECTION latin1_swedish_ci
|
||||
DATABASE_COLLATION latin1_swedish_ci
|
||||
SPECIFIC_NAME fn_2
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
|
@ -503,6 +578,9 @@ LAST_ALTERED <created>
|
|||
SQL_MODE
|
||||
ROUTINE_COMMENT FN changed to DEFINER
|
||||
DEFINER root@localhost
|
||||
CHARACTER_SET_CLIENT latin1
|
||||
COLLATION_CONNECTION latin1_swedish_ci
|
||||
DATABASE_COLLATION latin1_swedish_ci
|
||||
SPECIFIC_NAME sp_1
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
|
@ -525,6 +603,9 @@ LAST_ALTERED <created>
|
|||
SQL_MODE
|
||||
ROUTINE_COMMENT new comment, SP changed to INVOKER
|
||||
DEFINER root@localhost
|
||||
CHARACTER_SET_CLIENT latin1
|
||||
COLLATION_CONNECTION latin1_swedish_ci
|
||||
DATABASE_COLLATION latin1_swedish_ci
|
||||
SPECIFIC_NAME sp_2
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
|
@ -547,6 +628,9 @@ LAST_ALTERED <created>
|
|||
SQL_MODE
|
||||
ROUTINE_COMMENT SP changed to DEFINER
|
||||
DEFINER root@localhost
|
||||
CHARACTER_SET_CLIENT latin1
|
||||
COLLATION_CONNECTION latin1_swedish_ci
|
||||
DATABASE_COLLATION latin1_swedish_ci
|
||||
SHOW CREATE FUNCTION fn_1;
|
||||
Function fn_1
|
||||
sql_mode
|
||||
|
@ -559,6 +643,9 @@ set @x=i1;
|
|||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW CREATE FUNCTION fn_2;
|
||||
Function fn_2
|
||||
sql_mode
|
||||
|
@ -569,6 +656,9 @@ set @x=i1;
|
|||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW CREATE PROCEDURE sp_1;
|
||||
Procedure sp_1
|
||||
sql_mode
|
||||
|
@ -578,6 +668,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
|
|||
BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW CREATE PROCEDURE sp_2;
|
||||
Procedure sp_2
|
||||
sql_mode
|
||||
|
@ -587,6 +680,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
|
|||
BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW FUNCTION STATUS LIKE 'fn_%';
|
||||
Db db_storedproc
|
||||
Name fn_1
|
||||
|
@ -596,6 +692,9 @@ Modified <modified>
|
|||
Created <created>
|
||||
Security_type INVOKER
|
||||
Comment new comment, FN changed to INVOKER
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
Db db_storedproc
|
||||
Name fn_2
|
||||
Type FUNCTION
|
||||
|
@ -604,6 +703,9 @@ Modified <modified>
|
|||
Created <created>
|
||||
Security_type DEFINER
|
||||
Comment FN changed to DEFINER
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW PROCEDURE STATUS LIKE 'sp_%';
|
||||
Db db_storedproc
|
||||
Name sp_1
|
||||
|
@ -613,6 +715,9 @@ Modified <modified>
|
|||
Created <created>
|
||||
Security_type INVOKER
|
||||
Comment new comment, SP changed to INVOKER
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
Db db_storedproc
|
||||
Name sp_2
|
||||
Type PROCEDURE
|
||||
|
@ -621,6 +726,9 @@ Modified <modified>
|
|||
Created <created>
|
||||
Security_type DEFINER
|
||||
Comment SP changed to DEFINER
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
|
||||
... cleanup
|
||||
-----------
|
||||
|
|
|
@ -263,7 +263,7 @@ select current_user;
|
|||
current_user
|
||||
root@localhost
|
||||
show triggers;
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
|
||||
grant select, insert, update on priv_db.t1 to test_yesprivs@localhost;
|
||||
show grants for test_yesprivs@localhost;
|
||||
Grants for test_yesprivs@localhost
|
||||
|
@ -296,7 +296,7 @@ select current_user;
|
|||
current_user
|
||||
root@localhost
|
||||
show triggers;
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
|
||||
show tables;
|
||||
Tables_in_priv_db
|
||||
t1
|
||||
|
@ -317,7 +317,7 @@ select current_user;
|
|||
current_user
|
||||
test_yesprivs@localhost
|
||||
show triggers;
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
|
||||
create trigger trg1_2 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 1_2-yes';
|
||||
select current_user;
|
||||
|
@ -453,9 +453,9 @@ ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for tabl
|
|||
create trigger trg1_4 before UPDATE on t1 for each row
|
||||
set new.f1 = 'trig 1_4-yes';
|
||||
show triggers;
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer
|
||||
trg1_3 INSERT t1 set new.f1 = 'trig 1_3-yes' BEFORE NULL test_yesprivs@localhost
|
||||
trg1_4 UPDATE t1 set new.f1 = 'trig 1_4-yes' BEFORE NULL test_yesprivs@localhost
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
|
||||
trg1_3 INSERT t1 set new.f1 = 'trig 1_3-yes' BEFORE NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
trg1_4 UPDATE t1 set new.f1 = 'trig 1_4-yes' BEFORE NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
select current_user;
|
||||
current_user
|
||||
test_noprivs@localhost
|
||||
|
@ -570,11 +570,11 @@ current_user
|
|||
test_yesprivs@localhost
|
||||
use priv_db;
|
||||
show triggers;
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer
|
||||
trg1_1 INSERT t1 set new.f1 = 'trig 1_1-yes' BEFORE NULL test_yesprivs@localhost
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
|
||||
trg1_1 INSERT t1 set new.f1 = 'trig 1_1-yes' BEFORE NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
select * from information_schema.triggers;
|
||||
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER
|
||||
NULL priv_db trg1_1 INSERT NULL priv_db t1 0 NULL set new.f1 = 'trig 1_1-yes' ROW BEFORE NULL NULL OLD NEW NULL test_yesprivs@localhost
|
||||
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
|
||||
NULL priv_db trg1_1 INSERT NULL priv_db t1 0 NULL set new.f1 = 'trig 1_1-yes' ROW BEFORE NULL NULL OLD NEW NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
drop trigger trg1_1;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
select current_user;
|
||||
|
@ -863,7 +863,7 @@ select current_user;
|
|||
current_user
|
||||
root@localhost
|
||||
show triggers;
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
|
||||
grant TRIGGER on priv1_db.t1 to test_yesprivs@localhost;
|
||||
show grants for test_yesprivs@localhost;
|
||||
Grants for test_yesprivs@localhost
|
||||
|
@ -878,7 +878,7 @@ select current_user;
|
|||
current_user
|
||||
test_yesprivs@localhost
|
||||
show triggers;
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
|
||||
create trigger trg1_2 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 1_2-yes';
|
||||
create trigger trg2_1 before INSERT on t2 for each row
|
||||
|
@ -990,7 +990,7 @@ select current_user;
|
|||
current_user
|
||||
root@localhost
|
||||
show triggers;
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
|
||||
grant select, insert, update ,trigger
|
||||
on priv_db.t1 to test_yesprivs@localhost
|
||||
with grant option;
|
||||
|
|
|
@ -867,31 +867,31 @@ CREATE TABLE t1 (f1 BIGINT);
|
|||
INSERT INTO t1 VALUES(1);
|
||||
CREATE VIEW test.v1 AS SELECT * FROM t1 limit 2;
|
||||
SHOW CREATE VIEW test.v1;
|
||||
View Create View
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` limit 2
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` limit 2 latin1 latin1_swedish_ci
|
||||
SELECT * FROM test.v1;
|
||||
f1
|
||||
1
|
||||
CREATE OR REPLACE ALGORITHM = TEMPTABLE VIEW test.v1
|
||||
AS SELECT * FROM t1 limit 2;
|
||||
SHOW CREATE VIEW test.v1;
|
||||
View Create View
|
||||
v1 CREATE ALGORITHM=TEMPTABLE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` limit 2
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=TEMPTABLE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` limit 2 latin1 latin1_swedish_ci
|
||||
SELECT * FROM test.v1;
|
||||
f1
|
||||
1
|
||||
CREATE OR REPLACE VIEW test.v1 AS SELECT * FROM tb2 limit 2;
|
||||
SHOW CREATE VIEW test.v1;
|
||||
View Create View
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `tb2`.`f59` AS `f59`,`tb2`.`f60` AS `f60`,`tb2`.`f61` AS `f61`,`tb2`.`f62` AS `f62`,`tb2`.`f63` AS `f63`,`tb2`.`f64` AS `f64`,`tb2`.`f65` AS `f65`,`tb2`.`f66` AS `f66`,`tb2`.`f67` AS `f67`,`tb2`.`f68` AS `f68`,`tb2`.`f69` AS `f69`,`tb2`.`f70` AS `f70`,`tb2`.`f71` AS `f71`,`tb2`.`f72` AS `f72`,`tb2`.`f73` AS `f73`,`tb2`.`f74` AS `f74`,`tb2`.`f75` AS `f75`,`tb2`.`f76` AS `f76`,`tb2`.`f77` AS `f77`,`tb2`.`f78` AS `f78`,`tb2`.`f79` AS `f79`,`tb2`.`f80` AS `f80`,`tb2`.`f81` AS `f81`,`tb2`.`f82` AS `f82`,`tb2`.`f83` AS `f83`,`tb2`.`f84` AS `f84`,`tb2`.`f85` AS `f85`,`tb2`.`f86` AS `f86`,`tb2`.`f87` AS `f87`,`tb2`.`f88` AS `f88`,`tb2`.`f89` AS `f89`,`tb2`.`f90` AS `f90`,`tb2`.`f91` AS `f91`,`tb2`.`f92` AS `f92`,`tb2`.`f93` AS `f93`,`tb2`.`f94` AS `f94`,`tb2`.`f95` AS `f95`,`tb2`.`f96` AS `f96`,`tb2`.`f97` AS `f97`,`tb2`.`f98` AS `f98`,`tb2`.`f99` AS `f99`,`tb2`.`f100` AS `f100`,`tb2`.`f101` AS `f101`,`tb2`.`f102` AS `f102`,`tb2`.`f103` AS `f103`,`tb2`.`f104` AS `f104`,`tb2`.`f105` AS `f105`,`tb2`.`f106` AS `f106`,`tb2`.`f107` AS `f107`,`tb2`.`f108` AS `f108`,`tb2`.`f109` AS `f109` from `tb2` limit 2
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `tb2`.`f59` AS `f59`,`tb2`.`f60` AS `f60`,`tb2`.`f61` AS `f61`,`tb2`.`f62` AS `f62`,`tb2`.`f63` AS `f63`,`tb2`.`f64` AS `f64`,`tb2`.`f65` AS `f65`,`tb2`.`f66` AS `f66`,`tb2`.`f67` AS `f67`,`tb2`.`f68` AS `f68`,`tb2`.`f69` AS `f69`,`tb2`.`f70` AS `f70`,`tb2`.`f71` AS `f71`,`tb2`.`f72` AS `f72`,`tb2`.`f73` AS `f73`,`tb2`.`f74` AS `f74`,`tb2`.`f75` AS `f75`,`tb2`.`f76` AS `f76`,`tb2`.`f77` AS `f77`,`tb2`.`f78` AS `f78`,`tb2`.`f79` AS `f79`,`tb2`.`f80` AS `f80`,`tb2`.`f81` AS `f81`,`tb2`.`f82` AS `f82`,`tb2`.`f83` AS `f83`,`tb2`.`f84` AS `f84`,`tb2`.`f85` AS `f85`,`tb2`.`f86` AS `f86`,`tb2`.`f87` AS `f87`,`tb2`.`f88` AS `f88`,`tb2`.`f89` AS `f89`,`tb2`.`f90` AS `f90`,`tb2`.`f91` AS `f91`,`tb2`.`f92` AS `f92`,`tb2`.`f93` AS `f93`,`tb2`.`f94` AS `f94`,`tb2`.`f95` AS `f95`,`tb2`.`f96` AS `f96`,`tb2`.`f97` AS `f97`,`tb2`.`f98` AS `f98`,`tb2`.`f99` AS `f99`,`tb2`.`f100` AS `f100`,`tb2`.`f101` AS `f101`,`tb2`.`f102` AS `f102`,`tb2`.`f103` AS `f103`,`tb2`.`f104` AS `f104`,`tb2`.`f105` AS `f105`,`tb2`.`f106` AS `f106`,`tb2`.`f107` AS `f107`,`tb2`.`f108` AS `f108`,`tb2`.`f109` AS `f109` from `tb2` limit 2 latin1 latin1_swedish_ci
|
||||
SELECT * FROM test.v1 ;
|
||||
f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109
|
||||
1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set
|
||||
2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set
|
||||
CREATE OR REPLACE VIEW test.v1 AS SELECT F59 FROM tb2 limit 10,100;
|
||||
SHOW CREATE VIEW test.v1;
|
||||
View Create View
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `tb2`.`f59` AS `F59` from `tb2` limit 10,100
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `tb2`.`f59` AS `F59` from `tb2` limit 10,100 latin1 latin1_swedish_ci
|
||||
SELECT * FROM test.v1;
|
||||
F59
|
||||
76710
|
||||
|
@ -969,38 +969,38 @@ CREATE TABLE t1 (f1 NUMERIC(15,3));
|
|||
INSERT INTO t1 VALUES(8.8);
|
||||
CREATE VIEW v1 AS SELECT * FROM t1;
|
||||
SHOW CREATE VIEW v1;
|
||||
View Create View
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1`
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci
|
||||
SELECT * FROM v1;
|
||||
f1
|
||||
8.800
|
||||
CREATE OR REPLACE VIEW v1 AS SELECT f1 FROM t1;
|
||||
SHOW CREATE VIEW v1;
|
||||
View Create View
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1`
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci
|
||||
SELECT * FROM v1;
|
||||
f1
|
||||
8.800
|
||||
CREATE OR REPLACE VIEW v1 AS SELECT f1 As my_column FROM t1;
|
||||
SHOW CREATE VIEW v1;
|
||||
View Create View
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `my_column` from `t1`
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `my_column` from `t1` latin1 latin1_swedish_ci
|
||||
SELECT * FROM v1;
|
||||
my_column
|
||||
8.800
|
||||
CREATE OR REPLACE VIEW v1(column1,column2)
|
||||
AS SELECT f1 As my_column, f1 FROM t1;
|
||||
SHOW CREATE VIEW v1;
|
||||
View Create View
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `column1`,`t1`.`f1` AS `column2` from `t1`
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `column1`,`t1`.`f1` AS `column2` from `t1` latin1 latin1_swedish_ci
|
||||
SELECT * FROM v1;
|
||||
column1 column2
|
||||
8.800 8.800
|
||||
CREATE OR REPLACE VIEW test.v1(column1,column2)
|
||||
AS SELECT f1 As my_column, f1 FROM test.t1;
|
||||
SHOW CREATE VIEW v1;
|
||||
View Create View
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `column1`,`t1`.`f1` AS `column2` from `t1`
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `column1`,`t1`.`f1` AS `column2` from `t1` latin1 latin1_swedish_ci
|
||||
SELECT * FROM v1;
|
||||
column1 column2
|
||||
8.800 8.800
|
||||
|
@ -10255,8 +10255,8 @@ CREATE VIEW test3.v30 AS SELECT * FROM test3.v29;
|
|||
CREATE VIEW test3.v31 AS SELECT * FROM test3.v30;
|
||||
CREATE VIEW test3.v32 AS SELECT * FROM test3.v31;
|
||||
SHOW CREATE VIEW test3.v32;
|
||||
View Create View
|
||||
v32 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test3`.`v32` AS select `v31`.`f1` AS `f1` from `test3`.`v31`
|
||||
View Create View character_set_client collation_connection
|
||||
v32 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test3`.`v32` AS select `v31`.`f1` AS `f1` from `test3`.`v31` latin1 latin1_swedish_ci
|
||||
SELECT * FROM test3.v32;
|
||||
f1
|
||||
1.000
|
||||
|
@ -10265,8 +10265,8 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
1 SIMPLE t1 system NULL NULL NULL NULL 1
|
||||
DROP VIEW test3.v0;
|
||||
SHOW CREATE VIEW test3.v32;
|
||||
View Create View
|
||||
v32 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test3`.`v32` AS select `v31`.`f1` AS `f1` from `test3`.`v31`
|
||||
View Create View character_set_client collation_connection
|
||||
v32 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test3`.`v32` AS select `v31`.`f1` AS `f1` from `test3`.`v31` latin1 latin1_swedish_ci
|
||||
Warnings:
|
||||
Warning 1356 View 'test3.v32' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
SELECT * FROM test3.v32;
|
||||
|
@ -10394,8 +10394,8 @@ FROM test2.t1 tab1 NATURAL JOIN test1.v27 tab2;
|
|||
CREATE OR REPLACE VIEW test1.v29 AS SELECT f1, f2
|
||||
FROM test3.t1 tab1 NATURAL JOIN test1.v28 tab2;
|
||||
SHOW CREATE VIEW test1.v29;
|
||||
View Create View
|
||||
v29 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test1`.`v29` AS select `tab1`.`f1` AS `f1`,`tab1`.`f2` AS `f2` from (`test3`.`t1` `tab1` join `test1`.`v28` `tab2` on(((`tab1`.`f1` = `tab2`.`f1`) and (`tab1`.`f2` = `tab2`.`f2`))))
|
||||
View Create View character_set_client collation_connection
|
||||
v29 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test1`.`v29` AS select `tab1`.`f1` AS `f1`,`tab1`.`f2` AS `f2` from (`test3`.`t1` `tab1` join `test1`.`v28` `tab2` on(((`tab1`.`f1` = `tab2`.`f1`) and (`tab1`.`f2` = `tab2`.`f2`)))) latin1 latin1_swedish_ci
|
||||
SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
|
||||
CAST(f2 AS CHAR) AS f2 FROM test1.v29;
|
||||
f1 f2
|
||||
|
@ -10410,8 +10410,8 @@ CAST(f2 AS CHAR) AS f2 FROM test1.v29;
|
|||
CREATE VIEW test1.v30 AS SELECT f1, f2
|
||||
FROM test3.t1 tab1 NATURAL JOIN test1.v29 tab2;
|
||||
SHOW CREATE VIEW test1.v30;
|
||||
View Create View
|
||||
v30 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test1`.`v30` AS select `tab1`.`f1` AS `f1`,`tab1`.`f2` AS `f2` from (`test3`.`t1` `tab1` join `test1`.`v29` `tab2` on(((`tab1`.`f1` = `tab2`.`f1`) and (`tab1`.`f2` = `tab2`.`f2`))))
|
||||
View Create View character_set_client collation_connection
|
||||
v30 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test1`.`v30` AS select `tab1`.`f1` AS `f1`,`tab1`.`f2` AS `f2` from (`test3`.`t1` `tab1` join `test1`.`v29` `tab2` on(((`tab1`.`f1` = `tab2`.`f1`) and (`tab1`.`f2` = `tab2`.`f2`)))) latin1 latin1_swedish_ci
|
||||
SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
|
||||
CAST(f2 AS CHAR) AS f2 FROM test1.v30;
|
||||
f1 f2
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -90,7 +90,7 @@ INSERT INTO result VALUES (@cur_val_sql_mode, 'value not restored');
|
|||
END if;
|
||||
END//
|
||||
SHOW CREATE PROCEDURE sp1;
|
||||
Procedure sql_mode Create Procedure
|
||||
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
|
||||
sp1 STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER CREATE DEFINER=`root`@`localhost` PROCEDURE `sp1`()
|
||||
BEGIN
|
||||
declare a tinyint;
|
||||
|
@ -104,7 +104,7 @@ INSERT INTO result VALUES (@cur_val_sql_mode, 'value restored');
|
|||
ELSE
|
||||
INSERT INTO result VALUES (@cur_val_sql_mode, 'value not restored');
|
||||
END if;
|
||||
END
|
||||
END latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
set @@sql_mode='';
|
||||
SHOW VARIABLES LIKE 'sql_mode';
|
||||
Variable_name Value
|
||||
|
@ -143,12 +143,12 @@ SET @@sql_mode='MAXDB';
|
|||
SHOW VARIABLES LIKE 'sql_mode';
|
||||
END//
|
||||
SHOW CREATE PROCEDURE sp2;
|
||||
Procedure sql_mode Create Procedure
|
||||
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
|
||||
sp2 STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER CREATE DEFINER=`root`@`localhost` PROCEDURE `sp2`()
|
||||
BEGIN
|
||||
SET @@sql_mode='MAXDB';
|
||||
SHOW VARIABLES LIKE 'sql_mode';
|
||||
END
|
||||
END latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
... show value prior calling procedure
|
||||
SHOW VARIABLES LIKE 'sql_mode';
|
||||
Variable_name Value
|
||||
|
|
|
@ -122,6 +122,9 @@ LAST_ALTERED <created>
|
|||
SQL_MODE
|
||||
ROUTINE_COMMENT
|
||||
DEFINER root@localhost
|
||||
CHARACTER_SET_CLIENT latin1
|
||||
COLLATION_CONNECTION latin1_swedish_ci
|
||||
DATABASE_COLLATION latin1_swedish_ci
|
||||
SPECIFIC_NAME fn_2
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
|
@ -146,6 +149,9 @@ LAST_ALTERED <created>
|
|||
SQL_MODE
|
||||
ROUTINE_COMMENT created with INVOKER
|
||||
DEFINER root@localhost
|
||||
CHARACTER_SET_CLIENT latin1
|
||||
COLLATION_CONNECTION latin1_swedish_ci
|
||||
DATABASE_COLLATION latin1_swedish_ci
|
||||
SPECIFIC_NAME sp_1
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
|
@ -168,6 +174,9 @@ LAST_ALTERED <created>
|
|||
SQL_MODE
|
||||
ROUTINE_COMMENT
|
||||
DEFINER root@localhost
|
||||
CHARACTER_SET_CLIENT latin1
|
||||
COLLATION_CONNECTION latin1_swedish_ci
|
||||
DATABASE_COLLATION latin1_swedish_ci
|
||||
SPECIFIC_NAME sp_2
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
|
@ -190,6 +199,9 @@ LAST_ALTERED <created>
|
|||
SQL_MODE
|
||||
ROUTINE_COMMENT created with INVOKER
|
||||
DEFINER root@localhost
|
||||
CHARACTER_SET_CLIENT latin1
|
||||
COLLATION_CONNECTION latin1_swedish_ci
|
||||
DATABASE_COLLATION latin1_swedish_ci
|
||||
SHOW CREATE FUNCTION fn_1;
|
||||
Function fn_1
|
||||
sql_mode
|
||||
|
@ -199,6 +211,9 @@ set @x=i1;
|
|||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW CREATE FUNCTION fn_2;
|
||||
Function fn_2
|
||||
sql_mode
|
||||
|
@ -210,6 +225,9 @@ set @x=i1;
|
|||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW CREATE PROCEDURE sp_1;
|
||||
Procedure sp_1
|
||||
sql_mode
|
||||
|
@ -217,6 +235,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
|
|||
BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW CREATE PROCEDURE sp_2;
|
||||
Procedure sp_2
|
||||
sql_mode
|
||||
|
@ -226,6 +247,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
|
|||
BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW FUNCTION STATUS LIKE 'fn_%';
|
||||
Db db_storedproc
|
||||
Name fn_1
|
||||
|
@ -235,6 +259,9 @@ Modified <modified>
|
|||
Created <created>
|
||||
Security_type DEFINER
|
||||
Comment
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
Db db_storedproc
|
||||
Name fn_2
|
||||
Type FUNCTION
|
||||
|
@ -243,6 +270,9 @@ Modified <modified>
|
|||
Created <created>
|
||||
Security_type INVOKER
|
||||
Comment created with INVOKER
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW PROCEDURE STATUS LIKE 'sp_%';
|
||||
Db db_storedproc
|
||||
Name sp_1
|
||||
|
@ -252,6 +282,9 @@ Modified <modified>
|
|||
Created <created>
|
||||
Security_type DEFINER
|
||||
Comment
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
Db db_storedproc
|
||||
Name sp_2
|
||||
Type PROCEDURE
|
||||
|
@ -260,6 +293,9 @@ Modified <modified>
|
|||
Created <created>
|
||||
Security_type INVOKER
|
||||
Comment created with INVOKER
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
|
||||
... now change some stuff:
|
||||
--------------------------
|
||||
|
@ -304,6 +340,9 @@ LAST_ALTERED <created>
|
|||
SQL_MODE
|
||||
ROUTINE_COMMENT new comment, FN changed to INVOKER
|
||||
DEFINER root@localhost
|
||||
CHARACTER_SET_CLIENT latin1
|
||||
COLLATION_CONNECTION latin1_swedish_ci
|
||||
DATABASE_COLLATION latin1_swedish_ci
|
||||
SPECIFIC_NAME fn_2
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
|
@ -328,6 +367,9 @@ LAST_ALTERED <created>
|
|||
SQL_MODE
|
||||
ROUTINE_COMMENT FN changed to DEFINER
|
||||
DEFINER root@localhost
|
||||
CHARACTER_SET_CLIENT latin1
|
||||
COLLATION_CONNECTION latin1_swedish_ci
|
||||
DATABASE_COLLATION latin1_swedish_ci
|
||||
SPECIFIC_NAME sp_1
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
|
@ -350,6 +392,9 @@ LAST_ALTERED <created>
|
|||
SQL_MODE
|
||||
ROUTINE_COMMENT new comment, SP changed to INVOKER
|
||||
DEFINER root@localhost
|
||||
CHARACTER_SET_CLIENT latin1
|
||||
COLLATION_CONNECTION latin1_swedish_ci
|
||||
DATABASE_COLLATION latin1_swedish_ci
|
||||
SPECIFIC_NAME sp_2
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
|
@ -372,6 +417,9 @@ LAST_ALTERED <created>
|
|||
SQL_MODE
|
||||
ROUTINE_COMMENT SP changed to DEFINER
|
||||
DEFINER root@localhost
|
||||
CHARACTER_SET_CLIENT latin1
|
||||
COLLATION_CONNECTION latin1_swedish_ci
|
||||
DATABASE_COLLATION latin1_swedish_ci
|
||||
SHOW CREATE FUNCTION fn_1;
|
||||
Function fn_1
|
||||
sql_mode
|
||||
|
@ -384,6 +432,9 @@ set @x=i1;
|
|||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW CREATE FUNCTION fn_2;
|
||||
Function fn_2
|
||||
sql_mode
|
||||
|
@ -395,6 +446,9 @@ set @x=i1;
|
|||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW CREATE PROCEDURE sp_1;
|
||||
Procedure sp_1
|
||||
sql_mode
|
||||
|
@ -404,6 +458,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
|
|||
BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW CREATE PROCEDURE sp_2;
|
||||
Procedure sp_2
|
||||
sql_mode
|
||||
|
@ -413,6 +470,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
|
|||
BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW FUNCTION STATUS LIKE 'fn_%';
|
||||
Db db_storedproc
|
||||
Name fn_1
|
||||
|
@ -422,6 +482,9 @@ Modified <modified>
|
|||
Created <created>
|
||||
Security_type INVOKER
|
||||
Comment new comment, FN changed to INVOKER
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
Db db_storedproc
|
||||
Name fn_2
|
||||
Type FUNCTION
|
||||
|
@ -430,6 +493,9 @@ Modified <modified>
|
|||
Created <created>
|
||||
Security_type DEFINER
|
||||
Comment FN changed to DEFINER
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW PROCEDURE STATUS LIKE 'sp_%';
|
||||
Db db_storedproc
|
||||
Name sp_1
|
||||
|
@ -439,6 +505,9 @@ Modified <modified>
|
|||
Created <created>
|
||||
Security_type INVOKER
|
||||
Comment new comment, SP changed to INVOKER
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
Db db_storedproc
|
||||
Name sp_2
|
||||
Type PROCEDURE
|
||||
|
@ -447,6 +516,9 @@ Modified <modified>
|
|||
Created <created>
|
||||
Security_type DEFINER
|
||||
Comment SP changed to DEFINER
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
|
||||
... change back to default and check result:
|
||||
--------------------------------------------
|
||||
|
@ -479,6 +551,9 @@ LAST_ALTERED <created>
|
|||
SQL_MODE
|
||||
ROUTINE_COMMENT new comment, FN changed to INVOKER
|
||||
DEFINER root@localhost
|
||||
CHARACTER_SET_CLIENT latin1
|
||||
COLLATION_CONNECTION latin1_swedish_ci
|
||||
DATABASE_COLLATION latin1_swedish_ci
|
||||
SPECIFIC_NAME fn_2
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
|
@ -503,6 +578,9 @@ LAST_ALTERED <created>
|
|||
SQL_MODE
|
||||
ROUTINE_COMMENT FN changed to DEFINER
|
||||
DEFINER root@localhost
|
||||
CHARACTER_SET_CLIENT latin1
|
||||
COLLATION_CONNECTION latin1_swedish_ci
|
||||
DATABASE_COLLATION latin1_swedish_ci
|
||||
SPECIFIC_NAME sp_1
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
|
@ -525,6 +603,9 @@ LAST_ALTERED <created>
|
|||
SQL_MODE
|
||||
ROUTINE_COMMENT new comment, SP changed to INVOKER
|
||||
DEFINER root@localhost
|
||||
CHARACTER_SET_CLIENT latin1
|
||||
COLLATION_CONNECTION latin1_swedish_ci
|
||||
DATABASE_COLLATION latin1_swedish_ci
|
||||
SPECIFIC_NAME sp_2
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
|
@ -547,6 +628,9 @@ LAST_ALTERED <created>
|
|||
SQL_MODE
|
||||
ROUTINE_COMMENT SP changed to DEFINER
|
||||
DEFINER root@localhost
|
||||
CHARACTER_SET_CLIENT latin1
|
||||
COLLATION_CONNECTION latin1_swedish_ci
|
||||
DATABASE_COLLATION latin1_swedish_ci
|
||||
SHOW CREATE FUNCTION fn_1;
|
||||
Function fn_1
|
||||
sql_mode
|
||||
|
@ -559,6 +643,9 @@ set @x=i1;
|
|||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW CREATE FUNCTION fn_2;
|
||||
Function fn_2
|
||||
sql_mode
|
||||
|
@ -569,6 +656,9 @@ set @x=i1;
|
|||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW CREATE PROCEDURE sp_1;
|
||||
Procedure sp_1
|
||||
sql_mode
|
||||
|
@ -578,6 +668,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
|
|||
BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW CREATE PROCEDURE sp_2;
|
||||
Procedure sp_2
|
||||
sql_mode
|
||||
|
@ -587,6 +680,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
|
|||
BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW FUNCTION STATUS LIKE 'fn_%';
|
||||
Db db_storedproc
|
||||
Name fn_1
|
||||
|
@ -596,6 +692,9 @@ Modified <modified>
|
|||
Created <created>
|
||||
Security_type INVOKER
|
||||
Comment new comment, FN changed to INVOKER
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
Db db_storedproc
|
||||
Name fn_2
|
||||
Type FUNCTION
|
||||
|
@ -604,6 +703,9 @@ Modified <modified>
|
|||
Created <created>
|
||||
Security_type DEFINER
|
||||
Comment FN changed to DEFINER
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
SHOW PROCEDURE STATUS LIKE 'sp_%';
|
||||
Db db_storedproc
|
||||
Name sp_1
|
||||
|
@ -613,6 +715,9 @@ Modified <modified>
|
|||
Created <created>
|
||||
Security_type INVOKER
|
||||
Comment new comment, SP changed to INVOKER
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
Db db_storedproc
|
||||
Name sp_2
|
||||
Type PROCEDURE
|
||||
|
@ -621,6 +726,9 @@ Modified <modified>
|
|||
Created <created>
|
||||
Security_type DEFINER
|
||||
Comment SP changed to DEFINER
|
||||
character_set_client latin1
|
||||
collation_connection latin1_swedish_ci
|
||||
Database Collation latin1_swedish_ci
|
||||
|
||||
... cleanup
|
||||
-----------
|
||||
|
|
|
@ -263,7 +263,7 @@ select current_user;
|
|||
current_user
|
||||
root@localhost
|
||||
show triggers;
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
|
||||
grant select, insert, update on priv_db.t1 to test_yesprivs@localhost;
|
||||
show grants for test_yesprivs@localhost;
|
||||
Grants for test_yesprivs@localhost
|
||||
|
@ -296,7 +296,7 @@ select current_user;
|
|||
current_user
|
||||
root@localhost
|
||||
show triggers;
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
|
||||
show tables;
|
||||
Tables_in_priv_db
|
||||
t1
|
||||
|
@ -317,7 +317,7 @@ select current_user;
|
|||
current_user
|
||||
test_yesprivs@localhost
|
||||
show triggers;
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
|
||||
create trigger trg1_2 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 1_2-yes';
|
||||
select current_user;
|
||||
|
@ -453,9 +453,9 @@ ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for tabl
|
|||
create trigger trg1_4 before UPDATE on t1 for each row
|
||||
set new.f1 = 'trig 1_4-yes';
|
||||
show triggers;
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer
|
||||
trg1_3 INSERT t1 set new.f1 = 'trig 1_3-yes' BEFORE NULL test_yesprivs@localhost
|
||||
trg1_4 UPDATE t1 set new.f1 = 'trig 1_4-yes' BEFORE NULL test_yesprivs@localhost
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
|
||||
trg1_3 INSERT t1 set new.f1 = 'trig 1_3-yes' BEFORE NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
trg1_4 UPDATE t1 set new.f1 = 'trig 1_4-yes' BEFORE NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
select current_user;
|
||||
current_user
|
||||
test_noprivs@localhost
|
||||
|
@ -570,11 +570,11 @@ current_user
|
|||
test_yesprivs@localhost
|
||||
use priv_db;
|
||||
show triggers;
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer
|
||||
trg1_1 INSERT t1 set new.f1 = 'trig 1_1-yes' BEFORE NULL test_yesprivs@localhost
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
|
||||
trg1_1 INSERT t1 set new.f1 = 'trig 1_1-yes' BEFORE NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
select * from information_schema.triggers;
|
||||
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER
|
||||
NULL priv_db trg1_1 INSERT NULL priv_db t1 0 NULL set new.f1 = 'trig 1_1-yes' ROW BEFORE NULL NULL OLD NEW NULL test_yesprivs@localhost
|
||||
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
|
||||
NULL priv_db trg1_1 INSERT NULL priv_db t1 0 NULL set new.f1 = 'trig 1_1-yes' ROW BEFORE NULL NULL OLD NEW NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
drop trigger trg1_1;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
select current_user;
|
||||
|
@ -863,7 +863,7 @@ select current_user;
|
|||
current_user
|
||||
root@localhost
|
||||
show triggers;
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
|
||||
grant TRIGGER on priv1_db.t1 to test_yesprivs@localhost;
|
||||
show grants for test_yesprivs@localhost;
|
||||
Grants for test_yesprivs@localhost
|
||||
|
@ -878,7 +878,7 @@ select current_user;
|
|||
current_user
|
||||
test_yesprivs@localhost
|
||||
show triggers;
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
|
||||
create trigger trg1_2 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 1_2-yes';
|
||||
create trigger trg2_1 before INSERT on t2 for each row
|
||||
|
@ -990,7 +990,7 @@ select current_user;
|
|||
current_user
|
||||
root@localhost
|
||||
show triggers;
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
|
||||
grant select, insert, update ,trigger
|
||||
on priv_db.t1 to test_yesprivs@localhost
|
||||
with grant option;
|
||||
|
|
|
@ -885,31 +885,31 @@ CREATE TABLE t1 (f1 BIGINT);
|
|||
INSERT INTO t1 VALUES(1);
|
||||
CREATE VIEW test.v1 AS SELECT * FROM t1 limit 2;
|
||||
SHOW CREATE VIEW test.v1;
|
||||
View Create View
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` limit 2
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` limit 2 latin1 latin1_swedish_ci
|
||||
SELECT * FROM test.v1;
|
||||
f1
|
||||
1
|
||||
CREATE OR REPLACE ALGORITHM = TEMPTABLE VIEW test.v1
|
||||
AS SELECT * FROM t1 limit 2;
|
||||
SHOW CREATE VIEW test.v1;
|
||||
View Create View
|
||||
v1 CREATE ALGORITHM=TEMPTABLE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` limit 2
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=TEMPTABLE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` limit 2 latin1 latin1_swedish_ci
|
||||
SELECT * FROM test.v1;
|
||||
f1
|
||||
1
|
||||
CREATE OR REPLACE VIEW test.v1 AS SELECT * FROM tb2 limit 2;
|
||||
SHOW CREATE VIEW test.v1;
|
||||
View Create View
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `tb2`.`f59` AS `f59`,`tb2`.`f60` AS `f60`,`tb2`.`f61` AS `f61`,`tb2`.`f62` AS `f62`,`tb2`.`f63` AS `f63`,`tb2`.`f64` AS `f64`,`tb2`.`f65` AS `f65`,`tb2`.`f66` AS `f66`,`tb2`.`f67` AS `f67`,`tb2`.`f68` AS `f68`,`tb2`.`f69` AS `f69`,`tb2`.`f70` AS `f70`,`tb2`.`f71` AS `f71`,`tb2`.`f72` AS `f72`,`tb2`.`f73` AS `f73`,`tb2`.`f74` AS `f74`,`tb2`.`f75` AS `f75`,`tb2`.`f76` AS `f76`,`tb2`.`f77` AS `f77`,`tb2`.`f78` AS `f78`,`tb2`.`f79` AS `f79`,`tb2`.`f80` AS `f80`,`tb2`.`f81` AS `f81`,`tb2`.`f82` AS `f82`,`tb2`.`f83` AS `f83`,`tb2`.`f84` AS `f84`,`tb2`.`f85` AS `f85`,`tb2`.`f86` AS `f86`,`tb2`.`f87` AS `f87`,`tb2`.`f88` AS `f88`,`tb2`.`f89` AS `f89`,`tb2`.`f90` AS `f90`,`tb2`.`f91` AS `f91`,`tb2`.`f92` AS `f92`,`tb2`.`f93` AS `f93`,`tb2`.`f94` AS `f94`,`tb2`.`f95` AS `f95`,`tb2`.`f96` AS `f96`,`tb2`.`f97` AS `f97`,`tb2`.`f98` AS `f98`,`tb2`.`f99` AS `f99`,`tb2`.`f100` AS `f100`,`tb2`.`f101` AS `f101`,`tb2`.`f102` AS `f102`,`tb2`.`f103` AS `f103`,`tb2`.`f104` AS `f104`,`tb2`.`f105` AS `f105`,`tb2`.`f106` AS `f106`,`tb2`.`f107` AS `f107`,`tb2`.`f108` AS `f108`,`tb2`.`f109` AS `f109`,`tb2`.`f110` AS `f110`,`tb2`.`f111` AS `f111`,`tb2`.`f112` AS `f112`,`tb2`.`f113` AS `f113`,`tb2`.`f114` AS `f114`,`tb2`.`f115` AS `f115`,`tb2`.`f116` AS `f116`,`tb2`.`f117` AS `f117` from `tb2` limit 2
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `tb2`.`f59` AS `f59`,`tb2`.`f60` AS `f60`,`tb2`.`f61` AS `f61`,`tb2`.`f62` AS `f62`,`tb2`.`f63` AS `f63`,`tb2`.`f64` AS `f64`,`tb2`.`f65` AS `f65`,`tb2`.`f66` AS `f66`,`tb2`.`f67` AS `f67`,`tb2`.`f68` AS `f68`,`tb2`.`f69` AS `f69`,`tb2`.`f70` AS `f70`,`tb2`.`f71` AS `f71`,`tb2`.`f72` AS `f72`,`tb2`.`f73` AS `f73`,`tb2`.`f74` AS `f74`,`tb2`.`f75` AS `f75`,`tb2`.`f76` AS `f76`,`tb2`.`f77` AS `f77`,`tb2`.`f78` AS `f78`,`tb2`.`f79` AS `f79`,`tb2`.`f80` AS `f80`,`tb2`.`f81` AS `f81`,`tb2`.`f82` AS `f82`,`tb2`.`f83` AS `f83`,`tb2`.`f84` AS `f84`,`tb2`.`f85` AS `f85`,`tb2`.`f86` AS `f86`,`tb2`.`f87` AS `f87`,`tb2`.`f88` AS `f88`,`tb2`.`f89` AS `f89`,`tb2`.`f90` AS `f90`,`tb2`.`f91` AS `f91`,`tb2`.`f92` AS `f92`,`tb2`.`f93` AS `f93`,`tb2`.`f94` AS `f94`,`tb2`.`f95` AS `f95`,`tb2`.`f96` AS `f96`,`tb2`.`f97` AS `f97`,`tb2`.`f98` AS `f98`,`tb2`.`f99` AS `f99`,`tb2`.`f100` AS `f100`,`tb2`.`f101` AS `f101`,`tb2`.`f102` AS `f102`,`tb2`.`f103` AS `f103`,`tb2`.`f104` AS `f104`,`tb2`.`f105` AS `f105`,`tb2`.`f106` AS `f106`,`tb2`.`f107` AS `f107`,`tb2`.`f108` AS `f108`,`tb2`.`f109` AS `f109`,`tb2`.`f110` AS `f110`,`tb2`.`f111` AS `f111`,`tb2`.`f112` AS `f112`,`tb2`.`f113` AS `f113`,`tb2`.`f114` AS `f114`,`tb2`.`f115` AS `f115`,`tb2`.`f116` AS `f116`,`tb2`.`f117` AS `f117` from `tb2` limit 2 latin1 latin1_swedish_ci
|
||||
SELECT * FROM test.v1 ;
|
||||
f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117
|
||||
1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set |