Merge quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/51

into  quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/jun05/51


client/mysqldump.c:
  Auto merged
include/m_string.h:
  Auto merged
include/mysql_com.h:
  Auto merged
include/violite.h:
  Auto merged
libmysql/libmysql.c:
  Auto merged
mysql-test/include/mix1.inc:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/innodb_mysql.result:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/t/mysqltest.test:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
mysys/my_init.c:
  Auto merged
server-tools/instance-manager/mysql_connection.cc:
  Auto merged
sql/field.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/net_serv.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_connect.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql-common/client.c:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
strings/ctype-mb.c:
  Auto merged
strings/ctype-ucs2.c:
  Auto merged
strings/strtod.c:
  Auto merged
vio/vio_priv.h:
  Auto merged
vio/viosocket.c:
  Auto merged
client/mysqltest.c:
  SCCS merged
include/my_global.h:
  SCCS merged
sql/field.h:
  SCCS merged
sql/sql_table.cc:
  Manual merge
strings/ctype-bin.c:
  Manual merge
This commit is contained in:
unknown 2007-06-05 17:51:30 +02:00
commit 38ed1be3ec
565 changed files with 16203 additions and 12623 deletions

View File

@ -489,6 +489,8 @@ dbug/main.r
dbug/output*.r dbug/output*.r
dbug/user.ps dbug/user.ps
dbug/user.t dbug/user.t
debian/control
debian/defs.mk
depcomp depcomp
emacs.h emacs.h
examples/*.ds? examples/*.ds?
@ -1071,6 +1073,7 @@ libmysqld/ha_myisam.cc
libmysqld/ha_myisammrg.cc libmysqld/ha_myisammrg.cc
libmysqld/ha_ndbcluster.cc libmysqld/ha_ndbcluster.cc
libmysqld/ha_ndbcluster_binlog.cc libmysqld/ha_ndbcluster_binlog.cc
libmysqld/ha_ndbcluster_cond.cc
libmysqld/ha_partition.cc libmysqld/ha_partition.cc
libmysqld/ha_tina.cc libmysqld/ha_tina.cc
libmysqld/handler.cc libmysqld/handler.cc
@ -1274,7 +1277,6 @@ mysql-test/r/*.err
mysql-test/r/*.log mysql-test/r/*.log
mysql-test/r/*.out mysql-test/r/*.out
mysql-test/r/*.reject mysql-test/r/*.reject
mysql-test/r/*.warnings
mysql-test/r/alter_table.err mysql-test/r/alter_table.err
mysql-test/r/archive.err mysql-test/r/archive.err
mysql-test/r/backup.log mysql-test/r/backup.log
@ -2989,4 +2991,3 @@ win/vs71cache.txt
win/vs8cache.txt win/vs8cache.txt
zlib/*.ds? zlib/*.ds?
zlib/*.vcproj zlib/*.vcproj
libmysqld/ha_ndbcluster_cond.cc

View File

@ -213,7 +213,7 @@ void completion_hash_clean(HashTable *ht)
void completion_hash_free(HashTable *ht) void completion_hash_free(HashTable *ht)
{ {
completion_hash_clean(ht); completion_hash_clean(ht);
my_free((gptr) ht->arBuckets,MYF(0)); my_free(ht->arBuckets, MYF(0));
} }

View File

@ -28,6 +28,6 @@ typedef struct st_line_buffer
} LINE_BUFFER; } LINE_BUFFER;
extern LINE_BUFFER *batch_readline_init(ulong max_size,FILE *file); extern LINE_BUFFER *batch_readline_init(ulong max_size,FILE *file);
extern LINE_BUFFER *batch_readline_command(LINE_BUFFER *buffer, my_string str); extern LINE_BUFFER *batch_readline_command(LINE_BUFFER *buffer, char * str);
extern char *batch_readline(LINE_BUFFER *buffer); extern char *batch_readline(LINE_BUFFER *buffer);
extern void batch_readline_end(LINE_BUFFER *buffer); extern void batch_readline_end(LINE_BUFFER *buffer);

View File

@ -51,7 +51,7 @@ const char *VER= "14.13";
/* Buffer to hold 'version' and 'version_comment' */ /* Buffer to hold 'version' and 'version_comment' */
#define MAX_SERVER_VERSION_LENGTH 128 #define MAX_SERVER_VERSION_LENGTH 128
gptr sql_alloc(unsigned size); // Don't use mysqld alloc for these void* sql_alloc(unsigned size); // Don't use mysqld alloc for these
void sql_element_free(void *ptr); void sql_element_free(void *ptr);
#include "sql_string.h" #include "sql_string.h"
@ -142,7 +142,7 @@ static my_bool info_flag=0,ignore_errors=0,wait_flag=0,quick=0,
static my_bool column_types_flag; static my_bool column_types_flag;
static ulong opt_max_allowed_packet, opt_net_buffer_length; static ulong opt_max_allowed_packet, opt_net_buffer_length;
static uint verbose=0,opt_silent=0,opt_mysql_port=0, opt_local_infile=0; static uint verbose=0,opt_silent=0,opt_mysql_port=0, opt_local_infile=0;
static my_string opt_mysql_unix_port=0; static char * opt_mysql_unix_port=0;
static int connect_flag=CLIENT_INTERACTIVE; static int connect_flag=CLIENT_INTERACTIVE;
static char *current_host,*current_db,*current_user=0,*opt_password=0, static char *current_host,*current_db,*current_user=0,*opt_password=0,
*current_prompt=0, *delimiter_str= 0, *current_prompt=0, *delimiter_str= 0,
@ -587,7 +587,7 @@ static struct my_option my_long_options[] =
#endif #endif
{"auto-rehash", OPT_AUTO_REHASH, {"auto-rehash", OPT_AUTO_REHASH,
"Enable automatic rehashing. One doesn't need to use 'rehash' to get table and field completion, but startup and reconnecting may take a longer time. Disable with --disable-auto-rehash.", "Enable automatic rehashing. One doesn't need to use 'rehash' to get table and field completion, but startup and reconnecting may take a longer time. Disable with --disable-auto-rehash.",
(gptr*) &opt_rehash, (gptr*) &opt_rehash, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, (uchar**) &opt_rehash, (uchar**) &opt_rehash, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0,
0, 0}, 0, 0},
{"no-auto-rehash", 'A', {"no-auto-rehash", 'A',
"No automatic rehashing. One has to use 'rehash' to get table and field completion. This gives a quicker start of mysql and disables rehashing on reconnect. WARNING: options deprecated; use --disable-auto-rehash instead.", "No automatic rehashing. One has to use 'rehash' to get table and field completion. This gives a quicker start of mysql and disables rehashing on reconnect. WARNING: options deprecated; use --disable-auto-rehash instead.",
@ -595,42 +595,42 @@ static struct my_option my_long_options[] =
{"batch", 'B', {"batch", 'B',
"Don't use history file. Disable interactive behavior. (Enables --silent)", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, "Don't use history file. Disable interactive behavior. (Enables --silent)", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"character-sets-dir", OPT_CHARSETS_DIR, {"character-sets-dir", OPT_CHARSETS_DIR,
"Directory where character sets are.", (gptr*) &charsets_dir, "Directory where character sets are.", (uchar**) &charsets_dir,
(gptr*) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"column-type-info", OPT_COLUMN_TYPES, "Display column type information.", {"column-type-info", OPT_COLUMN_TYPES, "Display column type information.",
(gptr*) &column_types_flag, (gptr*) &column_types_flag, (uchar**) &column_types_flag, (uchar**) &column_types_flag,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"compress", 'C', "Use compression in server/client protocol.", {"compress", 'C', "Use compression in server/client protocol.",
(gptr*) &opt_compress, (gptr*) &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0, (uchar**) &opt_compress, (uchar**) &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0,
0, 0, 0}, 0, 0, 0},
#ifdef DBUG_OFF #ifdef DBUG_OFF
{"debug", '#', "This is a non-debug version. Catch this and exit", {"debug", '#', "This is a non-debug version. Catch this and exit",
0,0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0}, 0,0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
#else #else
{"debug", '#', "Output debug log", (gptr*) &default_dbug_option, {"debug", '#', "Output debug log", (uchar**) &default_dbug_option,
(gptr*) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
{"debug-info", 'T', "Print some debug info at exit.", (gptr*) &info_flag, {"debug-info", 'T', "Print some debug info at exit.", (uchar**) &info_flag,
(gptr*) &info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"database", 'D', "Database to use.", (gptr*) &current_db, {"database", 'D', "Database to use.", (uchar**) &current_db,
(gptr*) &current_db, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &current_db, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"default-character-set", OPT_DEFAULT_CHARSET, {"default-character-set", OPT_DEFAULT_CHARSET,
"Set the default character set.", (gptr*) &default_charset, "Set the default character set.", (uchar**) &default_charset,
(gptr*) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"delimiter", OPT_DELIMITER, "Delimiter to be used.", (gptr*) &delimiter_str, {"delimiter", OPT_DELIMITER, "Delimiter to be used.", (uchar**) &delimiter_str,
(gptr*) &delimiter_str, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &delimiter_str, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"execute", 'e', "Execute command and quit. (Disables --force and history file)", 0, {"execute", 'e', "Execute command and quit. (Disables --force and history file)", 0,
0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"vertical", 'E', "Print the output of a query (rows) vertically.", {"vertical", 'E', "Print the output of a query (rows) vertically.",
(gptr*) &vertical, (gptr*) &vertical, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, (uchar**) &vertical, (uchar**) &vertical, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0,
0}, 0},
{"force", 'f', "Continue even if we get an sql error.", {"force", 'f', "Continue even if we get an sql error.",
(gptr*) &ignore_errors, (gptr*) &ignore_errors, 0, GET_BOOL, NO_ARG, 0, 0, (uchar**) &ignore_errors, (uchar**) &ignore_errors, 0, GET_BOOL, NO_ARG, 0, 0,
0, 0, 0, 0}, 0, 0, 0, 0},
{"named-commands", 'G', {"named-commands", 'G',
"Enable named commands. Named commands mean this program's internal commands; see mysql> help . When enabled, the named commands can be used from any line of the query, otherwise only from the first line, before an enter. Disable with --disable-named-commands. This option is disabled by default.", "Enable named commands. Named commands mean this program's internal commands; see mysql> help . When enabled, the named commands can be used from any line of the query, otherwise only from the first line, before an enter. Disable with --disable-named-commands. This option is disabled by default.",
(gptr*) &named_cmds, (gptr*) &named_cmds, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, (uchar**) &named_cmds, (uchar**) &named_cmds, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
0, 0}, 0, 0},
{"no-named-commands", 'g', {"no-named-commands", 'g',
"Named commands are disabled. Use \\* form only, or use named commands only in the beginning of a line ending with a semicolon (;) Since version 10.9 the client now starts with this option ENABLED by default! Disable with '-G'. Long format commands still work from the first line. WARNING: option deprecated; use --disable-named-commands instead.", "Named commands are disabled. Use \\* form only, or use named commands only in the beginning of a line ending with a semicolon (;) Since version 10.9 the client now starts with this option ENABLED by default! Disable with '-G'. Long format commands still work from the first line. WARNING: option deprecated; use --disable-named-commands instead.",
@ -638,25 +638,25 @@ static struct my_option my_long_options[] =
{"ignore-spaces", 'i', "Ignore space after function names.", 0, 0, 0, {"ignore-spaces", 'i', "Ignore space after function names.", 0, 0, 0,
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"local-infile", OPT_LOCAL_INFILE, "Enable/disable LOAD DATA LOCAL INFILE.", {"local-infile", OPT_LOCAL_INFILE, "Enable/disable LOAD DATA LOCAL INFILE.",
(gptr*) &opt_local_infile, (uchar**) &opt_local_infile,
(gptr*) &opt_local_infile, 0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &opt_local_infile, 0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0},
{"no-beep", 'b', "Turn off beep on error.", (gptr*) &opt_nobeep, {"no-beep", 'b', "Turn off beep on error.", (uchar**) &opt_nobeep,
(gptr*) &opt_nobeep, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &opt_nobeep, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"host", 'h', "Connect to host.", (gptr*) &current_host, {"host", 'h', "Connect to host.", (uchar**) &current_host,
(gptr*) &current_host, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &current_host, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"html", 'H', "Produce HTML output.", (gptr*) &opt_html, (gptr*) &opt_html, {"html", 'H', "Produce HTML output.", (uchar**) &opt_html, (uchar**) &opt_html,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"xml", 'X', "Produce XML output", (gptr*) &opt_xml, (gptr*) &opt_xml, 0, {"xml", 'X', "Produce XML output", (uchar**) &opt_xml, (uchar**) &opt_xml, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"line-numbers", OPT_LINE_NUMBERS, "Write line numbers for errors.", {"line-numbers", OPT_LINE_NUMBERS, "Write line numbers for errors.",
(gptr*) &line_numbers, (gptr*) &line_numbers, 0, GET_BOOL, (uchar**) &line_numbers, (uchar**) &line_numbers, 0, GET_BOOL,
NO_ARG, 1, 0, 0, 0, 0, 0}, NO_ARG, 1, 0, 0, 0, 0, 0},
{"skip-line-numbers", 'L', "Don't write line number for errors. WARNING: -L is deprecated, use long version of this option instead.", 0, 0, 0, GET_NO_ARG, {"skip-line-numbers", 'L', "Don't write line number for errors. WARNING: -L is deprecated, use long version of this option instead.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0}, NO_ARG, 0, 0, 0, 0, 0, 0},
{"unbuffered", 'n', "Flush buffer after each query.", (gptr*) &unbuffered, {"unbuffered", 'n', "Flush buffer after each query.", (uchar**) &unbuffered,
(gptr*) &unbuffered, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &unbuffered, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"column-names", OPT_COLUMN_NAMES, "Write column names in results.", {"column-names", OPT_COLUMN_NAMES, "Write column names in results.",
(gptr*) &column_names, (gptr*) &column_names, 0, GET_BOOL, (uchar**) &column_names, (uchar**) &column_names, 0, GET_BOOL,
NO_ARG, 1, 0, 0, 0, 0, 0}, NO_ARG, 1, 0, 0, 0, 0, 0},
{"skip-column-names", 'N', {"skip-column-names", 'N',
"Don't write column names in results. WARNING: -N is deprecated, use long version of this options instead.", "Don't write column names in results. WARNING: -N is deprecated, use long version of this options instead.",
@ -665,7 +665,7 @@ static struct my_option my_long_options[] =
"Change the value of a variable. Please note that this option is deprecated; you can set variables directly with --variable-name=value.", "Change the value of a variable. Please note that this option is deprecated; you can set variables directly with --variable-name=value.",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"sigint-ignore", OPT_SIGINT_IGNORE, "Ignore SIGINT (CTRL-C)", {"sigint-ignore", OPT_SIGINT_IGNORE, "Ignore SIGINT (CTRL-C)",
(gptr*) &opt_sigint_ignore, (gptr*) &opt_sigint_ignore, 0, GET_BOOL, (uchar**) &opt_sigint_ignore, (uchar**) &opt_sigint_ignore, 0, GET_BOOL,
NO_ARG, 0, 0, 0, 0, 0, 0}, NO_ARG, 0, 0, 0, 0, 0, 0},
{"one-database", 'o', {"one-database", 'o',
"Only update the default database. This is useful for skipping updates to other database in the update log.", "Only update the default database. This is useful for skipping updates to other database in the update log.",
@ -685,49 +685,49 @@ static struct my_option my_long_options[] =
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG, {"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0}, NO_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
{"port", 'P', "Port number to use for connection.", (gptr*) &opt_mysql_port, {"port", 'P', "Port number to use for connection.", (uchar**) &opt_mysql_port,
(gptr*) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, (uchar**) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
0}, 0},
{"prompt", OPT_PROMPT, "Set the mysql prompt to this value.", {"prompt", OPT_PROMPT, "Set the mysql prompt to this value.",
(gptr*) &current_prompt, (gptr*) &current_prompt, 0, GET_STR_ALLOC, (uchar**) &current_prompt, (uchar**) &current_prompt, 0, GET_STR_ALLOC,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory).", {"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory).",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"quick", 'q', {"quick", 'q',
"Don't cache result, print it row by row. This may slow down the server if the output is suspended. Doesn't use history file.", "Don't cache result, print it row by row. This may slow down the server if the output is suspended. Doesn't use history file.",
(gptr*) &quick, (gptr*) &quick, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &quick, (uchar**) &quick, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"raw", 'r', "Write fields without conversion. Used with --batch.", {"raw", 'r', "Write fields without conversion. Used with --batch.",
(gptr*) &opt_raw_data, (gptr*) &opt_raw_data, 0, GET_BOOL, NO_ARG, 0, 0, 0, (uchar**) &opt_raw_data, (uchar**) &opt_raw_data, 0, GET_BOOL, NO_ARG, 0, 0, 0,
0, 0, 0}, 0, 0, 0},
{"reconnect", OPT_RECONNECT, "Reconnect if the connection is lost. Disable with --disable-reconnect. This option is enabled by default.", {"reconnect", OPT_RECONNECT, "Reconnect if the connection is lost. Disable with --disable-reconnect. This option is enabled by default.",
(gptr*) &opt_reconnect, (gptr*) &opt_reconnect, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, (uchar**) &opt_reconnect, (uchar**) &opt_reconnect, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
{"silent", 's', "Be more silent. Print results with a tab as separator, each row on new line.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, {"silent", 's', "Be more silent. Print results with a tab as separator, each row on new line.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0,
0, 0}, 0, 0},
#ifdef HAVE_SMEM #ifdef HAVE_SMEM
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME, {"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
"Base name of shared memory.", (gptr*) &shared_memory_base_name, (gptr*) &shared_memory_base_name, "Base name of shared memory.", (uchar**) &shared_memory_base_name, (uchar**) &shared_memory_base_name,
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
{"socket", 'S', "Socket file to use for connection.", {"socket", 'S', "Socket file to use for connection.",
(gptr*) &opt_mysql_unix_port, (gptr*) &opt_mysql_unix_port, 0, GET_STR_ALLOC, (uchar**) &opt_mysql_unix_port, (uchar**) &opt_mysql_unix_port, 0, GET_STR_ALLOC,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#include "sslopt-longopts.h" #include "sslopt-longopts.h"
{"table", 't', "Output in table format.", (gptr*) &output_tables, {"table", 't', "Output in table format.", (uchar**) &output_tables,
(gptr*) &output_tables, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &output_tables, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"tee", OPT_TEE, {"tee", OPT_TEE,
"Append everything into outfile. See interactive help (\\h) also. Does not work in batch mode. Disable with --disable-tee. This option is disabled by default.", "Append everything into outfile. See interactive help (\\h) also. Does not work in batch mode. Disable with --disable-tee. This option is disabled by default.",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"no-tee", OPT_NOTEE, "Disable outfile. See interactive help (\\h) also. WARNING: option deprecated; use --disable-tee instead", 0, 0, 0, GET_NO_ARG, {"no-tee", OPT_NOTEE, "Disable outfile. See interactive help (\\h) also. WARNING: option deprecated; use --disable-tee instead", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0}, NO_ARG, 0, 0, 0, 0, 0, 0},
#ifndef DONT_ALLOW_USER_CHANGE #ifndef DONT_ALLOW_USER_CHANGE
{"user", 'u', "User for login if not current user.", (gptr*) &current_user, {"user", 'u', "User for login if not current user.", (uchar**) &current_user,
(gptr*) &current_user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &current_user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
{"safe-updates", 'U', "Only allow UPDATE and DELETE that uses keys.", {"safe-updates", 'U', "Only allow UPDATE and DELETE that uses keys.",
(gptr*) &safe_updates, (gptr*) &safe_updates, 0, GET_BOOL, NO_ARG, 0, 0, (uchar**) &safe_updates, (uchar**) &safe_updates, 0, GET_BOOL, NO_ARG, 0, 0,
0, 0, 0, 0}, 0, 0, 0, 0},
{"i-am-a-dummy", 'U', "Synonym for option --safe-updates, -U.", {"i-am-a-dummy", 'U', "Synonym for option --safe-updates, -U.",
(gptr*) &safe_updates, (gptr*) &safe_updates, 0, GET_BOOL, NO_ARG, 0, 0, (uchar**) &safe_updates, (uchar**) &safe_updates, 0, GET_BOOL, NO_ARG, 0, 0,
0, 0, 0, 0}, 0, 0, 0, 0},
{"verbose", 'v', "Write more. (-v -v -v gives the table output format).", 0, {"verbose", 'v', "Write more. (-v -v -v gives the table output format).", 0,
0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
@ -737,32 +737,32 @@ static struct my_option my_long_options[] =
NO_ARG, 0, 0, 0, 0, 0, 0}, NO_ARG, 0, 0, 0, 0, 0, 0},
{"connect_timeout", OPT_CONNECT_TIMEOUT, {"connect_timeout", OPT_CONNECT_TIMEOUT,
"Number of seconds before connection timeout.", "Number of seconds before connection timeout.",
(gptr*) &opt_connect_timeout, (uchar**) &opt_connect_timeout,
(gptr*) &opt_connect_timeout, 0, GET_ULONG, REQUIRED_ARG, 0, 0, 3600*12, 0, (uchar**) &opt_connect_timeout, 0, GET_ULONG, REQUIRED_ARG, 0, 0, 3600*12, 0,
0, 0}, 0, 0},
{"max_allowed_packet", OPT_MAX_ALLOWED_PACKET, {"max_allowed_packet", OPT_MAX_ALLOWED_PACKET,
"Max packet length to send to, or receive from server", "Max packet length to send to, or receive from server",
(gptr*) &opt_max_allowed_packet, (gptr*) &opt_max_allowed_packet, 0, GET_ULONG, (uchar**) &opt_max_allowed_packet, (uchar**) &opt_max_allowed_packet, 0, GET_ULONG,
REQUIRED_ARG, 16 *1024L*1024L, 4096, (longlong) 2*1024L*1024L*1024L, REQUIRED_ARG, 16 *1024L*1024L, 4096, (longlong) 2*1024L*1024L*1024L,
MALLOC_OVERHEAD, 1024, 0}, MALLOC_OVERHEAD, 1024, 0},
{"net_buffer_length", OPT_NET_BUFFER_LENGTH, {"net_buffer_length", OPT_NET_BUFFER_LENGTH,
"Buffer for TCP/IP and socket communication", "Buffer for TCP/IP and socket communication",
(gptr*) &opt_net_buffer_length, (gptr*) &opt_net_buffer_length, 0, GET_ULONG, (uchar**) &opt_net_buffer_length, (uchar**) &opt_net_buffer_length, 0, GET_ULONG,
REQUIRED_ARG, 16384, 1024, 512*1024*1024L, MALLOC_OVERHEAD, 1024, 0}, REQUIRED_ARG, 16384, 1024, 512*1024*1024L, MALLOC_OVERHEAD, 1024, 0},
{"select_limit", OPT_SELECT_LIMIT, {"select_limit", OPT_SELECT_LIMIT,
"Automatic limit for SELECT when using --safe-updates", "Automatic limit for SELECT when using --safe-updates",
(gptr*) &select_limit, (uchar**) &select_limit,
(gptr*) &select_limit, 0, GET_ULONG, REQUIRED_ARG, 1000L, 1, ~0L, 0, 1, 0}, (uchar**) &select_limit, 0, GET_ULONG, REQUIRED_ARG, 1000L, 1, ~0L, 0, 1, 0},
{"max_join_size", OPT_MAX_JOIN_SIZE, {"max_join_size", OPT_MAX_JOIN_SIZE,
"Automatic limit for rows in a join when using --safe-updates", "Automatic limit for rows in a join when using --safe-updates",
(gptr*) &max_join_size, (uchar**) &max_join_size,
(gptr*) &max_join_size, 0, GET_ULONG, REQUIRED_ARG, 1000000L, 1, ~0L, 0, 1, (uchar**) &max_join_size, 0, GET_ULONG, REQUIRED_ARG, 1000000L, 1, ~0L, 0, 1,
0}, 0},
{"secure-auth", OPT_SECURE_AUTH, "Refuse client connecting to server if it" {"secure-auth", OPT_SECURE_AUTH, "Refuse client connecting to server if it"
" uses old (pre-4.1.1) protocol", (gptr*) &opt_secure_auth, " uses old (pre-4.1.1) protocol", (uchar**) &opt_secure_auth,
(gptr*) &opt_secure_auth, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &opt_secure_auth, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"show-warnings", OPT_SHOW_WARNINGS, "Show warnings after every statement.", {"show-warnings", OPT_SHOW_WARNINGS, "Show warnings after every statement.",
(gptr*) &show_warnings, (gptr*) &show_warnings, 0, GET_BOOL, NO_ARG, (uchar**) &show_warnings, (uchar**) &show_warnings, 0, GET_BOOL, NO_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
}; };
@ -1079,7 +1079,7 @@ static int read_and_execute(bool interactive)
tmpbuf.alloc(65535); tmpbuf.alloc(65535);
tmpbuf.length(0); tmpbuf.length(0);
buffer.length(0); buffer.length(0);
unsigned long clen; size_t clen;
do do
{ {
line= my_cgets((char*)tmpbuf.ptr(), tmpbuf.alloced_length()-1, &clen); line= my_cgets((char*)tmpbuf.ptr(), tmpbuf.alloced_length()-1, &clen);
@ -2443,7 +2443,7 @@ print_table_data(MYSQL_RES *result)
(void) tee_fputs("\n", PAGER); (void) tee_fputs("\n", PAGER);
} }
tee_puts((char*) separator.ptr(), PAGER); tee_puts((char*) separator.ptr(), PAGER);
my_afree((gptr) num_flag); my_afree((uchar*) num_flag);
} }
@ -2842,10 +2842,10 @@ com_edit(String *buffer,char *line __attribute__((unused)))
MYF(MY_WME))) < 0) MYF(MY_WME))) < 0)
goto err; goto err;
if (buffer->is_empty() && !old_buffer.is_empty()) if (buffer->is_empty() && !old_buffer.is_empty())
(void) my_write(fd,(byte*) old_buffer.ptr(),old_buffer.length(), (void) my_write(fd,(uchar*) old_buffer.ptr(),old_buffer.length(),
MYF(MY_WME)); MYF(MY_WME));
else else
(void) my_write(fd,(byte*) buffer->ptr(),buffer->length(),MYF(MY_WME)); (void) my_write(fd,(uchar*) buffer->ptr(),buffer->length(),MYF(MY_WME));
(void) my_close(fd,MYF(0)); (void) my_close(fd,MYF(0));
if (!(editor = (char *)getenv("EDITOR")) && if (!(editor = (char *)getenv("EDITOR")) &&
@ -3893,13 +3893,13 @@ static int com_prompt(String *buffer, char *line)
#ifndef EMBEDDED_LIBRARY #ifndef EMBEDDED_LIBRARY
/* Keep sql_string library happy */ /* Keep sql_string library happy */
gptr sql_alloc(unsigned int Size) void *sql_alloc(size_t Size)
{ {
return my_malloc(Size,MYF(MY_WME)); return my_malloc(Size,MYF(MY_WME));
} }
void sql_element_free(void *ptr) void sql_element_free(void *ptr)
{ {
my_free((gptr) ptr,MYF(0)); my_free(ptr,MYF(0));
} }
#endif /* EMBEDDED_LIBRARY */ #endif /* EMBEDDED_LIBRARY */

View File

@ -63,8 +63,8 @@ static struct my_option my_long_options[]=
{"debug", '#', "This is a non-debug version. Catch this and exit", {"debug", '#', "This is a non-debug version. Catch this and exit",
0, 0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
#else #else
{"debug", '#', "Output debug log", (gptr *) & default_dbug_option, {"debug", '#', "Output debug log", (uchar* *) & default_dbug_option,
(gptr *) & default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, (uchar* *) & default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
{"default-character-set", OPT_DEFAULT_CHARSET, {"default-character-set", OPT_DEFAULT_CHARSET,
"Set the default character set.", 0, "Set the default character set.", 0,
@ -73,16 +73,16 @@ static struct my_option my_long_options[]=
"Directory where character sets are.", 0, "Directory where character sets are.", 0,
0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"compress", OPT_COMPRESS, "Use compression in server/client protocol.", {"compress", OPT_COMPRESS, "Use compression in server/client protocol.",
(gptr*)&not_used, (gptr*)&not_used, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, (uchar**)&not_used, (uchar**)&not_used, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"force", 'f', "Force execution of mysqlcheck even if mysql_upgrade " {"force", 'f', "Force execution of mysqlcheck even if mysql_upgrade "
"has already been executed for the current version of MySQL.", "has already been executed for the current version of MySQL.",
(gptr*)&opt_force, (gptr*)&opt_force, 0, (uchar**)&opt_force, (uchar**)&opt_force, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"host",'h', "Connect to host.", 0, {"host",'h', "Connect to host.", 0,
0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"password", 'p', {"password", 'p',
"Password to use when connecting to server. If password is not given" "Password to use when connecting to server. If password is not given"
" it's solicited on the tty.", (gptr*) &opt_password,(gptr*) &opt_password, " it's solicited on the tty.", (uchar**) &opt_password,(uchar**) &opt_password,
0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
#ifdef __WIN__ #ifdef __WIN__
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, {"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0,
@ -100,11 +100,11 @@ static struct my_option my_long_options[]=
#endif #endif
{"socket", 'S', "Socket file to use for connection.", {"socket", 'S', "Socket file to use for connection.",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"user", 'u', "User for login if not current user.", (gptr*) &opt_user, {"user", 'u', "User for login if not current user.", (uchar**) &opt_user,
(gptr*) &opt_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &opt_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#include <sslopt-longopts.h> #include <sslopt-longopts.h>
{"verbose", 'v', "Display more output about the process", {"verbose", 'v', "Display more output about the process",
(gptr*) &opt_verbose, (gptr*) &opt_verbose, 0, (uchar**) &opt_verbose, (uchar**) &opt_verbose, 0,
GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} {0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
}; };
@ -387,13 +387,14 @@ static void find_tool(char *tool_path, const char *tool_name)
} }
do do
{ {
size_t path_len;
DBUG_PRINT("enter", ("path: %s", path)); DBUG_PRINT("enter", ("path: %s", path));
/* Chop off last char(since it might be a /) */ /* Chop off last char(since it might be a /) */
path[max((strlen(path)-1), 0)]= 0; path[max((strlen(path)-1), 0)]= 0;
/* Chop off last dir part */ /* Chop off last dir part */
dirname_part(path, path); dirname_part(path, path, &path_len);
/* Format name of the tool to search for */ /* Format name of the tool to search for */
fn_format(tool_path, tool_name, fn_format(tool_path, tool_name,

View File

@ -44,7 +44,7 @@ static my_bool option_force=0,interrupted=0,new_line=0,
static uint tcp_port = 0, option_wait = 0, option_silent=0, nr_iterations, static uint tcp_port = 0, option_wait = 0, option_silent=0, nr_iterations,
opt_count_iterations= 0; opt_count_iterations= 0;
static ulong opt_connect_timeout, opt_shutdown_timeout; static ulong opt_connect_timeout, opt_shutdown_timeout;
static my_string unix_port=0; static char * unix_port=0;
#ifdef LATER_HAVE_NDBCLUSTER_DB #ifdef LATER_HAVE_NDBCLUSTER_DB
static my_bool opt_ndbcluster=0; static my_bool opt_ndbcluster=0;
static char *opt_ndb_connectstring=0; static char *opt_ndb_connectstring=0;
@ -132,31 +132,31 @@ static struct my_option my_long_options[] =
#endif #endif
{"count", 'c', {"count", 'c',
"Number of iterations to make. This works with -i (--sleep) only.", "Number of iterations to make. This works with -i (--sleep) only.",
(gptr*) &nr_iterations, (gptr*) &nr_iterations, 0, GET_UINT, (uchar**) &nr_iterations, (uchar**) &nr_iterations, 0, GET_UINT,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.", {"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.",
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
{"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.", (gptr*) &info_flag, {"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.", (uchar**) &info_flag,
(gptr*) &info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"force", 'f', {"force", 'f',
"Don't ask for confirmation on drop database; with multiple commands, continue even if an error occurs.", "Don't ask for confirmation on drop database; with multiple commands, continue even if an error occurs.",
(gptr*) &option_force, (gptr*) &option_force, 0, GET_BOOL, NO_ARG, 0, 0, (uchar**) &option_force, (uchar**) &option_force, 0, GET_BOOL, NO_ARG, 0, 0,
0, 0, 0, 0}, 0, 0, 0, 0},
{"compress", 'C', "Use compression in server/client protocol.", {"compress", 'C', "Use compression in server/client protocol.",
(gptr*) &opt_compress, (gptr*) &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0, (uchar**) &opt_compress, (uchar**) &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0,
0, 0, 0}, 0, 0, 0},
{"character-sets-dir", OPT_CHARSETS_DIR, {"character-sets-dir", OPT_CHARSETS_DIR,
"Directory where character sets are.", (gptr*) &charsets_dir, "Directory where character sets are.", (uchar**) &charsets_dir,
(gptr*) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"default-character-set", OPT_DEFAULT_CHARSET, {"default-character-set", OPT_DEFAULT_CHARSET,
"Set the default character set.", (gptr*) &default_charset, "Set the default character set.", (uchar**) &default_charset,
(gptr*) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG, {"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0}, NO_ARG, 0, 0, 0, 0, 0, 0},
{"host", 'h', "Connect to host.", (gptr*) &host, (gptr*) &host, 0, GET_STR, {"host", 'h', "Connect to host.", (uchar**) &host, (uchar**) &host, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"no-beep", 'b', "Turn off beep on error.", (gptr*) &opt_nobeep, {"no-beep", 'b', "Turn off beep on error.", (uchar**) &opt_nobeep,
(gptr*) &opt_nobeep, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &opt_nobeep, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"password", 'p', {"password", 'p',
"Password to use when connecting to server. If password is not given it's asked from the tty.", "Password to use when connecting to server. If password is not given it's asked from the tty.",
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
@ -164,58 +164,58 @@ static struct my_option my_long_options[] =
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG, {"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0}, NO_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
{"port", 'P', "Port number to use for connection.", (gptr*) &tcp_port, {"port", 'P', "Port number to use for connection.", (uchar**) &tcp_port,
(gptr*) &tcp_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &tcp_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory).", {"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory).",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"relative", 'r', {"relative", 'r',
"Show difference between current and previous values when used with -i. Currently works only with extended-status.", "Show difference between current and previous values when used with -i. Currently works only with extended-status.",
(gptr*) &opt_relative, (gptr*) &opt_relative, 0, GET_BOOL, NO_ARG, 0, 0, 0, (uchar**) &opt_relative, (uchar**) &opt_relative, 0, GET_BOOL, NO_ARG, 0, 0, 0,
0, 0, 0}, 0, 0, 0},
{"set-variable", 'O', {"set-variable", 'O',
"Change the value of a variable. Please note that this option is deprecated; you can set variables directly with --variable-name=value.", "Change the value of a variable. Please note that this option is deprecated; you can set variables directly with --variable-name=value.",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#ifdef HAVE_SMEM #ifdef HAVE_SMEM
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME, {"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
"Base name of shared memory.", (gptr*) &shared_memory_base_name, (gptr*) &shared_memory_base_name, "Base name of shared memory.", (uchar**) &shared_memory_base_name, (uchar**) &shared_memory_base_name,
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
{"silent", 's', "Silently exit if one can't connect to server.", {"silent", 's', "Silently exit if one can't connect to server.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"socket", 'S', "Socket file to use for connection.", {"socket", 'S', "Socket file to use for connection.",
(gptr*) &unix_port, (gptr*) &unix_port, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, (uchar**) &unix_port, (uchar**) &unix_port, 0, GET_STR, REQUIRED_ARG, 0, 0, 0,
0, 0, 0}, 0, 0, 0},
{"sleep", 'i', "Execute commands again and again with a sleep between.", {"sleep", 'i', "Execute commands again and again with a sleep between.",
(gptr*) &interval, (gptr*) &interval, 0, GET_INT, REQUIRED_ARG, 0, 0, 0, 0, (uchar**) &interval, (uchar**) &interval, 0, GET_INT, REQUIRED_ARG, 0, 0, 0, 0,
0, 0}, 0, 0},
#include <sslopt-longopts.h> #include <sslopt-longopts.h>
#ifndef DONT_ALLOW_USER_CHANGE #ifndef DONT_ALLOW_USER_CHANGE
{"user", 'u', "User for login if not current user.", (gptr*) &user, {"user", 'u', "User for login if not current user.", (uchar**) &user,
(gptr*) &user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
{"verbose", 'v', "Write more information.", (gptr*) &opt_verbose, {"verbose", 'v', "Write more information.", (uchar**) &opt_verbose,
(gptr*) &opt_verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &opt_verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"version", 'V', "Output version information and exit.", 0, 0, 0, GET_NO_ARG, {"version", 'V', "Output version information and exit.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0}, NO_ARG, 0, 0, 0, 0, 0, 0},
{"vertical", 'E', {"vertical", 'E',
"Print output vertically. Is similar to --relative, but prints output vertically.", "Print output vertically. Is similar to --relative, but prints output vertically.",
(gptr*) &opt_vertical, (gptr*) &opt_vertical, 0, GET_BOOL, NO_ARG, 0, 0, 0, (uchar**) &opt_vertical, (uchar**) &opt_vertical, 0, GET_BOOL, NO_ARG, 0, 0, 0,
0, 0, 0}, 0, 0, 0},
{"wait", 'w', "Wait and retry if connection is down.", 0, 0, 0, GET_UINT, {"wait", 'w', "Wait and retry if connection is down.", 0, 0, 0, GET_UINT,
OPT_ARG, 0, 0, 0, 0, 0, 0}, OPT_ARG, 0, 0, 0, 0, 0, 0},
{"connect_timeout", OPT_CONNECT_TIMEOUT, "", (gptr*) &opt_connect_timeout, {"connect_timeout", OPT_CONNECT_TIMEOUT, "", (uchar**) &opt_connect_timeout,
(gptr*) &opt_connect_timeout, 0, GET_ULONG, REQUIRED_ARG, 3600*12, 0, (uchar**) &opt_connect_timeout, 0, GET_ULONG, REQUIRED_ARG, 3600*12, 0,
3600*12, 0, 1, 0}, 3600*12, 0, 1, 0},
{"shutdown_timeout", OPT_SHUTDOWN_TIMEOUT, "", (gptr*) &opt_shutdown_timeout, {"shutdown_timeout", OPT_SHUTDOWN_TIMEOUT, "", (uchar**) &opt_shutdown_timeout,
(gptr*) &opt_shutdown_timeout, 0, GET_ULONG, REQUIRED_ARG, (uchar**) &opt_shutdown_timeout, 0, GET_ULONG, REQUIRED_ARG,
SHUTDOWN_DEF_TIMEOUT, 0, 3600*12, 0, 1, 0}, SHUTDOWN_DEF_TIMEOUT, 0, 3600*12, 0, 1, 0},
#ifdef LATER_HAVE_NDBCLUSTER_DB #ifdef LATER_HAVE_NDBCLUSTER_DB
{"ndbcluster", OPT_NDBCLUSTER, "" {"ndbcluster", OPT_NDBCLUSTER, ""
"", (gptr*) &opt_ndbcluster, "", (uchar**) &opt_ndbcluster,
(gptr*) &opt_ndbcluster, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &opt_ndbcluster, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"ndb-connectstring", OPT_NDB_CONNECTSTRING, "" {"ndb-connectstring", OPT_NDB_CONNECTSTRING, ""
"", (gptr*) &opt_ndb_connectstring, "", (uchar**) &opt_ndb_connectstring,
(gptr*) &opt_ndb_connectstring, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &opt_ndb_connectstring, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
}; };

View File

@ -296,7 +296,7 @@ File Load_log_processor::prepare_new_file_for_old_format(Load_log_event *le,
int Load_log_processor::load_old_format_file(NET* net, const char*server_fname, int Load_log_processor::load_old_format_file(NET* net, const char*server_fname,
uint server_fname_len, File file) uint server_fname_len, File file)
{ {
char buf[FN_REFLEN+1]; uchar buf[FN_REFLEN+1];
buf[0] = 0; buf[0] = 0;
memcpy(buf + 1, server_fname, server_fname_len + 1); memcpy(buf + 1, server_fname, server_fname_len + 1);
if (my_net_write(net, buf, server_fname_len +2) || net_flush(net)) if (my_net_write(net, buf, server_fname_len +2) || net_flush(net))
@ -310,7 +310,7 @@ int Load_log_processor::load_old_format_file(NET* net, const char*server_fname,
ulong packet_len = my_net_read(net); ulong packet_len = my_net_read(net);
if (packet_len == 0) if (packet_len == 0)
{ {
if (my_net_write(net, "", 0) || net_flush(net)) if (my_net_write(net, (uchar*) "", 0) || net_flush(net))
{ {
sql_print_error("Failed sending the ack packet"); sql_print_error("Failed sending the ack packet");
return -1; return -1;
@ -334,7 +334,7 @@ int Load_log_processor::load_old_format_file(NET* net, const char*server_fname,
sql_print_error("Illegal length of packet read from net"); sql_print_error("Illegal length of packet read from net");
return -1; return -1;
} }
if (my_write(file, (byte*) net->read_pos, if (my_write(file, (uchar*) net->read_pos,
(uint) packet_len, MYF(MY_WME|MY_NABP))) (uint) packet_len, MYF(MY_WME|MY_NABP)))
return -1; return -1;
} }
@ -379,7 +379,7 @@ int Load_log_processor::process_first_event(const char *bname, uint blen,
File_name_record rec; File_name_record rec;
DBUG_ENTER("Load_log_processor::process_first_event"); DBUG_ENTER("Load_log_processor::process_first_event");
if (!(fname= my_malloc(full_len,MYF(MY_WME)))) if (!(fname= (char*) my_malloc(full_len,MYF(MY_WME))))
DBUG_RETURN(-1); DBUG_RETURN(-1);
memcpy(fname, target_dir_name, target_dir_name_len); memcpy(fname, target_dir_name, target_dir_name_len);
@ -398,7 +398,7 @@ int Load_log_processor::process_first_event(const char *bname, uint blen,
rec.fname= fname; rec.fname= fname;
rec.event= ce; rec.event= ce;
if (set_dynamic(&file_names, (gptr)&rec, file_id)) if (set_dynamic(&file_names, (uchar*)&rec, file_id))
{ {
sql_print_error("Could not construct local filename %s%s", sql_print_error("Could not construct local filename %s%s",
target_dir_name, bname); target_dir_name, bname);
@ -408,7 +408,7 @@ int Load_log_processor::process_first_event(const char *bname, uint blen,
if (ce) if (ce)
ce->set_fname_outside_temp_buf(fname, strlen(fname)); ce->set_fname_outside_temp_buf(fname, strlen(fname));
if (my_write(file, (byte*)block, block_len, MYF(MY_WME|MY_NABP))) if (my_write(file, (uchar*)block, block_len, MYF(MY_WME|MY_NABP)))
error= -1; error= -1;
if (my_close(file, MYF(MY_WME))) if (my_close(file, MYF(MY_WME)))
error= -1; error= -1;
@ -447,7 +447,7 @@ int Load_log_processor::process(Append_block_log_event *ae)
if (((file= my_open(fname, if (((file= my_open(fname,
O_APPEND|O_BINARY|O_WRONLY,MYF(MY_WME))) < 0)) O_APPEND|O_BINARY|O_WRONLY,MYF(MY_WME))) < 0))
DBUG_RETURN(-1); DBUG_RETURN(-1);
if (my_write(file,(byte*)ae->block,ae->block_len,MYF(MY_WME|MY_NABP))) if (my_write(file,(uchar*)ae->block,ae->block_len,MYF(MY_WME|MY_NABP)))
error= -1; error= -1;
if (my_close(file,MYF(MY_WME))) if (my_close(file,MYF(MY_WME)))
error= -1; error= -1;
@ -635,6 +635,7 @@ Create_file event for file_id: %u\n",exv->file_id);
print_event_info->common_header_len= print_event_info->common_header_len=
glob_description_event->common_header_len; glob_description_event->common_header_len;
ev->print(result_file, print_event_info); ev->print(result_file, print_event_info);
ev->temp_buf= 0; // as the event ref is zeroed
/* /*
We don't want this event to be deleted now, so let's hide it (I We don't want this event to be deleted now, so let's hide it (I
(Guilhem) should later see if this triggers a non-serious Valgrind (Guilhem) should later see if this triggers a non-serious Valgrind
@ -682,8 +683,16 @@ Begin_load_query event for file_id: %u\n", exlq->file_id);
end: end:
rec_count++; rec_count++;
/*
Destroy the log_event object. If reading from a remote host,
set the temp_buf to NULL so that memory isn't freed twice.
*/
if (ev) if (ev)
{
if (remote_opt)
ev->temp_buf= 0;
delete ev; delete ev;
}
DBUG_RETURN(0); DBUG_RETURN(0);
} }
@ -700,7 +709,7 @@ static struct my_option my_long_options[] =
"Print all binlog entries using base64 encoding. " "Print all binlog entries using base64 encoding. "
"This is for debugging only. Logs produced using this option " "This is for debugging only. Logs produced using this option "
"should not be applied on production systems.", "should not be applied on production systems.",
(gptr*) &opt_base64_output, (gptr*) &opt_base64_output, 0, GET_BOOL, (uchar**) &opt_base64_output, (uchar**) &opt_base64_output, 0, GET_BOOL,
NO_ARG, 0, 0, 0, 0, 0, 0}, NO_ARG, 0, 0, 0, 0, 0, 0},
/* /*
mysqlbinlog needs charsets knowledge, to be able to convert a charset mysqlbinlog needs charsets knowledge, to be able to convert a charset
@ -709,47 +718,47 @@ static struct my_option my_long_options[] =
SET @`a`:=_cp850 0x4DFC6C6C6572 COLLATE `cp850_general_ci`; SET @`a`:=_cp850 0x4DFC6C6C6572 COLLATE `cp850_general_ci`;
*/ */
{"character-sets-dir", OPT_CHARSETS_DIR, {"character-sets-dir", OPT_CHARSETS_DIR,
"Directory where character sets are.", (gptr*) &charsets_dir, "Directory where character sets are.", (uchar**) &charsets_dir,
(gptr*) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"database", 'd', "List entries for just this database (local log only).", {"database", 'd', "List entries for just this database (local log only).",
(gptr*) &database, (gptr*) &database, 0, GET_STR_ALLOC, REQUIRED_ARG, (uchar**) &database, (uchar**) &database, 0, GET_STR_ALLOC, REQUIRED_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
#ifndef DBUG_OFF #ifndef DBUG_OFF
{"debug", '#', "Output debug log.", (gptr*) &default_dbug_option, {"debug", '#', "Output debug log.", (uchar**) &default_dbug_option,
(gptr*) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
{"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.", (gptr*) &info_flag, {"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.", (uchar**) &info_flag,
(gptr*) &info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"disable-log-bin", 'D', "Disable binary log. This is useful, if you " {"disable-log-bin", 'D', "Disable binary log. This is useful, if you "
"enabled --to-last-log and are sending the output to the same MySQL server. " "enabled --to-last-log and are sending the output to the same MySQL server. "
"This way you could avoid an endless loop. You would also like to use it " "This way you could avoid an endless loop. You would also like to use it "
"when restoring after a crash to avoid duplication of the statements you " "when restoring after a crash to avoid duplication of the statements you "
"already have. NOTE: you will need a SUPER privilege to use this option.", "already have. NOTE: you will need a SUPER privilege to use this option.",
(gptr*) &disable_log_bin, (gptr*) &disable_log_bin, 0, GET_BOOL, (uchar**) &disable_log_bin, (uchar**) &disable_log_bin, 0, GET_BOOL,
NO_ARG, 0, 0, 0, 0, 0, 0}, NO_ARG, 0, 0, 0, 0, 0, 0},
{"force-if-open", 'F', "Force if binlog was not closed properly.", {"force-if-open", 'F', "Force if binlog was not closed properly.",
(gptr*) &force_if_open_opt, (gptr*) &force_if_open_opt, 0, GET_BOOL, NO_ARG, (uchar**) &force_if_open_opt, (uchar**) &force_if_open_opt, 0, GET_BOOL, NO_ARG,
1, 0, 0, 0, 0, 0}, 1, 0, 0, 0, 0, 0},
{"force-read", 'f', "Force reading unknown binlog events.", {"force-read", 'f', "Force reading unknown binlog events.",
(gptr*) &force_opt, (gptr*) &force_opt, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, (uchar**) &force_opt, (uchar**) &force_opt, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
0, 0}, 0, 0},
{"hexdump", 'H', "Augment output with hexadecimal and ASCII event dump.", {"hexdump", 'H', "Augment output with hexadecimal and ASCII event dump.",
(gptr*) &opt_hexdump, (gptr*) &opt_hexdump, 0, GET_BOOL, NO_ARG, (uchar**) &opt_hexdump, (uchar**) &opt_hexdump, 0, GET_BOOL, NO_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{"host", 'h', "Get the binlog from server.", (gptr*) &host, (gptr*) &host, {"host", 'h', "Get the binlog from server.", (uchar**) &host, (uchar**) &host,
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"local-load", 'l', "Prepare local temporary files for LOAD DATA INFILE in the specified directory.", {"local-load", 'l', "Prepare local temporary files for LOAD DATA INFILE in the specified directory.",
(gptr*) &dirname_for_local_load, (gptr*) &dirname_for_local_load, 0, (uchar**) &dirname_for_local_load, (uchar**) &dirname_for_local_load, 0,
GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"offset", 'o', "Skip the first N entries.", (gptr*) &offset, (gptr*) &offset, {"offset", 'o', "Skip the first N entries.", (uchar**) &offset, (uchar**) &offset,
0, GET_ULL, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_ULL, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"password", 'p', "Password to connect to remote server.", {"password", 'p', "Password to connect to remote server.",
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
{"port", 'P', "Use port to connect to the remote server.", {"port", 'P', "Use port to connect to the remote server.",
(gptr*) &port, (gptr*) &port, 0, GET_INT, REQUIRED_ARG, 0, 0, 0, (uchar**) &port, (uchar**) &port, 0, GET_INT, REQUIRED_ARG, 0, 0, 0,
0, 0, 0}, 0, 0, 0},
{"position", 'j', "Deprecated. Use --start-position instead.", {"position", 'j', "Deprecated. Use --start-position instead.",
(gptr*) &start_position, (gptr*) &start_position, 0, GET_ULL, (uchar**) &start_position, (uchar**) &start_position, 0, GET_ULL,
REQUIRED_ARG, BIN_LOG_HEADER_SIZE, BIN_LOG_HEADER_SIZE, REQUIRED_ARG, BIN_LOG_HEADER_SIZE, BIN_LOG_HEADER_SIZE,
/* COM_BINLOG_DUMP accepts only 4 bytes for the position */ /* COM_BINLOG_DUMP accepts only 4 bytes for the position */
(ulonglong)(~(uint32)0), 0, 0, 0}, (ulonglong)(~(uint32)0), 0, 0, 0},
@ -757,22 +766,22 @@ static struct my_option my_long_options[] =
"The protocol of connection (tcp,socket,pipe,memory).", "The protocol of connection (tcp,socket,pipe,memory).",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"read-from-remote-server", 'R', "Read binary logs from a MySQL server", {"read-from-remote-server", 'R', "Read binary logs from a MySQL server",
(gptr*) &remote_opt, (gptr*) &remote_opt, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, (uchar**) &remote_opt, (uchar**) &remote_opt, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
0, 0}, 0, 0},
{"result-file", 'r', "Direct output to a given file.", 0, 0, 0, GET_STR, {"result-file", 'r', "Direct output to a given file.", 0, 0, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"server-id", OPT_SERVER_ID, {"server-id", OPT_SERVER_ID,
"Extract only binlog entries created by the server having the given id.", "Extract only binlog entries created by the server having the given id.",
(gptr*) &server_id, (gptr*) &server_id, 0, GET_ULONG, (uchar**) &server_id, (uchar**) &server_id, 0, GET_ULONG,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"set-charset", OPT_SET_CHARSET, {"set-charset", OPT_SET_CHARSET,
"Add 'SET NAMES character_set' to the output.", (gptr*) &charset, "Add 'SET NAMES character_set' to the output.", (uchar**) &charset,
(gptr*) &charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"short-form", 's', "Just show the queries, no extra info.", {"short-form", 's', "Just show the queries, no extra info.",
(gptr*) &short_form, (gptr*) &short_form, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, (uchar**) &short_form, (uchar**) &short_form, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
0, 0}, 0, 0},
{"socket", 'S', "Socket file to use for connection.", {"socket", 'S', "Socket file to use for connection.",
(gptr*) &sock, (gptr*) &sock, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, (uchar**) &sock, (uchar**) &sock, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0,
0, 0}, 0, 0},
{"start-datetime", OPT_START_DATETIME, {"start-datetime", OPT_START_DATETIME,
"Start reading the binlog at first event having a datetime equal or " "Start reading the binlog at first event having a datetime equal or "
@ -780,12 +789,12 @@ static struct my_option my_long_options[] =
"in the local time zone, in any format accepted by the MySQL server " "in the local time zone, in any format accepted by the MySQL server "
"for DATETIME and TIMESTAMP types, for example: 2004-12-25 11:25:56 " "for DATETIME and TIMESTAMP types, for example: 2004-12-25 11:25:56 "
"(you should probably use quotes for your shell to set it properly).", "(you should probably use quotes for your shell to set it properly).",
(gptr*) &start_datetime_str, (gptr*) &start_datetime_str, (uchar**) &start_datetime_str, (uchar**) &start_datetime_str,
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"start-position", OPT_START_POSITION, {"start-position", OPT_START_POSITION,
"Start reading the binlog at position N. Applies to the first binlog " "Start reading the binlog at position N. Applies to the first binlog "
"passed on the command line.", "passed on the command line.",
(gptr*) &start_position, (gptr*) &start_position, 0, GET_ULL, (uchar**) &start_position, (uchar**) &start_position, 0, GET_ULL,
REQUIRED_ARG, BIN_LOG_HEADER_SIZE, BIN_LOG_HEADER_SIZE, REQUIRED_ARG, BIN_LOG_HEADER_SIZE, BIN_LOG_HEADER_SIZE,
/* COM_BINLOG_DUMP accepts only 4 bytes for the position */ /* COM_BINLOG_DUMP accepts only 4 bytes for the position */
(ulonglong)(~(uint32)0), 0, 0, 0}, (ulonglong)(~(uint32)0), 0, 0, 0},
@ -795,28 +804,28 @@ static struct my_option my_long_options[] =
"in the local time zone, in any format accepted by the MySQL server " "in the local time zone, in any format accepted by the MySQL server "
"for DATETIME and TIMESTAMP types, for example: 2004-12-25 11:25:56 " "for DATETIME and TIMESTAMP types, for example: 2004-12-25 11:25:56 "
"(you should probably use quotes for your shell to set it properly).", "(you should probably use quotes for your shell to set it properly).",
(gptr*) &stop_datetime_str, (gptr*) &stop_datetime_str, (uchar**) &stop_datetime_str, (uchar**) &stop_datetime_str,
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"stop-position", OPT_STOP_POSITION, {"stop-position", OPT_STOP_POSITION,
"Stop reading the binlog at position N. Applies to the last binlog " "Stop reading the binlog at position N. Applies to the last binlog "
"passed on the command line.", "passed on the command line.",
(gptr*) &stop_position, (gptr*) &stop_position, 0, GET_ULL, (uchar**) &stop_position, (uchar**) &stop_position, 0, GET_ULL,
REQUIRED_ARG, (ulonglong)(~(my_off_t)0), BIN_LOG_HEADER_SIZE, REQUIRED_ARG, (ulonglong)(~(my_off_t)0), BIN_LOG_HEADER_SIZE,
(ulonglong)(~(my_off_t)0), 0, 0, 0}, (ulonglong)(~(my_off_t)0), 0, 0, 0},
{"to-last-log", 't', "Requires -R. Will not stop at the end of the \ {"to-last-log", 't', "Requires -R. Will not stop at the end of the \
requested binlog but rather continue printing until the end of the last \ requested binlog but rather continue printing until the end of the last \
binlog of the MySQL server. If you send the output to the same MySQL server, \ binlog of the MySQL server. If you send the output to the same MySQL server, \
that may lead to an endless loop.", that may lead to an endless loop.",
(gptr*) &to_last_remote_log, (gptr*) &to_last_remote_log, 0, GET_BOOL, (uchar**) &to_last_remote_log, (uchar**) &to_last_remote_log, 0, GET_BOOL,
NO_ARG, 0, 0, 0, 0, 0, 0}, NO_ARG, 0, 0, 0, 0, 0, 0},
{"user", 'u', "Connect to the remote server as username.", {"user", 'u', "Connect to the remote server as username.",
(gptr*) &user, (gptr*) &user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, (uchar**) &user, (uchar**) &user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0,
0, 0}, 0, 0},
{"version", 'V', "Print version and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, {"version", 'V', "Print version and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0,
0, 0, 0, 0, 0}, 0, 0, 0, 0, 0},
{"open_files_limit", OPT_OPEN_FILES_LIMIT, {"open_files_limit", OPT_OPEN_FILES_LIMIT,
"Used to reserve file descriptors for usage by this program", "Used to reserve file descriptors for usage by this program",
(gptr*) &open_files_limit, (gptr*) &open_files_limit, 0, GET_ULONG, (uchar**) &open_files_limit, (uchar**) &open_files_limit, 0, GET_ULONG,
REQUIRED_ARG, MY_NFILE, 8, OS_FILE_LIMIT, 0, 1, 0}, REQUIRED_ARG, MY_NFILE, 8, OS_FILE_LIMIT, 0, 1, 0},
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} {0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
}; };
@ -1094,7 +1103,7 @@ static int dump_remote_log_entries(PRINT_EVENT_INFO *print_event_info,
const char* logname) const char* logname)
{ {
char buf[128]; uchar buf[128];
ulong len; ulong len;
uint logname_len; uint logname_len;
NET* net; NET* net;
@ -1130,7 +1139,7 @@ could be out of memory");
int4store(buf, (uint32)start_position); int4store(buf, (uint32)start_position);
int2store(buf + BIN_LOG_HEADER_SIZE, binlog_flags); int2store(buf + BIN_LOG_HEADER_SIZE, binlog_flags);
size_s tlen = strlen(logname); size_t tlen = strlen(logname);
if (tlen > UINT_MAX) if (tlen > UINT_MAX)
{ {
fprintf(stderr,"Log name too long\n"); fprintf(stderr,"Log name too long\n");
@ -1172,6 +1181,12 @@ could be out of memory");
error= 1; error= 1;
goto err; goto err;
} }
/*
If reading from a remote host, ensure the temp_buf for the
Log_event class is pointing to the incoming stream.
*/
if (remote_opt)
ev->register_temp_buf((char*) net->read_pos + 1);
Log_event_type type= ev->get_type_code(); Log_event_type type= ev->get_type_code();
if (glob_description_event->binlog_version >= 3 || if (glob_description_event->binlog_version >= 3 ||
@ -1278,8 +1293,8 @@ err:
static void check_header(IO_CACHE* file, static void check_header(IO_CACHE* file,
Format_description_log_event **description_event) Format_description_log_event **description_event)
{ {
byte header[BIN_LOG_HEADER_SIZE]; uchar header[BIN_LOG_HEADER_SIZE];
byte buf[PROBE_HEADER_LEN]; uchar buf[PROBE_HEADER_LEN];
my_off_t tmp_pos, pos; my_off_t tmp_pos, pos;
*description_event= new Format_description_log_event(3); *description_event= new Format_description_log_event(3);
@ -1379,7 +1394,7 @@ static int dump_local_log_entries(PRINT_EVENT_INFO *print_event_info,
{ {
File fd = -1; File fd = -1;
IO_CACHE cache,*file= &cache; IO_CACHE cache,*file= &cache;
byte tmp_buff[BIN_LOG_HEADER_SIZE]; uchar tmp_buff[BIN_LOG_HEADER_SIZE];
int error= 0; int error= 0;
if (logname && logname[0] != '-') if (logname && logname[0] != '-')
@ -1418,7 +1433,7 @@ static int dump_local_log_entries(PRINT_EVENT_INFO *print_event_info,
if (start_position) if (start_position)
{ {
/* skip 'start_position' characters from stdin */ /* skip 'start_position' characters from stdin */
byte buff[IO_SIZE]; uchar buff[IO_SIZE];
my_off_t length,tmp; my_off_t length,tmp;
for (length= start_position_mot ; length > 0 ; length-=tmp) for (length= start_position_mot ; length > 0 ; length-=tmp)
{ {

View File

@ -37,7 +37,7 @@ static my_bool opt_alldbs = 0, opt_check_only_changed = 0, opt_extended = 0,
opt_fix_table_names= 0, opt_fix_db_names= 0, opt_upgrade= 0, opt_fix_table_names= 0, opt_fix_db_names= 0, opt_upgrade= 0,
opt_write_binlog= 1; opt_write_binlog= 1;
static uint verbose = 0, opt_mysql_port=0; static uint verbose = 0, opt_mysql_port=0;
static my_string opt_mysql_unix_port = 0; static char * opt_mysql_unix_port = 0;
static char *opt_password = 0, *current_user = 0, static char *opt_password = 0, *current_user = 0,
*default_charset = (char *)MYSQL_DEFAULT_CHARSET_NAME, *default_charset = (char *)MYSQL_DEFAULT_CHARSET_NAME,
*current_host = 0; *current_host = 0;
@ -55,13 +55,13 @@ static struct my_option my_long_options[] =
{ {
{"all-databases", 'A', {"all-databases", 'A',
"Check all the databases. This will be same as --databases with all databases selected.", "Check all the databases. This will be same as --databases with all databases selected.",
(gptr*) &opt_alldbs, (gptr*) &opt_alldbs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, (uchar**) &opt_alldbs, (uchar**) &opt_alldbs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
0, 0}, 0, 0},
{"analyze", 'a', "Analyze given tables.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, {"analyze", 'a', "Analyze given tables.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0,
0, 0, 0, 0}, 0, 0, 0, 0},
{"all-in-1", '1', {"all-in-1", '1',
"Instead of issuing one query for each table, use one query per database, naming all tables in the database in a comma-separated list.", "Instead of issuing one query for each table, use one query per database, naming all tables in the database in a comma-separated list.",
(gptr*) &opt_all_in_1, (gptr*) &opt_all_in_1, 0, GET_BOOL, NO_ARG, 0, 0, 0, (uchar**) &opt_all_in_1, (uchar**) &opt_all_in_1, 0, GET_BOOL, NO_ARG, 0, 0, 0,
0, 0, 0}, 0, 0, 0},
#ifdef __NETWARE__ #ifdef __NETWARE__
{"autoclose", OPT_AUTO_CLOSE, "Auto close the screen on exit for Netware.", {"autoclose", OPT_AUTO_CLOSE, "Auto close the screen on exit for Netware.",
@ -69,11 +69,11 @@ static struct my_option my_long_options[] =
#endif #endif
{"auto-repair", OPT_AUTO_REPAIR, {"auto-repair", OPT_AUTO_REPAIR,
"If a checked table is corrupted, automatically fix it. Repairing will be done after all tables have been checked, if corrupted ones were found.", "If a checked table is corrupted, automatically fix it. Repairing will be done after all tables have been checked, if corrupted ones were found.",
(gptr*) &opt_auto_repair, (gptr*) &opt_auto_repair, 0, GET_BOOL, NO_ARG, 0, (uchar**) &opt_auto_repair, (uchar**) &opt_auto_repair, 0, GET_BOOL, NO_ARG, 0,
0, 0, 0, 0, 0}, 0, 0, 0, 0, 0},
{"character-sets-dir", OPT_CHARSETS_DIR, {"character-sets-dir", OPT_CHARSETS_DIR,
"Directory where character sets are.", (gptr*) &charsets_dir, "Directory where character sets are.", (uchar**) &charsets_dir,
(gptr*) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"check", 'c', "Check table for errors.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, {"check", 'c', "Check table for errors.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0,
0, 0, 0, 0}, 0, 0, 0, 0},
{"check-only-changed", 'C', {"check-only-changed", 'C',
@ -83,11 +83,11 @@ static struct my_option my_long_options[] =
"Check tables for version-dependent changes. May be used with --auto-repair to correct tables requiring version-dependent updates.", "Check tables for version-dependent changes. May be used with --auto-repair to correct tables requiring version-dependent updates.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"compress", OPT_COMPRESS, "Use compression in server/client protocol.", {"compress", OPT_COMPRESS, "Use compression in server/client protocol.",
(gptr*) &opt_compress, (gptr*) &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0, (uchar**) &opt_compress, (uchar**) &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0,
0, 0, 0}, 0, 0, 0},
{"databases", 'B', {"databases", 'B',
"To check several databases. Note the difference in usage; In this case no tables are given. All name arguments are regarded as databasenames.", "To check several databases. Note the difference in usage; In this case no tables are given. All name arguments are regarded as databasenames.",
(gptr*) &opt_databases, (gptr*) &opt_databases, 0, GET_BOOL, NO_ARG, (uchar**) &opt_databases, (uchar**) &opt_databases, 0, GET_BOOL, NO_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
#ifdef DBUG_OFF #ifdef DBUG_OFF
{"debug", '#', "This is a non-debug version. Catch this and exit.", {"debug", '#', "This is a non-debug version. Catch this and exit.",
@ -96,37 +96,37 @@ static struct my_option my_long_options[] =
{"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.", {"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.",
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
{"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.", (gptr*) &info_flag, {"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.", (uchar**) &info_flag,
(gptr*) &info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"default-character-set", OPT_DEFAULT_CHARSET, {"default-character-set", OPT_DEFAULT_CHARSET,
"Set the default character set.", (gptr*) &default_charset, "Set the default character set.", (uchar**) &default_charset,
(gptr*) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"fast",'F', "Check only tables that haven't been closed properly.", {"fast",'F', "Check only tables that haven't been closed properly.",
(gptr*) &opt_fast, (gptr*) &opt_fast, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, (uchar**) &opt_fast, (uchar**) &opt_fast, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0,
0}, 0},
{"fix-db-names", OPT_FIX_DB_NAMES, "Fix database names.", {"fix-db-names", OPT_FIX_DB_NAMES, "Fix database names.",
(gptr*) &opt_fix_db_names, (gptr*) &opt_fix_db_names, (uchar**) &opt_fix_db_names, (uchar**) &opt_fix_db_names,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"fix-table-names", OPT_FIX_TABLE_NAMES, "Fix table names.", {"fix-table-names", OPT_FIX_TABLE_NAMES, "Fix table names.",
(gptr*) &opt_fix_table_names, (gptr*) &opt_fix_table_names, (uchar**) &opt_fix_table_names, (uchar**) &opt_fix_table_names,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"force", 'f', "Continue even if we get an sql-error.", {"force", 'f', "Continue even if we get an sql-error.",
(gptr*) &ignore_errors, (gptr*) &ignore_errors, 0, GET_BOOL, NO_ARG, 0, 0, (uchar**) &ignore_errors, (uchar**) &ignore_errors, 0, GET_BOOL, NO_ARG, 0, 0,
0, 0, 0, 0}, 0, 0, 0, 0},
{"extended", 'e', {"extended", 'e',
"If you are using this option with CHECK TABLE, it will ensure that the table is 100 percent consistent, but will take a long time. If you are using this option with REPAIR TABLE, it will force using old slow repair with keycache method, instead of much faster repair by sorting.", "If you are using this option with CHECK TABLE, it will ensure that the table is 100 percent consistent, but will take a long time. If you are using this option with REPAIR TABLE, it will force using old slow repair with keycache method, instead of much faster repair by sorting.",
(gptr*) &opt_extended, (gptr*) &opt_extended, 0, GET_BOOL, NO_ARG, 0, 0, 0, (uchar**) &opt_extended, (uchar**) &opt_extended, 0, GET_BOOL, NO_ARG, 0, 0, 0,
0, 0, 0}, 0, 0, 0},
{"help", '?', "Display this help message and exit.", 0, 0, 0, GET_NO_ARG, {"help", '?', "Display this help message and exit.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0}, NO_ARG, 0, 0, 0, 0, 0, 0},
{"host",'h', "Connect to host.", (gptr*) &current_host, {"host",'h', "Connect to host.", (uchar**) &current_host,
(gptr*) &current_host, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &current_host, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"medium-check", 'm', {"medium-check", 'm',
"Faster than extended-check, but only finds 99.99 percent of all errors. Should be good enough for most cases.", "Faster than extended-check, but only finds 99.99 percent of all errors. Should be good enough for most cases.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"write-binlog", OPT_WRITE_BINLOG, {"write-binlog", OPT_WRITE_BINLOG,
"Log ANALYZE, OPTIMIZE and REPAIR TABLE commands. Enabled by default; use --skip-write-binlog when commands should not be sent to replication slaves.", "Log ANALYZE, OPTIMIZE and REPAIR TABLE commands. Enabled by default; use --skip-write-binlog when commands should not be sent to replication slaves.",
(gptr*) &opt_write_binlog, (gptr*) &opt_write_binlog, 0, GET_BOOL, NO_ARG, (uchar**) &opt_write_binlog, (uchar**) &opt_write_binlog, 0, GET_BOOL, NO_ARG,
1, 0, 0, 0, 0, 0}, 1, 0, 0, 0, 0, 0},
{"optimize", 'o', "Optimize table.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, {"optimize", 'o', "Optimize table.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0,
0, 0}, 0, 0},
@ -137,38 +137,38 @@ static struct my_option my_long_options[] =
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG, {"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0}, NO_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
{"port", 'P', "Port number to use for connection.", (gptr*) &opt_mysql_port, {"port", 'P', "Port number to use for connection.", (uchar**) &opt_mysql_port,
(gptr*) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, (uchar**) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
0}, 0},
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory).", {"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory).",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"quick", 'q', {"quick", 'q',
"If you are using this option with CHECK TABLE, it prevents the check from scanning the rows to check for wrong links. This is the fastest check. If you are using this option with REPAIR TABLE, it will try to repair only the index tree. This is the fastest repair method for a table.", "If you are using this option with CHECK TABLE, it prevents the check from scanning the rows to check for wrong links. This is the fastest check. If you are using this option with REPAIR TABLE, it will try to repair only the index tree. This is the fastest repair method for a table.",
(gptr*) &opt_quick, (gptr*) &opt_quick, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, (uchar**) &opt_quick, (uchar**) &opt_quick, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0,
0}, 0},
{"repair", 'r', {"repair", 'r',
"Can fix almost anything except unique keys that aren't unique.", "Can fix almost anything except unique keys that aren't unique.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
#ifdef HAVE_SMEM #ifdef HAVE_SMEM
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME, {"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
"Base name of shared memory.", (gptr*) &shared_memory_base_name, (gptr*) &shared_memory_base_name, "Base name of shared memory.", (uchar**) &shared_memory_base_name, (uchar**) &shared_memory_base_name,
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
{"silent", 's', "Print only error messages.", (gptr*) &opt_silent, {"silent", 's', "Print only error messages.", (uchar**) &opt_silent,
(gptr*) &opt_silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &opt_silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"socket", 'S', "Socket file to use for connection.", {"socket", 'S', "Socket file to use for connection.",
(gptr*) &opt_mysql_unix_port, (gptr*) &opt_mysql_unix_port, 0, GET_STR, (uchar**) &opt_mysql_unix_port, (uchar**) &opt_mysql_unix_port, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#include <sslopt-longopts.h> #include <sslopt-longopts.h>
{"tables", OPT_TABLES, "Overrides option --databases (-B).", 0, 0, 0, {"tables", OPT_TABLES, "Overrides option --databases (-B).", 0, 0, 0,
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"use-frm", OPT_FRM, {"use-frm", OPT_FRM,
"When used with REPAIR, get table structure from .frm file, so the table can be repaired even if .MYI header is corrupted.", "When used with REPAIR, get table structure from .frm file, so the table can be repaired even if .MYI header is corrupted.",
(gptr*) &opt_frm, (gptr*) &opt_frm, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, (uchar**) &opt_frm, (uchar**) &opt_frm, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0,
0}, 0},
#ifndef DONT_ALLOW_USER_CHANGE #ifndef DONT_ALLOW_USER_CHANGE
{"user", 'u', "User for login if not current user.", (gptr*) &current_user, {"user", 'u', "User for login if not current user.", (uchar**) &current_user,
(gptr*) &current_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &current_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
{"verbose", 'v', "Print info about the various stages.", 0, 0, 0, GET_NO_ARG, {"verbose", 'v', "Print info about the various stages.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0}, NO_ARG, 0, 0, 0, 0, 0, 0},

View File

@ -117,7 +117,7 @@ static ulong opt_compatible_mode= 0;
#define MYSQL_OPT_MASTER_DATA_EFFECTIVE_SQL 1 #define MYSQL_OPT_MASTER_DATA_EFFECTIVE_SQL 1
#define MYSQL_OPT_MASTER_DATA_COMMENTED_SQL 2 #define MYSQL_OPT_MASTER_DATA_COMMENTED_SQL 2
static uint opt_mysql_port= 0, opt_master_data; static uint opt_mysql_port= 0, opt_master_data;
static my_string opt_mysql_unix_port=0; static char * opt_mysql_unix_port=0;
static int first_error=0; static int first_error=0;
static DYNAMIC_STRING extended_row; static DYNAMIC_STRING extended_row;
#include <sslopt-vars.h> #include <sslopt-vars.h>
@ -177,106 +177,106 @@ HASH ignore_table;
static struct my_option my_long_options[] = static struct my_option my_long_options[] =
{ {
{"all", 'a', "Deprecated. Use --create-options instead.", {"all", 'a', "Deprecated. Use --create-options instead.",
(gptr*) &create_options, (gptr*) &create_options, 0, GET_BOOL, NO_ARG, 1, (uchar**) &create_options, (uchar**) &create_options, 0, GET_BOOL, NO_ARG, 1,
0, 0, 0, 0, 0}, 0, 0, 0, 0, 0},
{"all-databases", 'A', {"all-databases", 'A',
"Dump all the databases. This will be same as --databases with all databases selected.", "Dump all the databases. This will be same as --databases with all databases selected.",
(gptr*) &opt_alldbs, (gptr*) &opt_alldbs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, (uchar**) &opt_alldbs, (uchar**) &opt_alldbs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
0, 0}, 0, 0},
{"all-tablespaces", 'Y', {"all-tablespaces", 'Y',
"Dump all the tablespaces.", "Dump all the tablespaces.",
(gptr*) &opt_alltspcs, (gptr*) &opt_alltspcs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, (uchar**) &opt_alltspcs, (uchar**) &opt_alltspcs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
0, 0}, 0, 0},
{"no-tablespaces", 'y', {"no-tablespaces", 'y',
"Do not dump any tablespace information.", "Do not dump any tablespace information.",
(gptr*) &opt_notspcs, (gptr*) &opt_notspcs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, (uchar**) &opt_notspcs, (uchar**) &opt_notspcs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
0, 0}, 0, 0},
{"add-drop-database", OPT_DROP_DATABASE, "Add a 'DROP DATABASE' before each create.", {"add-drop-database", OPT_DROP_DATABASE, "Add a 'DROP DATABASE' before each create.",
(gptr*) &opt_drop_database, (gptr*) &opt_drop_database, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, (uchar**) &opt_drop_database, (uchar**) &opt_drop_database, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0,
0}, 0},
{"add-drop-table", OPT_DROP, "Add a 'drop table' before each create.", {"add-drop-table", OPT_DROP, "Add a 'drop table' before each create.",
(gptr*) &opt_drop, (gptr*) &opt_drop, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, (uchar**) &opt_drop, (uchar**) &opt_drop, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0,
0}, 0},
{"add-locks", OPT_LOCKS, "Add locks around insert statements.", {"add-locks", OPT_LOCKS, "Add locks around insert statements.",
(gptr*) &opt_lock, (gptr*) &opt_lock, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, (uchar**) &opt_lock, (uchar**) &opt_lock, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0,
0}, 0},
{"allow-keywords", OPT_KEYWORDS, {"allow-keywords", OPT_KEYWORDS,
"Allow creation of column names that are keywords.", (gptr*) &opt_keywords, "Allow creation of column names that are keywords.", (uchar**) &opt_keywords,
(gptr*) &opt_keywords, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &opt_keywords, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
#ifdef __NETWARE__ #ifdef __NETWARE__
{"autoclose", OPT_AUTO_CLOSE, "Auto close the screen on exit for Netware.", {"autoclose", OPT_AUTO_CLOSE, "Auto close the screen on exit for Netware.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
{"character-sets-dir", OPT_CHARSETS_DIR, {"character-sets-dir", OPT_CHARSETS_DIR,
"Directory where character sets are.", (gptr*) &charsets_dir, "Directory where character sets are.", (uchar**) &charsets_dir,
(gptr*) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"comments", 'i', "Write additional information.", {"comments", 'i', "Write additional information.",
(gptr*) &opt_comments, (gptr*) &opt_comments, 0, GET_BOOL, NO_ARG, (uchar**) &opt_comments, (uchar**) &opt_comments, 0, GET_BOOL, NO_ARG,
1, 0, 0, 0, 0, 0}, 1, 0, 0, 0, 0, 0},
{"compatible", OPT_COMPATIBLE, {"compatible", OPT_COMPATIBLE,
"Change the dump to be compatible with a given mode. By default tables are dumped in a format optimized for MySQL. Legal modes are: ansi, mysql323, mysql40, postgresql, oracle, mssql, db2, maxdb, no_key_options, no_table_options, no_field_options. One can use several modes separated by commas. Note: Requires MySQL server version 4.1.0 or higher. This option is ignored with earlier server versions.", "Change the dump to be compatible with a given mode. By default tables are dumped in a format optimized for MySQL. Legal modes are: ansi, mysql323, mysql40, postgresql, oracle, mssql, db2, maxdb, no_key_options, no_table_options, no_field_options. One can use several modes separated by commas. Note: Requires MySQL server version 4.1.0 or higher. This option is ignored with earlier server versions.",
(gptr*) &opt_compatible_mode_str, (gptr*) &opt_compatible_mode_str, 0, (uchar**) &opt_compatible_mode_str, (uchar**) &opt_compatible_mode_str, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"compact", OPT_COMPACT, {"compact", OPT_COMPACT,
"Give less verbose output (useful for debugging). Disables structure comments and header/footer constructs. Enables options --skip-add-drop-table --no-set-names --skip-disable-keys --skip-add-locks", "Give less verbose output (useful for debugging). Disables structure comments and header/footer constructs. Enables options --skip-add-drop-table --no-set-names --skip-disable-keys --skip-add-locks",
(gptr*) &opt_compact, (gptr*) &opt_compact, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, (uchar**) &opt_compact, (uchar**) &opt_compact, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
0, 0}, 0, 0},
{"complete-insert", 'c', "Use complete insert statements.", {"complete-insert", 'c', "Use complete insert statements.",
(gptr*) &opt_complete_insert, (gptr*) &opt_complete_insert, 0, GET_BOOL, (uchar**) &opt_complete_insert, (uchar**) &opt_complete_insert, 0, GET_BOOL,
NO_ARG, 0, 0, 0, 0, 0, 0}, NO_ARG, 0, 0, 0, 0, 0, 0},
{"compress", 'C', "Use compression in server/client protocol.", {"compress", 'C', "Use compression in server/client protocol.",
(gptr*) &opt_compress, (gptr*) &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0, (uchar**) &opt_compress, (uchar**) &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0,
0, 0, 0}, 0, 0, 0},
{"create-options", OPT_CREATE_OPTIONS, {"create-options", OPT_CREATE_OPTIONS,
"Include all MySQL specific create options.", "Include all MySQL specific create options.",
(gptr*) &create_options, (gptr*) &create_options, 0, GET_BOOL, NO_ARG, 1, (uchar**) &create_options, (uchar**) &create_options, 0, GET_BOOL, NO_ARG, 1,
0, 0, 0, 0, 0}, 0, 0, 0, 0, 0},
{"databases", 'B', {"databases", 'B',
"To dump several databases. Note the difference in usage; In this case no tables are given. All name arguments are regarded as databasenames. 'USE db_name;' will be included in the output.", "To dump several databases. Note the difference in usage; In this case no tables are given. All name arguments are regarded as databasenames. 'USE db_name;' will be included in the output.",
(gptr*) &opt_databases, (gptr*) &opt_databases, 0, GET_BOOL, NO_ARG, 0, 0, (uchar**) &opt_databases, (uchar**) &opt_databases, 0, GET_BOOL, NO_ARG, 0, 0,
0, 0, 0, 0}, 0, 0, 0, 0},
#ifdef DBUG_OFF #ifdef DBUG_OFF
{"debug", '#', "This is a non-debug version. Catch this and exit", {"debug", '#', "This is a non-debug version. Catch this and exit",
0,0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0}, 0,0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
#else #else
{"debug", '#', "Output debug log", (gptr*) &default_dbug_option, {"debug", '#', "Output debug log", (uchar**) &default_dbug_option,
(gptr*) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
{"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.", (gptr*) &info_flag, {"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.", (uchar**) &info_flag,
(gptr*) &info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"default-character-set", OPT_DEFAULT_CHARSET, {"default-character-set", OPT_DEFAULT_CHARSET,
"Set the default character set.", (gptr*) &default_charset, "Set the default character set.", (uchar**) &default_charset,
(gptr*) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"delayed-insert", OPT_DELAYED, "Insert rows with INSERT DELAYED; ", {"delayed-insert", OPT_DELAYED, "Insert rows with INSERT DELAYED; ",
(gptr*) &opt_delayed, (gptr*) &opt_delayed, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, (uchar**) &opt_delayed, (uchar**) &opt_delayed, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
0, 0}, 0, 0},
{"delete-master-logs", OPT_DELETE_MASTER_LOGS, {"delete-master-logs", OPT_DELETE_MASTER_LOGS,
"Delete logs on master after backup. This automatically enables --master-data.", "Delete logs on master after backup. This automatically enables --master-data.",
(gptr*) &opt_delete_master_logs, (gptr*) &opt_delete_master_logs, 0, (uchar**) &opt_delete_master_logs, (uchar**) &opt_delete_master_logs, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"disable-keys", 'K', {"disable-keys", 'K',
"'/*!40000 ALTER TABLE tb_name DISABLE KEYS */; and '/*!40000 ALTER TABLE tb_name ENABLE KEYS */; will be put in the output.", (gptr*) &opt_disable_keys, "'/*!40000 ALTER TABLE tb_name DISABLE KEYS */; and '/*!40000 ALTER TABLE tb_name ENABLE KEYS */; will be put in the output.", (uchar**) &opt_disable_keys,
(gptr*) &opt_disable_keys, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, (uchar**) &opt_disable_keys, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
{"events", 'E', "Dump events.", {"events", 'E', "Dump events.",
(gptr*) &opt_events, (gptr*) &opt_events, 0, GET_BOOL, (uchar**) &opt_events, (uchar**) &opt_events, 0, GET_BOOL,
NO_ARG, 0, 0, 0, 0, 0, 0}, NO_ARG, 0, 0, 0, 0, 0, 0},
{"extended-insert", 'e', {"extended-insert", 'e',
"Allows utilization of the new, much faster INSERT syntax.", "Allows utilization of the new, much faster INSERT syntax.",
(gptr*) &extended_insert, (gptr*) &extended_insert, 0, GET_BOOL, NO_ARG, (uchar**) &extended_insert, (uchar**) &extended_insert, 0, GET_BOOL, NO_ARG,
1, 0, 0, 0, 0, 0}, 1, 0, 0, 0, 0, 0},
{"fields-terminated-by", OPT_FTB, {"fields-terminated-by", OPT_FTB,
"Fields in the textfile are terminated by ...", (gptr*) &fields_terminated, "Fields in the textfile are terminated by ...", (uchar**) &fields_terminated,
(gptr*) &fields_terminated, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &fields_terminated, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"fields-enclosed-by", OPT_ENC, {"fields-enclosed-by", OPT_ENC,
"Fields in the importfile are enclosed by ...", (gptr*) &enclosed, "Fields in the importfile are enclosed by ...", (uchar**) &enclosed,
(gptr*) &enclosed, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0 ,0, 0}, (uchar**) &enclosed, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0 ,0, 0},
{"fields-optionally-enclosed-by", OPT_O_ENC, {"fields-optionally-enclosed-by", OPT_O_ENC,
"Fields in the i.file are opt. enclosed by ...", (gptr*) &opt_enclosed, "Fields in the i.file are opt. enclosed by ...", (uchar**) &opt_enclosed,
(gptr*) &opt_enclosed, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0 ,0, 0}, (uchar**) &opt_enclosed, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0 ,0, 0},
{"fields-escaped-by", OPT_ESC, "Fields in the i.file are escaped by ...", {"fields-escaped-by", OPT_ESC, "Fields in the i.file are escaped by ...",
(gptr*) &escaped, (gptr*) &escaped, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &escaped, (uchar**) &escaped, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"first-slave", 'x', "Deprecated, renamed to --lock-all-tables.", {"first-slave", 'x', "Deprecated, renamed to --lock-all-tables.",
(gptr*) &opt_lock_all_tables, (gptr*) &opt_lock_all_tables, 0, GET_BOOL, NO_ARG, (uchar**) &opt_lock_all_tables, (uchar**) &opt_lock_all_tables, 0, GET_BOOL, NO_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{"flush-logs", 'F', "Flush logs file in server before starting dump. " {"flush-logs", 'F', "Flush logs file in server before starting dump. "
"Note that if you dump many databases at once (using the option " "Note that if you dump many databases at once (using the option "
@ -287,44 +287,44 @@ static struct my_option my_long_options[] =
"to the moment all tables are locked. So if you want your dump and " "to the moment all tables are locked. So if you want your dump and "
"the log flush to happen at the same exact moment you should use " "the log flush to happen at the same exact moment you should use "
"--lock-all-tables or --master-data with --flush-logs", "--lock-all-tables or --master-data with --flush-logs",
(gptr*) &flush_logs, (gptr*) &flush_logs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, (uchar**) &flush_logs, (uchar**) &flush_logs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
0, 0}, 0, 0},
{"flush-privileges", OPT_ESC, "Emit a FLUSH PRIVILEGES statement " {"flush-privileges", OPT_ESC, "Emit a FLUSH PRIVILEGES statement "
"after dumping the mysql database. This option should be used any " "after dumping the mysql database. This option should be used any "
"time the dump contains the mysql database and any other database " "time the dump contains the mysql database and any other database "
"that depends on the data in the mysql database for proper restore. ", "that depends on the data in the mysql database for proper restore. ",
(gptr*) &flush_privileges, (gptr*) &flush_privileges, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, (uchar**) &flush_privileges, (uchar**) &flush_privileges, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
0, 0}, 0, 0},
{"force", 'f', "Continue even if we get an sql-error.", {"force", 'f', "Continue even if we get an sql-error.",
(gptr*) &ignore_errors, (gptr*) &ignore_errors, 0, GET_BOOL, NO_ARG, (uchar**) &ignore_errors, (uchar**) &ignore_errors, 0, GET_BOOL, NO_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{"help", '?', "Display this help message and exit.", 0, 0, 0, GET_NO_ARG, {"help", '?', "Display this help message and exit.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0}, NO_ARG, 0, 0, 0, 0, 0, 0},
{"hex-blob", OPT_HEXBLOB, "Dump binary strings (BINARY, " {"hex-blob", OPT_HEXBLOB, "Dump binary strings (BINARY, "
"VARBINARY, BLOB) in hexadecimal format.", "VARBINARY, BLOB) in hexadecimal format.",
(gptr*) &opt_hex_blob, (gptr*) &opt_hex_blob, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &opt_hex_blob, (uchar**) &opt_hex_blob, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"host", 'h', "Connect to host.", (gptr*) &current_host, {"host", 'h', "Connect to host.", (uchar**) &current_host,
(gptr*) &current_host, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &current_host, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"ignore-table", OPT_IGNORE_TABLE, {"ignore-table", OPT_IGNORE_TABLE,
"Do not dump the specified table. To specify more than one table to ignore, " "Do not dump the specified table. To specify more than one table to ignore, "
"use the directive multiple times, once for each table. Each table must " "use the directive multiple times, once for each table. Each table must "
"be specified with both database and table names, e.g. --ignore-table=database.table", "be specified with both database and table names, e.g. --ignore-table=database.table",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"insert-ignore", OPT_INSERT_IGNORE, "Insert rows with INSERT IGNORE.", {"insert-ignore", OPT_INSERT_IGNORE, "Insert rows with INSERT IGNORE.",
(gptr*) &opt_ignore, (gptr*) &opt_ignore, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, (uchar**) &opt_ignore, (uchar**) &opt_ignore, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
0, 0}, 0, 0},
{"lines-terminated-by", OPT_LTB, "Lines in the i.file are terminated by ...", {"lines-terminated-by", OPT_LTB, "Lines in the i.file are terminated by ...",
(gptr*) &lines_terminated, (gptr*) &lines_terminated, 0, GET_STR, (uchar**) &lines_terminated, (uchar**) &lines_terminated, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"lock-all-tables", 'x', "Locks all tables across all databases. This " {"lock-all-tables", 'x', "Locks all tables across all databases. This "
"is achieved by taking a global read lock for the duration of the whole " "is achieved by taking a global read lock for the duration of the whole "
"dump. Automatically turns --single-transaction and --lock-tables off.", "dump. Automatically turns --single-transaction and --lock-tables off.",
(gptr*) &opt_lock_all_tables, (gptr*) &opt_lock_all_tables, 0, GET_BOOL, NO_ARG, (uchar**) &opt_lock_all_tables, (uchar**) &opt_lock_all_tables, 0, GET_BOOL, NO_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{"lock-tables", 'l', "Lock all tables for read.", (gptr*) &lock_tables, {"lock-tables", 'l', "Lock all tables for read.", (uchar**) &lock_tables,
(gptr*) &lock_tables, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, (uchar**) &lock_tables, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
{"log-error", OPT_ERROR_LOG_FILE, "Append warnings and errors to given file.", {"log-error", OPT_ERROR_LOG_FILE, "Append warnings and errors to given file.",
(gptr*) &log_error_file, (gptr*) &log_error_file, 0, GET_STR, (uchar**) &log_error_file, (uchar**) &log_error_file, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"master-data", OPT_MASTER_DATA, {"master-data", OPT_MASTER_DATA,
"This causes the binary log position and filename to be appended to the " "This causes the binary log position and filename to be appended to the "
@ -336,29 +336,29 @@ static struct my_option my_long_options[] =
"- don't forget to read about --single-transaction below). In all cases " "- don't forget to read about --single-transaction below). In all cases "
"any action on logs will happen at the exact moment of the dump." "any action on logs will happen at the exact moment of the dump."
"Option automatically turns --lock-tables off.", "Option automatically turns --lock-tables off.",
(gptr*) &opt_master_data, (gptr*) &opt_master_data, 0, (uchar**) &opt_master_data, (uchar**) &opt_master_data, 0,
GET_UINT, OPT_ARG, 0, 0, MYSQL_OPT_MASTER_DATA_COMMENTED_SQL, 0, 0, 0}, GET_UINT, OPT_ARG, 0, 0, MYSQL_OPT_MASTER_DATA_COMMENTED_SQL, 0, 0, 0},
{"max_allowed_packet", OPT_MAX_ALLOWED_PACKET, "", {"max_allowed_packet", OPT_MAX_ALLOWED_PACKET, "",
(gptr*) &opt_max_allowed_packet, (gptr*) &opt_max_allowed_packet, 0, (uchar**) &opt_max_allowed_packet, (uchar**) &opt_max_allowed_packet, 0,
GET_ULONG, REQUIRED_ARG, 24*1024*1024, 4096, GET_ULONG, REQUIRED_ARG, 24*1024*1024, 4096,
(longlong) 2L*1024L*1024L*1024L, MALLOC_OVERHEAD, 1024, 0}, (longlong) 2L*1024L*1024L*1024L, MALLOC_OVERHEAD, 1024, 0},
{"net_buffer_length", OPT_NET_BUFFER_LENGTH, "", {"net_buffer_length", OPT_NET_BUFFER_LENGTH, "",
(gptr*) &opt_net_buffer_length, (gptr*) &opt_net_buffer_length, 0, (uchar**) &opt_net_buffer_length, (uchar**) &opt_net_buffer_length, 0,
GET_ULONG, REQUIRED_ARG, 1024*1024L-1025, 4096, 16*1024L*1024L, GET_ULONG, REQUIRED_ARG, 1024*1024L-1025, 4096, 16*1024L*1024L,
MALLOC_OVERHEAD-1024, 1024, 0}, MALLOC_OVERHEAD-1024, 1024, 0},
{"no-autocommit", OPT_AUTOCOMMIT, {"no-autocommit", OPT_AUTOCOMMIT,
"Wrap tables with autocommit/commit statements.", "Wrap tables with autocommit/commit statements.",
(gptr*) &opt_autocommit, (gptr*) &opt_autocommit, 0, GET_BOOL, NO_ARG, (uchar**) &opt_autocommit, (uchar**) &opt_autocommit, 0, GET_BOOL, NO_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{"no-create-db", 'n', {"no-create-db", 'n',
"'CREATE DATABASE /*!32312 IF NOT EXISTS*/ db_name;' will not be put in the output. The above line will be added otherwise, if --databases or --all-databases option was given.}.", "'CREATE DATABASE /*!32312 IF NOT EXISTS*/ db_name;' will not be put in the output. The above line will be added otherwise, if --databases or --all-databases option was given.}.",
(gptr*) &opt_create_db, (gptr*) &opt_create_db, 0, GET_BOOL, NO_ARG, 0, 0, (uchar**) &opt_create_db, (uchar**) &opt_create_db, 0, GET_BOOL, NO_ARG, 0, 0,
0, 0, 0, 0}, 0, 0, 0, 0},
{"no-create-info", 't', "Don't write table creation info.", {"no-create-info", 't', "Don't write table creation info.",
(gptr*) &opt_no_create_info, (gptr*) &opt_no_create_info, 0, GET_BOOL, (uchar**) &opt_no_create_info, (uchar**) &opt_no_create_info, 0, GET_BOOL,
NO_ARG, 0, 0, 0, 0, 0, 0}, NO_ARG, 0, 0, 0, 0, 0, 0},
{"no-data", 'd', "No row information.", (gptr*) &opt_no_data, {"no-data", 'd', "No row information.", (uchar**) &opt_no_data,
(gptr*) &opt_no_data, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &opt_no_data, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"no-set-names", 'N', {"no-set-names", 'N',
"Deprecated. Use --skip-set-charset instead.", "Deprecated. Use --skip-set-charset instead.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
@ -367,7 +367,7 @@ static struct my_option my_long_options[] =
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"order-by-primary", OPT_ORDER_BY_PRIMARY, {"order-by-primary", OPT_ORDER_BY_PRIMARY,
"Sorts each table's rows by primary key, or first unique key, if such a key exists. Useful when dumping a MyISAM table to be loaded into an InnoDB table, but will make the dump itself take considerably longer.", "Sorts each table's rows by primary key, or first unique key, if such a key exists. Useful when dumping a MyISAM table to be loaded into an InnoDB table, but will make the dump itself take considerably longer.",
(gptr*) &opt_order_by_primary, (gptr*) &opt_order_by_primary, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &opt_order_by_primary, (uchar**) &opt_order_by_primary, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"password", 'p', {"password", 'p',
"Password to use when connecting to server. If password is not given it's solicited on the tty.", "Password to use when connecting to server. If password is not given it's solicited on the tty.",
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
@ -375,35 +375,35 @@ static struct my_option my_long_options[] =
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG, {"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0}, NO_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
{"port", 'P', "Port number to use for connection.", (gptr*) &opt_mysql_port, {"port", 'P', "Port number to use for connection.", (uchar**) &opt_mysql_port,
(gptr*) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, (uchar**) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
0}, 0},
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory).", {"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory).",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"quick", 'q', "Don't buffer query, dump directly to stdout.", {"quick", 'q', "Don't buffer query, dump directly to stdout.",
(gptr*) &quick, (gptr*) &quick, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, (uchar**) &quick, (uchar**) &quick, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
{"quote-names",'Q', "Quote table and column names with backticks (`).", {"quote-names",'Q', "Quote table and column names with backticks (`).",
(gptr*) &opt_quoted, (gptr*) &opt_quoted, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, (uchar**) &opt_quoted, (uchar**) &opt_quoted, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0,
0, 0}, 0, 0},
{"replace", OPT_MYSQL_REPLACE_INTO, "Use REPLACE INTO instead of INSERT INTO.", {"replace", OPT_MYSQL_REPLACE_INTO, "Use REPLACE INTO instead of INSERT INTO.",
(gptr*) &opt_replace_into, (gptr*) &opt_replace_into, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, (uchar**) &opt_replace_into, (uchar**) &opt_replace_into, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
0, 0}, 0, 0},
{"result-file", 'r', {"result-file", 'r',
"Direct output to a given file. This option should be used in MSDOS, because it prevents new line '\\n' from being converted to '\\r\\n' (carriage return + line feed).", "Direct output to a given file. This option should be used in MSDOS, because it prevents new line '\\n' from being converted to '\\r\\n' (carriage return + line feed).",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"routines", 'R', "Dump stored routines (functions and procedures).", {"routines", 'R', "Dump stored routines (functions and procedures).",
(gptr*) &opt_routines, (gptr*) &opt_routines, 0, GET_BOOL, (uchar**) &opt_routines, (uchar**) &opt_routines, 0, GET_BOOL,
NO_ARG, 0, 0, 0, 0, 0, 0}, NO_ARG, 0, 0, 0, 0, 0, 0},
{"set-charset", OPT_SET_CHARSET, {"set-charset", OPT_SET_CHARSET,
"Add 'SET NAMES default_character_set' to the output. Enabled by default; suppress with --skip-set-charset.", "Add 'SET NAMES default_character_set' to the output. Enabled by default; suppress with --skip-set-charset.",
(gptr*) &opt_set_charset, (gptr*) &opt_set_charset, 0, GET_BOOL, NO_ARG, 1, (uchar**) &opt_set_charset, (uchar**) &opt_set_charset, 0, GET_BOOL, NO_ARG, 1,
0, 0, 0, 0, 0}, 0, 0, 0, 0, 0},
{"set-variable", 'O', {"set-variable", 'O',
"Change the value of a variable. Please note that this option is deprecated; you can set variables directly with --variable-name=value.", "Change the value of a variable. Please note that this option is deprecated; you can set variables directly with --variable-name=value.",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#ifdef HAVE_SMEM #ifdef HAVE_SMEM
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME, {"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
"Base name of shared memory.", (gptr*) &shared_memory_base_name, (gptr*) &shared_memory_base_name, "Base name of shared memory.", (uchar**) &shared_memory_base_name, (uchar**) &shared_memory_base_name,
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
/* /*
@ -417,37 +417,37 @@ static struct my_option my_long_options[] =
"support multiversioning (currently only InnoDB does); the dump is NOT " "support multiversioning (currently only InnoDB does); the dump is NOT "
"guaranteed to be consistent for other storage engines. Option " "guaranteed to be consistent for other storage engines. Option "
"automatically turns off --lock-tables.", "automatically turns off --lock-tables.",
(gptr*) &opt_single_transaction, (gptr*) &opt_single_transaction, 0, (uchar**) &opt_single_transaction, (uchar**) &opt_single_transaction, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"skip-opt", OPT_SKIP_OPTIMIZATION, {"skip-opt", OPT_SKIP_OPTIMIZATION,
"Disable --opt. Disables --add-drop-table, --add-locks, --create-options, --quick, --extended-insert, --lock-tables, --set-charset, and --disable-keys.", "Disable --opt. Disables --add-drop-table, --add-locks, --create-options, --quick, --extended-insert, --lock-tables, --set-charset, and --disable-keys.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"socket", 'S', "Socket file to use for connection.", {"socket", 'S', "Socket file to use for connection.",
(gptr*) &opt_mysql_unix_port, (gptr*) &opt_mysql_unix_port, 0, GET_STR, (uchar**) &opt_mysql_unix_port, (uchar**) &opt_mysql_unix_port, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#include <sslopt-longopts.h> #include <sslopt-longopts.h>
{"tab",'T', {"tab",'T',
"Creates tab separated textfile for each table to given path. (creates .sql and .txt files). NOTE: This only works if mysqldump is run on the same machine as the mysqld daemon.", "Creates tab separated textfile for each table to given path. (creates .sql and .txt files). NOTE: This only works if mysqldump is run on the same machine as the mysqld daemon.",
(gptr*) &path, (gptr*) &path, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &path, (uchar**) &path, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"tables", OPT_TABLES, "Overrides option --databases (-B).", {"tables", OPT_TABLES, "Overrides option --databases (-B).",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"triggers", OPT_TRIGGERS, "Dump triggers for each dumped table", {"triggers", OPT_TRIGGERS, "Dump triggers for each dumped table",
(gptr*) &opt_dump_triggers, (gptr*) &opt_dump_triggers, 0, GET_BOOL, (uchar**) &opt_dump_triggers, (uchar**) &opt_dump_triggers, 0, GET_BOOL,
NO_ARG, 1, 0, 0, 0, 0, 0}, NO_ARG, 1, 0, 0, 0, 0, 0},
{"tz-utc", OPT_TZ_UTC, {"tz-utc", OPT_TZ_UTC,
"SET TIME_ZONE='+00:00' at top of dump to allow dumping of TIMESTAMP data when a server has data in different time zones or data is being moved between servers with different time zones.", "SET TIME_ZONE='+00:00' at top of dump to allow dumping of TIMESTAMP data when a server has data in different time zones or data is being moved between servers with different time zones.",
(gptr*) &opt_tz_utc, (gptr*) &opt_tz_utc, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, (uchar**) &opt_tz_utc, (uchar**) &opt_tz_utc, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
#ifndef DONT_ALLOW_USER_CHANGE #ifndef DONT_ALLOW_USER_CHANGE
{"user", 'u', "User for login if not current user.", {"user", 'u', "User for login if not current user.",
(gptr*) &current_user, (gptr*) &current_user, 0, GET_STR, REQUIRED_ARG, (uchar**) &current_user, (uchar**) &current_user, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
#endif #endif
{"verbose", 'v', "Print info about the various stages.", {"verbose", 'v', "Print info about the various stages.",
(gptr*) &verbose, (gptr*) &verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &verbose, (uchar**) &verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"version",'V', "Output version information and exit.", 0, 0, 0, {"version",'V', "Output version information and exit.", 0, 0, 0,
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"where", 'w', "Dump only selected records; QUOTES mandatory!", {"where", 'w', "Dump only selected records; QUOTES mandatory!",
(gptr*) &where, (gptr*) &where, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &where, (uchar**) &where, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"xml", 'X', "Dump a database as well formed XML.", 0, 0, 0, GET_NO_ARG, {"xml", 'X', "Dump a database as well formed XML.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0}, NO_ARG, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} {0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
@ -655,18 +655,18 @@ static void write_footer(FILE *sql_file)
} }
} /* write_footer */ } /* write_footer */
static void free_table_ent(char *key)
static void free_table_ent(char *key)
{ {
my_free((gptr) key, MYF(0)); my_free(key, MYF(0));
} }
byte* get_table_key(const char *entry, uint *length, uchar* get_table_key(const char *entry, size_t *length,
my_bool not_used __attribute__((unused))) my_bool not_used __attribute__((unused)))
{ {
*length= strlen(entry); *length= strlen(entry);
return (byte*) entry; return (uchar*) entry;
} }
@ -753,7 +753,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
fprintf(stderr, "Illegal use of option --ignore-table=<database>.<table>\n"); fprintf(stderr, "Illegal use of option --ignore-table=<database>.<table>\n");
exit(1); exit(1);
} }
if (my_hash_insert(&ignore_table, (byte*)my_strdup(argument, MYF(0)))) if (my_hash_insert(&ignore_table, (uchar*)my_strdup(argument, MYF(0))))
exit(EX_EOM); exit(EX_EOM);
break; break;
} }
@ -832,13 +832,13 @@ static int get_options(int *argc, char ***argv)
return(EX_EOM); return(EX_EOM);
/* Don't copy internal log tables */ /* Don't copy internal log tables */
if (my_hash_insert(&ignore_table, if (my_hash_insert(&ignore_table,
(byte*) my_strdup("mysql.apply_status", MYF(MY_WME))) || (uchar*) my_strdup("mysql.apply_status", MYF(MY_WME))) ||
my_hash_insert(&ignore_table, my_hash_insert(&ignore_table,
(byte*) my_strdup("mysql.schema", MYF(MY_WME))) || (uchar*) my_strdup("mysql.schema", MYF(MY_WME))) ||
my_hash_insert(&ignore_table, my_hash_insert(&ignore_table,
(byte*) my_strdup("mysql.general_log", MYF(MY_WME))) || (uchar*) my_strdup("mysql.general_log", MYF(MY_WME))) ||
my_hash_insert(&ignore_table, my_hash_insert(&ignore_table,
(byte*) my_strdup("mysql.slow_log", MYF(MY_WME)))) (uchar*) my_strdup("mysql.slow_log", MYF(MY_WME))))
return(EX_EOM); return(EX_EOM);
if ((ho_error= handle_options(argc, argv, my_long_options, get_one_option))) if ((ho_error= handle_options(argc, argv, my_long_options, get_one_option)))
@ -2287,10 +2287,10 @@ static void dump_triggers_for_table(char *table,
we should check if we have this column before accessing it. we should check if we have this column before accessing it.
*/ */
uint user_name_len; size_t user_name_len;
char user_name_str[USERNAME_LENGTH + 1]; char user_name_str[USERNAME_LENGTH + 1];
char quoted_user_name_str[USERNAME_LENGTH * 2 + 3]; char quoted_user_name_str[USERNAME_LENGTH * 2 + 3];
uint host_name_len; size_t host_name_len;
char host_name_str[HOSTNAME_LENGTH + 1]; char host_name_str[HOSTNAME_LENGTH + 1];
char quoted_host_name_str[HOSTNAME_LENGTH * 2 + 3]; char quoted_host_name_str[HOSTNAME_LENGTH * 2 + 3];
@ -3342,9 +3342,9 @@ static int init_dumping(char *database, int init_func(char*))
/* Return 1 if we should copy the table */ /* Return 1 if we should copy the table */
my_bool include_table(byte* hash_key, uint len) my_bool include_table(uchar* hash_key, uint len)
{ {
return !hash_search(&ignore_table, (byte*) hash_key, len); return !hash_search(&ignore_table, (uchar*) hash_key, len);
} }
@ -4163,10 +4163,10 @@ static my_bool get_view_structure(char *table, char* db)
Surround it with !50013 comments Surround it with !50013 comments
*/ */
{ {
uint user_name_len; size_t user_name_len;
char user_name_str[USERNAME_LENGTH + 1]; char user_name_str[USERNAME_LENGTH + 1];
char quoted_user_name_str[USERNAME_LENGTH * 2 + 3]; char quoted_user_name_str[USERNAME_LENGTH * 2 + 3];
uint host_name_len; size_t host_name_len;
char host_name_str[HOSTNAME_LENGTH + 1]; char host_name_str[HOSTNAME_LENGTH + 1];
char quoted_host_name_str[HOSTNAME_LENGTH * 2 + 3]; char quoted_host_name_str[HOSTNAME_LENGTH * 2 + 3];

View File

@ -57,7 +57,7 @@ static char *opt_password=0, *current_user=0,
*escaped=0, *opt_columns=0, *escaped=0, *opt_columns=0,
*default_charset= (char*) MYSQL_DEFAULT_CHARSET_NAME; *default_charset= (char*) MYSQL_DEFAULT_CHARSET_NAME;
static uint opt_mysql_port= 0, opt_protocol= 0; static uint opt_mysql_port= 0, opt_protocol= 0;
static my_string opt_mysql_unix_port=0; static char * opt_mysql_unix_port=0;
static longlong opt_ignore_lines= -1; static longlong opt_ignore_lines= -1;
static CHARSET_INFO *charset_info= &my_charset_latin1; static CHARSET_INFO *charset_info= &my_charset_latin1;
#include <sslopt-vars.h> #include <sslopt-vars.h>
@ -73,59 +73,59 @@ static struct my_option my_long_options[] =
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
{"character-sets-dir", OPT_CHARSETS_DIR, {"character-sets-dir", OPT_CHARSETS_DIR,
"Directory where character sets are.", (gptr*) &charsets_dir, "Directory where character sets are.", (uchar**) &charsets_dir,
(gptr*) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"default-character-set", OPT_DEFAULT_CHARSET, {"default-character-set", OPT_DEFAULT_CHARSET,
"Set the default character set.", (gptr*) &default_charset, "Set the default character set.", (uchar**) &default_charset,
(gptr*) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"columns", 'c', {"columns", 'c',
"Use only these columns to import the data to. Give the column names in a comma separated list. This is same as giving columns to LOAD DATA INFILE.", "Use only these columns to import the data to. Give the column names in a comma separated list. This is same as giving columns to LOAD DATA INFILE.",
(gptr*) &opt_columns, (gptr*) &opt_columns, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, (uchar**) &opt_columns, (uchar**) &opt_columns, 0, GET_STR, REQUIRED_ARG, 0, 0, 0,
0, 0, 0}, 0, 0, 0},
{"compress", 'C', "Use compression in server/client protocol.", {"compress", 'C', "Use compression in server/client protocol.",
(gptr*) &opt_compress, (gptr*) &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0, (uchar**) &opt_compress, (uchar**) &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0,
0, 0, 0}, 0, 0, 0},
{"debug",'#', "Output debug log. Often this is 'd:t:o,filename'.", 0, 0, 0, {"debug",'#', "Output debug log. Often this is 'd:t:o,filename'.", 0, 0, 0,
GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
{"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.", (gptr*) &info_flag, {"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.", (uchar**) &info_flag,
(gptr*) &info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"delete", 'd', "First delete all rows from table.", (gptr*) &opt_delete, {"delete", 'd', "First delete all rows from table.", (uchar**) &opt_delete,
(gptr*) &opt_delete, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &opt_delete, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"fields-terminated-by", OPT_FTB, {"fields-terminated-by", OPT_FTB,
"Fields in the textfile are terminated by ...", (gptr*) &fields_terminated, "Fields in the textfile are terminated by ...", (uchar**) &fields_terminated,
(gptr*) &fields_terminated, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &fields_terminated, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"fields-enclosed-by", OPT_ENC, {"fields-enclosed-by", OPT_ENC,
"Fields in the importfile are enclosed by ...", (gptr*) &enclosed, "Fields in the importfile are enclosed by ...", (uchar**) &enclosed,
(gptr*) &enclosed, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &enclosed, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"fields-optionally-enclosed-by", OPT_O_ENC, {"fields-optionally-enclosed-by", OPT_O_ENC,
"Fields in the i.file are opt. enclosed by ...", (gptr*) &opt_enclosed, "Fields in the i.file are opt. enclosed by ...", (uchar**) &opt_enclosed,
(gptr*) &opt_enclosed, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &opt_enclosed, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"fields-escaped-by", OPT_ESC, "Fields in the i.file are escaped by ...", {"fields-escaped-by", OPT_ESC, "Fields in the i.file are escaped by ...",
(gptr*) &escaped, (gptr*) &escaped, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, (uchar**) &escaped, (uchar**) &escaped, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0,
0, 0}, 0, 0},
{"force", 'f', "Continue even if we get an sql-error.", {"force", 'f', "Continue even if we get an sql-error.",
(gptr*) &ignore_errors, (gptr*) &ignore_errors, 0, GET_BOOL, NO_ARG, 0, 0, (uchar**) &ignore_errors, (uchar**) &ignore_errors, 0, GET_BOOL, NO_ARG, 0, 0,
0, 0, 0, 0}, 0, 0, 0, 0},
{"help", '?', "Displays this help and exits.", 0, 0, 0, GET_NO_ARG, NO_ARG, {"help", '?', "Displays this help and exits.", 0, 0, 0, GET_NO_ARG, NO_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{"host", 'h', "Connect to host.", (gptr*) &current_host, {"host", 'h', "Connect to host.", (uchar**) &current_host,
(gptr*) &current_host, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &current_host, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"ignore", 'i', "If duplicate unique key was found, keep old row.", {"ignore", 'i', "If duplicate unique key was found, keep old row.",
(gptr*) &ignore, (gptr*) &ignore, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &ignore, (uchar**) &ignore, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"ignore-lines", OPT_IGN_LINES, "Ignore first n lines of data infile.", {"ignore-lines", OPT_IGN_LINES, "Ignore first n lines of data infile.",
(gptr*) &opt_ignore_lines, (gptr*) &opt_ignore_lines, 0, GET_LL, (uchar**) &opt_ignore_lines, (uchar**) &opt_ignore_lines, 0, GET_LL,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"lines-terminated-by", OPT_LTB, "Lines in the i.file are terminated by ...", {"lines-terminated-by", OPT_LTB, "Lines in the i.file are terminated by ...",
(gptr*) &lines_terminated, (gptr*) &lines_terminated, 0, GET_STR, (uchar**) &lines_terminated, (uchar**) &lines_terminated, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"local", 'L', "Read all files through the client.", (gptr*) &opt_local_file, {"local", 'L', "Read all files through the client.", (uchar**) &opt_local_file,
(gptr*) &opt_local_file, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &opt_local_file, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"lock-tables", 'l', "Lock all tables for write (this disables threads).", {"lock-tables", 'l', "Lock all tables for write (this disables threads).",
(gptr*) &lock_tables, (gptr*) &lock_tables, 0, GET_BOOL, NO_ARG, (uchar**) &lock_tables, (uchar**) &lock_tables, 0, GET_BOOL, NO_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{"low-priority", OPT_LOW_PRIORITY, {"low-priority", OPT_LOW_PRIORITY,
"Use LOW_PRIORITY when updating the table.", (gptr*) &opt_low_priority, "Use LOW_PRIORITY when updating the table.", (uchar**) &opt_low_priority,
(gptr*) &opt_low_priority, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &opt_low_priority, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"password", 'p', {"password", 'p',
"Password to use when connecting to server. If password is not given it's asked from the tty.", "Password to use when connecting to server. If password is not given it's asked from the tty.",
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
@ -133,35 +133,35 @@ static struct my_option my_long_options[] =
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG, {"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0}, NO_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
{"port", 'P', "Port number to use for connection.", (gptr*) &opt_mysql_port, {"port", 'P', "Port number to use for connection.", (uchar**) &opt_mysql_port,
(gptr*) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, (uchar**) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
0}, 0},
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory).", {"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory).",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"replace", 'r', "If duplicate unique key was found, replace old row.", {"replace", 'r', "If duplicate unique key was found, replace old row.",
(gptr*) &replace, (gptr*) &replace, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &replace, (uchar**) &replace, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
#ifdef HAVE_SMEM #ifdef HAVE_SMEM
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME, {"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
"Base name of shared memory.", (gptr*) &shared_memory_base_name, (gptr*) &shared_memory_base_name, "Base name of shared memory.", (uchar**) &shared_memory_base_name, (uchar**) &shared_memory_base_name,
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
{"silent", 's', "Be more silent.", (gptr*) &silent, (gptr*) &silent, 0, {"silent", 's', "Be more silent.", (uchar**) &silent, (uchar**) &silent, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"socket", 'S', "Socket file to use for connection.", {"socket", 'S', "Socket file to use for connection.",
(gptr*) &opt_mysql_unix_port, (gptr*) &opt_mysql_unix_port, 0, GET_STR, (uchar**) &opt_mysql_unix_port, (uchar**) &opt_mysql_unix_port, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#include <sslopt-longopts.h> #include <sslopt-longopts.h>
{"use-threads", OPT_USE_THREADS, {"use-threads", OPT_USE_THREADS,
"Load files in parallel. The argument is the number " "Load files in parallel. The argument is the number "
"of threads to use for loading data.", "of threads to use for loading data.",
(gptr*) &opt_use_threads, (gptr*) &opt_use_threads, 0, (uchar**) &opt_use_threads, (uchar**) &opt_use_threads, 0,
GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#ifndef DONT_ALLOW_USER_CHANGE #ifndef DONT_ALLOW_USER_CHANGE
{"user", 'u', "User for login if not current user.", (gptr*) &current_user, {"user", 'u', "User for login if not current user.", (uchar**) &current_user,
(gptr*) &current_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &current_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
{"verbose", 'v', "Print info about the various stages.", (gptr*) &verbose, {"verbose", 'v', "Print info about the various stages.", (uchar**) &verbose,
(gptr*) &verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"version", 'V', "Output version information and exit.", 0, 0, 0, GET_NO_ARG, {"version", 'V', "Output version information and exit.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0}, NO_ARG, 0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}

View File

@ -26,7 +26,7 @@
#include <stdarg.h> #include <stdarg.h>
#include <sslopt-vars.h> #include <sslopt-vars.h>
static my_string host=0,opt_password=0,user=0; static char * host=0, *opt_password=0, *user=0;
static my_bool opt_show_keys= 0, opt_compress= 0, opt_count=0, opt_status= 0; static my_bool opt_show_keys= 0, opt_compress= 0, opt_count=0, opt_status= 0;
static my_bool tty_password= 0, opt_table_type= 0, info_flag= 0; static my_bool tty_password= 0, opt_table_type= 0, info_flag= 0;
static uint opt_verbose=0; static uint opt_verbose=0;
@ -52,7 +52,7 @@ static void print_res_top(MYSQL_RES *result);
static void print_res_row(MYSQL_RES *result,MYSQL_ROW cur); static void print_res_row(MYSQL_RES *result,MYSQL_ROW cur);
static const char *load_default_groups[]= { "mysqlshow","client",0 }; static const char *load_default_groups[]= { "mysqlshow","client",0 };
static my_string opt_mysql_unix_port=0; static char * opt_mysql_unix_port=0;
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
@ -120,7 +120,8 @@ int main(int argc, char **argv)
mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, default_charset); mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, default_charset);
if (!(mysql_real_connect(&mysql,host,user,opt_password, if (!(mysql_real_connect(&mysql,host,user,opt_password,
(first_argument_uses_wildcards) ? "" : argv[0],opt_mysql_port,opt_mysql_unix_port, (first_argument_uses_wildcards) ? "" :
argv[0],opt_mysql_port,opt_mysql_unix_port,
0))) 0)))
{ {
fprintf(stderr,"%s: %s\n",my_progname,mysql_error(&mysql)); fprintf(stderr,"%s: %s\n",my_progname,mysql_error(&mysql));
@ -161,36 +162,36 @@ static struct my_option my_long_options[] =
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
{"character-sets-dir", 'c', "Directory where character sets are.", {"character-sets-dir", 'c', "Directory where character sets are.",
(gptr*) &charsets_dir, (gptr*) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, (uchar**) &charsets_dir, (uchar**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0,
0, 0, 0, 0, 0}, 0, 0, 0, 0, 0},
{"default-character-set", OPT_DEFAULT_CHARSET, {"default-character-set", OPT_DEFAULT_CHARSET,
"Set the default character set.", (gptr*) &default_charset, "Set the default character set.", (uchar**) &default_charset,
(gptr*) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"count", OPT_COUNT, {"count", OPT_COUNT,
"Show number of rows per table (may be slow for not MyISAM tables)", "Show number of rows per table (may be slow for not MyISAM tables)",
(gptr*) &opt_count, (gptr*) &opt_count, 0, GET_BOOL, NO_ARG, 0, 0, 0, (uchar**) &opt_count, (uchar**) &opt_count, 0, GET_BOOL, NO_ARG, 0, 0, 0,
0, 0, 0}, 0, 0, 0},
{"compress", 'C', "Use compression in server/client protocol.", {"compress", 'C', "Use compression in server/client protocol.",
(gptr*) &opt_compress, (gptr*) &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0, (uchar**) &opt_compress, (uchar**) &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0,
0, 0, 0}, 0, 0, 0},
{"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.", {"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.",
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
{"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.", (gptr*) &info_flag, {"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.", (uchar**) &info_flag,
(gptr*) &info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, {"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{"host", 'h', "Connect to host.", (gptr*) &host, (gptr*) &host, 0, GET_STR, {"host", 'h', "Connect to host.", (uchar**) &host, (uchar**) &host, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"status", 'i', "Shows a lot of extra information about each table.", {"status", 'i', "Shows a lot of extra information about each table.",
(gptr*) &opt_status, (gptr*) &opt_status, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, (uchar**) &opt_status, (uchar**) &opt_status, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
0, 0}, 0, 0},
{"keys", 'k', "Show keys for table.", (gptr*) &opt_show_keys, {"keys", 'k', "Show keys for table.", (uchar**) &opt_show_keys,
(gptr*) &opt_show_keys, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &opt_show_keys, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"password", 'p', {"password", 'p',
"Password to use when connecting to server. If password is not given it's asked from the tty.", "Password to use when connecting to server. If password is not given it's asked from the tty.",
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
{"port", 'P', "Port number to use for connection.", (gptr*) &opt_mysql_port, {"port", 'P', "Port number to use for connection.", (uchar**) &opt_mysql_port,
(gptr*) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, (uchar**) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
0}, 0},
#ifdef __WIN__ #ifdef __WIN__
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG, {"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG,
@ -200,19 +201,19 @@ static struct my_option my_long_options[] =
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#ifdef HAVE_SMEM #ifdef HAVE_SMEM
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME, {"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
"Base name of shared memory.", (gptr*) &shared_memory_base_name, (gptr*) &shared_memory_base_name, "Base name of shared memory.", (uchar**) &shared_memory_base_name, (uchar**) &shared_memory_base_name,
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
{"show-table-type", 't', "Show table type column.", {"show-table-type", 't', "Show table type column.",
(gptr*) &opt_table_type, (gptr*) &opt_table_type, 0, GET_BOOL, (uchar**) &opt_table_type, (uchar**) &opt_table_type, 0, GET_BOOL,
NO_ARG, 0, 0, 0, 0, 0, 0}, NO_ARG, 0, 0, 0, 0, 0, 0},
{"socket", 'S', "Socket file to use for connection.", {"socket", 'S', "Socket file to use for connection.",
(gptr*) &opt_mysql_unix_port, (gptr*) &opt_mysql_unix_port, 0, GET_STR, (uchar**) &opt_mysql_unix_port, (uchar**) &opt_mysql_unix_port, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#include <sslopt-longopts.h> #include <sslopt-longopts.h>
#ifndef DONT_ALLOW_USER_CHANGE #ifndef DONT_ALLOW_USER_CHANGE
{"user", 'u', "User for login if not current user.", (gptr*) &user, {"user", 'u', "User for login if not current user.", (uchar**) &user,
(gptr*) &user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
{"verbose", 'v', {"verbose", 'v',
"More verbose output; You can use this multiple times to get even more verbose output.", "More verbose output; You can use this multiple times to get even more verbose output.",
@ -733,7 +734,7 @@ print_header(const char *header,uint head_length,...)
for (i=0 ; i < length+2 ; i++) for (i=0 ; i < length+2 ; i++)
putchar('-'); putchar('-');
putchar('+'); putchar('+');
if (!(field=va_arg(args,my_string))) if (!(field=va_arg(args,char *)))
break; break;
length=va_arg(args,uint); length=va_arg(args,uint);
} }
@ -757,7 +758,7 @@ print_header(const char *header,uint head_length,...)
for (i=0 ; i < length ; i++) for (i=0 ; i < length ; i++)
putchar(' '); putchar(' ');
putchar('|'); putchar('|');
if (!(field=va_arg(args,my_string))) if (!(field=va_arg(args,char *)))
break; break;
length=va_arg(args,uint); length=va_arg(args,uint);
} }
@ -772,7 +773,7 @@ print_header(const char *header,uint head_length,...)
for (i=0 ; i < length+2 ; i++) for (i=0 ; i < length+2 ; i++)
putchar('-'); putchar('-');
putchar('+'); putchar('+');
if (!(field=va_arg(args,my_string))) if (!(field=va_arg(args,char *)))
break; break;
length=va_arg(args,uint); length=va_arg(args,uint);
} }
@ -798,7 +799,7 @@ print_row(const char *header,uint head_length,...)
field_length=(uint) strlen(field); field_length=(uint) strlen(field);
for (i=field_length ; i <= length ; i++) for (i=field_length ; i <= length ; i++)
putchar(' '); putchar(' ');
if (!(field=va_arg(args,my_string))) if (!(field=va_arg(args,char *)))
break; break;
length=va_arg(args,uint); length=va_arg(args,uint);
} }

View File

@ -387,9 +387,9 @@ int main(int argc, char **argv)
/* now free all the strings we created */ /* now free all the strings we created */
if (opt_password) if (opt_password)
my_free((gptr)opt_password, MYF(0)); my_free(opt_password, MYF(0));
my_free((gptr)concurrency, MYF(0)); my_free(concurrency, MYF(0));
statement_cleanup(create_statements); statement_cleanup(create_statements);
statement_cleanup(query_statements); statement_cleanup(query_statements);
@ -399,7 +399,7 @@ int main(int argc, char **argv)
#ifdef HAVE_SMEM #ifdef HAVE_SMEM
if (shared_memory_base_name) if (shared_memory_base_name)
my_free((gptr)shared_memory_base_name, MYF(MY_ALLOW_ZERO_PTR)); my_free(shared_memory_base_name, MYF(MY_ALLOW_ZERO_PTR));
#endif #endif
free_defaults(defaults_argv); free_defaults(defaults_argv);
my_end(0); my_end(0);
@ -473,7 +473,7 @@ void concurrency_loop(MYSQL *mysql, uint current, option_string *eptr)
if (opt_csv_str) if (opt_csv_str)
print_conclusions_csv(&conclusion); print_conclusions_csv(&conclusion);
my_free((gptr)head_sptr, MYF(0)); my_free(head_sptr, MYF(0));
} }
@ -484,94 +484,94 @@ static struct my_option my_long_options[] =
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{"auto-generate-sql", 'a', {"auto-generate-sql", 'a',
"Generate SQL where not supplied by file or command line.", "Generate SQL where not supplied by file or command line.",
(gptr*) &auto_generate_sql, (gptr*) &auto_generate_sql, (uchar**) &auto_generate_sql, (uchar**) &auto_generate_sql,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"auto-generate-sql-add-autoincrement", OPT_SLAP_AUTO_GENERATE_ADD_AUTO, {"auto-generate-sql-add-autoincrement", OPT_SLAP_AUTO_GENERATE_ADD_AUTO,
"Add autoincrement to auto-generated tables.", "Add autoincrement to auto-generated tables.",
(gptr*) &auto_generate_sql_autoincrement, (uchar**) &auto_generate_sql_autoincrement,
(gptr*) &auto_generate_sql_autoincrement, (uchar**) &auto_generate_sql_autoincrement,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"auto-generate-sql-execute-number", OPT_SLAP_AUTO_GENERATE_EXECUTE_QUERIES, {"auto-generate-sql-execute-number", OPT_SLAP_AUTO_GENERATE_EXECUTE_QUERIES,
"Set this number to generate a set number of queries to run.\n", "Set this number to generate a set number of queries to run.\n",
(gptr*) &auto_actual_queries, (gptr*) &auto_actual_queries, (uchar**) &auto_actual_queries, (uchar**) &auto_actual_queries,
0, GET_ULL, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_ULL, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"auto-generate-sql-guid-primary", OPT_SLAP_AUTO_GENERATE_GUID_PRIMARY, {"auto-generate-sql-guid-primary", OPT_SLAP_AUTO_GENERATE_GUID_PRIMARY,
"Add GUID based primary keys to auto-generated tables.", "Add GUID based primary keys to auto-generated tables.",
(gptr*) &auto_generate_sql_guid_primary, (uchar**) &auto_generate_sql_guid_primary,
(gptr*) &auto_generate_sql_guid_primary, (uchar**) &auto_generate_sql_guid_primary,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"auto-generate-sql-load-type", OPT_SLAP_AUTO_GENERATE_SQL_LOAD_TYPE, {"auto-generate-sql-load-type", OPT_SLAP_AUTO_GENERATE_SQL_LOAD_TYPE,
"Load types are mixed, update, write, key, or read. Default is mixed\n", "Load types are mixed, update, write, key, or read. Default is mixed\n",
(gptr*) &auto_generate_sql_type, (gptr*) &auto_generate_sql_type, (uchar**) &auto_generate_sql_type, (uchar**) &auto_generate_sql_type,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"auto-generate-sql-secondary-indexes", {"auto-generate-sql-secondary-indexes",
OPT_SLAP_AUTO_GENERATE_SECONDARY_INDEXES, OPT_SLAP_AUTO_GENERATE_SECONDARY_INDEXES,
"Number of secondary indexes to add auto-generated tables.", "Number of secondary indexes to add auto-generated tables.",
(gptr*) &auto_generate_sql_secondary_indexes, (uchar**) &auto_generate_sql_secondary_indexes,
(gptr*) &auto_generate_sql_secondary_indexes, 0, (uchar**) &auto_generate_sql_secondary_indexes, 0,
GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"auto-generate-sql-unique-query-number", {"auto-generate-sql-unique-query-number",
OPT_SLAP_AUTO_GENERATE_UNIQUE_QUERY_NUM, OPT_SLAP_AUTO_GENERATE_UNIQUE_QUERY_NUM,
"Number of unique queries auto tests", "Number of unique queries auto tests",
(gptr*) &auto_generate_sql_unique_query_number, (uchar**) &auto_generate_sql_unique_query_number,
(gptr*) &auto_generate_sql_unique_query_number, (uchar**) &auto_generate_sql_unique_query_number,
0, GET_ULL, REQUIRED_ARG, 10, 0, 0, 0, 0, 0}, 0, GET_ULL, REQUIRED_ARG, 10, 0, 0, 0, 0, 0},
{"auto-generate-sql-unique-write-number", {"auto-generate-sql-unique-write-number",
OPT_SLAP_AUTO_GENERATE_UNIQUE_WRITE_NUM, OPT_SLAP_AUTO_GENERATE_UNIQUE_WRITE_NUM,
"Number of unique queries for auto-generate-sql-write-number", "Number of unique queries for auto-generate-sql-write-number",
(gptr*) &auto_generate_sql_unique_write_number, (uchar**) &auto_generate_sql_unique_write_number,
(gptr*) &auto_generate_sql_unique_write_number, (uchar**) &auto_generate_sql_unique_write_number,
0, GET_ULL, REQUIRED_ARG, 10, 0, 0, 0, 0, 0}, 0, GET_ULL, REQUIRED_ARG, 10, 0, 0, 0, 0, 0},
{"auto-generate-sql-write-number", OPT_SLAP_AUTO_GENERATE_WRITE_NUM, {"auto-generate-sql-write-number", OPT_SLAP_AUTO_GENERATE_WRITE_NUM,
"Number of rows to insert to used in read and write loads (default is 100).\n", "Number of rows to insert to used in read and write loads (default is 100).\n",
(gptr*) &auto_generate_sql_number, (gptr*) &auto_generate_sql_number, (uchar**) &auto_generate_sql_number, (uchar**) &auto_generate_sql_number,
0, GET_ULL, REQUIRED_ARG, 100, 0, 0, 0, 0, 0}, 0, GET_ULL, REQUIRED_ARG, 100, 0, 0, 0, 0, 0},
{"compress", 'C', "Use compression in server/client protocol.", {"compress", 'C', "Use compression in server/client protocol.",
(gptr*) &opt_compress, (gptr*) &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0, (uchar**) &opt_compress, (uchar**) &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0,
0, 0, 0}, 0, 0, 0},
{"concurrency", 'c', "Number of clients to simulate for query to run.", {"concurrency", 'c', "Number of clients to simulate for query to run.",
(gptr*) &concurrency_str, (gptr*) &concurrency_str, 0, GET_STR, (uchar**) &concurrency_str, (uchar**) &concurrency_str, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"create", OPT_SLAP_CREATE_STRING, "File or string to use create tables.", {"create", OPT_SLAP_CREATE_STRING, "File or string to use create tables.",
(gptr*) &create_string, (gptr*) &create_string, 0, GET_STR, REQUIRED_ARG, (uchar**) &create_string, (uchar**) &create_string, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{"create-schema", OPT_CREATE_SLAP_SCHEMA, "Schema to run tests in.", {"create-schema", OPT_CREATE_SLAP_SCHEMA, "Schema to run tests in.",
(gptr*) &create_schema_string, (gptr*) &create_schema_string, 0, GET_STR, (uchar**) &create_schema_string, (uchar**) &create_schema_string, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"csv", OPT_SLAP_CSV, {"csv", OPT_SLAP_CSV,
"Generate CSV output to named file or to stdout if no file is named.", "Generate CSV output to named file or to stdout if no file is named.",
(gptr*) &opt_csv_str, (gptr*) &opt_csv_str, 0, GET_STR, (uchar**) &opt_csv_str, (uchar**) &opt_csv_str, 0, GET_STR,
OPT_ARG, 0, 0, 0, 0, 0, 0}, OPT_ARG, 0, 0, 0, 0, 0, 0},
{"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.", {"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.",
(gptr*) &default_dbug_option, (gptr*) &default_dbug_option, 0, GET_STR, (uchar**) &default_dbug_option, (uchar**) &default_dbug_option, 0, GET_STR,
OPT_ARG, 0, 0, 0, 0, 0, 0}, OPT_ARG, 0, 0, 0, 0, 0, 0},
{"delimiter", 'F', {"delimiter", 'F',
"Delimiter to use in SQL statements supplied in file or command line.", "Delimiter to use in SQL statements supplied in file or command line.",
(gptr*) &delimiter, (gptr*) &delimiter, 0, GET_STR, REQUIRED_ARG, (uchar**) &delimiter, (uchar**) &delimiter, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{"engine", 'e', "Storage engine to use for creating the table.", {"engine", 'e', "Storage engine to use for creating the table.",
(gptr*) &default_engine, (gptr*) &default_engine, 0, (uchar**) &default_engine, (uchar**) &default_engine, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"host", 'h', "Connect to host.", (gptr*) &host, (gptr*) &host, 0, GET_STR, {"host", 'h', "Connect to host.", (uchar**) &host, (uchar**) &host, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"iterations", 'i', "Number of times too run the tests.", (gptr*) &iterations, {"iterations", 'i', "Number of times too run the tests.", (uchar**) &iterations,
(gptr*) &iterations, 0, GET_UINT, REQUIRED_ARG, 1, 0, 0, 0, 0, 0}, (uchar**) &iterations, 0, GET_UINT, REQUIRED_ARG, 1, 0, 0, 0, 0, 0},
{"number-char-cols", 'x', {"number-char-cols", 'x',
"Number of VARCHAR columns to create table with if specifying --auto-generate-sql ", "Number of VARCHAR columns to create table with if specifying --auto-generate-sql ",
(gptr*) &num_char_cols_opt, (gptr*) &num_char_cols_opt, 0, GET_STR, REQUIRED_ARG, (uchar**) &num_char_cols_opt, (uchar**) &num_char_cols_opt, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{"number-int-cols", 'y', {"number-int-cols", 'y',
"Number of INT columns to create table with if specifying --auto-generate-sql.", "Number of INT columns to create table with if specifying --auto-generate-sql.",
(gptr*) &num_int_cols_opt, (gptr*) &num_int_cols_opt, 0, GET_STR, REQUIRED_ARG, (uchar**) &num_int_cols_opt, (uchar**) &num_int_cols_opt, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{"number-of-queries", OPT_MYSQL_NUMBER_OF_QUERY, {"number-of-queries", OPT_MYSQL_NUMBER_OF_QUERY,
"Limit each client to this number of queries (this is not exact).", "Limit each client to this number of queries (this is not exact).",
(gptr*) &num_of_query, (gptr*) &num_of_query, 0, (uchar**) &num_of_query, (uchar**) &num_of_query, 0,
GET_ULL, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, GET_ULL, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"only-print", OPT_MYSQL_ONLY_PRINT, {"only-print", OPT_MYSQL_ONLY_PRINT,
"This causes mysqlslap to not connect to the databases, but instead print " "This causes mysqlslap to not connect to the databases, but instead print "
"out what it would have done instead.", "out what it would have done instead.",
(gptr*) &opt_only_print, (gptr*) &opt_only_print, 0, GET_BOOL, NO_ARG, (uchar**) &opt_only_print, (uchar**) &opt_only_print, 0, GET_BOOL, NO_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{"password", 'p', {"password", 'p',
"Password to use when connecting to server. If password is not given it's " "Password to use when connecting to server. If password is not given it's "
@ -580,50 +580,50 @@ static struct my_option my_long_options[] =
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG, {"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0}, NO_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
{"port", 'P', "Port number to use for connection.", (gptr*) &opt_mysql_port, {"port", 'P', "Port number to use for connection.", (uchar**) &opt_mysql_port,
(gptr*) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, MYSQL_PORT, 0, 0, 0, 0, (uchar**) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, MYSQL_PORT, 0, 0, 0, 0,
0}, 0},
{"post-query", OPT_SLAP_POST_QUERY, {"post-query", OPT_SLAP_POST_QUERY,
"Query to run or file containing query to run after executing.", "Query to run or file containing query to run after executing.",
(gptr*) &user_supplied_post_statements, (uchar**) &user_supplied_post_statements,
(gptr*) &user_supplied_post_statements, (uchar**) &user_supplied_post_statements,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"pre-query", OPT_SLAP_PRE_QUERY, {"pre-query", OPT_SLAP_PRE_QUERY,
"Query to run or file containing query to run before executing.", "Query to run or file containing query to run before executing.",
(gptr*) &user_supplied_pre_statements, (uchar**) &user_supplied_pre_statements,
(gptr*) &user_supplied_pre_statements, (uchar**) &user_supplied_pre_statements,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"preserve-schema", OPT_MYSQL_PRESERVE_SCHEMA, {"preserve-schema", OPT_MYSQL_PRESERVE_SCHEMA,
"Preserve the schema from the mysqlslap run, this happens unless " "Preserve the schema from the mysqlslap run, this happens unless "
"--auto-generate-sql or --create are used.", "--auto-generate-sql or --create are used.",
(gptr*) &opt_preserve, (gptr*) &opt_preserve, 0, GET_BOOL, (uchar**) &opt_preserve, (uchar**) &opt_preserve, 0, GET_BOOL,
NO_ARG, TRUE, 0, 0, 0, 0, 0}, NO_ARG, TRUE, 0, 0, 0, 0, 0},
{"protocol", OPT_MYSQL_PROTOCOL, {"protocol", OPT_MYSQL_PROTOCOL,
"The protocol of connection (tcp,socket,pipe,memory).", "The protocol of connection (tcp,socket,pipe,memory).",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"query", 'q', "Query to run or file containing query to run.", {"query", 'q', "Query to run or file containing query to run.",
(gptr*) &user_supplied_query, (gptr*) &user_supplied_query, (uchar**) &user_supplied_query, (uchar**) &user_supplied_query,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#ifdef HAVE_SMEM #ifdef HAVE_SMEM
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME, {"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
"Base name of shared memory.", (gptr*) &shared_memory_base_name, "Base name of shared memory.", (uchar**) &shared_memory_base_name,
(gptr*) &shared_memory_base_name, 0, GET_STR_ALLOC, REQUIRED_ARG, (uchar**) &shared_memory_base_name, 0, GET_STR_ALLOC, REQUIRED_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
#endif #endif
{"silent", 's', "Run program in silent mode - no output.", {"silent", 's', "Run program in silent mode - no output.",
(gptr*) &opt_silent, (gptr*) &opt_silent, 0, GET_BOOL, NO_ARG, (uchar**) &opt_silent, (uchar**) &opt_silent, 0, GET_BOOL, NO_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{"socket", 'S', "Socket file to use for connection.", {"socket", 'S', "Socket file to use for connection.",
(gptr*) &opt_mysql_unix_port, (gptr*) &opt_mysql_unix_port, 0, GET_STR, (uchar**) &opt_mysql_unix_port, (uchar**) &opt_mysql_unix_port, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#include <sslopt-longopts.h> #include <sslopt-longopts.h>
#ifndef DONT_ALLOW_USER_CHANGE #ifndef DONT_ALLOW_USER_CHANGE
{"user", 'u', "User for login if not current user.", (gptr*) &user, {"user", 'u', "User for login if not current user.", (uchar**) &user,
(gptr*) &user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
{"verbose", 'v', {"verbose", 'v',
"More verbose output; You can use this multiple times to get even more " "More verbose output; You can use this multiple times to get even more "
"verbose output.", (gptr*) &verbose, (gptr*) &verbose, 0, "verbose output.", (uchar**) &verbose, (uchar**) &verbose, 0,
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"version", 'V', "Output version information and exit.", 0, 0, 0, GET_NO_ARG, {"version", 'V', "Output version information and exit.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0}, NO_ARG, 0, 0, 0, 0, 0, 0},
@ -673,7 +673,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
if (argument) if (argument)
{ {
char *start= argument; char *start= argument;
my_free((gptr)opt_password, MYF(MY_ALLOW_ZERO_PTR)); my_free(opt_password, MYF(MY_ALLOW_ZERO_PTR));
opt_password= my_strdup(argument,MYF(MY_FAE)); opt_password= my_strdup(argument,MYF(MY_FAE));
while (*argument) *argument++= 'x'; /* Destroy argument */ while (*argument) *argument++= 'x'; /* Destroy argument */
if (*start) if (*start)
@ -1312,7 +1312,7 @@ get_options(int *argc,char ***argv)
tmp_string[sbuf.st_size]= '\0'; tmp_string[sbuf.st_size]= '\0';
my_close(data_file,MYF(0)); my_close(data_file,MYF(0));
parse_delimiter(tmp_string, &create_statements, delimiter[0]); parse_delimiter(tmp_string, &create_statements, delimiter[0]);
my_free((gptr)tmp_string, MYF(0)); my_free(tmp_string, MYF(0));
} }
else if (create_string) else if (create_string)
{ {
@ -1341,7 +1341,7 @@ get_options(int *argc,char ***argv)
if (user_supplied_query) if (user_supplied_query)
actual_queries= parse_delimiter(tmp_string, &query_statements, actual_queries= parse_delimiter(tmp_string, &query_statements,
delimiter[0]); delimiter[0]);
my_free((gptr)tmp_string, MYF(0)); my_free(tmp_string, MYF(0));
} }
else if (user_supplied_query) else if (user_supplied_query)
{ {
@ -1372,11 +1372,12 @@ get_options(int *argc,char ***argv)
if (user_supplied_pre_statements) if (user_supplied_pre_statements)
actual_queries= parse_delimiter(tmp_string, &pre_statements, actual_queries= parse_delimiter(tmp_string, &pre_statements,
delimiter[0]); delimiter[0]);
my_free((gptr)tmp_string, MYF(0)); my_free(tmp_string, MYF(0));
} }
else if (user_supplied_pre_statements) else if (user_supplied_pre_statements)
{ {
actual_queries= parse_delimiter(user_supplied_pre_statements, &pre_statements, actual_queries= parse_delimiter(user_supplied_pre_statements,
&pre_statements,
delimiter[0]); delimiter[0]);
} }
@ -1402,7 +1403,7 @@ get_options(int *argc,char ***argv)
if (user_supplied_post_statements) if (user_supplied_post_statements)
parse_delimiter(tmp_string, &post_statements, parse_delimiter(tmp_string, &post_statements,
delimiter[0]); delimiter[0]);
my_free((gptr)tmp_string, MYF(0)); my_free(tmp_string, MYF(0));
} }
else if (user_supplied_post_statements) else if (user_supplied_post_statements)
{ {
@ -1499,9 +1500,9 @@ drop_primary_key_list(void)
if (primary_keys_number_of) if (primary_keys_number_of)
{ {
for (counter= 0; counter < primary_keys_number_of; counter++) for (counter= 0; counter < primary_keys_number_of; counter++)
my_free((gptr)primary_keys[counter], MYF(0)); my_free(primary_keys[counter], MYF(0));
my_free((gptr)primary_keys, MYF(0)); my_free(primary_keys, MYF(0));
} }
return 0; return 0;
@ -2080,10 +2081,10 @@ option_cleanup(option_string *stmt)
{ {
nptr= ptr->next; nptr= ptr->next;
if (ptr->string) if (ptr->string)
my_free((gptr)ptr->string, MYF(0)); my_free(ptr->string, MYF(0));
if (ptr->option) if (ptr->option)
my_free((gptr)ptr->option, MYF(0)); my_free(ptr->option, MYF(0));
my_free((gptr)(byte *)ptr, MYF(0)); my_free(ptr, MYF(0));
} }
} }
@ -2098,7 +2099,7 @@ statement_cleanup(statement *stmt)
{ {
nptr= ptr->next; nptr= ptr->next;
if (ptr->string) if (ptr->string)
my_free((gptr)ptr->string, MYF(0)); my_free(ptr->string, MYF(0));
my_free((gptr)(byte *)ptr, MYF(0)); my_free(ptr, MYF(0));
} }
} }

View File

@ -747,7 +747,7 @@ void close_files()
DBUG_PRINT("info", ("closing file: %s", cur_file->file_name)); DBUG_PRINT("info", ("closing file: %s", cur_file->file_name));
my_fclose(cur_file->file, MYF(0)); my_fclose(cur_file->file, MYF(0));
} }
my_free((gptr)cur_file->file_name, MYF(MY_ALLOW_ZERO_PTR)); my_free((uchar*) cur_file->file_name, MYF(MY_ALLOW_ZERO_PTR));
cur_file->file_name= 0; cur_file->file_name= 0;
} }
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
@ -766,8 +766,8 @@ void free_used_memory()
for (i= 0 ; i < q_lines.elements ; i++) for (i= 0 ; i < q_lines.elements ; i++)
{ {
struct st_command **q= dynamic_element(&q_lines, i, struct st_command**); struct st_command **q= dynamic_element(&q_lines, i, struct st_command**);
my_free((gptr) (*q)->query_buf,MYF(MY_ALLOW_ZERO_PTR)); my_free((*q)->query_buf,MYF(MY_ALLOW_ZERO_PTR));
my_free((gptr) (*q),MYF(0)); my_free((*q),MYF(0));
} }
for (i= 0; i < 10; i++) for (i= 0; i < 10; i++)
{ {
@ -1014,7 +1014,7 @@ int dyn_string_cmp(DYNAMIC_STRING* ds, const char *fname)
if (!eval_result && (uint) stat_info.st_size != ds->length) if (!eval_result && (uint) stat_info.st_size != ds->length)
{ {
DBUG_PRINT("info",("Size differs: result size: %u file size: %lu", DBUG_PRINT("info",("Size differs: result size: %u file size: %lu",
ds->length, (ulong) stat_info.st_size)); (uint) ds->length, (ulong) stat_info.st_size));
DBUG_PRINT("info",("result: '%s'", ds->str)); DBUG_PRINT("info",("result: '%s'", ds->str));
DBUG_RETURN(RESULT_LENGTH_MISMATCH); DBUG_RETURN(RESULT_LENGTH_MISMATCH);
} }
@ -1023,7 +1023,7 @@ int dyn_string_cmp(DYNAMIC_STRING* ds, const char *fname)
if ((fd = my_open(eval_file, O_RDONLY, MYF(MY_WME))) < 0) if ((fd = my_open(eval_file, O_RDONLY, MYF(MY_WME))) < 0)
die("Failed to open file %s", eval_file); die("Failed to open file %s", eval_file);
if (my_read(fd, (byte*)tmp, stat_info.st_size, MYF(MY_WME|MY_NABP))) if (my_read(fd, (uchar*)tmp, stat_info.st_size, MYF(MY_WME|MY_NABP)))
die("Failed to read from file %s, errno: %d", eval_file, errno); die("Failed to read from file %s, errno: %d", eval_file, errno);
tmp[stat_info.st_size] = 0; tmp[stat_info.st_size] = 0;
init_dynamic_string(&res_ds, "", stat_info.st_size+256, 256); init_dynamic_string(&res_ds, "", stat_info.st_size+256, 256);
@ -1054,7 +1054,7 @@ err:
res_ptr, res_len); res_ptr, res_len);
dynstr_free(&res_ds); dynstr_free(&res_ds);
my_free((gptr) tmp, MYF(0)); my_free(tmp, MYF(0));
my_close(fd, MYF(MY_WME)); my_close(fd, MYF(MY_WME));
DBUG_RETURN(res); DBUG_RETURN(res);
@ -1171,13 +1171,13 @@ static void strip_parentheses(struct st_command *command)
} }
static byte *get_var_key(const byte* var, uint* len, static uchar *get_var_key(const uchar* var, size_t *len,
my_bool __attribute__((unused)) t) my_bool __attribute__((unused)) t)
{ {
register char* key; register char* key;
key = ((VAR*)var)->name; key = ((VAR*)var)->name;
*len = ((VAR*)var)->name_len; *len = ((VAR*)var)->name_len;
return (byte*)key; return (uchar*)key;
} }
@ -1221,7 +1221,7 @@ void var_free(void *v)
{ {
my_free(((VAR*) v)->str_val, MYF(MY_WME)); my_free(((VAR*) v)->str_val, MYF(MY_WME));
if (((VAR*)v)->alloced) if (((VAR*)v)->alloced)
my_free((char*) v, MYF(MY_WME)); my_free(v, MYF(MY_WME));
} }
@ -1233,7 +1233,7 @@ VAR* var_from_env(const char *name, const char *def_val)
tmp = def_val; tmp = def_val;
v = var_init(0, name, strlen(name), tmp, strlen(tmp)); v = var_init(0, name, strlen(name), tmp, strlen(tmp));
my_hash_insert(&var_hash, (byte*)v); my_hash_insert(&var_hash, (uchar*)v);
return v; return v;
} }
@ -1266,7 +1266,8 @@ VAR* var_get(const char *var_name, const char **var_name_end, my_bool raw,
if (length >= MAX_VAR_NAME_LENGTH) if (length >= MAX_VAR_NAME_LENGTH)
die("Too long variable name: %s", save_var_name); die("Too long variable name: %s", save_var_name);
if (!(v = (VAR*) hash_search(&var_hash, save_var_name, length))) if (!(v = (VAR*) hash_search(&var_hash, (const uchar*) save_var_name,
length)))
{ {
char buff[MAX_VAR_NAME_LENGTH+1]; char buff[MAX_VAR_NAME_LENGTH+1];
strmake(buff, save_var_name, length); strmake(buff, save_var_name, length);
@ -1297,10 +1298,10 @@ err:
VAR *var_obtain(const char *name, int len) VAR *var_obtain(const char *name, int len)
{ {
VAR* v; VAR* v;
if ((v = (VAR*)hash_search(&var_hash, name, len))) if ((v = (VAR*)hash_search(&var_hash, (const uchar *) name, len)))
return v; return v;
v = var_init(0, name, len, "", 0); v = var_init(0, name, len, "", 0);
my_hash_insert(&var_hash, (byte*)v); my_hash_insert(&var_hash, (uchar*)v);
return v; return v;
} }
@ -1352,7 +1353,7 @@ void var_set(const char *var_name, const char *var_name_end,
if (!(v->env_s= my_strdup(buf, MYF(MY_WME)))) if (!(v->env_s= my_strdup(buf, MYF(MY_WME))))
die("Out of memory"); die("Out of memory");
putenv(v->env_s); putenv(v->env_s);
my_free((gptr)old_env_s, MYF(MY_ALLOW_ZERO_PTR)); my_free(old_env_s, MYF(MY_ALLOW_ZERO_PTR));
} }
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
@ -1802,9 +1803,10 @@ FILE* my_popen(DYNAMIC_STRING *ds_cmd, const char *mode)
static void init_builtin_echo(void) static void init_builtin_echo(void)
{ {
#ifdef __WIN__ #ifdef __WIN__
size_t echo_length;
/* Look for "echo.exe" in same dir as mysqltest was started from */ /* Look for "echo.exe" in same dir as mysqltest was started from */
dirname_part(builtin_echo, my_progname); dirname_part(builtin_echo, my_progname, &echo_length);
fn_format(builtin_echo, ".\\echo.exe", fn_format(builtin_echo, ".\\echo.exe",
builtin_echo, "", MYF(MY_REPLACE_DIR)); builtin_echo, "", MYF(MY_REPLACE_DIR));
@ -2276,8 +2278,8 @@ void read_until_delimiter(DYNAMIC_STRING *ds,
{ {
char c; char c;
DBUG_ENTER("read_until_delimiter"); DBUG_ENTER("read_until_delimiter");
DBUG_PRINT("enter", ("delimiter: %s, length: %d", DBUG_PRINT("enter", ("delimiter: %s, length: %u",
ds_delimiter->str, ds_delimiter->length)); ds_delimiter->str, (uint) ds_delimiter->length));
if (ds_delimiter->length > MAX_DELIMITER_LENGTH) if (ds_delimiter->length > MAX_DELIMITER_LENGTH)
die("Max delimiter length(%d) exceeded", MAX_DELIMITER_LENGTH); die("Max delimiter length(%d) exceeded", MAX_DELIMITER_LENGTH);
@ -2435,7 +2437,7 @@ void do_cat_file(struct st_command *command)
if ((fd= my_open(ds_filename.str, O_RDONLY, MYF(0))) < 0) if ((fd= my_open(ds_filename.str, O_RDONLY, MYF(0))) < 0)
die("Failed to open file %s", ds_filename.str); die("Failed to open file %s", ds_filename.str);
while((len= my_read(fd, (byte*)&buff, while((len= my_read(fd, (uchar*)&buff,
sizeof(buff), MYF(0))) > 0) sizeof(buff), MYF(0))) > 0)
{ {
char *p= buff, *start= buff; char *p= buff, *start= buff;
@ -2503,10 +2505,10 @@ void do_diff_files(struct st_command *command)
my_close(fd, MYF(0)); my_close(fd, MYF(0));
die("Failed to open second file %s", ds_filename2.str); die("Failed to open second file %s", ds_filename2.str);
} }
while((len= my_read(fd, (byte*)&buff, while((len= my_read(fd, (uchar*)&buff,
sizeof(buff), MYF(0))) > 0) sizeof(buff), MYF(0))) > 0)
{ {
if ((len2= my_read(fd2, (byte*)&buff2, if ((len2= my_read(fd2, (uchar*)&buff2,
sizeof(buff2), MYF(0))) != len) sizeof(buff2), MYF(0))) != len)
{ {
/* File 2 was smaller */ /* File 2 was smaller */
@ -2520,7 +2522,7 @@ void do_diff_files(struct st_command *command)
break; break;
} }
} }
if (my_read(fd2, (byte*)&buff2, if (my_read(fd2, (uchar*)&buff2,
sizeof(buff2), MYF(0)) > 0) sizeof(buff2), MYF(0)) > 0)
{ {
/* File 1 was smaller */ /* File 1 was smaller */
@ -3994,7 +3996,7 @@ int read_line(char *buf, int size)
my_fclose(cur_file->file, MYF(0)); my_fclose(cur_file->file, MYF(0));
cur_file->file= 0; cur_file->file= 0;
} }
my_free((gptr)cur_file->file_name, MYF(MY_ALLOW_ZERO_PTR)); my_free((uchar*) cur_file->file_name, MYF(MY_ALLOW_ZERO_PTR));
cur_file->file_name= 0; cur_file->file_name= 0;
if (cur_file == file_stack) if (cur_file == file_stack)
{ {
@ -4347,13 +4349,13 @@ int read_command(struct st_command** command_ptr)
if (parser.current_line < parser.read_lines) if (parser.current_line < parser.read_lines)
{ {
get_dynamic(&q_lines, (gptr) command_ptr, parser.current_line) ; get_dynamic(&q_lines, (uchar*) command_ptr, parser.current_line) ;
DBUG_RETURN(0); DBUG_RETURN(0);
} }
if (!(*command_ptr= command= if (!(*command_ptr= command=
(struct st_command*) my_malloc(sizeof(*command), (struct st_command*) my_malloc(sizeof(*command),
MYF(MY_WME|MY_ZEROFILL))) || MYF(MY_WME|MY_ZEROFILL))) ||
insert_dynamic(&q_lines, (gptr) &command)) insert_dynamic(&q_lines, (uchar*) &command))
die(NullS); die(NullS);
command->type= Q_UNKNOWN; command->type= Q_UNKNOWN;
@ -4404,18 +4406,18 @@ static struct my_option my_long_options[] =
{ {
{"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, {"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{"basedir", 'b', "Basedir for tests.", (gptr*) &opt_basedir, {"basedir", 'b', "Basedir for tests.", (uchar**) &opt_basedir,
(gptr*) &opt_basedir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &opt_basedir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"character-sets-dir", OPT_CHARSETS_DIR, {"character-sets-dir", OPT_CHARSETS_DIR,
"Directory where character sets are.", (gptr*) &opt_charsets_dir, "Directory where character sets are.", (uchar**) &opt_charsets_dir,
(gptr*) &opt_charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &opt_charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"compress", 'C', "Use the compressed server/client protocol.", {"compress", 'C', "Use the compressed server/client protocol.",
(gptr*) &opt_compress, (gptr*) &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0, (uchar**) &opt_compress, (uchar**) &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0,
0, 0, 0}, 0, 0, 0},
{"cursor-protocol", OPT_CURSOR_PROTOCOL, "Use cursors for prepared statements.", {"cursor-protocol", OPT_CURSOR_PROTOCOL, "Use cursors for prepared statements.",
(gptr*) &cursor_protocol, (gptr*) &cursor_protocol, 0, (uchar**) &cursor_protocol, (uchar**) &cursor_protocol, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"database", 'D', "Database to use.", (gptr*) &opt_db, (gptr*) &opt_db, 0, {"database", 'D', "Database to use.", (uchar**) &opt_db, (uchar**) &opt_db, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#ifdef DBUG_OFF #ifdef DBUG_OFF
{"debug", '#', "This is a non-debug version. Catch this and exit", {"debug", '#', "This is a non-debug version. Catch this and exit",
@ -4424,51 +4426,51 @@ static struct my_option my_long_options[] =
{"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.", {"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.",
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
{"host", 'h', "Connect to host.", (gptr*) &opt_host, (gptr*) &opt_host, 0, {"host", 'h', "Connect to host.", (uchar**) &opt_host, (uchar**) &opt_host, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"include", 'i', "Include SQL before each test case.", (gptr*) &opt_include, {"include", 'i', "Include SQL before each test case.", (uchar**) &opt_include,
(gptr*) &opt_include, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &opt_include, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"logdir", OPT_LOG_DIR, "Directory for log files", (gptr*) &opt_logdir, {"logdir", OPT_LOG_DIR, "Directory for log files", (uchar**) &opt_logdir,
(gptr*) &opt_logdir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &opt_logdir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"mark-progress", OPT_MARK_PROGRESS, {"mark-progress", OPT_MARK_PROGRESS,
"Write linenumber and elapsed time to <testname>.progress ", "Write linenumber and elapsed time to <testname>.progress ",
(gptr*) &opt_mark_progress, (gptr*) &opt_mark_progress, 0, (uchar**) &opt_mark_progress, (uchar**) &opt_mark_progress, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"max-connect-retries", OPT_MAX_CONNECT_RETRIES, {"max-connect-retries", OPT_MAX_CONNECT_RETRIES,
"Max number of connection attempts when connecting to server", "Max number of connection attempts when connecting to server",
(gptr*) &opt_max_connect_retries, (gptr*) &opt_max_connect_retries, 0, (uchar**) &opt_max_connect_retries, (uchar**) &opt_max_connect_retries, 0,
GET_INT, REQUIRED_ARG, 500, 1, 10000, 0, 0, 0}, GET_INT, REQUIRED_ARG, 500, 1, 10000, 0, 0, 0},
{"password", 'p', "Password to use when connecting to server.", {"password", 'p', "Password to use when connecting to server.",
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
{"port", 'P', "Port number to use for connection.", (gptr*) &opt_port, {"port", 'P', "Port number to use for connection.", (uchar**) &opt_port,
(gptr*) &opt_port, 0, GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &opt_port, 0, GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"ps-protocol", OPT_PS_PROTOCOL, "Use prepared statements protocol for communication", {"ps-protocol", OPT_PS_PROTOCOL, "Use prepared statements protocol for communication",
(gptr*) &ps_protocol, (gptr*) &ps_protocol, 0, (uchar**) &ps_protocol, (uchar**) &ps_protocol, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"quiet", 's', "Suppress all normal output.", (gptr*) &silent, {"quiet", 's', "Suppress all normal output.", (uchar**) &silent,
(gptr*) &silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"record", 'r', "Record output of test_file into result file.", {"record", 'r', "Record output of test_file into result file.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"result-file", 'R', "Read/Store result from/in this file.", {"result-file", 'R', "Read/Store result from/in this file.",
(gptr*) &result_file_name, (gptr*) &result_file_name, 0, (uchar**) &result_file_name, (uchar**) &result_file_name, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"server-arg", 'A', "Send option value to embedded server as a parameter.", {"server-arg", 'A', "Send option value to embedded server as a parameter.",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"server-file", 'F', "Read embedded server arguments from file.", {"server-file", 'F', "Read embedded server arguments from file.",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"silent", 's', "Suppress all normal output. Synonym for --quiet.", {"silent", 's', "Suppress all normal output. Synonym for --quiet.",
(gptr*) &silent, (gptr*) &silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &silent, (uchar**) &silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"skip-safemalloc", OPT_SKIP_SAFEMALLOC, {"skip-safemalloc", OPT_SKIP_SAFEMALLOC,
"Don't use the memory allocation checking.", 0, 0, 0, GET_NO_ARG, NO_ARG, "Don't use the memory allocation checking.", 0, 0, 0, GET_NO_ARG, NO_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{"sleep", 'T', "Sleep always this many seconds on sleep commands.", {"sleep", 'T', "Sleep always this many seconds on sleep commands.",
(gptr*) &opt_sleep, (gptr*) &opt_sleep, 0, GET_INT, REQUIRED_ARG, -1, 0, 0, (uchar**) &opt_sleep, (uchar**) &opt_sleep, 0, GET_INT, REQUIRED_ARG, -1, 0, 0,
0, 0, 0}, 0, 0, 0},
{"socket", 'S', "Socket file to use for connection.", {"socket", 'S', "Socket file to use for connection.",
(gptr*) &unix_sock, (gptr*) &unix_sock, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, (uchar**) &unix_sock, (uchar**) &unix_sock, 0, GET_STR, REQUIRED_ARG, 0, 0, 0,
0, 0, 0}, 0, 0, 0},
{"sp-protocol", OPT_SP_PROTOCOL, "Use stored procedures for select", {"sp-protocol", OPT_SP_PROTOCOL, "Use stored procedures for select",
(gptr*) &sp_protocol, (gptr*) &sp_protocol, 0, (uchar**) &sp_protocol, (uchar**) &sp_protocol, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
#include "sslopt-longopts.h" #include "sslopt-longopts.h"
{"test-file", 'x', "Read test from/in this file (default stdin).", {"test-file", 'x', "Read test from/in this file (default stdin).",
@ -4477,14 +4479,14 @@ static struct my_option my_long_options[] =
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"tmpdir", 't', "Temporary directory where sockets are put.", {"tmpdir", 't', "Temporary directory where sockets are put.",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"user", 'u', "User for login.", (gptr*) &opt_user, (gptr*) &opt_user, 0, {"user", 'u', "User for login.", (uchar**) &opt_user, (uchar**) &opt_user, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"verbose", 'v', "Write more.", (gptr*) &verbose, (gptr*) &verbose, 0, {"verbose", 'v', "Write more.", (uchar**) &verbose, (uchar**) &verbose, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"version", 'V', "Output version information and exit.", {"version", 'V', "Output version information and exit.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"view-protocol", OPT_VIEW_PROTOCOL, "Use views for select", {"view-protocol", OPT_VIEW_PROTOCOL, "Use views for select",
(gptr*) &view_protocol, (gptr*) &view_protocol, 0, (uchar**) &view_protocol, (uchar**) &view_protocol, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
}; };
@ -4700,7 +4702,7 @@ void str_to_file2(const char *fname, char *str, int size, my_bool append)
die("Could not open %s: errno = %d", buff, errno); die("Could not open %s: errno = %d", buff, errno);
if (append && my_seek(fd, 0, SEEK_END, MYF(0)) == MY_FILEPOS_ERROR) if (append && my_seek(fd, 0, SEEK_END, MYF(0)) == MY_FILEPOS_ERROR)
die("Could not find end of file %s: errno = %d", buff, errno); die("Could not find end of file %s: errno = %d", buff, errno);
if (my_write(fd, (byte*)str, size, MYF(MY_WME|MY_FNABP))) if (my_write(fd, (uchar*)str, size, MYF(MY_WME|MY_FNABP)))
die("write failed"); die("write failed");
my_close(fd, MYF(0)); my_close(fd, MYF(0));
} }
@ -4817,7 +4819,7 @@ void init_win_path_patterns()
continue; continue;
} }
if (insert_dynamic(&patterns, (gptr) &p)) if (insert_dynamic(&patterns, (uchar*) &p))
die(NullS); die(NullS);
DBUG_PRINT("info", ("p: %s", p)); DBUG_PRINT("info", ("p: %s", p));
@ -4837,7 +4839,7 @@ void free_win_path_patterns()
for (i=0 ; i < patterns.elements ; i++) for (i=0 ; i < patterns.elements ; i++)
{ {
const char** pattern= dynamic_element(&patterns, i, const char**); const char** pattern= dynamic_element(&patterns, i, const char**);
my_free((gptr) *pattern, MYF(0)); my_free((char*) *pattern, MYF(0));
} }
delete_dynamic(&patterns); delete_dynamic(&patterns);
} }
@ -5019,12 +5021,12 @@ void append_stmt_result(DYNAMIC_STRING *ds, MYSQL_STMT *stmt,
for (i= 0; i < num_fields; i++) for (i= 0; i < num_fields; i++)
{ {
/* Free data for output */ /* Free data for output */
my_free((gptr)my_bind[i].buffer, MYF(MY_WME | MY_FAE)); my_free(my_bind[i].buffer, MYF(MY_WME | MY_FAE));
} }
/* Free array with bind structs, lengths and NULL flags */ /* Free array with bind structs, lengths and NULL flags */
my_free((gptr)my_bind , MYF(MY_WME | MY_FAE)); my_free(my_bind , MYF(MY_WME | MY_FAE));
my_free((gptr)length , MYF(MY_WME | MY_FAE)); my_free(length , MYF(MY_WME | MY_FAE));
my_free((gptr)is_null , MYF(MY_WME | MY_FAE)); my_free(is_null , MYF(MY_WME | MY_FAE));
} }
@ -6732,15 +6734,15 @@ void free_replace_column()
typedef struct st_pointer_array { /* when using array-strings */ typedef struct st_pointer_array { /* when using array-strings */
TYPELIB typelib; /* Pointer to strings */ TYPELIB typelib; /* Pointer to strings */
byte *str; /* Strings is here */ uchar *str; /* Strings is here */
int7 *flag; /* Flag about each var. */ int7 *flag; /* Flag about each var. */
uint array_allocs,max_count,length,max_length; uint array_allocs,max_count,length,max_length;
} POINTER_ARRAY; } POINTER_ARRAY;
struct st_replace; struct st_replace;
struct st_replace *init_replace(my_string *from, my_string *to, uint count, struct st_replace *init_replace(char * *from, char * *to, uint count,
my_string word_end_chars); char * word_end_chars);
int insert_pointer_name(reg1 POINTER_ARRAY *pa,my_string name); int insert_pointer_name(reg1 POINTER_ARRAY *pa,char * name);
void replace_strings_append(struct st_replace *rep, DYNAMIC_STRING* ds, void replace_strings_append(struct st_replace *rep, DYNAMIC_STRING* ds,
const char *from, int len); const char *from, int len);
void free_pointer_array(POINTER_ARRAY *pa); void free_pointer_array(POINTER_ARRAY *pa);
@ -6804,7 +6806,7 @@ void free_replace()
DBUG_ENTER("free_replace"); DBUG_ENTER("free_replace");
if (glob_replace) if (glob_replace)
{ {
my_free((char*) glob_replace,MYF(0)); my_free(glob_replace,MYF(0));
glob_replace=0; glob_replace=0;
} }
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
@ -7015,7 +7017,7 @@ struct st_replace_regex* init_replace_regex(char* expr)
reg.icase= 1; reg.icase= 1;
/* done parsing the statement, now place it in regex_arr */ /* done parsing the statement, now place it in regex_arr */
if (insert_dynamic(&res->regex_arr,(gptr) &reg)) if (insert_dynamic(&res->regex_arr,(uchar*) &reg))
die("Out of memory"); die("Out of memory");
} }
res->odd_buf_len= res->even_buf_len= 8192; res->odd_buf_len= res->even_buf_len= 8192;
@ -7026,7 +7028,7 @@ struct st_replace_regex* init_replace_regex(char* expr)
return res; return res;
err: err:
my_free((gptr)res,0); my_free(res,0);
die("Error parsing replace_regex \"%s\"", expr); die("Error parsing replace_regex \"%s\"", expr);
return 0; return 0;
} }
@ -7067,7 +7069,7 @@ int multi_reg_replace(struct st_replace_regex* r,char* val)
struct st_regex re; struct st_regex re;
char* save_out_buf= out_buf; char* save_out_buf= out_buf;
get_dynamic(&r->regex_arr,(gptr)&re,i); get_dynamic(&r->regex_arr,(uchar*)&re,i);
if (!reg_replace(&out_buf, buf_len_p, re.pattern, re.replace, if (!reg_replace(&out_buf, buf_len_p, re.pattern, re.replace,
in_buf, re.icase)) in_buf, re.icase))
@ -7120,7 +7122,7 @@ void free_replace_regex()
delete_dynamic(&glob_replace_regex->regex_arr); delete_dynamic(&glob_replace_regex->regex_arr);
my_free(glob_replace_regex->even_buf,MYF(MY_ALLOW_ZERO_PTR)); my_free(glob_replace_regex->even_buf,MYF(MY_ALLOW_ZERO_PTR));
my_free(glob_replace_regex->odd_buf,MYF(MY_ALLOW_ZERO_PTR)); my_free(glob_replace_regex->odd_buf,MYF(MY_ALLOW_ZERO_PTR));
my_free((char*) glob_replace_regex,MYF(0)); my_free(glob_replace_regex,MYF(0));
glob_replace_regex=0; glob_replace_regex=0;
} }
} }
@ -7315,7 +7317,7 @@ int reg_replace(char** buf_p, int* buf_len_p, char *pattern,
str_p= str_end; str_p= str_end;
} }
} }
my_free((gptr)subs, MYF(0)); my_free(subs, MYF(0));
my_regfree(&r); my_regfree(&r);
*res_p= 0; *res_p= 0;
*buf_p= buf; *buf_p= buf;
@ -7375,13 +7377,13 @@ int get_next_bit(REP_SET *set,uint lastpos);
int find_set(REP_SETS *sets,REP_SET *find); int find_set(REP_SETS *sets,REP_SET *find);
int find_found(FOUND_SET *found_set,uint table_offset, int find_found(FOUND_SET *found_set,uint table_offset,
int found_offset); int found_offset);
uint start_at_word(my_string pos); uint start_at_word(char * pos);
uint end_of_word(my_string pos); uint end_of_word(char * pos);
static uint found_sets=0; static uint found_sets=0;
uint replace_len(my_string str) uint replace_len(char * str)
{ {
uint len=0; uint len=0;
while (*str) while (*str)
@ -7396,8 +7398,8 @@ uint replace_len(my_string str)
/* Init a replace structure for further calls */ /* Init a replace structure for further calls */
REPLACE *init_replace(my_string *from, my_string *to,uint count, REPLACE *init_replace(char * *from, char * *to,uint count,
my_string word_end_chars) char * word_end_chars)
{ {
static const int SPACE_CHAR= 256; static const int SPACE_CHAR= 256;
static const int START_OF_LINE= 257; static const int START_OF_LINE= 257;
@ -7406,7 +7408,7 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count,
uint i,j,states,set_nr,len,result_len,max_length,found_end,bits_set,bit_nr; uint i,j,states,set_nr,len,result_len,max_length,found_end,bits_set,bit_nr;
int used_sets,chr,default_state; int used_sets,chr,default_state;
char used_chars[LAST_CHAR_CODE],is_word_end[256]; char used_chars[LAST_CHAR_CODE],is_word_end[256];
my_string pos,to_pos,*to_array; char * pos, *to_pos, **to_array;
REP_SETS sets; REP_SETS sets;
REP_SET *set,*start_states,*word_states,*new_set; REP_SET *set,*start_states,*word_states,*new_set;
FOLLOWS *follow,*follow_ptr; FOLLOWS *follow,*follow_ptr;
@ -7451,7 +7453,7 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count,
if (!(follow=(FOLLOWS*) my_malloc((states+2)*sizeof(FOLLOWS),MYF(MY_WME)))) if (!(follow=(FOLLOWS*) my_malloc((states+2)*sizeof(FOLLOWS),MYF(MY_WME))))
{ {
free_sets(&sets); free_sets(&sets);
my_free((gptr) found_set,MYF(0)); my_free(found_set,MYF(0));
DBUG_RETURN(0); DBUG_RETURN(0);
} }
@ -7642,12 +7644,12 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count,
if ((replace=(REPLACE*) my_malloc(sizeof(REPLACE)*(sets.count)+ if ((replace=(REPLACE*) my_malloc(sizeof(REPLACE)*(sets.count)+
sizeof(REPLACE_STRING)*(found_sets+1)+ sizeof(REPLACE_STRING)*(found_sets+1)+
sizeof(my_string)*count+result_len, sizeof(char *)*count+result_len,
MYF(MY_WME | MY_ZEROFILL)))) MYF(MY_WME | MY_ZEROFILL))))
{ {
rep_str=(REPLACE_STRING*) (replace+sets.count); rep_str=(REPLACE_STRING*) (replace+sets.count);
to_array=(my_string*) (rep_str+found_sets+1); to_array= (char **) (rep_str+found_sets+1);
to_pos=(my_string) (to_array+count); to_pos=(char *) (to_array+count);
for (i=0 ; i < count ; i++) for (i=0 ; i < count ; i++)
{ {
to_array[i]=to_pos; to_array[i]=to_pos;
@ -7658,7 +7660,8 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count,
for (i=1 ; i <= found_sets ; i++) for (i=1 ; i <= found_sets ; i++)
{ {
pos=from[found_set[i-1].table_offset]; pos=from[found_set[i-1].table_offset];
rep_str[i].found= !bcmp(pos,"\\^",3) ? 2 : 1; rep_str[i].found= !bcmp((const uchar*) pos,
(const uchar*) "\\^", 3) ? 2 : 1;
rep_str[i].replace_string=to_array[found_set[i-1].table_offset]; rep_str[i].replace_string=to_array[found_set[i-1].table_offset];
rep_str[i].to_offset=found_set[i-1].found_offset-start_at_word(pos); rep_str[i].to_offset=found_set[i-1].found_offset-start_at_word(pos);
rep_str[i].from_offset=found_set[i-1].found_offset-replace_len(pos)+ rep_str[i].from_offset=found_set[i-1].found_offset-replace_len(pos)+
@ -7673,9 +7676,9 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count,
replace[i].next[j]=(REPLACE*) (rep_str+(-sets.set[i].next[j]-1)); replace[i].next[j]=(REPLACE*) (rep_str+(-sets.set[i].next[j]-1));
} }
} }
my_free((gptr) follow,MYF(0)); my_free(follow,MYF(0));
free_sets(&sets); free_sets(&sets);
my_free((gptr) found_set,MYF(0)); my_free(found_set,MYF(0));
DBUG_PRINT("exit",("Replace table has %d states",sets.count)); DBUG_PRINT("exit",("Replace table has %d states",sets.count));
DBUG_RETURN(replace); DBUG_RETURN(replace);
} }
@ -7691,7 +7694,7 @@ int init_sets(REP_SETS *sets,uint states)
if (!(sets->bit_buffer=(uint*) my_malloc(sizeof(uint)*sets->size_of_bits* if (!(sets->bit_buffer=(uint*) my_malloc(sizeof(uint)*sets->size_of_bits*
SET_MALLOC_HUNC,MYF(MY_WME)))) SET_MALLOC_HUNC,MYF(MY_WME))))
{ {
my_free((gptr) sets->set,MYF(0)); my_free(sets->set,MYF(0));
return 1; return 1;
} }
return 0; return 0;
@ -7723,13 +7726,13 @@ REP_SET *make_new_set(REP_SETS *sets)
return set; return set;
} }
count=sets->count+sets->invisible+SET_MALLOC_HUNC; count=sets->count+sets->invisible+SET_MALLOC_HUNC;
if (!(set=(REP_SET*) my_realloc((gptr) sets->set_buffer, if (!(set=(REP_SET*) my_realloc((uchar*) sets->set_buffer,
sizeof(REP_SET)*count, sizeof(REP_SET)*count,
MYF(MY_WME)))) MYF(MY_WME))))
return 0; return 0;
sets->set_buffer=set; sets->set_buffer=set;
sets->set=set+sets->invisible; sets->set=set+sets->invisible;
if (!(bit_buffer=(uint*) my_realloc((gptr) sets->bit_buffer, if (!(bit_buffer=(uint*) my_realloc((uchar*) sets->bit_buffer,
(sizeof(uint)*sets->size_of_bits)*count, (sizeof(uint)*sets->size_of_bits)*count,
MYF(MY_WME)))) MYF(MY_WME))))
return 0; return 0;
@ -7752,8 +7755,8 @@ void free_last_set(REP_SETS *sets)
void free_sets(REP_SETS *sets) void free_sets(REP_SETS *sets)
{ {
my_free((gptr)sets->set_buffer,MYF(0)); my_free(sets->set_buffer,MYF(0));
my_free((gptr)sets->bit_buffer,MYF(0)); my_free(sets->bit_buffer,MYF(0));
return; return;
} }
@ -7780,13 +7783,13 @@ void or_bits(REP_SET *to,REP_SET *from)
void copy_bits(REP_SET *to,REP_SET *from) void copy_bits(REP_SET *to,REP_SET *from)
{ {
memcpy((byte*) to->bits,(byte*) from->bits, memcpy((uchar*) to->bits,(uchar*) from->bits,
(size_t) (sizeof(uint) * to->size_of_bits)); (size_t) (sizeof(uint) * to->size_of_bits));
} }
int cmp_bits(REP_SET *set1,REP_SET *set2) int cmp_bits(REP_SET *set1,REP_SET *set2)
{ {
return bcmp((byte*) set1->bits,(byte*) set2->bits, return bcmp((uchar*) set1->bits,(uchar*) set2->bits,
sizeof(uint) * set1->size_of_bits); sizeof(uint) * set1->size_of_bits);
} }
@ -7854,17 +7857,19 @@ int find_found(FOUND_SET *found_set,uint table_offset, int found_offset)
/* Return 1 if regexp starts with \b or ends with \b*/ /* Return 1 if regexp starts with \b or ends with \b*/
uint start_at_word(my_string pos) uint start_at_word(char * pos)
{ {
return (((!bcmp(pos,"\\b",2) && pos[2]) || !bcmp(pos,"\\^",2)) ? 1 : 0); return (((!bcmp((const uchar*) pos, (const uchar*) "\\b",2) && pos[2]) ||
!bcmp((const uchar*) pos, (const uchar*) "\\^", 2)) ? 1 : 0);
} }
uint end_of_word(my_string pos) uint end_of_word(char * pos)
{ {
my_string end=strend(pos); char * end=strend(pos);
return ((end > pos+2 && !bcmp(end-2,"\\b",2)) || return ((end > pos+2 && !bcmp((const uchar*) end-2,
(end >= pos+2 && !bcmp(end-2,"\\$",2))) ? (const uchar*) "\\b", 2)) ||
1 : 0; (end >= pos+2 && !bcmp((const uchar*) end-2,
(const uchar*) "\\$",2))) ? 1 : 0;
} }
/**************************************************************************** /****************************************************************************
@ -7874,10 +7879,10 @@ uint end_of_word(my_string pos)
#define PC_MALLOC 256 /* Bytes for pointers */ #define PC_MALLOC 256 /* Bytes for pointers */
#define PS_MALLOC 512 /* Bytes for data */ #define PS_MALLOC 512 /* Bytes for data */
int insert_pointer_name(reg1 POINTER_ARRAY *pa,my_string name) int insert_pointer_name(reg1 POINTER_ARRAY *pa,char * name)
{ {
uint i,length,old_count; uint i,length,old_count;
byte *new_pos; uchar *new_pos;
const char **new_array; const char **new_array;
DBUG_ENTER("insert_pointer_name"); DBUG_ENTER("insert_pointer_name");
@ -7885,16 +7890,16 @@ int insert_pointer_name(reg1 POINTER_ARRAY *pa,my_string name)
{ {
if (!(pa->typelib.type_names=(const char **) if (!(pa->typelib.type_names=(const char **)
my_malloc(((PC_MALLOC-MALLOC_OVERHEAD)/ my_malloc(((PC_MALLOC-MALLOC_OVERHEAD)/
(sizeof(my_string)+sizeof(*pa->flag))* (sizeof(char *)+sizeof(*pa->flag))*
(sizeof(my_string)+sizeof(*pa->flag))),MYF(MY_WME)))) (sizeof(char *)+sizeof(*pa->flag))),MYF(MY_WME))))
DBUG_RETURN(-1); DBUG_RETURN(-1);
if (!(pa->str= (byte*) my_malloc((uint) (PS_MALLOC-MALLOC_OVERHEAD), if (!(pa->str= (uchar*) my_malloc((uint) (PS_MALLOC-MALLOC_OVERHEAD),
MYF(MY_WME)))) MYF(MY_WME))))
{ {
my_free((gptr) pa->typelib.type_names,MYF(0)); my_free((char*) pa->typelib.type_names,MYF(0));
DBUG_RETURN (-1); DBUG_RETURN (-1);
} }
pa->max_count=(PC_MALLOC-MALLOC_OVERHEAD)/(sizeof(byte*)+ pa->max_count=(PC_MALLOC-MALLOC_OVERHEAD)/(sizeof(uchar*)+
sizeof(*pa->flag)); sizeof(*pa->flag));
pa->flag= (int7*) (pa->typelib.type_names+pa->max_count); pa->flag= (int7*) (pa->typelib.type_names+pa->max_count);
pa->length=0; pa->length=0;
@ -7904,7 +7909,7 @@ int insert_pointer_name(reg1 POINTER_ARRAY *pa,my_string name)
length=(uint) strlen(name)+1; length=(uint) strlen(name)+1;
if (pa->length+length >= pa->max_length) if (pa->length+length >= pa->max_length)
{ {
if (!(new_pos= (byte*) my_realloc((gptr) pa->str, if (!(new_pos= (uchar*) my_realloc((uchar*) pa->str,
(uint) (pa->max_length+PS_MALLOC), (uint) (pa->max_length+PS_MALLOC),
MYF(MY_WME)))) MYF(MY_WME))))
DBUG_RETURN(1); DBUG_RETURN(1);
@ -7923,23 +7928,23 @@ int insert_pointer_name(reg1 POINTER_ARRAY *pa,my_string name)
int len; int len;
pa->array_allocs++; pa->array_allocs++;
len=(PC_MALLOC*pa->array_allocs - MALLOC_OVERHEAD); len=(PC_MALLOC*pa->array_allocs - MALLOC_OVERHEAD);
if (!(new_array=(const char **) my_realloc((gptr) pa->typelib.type_names, if (!(new_array=(const char **) my_realloc((uchar*) pa->typelib.type_names,
(uint) len/ (uint) len/
(sizeof(byte*)+sizeof(*pa->flag))* (sizeof(uchar*)+sizeof(*pa->flag))*
(sizeof(byte*)+sizeof(*pa->flag)), (sizeof(uchar*)+sizeof(*pa->flag)),
MYF(MY_WME)))) MYF(MY_WME))))
DBUG_RETURN(1); DBUG_RETURN(1);
pa->typelib.type_names=new_array; pa->typelib.type_names=new_array;
old_count=pa->max_count; old_count=pa->max_count;
pa->max_count=len/(sizeof(byte*) + sizeof(*pa->flag)); pa->max_count=len/(sizeof(uchar*) + sizeof(*pa->flag));
pa->flag= (int7*) (pa->typelib.type_names+pa->max_count); pa->flag= (int7*) (pa->typelib.type_names+pa->max_count);
memcpy((byte*) pa->flag,(my_string) (pa->typelib.type_names+old_count), memcpy((uchar*) pa->flag,(char *) (pa->typelib.type_names+old_count),
old_count*sizeof(*pa->flag)); old_count*sizeof(*pa->flag));
} }
pa->flag[pa->typelib.count]=0; /* Reset 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 */ 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; pa->length+=length;
DBUG_RETURN(0); DBUG_RETURN(0);
} /* insert_pointer_name */ } /* insert_pointer_name */
@ -7952,9 +7957,9 @@ void free_pointer_array(POINTER_ARRAY *pa)
if (pa->typelib.count) if (pa->typelib.count)
{ {
pa->typelib.count=0; pa->typelib.count=0;
my_free((gptr) pa->typelib.type_names,MYF(0)); my_free((char*) pa->typelib.type_names,MYF(0));
pa->typelib.type_names=0; pa->typelib.type_names=0;
my_free((gptr) pa->str,MYF(0)); my_free(pa->str,MYF(0));
} }
} /* free_pointer_array */ } /* free_pointer_array */
@ -8051,7 +8056,7 @@ void dynstr_append_sorted(DYNAMIC_STRING* ds, DYNAMIC_STRING *ds_input)
*line_end= 0; *line_end= 0;
/* Insert pointer to the line in array */ /* Insert pointer to the line in array */
if (insert_dynamic(&lines, (gptr) &start)) if (insert_dynamic(&lines, (uchar*) &start))
die("Out of memory inserting lines to sort"); die("Out of memory inserting lines to sort");
start= line_end+1; start= line_end+1;

View File

@ -22,8 +22,8 @@
static bool init_line_buffer(LINE_BUFFER *buffer,File file,ulong size, static bool init_line_buffer(LINE_BUFFER *buffer,File file,ulong size,
ulong max_size); ulong max_size);
static bool init_line_buffer_from_string(LINE_BUFFER *buffer,my_string str); static bool init_line_buffer_from_string(LINE_BUFFER *buffer,char * str);
static uint fill_buffer(LINE_BUFFER *buffer); static size_t fill_buffer(LINE_BUFFER *buffer);
static char *intern_read_line(LINE_BUFFER *buffer,ulong *out_length); static char *intern_read_line(LINE_BUFFER *buffer,ulong *out_length);
@ -35,7 +35,7 @@ LINE_BUFFER *batch_readline_init(ulong max_size,FILE *file)
return 0; return 0;
if (init_line_buffer(line_buff,fileno(file),IO_SIZE,max_size)) if (init_line_buffer(line_buff,fileno(file),IO_SIZE,max_size))
{ {
my_free((char*) line_buff,MYF(0)); my_free(line_buff,MYF(0));
return 0; return 0;
} }
return line_buff; return line_buff;
@ -62,13 +62,13 @@ void batch_readline_end(LINE_BUFFER *line_buff)
{ {
if (line_buff) if (line_buff)
{ {
my_free((gptr) line_buff->buffer,MYF(MY_ALLOW_ZERO_PTR)); my_free(line_buff->buffer,MYF(MY_ALLOW_ZERO_PTR));
my_free((char*) line_buff,MYF(0)); my_free(line_buff,MYF(0));
} }
} }
LINE_BUFFER *batch_readline_command(LINE_BUFFER *line_buff, my_string str) LINE_BUFFER *batch_readline_command(LINE_BUFFER *line_buff, char * str)
{ {
if (!line_buff) if (!line_buff)
if (!(line_buff=(LINE_BUFFER*) if (!(line_buff=(LINE_BUFFER*)
@ -76,7 +76,7 @@ LINE_BUFFER *batch_readline_command(LINE_BUFFER *line_buff, my_string str)
return 0; return 0;
if (init_line_buffer_from_string(line_buff,str)) if (init_line_buffer_from_string(line_buff,str))
{ {
my_free((char*) line_buff,MYF(0)); my_free(line_buff,MYF(0));
return 0; return 0;
} }
return line_buff; return line_buff;
@ -106,13 +106,13 @@ init_line_buffer(LINE_BUFFER *buffer,File file,ulong size,ulong max_buffer)
several times. the resulting buffer will contain a several times. the resulting buffer will contain a
concatenation of all strings separated by spaces concatenation of all strings separated by spaces
*/ */
static bool init_line_buffer_from_string(LINE_BUFFER *buffer,my_string str) static bool init_line_buffer_from_string(LINE_BUFFER *buffer,char * str)
{ {
uint old_length=(uint)(buffer->end - buffer->buffer); uint old_length=(uint)(buffer->end - buffer->buffer);
uint length= (uint) strlen(str); uint length= (uint) strlen(str);
if (!(buffer->buffer= buffer->start_of_line= buffer->end_of_line= if (!(buffer->buffer= buffer->start_of_line= buffer->end_of_line=
(char*)my_realloc(buffer->buffer, old_length+length+2, (char*) my_realloc((uchar*) buffer->buffer, old_length+length+2,
MYF(MY_FAE|MY_ALLOW_ZERO_PTR)))) MYF(MY_FAE|MY_ALLOW_ZERO_PTR))))
return 1; return 1;
buffer->end= buffer->buffer + old_length; buffer->end= buffer->buffer + old_length;
if (old_length) if (old_length)
@ -133,9 +133,9 @@ static bool init_line_buffer_from_string(LINE_BUFFER *buffer,my_string str)
bytes read from disk. bytes read from disk.
*/ */
static uint fill_buffer(LINE_BUFFER *buffer) static size_t fill_buffer(LINE_BUFFER *buffer)
{ {
uint read_count; size_t read_count;
uint bufbytes= (uint) (buffer->end - buffer->start_of_line); uint bufbytes= (uint) (buffer->end - buffer->start_of_line);
if (buffer->eof) if (buffer->eof)
@ -166,11 +166,11 @@ static uint fill_buffer(LINE_BUFFER *buffer)
} }
/* Read in new stuff. */ /* Read in new stuff. */
if ((read_count= my_read(buffer->file, (byte*) buffer->end, read_count, if ((read_count= my_read(buffer->file, (uchar*) buffer->end, read_count,
MYF(MY_WME))) == MY_FILE_ERROR) MYF(MY_WME))) == MY_FILE_ERROR)
return read_count; return (size_t) -1;
DBUG_PRINT("fill_buff", ("Got %d bytes", read_count)); DBUG_PRINT("fill_buff", ("Got %lu bytes", (ulong) read_count));
/* Kludge to pretend every nonempty file ends with a newline. */ /* Kludge to pretend every nonempty file ends with a newline. */
if (!read_count && bufbytes && buffer->end[-1] != '\n') if (!read_count && bufbytes && buffer->end[-1] != '\n')
@ -189,7 +189,7 @@ static uint fill_buffer(LINE_BUFFER *buffer)
char *intern_read_line(LINE_BUFFER *buffer,ulong *out_length) char *intern_read_line(LINE_BUFFER *buffer,ulong *out_length)
{ {
char *pos; char *pos;
uint length; size_t length;
DBUG_ENTER("intern_read_line"); DBUG_ENTER("intern_read_line");
buffer->start_of_line=buffer->end_of_line; buffer->start_of_line=buffer->end_of_line;
@ -202,7 +202,7 @@ char *intern_read_line(LINE_BUFFER *buffer,ulong *out_length)
{ {
if ((uint) (pos - buffer->start_of_line) < buffer->max_size) if ((uint) (pos - buffer->start_of_line) < buffer->max_size)
{ {
if (!(length=fill_buffer(buffer)) || length == (uint) -1) if (!(length=fill_buffer(buffer)) || length == (size_t) -1)
DBUG_RETURN(0); DBUG_RETURN(0);
continue; continue;
} }

View File

@ -32,7 +32,7 @@
required by the string function required by the string function
*/ */
extern gptr sql_alloc(unsigned size); extern void sql_alloc(size_t size);
extern void sql_element_free(void *ptr); extern void sql_element_free(void *ptr);
#include "sql_string.h" #include "sql_string.h"
@ -506,7 +506,7 @@ bool String::append(FILE* file, uint32 arg_length, myf my_flags)
{ {
if (realloc(str_length+arg_length)) if (realloc(str_length+arg_length))
return TRUE; return TRUE;
if (my_fread(file, (byte*) Ptr + str_length, arg_length, my_flags)) if (my_fread(file, (uchar*) Ptr + str_length, arg_length, my_flags))
{ {
shrink(str_length); shrink(str_length);
return TRUE; return TRUE;
@ -520,7 +520,7 @@ bool String::append(IO_CACHE* file, uint32 arg_length)
{ {
if (realloc(str_length+arg_length)) if (realloc(str_length+arg_length))
return TRUE; return TRUE;
if (my_b_read(file, (byte*) Ptr + str_length, arg_length)) if (my_b_read(file, (uchar*) Ptr + str_length, arg_length))
{ {
shrink(str_length); shrink(str_length);
return TRUE; return TRUE;
@ -645,7 +645,7 @@ bool String::replace(uint32 offset,uint32 arg_length,
{ {
if (realloc(str_length+(uint32) diff)) if (realloc(str_length+(uint32) diff))
return TRUE; return TRUE;
bmove_upp(Ptr+str_length+diff,Ptr+str_length, bmove_upp((uchar*) Ptr+str_length+diff, (uchar*) Ptr+str_length,
str_length-offset-arg_length); str_length-offset-arg_length);
} }
if (to_length) if (to_length)

View File

@ -264,7 +264,7 @@ static BOOLEAN DoTrace(CODE_STATE *cs);
/* Test to see if file is writable */ /* Test to see if file is writable */
#if !(!defined(HAVE_ACCESS) || defined(MSDOS)) #if !(!defined(HAVE_ACCESS) || defined(MSDOS))
static BOOLEAN Writable(char *pathname); static BOOLEAN Writable(const char *pathname);
/* Change file owner and group */ /* Change file owner and group */
static void ChangeOwner(CODE_STATE *cs, char *pathname); static void ChangeOwner(CODE_STATE *cs, char *pathname);
/* Allocate memory for runtime support */ /* Allocate memory for runtime support */
@ -343,12 +343,12 @@ static CODE_STATE *code_state(void)
if (!(cs=(CODE_STATE *) tmp->dbug)) if (!(cs=(CODE_STATE *) tmp->dbug))
{ {
cs=(CODE_STATE*) DbugMalloc(sizeof(*cs)); cs=(CODE_STATE*) DbugMalloc(sizeof(*cs));
bzero((char*) cs,sizeof(*cs)); bzero((uchar*) cs,sizeof(*cs));
cs->process= db_process ? db_process : "dbug"; cs->process= db_process ? db_process : "dbug";
cs->func="?func"; cs->func="?func";
cs->file="?file"; cs->file="?file";
cs->stack=&init_settings; cs->stack=&init_settings;
tmp->dbug=(gptr) cs; tmp->dbug= (void*) cs;
} }
} }
return cs; return cs;
@ -715,7 +715,7 @@ void _db_push_(const char *control)
void _db_set_init_(const char *control) void _db_set_init_(const char *control)
{ {
CODE_STATE tmp_cs; CODE_STATE tmp_cs;
bzero((char*) &tmp_cs, sizeof(tmp_cs)); bzero((uchar*) &tmp_cs, sizeof(tmp_cs));
tmp_cs.stack= &init_settings; tmp_cs.stack= &init_settings;
_db_set_(&tmp_cs, control); _db_set_(&tmp_cs, control);
} }
@ -830,7 +830,7 @@ void _db_pop_()
} \ } \
} while (0) } while (0)
int _db_explain_ (CODE_STATE *cs, char *buf, int len) int _db_explain_ (CODE_STATE *cs, char *buf, size_t len)
{ {
char *start=buf, *end=buf+len-4; char *start=buf, *end=buf+len-4;
@ -887,10 +887,10 @@ overflow:
* see _db_explain_ * see _db_explain_
*/ */
int _db_explain_init_(char *buf, int len) int _db_explain_init_(char *buf, size_t len)
{ {
CODE_STATE cs; CODE_STATE cs;
bzero((char*) &cs,sizeof(cs)); bzero((uchar*) &cs,sizeof(cs));
cs.stack=&init_settings; cs.stack=&init_settings;
return _db_explain_(&cs, buf, len); return _db_explain_(&cs, buf, len);
} }
@ -1083,7 +1083,7 @@ void _db_pargs_(uint _line_, const char *keyword)
CODE_STATE *cs=0; CODE_STATE *cs=0;
get_code_state_or_return; get_code_state_or_return;
cs->u_line= _line_; cs->u_line= _line_;
cs->u_keyword= (char*) keyword; cs->u_keyword= keyword;
} }
@ -1160,7 +1160,8 @@ void _db_doprnt_(const char *format,...)
* Is used to examine corrputed memory or arrays. * Is used to examine corrputed memory or arrays.
*/ */
void _db_dump_(uint _line_, const char *keyword, const char *memory, uint length) void _db_dump_(uint _line_, const char *keyword,
const unsigned char *memory, size_t length)
{ {
int pos; int pos;
char dbuff[90]; char dbuff[90];
@ -1168,7 +1169,7 @@ void _db_dump_(uint _line_, const char *keyword, const char *memory, uint length
CODE_STATE *cs=0; CODE_STATE *cs=0;
get_code_state_or_return; get_code_state_or_return;
if (_db_keyword_(cs, (char*) keyword)) if (_db_keyword_(cs, keyword))
{ {
if (!cs->locked) if (!cs->locked)
pthread_mutex_lock(&THR_LOCK_dbug); pthread_mutex_lock(&THR_LOCK_dbug);
@ -1182,7 +1183,7 @@ void _db_dump_(uint _line_, const char *keyword, const char *memory, uint length
{ {
fprintf(cs->stack->out_file, "%s: ", cs->func); fprintf(cs->stack->out_file, "%s: ", cs->func);
} }
sprintf(dbuff,"%s: Memory: 0x%lx Bytes: (%d)\n", sprintf(dbuff,"%s: Memory: 0x%lx Bytes: (%ld)\n",
keyword,(ulong) memory, length); keyword,(ulong) memory, length);
(void) fputs(dbuff,cs->stack->out_file); (void) fputs(dbuff,cs->stack->out_file);
@ -1292,7 +1293,7 @@ static struct link *ListDel(struct link *head,
{ {
struct link *delme=*cur; struct link *delme=*cur;
*cur=(*cur)->next_link; *cur=(*cur)->next_link;
free((char*)delme); free((void*) delme);
} }
} while (*cur && *(cur=&((*cur)->next_link))); } while (*cur && *(cur=&((*cur)->next_link)));
} }
@ -1451,7 +1452,7 @@ static void FreeState(CODE_STATE *cs, struct settings *state, int free_state)
if (state->prof_file) if (state->prof_file)
DBUGCloseFile(cs, state->prof_file); DBUGCloseFile(cs, state->prof_file);
if (free_state) if (free_state)
free((char *) state); free((void*) state);
} }
@ -1696,7 +1697,7 @@ static void FreeList(struct link *linkp)
{ {
old= linkp; old= linkp;
linkp= linkp->next_link; linkp= linkp->next_link;
free((char *) old); free((void*) old);
} }
} }
@ -1815,7 +1816,7 @@ static void DBUGOpenFile(CODE_STATE *cs,
} }
else else
{ {
if (!Writable((char*)name)) if (!Writable(name))
{ {
(void) fprintf(stderr, ERR_OPEN, cs->process, name); (void) fprintf(stderr, ERR_OPEN, cs->process, name);
perror(""); perror("");
@ -1988,7 +1989,7 @@ static char *DbugMalloc(size_t size)
{ {
register char *new_malloc; register char *new_malloc;
if (!(new_malloc= (char*) malloc((size_t) size))) if (!(new_malloc= (char*) malloc(size)))
DbugExit("out of memory"); DbugExit("out of memory");
return new_malloc; return new_malloc;
} }
@ -2062,7 +2063,7 @@ static const char *BaseName(const char *pathname)
#ifndef Writable #ifndef Writable
static BOOLEAN Writable(char *pathname) static BOOLEAN Writable(const char *pathname)
{ {
REGISTER BOOLEAN granted; REGISTER BOOLEAN granted;
REGISTER char *lastslash; REGISTER char *lastslash;

View File

@ -99,31 +99,31 @@ static struct my_option my_long_options[]=
{"debug", '#', "This is a non-debug version. Catch this and exit", {"debug", '#', "This is a non-debug version. Catch this and exit",
0, 0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
#else #else
{"debug", '#', "Output debug log", (gptr *) & default_dbug_option, {"debug", '#', "Output debug log", (uchar**) & default_dbug_option,
(gptr *) & default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) & default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
{"debug-info", 'T', "Print some debug info at exit.", (gptr *) & info_flag, {"debug-info", 'T', "Print some debug info at exit.", (uchar**) & info_flag,
(gptr *) & info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) & info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"help", '?', "Displays this help and exits.", 0, 0, 0, GET_NO_ARG, {"help", '?', "Displays this help and exits.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0}, NO_ARG, 0, 0, 0, 0, 0, 0},
{"version", 'V', "Prints version", 0, 0, 0, GET_NO_ARG, {"version", 'V', "Prints version", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0}, NO_ARG, 0, 0, 0, 0, 0, 0},
{"charset", 'C', "Charset dir", (gptr *) & charsets_dir, {"charset", 'C', "Charset dir", (uchar**) & charsets_dir,
(gptr *) & charsets_dir, (uchar**) & charsets_dir,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"in_file", 'F', "Input file", (gptr *) & TXTFILE, (gptr *) & TXTFILE, {"in_file", 'F', "Input file", (uchar**) & TXTFILE, (uchar**) & TXTFILE,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"out_dir", 'D', "Output base directory", (gptr *) & DATADIRECTORY, {"out_dir", 'D', "Output base directory", (uchar**) & DATADIRECTORY,
(gptr *) & DATADIRECTORY, (uchar**) & DATADIRECTORY,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"out_file", 'O', "Output filename (errmsg.sys)", (gptr *) & OUTFILE, {"out_file", 'O', "Output filename (errmsg.sys)", (uchar**) & OUTFILE,
(gptr *) & OUTFILE, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) & OUTFILE, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"header_file", 'H', "mysqld_error.h file ", (gptr *) & HEADERFILE, {"header_file", 'H', "mysqld_error.h file ", (uchar**) & HEADERFILE,
(gptr *) & HEADERFILE, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) & HEADERFILE, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"name_file", 'N', "mysqld_ername.h file ", (gptr *) & NAMEFILE, {"name_file", 'N', "mysqld_ername.h file ", (uchar**) & NAMEFILE,
(gptr *) & NAMEFILE, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) & NAMEFILE, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"state_file", 'S', "sql_state.h file", (gptr *) & STATEFILE, {"state_file", 'S', "sql_state.h file", (uchar**) & STATEFILE,
(gptr *) & STATEFILE, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) & STATEFILE, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} {0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
}; };
@ -329,21 +329,21 @@ static int create_sys_files(struct languages *lang_head,
/* continue with header of the errmsg.sys file */ /* continue with header of the errmsg.sys file */
length= ftell(to) - HEADER_LENGTH - row_count * 2; length= ftell(to) - HEADER_LENGTH - row_count * 2;
bzero((gptr) head, HEADER_LENGTH); bzero((uchar*) head, HEADER_LENGTH);
bmove((byte *) head, (byte *) file_head, 4); bmove((uchar *) head, (uchar *) file_head, 4);
head[4]= 1; head[4]= 1;
int2store(head + 6, length); int2store(head + 6, length);
int2store(head + 8, row_count); int2store(head + 8, row_count);
head[30]= csnum; head[30]= csnum;
my_fseek(to, 0l, MY_SEEK_SET, MYF(0)); my_fseek(to, 0l, MY_SEEK_SET, MYF(0));
if (my_fwrite(to, (byte*) head, HEADER_LENGTH, MYF(MY_WME | MY_FNABP))) if (my_fwrite(to, (uchar*) head, HEADER_LENGTH, MYF(MY_WME | MY_FNABP)))
goto err; goto err;
for (i= 0; i < row_count; i++) for (i= 0; i < row_count; i++)
{ {
int2store(head, file_pos[i]); int2store(head, file_pos[i]);
if (my_fwrite(to, (byte*) head, 2, MYF(MY_WME | MY_FNABP))) if (my_fwrite(to, (uchar*) head, 2, MYF(MY_WME | MY_FNABP)))
goto err; goto err;
} }
my_fclose(to, MYF(0)); my_fclose(to, MYF(0));
@ -362,7 +362,7 @@ static void clean_up(struct languages *lang_head, struct errors *error_head)
struct errors *tmp_error, *next_error; struct errors *tmp_error, *next_error;
uint count, i; uint count, i;
my_free((gptr) default_language, MYF(0)); my_free((uchar*) default_language, MYF(0));
for (tmp_lang= lang_head; tmp_lang; tmp_lang= next_language) for (tmp_lang= lang_head; tmp_lang; tmp_lang= next_language)
{ {
@ -370,7 +370,7 @@ static void clean_up(struct languages *lang_head, struct errors *error_head)
my_free(tmp_lang->lang_short_name, MYF(0)); my_free(tmp_lang->lang_short_name, MYF(0));
my_free(tmp_lang->lang_long_name, MYF(0)); my_free(tmp_lang->lang_long_name, MYF(0));
my_free(tmp_lang->charset, MYF(0)); my_free(tmp_lang->charset, MYF(0));
my_free((gptr) tmp_lang, MYF(0)); my_free((uchar*) tmp_lang, MYF(0));
} }
for (tmp_error= error_head; tmp_error; tmp_error= next_error) for (tmp_error= error_head; tmp_error; tmp_error= next_error)
@ -381,17 +381,17 @@ static void clean_up(struct languages *lang_head, struct errors *error_head)
{ {
struct message *tmp; struct message *tmp;
tmp= dynamic_element(&tmp_error->msg, i, struct message*); tmp= dynamic_element(&tmp_error->msg, i, struct message*);
my_free((gptr) tmp->lang_short_name, MYF(0)); my_free((uchar*) tmp->lang_short_name, MYF(0));
my_free((gptr) tmp->text, MYF(0)); my_free((uchar*) tmp->text, MYF(0));
} }
delete_dynamic(&tmp_error->msg); delete_dynamic(&tmp_error->msg);
if (tmp_error->sql_code1[0]) if (tmp_error->sql_code1[0])
my_free((gptr) tmp_error->sql_code1, MYF(0)); my_free((uchar*) tmp_error->sql_code1, MYF(0));
if (tmp_error->sql_code2[0]) if (tmp_error->sql_code2[0])
my_free((gptr) tmp_error->sql_code2, MYF(0)); my_free((uchar*) tmp_error->sql_code2, MYF(0));
my_free((gptr) tmp_error->er_name, MYF(0)); my_free((uchar*) tmp_error->er_name, MYF(0));
my_free((gptr) tmp_error, MYF(0)); my_free((uchar*) tmp_error, MYF(0));
} }
} }
@ -471,7 +471,7 @@ static int parse_input_file(const char *file_name, struct errors **top_error,
current_error->er_name, current_message.lang_short_name); current_error->er_name, current_message.lang_short_name);
DBUG_RETURN(0); DBUG_RETURN(0);
} }
if (insert_dynamic(&current_error->msg, (byte *) & current_message)) if (insert_dynamic(&current_error->msg, (uchar *) & current_message))
DBUG_RETURN(0); DBUG_RETURN(0);
continue; continue;
} }
@ -534,7 +534,7 @@ static uint parse_error_offset(char *str)
end= 0; end= 0;
ioffset= (uint) my_strtoll10(soffset, &end, &error); ioffset= (uint) my_strtoll10(soffset, &end, &error);
my_free((gptr) soffset, MYF(0)); my_free((uchar*) soffset, MYF(0));
DBUG_RETURN(ioffset); DBUG_RETURN(ioffset);
} }

View File

@ -51,10 +51,10 @@
/* another argument to specify page ranges... seek to right spot and go from there */ /* another argument to specify page ranges... seek to right spot and go from there */
typedef unsigned long int ulint; typedef unsigned long int ulint;
typedef unsigned char byte; typedef unsigned char uchar;
/* innodb function in name; modified slightly to not have the ASM version (lots of #ifs that didn't apply) */ /* innodb function in name; modified slightly to not have the ASM version (lots of #ifs that didn't apply) */
ulint mach_read_from_4(byte *b) ulint mach_read_from_4(uchar *b)
{ {
return( ((ulint)(b[0]) << 24) return( ((ulint)(b[0]) << 24)
+ ((ulint)(b[1]) << 16) + ((ulint)(b[1]) << 16)
@ -78,7 +78,7 @@ ulint
ut_fold_binary( ut_fold_binary(
/*===========*/ /*===========*/
/* out: folded value */ /* out: folded value */
byte* str, /* in: string of bytes */ uchar* str, /* in: string of bytes */
ulint len) /* in: length */ ulint len) /* in: length */
{ {
ulint i; ulint i;
@ -98,7 +98,7 @@ ulint
buf_calc_page_new_checksum( buf_calc_page_new_checksum(
/*=======================*/ /*=======================*/
/* out: checksum */ /* out: checksum */
byte* page) /* in: buffer page */ uchar* page) /* in: buffer page */
{ {
ulint checksum; ulint checksum;
@ -123,7 +123,7 @@ ulint
buf_calc_page_old_checksum( buf_calc_page_old_checksum(
/*=======================*/ /*=======================*/
/* out: checksum */ /* out: checksum */
byte* page) /* in: buffer page */ uchar* page) /* in: buffer page */
{ {
ulint checksum; ulint checksum;
@ -138,7 +138,7 @@ buf_calc_page_old_checksum(
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
FILE *f; /* our input file */ FILE *f; /* our input file */
byte *p; /* storage of pages read */ uchar *p; /* storage of pages read */
int bytes; /* bytes read count */ int bytes; /* bytes read count */
ulint ct; /* current page number (0 based) */ ulint ct; /* current page number (0 based) */
int now; /* current time */ int now; /* current time */
@ -256,7 +256,7 @@ int main(int argc, char **argv)
} }
/* allocate buffer for reading (so we don't realloc every time) */ /* allocate buffer for reading (so we don't realloc every time) */
p= (byte *)malloc(UNIV_PAGE_SIZE); p= (uchar *)malloc(UNIV_PAGE_SIZE);
/* main checksumming loop */ /* main checksumming loop */
ct= start_page; ct= start_page;

View File

@ -47,30 +47,30 @@ static struct my_option my_long_options[] =
added if the file has no extension) added if the file has no extension)
*/ */
{"config-file", 'c', "Deprecated, please use --defaults-file instead. Name of config file to read; if no extension is given, default extension (e.g., .ini or .cnf) will be added", {"config-file", 'c', "Deprecated, please use --defaults-file instead. Name of config file to read; if no extension is given, default extension (e.g., .ini or .cnf) will be added",
(gptr*) &config_file, (gptr*) &config_file, 0, GET_STR, REQUIRED_ARG, (uchar**) &config_file, (uchar**) &config_file, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
#ifdef DBUG_OFF #ifdef DBUG_OFF
{"debug", '#', "This is a non-debug version. Catch this and exit", {"debug", '#', "This is a non-debug version. Catch this and exit",
0,0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0}, 0,0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
#else #else
{"debug", '#', "Output debug log", (gptr*) &default_dbug_option, {"debug", '#', "Output debug log", (uchar**) &default_dbug_option,
(gptr*) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
{"defaults-file", 'c', "Like --config-file, except: if first option, then read this file only, do not read global or per-user config files; should be the first option", {"defaults-file", 'c', "Like --config-file, except: if first option, then read this file only, do not read global or per-user config files; should be the first option",
(gptr*) &config_file, (gptr*) &config_file, 0, GET_STR, REQUIRED_ARG, (uchar**) &config_file, (uchar**) &config_file, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{"defaults-extra-file", 'e', {"defaults-extra-file", 'e',
"Read this file after the global config file and before the config file in the users home directory; should be the first option", "Read this file after the global config file and before the config file in the users home directory; should be the first option",
(gptr*) &my_defaults_extra_file, (gptr*) &my_defaults_extra_file, 0, (uchar**) &my_defaults_extra_file, (uchar**) &my_defaults_extra_file, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"defaults-group-suffix", 'g', {"defaults-group-suffix", 'g',
"In addition to the given groups, read also groups with this suffix", "In addition to the given groups, read also groups with this suffix",
(gptr*) &my_defaults_group_suffix, (gptr*) &my_defaults_group_suffix, (uchar**) &my_defaults_group_suffix, (uchar**) &my_defaults_group_suffix,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"extra-file", 'e', {"extra-file", 'e',
"Deprecated. Synonym for --defaults-extra-file.", "Deprecated. Synonym for --defaults-extra-file.",
(gptr*) &my_defaults_extra_file, (uchar**) &my_defaults_extra_file,
(gptr*) &my_defaults_extra_file, 0, GET_STR, (uchar**) &my_defaults_extra_file, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"no-defaults", 'n', "Return an empty string (useful for scripts).", {"no-defaults", 'n', "Return an empty string (useful for scripts).",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},

View File

@ -38,7 +38,7 @@ static struct my_option my_long_options[] =
0, 0, 0, 0, 0}, 0, 0, 0, 0, 0},
{"verbose", 'v', {"verbose", 'v',
"Be more verbose. Give a warning, if kill can't handle signal 0.", "Be more verbose. Give a warning, if kill can't handle signal 0.",
(gptr*) &verbose, (gptr*) &verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &verbose, (uchar**) &verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"version", 'V', "Print version information and exit.", 0, 0, 0, {"version", 'V', "Print version information and exit.", 0, 0, 0,
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}

View File

@ -41,18 +41,18 @@ static struct my_option my_long_options[] =
{"info", 'I', "Synonym for --help.", 0, 0, 0, GET_NO_ARG, {"info", 'I', "Synonym for --help.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0}, NO_ARG, 0, 0, 0, 0, 0, 0},
#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE #ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
{"ndb", 257, "Ndbcluster storage engine specific error codes.", (gptr*) &ndb_code, {"ndb", 257, "Ndbcluster storage engine specific error codes.", (uchar**) &ndb_code,
(gptr*) &ndb_code, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &ndb_code, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
#ifdef HAVE_SYS_ERRLIST #ifdef HAVE_SYS_ERRLIST
{"all", 'a', "Print all the error messages and the number.", {"all", 'a', "Print all the error messages and the number.",
(gptr*) &print_all_codes, (gptr*) &print_all_codes, 0, GET_BOOL, NO_ARG, (uchar**) &print_all_codes, (uchar**) &print_all_codes, 0, GET_BOOL, NO_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
#endif #endif
{"silent", 's', "Only print the error message.", 0, 0, 0, GET_NO_ARG, NO_ARG, {"silent", 's', "Only print the error message.", 0, 0, 0, GET_NO_ARG, NO_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{"verbose", 'v', "Print error code and message (default).", (gptr*) &verbose, {"verbose", 'v', "Print error code and message (default).", (uchar**) &verbose,
(gptr*) &verbose, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, (uchar**) &verbose, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
{"version", 'V', "Displays version information and exits.", {"version", 'V', "Displays version information and exits.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} {0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}

View File

@ -51,7 +51,7 @@
typedef struct st_pointer_array { /* when using array-strings */ typedef struct st_pointer_array { /* when using array-strings */
TYPELIB typelib; /* Pointer to strings */ TYPELIB typelib; /* Pointer to strings */
byte *str; /* Strings is here */ uchar *str; /* Strings is here */
int7 *flag; /* Flag about each var. */ int7 *flag; /* Flag about each var. */
uint array_allocs,max_count,length,max_length; uint array_allocs,max_count,length,max_length;
} POINTER_ARRAY; } POINTER_ARRAY;
@ -83,14 +83,14 @@ static int static_get_options(int *argc,char * * *argv);
static int get_replace_strings(int *argc,char * * *argv, static int get_replace_strings(int *argc,char * * *argv,
POINTER_ARRAY *from_array, POINTER_ARRAY *from_array,
POINTER_ARRAY *to_array); POINTER_ARRAY *to_array);
static int insert_pointer_name(POINTER_ARRAY *pa, my_string name); static int insert_pointer_name(POINTER_ARRAY *pa, char * name);
static void free_pointer_array(POINTER_ARRAY *pa); static void free_pointer_array(POINTER_ARRAY *pa);
static int convert_pipe(REPLACE *,FILE *,FILE *); static int convert_pipe(REPLACE *,FILE *,FILE *);
static int convert_file(REPLACE *, my_string); static int convert_file(REPLACE *, char *);
static REPLACE *init_replace(my_string *from, my_string *to,uint count, static REPLACE *init_replace(char * *from, char * *to,uint count,
my_string word_end_chars); char * word_end_chars);
static uint replace_strings(REPLACE *rep, my_string *start,uint *max_length, static uint replace_strings(REPLACE *rep, char * *start,uint *max_length,
my_string from); char * from);
static int initialize_buffer(void); static int initialize_buffer(void);
static void reset_buffer(void); static void reset_buffer(void);
static void free_buffer(void); static void free_buffer(void);
@ -245,10 +245,10 @@ POINTER_ARRAY *from_array,*to_array;
return 0; return 0;
} }
static int insert_pointer_name(reg1 POINTER_ARRAY *pa,my_string name) static int insert_pointer_name(reg1 POINTER_ARRAY *pa,char * name)
{ {
uint i,length,old_count; uint i,length,old_count;
byte *new_pos; uchar *new_pos;
const char **new_array; const char **new_array;
DBUG_ENTER("insert_pointer_name"); DBUG_ENTER("insert_pointer_name");
@ -256,16 +256,16 @@ static int insert_pointer_name(reg1 POINTER_ARRAY *pa,my_string name)
{ {
if (!(pa->typelib.type_names=(const char **) if (!(pa->typelib.type_names=(const char **)
my_malloc(((PC_MALLOC-MALLOC_OVERHEAD)/ my_malloc(((PC_MALLOC-MALLOC_OVERHEAD)/
(sizeof(my_string)+sizeof(*pa->flag))* (sizeof(char *)+sizeof(*pa->flag))*
(sizeof(my_string)+sizeof(*pa->flag))),MYF(MY_WME)))) (sizeof(char *)+sizeof(*pa->flag))),MYF(MY_WME))))
DBUG_RETURN(-1); DBUG_RETURN(-1);
if (!(pa->str= (byte*) my_malloc((uint) (PS_MALLOC-MALLOC_OVERHEAD), if (!(pa->str= (uchar*) my_malloc((uint) (PS_MALLOC-MALLOC_OVERHEAD),
MYF(MY_WME)))) MYF(MY_WME))))
{ {
my_free((gptr) pa->typelib.type_names,MYF(0)); my_free((uchar*) pa->typelib.type_names,MYF(0));
DBUG_RETURN (-1); DBUG_RETURN (-1);
} }
pa->max_count=(PC_MALLOC-MALLOC_OVERHEAD)/(sizeof(byte*)+ pa->max_count=(PC_MALLOC-MALLOC_OVERHEAD)/(sizeof(uchar*)+
sizeof(*pa->flag)); sizeof(*pa->flag));
pa->flag= (int7*) (pa->typelib.type_names+pa->max_count); pa->flag= (int7*) (pa->typelib.type_names+pa->max_count);
pa->length=0; pa->length=0;
@ -277,7 +277,7 @@ static int insert_pointer_name(reg1 POINTER_ARRAY *pa,my_string name)
{ {
pa->max_length=(pa->length+length+MALLOC_OVERHEAD+PS_MALLOC-1)/PS_MALLOC; pa->max_length=(pa->length+length+MALLOC_OVERHEAD+PS_MALLOC-1)/PS_MALLOC;
pa->max_length=pa->max_length*PS_MALLOC-MALLOC_OVERHEAD; pa->max_length=pa->max_length*PS_MALLOC-MALLOC_OVERHEAD;
if (!(new_pos= (byte*) my_realloc((gptr) pa->str, if (!(new_pos= (uchar*) my_realloc((uchar*) pa->str,
(uint) pa->max_length, (uint) pa->max_length,
MYF(MY_WME)))) MYF(MY_WME))))
DBUG_RETURN(1); DBUG_RETURN(1);
@ -295,17 +295,17 @@ static int insert_pointer_name(reg1 POINTER_ARRAY *pa,my_string name)
int len; int len;
pa->array_allocs++; pa->array_allocs++;
len=(PC_MALLOC*pa->array_allocs - MALLOC_OVERHEAD); len=(PC_MALLOC*pa->array_allocs - MALLOC_OVERHEAD);
if (!(new_array=(const char **) my_realloc((gptr) pa->typelib.type_names, if (!(new_array=(const char **) my_realloc((uchar*) pa->typelib.type_names,
(uint) len/ (uint) len/
(sizeof(byte*)+sizeof(*pa->flag))* (sizeof(uchar*)+sizeof(*pa->flag))*
(sizeof(byte*)+sizeof(*pa->flag)), (sizeof(uchar*)+sizeof(*pa->flag)),
MYF(MY_WME)))) MYF(MY_WME))))
DBUG_RETURN(1); DBUG_RETURN(1);
pa->typelib.type_names=new_array; pa->typelib.type_names=new_array;
old_count=pa->max_count; old_count=pa->max_count;
pa->max_count=len/(sizeof(byte*) + sizeof(*pa->flag)); pa->max_count=len/(sizeof(uchar*) + sizeof(*pa->flag));
pa->flag= (int7*) (pa->typelib.type_names+pa->max_count); pa->flag= (int7*) (pa->typelib.type_names+pa->max_count);
memcpy((byte*) pa->flag,(my_string) (pa->typelib.type_names+old_count), memcpy((uchar*) pa->flag,(char *) (pa->typelib.type_names+old_count),
old_count*sizeof(*pa->flag)); old_count*sizeof(*pa->flag));
} }
pa->flag[pa->typelib.count]=0; /* Reset flag */ pa->flag[pa->typelib.count]=0; /* Reset flag */
@ -324,9 +324,9 @@ static void free_pointer_array(reg1 POINTER_ARRAY *pa)
if (pa->typelib.count) if (pa->typelib.count)
{ {
pa->typelib.count=0; pa->typelib.count=0;
my_free((gptr) pa->typelib.type_names,MYF(0)); my_free((uchar*) pa->typelib.type_names,MYF(0));
pa->typelib.type_names=0; pa->typelib.type_names=0;
my_free((gptr) pa->str,MYF(0)); my_free((uchar*) pa->str,MYF(0));
} }
return; return;
} /* free_pointer_array */ } /* free_pointer_array */
@ -380,23 +380,23 @@ static int get_next_bit(REP_SET *set,uint lastpos);
static short find_set(REP_SETS *sets,REP_SET *find); static short find_set(REP_SETS *sets,REP_SET *find);
static short find_found(FOUND_SET *found_set,uint table_offset, static short find_found(FOUND_SET *found_set,uint table_offset,
int found_offset); int found_offset);
static uint start_at_word(my_string pos); static uint start_at_word(char * pos);
static uint end_of_word(my_string pos); static uint end_of_word(char * pos);
static uint replace_len(my_string pos); static uint replace_len(char * pos);
static uint found_sets=0; static uint found_sets=0;
/* Init a replace structure for further calls */ /* Init a replace structure for further calls */
static REPLACE *init_replace(my_string *from, my_string *to,uint count, static REPLACE *init_replace(char * *from, char * *to,uint count,
my_string word_end_chars) char * word_end_chars)
{ {
uint i,j,states,set_nr,len,result_len,max_length,found_end,bits_set,bit_nr; uint i,j,states,set_nr,len,result_len,max_length,found_end,bits_set,bit_nr;
int used_sets,chr; int used_sets,chr;
short default_state; short default_state;
char used_chars[LAST_CHAR_CODE],is_word_end[256]; char used_chars[LAST_CHAR_CODE],is_word_end[256];
my_string pos,to_pos,*to_array; char * pos, *to_pos, **to_array;
REP_SETS sets; REP_SETS sets;
REP_SET *set,*start_states,*word_states,*new_set; REP_SET *set,*start_states,*word_states,*new_set;
FOLLOWS *follow,*follow_ptr; FOLLOWS *follow,*follow_ptr;
@ -441,7 +441,7 @@ static REPLACE *init_replace(my_string *from, my_string *to,uint count,
if (!(follow=(FOLLOWS*) my_malloc((states+2)*sizeof(FOLLOWS),MYF(MY_WME)))) if (!(follow=(FOLLOWS*) my_malloc((states+2)*sizeof(FOLLOWS),MYF(MY_WME))))
{ {
free_sets(&sets); free_sets(&sets);
my_free((gptr) found_set,MYF(0)); my_free((uchar*) found_set,MYF(0));
DBUG_RETURN(0); DBUG_RETURN(0);
} }
@ -632,12 +632,12 @@ static REPLACE *init_replace(my_string *from, my_string *to,uint count,
if ((replace=(REPLACE*) my_malloc(sizeof(REPLACE)*(sets.count)+ if ((replace=(REPLACE*) my_malloc(sizeof(REPLACE)*(sets.count)+
sizeof(REPLACE_STRING)*(found_sets+1)+ sizeof(REPLACE_STRING)*(found_sets+1)+
sizeof(my_string)*count+result_len, sizeof(char *)*count+result_len,
MYF(MY_WME | MY_ZEROFILL)))) MYF(MY_WME | MY_ZEROFILL))))
{ {
rep_str=(REPLACE_STRING*) (replace+sets.count); rep_str=(REPLACE_STRING*) (replace+sets.count);
to_array=(my_string*) (rep_str+found_sets+1); to_array=(char **) (rep_str+found_sets+1);
to_pos=(my_string) (to_array+count); to_pos=(char *) (to_array+count);
for (i=0 ; i < count ; i++) for (i=0 ; i < count ; i++)
{ {
to_array[i]=to_pos; to_array[i]=to_pos;
@ -663,9 +663,9 @@ static REPLACE *init_replace(my_string *from, my_string *to,uint count,
replace[i].next[j]=(REPLACE*) (rep_str+(-sets.set[i].next[j]-1)); replace[i].next[j]=(REPLACE*) (rep_str+(-sets.set[i].next[j]-1));
} }
} }
my_free((gptr) follow,MYF(0)); my_free((uchar*) follow,MYF(0));
free_sets(&sets); free_sets(&sets);
my_free((gptr) found_set,MYF(0)); my_free((uchar*) found_set,MYF(0));
DBUG_PRINT("exit",("Replace table has %d states",sets.count)); DBUG_PRINT("exit",("Replace table has %d states",sets.count));
DBUG_RETURN(replace); DBUG_RETURN(replace);
} }
@ -681,7 +681,7 @@ static int init_sets(REP_SETS *sets,uint states)
if (!(sets->bit_buffer=(uint*) my_malloc(sizeof(uint)*sets->size_of_bits* if (!(sets->bit_buffer=(uint*) my_malloc(sizeof(uint)*sets->size_of_bits*
SET_MALLOC_HUNC,MYF(MY_WME)))) SET_MALLOC_HUNC,MYF(MY_WME))))
{ {
my_free((gptr) sets->set,MYF(0)); my_free((uchar*) sets->set,MYF(0));
return 1; return 1;
} }
return 0; return 0;
@ -713,13 +713,13 @@ static REP_SET *make_new_set(REP_SETS *sets)
return set; return set;
} }
count=sets->count+sets->invisible+SET_MALLOC_HUNC; count=sets->count+sets->invisible+SET_MALLOC_HUNC;
if (!(set=(REP_SET*) my_realloc((gptr) sets->set_buffer, if (!(set=(REP_SET*) my_realloc((uchar*) sets->set_buffer,
sizeof(REP_SET)*count, sizeof(REP_SET)*count,
MYF(MY_WME)))) MYF(MY_WME))))
return 0; return 0;
sets->set_buffer=set; sets->set_buffer=set;
sets->set=set+sets->invisible; sets->set=set+sets->invisible;
if (!(bit_buffer=(uint*) my_realloc((gptr) sets->bit_buffer, if (!(bit_buffer=(uint*) my_realloc((uchar*) sets->bit_buffer,
(sizeof(uint)*sets->size_of_bits)*count, (sizeof(uint)*sets->size_of_bits)*count,
MYF(MY_WME)))) MYF(MY_WME))))
return 0; return 0;
@ -742,8 +742,8 @@ static void free_last_set(REP_SETS *sets)
static void free_sets(REP_SETS *sets) static void free_sets(REP_SETS *sets)
{ {
my_free((gptr)sets->set_buffer,MYF(0)); my_free((uchar*)sets->set_buffer,MYF(0));
my_free((gptr)sets->bit_buffer,MYF(0)); my_free((uchar*)sets->bit_buffer,MYF(0));
return; return;
} }
@ -770,13 +770,13 @@ static void or_bits(REP_SET *to,REP_SET *from)
static void copy_bits(REP_SET *to,REP_SET *from) static void copy_bits(REP_SET *to,REP_SET *from)
{ {
memcpy((byte*) to->bits,(byte*) from->bits, memcpy((uchar*) to->bits,(uchar*) from->bits,
(size_t) (sizeof(uint) * to->size_of_bits)); (size_t) (sizeof(uint) * to->size_of_bits));
} }
static int cmp_bits(REP_SET *set1,REP_SET *set2) static int cmp_bits(REP_SET *set1,REP_SET *set2)
{ {
return bcmp((byte*) set1->bits,(byte*) set2->bits, return bcmp((uchar*) set1->bits,(uchar*) set2->bits,
sizeof(uint) * set1->size_of_bits); sizeof(uint) * set1->size_of_bits);
} }
@ -847,21 +847,21 @@ static short find_found(FOUND_SET *found_set,uint table_offset,
/* Return 1 if regexp starts with \b or ends with \b*/ /* Return 1 if regexp starts with \b or ends with \b*/
static uint start_at_word(my_string pos) static uint start_at_word(char * pos)
{ {
return (((!bcmp(pos,"\\b",2) && pos[2]) || !bcmp(pos,"\\^",2)) ? 1 : 0); return (((!bcmp(pos,"\\b",2) && pos[2]) || !bcmp(pos,"\\^",2)) ? 1 : 0);
} }
static uint end_of_word(my_string pos) static uint end_of_word(char * pos)
{ {
my_string end=strend(pos); char * end=strend(pos);
return ((end > pos+2 && !bcmp(end-2,"\\b",2)) || return ((end > pos+2 && !bcmp(end-2,"\\b",2)) ||
(end >= pos+2 && !bcmp(end-2,"\\$",2))) ? (end >= pos+2 && !bcmp(end-2,"\\$",2))) ?
1 : 0; 1 : 0;
} }
static uint replace_len(my_string str) static uint replace_len(char * str)
{ {
uint len=0; uint len=0;
while (*str) while (*str)
@ -877,12 +877,12 @@ static uint replace_len(my_string str)
/* The actual loop */ /* The actual loop */
static uint replace_strings(REPLACE *rep, my_string *start,uint *max_length, static uint replace_strings(REPLACE *rep, char **start, uint *max_length,
my_string from) char *from)
{ {
reg1 REPLACE *rep_pos; reg1 REPLACE *rep_pos;
reg2 REPLACE_STRING *rep_str; reg2 REPLACE_STRING *rep_str;
my_string to,end,pos,new; char *to, *end, *pos, *new;
end=(to= *start) + *max_length-1; end=(to= *start) + *max_length-1;
rep_pos=rep+1; rep_pos=rep+1;
@ -903,7 +903,7 @@ static uint replace_strings(REPLACE *rep, my_string *start,uint *max_length,
} }
if (!(rep_str = ((REPLACE_STRING*) rep_pos))->replace_string) if (!(rep_str = ((REPLACE_STRING*) rep_pos))->replace_string)
return (uint) (to - *start)-1; return (uint) (to - *start)-1;
updated=1; /* Some my_string is replaced */ updated=1; /* Some char * is replaced */
to-=rep_str->to_offset; to-=rep_str->to_offset;
for (pos=rep_str->replace_string; *pos ; pos++) for (pos=rep_str->replace_string; *pos ; pos++)
{ {
@ -1047,7 +1047,7 @@ FILE *in,*out;
} }
static int convert_file(REPLACE *rep, my_string name) static int convert_file(REPLACE *rep, char * name)
{ {
int error; int error;
FILE *in,*out; FILE *in,*out;
@ -1056,6 +1056,7 @@ static int convert_file(REPLACE *rep, my_string name)
char link_name[FN_REFLEN]; char link_name[FN_REFLEN];
#endif #endif
File temp_file; File temp_file;
size_t dir_buff_length;
DBUG_ENTER("convert_file"); DBUG_ENTER("convert_file");
/* check if name is a symlink */ /* check if name is a symlink */
@ -1065,7 +1066,7 @@ static int convert_file(REPLACE *rep, my_string name)
#endif #endif
if (!(in= my_fopen(org_name,O_RDONLY,MYF(MY_WME)))) if (!(in= my_fopen(org_name,O_RDONLY,MYF(MY_WME))))
DBUG_RETURN(1); DBUG_RETURN(1);
dirname_part(dir_buff,org_name); dirname_part(dir_buff, org_name, &dir_buff_length);
if ((temp_file= create_temp_file(tempname, dir_buff, "PR", O_WRONLY, if ((temp_file= create_temp_file(tempname, dir_buff, "PR", O_WRONLY,
MYF(MY_WME))) < 0) MYF(MY_WME))) < 0)
{ {

View File

@ -53,10 +53,10 @@ static struct my_option my_long_options[] =
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"version", 'V', "Output version information and exit.", {"version", 'V', "Output version information and exit.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"symbols-file", 's', "Use specified symbols file.", (gptr*) &sym_fname, {"symbols-file", 's', "Use specified symbols file.", (uchar**) &sym_fname,
(gptr*) &sym_fname, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &sym_fname, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"numeric-dump-file", 'n', "Read the dump from specified file.", {"numeric-dump-file", 'n', "Read the dump from specified file.",
(gptr*) &dump_fname, (gptr*) &dump_fname, 0, GET_STR, REQUIRED_ARG, (uchar**) &dump_fname, (uchar**) &dump_fname, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
}; };
@ -235,7 +235,7 @@ static void init_sym_table()
SYM_ENTRY se; SYM_ENTRY se;
if (init_sym_entry(&se, buf)) if (init_sym_entry(&se, buf))
continue; continue;
if (insert_dynamic(&sym_table, (gptr)&se)) if (insert_dynamic(&sym_table, (uchar*)&se))
die("insert_dynamic() failed - looks like we are out of memory"); die("insert_dynamic() failed - looks like we are out of memory");
} }
@ -255,7 +255,7 @@ static void verify_sort()
for (i = 0; i < sym_table.elements; i++) for (i = 0; i < sym_table.elements; i++)
{ {
SYM_ENTRY se; SYM_ENTRY se;
get_dynamic(&sym_table, (gptr)&se, i); get_dynamic(&sym_table, (uchar*)&se, i);
if (se.addr < last) if (se.addr < last)
die("sym table does not appear to be sorted, did you forget \ die("sym table does not appear to be sorted, did you forget \
--numeric-sort arg to nm? trouble addr = %p, last = %p", se.addr, last); --numeric-sort arg to nm? trouble addr = %p, last = %p", se.addr, last);
@ -267,16 +267,16 @@ static void verify_sort()
static SYM_ENTRY* resolve_addr(uchar* addr, SYM_ENTRY* se) static SYM_ENTRY* resolve_addr(uchar* addr, SYM_ENTRY* se)
{ {
uint i; uint i;
get_dynamic(&sym_table, (gptr)se, 0); get_dynamic(&sym_table, (uchar*)se, 0);
if (addr < se->addr) if (addr < se->addr)
return 0; return 0;
for (i = 1; i < sym_table.elements; i++) for (i = 1; i < sym_table.elements; i++)
{ {
get_dynamic(&sym_table, (gptr)se, i); get_dynamic(&sym_table, (uchar*)se, i);
if (addr < se->addr) if (addr < se->addr)
{ {
get_dynamic(&sym_table, (gptr)se, i - 1); get_dynamic(&sym_table, (uchar*)se, i - 1);
return se; return se;
} }
} }

View File

@ -43,7 +43,7 @@ static struct my_option my_long_options[] =
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"info", 'I', "Synonym for --help.", {"info", 'I', "Synonym for --help.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"silent", 's', "Be more silent.", (gptr*) &silent, (gptr*) &silent, {"silent", 's', "Be more silent.", (uchar**) &silent, (uchar**) &silent,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"version", 'V', "Displays version information and exits.", {"version", 'V', "Displays version information and exits.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
@ -83,7 +83,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
return 0; return 0;
} }
/*static my_string load_default_groups[]= { "resolveip","client",0 }; */ /*static char * load_default_groups[]= { "resolveip","client",0 }; */
static int get_options(int *argc,char ***argv) static int get_options(int *argc,char ***argv)
{ {

View File

@ -310,10 +310,10 @@ inline double ulonglong2double(ulonglong value)
#define doublestore(T,V) do { *((long *) T) = *((long*) &V); \ #define doublestore(T,V) do { *((long *) T) = *((long*) &V); \
*(((long *) T)+1) = *(((long*) &V)+1); } while(0) *(((long *) T)+1) = *(((long*) &V)+1); } while(0)
#define float4get(V,M) { *((long *) &(V)) = *((long*) (M)); } #define float4get(V,M) { *((long *) &(V)) = *((long*) (M)); }
#define floatstore(T,V) memcpy((byte*)(T), (byte*)(&V), sizeof(float)) #define floatstore(T,V) memcpy((uchar*)(T), (uchar*)(&V), sizeof(float))
#define floatget(V,M) memcpy((byte*)(&V), (byte*)(M), sizeof(float)) #define floatget(V,M) memcpy((uchar*)(&V), (uchar*)(M), sizeof(float))
#define float8get(V,M) doubleget((V),(M)) #define float8get(V,M) doubleget((V),(M))
#define float4store(V,M) memcpy((byte*) V,(byte*) (&M),sizeof(float)) #define float4store(V,M) memcpy((uchar*) V,(uchar*) (&M),sizeof(float))
#define float8store(V,M) doublestore((V),(M)) #define float8store(V,M) doublestore((V),(M))
#endif /* _WIN64 */ #endif /* _WIN64 */
@ -350,7 +350,10 @@ inline double ulonglong2double(ulonglong value)
#define SPRINTF_RETURNS_INT #define SPRINTF_RETURNS_INT
#define HAVE_SETFILEPOINTER #define HAVE_SETFILEPOINTER
#define HAVE_VIO_READ_BUFF #define HAVE_VIO_READ_BUFF
#if defined(_MSC_VER) && _MSC_VER >= 1400
/* strnlen() appeared in Studio 2005 */
#define HAVE_STRNLEN #define HAVE_STRNLEN
#endif
#define HAVE_WINSOCK2 #define HAVE_WINSOCK2
#define strcasecmp stricmp #define strcasecmp stricmp
@ -411,16 +414,7 @@ inline double ulonglong2double(ulonglong value)
#ifdef __NT__ /* This should also work on Win98 but .. */ #ifdef __NT__ /* This should also work on Win98 but .. */
#define thread_safe_add(V,C,L) InterlockedExchangeAdd((long*) &(V),(C)) #define thread_safe_add(V,C,L) InterlockedExchangeAdd((long*) &(V),(C))
#define thread_safe_sub(V,C,L) InterlockedExchangeAdd((long*) &(V),-(long) (C)) #define thread_safe_sub(V,C,L) InterlockedExchangeAdd((long*) &(V),-(long) (C))
#define statistic_add(V,C,L) thread_safe_add((V),(C),(L))
#else
#define thread_safe_add(V,C,L) \
pthread_mutex_lock((L)); (V)+=(C); pthread_mutex_unlock((L));
#define thread_safe_sub(V,C,L) \
pthread_mutex_lock((L)); (V)-=(C); pthread_mutex_unlock((L));
#define statistic_add(V,C,L) (V)+=(C)
#endif #endif
#define statistic_increment(V,L) thread_safe_increment((V),(L))
#define statistic_decrement(V,L) thread_safe_decrement((V),(L))
#define shared_memory_buffer_length 16000 #define shared_memory_buffer_length 16000
#define default_shared_memory_base_name "MYSQL" #define default_shared_memory_base_name "MYSQL"

View File

@ -39,8 +39,8 @@ int longlong2decimal(longlong from, decimal_t *to);
int decimal2double(decimal_t *from, double *to); int decimal2double(decimal_t *from, double *to);
int double2decimal(double from, decimal_t *to); int double2decimal(double from, decimal_t *to);
int decimal_actual_fraction(decimal_t *from); int decimal_actual_fraction(decimal_t *from);
int decimal2bin(decimal_t *from, char *to, int precision, int scale); int decimal2bin(decimal_t *from, uchar *to, int precision, int scale);
int bin2decimal(char *from, decimal_t *to, int precision, int scale); int bin2decimal(const uchar *from, decimal_t *to, int precision, int scale);
int decimal_size(int precision, int scale); int decimal_size(int precision, int scale);
int decimal_bin_size(int precision, int scale); int decimal_bin_size(int precision, int scale);

View File

@ -32,7 +32,7 @@ typedef struct st_ft_info FT_INFO;
struct _ft_vft struct _ft_vft
{ {
int (*read_next)(FT_INFO *, char *); int (*read_next)(FT_INFO *, char *);
float (*find_relevance)(FT_INFO *, byte *, uint); float (*find_relevance)(FT_INFO *, uchar *, uint);
void (*close_search)(FT_INFO *); void (*close_search)(FT_INFO *);
float (*get_relevance)(FT_INFO *); float (*get_relevance)(FT_INFO *);
void (*reinit_search)(FT_INFO *); void (*reinit_search)(FT_INFO *);
@ -62,8 +62,8 @@ void ft_free_stopwords(void);
#define FT_SORTED 2 #define FT_SORTED 2
#define FT_EXPAND 4 /* query expansion */ #define FT_EXPAND 4 /* query expansion */
FT_INFO *ft_init_search(uint,void *, uint, byte *, uint,CHARSET_INFO *, byte *); FT_INFO *ft_init_search(uint,void *, uint, uchar *, uint,CHARSET_INFO *, uchar *);
my_bool ft_boolean_check_syntax_string(const byte *); my_bool ft_boolean_check_syntax_string(const uchar *);
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -30,12 +30,13 @@ extern "C" {
/* flags for hash_init */ /* flags for hash_init */
#define HASH_UNIQUE 1 /* hash_insert fails on duplicate key */ #define HASH_UNIQUE 1 /* hash_insert fails on duplicate key */
typedef byte *(*hash_get_key)(const byte *,uint*,my_bool); typedef uchar *(*hash_get_key)(const uchar *,size_t*,my_bool);
typedef void (*hash_free_key)(void *); typedef void (*hash_free_key)(void *);
typedef struct st_hash { typedef struct st_hash {
uint key_offset,key_length; /* Length of key if const length */ size_t key_offset,key_length; /* Length of key if const length */
uint records, blength; size_t blength;
ulong records;
uint flags; uint flags;
DYNAMIC_ARRAY array; /* Place for hash_keys */ DYNAMIC_ARRAY array; /* Place for hash_keys */
hash_get_key get_key; hash_get_key get_key;
@ -48,21 +49,21 @@ typedef uint HASH_SEARCH_STATE;
#define hash_init(A,B,C,D,E,F,G,H) _hash_init(A,B,C,D,E,F,G, H CALLER_INFO) #define hash_init(A,B,C,D,E,F,G,H) _hash_init(A,B,C,D,E,F,G, H CALLER_INFO)
my_bool _hash_init(HASH *hash, CHARSET_INFO *charset, my_bool _hash_init(HASH *hash, CHARSET_INFO *charset,
uint default_array_elements, uint key_offset, ulong default_array_elements, size_t key_offset,
uint key_length, hash_get_key get_key, size_t key_length, hash_get_key get_key,
void (*free_element)(void*), uint flags CALLER_INFO_PROTO); void (*free_element)(void*), uint flags CALLER_INFO_PROTO);
void hash_free(HASH *tree); void hash_free(HASH *tree);
void my_hash_reset(HASH *hash); void my_hash_reset(HASH *hash);
byte *hash_element(HASH *hash,uint idx); uchar *hash_element(HASH *hash,ulong idx);
gptr hash_search(const HASH *info, const byte *key, uint length); uchar *hash_search(const HASH *info, const uchar *key, size_t length);
gptr hash_first(const HASH *info, const byte *key, uint length, uchar *hash_first(const HASH *info, const uchar *key, size_t length,
HASH_SEARCH_STATE *state); HASH_SEARCH_STATE *state);
gptr hash_next(const HASH *info, const byte *key, uint length, uchar *hash_next(const HASH *info, const uchar *key, size_t length,
HASH_SEARCH_STATE *state); HASH_SEARCH_STATE *state);
my_bool my_hash_insert(HASH *info,const byte *data); my_bool my_hash_insert(HASH *info,const uchar *data);
my_bool hash_delete(HASH *hash,byte *record); my_bool hash_delete(HASH *hash,uchar *record);
my_bool hash_update(HASH *hash,byte *record,byte *old_key,uint old_key_length); my_bool hash_update(HASH *hash,uchar *record,uchar *old_key,size_t old_key_length);
void hash_replace(HASH *hash, HASH_SEARCH_STATE *state, byte *new_row); void hash_replace(HASH *hash, HASH_SEARCH_STATE *state, uchar *new_row);
my_bool hash_check(HASH *hash); /* Only in debug library */ my_bool hash_check(HASH *hash); /* Only in debug library */
#define hash_clear(H) bzero((char*) (H),sizeof(*(H))) #define hash_clear(H) bzero((char*) (H),sizeof(*(H)))

View File

@ -57,7 +57,7 @@ typedef struct st_heapinfo /* Struct from heap_info */
typedef struct st_heap_ptrs typedef struct st_heap_ptrs
{ {
byte *blocks[HP_PTRS_IN_NOD]; /* pointers to HP_PTRS or records */ uchar *blocks[HP_PTRS_IN_NOD]; /* pointers to HP_PTRS or records */
} HP_PTRS; } HP_PTRS;
struct st_level_info struct st_level_info
@ -70,7 +70,7 @@ struct st_level_info
of last_blocks array. For level 0 - 1, for level 1 - HP_PTRS_IN_NOD, for of last_blocks array. For level 0 - 1, for level 1 - HP_PTRS_IN_NOD, for
level 2 - HP_PTRS_IN_NOD^2 and so forth. level 2 - HP_PTRS_IN_NOD^2 and so forth.
*/ */
uint records_under_level; ulong records_under_level;
/* /*
Ptr to last allocated HP_PTRS (or records buffer for level 0) on this Ptr to last allocated HP_PTRS (or records buffer for level 0) on this
@ -123,10 +123,10 @@ typedef struct st_hp_keydef /* Key definition with open */
ha_rows hash_buckets; ha_rows hash_buckets;
TREE rb_tree; TREE rb_tree;
int (*write_key)(struct st_heap_info *info, struct st_hp_keydef *keyinfo, int (*write_key)(struct st_heap_info *info, struct st_hp_keydef *keyinfo,
const byte *record, byte *recpos); const uchar *record, uchar *recpos);
int (*delete_key)(struct st_heap_info *info, struct st_hp_keydef *keyinfo, int (*delete_key)(struct st_heap_info *info, struct st_hp_keydef *keyinfo,
const byte *record, byte *recpos, int flag); const uchar *record, uchar *recpos, int flag);
uint (*get_key_length)(struct st_hp_keydef *keydef, const byte *key); uint (*get_key_length)(struct st_hp_keydef *keydef, const uchar *key);
} HP_KEYDEF; } HP_KEYDEF;
typedef struct st_heap_share typedef struct st_heap_share
@ -144,8 +144,8 @@ typedef struct st_heap_share
uint keys,max_key_length; uint keys,max_key_length;
uint currently_disabled_keys; /* saved value from "keys" when disabled */ uint currently_disabled_keys; /* saved value from "keys" when disabled */
uint open_count; uint open_count;
byte *del_link; /* Link to next block with del. rec */ uchar *del_link; /* Link to next block with del. rec */
my_string name; /* Name of "memory-file" */ char * name; /* Name of "memory-file" */
#ifdef THREAD #ifdef THREAD
THR_LOCK lock; THR_LOCK lock;
pthread_mutex_t intern_lock; /* Locking for use with _locking */ pthread_mutex_t intern_lock; /* Locking for use with _locking */
@ -162,14 +162,14 @@ struct st_hp_hash_info;
typedef struct st_heap_info typedef struct st_heap_info
{ {
HP_SHARE *s; HP_SHARE *s;
byte *current_ptr; uchar *current_ptr;
struct st_hp_hash_info *current_hash_ptr; struct st_hp_hash_info *current_hash_ptr;
ulong current_record,next_block; ulong current_record,next_block;
int lastinx,errkey; int lastinx,errkey;
int mode; /* Mode of file (READONLY..) */ int mode; /* Mode of file (READONLY..) */
uint opt_flag,update; uint opt_flag,update;
byte *lastkey; /* Last used key with rkey */ uchar *lastkey; /* Last used key with rkey */
byte *recbuf; /* Record buffer for rb-tree keys */ uchar *recbuf; /* Record buffer for rb-tree keys */
enum ha_rkey_function last_find_flag; enum ha_rkey_function last_find_flag;
TREE_ELEMENT *parents[MAX_TREE_HEIGHT+1]; TREE_ELEMENT *parents[MAX_TREE_HEIGHT+1];
TREE_ELEMENT **last_pos; TREE_ELEMENT **last_pos;
@ -195,12 +195,12 @@ typedef struct st_heap_create_info
extern HP_INFO *heap_open(const char *name, int mode); extern HP_INFO *heap_open(const char *name, int mode);
extern int heap_close(HP_INFO *info); extern int heap_close(HP_INFO *info);
extern int heap_write(HP_INFO *info,const byte *buff); extern int heap_write(HP_INFO *info,const uchar *buff);
extern int heap_update(HP_INFO *info,const byte *old,const byte *newdata); extern int heap_update(HP_INFO *info,const uchar *old,const uchar *newdata);
extern int heap_rrnd(HP_INFO *info,byte *buf,byte *pos); extern int heap_rrnd(HP_INFO *info,uchar *buf,uchar *pos);
extern int heap_scan_init(HP_INFO *info); extern int heap_scan_init(HP_INFO *info);
extern int heap_scan(register HP_INFO *info, byte *record); extern int heap_scan(register HP_INFO *info, uchar *record);
extern int heap_delete(HP_INFO *info,const byte *buff); extern int heap_delete(HP_INFO *info,const uchar *buff);
extern int heap_info(HP_INFO *info,HEAPINFO *x,int flag); extern int heap_info(HP_INFO *info,HEAPINFO *x,int flag);
extern int heap_create(const char *name, uint keys, HP_KEYDEF *keydef, extern int heap_create(const char *name, uint keys, HP_KEYDEF *keydef,
uint reclength, ulong max_records, ulong min_records, uint reclength, ulong max_records, ulong min_records,
@ -211,32 +211,32 @@ extern int heap_extra(HP_INFO *info,enum ha_extra_function function);
extern int heap_reset(HP_INFO *info); extern int heap_reset(HP_INFO *info);
extern int heap_rename(const char *old_name,const char *new_name); extern int heap_rename(const char *old_name,const char *new_name);
extern int heap_panic(enum ha_panic_function flag); extern int heap_panic(enum ha_panic_function flag);
extern int heap_rsame(HP_INFO *info,byte *record,int inx); extern int heap_rsame(HP_INFO *info,uchar *record,int inx);
extern int heap_rnext(HP_INFO *info,byte *record); extern int heap_rnext(HP_INFO *info,uchar *record);
extern int heap_rprev(HP_INFO *info,byte *record); extern int heap_rprev(HP_INFO *info,uchar *record);
extern int heap_rfirst(HP_INFO *info,byte *record,int inx); extern int heap_rfirst(HP_INFO *info,uchar *record,int inx);
extern int heap_rlast(HP_INFO *info,byte *record,int inx); extern int heap_rlast(HP_INFO *info,uchar *record,int inx);
extern void heap_clear(HP_INFO *info); extern void heap_clear(HP_INFO *info);
extern void heap_clear_keys(HP_INFO *info); extern void heap_clear_keys(HP_INFO *info);
extern int heap_disable_indexes(HP_INFO *info); extern int heap_disable_indexes(HP_INFO *info);
extern int heap_enable_indexes(HP_INFO *info); extern int heap_enable_indexes(HP_INFO *info);
extern int heap_indexes_are_disabled(HP_INFO *info); extern int heap_indexes_are_disabled(HP_INFO *info);
extern void heap_update_auto_increment(HP_INFO *info, const byte *record); extern void heap_update_auto_increment(HP_INFO *info, const uchar *record);
ha_rows hp_rb_records_in_range(HP_INFO *info, int inx, key_range *min_key, ha_rows hp_rb_records_in_range(HP_INFO *info, int inx, key_range *min_key,
key_range *max_key); key_range *max_key);
int hp_panic(enum ha_panic_function flag); int hp_panic(enum ha_panic_function flag);
int heap_rkey(HP_INFO *info, byte *record, int inx, const byte *key, int heap_rkey(HP_INFO *info, uchar *record, int inx, const uchar *key,
key_part_map keypart_map, enum ha_rkey_function find_flag); key_part_map keypart_map, enum ha_rkey_function find_flag);
extern gptr heap_find(HP_INFO *info,int inx,const byte *key); extern uchar * heap_find(HP_INFO *info,int inx,const uchar *key);
extern int heap_check_heap(HP_INFO *info, my_bool print_status); extern int heap_check_heap(HP_INFO *info, my_bool print_status);
extern byte *heap_position(HP_INFO *info); extern uchar *heap_position(HP_INFO *info);
/* The following is for programs that uses the old HEAP interface where /* The following is for programs that uses the old HEAP interface where
pointer to rows where a long instead of a (byte*). pointer to rows where a long instead of a (uchar*).
*/ */
#if defined(WANT_OLD_HEAP_VERSION) || defined(OLD_HEAP_VERSION) #if defined(WANT_OLD_HEAP_VERSION) || defined(OLD_HEAP_VERSION)
extern int heap_rrnd_old(HP_INFO *info,byte *buf,ulong pos); extern int heap_rrnd_old(HP_INFO *info,uchar *buf,ulong pos);
extern ulong heap_position_old(HP_INFO *info); extern ulong heap_position_old(HP_INFO *info);
#endif #endif
#ifdef OLD_HEAP_VERSION #ifdef OLD_HEAP_VERSION
@ -244,7 +244,7 @@ typedef ulong HEAP_PTR;
#define heap_position(A) heap_position_old(A) #define heap_position(A) heap_position_old(A)
#define heap_rrnd(A,B,C) heap_rrnd_old(A,B,C) #define heap_rrnd(A,B,C) heap_rrnd_old(A,B,C)
#else #else
typedef byte *HEAP_PTR; typedef uchar *HEAP_PTR;
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -66,9 +66,9 @@ typedef struct st_key_cache
HASH_LINK **hash_root; /* arr. of entries into hash table buckets */ HASH_LINK **hash_root; /* arr. of entries into hash table buckets */
HASH_LINK *hash_link_root; /* memory for hash table links */ HASH_LINK *hash_link_root; /* memory for hash table links */
HASH_LINK *free_hash_list; /* list of free hash links */ HASH_LINK *free_hash_list; /* list of free hash links */
BLOCK_LINK *free_block_list; /* list of free blocks */ BLOCK_LINK *free_block_list; /* list of free blocks */
BLOCK_LINK *block_root; /* memory for block links */ BLOCK_LINK *block_root; /* memory for block links */
byte HUGE_PTR *block_mem; /* memory for block buffers */ uchar HUGE_PTR *block_mem; /* memory for block buffers */
BLOCK_LINK *used_last; /* ptr to the last block of the LRU chain */ BLOCK_LINK *used_last; /* ptr to the last block of the LRU chain */
BLOCK_LINK *used_ins; /* ptr to the insertion block in LRU chain */ BLOCK_LINK *used_ins; /* ptr to the insertion block in LRU chain */
pthread_mutex_t cache_lock; /* to lock access to the cache structure */ pthread_mutex_t cache_lock; /* to lock access to the cache structure */
@ -115,16 +115,16 @@ extern int resize_key_cache(KEY_CACHE *keycache, uint key_cache_block_size,
uint age_threshold); uint age_threshold);
extern void change_key_cache_param(KEY_CACHE *keycache, uint division_limit, extern void change_key_cache_param(KEY_CACHE *keycache, uint division_limit,
uint age_threshold); uint age_threshold);
extern byte *key_cache_read(KEY_CACHE *keycache, extern uchar *key_cache_read(KEY_CACHE *keycache,
File file, my_off_t filepos, int level, File file, my_off_t filepos, int level,
byte *buff, uint length, uchar *buff, uint length,
uint block_length,int return_buffer); uint block_length,int return_buffer);
extern int key_cache_insert(KEY_CACHE *keycache, extern int key_cache_insert(KEY_CACHE *keycache,
File file, my_off_t filepos, int level, File file, my_off_t filepos, int level,
byte *buff, uint length); uchar *buff, uint length);
extern int key_cache_write(KEY_CACHE *keycache, extern int key_cache_write(KEY_CACHE *keycache,
File file, my_off_t filepos, int level, File file, my_off_t filepos, int level,
byte *buff, uint length, uchar *buff, uint length,
uint block_length,int force_write); uint block_length,int force_write);
extern int flush_key_blocks(KEY_CACHE *keycache, extern int flush_key_blocks(KEY_CACHE *keycache,
int file, enum flush_type type); int file, enum flush_type type);
@ -133,8 +133,8 @@ extern void end_key_cache(KEY_CACHE *keycache, my_bool cleanup);
/* Functions to handle multiple key caches */ /* Functions to handle multiple key caches */
extern my_bool multi_keycache_init(void); extern my_bool multi_keycache_init(void);
extern void multi_keycache_free(void); extern void multi_keycache_free(void);
extern KEY_CACHE *multi_key_cache_search(byte *key, uint length); extern KEY_CACHE *multi_key_cache_search(uchar *key, uint length);
extern my_bool multi_key_cache_set(const byte *key, uint length, extern my_bool multi_key_cache_set(const uchar *key, uint length,
KEY_CACHE *key_cache); KEY_CACHE *key_cache);
extern void multi_key_cache_change(KEY_CACHE *old_data, extern void multi_key_cache_change(KEY_CACHE *old_data,
KEY_CACHE *new_data); KEY_CACHE *new_data);

View File

@ -51,8 +51,8 @@ extern MY_UNICASE_INFO *my_unicase_turkish[256];
typedef struct uni_ctype_st typedef struct uni_ctype_st
{ {
unsigned char pctype; uchar pctype;
unsigned char *ctype; uchar *ctype;
} MY_UNI_CTYPE; } MY_UNI_CTYPE;
extern MY_UNI_CTYPE my_uni_ctype[256]; extern MY_UNI_CTYPE my_uni_ctype[256];
@ -125,22 +125,22 @@ struct charset_info_st;
/* See strings/CHARSET_INFO.txt for information about this structure */ /* See strings/CHARSET_INFO.txt for information about this structure */
typedef struct my_collation_handler_st typedef struct my_collation_handler_st
{ {
my_bool (*init)(struct charset_info_st *, void *(*alloc)(uint)); my_bool (*init)(struct charset_info_st *, void *(*alloc)(size_t));
/* Collation routines */ /* Collation routines */
int (*strnncoll)(struct charset_info_st *, int (*strnncoll)(struct charset_info_st *,
const uchar *, uint, const uchar *, uint, my_bool); const uchar *, size_t, const uchar *, size_t, my_bool);
int (*strnncollsp)(struct charset_info_st *, int (*strnncollsp)(struct charset_info_st *,
const uchar *, uint, const uchar *, uint, const uchar *, size_t, const uchar *, size_t,
my_bool diff_if_only_endspace_difference); my_bool diff_if_only_endspace_difference);
int (*strnxfrm)(struct charset_info_st *, size_t (*strnxfrm)(struct charset_info_st *,
uchar *, uint, const uchar *, uint); uchar *, size_t, const uchar *, size_t);
uint (*strnxfrmlen)(struct charset_info_st *, uint); size_t (*strnxfrmlen)(struct charset_info_st *, size_t);
my_bool (*like_range)(struct charset_info_st *, my_bool (*like_range)(struct charset_info_st *,
const char *s, uint s_length, const char *s, size_t s_length,
pchar w_prefix, pchar w_one, pchar w_many, pchar w_prefix, pchar w_one, pchar w_many,
uint res_length, size_t res_length,
char *min_str, char *max_str, char *min_str, char *max_str,
uint *min_len, uint *max_len); size_t *min_len, size_t *max_len);
int (*wildcmp)(struct charset_info_st *, int (*wildcmp)(struct charset_info_st *,
const char *str,const char *str_end, const char *str,const char *str_end,
const char *wildstr,const char *wildend, const char *wildstr,const char *wildend,
@ -149,14 +149,14 @@ typedef struct my_collation_handler_st
int (*strcasecmp)(struct charset_info_st *, const char *, const char *); int (*strcasecmp)(struct charset_info_st *, const char *, const char *);
uint (*instr)(struct charset_info_st *, uint (*instr)(struct charset_info_st *,
const char *b, uint b_length, const char *b, size_t b_length,
const char *s, uint s_length, const char *s, size_t s_length,
my_match_t *match, uint nmatch); my_match_t *match, uint nmatch);
/* Hash calculation */ /* Hash calculation */
void (*hash_sort)(struct charset_info_st *cs, const uchar *key, uint len, void (*hash_sort)(struct charset_info_st *cs, const uchar *key, size_t len,
ulong *nr1, ulong *nr2); ulong *nr1, ulong *nr2);
my_bool (*propagate)(struct charset_info_st *cs, const uchar *str, uint len); my_bool (*propagate)(struct charset_info_st *cs, const uchar *str, size_t len);
} MY_COLLATION_HANDLER; } MY_COLLATION_HANDLER;
extern MY_COLLATION_HANDLER my_collation_mb_bin_handler; extern MY_COLLATION_HANDLER my_collation_mb_bin_handler;
@ -168,64 +168,67 @@ extern MY_COLLATION_HANDLER my_collation_ucs2_uca_handler;
/* See strings/CHARSET_INFO.txt about information on this structure */ /* See strings/CHARSET_INFO.txt about information on this structure */
typedef struct my_charset_handler_st typedef struct my_charset_handler_st
{ {
my_bool (*init)(struct charset_info_st *, void *(*alloc)(uint)); my_bool (*init)(struct charset_info_st *, void *(*alloc)(size_t));
/* Multibyte routines */ /* Multibyte routines */
int (*ismbchar)(struct charset_info_st *, const char *, const char *); uint (*ismbchar)(struct charset_info_st *, const char *, const char *);
int (*mbcharlen)(struct charset_info_st *, uint); uint (*mbcharlen)(struct charset_info_st *, uint c);
uint (*numchars)(struct charset_info_st *, const char *b, const char *e); size_t (*numchars)(struct charset_info_st *, const char *b, const char *e);
uint (*charpos)(struct charset_info_st *, const char *b, const char *e, uint pos); size_t (*charpos)(struct charset_info_st *, const char *b, const char *e,
uint (*well_formed_len)(struct charset_info_st *, size_t pos);
size_t (*well_formed_len)(struct charset_info_st *,
const char *b,const char *e, const char *b,const char *e,
uint nchars, int *error); size_t nchars, int *error);
uint (*lengthsp)(struct charset_info_st *, const char *ptr, uint length); size_t (*lengthsp)(struct charset_info_st *, const char *ptr, size_t length);
uint (*numcells)(struct charset_info_st *, const char *b, const char *e); size_t (*numcells)(struct charset_info_st *, const char *b, const char *e);
/* Unicode conversion */ /* Unicode conversion */
int (*mb_wc)(struct charset_info_st *cs,my_wc_t *wc, int (*mb_wc)(struct charset_info_st *cs,my_wc_t *wc,
const unsigned char *s,const unsigned char *e); const uchar *s,const uchar *e);
int (*wc_mb)(struct charset_info_st *cs,my_wc_t wc, int (*wc_mb)(struct charset_info_st *cs,my_wc_t wc,
unsigned char *s,unsigned char *e); uchar *s,uchar *e);
/* CTYPE scanner */ /* CTYPE scanner */
int (*ctype)(struct charset_info_st *cs, int *ctype, int (*ctype)(struct charset_info_st *cs, int *ctype,
const unsigned char *s, const unsigned char *e); const uchar *s, const uchar *e);
/* Functions for case and sort conversion */ /* Functions for case and sort conversion */
uint (*caseup_str)(struct charset_info_st *, char *); size_t (*caseup_str)(struct charset_info_st *, char *);
uint (*casedn_str)(struct charset_info_st *, char *); size_t (*casedn_str)(struct charset_info_st *, char *);
uint (*caseup)(struct charset_info_st *, char *src, uint srclen, size_t (*caseup)(struct charset_info_st *, char *src, size_t srclen,
char *dst, uint dstlen); char *dst, size_t dstlen);
uint (*casedn)(struct charset_info_st *, char *src, uint srclen, size_t (*casedn)(struct charset_info_st *, char *src, size_t srclen,
char *dst, uint dstlen); char *dst, size_t dstlen);
/* Charset dependant snprintf() */ /* Charset dependant snprintf() */
int (*snprintf)(struct charset_info_st *, char *to, uint n, const char *fmt, size_t (*snprintf)(struct charset_info_st *, char *to, size_t n,
...) ATTRIBUTE_FORMAT_FPTR(printf, 4, 5); const char *fmt,
int (*long10_to_str)(struct charset_info_st *, char *to, uint n, int radix, ...) ATTRIBUTE_FORMAT_FPTR(printf, 4, 5);
long int val); size_t (*long10_to_str)(struct charset_info_st *, char *to, size_t n,
int (*longlong10_to_str)(struct charset_info_st *, char *to, uint n, int radix, long int val);
int radix, longlong val); size_t (*longlong10_to_str)(struct charset_info_st *, char *to, size_t n,
int radix, longlong val);
void (*fill)(struct charset_info_st *, char *to, uint len, int fill); void (*fill)(struct charset_info_st *, char *to, size_t len, int fill);
/* String-to-number conversion routines */ /* String-to-number conversion routines */
long (*strntol)(struct charset_info_st *, const char *s, uint l, long (*strntol)(struct charset_info_st *, const char *s, size_t l,
int base, char **e, int *err); int base, char **e, int *err);
ulong (*strntoul)(struct charset_info_st *, const char *s, uint l, ulong (*strntoul)(struct charset_info_st *, const char *s, size_t l,
int base, char **e, int *err); int base, char **e, int *err);
longlong (*strntoll)(struct charset_info_st *, const char *s, uint l, longlong (*strntoll)(struct charset_info_st *, const char *s, size_t l,
int base, char **e, int *err); int base, char **e, int *err);
ulonglong (*strntoull)(struct charset_info_st *, const char *s, uint l, ulonglong (*strntoull)(struct charset_info_st *, const char *s, size_t l,
int base, char **e, int *err); int base, char **e, int *err);
double (*strntod)(struct charset_info_st *, char *s, uint l, char **e, double (*strntod)(struct charset_info_st *, char *s, size_t l, char **e,
int *err); int *err);
longlong (*strtoll10)(struct charset_info_st *cs, longlong (*strtoll10)(struct charset_info_st *cs,
const char *nptr, char **endptr, int *error); const char *nptr, char **endptr, int *error);
ulonglong (*strntoull10rnd)(struct charset_info_st *cs, ulonglong (*strntoull10rnd)(struct charset_info_st *cs,
const char *str, uint length, int unsigned_fl, const char *str, size_t length,
int unsigned_fl,
char **endptr, int *error); char **endptr, int *error);
ulong (*scan)(struct charset_info_st *, const char *b, const char *e, size_t (*scan)(struct charset_info_st *, const char *b, const char *e,
int sq); int sq);
} MY_CHARSET_HANDLER; } MY_CHARSET_HANDLER;
extern MY_CHARSET_HANDLER my_charset_8bit_handler; extern MY_CHARSET_HANDLER my_charset_8bit_handler;
@ -302,35 +305,35 @@ extern CHARSET_INFO my_charset_cp1250_czech_ci;
extern CHARSET_INFO my_charset_filename; extern CHARSET_INFO my_charset_filename;
/* declarations for simple charsets */ /* declarations for simple charsets */
extern int my_strnxfrm_simple(CHARSET_INFO *, uchar *, uint, const uchar *, extern size_t my_strnxfrm_simple(CHARSET_INFO *, uchar *, size_t,
uint); const uchar *, size_t);
uint my_strnxfrmlen_simple(CHARSET_INFO *, uint); size_t my_strnxfrmlen_simple(CHARSET_INFO *, size_t);
extern int my_strnncoll_simple(CHARSET_INFO *, const uchar *, uint, extern int my_strnncoll_simple(CHARSET_INFO *, const uchar *, size_t,
const uchar *, uint, my_bool); const uchar *, size_t, my_bool);
extern int my_strnncollsp_simple(CHARSET_INFO *, const uchar *, uint, extern int my_strnncollsp_simple(CHARSET_INFO *, const uchar *, size_t,
const uchar *, uint, const uchar *, size_t,
my_bool diff_if_only_endspace_difference); my_bool diff_if_only_endspace_difference);
extern void my_hash_sort_simple(CHARSET_INFO *cs, extern void my_hash_sort_simple(CHARSET_INFO *cs,
const uchar *key, uint len, const uchar *key, size_t len,
ulong *nr1, ulong *nr2); ulong *nr1, ulong *nr2);
extern uint my_lengthsp_8bit(CHARSET_INFO *cs, const char *ptr, uint length); extern size_t my_lengthsp_8bit(CHARSET_INFO *cs, const char *ptr, size_t length);
extern uint my_instr_simple(struct charset_info_st *, extern uint my_instr_simple(struct charset_info_st *,
const char *b, uint b_length, const char *b, size_t b_length,
const char *s, uint s_length, const char *s, size_t s_length,
my_match_t *match, uint nmatch); my_match_t *match, uint nmatch);
/* Functions for 8bit */ /* Functions for 8bit */
extern uint my_caseup_str_8bit(CHARSET_INFO *, char *); extern size_t my_caseup_str_8bit(CHARSET_INFO *, char *);
extern uint my_casedn_str_8bit(CHARSET_INFO *, char *); extern size_t my_casedn_str_8bit(CHARSET_INFO *, char *);
extern uint my_caseup_8bit(CHARSET_INFO *, char *src, uint srclen, extern size_t my_caseup_8bit(CHARSET_INFO *, char *src, size_t srclen,
char *dst, uint dstlen); char *dst, size_t dstlen);
extern uint my_casedn_8bit(CHARSET_INFO *, char *src, uint srclen, extern size_t my_casedn_8bit(CHARSET_INFO *, char *src, size_t srclen,
char *dst, uint dstlen); char *dst, size_t dstlen);
extern int my_strcasecmp_8bit(CHARSET_INFO * cs, const char *, const char *); extern int my_strcasecmp_8bit(CHARSET_INFO * cs, const char *, const char *);
@ -340,26 +343,26 @@ int my_wc_mb_8bit(CHARSET_INFO *cs,my_wc_t wc, uchar *s, uchar *e);
int my_mb_ctype_8bit(CHARSET_INFO *,int *, const uchar *,const uchar *); int my_mb_ctype_8bit(CHARSET_INFO *,int *, const uchar *,const uchar *);
int my_mb_ctype_mb(CHARSET_INFO *,int *, const uchar *,const uchar *); int my_mb_ctype_mb(CHARSET_INFO *,int *, const uchar *,const uchar *);
ulong my_scan_8bit(CHARSET_INFO *cs, const char *b, const char *e, int sq); size_t my_scan_8bit(CHARSET_INFO *cs, const char *b, const char *e, int sq);
int my_snprintf_8bit(struct charset_info_st *, char *to, uint n, size_t my_snprintf_8bit(struct charset_info_st *, char *to, size_t n,
const char *fmt, ...) const char *fmt, ...)
ATTRIBUTE_FORMAT(printf, 4, 5); ATTRIBUTE_FORMAT(printf, 4, 5);
long my_strntol_8bit(CHARSET_INFO *, const char *s, uint l, int base, long my_strntol_8bit(CHARSET_INFO *, const char *s, size_t l, int base,
char **e, int *err);
ulong my_strntoul_8bit(CHARSET_INFO *, const char *s, size_t l, int base,
char **e, int *err); char **e, int *err);
ulong my_strntoul_8bit(CHARSET_INFO *, const char *s, uint l, int base, longlong my_strntoll_8bit(CHARSET_INFO *, const char *s, size_t l, int base,
char **e, int *err); char **e, int *err);
longlong my_strntoll_8bit(CHARSET_INFO *, const char *s, uint l, int base, ulonglong my_strntoull_8bit(CHARSET_INFO *, const char *s, size_t l, int base,
char **e, int *err); char **e, int *err);
ulonglong my_strntoull_8bit(CHARSET_INFO *, const char *s, uint l, int base, double my_strntod_8bit(CHARSET_INFO *, char *s, size_t l,char **e,
char **e, int *err);
double my_strntod_8bit(CHARSET_INFO *, char *s, uint l,char **e,
int *err); int *err);
int my_long10_to_str_8bit(CHARSET_INFO *, char *to, uint l, int radix, size_t my_long10_to_str_8bit(CHARSET_INFO *, char *to, size_t l, int radix,
long int val); long int val);
int my_longlong10_to_str_8bit(CHARSET_INFO *, char *to, uint l, int radix, size_t my_longlong10_to_str_8bit(CHARSET_INFO *, char *to, size_t l, int radix,
longlong val); longlong val);
longlong my_strtoll10_8bit(CHARSET_INFO *cs, longlong my_strtoll10_8bit(CHARSET_INFO *cs,
const char *nptr, char **endptr, int *error); const char *nptr, char **endptr, int *error);
@ -367,34 +370,34 @@ longlong my_strtoll10_ucs2(CHARSET_INFO *cs,
const char *nptr, char **endptr, int *error); const char *nptr, char **endptr, int *error);
ulonglong my_strntoull10rnd_8bit(CHARSET_INFO *cs, ulonglong my_strntoull10rnd_8bit(CHARSET_INFO *cs,
const char *str, uint length, int unsigned_fl, const char *str, size_t length, int
char **endptr, int *error); unsigned_fl, char **endptr, int *error);
ulonglong my_strntoull10rnd_ucs2(CHARSET_INFO *cs, ulonglong my_strntoull10rnd_ucs2(CHARSET_INFO *cs,
const char *str, uint length, int unsigned_fl, const char *str, size_t length,
char **endptr, int *error); int unsigned_fl, char **endptr, int *error);
void my_fill_8bit(CHARSET_INFO *cs, char* to, uint l, int fill); void my_fill_8bit(CHARSET_INFO *cs, char* to, size_t l, int fill);
my_bool my_like_range_simple(CHARSET_INFO *cs, my_bool my_like_range_simple(CHARSET_INFO *cs,
const char *ptr, uint ptr_length, const char *ptr, size_t ptr_length,
pbool escape, pbool w_one, pbool w_many, pbool escape, pbool w_one, pbool w_many,
uint res_length, size_t res_length,
char *min_str, char *max_str, char *min_str, char *max_str,
uint *min_length, uint *max_length); size_t *min_length, size_t *max_length);
my_bool my_like_range_mb(CHARSET_INFO *cs, my_bool my_like_range_mb(CHARSET_INFO *cs,
const char *ptr, uint ptr_length, const char *ptr, size_t ptr_length,
pbool escape, pbool w_one, pbool w_many, pbool escape, pbool w_one, pbool w_many,
uint res_length, size_t res_length,
char *min_str, char *max_str, char *min_str, char *max_str,
uint *min_length, uint *max_length); size_t *min_length, size_t *max_length);
my_bool my_like_range_ucs2(CHARSET_INFO *cs, my_bool my_like_range_ucs2(CHARSET_INFO *cs,
const char *ptr, uint ptr_length, const char *ptr, size_t ptr_length,
pbool escape, pbool w_one, pbool w_many, pbool escape, pbool w_one, pbool w_many,
uint res_length, size_t res_length,
char *min_str, char *max_str, char *min_str, char *max_str,
uint *min_length, uint *max_length); size_t *min_length, size_t *max_length);
int my_wildcmp_8bit(CHARSET_INFO *, int my_wildcmp_8bit(CHARSET_INFO *,
@ -407,35 +410,35 @@ int my_wildcmp_bin(CHARSET_INFO *,
const char *wildstr,const char *wildend, const char *wildstr,const char *wildend,
int escape, int w_one, int w_many); int escape, int w_one, int w_many);
uint my_numchars_8bit(CHARSET_INFO *, const char *b, const char *e); size_t my_numchars_8bit(CHARSET_INFO *, const char *b, const char *e);
uint my_numcells_8bit(CHARSET_INFO *, const char *b, const char *e); size_t my_numcells_8bit(CHARSET_INFO *, const char *b, const char *e);
uint my_charpos_8bit(CHARSET_INFO *, const char *b, const char *e, uint pos); size_t my_charpos_8bit(CHARSET_INFO *, const char *b, const char *e, size_t pos);
uint my_well_formed_len_8bit(CHARSET_INFO *, const char *b, const char *e, size_t my_well_formed_len_8bit(CHARSET_INFO *, const char *b, const char *e,
uint pos, int *error); size_t pos, int *error);
int my_mbcharlen_8bit(CHARSET_INFO *, uint c); uint my_mbcharlen_8bit(CHARSET_INFO *, uint c);
/* Functions for multibyte charsets */ /* Functions for multibyte charsets */
extern uint my_caseup_str_mb(CHARSET_INFO *, char *); extern size_t my_caseup_str_mb(CHARSET_INFO *, char *);
extern uint my_casedn_str_mb(CHARSET_INFO *, char *); extern size_t my_casedn_str_mb(CHARSET_INFO *, char *);
extern uint my_caseup_mb(CHARSET_INFO *, char *src, uint srclen, extern size_t my_caseup_mb(CHARSET_INFO *, char *src, size_t srclen,
char *dst, uint dstlen); char *dst, size_t dstlen);
extern uint my_casedn_mb(CHARSET_INFO *, char *src, uint srclen, extern size_t my_casedn_mb(CHARSET_INFO *, char *src, size_t srclen,
char *dst, uint dstlen); char *dst, size_t dstlen);
extern int my_strcasecmp_mb(CHARSET_INFO * cs,const char *, const char *); extern int my_strcasecmp_mb(CHARSET_INFO * cs,const char *, const char *);
int my_wildcmp_mb(CHARSET_INFO *, int my_wildcmp_mb(CHARSET_INFO *,
const char *str,const char *str_end, const char *str,const char *str_end,
const char *wildstr,const char *wildend, const char *wildstr,const char *wildend,
int escape, int w_one, int w_many); int escape, int w_one, int w_many);
uint my_numchars_mb(CHARSET_INFO *, const char *b, const char *e); size_t my_numchars_mb(CHARSET_INFO *, const char *b, const char *e);
uint my_numcells_mb(CHARSET_INFO *, const char *b, const char *e); size_t my_numcells_mb(CHARSET_INFO *, const char *b, const char *e);
uint my_charpos_mb(CHARSET_INFO *, const char *b, const char *e, uint pos); size_t my_charpos_mb(CHARSET_INFO *, const char *b, const char *e, size_t pos);
uint my_well_formed_len_mb(CHARSET_INFO *, const char *b, const char *e, size_t my_well_formed_len_mb(CHARSET_INFO *, const char *b, const char *e,
uint pos, int *error); size_t pos, int *error);
uint my_instr_mb(struct charset_info_st *, uint my_instr_mb(struct charset_info_st *,
const char *b, uint b_length, const char *b, size_t b_length,
const char *s, uint s_length, const char *s, size_t s_length,
my_match_t *match, uint nmatch); my_match_t *match, uint nmatch);
int my_wildcmp_unicode(CHARSET_INFO *cs, int my_wildcmp_unicode(CHARSET_INFO *cs,
@ -444,13 +447,13 @@ int my_wildcmp_unicode(CHARSET_INFO *cs,
int escape, int w_one, int w_many, int escape, int w_one, int w_many,
MY_UNICASE_INFO **weights); MY_UNICASE_INFO **weights);
extern my_bool my_parse_charset_xml(const char *bug, uint len, extern my_bool my_parse_charset_xml(const char *bug, size_t len,
int (*add)(CHARSET_INFO *cs)); int (*add)(CHARSET_INFO *cs));
extern char *my_strchr(CHARSET_INFO *cs, const char *str, const char *end, extern char *my_strchr(CHARSET_INFO *cs, const char *str, const char *end,
pchar c); pchar c);
my_bool my_propagate_simple(CHARSET_INFO *cs, const uchar *str, uint len); my_bool my_propagate_simple(CHARSET_INFO *cs, const uchar *str, size_t len);
my_bool my_propagate_complex(CHARSET_INFO *cs, const uchar *str, uint len); my_bool my_propagate_complex(CHARSET_INFO *cs, const uchar *str, size_t len);
#define _MY_U 01 /* Upper case */ #define _MY_U 01 /* Upper case */

View File

@ -115,59 +115,59 @@ extern const double log_10[309];
/* Prototypes for string functions */ /* Prototypes for string functions */
#if !defined(bfill) && !defined(HAVE_BFILL) #if !defined(bfill) && !defined(HAVE_BFILL)
extern void bfill(gptr dst,uint len,pchar fill); extern void bfill(uchar *dst,size_t len,pchar fill);
#endif #endif
#if !defined(bzero) && !defined(HAVE_BZERO) #if !defined(bzero) && !defined(HAVE_BZERO)
extern void bzero(gptr dst,uint len); extern void bzero(uchar * dst,size_t len);
#endif #endif
#if !defined(bcmp) && !defined(HAVE_BCMP) #if !defined(bcmp) && !defined(HAVE_BCMP)
extern int bcmp(const char *s1,const char *s2,uint len); extern size_t bcmp(const uchar *s1,const uchar *s2,size_t len);
#endif #endif
#ifdef HAVE_purify #ifdef HAVE_purify
extern int my_bcmp(const char *s1,const char *s2,uint len); extern size_t my_bcmp(const uchar *s1,const uchar *s2,size_t len);
#undef bcmp #undef bcmp
#define bcmp(A,B,C) my_bcmp((A),(B),(C)) #define bcmp(A,B,C) my_bcmp((A),(B),(C))
#endif #endif
#ifndef bmove512 #ifndef bmove512
extern void bmove512(gptr dst,const gptr src,uint len); extern void bmove512(uchar *dst,const uchar *src,size_t len);
#endif #endif
#if !defined(HAVE_BMOVE) && !defined(bmove) #if !defined(HAVE_BMOVE) && !defined(bmove)
extern void bmove(char *dst, const char *src,uint len); extern void bmove(uuchar *dst, const uchar *src,size_t len);
#endif #endif
extern void bmove_upp(char *dst,const char *src,uint len); extern void bmove_upp(uchar *dst,const uchar *src,size_t len);
extern void bchange(char *dst,uint old_len,const char *src, extern void bchange(uchar *dst,size_t old_len,const uchar *src,
uint new_len,uint tot_len); size_t new_len,size_t tot_len);
extern void strappend(char *s,uint len,pchar fill); extern void strappend(char *s,size_t len,pchar fill);
extern char *strend(const char *s); extern char *strend(const char *s);
extern char *strcend(const char *, pchar); extern char *strcend(const char *, pchar);
extern char *strfield(char *src,int fields,int chars,int blanks, extern char *strfield(char *src,int fields,int chars,int blanks,
int tabch); int tabch);
extern char *strfill(my_string s,uint len,pchar fill); extern char *strfill(char * s,size_t len,pchar fill);
extern uint strinstr(const char *str,const char *search); extern size_t strinstr(const char *str,const char *search);
extern uint r_strinstr(reg1 my_string str,int from, reg4 my_string search); extern size_t r_strinstr(const char *str, size_t from, const char *search);
extern char *strkey(char *dst,char *head,char *tail,char *flags); extern char *strkey(char *dst,char *head,char *tail,char *flags);
extern char *strmake(char *dst,const char *src,uint length); extern char *strmake(char *dst,const char *src,size_t length);
#ifndef strmake_overlapp #ifndef strmake_overlapp
extern char *strmake_overlapp(char *dst,const char *src, uint length); extern char *strmake_overlapp(char *dst,const char *src, size_t length);
#endif #endif
#ifndef strmov #ifndef strmov
extern char *strmov(char *dst,const char *src); extern char *strmov(char *dst,const char *src);
#endif #endif
extern char *strnmov(char *dst,const char *src,uint n); extern char *strnmov(char *dst,const char *src,size_t n);
extern char *strsuff(const char *src,const char *suffix); extern char *strsuff(const char *src,const char *suffix);
extern char *strcont(const char *src,const char *set); extern char *strcont(const char *src,const char *set);
extern char *strxcat _VARARGS((char *dst,const char *src, ...)); extern char *strxcat _VARARGS((char *dst,const char *src, ...));
extern char *strxmov _VARARGS((char *dst,const char *src, ...)); extern char *strxmov _VARARGS((char *dst,const char *src, ...));
extern char *strxcpy _VARARGS((char *dst,const char *src, ...)); extern char *strxcpy _VARARGS((char *dst,const char *src, ...));
extern char *strxncat _VARARGS((char *dst,uint len, const char *src, ...)); extern char *strxncat _VARARGS((char *dst,size_t len, const char *src, ...));
extern char *strxnmov _VARARGS((char *dst,uint len, const char *src, ...)); extern char *strxnmov _VARARGS((char *dst,size_t len, const char *src, ...));
extern char *strxncpy _VARARGS((char *dst,uint len, const char *src, ...)); extern char *strxncpy _VARARGS((char *dst,size_t len, const char *src, ...));
/* Prototypes of normal stringfunctions (with may ours) */ /* Prototypes of normal stringfunctions (with may ours) */
@ -182,7 +182,7 @@ extern size_t strlen(const char *);
#endif #endif
#endif #endif
#ifndef HAVE_STRNLEN #ifndef HAVE_STRNLEN
extern uint strnlen(const char *s, uint n); extern size_t strnlen(const char *s, size_t n);
#endif #endif
#if !defined(__cplusplus) #if !defined(__cplusplus)
@ -235,9 +235,9 @@ extern ulonglong strtoull(const char *str, char **ptr, int base);
/* my_vsnprintf.c */ /* my_vsnprintf.c */
extern int my_vsnprintf( char *str, size_t n, extern size_t my_vsnprintf(char *str, size_t n,
const char *format, va_list ap ); const char *format, va_list ap);
extern int my_snprintf(char *to, size_t n, const char *fmt, ...) extern size_t my_snprintf(char *to, size_t n, const char *fmt, ...)
ATTRIBUTE_FORMAT(printf, 3, 4); ATTRIBUTE_FORMAT(printf, 3, 4);
#if defined(__cplusplus) #if defined(__cplusplus)
@ -248,17 +248,18 @@ extern int my_snprintf(char *to, size_t n, const char *fmt, ...)
LEX_STRING -- a pair of a C-string and its length. LEX_STRING -- a pair of a C-string and its length.
NOTE: this exactly form of declaration is required for some C-compilers NOTE: this exactly form of declaration is required for some C-compilers
(for one, Sun C 5.7 2005/01/07). Unfortunatelt with such declaration (for one, Sun C 5.7 2005/01/07). Unfortunately with such declaration
LEX_STRING can not be forward declared. LEX_STRING can not be forward declared.
*/ */
typedef struct typedef struct
{ {
char *str; char *str;
uint length; size_t length;
} LEX_STRING; } LEX_STRING;
#define STRING_WITH_LEN(X) (X), ((uint) (sizeof(X) - 1)) #define STRING_WITH_LEN(X) (X), ((size_t) (sizeof(X) - 1))
#define C_STRING_WITH_LEN(X) ((char *) (X)), ((uint) (sizeof(X) - 1)) #define USTRING_WITH_LEN(X) ((uchar*) X), ((size_t) (sizeof(X) - 1))
#define C_STRING_WITH_LEN(X) ((char *) (X)), ((size_t) (sizeof(X) - 1))
#endif #endif

View File

@ -37,8 +37,8 @@ typedef struct st_mem_root
USED_MEM *used; /* blocks almost without free memory */ USED_MEM *used; /* blocks almost without free memory */
USED_MEM *pre_alloc; /* preallocated block */ USED_MEM *pre_alloc; /* preallocated block */
/* if block have less memory it will be put in 'used' list */ /* if block have less memory it will be put in 'used' list */
unsigned int min_malloc; size_t min_malloc;
unsigned int block_size; /* initial block size */ size_t block_size; /* initial block size */
unsigned int block_num; /* allocated blocks counter */ unsigned int block_num; /* allocated blocks counter */
/* /*
first free block in queue test counter (if it exceed first free block in queue test counter (if it exceed

View File

@ -478,7 +478,7 @@ enum data_file_type {
typedef struct st_key_range typedef struct st_key_range
{ {
const byte *key; const uchar *key;
uint length; uint length;
key_part_map keypart_map; key_part_map keypart_map;
enum ha_rkey_function flag; enum ha_rkey_function flag;

View File

@ -23,8 +23,8 @@ extern "C" {
struct _db_code_state_; struct _db_code_state_;
extern int _db_keyword_(struct _db_code_state_ *cs, const char *keyword); extern int _db_keyword_(struct _db_code_state_ *cs, const char *keyword);
extern int _db_strict_keyword_(const char *keyword); extern int _db_strict_keyword_(const char *keyword);
extern int _db_explain_(struct _db_code_state_ *cs, char *buf, int len); extern int _db_explain_(struct _db_code_state_ *cs, char *buf, size_t len);
extern int _db_explain_init_(char *buf, int len); extern int _db_explain_init_(char *buf, size_t len);
extern void _db_setjmp_(void); extern void _db_setjmp_(void);
extern void _db_longjmp_(void); extern void _db_longjmp_(void);
extern void _db_process_(const char *name); extern void _db_process_(const char *name);
@ -40,8 +40,8 @@ extern void _db_return_(uint _line_,const char **_sfunc_,const char **_sfile_,
extern void _db_pargs_(uint _line_,const char *keyword); extern void _db_pargs_(uint _line_,const char *keyword);
extern void _db_doprnt_ _VARARGS((const char *format,...)) extern void _db_doprnt_ _VARARGS((const char *format,...))
ATTRIBUTE_FORMAT(printf, 1, 2); ATTRIBUTE_FORMAT(printf, 1, 2);
extern void _db_dump_(uint _line_,const char *keyword,const char *memory, extern void _db_dump_(uint _line_,const char *keyword,
uint length); const unsigned char *memory, size_t length);
extern void _db_end_(void); extern void _db_end_(void);
extern void _db_lock_file_(void); extern void _db_lock_file_(void);
extern void _db_unlock_file_(void); extern void _db_unlock_file_(void);

View File

@ -44,8 +44,8 @@ struct my_option
const char *name; /* Name of the option */ const char *name; /* Name of the option */
int id; /* unique id or short option */ int id; /* unique id or short option */
const char *comment; /* option comment, for autom. --help */ const char *comment; /* option comment, for autom. --help */
gptr *value; /* The variable value */ uchar **value; /* The variable value */
gptr *u_max_value; /* The user def. max variable value */ uchar **u_max_value; /* The user def. max variable value */
struct st_typelib *typelib; /* Pointer to possible values */ struct st_typelib *typelib; /* Pointer to possible values */
ulong var_type; ulong var_type;
enum get_opt_arg_type arg_type; enum get_opt_arg_type arg_type;
@ -69,7 +69,7 @@ extern int handle_options (int *argc, char ***argv,
const struct my_option *longopts, my_get_one_option); const struct my_option *longopts, my_get_one_option);
extern void my_print_help(const struct my_option *options); extern void my_print_help(const struct my_option *options);
extern void my_print_variables(const struct my_option *options); extern void my_print_variables(const struct my_option *options);
extern void my_getopt_register_get_addr(gptr* (*func_addr)(const char *, uint, extern void my_getopt_register_get_addr(uchar ** (*func_addr)(const char *, uint,
const struct my_option *)); const struct my_option *));
ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp); ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp);

View File

@ -441,17 +441,7 @@ C_MODE_END
#ifdef HAVE_ALLOCA_H #ifdef HAVE_ALLOCA_H
#include <alloca.h> #include <alloca.h>
#endif #endif
#ifdef HAVE_ATOMIC_ADD
#define new my_arg_new
#define need_to_restore_new 1
C_MODE_START
#include <asm/atomic.h>
C_MODE_END
#ifdef need_to_restore_new /* probably safer than #ifdef new */
#undef new
#undef need_to_restore_new
#endif
#endif
#include <errno.h> /* Recommended by debian */ #include <errno.h> /* Recommended by debian */
/* We need the following to go around a problem with openssl on solaris */ /* We need the following to go around a problem with openssl on solaris */
#if defined(HAVE_CRYPT_H) #if defined(HAVE_CRYPT_H)
@ -895,21 +885,14 @@ typedef long my_ptrdiff_t;
typedef long long my_ptrdiff_t; typedef long long my_ptrdiff_t;
#endif #endif
/* We can't set my_size_t to size_t as we want my_size_t to be unsigned */
#if SIZEOF_CHARP <= SIZEOF_LONG
typedef unsigned long my_size_t;
#else
typedef unsigned long long my_size_t;
#endif
#define MY_ALIGN(A,L) (((A) + (L) - 1) & ~((L) - 1)) #define MY_ALIGN(A,L) (((A) + (L) - 1) & ~((L) - 1))
#define ALIGN_SIZE(A) MY_ALIGN((A),sizeof(double)) #define ALIGN_SIZE(A) MY_ALIGN((A),sizeof(double))
/* Size to make adressable obj. */ /* Size to make adressable obj. */
#define ALIGN_PTR(A, t) ((t*) MY_ALIGN((A),sizeof(t))) #define ALIGN_PTR(A, t) ((t*) MY_ALIGN((A),sizeof(t)))
/* Offset of field f in structure t */ /* Offset of field f in structure t */
#define OFFSET(t, f) ((size_t)(char *)&((t *)0)->f) #define OFFSET(t, f) ((size_t)(char *)&((t *)0)->f)
#define ADD_TO_PTR(ptr,size,type) (type) ((byte*) (ptr)+size) #define ADD_TO_PTR(ptr,size,type) (type) ((uchar*) (ptr)+size)
#define PTR_BYTE_DIFF(A,B) (my_ptrdiff_t) ((byte*) (A) - (byte*) (B)) #define PTR_BYTE_DIFF(A,B) (my_ptrdiff_t) ((uchar*) (A) - (uchar*) (B))
#define MY_DIV_UP(A, B) (((A) + (B) - 1) / (B)) #define MY_DIV_UP(A, B) (((A) + (B) - 1) / (B))
#define MY_ALIGNED_BYTE_ARRAY(N, S, T) T N[MY_DIV_UP(S, sizeof(T))] #define MY_ALIGNED_BYTE_ARRAY(N, S, T) T N[MY_DIV_UP(S, sizeof(T))]
@ -947,11 +930,6 @@ typedef unsigned long long my_size_t;
/* Typdefs for easyier portability */ /* Typdefs for easyier portability */
#if defined(VOIDTYPE)
typedef void *gptr; /* Generic pointer */
#else
typedef char *gptr; /* Generic pointer */
#endif
#ifndef HAVE_UCHAR #ifndef HAVE_UCHAR
typedef unsigned char uchar; /* Short for unsigned char */ typedef unsigned char uchar; /* Short for unsigned char */
#endif #endif
@ -1072,12 +1050,7 @@ typedef off_t os_off_t;
typedef uint8 int7; /* Most effective integer 0 <= x <= 127 */ typedef uint8 int7; /* Most effective integer 0 <= x <= 127 */
typedef short int15; /* Most effective integer 0 <= x <= 32767 */ typedef short int15; /* Most effective integer 0 <= x <= 32767 */
typedef char *my_string; /* String of characters */
typedef unsigned long size_s; /* Size of strings (In string-funcs) */
typedef int myf; /* Type of MyFlags in my_funcs */ typedef int myf; /* Type of MyFlags in my_funcs */
#ifndef byte_defined
typedef char byte; /* Smallest addressable unit */
#endif
typedef char my_bool; /* Small bool */ typedef char my_bool; /* Small bool */
#if !defined(bool) && !defined(bool_defined) && (!defined(HAVE_BOOL) || !defined(__cplusplus)) #if !defined(bool) && !defined(bool_defined) && (!defined(HAVE_BOOL) || !defined(__cplusplus))
typedef char bool; /* Ordinary boolean values 0 1 */ typedef char bool; /* Ordinary boolean values 0 1 */
@ -1223,9 +1196,9 @@ do { doubleget_union _tmp; \
} while (0) } while (0)
#define float4get(V,M) do { *((float *) &(V)) = *((float*) (M)); } while(0) #define float4get(V,M) do { *((float *) &(V)) = *((float*) (M)); } while(0)
#define float8get(V,M) doubleget((V),(M)) #define float8get(V,M) doubleget((V),(M))
#define float4store(V,M) memcpy((byte*) V,(byte*) (&M),sizeof(float)) #define float4store(V,M) memcpy((uchar*) V,(uchar*) (&M),sizeof(float))
#define floatstore(T,V) memcpy((byte*)(T), (byte*)(&V),sizeof(float)) #define floatstore(T,V) memcpy((uchar*)(T), (uchar*)(&V),sizeof(float))
#define floatget(V,M) memcpy((byte*) &V,(byte*) (M),sizeof(float)) #define floatget(V,M) memcpy((uchar*) &V,(uchar*) (M),sizeof(float))
#define float8store(V,M) doublestore((V),(M)) #define float8store(V,M) doublestore((V),(M))
#endif /* __i386__ */ #endif /* __i386__ */
@ -1308,59 +1281,59 @@ do { doubleget_union _tmp; \
int4store((T),def_temp); \ int4store((T),def_temp); \
int4store((T+4),def_temp2); } while(0) int4store((T+4),def_temp2); } while(0)
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
#define float4store(T,A) do { *(T)= ((byte *) &A)[3];\ #define float4store(T,A) do { *(T)= ((uchar *) &A)[3];\
*((T)+1)=(char) ((byte *) &A)[2];\ *((T)+1)=(char) ((uchar *) &A)[2];\
*((T)+2)=(char) ((byte *) &A)[1];\ *((T)+2)=(char) ((uchar *) &A)[1];\
*((T)+3)=(char) ((byte *) &A)[0]; } while(0) *((T)+3)=(char) ((uchar *) &A)[0]; } while(0)
#define float4get(V,M) do { float def_temp;\ #define float4get(V,M) do { float def_temp;\
((byte*) &def_temp)[0]=(M)[3];\ ((uchar*) &def_temp)[0]=(M)[3];\
((byte*) &def_temp)[1]=(M)[2];\ ((uchar*) &def_temp)[1]=(M)[2];\
((byte*) &def_temp)[2]=(M)[1];\ ((uchar*) &def_temp)[2]=(M)[1];\
((byte*) &def_temp)[3]=(M)[0];\ ((uchar*) &def_temp)[3]=(M)[0];\
(V)=def_temp; } while(0) (V)=def_temp; } while(0)
#define float8store(T,V) do { *(T)= ((byte *) &V)[7];\ #define float8store(T,V) do { *(T)= ((uchar *) &V)[7];\
*((T)+1)=(char) ((byte *) &V)[6];\ *((T)+1)=(char) ((uchar *) &V)[6];\
*((T)+2)=(char) ((byte *) &V)[5];\ *((T)+2)=(char) ((uchar *) &V)[5];\
*((T)+3)=(char) ((byte *) &V)[4];\ *((T)+3)=(char) ((uchar *) &V)[4];\
*((T)+4)=(char) ((byte *) &V)[3];\ *((T)+4)=(char) ((uchar *) &V)[3];\
*((T)+5)=(char) ((byte *) &V)[2];\ *((T)+5)=(char) ((uchar *) &V)[2];\
*((T)+6)=(char) ((byte *) &V)[1];\ *((T)+6)=(char) ((uchar *) &V)[1];\
*((T)+7)=(char) ((byte *) &V)[0]; } while(0) *((T)+7)=(char) ((uchar *) &V)[0]; } while(0)
#define float8get(V,M) do { double def_temp;\ #define float8get(V,M) do { double def_temp;\
((byte*) &def_temp)[0]=(M)[7];\ ((uchar*) &def_temp)[0]=(M)[7];\
((byte*) &def_temp)[1]=(M)[6];\ ((uchar*) &def_temp)[1]=(M)[6];\
((byte*) &def_temp)[2]=(M)[5];\ ((uchar*) &def_temp)[2]=(M)[5];\
((byte*) &def_temp)[3]=(M)[4];\ ((uchar*) &def_temp)[3]=(M)[4];\
((byte*) &def_temp)[4]=(M)[3];\ ((uchar*) &def_temp)[4]=(M)[3];\
((byte*) &def_temp)[5]=(M)[2];\ ((uchar*) &def_temp)[5]=(M)[2];\
((byte*) &def_temp)[6]=(M)[1];\ ((uchar*) &def_temp)[6]=(M)[1];\
((byte*) &def_temp)[7]=(M)[0];\ ((uchar*) &def_temp)[7]=(M)[0];\
(V) = def_temp; } while(0) (V) = def_temp; } while(0)
#else #else
#define float4get(V,M) memcpy_fixed((byte*) &V,(byte*) (M),sizeof(float)) #define float4get(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(float))
#define float4store(V,M) memcpy_fixed((byte*) V,(byte*) (&M),sizeof(float)) #define float4store(V,M) memcpy_fixed((uchar*) V,(uchar*) (&M),sizeof(float))
#if defined(__FLOAT_WORD_ORDER) && (__FLOAT_WORD_ORDER == __BIG_ENDIAN) #if defined(__FLOAT_WORD_ORDER) && (__FLOAT_WORD_ORDER == __BIG_ENDIAN)
#define doublestore(T,V) do { *(((char*)T)+0)=(char) ((byte *) &V)[4];\ #define doublestore(T,V) do { *(((char*)T)+0)=(char) ((uchar *) &V)[4];\
*(((char*)T)+1)=(char) ((byte *) &V)[5];\ *(((char*)T)+1)=(char) ((uchar *) &V)[5];\
*(((char*)T)+2)=(char) ((byte *) &V)[6];\ *(((char*)T)+2)=(char) ((uchar *) &V)[6];\
*(((char*)T)+3)=(char) ((byte *) &V)[7];\ *(((char*)T)+3)=(char) ((uchar *) &V)[7];\
*(((char*)T)+4)=(char) ((byte *) &V)[0];\ *(((char*)T)+4)=(char) ((uchar *) &V)[0];\
*(((char*)T)+5)=(char) ((byte *) &V)[1];\ *(((char*)T)+5)=(char) ((uchar *) &V)[1];\
*(((char*)T)+6)=(char) ((byte *) &V)[2];\ *(((char*)T)+6)=(char) ((uchar *) &V)[2];\
*(((char*)T)+7)=(char) ((byte *) &V)[3]; }\ *(((char*)T)+7)=(char) ((uchar *) &V)[3]; }\
while(0) while(0)
#define doubleget(V,M) do { double def_temp;\ #define doubleget(V,M) do { double def_temp;\
((byte*) &def_temp)[0]=(M)[4];\ ((uchar*) &def_temp)[0]=(M)[4];\
((byte*) &def_temp)[1]=(M)[5];\ ((uchar*) &def_temp)[1]=(M)[5];\
((byte*) &def_temp)[2]=(M)[6];\ ((uchar*) &def_temp)[2]=(M)[6];\
((byte*) &def_temp)[3]=(M)[7];\ ((uchar*) &def_temp)[3]=(M)[7];\
((byte*) &def_temp)[4]=(M)[0];\ ((uchar*) &def_temp)[4]=(M)[0];\
((byte*) &def_temp)[5]=(M)[1];\ ((uchar*) &def_temp)[5]=(M)[1];\
((byte*) &def_temp)[6]=(M)[2];\ ((uchar*) &def_temp)[6]=(M)[2];\
((byte*) &def_temp)[7]=(M)[3];\ ((uchar*) &def_temp)[7]=(M)[3];\
(V) = def_temp; } while(0) (V) = def_temp; } while(0)
#endif /* __FLOAT_WORD_ORDER */ #endif /* __FLOAT_WORD_ORDER */
@ -1391,16 +1364,16 @@ do { doubleget_union _tmp; \
#define shortget(V,M) do { V = (short) (((short) ((uchar) (M)[1]))+\ #define shortget(V,M) do { V = (short) (((short) ((uchar) (M)[1]))+\
((short) ((short) (M)[0]) << 8)); } while(0) ((short) ((short) (M)[0]) << 8)); } while(0)
#define longget(V,M) do { int32 def_temp;\ #define longget(V,M) do { int32 def_temp;\
((byte*) &def_temp)[0]=(M)[0];\ ((uchar*) &def_temp)[0]=(M)[0];\
((byte*) &def_temp)[1]=(M)[1];\ ((uchar*) &def_temp)[1]=(M)[1];\
((byte*) &def_temp)[2]=(M)[2];\ ((uchar*) &def_temp)[2]=(M)[2];\
((byte*) &def_temp)[3]=(M)[3];\ ((uchar*) &def_temp)[3]=(M)[3];\
(V)=def_temp; } while(0) (V)=def_temp; } while(0)
#define ulongget(V,M) do { uint32 def_temp;\ #define ulongget(V,M) do { uint32 def_temp;\
((byte*) &def_temp)[0]=(M)[0];\ ((uchar*) &def_temp)[0]=(M)[0];\
((byte*) &def_temp)[1]=(M)[1];\ ((uchar*) &def_temp)[1]=(M)[1];\
((byte*) &def_temp)[2]=(M)[2];\ ((uchar*) &def_temp)[2]=(M)[2];\
((byte*) &def_temp)[3]=(M)[3];\ ((uchar*) &def_temp)[3]=(M)[3];\
(V)=def_temp; } while(0) (V)=def_temp; } while(0)
#define shortstore(T,A) do { uint def_temp=(uint) (A) ;\ #define shortstore(T,A) do { uint def_temp=(uint) (A) ;\
*(((char*)T)+1)=(char)(def_temp); \ *(((char*)T)+1)=(char)(def_temp); \
@ -1410,12 +1383,12 @@ do { doubleget_union _tmp; \
*(((char*)T)+1)=(((A) >> 16));\ *(((char*)T)+1)=(((A) >> 16));\
*(((char*)T)+0)=(((A) >> 24)); } while(0) *(((char*)T)+0)=(((A) >> 24)); } while(0)
#define floatget(V,M) memcpy_fixed((byte*) &V,(byte*) (M),sizeof(float)) #define floatget(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(float))
#define floatstore(T,V) memcpy_fixed((byte*) (T),(byte*)(&V),sizeof(float)) #define floatstore(T,V) memcpy_fixed((uchar*) (T),(uchar*)(&V),sizeof(float))
#define doubleget(V,M) memcpy_fixed((byte*) &V,(byte*) (M),sizeof(double)) #define doubleget(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(double))
#define doublestore(T,V) memcpy_fixed((byte*) (T),(byte*) &V,sizeof(double)) #define doublestore(T,V) memcpy_fixed((uchar*) (T),(uchar*) &V,sizeof(double))
#define longlongget(V,M) memcpy_fixed((byte*) &V,(byte*) (M),sizeof(ulonglong)) #define longlongget(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(ulonglong))
#define longlongstore(T,V) memcpy_fixed((byte*) (T),(byte*) &V,sizeof(ulonglong)) #define longlongstore(T,V) memcpy_fixed((uchar*) (T),(uchar*) &V,sizeof(ulonglong))
#else #else
@ -1426,15 +1399,15 @@ do { doubleget_union _tmp; \
#define shortstore(T,V) int2store(T,V) #define shortstore(T,V) int2store(T,V)
#define longstore(T,V) int4store(T,V) #define longstore(T,V) int4store(T,V)
#ifndef floatstore #ifndef floatstore
#define floatstore(T,V) memcpy_fixed((byte*) (T),(byte*) (&V),sizeof(float)) #define floatstore(T,V) memcpy_fixed((uchar*) (T),(uchar*) (&V),sizeof(float))
#define floatget(V,M) memcpy_fixed((byte*) &V, (byte*) (M), sizeof(float)) #define floatget(V,M) memcpy_fixed((uchar*) &V, (uchar*) (M), sizeof(float))
#endif #endif
#ifndef doubleget #ifndef doubleget
#define doubleget(V,M) memcpy_fixed((byte*) &V,(byte*) (M),sizeof(double)) #define doubleget(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(double))
#define doublestore(T,V) memcpy_fixed((byte*) (T),(byte*) &V,sizeof(double)) #define doublestore(T,V) memcpy_fixed((uchar*) (T),(uchar*) &V,sizeof(double))
#endif /* doubleget */ #endif /* doubleget */
#define longlongget(V,M) memcpy_fixed((byte*) &V,(byte*) (M),sizeof(ulonglong)) #define longlongget(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(ulonglong))
#define longlongstore(T,V) memcpy_fixed((byte*) (T),(byte*) &V,sizeof(ulonglong)) #define longlongstore(T,V) memcpy_fixed((uchar*) (T),(uchar*) &V,sizeof(ulonglong))
#endif /* WORDS_BIGENDIAN */ #endif /* WORDS_BIGENDIAN */
@ -1451,10 +1424,13 @@ do { doubleget_union _tmp; \
#ifndef THREAD #ifndef THREAD
#define thread_safe_increment(V,L) (V)++ #define thread_safe_increment(V,L) (V)++
#define thread_safe_decrement(V,L) (V)--
#define thread_safe_add(V,C,L) (V)+=(C) #define thread_safe_add(V,C,L) (V)+=(C)
#define thread_safe_sub(V,C,L) (V)-=(C) #define thread_safe_sub(V,C,L) (V)-=(C)
#define statistic_increment(V,L) (V)++ #define statistic_increment(V,L) (V)++
#define statistic_decrement(V,L) (V)--
#define statistic_add(V,C,L) (V)+=(C) #define statistic_add(V,C,L) (V)+=(C)
#define statistic_sub(V,C,L) (V)-=(C)
#endif #endif
#ifdef HAVE_CHARSET_utf8 #ifdef HAVE_CHARSET_utf8

View File

@ -33,11 +33,11 @@ extern LIST *list_cons(void *data,LIST *root);
extern LIST *list_reverse(LIST *root); extern LIST *list_reverse(LIST *root);
extern void list_free(LIST *root,unsigned int free_data); extern void list_free(LIST *root,unsigned int free_data);
extern unsigned int list_length(LIST *); extern unsigned int list_length(LIST *);
extern int list_walk(LIST *,list_walk_action action,gptr argument); extern int list_walk(LIST *,list_walk_action action,unsigned char * argument);
#define list_rest(a) ((a)->next) #define list_rest(a) ((a)->next)
#define list_push(a,b) (a)=list_cons((b),(a)) #define list_push(a,b) (a)=list_cons((b),(a))
#define list_pop(A) {LIST *old=(A); (A)=list_delete(old,old) ; my_free((gptr) old,MYF(MY_FAE)); } #define list_pop(A) {LIST *old=(A); (A)=list_delete(old,old) ; my_free((unsigned char *) old,MYF(MY_FAE)); }
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -35,8 +35,9 @@ extern "C" {
#undef my_seek #undef my_seek
#define my_read(a,b,c,d) my_quick_read(a,b,c,d) #define my_read(a,b,c,d) my_quick_read(a,b,c,d)
#define my_write(a,b,c,d) my_quick_write(a,b,c) #define my_write(a,b,c,d) my_quick_write(a,b,c)
extern uint my_quick_read(File Filedes,byte *Buffer,uint Count,myf myFlags); extern size_t my_quick_read(File Filedes,uchar *Buffer,size_t Count,
extern uint my_quick_write(File Filedes,const byte *Buffer,uint Count); myf myFlags);
extern size_t my_quick_write(File Filedes,const uchar *Buffer,size_t Count);
#if !defined(SAFEMALLOC) && defined(USE_HALLOC) #if !defined(SAFEMALLOC) && defined(USE_HALLOC)
#define my_malloc(a,b) halloc(a,1) #define my_malloc(a,b) halloc(a,1)

View File

@ -688,7 +688,7 @@ struct st_my_thread_var
struct st_my_thread_var *next,**prev; struct st_my_thread_var *next,**prev;
void *opt_info; void *opt_info;
#ifndef DBUG_OFF #ifndef DBUG_OFF
gptr dbug; void *dbug;
char name[THREAD_NAME_SIZE+1]; char name[THREAD_NAME_SIZE+1];
#endif #endif
}; };
@ -710,33 +710,68 @@ extern uint my_thread_end_wait_time;
extern uint thd_lib_detected; extern uint thd_lib_detected;
/* statistics_xxx functions are for not essential statistic */ /*
thread_safe_xxx functions are for critical statistic or counters.
The implementation is guaranteed to be thread safe, on all platforms.
Note that the calling code should *not* assume the counter is protected
by the mutex given, as the implementation of these helpers may change
to use my_atomic operations instead.
*/
/*
Warning:
When compiling without threads, this file is not included.
See the *other* declarations of thread_safe_xxx in include/my_global.h
Second warning:
See include/config-win.h, for yet another implementation.
*/
#ifdef THREAD
#ifndef thread_safe_increment #ifndef thread_safe_increment
#ifdef HAVE_ATOMIC_ADD
#define thread_safe_increment(V,L) atomic_inc((atomic_t*) &V)
#define thread_safe_decrement(V,L) atomic_dec((atomic_t*) &V)
#define thread_safe_add(V,C,L) atomic_add((C),(atomic_t*) &V)
#define thread_safe_sub(V,C,L) atomic_sub((C),(atomic_t*) &V)
#else
#define thread_safe_increment(V,L) \ #define thread_safe_increment(V,L) \
(pthread_mutex_lock((L)), (V)++, pthread_mutex_unlock((L))) (pthread_mutex_lock((L)), (V)++, pthread_mutex_unlock((L)))
#define thread_safe_decrement(V,L) \ #define thread_safe_decrement(V,L) \
(pthread_mutex_lock((L)), (V)--, pthread_mutex_unlock((L))) (pthread_mutex_lock((L)), (V)--, pthread_mutex_unlock((L)))
#define thread_safe_add(V,C,L) (pthread_mutex_lock((L)), (V)+=(C), pthread_mutex_unlock((L))) #endif
#ifndef thread_safe_add
#define thread_safe_add(V,C,L) \
(pthread_mutex_lock((L)), (V)+=(C), pthread_mutex_unlock((L)))
#define thread_safe_sub(V,C,L) \ #define thread_safe_sub(V,C,L) \
(pthread_mutex_lock((L)), (V)-=(C), pthread_mutex_unlock((L))) (pthread_mutex_lock((L)), (V)-=(C), pthread_mutex_unlock((L)))
#endif /* HAVE_ATOMIC_ADD */ #endif
#endif
/*
statistics_xxx functions are for non critical statistic,
maintained in global variables.
When compiling with SAFE_STATISTICS:
- race conditions can not occur.
- some locking occurs, which may cause performance degradation.
When compiling without SAFE_STATISTICS:
- race conditions can occur, making the result slightly inaccurate.
- the lock given is not honored.
*/
#ifdef SAFE_STATISTICS #ifdef SAFE_STATISTICS
#define statistic_increment(V,L) thread_safe_increment((V),(L)) #define statistic_increment(V,L) thread_safe_increment((V),(L))
#define statistic_decrement(V,L) thread_safe_decrement((V),(L)) #define statistic_decrement(V,L) thread_safe_decrement((V),(L))
#define statistic_add(V,C,L) thread_safe_add((V),(C),(L)) #define statistic_add(V,C,L) thread_safe_add((V),(C),(L))
#define statistic_sub(V,C,L) thread_safe_sub((V),(C),(L))
#else #else
#define statistic_decrement(V,L) (V)-- #define statistic_decrement(V,L) (V)--
#define statistic_increment(V,L) (V)++ #define statistic_increment(V,L) (V)++
#define statistic_add(V,C,L) (V)+=(C) #define statistic_add(V,C,L) (V)+=(C)
#define statistic_sub(V,C,L) (V)-=(C)
#endif /* SAFE_STATISTICS */ #endif /* SAFE_STATISTICS */
#endif /* thread_safe_increment */
/*
No locking needed, the counter is owned by the thread
*/
#define status_var_increment(V) (V)++
#define status_var_decrement(V) (V)--
#define status_var_add(V,C) (V)+=(C)
#define status_var_sub(V,C) (V)-=(C)
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -41,7 +41,7 @@ extern int NEAR my_errno; /* Last error in mysys */
#define ERRMSGSIZE (SC_MAXWIDTH) /* Max length of a error message */ #define ERRMSGSIZE (SC_MAXWIDTH) /* Max length of a error message */
#define NRERRBUFFS (2) /* Buffers for parameters */ #define NRERRBUFFS (2) /* Buffers for parameters */
#define MY_FILE_ERROR ((uint) ~0) #define MY_FILE_ERROR ((size_t) -1)
/* General bitmaps for my_func's */ /* General bitmaps for my_func's */
#define MY_FFNF 1 /* Fatal if file not found */ #define MY_FFNF 1 /* Fatal if file not found */
@ -153,13 +153,13 @@ extern ulonglong sf_malloc_mem_limit;
#define TERMINATE(A) {} #define TERMINATE(A) {}
#define QUICK_SAFEMALLOC #define QUICK_SAFEMALLOC
#define NORMAL_SAFEMALLOC #define NORMAL_SAFEMALLOC
extern gptr my_malloc(uint Size,myf MyFlags); extern void *my_malloc(size_t Size,myf MyFlags);
#define my_malloc_ci(SZ,FLAG) my_malloc( SZ, FLAG ) #define my_malloc_ci(SZ,FLAG) my_malloc( SZ, FLAG )
extern gptr my_realloc(gptr oldpoint,uint Size,myf MyFlags); extern void *my_realloc(void *oldpoint, size_t Size, myf MyFlags);
extern void my_no_flags_free(gptr ptr); extern void my_no_flags_free(void *ptr);
extern gptr my_memdup(const byte *from,uint length,myf MyFlags); extern void *my_memdup(const void *from,size_t length,myf MyFlags);
extern char *my_strdup(const char *from,myf MyFlags); extern char *my_strdup(const char *from,myf MyFlags);
extern char *my_strndup(const char *from, uint length, extern char *my_strndup(const char *from, size_t length,
myf MyFlags); myf MyFlags);
/* we do use FG (as a no-op) in below so that a typo on FG is caught */ /* we do use FG (as a no-op) in below so that a typo on FG is caught */
#define my_free(PTR,FG) ((void)FG,my_no_flags_free(PTR)) #define my_free(PTR,FG) ((void)FG,my_no_flags_free(PTR))
@ -171,8 +171,8 @@ extern char *my_strndup(const char *from, uint length,
#ifdef HAVE_LARGE_PAGES #ifdef HAVE_LARGE_PAGES
extern uint my_get_large_page_size(void); extern uint my_get_large_page_size(void);
extern gptr my_large_malloc(uint size, myf my_flags); extern uchar * my_large_malloc(size_t size, myf my_flags);
extern void my_large_free(gptr ptr, myf my_flags); extern void my_large_free(uchar * ptr, myf my_flags);
#else #else
#define my_get_large_page_size() (0) #define my_get_large_page_size() (0)
#define my_large_malloc(A,B) my_malloc_lock((A),(B)) #define my_large_malloc(A,B) my_malloc_lock((A),(B))
@ -258,7 +258,7 @@ typedef struct wild_file_pack /* Struct to hold info when selecting files */
{ {
uint wilds; /* How many wildcards */ uint wilds; /* How many wildcards */
uint not_pos; /* Start of not-theese-files */ uint not_pos; /* Start of not-theese-files */
my_string *wild; /* Pointer to wildcards */ char * *wild; /* Pointer to wildcards */
} WF_PACK; } WF_PACK;
enum loglevel { enum loglevel {
@ -284,7 +284,7 @@ typedef struct st_record_cache /* Used when cacheing records */
int rc_seek,error,inited; int rc_seek,error,inited;
uint rc_length,read_length,reclength; uint rc_length,read_length,reclength;
my_off_t rc_record_pos,end_of_file; my_off_t rc_record_pos,end_of_file;
byte *rc_buff,*rc_buff2,*rc_pos,*rc_end,*rc_request_pos; uchar *rc_buff,*rc_buff2,*rc_pos,*rc_end,*rc_request_pos;
#ifdef HAVE_AIOWAIT #ifdef HAVE_AIOWAIT
int use_async_io; int use_async_io;
my_aio_result aio_result; my_aio_result aio_result;
@ -300,7 +300,7 @@ enum file_type
struct st_my_file_info struct st_my_file_info
{ {
my_string name; char * name;
enum file_type type; enum file_type type;
#if defined(THREAD) && !defined(HAVE_PREAD) #if defined(THREAD) && !defined(HAVE_PREAD)
pthread_mutex_t mutex; pthread_mutex_t mutex;
@ -311,7 +311,7 @@ extern struct st_my_file_info *my_file_info;
typedef struct st_dynamic_array typedef struct st_dynamic_array
{ {
char *buffer; uchar *buffer;
uint elements,max_element; uint elements,max_element;
uint alloc_increment; uint alloc_increment;
uint size_of_element; uint size_of_element;
@ -330,7 +330,7 @@ typedef struct st_my_tmpdir
typedef struct st_dynamic_string typedef struct st_dynamic_string
{ {
char *str; char *str;
uint length,max_length,alloc_increment; size_t length,max_length,alloc_increment;
} DYNAMIC_STRING; } DYNAMIC_STRING;
struct st_io_cache; struct st_io_cache;
@ -346,8 +346,8 @@ typedef struct st_io_cache_share
my_off_t pos_in_file; my_off_t pos_in_file;
/* If a synchronized write cache is the source of the data. */ /* If a synchronized write cache is the source of the data. */
struct st_io_cache *source_cache; struct st_io_cache *source_cache;
byte *buffer; /* The read buffer. */ uchar *buffer; /* The read buffer. */
byte *read_end; /* Behind last valid byte of buffer. */ uchar *read_end; /* Behind last valid byte of buffer. */
int running_threads; /* threads not in lock. */ int running_threads; /* threads not in lock. */
int total_threads; /* threads sharing the cache. */ int total_threads; /* threads sharing the cache. */
int error; /* Last error. */ int error; /* Last error. */
@ -360,7 +360,7 @@ typedef struct st_io_cache_share
typedef struct st_io_cache /* Used when cacheing files */ typedef struct st_io_cache /* Used when cacheing files */
{ {
/* Offset in file corresponding to the first byte of byte* buffer. */ /* Offset in file corresponding to the first byte of uchar* buffer. */
my_off_t pos_in_file; my_off_t pos_in_file;
/* /*
The offset of end of file for READ_CACHE and WRITE_CACHE. The offset of end of file for READ_CACHE and WRITE_CACHE.
@ -369,26 +369,26 @@ typedef struct st_io_cache /* Used when cacheing files */
*/ */
my_off_t end_of_file; my_off_t end_of_file;
/* Points to current read position in the buffer */ /* Points to current read position in the buffer */
byte *read_pos; uchar *read_pos;
/* the non-inclusive boundary in the buffer for the currently valid read */ /* the non-inclusive boundary in the buffer for the currently valid read */
byte *read_end; uchar *read_end;
byte *buffer; /* The read buffer */ uchar *buffer; /* The read buffer */
/* Used in ASYNC_IO */ /* Used in ASYNC_IO */
byte *request_pos; uchar *request_pos;
/* Only used in WRITE caches and in SEQ_READ_APPEND to buffer writes */ /* Only used in WRITE caches and in SEQ_READ_APPEND to buffer writes */
byte *write_buffer; uchar *write_buffer;
/* /*
Only used in SEQ_READ_APPEND, and points to the current read position Only used in SEQ_READ_APPEND, and points to the current read position
in the write buffer. Note that reads in SEQ_READ_APPEND caches can in the write buffer. Note that reads in SEQ_READ_APPEND caches can
happen from both read buffer (byte* buffer) and write buffer happen from both read buffer (uchar* buffer) and write buffer
(byte* write_buffer). (uchar* write_buffer).
*/ */
byte *append_read_pos; uchar *append_read_pos;
/* Points to current write position in the write buffer */ /* Points to current write position in the write buffer */
byte *write_pos; uchar *write_pos;
/* The non-inclusive boundary of the valid write area */ /* The non-inclusive boundary of the valid write area */
byte *write_end; uchar *write_end;
/* /*
Current_pos and current_end are convenience variables used by Current_pos and current_end are convenience variables used by
@ -396,7 +396,7 @@ typedef struct st_io_cache /* Used when cacheing files */
current_pos points to &write_pos, and current_end to &write_end in a current_pos points to &write_pos, and current_end to &write_end in a
WRITE_CACHE, and &read_pos and &read_end respectively otherwise WRITE_CACHE, and &read_pos and &read_end respectively otherwise
*/ */
byte **current_pos, **current_end; uchar **current_pos, **current_end;
#ifdef THREAD #ifdef THREAD
/* /*
The lock is for append buffer used in SEQ_READ_APPEND cache The lock is for append buffer used in SEQ_READ_APPEND cache
@ -420,12 +420,12 @@ typedef struct st_io_cache /* Used when cacheing files */
my_b_read() will call read_function to fetch the data. read_function my_b_read() will call read_function to fetch the data. read_function
must never be invoked directly. must never be invoked directly.
*/ */
int (*read_function)(struct st_io_cache *,byte *,uint); int (*read_function)(struct st_io_cache *,uchar *,size_t);
/* /*
Same idea as in the case of read_function, except my_b_write() needs to Same idea as in the case of read_function, except my_b_write() needs to
be replaced with my_b_append() for a SEQ_READ_APPEND cache be replaced with my_b_append() for a SEQ_READ_APPEND cache
*/ */
int (*write_function)(struct st_io_cache *,const byte *,uint); int (*write_function)(struct st_io_cache *,const uchar *,size_t);
/* /*
Specifies the type of the cache. Depending on the type of the cache Specifies the type of the cache. Depending on the type of the cache
certain operations might not be available and yield unpredicatable certain operations might not be available and yield unpredicatable
@ -460,9 +460,9 @@ typedef struct st_io_cache /* Used when cacheing files */
*/ */
int seek_not_done,error; int seek_not_done,error;
/* buffer_length is memory size allocated for buffer or write_buffer */ /* buffer_length is memory size allocated for buffer or write_buffer */
uint buffer_length; size_t buffer_length;
/* read_length is the same as buffer_length except when we use async io */ /* read_length is the same as buffer_length except when we use async io */
uint read_length; size_t read_length;
myf myflags; /* Flags used to my_read/my_write */ myf myflags; /* Flags used to my_read/my_write */
/* /*
alloced_buffer is 1 if the buffer was allocated by init_io_cache() and alloced_buffer is 1 if the buffer was allocated by init_io_cache() and
@ -518,14 +518,14 @@ typedef int (*qsort2_cmp)(const void *, const void *, const void *);
(((info)->read_end=(info)->read_pos),(*(info)->read_function)(info,0,0)) (((info)->read_end=(info)->read_pos),(*(info)->read_function)(info,0,0))
#define my_b_tell(info) ((info)->pos_in_file + \ #define my_b_tell(info) ((info)->pos_in_file + \
(uint) (*(info)->current_pos - (info)->request_pos)) (size_t) (*(info)->current_pos - (info)->request_pos))
/* tell write offset in the SEQ_APPEND cache */ /* tell write offset in the SEQ_APPEND cache */
int my_b_copy_to_file(IO_CACHE *cache, FILE *file); int my_b_copy_to_file(IO_CACHE *cache, FILE *file);
my_off_t my_b_append_tell(IO_CACHE* info); my_off_t my_b_append_tell(IO_CACHE* info);
my_off_t my_b_safe_tell(IO_CACHE* info); /* picks the correct tell() */ my_off_t my_b_safe_tell(IO_CACHE* info); /* picks the correct tell() */
#define my_b_bytes_in_cache(info) (uint) (*(info)->current_end - \ #define my_b_bytes_in_cache(info) (size_t) (*(info)->current_end - \
*(info)->current_pos) *(info)->current_pos)
typedef uint32 ha_checksum; typedef uint32 ha_checksum;
@ -542,13 +542,13 @@ typedef int (*Process_option_func)(void *ctx, const char *group_name,
extern int my_copy(const char *from,const char *to,myf MyFlags); extern int my_copy(const char *from,const char *to,myf MyFlags);
extern int my_append(const char *from,const char *to,myf MyFlags); extern int my_append(const char *from,const char *to,myf MyFlags);
extern int my_delete(const char *name,myf MyFlags); extern int my_delete(const char *name,myf MyFlags);
extern int my_getwd(my_string buf,uint size,myf MyFlags); extern int my_getwd(char * buf,size_t size,myf MyFlags);
extern int my_setwd(const char *dir,myf MyFlags); extern int my_setwd(const char *dir,myf MyFlags);
extern int my_lock(File fd,int op,my_off_t start, my_off_t length,myf MyFlags); extern int my_lock(File fd,int op,my_off_t start, my_off_t length,myf MyFlags);
extern gptr my_once_alloc(uint Size,myf MyFlags); extern void *my_once_alloc(size_t Size,myf MyFlags);
extern void my_once_free(void); extern void my_once_free(void);
extern char *my_once_strdup(const char *src,myf myflags); extern char *my_once_strdup(const char *src,myf myflags);
extern char *my_once_memdup(const char *src, uint len, myf myflags); extern void *my_once_memdup(const void *src, size_t len, myf myflags);
extern File my_open(const char *FileName,int Flags,myf MyFlags); extern File my_open(const char *FileName,int Flags,myf MyFlags);
extern File my_register_filename(File fd, const char *FileName, extern File my_register_filename(File fd, const char *FileName,
enum file_type type_of_file, enum file_type type_of_file,
@ -566,39 +566,39 @@ extern File my_create_with_symlink(const char *linkname, const char *filename,
extern int my_delete_with_symlink(const char *name, myf MyFlags); extern int my_delete_with_symlink(const char *name, myf MyFlags);
extern int my_rename_with_symlink(const char *from,const char *to,myf MyFlags); extern int my_rename_with_symlink(const char *from,const char *to,myf MyFlags);
extern int my_symlink(const char *content, const char *linkname, myf MyFlags); extern int my_symlink(const char *content, const char *linkname, myf MyFlags);
extern uint my_read(File Filedes,byte *Buffer,uint Count,myf MyFlags); extern size_t my_read(File Filedes,uchar *Buffer,size_t Count,myf MyFlags);
extern uint my_pread(File Filedes,byte *Buffer,uint Count,my_off_t offset, extern size_t my_pread(File Filedes,uchar *Buffer,size_t Count,my_off_t offset,
myf MyFlags); myf MyFlags);
extern int my_rename(const char *from,const char *to,myf MyFlags); extern int my_rename(const char *from,const char *to,myf MyFlags);
extern my_off_t my_seek(File fd,my_off_t pos,int whence,myf MyFlags); extern my_off_t my_seek(File fd,my_off_t pos,int whence,myf MyFlags);
extern my_off_t my_tell(File fd,myf MyFlags); extern my_off_t my_tell(File fd,myf MyFlags);
extern uint my_write(File Filedes,const byte *Buffer,uint Count, extern size_t my_write(File Filedes,const uchar *Buffer,size_t Count,
myf MyFlags); myf MyFlags);
extern uint my_pwrite(File Filedes,const byte *Buffer,uint Count, extern size_t my_pwrite(File Filedes,const uchar *Buffer,size_t Count,
my_off_t offset,myf MyFlags); my_off_t offset,myf MyFlags);
extern uint my_fread(FILE *stream,byte *Buffer,uint Count,myf MyFlags); extern size_t my_fread(FILE *stream,uchar *Buffer,size_t Count,myf MyFlags);
extern uint my_fwrite(FILE *stream,const byte *Buffer,uint Count, extern size_t my_fwrite(FILE *stream,const uchar *Buffer,size_t Count,
myf MyFlags); myf MyFlags);
extern my_off_t my_fseek(FILE *stream,my_off_t pos,int whence,myf MyFlags); extern my_off_t my_fseek(FILE *stream,my_off_t pos,int whence,myf MyFlags);
extern my_off_t my_ftell(FILE *stream,myf MyFlags); extern my_off_t my_ftell(FILE *stream,myf MyFlags);
extern gptr _mymalloc(uint uSize,const char *sFile, extern void *_mymalloc(size_t uSize,const char *sFile,
uint uLine, myf MyFlag); uint uLine, myf MyFlag);
extern gptr _myrealloc(gptr pPtr,uint uSize,const char *sFile, extern void *_myrealloc(void *pPtr,size_t uSize,const char *sFile,
uint uLine, myf MyFlag); uint uLine, myf MyFlag);
extern gptr my_multi_malloc _VARARGS((myf MyFlags, ...)); extern void * my_multi_malloc _VARARGS((myf MyFlags, ...));
extern void _myfree(gptr pPtr,const char *sFile,uint uLine, myf MyFlag); extern void _myfree(void *pPtr,const char *sFile,uint uLine, myf MyFlag);
extern int _sanity(const char *sFile,unsigned int uLine); extern int _sanity(const char *sFile, uint uLine);
extern gptr _my_memdup(const byte *from,uint length, extern void *_my_memdup(const void *from, size_t length,
const char *sFile, uint uLine,myf MyFlag); const char *sFile, uint uLine,myf MyFlag);
extern my_string _my_strdup(const char *from, const char *sFile, uint uLine, extern char * _my_strdup(const char *from, const char *sFile, uint uLine,
myf MyFlag); myf MyFlag);
extern char *_my_strndup(const char *from, uint length, extern char *_my_strndup(const char *from, size_t length,
const char *sFile, uint uLine, const char *sFile, uint uLine,
myf MyFlag); myf MyFlag);
/* implemented in my_memmem.c */ /* implemented in my_memmem.c */
extern void *my_memmem(const void *haystack, size_t haystacklen, extern void *my_memmem(const void *haystack, size_t haystacklen,
const void *needle, size_t needlelen); const void *needle, size_t needlelen);
#ifdef __WIN__ #ifdef __WIN__
@ -639,7 +639,7 @@ extern my_bool my_init(void);
extern void my_end(int infoflag); extern void my_end(int infoflag);
extern int my_redel(const char *from, const char *to, int MyFlags); extern int my_redel(const char *from, const char *to, int MyFlags);
extern int my_copystat(const char *from, const char *to, int MyFlags); extern int my_copystat(const char *from, const char *to, int MyFlags);
extern my_string my_filename(File fd); extern char * my_filename(File fd);
#ifndef THREAD #ifndef THREAD
extern void dont_break(void); extern void dont_break(void);
@ -660,97 +660,97 @@ extern char *my_tmpdir(MY_TMPDIR *tmpdir);
extern void free_tmpdir(MY_TMPDIR *tmpdir); extern void free_tmpdir(MY_TMPDIR *tmpdir);
extern void my_remember_signal(int signal_number,sig_handler (*func)(int)); extern void my_remember_signal(int signal_number,sig_handler (*func)(int));
extern uint dirname_part(my_string to,const char *name); extern size_t dirname_part(char * to, const char *name, size_t *to_res_length);
extern uint dirname_length(const char *name); extern size_t dirname_length(const char *name);
#define base_name(A) (A+dirname_length(A)) #define base_name(A) (A+dirname_length(A))
extern int test_if_hard_path(const char *dir_name); extern int test_if_hard_path(const char *dir_name);
extern my_bool has_path(const char *name); extern my_bool has_path(const char *name);
extern char *convert_dirname(char *to, const char *from, const char *from_end); extern char *convert_dirname(char *to, const char *from, const char *from_end);
extern void to_unix_path(my_string name); extern void to_unix_path(char * name);
extern my_string fn_ext(const char *name); extern char * fn_ext(const char *name);
extern my_string fn_same(my_string toname,const char *name,int flag); extern char * fn_same(char * toname,const char *name,int flag);
extern my_string fn_format(my_string to,const char *name,const char *dir, extern char * fn_format(char * to,const char *name,const char *dir,
const char *form, uint flag); const char *form, uint flag);
extern size_s strlength(const char *str); extern size_t strlength(const char *str);
extern void pack_dirname(my_string to,const char *from); extern void pack_dirname(char * to,const char *from);
extern uint unpack_dirname(my_string to,const char *from); extern size_t unpack_dirname(char * to,const char *from);
extern uint cleanup_dirname(my_string to,const char *from); extern size_t cleanup_dirname(char * to,const char *from);
extern uint system_filename(my_string to,const char *from); extern size_t system_filename(char * to,const char *from);
extern uint unpack_filename(my_string to,const char *from); extern size_t unpack_filename(char * to,const char *from);
extern my_string intern_filename(my_string to,const char *from); extern char * intern_filename(char * to,const char *from);
extern my_string directory_file_name(my_string dst, const char *src); extern char * directory_file_name(char * dst, const char *src);
extern int pack_filename(my_string to, const char *name, size_s max_length); extern int pack_filename(char * to, const char *name, size_t max_length);
extern my_string my_path(my_string to,const char *progname, extern char * my_path(char * to,const char *progname,
const char *own_pathname_part); const char *own_pathname_part);
extern my_string my_load_path(my_string to, const char *path, extern char * my_load_path(char * to, const char *path,
const char *own_path_prefix); const char *own_path_prefix);
extern int wild_compare(const char *str,const char *wildstr, extern int wild_compare(const char *str,const char *wildstr,
pbool str_is_pattern); pbool str_is_pattern);
extern WF_PACK *wf_comp(my_string str); extern WF_PACK *wf_comp(char * str);
extern int wf_test(struct wild_file_pack *wf_pack,const char *name); extern int wf_test(struct wild_file_pack *wf_pack,const char *name);
extern void wf_end(struct wild_file_pack *buffer); extern void wf_end(struct wild_file_pack *buffer);
extern size_s strip_sp(my_string str); extern size_t strip_sp(char * str);
extern void get_date(my_string to,int timeflag,time_t use_time); extern void get_date(char * to,int timeflag,time_t use_time);
extern void soundex(CHARSET_INFO *, my_string out_pntr, my_string in_pntr, extern void soundex(CHARSET_INFO *, char * out_pntr, char * in_pntr,
pbool remove_garbage); pbool remove_garbage);
extern int init_record_cache(RECORD_CACHE *info,uint cachesize,File file, extern int init_record_cache(RECORD_CACHE *info,size_t cachesize,File file,
uint reclength,enum cache_type type, size_t reclength,enum cache_type type,
pbool use_async_io); pbool use_async_io);
extern int read_cache_record(RECORD_CACHE *info,byte *to); extern int read_cache_record(RECORD_CACHE *info,uchar *to);
extern int end_record_cache(RECORD_CACHE *info); extern int end_record_cache(RECORD_CACHE *info);
extern int write_cache_record(RECORD_CACHE *info,my_off_t filepos, extern int write_cache_record(RECORD_CACHE *info,my_off_t filepos,
const byte *record,uint length); const uchar *record,size_t length);
extern int flush_write_cache(RECORD_CACHE *info); extern int flush_write_cache(RECORD_CACHE *info);
extern long my_clock(void); extern long my_clock(void);
extern sig_handler sigtstp_handler(int signal_number); extern sig_handler sigtstp_handler(int signal_number);
extern void handle_recived_signals(void); extern void handle_recived_signals(void);
extern sig_handler my_set_alarm_variable(int signo); extern sig_handler my_set_alarm_variable(int signo);
extern void my_string_ptr_sort(void *base,uint items,size_s size); extern void my_string_ptr_sort(uchar *base, uint items, size_t size);
extern void radixsort_for_str_ptr(uchar* base[], uint number_of_elements, extern void radixsort_for_str_ptr(uchar* base[], uint number_of_elements,
size_s size_of_element,uchar *buffer[]); size_t size_of_element,uchar *buffer[]);
extern qsort_t qsort2(void *base_ptr, size_t total_elems, size_t size, extern qsort_t qsort2(void *base_ptr, size_t total_elems, size_t size,
qsort2_cmp cmp, void *cmp_argument); qsort2_cmp cmp, void *cmp_argument);
extern qsort2_cmp get_ptr_compare(uint); extern qsort2_cmp get_ptr_compare(size_t);
void my_store_ptr(byte *buff, uint pack_length, my_off_t pos); void my_store_ptr(uchar *buff, size_t pack_length, my_off_t pos);
my_off_t my_get_ptr(byte *ptr, uint pack_length); my_off_t my_get_ptr(uchar *ptr, size_t pack_length);
extern int init_io_cache(IO_CACHE *info,File file,uint cachesize, extern int init_io_cache(IO_CACHE *info,File file,size_t cachesize,
enum cache_type type,my_off_t seek_offset, enum cache_type type,my_off_t seek_offset,
pbool use_async_io, myf cache_myflags); pbool use_async_io, myf cache_myflags);
extern my_bool reinit_io_cache(IO_CACHE *info,enum cache_type type, extern my_bool reinit_io_cache(IO_CACHE *info,enum cache_type type,
my_off_t seek_offset,pbool use_async_io, my_off_t seek_offset,pbool use_async_io,
pbool clear_cache); pbool clear_cache);
extern void setup_io_cache(IO_CACHE* info); extern void setup_io_cache(IO_CACHE* info);
extern int _my_b_read(IO_CACHE *info,byte *Buffer,uint Count); extern int _my_b_read(IO_CACHE *info,uchar *Buffer,size_t Count);
#ifdef THREAD #ifdef THREAD
extern int _my_b_read_r(IO_CACHE *info,byte *Buffer,uint Count); extern int _my_b_read_r(IO_CACHE *info,uchar *Buffer,size_t Count);
extern void init_io_cache_share(IO_CACHE *read_cache, IO_CACHE_SHARE *cshare, extern void init_io_cache_share(IO_CACHE *read_cache, IO_CACHE_SHARE *cshare,
IO_CACHE *write_cache, uint num_threads); IO_CACHE *write_cache, uint num_threads);
extern void remove_io_thread(IO_CACHE *info); extern void remove_io_thread(IO_CACHE *info);
#endif #endif
extern int _my_b_seq_read(IO_CACHE *info,byte *Buffer,uint Count); extern int _my_b_seq_read(IO_CACHE *info,uchar *Buffer,size_t Count);
extern int _my_b_net_read(IO_CACHE *info,byte *Buffer,uint Count); extern int _my_b_net_read(IO_CACHE *info,uchar *Buffer,size_t Count);
extern int _my_b_get(IO_CACHE *info); extern int _my_b_get(IO_CACHE *info);
extern int _my_b_async_read(IO_CACHE *info,byte *Buffer,uint Count); extern int _my_b_async_read(IO_CACHE *info,uchar *Buffer,size_t Count);
extern int _my_b_write(IO_CACHE *info,const byte *Buffer,uint Count); extern int _my_b_write(IO_CACHE *info,const uchar *Buffer,size_t Count);
extern int my_b_append(IO_CACHE *info,const byte *Buffer,uint Count); extern int my_b_append(IO_CACHE *info,const uchar *Buffer,size_t Count);
extern int my_b_safe_write(IO_CACHE *info,const byte *Buffer,uint Count); extern int my_b_safe_write(IO_CACHE *info,const uchar *Buffer,size_t Count);
extern int my_block_write(IO_CACHE *info, const byte *Buffer, extern int my_block_write(IO_CACHE *info, const uchar *Buffer,
uint Count, my_off_t pos); size_t Count, my_off_t pos);
extern int my_b_flush_io_cache(IO_CACHE *info, int need_append_buffer_lock); extern int my_b_flush_io_cache(IO_CACHE *info, int need_append_buffer_lock);
#define flush_io_cache(info) my_b_flush_io_cache((info),1) #define flush_io_cache(info) my_b_flush_io_cache((info),1)
extern int end_io_cache(IO_CACHE *info); extern int end_io_cache(IO_CACHE *info);
extern uint my_b_fill(IO_CACHE *info); extern size_t my_b_fill(IO_CACHE *info);
extern void my_b_seek(IO_CACHE *info,my_off_t pos); extern void my_b_seek(IO_CACHE *info,my_off_t pos);
extern uint my_b_gets(IO_CACHE *info, char *to, uint max_length); extern size_t my_b_gets(IO_CACHE *info, char *to, size_t max_length);
extern my_off_t my_b_filelength(IO_CACHE *info); extern my_off_t my_b_filelength(IO_CACHE *info);
extern uint my_b_printf(IO_CACHE *info, const char* fmt, ...); extern size_t my_b_printf(IO_CACHE *info, const char* fmt, ...);
extern uint my_b_vprintf(IO_CACHE *info, const char* fmt, va_list ap); extern size_t my_b_vprintf(IO_CACHE *info, const char* fmt, va_list ap);
extern my_bool open_cached_file(IO_CACHE *cache,const char *dir, extern my_bool open_cached_file(IO_CACHE *cache,const char *dir,
const char *prefix, uint cache_size, const char *prefix, size_t cache_size,
myf cache_myflags); myf cache_myflags);
extern my_bool real_open_cached_file(IO_CACHE *cache); extern my_bool real_open_cached_file(IO_CACHE *cache);
extern void close_cached_file(IO_CACHE *cache); extern void close_cached_file(IO_CACHE *cache);
@ -768,15 +768,15 @@ extern my_bool init_dynamic_array2(DYNAMIC_ARRAY *array,uint element_size,
extern my_bool init_dynamic_array(DYNAMIC_ARRAY *array,uint element_size, extern my_bool init_dynamic_array(DYNAMIC_ARRAY *array,uint element_size,
uint init_alloc,uint alloc_increment uint init_alloc,uint alloc_increment
CALLER_INFO_PROTO); CALLER_INFO_PROTO);
extern my_bool insert_dynamic(DYNAMIC_ARRAY *array,gptr element); extern my_bool insert_dynamic(DYNAMIC_ARRAY *array,uchar * element);
extern byte *alloc_dynamic(DYNAMIC_ARRAY *array); extern uchar *alloc_dynamic(DYNAMIC_ARRAY *array);
extern byte *pop_dynamic(DYNAMIC_ARRAY*); extern uchar *pop_dynamic(DYNAMIC_ARRAY*);
extern my_bool set_dynamic(DYNAMIC_ARRAY *array,gptr element,uint array_index); extern my_bool set_dynamic(DYNAMIC_ARRAY *array,uchar * element,uint array_index);
extern void get_dynamic(DYNAMIC_ARRAY *array,gptr element,uint array_index); extern void get_dynamic(DYNAMIC_ARRAY *array,uchar * element,uint array_index);
extern void delete_dynamic(DYNAMIC_ARRAY *array); extern void delete_dynamic(DYNAMIC_ARRAY *array);
extern void delete_dynamic_element(DYNAMIC_ARRAY *array, uint array_index); extern void delete_dynamic_element(DYNAMIC_ARRAY *array, uint array_index);
extern void freeze_size(DYNAMIC_ARRAY *array); extern void freeze_size(DYNAMIC_ARRAY *array);
extern int get_index_dynamic(DYNAMIC_ARRAY *array, gptr element); extern int get_index_dynamic(DYNAMIC_ARRAY *array, uchar * element);
#define dynamic_array_ptr(array,array_index) ((array)->buffer+(array_index)*(array)->size_of_element) #define dynamic_array_ptr(array,array_index) ((array)->buffer+(array_index)*(array)->size_of_element)
#define dynamic_element(array,array_index,type) ((type)((array)->buffer) +(array_index)) #define dynamic_element(array,array_index,type) ((type)((array)->buffer) +(array_index))
#define push_dynamic(A,B) insert_dynamic((A),(B)) #define push_dynamic(A,B) insert_dynamic((A),(B))
@ -784,19 +784,19 @@ extern int get_index_dynamic(DYNAMIC_ARRAY *array, gptr element);
#define sort_dynamic(A,cmp) qsort((A)->buffer, (A)->elements, (A)->size_of_element, (cmp)) #define sort_dynamic(A,cmp) qsort((A)->buffer, (A)->elements, (A)->size_of_element, (cmp))
extern my_bool init_dynamic_string(DYNAMIC_STRING *str, const char *init_str, extern my_bool init_dynamic_string(DYNAMIC_STRING *str, const char *init_str,
uint init_alloc,uint alloc_increment); size_t init_alloc,size_t alloc_increment);
extern my_bool dynstr_append(DYNAMIC_STRING *str, const char *append); extern my_bool dynstr_append(DYNAMIC_STRING *str, const char *append);
my_bool dynstr_append_mem(DYNAMIC_STRING *str, const char *append, my_bool dynstr_append_mem(DYNAMIC_STRING *str, const char *append,
uint length); size_t length);
extern my_bool dynstr_append_os_quoted(DYNAMIC_STRING *str, const char *append, extern my_bool dynstr_append_os_quoted(DYNAMIC_STRING *str, const char *append,
...); ...);
extern my_bool dynstr_set(DYNAMIC_STRING *str, const char *init_str); extern my_bool dynstr_set(DYNAMIC_STRING *str, const char *init_str);
extern my_bool dynstr_realloc(DYNAMIC_STRING *str, ulong additional_size); extern my_bool dynstr_realloc(DYNAMIC_STRING *str, size_t additional_size);
extern my_bool dynstr_trunc(DYNAMIC_STRING *str, int n); extern my_bool dynstr_trunc(DYNAMIC_STRING *str, size_t n);
extern void dynstr_free(DYNAMIC_STRING *str); extern void dynstr_free(DYNAMIC_STRING *str);
#ifdef HAVE_MLOCK #ifdef HAVE_MLOCK
extern byte *my_malloc_lock(uint length,myf flags); extern void *my_malloc_lock(size_t length,myf flags);
extern void my_free_lock(byte *ptr,myf flags); extern void my_free_lock(void *ptr,myf flags);
#else #else
#define my_malloc_lock(A,B) my_malloc((A),(B)) #define my_malloc_lock(A,B) my_malloc((A),(B))
#define my_free_lock(A,B) my_free((A),(B)) #define my_free_lock(A,B) my_free((A),(B))
@ -804,17 +804,17 @@ extern void my_free_lock(byte *ptr,myf flags);
#define alloc_root_inited(A) ((A)->min_malloc != 0) #define alloc_root_inited(A) ((A)->min_malloc != 0)
#define ALLOC_ROOT_MIN_BLOCK_SIZE (MALLOC_OVERHEAD + sizeof(USED_MEM) + 8) #define ALLOC_ROOT_MIN_BLOCK_SIZE (MALLOC_OVERHEAD + sizeof(USED_MEM) + 8)
#define clear_alloc_root(A) do { (A)->free= (A)->used= (A)->pre_alloc= 0; (A)->min_malloc=0;} while(0) #define clear_alloc_root(A) do { (A)->free= (A)->used= (A)->pre_alloc= 0; (A)->min_malloc=0;} while(0)
extern void init_alloc_root(MEM_ROOT *mem_root, uint block_size, extern void init_alloc_root(MEM_ROOT *mem_root, size_t block_size,
uint pre_alloc_size); size_t pre_alloc_size);
extern gptr alloc_root(MEM_ROOT *mem_root,unsigned int Size); extern void *alloc_root(MEM_ROOT *mem_root, size_t Size);
extern gptr multi_alloc_root(MEM_ROOT *mem_root, ...); extern void *multi_alloc_root(MEM_ROOT *mem_root, ...);
extern void free_root(MEM_ROOT *root, myf MyFLAGS); extern void free_root(MEM_ROOT *root, myf MyFLAGS);
extern void set_prealloc_root(MEM_ROOT *root, char *ptr); extern void set_prealloc_root(MEM_ROOT *root, char *ptr);
extern void reset_root_defaults(MEM_ROOT *mem_root, uint block_size, extern void reset_root_defaults(MEM_ROOT *mem_root, size_t block_size,
uint prealloc_size); size_t prealloc_size);
extern char *strdup_root(MEM_ROOT *root,const char *str); extern char *strdup_root(MEM_ROOT *root,const char *str);
extern char *strmake_root(MEM_ROOT *root,const char *str,uint len); extern char *strmake_root(MEM_ROOT *root,const char *str,size_t len);
extern char *memdup_root(MEM_ROOT *root,const char *str,uint len); extern void *memdup_root(MEM_ROOT *root,const void *str, size_t len);
extern int get_defaults_options(int argc, char **argv, extern int get_defaults_options(int argc, char **argv,
char **defaults, char **extra_defaults, char **defaults, char **extra_defaults,
char **group_suffix); char **group_suffix);
@ -829,19 +829,20 @@ extern int my_search_option_files(const char *conf_file, int *argc,
extern void free_defaults(char **argv); extern void free_defaults(char **argv);
extern void my_print_default_files(const char *conf_file); extern void my_print_default_files(const char *conf_file);
extern void print_defaults(const char *conf_file, const char **groups); extern void print_defaults(const char *conf_file, const char **groups);
extern my_bool my_compress(byte *, ulong *, ulong *); extern my_bool my_compress(uchar *, size_t *, size_t *);
extern my_bool my_uncompress(byte *, ulong *, ulong *); extern my_bool my_uncompress(uchar *, size_t , size_t *);
extern byte *my_compress_alloc(const byte *packet, ulong *len, ulong *complen); extern uchar *my_compress_alloc(const uchar *packet, size_t *len,
extern int packfrm(const void *, uint, const void **, uint *); size_t *complen);
extern int unpackfrm(const void **, uint *, const void *); extern int packfrm(const uchar *, size_t, uchar **, size_t *);
extern int unpackfrm(uchar **, size_t *, const uchar *);
extern ha_checksum my_checksum(ha_checksum crc, const byte *mem, uint count); extern ha_checksum my_checksum(ha_checksum crc, const uchar *mem,
size_t count);
extern uint my_bit_log2(ulong value); extern uint my_bit_log2(ulong value);
extern uint32 my_round_up_to_next_power(uint32 v); extern uint32 my_round_up_to_next_power(uint32 v);
extern uint my_count_bits(ulonglong v); extern uint my_count_bits(ulonglong v);
extern uint my_count_bits_ushort(ushort v); extern uint my_count_bits_ushort(ushort v);
extern void my_sleep(ulong m_seconds); extern void my_sleep(ulong m_seconds);
extern ulong crc32(ulong crc, const uchar *buf, uint len);
extern uint my_set_max_open_files(uint files); extern uint my_set_max_open_files(uint files);
void my_free_open_file_info(void); void my_free_open_file_info(void);
@ -908,17 +909,17 @@ extern char *get_charsets_dir(char *buf);
extern my_bool my_charset_same(CHARSET_INFO *cs1, CHARSET_INFO *cs2); extern my_bool my_charset_same(CHARSET_INFO *cs1, CHARSET_INFO *cs2);
extern my_bool init_compiled_charsets(myf flags); extern my_bool init_compiled_charsets(myf flags);
extern void add_compiled_collation(CHARSET_INFO *cs); extern void add_compiled_collation(CHARSET_INFO *cs);
extern ulong escape_string_for_mysql(CHARSET_INFO *charset_info, extern size_t escape_string_for_mysql(CHARSET_INFO *charset_info,
char *to, ulong to_length, char *to, size_t to_length,
const char *from, ulong length); const char *from, size_t length);
#ifdef __WIN__ #ifdef __WIN__
#define BACKSLASH_MBTAIL #define BACKSLASH_MBTAIL
/* File system character set */ /* File system character set */
extern CHARSET_INFO *fs_character_set(void); extern CHARSET_INFO *fs_character_set(void);
#endif #endif
extern ulong escape_quotes_for_mysql(CHARSET_INFO *charset_info, extern size_t escape_quotes_for_mysql(CHARSET_INFO *charset_info,
char *to, ulong to_length, char *to, size_t to_length,
const char *from, ulong length); const char *from, size_t length);
extern void thd_increment_bytes_sent(ulong length); extern void thd_increment_bytes_sent(ulong length);
extern void thd_increment_bytes_received(ulong length); extern void thd_increment_bytes_received(ulong length);
@ -935,7 +936,7 @@ int my_security_attr_create(SECURITY_ATTRIBUTES **psa, const char **perror,
void my_security_attr_free(SECURITY_ATTRIBUTES *sa); void my_security_attr_free(SECURITY_ATTRIBUTES *sa);
/* implemented in my_conio.c */ /* implemented in my_conio.c */
char* my_cgets(char *string, unsigned long clen, unsigned long* plen); char* my_cgets(char *string, size_t clen, size_t* plen);
#endif #endif
#ifdef __NETWARE__ #ifdef __NETWARE__

View File

@ -25,10 +25,10 @@ extern "C" {
#define MAX_TREE_HEIGHT 64 #define MAX_TREE_HEIGHT 64
#define ELEMENT_KEY(tree,element)\ #define ELEMENT_KEY(tree,element)\
(tree->offset_to_key ? (void*)((byte*) element+tree->offset_to_key) :\ (tree->offset_to_key ? (void*)((uchar*) element+tree->offset_to_key) :\
*((void**) (element+1))) *((void**) (element+1)))
#define tree_set_pointer(element,ptr) *((byte **) (element+1))=((byte*) (ptr)) #define tree_set_pointer(element,ptr) *((uchar **) (element+1))=((uchar*) (ptr))
#define TREE_NO_DUPS 1 #define TREE_NO_DUPS 1

View File

@ -22,7 +22,7 @@ extern "C" {
typedef struct st_trie_node typedef struct st_trie_node
{ {
uint16 leaf; /* Depth from root node if match, 0 else */ uint16 leaf; /* Depth from root node if match, 0 else */
byte c; /* Label on this edge */ uchar c; /* Label on this edge */
struct st_trie_node *next; /* Next label */ struct st_trie_node *next; /* Next label */
struct st_trie_node *links; /* Array of edges leaving this node */ struct st_trie_node *links; /* Array of edges leaving this node */
struct st_trie_node *fail; /* AC failure function */ struct st_trie_node *fail; /* AC failure function */
@ -45,14 +45,14 @@ typedef struct st_ac_trie_state
extern TRIE *trie_init (TRIE *trie, CHARSET_INFO *charset); extern TRIE *trie_init (TRIE *trie, CHARSET_INFO *charset);
extern void trie_free (TRIE *trie); extern void trie_free (TRIE *trie);
extern my_bool trie_insert (TRIE *trie, const byte *key, uint keylen); extern my_bool trie_insert (TRIE *trie, const uchar *key, uint keylen);
extern my_bool ac_trie_prepare (TRIE *trie); extern my_bool ac_trie_prepare (TRIE *trie);
extern void ac_trie_init (TRIE *trie, AC_TRIE_STATE *state); extern void ac_trie_init (TRIE *trie, AC_TRIE_STATE *state);
/* `trie_goto' is internal function and shouldn't be used. */ /* `trie_goto' is internal function and shouldn't be used. */
static inline TRIE_NODE *trie_goto (TRIE_NODE *root, TRIE_NODE *node, byte c) static inline TRIE_NODE *trie_goto (TRIE_NODE *root, TRIE_NODE *node, uchar c)
{ {
TRIE_NODE *next; TRIE_NODE *next;
DBUG_ENTER("trie_goto"); DBUG_ENTER("trie_goto");
@ -67,7 +67,7 @@ static inline TRIE_NODE *trie_goto (TRIE_NODE *root, TRIE_NODE *node, byte c)
/* /*
SYNOPSIS SYNOPSIS
int ac_trie_next (AC_TRIE_STATE *state, byte *c); int ac_trie_next (AC_TRIE_STATE *state, uchar *c);
state - valid pointer to `AC_TRIE_STATE' state - valid pointer to `AC_TRIE_STATE'
c - character to lookup c - character to lookup
@ -79,7 +79,7 @@ static inline TRIE_NODE *trie_goto (TRIE_NODE *root, TRIE_NODE *node, byte c)
`ac_trie_next' returns length of matched word or 0. `ac_trie_next' returns length of matched word or 0.
*/ */
static inline int ac_trie_next (AC_TRIE_STATE *state, byte *c) static inline int ac_trie_next (AC_TRIE_STATE *state, uchar *c)
{ {
TRIE_NODE *root, *node; TRIE_NODE *root, *node;
DBUG_ENTER("ac_trie_next"); DBUG_ENTER("ac_trie_next");
@ -94,7 +94,7 @@ static inline int ac_trie_next (AC_TRIE_STATE *state, byte *c)
/* /*
SYNOPSIS SYNOPSIS
my_bool trie_search (TRIE *trie, const byte *key, uint keylen); my_bool trie_search (TRIE *trie, const uchar *key, uint keylen);
trie - valid pointer to `TRIE' trie - valid pointer to `TRIE'
key - valid pointer to key to insert key - valid pointer to key to insert
keylen - non-0 key length keylen - non-0 key length
@ -113,7 +113,7 @@ static inline int ac_trie_next (AC_TRIE_STATE *state, byte *c)
consecutive loop better (tested) consecutive loop better (tested)
*/ */
static inline my_bool trie_search (TRIE *trie, const byte *key, uint keylen) static inline my_bool trie_search (TRIE *trie, const uchar *key, uint keylen)
{ {
TRIE_NODE *node; TRIE_NODE *node;
uint k; uint k;
@ -123,7 +123,7 @@ static inline my_bool trie_search (TRIE *trie, const byte *key, uint keylen)
for (k= 0; k < keylen; k++) for (k= 0; k < keylen; k++)
{ {
byte p; uchar p;
if (! (node= node->links)) if (! (node= node->links))
DBUG_RETURN(FALSE); DBUG_RETURN(FALSE);
p= key[k]; p= key[k];

View File

@ -25,9 +25,9 @@
C_MODE_START C_MODE_START
void parse_user(const char *user_id_str, uint user_id_len, void parse_user(const char *user_id_str, size_t user_id_len,
char *user_name_str, uint *user_name_len, char *user_name_str, size_t *user_name_len,
char *host_name_str, uint *host_name_len); char *host_name_str, size_t *host_name_len);
C_MODE_END C_MODE_END

View File

@ -28,8 +28,8 @@ extern "C" {
*/ */
#define my_vle_sizeof(ITEM) (((sizeof(ITEM) * CHAR_BIT) + 6) / 7) #define my_vle_sizeof(ITEM) (((sizeof(ITEM) * CHAR_BIT) + 6) / 7)
byte *my_vle_encode(byte *vle, my_size_t max, ulong value); uchar *my_vle_encode(uchar *vle, size_t max, ulong value);
byte const *my_vle_decode(ulong *value_ptr, byte const *vle); uchar const *my_vle_decode(ulong *value_ptr, uchar const *vle);
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -57,27 +57,27 @@ typedef struct xml_stack_st
const char *cur; const char *cur;
const char *end; const char *end;
void *user_data; void *user_data;
int (*enter)(struct xml_stack_st *st,const char *val, uint len); int (*enter)(struct xml_stack_st *st,const char *val, size_t len);
int (*value)(struct xml_stack_st *st,const char *val, uint len); int (*value)(struct xml_stack_st *st,const char *val, size_t len);
int (*leave_xml)(struct xml_stack_st *st,const char *val, uint len); int (*leave_xml)(struct xml_stack_st *st,const char *val, size_t len);
} MY_XML_PARSER; } MY_XML_PARSER;
void my_xml_parser_create(MY_XML_PARSER *st); void my_xml_parser_create(MY_XML_PARSER *st);
void my_xml_parser_free(MY_XML_PARSER *st); void my_xml_parser_free(MY_XML_PARSER *st);
int my_xml_parse(MY_XML_PARSER *st,const char *str, uint len); int my_xml_parse(MY_XML_PARSER *st,const char *str, size_t len);
void my_xml_set_value_handler(MY_XML_PARSER *st, int (*)(MY_XML_PARSER *, void my_xml_set_value_handler(MY_XML_PARSER *st, int (*)(MY_XML_PARSER *,
const char *, const char *,
uint len)); size_t len));
void my_xml_set_enter_handler(MY_XML_PARSER *st, int (*)(MY_XML_PARSER *, void my_xml_set_enter_handler(MY_XML_PARSER *st, int (*)(MY_XML_PARSER *,
const char *, const char *,
uint len)); size_t len));
void my_xml_set_leave_handler(MY_XML_PARSER *st, int (*)(MY_XML_PARSER *, void my_xml_set_leave_handler(MY_XML_PARSER *st, int (*)(MY_XML_PARSER *,
const char *, const char *,
uint len)); size_t len));
void my_xml_set_user_data(MY_XML_PARSER *st, void *); void my_xml_set_user_data(MY_XML_PARSER *st, void *);
uint my_xml_error_pos(MY_XML_PARSER *st); size_t my_xml_error_pos(MY_XML_PARSER *st);
uint my_xml_error_lineno(MY_XML_PARSER *st); uint my_xml_error_lineno(MY_XML_PARSER *st);
const char *my_xml_error_string(MY_XML_PARSER *st); const char *my_xml_error_string(MY_XML_PARSER *st);

View File

@ -227,7 +227,7 @@ typedef struct st_mi_decode_tree /* Decode huff-table */
{ {
uint16 *table; uint16 *table;
uint quick_table_bits; uint quick_table_bits;
byte *intervalls; uchar *intervalls;
} MI_DECODE_TREE; } MI_DECODE_TREE;
@ -259,7 +259,7 @@ typedef struct st_columndef /* column information */
/* invalidator function reference for Query Cache */ /* invalidator function reference for Query Cache */
typedef void (* invalidator_by_filename)(const char * filename); typedef void (* invalidator_by_filename)(const char * filename);
extern my_string myisam_log_filename; /* Name of logfile */ extern char * myisam_log_filename; /* Name of logfile */
extern ulong myisam_block_size; extern ulong myisam_block_size;
extern ulong myisam_concurrent_insert; extern ulong myisam_concurrent_insert;
extern my_bool myisam_flush,myisam_delay_key_write,myisam_single_user; extern my_bool myisam_flush,myisam_delay_key_write,myisam_single_user;
@ -269,26 +269,26 @@ extern ulong myisam_bulk_insert_tree_size, myisam_data_pointer_size;
/* Prototypes for myisam-functions */ /* Prototypes for myisam-functions */
extern int mi_close(struct st_myisam_info *file); extern int mi_close(struct st_myisam_info *file);
extern int mi_delete(struct st_myisam_info *file,const byte *buff); extern int mi_delete(struct st_myisam_info *file,const uchar *buff);
extern struct st_myisam_info *mi_open(const char *name,int mode, extern struct st_myisam_info *mi_open(const char *name,int mode,
uint wait_if_locked); uint wait_if_locked);
extern int mi_panic(enum ha_panic_function function); extern int mi_panic(enum ha_panic_function function);
extern int mi_rfirst(struct st_myisam_info *file,byte *buf,int inx); extern int mi_rfirst(struct st_myisam_info *file,uchar *buf,int inx);
extern int mi_rkey(MI_INFO *info, byte *buf, int inx, const byte *key, extern int mi_rkey(MI_INFO *info, uchar *buf, int inx, const uchar *key,
key_part_map keypart_map, enum ha_rkey_function search_flag); key_part_map keypart_map, enum ha_rkey_function search_flag);
extern int mi_rlast(struct st_myisam_info *file,byte *buf,int inx); extern int mi_rlast(struct st_myisam_info *file,uchar *buf,int inx);
extern int mi_rnext(struct st_myisam_info *file,byte *buf,int inx); extern int mi_rnext(struct st_myisam_info *file,uchar *buf,int inx);
extern int mi_rnext_same(struct st_myisam_info *info, byte *buf); extern int mi_rnext_same(struct st_myisam_info *info, uchar *buf);
extern int mi_rprev(struct st_myisam_info *file,byte *buf,int inx); extern int mi_rprev(struct st_myisam_info *file,uchar *buf,int inx);
extern int mi_rrnd(struct st_myisam_info *file,byte *buf, my_off_t pos); extern int mi_rrnd(struct st_myisam_info *file,uchar *buf, my_off_t pos);
extern int mi_scan_init(struct st_myisam_info *file); extern int mi_scan_init(struct st_myisam_info *file);
extern int mi_scan(struct st_myisam_info *file,byte *buf); extern int mi_scan(struct st_myisam_info *file,uchar *buf);
extern int mi_rsame(struct st_myisam_info *file,byte *record,int inx); extern int mi_rsame(struct st_myisam_info *file,uchar *record,int inx);
extern int mi_rsame_with_pos(struct st_myisam_info *file,byte *record, extern int mi_rsame_with_pos(struct st_myisam_info *file,uchar *record,
int inx, my_off_t pos); int inx, my_off_t pos);
extern int mi_update(struct st_myisam_info *file,const byte *old, extern int mi_update(struct st_myisam_info *file,const uchar *old,
byte *new_record); uchar *new_record);
extern int mi_write(struct st_myisam_info *file,byte *buff); extern int mi_write(struct st_myisam_info *file,uchar *buff);
extern my_off_t mi_position(struct st_myisam_info *file); extern my_off_t mi_position(struct st_myisam_info *file);
extern int mi_status(struct st_myisam_info *info, MI_ISAMINFO *x, uint flag); extern int mi_status(struct st_myisam_info *info, MI_ISAMINFO *x, uint flag);
extern int mi_lock_database(struct st_myisam_info *file,int lock_type); extern int mi_lock_database(struct st_myisam_info *file,int lock_type);
@ -307,7 +307,7 @@ extern ha_rows mi_records_in_range(MI_INFO *info, int inx,
extern int mi_log(int activate_log); extern int mi_log(int activate_log);
extern int mi_is_changed(struct st_myisam_info *info); extern int mi_is_changed(struct st_myisam_info *info);
extern int mi_delete_all_rows(struct st_myisam_info *info); extern int mi_delete_all_rows(struct st_myisam_info *info);
extern ulong _mi_calc_blob_length(uint length , const byte *pos); extern ulong _mi_calc_blob_length(uint length , const uchar *pos);
extern uint mi_get_pointer_length(ulonglong file_length, uint def); extern uint mi_get_pointer_length(ulonglong file_length, uint def);
/* this is used to pass to mysql_myisamchk_table -- by Sasha Pachev */ /* this is used to pass to mysql_myisamchk_table -- by Sasha Pachev */
@ -474,8 +474,8 @@ int chk_size(MI_CHECK *param, MI_INFO *info);
int chk_key(MI_CHECK *param, MI_INFO *info); int chk_key(MI_CHECK *param, MI_INFO *info);
int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend); int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend);
int mi_repair(MI_CHECK *param, register MI_INFO *info, int mi_repair(MI_CHECK *param, register MI_INFO *info,
my_string name, int rep_quick); char * name, int rep_quick);
int mi_sort_index(MI_CHECK *param, register MI_INFO *info, my_string name); int mi_sort_index(MI_CHECK *param, register MI_INFO *info, char * name);
int mi_repair_by_sort(MI_CHECK *param, register MI_INFO *info, int mi_repair_by_sort(MI_CHECK *param, register MI_INFO *info,
const char * name, int rep_quick); const char * name, int rep_quick);
int mi_repair_parallel(MI_CHECK *param, register MI_INFO *info, int mi_repair_parallel(MI_CHECK *param, register MI_INFO *info,
@ -494,7 +494,7 @@ void update_key_parts(MI_KEYDEF *keyinfo, ulong *rec_per_key_part,
ulonglong records); ulonglong records);
int filecopy(MI_CHECK *param, File to,File from,my_off_t start, int filecopy(MI_CHECK *param, File to,File from,my_off_t start,
my_off_t length, const char *type); my_off_t length, const char *type);
int movepoint(MI_INFO *info,byte *record,my_off_t oldpos, int movepoint(MI_INFO *info,uchar *record,my_off_t oldpos,
my_off_t newpos, uint prot_key); my_off_t newpos, uint prot_key);
int write_data_suffix(SORT_INFO *sort_info, my_bool fix_datafile); int write_data_suffix(SORT_INFO *sort_info, my_bool fix_datafile);
int test_if_almost_full(MI_INFO *info); int test_if_almost_full(MI_INFO *info);

View File

@ -78,20 +78,20 @@ typedef struct st_myrg_info
/* Prototypes for merge-functions */ /* Prototypes for merge-functions */
extern int myrg_close(MYRG_INFO *file); extern int myrg_close(MYRG_INFO *file);
extern int myrg_delete(MYRG_INFO *file,const byte *buff); extern int myrg_delete(MYRG_INFO *file,const uchar *buff);
extern MYRG_INFO *myrg_open(const char *name,int mode,int wait_if_locked); extern MYRG_INFO *myrg_open(const char *name,int mode,int wait_if_locked);
extern int myrg_panic(enum ha_panic_function function); extern int myrg_panic(enum ha_panic_function function);
extern int myrg_rfirst(MYRG_INFO *file,byte *buf,int inx); extern int myrg_rfirst(MYRG_INFO *file,uchar *buf,int inx);
extern int myrg_rlast(MYRG_INFO *file,byte *buf,int inx); extern int myrg_rlast(MYRG_INFO *file,uchar *buf,int inx);
extern int myrg_rnext(MYRG_INFO *file,byte *buf,int inx); extern int myrg_rnext(MYRG_INFO *file,uchar *buf,int inx);
extern int myrg_rprev(MYRG_INFO *file,byte *buf,int inx); extern int myrg_rprev(MYRG_INFO *file,uchar *buf,int inx);
extern int myrg_rnext_same(MYRG_INFO *file,byte *buf); extern int myrg_rnext_same(MYRG_INFO *file,uchar *buf);
extern int myrg_rkey(MYRG_INFO *info,byte *buf,int inx, const byte *key, extern int myrg_rkey(MYRG_INFO *info,uchar *buf,int inx, const uchar *key,
key_part_map keypart_map, enum ha_rkey_function search_flag); key_part_map keypart_map, enum ha_rkey_function search_flag);
extern int myrg_rrnd(MYRG_INFO *file,byte *buf,ulonglong pos); extern int myrg_rrnd(MYRG_INFO *file,uchar *buf,ulonglong pos);
extern int myrg_rsame(MYRG_INFO *file,byte *record,int inx); extern int myrg_rsame(MYRG_INFO *file,uchar *record,int inx);
extern int myrg_update(MYRG_INFO *file,const byte *old,byte *new_rec); extern int myrg_update(MYRG_INFO *file,const uchar *old,uchar *new_rec);
extern int myrg_write(MYRG_INFO *info,byte *rec); extern int myrg_write(MYRG_INFO *info,uchar *rec);
extern int myrg_status(MYRG_INFO *file,MYMERGE_INFO *x,int flag); extern int myrg_status(MYRG_INFO *file,MYMERGE_INFO *x,int flag);
extern int myrg_lock_database(MYRG_INFO *file,int lock_type); extern int myrg_lock_database(MYRG_INFO *file,int lock_type);
extern int myrg_create(const char *name, const char **table_names, extern int myrg_create(const char *name, const char **table_names,

View File

@ -53,7 +53,6 @@ typedef char my_bool;
#else #else
#define STDCALL __stdcall #define STDCALL __stdcall
#endif #endif
typedef char * gptr;
#ifndef my_socket_defined #ifndef my_socket_defined
#ifdef __WIN__ #ifdef __WIN__
@ -252,9 +251,9 @@ struct st_mysql_stmt;
typedef struct st_mysql typedef struct st_mysql
{ {
NET net; /* Communication parameters */ NET net; /* Communication parameters */
gptr connector_fd; /* ConnectorFd for SSL */ unsigned char *connector_fd; /* ConnectorFd for SSL */
char *host,*user,*passwd,*unix_socket,*server_version,*host_info,*info; char *host,*user,*passwd,*unix_socket,*server_version,*host_info;
char *db; char *info, *db;
struct charset_info_st *charset; struct charset_info_st *charset;
MYSQL_FIELD *fields; MYSQL_FIELD *fields;
MEM_ROOT field_alloc; MEM_ROOT field_alloc;
@ -753,9 +752,9 @@ typedef struct st_mysql_methods
my_bool (*read_query_result)(MYSQL *mysql); my_bool (*read_query_result)(MYSQL *mysql);
my_bool (*advanced_command)(MYSQL *mysql, my_bool (*advanced_command)(MYSQL *mysql,
enum enum_server_command command, enum enum_server_command command,
const char *header, const unsigned char *header,
unsigned long header_length, unsigned long header_length,
const char *arg, const unsigned char *arg,
unsigned long arg_length, unsigned long arg_length,
my_bool skip_check, my_bool skip_check,
MYSQL_STMT *stmt); MYSQL_STMT *stmt);
@ -848,10 +847,10 @@ int STDCALL mysql_drop_db(MYSQL *mysql, const char *DB);
*/ */
#define simple_command(mysql, command, arg, length, skip_check) \ #define simple_command(mysql, command, arg, length, skip_check) \
(*(mysql)->methods->advanced_command)(mysql, command, NullS, \ (*(mysql)->methods->advanced_command)(mysql, command, 0, \
0, arg, length, skip_check, NULL) 0, arg, length, skip_check, NULL)
#define stmt_command(mysql, command, arg, length, stmt) \ #define stmt_command(mysql, command, arg, length, stmt) \
(*(mysql)->methods->advanced_command)(mysql, command, NullS, \ (*(mysql)->methods->advanced_command)(mysql, command, 0, \
0, arg, length, 1, stmt) 0, arg, length, 1, stmt)
#ifdef __NETWARE__ #ifdef __NETWARE__

View File

@ -223,7 +223,7 @@ typedef struct st_net {
'query_cache_query' should be accessed only via query cache 'query_cache_query' should be accessed only via query cache
functions and methods to maintain proper locking. functions and methods to maintain proper locking.
*/ */
gptr query_cache_query; unsigned char *query_cache_query;
my_bool report_error; /* We should report error (we have unreported error) */ my_bool report_error; /* We should report error (we have unreported error) */
my_bool return_errno; my_bool return_errno;
@ -344,13 +344,13 @@ my_bool my_net_init(NET *net, Vio* vio);
void my_net_local_init(NET *net); void my_net_local_init(NET *net);
void net_end(NET *net); void net_end(NET *net);
void net_clear(NET *net, my_bool clear_buffer); void net_clear(NET *net, my_bool clear_buffer);
my_bool net_realloc(NET *net, unsigned long length); my_bool net_realloc(NET *net, size_t length);
my_bool net_flush(NET *net); my_bool net_flush(NET *net);
my_bool my_net_write(NET *net,const char *packet,unsigned long len); my_bool my_net_write(NET *net,const unsigned char *packet, size_t len);
my_bool net_write_command(NET *net,unsigned char command, my_bool net_write_command(NET *net,unsigned char command,
const char *header, unsigned long head_len, const unsigned char *header, size_t head_len,
const char *packet, unsigned long len); const unsigned char *packet, size_t len);
int net_real_write(NET *net,const char *packet,unsigned long len); int net_real_write(NET *net,const unsigned char *packet, size_t len);
unsigned long my_net_read(NET *net); unsigned long my_net_read(NET *net);
#ifdef _global_h #ifdef _global_h
@ -451,7 +451,7 @@ void my_thread_end(void);
#ifdef _global_h #ifdef _global_h
ulong STDCALL net_field_length(uchar **packet); ulong STDCALL net_field_length(uchar **packet);
my_ulonglong net_field_length_ll(uchar **packet); my_ulonglong net_field_length_ll(uchar **packet);
char *net_store_length(char *pkg, ulonglong length); uchar *net_store_length(uchar *pkg, ulonglong length);
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -27,13 +27,13 @@ extern "C" {
#endif #endif
typedef struct st_queue { typedef struct st_queue {
byte **root; uchar **root;
void *first_cmp_arg; void *first_cmp_arg;
uint elements; uint elements;
uint max_elements; uint max_elements;
uint offset_to_key; /* compare is done on element+offset */ uint offset_to_key; /* compare is done on element+offset */
int max_at_top; /* Set if queue_top gives max */ int max_at_top; /* Set if queue_top gives max */
int (*compare)(void *, byte *,byte *); int (*compare)(void *, uchar *,uchar *);
uint auto_extent; uint auto_extent;
} QUEUE; } QUEUE;
@ -44,7 +44,7 @@ typedef struct st_queue {
#define queue_set_cmp_arg(queue, set_arg) (queue)->first_cmp_arg= set_arg #define queue_set_cmp_arg(queue, set_arg) (queue)->first_cmp_arg= set_arg
#define queue_set_max_at_top(queue, set_arg) \ #define queue_set_max_at_top(queue, set_arg) \
(queue)->max_at_top= set_arg ? (-1 ^ 1) : 0 (queue)->max_at_top= set_arg ? (-1 ^ 1) : 0
typedef int (*queue_compare)(void *,byte *, byte *); typedef int (*queue_compare)(void *,uchar *, uchar *);
int init_queue(QUEUE *queue,uint max_elements,uint offset_to_key, int init_queue(QUEUE *queue,uint max_elements,uint offset_to_key,
pbool max_at_top, queue_compare compare, pbool max_at_top, queue_compare compare,
@ -57,9 +57,9 @@ int reinit_queue(QUEUE *queue,uint max_elements,uint offset_to_key,
void *first_cmp_arg); void *first_cmp_arg);
int resize_queue(QUEUE *queue, uint max_elements); int resize_queue(QUEUE *queue, uint max_elements);
void delete_queue(QUEUE *queue); void delete_queue(QUEUE *queue);
void queue_insert(QUEUE *queue,byte *element); void queue_insert(QUEUE *queue,uchar *element);
int queue_insert_safe(QUEUE *queue, byte *element); int queue_insert_safe(QUEUE *queue, uchar *element);
byte *queue_remove(QUEUE *queue,uint idx); uchar *queue_remove(QUEUE *queue,uint idx);
#define queue_remove_all(queue) { (queue)->elements= 0; } #define queue_remove_all(queue) { (queue)->elements= 0; }
#define queue_is_full(queue) (queue->elements == queue->max_elements) #define queue_is_full(queue) (queue->elements == queue->max_elements)
void _downheap(QUEUE *queue,uint idx); void _downheap(QUEUE *queue,uint idx);

View File

@ -32,9 +32,9 @@ void mysql_read_default_options(struct st_mysql_options *options,
const char *filename,const char *group); const char *filename,const char *group);
my_bool my_bool
cli_advanced_command(MYSQL *mysql, enum enum_server_command command, cli_advanced_command(MYSQL *mysql, enum enum_server_command command,
const char *header, ulong header_length, const unsigned char *header, ulong header_length,
const char *arg, ulong arg_length, my_bool skip_check, const unsigned char *arg, ulong arg_length,
MYSQL_STMT *stmt); my_bool skip_check, MYSQL_STMT *stmt);
unsigned long cli_safe_read(MYSQL *mysql); unsigned long cli_safe_read(MYSQL *mysql);
void set_stmt_errmsg(MYSQL_STMT * stmt, const char *err, int errcode, void set_stmt_errmsg(MYSQL_STMT * stmt, const char *err, int errcode,
const char *sqlstate); const char *sqlstate);

View File

@ -17,29 +17,29 @@
{"ssl", OPT_SSL_SSL, {"ssl", OPT_SSL_SSL,
"Enable SSL for connection (automatically enabled with other flags). Disable with --skip-ssl.", "Enable SSL for connection (automatically enabled with other flags). Disable with --skip-ssl.",
(gptr*) &opt_use_ssl, (gptr*) &opt_use_ssl, 0, GET_BOOL, NO_ARG, 0, 0, 0, (uchar **) &opt_use_ssl, (uchar **) &opt_use_ssl, 0, GET_BOOL, NO_ARG, 0, 0, 0,
0, 0, 0}, 0, 0, 0},
{"ssl-ca", OPT_SSL_CA, {"ssl-ca", OPT_SSL_CA,
"CA file in PEM format (check OpenSSL docs, implies --ssl).", "CA file in PEM format (check OpenSSL docs, implies --ssl).",
(gptr*) &opt_ssl_ca, (gptr*) &opt_ssl_ca, 0, GET_STR, REQUIRED_ARG, (uchar **) &opt_ssl_ca, (uchar **) &opt_ssl_ca, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{"ssl-capath", OPT_SSL_CAPATH, {"ssl-capath", OPT_SSL_CAPATH,
"CA directory (check OpenSSL docs, implies --ssl).", "CA directory (check OpenSSL docs, implies --ssl).",
(gptr*) &opt_ssl_capath, (gptr*) &opt_ssl_capath, 0, GET_STR, REQUIRED_ARG, (uchar **) &opt_ssl_capath, (uchar **) &opt_ssl_capath, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{"ssl-cert", OPT_SSL_CERT, "X509 cert in PEM format (implies --ssl).", {"ssl-cert", OPT_SSL_CERT, "X509 cert in PEM format (implies --ssl).",
(gptr*) &opt_ssl_cert, (gptr*) &opt_ssl_cert, 0, GET_STR, REQUIRED_ARG, (uchar **) &opt_ssl_cert, (uchar **) &opt_ssl_cert, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{"ssl-cipher", OPT_SSL_CIPHER, "SSL cipher to use (implies --ssl).", {"ssl-cipher", OPT_SSL_CIPHER, "SSL cipher to use (implies --ssl).",
(gptr*) &opt_ssl_cipher, (gptr*) &opt_ssl_cipher, 0, GET_STR, REQUIRED_ARG, (uchar **) &opt_ssl_cipher, (uchar **) &opt_ssl_cipher, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{"ssl-key", OPT_SSL_KEY, "X509 key in PEM format (implies --ssl).", {"ssl-key", OPT_SSL_KEY, "X509 key in PEM format (implies --ssl).",
(gptr*) &opt_ssl_key, (gptr*) &opt_ssl_key, 0, GET_STR, REQUIRED_ARG, (uchar **) &opt_ssl_key, (uchar **) &opt_ssl_key, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
#ifdef MYSQL_CLIENT #ifdef MYSQL_CLIENT
{"ssl-verify-server-cert", OPT_SSL_VERIFY_SERVER_CERT, {"ssl-verify-server-cert", OPT_SSL_VERIFY_SERVER_CERT,
"Verify server's \"Common Name\" in its cert against hostname used when connecting. This option is disabled by default.", "Verify server's \"Common Name\" in its cert against hostname used when connecting. This option is disabled by default.",
(gptr*) &opt_ssl_verify_server_cert, (gptr*) &opt_ssl_verify_server_cert, (uchar **) &opt_ssl_verify_server_cert, (uchar **) &opt_ssl_verify_server_cert,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
#endif /* HAVE_OPENSSL */ #endif /* HAVE_OPENSSL */

View File

@ -51,8 +51,8 @@ Vio* vio_new_win32shared_memory(NET *net,HANDLE handle_file_map,
HANDLE event_client_wrote, HANDLE event_client_wrote,
HANDLE event_client_read, HANDLE event_client_read,
HANDLE event_conn_closed); HANDLE event_conn_closed);
int vio_read_pipe(Vio *vio, gptr buf, int size); size_t vio_read_pipe(Vio *vio, uchar * buf, size_t size);
int vio_write_pipe(Vio *vio, const gptr buf, int size); size_t vio_write_pipe(Vio *vio, const uchar * buf, size_t size);
int vio_close_pipe(Vio * vio); int vio_close_pipe(Vio * vio);
#else #else
#define HANDLE void * #define HANDLE void *
@ -62,9 +62,9 @@ void vio_delete(Vio* vio);
int vio_close(Vio* vio); int vio_close(Vio* vio);
void vio_reset(Vio* vio, enum enum_vio_type type, void vio_reset(Vio* vio, enum enum_vio_type type,
my_socket sd, HANDLE hPipe, uint flags); my_socket sd, HANDLE hPipe, uint flags);
int vio_read(Vio *vio, gptr buf, int size); size_t vio_read(Vio *vio, uchar * buf, size_t size);
int vio_read_buff(Vio *vio, gptr buf, int size); size_t vio_read_buff(Vio *vio, uchar * buf, size_t size);
int vio_write(Vio *vio, const gptr buf, int size); size_t vio_write(Vio *vio, const uchar * buf, size_t size);
int vio_blocking(Vio *vio, my_bool onoff, my_bool *old_mode); int vio_blocking(Vio *vio, my_bool onoff, my_bool *old_mode);
my_bool vio_is_blocking(Vio *vio); my_bool vio_is_blocking(Vio *vio);
/* setsockopt TCP_NODELAY at IPPROTO_TCP level, when possible */ /* setsockopt TCP_NODELAY at IPPROTO_TCP level, when possible */
@ -127,8 +127,8 @@ void free_vio_ssl_acceptor_fd(struct st_VioSSLFd *fd);
#endif /* HAVE_OPENSSL */ #endif /* HAVE_OPENSSL */
#ifdef HAVE_SMEM #ifdef HAVE_SMEM
int vio_read_shared_memory(Vio *vio, gptr buf, int size); size_t vio_read_shared_memory(Vio *vio, uchar * buf, size_t size);
int vio_write_shared_memory(Vio *vio, const gptr buf, int size); size_t vio_write_shared_memory(Vio *vio, const uchar * buf, size_t size);
int vio_close_shared_memory(Vio * vio); int vio_close_shared_memory(Vio * vio);
#endif #endif
@ -186,8 +186,8 @@ struct st_vio
/* function pointers. They are similar for socket/SSL/whatever */ /* function pointers. They are similar for socket/SSL/whatever */
void (*viodelete)(Vio*); void (*viodelete)(Vio*);
int (*vioerrno)(Vio*); int (*vioerrno)(Vio*);
int (*read)(Vio*, gptr, int); size_t (*read)(Vio*, uchar *, size_t);
int (*write)(Vio*, const gptr, int); size_t (*write)(Vio*, const uchar *, size_t);
int (*vioblocking)(Vio*, my_bool, my_bool *); int (*vioblocking)(Vio*, my_bool, my_bool *);
my_bool (*is_blocking)(Vio*); my_bool (*is_blocking)(Vio*);
int (*viokeepalive)(Vio*, my_bool); int (*viokeepalive)(Vio*, my_bool);
@ -209,7 +209,7 @@ struct st_vio
HANDLE event_client_wrote; HANDLE event_client_wrote;
HANDLE event_client_read; HANDLE event_client_read;
HANDLE event_conn_closed; HANDLE event_conn_closed;
long shared_memory_remain; size_t shared_memory_remain;
char *shared_memory_pos; char *shared_memory_pos;
NET *net; NET *net;
#endif /* HAVE_SMEM */ #endif /* HAVE_SMEM */

View File

@ -14,7 +14,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
extern uint mysql_port; extern uint mysql_port;
extern my_string mysql_unix_port; extern char * mysql_unix_port;
#define CLIENT_CAPABILITIES (CLIENT_LONG_PASSWORD | CLIENT_LONG_FLAG | \ #define CLIENT_CAPABILITIES (CLIENT_LONG_PASSWORD | CLIENT_LONG_FLAG | \
CLIENT_TRANSACTIONS | \ CLIENT_TRANSACTIONS | \

View File

@ -623,7 +623,7 @@ mysql_connect(MYSQL *mysql,const char *host,
if (!(res=mysql_real_connect(mysql,host,user,passwd,NullS,0,NullS,0))) if (!(res=mysql_real_connect(mysql,host,user,passwd,NullS,0,NullS,0)))
{ {
if (mysql->free_me) if (mysql->free_me)
my_free((gptr) mysql,MYF(0)); my_free((uchar*) mysql,MYF(0));
} }
mysql->reconnect= 1; mysql->reconnect= 1;
DBUG_RETURN(res); DBUG_RETURN(res);
@ -944,7 +944,7 @@ static int default_local_infile_read(void *ptr, char *buf, uint buf_len)
int count; int count;
default_local_infile_data*data = (default_local_infile_data *) ptr; default_local_infile_data*data = (default_local_infile_data *) ptr;
if ((count= (int) my_read(data->fd, (byte *) buf, buf_len, MYF(0))) < 0) if ((count= (int) my_read(data->fd, (uchar *) buf, buf_len, MYF(0))) < 0)
{ {
data->error_num= EE_READ; /* the errmsg for not entire file read */ data->error_num= EE_READ; /* the errmsg for not entire file read */
my_snprintf(data->error_msg, sizeof(data->error_msg)-1, my_snprintf(data->error_msg, sizeof(data->error_msg)-1,
@ -4537,7 +4537,7 @@ static int stmt_fetch_row(MYSQL_STMT *stmt, uchar *row)
} }
if (!((bit<<=1) & 255)) if (!((bit<<=1) & 255))
{ {
bit= 1; /* To next byte */ bit= 1; /* To next uchar */
null_ptr++; null_ptr++;
} }
} }
@ -4730,7 +4730,7 @@ static void stmt_update_metadata(MYSQL_STMT *stmt, MYSQL_ROWS *data)
DBUG_ASSERT(row <= row_end); DBUG_ASSERT(row <= row_end);
if (!((bit<<=1) & 255)) if (!((bit<<=1) & 255))
{ {
bit= 1; /* To next byte */ bit= 1; /* To next uchar */
null_ptr++; null_ptr++;
} }
} }
@ -5041,7 +5041,7 @@ my_bool STDCALL mysql_stmt_close(MYSQL_STMT *stmt)
} }
} }
my_free((gptr) stmt, MYF(MY_WME)); my_free((uchar*) stmt, MYF(MY_WME));
DBUG_RETURN(test(rc)); DBUG_RETURN(test(rc));
} }

View File

@ -206,10 +206,10 @@ void STDCALL mysql_manager_close(MYSQL_MANAGER* con)
allocated in my_multimalloc() along with con->host, freeing allocated in my_multimalloc() along with con->host, freeing
con->hosts frees the whole block con->hosts frees the whole block
*/ */
my_free((gptr)con->host,MYF(MY_ALLOW_ZERO_PTR)); my_free((uchar*)con->host,MYF(MY_ALLOW_ZERO_PTR));
net_end(&con->net); net_end(&con->net);
if (con->free_me) if (con->free_me)
my_free((gptr)con,MYF(0)); my_free((uchar*)con,MYF(0));
} }

View File

@ -47,9 +47,9 @@ void Querycache_stream::store_short(ushort s)
cur_data+= 2; cur_data+= 2;
return; return;
} }
*cur_data= ((byte *)(&s))[0]; *cur_data= ((uchar *)(&s))[0];
use_next_block(TRUE); use_next_block(TRUE);
*(cur_data++)= ((byte *)(&s))[1]; *(cur_data++)= ((uchar *)(&s))[1];
} }
void Querycache_stream::store_int(uint i) void Querycache_stream::store_int(uint i)
@ -100,7 +100,7 @@ void Querycache_stream::store_ll(ulonglong ll)
} }
memcpy(cur_data, &ll, rest_len); memcpy(cur_data, &ll, rest_len);
use_next_block(TRUE); use_next_block(TRUE);
memcpy(cur_data, ((byte*)&ll)+rest_len, 8-rest_len); memcpy(cur_data, ((uchar*)&ll)+rest_len, 8-rest_len);
cur_data+= 8-rest_len; cur_data+= 8-rest_len;
} }
@ -165,9 +165,9 @@ ushort Querycache_stream::load_short()
cur_data+= 2; cur_data+= 2;
return result; return result;
} }
((byte*)&result)[0]= *cur_data; ((uchar*)&result)[0]= *cur_data;
use_next_block(FALSE); use_next_block(FALSE);
((byte*)&result)[1]= *(cur_data++); ((uchar*)&result)[1]= *(cur_data++);
return result; return result;
} }
@ -216,7 +216,7 @@ ulonglong Querycache_stream::load_ll()
} }
memcpy(&result, cur_data, rest_len); memcpy(&result, cur_data, rest_len);
use_next_block(FALSE); use_next_block(FALSE);
memcpy(((byte*)&result)+rest_len, cur_data, 8-rest_len); memcpy(((uchar*)&result)+rest_len, cur_data, 8-rest_len);
cur_data+= 8-rest_len; cur_data+= 8-rest_len;
return result; return result;
} }
@ -245,7 +245,7 @@ char *Querycache_stream::load_str(MEM_ROOT *alloc, uint *str_len)
{ {
char *result; char *result;
*str_len= load_int(); *str_len= load_int();
if (!(result= alloc_root(alloc, *str_len + 1))) if (!(result= (char*) alloc_root(alloc, *str_len + 1)))
return 0; return 0;
load_str_only(result, *str_len); load_str_only(result, *str_len);
return result; return result;
@ -259,7 +259,7 @@ int Querycache_stream::load_safe_str(MEM_ROOT *alloc, char **str, uint *str_len)
return 0; return 0;
} }
(*str_len)--; (*str_len)--;
if (!(*str= alloc_root(alloc, *str_len + 1))) if (!(*str= (char*) alloc_root(alloc, *str_len + 1)))
return 1; return 1;
load_str_only(*str, *str_len); load_str_only(*str, *str_len);
return 0; return 0;

View File

@ -15,8 +15,8 @@
class Querycache_stream class Querycache_stream
{ {
byte *cur_data; uchar *cur_data;
byte *data_end; uchar *data_end;
Query_cache_block *block; Query_cache_block *block;
uint headers_len; uint headers_len;
public: public:
@ -27,7 +27,7 @@ public:
Querycache_stream(Query_cache_block *ini_block, uint ini_headers_len) : Querycache_stream(Query_cache_block *ini_block, uint ini_headers_len) :
block(ini_block), headers_len(ini_headers_len) block(ini_block), headers_len(ini_headers_len)
{ {
cur_data= ((byte*)block)+headers_len; cur_data= ((uchar*)block)+headers_len;
data_end= cur_data + (block->used-headers_len); data_end= cur_data + (block->used-headers_len);
#ifndef DBUG_OFF #ifndef DBUG_OFF
first_block= ini_block; first_block= ini_block;
@ -54,7 +54,7 @@ public:
else else
DBUG_ASSERT(block->type == Query_cache_block::RES_CONT); DBUG_ASSERT(block->type == Query_cache_block::RES_CONT);
cur_data= ((byte*)block)+headers_len; cur_data= ((uchar*)block)+headers_len;
data_end= cur_data + (block->used-headers_len); data_end= cur_data + (block->used-headers_len);
} }

View File

@ -68,13 +68,13 @@ void embedded_get_error(MYSQL *mysql, MYSQL_DATA *data)
net->last_errno= ei->last_errno; net->last_errno= ei->last_errno;
strmake(net->last_error, ei->info, sizeof(net->last_error)); strmake(net->last_error, ei->info, sizeof(net->last_error));
memcpy(net->sqlstate, ei->sqlstate, sizeof(net->sqlstate)); memcpy(net->sqlstate, ei->sqlstate, sizeof(net->sqlstate));
my_free((gptr) data, MYF(0)); my_free(data, MYF(0));
} }
static my_bool static my_bool
emb_advanced_command(MYSQL *mysql, enum enum_server_command command, emb_advanced_command(MYSQL *mysql, enum enum_server_command command,
const char *header, ulong header_length, const uchar *header, ulong header_length,
const char *arg, ulong arg_length, my_bool skip_check, const uchar *arg, ulong arg_length, my_bool skip_check,
MYSQL_STMT *stmt) MYSQL_STMT *stmt)
{ {
my_bool result= 1; my_bool result= 1;
@ -180,7 +180,7 @@ static MYSQL_FIELD *emb_list_fields(MYSQL *mysql)
res= ((THD*) mysql->thd)->cur_data; res= ((THD*) mysql->thd)->cur_data;
((THD*) mysql->thd)->cur_data= 0; ((THD*) mysql->thd)->cur_data= 0;
mysql->field_alloc= res->alloc; mysql->field_alloc= res->alloc;
my_free((gptr) res,MYF(0)); my_free(res,MYF(0));
mysql->status= MYSQL_STATUS_READY; mysql->status= MYSQL_STATUS_READY;
return mysql->fields; return mysql->fields;
} }
@ -209,7 +209,7 @@ static my_bool emb_read_prepare_result(MYSQL *mysql, MYSQL_STMT *stmt)
stmt->fields= mysql->fields; stmt->fields= mysql->fields;
stmt->mem_root= res->alloc; stmt->mem_root= res->alloc;
mysql->fields= NULL; mysql->fields= NULL;
my_free((gptr) res,MYF(0)); my_free(res,MYF(0));
} }
return 0; return 0;
@ -265,7 +265,7 @@ static my_bool emb_read_query_result(MYSQL *mysql)
thd->cur_data= res; thd->cur_data= res;
} }
else else
my_free((gptr) res, MYF(0)); my_free(res, MYF(0));
return 0; return 0;
} }
@ -273,7 +273,7 @@ static my_bool emb_read_query_result(MYSQL *mysql)
static int emb_stmt_execute(MYSQL_STMT *stmt) static int emb_stmt_execute(MYSQL_STMT *stmt)
{ {
DBUG_ENTER("emb_stmt_execute"); DBUG_ENTER("emb_stmt_execute");
char header[5]; uchar header[5];
THD *thd; THD *thd;
my_bool res; my_bool res;
@ -1063,22 +1063,22 @@ bool Protocol_text::store_null()
return false; return false;
} }
bool Protocol::net_store_data(const char *from, uint length) bool Protocol::net_store_data(const uchar *from, size_t length)
{ {
char *field_buf; char *field_buf;
if (!thd->mysql) // bootstrap file handling if (!thd->mysql) // bootstrap file handling
return false; return FALSE;
if (!(field_buf=alloc_root(alloc, length + sizeof(uint) + 1))) if (!(field_buf= (char*) alloc_root(alloc, length + sizeof(uint) + 1)))
return true; return TRUE;
*(uint *)field_buf= length; *(uint *)field_buf= length;
*next_field= field_buf + sizeof(uint); *next_field= field_buf + sizeof(uint);
memcpy(*next_field, from, length); memcpy((uchar*) *next_field, from, length);
(*next_field)[length]= 0; (*next_field)[length]= 0;
if (next_mysql_field->max_length < length) if (next_mysql_field->max_length < length)
next_mysql_field->max_length=length; next_mysql_field->max_length=length;
++next_field; ++next_field;
++next_mysql_field; ++next_mysql_field;
return false; return FALSE;
} }

View File

@ -15,6 +15,7 @@
# Last_slave_errno in SHOW SLAVE STATUS (1st and 3rd commands did not: bug 986) # Last_slave_errno in SHOW SLAVE STATUS (1st and 3rd commands did not: bug 986)
-- source include/master-slave.inc -- source include/master-slave.inc
source include/have_innodb.inc;
connection slave; connection slave;
reset master; reset master;
@ -156,4 +157,15 @@ drop table t2;
connection master; connection master;
drop table t2; drop table t2;
drop table t1; drop table t1;
# BUG#17233 LOAD DATA INFILE: failure causes mysqld dbug_assert, binlog not flushed
CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB;
--error ER_DUP_ENTRY_WITH_KEY_NAME
LOAD DATA INFILE "../std_data_ln/words.dat" INTO TABLE t1;
--disable warnings
DROP TABLE IF EXISTS t1;
--enable warnings
# End of 4.1 tests # End of 4.1 tests

View File

@ -1,13 +1,42 @@
# Grant tests not performed with embedded server ################### include/grant_cache.inc ####################
-- source include/not_embedded.inc #
-- source include/have_query_cache.inc # Test grants with query cache
# See at the end of the test why we disable the ps protocol (*) #
-- disable_ps_protocol # Last update:
# 2007-05-03 ML - Move t/grant_cache.test to include/grant_cache.inc
# - Remove the disabling of the ps-protocol
# - minor improvements like error names instead of numbers
# - Create two toplevel tests sourcing this routine
#
# Running this test with and without "--ps-protocol" produces different
# Qcache_not_cached results because of the following reason:
# In normal protocol, a SELECT failing due to insufficient privileges
# increments Qcache_not_cached, while in ps-protocol, no.
# In detail:
# - In normal protocol,
# the "access denied" errors on SELECT are issued at (stack trace):
# mysql_parse/mysql_execute_command/execute_sqlcom_select/handle_select/
# mysql_select/JOIN::prepare/setup_wild/insert_fields/
# check_grant_all_columns/my_error/my_message_sql, which then calls
# push_warning/query_cache_abort: at this moment,
# query_cache_store_query() has been called, so query exists in cache,
# so thd->net.query_cache_query!=NULL, so query_cache_abort() removes
# the query from cache, which causes a query_cache.refused++ (thus,
# a Qcache_not_cached++).
# - In ps-protocol,
# the error is issued at prepare time;
# for this mysql_test_select() is called, not execute_sqlcom_select()
# (and that also leads to JOIN::prepare/etc). Thus, as
# query_cache_store_query() has not been called,
# thd->net.query_cache_query==NULL, so query_cache_abort() does nothing:
# Qcache_not_cached is not incremented.
#
# A run of this tests with sp/cursor/view protocol does not make sense
# because these protocols serve totally different purposes than this test.
#
--source include/add_anonymous_users.inc --source include/add_anonymous_users.inc
#
# Test grants with query cache
# #
--disable_warnings --disable_warnings
drop table if exists test.t1,mysqltest.t1,mysqltest.t2; drop table if exists test.t1,mysqltest.t1,mysqltest.t2;
@ -18,6 +47,7 @@ set GLOBAL query_cache_size=1355776;
reset query cache; reset query cache;
flush status; flush status;
--echo ----- establish connection root -----
connect (root,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (root,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connection root; connection root;
show grants for current_user; show grants for current_user;
@ -33,6 +63,7 @@ insert into mysqltest.t2 values (3,3,3);
create table test.t1 (a char (10)); create table test.t1 (a char (10));
insert into test.t1 values ("test.t1"); insert into test.t1 values ("test.t1");
select * from t1; select * from t1;
--echo ----- establish connection root2 -----
connect (root2,localhost,root,,mysqltest,$MASTER_MYPORT,$MASTER_MYSOCK); connect (root2,localhost,root,,mysqltest,$MASTER_MYPORT,$MASTER_MYSOCK);
connection root2; connection root2;
# put queries in cache # put queries in cache
@ -51,6 +82,7 @@ grant SELECT on test.t1 to mysqltest_2@localhost;
grant SELECT(a) on mysqltest.t1 to mysqltest_3@localhost; grant SELECT(a) on mysqltest.t1 to mysqltest_3@localhost;
# The following queries should be fetched from cache # The following queries should be fetched from cache
--echo ----- establish connection user1 (user=mysqltest_1) -----
connect (user1,localhost,mysqltest_1,,mysqltest,$MASTER_MYPORT,$MASTER_MYSOCK); connect (user1,localhost,mysqltest_1,,mysqltest,$MASTER_MYPORT,$MASTER_MYSOCK);
connection user1; connection user1;
show grants for current_user(); show grants for current_user();
@ -76,12 +108,14 @@ show status like "Qcache_hits";
show status like "Qcache_not_cached"; show status like "Qcache_not_cached";
--echo ----- establish connection unkuser (user=unkuser) -----
# Don't use '' as user because it will pick Unix login # Don't use '' as user because it will pick Unix login
connect (unkuser,localhost,unkuser,,,$MASTER_MYPORT,$MASTER_MYSOCK); connect (unkuser,localhost,unkuser,,,$MASTER_MYPORT,$MASTER_MYSOCK);
connection unkuser; connection unkuser;
show grants for current_user(); show grants for current_user();
# The following queries should be fetched from cache # The following queries should be fetched from cache
--echo ----- establish connection user2 (user=mysqltest_2) -----
connect (user2,localhost,mysqltest_2,,mysqltest,$MASTER_MYPORT,$MASTER_MYSOCK); connect (user2,localhost,mysqltest_2,,mysqltest,$MASTER_MYPORT,$MASTER_MYSOCK);
connection user2; connection user2;
select "user2"; select "user2";
@ -90,39 +124,41 @@ select a from t1;
select c from t1; select c from t1;
select * from mysqltest.t1,test.t1; select * from mysqltest.t1,test.t1;
--replace_result 127.0.0.1 localhost --replace_result 127.0.0.1 localhost
--error 1142 --error ER_TABLEACCESS_DENIED_ERROR
select * from t2; select * from t2;
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
show status like "Qcache_hits"; show status like "Qcache_hits";
show status like "Qcache_not_cached"; show status like "Qcache_not_cached";
# The following queries should not be fetched from cache # The following queries should not be fetched from cache
--echo ----- establish connection user3 (user=mysqltest_3) -----
connect (user3,localhost,mysqltest_3,,mysqltest,$MASTER_MYPORT,$MASTER_MYSOCK); connect (user3,localhost,mysqltest_3,,mysqltest,$MASTER_MYPORT,$MASTER_MYSOCK);
connection user3; connection user3;
select "user3"; select "user3";
--replace_result 127.0.0.1 localhost --replace_result 127.0.0.1 localhost
--error 1143 --error ER_COLUMNACCESS_DENIED_ERROR
select * from t1; select * from t1;
select a from t1; select a from t1;
--replace_result 127.0.0.1 localhost --replace_result 127.0.0.1 localhost
--error 1143 --error ER_COLUMNACCESS_DENIED_ERROR
select c from t1; select c from t1;
--replace_result 127.0.0.1 localhost --replace_result 127.0.0.1 localhost
--error 1142 --error ER_TABLEACCESS_DENIED_ERROR
select * from t2; select * from t2;
--replace_result 127.0.0.1 localhost --replace_result 127.0.0.1 localhost
--error 1143 --error ER_COLUMNACCESS_DENIED_ERROR
select mysqltest.t1.c from test.t1,mysqltest.t1; select mysqltest.t1.c from test.t1,mysqltest.t1;
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
show status like "Qcache_hits"; show status like "Qcache_hits";
show status like "Qcache_not_cached"; show status like "Qcache_not_cached";
# Connect without a database # Connect without a database
--echo ----- establish connection user4 (user=mysqltest_1) -----
connect (user4,localhost,mysqltest_1,,*NO-ONE*,$MASTER_MYPORT,$MASTER_MYSOCK); connect (user4,localhost,mysqltest_1,,*NO-ONE*,$MASTER_MYPORT,$MASTER_MYSOCK);
connection user4; connection user4;
select "user4"; select "user4";
show grants; show grants;
--error 1046 --error ER_NO_DB_ERROR
select a from t1; select a from t1;
# The following query is not cached before (different database) # The following query is not cached before (different database)
select * from mysqltest.t1,test.t1; select * from mysqltest.t1,test.t1;
@ -135,7 +171,16 @@ show status like "Qcache_not_cached";
# Cleanup # Cleanup
connection root; --echo ----- switch to connection default and close connections -----
connection default;
disconnect root;
disconnect root2;
disconnect user1;
disconnect user2;
disconnect user3;
disconnect user4;
disconnect unkuser;
# #
# A temporary 4.1 workaround to make this test pass if # A temporary 4.1 workaround to make this test pass if
# mysql was compiled with other than latin1 --with-charset=XXX. # mysql was compiled with other than latin1 --with-charset=XXX.
@ -156,30 +201,3 @@ drop database mysqltest;
set GLOBAL query_cache_size=default; set GLOBAL query_cache_size=default;
--source include/delete_anonymous_users.inc --source include/delete_anonymous_users.inc
# End of 4.1 tests
# (*) Why we disable the ps protocol: because in normal protocol,
# a SELECT failing due to insufficient privileges increments
# Qcache_not_cached, while in ps-protocol, no.
# In detail: in normal protocol,
# the "access denied" errors on SELECT are issued at (stack trace):
# mysql_parse/mysql_execute_command/execute_sqlcom_select/handle_select/
# mysql_select/JOIN::prepare/setup_wild/insert_fields/
# check_grant_all_columns/my_error/my_message_sql, which then calls
# push_warning/query_cache_abort: at this moment,
# query_cache_store_query() has been called, so query exists in cache,
# so thd->net.query_cache_query!=NULL, so query_cache_abort() removes
# the query from cache, which causes a query_cache.refused++ (thus,
# a Qcache_not_cached++).
# While in ps-protocol, the error is issued at prepare time;
# for this mysql_test_select() is called, not execute_sqlcom_select()
# (and that also leads to JOIN::prepare/etc). Thus, as
# query_cache_store_query() has not been called,
# thd->net.query_cache_query==NULL, so query_cache_abort() does nothing:
# Qcache_not_cached is not incremented.
# As this test prints Qcache_not_cached after SELECT failures,
# we cannot enable this test in ps-protocol.
--enable_ps_protocol

View File

@ -795,4 +795,33 @@ alter table t2 modify i int default 4, rename t1;
unlock tables; unlock tables;
drop table t1; drop table t1;
#
# Some more tests for ALTER TABLE and LOCK TABLES for transactional tables.
#
# Table which is altered under LOCK TABLES should stay in list of locked
# tables and be available after alter takes place unless ALTER contains
# RENAME clause. We should see the new definition of table, of course.
# Before 5.1 this behavior was inconsistent across the platforms and
# different engines. See also tests in alter_table.test
#
--disable_warnings
drop table if exists t1;
--enable_warnings
create table t1 (i int);
insert into t1 values ();
lock table t1 write;
# Example of so-called 'fast' ALTER TABLE
alter table t1 modify i int default 1;
insert into t1 values ();
select * from t1;
# And now full-blown ALTER TABLE
alter table t1 change i c char(10) default "Two";
insert into t1 values ();
select * from t1;
unlock tables;
select * from t1;
drop tables t1;
--echo End of 5.1 tests --echo End of 5.1 tests

View File

@ -0,0 +1,271 @@
############### include/query_cache_sql_prepare.inc ################
#
# This is to see how statements prepared via the PREPARE SQL command
# go into the query cache: if using parameters they cannot; if not
# using parameters they can.
# Query cache is abbreviated as "QC"
#
# Last update:
# 2007-05-03 ML - Move t/query_cache_sql_prepare.test
# to include/query_cache_sql_prepare.inc
# - Create two toplevel tests sourcing this routine
# - Add tests checking that
# - another connection gets the same amount of QC hits
# - statements running via ps-protocol do not hit QC results
# of preceding sql EXECUTEs
#
--source include/have_query_cache.inc
# embedded can't make more than one connection, which this test needs
-- source include/not_embedded.inc
--echo ---- establish connection con1 (root) ----
connect (con1,localhost,root,,test,$MASTER_MYPORT,);
--echo ---- switch to connection default ----
connection default;
set @initial_query_cache_size = @@global.query_cache_size;
set @@global.query_cache_size=100000;
flush status;
--disable_warnings
drop table if exists t1;
--enable_warnings
create table t1(c1 int);
insert into t1 values(1),(10),(100);
# Prepared statements has no parameters, query caching should happen
prepare stmt1 from "select * from t1 where c1=10";
show status like 'Qcache_hits';
execute stmt1;
show status like 'Qcache_hits';
execute stmt1;
show status like 'Qcache_hits';
execute stmt1;
show status like 'Qcache_hits';
# Another prepared statement (same text, same connection), should hit the QC
prepare stmt2 from "select * from t1 where c1=10";
execute stmt2;
show status like 'Qcache_hits';
execute stmt2;
show status like 'Qcache_hits';
execute stmt2;
show status like 'Qcache_hits';
# Another prepared statement (same text, other connection), should hit the QC
--echo ---- switch to connection con1 ----
connection con1;
prepare stmt3 from "select * from t1 where c1=10";
execute stmt3;
show status like 'Qcache_hits';
execute stmt3;
show status like 'Qcache_hits';
execute stmt3;
show status like 'Qcache_hits';
--echo ---- switch to connection default ----
connection default;
# Mixup tests, where statements without PREPARE.../EXECUTE.... meet statements
# with PREPARE.../EXECUTE.... (text protocol). Both statements have the
# same text. QC hits occur only when both statements use the same protocol.
# The outcome of the test depends on the mysqltest startup options
# - with "--ps-protocol"
# Statements without PREPARE.../EXECUTE.... run as prepared statements
# with binary protocol. Expect to get no QC hits.
# - without any "--<whatever>-protocol"
# Statements without PREPARE.../EXECUTE run as non prepared statements
# with text protocol. Expect to get QC hits.
############################################################################
#
# Statement with PREPARE.../EXECUTE.... first
let $my_stmt= SELECT * FROM t1 WHERE c1 = 100;
eval prepare stmt10 from "$my_stmt";
show status like 'Qcache_hits';
execute stmt10;
show status like 'Qcache_hits';
execute stmt10;
show status like 'Qcache_hits';
eval $my_stmt;
show status like 'Qcache_hits';
--echo ---- switch to connection con1 ----
connection con1;
eval $my_stmt;
show status like 'Qcache_hits';
--echo ---- switch to connection default ----
connection default;
#
# Statement without PREPARE.../EXECUTE.... first
let $my_stmt= SELECT * FROM t1 WHERE c1 = 1;
eval prepare stmt11 from "$my_stmt";
--echo ---- switch to connection con1 ----
connection con1;
eval prepare stmt12 from "$my_stmt";
--echo ---- switch to connection default ----
connection default;
eval $my_stmt;
show status like 'Qcache_hits';
eval $my_stmt;
show status like 'Qcache_hits';
execute stmt11;
show status like 'Qcache_hits';
--echo ---- switch to connection con1 ----
connection con1;
execute stmt12;
show status like 'Qcache_hits';
--echo ---- switch to connection default ----
connection default;
# Prepared statement has parameters, query caching should not happen
prepare stmt1 from "select * from t1 where c1=?";
show status like 'Qcache_hits';
set @a=1;
execute stmt1 using @a;
show status like 'Qcache_hits';
execute stmt1 using @a;
show status like 'Qcache_hits';
--echo ---- switch to connection con1 ----
connection con1;
set @a=1;
prepare stmt4 from "select * from t1 where c1=?";
execute stmt4 using @a;
show status like 'Qcache_hits';
--echo ---- switch to connection default ----
connection default;
# See if enabling/disabling the query cache between PREPARE and
# EXECUTE is an issue; the expected result is that the query cache
# will not be used.
# Indeed, decision to read/write the query cache is taken at PREPARE
# time, so if the query cache was disabled at PREPARE time then no
# execution of the statement will read/write the query cache.
# If the query cache was enabled at PREPARE time, but disabled at
# EXECUTE time, at EXECUTE time the query cache internal functions do
# nothing so again the query cache is not read/written. But if the
# query cache is re-enabled before another execution then that
# execution will read/write the query cache.
# QC is enabled at PREPARE
prepare stmt1 from "select * from t1 where c1=10";
# then QC is disabled at EXECUTE
# Expect to see no additional Qcache_hits.
set global query_cache_size=0;
show status like 'Qcache_hits';
execute stmt1;
show status like 'Qcache_hits';
execute stmt1;
show status like 'Qcache_hits';
execute stmt1;
show status like 'Qcache_hits';
# The QC is global = affects also other connections.
# Expect to see no additional Qcache_hits.
--echo ---- switch to connection con1 ----
connection con1;
execute stmt3;
show status like 'Qcache_hits';
execute stmt3;
show status like 'Qcache_hits';
execute stmt3;
show status like 'Qcache_hits';
#
# then QC is re-enabled for more EXECUTE.
--echo ---- switch to connection default ----
connection default;
set global query_cache_size=100000;
# Expect to see additional Qcache_hits.
# The fact that the QC was temporary disabled should have no affect
# except that the first execute will not hit results from the
# beginning of the test (because QC has been emptied meanwhile by
# setting its size to 0).
execute stmt1;
show status like 'Qcache_hits';
execute stmt1;
show status like 'Qcache_hits';
execute stmt1;
show status like 'Qcache_hits';
# The QC is global = affects also other connections.
--echo ---- switch to connection con1 ----
connection con1;
execute stmt3;
show status like 'Qcache_hits';
execute stmt3;
show status like 'Qcache_hits';
execute stmt3;
show status like 'Qcache_hits';
--echo ---- switch to connection default ----
connection default;
#
# then QC is re-disabled for more EXECUTE.
# Expect to see no additional Qcache_hits.
# The fact that the QC was temporary enabled should have no affect.
set global query_cache_size=0;
show status like 'Qcache_hits';
execute stmt1;
show status like 'Qcache_hits';
execute stmt1;
show status like 'Qcache_hits';
execute stmt1;
show status like 'Qcache_hits';
# The QC is global = affects also other connections.
--echo ---- switch to connection con1 ----
connection con1;
execute stmt3;
show status like 'Qcache_hits';
execute stmt3;
show status like 'Qcache_hits';
execute stmt3;
show status like 'Qcache_hits';
#
--echo ---- switch to connection default ----
connection default;
# QC is disabled at PREPARE
set global query_cache_size=0;
prepare stmt1 from "select * from t1 where c1=10";
--echo ---- switch to connection con1 ----
connection con1;
prepare stmt3 from "select * from t1 where c1=10";
--echo ---- switch to connection default ----
connection default;
# then QC is enabled at EXECUTE
set global query_cache_size=100000;
show status like 'Qcache_hits';
execute stmt1;
show status like 'Qcache_hits';
execute stmt1;
show status like 'Qcache_hits';
execute stmt1;
show status like 'Qcache_hits';
# The QC is global = affects also other connections.
--echo ---- switch to connection con1 ----
connection con1;
show status like 'Qcache_hits';
execute stmt3;
show status like 'Qcache_hits';
execute stmt3;
show status like 'Qcache_hits';
execute stmt3;
show status like 'Qcache_hits';
--echo ---- switch to connection default ----
connection default;
#
# QC is disabled at PREPARE
set global query_cache_size=0;
prepare stmt1 from "select * from t1 where c1=?";
# then QC is enabled at EXECUTE
set global query_cache_size=100000;
show status like 'Qcache_hits';
set @a=1;
execute stmt1 using @a;
show status like 'Qcache_hits';
set @a=100;
execute stmt1 using @a;
show status like 'Qcache_hits';
set @a=10;
execute stmt1 using @a;
show status like 'Qcache_hits';
drop table t1;
--echo ---- disconnect connection con1 ----
disconnect con1;
set @@global.query_cache_size=@initial_query_cache_size;
flush status; # reset Qcache status variables for next tests

View File

@ -265,8 +265,13 @@ sub mtr_report_stats ($) {
else else
{ {
# We report different types of problems in order # We report different types of problems in order
foreach my $pattern ( "^Warning:", "^Error:", "^==.* at 0x", foreach my $pattern ( "^Warning:",
"InnoDB: Warning", "missing DBUG_RETURN", "\\[Warning\\]",
"\\[ERROR\\]",
"^Error:", "^==.* at 0x",
"InnoDB: Warning",
"^safe_mutex:",
"missing DBUG_RETURN",
"mysqld: Warning", "mysqld: Warning",
"allocated at line", "allocated at line",
"Attempting backtrace", "Assertion .* failed" ) "Attempting backtrace", "Assertion .* failed" )
@ -278,18 +283,91 @@ sub mtr_report_stats ($) {
mtr_warning("can't read $errlog"); mtr_warning("can't read $errlog");
next; next;
} }
my $leak_reports_expected= undef;
while ( <ERR> ) while ( <ERR> )
{ {
# There is a test case that purposely provokes a
# SAFEMALLOC leak report, even though there is no actual
# leak. We need to detect this, and ignore the warning in
# that case.
if (/Begin safemalloc memory dump:/) {
$leak_reports_expected= 1;
} elsif (/End safemalloc memory dump./) {
$leak_reports_expected= undef;
}
# Skip some non fatal warnings from the log files # Skip some non fatal warnings from the log files
if ( /Warning:\s+Table:.* on (delete|rename)/ or if (
/Warning:\s+Setting lower_case_table_names=2/ or /\"SELECT UNIX_TIMESTAMP\(\)\" failed on master/ or
/Warning:\s+One can only use the --user.*root/ or /Aborted connection/ or
/InnoDB: Warning: we did not need to do crash recovery/) /Client requested master to start replication from impossible position/ or
/Could not find first log file name in binary log/ or
/Enabling keys got errno/ or
/Error reading master configuration/ or
/Error reading packet/ or
/Event Scheduler/ or
/Failed to open log/ or
/Failed to open the existing master info file/ or
/Forcing shutdown of [0-9]* plugins/ or
/Got error [0-9]* when reading table/ or
/Incorrect definition of table/ or
/Incorrect information in file/ or
/InnoDB: Warning: we did not need to do crash recovery/ or
/Invalid \(old\?\) table or database name/ or
/Lock wait timeout exceeded/ or
/Log entry on master is longer than max_allowed_packet/ or
/unknown option '--loose-/ or
/unknown variable 'loose-/ or
/You have forced lower_case_table_names to 0 through a command-line option/ or
/Setting lower_case_table_names=2/ or
/NDB Binlog:/ or
/NDB: failed to setup table/ or
/NDB: only row based binary logging/ or
/Neither --relay-log nor --relay-log-index were used/ or
/Query partially completed/ or
/Slave I.O thread aborted while waiting for relay log/ or
/Slave SQL thread is stopped because UNTIL condition/ or
/Slave SQL thread retried transaction/ or
/Slave \(additional info\)/ or
/Slave: .*Duplicate column name/ or
/Slave: .*master may suffer from/ or
/Slave: According to the master's version/ or
/Slave: Column [0-9]* type mismatch/ or
/Slave: Error .* doesn't exist/ or
/Slave: Error .*Deadlock found/ or
/Slave: Error .*Unknown table/ or
/Slave: Error in Write_rows event: / or
/Slave: Field .* of table .* has no default value/ or
/Slave: Query caused different errors on master and slave/ or
/Slave: Table .* doesn't exist/ or
/Slave: Table width mismatch/ or
/Slave: The incident LOST_EVENTS occured on the master/ or
/Slave: Unknown error.* 1105/ or
/Slave: Can't drop database.* database doesn't exist/ or
/Sort aborted/ or
/Time-out in NDB/ or
/Warning:\s+One can only use the --user.*root/ or
/Warning:\s+Setting lower_case_table_names=2/ or
/Warning:\s+Table:.* on (delete|rename)/ or
/You have an error in your SQL syntax/ or
/deprecated/ or
/description of time zone/ or
/equal MySQL server ids/ or
/error .*connecting to master/ or
/error reading log entry/ or
/lower_case_table_names is set/ or
/skip-name-resolve mode/ or
/slave SQL thread aborted/ or
/Slave: .*Duplicate entry/
)
{ {
next; # Skip these lines next; # Skip these lines
} }
if ( /$pattern/ ) if ( /$pattern/ )
{ {
if ($leak_reports_expected) {
next;
}
$found_problems= 1; $found_problems= 1;
print WARN $_; print WARN $_;
} }

View File

@ -629,6 +629,11 @@ else
TEST_MODE=`echo $TEST_MODE | sed 's/^ *//'` TEST_MODE=`echo $TEST_MODE | sed 's/^ *//'`
fi fi
#
# Skip tests that doesn't work with shell version
#
SKIP_TEST="$SKIP_TEST bootstrap"
#++ #++
# mysqld Environment Parameters # mysqld Environment Parameters
#-- #--
@ -900,8 +905,8 @@ MYSQL_DUMP="$MYSQL_DUMP --no-defaults --debug-info -uroot --socket=$MASTER_MYSOC
MYSQL_SLAP="$MYSQL_SLAP -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLSLAP_OPT" MYSQL_SLAP="$MYSQL_SLAP -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLSLAP_OPT"
MYSQL_DUMP_SLAVE="$MYSQL_DUMP_DIR --no-defaults -uroot --socket=$SLAVE_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLDUMP_OPT" MYSQL_DUMP_SLAVE="$MYSQL_DUMP_DIR --no-defaults -uroot --socket=$SLAVE_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLDUMP_OPT"
MYSQL_SHOW="$MYSQL_SHOW --no-defaults --debug-info -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLSHOW_OPT" MYSQL_SHOW="$MYSQL_SHOW --no-defaults --debug-info -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLSHOW_OPT"
MYSQL_BINLOG="$MYSQL_BINLOG --debug-info --no-defaults --local-load=$MYSQL_TMP_DIR --character-sets-dir=$CHARSETSDIR $EXTRA_MYSQLBINLOG_OPT" MYSQL_BINLOG="$MYSQL_BINLOG --no-defaults --debug-info --local-load=$MYSQL_TMP_DIR --character-sets-dir=$CHARSETSDIR $EXTRA_MYSQLBINLOG_OPT"
MYSQL_IMPORT="$MYSQL_IMPORT --debug-info -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLDUMP_OPT" MYSQL_IMPORT="$MYSQL_IMPORT --no-defaults --debug-info -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLDUMP_OPT"
MYSQL_FIX_SYSTEM_TABLES="$MYSQL_FIX_SYSTEM_TABLES --no-defaults --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD --basedir=$BASEDIR --bindir=$CLIENT_BINDIR --verbose" MYSQL_FIX_SYSTEM_TABLES="$MYSQL_FIX_SYSTEM_TABLES --no-defaults --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD --basedir=$BASEDIR --bindir=$CLIENT_BINDIR --verbose"
MYSQL="$MYSQL --no-defaults --debug-info --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD" MYSQL="$MYSQL --no-defaults --debug-info --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD"
export MYSQL MYSQL_CHECK MYSQL_DUMP MYSQL_DUMP_SLAVE MYSQL_SHOW MYSQL_BINLOG MYSQL_FIX_SYSTEM_TABLES MYSQL_IMPORT export MYSQL MYSQL_CHECK MYSQL_DUMP MYSQL_DUMP_SLAVE MYSQL_SHOW MYSQL_BINLOG MYSQL_FIX_SYSTEM_TABLES MYSQL_IMPORT

View File

@ -1803,6 +1803,18 @@ sub environment_setup () {
$ENV{'CHARSETSDIR'}= $path_charsetsdir; $ENV{'CHARSETSDIR'}= $path_charsetsdir;
$ENV{'UMASK'}= "0660"; # The octal *string* $ENV{'UMASK'}= "0660"; # The octal *string*
$ENV{'UMASK_DIR'}= "0770"; # The octal *string* $ENV{'UMASK_DIR'}= "0770"; # The octal *string*
#
# MySQL tests can produce output in various character sets
# (especially, ctype_xxx.test). To avoid confusing Perl
# with output which is incompatible with the current locale
# settings, we reset the current values of LC_ALL and LC_CTYPE to "C".
# For details, please see
# Bug#27636 tests fails if LC_* variables set to *_*.UTF-8
#
$ENV{'LC_ALL'}= "C";
$ENV{'LC_CTYPE'}= "C";
$ENV{'LC_COLLATE'}= "C"; $ENV{'LC_COLLATE'}= "C";
$ENV{'USE_RUNNING_SERVER'}= $opt_extern; $ENV{'USE_RUNNING_SERVER'}= $opt_extern;
$ENV{'MYSQL_TEST_DIR'}= $glob_mysql_test_dir; $ENV{'MYSQL_TEST_DIR'}= $glob_mysql_test_dir;
@ -3873,13 +3885,15 @@ sub mysqld_arguments ($$$$) {
} }
else else
{ {
mtr_add_arg($args, "%s--master-user=root", $prefix); if ($mysql_version_id < 50200)
mtr_add_arg($args, "%s--master-connect-retry=1", $prefix); {
mtr_add_arg($args, "%s--master-host=127.0.0.1", $prefix); mtr_add_arg($args, "%s--master-user=root", $prefix);
mtr_add_arg($args, "%s--master-password=", $prefix); mtr_add_arg($args, "%s--master-connect-retry=1", $prefix);
mtr_add_arg($args, "%s--master-port=%d", $prefix, mtr_add_arg($args, "%s--master-host=127.0.0.1", $prefix);
$master->[0]->{'port'}); # First master mtr_add_arg($args, "%s--master-password=", $prefix);
mtr_add_arg($args, "%s--master-port=%d", $prefix,
$master->[0]->{'port'}); # First master
}
my $slave_server_id= 2 + $idx; my $slave_server_id= 2 + $idx;
my $slave_rpl_rank= $slave_server_id; my $slave_rpl_rank= $slave_server_id;
mtr_add_arg($args, "%s--server-id=%d", $prefix, $slave_server_id); mtr_add_arg($args, "%s--server-id=%d", $prefix, $slave_server_id);

View File

@ -5,14 +5,53 @@ key (n2, n3, n1),
key (n3, n1, n2)); key (n3, n1, n2));
create table t2 (i int); create table t2 (i int);
alter table t1 disable keys; alter table t1 disable keys;
insert into t1 values (RAND()*1000, RAND()*1000, RAND()*1000);
reset master; reset master;
set session debug="+d,sleep_alter_enable_indexes";
alter table t1 enable keys;; alter table t1 enable keys;;
insert into t2 values (1); insert into t2 values (1);
insert into t1 values (1, 1, 1); insert into t1 values (1, 1, 1);
show binlog events in 'master-bin.000001' from 102; set session debug="-d,sleep_alter_enable_indexes";
show binlog events in 'master-bin.000001' from 106;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; insert into t2 values (1) master-bin.000001 # Query 1 # use `test`; insert into t2 values (1)
master-bin.000001 # Query 1 # use `test`; alter table t1 enable keys master-bin.000001 # Query 1 # use `test`; alter table t1 enable keys
master-bin.000001 # Query 1 # use `test`; insert into t1 values (1, 1, 1) master-bin.000001 # Query 1 # use `test`; insert into t1 values (1, 1, 1)
drop tables t1, t2; drop tables t1, t2;
End of 5.0 tests End of 5.0 tests
drop table if exists t1, t2, t3;
create table t1 (i int);
reset master;
set session debug="+d,sleep_alter_before_main_binlog";
alter table t1 change i c char(10) default 'Test1';;
insert into t1 values ();
select * from t1;
c
Test1
alter table t1 change c vc varchar(100) default 'Test2';;
rename table t1 to t2;
drop table t2;
create table t1 (i int);
alter table t1 change i c char(10) default 'Test3', rename to t2;;
insert into t2 values ();
select * from t2;
c
Test3
alter table t2 change c vc varchar(100) default 'Test2', rename to t1;;
rename table t1 to t3;
drop table t3;
set session debug="-d,sleep_alter_before_main_binlog";
show binlog events in 'master-bin.000001' from 106;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; alter table t1 change i c char(10) default 'Test1'
master-bin.000001 # Query 1 # use `test`; insert into t1 values ()
master-bin.000001 # Query 1 # use `test`; alter table t1 change c vc varchar(100) default 'Test2'
master-bin.000001 # Query 1 # use `test`; rename table t1 to t2
master-bin.000001 # Query 1 # use `test`; drop table t2
master-bin.000001 # Query 1 # use `test`; create table t1 (i int)
master-bin.000001 # Query 1 # use `test`; alter table t1 change i c char(10) default 'Test3', rename to t2
master-bin.000001 # Query 1 # use `test`; insert into t2 values ()
master-bin.000001 # Query 1 # use `test`; alter table t2 change c vc varchar(100) default 'Test2', rename to t1
master-bin.000001 # Query 1 # use `test`; rename table t1 to t3
master-bin.000001 # Query 1 # use `test`; drop table t3
End of 5.1 tests

View File

@ -977,6 +977,59 @@ SELECT * FROM t1;
v b v b
abc 5 abc 5
DROP TABLE t1; DROP TABLE t1;
End of 5.0 tests
drop table if exists t1, t2, t3;
create table t1 (i int);
create table t3 (j int);
insert into t1 values ();
insert into t3 values ();
lock table t1 write, t3 read;
alter table t1 modify i int default 1;
insert into t1 values ();
select * from t1;
i
NULL
1
alter table t1 change i c char(10) default "Two";
insert into t1 values ();
select * from t1;
c
NULL
1
Two
alter table t1 modify c char(10) default "Three", rename to t2;
select * from t1;
ERROR HY000: Table 't1' was not locked with LOCK TABLES
select * from t2;
ERROR HY000: Table 't2' was not locked with LOCK TABLES
select * from t3;
j
NULL
unlock tables;
insert into t2 values ();
select * from t2;
c
NULL
1
Three
lock table t2 write, t3 read;
alter table t2 change c vc varchar(100) default "Four", rename to t1;
select * from t1;
ERROR HY000: Table 't1' was not locked with LOCK TABLES
select * from t2;
ERROR HY000: Table 't2' was not locked with LOCK TABLES
select * from t3;
j
NULL
unlock tables;
insert into t1 values ();
select * from t1;
vc
NULL
1
Three
Four
drop tables t1, t3;
DROP TABLE IF EXISTS `t+1`, `t+2`; DROP TABLE IF EXISTS `t+1`, `t+2`;
CREATE TABLE `t+1` (c1 INT); CREATE TABLE `t+1` (c1 INT);
ALTER TABLE `t+1` RENAME `t+2`; ALTER TABLE `t+1` RENAME `t+2`;

View File

@ -0,0 +1,12 @@
create table t1 (a int auto_increment, b int, PRIMARY KEY (a)) ENGINE=InnoDB;
create table t2 (a int auto_increment, b int, PRIMARY KEY (a)) ENGINE=MyISAM;
create table t3 (a int auto_increment, b int, PRIMARY KEY (a)) ENGINE=InnoDB;
select get_lock("a", 20);
get_lock("a", 20)
1
reset master;
insert into t2 values (null, null), (null, get_lock("a", 10));
select @result /* must be zero either way */;
@result
0
drop table t1,t2,t3;

View File

@ -162,3 +162,86 @@ t1 CREATE TABLE `t1` (
`j` int(11) DEFAULT NULL `j` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1, t2, t3; drop table t1, t2, t3;
drop table if exists t1,t2;
create table t1 (i int);
set session debug="+d,sleep_create_like_before_check_if_exists";
reset master;
create table t2 like t1;;
insert into t1 values (1);
drop table t1;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`i` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t2;
show binlog events in 'master-bin.000001' from 106;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; insert into t1 values (1)
master-bin.000001 # Query 1 # use `test`; create table t2 like t1
master-bin.000001 # Query 1 # use `test`; drop table t1
master-bin.000001 # Query 1 # use `test`; drop table t2
create table t1 (i int);
set session debug="-d,sleep_create_like_before_check_if_exists:+d,sleep_create_like_before_copy";
create table t2 like t1;;
create table if not exists t2 (j int);
Warnings:
Note 1050 Table 't2' already exists
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`i` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t2;
reset master;
create table t2 like t1;;
drop table t1;
drop table t2;
show binlog events in 'master-bin.000001' from 106;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; create table t2 like t1
master-bin.000001 # Query 1 # use `test`; drop table t1
master-bin.000001 # Query 1 # use `test`; drop table t2
create table t1 (i int);
set session debug="-d,sleep_create_like_before_copy:+d,sleep_create_like_before_ha_create";
reset master;
create table t2 like t1;;
insert into t2 values (1);
drop table t2;
create table t2 like t1;;
drop table t2;
create table t2 like t1;;
drop table t1;
drop table t2;
show binlog events in 'master-bin.000001' from 106;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; create table t2 like t1
master-bin.000001 # Query 1 # use `test`; insert into t2 values (1)
master-bin.000001 # Query 1 # use `test`; drop table t2
master-bin.000001 # Query 1 # use `test`; create table t2 like t1
master-bin.000001 # Query 1 # use `test`; drop table t2
master-bin.000001 # Query 1 # use `test`; create table t2 like t1
master-bin.000001 # Query 1 # use `test`; drop table t1
master-bin.000001 # Query 1 # use `test`; drop table t2
create table t1 (i int);
set session debug="-d,sleep_create_like_before_ha_create:+d,sleep_create_like_before_binlogging";
reset master;
create table t2 like t1;;
insert into t2 values (1);
drop table t2;
create table t2 like t1;;
drop table t2;
create table t2 like t1;;
drop table t1;
drop table t2;
show binlog events in 'master-bin.000001' from 106;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; create table t2 like t1
master-bin.000001 # Query 1 # use `test`; insert into t2 values (1)
master-bin.000001 # Query 1 # use `test`; drop table t2
master-bin.000001 # Query 1 # use `test`; create table t2 like t1
master-bin.000001 # Query 1 # use `test`; drop table t2
master-bin.000001 # Query 1 # use `test`; create table t2 like t1
master-bin.000001 # Query 1 # use `test`; drop table t1
master-bin.000001 # Query 1 # use `test`; drop table t2
set session debug="-d,sleep_create_like_before_binlogging";

View File

@ -371,7 +371,7 @@ ERROR 42S01: Table 't3' already exists
create table non_existing_database.t1 like t1; create table non_existing_database.t1 like t1;
ERROR 42000: Unknown database 'non_existing_database' ERROR 42000: Unknown database 'non_existing_database'
create table t3 like non_existing_table; create table t3 like non_existing_table;
ERROR 42S02: Unknown table 'non_existing_table' ERROR 42S02: Table 'test.non_existing_table' doesn't exist
create temporary table t3 like t1; create temporary table t3 like t1;
ERROR 42S01: Table 't3' already exists ERROR 42S01: Table 't3' already exists
drop table t1, t2, t3; drop table t1, t2, t3;

View File

@ -528,4 +528,33 @@ DROP EVENT e3;
DROP EVENT e2; DROP EVENT e2;
DROP EVENT e1; DROP EVENT e1;
SET TIME_ZONE=@save_time_zone; SET TIME_ZONE=@save_time_zone;
drop database events_test; drop event if exists new_event;
CREATE EVENT new_event ON SCHEDULE EVERY 0 SECOND DO SELECT 1;
ERROR HY000: INTERVAL is either not positive or too big
CREATE EVENT new_event ON SCHEDULE EVERY (SELECT 0) SECOND DO SELECT 1;
ERROR HY000: INTERVAL is either not positive or too big
CREATE EVENT new_event ON SCHEDULE EVERY "abcdef" SECOND DO SELECT 1;
ERROR HY000: INTERVAL is either not positive or too big
CREATE EVENT new_event ON SCHEDULE EVERY "0abcdef" SECOND DO SELECT 1;
ERROR HY000: INTERVAL is either not positive or too big
CREATE EVENT new_event ON SCHEDULE EVERY "a1bcdef" SECOND DO SELECT 1;
ERROR HY000: INTERVAL is either not positive or too big
CREATE EVENT new_event ON SCHEDULE EVERY (SELECT "abcdef" UNION SELECT "abcdef") SECOND DO SELECT 1;
ERROR HY000: INTERVAL is either not positive or too big
CREATE EVENT new_event ON SCHEDULE EVERY (SELECT "0abcdef") SECOND DO SELECT 1;
ERROR HY000: INTERVAL is either not positive or too big
CREATE EVENT new_event ON SCHEDULE EVERY (SELECT "a1bcdef") SECOND DO SELECT 1;
ERROR HY000: INTERVAL is either not positive or too big
CREATE EVENT new_event ON SCHEDULE AT "every day" DO SELECT 1;
ERROR HY000: Incorrect AT value: 'every day'
CREATE EVENT new_event ON SCHEDULE AT "0every day" DO SELECT 1;
ERROR HY000: Incorrect AT value: '0every day'
CREATE EVENT new_event ON SCHEDULE AT (SELECT "every day") DO SELECT 1;
ERROR HY000: Incorrect AT value: 'every day'
CREATE EVENT new_event ON SCHEDULE AT NOW() STARTS NOW() DO SELECT 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STARTS NOW() DO SELECT 1' at line 1
CREATE EVENT new_event ON SCHEDULE AT NOW() ENDS NOW() DO SELECT 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ENDS NOW() DO SELECT 1' at line 1
CREATE EVENT new_event ON SCHEDULE AT NOW() STARTS NOW() ENDS NOW() DO SELECT 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STARTS NOW() ENDS NOW() DO SELECT 1' at line 1
DROP DATABASE events_test;

View File

@ -2,11 +2,5 @@ use events_test;
select @@event_scheduler; select @@event_scheduler;
@@event_scheduler @@event_scheduler
ON ON
"Should get 3 rows : abc1, abc2, abc3
select distinct name from execution_log order by name;
name
abc1
abc2
abc3
drop table execution_log; drop table execution_log;
drop database events_test; drop database events_test;

View File

@ -22,6 +22,11 @@ hex(inet_aton('127.1.1'))
select length(uuid()), charset(uuid()), length(unhex(replace(uuid(),_utf8'-',_utf8''))); select length(uuid()), charset(uuid()), length(unhex(replace(uuid(),_utf8'-',_utf8'')));
length(uuid()) charset(uuid()) length(unhex(replace(uuid(),_utf8'-',_utf8''))) length(uuid()) charset(uuid()) length(unhex(replace(uuid(),_utf8'-',_utf8'')))
36 utf8 16 36 utf8 16
set @a= uuid_short();
set @b= uuid_short();
select cast(@a - @b as signed);
cast(@a - @b as signed)
-1
select length(format('nan', 2)) > 0; select length(format('nan', 2)) > 0;
length(format('nan', 2)) > 0 length(format('nan', 2)) > 0
1 1

View File

@ -381,3 +381,27 @@ drop table t2;
REVOKE ALL PRIVILEGES, GRANT OPTION FROM `a@`@localhost; REVOKE ALL PRIVILEGES, GRANT OPTION FROM `a@`@localhost;
drop user `a@`@localhost; drop user `a@`@localhost;
SET GLOBAL log_bin_trust_function_creators = 0; SET GLOBAL log_bin_trust_function_creators = 0;
drop database if exists mysqltest_1;
drop database if exists mysqltest_2;
drop user mysqltest_u1@localhost;
create database mysqltest_1;
create database mysqltest_2;
grant all on mysqltest_1.* to mysqltest_u1@localhost;
use mysqltest_2;
create table t1 (i int);
show create table mysqltest_2.t1;
ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table 't1'
create table t1 like mysqltest_2.t1;
ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table 't1'
grant select on mysqltest_2.t1 to mysqltest_u1@localhost;
show create table mysqltest_2.t1;
Table Create Table
t1 CREATE TABLE `t1` (
`i` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
create table t1 like mysqltest_2.t1;
use test;
drop database mysqltest_1;
drop database mysqltest_2;
drop user mysqltest_u1@localhost;
End of 5.0 tests

View File

@ -3,6 +3,7 @@ drop database if exists mysqltest;
set GLOBAL query_cache_size=1355776; set GLOBAL query_cache_size=1355776;
reset query cache; reset query cache;
flush status; flush status;
----- establish connection root -----
show grants for current_user; show grants for current_user;
Grants for root@localhost Grants for root@localhost
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION
@ -19,6 +20,7 @@ insert into test.t1 values ("test.t1");
select * from t1; select * from t1;
a a
test.t1 test.t1
----- establish connection root2 -----
select * from t1; select * from t1;
a b c a b c
1 1 1 1 1 1
@ -48,6 +50,7 @@ grant SELECT on mysqltest.* to mysqltest_1@localhost;
grant SELECT on mysqltest.t1 to mysqltest_2@localhost; grant SELECT on mysqltest.t1 to mysqltest_2@localhost;
grant SELECT on test.t1 to mysqltest_2@localhost; grant SELECT on test.t1 to mysqltest_2@localhost;
grant SELECT(a) on mysqltest.t1 to mysqltest_3@localhost; grant SELECT(a) on mysqltest.t1 to mysqltest_3@localhost;
----- establish connection user1 (user=mysqltest_1) -----
show grants for current_user(); show grants for current_user();
Grants for mysqltest_1@localhost Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost'
@ -112,9 +115,11 @@ Qcache_hits 3
show status like "Qcache_not_cached"; show status like "Qcache_not_cached";
Variable_name Value Variable_name Value
Qcache_not_cached 1 Qcache_not_cached 1
----- establish connection unkuser (user=unkuser) -----
show grants for current_user(); show grants for current_user();
Grants for @localhost Grants for @localhost
GRANT USAGE ON *.* TO ''@'localhost' GRANT USAGE ON *.* TO ''@'localhost'
----- establish connection user2 (user=mysqltest_2) -----
select "user2"; select "user2";
user2 user2
user2 user2
@ -145,6 +150,7 @@ Qcache_hits 7
show status like "Qcache_not_cached"; show status like "Qcache_not_cached";
Variable_name Value Variable_name Value
Qcache_not_cached 2 Qcache_not_cached 2
----- establish connection user3 (user=mysqltest_3) -----
select "user3"; select "user3";
user3 user3
user3 user3
@ -169,6 +175,7 @@ Qcache_hits 7
show status like "Qcache_not_cached"; show status like "Qcache_not_cached";
Variable_name Value Variable_name Value
Qcache_not_cached 7 Qcache_not_cached 7
----- establish connection user4 (user=mysqltest_1) -----
select "user4"; select "user4";
user4 user4
user4 user4
@ -199,6 +206,7 @@ Qcache_hits 8
show status like "Qcache_not_cached"; show status like "Qcache_not_cached";
Variable_name Value Variable_name Value
Qcache_not_cached 8 Qcache_not_cached 8
----- switch to connection default and close connections -----
set names binary; set names binary;
delete from mysql.user where user in ("mysqltest_1","mysqltest_2","mysqltest_3"); delete from mysql.user where user in ("mysqltest_1","mysqltest_2","mysqltest_3");
delete from mysql.db where user in ("mysqltest_1","mysqltest_2","mysqltest_3"); delete from mysql.db where user in ("mysqltest_1","mysqltest_2","mysqltest_3");

View File

@ -0,0 +1,218 @@
drop table if exists test.t1,mysqltest.t1,mysqltest.t2;
drop database if exists mysqltest;
set GLOBAL query_cache_size=1355776;
reset query cache;
flush status;
----- establish connection root -----
show grants for current_user;
Grants for root@localhost
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION
show grants;
Grants for root@localhost
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION
create database if not exists mysqltest;
create table mysqltest.t1 (a int,b int,c int);
create table mysqltest.t2 (a int,b int,c int);
insert into mysqltest.t1 values (1,1,1),(2,2,2);
insert into mysqltest.t2 values (3,3,3);
create table test.t1 (a char (10));
insert into test.t1 values ("test.t1");
select * from t1;
a
test.t1
----- establish connection root2 -----
select * from t1;
a b c
1 1 1
2 2 2
select a from t1;
a
1
2
select c from t1;
c
1
2
select * from t2;
a b c
3 3 3
select * from mysqltest.t1,test.t1;
a b c a
1 1 1 test.t1
2 2 2 test.t1
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 6
show status like "Qcache_hits%";
Variable_name Value
Qcache_hits 0
grant SELECT on mysqltest.* to mysqltest_1@localhost;
grant SELECT on mysqltest.t1 to mysqltest_2@localhost;
grant SELECT on test.t1 to mysqltest_2@localhost;
grant SELECT(a) on mysqltest.t1 to mysqltest_3@localhost;
----- establish connection user1 (user=mysqltest_1) -----
show grants for current_user();
Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost'
GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost'
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 6
show status like "Qcache_hits";
Variable_name Value
Qcache_hits 0
show status like "Qcache_not_cached";
Variable_name Value
Qcache_not_cached 0
select "user1";
user1
user1
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 6
show status like "Qcache_hits";
Variable_name Value
Qcache_hits 0
show status like "Qcache_not_cached";
Variable_name Value
Qcache_not_cached 1
select * from t1;
a b c
1 1 1
2 2 2
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 6
show status like "Qcache_hits";
Variable_name Value
Qcache_hits 1
show status like "Qcache_not_cached";
Variable_name Value
Qcache_not_cached 1
select a from t1 ;
a
1
2
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 6
show status like "Qcache_hits";
Variable_name Value
Qcache_hits 2
show status like "Qcache_not_cached";
Variable_name Value
Qcache_not_cached 1
select c from t1;
c
1
2
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 6
show status like "Qcache_hits";
Variable_name Value
Qcache_hits 3
show status like "Qcache_not_cached";
Variable_name Value
Qcache_not_cached 1
----- establish connection unkuser (user=unkuser) -----
show grants for current_user();
Grants for @localhost
GRANT USAGE ON *.* TO ''@'localhost'
----- establish connection user2 (user=mysqltest_2) -----
select "user2";
user2
user2
select * from t1;
a b c
1 1 1
2 2 2
select a from t1;
a
1
2
select c from t1;
c
1
2
select * from mysqltest.t1,test.t1;
a b c a
1 1 1 test.t1
2 2 2 test.t1
select * from t2;
ERROR 42000: SELECT command denied to user 'mysqltest_2'@'localhost' for table 't2'
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 6
show status like "Qcache_hits";
Variable_name Value
Qcache_hits 7
show status like "Qcache_not_cached";
Variable_name Value
Qcache_not_cached 2
----- establish connection user3 (user=mysqltest_3) -----
select "user3";
user3
user3
select * from t1;
ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for column 'b' in table 't1'
select a from t1;
a
1
2
select c from t1;
ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for column 'c' in table 't1'
select * from t2;
ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for table 't2'
select mysqltest.t1.c from test.t1,mysqltest.t1;
ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for column 'c' in table 't1'
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 6
show status like "Qcache_hits";
Variable_name Value
Qcache_hits 7
show status like "Qcache_not_cached";
Variable_name Value
Qcache_not_cached 4
----- establish connection user4 (user=mysqltest_1) -----
select "user4";
user4
user4
show grants;
Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost'
GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost'
select a from t1;
ERROR 3D000: No database selected
select * from mysqltest.t1,test.t1;
a b c a
1 1 1 test.t1
2 2 2 test.t1
select a from mysqltest.t1;
a
1
2
select a from mysqltest.t1;
a
1
2
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 8
show status like "Qcache_hits";
Variable_name Value
Qcache_hits 8
show status like "Qcache_not_cached";
Variable_name Value
Qcache_not_cached 5
----- switch to connection default and close connections -----
set names binary;
delete from mysql.user where user in ("mysqltest_1","mysqltest_2","mysqltest_3");
delete from mysql.db where user in ("mysqltest_1","mysqltest_2","mysqltest_3");
delete from mysql.tables_priv where user in ("mysqltest_1","mysqltest_2","mysqltest_3");
delete from mysql.columns_priv where user in ("mysqltest_1","mysqltest_2","mysqltest_3");
flush privileges;
drop table test.t1,mysqltest.t1,mysqltest.t2;
drop database mysqltest;
set GLOBAL query_cache_size=default;

View File

@ -825,4 +825,28 @@ lock table t2 write;
alter table t2 modify i int default 4, rename t1; alter table t2 modify i int default 4, rename t1;
unlock tables; unlock tables;
drop table t1; drop table t1;
drop table if exists t1;
create table t1 (i int);
insert into t1 values ();
lock table t1 write;
alter table t1 modify i int default 1;
insert into t1 values ();
select * from t1;
i
NULL
1
alter table t1 change i c char(10) default "Two";
insert into t1 values ();
select * from t1;
c
NULL
1
Two
unlock tables;
select * from t1;
c
NULL
1
Two
drop tables t1;
End of 5.1 tests End of 5.1 tests

View File

@ -1062,6 +1062,87 @@ EXECUTE stmt USING @a;
0 0 0 0
DEALLOCATE PREPARE stmt; DEALLOCATE PREPARE stmt;
DROP TABLE t1; DROP TABLE t1;
DROP TABLE IF EXISTS t1, t2;
CREATE TABLE t1 (i INT);
PREPARE st_19182
FROM "CREATE TABLE t2 (i INT, j INT, KEY (i), KEY(j)) SELECT i FROM t1";
EXECUTE st_19182;
DESC t2;
Field Type Null Key Default Extra
j int(11) YES MUL NULL
i int(11) YES MUL NULL
DROP TABLE t2;
EXECUTE st_19182;
DESC t2;
Field Type Null Key Default Extra
j int(11) YES MUL NULL
i int(11) YES MUL NULL
DEALLOCATE PREPARE st_19182;
DROP TABLE t2, t1;
drop database if exists mysqltest;
drop table if exists t1, t2;
create database mysqltest character set utf8;
prepare stmt1 from "create table mysqltest.t1 (c char(10))";
prepare stmt2 from "create table mysqltest.t2 select 'test'";
execute stmt1;
execute stmt2;
show create table mysqltest.t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c` char(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8
show create table mysqltest.t2;
Table Create Table
t2 CREATE TABLE `t2` (
`test` varchar(4) CHARACTER SET latin1 NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=utf8
drop table mysqltest.t1;
drop table mysqltest.t2;
alter database mysqltest character set latin1;
execute stmt1;
execute stmt2;
show create table mysqltest.t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c` char(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
show create table mysqltest.t2;
Table Create Table
t2 CREATE TABLE `t2` (
`test` varchar(4) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop database mysqltest;
deallocate prepare stmt1;
deallocate prepare stmt2;
execute stmt;
show create table t1;
drop table t1;
execute stmt;
show create table t1;
drop table t1;
deallocate prepare stmt;
CREATE TABLE t1(a int);
INSERT INTO t1 VALUES (2), (3), (1);
PREPARE st1 FROM
'(SELECT a FROM t1) UNION (SELECT a+10 FROM t1) ORDER BY RAND()*0+a';
EXECUTE st1;
a
1
2
3
11
12
13
EXECUTE st1;
a
1
2
3
11
12
13
DEALLOCATE PREPARE st1;
DROP TABLE t1;
End of 4.1 tests. End of 4.1 tests.
create table t1 (a varchar(20)); create table t1 (a varchar(20));
insert into t1 values ('foo'); insert into t1 values ('foo');
@ -1544,6 +1625,72 @@ a
2 2
DEALLOCATE PREPARE stmt; DEALLOCATE PREPARE stmt;
DROP TABLE t1,t2; DROP TABLE t1,t2;
drop table if exists t1;
create table t1 (s1 char(20));
prepare stmt from "alter table t1 modify s1 int";
execute stmt;
execute stmt;
drop table t1;
deallocate prepare stmt;
drop table if exists t1;
create table t1 (a int, b int);
prepare s_6895 from "alter table t1 drop column b";
execute s_6895;
show columns from t1;
Field Type Null Key Default Extra
a int(11) YES NULL
drop table t1;
create table t1 (a int, b int);
execute s_6895;
show columns from t1;
Field Type Null Key Default Extra
a int(11) YES NULL
drop table t1;
create table t1 (a int, b int);
execute s_6895;
show columns from t1;
Field Type Null Key Default Extra
a int(11) YES NULL
deallocate prepare s_6895;
drop table t1;
create table t1 (i int primary key auto_increment) comment='comment for table t1';
create table t2 (i int, j int, k int);
prepare stmt from "alter table t1 auto_increment=100";
execute stmt;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`i` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`i`)
) ENGINE=MyISAM AUTO_INCREMENT=100 DEFAULT CHARSET=latin1 COMMENT='comment for table t1'
flush tables;
select * from t2;
i j k
execute stmt;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`i` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`i`)
) ENGINE=MyISAM AUTO_INCREMENT=100 DEFAULT CHARSET=latin1 COMMENT='comment for table t1'
deallocate prepare stmt;
drop table t1, t2;
set @old_character_set_server= @@character_set_server;
set @@character_set_server= latin1;
prepare stmt from "create database mysqltest_1";
execute stmt;
show create database mysqltest_1;
Database Create Database
mysqltest_1 CREATE DATABASE `mysqltest_1` /*!40100 DEFAULT CHARACTER SET latin1 */
drop database mysqltest_1;
set @@character_set_server= utf8;
execute stmt;
show create database mysqltest_1;
Database Create Database
mysqltest_1 CREATE DATABASE `mysqltest_1` /*!40100 DEFAULT CHARACTER SET utf8 */
drop database mysqltest_1;
deallocate prepare stmt;
set @@character_set_server= @old_character_set_server;
drop tables if exists t1; drop tables if exists t1;
create table t1 (id int primary key auto_increment, value varchar(10)); create table t1 (id int primary key auto_increment, value varchar(10));
insert into t1 (id, value) values (1, 'FIRST'), (2, 'SECOND'), (3, 'THIRD'); insert into t1 (id, value) values (1, 'FIRST'), (2, 'SECOND'), (3, 'THIRD');
@ -2533,4 +2680,25 @@ i j
4 5 4 5
3 NULL 3 NULL
DROP TABLE t1, t2; DROP TABLE t1, t2;
drop table if exists t1;
Warnings:
Note 1051 Unknown table 't1'
prepare stmt
from "create table t1 (c char(100) character set utf8, key (c(10)))";
execute stmt;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c` char(100) CHARACTER SET utf8 DEFAULT NULL,
KEY `c` (`c`(10))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
execute stmt;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c` char(100) CHARACTER SET utf8 DEFAULT NULL,
KEY `c` (`c`(10))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
End of 5.1 tests. End of 5.1 tests.

View File

@ -1917,38 +1917,38 @@ from t9 where c1= 1 ;
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
execute full_info ; execute full_info ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def @arg01 253 20 1 Y 128 0 63 def @arg01 8 20 1 Y 32896 0 63
def @arg02 253 20 1 Y 128 0 63 def @arg02 8 20 1 Y 32896 0 63
def @arg03 253 20 1 Y 128 0 63 def @arg03 8 20 1 Y 32896 0 63
def @arg04 253 20 1 Y 128 0 63 def @arg04 8 20 1 Y 32896 0 63
def @arg05 253 20 1 Y 128 0 63 def @arg05 8 20 1 Y 32896 0 63
def @arg06 253 20 1 Y 128 0 63 def @arg06 8 20 1 Y 32896 0 63
def @arg07 253 23 1 Y 128 31 63 def @arg07 5 23 1 Y 32896 31 63
def @arg08 253 23 1 Y 128 31 63 def @arg08 5 23 1 Y 32896 31 63
def @arg09 253 23 1 Y 128 31 63 def @arg09 5 23 1 Y 32896 31 63
def @arg10 253 23 1 Y 128 31 63 def @arg10 5 23 1 Y 32896 31 63
def @arg11 253 67 6 Y 128 30 63 def @arg11 246 67 6 Y 128 30 63
def @arg12 253 67 6 Y 128 30 63 def @arg12 246 67 6 Y 128 30 63
def @arg13 253 16777216 10 Y 128 31 63 def @arg13 251 16777216 10 Y 128 31 63
def @arg14 253 16777216 19 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63
def @arg15 253 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63
def @arg16 253 16777216 8 Y 128 31 63 def @arg16 251 16777216 8 Y 128 31 63
def @arg17 253 20 4 Y 128 0 63 def @arg17 8 20 4 Y 32928 0 63
def @arg18 253 20 1 Y 128 0 63 def @arg18 8 20 1 Y 32896 0 63
def @arg19 253 20 1 Y 128 0 63 def @arg19 8 20 1 Y 32896 0 63
def @arg20 253 16777216 1 Y 0 31 8 def @arg20 251 16777216 1 Y 0 31 8
def @arg21 253 16777216 10 Y 0 31 8 def @arg21 251 16777216 10 Y 0 31 8
def @arg22 253 16777216 30 Y 0 31 8 def @arg22 251 16777216 30 Y 0 31 8
def @arg23 253 16777216 8 Y 128 31 63 def @arg23 251 16777216 8 Y 128 31 63
def @arg24 253 16777216 8 Y 0 31 8 def @arg24 251 16777216 8 Y 0 31 8
def @arg25 253 16777216 4 Y 128 31 63 def @arg25 251 16777216 4 Y 128 31 63
def @arg26 253 16777216 4 Y 0 31 8 def @arg26 251 16777216 4 Y 0 31 8
def @arg27 253 16777216 10 Y 128 31 63 def @arg27 251 16777216 10 Y 128 31 63
def @arg28 253 16777216 10 Y 0 31 8 def @arg28 251 16777216 10 Y 0 31 8
def @arg29 253 16777216 8 Y 128 31 63 def @arg29 251 16777216 8 Y 128 31 63
def @arg30 253 16777216 8 Y 0 31 8 def @arg30 251 16777216 8 Y 0 31 8
def @arg31 253 16777216 3 Y 0 31 8 def @arg31 251 16777216 3 Y 0 31 8
def @arg32 253 16777216 6 Y 0 31 8 def @arg32 251 16777216 6 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4, select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4,
@ -1964,38 +1964,38 @@ from t9 where c1= 0 ;
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
execute full_info ; execute full_info ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def @arg01 253 20 1 Y 128 0 63 def @arg01 8 20 1 Y 32896 0 63
def @arg02 253 20 0 Y 128 0 63 def @arg02 8 20 0 Y 32896 0 63
def @arg03 253 20 0 Y 128 0 63 def @arg03 8 20 0 Y 32896 0 63
def @arg04 253 20 0 Y 128 0 63 def @arg04 8 20 0 Y 32896 0 63
def @arg05 253 20 0 Y 128 0 63 def @arg05 8 20 0 Y 32896 0 63
def @arg06 253 20 0 Y 128 0 63 def @arg06 8 20 0 Y 32896 0 63
def @arg07 253 23 0 Y 128 31 63 def @arg07 5 23 0 Y 32896 31 63
def @arg08 253 23 0 Y 128 31 63 def @arg08 5 23 0 Y 32896 31 63
def @arg09 253 23 0 Y 128 31 63 def @arg09 5 23 0 Y 32896 31 63
def @arg10 253 23 0 Y 128 31 63 def @arg10 5 23 0 Y 32896 31 63
def @arg11 253 67 0 Y 128 30 63 def @arg11 246 67 0 Y 128 30 63
def @arg12 253 67 0 Y 128 30 63 def @arg12 246 67 0 Y 128 30 63
def @arg13 253 16777216 0 Y 128 31 63 def @arg13 251 16777216 0 Y 128 31 63
def @arg14 253 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63
def @arg15 253 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63
def @arg16 253 16777216 0 Y 128 31 63 def @arg16 251 16777216 0 Y 128 31 63
def @arg17 253 20 0 Y 128 0 63 def @arg17 8 20 0 Y 32928 0 63
def @arg18 253 20 0 Y 128 0 63 def @arg18 8 20 0 Y 32896 0 63
def @arg19 253 20 0 Y 128 0 63 def @arg19 8 20 0 Y 32896 0 63
def @arg20 253 16777216 0 Y 0 31 8 def @arg20 251 16777216 0 Y 0 31 8
def @arg21 253 16777216 0 Y 0 31 8 def @arg21 251 16777216 0 Y 0 31 8
def @arg22 253 16777216 0 Y 0 31 8 def @arg22 251 16777216 0 Y 0 31 8
def @arg23 253 16777216 0 Y 128 31 63 def @arg23 251 16777216 0 Y 128 31 63
def @arg24 253 16777216 0 Y 0 31 8 def @arg24 251 16777216 0 Y 0 31 8
def @arg25 253 16777216 0 Y 128 31 63 def @arg25 251 16777216 0 Y 128 31 63
def @arg26 253 16777216 0 Y 0 31 8 def @arg26 251 16777216 0 Y 0 31 8
def @arg27 253 16777216 0 Y 128 31 63 def @arg27 251 16777216 0 Y 128 31 63
def @arg28 253 16777216 0 Y 0 31 8 def @arg28 251 16777216 0 Y 0 31 8
def @arg29 253 16777216 0 Y 128 31 63 def @arg29 251 16777216 0 Y 128 31 63
def @arg30 253 16777216 0 Y 0 31 8 def @arg30 251 16777216 0 Y 0 31 8
def @arg31 253 16777216 0 Y 0 31 8 def @arg31 251 16777216 0 Y 0 31 8
def @arg32 253 16777216 0 Y 0 31 8 def @arg32 251 16777216 0 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select prepare stmt1 from "select
@ -2014,38 +2014,38 @@ execute stmt1 using @my_key ;
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
execute full_info ; execute full_info ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def @arg01 253 20 1 Y 128 0 63 def @arg01 8 20 1 Y 32896 0 63
def @arg02 253 20 1 Y 128 0 63 def @arg02 8 20 1 Y 32896 0 63
def @arg03 253 20 1 Y 128 0 63 def @arg03 8 20 1 Y 32896 0 63
def @arg04 253 20 1 Y 128 0 63 def @arg04 8 20 1 Y 32896 0 63
def @arg05 253 20 1 Y 128 0 63 def @arg05 8 20 1 Y 32896 0 63
def @arg06 253 20 1 Y 128 0 63 def @arg06 8 20 1 Y 32896 0 63
def @arg07 253 23 1 Y 128 31 63 def @arg07 5 23 1 Y 32896 31 63
def @arg08 253 23 1 Y 128 31 63 def @arg08 5 23 1 Y 32896 31 63
def @arg09 253 23 1 Y 128 31 63 def @arg09 5 23 1 Y 32896 31 63
def @arg10 253 23 1 Y 128 31 63 def @arg10 5 23 1 Y 32896 31 63
def @arg11 253 67 6 Y 128 30 63 def @arg11 246 67 6 Y 128 30 63
def @arg12 253 67 6 Y 128 30 63 def @arg12 246 67 6 Y 128 30 63
def @arg13 253 16777216 10 Y 128 31 63 def @arg13 251 16777216 10 Y 128 31 63
def @arg14 253 16777216 19 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63
def @arg15 253 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63
def @arg16 253 16777216 8 Y 128 31 63 def @arg16 251 16777216 8 Y 128 31 63
def @arg17 253 20 4 Y 128 0 63 def @arg17 8 20 4 Y 32928 0 63
def @arg18 253 20 1 Y 128 0 63 def @arg18 8 20 1 Y 32896 0 63
def @arg19 253 20 1 Y 128 0 63 def @arg19 8 20 1 Y 32896 0 63
def @arg20 253 16777216 1 Y 0 31 8 def @arg20 251 16777216 1 Y 0 31 8
def @arg21 253 16777216 10 Y 0 31 8 def @arg21 251 16777216 10 Y 0 31 8
def @arg22 253 16777216 30 Y 0 31 8 def @arg22 251 16777216 30 Y 0 31 8
def @arg23 253 16777216 8 Y 128 31 63 def @arg23 251 16777216 8 Y 128 31 63
def @arg24 253 16777216 8 Y 0 31 8 def @arg24 251 16777216 8 Y 0 31 8
def @arg25 253 16777216 4 Y 128 31 63 def @arg25 251 16777216 4 Y 128 31 63
def @arg26 253 16777216 4 Y 0 31 8 def @arg26 251 16777216 4 Y 0 31 8
def @arg27 253 16777216 10 Y 128 31 63 def @arg27 251 16777216 10 Y 128 31 63
def @arg28 253 16777216 10 Y 0 31 8 def @arg28 251 16777216 10 Y 0 31 8
def @arg29 253 16777216 8 Y 128 31 63 def @arg29 251 16777216 8 Y 128 31 63
def @arg30 253 16777216 8 Y 0 31 8 def @arg30 251 16777216 8 Y 0 31 8
def @arg31 253 16777216 3 Y 0 31 8 def @arg31 251 16777216 3 Y 0 31 8
def @arg32 253 16777216 6 Y 0 31 8 def @arg32 251 16777216 6 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
set @my_key= 0 ; set @my_key= 0 ;
@ -2054,38 +2054,38 @@ execute stmt1 using @my_key ;
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
execute full_info ; execute full_info ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def @arg01 253 20 1 Y 128 0 63 def @arg01 8 20 1 Y 32896 0 63
def @arg02 253 20 0 Y 128 0 63 def @arg02 8 20 0 Y 32896 0 63
def @arg03 253 20 0 Y 128 0 63 def @arg03 8 20 0 Y 32896 0 63
def @arg04 253 20 0 Y 128 0 63 def @arg04 8 20 0 Y 32896 0 63
def @arg05 253 20 0 Y 128 0 63 def @arg05 8 20 0 Y 32896 0 63
def @arg06 253 20 0 Y 128 0 63 def @arg06 8 20 0 Y 32896 0 63
def @arg07 253 23 0 Y 128 31 63 def @arg07 5 23 0 Y 32896 31 63
def @arg08 253 23 0 Y 128 31 63 def @arg08 5 23 0 Y 32896 31 63
def @arg09 253 23 0 Y 128 31 63 def @arg09 5 23 0 Y 32896 31 63
def @arg10 253 23 0 Y 128 31 63 def @arg10 5 23 0 Y 32896 31 63
def @arg11 253 67 0 Y 128 30 63 def @arg11 246 67 0 Y 128 30 63
def @arg12 253 67 0 Y 128 30 63 def @arg12 246 67 0 Y 128 30 63
def @arg13 253 16777216 0 Y 128 31 63 def @arg13 251 16777216 0 Y 128 31 63
def @arg14 253 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63
def @arg15 253 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63
def @arg16 253 16777216 0 Y 128 31 63 def @arg16 251 16777216 0 Y 128 31 63
def @arg17 253 20 0 Y 128 0 63 def @arg17 8 20 0 Y 32928 0 63
def @arg18 253 20 0 Y 128 0 63 def @arg18 8 20 0 Y 32896 0 63
def @arg19 253 20 0 Y 128 0 63 def @arg19 8 20 0 Y 32896 0 63
def @arg20 253 16777216 0 Y 0 31 8 def @arg20 251 16777216 0 Y 0 31 8
def @arg21 253 16777216 0 Y 0 31 8 def @arg21 251 16777216 0 Y 0 31 8
def @arg22 253 16777216 0 Y 0 31 8 def @arg22 251 16777216 0 Y 0 31 8
def @arg23 253 16777216 0 Y 128 31 63 def @arg23 251 16777216 0 Y 128 31 63
def @arg24 253 16777216 0 Y 0 31 8 def @arg24 251 16777216 0 Y 0 31 8
def @arg25 253 16777216 0 Y 128 31 63 def @arg25 251 16777216 0 Y 128 31 63
def @arg26 253 16777216 0 Y 0 31 8 def @arg26 251 16777216 0 Y 0 31 8
def @arg27 253 16777216 0 Y 128 31 63 def @arg27 251 16777216 0 Y 128 31 63
def @arg28 253 16777216 0 Y 0 31 8 def @arg28 251 16777216 0 Y 0 31 8
def @arg29 253 16777216 0 Y 128 31 63 def @arg29 251 16777216 0 Y 128 31 63
def @arg30 253 16777216 0 Y 0 31 8 def @arg30 251 16777216 0 Y 0 31 8
def @arg31 253 16777216 0 Y 0 31 8 def @arg31 251 16777216 0 Y 0 31 8
def @arg32 253 16777216 0 Y 0 31 8 def @arg32 251 16777216 0 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select ? := c1 from t9 where c1= 1" ; prepare stmt1 from "select ? := c1 from t9 where c1= 1" ;
@ -2102,38 +2102,38 @@ into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08,
from t9 where c1= 1 ; from t9 where c1= 1 ;
execute full_info ; execute full_info ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def @arg01 253 20 1 Y 128 0 63 def @arg01 8 20 1 Y 32896 0 63
def @arg02 253 20 1 Y 128 0 63 def @arg02 8 20 1 Y 32896 0 63
def @arg03 253 20 1 Y 128 0 63 def @arg03 8 20 1 Y 32896 0 63
def @arg04 253 20 1 Y 128 0 63 def @arg04 8 20 1 Y 32896 0 63
def @arg05 253 20 1 Y 128 0 63 def @arg05 8 20 1 Y 32896 0 63
def @arg06 253 20 1 Y 128 0 63 def @arg06 8 20 1 Y 32896 0 63
def @arg07 253 23 1 Y 128 31 63 def @arg07 5 23 1 Y 32896 31 63
def @arg08 253 23 1 Y 128 31 63 def @arg08 5 23 1 Y 32896 31 63
def @arg09 253 23 1 Y 128 31 63 def @arg09 5 23 1 Y 32896 31 63
def @arg10 253 23 1 Y 128 31 63 def @arg10 5 23 1 Y 32896 31 63
def @arg11 253 67 6 Y 128 30 63 def @arg11 246 67 6 Y 128 30 63
def @arg12 253 67 6 Y 128 30 63 def @arg12 246 67 6 Y 128 30 63
def @arg13 253 16777216 10 Y 128 31 63 def @arg13 251 16777216 10 Y 128 31 63
def @arg14 253 16777216 19 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63
def @arg15 253 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63
def @arg16 253 16777216 8 Y 128 31 63 def @arg16 251 16777216 8 Y 128 31 63
def @arg17 253 20 4 Y 128 0 63 def @arg17 8 20 4 Y 32928 0 63
def @arg18 253 20 1 Y 128 0 63 def @arg18 8 20 1 Y 32896 0 63
def @arg19 253 20 1 Y 128 0 63 def @arg19 8 20 1 Y 32896 0 63
def @arg20 253 16777216 1 Y 0 31 8 def @arg20 251 16777216 1 Y 0 31 8
def @arg21 253 16777216 10 Y 0 31 8 def @arg21 251 16777216 10 Y 0 31 8
def @arg22 253 16777216 30 Y 0 31 8 def @arg22 251 16777216 30 Y 0 31 8
def @arg23 253 16777216 8 Y 128 31 63 def @arg23 251 16777216 8 Y 128 31 63
def @arg24 253 16777216 8 Y 0 31 8 def @arg24 251 16777216 8 Y 0 31 8
def @arg25 253 16777216 4 Y 128 31 63 def @arg25 251 16777216 4 Y 128 31 63
def @arg26 253 16777216 4 Y 0 31 8 def @arg26 251 16777216 4 Y 0 31 8
def @arg27 253 16777216 10 Y 128 31 63 def @arg27 251 16777216 10 Y 128 31 63
def @arg28 253 16777216 10 Y 0 31 8 def @arg28 251 16777216 10 Y 0 31 8
def @arg29 253 16777216 8 Y 128 31 63 def @arg29 251 16777216 8 Y 128 31 63
def @arg30 253 16777216 8 Y 0 31 8 def @arg30 251 16777216 8 Y 0 31 8
def @arg31 253 16777216 3 Y 0 31 8 def @arg31 251 16777216 3 Y 0 31 8
def @arg32 253 16777216 6 Y 0 31 8 def @arg32 251 16777216 6 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
@ -2146,38 +2146,38 @@ into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08,
from t9 where c1= 0 ; from t9 where c1= 0 ;
execute full_info ; execute full_info ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def @arg01 253 20 1 Y 128 0 63 def @arg01 8 20 1 Y 32896 0 63
def @arg02 253 20 0 Y 128 0 63 def @arg02 8 20 0 Y 32896 0 63
def @arg03 253 20 0 Y 128 0 63 def @arg03 8 20 0 Y 32896 0 63
def @arg04 253 20 0 Y 128 0 63 def @arg04 8 20 0 Y 32896 0 63
def @arg05 253 20 0 Y 128 0 63 def @arg05 8 20 0 Y 32896 0 63
def @arg06 253 20 0 Y 128 0 63 def @arg06 8 20 0 Y 32896 0 63
def @arg07 253 23 0 Y 128 31 63 def @arg07 5 23 0 Y 32896 31 63
def @arg08 253 23 0 Y 128 31 63 def @arg08 5 23 0 Y 32896 31 63
def @arg09 253 23 0 Y 128 31 63 def @arg09 5 23 0 Y 32896 31 63
def @arg10 253 23 0 Y 128 31 63 def @arg10 5 23 0 Y 32896 31 63
def @arg11 253 67 0 Y 128 30 63 def @arg11 246 67 0 Y 128 30 63
def @arg12 253 67 0 Y 128 30 63 def @arg12 246 67 0 Y 128 30 63
def @arg13 253 16777216 0 Y 128 31 63 def @arg13 251 16777216 0 Y 128 31 63
def @arg14 253 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63
def @arg15 253 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63
def @arg16 253 16777216 0 Y 128 31 63 def @arg16 251 16777216 0 Y 128 31 63
def @arg17 253 20 0 Y 128 0 63 def @arg17 8 20 0 Y 32928 0 63
def @arg18 253 20 0 Y 128 0 63 def @arg18 8 20 0 Y 32896 0 63
def @arg19 253 20 0 Y 128 0 63 def @arg19 8 20 0 Y 32896 0 63
def @arg20 253 16777216 0 Y 0 31 8 def @arg20 251 16777216 0 Y 0 31 8
def @arg21 253 16777216 0 Y 0 31 8 def @arg21 251 16777216 0 Y 0 31 8
def @arg22 253 16777216 0 Y 0 31 8 def @arg22 251 16777216 0 Y 0 31 8
def @arg23 253 16777216 0 Y 128 31 63 def @arg23 251 16777216 0 Y 128 31 63
def @arg24 253 16777216 0 Y 0 31 8 def @arg24 251 16777216 0 Y 0 31 8
def @arg25 253 16777216 0 Y 128 31 63 def @arg25 251 16777216 0 Y 128 31 63
def @arg26 253 16777216 0 Y 0 31 8 def @arg26 251 16777216 0 Y 0 31 8
def @arg27 253 16777216 0 Y 128 31 63 def @arg27 251 16777216 0 Y 128 31 63
def @arg28 253 16777216 0 Y 0 31 8 def @arg28 251 16777216 0 Y 0 31 8
def @arg29 253 16777216 0 Y 128 31 63 def @arg29 251 16777216 0 Y 128 31 63
def @arg30 253 16777216 0 Y 0 31 8 def @arg30 251 16777216 0 Y 0 31 8
def @arg31 253 16777216 0 Y 0 31 8 def @arg31 251 16777216 0 Y 0 31 8
def @arg32 253 16777216 0 Y 0 31 8 def @arg32 251 16777216 0 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
@ -2192,76 +2192,76 @@ set @my_key= 1 ;
execute stmt1 using @my_key ; execute stmt1 using @my_key ;
execute full_info ; execute full_info ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def @arg01 253 20 1 Y 128 0 63 def @arg01 8 20 1 Y 32896 0 63
def @arg02 253 20 1 Y 128 0 63 def @arg02 8 20 1 Y 32896 0 63
def @arg03 253 20 1 Y 128 0 63 def @arg03 8 20 1 Y 32896 0 63
def @arg04 253 20 1 Y 128 0 63 def @arg04 8 20 1 Y 32896 0 63
def @arg05 253 20 1 Y 128 0 63 def @arg05 8 20 1 Y 32896 0 63
def @arg06 253 20 1 Y 128 0 63 def @arg06 8 20 1 Y 32896 0 63
def @arg07 253 23 1 Y 128 31 63 def @arg07 5 23 1 Y 32896 31 63
def @arg08 253 23 1 Y 128 31 63 def @arg08 5 23 1 Y 32896 31 63
def @arg09 253 23 1 Y 128 31 63 def @arg09 5 23 1 Y 32896 31 63
def @arg10 253 23 1 Y 128 31 63 def @arg10 5 23 1 Y 32896 31 63
def @arg11 253 67 6 Y 128 30 63 def @arg11 246 67 6 Y 128 30 63
def @arg12 253 67 6 Y 128 30 63 def @arg12 246 67 6 Y 128 30 63
def @arg13 253 16777216 10 Y 128 31 63 def @arg13 251 16777216 10 Y 128 31 63
def @arg14 253 16777216 19 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63
def @arg15 253 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63
def @arg16 253 16777216 8 Y 128 31 63 def @arg16 251 16777216 8 Y 128 31 63
def @arg17 253 20 4 Y 128 0 63 def @arg17 8 20 4 Y 32928 0 63
def @arg18 253 20 1 Y 128 0 63 def @arg18 8 20 1 Y 32896 0 63
def @arg19 253 20 1 Y 128 0 63 def @arg19 8 20 1 Y 32896 0 63
def @arg20 253 16777216 1 Y 0 31 8 def @arg20 251 16777216 1 Y 0 31 8
def @arg21 253 16777216 10 Y 0 31 8 def @arg21 251 16777216 10 Y 0 31 8
def @arg22 253 16777216 30 Y 0 31 8 def @arg22 251 16777216 30 Y 0 31 8
def @arg23 253 16777216 8 Y 128 31 63 def @arg23 251 16777216 8 Y 128 31 63
def @arg24 253 16777216 8 Y 0 31 8 def @arg24 251 16777216 8 Y 0 31 8
def @arg25 253 16777216 4 Y 128 31 63 def @arg25 251 16777216 4 Y 128 31 63
def @arg26 253 16777216 4 Y 0 31 8 def @arg26 251 16777216 4 Y 0 31 8
def @arg27 253 16777216 10 Y 128 31 63 def @arg27 251 16777216 10 Y 128 31 63
def @arg28 253 16777216 10 Y 0 31 8 def @arg28 251 16777216 10 Y 0 31 8
def @arg29 253 16777216 8 Y 128 31 63 def @arg29 251 16777216 8 Y 128 31 63
def @arg30 253 16777216 8 Y 0 31 8 def @arg30 251 16777216 8 Y 0 31 8
def @arg31 253 16777216 3 Y 0 31 8 def @arg31 251 16777216 3 Y 0 31 8
def @arg32 253 16777216 6 Y 0 31 8 def @arg32 251 16777216 6 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
set @my_key= 0 ; set @my_key= 0 ;
execute stmt1 using @my_key ; execute stmt1 using @my_key ;
execute full_info ; execute full_info ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def @arg01 253 20 1 Y 128 0 63 def @arg01 8 20 1 Y 32896 0 63
def @arg02 253 20 0 Y 128 0 63 def @arg02 8 20 0 Y 32896 0 63
def @arg03 253 20 0 Y 128 0 63 def @arg03 8 20 0 Y 32896 0 63
def @arg04 253 20 0 Y 128 0 63 def @arg04 8 20 0 Y 32896 0 63
def @arg05 253 20 0 Y 128 0 63 def @arg05 8 20 0 Y 32896 0 63
def @arg06 253 20 0 Y 128 0 63 def @arg06 8 20 0 Y 32896 0 63
def @arg07 253 23 0 Y 128 31 63 def @arg07 5 23 0 Y 32896 31 63
def @arg08 253 23 0 Y 128 31 63 def @arg08 5 23 0 Y 32896 31 63
def @arg09 253 23 0 Y 128 31 63 def @arg09 5 23 0 Y 32896 31 63
def @arg10 253 23 0 Y 128 31 63 def @arg10 5 23 0 Y 32896 31 63
def @arg11 253 67 0 Y 128 30 63 def @arg11 246 67 0 Y 128 30 63
def @arg12 253 67 0 Y 128 30 63 def @arg12 246 67 0 Y 128 30 63
def @arg13 253 16777216 0 Y 128 31 63 def @arg13 251 16777216 0 Y 128 31 63
def @arg14 253 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63
def @arg15 253 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63
def @arg16 253 16777216 0 Y 128 31 63 def @arg16 251 16777216 0 Y 128 31 63
def @arg17 253 20 0 Y 128 0 63 def @arg17 8 20 0 Y 32928 0 63
def @arg18 253 20 0 Y 128 0 63 def @arg18 8 20 0 Y 32896 0 63
def @arg19 253 20 0 Y 128 0 63 def @arg19 8 20 0 Y 32896 0 63
def @arg20 253 16777216 0 Y 0 31 8 def @arg20 251 16777216 0 Y 0 31 8
def @arg21 253 16777216 0 Y 0 31 8 def @arg21 251 16777216 0 Y 0 31 8
def @arg22 253 16777216 0 Y 0 31 8 def @arg22 251 16777216 0 Y 0 31 8
def @arg23 253 16777216 0 Y 128 31 63 def @arg23 251 16777216 0 Y 128 31 63
def @arg24 253 16777216 0 Y 0 31 8 def @arg24 251 16777216 0 Y 0 31 8
def @arg25 253 16777216 0 Y 128 31 63 def @arg25 251 16777216 0 Y 128 31 63
def @arg26 253 16777216 0 Y 0 31 8 def @arg26 251 16777216 0 Y 0 31 8
def @arg27 253 16777216 0 Y 128 31 63 def @arg27 251 16777216 0 Y 128 31 63
def @arg28 253 16777216 0 Y 0 31 8 def @arg28 251 16777216 0 Y 0 31 8
def @arg29 253 16777216 0 Y 128 31 63 def @arg29 251 16777216 0 Y 128 31 63
def @arg30 253 16777216 0 Y 0 31 8 def @arg30 251 16777216 0 Y 0 31 8
def @arg31 253 16777216 0 Y 0 31 8 def @arg31 251 16777216 0 Y 0 31 8
def @arg32 253 16777216 0 Y 0 31 8 def @arg32 251 16777216 0 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select c1 into ? from t9 where c1= 1" ; prepare stmt1 from "select c1 into ? from t9 where c1= 1" ;

View File

@ -1900,38 +1900,38 @@ from t9 where c1= 1 ;
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
execute full_info ; execute full_info ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def @arg01 253 20 1 Y 128 0 63 def @arg01 8 20 1 Y 32896 0 63
def @arg02 253 20 1 Y 128 0 63 def @arg02 8 20 1 Y 32896 0 63
def @arg03 253 20 1 Y 128 0 63 def @arg03 8 20 1 Y 32896 0 63
def @arg04 253 20 1 Y 128 0 63 def @arg04 8 20 1 Y 32896 0 63
def @arg05 253 20 1 Y 128 0 63 def @arg05 8 20 1 Y 32896 0 63
def @arg06 253 20 1 Y 128 0 63 def @arg06 8 20 1 Y 32896 0 63
def @arg07 253 23 1 Y 128 31 63 def @arg07 5 23 1 Y 32896 31 63
def @arg08 253 23 1 Y 128 31 63 def @arg08 5 23 1 Y 32896 31 63
def @arg09 253 23 1 Y 128 31 63 def @arg09 5 23 1 Y 32896 31 63
def @arg10 253 23 1 Y 128 31 63 def @arg10 5 23 1 Y 32896 31 63
def @arg11 253 67 6 Y 128 30 63 def @arg11 246 67 6 Y 128 30 63
def @arg12 253 67 6 Y 128 30 63 def @arg12 246 67 6 Y 128 30 63
def @arg13 253 16777216 10 Y 128 31 63 def @arg13 251 16777216 10 Y 128 31 63
def @arg14 253 16777216 19 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63
def @arg15 253 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63
def @arg16 253 16777216 8 Y 128 31 63 def @arg16 251 16777216 8 Y 128 31 63
def @arg17 253 20 4 Y 128 0 63 def @arg17 8 20 4 Y 32928 0 63
def @arg18 253 20 1 Y 128 0 63 def @arg18 8 20 1 Y 32896 0 63
def @arg19 253 20 1 Y 128 0 63 def @arg19 8 20 1 Y 32896 0 63
def @arg20 253 16777216 1 Y 0 31 8 def @arg20 251 16777216 1 Y 0 31 8
def @arg21 253 16777216 10 Y 0 31 8 def @arg21 251 16777216 10 Y 0 31 8
def @arg22 253 16777216 30 Y 0 31 8 def @arg22 251 16777216 30 Y 0 31 8
def @arg23 253 16777216 8 Y 128 31 63 def @arg23 251 16777216 8 Y 128 31 63
def @arg24 253 16777216 8 Y 0 31 8 def @arg24 251 16777216 8 Y 0 31 8
def @arg25 253 16777216 4 Y 128 31 63 def @arg25 251 16777216 4 Y 128 31 63
def @arg26 253 16777216 4 Y 0 31 8 def @arg26 251 16777216 4 Y 0 31 8
def @arg27 253 16777216 10 Y 128 31 63 def @arg27 251 16777216 10 Y 128 31 63
def @arg28 253 16777216 10 Y 0 31 8 def @arg28 251 16777216 10 Y 0 31 8
def @arg29 253 16777216 8 Y 128 31 63 def @arg29 251 16777216 8 Y 128 31 63
def @arg30 253 16777216 8 Y 0 31 8 def @arg30 251 16777216 8 Y 0 31 8
def @arg31 253 16777216 3 Y 0 31 8 def @arg31 251 16777216 3 Y 0 31 8
def @arg32 253 16777216 6 Y 0 31 8 def @arg32 251 16777216 6 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4, select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4,
@ -1947,38 +1947,38 @@ from t9 where c1= 0 ;
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
execute full_info ; execute full_info ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def @arg01 253 20 1 Y 128 0 63 def @arg01 8 20 1 Y 32896 0 63
def @arg02 253 20 0 Y 128 0 63 def @arg02 8 20 0 Y 32896 0 63
def @arg03 253 20 0 Y 128 0 63 def @arg03 8 20 0 Y 32896 0 63
def @arg04 253 20 0 Y 128 0 63 def @arg04 8 20 0 Y 32896 0 63
def @arg05 253 20 0 Y 128 0 63 def @arg05 8 20 0 Y 32896 0 63
def @arg06 253 20 0 Y 128 0 63 def @arg06 8 20 0 Y 32896 0 63
def @arg07 253 23 0 Y 128 31 63 def @arg07 5 23 0 Y 32896 31 63
def @arg08 253 23 0 Y 128 31 63 def @arg08 5 23 0 Y 32896 31 63
def @arg09 253 23 0 Y 128 31 63 def @arg09 5 23 0 Y 32896 31 63
def @arg10 253 23 0 Y 128 31 63 def @arg10 5 23 0 Y 32896 31 63
def @arg11 253 67 0 Y 128 30 63 def @arg11 246 67 0 Y 128 30 63
def @arg12 253 67 0 Y 128 30 63 def @arg12 246 67 0 Y 128 30 63
def @arg13 253 16777216 0 Y 128 31 63 def @arg13 251 16777216 0 Y 128 31 63
def @arg14 253 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63
def @arg15 253 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63
def @arg16 253 16777216 0 Y 128 31 63 def @arg16 251 16777216 0 Y 128 31 63
def @arg17 253 20 0 Y 128 0 63 def @arg17 8 20 0 Y 32928 0 63
def @arg18 253 20 0 Y 128 0 63 def @arg18 8 20 0 Y 32896 0 63
def @arg19 253 20 0 Y 128 0 63 def @arg19 8 20 0 Y 32896 0 63
def @arg20 253 16777216 0 Y 0 31 8 def @arg20 251 16777216 0 Y 0 31 8
def @arg21 253 16777216 0 Y 0 31 8 def @arg21 251 16777216 0 Y 0 31 8
def @arg22 253 16777216 0 Y 0 31 8 def @arg22 251 16777216 0 Y 0 31 8
def @arg23 253 16777216 0 Y 128 31 63 def @arg23 251 16777216 0 Y 128 31 63
def @arg24 253 16777216 0 Y 0 31 8 def @arg24 251 16777216 0 Y 0 31 8
def @arg25 253 16777216 0 Y 128 31 63 def @arg25 251 16777216 0 Y 128 31 63
def @arg26 253 16777216 0 Y 0 31 8 def @arg26 251 16777216 0 Y 0 31 8
def @arg27 253 16777216 0 Y 128 31 63 def @arg27 251 16777216 0 Y 128 31 63
def @arg28 253 16777216 0 Y 0 31 8 def @arg28 251 16777216 0 Y 0 31 8
def @arg29 253 16777216 0 Y 128 31 63 def @arg29 251 16777216 0 Y 128 31 63
def @arg30 253 16777216 0 Y 0 31 8 def @arg30 251 16777216 0 Y 0 31 8
def @arg31 253 16777216 0 Y 0 31 8 def @arg31 251 16777216 0 Y 0 31 8
def @arg32 253 16777216 0 Y 0 31 8 def @arg32 251 16777216 0 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select prepare stmt1 from "select
@ -1997,38 +1997,38 @@ execute stmt1 using @my_key ;
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
execute full_info ; execute full_info ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def @arg01 253 20 1 Y 128 0 63 def @arg01 8 20 1 Y 32896 0 63
def @arg02 253 20 1 Y 128 0 63 def @arg02 8 20 1 Y 32896 0 63
def @arg03 253 20 1 Y 128 0 63 def @arg03 8 20 1 Y 32896 0 63
def @arg04 253 20 1 Y 128 0 63 def @arg04 8 20 1 Y 32896 0 63
def @arg05 253 20 1 Y 128 0 63 def @arg05 8 20 1 Y 32896 0 63
def @arg06 253 20 1 Y 128 0 63 def @arg06 8 20 1 Y 32896 0 63
def @arg07 253 23 1 Y 128 31 63 def @arg07 5 23 1 Y 32896 31 63
def @arg08 253 23 1 Y 128 31 63 def @arg08 5 23 1 Y 32896 31 63
def @arg09 253 23 1 Y 128 31 63 def @arg09 5 23 1 Y 32896 31 63
def @arg10 253 23 1 Y 128 31 63 def @arg10 5 23 1 Y 32896 31 63
def @arg11 253 67 6 Y 128 30 63 def @arg11 246 67 6 Y 128 30 63
def @arg12 253 67 6 Y 128 30 63 def @arg12 246 67 6 Y 128 30 63
def @arg13 253 16777216 10 Y 128 31 63 def @arg13 251 16777216 10 Y 128 31 63
def @arg14 253 16777216 19 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63
def @arg15 253 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63
def @arg16 253 16777216 8 Y 128 31 63 def @arg16 251 16777216 8 Y 128 31 63
def @arg17 253 20 4 Y 128 0 63 def @arg17 8 20 4 Y 32928 0 63
def @arg18 253 20 1 Y 128 0 63 def @arg18 8 20 1 Y 32896 0 63
def @arg19 253 20 1 Y 128 0 63 def @arg19 8 20 1 Y 32896 0 63
def @arg20 253 16777216 1 Y 0 31 8 def @arg20 251 16777216 1 Y 0 31 8
def @arg21 253 16777216 10 Y 0 31 8 def @arg21 251 16777216 10 Y 0 31 8
def @arg22 253 16777216 30 Y 0 31 8 def @arg22 251 16777216 30 Y 0 31 8
def @arg23 253 16777216 8 Y 128 31 63 def @arg23 251 16777216 8 Y 128 31 63
def @arg24 253 16777216 8 Y 0 31 8 def @arg24 251 16777216 8 Y 0 31 8
def @arg25 253 16777216 4 Y 128 31 63 def @arg25 251 16777216 4 Y 128 31 63
def @arg26 253 16777216 4 Y 0 31 8 def @arg26 251 16777216 4 Y 0 31 8
def @arg27 253 16777216 10 Y 128 31 63 def @arg27 251 16777216 10 Y 128 31 63
def @arg28 253 16777216 10 Y 0 31 8 def @arg28 251 16777216 10 Y 0 31 8
def @arg29 253 16777216 8 Y 128 31 63 def @arg29 251 16777216 8 Y 128 31 63
def @arg30 253 16777216 8 Y 0 31 8 def @arg30 251 16777216 8 Y 0 31 8
def @arg31 253 16777216 3 Y 0 31 8 def @arg31 251 16777216 3 Y 0 31 8
def @arg32 253 16777216 6 Y 0 31 8 def @arg32 251 16777216 6 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
set @my_key= 0 ; set @my_key= 0 ;
@ -2037,38 +2037,38 @@ execute stmt1 using @my_key ;
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
execute full_info ; execute full_info ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def @arg01 253 20 1 Y 128 0 63 def @arg01 8 20 1 Y 32896 0 63
def @arg02 253 20 0 Y 128 0 63 def @arg02 8 20 0 Y 32896 0 63
def @arg03 253 20 0 Y 128 0 63 def @arg03 8 20 0 Y 32896 0 63
def @arg04 253 20 0 Y 128 0 63 def @arg04 8 20 0 Y 32896 0 63
def @arg05 253 20 0 Y 128 0 63 def @arg05 8 20 0 Y 32896 0 63
def @arg06 253 20 0 Y 128 0 63 def @arg06 8 20 0 Y 32896 0 63
def @arg07 253 23 0 Y 128 31 63 def @arg07 5 23 0 Y 32896 31 63
def @arg08 253 23 0 Y 128 31 63 def @arg08 5 23 0 Y 32896 31 63
def @arg09 253 23 0 Y 128 31 63 def @arg09 5 23 0 Y 32896 31 63
def @arg10 253 23 0 Y 128 31 63 def @arg10 5 23 0 Y 32896 31 63
def @arg11 253 67 0 Y 128 30 63 def @arg11 246 67 0 Y 128 30 63
def @arg12 253 67 0 Y 128 30 63 def @arg12 246 67 0 Y 128 30 63
def @arg13 253 16777216 0 Y 128 31 63 def @arg13 251 16777216 0 Y 128 31 63
def @arg14 253 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63
def @arg15 253 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63
def @arg16 253 16777216 0 Y 128 31 63 def @arg16 251 16777216 0 Y 128 31 63
def @arg17 253 20 0 Y 128 0 63 def @arg17 8 20 0 Y 32928 0 63
def @arg18 253 20 0 Y 128 0 63 def @arg18 8 20 0 Y 32896 0 63
def @arg19 253 20 0 Y 128 0 63 def @arg19 8 20 0 Y 32896 0 63
def @arg20 253 16777216 0 Y 0 31 8 def @arg20 251 16777216 0 Y 0 31 8
def @arg21 253 16777216 0 Y 0 31 8 def @arg21 251 16777216 0 Y 0 31 8
def @arg22 253 16777216 0 Y 0 31 8 def @arg22 251 16777216 0 Y 0 31 8
def @arg23 253 16777216 0 Y 128 31 63 def @arg23 251 16777216 0 Y 128 31 63
def @arg24 253 16777216 0 Y 0 31 8 def @arg24 251 16777216 0 Y 0 31 8
def @arg25 253 16777216 0 Y 128 31 63 def @arg25 251 16777216 0 Y 128 31 63
def @arg26 253 16777216 0 Y 0 31 8 def @arg26 251 16777216 0 Y 0 31 8
def @arg27 253 16777216 0 Y 128 31 63 def @arg27 251 16777216 0 Y 128 31 63
def @arg28 253 16777216 0 Y 0 31 8 def @arg28 251 16777216 0 Y 0 31 8
def @arg29 253 16777216 0 Y 128 31 63 def @arg29 251 16777216 0 Y 128 31 63
def @arg30 253 16777216 0 Y 0 31 8 def @arg30 251 16777216 0 Y 0 31 8
def @arg31 253 16777216 0 Y 0 31 8 def @arg31 251 16777216 0 Y 0 31 8
def @arg32 253 16777216 0 Y 0 31 8 def @arg32 251 16777216 0 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select ? := c1 from t9 where c1= 1" ; prepare stmt1 from "select ? := c1 from t9 where c1= 1" ;
@ -2085,38 +2085,38 @@ into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08,
from t9 where c1= 1 ; from t9 where c1= 1 ;
execute full_info ; execute full_info ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def @arg01 253 20 1 Y 128 0 63 def @arg01 8 20 1 Y 32896 0 63
def @arg02 253 20 1 Y 128 0 63 def @arg02 8 20 1 Y 32896 0 63
def @arg03 253 20 1 Y 128 0 63 def @arg03 8 20 1 Y 32896 0 63
def @arg04 253 20 1 Y 128 0 63 def @arg04 8 20 1 Y 32896 0 63
def @arg05 253 20 1 Y 128 0 63 def @arg05 8 20 1 Y 32896 0 63
def @arg06 253 20 1 Y 128 0 63 def @arg06 8 20 1 Y 32896 0 63
def @arg07 253 23 1 Y 128 31 63 def @arg07 5 23 1 Y 32896 31 63
def @arg08 253 23 1 Y 128 31 63 def @arg08 5 23 1 Y 32896 31 63
def @arg09 253 23 1 Y 128 31 63 def @arg09 5 23 1 Y 32896 31 63
def @arg10 253 23 1 Y 128 31 63 def @arg10 5 23 1 Y 32896 31 63
def @arg11 253 67 6 Y 128 30 63 def @arg11 246 67 6 Y 128 30 63
def @arg12 253 67 6 Y 128 30 63 def @arg12 246 67 6 Y 128 30 63
def @arg13 253 16777216 10 Y 128 31 63 def @arg13 251 16777216 10 Y 128 31 63
def @arg14 253 16777216 19 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63
def @arg15 253 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63
def @arg16 253 16777216 8 Y 128 31 63 def @arg16 251 16777216 8 Y 128 31 63
def @arg17 253 20 4 Y 128 0 63 def @arg17 8 20 4 Y 32928 0 63
def @arg18 253 20 1 Y 128 0 63 def @arg18 8 20 1 Y 32896 0 63
def @arg19 253 20 1 Y 128 0 63 def @arg19 8 20 1 Y 32896 0 63
def @arg20 253 16777216 1 Y 0 31 8 def @arg20 251 16777216 1 Y 0 31 8
def @arg21 253 16777216 10 Y 0 31 8 def @arg21 251 16777216 10 Y 0 31 8
def @arg22 253 16777216 30 Y 0 31 8 def @arg22 251 16777216 30 Y 0 31 8
def @arg23 253 16777216 8 Y 128 31 63 def @arg23 251 16777216 8 Y 128 31 63
def @arg24 253 16777216 8 Y 0 31 8 def @arg24 251 16777216 8 Y 0 31 8
def @arg25 253 16777216 4 Y 128 31 63 def @arg25 251 16777216 4 Y 128 31 63
def @arg26 253 16777216 4 Y 0 31 8 def @arg26 251 16777216 4 Y 0 31 8
def @arg27 253 16777216 10 Y 128 31 63 def @arg27 251 16777216 10 Y 128 31 63
def @arg28 253 16777216 10 Y 0 31 8 def @arg28 251 16777216 10 Y 0 31 8
def @arg29 253 16777216 8 Y 128 31 63 def @arg29 251 16777216 8 Y 128 31 63
def @arg30 253 16777216 8 Y 0 31 8 def @arg30 251 16777216 8 Y 0 31 8
def @arg31 253 16777216 3 Y 0 31 8 def @arg31 251 16777216 3 Y 0 31 8
def @arg32 253 16777216 6 Y 0 31 8 def @arg32 251 16777216 6 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
@ -2129,38 +2129,38 @@ into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08,
from t9 where c1= 0 ; from t9 where c1= 0 ;
execute full_info ; execute full_info ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def @arg01 253 20 1 Y 128 0 63 def @arg01 8 20 1 Y 32896 0 63
def @arg02 253 20 0 Y 128 0 63 def @arg02 8 20 0 Y 32896 0 63
def @arg03 253 20 0 Y 128 0 63 def @arg03 8 20 0 Y 32896 0 63
def @arg04 253 20 0 Y 128 0 63 def @arg04 8 20 0 Y 32896 0 63
def @arg05 253 20 0 Y 128 0 63 def @arg05 8 20 0 Y 32896 0 63
def @arg06 253 20 0 Y 128 0 63 def @arg06 8 20 0 Y 32896 0 63
def @arg07 253 23 0 Y 128 31 63 def @arg07 5 23 0 Y 32896 31 63
def @arg08 253 23 0 Y 128 31 63 def @arg08 5 23 0 Y 32896 31 63
def @arg09 253 23 0 Y 128 31 63 def @arg09 5 23 0 Y 32896 31 63
def @arg10 253 23 0 Y 128 31 63 def @arg10 5 23 0 Y 32896 31 63
def @arg11 253 67 0 Y 128 30 63 def @arg11 246 67 0 Y 128 30 63
def @arg12 253 67 0 Y 128 30 63 def @arg12 246 67 0 Y 128 30 63
def @arg13 253 16777216 0 Y 128 31 63 def @arg13 251 16777216 0 Y 128 31 63
def @arg14 253 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63
def @arg15 253 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63
def @arg16 253 16777216 0 Y 128 31 63 def @arg16 251 16777216 0 Y 128 31 63
def @arg17 253 20 0 Y 128 0 63 def @arg17 8 20 0 Y 32928 0 63
def @arg18 253 20 0 Y 128 0 63 def @arg18 8 20 0 Y 32896 0 63
def @arg19 253 20 0 Y 128 0 63 def @arg19 8 20 0 Y 32896 0 63
def @arg20 253 16777216 0 Y 0 31 8 def @arg20 251 16777216 0 Y 0 31 8
def @arg21 253 16777216 0 Y 0 31 8 def @arg21 251 16777216 0 Y 0 31 8
def @arg22 253 16777216 0 Y 0 31 8 def @arg22 251 16777216 0 Y 0 31 8
def @arg23 253 16777216 0 Y 128 31 63 def @arg23 251 16777216 0 Y 128 31 63
def @arg24 253 16777216 0 Y 0 31 8 def @arg24 251 16777216 0 Y 0 31 8
def @arg25 253 16777216 0 Y 128 31 63 def @arg25 251 16777216 0 Y 128 31 63
def @arg26 253 16777216 0 Y 0 31 8 def @arg26 251 16777216 0 Y 0 31 8
def @arg27 253 16777216 0 Y 128 31 63 def @arg27 251 16777216 0 Y 128 31 63
def @arg28 253 16777216 0 Y 0 31 8 def @arg28 251 16777216 0 Y 0 31 8
def @arg29 253 16777216 0 Y 128 31 63 def @arg29 251 16777216 0 Y 128 31 63
def @arg30 253 16777216 0 Y 0 31 8 def @arg30 251 16777216 0 Y 0 31 8
def @arg31 253 16777216 0 Y 0 31 8 def @arg31 251 16777216 0 Y 0 31 8
def @arg32 253 16777216 0 Y 0 31 8 def @arg32 251 16777216 0 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
@ -2175,76 +2175,76 @@ set @my_key= 1 ;
execute stmt1 using @my_key ; execute stmt1 using @my_key ;
execute full_info ; execute full_info ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def @arg01 253 20 1 Y 128 0 63 def @arg01 8 20 1 Y 32896 0 63
def @arg02 253 20 1 Y 128 0 63 def @arg02 8 20 1 Y 32896 0 63
def @arg03 253 20 1 Y 128 0 63 def @arg03 8 20 1 Y 32896 0 63
def @arg04 253 20 1 Y 128 0 63 def @arg04 8 20 1 Y 32896 0 63
def @arg05 253 20 1 Y 128 0 63 def @arg05 8 20 1 Y 32896 0 63
def @arg06 253 20 1 Y 128 0 63 def @arg06 8 20 1 Y 32896 0 63
def @arg07 253 23 1 Y 128 31 63 def @arg07 5 23 1 Y 32896 31 63
def @arg08 253 23 1 Y 128 31 63 def @arg08 5 23 1 Y 32896 31 63
def @arg09 253 23 1 Y 128 31 63 def @arg09 5 23 1 Y 32896 31 63
def @arg10 253 23 1 Y 128 31 63 def @arg10 5 23 1 Y 32896 31 63
def @arg11 253 67 6 Y 128 30 63 def @arg11 246 67 6 Y 128 30 63
def @arg12 253 67 6 Y 128 30 63 def @arg12 246 67 6 Y 128 30 63
def @arg13 253 16777216 10 Y 128 31 63 def @arg13 251 16777216 10 Y 128 31 63
def @arg14 253 16777216 19 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63
def @arg15 253 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63
def @arg16 253 16777216 8 Y 128 31 63 def @arg16 251 16777216 8 Y 128 31 63
def @arg17 253 20 4 Y 128 0 63 def @arg17 8 20 4 Y 32928 0 63
def @arg18 253 20 1 Y 128 0 63 def @arg18 8 20 1 Y 32896 0 63
def @arg19 253 20 1 Y 128 0 63 def @arg19 8 20 1 Y 32896 0 63
def @arg20 253 16777216 1 Y 0 31 8 def @arg20 251 16777216 1 Y 0 31 8
def @arg21 253 16777216 10 Y 0 31 8 def @arg21 251 16777216 10 Y 0 31 8
def @arg22 253 16777216 30 Y 0 31 8 def @arg22 251 16777216 30 Y 0 31 8
def @arg23 253 16777216 8 Y 128 31 63 def @arg23 251 16777216 8 Y 128 31 63
def @arg24 253 16777216 8 Y 0 31 8 def @arg24 251 16777216 8 Y 0 31 8
def @arg25 253 16777216 4 Y 128 31 63 def @arg25 251 16777216 4 Y 128 31 63
def @arg26 253 16777216 4 Y 0 31 8 def @arg26 251 16777216 4 Y 0 31 8
def @arg27 253 16777216 10 Y 128 31 63 def @arg27 251 16777216 10 Y 128 31 63
def @arg28 253 16777216 10 Y 0 31 8 def @arg28 251 16777216 10 Y 0 31 8
def @arg29 253 16777216 8 Y 128 31 63 def @arg29 251 16777216 8 Y 128 31 63
def @arg30 253 16777216 8 Y 0 31 8 def @arg30 251 16777216 8 Y 0 31 8
def @arg31 253 16777216 3 Y 0 31 8 def @arg31 251 16777216 3 Y 0 31 8
def @arg32 253 16777216 6 Y 0 31 8 def @arg32 251 16777216 6 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
set @my_key= 0 ; set @my_key= 0 ;
execute stmt1 using @my_key ; execute stmt1 using @my_key ;
execute full_info ; execute full_info ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def @arg01 253 20 1 Y 128 0 63 def @arg01 8 20 1 Y 32896 0 63
def @arg02 253 20 0 Y 128 0 63 def @arg02 8 20 0 Y 32896 0 63
def @arg03 253 20 0 Y 128 0 63 def @arg03 8 20 0 Y 32896 0 63
def @arg04 253 20 0 Y 128 0 63 def @arg04 8 20 0 Y 32896 0 63
def @arg05 253 20 0 Y 128 0 63 def @arg05 8 20 0 Y 32896 0 63
def @arg06 253 20 0 Y 128 0 63 def @arg06 8 20 0 Y 32896 0 63
def @arg07 253 23 0 Y 128 31 63 def @arg07 5 23 0 Y 32896 31 63
def @arg08 253 23 0 Y 128 31 63 def @arg08 5 23 0 Y 32896 31 63
def @arg09 253 23 0 Y 128 31 63 def @arg09 5 23 0 Y 32896 31 63
def @arg10 253 23 0 Y 128 31 63 def @arg10 5 23 0 Y 32896 31 63
def @arg11 253 67 0 Y 128 30 63 def @arg11 246 67 0 Y 128 30 63
def @arg12 253 67 0 Y 128 30 63 def @arg12 246 67 0 Y 128 30 63
def @arg13 253 16777216 0 Y 128 31 63 def @arg13 251 16777216 0 Y 128 31 63
def @arg14 253 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63
def @arg15 253 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63
def @arg16 253 16777216 0 Y 128 31 63 def @arg16 251 16777216 0 Y 128 31 63
def @arg17 253 20 0 Y 128 0 63 def @arg17 8 20 0 Y 32928 0 63
def @arg18 253 20 0 Y 128 0 63 def @arg18 8 20 0 Y 32896 0 63
def @arg19 253 20 0 Y 128 0 63 def @arg19 8 20 0 Y 32896 0 63
def @arg20 253 16777216 0 Y 0 31 8 def @arg20 251 16777216 0 Y 0 31 8
def @arg21 253 16777216 0 Y 0 31 8 def @arg21 251 16777216 0 Y 0 31 8
def @arg22 253 16777216 0 Y 0 31 8 def @arg22 251 16777216 0 Y 0 31 8
def @arg23 253 16777216 0 Y 128 31 63 def @arg23 251 16777216 0 Y 128 31 63
def @arg24 253 16777216 0 Y 0 31 8 def @arg24 251 16777216 0 Y 0 31 8
def @arg25 253 16777216 0 Y 128 31 63 def @arg25 251 16777216 0 Y 128 31 63
def @arg26 253 16777216 0 Y 0 31 8 def @arg26 251 16777216 0 Y 0 31 8
def @arg27 253 16777216 0 Y 128 31 63 def @arg27 251 16777216 0 Y 128 31 63
def @arg28 253 16777216 0 Y 0 31 8 def @arg28 251 16777216 0 Y 0 31 8
def @arg29 253 16777216 0 Y 128 31 63 def @arg29 251 16777216 0 Y 128 31 63
def @arg30 253 16777216 0 Y 0 31 8 def @arg30 251 16777216 0 Y 0 31 8
def @arg31 253 16777216 0 Y 0 31 8 def @arg31 251 16777216 0 Y 0 31 8
def @arg32 253 16777216 0 Y 0 31 8 def @arg32 251 16777216 0 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select c1 into ? from t9 where c1= 1" ; prepare stmt1 from "select c1 into ? from t9 where c1= 1" ;

View File

@ -1901,38 +1901,38 @@ from t9 where c1= 1 ;
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
execute full_info ; execute full_info ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def @arg01 253 20 1 Y 128 0 63 def @arg01 8 20 1 Y 32896 0 63
def @arg02 253 20 1 Y 128 0 63 def @arg02 8 20 1 Y 32896 0 63
def @arg03 253 20 1 Y 128 0 63 def @arg03 8 20 1 Y 32896 0 63
def @arg04 253 20 1 Y 128 0 63 def @arg04 8 20 1 Y 32896 0 63
def @arg05 253 20 1 Y 128 0 63 def @arg05 8 20 1 Y 32896 0 63
def @arg06 253 20 1 Y 128 0 63 def @arg06 8 20 1 Y 32896 0 63
def @arg07 253 23 1 Y 128 31 63 def @arg07 5 23 1 Y 32896 31 63
def @arg08 253 23 1 Y 128 31 63 def @arg08 5 23 1 Y 32896 31 63
def @arg09 253 23 1 Y 128 31 63 def @arg09 5 23 1 Y 32896 31 63
def @arg10 253 23 1 Y 128 31 63 def @arg10 5 23 1 Y 32896 31 63
def @arg11 253 67 6 Y 128 30 63 def @arg11 246 67 6 Y 128 30 63
def @arg12 253 67 6 Y 128 30 63 def @arg12 246 67 6 Y 128 30 63
def @arg13 253 16777216 10 Y 128 31 63 def @arg13 251 16777216 10 Y 128 31 63
def @arg14 253 16777216 19 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63
def @arg15 253 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63
def @arg16 253 16777216 8 Y 128 31 63 def @arg16 251 16777216 8 Y 128 31 63
def @arg17 253 20 4 Y 128 0 63 def @arg17 8 20 4 Y 32928 0 63
def @arg18 253 20 1 Y 128 0 63 def @arg18 8 20 1 Y 32896 0 63
def @arg19 253 20 1 Y 128 0 63 def @arg19 8 20 1 Y 32896 0 63
def @arg20 253 16777216 1 Y 0 31 8 def @arg20 251 16777216 1 Y 0 31 8
def @arg21 253 16777216 10 Y 0 31 8 def @arg21 251 16777216 10 Y 0 31 8
def @arg22 253 16777216 30 Y 0 31 8 def @arg22 251 16777216 30 Y 0 31 8
def @arg23 253 16777216 8 Y 0 31 8 def @arg23 251 16777216 8 Y 0 31 8
def @arg24 253 16777216 8 Y 0 31 8 def @arg24 251 16777216 8 Y 0 31 8
def @arg25 253 16777216 4 Y 0 31 8 def @arg25 251 16777216 4 Y 0 31 8
def @arg26 253 16777216 4 Y 0 31 8 def @arg26 251 16777216 4 Y 0 31 8
def @arg27 253 16777216 10 Y 0 31 8 def @arg27 251 16777216 10 Y 0 31 8
def @arg28 253 16777216 10 Y 0 31 8 def @arg28 251 16777216 10 Y 0 31 8
def @arg29 253 16777216 8 Y 0 31 8 def @arg29 251 16777216 8 Y 0 31 8
def @arg30 253 16777216 8 Y 0 31 8 def @arg30 251 16777216 8 Y 0 31 8
def @arg31 253 16777216 3 Y 0 31 8 def @arg31 251 16777216 3 Y 0 31 8
def @arg32 253 16777216 6 Y 0 31 8 def @arg32 251 16777216 6 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4, select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4,
@ -1948,38 +1948,38 @@ from t9 where c1= 0 ;
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
execute full_info ; execute full_info ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def @arg01 253 20 1 Y 128 0 63 def @arg01 8 20 1 Y 32896 0 63
def @arg02 253 20 0 Y 128 0 63 def @arg02 8 20 0 Y 32896 0 63
def @arg03 253 20 0 Y 128 0 63 def @arg03 8 20 0 Y 32896 0 63
def @arg04 253 20 0 Y 128 0 63 def @arg04 8 20 0 Y 32896 0 63
def @arg05 253 20 0 Y 128 0 63 def @arg05 8 20 0 Y 32896 0 63
def @arg06 253 20 0 Y 128 0 63 def @arg06 8 20 0 Y 32896 0 63
def @arg07 253 23 0 Y 128 31 63 def @arg07 5 23 0 Y 32896 31 63
def @arg08 253 23 0 Y 128 31 63 def @arg08 5 23 0 Y 32896 31 63
def @arg09 253 23 0 Y 128 31 63 def @arg09 5 23 0 Y 32896 31 63
def @arg10 253 23 0 Y 128 31 63 def @arg10 5 23 0 Y 32896 31 63
def @arg11 253 67 0 Y 128 30 63 def @arg11 246 67 0 Y 128 30 63
def @arg12 253 67 0 Y 128 30 63 def @arg12 246 67 0 Y 128 30 63
def @arg13 253 16777216 0 Y 128 31 63 def @arg13 251 16777216 0 Y 128 31 63
def @arg14 253 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63
def @arg15 253 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63
def @arg16 253 16777216 0 Y 128 31 63 def @arg16 251 16777216 0 Y 128 31 63
def @arg17 253 20 0 Y 128 0 63 def @arg17 8 20 0 Y 32928 0 63
def @arg18 253 20 0 Y 128 0 63 def @arg18 8 20 0 Y 32896 0 63
def @arg19 253 20 0 Y 128 0 63 def @arg19 8 20 0 Y 32896 0 63
def @arg20 253 16777216 0 Y 0 31 8 def @arg20 251 16777216 0 Y 0 31 8
def @arg21 253 16777216 0 Y 0 31 8 def @arg21 251 16777216 0 Y 0 31 8
def @arg22 253 16777216 0 Y 0 31 8 def @arg22 251 16777216 0 Y 0 31 8
def @arg23 253 16777216 0 Y 0 31 8 def @arg23 251 16777216 0 Y 0 31 8
def @arg24 253 16777216 0 Y 0 31 8 def @arg24 251 16777216 0 Y 0 31 8
def @arg25 253 16777216 0 Y 0 31 8 def @arg25 251 16777216 0 Y 0 31 8
def @arg26 253 16777216 0 Y 0 31 8 def @arg26 251 16777216 0 Y 0 31 8
def @arg27 253 16777216 0 Y 0 31 8 def @arg27 251 16777216 0 Y 0 31 8
def @arg28 253 16777216 0 Y 0 31 8 def @arg28 251 16777216 0 Y 0 31 8
def @arg29 253 16777216 0 Y 0 31 8 def @arg29 251 16777216 0 Y 0 31 8
def @arg30 253 16777216 0 Y 0 31 8 def @arg30 251 16777216 0 Y 0 31 8
def @arg31 253 16777216 0 Y 0 31 8 def @arg31 251 16777216 0 Y 0 31 8
def @arg32 253 16777216 0 Y 0 31 8 def @arg32 251 16777216 0 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select prepare stmt1 from "select
@ -1998,38 +1998,38 @@ execute stmt1 using @my_key ;
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
execute full_info ; execute full_info ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def @arg01 253 20 1 Y 128 0 63 def @arg01 8 20 1 Y 32896 0 63
def @arg02 253 20 1 Y 128 0 63 def @arg02 8 20 1 Y 32896 0 63
def @arg03 253 20 1 Y 128 0 63 def @arg03 8 20 1 Y 32896 0 63
def @arg04 253 20 1 Y 128 0 63 def @arg04 8 20 1 Y 32896 0 63
def @arg05 253 20 1 Y 128 0 63 def @arg05 8 20 1 Y 32896 0 63
def @arg06 253 20 1 Y 128 0 63 def @arg06 8 20 1 Y 32896 0 63
def @arg07 253 23 1 Y 128 31 63 def @arg07 5 23 1 Y 32896 31 63
def @arg08 253 23 1 Y 128 31 63 def @arg08 5 23 1 Y 32896 31 63
def @arg09 253 23 1 Y 128 31 63 def @arg09 5 23 1 Y 32896 31 63
def @arg10 253 23 1 Y 128 31 63 def @arg10 5 23 1 Y 32896 31 63
def @arg11 253 67 6 Y 128 30 63 def @arg11 246 67 6 Y 128 30 63
def @arg12 253 67 6 Y 128 30 63 def @arg12 246 67 6 Y 128 30 63
def @arg13 253 16777216 10 Y 128 31 63 def @arg13 251 16777216 10 Y 128 31 63
def @arg14 253 16777216 19 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63
def @arg15 253 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63
def @arg16 253 16777216 8 Y 128 31 63 def @arg16 251 16777216 8 Y 128 31 63
def @arg17 253 20 4 Y 128 0 63 def @arg17 8 20 4 Y 32928 0 63
def @arg18 253 20 1 Y 128 0 63 def @arg18 8 20 1 Y 32896 0 63
def @arg19 253 20 1 Y 128 0 63 def @arg19 8 20 1 Y 32896 0 63
def @arg20 253 16777216 1 Y 0 31 8 def @arg20 251 16777216 1 Y 0 31 8
def @arg21 253 16777216 10 Y 0 31 8 def @arg21 251 16777216 10 Y 0 31 8
def @arg22 253 16777216 30 Y 0 31 8 def @arg22 251 16777216 30 Y 0 31 8
def @arg23 253 16777216 8 Y 0 31 8 def @arg23 251 16777216 8 Y 0 31 8
def @arg24 253 16777216 8 Y 0 31 8 def @arg24 251 16777216 8 Y 0 31 8
def @arg25 253 16777216 4 Y 0 31 8 def @arg25 251 16777216 4 Y 0 31 8
def @arg26 253 16777216 4 Y 0 31 8 def @arg26 251 16777216 4 Y 0 31 8
def @arg27 253 16777216 10 Y 0 31 8 def @arg27 251 16777216 10 Y 0 31 8
def @arg28 253 16777216 10 Y 0 31 8 def @arg28 251 16777216 10 Y 0 31 8
def @arg29 253 16777216 8 Y 0 31 8 def @arg29 251 16777216 8 Y 0 31 8
def @arg30 253 16777216 8 Y 0 31 8 def @arg30 251 16777216 8 Y 0 31 8
def @arg31 253 16777216 3 Y 0 31 8 def @arg31 251 16777216 3 Y 0 31 8
def @arg32 253 16777216 6 Y 0 31 8 def @arg32 251 16777216 6 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
set @my_key= 0 ; set @my_key= 0 ;
@ -2038,38 +2038,38 @@ execute stmt1 using @my_key ;
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
execute full_info ; execute full_info ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def @arg01 253 20 1 Y 128 0 63 def @arg01 8 20 1 Y 32896 0 63
def @arg02 253 20 0 Y 128 0 63 def @arg02 8 20 0 Y 32896 0 63
def @arg03 253 20 0 Y 128 0 63 def @arg03 8 20 0 Y 32896 0 63
def @arg04 253 20 0 Y 128 0 63 def @arg04 8 20 0 Y 32896 0 63
def @arg05 253 20 0 Y 128 0 63 def @arg05 8 20 0 Y 32896 0 63
def @arg06 253 20 0 Y 128 0 63 def @arg06 8 20 0 Y 32896 0 63
def @arg07 253 23 0 Y 128 31 63 def @arg07 5 23 0 Y 32896 31 63
def @arg08 253 23 0 Y 128 31 63 def @arg08 5 23 0 Y 32896 31 63
def @arg09 253 23 0 Y 128 31 63 def @arg09 5 23 0 Y 32896 31 63
def @arg10 253 23 0 Y 128 31 63 def @arg10 5 23 0 Y 32896 31 63
def @arg11 253 67 0 Y 128 30 63 def @arg11 246 67 0 Y 128 30 63
def @arg12 253 67 0 Y 128 30 63 def @arg12 246 67 0 Y 128 30 63
def @arg13 253 16777216 0 Y 128 31 63 def @arg13 251 16777216 0 Y 128 31 63
def @arg14 253 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63
def @arg15 253 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63
def @arg16 253 16777216 0 Y 128 31 63 def @arg16 251 16777216 0 Y 128 31 63
def @arg17 253 20 0 Y 128 0 63 def @arg17 8 20 0 Y 32928 0 63
def @arg18 253 20 0 Y 128 0 63 def @arg18 8 20 0 Y 32896 0 63
def @arg19 253 20 0 Y 128 0 63 def @arg19 8 20 0 Y 32896 0 63
def @arg20 253 16777216 0 Y 0 31 8 def @arg20 251 16777216 0 Y 0 31 8
def @arg21 253 16777216 0 Y 0 31 8 def @arg21 251 16777216 0 Y 0 31 8
def @arg22 253 16777216 0 Y 0 31 8 def @arg22 251 16777216 0 Y 0 31 8
def @arg23 253 16777216 0 Y 0 31 8 def @arg23 251 16777216 0 Y 0 31 8
def @arg24 253 16777216 0 Y 0 31 8 def @arg24 251 16777216 0 Y 0 31 8
def @arg25 253 16777216 0 Y 0 31 8 def @arg25 251 16777216 0 Y 0 31 8
def @arg26 253 16777216 0 Y 0 31 8 def @arg26 251 16777216 0 Y 0 31 8
def @arg27 253 16777216 0 Y 0 31 8 def @arg27 251 16777216 0 Y 0 31 8
def @arg28 253 16777216 0 Y 0 31 8 def @arg28 251 16777216 0 Y 0 31 8
def @arg29 253 16777216 0 Y 0 31 8 def @arg29 251 16777216 0 Y 0 31 8
def @arg30 253 16777216 0 Y 0 31 8 def @arg30 251 16777216 0 Y 0 31 8
def @arg31 253 16777216 0 Y 0 31 8 def @arg31 251 16777216 0 Y 0 31 8
def @arg32 253 16777216 0 Y 0 31 8 def @arg32 251 16777216 0 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select ? := c1 from t9 where c1= 1" ; prepare stmt1 from "select ? := c1 from t9 where c1= 1" ;
@ -2086,38 +2086,38 @@ into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08,
from t9 where c1= 1 ; from t9 where c1= 1 ;
execute full_info ; execute full_info ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def @arg01 253 20 1 Y 128 0 63 def @arg01 8 20 1 Y 32896 0 63
def @arg02 253 20 1 Y 128 0 63 def @arg02 8 20 1 Y 32896 0 63
def @arg03 253 20 1 Y 128 0 63 def @arg03 8 20 1 Y 32896 0 63
def @arg04 253 20 1 Y 128 0 63 def @arg04 8 20 1 Y 32896 0 63
def @arg05 253 20 1 Y 128 0 63 def @arg05 8 20 1 Y 32896 0 63
def @arg06 253 20 1 Y 128 0 63 def @arg06 8 20 1 Y 32896 0 63
def @arg07 253 23 1 Y 128 31 63 def @arg07 5 23 1 Y 32896 31 63
def @arg08 253 23 1 Y 128 31 63 def @arg08 5 23 1 Y 32896 31 63
def @arg09 253 23 1 Y 128 31 63 def @arg09 5 23 1 Y 32896 31 63
def @arg10 253 23 1 Y 128 31 63 def @arg10 5 23 1 Y 32896 31 63
def @arg11 253 67 6 Y 128 30 63 def @arg11 246 67 6 Y 128 30 63
def @arg12 253 67 6 Y 128 30 63 def @arg12 246 67 6 Y 128 30 63
def @arg13 253 16777216 10 Y 128 31 63 def @arg13 251 16777216 10 Y 128 31 63
def @arg14 253 16777216 19 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63
def @arg15 253 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63
def @arg16 253 16777216 8 Y 128 31 63 def @arg16 251 16777216 8 Y 128 31 63
def @arg17 253 20 4 Y 128 0 63 def @arg17 8 20 4 Y 32928 0 63
def @arg18 253 20 1 Y 128 0 63 def @arg18 8 20 1 Y 32896 0 63
def @arg19 253 20 1 Y 128 0 63 def @arg19 8 20 1 Y 32896 0 63
def @arg20 253 16777216 1 Y 0 31 8 def @arg20 251 16777216 1 Y 0 31 8
def @arg21 253 16777216 10 Y 0 31 8 def @arg21 251 16777216 10 Y 0 31 8
def @arg22 253 16777216 30 Y 0 31 8 def @arg22 251 16777216 30 Y 0 31 8
def @arg23 253 16777216 8 Y 0 31 8 def @arg23 251 16777216 8 Y 0 31 8
def @arg24 253 16777216 8 Y 0 31 8 def @arg24 251 16777216 8 Y 0 31 8
def @arg25 253 16777216 4 Y 0 31 8 def @arg25 251 16777216 4 Y 0 31 8
def @arg26 253 16777216 4 Y 0 31 8 def @arg26 251 16777216 4 Y 0 31 8
def @arg27 253 16777216 10 Y 0 31 8 def @arg27 251 16777216 10 Y 0 31 8
def @arg28 253 16777216 10 Y 0 31 8 def @arg28 251 16777216 10 Y 0 31 8
def @arg29 253 16777216 8 Y 0 31 8 def @arg29 251 16777216 8 Y 0 31 8
def @arg30 253 16777216 8 Y 0 31 8 def @arg30 251 16777216 8 Y 0 31 8
def @arg31 253 16777216 3 Y 0 31 8 def @arg31 251 16777216 3 Y 0 31 8
def @arg32 253 16777216 6 Y 0 31 8 def @arg32 251 16777216 6 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
@ -2130,38 +2130,38 @@ into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08,
from t9 where c1= 0 ; from t9 where c1= 0 ;
execute full_info ; execute full_info ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def @arg01 253 20 1 Y 128 0 63 def @arg01 8 20 1 Y 32896 0 63
def @arg02 253 20 0 Y 128 0 63 def @arg02 8 20 0 Y 32896 0 63
def @arg03 253 20 0 Y 128 0 63 def @arg03 8 20 0 Y 32896 0 63
def @arg04 253 20 0 Y 128 0 63 def @arg04 8 20 0 Y 32896 0 63
def @arg05 253 20 0 Y 128 0 63 def @arg05 8 20 0 Y 32896 0 63
def @arg06 253 20 0 Y 128 0 63 def @arg06 8 20 0 Y 32896 0 63
def @arg07 253 23 0 Y 128 31 63 def @arg07 5 23 0 Y 32896 31 63
def @arg08 253 23 0 Y 128 31 63 def @arg08 5 23 0 Y 32896 31 63
def @arg09 253 23 0 Y 128 31 63 def @arg09 5 23 0 Y 32896 31 63
def @arg10 253 23 0 Y 128 31 63 def @arg10 5 23 0 Y 32896 31 63
def @arg11 253 67 0 Y 128 30 63 def @arg11 246 67 0 Y 128 30 63
def @arg12 253 67 0 Y 128 30 63 def @arg12 246 67 0 Y 128 30 63
def @arg13 253 16777216 0 Y 128 31 63 def @arg13 251 16777216 0 Y 128 31 63
def @arg14 253 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63
def @arg15 253 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63
def @arg16 253 16777216 0 Y 128 31 63 def @arg16 251 16777216 0 Y 128 31 63
def @arg17 253 20 0 Y 128 0 63 def @arg17 8 20 0 Y 32928 0 63
def @arg18 253 20 0 Y 128 0 63 def @arg18 8 20 0 Y 32896 0 63
def @arg19 253 20 0 Y 128 0 63 def @arg19 8 20 0 Y 32896 0 63
def @arg20 253 16777216 0 Y 0 31 8 def @arg20 251 16777216 0 Y 0 31 8
def @arg21 253 16777216 0 Y 0 31 8 def @arg21 251 16777216 0 Y 0 31 8
def @arg22 253 16777216 0 Y 0 31 8 def @arg22 251 16777216 0 Y 0 31 8
def @arg23 253 16777216 0 Y 0 31 8 def @arg23 251 16777216 0 Y 0 31 8
def @arg24 253 16777216 0 Y 0 31 8 def @arg24 251 16777216 0 Y 0 31 8
def @arg25 253 16777216 0 Y 0 31 8 def @arg25 251 16777216 0 Y 0 31 8
def @arg26 253 16777216 0 Y 0 31 8 def @arg26 251 16777216 0 Y 0 31 8
def @arg27 253 16777216 0 Y 0 31 8 def @arg27 251 16777216 0 Y 0 31 8
def @arg28 253 16777216 0 Y 0 31 8 def @arg28 251 16777216 0 Y 0 31 8
def @arg29 253 16777216 0 Y 0 31 8 def @arg29 251 16777216 0 Y 0 31 8
def @arg30 253 16777216 0 Y 0 31 8 def @arg30 251 16777216 0 Y 0 31 8
def @arg31 253 16777216 0 Y 0 31 8 def @arg31 251 16777216 0 Y 0 31 8
def @arg32 253 16777216 0 Y 0 31 8 def @arg32 251 16777216 0 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
@ -2176,76 +2176,76 @@ set @my_key= 1 ;
execute stmt1 using @my_key ; execute stmt1 using @my_key ;
execute full_info ; execute full_info ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def @arg01 253 20 1 Y 128 0 63 def @arg01 8 20 1 Y 32896 0 63
def @arg02 253 20 1 Y 128 0 63 def @arg02 8 20 1 Y 32896 0 63
def @arg03 253 20 1 Y 128 0 63 def @arg03 8 20 1 Y 32896 0 63
def @arg04 253 20 1 Y 128 0 63 def @arg04 8 20 1 Y 32896 0 63
def @arg05 253 20 1 Y 128 0 63 def @arg05 8 20 1 Y 32896 0 63
def @arg06 253 20 1 Y 128 0 63 def @arg06 8 20 1 Y 32896 0 63
def @arg07 253 23 1 Y 128 31 63 def @arg07 5 23 1 Y 32896 31 63
def @arg08 253 23 1 Y 128 31 63 def @arg08 5 23 1 Y 32896 31 63
def @arg09 253 23 1 Y 128 31 63 def @arg09 5 23 1 Y 32896 31 63
def @arg10 253 23 1 Y 128 31 63 def @arg10 5 23 1 Y 32896 31 63
def @arg11 253 67 6 Y 128 30 63 def @arg11 246 67 6 Y 128 30 63
def @arg12 253 67 6 Y 128 30 63 def @arg12 246 67 6 Y 128 30 63
def @arg13 253 16777216 10 Y 128 31 63 def @arg13 251 16777216 10 Y 128 31 63
def @arg14 253 16777216 19 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63
def @arg15 253 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63
def @arg16 253 16777216 8 Y 128 31 63 def @arg16 251 16777216 8 Y 128 31 63
def @arg17 253 20 4 Y 128 0 63 def @arg17 8 20 4 Y 32928 0 63
def @arg18 253 20 1 Y 128 0 63 def @arg18 8 20 1 Y 32896 0 63
def @arg19 253 20 1 Y 128 0 63 def @arg19 8 20 1 Y 32896 0 63
def @arg20 253 16777216 1 Y 0 31 8 def @arg20 251 16777216 1 Y 0 31 8
def @arg21 253 16777216 10 Y 0 31 8 def @arg21 251 16777216 10 Y 0 31 8
def @arg22 253 16777216 30 Y 0 31 8 def @arg22 251 16777216 30 Y 0 31 8
def @arg23 253 16777216 8 Y 0 31 8 def @arg23 251 16777216 8 Y 0 31 8
def @arg24 253 16777216 8 Y 0 31 8 def @arg24 251 16777216 8 Y 0 31 8
def @arg25 253 16777216 4 Y 0 31 8 def @arg25 251 16777216 4 Y 0 31 8
def @arg26 253 16777216 4 Y 0 31 8 def @arg26 251 16777216 4 Y 0 31 8
def @arg27 253 16777216 10 Y 0 31 8 def @arg27 251 16777216 10 Y 0 31 8
def @arg28 253 16777216 10 Y 0 31 8 def @arg28 251 16777216 10 Y 0 31 8
def @arg29 253 16777216 8 Y 0 31 8 def @arg29 251 16777216 8 Y 0 31 8
def @arg30 253 16777216 8 Y 0 31 8 def @arg30 251 16777216 8 Y 0 31 8
def @arg31 253 16777216 3 Y 0 31 8 def @arg31 251 16777216 3 Y 0 31 8
def @arg32 253 16777216 6 Y 0 31 8 def @arg32 251 16777216 6 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
set @my_key= 0 ; set @my_key= 0 ;
execute stmt1 using @my_key ; execute stmt1 using @my_key ;
execute full_info ; execute full_info ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def @arg01 253 20 1 Y 128 0 63 def @arg01 8 20 1 Y 32896 0 63
def @arg02 253 20 0 Y 128 0 63 def @arg02 8 20 0 Y 32896 0 63
def @arg03 253 20 0 Y 128 0 63 def @arg03 8 20 0 Y 32896 0 63
def @arg04 253 20 0 Y 128 0 63 def @arg04 8 20 0 Y 32896 0 63
def @arg05 253 20 0 Y 128 0 63 def @arg05 8 20 0 Y 32896 0 63
def @arg06 253 20 0 Y 128 0 63 def @arg06 8 20 0 Y 32896 0 63
def @arg07 253 23 0 Y 128 31 63 def @arg07 5 23 0 Y 32896 31 63
def @arg08 253 23 0 Y 128 31 63 def @arg08 5 23 0 Y 32896 31 63
def @arg09 253 23 0 Y 128 31 63 def @arg09 5 23 0 Y 32896 31 63
def @arg10 253 23 0 Y 128 31 63 def @arg10 5 23 0 Y 32896 31 63
def @arg11 253 67 0 Y 128 30 63 def @arg11 246 67 0 Y 128 30 63
def @arg12 253 67 0 Y 128 30 63 def @arg12 246 67 0 Y 128 30 63
def @arg13 253 16777216 0 Y 128 31 63 def @arg13 251 16777216 0 Y 128 31 63
def @arg14 253 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63
def @arg15 253 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63
def @arg16 253 16777216 0 Y 128 31 63 def @arg16 251 16777216 0 Y 128 31 63
def @arg17 253 20 0 Y 128 0 63 def @arg17 8 20 0 Y 32928 0 63
def @arg18 253 20 0 Y 128 0 63 def @arg18 8 20 0 Y 32896 0 63
def @arg19 253 20 0 Y 128 0 63 def @arg19 8 20 0 Y 32896 0 63
def @arg20 253 16777216 0 Y 0 31 8 def @arg20 251 16777216 0 Y 0 31 8
def @arg21 253 16777216 0 Y 0 31 8 def @arg21 251 16777216 0 Y 0 31 8
def @arg22 253 16777216 0 Y 0 31 8 def @arg22 251 16777216 0 Y 0 31 8
def @arg23 253 16777216 0 Y 0 31 8 def @arg23 251 16777216 0 Y 0 31 8
def @arg24 253 16777216 0 Y 0 31 8 def @arg24 251 16777216 0 Y 0 31 8
def @arg25 253 16777216 0 Y 0 31 8 def @arg25 251 16777216 0 Y 0 31 8
def @arg26 253 16777216 0 Y 0 31 8 def @arg26 251 16777216 0 Y 0 31 8
def @arg27 253 16777216 0 Y 0 31 8 def @arg27 251 16777216 0 Y 0 31 8
def @arg28 253 16777216 0 Y 0 31 8 def @arg28 251 16777216 0 Y 0 31 8
def @arg29 253 16777216 0 Y 0 31 8 def @arg29 251 16777216 0 Y 0 31 8
def @arg30 253 16777216 0 Y 0 31 8 def @arg30 251 16777216 0 Y 0 31 8
def @arg31 253 16777216 0 Y 0 31 8 def @arg31 251 16777216 0 Y 0 31 8
def @arg32 253 16777216 0 Y 0 31 8 def @arg32 251 16777216 0 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select c1 into ? from t9 where c1= 1" ; prepare stmt1 from "select c1 into ? from t9 where c1= 1" ;

File diff suppressed because it is too large Load Diff

View File

@ -1900,38 +1900,38 @@ from t9 where c1= 1 ;
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
execute full_info ; execute full_info ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def @arg01 253 20 1 Y 128 0 63 def @arg01 8 20 1 Y 32896 0 63
def @arg02 253 20 1 Y 128 0 63 def @arg02 8 20 1 Y 32896 0 63
def @arg03 253 20 1 Y 128 0 63 def @arg03 8 20 1 Y 32896 0 63
def @arg04 253 20 1 Y 128 0 63 def @arg04 8 20 1 Y 32896 0 63
def @arg05 253 20 1 Y 128 0 63 def @arg05 8 20 1 Y 32896 0 63
def @arg06 253 20 1 Y 128 0 63 def @arg06 8 20 1 Y 32896 0 63
def @arg07 253 23 1 Y 128 31 63 def @arg07 5 23 1 Y 32896 31 63
def @arg08 253 23 1 Y 128 31 63 def @arg08 5 23 1 Y 32896 31 63
def @arg09 253 23 1 Y 128 31 63 def @arg09 5 23 1 Y 32896 31 63
def @arg10 253 23 1 Y 128 31 63 def @arg10 5 23 1 Y 32896 31 63
def @arg11 253 67 6 Y 128 30 63 def @arg11 246 67 6 Y 128 30 63
def @arg12 253 67 6 Y 128 30 63 def @arg12 246 67 6 Y 128 30 63
def @arg13 253 16777216 10 Y 128 31 63 def @arg13 251 16777216 10 Y 128 31 63
def @arg14 253 16777216 19 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63
def @arg15 253 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63
def @arg16 253 16777216 8 Y 128 31 63 def @arg16 251 16777216 8 Y 128 31 63
def @arg17 253 20 4 Y 128 0 63 def @arg17 8 20 4 Y 32928 0 63
def @arg18 253 20 1 Y 128 0 63 def @arg18 8 20 1 Y 32896 0 63
def @arg19 253 20 1 Y 128 0 63 def @arg19 8 20 1 Y 32896 0 63
def @arg20 253 16777216 1 Y 0 31 8 def @arg20 251 16777216 1 Y 0 31 8
def @arg21 253 16777216 10 Y 0 31 8 def @arg21 251 16777216 10 Y 0 31 8
def @arg22 253 16777216 30 Y 0 31 8 def @arg22 251 16777216 30 Y 0 31 8
def @arg23 253 16777216 8 Y 128 31 63 def @arg23 251 16777216 8 Y 128 31 63
def @arg24 253 16777216 8 Y 0 31 8 def @arg24 251 16777216 8 Y 0 31 8
def @arg25 253 16777216 4 Y 128 31 63 def @arg25 251 16777216 4 Y 128 31 63
def @arg26 253 16777216 4 Y 0 31 8 def @arg26 251 16777216 4 Y 0 31 8
def @arg27 253 16777216 10 Y 128 31 63 def @arg27 251 16777216 10 Y 128 31 63
def @arg28 253 16777216 10 Y 0 31 8 def @arg28 251 16777216 10 Y 0 31 8
def @arg29 253 16777216 8 Y 128 31 63 def @arg29 251 16777216 8 Y 128 31 63
def @arg30 253 16777216 8 Y 0 31 8 def @arg30 251 16777216 8 Y 0 31 8
def @arg31 253 16777216 3 Y 0 31 8 def @arg31 251 16777216 3 Y 0 31 8
def @arg32 253 16777216 6 Y 0 31 8 def @arg32 251 16777216 6 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4, select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4,
@ -1947,38 +1947,38 @@ from t9 where c1= 0 ;
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
execute full_info ; execute full_info ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def @arg01 253 20 1 Y 128 0 63 def @arg01 8 20 1 Y 32896 0 63
def @arg02 253 20 0 Y 128 0 63 def @arg02 8 20 0 Y 32896 0 63
def @arg03 253 20 0 Y 128 0 63 def @arg03 8 20 0 Y 32896 0 63
def @arg04 253 20 0 Y 128 0 63 def @arg04 8 20 0 Y 32896 0 63
def @arg05 253 20 0 Y 128 0 63 def @arg05 8 20 0 Y 32896 0 63
def @arg06 253 20 0 Y 128 0 63 def @arg06 8 20 0 Y 32896 0 63
def @arg07 253 23 0 Y 128 31 63 def @arg07 5 23 0 Y 32896 31 63
def @arg08 253 23 0 Y 128 31 63 def @arg08 5 23 0 Y 32896 31 63
def @arg09 253 23 0 Y 128 31 63 def @arg09 5 23 0 Y 32896 31 63
def @arg10 253 23 0 Y 128 31 63 def @arg10 5 23 0 Y 32896 31 63
def @arg11 253 67 0 Y 128 30 63 def @arg11 246 67 0 Y 128 30 63
def @arg12 253 67 0 Y 128 30 63 def @arg12 246 67 0 Y 128 30 63
def @arg13 253 16777216 0 Y 128 31 63 def @arg13 251 16777216 0 Y 128 31 63
def @arg14 253 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63
def @arg15 253 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63
def @arg16 253 16777216 0 Y 128 31 63 def @arg16 251 16777216 0 Y 128 31 63
def @arg17 253 20 0 Y 128 0 63 def @arg17 8 20 0 Y 32928 0 63
def @arg18 253 20 0 Y 128 0 63 def @arg18 8 20 0 Y 32896 0 63
def @arg19 253 20 0 Y 128 0 63 def @arg19 8 20 0 Y 32896 0 63
def @arg20 253 16777216 0 Y 0 31 8 def @arg20 251 16777216 0 Y 0 31 8
def @arg21 253 16777216 0 Y 0 31 8 def @arg21 251 16777216 0 Y 0 31 8
def @arg22 253 16777216 0 Y 0 31 8 def @arg22 251 16777216 0 Y 0 31 8
def @arg23 253 16777216 0 Y 128 31 63 def @arg23 251 16777216 0 Y 128 31 63
def @arg24 253 16777216 0 Y 0 31 8 def @arg24 251 16777216 0 Y 0 31 8
def @arg25 253 16777216 0 Y 128 31 63 def @arg25 251 16777216 0 Y 128 31 63
def @arg26 253 16777216 0 Y 0 31 8 def @arg26 251 16777216 0 Y 0 31 8
def @arg27 253 16777216 0 Y 128 31 63 def @arg27 251 16777216 0 Y 128 31 63
def @arg28 253 16777216 0 Y 0 31 8 def @arg28 251 16777216 0 Y 0 31 8
def @arg29 253 16777216 0 Y 128 31 63 def @arg29 251 16777216 0 Y 128 31 63
def @arg30 253 16777216 0 Y 0 31 8 def @arg30 251 16777216 0 Y 0 31 8
def @arg31 253 16777216 0 Y 0 31 8 def @arg31 251 16777216 0 Y 0 31 8
def @arg32 253 16777216 0 Y 0 31 8 def @arg32 251 16777216 0 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select prepare stmt1 from "select
@ -1997,38 +1997,38 @@ execute stmt1 using @my_key ;
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
execute full_info ; execute full_info ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def @arg01 253 20 1 Y 128 0 63 def @arg01 8 20 1 Y 32896 0 63
def @arg02 253 20 1 Y 128 0 63 def @arg02 8 20 1 Y 32896 0 63
def @arg03 253 20 1 Y 128 0 63 def @arg03 8 20 1 Y 32896 0 63
def @arg04 253 20 1 Y 128 0 63 def @arg04 8 20 1 Y 32896 0 63
def @arg05 253 20 1 Y 128 0 63 def @arg05 8 20 1 Y 32896 0 63
def @arg06 253 20 1 Y 128 0 63 def @arg06 8 20 1 Y 32896 0 63
def @arg07 253 23 1 Y 128 31 63 def @arg07 5 23 1 Y 32896 31 63
def @arg08 253 23 1 Y 128 31 63 def @arg08 5 23 1 Y 32896 31 63
def @arg09 253 23 1 Y 128 31 63 def @arg09 5 23 1 Y 32896 31 63
def @arg10 253 23 1 Y 128 31 63 def @arg10 5 23 1 Y 32896 31 63
def @arg11 253 67 6 Y 128 30 63 def @arg11 246 67 6 Y 128 30 63
def @arg12 253 67 6 Y 128 30 63 def @arg12 246 67 6 Y 128 30 63
def @arg13 253 16777216 10 Y 128 31 63 def @arg13 251 16777216 10 Y 128 31 63
def @arg14 253 16777216 19 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63
def @arg15 253 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63
def @arg16 253 16777216 8 Y 128 31 63 def @arg16 251 16777216 8 Y 128 31 63
def @arg17 253 20 4 Y 128 0 63 def @arg17 8 20 4 Y 32928 0 63
def @arg18 253 20 1 Y 128 0 63 def @arg18 8 20 1 Y 32896 0 63
def @arg19 253 20 1 Y 128 0 63 def @arg19 8 20 1 Y 32896 0 63
def @arg20 253 16777216 1 Y 0 31 8 def @arg20 251 16777216 1 Y 0 31 8
def @arg21 253 16777216 10 Y 0 31 8 def @arg21 251 16777216 10 Y 0 31 8
def @arg22 253 16777216 30 Y 0 31 8 def @arg22 251 16777216 30 Y 0 31 8
def @arg23 253 16777216 8 Y 128 31 63 def @arg23 251 16777216 8 Y 128 31 63
def @arg24 253 16777216 8 Y 0 31 8 def @arg24 251 16777216 8 Y 0 31 8
def @arg25 253 16777216 4 Y 128 31 63 def @arg25 251 16777216 4 Y 128 31 63
def @arg26 253 16777216 4 Y 0 31 8 def @arg26 251 16777216 4 Y 0 31 8
def @arg27 253 16777216 10 Y 128 31 63 def @arg27 251 16777216 10 Y 128 31 63
def @arg28 253 16777216 10 Y 0 31 8 def @arg28 251 16777216 10 Y 0 31 8
def @arg29 253 16777216 8 Y 128 31 63 def @arg29 251 16777216 8 Y 128 31 63
def @arg30 253 16777216 8 Y 0 31 8 def @arg30 251 16777216 8 Y 0 31 8
def @arg31 253 16777216 3 Y 0 31 8 def @arg31 251 16777216 3 Y 0 31 8
def @arg32 253 16777216 6 Y 0 31 8 def @arg32 251 16777216 6 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
set @my_key= 0 ; set @my_key= 0 ;
@ -2037,38 +2037,38 @@ execute stmt1 using @my_key ;
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
execute full_info ; execute full_info ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def @arg01 253 20 1 Y 128 0 63 def @arg01 8 20 1 Y 32896 0 63
def @arg02 253 20 0 Y 128 0 63 def @arg02 8 20 0 Y 32896 0 63
def @arg03 253 20 0 Y 128 0 63 def @arg03 8 20 0 Y 32896 0 63
def @arg04 253 20 0 Y 128 0 63 def @arg04 8 20 0 Y 32896 0 63
def @arg05 253 20 0 Y 128 0 63 def @arg05 8 20 0 Y 32896 0 63
def @arg06 253 20 0 Y 128 0 63 def @arg06 8 20 0 Y 32896 0 63
def @arg07 253 23 0 Y 128 31 63 def @arg07 5 23 0 Y 32896 31 63
def @arg08 253 23 0 Y 128 31 63 def @arg08 5 23 0 Y 32896 31 63
def @arg09 253 23 0 Y 128 31 63 def @arg09 5 23 0 Y 32896 31 63
def @arg10 253 23 0 Y 128 31 63 def @arg10 5 23 0 Y 32896 31 63
def @arg11 253 67 0 Y 128 30 63 def @arg11 246 67 0 Y 128 30 63
def @arg12 253 67 0 Y 128 30 63 def @arg12 246 67 0 Y 128 30 63
def @arg13 253 16777216 0 Y 128 31 63 def @arg13 251 16777216 0 Y 128 31 63
def @arg14 253 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63
def @arg15 253 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63
def @arg16 253 16777216 0 Y 128 31 63 def @arg16 251 16777216 0 Y 128 31 63
def @arg17 253 20 0 Y 128 0 63 def @arg17 8 20 0 Y 32928 0 63
def @arg18 253 20 0 Y 128 0 63 def @arg18 8 20 0 Y 32896 0 63
def @arg19 253 20 0 Y 128 0 63 def @arg19 8 20 0 Y 32896 0 63
def @arg20 253 16777216 0 Y 0 31 8 def @arg20 251 16777216 0 Y 0 31 8
def @arg21 253 16777216 0 Y 0 31 8 def @arg21 251 16777216 0 Y 0 31 8
def @arg22 253 16777216 0 Y 0 31 8 def @arg22 251 16777216 0 Y 0 31 8
def @arg23 253 16777216 0 Y 128 31 63 def @arg23 251 16777216 0 Y 128 31 63
def @arg24 253 16777216 0 Y 0 31 8 def @arg24 251 16777216 0 Y 0 31 8
def @arg25 253 16777216 0 Y 128 31 63 def @arg25 251 16777216 0 Y 128 31 63
def @arg26 253 16777216 0 Y 0 31 8 def @arg26 251 16777216 0 Y 0 31 8
def @arg27 253 16777216 0 Y 128 31 63 def @arg27 251 16777216 0 Y 128 31 63
def @arg28 253 16777216 0 Y 0 31 8 def @arg28 251 16777216 0 Y 0 31 8
def @arg29 253 16777216 0 Y 128 31 63 def @arg29 251 16777216 0 Y 128 31 63
def @arg30 253 16777216 0 Y 0 31 8 def @arg30 251 16777216 0 Y 0 31 8
def @arg31 253 16777216 0 Y 0 31 8 def @arg31 251 16777216 0 Y 0 31 8
def @arg32 253 16777216 0 Y 0 31 8 def @arg32 251 16777216 0 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select ? := c1 from t9 where c1= 1" ; prepare stmt1 from "select ? := c1 from t9 where c1= 1" ;
@ -2085,38 +2085,38 @@ into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08,
from t9 where c1= 1 ; from t9 where c1= 1 ;
execute full_info ; execute full_info ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def @arg01 253 20 1 Y 128 0 63 def @arg01 8 20 1 Y 32896 0 63
def @arg02 253 20 1 Y 128 0 63 def @arg02 8 20 1 Y 32896 0 63
def @arg03 253 20 1 Y 128 0 63 def @arg03 8 20 1 Y 32896 0 63
def @arg04 253 20 1 Y 128 0 63 def @arg04 8 20 1 Y 32896 0 63
def @arg05 253 20 1 Y 128 0 63 def @arg05 8 20 1 Y 32896 0 63
def @arg06 253 20 1 Y 128 0 63 def @arg06 8 20 1 Y 32896 0 63
def @arg07 253 23 1 Y 128 31 63 def @arg07 5 23 1 Y 32896 31 63
def @arg08 253 23 1 Y 128 31 63 def @arg08 5 23 1 Y 32896 31 63
def @arg09 253 23 1 Y 128 31 63 def @arg09 5 23 1 Y 32896 31 63
def @arg10 253 23 1 Y 128 31 63 def @arg10 5 23 1 Y 32896 31 63
def @arg11 253 67 6 Y 128 30 63 def @arg11 246 67 6 Y 128 30 63
def @arg12 253 67 6 Y 128 30 63 def @arg12 246 67 6 Y 128 30 63
def @arg13 253 16777216 10 Y 128 31 63 def @arg13 251 16777216 10 Y 128 31 63
def @arg14 253 16777216 19 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63
def @arg15 253 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63
def @arg16 253 16777216 8 Y 128 31 63 def @arg16 251 16777216 8 Y 128 31 63
def @arg17 253 20 4 Y 128 0 63 def @arg17 8 20 4 Y 32928 0 63
def @arg18 253 20 1 Y 128 0 63 def @arg18 8 20 1 Y 32896 0 63
def @arg19 253 20 1 Y 128 0 63 def @arg19 8 20 1 Y 32896 0 63
def @arg20 253 16777216 1 Y 0 31 8 def @arg20 251 16777216 1 Y 0 31 8
def @arg21 253 16777216 10 Y 0 31 8 def @arg21 251 16777216 10 Y 0 31 8
def @arg22 253 16777216 30 Y 0 31 8 def @arg22 251 16777216 30 Y 0 31 8
def @arg23 253 16777216 8 Y 128 31 63 def @arg23 251 16777216 8 Y 128 31 63
def @arg24 253 16777216 8 Y 0 31 8 def @arg24 251 16777216 8 Y 0 31 8
def @arg25 253 16777216 4 Y 128 31 63 def @arg25 251 16777216 4 Y 128 31 63
def @arg26 253 16777216 4 Y 0 31 8 def @arg26 251 16777216 4 Y 0 31 8
def @arg27 253 16777216 10 Y 128 31 63 def @arg27 251 16777216 10 Y 128 31 63
def @arg28 253 16777216 10 Y 0 31 8 def @arg28 251 16777216 10 Y 0 31 8
def @arg29 253 16777216 8 Y 128 31 63 def @arg29 251 16777216 8 Y 128 31 63
def @arg30 253 16777216 8 Y 0 31 8 def @arg30 251 16777216 8 Y 0 31 8
def @arg31 253 16777216 3 Y 0 31 8 def @arg31 251 16777216 3 Y 0 31 8
def @arg32 253 16777216 6 Y 0 31 8 def @arg32 251 16777216 6 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
@ -2129,38 +2129,38 @@ into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08,
from t9 where c1= 0 ; from t9 where c1= 0 ;
execute full_info ; execute full_info ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def @arg01 253 20 1 Y 128 0 63 def @arg01 8 20 1 Y 32896 0 63
def @arg02 253 20 0 Y 128 0 63 def @arg02 8 20 0 Y 32896 0 63
def @arg03 253 20 0 Y 128 0 63 def @arg03 8 20 0 Y 32896 0 63
def @arg04 253 20 0 Y 128 0 63 def @arg04 8 20 0 Y 32896 0 63
def @arg05 253 20 0 Y 128 0 63 def @arg05 8 20 0 Y 32896 0 63
def @arg06 253 20 0 Y 128 0 63 def @arg06 8 20 0 Y 32896 0 63
def @arg07 253 23 0 Y 128 31 63 def @arg07 5 23 0 Y 32896 31 63
def @arg08 253 23 0 Y 128 31 63 def @arg08 5 23 0 Y 32896 31 63
def @arg09 253 23 0 Y 128 31 63 def @arg09 5 23 0 Y 32896 31 63
def @arg10 253 23 0 Y 128 31 63 def @arg10 5 23 0 Y 32896 31 63
def @arg11 253 67 0 Y 128 30 63 def @arg11 246 67 0 Y 128 30 63
def @arg12 253 67 0 Y 128 30 63 def @arg12 246 67 0 Y 128 30 63
def @arg13 253 16777216 0 Y 128 31 63 def @arg13 251 16777216 0 Y 128 31 63
def @arg14 253 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63
def @arg15 253 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63
def @arg16 253 16777216 0 Y 128 31 63 def @arg16 251 16777216 0 Y 128 31 63
def @arg17 253 20 0 Y 128 0 63 def @arg17 8 20 0 Y 32928 0 63
def @arg18 253 20 0 Y 128 0 63 def @arg18 8 20 0 Y 32896 0 63
def @arg19 253 20 0 Y 128 0 63 def @arg19 8 20 0 Y 32896 0 63
def @arg20 253 16777216 0 Y 0 31 8 def @arg20 251 16777216 0 Y 0 31 8
def @arg21 253 16777216 0 Y 0 31 8 def @arg21 251 16777216 0 Y 0 31 8
def @arg22 253 16777216 0 Y 0 31 8 def @arg22 251 16777216 0 Y 0 31 8
def @arg23 253 16777216 0 Y 128 31 63 def @arg23 251 16777216 0 Y 128 31 63
def @arg24 253 16777216 0 Y 0 31 8 def @arg24 251 16777216 0 Y 0 31 8
def @arg25 253 16777216 0 Y 128 31 63 def @arg25 251 16777216 0 Y 128 31 63
def @arg26 253 16777216 0 Y 0 31 8 def @arg26 251 16777216 0 Y 0 31 8
def @arg27 253 16777216 0 Y 128 31 63 def @arg27 251 16777216 0 Y 128 31 63
def @arg28 253 16777216 0 Y 0 31 8 def @arg28 251 16777216 0 Y 0 31 8
def @arg29 253 16777216 0 Y 128 31 63 def @arg29 251 16777216 0 Y 128 31 63
def @arg30 253 16777216 0 Y 0 31 8 def @arg30 251 16777216 0 Y 0 31 8
def @arg31 253 16777216 0 Y 0 31 8 def @arg31 251 16777216 0 Y 0 31 8
def @arg32 253 16777216 0 Y 0 31 8 def @arg32 251 16777216 0 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
@ -2175,76 +2175,76 @@ set @my_key= 1 ;
execute stmt1 using @my_key ; execute stmt1 using @my_key ;
execute full_info ; execute full_info ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def @arg01 253 20 1 Y 128 0 63 def @arg01 8 20 1 Y 32896 0 63
def @arg02 253 20 1 Y 128 0 63 def @arg02 8 20 1 Y 32896 0 63
def @arg03 253 20 1 Y 128 0 63 def @arg03 8 20 1 Y 32896 0 63
def @arg04 253 20 1 Y 128 0 63 def @arg04 8 20 1 Y 32896 0 63
def @arg05 253 20 1 Y 128 0 63 def @arg05 8 20 1 Y 32896 0 63
def @arg06 253 20 1 Y 128 0 63 def @arg06 8 20 1 Y 32896 0 63
def @arg07 253 23 1 Y 128 31 63 def @arg07 5 23 1 Y 32896 31 63
def @arg08 253 23 1 Y 128 31 63 def @arg08 5 23 1 Y 32896 31 63
def @arg09 253 23 1 Y 128 31 63 def @arg09 5 23 1 Y 32896 31 63
def @arg10 253 23 1 Y 128 31 63 def @arg10 5 23 1 Y 32896 31 63
def @arg11 253 67 6 Y 128 30 63 def @arg11 246 67 6 Y 128 30 63
def @arg12 253 67 6 Y 128 30 63 def @arg12 246 67 6 Y 128 30 63
def @arg13 253 16777216 10 Y 128 31 63 def @arg13 251 16777216 10 Y 128 31 63
def @arg14 253 16777216 19 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63
def @arg15 253 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63
def @arg16 253 16777216 8 Y 128 31 63 def @arg16 251 16777216 8 Y 128 31 63
def @arg17 253 20 4 Y 128 0 63 def @arg17 8 20 4 Y 32928 0 63
def @arg18 253 20 1 Y 128 0 63 def @arg18 8 20 1 Y 32896 0 63
def @arg19 253 20 1 Y 128 0 63 def @arg19 8 20 1 Y 32896 0 63
def @arg20 253 16777216 1 Y 0 31 8 def @arg20 251 16777216 1 Y 0 31 8
def @arg21 253 16777216 10 Y 0 31 8 def @arg21 251 16777216 10 Y 0 31 8
def @arg22 253 16777216 30 Y 0 31 8 def @arg22 251 16777216 30 Y 0 31 8
def @arg23 253 16777216 8 Y 128 31 63 def @arg23 251 16777216 8 Y 128 31 63
def @arg24 253 16777216 8 Y 0 31 8 def @arg24 251 16777216 8 Y 0 31 8
def @arg25 253 16777216 4 Y 128 31 63 def @arg25 251 16777216 4 Y 128 31 63
def @arg26 253 16777216 4 Y 0 31 8 def @arg26 251 16777216 4 Y 0 31 8
def @arg27 253 16777216 10 Y 128 31 63 def @arg27 251 16777216 10 Y 128 31 63
def @arg28 253 16777216 10 Y 0 31 8 def @arg28 251 16777216 10 Y 0 31 8
def @arg29 253 16777216 8 Y 128 31 63 def @arg29 251 16777216 8 Y 128 31 63
def @arg30 253 16777216 8 Y 0 31 8 def @arg30 251 16777216 8 Y 0 31 8
def @arg31 253 16777216 3 Y 0 31 8 def @arg31 251 16777216 3 Y 0 31 8
def @arg32 253 16777216 6 Y 0 31 8 def @arg32 251 16777216 6 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
set @my_key= 0 ; set @my_key= 0 ;
execute stmt1 using @my_key ; execute stmt1 using @my_key ;
execute full_info ; execute full_info ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def @arg01 253 20 1 Y 128 0 63 def @arg01 8 20 1 Y 32896 0 63
def @arg02 253 20 0 Y 128 0 63 def @arg02 8 20 0 Y 32896 0 63
def @arg03 253 20 0 Y 128 0 63 def @arg03 8 20 0 Y 32896 0 63
def @arg04 253 20 0 Y 128 0 63 def @arg04 8 20 0 Y 32896 0 63
def @arg05 253 20 0 Y 128 0 63 def @arg05 8 20 0 Y 32896 0 63
def @arg06 253 20 0 Y 128 0 63 def @arg06 8 20 0 Y 32896 0 63
def @arg07 253 23 0 Y 128 31 63 def @arg07 5 23 0 Y 32896 31 63
def @arg08 253 23 0 Y 128 31 63 def @arg08 5 23 0 Y 32896 31 63
def @arg09 253 23 0 Y 128 31 63 def @arg09 5 23 0 Y 32896 31 63
def @arg10 253 23 0 Y 128 31 63 def @arg10 5 23 0 Y 32896 31 63
def @arg11 253 67 0 Y 128 30 63 def @arg11 246 67 0 Y 128 30 63
def @arg12 253 67 0 Y 128 30 63 def @arg12 246 67 0 Y 128 30 63
def @arg13 253 16777216 0 Y 128 31 63 def @arg13 251 16777216 0 Y 128 31 63
def @arg14 253 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63
def @arg15 253 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63
def @arg16 253 16777216 0 Y 128 31 63 def @arg16 251 16777216 0 Y 128 31 63
def @arg17 253 20 0 Y 128 0 63 def @arg17 8 20 0 Y 32928 0 63
def @arg18 253 20 0 Y 128 0 63 def @arg18 8 20 0 Y 32896 0 63
def @arg19 253 20 0 Y 128 0 63 def @arg19 8 20 0 Y 32896 0 63
def @arg20 253 16777216 0 Y 0 31 8 def @arg20 251 16777216 0 Y 0 31 8
def @arg21 253 16777216 0 Y 0 31 8 def @arg21 251 16777216 0 Y 0 31 8
def @arg22 253 16777216 0 Y 0 31 8 def @arg22 251 16777216 0 Y 0 31 8
def @arg23 253 16777216 0 Y 128 31 63 def @arg23 251 16777216 0 Y 128 31 63
def @arg24 253 16777216 0 Y 0 31 8 def @arg24 251 16777216 0 Y 0 31 8
def @arg25 253 16777216 0 Y 128 31 63 def @arg25 251 16777216 0 Y 128 31 63
def @arg26 253 16777216 0 Y 0 31 8 def @arg26 251 16777216 0 Y 0 31 8
def @arg27 253 16777216 0 Y 128 31 63 def @arg27 251 16777216 0 Y 128 31 63
def @arg28 253 16777216 0 Y 0 31 8 def @arg28 251 16777216 0 Y 0 31 8
def @arg29 253 16777216 0 Y 128 31 63 def @arg29 251 16777216 0 Y 128 31 63
def @arg30 253 16777216 0 Y 0 31 8 def @arg30 251 16777216 0 Y 0 31 8
def @arg31 253 16777216 0 Y 0 31 8 def @arg31 251 16777216 0 Y 0 31 8
def @arg32 253 16777216 0 Y 0 31 8 def @arg32 251 16777216 0 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select c1 into ? from t9 where c1= 1" ; prepare stmt1 from "select c1 into ? from t9 where c1= 1" ;

View File

@ -0,0 +1,362 @@
---- establish connection con1 (root) ----
---- switch to connection default ----
set @initial_query_cache_size = @@global.query_cache_size;
set @@global.query_cache_size=100000;
flush status;
drop table if exists t1;
create table t1(c1 int);
insert into t1 values(1),(10),(100);
prepare stmt1 from "select * from t1 where c1=10";
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 0
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 0
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 1
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 2
prepare stmt2 from "select * from t1 where c1=10";
execute stmt2;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 3
execute stmt2;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 4
execute stmt2;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 5
---- switch to connection con1 ----
prepare stmt3 from "select * from t1 where c1=10";
execute stmt3;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 6
execute stmt3;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 7
execute stmt3;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 8
---- switch to connection default ----
prepare stmt10 from "SELECT * FROM t1 WHERE c1 = 100";
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 8
execute stmt10;
c1
100
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 8
execute stmt10;
c1
100
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 9
SELECT * FROM t1 WHERE c1 = 100;
c1
100
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 10
---- switch to connection con1 ----
SELECT * FROM t1 WHERE c1 = 100;
c1
100
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 11
---- switch to connection default ----
prepare stmt11 from "SELECT * FROM t1 WHERE c1 = 1";
---- switch to connection con1 ----
prepare stmt12 from "SELECT * FROM t1 WHERE c1 = 1";
---- switch to connection default ----
SELECT * FROM t1 WHERE c1 = 1;
c1
1
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 11
SELECT * FROM t1 WHERE c1 = 1;
c1
1
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 12
execute stmt11;
c1
1
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 13
---- switch to connection con1 ----
execute stmt12;
c1
1
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 14
---- switch to connection default ----
prepare stmt1 from "select * from t1 where c1=?";
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 14
set @a=1;
execute stmt1 using @a;
c1
1
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 14
execute stmt1 using @a;
c1
1
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 14
---- switch to connection con1 ----
set @a=1;
prepare stmt4 from "select * from t1 where c1=?";
execute stmt4 using @a;
c1
1
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 14
---- switch to connection default ----
prepare stmt1 from "select * from t1 where c1=10";
set global query_cache_size=0;
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 14
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 14
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 14
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 14
---- switch to connection con1 ----
execute stmt3;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 14
execute stmt3;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 14
execute stmt3;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 14
---- switch to connection default ----
set global query_cache_size=100000;
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 14
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 15
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 16
---- switch to connection con1 ----
execute stmt3;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 17
execute stmt3;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 18
execute stmt3;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 19
---- switch to connection default ----
set global query_cache_size=0;
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 19
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 19
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 19
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 19
---- switch to connection con1 ----
execute stmt3;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 19
execute stmt3;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 19
execute stmt3;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 19
---- switch to connection default ----
set global query_cache_size=0;
prepare stmt1 from "select * from t1 where c1=10";
---- switch to connection con1 ----
prepare stmt3 from "select * from t1 where c1=10";
---- switch to connection default ----
set global query_cache_size=100000;
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 19
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 19
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 19
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 19
---- switch to connection con1 ----
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 19
execute stmt3;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 19
execute stmt3;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 19
execute stmt3;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 19
---- switch to connection default ----
set global query_cache_size=0;
prepare stmt1 from "select * from t1 where c1=?";
set global query_cache_size=100000;
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 19
set @a=1;
execute stmt1 using @a;
c1
1
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 19
set @a=100;
execute stmt1 using @a;
c1
100
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 19
set @a=10;
execute stmt1 using @a;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 19
drop table t1;
---- disconnect connection con1 ----
set @@global.query_cache_size=@initial_query_cache_size;
flush status;

View File

@ -0,0 +1,362 @@
---- establish connection con1 (root) ----
---- switch to connection default ----
set @initial_query_cache_size = @@global.query_cache_size;
set @@global.query_cache_size=100000;
flush status;
drop table if exists t1;
create table t1(c1 int);
insert into t1 values(1),(10),(100);
prepare stmt1 from "select * from t1 where c1=10";
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 0
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 0
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 1
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 2
prepare stmt2 from "select * from t1 where c1=10";
execute stmt2;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 3
execute stmt2;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 4
execute stmt2;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 5
---- switch to connection con1 ----
prepare stmt3 from "select * from t1 where c1=10";
execute stmt3;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 6
execute stmt3;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 7
execute stmt3;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 8
---- switch to connection default ----
prepare stmt10 from "SELECT * FROM t1 WHERE c1 = 100";
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 8
execute stmt10;
c1
100
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 8
execute stmt10;
c1
100
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 9
SELECT * FROM t1 WHERE c1 = 100;
c1
100
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 9
---- switch to connection con1 ----
SELECT * FROM t1 WHERE c1 = 100;
c1
100
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 10
---- switch to connection default ----
prepare stmt11 from "SELECT * FROM t1 WHERE c1 = 1";
---- switch to connection con1 ----
prepare stmt12 from "SELECT * FROM t1 WHERE c1 = 1";
---- switch to connection default ----
SELECT * FROM t1 WHERE c1 = 1;
c1
1
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 10
SELECT * FROM t1 WHERE c1 = 1;
c1
1
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 11
execute stmt11;
c1
1
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 11
---- switch to connection con1 ----
execute stmt12;
c1
1
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 12
---- switch to connection default ----
prepare stmt1 from "select * from t1 where c1=?";
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 12
set @a=1;
execute stmt1 using @a;
c1
1
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 12
execute stmt1 using @a;
c1
1
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 12
---- switch to connection con1 ----
set @a=1;
prepare stmt4 from "select * from t1 where c1=?";
execute stmt4 using @a;
c1
1
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 12
---- switch to connection default ----
prepare stmt1 from "select * from t1 where c1=10";
set global query_cache_size=0;
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 12
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 12
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 12
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 12
---- switch to connection con1 ----
execute stmt3;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 12
execute stmt3;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 12
execute stmt3;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 12
---- switch to connection default ----
set global query_cache_size=100000;
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 12
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 13
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 14
---- switch to connection con1 ----
execute stmt3;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 15
execute stmt3;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 16
execute stmt3;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 17
---- switch to connection default ----
set global query_cache_size=0;
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 17
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 17
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 17
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 17
---- switch to connection con1 ----
execute stmt3;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 17
execute stmt3;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 17
execute stmt3;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 17
---- switch to connection default ----
set global query_cache_size=0;
prepare stmt1 from "select * from t1 where c1=10";
---- switch to connection con1 ----
prepare stmt3 from "select * from t1 where c1=10";
---- switch to connection default ----
set global query_cache_size=100000;
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 17
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 17
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 17
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 17
---- switch to connection con1 ----
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 17
execute stmt3;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 17
execute stmt3;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 17
execute stmt3;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 17
---- switch to connection default ----
set global query_cache_size=0;
prepare stmt1 from "select * from t1 where c1=?";
set global query_cache_size=100000;
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 17
set @a=1;
execute stmt1 using @a;
c1
1
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 17
set @a=100;
execute stmt1 using @a;
c1
100
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 17
set @a=10;
execute stmt1 using @a;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 17
drop table t1;
---- disconnect connection con1 ----
set @@global.query_cache_size=@initial_query_cache_size;
flush status;

View File

@ -1,204 +0,0 @@
set global query_cache_size=100000;
flush status;
create table t1(c1 int);
insert into t1 values(1),(10),(100);
prepare stmt1 from "select * from t1 where c1=10";
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 0
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 0
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 1
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 2
prepare stmt2 from "select * from t1 where c1=10";
execute stmt2;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 3
execute stmt2;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 4
execute stmt2;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 5
prepare stmt3 from "select * from t1 where c1=10";
execute stmt3;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 6
execute stmt3;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 7
execute stmt3;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 8
select * from t1 where c1=10;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 9
flush tables;
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 9
select * from t1 where c1=10;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 10
prepare stmt1 from "select * from t1 where c1=?";
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 10
set @a=1;
execute stmt1 using @a;
c1
1
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 10
set @a=100;
execute stmt1 using @a;
c1
100
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 10
set @a=10;
execute stmt1 using @a;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 10
prepare stmt1 from "select * from t1 where c1=10";
set global query_cache_size=0;
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 10
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 10
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 10
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 10
set global query_cache_size=100000;
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 10
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 11
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 12
set global query_cache_size=0;
prepare stmt1 from "select * from t1 where c1=10";
set global query_cache_size=100000;
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 12
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 12
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 12
execute stmt1;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 12
set global query_cache_size=0;
prepare stmt1 from "select * from t1 where c1=?";
set global query_cache_size=100000;
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 12
set @a=1;
execute stmt1 using @a;
c1
1
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 12
set @a=100;
execute stmt1 using @a;
c1
100
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 12
set @a=10;
execute stmt1 using @a;
c1
10
show status like 'Qcache_hits';
Variable_name Value
Qcache_hits 12
drop table t1;
set global query_cache_size=0;
flush status;

View File

@ -31,7 +31,7 @@ Master_Host 127.0.0.1
Master_User root Master_User root
Master_Port MASTER_PORT Master_Port MASTER_PORT
Connect_Retry 1 Connect_Retry 1
Master_Log_File master-bin.000002 Master_Log_File #
Read_Master_Log_Pos # Read_Master_Log_Pos #
Relay_Log_File # Relay_Log_File #
Relay_Log_Pos # Relay_Log_Pos #
@ -74,7 +74,7 @@ Master_Host 127.0.0.1
Master_User root Master_User root
Master_Port MASTER_PORT Master_Port MASTER_PORT
Connect_Retry 1 Connect_Retry 1
Master_Log_File master-bin.000002 Master_Log_File #
Read_Master_Log_Pos # Read_Master_Log_Pos #
Relay_Log_File # Relay_Log_File #
Relay_Log_Pos # Relay_Log_Pos #
@ -104,4 +104,3 @@ Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No Master_SSL_Verify_Server_Cert No
DROP TABLE t1; DROP TABLE t1;
DROP TABLE t1;

View File

@ -86,3 +86,7 @@ ERROR 23000: Duplicate entry '2003-03-22' for key 'day'
drop table t2; drop table t2;
drop table t2; drop table t2;
drop table t1; drop table t1;
CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB;
LOAD DATA INFILE "../std_data_ln/words.dat" INTO TABLE t1;
ERROR 23000: Duplicate entry 'Aarhus' for key 'PRIMARY'
DROP TABLE IF EXISTS t1;

View File

@ -159,8 +159,8 @@ Replicate_Do_Table
Replicate_Ignore_Table <Replicate_Ignore_Table> Replicate_Ignore_Table <Replicate_Ignore_Table>
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 1105 Last_Errno <Last_Errno>
Last_Error Unknown error Last_Error <Last_Error>
Skip_Counter 0 Skip_Counter 0
Exec_Master_Log_Pos <Exec_Master_Log_Pos> Exec_Master_Log_Pos <Exec_Master_Log_Pos>
Relay_Log_Space <Relay_Log_Space> Relay_Log_Space <Relay_Log_Space>

View File

@ -190,6 +190,75 @@ DELIMITER ;
ROLLBACK /* added by mysqlbinlog */; ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
--- Test 4 Second Remote test --
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;
stop slave;
reset master;
reset slave;
start slave;
SELECT COUNT(*) from t1;
COUNT(*)
352
SELECT COUNT(*) from t2;
COUNT(*)
500
SELECT COUNT(*) from t3;
COUNT(*)
500
SELECT * FROM t1 ORDER BY word LIMIT 5;
word
Aarhus
Aarhus
Aarhus
Aarhus
Aarhus
SELECT * FROM t2 ORDER BY id LIMIT 5;
id
1
2
3
4
5
SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5;
c1 c3 c4 c5
1 2006-02-22 00:00:00 Tested in Texas 2.2
2 2006-02-22 00:00:00 Tested in Texas 4.4
3 2006-02-22 00:00:00 Tested in Texas 6.6
4 2006-02-22 00:00:00 Tested in Texas 8.8
5 2006-02-22 00:00:00 Tested in Texas 11
SELECT COUNT(*) from t1;
COUNT(*)
352
SELECT COUNT(*) from t2;
COUNT(*)
500
SELECT COUNT(*) from t3;
COUNT(*)
500
SELECT * FROM t1 ORDER BY word LIMIT 5;
word
Aarhus
Aarhus
Aarhus
Aarhus
Aarhus
SELECT * FROM t2 ORDER BY id LIMIT 5;
id
1
2
3
4
5
SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5;
c1 c3 c4 c5
1 2006-02-22 00:00:00 Tested in Texas 2.2
2 2006-02-22 00:00:00 Tested in Texas 4.4
3 2006-02-22 00:00:00 Tested in Texas 6.6
4 2006-02-22 00:00:00 Tested in Texas 8.8
5 2006-02-22 00:00:00 Tested in Texas 11
--- Test 5 LOAD DATA -- --- Test 5 LOAD DATA --
/*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
@ -273,4 +342,11 @@ HEX(f)
835C 835C
--- Test cleanup -- --- Test cleanup --
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a INT NOT NULL KEY, b INT);
INSERT INTO t1 VALUES(1,1);
SELECT * FROM t1;
a b
1 1
FLUSH LOGS;
DROP TABLE IF EXISTS t1, t2, t3, t04, t05, t4, t5; DROP TABLE IF EXISTS t1, t2, t3, t04, t05, t4, t5;

View File

@ -19,9 +19,41 @@ n
2 2
3 3
4 4
show slave status; SHOW SLAVE STATUS;;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Slave_IO_State #
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 744 slave-relay-bin.000004 # master-bin.000001 # No 0 0 315 # Master master-bin.000001 311 No # No Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_MYPORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 744
Relay_Log_File slave-relay-bin.000004
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
Slave_IO_Running #
Slave_SQL_Running No
Replicate_Do_DB
Replicate_Ignore_DB
Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 315
Relay_Log_Space #
Until_Condition Master
Until_Log_File master-bin.000001
Until_Log_Pos 311
Master_SSL_Allowed No
Master_SSL_CA_File
Master_SSL_CA_Path
Master_SSL_Cert
Master_SSL_Cipher
Master_SSL_Key
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291; start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291;
select * from t1; select * from t1;
n n
@ -29,23 +61,119 @@ n
2 2
3 3
4 4
show slave status; SHOW SLAVE STATUS;;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Slave_IO_State #
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 744 slave-relay-bin.000004 # master-bin.000001 # No 0 0 315 # Master master-no-such-bin.000001 291 No # No Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_MYPORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 744
Relay_Log_File slave-relay-bin.000004
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
Slave_IO_Running #
Slave_SQL_Running No
Replicate_Do_DB
Replicate_Ignore_DB
Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 315
Relay_Log_Space #
Until_Condition Master
Until_Log_File master-no-such-bin.000001
Until_Log_Pos 291
Master_SSL_Allowed No
Master_SSL_CA_File
Master_SSL_CA_Path
Master_SSL_Cert
Master_SSL_Cipher
Master_SSL_Key
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=728; start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=728;
select * from t2; select * from t2;
n n
1 1
2 2
show slave status; SHOW SLAVE STATUS;;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Slave_IO_State #
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 744 slave-relay-bin.000004 # master-bin.000001 # No 0 0 590 # Relay slave-relay-bin.000004 728 No # No Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_MYPORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 744
Relay_Log_File slave-relay-bin.000004
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
Slave_IO_Running #
Slave_SQL_Running No
Replicate_Do_DB
Replicate_Ignore_DB
Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 590
Relay_Log_Space #
Until_Condition Relay
Until_Log_File slave-relay-bin.000004
Until_Log_Pos 728
Master_SSL_Allowed No
Master_SSL_CA_File
Master_SSL_CA_Path
Master_SSL_Cert
Master_SSL_Cipher
Master_SSL_Key
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
start slave; start slave;
stop slave; stop slave;
start slave until master_log_file='master-bin.000001', master_log_pos=740; start slave until master_log_file='master-bin.000001', master_log_pos=740;
show slave status; SHOW SLAVE STATUS;;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Slave_IO_State #
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 744 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 744 # Master master-bin.000001 740 No # No Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_MYPORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 744
Relay_Log_File slave-relay-bin.000004
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
Slave_IO_Running Yes
Slave_SQL_Running No
Replicate_Do_DB
Replicate_Ignore_DB
Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 744
Relay_Log_Space #
Until_Condition Master
Until_Log_File master-bin.000001
Until_Log_Pos 740
Master_SSL_Allowed No
Master_SSL_CA_File
Master_SSL_CA_Path
Master_SSL_Cert
Master_SSL_Cipher
Master_SSL_Key
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
start slave until master_log_file='master-bin', master_log_pos=561; start slave until master_log_file='master-bin', master_log_pos=561;
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12; start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12;

View File

@ -1030,7 +1030,7 @@ select bug12329();
bug12329() bug12329()
101 101
execute stmt1; execute stmt1;
ERROR HY000: Table 't2' was not locked with LOCK TABLES ERROR 42S02: Table 'test.t2' doesn't exist
deallocate prepare stmt1; deallocate prepare stmt1;
drop function bug12329; drop function bug12329;
drop table t1, t2; drop table t1, t2;
@ -1152,12 +1152,12 @@ create trigger t1_ai after insert on t1 for each row insert into t2 values (new.
create view v1 as select * from t1; create view v1 as select * from t1;
drop table t2; drop table t2;
insert into v1 values (1); insert into v1 values (1);
ERROR HY000: Table 't2' was not locked with LOCK TABLES ERROR 42S02: Table 'test.t2' doesn't exist
drop trigger t1_ai; drop trigger t1_ai;
create function bug11555_1() returns int return (select max(i) from t2); create function bug11555_1() returns int return (select max(i) from t2);
create trigger t1_ai after insert on t1 for each row set @a:=bug11555_1(); create trigger t1_ai after insert on t1 for each row set @a:=bug11555_1();
insert into v1 values (2); insert into v1 values (2);
ERROR HY000: Table 't2' was not locked with LOCK TABLES ERROR 42S02: Table 'test.t2' doesn't exist
drop function bug11555_1; drop function bug11555_1;
drop table t1; drop table t1;
drop view v1; drop view v1;

View File

@ -254,4 +254,17 @@ execute stmt;
deallocate prepare stmt; deallocate prepare stmt;
drop function bug19634; drop function bug19634;
drop table t1, t2, t3; drop table t1, t2, t3;
drop table if exists bug_27907_logs;
drop table if exists bug_27907_t1;
create table bug_27907_logs (a int);
create table bug_27907_t1 (a int);
create trigger bug_27907_t1_ai after insert on bug_27907_t1
for each row
begin
insert into bug_27907_logs (a) values (1);
end|
drop table bug_27907_logs;
insert into bug_27907_t1(a) values (1);
ERROR 42S02: Table 'test.bug_27907_logs' doesn't exist
drop table bug_27907_t1;
End of 5.0 tests End of 5.0 tests

View File

@ -1202,3 +1202,29 @@ after substr str_remainder
after substr b,c after substr b,c
DROP PROCEDURE bug27415_text_test| DROP PROCEDURE bug27415_text_test|
DROP PROCEDURE bug27415_text_test2| DROP PROCEDURE bug27415_text_test2|
drop function if exists f1;
drop table if exists t1;
create function f1() returns int
begin
if @a=1 then set @b='abc';
else set @b=1;
end if;
set @a=1;
return 0;
end|
create table t1 (a int)|
insert into t1 (a) values (1), (2)|
set @b=1|
set @a=0|
select f1(), @b from t1|
f1() @b
0 1
0 0
set @b:='test'|
set @a=0|
select f1(), @b from t1|
f1() @b
0 1
0 abc
drop function f1;
drop table t1;

View File

@ -5617,6 +5617,23 @@ Called B
Called B Called B
drop procedure proc_21462_a| drop procedure proc_21462_a|
drop procedure proc_21462_b| drop procedure proc_21462_b|
drop table if exists t3|
drop procedure if exists proc_bug19733|
create table t3 (s1 int)|
create procedure proc_bug19733()
begin
declare v int default 0;
while v < 100 do
create index i on t3 (s1);
drop index i on t3;
set v = v + 1;
end while;
end|
call proc_bug19733()|
call proc_bug19733()|
call proc_bug19733()|
drop procedure proc_bug19733|
drop table t3|
DROP PROCEDURE IF EXISTS p1| DROP PROCEDURE IF EXISTS p1|
DROP VIEW IF EXISTS v1, v2| DROP VIEW IF EXISTS v1, v2|
DROP TABLE IF EXISTS t3, t4| DROP TABLE IF EXISTS t3, t4|
@ -6110,6 +6127,8 @@ select bug20777(9223372036854775810) as '9223372036854775810 2**63+2';
select bug20777(-9223372036854775808) as 'lower bounds signed bigint'; select bug20777(-9223372036854775808) as 'lower bounds signed bigint';
lower bounds signed bigint lower bounds signed bigint
0 0
Warnings:
Warning 1264 Out of range value for column 'f1' at row 1
select bug20777(9223372036854775807) as 'upper bounds signed bigint'; select bug20777(9223372036854775807) as 'upper bounds signed bigint';
upper bounds signed bigint upper bounds signed bigint
9223372036854775807 9223372036854775807
@ -6122,9 +6141,13 @@ upper bounds unsigned bigint
select bug20777(18446744073709551616) as 'upper bounds unsigned bigint + 1'; select bug20777(18446744073709551616) as 'upper bounds unsigned bigint + 1';
upper bounds unsigned bigint + 1 upper bounds unsigned bigint + 1
18446744073709551615 18446744073709551615
Warnings:
Warning 1264 Out of range value for column 'f1' at row 1
select bug20777(-1) as 'lower bounds unsigned bigint - 1'; select bug20777(-1) as 'lower bounds unsigned bigint - 1';
lower bounds unsigned bigint - 1 lower bounds unsigned bigint - 1
0 0
Warnings:
Warning 1264 Out of range value for column 'f1' at row 1
create table examplebug20777 as select create table examplebug20777 as select
0 as 'i', 0 as 'i',
bug20777(9223372036854775806) as '2**63-2', bug20777(9223372036854775806) as '2**63-2',
@ -6136,7 +6159,12 @@ bug20777(18446744073709551615) as '2**64-1',
bug20777(18446744073709551616) as '2**64', bug20777(18446744073709551616) as '2**64',
bug20777(0) as '0', bug20777(0) as '0',
bug20777(-1) as '-1'; bug20777(-1) as '-1';
Warnings:
Warning 1264 Out of range value for column 'f1' at row 1
Warning 1264 Out of range value for column 'f1' at row 1
insert into examplebug20777 values (1, 9223372036854775806, 9223372036854775807, 223372036854775808, 9223372036854775809, 18446744073709551614, 18446744073709551615, 8446744073709551616, 0, -1); insert into examplebug20777 values (1, 9223372036854775806, 9223372036854775807, 223372036854775808, 9223372036854775809, 18446744073709551614, 18446744073709551615, 8446744073709551616, 0, -1);
Warnings:
Warning 1264 Out of range value for column '-1' at row 1
show create table examplebug20777; show create table examplebug20777;
Table Create Table Table Create Table
examplebug20777 CREATE TABLE `examplebug20777` ( examplebug20777 CREATE TABLE `examplebug20777` (

View File

@ -475,9 +475,24 @@ set sql_mode=16384+(65536*4);
select @@sql_mode; select @@sql_mode;
@@sql_mode @@sql_mode
REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,NO_TABLE_OPTIONS,ANSI REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,NO_TABLE_OPTIONS,ANSI
set sql_mode=2147483648; set sql_mode=2147483648*2;
ERROR 42000: Variable 'sql_mode' can't be set to the value of '2147483648' ERROR 42000: Variable 'sql_mode' can't be set to the value of '4294967296'
select @@sql_mode; select @@sql_mode;
@@sql_mode @@sql_mode
REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,NO_TABLE_OPTIONS,ANSI REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,NO_TABLE_OPTIONS,ANSI
set sql_mode=PAD_CHAR_TO_FULL_LENGTH;
create table t1 (a int auto_increment primary key, b char(5));
insert into t1 (b) values('a'),('b\t'),('c ');
select concat('x',b,'x') from t1;
concat('x',b,'x')
xa x
xb x
xc x
set sql_mode=0;
select concat('x',b,'x') from t1;
concat('x',b,'x')
xax
xb x
xcx
drop table t1;
SET @@SQL_MODE=@OLD_SQL_MODE; SET @@SQL_MODE=@OLD_SQL_MODE;

View File

@ -820,9 +820,9 @@ call p1();
drop trigger t1_bi; drop trigger t1_bi;
create trigger t1_bi after insert on t1 for each row insert into t3 values (new.id); create trigger t1_bi after insert on t1 for each row insert into t3 values (new.id);
execute stmt1; execute stmt1;
ERROR HY000: Table 't3' was not locked with LOCK TABLES ERROR 42S02: Table 'test.t3' doesn't exist
call p1(); call p1();
ERROR HY000: Table 't3' was not locked with LOCK TABLES ERROR 42S02: Table 'test.t3' doesn't exist
deallocate prepare stmt1; deallocate prepare stmt1;
drop procedure p1; drop procedure p1;
drop table t1, t2, t3; drop table t1, t2, t3;

View File

@ -110,15 +110,24 @@ select 1 from t1 where cast('2000-01-01 12:01:01' as datetime) between start_dat
1 1
1 1
drop table t1; drop table t1;
select @d:=1111, year(@d), month(@d), day(@d), cast(@d as date); select @d:=1111;
@d:=1111 year(@d) month(@d) day(@d) cast(@d as date) @d:=1111
1111 2000 11 11 2000-11-11 1111
select @d:=011111, year(@d), month(@d), day(@d), cast(@d as date); select year(@d), month(@d), day(@d), cast(@d as date);
@d:=011111 year(@d) month(@d) day(@d) cast(@d as date) year(@d) month(@d) day(@d) cast(@d as date)
11111 2001 11 11 2001-11-11 2000 11 11 2000-11-11
select @d:=1311, year(@d), month(@d), day(@d), cast(@d as date); select @d:=011111;
@d:=1311 year(@d) month(@d) day(@d) cast(@d as date) @d:=011111
1311 NULL NULL NULL NULL 11111
select year(@d), month(@d), day(@d), cast(@d as date);
year(@d) month(@d) day(@d) cast(@d as date)
2001 11 11 2001-11-11
select @d:=1311;
@d:=1311
1311
select year(@d), month(@d), day(@d), cast(@d as date);
year(@d) month(@d) day(@d) cast(@d as date)
NULL NULL NULL NULL
Warnings: Warnings:
Warning 1292 Incorrect datetime value: '1311' Warning 1292 Incorrect datetime value: '1311'
Warning 1292 Incorrect datetime value: '1311' Warning 1292 Incorrect datetime value: '1311'

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