Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.1-new-rpl
into mysql.com:/nfsdisk1/lars/MERGE/mysql-5.1-merge mysql-test/t/func_misc.test: Auto merged sql/field.cc: Auto merged sql/item_create.cc: Auto merged sql/log_event.cc: Auto merged sql/log_event.h: Auto merged sql/mysqld.cc: Auto merged sql/sp_head.cc: Auto merged sql/sp_head.h: Auto merged sql/sql_base.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_insert.cc: Auto merged sql/sql_lex.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_update.cc: Auto merged sql/sql_view.cc: Auto merged strings/ctype-ujis.c: Auto merged
This commit is contained in:
commit
a53951c6a1
@ -489,6 +489,8 @@ dbug/main.r
|
||||
dbug/output*.r
|
||||
dbug/user.ps
|
||||
dbug/user.t
|
||||
debian/control
|
||||
debian/defs.mk
|
||||
depcomp
|
||||
emacs.h
|
||||
examples/*.ds?
|
||||
@ -1071,6 +1073,7 @@ libmysqld/ha_myisam.cc
|
||||
libmysqld/ha_myisammrg.cc
|
||||
libmysqld/ha_ndbcluster.cc
|
||||
libmysqld/ha_ndbcluster_binlog.cc
|
||||
libmysqld/ha_ndbcluster_cond.cc
|
||||
libmysqld/ha_partition.cc
|
||||
libmysqld/ha_tina.cc
|
||||
libmysqld/handler.cc
|
||||
@ -1274,7 +1277,6 @@ mysql-test/r/*.err
|
||||
mysql-test/r/*.log
|
||||
mysql-test/r/*.out
|
||||
mysql-test/r/*.reject
|
||||
mysql-test/r/*.warnings
|
||||
mysql-test/r/alter_table.err
|
||||
mysql-test/r/archive.err
|
||||
mysql-test/r/backup.log
|
||||
@ -2989,4 +2991,3 @@ win/vs71cache.txt
|
||||
win/vs8cache.txt
|
||||
zlib/*.ds?
|
||||
zlib/*.vcproj
|
||||
libmysqld/ha_ndbcluster_cond.cc
|
||||
|
@ -213,7 +213,7 @@ void completion_hash_clean(HashTable *ht)
|
||||
void completion_hash_free(HashTable *ht)
|
||||
{
|
||||
completion_hash_clean(ht);
|
||||
my_free((gptr) ht->arBuckets,MYF(0));
|
||||
my_free(ht->arBuckets, MYF(0));
|
||||
}
|
||||
|
||||
|
||||
|
@ -28,6 +28,6 @@ typedef struct st_line_buffer
|
||||
} LINE_BUFFER;
|
||||
|
||||
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 void batch_readline_end(LINE_BUFFER *buffer);
|
||||
|
128
client/mysql.cc
128
client/mysql.cc
@ -51,7 +51,7 @@ const char *VER= "14.13";
|
||||
/* Buffer to hold 'version' and 'version_comment' */
|
||||
#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);
|
||||
#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 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 my_string opt_mysql_unix_port=0;
|
||||
static char * opt_mysql_unix_port=0;
|
||||
static int connect_flag=CLIENT_INTERACTIVE;
|
||||
static char *current_host,*current_db,*current_user=0,*opt_password=0,
|
||||
*current_prompt=0, *delimiter_str= 0,
|
||||
@ -587,7 +587,7 @@ static struct my_option my_long_options[] =
|
||||
#endif
|
||||
{"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.",
|
||||
(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},
|
||||
{"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.",
|
||||
@ -595,42 +595,42 @@ static struct my_option my_long_options[] =
|
||||
{"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},
|
||||
{"character-sets-dir", OPT_CHARSETS_DIR,
|
||||
"Directory where character sets are.", (gptr*) &charsets_dir,
|
||||
(gptr*) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Directory where character sets are.", (uchar**) &charsets_dir,
|
||||
(uchar**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"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},
|
||||
{"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},
|
||||
|
||||
#ifdef DBUG_OFF
|
||||
{"debug", '#', "This is a non-debug version. Catch this and exit",
|
||||
0,0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#else
|
||||
{"debug", '#', "Output debug log", (gptr*) &default_dbug_option,
|
||||
(gptr*) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"debug", '#', "Output debug log", (uchar**) &default_dbug_option,
|
||||
(uchar**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"debug-info", 'T', "Print some debug info at exit.", (gptr*) &info_flag,
|
||||
(gptr*) &info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"database", 'D', "Database to use.", (gptr*) ¤t_db,
|
||||
(gptr*) ¤t_db, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"debug-info", 'T', "Print some debug info at exit.", (uchar**) &info_flag,
|
||||
(uchar**) &info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"database", 'D', "Database to use.", (uchar**) ¤t_db,
|
||||
(uchar**) ¤t_db, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"default-character-set", OPT_DEFAULT_CHARSET,
|
||||
"Set the default character set.", (gptr*) &default_charset,
|
||||
(gptr*) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"delimiter", OPT_DELIMITER, "Delimiter to be used.", (gptr*) &delimiter_str,
|
||||
(gptr*) &delimiter_str, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Set the default character set.", (uchar**) &default_charset,
|
||||
(uchar**) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"delimiter", OPT_DELIMITER, "Delimiter to be used.", (uchar**) &delimiter_str,
|
||||
(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,
|
||||
0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"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},
|
||||
{"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},
|
||||
{"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.",
|
||||
(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},
|
||||
{"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.",
|
||||
@ -638,25 +638,25 @@ static struct my_option my_long_options[] =
|
||||
{"ignore-spaces", 'i', "Ignore space after function names.", 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.",
|
||||
(gptr*) &opt_local_infile,
|
||||
(gptr*) &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,
|
||||
(gptr*) &opt_nobeep, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"host", 'h', "Connect to host.", (gptr*) ¤t_host,
|
||||
(gptr*) ¤t_host, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"html", 'H', "Produce HTML output.", (gptr*) &opt_html, (gptr*) &opt_html,
|
||||
(uchar**) &opt_local_infile,
|
||||
(uchar**) &opt_local_infile, 0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"no-beep", 'b', "Turn off beep on error.", (uchar**) &opt_nobeep,
|
||||
(uchar**) &opt_nobeep, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"host", 'h', "Connect to host.", (uchar**) ¤t_host,
|
||||
(uchar**) ¤t_host, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"html", 'H', "Produce HTML output.", (uchar**) &opt_html, (uchar**) &opt_html,
|
||||
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},
|
||||
{"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},
|
||||
{"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},
|
||||
{"unbuffered", 'n', "Flush buffer after each query.", (gptr*) &unbuffered,
|
||||
(gptr*) &unbuffered, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"unbuffered", 'n', "Flush buffer after each query.", (uchar**) &unbuffered,
|
||||
(uchar**) &unbuffered, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"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},
|
||||
{"skip-column-names", 'N',
|
||||
"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.",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"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},
|
||||
{"one-database", 'o',
|
||||
"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,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"port", 'P', "Port number to use for connection.", (gptr*) &opt_mysql_port,
|
||||
(gptr*) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
|
||||
{"port", 'P', "Port number to use for connection.", (uchar**) &opt_mysql_port,
|
||||
(uchar**) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
|
||||
0},
|
||||
{"prompt", OPT_PROMPT, "Set the mysql prompt to this value.",
|
||||
(gptr*) ¤t_prompt, (gptr*) ¤t_prompt, 0, GET_STR_ALLOC,
|
||||
(uchar**) ¤t_prompt, (uchar**) ¤t_prompt, 0, GET_STR_ALLOC,
|
||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"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},
|
||||
{"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.",
|
||||
(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.",
|
||||
(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},
|
||||
{"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,
|
||||
0, 0},
|
||||
#ifdef HAVE_SMEM
|
||||
{"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},
|
||||
#endif
|
||||
{"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},
|
||||
#include "sslopt-longopts.h"
|
||||
{"table", 't', "Output in table format.", (gptr*) &output_tables,
|
||||
(gptr*) &output_tables, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"table", 't', "Output in table format.", (uchar**) &output_tables,
|
||||
(uchar**) &output_tables, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"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.",
|
||||
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_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#ifndef DONT_ALLOW_USER_CHANGE
|
||||
{"user", 'u', "User for login if not current user.", (gptr*) ¤t_user,
|
||||
(gptr*) ¤t_user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"user", 'u', "User for login if not current user.", (uchar**) ¤t_user,
|
||||
(uchar**) ¤t_user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"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},
|
||||
{"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},
|
||||
{"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},
|
||||
@ -737,32 +737,32 @@ static struct my_option my_long_options[] =
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"connect_timeout", OPT_CONNECT_TIMEOUT,
|
||||
"Number of seconds before connection timeout.",
|
||||
(gptr*) &opt_connect_timeout,
|
||||
(gptr*) &opt_connect_timeout, 0, GET_ULONG, REQUIRED_ARG, 0, 0, 3600*12, 0,
|
||||
(uchar**) &opt_connect_timeout,
|
||||
(uchar**) &opt_connect_timeout, 0, GET_ULONG, REQUIRED_ARG, 0, 0, 3600*12, 0,
|
||||
0, 0},
|
||||
{"max_allowed_packet", OPT_MAX_ALLOWED_PACKET,
|
||||
"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,
|
||||
MALLOC_OVERHEAD, 1024, 0},
|
||||
{"net_buffer_length", OPT_NET_BUFFER_LENGTH,
|
||||
"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},
|
||||
{"select_limit", OPT_SELECT_LIMIT,
|
||||
"Automatic limit for SELECT when using --safe-updates",
|
||||
(gptr*) &select_limit,
|
||||
(gptr*) &select_limit, 0, GET_ULONG, REQUIRED_ARG, 1000L, 1, ~0L, 0, 1, 0},
|
||||
(uchar**) &select_limit,
|
||||
(uchar**) &select_limit, 0, GET_ULONG, REQUIRED_ARG, 1000L, 1, ~0L, 0, 1, 0},
|
||||
{"max_join_size", OPT_MAX_JOIN_SIZE,
|
||||
"Automatic limit for rows in a join when using --safe-updates",
|
||||
(gptr*) &max_join_size,
|
||||
(gptr*) &max_join_size, 0, GET_ULONG, REQUIRED_ARG, 1000000L, 1, ~0L, 0, 1,
|
||||
(uchar**) &max_join_size,
|
||||
(uchar**) &max_join_size, 0, GET_ULONG, REQUIRED_ARG, 1000000L, 1, ~0L, 0, 1,
|
||||
0},
|
||||
{"secure-auth", OPT_SECURE_AUTH, "Refuse client connecting to server if it"
|
||||
" uses old (pre-4.1.1) protocol", (gptr*) &opt_secure_auth,
|
||||
(gptr*) &opt_secure_auth, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
" uses old (pre-4.1.1) protocol", (uchar**) &opt_secure_auth,
|
||||
(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.",
|
||||
(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, 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.length(0);
|
||||
buffer.length(0);
|
||||
unsigned long clen;
|
||||
size_t clen;
|
||||
do
|
||||
{
|
||||
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);
|
||||
}
|
||||
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)
|
||||
goto err;
|
||||
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));
|
||||
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));
|
||||
|
||||
if (!(editor = (char *)getenv("EDITOR")) &&
|
||||
@ -3893,13 +3893,13 @@ static int com_prompt(String *buffer, char *line)
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
/* Keep sql_string library happy */
|
||||
|
||||
gptr sql_alloc(unsigned int Size)
|
||||
void *sql_alloc(size_t Size)
|
||||
{
|
||||
return my_malloc(Size,MYF(MY_WME));
|
||||
}
|
||||
|
||||
void sql_element_free(void *ptr)
|
||||
{
|
||||
my_free((gptr) ptr,MYF(0));
|
||||
my_free(ptr,MYF(0));
|
||||
}
|
||||
#endif /* EMBEDDED_LIBRARY */
|
||||
|
@ -63,8 +63,8 @@ static struct my_option my_long_options[]=
|
||||
{"debug", '#', "This is a non-debug version. Catch this and exit",
|
||||
0, 0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#else
|
||||
{"debug", '#', "Output debug log", (gptr *) & default_dbug_option,
|
||||
(gptr *) & default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"debug", '#', "Output debug log", (uchar* *) & default_dbug_option,
|
||||
(uchar* *) & default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"default-character-set", OPT_DEFAULT_CHARSET,
|
||||
"Set the default character set.", 0,
|
||||
@ -73,16 +73,16 @@ static struct my_option my_long_options[]=
|
||||
"Directory where character sets are.", 0,
|
||||
0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"compress", OPT_COMPRESS, "Use compression in server/client protocol.",
|
||||
(gptr*)¬_used, (gptr*)¬_used, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
(uchar**)¬_used, (uchar**)¬_used, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"force", 'f', "Force execution of mysqlcheck even if mysql_upgrade "
|
||||
"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},
|
||||
{"host",'h', "Connect to host.", 0,
|
||||
0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"password", 'p',
|
||||
"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},
|
||||
#ifdef __WIN__
|
||||
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0,
|
||||
@ -100,11 +100,11 @@ static struct my_option my_long_options[]=
|
||||
#endif
|
||||
{"socket", 'S', "Socket file to use for connection.",
|
||||
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,
|
||||
(gptr*) &opt_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"user", 'u', "User for login if not current user.", (uchar**) &opt_user,
|
||||
(uchar**) &opt_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#include <sslopt-longopts.h>
|
||||
{"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},
|
||||
{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
|
||||
{
|
||||
size_t path_len;
|
||||
DBUG_PRINT("enter", ("path: %s", path));
|
||||
|
||||
/* Chop off last char(since it might be a /) */
|
||||
path[max((strlen(path)-1), 0)]= 0;
|
||||
|
||||
/* Chop off last dir part */
|
||||
dirname_part(path, path);
|
||||
dirname_part(path, path, &path_len);
|
||||
|
||||
/* Format name of the tool to search for */
|
||||
fn_format(tool_path, tool_name,
|
||||
|
@ -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,
|
||||
opt_count_iterations= 0;
|
||||
static ulong opt_connect_timeout, opt_shutdown_timeout;
|
||||
static my_string unix_port=0;
|
||||
static char * unix_port=0;
|
||||
#ifdef LATER_HAVE_NDBCLUSTER_DB
|
||||
static my_bool opt_ndbcluster=0;
|
||||
static char *opt_ndb_connectstring=0;
|
||||
@ -132,31 +132,31 @@ static struct my_option my_long_options[] =
|
||||
#endif
|
||||
{"count", 'c',
|
||||
"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},
|
||||
{"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.",
|
||||
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,
|
||||
(gptr*) &info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.", (uchar**) &info_flag,
|
||||
(uchar**) &info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"force", 'f',
|
||||
"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},
|
||||
{"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},
|
||||
{"character-sets-dir", OPT_CHARSETS_DIR,
|
||||
"Directory where character sets are.", (gptr*) &charsets_dir,
|
||||
(gptr*) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Directory where character sets are.", (uchar**) &charsets_dir,
|
||||
(uchar**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"default-character-set", OPT_DEFAULT_CHARSET,
|
||||
"Set the default character set.", (gptr*) &default_charset,
|
||||
(gptr*) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Set the default character set.", (uchar**) &default_charset,
|
||||
(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,
|
||||
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},
|
||||
{"no-beep", 'b', "Turn off beep on error.", (gptr*) &opt_nobeep,
|
||||
(gptr*) &opt_nobeep, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"no-beep", 'b', "Turn off beep on error.", (uchar**) &opt_nobeep,
|
||||
(uchar**) &opt_nobeep, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"password", 'p',
|
||||
"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},
|
||||
@ -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,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"port", 'P', "Port number to use for connection.", (gptr*) &tcp_port,
|
||||
(gptr*) &tcp_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"port", 'P', "Port number to use for connection.", (uchar**) &tcp_port,
|
||||
(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).",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"relative", 'r',
|
||||
"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},
|
||||
{"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.",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#ifdef HAVE_SMEM
|
||||
{"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},
|
||||
#endif
|
||||
{"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},
|
||||
{"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},
|
||||
{"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},
|
||||
#include <sslopt-longopts.h>
|
||||
#ifndef DONT_ALLOW_USER_CHANGE
|
||||
{"user", 'u', "User for login if not current user.", (gptr*) &user,
|
||||
(gptr*) &user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"user", 'u', "User for login if not current user.", (uchar**) &user,
|
||||
(uchar**) &user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"verbose", 'v', "Write more information.", (gptr*) &opt_verbose,
|
||||
(gptr*) &opt_verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"verbose", 'v', "Write more information.", (uchar**) &opt_verbose,
|
||||
(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,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"vertical", 'E',
|
||||
"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},
|
||||
{"wait", 'w', "Wait and retry if connection is down.", 0, 0, 0, GET_UINT,
|
||||
OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"connect_timeout", OPT_CONNECT_TIMEOUT, "", (gptr*) &opt_connect_timeout,
|
||||
(gptr*) &opt_connect_timeout, 0, GET_ULONG, REQUIRED_ARG, 3600*12, 0,
|
||||
{"connect_timeout", OPT_CONNECT_TIMEOUT, "", (uchar**) &opt_connect_timeout,
|
||||
(uchar**) &opt_connect_timeout, 0, GET_ULONG, REQUIRED_ARG, 3600*12, 0,
|
||||
3600*12, 0, 1, 0},
|
||||
{"shutdown_timeout", OPT_SHUTDOWN_TIMEOUT, "", (gptr*) &opt_shutdown_timeout,
|
||||
(gptr*) &opt_shutdown_timeout, 0, GET_ULONG, REQUIRED_ARG,
|
||||
{"shutdown_timeout", OPT_SHUTDOWN_TIMEOUT, "", (uchar**) &opt_shutdown_timeout,
|
||||
(uchar**) &opt_shutdown_timeout, 0, GET_ULONG, REQUIRED_ARG,
|
||||
SHUTDOWN_DEF_TIMEOUT, 0, 3600*12, 0, 1, 0},
|
||||
#ifdef LATER_HAVE_NDBCLUSTER_DB
|
||||
{"ndbcluster", OPT_NDBCLUSTER, ""
|
||||
"", (gptr*) &opt_ndbcluster,
|
||||
(gptr*) &opt_ndbcluster, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"", (uchar**) &opt_ndbcluster,
|
||||
(uchar**) &opt_ndbcluster, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"ndb-connectstring", OPT_NDB_CONNECTSTRING, ""
|
||||
"", (gptr*) &opt_ndb_connectstring,
|
||||
(gptr*) &opt_ndb_connectstring, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"", (uchar**) &opt_ndb_connectstring,
|
||||
(uchar**) &opt_ndb_connectstring, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
||||
};
|
||||
|
@ -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,
|
||||
uint server_fname_len, File file)
|
||||
{
|
||||
char buf[FN_REFLEN+1];
|
||||
uchar buf[FN_REFLEN+1];
|
||||
buf[0] = 0;
|
||||
memcpy(buf + 1, server_fname, server_fname_len + 1);
|
||||
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);
|
||||
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");
|
||||
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");
|
||||
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)))
|
||||
return -1;
|
||||
}
|
||||
@ -379,7 +379,7 @@ int Load_log_processor::process_first_event(const char *bname, uint blen,
|
||||
File_name_record rec;
|
||||
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);
|
||||
|
||||
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.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",
|
||||
target_dir_name, bname);
|
||||
@ -408,7 +408,7 @@ int Load_log_processor::process_first_event(const char *bname, uint blen,
|
||||
if (ce)
|
||||
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;
|
||||
if (my_close(file, MYF(MY_WME)))
|
||||
error= -1;
|
||||
@ -447,7 +447,7 @@ int Load_log_processor::process(Append_block_log_event *ae)
|
||||
if (((file= my_open(fname,
|
||||
O_APPEND|O_BINARY|O_WRONLY,MYF(MY_WME))) < 0))
|
||||
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;
|
||||
if (my_close(file,MYF(MY_WME)))
|
||||
error= -1;
|
||||
@ -709,7 +709,7 @@ static struct my_option my_long_options[] =
|
||||
"Print all binlog entries using base64 encoding. "
|
||||
"This is for debugging only. Logs produced using this option "
|
||||
"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},
|
||||
/*
|
||||
mysqlbinlog needs charsets knowledge, to be able to convert a charset
|
||||
@ -718,47 +718,47 @@ static struct my_option my_long_options[] =
|
||||
SET @`a`:=_cp850 0x4DFC6C6C6572 COLLATE `cp850_general_ci`;
|
||||
*/
|
||||
{"character-sets-dir", OPT_CHARSETS_DIR,
|
||||
"Directory where character sets are.", (gptr*) &charsets_dir,
|
||||
(gptr*) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Directory where character sets are.", (uchar**) &charsets_dir,
|
||||
(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).",
|
||||
(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},
|
||||
#ifndef DBUG_OFF
|
||||
{"debug", '#', "Output debug log.", (gptr*) &default_dbug_option,
|
||||
(gptr*) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"debug", '#', "Output debug log.", (uchar**) &default_dbug_option,
|
||||
(uchar**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.", (gptr*) &info_flag,
|
||||
(gptr*) &info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.", (uchar**) &info_flag,
|
||||
(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 "
|
||||
"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 "
|
||||
"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.",
|
||||
(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},
|
||||
{"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},
|
||||
{"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},
|
||||
{"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},
|
||||
{"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},
|
||||
{"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},
|
||||
{"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},
|
||||
{"password", 'p', "Password to connect to remote server.",
|
||||
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"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},
|
||||
{"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,
|
||||
/* COM_BINLOG_DUMP accepts only 4 bytes for the position */
|
||||
(ulonglong)(~(uint32)0), 0, 0, 0},
|
||||
@ -766,22 +766,22 @@ static struct my_option my_long_options[] =
|
||||
"The protocol of connection (tcp,socket,pipe,memory).",
|
||||
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",
|
||||
(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},
|
||||
{"result-file", 'r', "Direct output to a given file.", 0, 0, 0, GET_STR,
|
||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"server-id", OPT_SERVER_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},
|
||||
{"set-charset", OPT_SET_CHARSET,
|
||||
"Add 'SET NAMES character_set' to the output.", (gptr*) &charset,
|
||||
(gptr*) &charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Add 'SET NAMES character_set' to the output.", (uchar**) &charset,
|
||||
(uchar**) &charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"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},
|
||||
{"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},
|
||||
{"start-datetime", OPT_START_DATETIME,
|
||||
"Start reading the binlog at first event having a datetime equal or "
|
||||
@ -789,12 +789,12 @@ static struct my_option my_long_options[] =
|
||||
"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 "
|
||||
"(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},
|
||||
{"start-position", OPT_START_POSITION,
|
||||
"Start reading the binlog at position N. Applies to the first binlog "
|
||||
"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,
|
||||
/* COM_BINLOG_DUMP accepts only 4 bytes for the position */
|
||||
(ulonglong)(~(uint32)0), 0, 0, 0},
|
||||
@ -804,28 +804,28 @@ static struct my_option my_long_options[] =
|
||||
"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 "
|
||||
"(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},
|
||||
{"stop-position", OPT_STOP_POSITION,
|
||||
"Stop reading the binlog at position N. Applies to the last binlog "
|
||||
"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,
|
||||
(ulonglong)(~(my_off_t)0), 0, 0, 0},
|
||||
{"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 \
|
||||
binlog of the MySQL server. If you send the output to the same MySQL server, \
|
||||
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},
|
||||
{"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},
|
||||
{"version", 'V', "Print version and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0,
|
||||
0, 0, 0, 0, 0},
|
||||
{"open_files_limit", OPT_OPEN_FILES_LIMIT,
|
||||
"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},
|
||||
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
||||
};
|
||||
@ -1103,7 +1103,7 @@ static int dump_remote_log_entries(PRINT_EVENT_INFO *print_event_info,
|
||||
const char* logname)
|
||||
|
||||
{
|
||||
char buf[128];
|
||||
uchar buf[128];
|
||||
ulong len;
|
||||
uint logname_len;
|
||||
NET* net;
|
||||
@ -1139,7 +1139,7 @@ could be out of memory");
|
||||
int4store(buf, (uint32)start_position);
|
||||
int2store(buf + BIN_LOG_HEADER_SIZE, binlog_flags);
|
||||
|
||||
size_s tlen = strlen(logname);
|
||||
size_t tlen = strlen(logname);
|
||||
if (tlen > UINT_MAX)
|
||||
{
|
||||
fprintf(stderr,"Log name too long\n");
|
||||
@ -1293,8 +1293,8 @@ err:
|
||||
static void check_header(IO_CACHE* file,
|
||||
Format_description_log_event **description_event)
|
||||
{
|
||||
byte header[BIN_LOG_HEADER_SIZE];
|
||||
byte buf[PROBE_HEADER_LEN];
|
||||
uchar header[BIN_LOG_HEADER_SIZE];
|
||||
uchar buf[PROBE_HEADER_LEN];
|
||||
my_off_t tmp_pos, pos;
|
||||
|
||||
*description_event= new Format_description_log_event(3);
|
||||
@ -1394,7 +1394,7 @@ static int dump_local_log_entries(PRINT_EVENT_INFO *print_event_info,
|
||||
{
|
||||
File fd = -1;
|
||||
IO_CACHE cache,*file= &cache;
|
||||
byte tmp_buff[BIN_LOG_HEADER_SIZE];
|
||||
uchar tmp_buff[BIN_LOG_HEADER_SIZE];
|
||||
int error= 0;
|
||||
|
||||
if (logname && logname[0] != '-')
|
||||
@ -1433,7 +1433,7 @@ static int dump_local_log_entries(PRINT_EVENT_INFO *print_event_info,
|
||||
if (start_position)
|
||||
{
|
||||
/* skip 'start_position' characters from stdin */
|
||||
byte buff[IO_SIZE];
|
||||
uchar buff[IO_SIZE];
|
||||
my_off_t length,tmp;
|
||||
for (length= start_position_mot ; length > 0 ; length-=tmp)
|
||||
{
|
||||
|
@ -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_write_binlog= 1;
|
||||
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,
|
||||
*default_charset = (char *)MYSQL_DEFAULT_CHARSET_NAME,
|
||||
*current_host = 0;
|
||||
@ -55,13 +55,13 @@ static struct my_option my_long_options[] =
|
||||
{
|
||||
{"all-databases", 'A',
|
||||
"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},
|
||||
{"analyze", 'a', "Analyze given tables.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0,
|
||||
0, 0, 0, 0},
|
||||
{"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.",
|
||||
(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},
|
||||
#ifdef __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
|
||||
{"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.",
|
||||
(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},
|
||||
{"character-sets-dir", OPT_CHARSETS_DIR,
|
||||
"Directory where character sets are.", (gptr*) &charsets_dir,
|
||||
(gptr*) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Directory where character sets are.", (uchar**) &charsets_dir,
|
||||
(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,
|
||||
0, 0, 0, 0},
|
||||
{"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.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"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},
|
||||
{"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.",
|
||||
(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},
|
||||
#ifdef DBUG_OFF
|
||||
{"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'.",
|
||||
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.", (gptr*) &info_flag,
|
||||
(gptr*) &info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.", (uchar**) &info_flag,
|
||||
(uchar**) &info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"default-character-set", OPT_DEFAULT_CHARSET,
|
||||
"Set the default character set.", (gptr*) &default_charset,
|
||||
(gptr*) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Set the default character set.", (uchar**) &default_charset,
|
||||
(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.",
|
||||
(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},
|
||||
{"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},
|
||||
{"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},
|
||||
{"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},
|
||||
{"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.",
|
||||
(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},
|
||||
{"help", '?', "Display this help message and exit.", 0, 0, 0, GET_NO_ARG,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"host",'h', "Connect to host.", (gptr*) ¤t_host,
|
||||
(gptr*) ¤t_host, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"host",'h', "Connect to host.", (uchar**) ¤t_host,
|
||||
(uchar**) ¤t_host, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"medium-check", 'm',
|
||||
"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},
|
||||
{"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.",
|
||||
(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},
|
||||
{"optimize", 'o', "Optimize table.", 0, 0, 0, GET_NO_ARG, NO_ARG, 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,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"port", 'P', "Port number to use for connection.", (gptr*) &opt_mysql_port,
|
||||
(gptr*) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
|
||||
{"port", 'P', "Port number to use for connection.", (uchar**) &opt_mysql_port,
|
||||
(uchar**) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
|
||||
0},
|
||||
{"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},
|
||||
{"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.",
|
||||
(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},
|
||||
{"repair", 'r',
|
||||
"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},
|
||||
#ifdef HAVE_SMEM
|
||||
{"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},
|
||||
#endif
|
||||
{"silent", 's', "Print only error messages.", (gptr*) &opt_silent,
|
||||
(gptr*) &opt_silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"silent", 's', "Print only error messages.", (uchar**) &opt_silent,
|
||||
(uchar**) &opt_silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"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},
|
||||
#include <sslopt-longopts.h>
|
||||
{"tables", OPT_TABLES, "Overrides option --databases (-B).", 0, 0, 0,
|
||||
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"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.",
|
||||
(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},
|
||||
#ifndef DONT_ALLOW_USER_CHANGE
|
||||
{"user", 'u', "User for login if not current user.", (gptr*) ¤t_user,
|
||||
(gptr*) ¤t_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"user", 'u', "User for login if not current user.", (uchar**) ¤t_user,
|
||||
(uchar**) ¤t_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"verbose", 'v', "Print info about the various stages.", 0, 0, 0, GET_NO_ARG,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
|
@ -117,7 +117,7 @@ static ulong opt_compatible_mode= 0;
|
||||
#define MYSQL_OPT_MASTER_DATA_EFFECTIVE_SQL 1
|
||||
#define MYSQL_OPT_MASTER_DATA_COMMENTED_SQL 2
|
||||
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 DYNAMIC_STRING extended_row;
|
||||
#include <sslopt-vars.h>
|
||||
@ -177,106 +177,106 @@ HASH ignore_table;
|
||||
static struct my_option my_long_options[] =
|
||||
{
|
||||
{"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},
|
||||
{"all-databases", 'A',
|
||||
"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},
|
||||
{"all-tablespaces", 'Y',
|
||||
"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},
|
||||
{"no-tablespaces", 'y',
|
||||
"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},
|
||||
{"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},
|
||||
{"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},
|
||||
{"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},
|
||||
{"allow-keywords", OPT_KEYWORDS,
|
||||
"Allow creation of column names that are keywords.", (gptr*) &opt_keywords,
|
||||
(gptr*) &opt_keywords, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Allow creation of column names that are keywords.", (uchar**) &opt_keywords,
|
||||
(uchar**) &opt_keywords, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#ifdef __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},
|
||||
#endif
|
||||
{"character-sets-dir", OPT_CHARSETS_DIR,
|
||||
"Directory where character sets are.", (gptr*) &charsets_dir,
|
||||
(gptr*) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Directory where character sets are.", (uchar**) &charsets_dir,
|
||||
(uchar**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"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},
|
||||
{"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.",
|
||||
(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},
|
||||
{"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",
|
||||
(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},
|
||||
{"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},
|
||||
{"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},
|
||||
{"create-options", OPT_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},
|
||||
{"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.",
|
||||
(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},
|
||||
#ifdef DBUG_OFF
|
||||
{"debug", '#', "This is a non-debug version. Catch this and exit",
|
||||
0,0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#else
|
||||
{"debug", '#', "Output debug log", (gptr*) &default_dbug_option,
|
||||
(gptr*) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"debug", '#', "Output debug log", (uchar**) &default_dbug_option,
|
||||
(uchar**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.", (gptr*) &info_flag,
|
||||
(gptr*) &info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.", (uchar**) &info_flag,
|
||||
(uchar**) &info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"default-character-set", OPT_DEFAULT_CHARSET,
|
||||
"Set the default character set.", (gptr*) &default_charset,
|
||||
(gptr*) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Set the default character set.", (uchar**) &default_charset,
|
||||
(uchar**) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"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},
|
||||
{"delete-master-logs", OPT_DELETE_MASTER_LOGS,
|
||||
"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},
|
||||
{"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,
|
||||
(gptr*) &opt_disable_keys, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||
"'/*!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,
|
||||
(uchar**) &opt_disable_keys, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||
{"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},
|
||||
{"extended-insert", 'e',
|
||||
"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},
|
||||
{"fields-terminated-by", OPT_FTB,
|
||||
"Fields in the textfile are terminated by ...", (gptr*) &fields_terminated,
|
||||
(gptr*) &fields_terminated, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Fields in the textfile are terminated by ...", (uchar**) &fields_terminated,
|
||||
(uchar**) &fields_terminated, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"fields-enclosed-by", OPT_ENC,
|
||||
"Fields in the importfile are enclosed by ...", (gptr*) &enclosed,
|
||||
(gptr*) &enclosed, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0 ,0, 0},
|
||||
"Fields in the importfile are enclosed by ...", (uchar**) &enclosed,
|
||||
(uchar**) &enclosed, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0 ,0, 0},
|
||||
{"fields-optionally-enclosed-by", OPT_O_ENC,
|
||||
"Fields in the i.file are opt. enclosed by ...", (gptr*) &opt_enclosed,
|
||||
(gptr*) &opt_enclosed, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0 ,0, 0},
|
||||
"Fields in the i.file are opt. enclosed by ...", (uchar**) &opt_enclosed,
|
||||
(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 ...",
|
||||
(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.",
|
||||
(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},
|
||||
{"flush-logs", 'F', "Flush logs file in server before starting dump. "
|
||||
"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 "
|
||||
"the log flush to happen at the same exact moment you should use "
|
||||
"--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},
|
||||
{"flush-privileges", OPT_ESC, "Emit a FLUSH PRIVILEGES statement "
|
||||
"after dumping the mysql database. This option should be used any "
|
||||
"time the dump contains the mysql database and any other database "
|
||||
"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},
|
||||
{"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},
|
||||
{"help", '?', "Display this help message and exit.", 0, 0, 0, GET_NO_ARG,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"hex-blob", OPT_HEXBLOB, "Dump binary strings (BINARY, "
|
||||
"VARBINARY, BLOB) in hexadecimal format.",
|
||||
(gptr*) &opt_hex_blob, (gptr*) &opt_hex_blob, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"host", 'h', "Connect to host.", (gptr*) ¤t_host,
|
||||
(gptr*) ¤t_host, 0, GET_STR_ALLOC, REQUIRED_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.", (uchar**) ¤t_host,
|
||||
(uchar**) ¤t_host, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"ignore-table", OPT_IGNORE_TABLE,
|
||||
"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 "
|
||||
"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},
|
||||
{"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},
|
||||
{"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},
|
||||
{"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 "
|
||||
"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},
|
||||
{"lock-tables", 'l', "Lock all tables for read.", (gptr*) &lock_tables,
|
||||
(gptr*) &lock_tables, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||
{"lock-tables", 'l', "Lock all tables for read.", (uchar**) &lock_tables,
|
||||
(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.",
|
||||
(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},
|
||||
{"master-data", OPT_MASTER_DATA,
|
||||
"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 "
|
||||
"any action on logs will happen at the exact moment of the dump."
|
||||
"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},
|
||||
{"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,
|
||||
(longlong) 2L*1024L*1024L*1024L, MALLOC_OVERHEAD, 1024, 0},
|
||||
{"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,
|
||||
MALLOC_OVERHEAD-1024, 1024, 0},
|
||||
{"no-autocommit", OPT_AUTOCOMMIT,
|
||||
"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},
|
||||
{"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.}.",
|
||||
(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},
|
||||
{"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-data", 'd', "No row information.", (gptr*) &opt_no_data,
|
||||
(gptr*) &opt_no_data, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"no-data", 'd', "No row information.", (uchar**) &opt_no_data,
|
||||
(uchar**) &opt_no_data, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"no-set-names", 'N',
|
||||
"Deprecated. Use --skip-set-charset instead.",
|
||||
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},
|
||||
{"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.",
|
||||
(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 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},
|
||||
@ -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,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"port", 'P', "Port number to use for connection.", (gptr*) &opt_mysql_port,
|
||||
(gptr*) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
|
||||
{"port", 'P', "Port number to use for connection.", (uchar**) &opt_mysql_port,
|
||||
(uchar**) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
|
||||
0},
|
||||
{"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},
|
||||
{"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 (`).",
|
||||
(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},
|
||||
{"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},
|
||||
{"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).",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"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},
|
||||
{"set-charset", OPT_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},
|
||||
{"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.",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#ifdef HAVE_SMEM
|
||||
{"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},
|
||||
#endif
|
||||
/*
|
||||
@ -417,37 +417,37 @@ static struct my_option my_long_options[] =
|
||||
"support multiversioning (currently only InnoDB does); the dump is NOT "
|
||||
"guaranteed to be consistent for other storage engines. Option "
|
||||
"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},
|
||||
{"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.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"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},
|
||||
#include <sslopt-longopts.h>
|
||||
{"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.",
|
||||
(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).",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"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},
|
||||
{"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.",
|
||||
(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
|
||||
{"user", 'u', "User for login if not current user.",
|
||||
(gptr*) ¤t_user, (gptr*) ¤t_user, 0, GET_STR, REQUIRED_ARG,
|
||||
(uchar**) ¤t_user, (uchar**) ¤t_user, 0, GET_STR, REQUIRED_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"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,
|
||||
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"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,
|
||||
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 */
|
||||
|
||||
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,
|
||||
my_bool not_used __attribute__((unused)))
|
||||
uchar* get_table_key(const char *entry, size_t *length,
|
||||
my_bool not_used __attribute__((unused)))
|
||||
{
|
||||
*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");
|
||||
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);
|
||||
break;
|
||||
}
|
||||
@ -832,13 +832,13 @@ static int get_options(int *argc, char ***argv)
|
||||
return(EX_EOM);
|
||||
/* Don't copy internal log tables */
|
||||
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,
|
||||
(byte*) my_strdup("mysql.schema", MYF(MY_WME))) ||
|
||||
(uchar*) my_strdup("mysql.schema", MYF(MY_WME))) ||
|
||||
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,
|
||||
(byte*) my_strdup("mysql.slow_log", MYF(MY_WME))))
|
||||
(uchar*) my_strdup("mysql.slow_log", MYF(MY_WME))))
|
||||
return(EX_EOM);
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
uint user_name_len;
|
||||
size_t user_name_len;
|
||||
char user_name_str[USERNAME_LENGTH + 1];
|
||||
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 quoted_host_name_str[HOSTNAME_LENGTH * 2 + 3];
|
||||
|
||||
@ -2693,15 +2693,18 @@ static void dump_table(char *table, char *db)
|
||||
plus 2 bytes for '0x' prefix.
|
||||
- In non-HEX mode we need up to 2 bytes per character,
|
||||
plus 2 bytes for leading and trailing '\'' characters.
|
||||
Also we need to reserve 1 byte for terminating '\0'.
|
||||
*/
|
||||
dynstr_realloc_checked(&extended_row,length * 2+2);
|
||||
dynstr_realloc_checked(&extended_row,length * 2 + 2 + 1);
|
||||
if (opt_hex_blob && is_blob)
|
||||
{
|
||||
dynstr_append_checked(&extended_row, "0x");
|
||||
extended_row.length+= mysql_hex_string(extended_row.str +
|
||||
extended_row.length,
|
||||
row[i], length);
|
||||
extended_row.str[extended_row.length]= '\0';
|
||||
DBUG_ASSERT(extended_row.length+1 <= extended_row.max_length);
|
||||
/* mysql_hex_string() already terminated string by '\0' */
|
||||
DBUG_ASSERT(extended_row.str[extended_row.length] == '\0');
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -3342,9 +3345,9 @@ static int init_dumping(char *database, int init_func(char*))
|
||||
|
||||
/* 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);
|
||||
}
|
||||
|
||||
|
||||
@ -4132,10 +4135,10 @@ static my_bool get_view_structure(char *table, char* db)
|
||||
Surround it with !50013 comments
|
||||
*/
|
||||
{
|
||||
uint user_name_len;
|
||||
size_t user_name_len;
|
||||
char user_name_str[USERNAME_LENGTH + 1];
|
||||
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 quoted_host_name_str[HOSTNAME_LENGTH * 2 + 3];
|
||||
|
||||
|
@ -57,7 +57,7 @@ static char *opt_password=0, *current_user=0,
|
||||
*escaped=0, *opt_columns=0,
|
||||
*default_charset= (char*) MYSQL_DEFAULT_CHARSET_NAME;
|
||||
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 CHARSET_INFO *charset_info= &my_charset_latin1;
|
||||
#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},
|
||||
#endif
|
||||
{"character-sets-dir", OPT_CHARSETS_DIR,
|
||||
"Directory where character sets are.", (gptr*) &charsets_dir,
|
||||
(gptr*) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Directory where character sets are.", (uchar**) &charsets_dir,
|
||||
(uchar**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"default-character-set", OPT_DEFAULT_CHARSET,
|
||||
"Set the default character set.", (gptr*) &default_charset,
|
||||
(gptr*) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Set the default character set.", (uchar**) &default_charset,
|
||||
(uchar**) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"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.",
|
||||
(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},
|
||||
{"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},
|
||||
{"debug",'#', "Output debug log. Often this is 'd:t:o,filename'.", 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,
|
||||
(gptr*) &info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"delete", 'd', "First delete all rows from table.", (gptr*) &opt_delete,
|
||||
(gptr*) &opt_delete, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.", (uchar**) &info_flag,
|
||||
(uchar**) &info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"delete", 'd', "First delete all rows from table.", (uchar**) &opt_delete,
|
||||
(uchar**) &opt_delete, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"fields-terminated-by", OPT_FTB,
|
||||
"Fields in the textfile are terminated by ...", (gptr*) &fields_terminated,
|
||||
(gptr*) &fields_terminated, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Fields in the textfile are terminated by ...", (uchar**) &fields_terminated,
|
||||
(uchar**) &fields_terminated, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"fields-enclosed-by", OPT_ENC,
|
||||
"Fields in the importfile are enclosed by ...", (gptr*) &enclosed,
|
||||
(gptr*) &enclosed, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Fields in the importfile are enclosed by ...", (uchar**) &enclosed,
|
||||
(uchar**) &enclosed, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"fields-optionally-enclosed-by", OPT_O_ENC,
|
||||
"Fields in the i.file are opt. enclosed by ...", (gptr*) &opt_enclosed,
|
||||
(gptr*) &opt_enclosed, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Fields in the i.file are opt. enclosed by ...", (uchar**) &opt_enclosed,
|
||||
(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 ...",
|
||||
(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},
|
||||
{"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},
|
||||
{"help", '?', "Displays this help and exits.", 0, 0, 0, GET_NO_ARG, NO_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"host", 'h', "Connect to host.", (gptr*) ¤t_host,
|
||||
(gptr*) ¤t_host, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"host", 'h', "Connect to host.", (uchar**) ¤t_host,
|
||||
(uchar**) ¤t_host, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"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.",
|
||||
(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},
|
||||
{"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},
|
||||
{"local", 'L', "Read all files through the client.", (gptr*) &opt_local_file,
|
||||
(gptr*) &opt_local_file, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"local", 'L', "Read all files through the client.", (uchar**) &opt_local_file,
|
||||
(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).",
|
||||
(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},
|
||||
{"low-priority", OPT_LOW_PRIORITY,
|
||||
"Use LOW_PRIORITY when updating the table.", (gptr*) &opt_low_priority,
|
||||
(gptr*) &opt_low_priority, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Use LOW_PRIORITY when updating the table.", (uchar**) &opt_low_priority,
|
||||
(uchar**) &opt_low_priority, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"password", 'p',
|
||||
"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},
|
||||
@ -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,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"port", 'P', "Port number to use for connection.", (gptr*) &opt_mysql_port,
|
||||
(gptr*) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
|
||||
{"port", 'P', "Port number to use for connection.", (uchar**) &opt_mysql_port,
|
||||
(uchar**) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
|
||||
0},
|
||||
{"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},
|
||||
{"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
|
||||
{"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},
|
||||
#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},
|
||||
{"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},
|
||||
#include <sslopt-longopts.h>
|
||||
{"use-threads", OPT_USE_THREADS,
|
||||
"Load files in parallel. The argument is the number "
|
||||
"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},
|
||||
#ifndef DONT_ALLOW_USER_CHANGE
|
||||
{"user", 'u', "User for login if not current user.", (gptr*) ¤t_user,
|
||||
(gptr*) ¤t_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"user", 'u', "User for login if not current user.", (uchar**) ¤t_user,
|
||||
(uchar**) ¤t_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"verbose", 'v', "Print info about the various stages.", (gptr*) &verbose,
|
||||
(gptr*) &verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"verbose", 'v', "Print info about the various stages.", (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, 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}
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include <stdarg.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 tty_password= 0, opt_table_type= 0, info_flag= 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 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)
|
||||
{
|
||||
@ -120,7 +120,8 @@ int main(int argc, char **argv)
|
||||
mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, default_charset);
|
||||
|
||||
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)))
|
||||
{
|
||||
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},
|
||||
#endif
|
||||
{"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},
|
||||
{"default-character-set", OPT_DEFAULT_CHARSET,
|
||||
"Set the default character set.", (gptr*) &default_charset,
|
||||
(gptr*) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Set the default character set.", (uchar**) &default_charset,
|
||||
(uchar**) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"count", OPT_COUNT,
|
||||
"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},
|
||||
{"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},
|
||||
{"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.",
|
||||
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,
|
||||
(gptr*) &info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.", (uchar**) &info_flag,
|
||||
(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,
|
||||
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},
|
||||
{"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},
|
||||
{"keys", 'k', "Show keys for table.", (gptr*) &opt_show_keys,
|
||||
(gptr*) &opt_show_keys, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"keys", 'k', "Show keys for table.", (uchar**) &opt_show_keys,
|
||||
(uchar**) &opt_show_keys, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"password", 'p',
|
||||
"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},
|
||||
{"port", 'P', "Port number to use for connection.", (gptr*) &opt_mysql_port,
|
||||
(gptr*) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
|
||||
{"port", 'P', "Port number to use for connection.", (uchar**) &opt_mysql_port,
|
||||
(uchar**) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
|
||||
0},
|
||||
#ifdef __WIN__
|
||||
{"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},
|
||||
#ifdef HAVE_SMEM
|
||||
{"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},
|
||||
#endif
|
||||
{"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},
|
||||
{"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},
|
||||
#include <sslopt-longopts.h>
|
||||
#ifndef DONT_ALLOW_USER_CHANGE
|
||||
{"user", 'u', "User for login if not current user.", (gptr*) &user,
|
||||
(gptr*) &user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"user", 'u', "User for login if not current user.", (uchar**) &user,
|
||||
(uchar**) &user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"verbose", 'v',
|
||||
"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++)
|
||||
putchar('-');
|
||||
putchar('+');
|
||||
if (!(field=va_arg(args,my_string)))
|
||||
if (!(field=va_arg(args,char *)))
|
||||
break;
|
||||
length=va_arg(args,uint);
|
||||
}
|
||||
@ -757,7 +758,7 @@ print_header(const char *header,uint head_length,...)
|
||||
for (i=0 ; i < length ; i++)
|
||||
putchar(' ');
|
||||
putchar('|');
|
||||
if (!(field=va_arg(args,my_string)))
|
||||
if (!(field=va_arg(args,char *)))
|
||||
break;
|
||||
length=va_arg(args,uint);
|
||||
}
|
||||
@ -772,7 +773,7 @@ print_header(const char *header,uint head_length,...)
|
||||
for (i=0 ; i < length+2 ; i++)
|
||||
putchar('-');
|
||||
putchar('+');
|
||||
if (!(field=va_arg(args,my_string)))
|
||||
if (!(field=va_arg(args,char *)))
|
||||
break;
|
||||
length=va_arg(args,uint);
|
||||
}
|
||||
@ -798,7 +799,7 @@ print_row(const char *header,uint head_length,...)
|
||||
field_length=(uint) strlen(field);
|
||||
for (i=field_length ; i <= length ; i++)
|
||||
putchar(' ');
|
||||
if (!(field=va_arg(args,my_string)))
|
||||
if (!(field=va_arg(args,char *)))
|
||||
break;
|
||||
length=va_arg(args,uint);
|
||||
}
|
||||
|
@ -387,9 +387,9 @@ int main(int argc, char **argv)
|
||||
|
||||
/* now free all the strings we created */
|
||||
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(query_statements);
|
||||
@ -399,7 +399,7 @@ int main(int argc, char **argv)
|
||||
|
||||
#ifdef HAVE_SMEM
|
||||
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
|
||||
free_defaults(defaults_argv);
|
||||
my_end(0);
|
||||
@ -473,7 +473,7 @@ void concurrency_loop(MYSQL *mysql, uint current, option_string *eptr)
|
||||
if (opt_csv_str)
|
||||
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},
|
||||
{"auto-generate-sql", 'a',
|
||||
"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},
|
||||
{"auto-generate-sql-add-autoincrement", OPT_SLAP_AUTO_GENERATE_ADD_AUTO,
|
||||
"Add autoincrement to auto-generated tables.",
|
||||
(gptr*) &auto_generate_sql_autoincrement,
|
||||
(gptr*) &auto_generate_sql_autoincrement,
|
||||
(uchar**) &auto_generate_sql_autoincrement,
|
||||
(uchar**) &auto_generate_sql_autoincrement,
|
||||
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"auto-generate-sql-execute-number", OPT_SLAP_AUTO_GENERATE_EXECUTE_QUERIES,
|
||||
"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},
|
||||
{"auto-generate-sql-guid-primary", OPT_SLAP_AUTO_GENERATE_GUID_PRIMARY,
|
||||
"Add GUID based primary keys to auto-generated tables.",
|
||||
(gptr*) &auto_generate_sql_guid_primary,
|
||||
(gptr*) &auto_generate_sql_guid_primary,
|
||||
(uchar**) &auto_generate_sql_guid_primary,
|
||||
(uchar**) &auto_generate_sql_guid_primary,
|
||||
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"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",
|
||||
(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},
|
||||
{"auto-generate-sql-secondary-indexes",
|
||||
OPT_SLAP_AUTO_GENERATE_SECONDARY_INDEXES,
|
||||
"Number of secondary indexes to add auto-generated tables.",
|
||||
(gptr*) &auto_generate_sql_secondary_indexes,
|
||||
(gptr*) &auto_generate_sql_secondary_indexes, 0,
|
||||
(uchar**) &auto_generate_sql_secondary_indexes,
|
||||
(uchar**) &auto_generate_sql_secondary_indexes, 0,
|
||||
GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"auto-generate-sql-unique-query-number",
|
||||
OPT_SLAP_AUTO_GENERATE_UNIQUE_QUERY_NUM,
|
||||
"Number of unique queries auto tests",
|
||||
(gptr*) &auto_generate_sql_unique_query_number,
|
||||
(gptr*) &auto_generate_sql_unique_query_number,
|
||||
(uchar**) &auto_generate_sql_unique_query_number,
|
||||
(uchar**) &auto_generate_sql_unique_query_number,
|
||||
0, GET_ULL, REQUIRED_ARG, 10, 0, 0, 0, 0, 0},
|
||||
{"auto-generate-sql-unique-write-number",
|
||||
OPT_SLAP_AUTO_GENERATE_UNIQUE_WRITE_NUM,
|
||||
"Number of unique queries for auto-generate-sql-write-number",
|
||||
(gptr*) &auto_generate_sql_unique_write_number,
|
||||
(gptr*) &auto_generate_sql_unique_write_number,
|
||||
(uchar**) &auto_generate_sql_unique_write_number,
|
||||
(uchar**) &auto_generate_sql_unique_write_number,
|
||||
0, GET_ULL, REQUIRED_ARG, 10, 0, 0, 0, 0, 0},
|
||||
{"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",
|
||||
(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},
|
||||
{"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},
|
||||
{"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},
|
||||
{"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},
|
||||
{"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},
|
||||
{"csv", OPT_SLAP_CSV,
|
||||
"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},
|
||||
{"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},
|
||||
{"delimiter", 'F',
|
||||
"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},
|
||||
{"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},
|
||||
{"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},
|
||||
{"iterations", 'i', "Number of times too run the tests.", (gptr*) &iterations,
|
||||
(gptr*) &iterations, 0, GET_UINT, REQUIRED_ARG, 1, 0, 0, 0, 0, 0},
|
||||
{"iterations", 'i', "Number of times too run the tests.", (uchar**) &iterations,
|
||||
(uchar**) &iterations, 0, GET_UINT, REQUIRED_ARG, 1, 0, 0, 0, 0, 0},
|
||||
{"number-char-cols", 'x',
|
||||
"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},
|
||||
{"number-int-cols", 'y',
|
||||
"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},
|
||||
{"number-of-queries", OPT_MYSQL_NUMBER_OF_QUERY,
|
||||
"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},
|
||||
{"only-print", OPT_MYSQL_ONLY_PRINT,
|
||||
"This causes mysqlslap to not connect to the databases, but instead print "
|
||||
"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},
|
||||
{"password", 'p',
|
||||
"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,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"port", 'P', "Port number to use for connection.", (gptr*) &opt_mysql_port,
|
||||
(gptr*) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, MYSQL_PORT, 0, 0, 0, 0,
|
||||
{"port", 'P', "Port number to use for connection.", (uchar**) &opt_mysql_port,
|
||||
(uchar**) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, MYSQL_PORT, 0, 0, 0, 0,
|
||||
0},
|
||||
{"post-query", OPT_SLAP_POST_QUERY,
|
||||
"Query to run or file containing query to run after executing.",
|
||||
(gptr*) &user_supplied_post_statements,
|
||||
(gptr*) &user_supplied_post_statements,
|
||||
(uchar**) &user_supplied_post_statements,
|
||||
(uchar**) &user_supplied_post_statements,
|
||||
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"pre-query", OPT_SLAP_PRE_QUERY,
|
||||
"Query to run or file containing query to run before executing.",
|
||||
(gptr*) &user_supplied_pre_statements,
|
||||
(gptr*) &user_supplied_pre_statements,
|
||||
(uchar**) &user_supplied_pre_statements,
|
||||
(uchar**) &user_supplied_pre_statements,
|
||||
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"preserve-schema", OPT_MYSQL_PRESERVE_SCHEMA,
|
||||
"Preserve the schema from the mysqlslap run, this happens unless "
|
||||
"--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},
|
||||
{"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},
|
||||
{"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},
|
||||
#ifdef HAVE_SMEM
|
||||
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
|
||||
"Base name of shared memory.", (gptr*) &shared_memory_base_name,
|
||||
(gptr*) &shared_memory_base_name, 0, GET_STR_ALLOC, REQUIRED_ARG,
|
||||
"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},
|
||||
#endif
|
||||
{"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},
|
||||
{"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},
|
||||
#include <sslopt-longopts.h>
|
||||
#ifndef DONT_ALLOW_USER_CHANGE
|
||||
{"user", 'u', "User for login if not current user.", (gptr*) &user,
|
||||
(gptr*) &user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"user", 'u', "User for login if not current user.", (uchar**) &user,
|
||||
(uchar**) &user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"verbose", 'v',
|
||||
"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},
|
||||
{"version", 'V', "Output version information and exit.", 0, 0, 0, GET_NO_ARG,
|
||||
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)
|
||||
{
|
||||
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));
|
||||
while (*argument) *argument++= 'x'; /* Destroy argument */
|
||||
if (*start)
|
||||
@ -1312,7 +1312,7 @@ get_options(int *argc,char ***argv)
|
||||
tmp_string[sbuf.st_size]= '\0';
|
||||
my_close(data_file,MYF(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)
|
||||
{
|
||||
@ -1341,7 +1341,7 @@ get_options(int *argc,char ***argv)
|
||||
if (user_supplied_query)
|
||||
actual_queries= parse_delimiter(tmp_string, &query_statements,
|
||||
delimiter[0]);
|
||||
my_free((gptr)tmp_string, MYF(0));
|
||||
my_free(tmp_string, MYF(0));
|
||||
}
|
||||
else if (user_supplied_query)
|
||||
{
|
||||
@ -1372,11 +1372,12 @@ get_options(int *argc,char ***argv)
|
||||
if (user_supplied_pre_statements)
|
||||
actual_queries= parse_delimiter(tmp_string, &pre_statements,
|
||||
delimiter[0]);
|
||||
my_free((gptr)tmp_string, MYF(0));
|
||||
my_free(tmp_string, MYF(0));
|
||||
}
|
||||
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]);
|
||||
}
|
||||
|
||||
@ -1402,7 +1403,7 @@ get_options(int *argc,char ***argv)
|
||||
if (user_supplied_post_statements)
|
||||
parse_delimiter(tmp_string, &post_statements,
|
||||
delimiter[0]);
|
||||
my_free((gptr)tmp_string, MYF(0));
|
||||
my_free(tmp_string, MYF(0));
|
||||
}
|
||||
else if (user_supplied_post_statements)
|
||||
{
|
||||
@ -1499,9 +1500,9 @@ drop_primary_key_list(void)
|
||||
if (primary_keys_number_of)
|
||||
{
|
||||
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;
|
||||
@ -2080,10 +2081,10 @@ option_cleanup(option_string *stmt)
|
||||
{
|
||||
nptr= ptr->next;
|
||||
if (ptr->string)
|
||||
my_free((gptr)ptr->string, MYF(0));
|
||||
my_free(ptr->string, MYF(0));
|
||||
if (ptr->option)
|
||||
my_free((gptr)ptr->option, MYF(0));
|
||||
my_free((gptr)(byte *)ptr, MYF(0));
|
||||
my_free(ptr->option, MYF(0));
|
||||
my_free(ptr, MYF(0));
|
||||
}
|
||||
}
|
||||
|
||||
@ -2098,7 +2099,7 @@ statement_cleanup(statement *stmt)
|
||||
{
|
||||
nptr= ptr->next;
|
||||
if (ptr->string)
|
||||
my_free((gptr)ptr->string, MYF(0));
|
||||
my_free((gptr)(byte *)ptr, MYF(0));
|
||||
my_free(ptr->string, MYF(0));
|
||||
my_free(ptr, MYF(0));
|
||||
}
|
||||
}
|
||||
|
@ -747,7 +747,7 @@ void close_files()
|
||||
DBUG_PRINT("info", ("closing file: %s", cur_file->file_name));
|
||||
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;
|
||||
}
|
||||
DBUG_VOID_RETURN;
|
||||
@ -766,8 +766,8 @@ void free_used_memory()
|
||||
for (i= 0 ; i < q_lines.elements ; i++)
|
||||
{
|
||||
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((gptr) (*q),MYF(0));
|
||||
my_free((*q)->query_buf,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free((*q),MYF(0));
|
||||
}
|
||||
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)
|
||||
{
|
||||
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_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)
|
||||
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);
|
||||
tmp[stat_info.st_size] = 0;
|
||||
init_dynamic_string(&res_ds, "", stat_info.st_size+256, 256);
|
||||
@ -1054,7 +1054,7 @@ err:
|
||||
res_ptr, res_len);
|
||||
|
||||
dynstr_free(&res_ds);
|
||||
my_free((gptr) tmp, MYF(0));
|
||||
my_free(tmp, MYF(0));
|
||||
my_close(fd, MYF(MY_WME));
|
||||
|
||||
DBUG_RETURN(res);
|
||||
@ -1127,13 +1127,13 @@ void check_require(DYNAMIC_STRING* ds, const char *fname)
|
||||
}
|
||||
|
||||
|
||||
static byte *get_var_key(const byte* var, uint* len,
|
||||
my_bool __attribute__((unused)) t)
|
||||
static uchar *get_var_key(const uchar* var, size_t *len,
|
||||
my_bool __attribute__((unused)) t)
|
||||
{
|
||||
register char* key;
|
||||
key = ((VAR*)var)->name;
|
||||
*len = ((VAR*)var)->name_len;
|
||||
return (byte*)key;
|
||||
return (uchar*)key;
|
||||
}
|
||||
|
||||
|
||||
@ -1177,7 +1177,7 @@ void var_free(void *v)
|
||||
{
|
||||
my_free(((VAR*) v)->str_val, MYF(MY_WME));
|
||||
if (((VAR*)v)->alloced)
|
||||
my_free((char*) v, MYF(MY_WME));
|
||||
my_free(v, MYF(MY_WME));
|
||||
}
|
||||
|
||||
|
||||
@ -1189,7 +1189,7 @@ VAR* var_from_env(const char *name, const char *def_val)
|
||||
tmp = def_val;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@ -1222,7 +1222,8 @@ VAR* var_get(const char *var_name, const char **var_name_end, my_bool raw,
|
||||
if (length >= MAX_VAR_NAME_LENGTH)
|
||||
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];
|
||||
strmake(buff, save_var_name, length);
|
||||
@ -1253,10 +1254,10 @@ err:
|
||||
VAR *var_obtain(const char *name, int len)
|
||||
{
|
||||
VAR* v;
|
||||
if ((v = (VAR*)hash_search(&var_hash, name, len)))
|
||||
if ((v = (VAR*)hash_search(&var_hash, (const uchar *) name, len)))
|
||||
return v;
|
||||
v = var_init(0, name, len, "", 0);
|
||||
my_hash_insert(&var_hash, (byte*)v);
|
||||
my_hash_insert(&var_hash, (uchar*)v);
|
||||
return v;
|
||||
}
|
||||
|
||||
@ -1308,7 +1309,7 @@ void var_set(const char *var_name, const char *var_name_end,
|
||||
if (!(v->env_s= my_strdup(buf, MYF(MY_WME))))
|
||||
die("Out of memory");
|
||||
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;
|
||||
}
|
||||
@ -1613,9 +1614,10 @@ FILE* my_popen(DYNAMIC_STRING *ds_cmd, const char *mode)
|
||||
static void init_builtin_echo(void)
|
||||
{
|
||||
#ifdef __WIN__
|
||||
size_t echo_length;
|
||||
|
||||
/* 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",
|
||||
builtin_echo, "", MYF(MY_REPLACE_DIR));
|
||||
|
||||
@ -2087,8 +2089,8 @@ void read_until_delimiter(DYNAMIC_STRING *ds,
|
||||
{
|
||||
char c;
|
||||
DBUG_ENTER("read_until_delimiter");
|
||||
DBUG_PRINT("enter", ("delimiter: %s, length: %d",
|
||||
ds_delimiter->str, ds_delimiter->length));
|
||||
DBUG_PRINT("enter", ("delimiter: %s, length: %u",
|
||||
ds_delimiter->str, (uint) ds_delimiter->length));
|
||||
|
||||
if (ds_delimiter->length > MAX_DELIMITER_LENGTH)
|
||||
die("Max delimiter length(%d) exceeded", MAX_DELIMITER_LENGTH);
|
||||
@ -2246,7 +2248,7 @@ void do_cat_file(struct st_command *command)
|
||||
|
||||
if ((fd= my_open(ds_filename.str, O_RDONLY, MYF(0))) < 0)
|
||||
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)
|
||||
{
|
||||
char *p= buff, *start= buff;
|
||||
@ -2314,10 +2316,10 @@ void do_diff_files(struct st_command *command)
|
||||
my_close(fd, MYF(0));
|
||||
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)
|
||||
{
|
||||
if ((len2= my_read(fd2, (byte*)&buff2,
|
||||
if ((len2= my_read(fd2, (uchar*)&buff2,
|
||||
sizeof(buff2), MYF(0))) != len)
|
||||
{
|
||||
/* File 2 was smaller */
|
||||
@ -2331,7 +2333,7 @@ void do_diff_files(struct st_command *command)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (my_read(fd2, (byte*)&buff2,
|
||||
if (my_read(fd2, (uchar*)&buff2,
|
||||
sizeof(buff2), MYF(0)) > 0)
|
||||
{
|
||||
/* File 1 was smaller */
|
||||
@ -3819,7 +3821,7 @@ int read_line(char *buf, int size)
|
||||
my_fclose(cur_file->file, MYF(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;
|
||||
if (cur_file == file_stack)
|
||||
{
|
||||
@ -4172,12 +4174,12 @@ int read_command(struct st_command** command_ptr)
|
||||
|
||||
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);
|
||||
}
|
||||
if (!(*command_ptr= command=
|
||||
(struct st_command*) my_malloc(sizeof(*command), MYF(MY_WME))) ||
|
||||
insert_dynamic(&q_lines, (gptr) &command))
|
||||
insert_dynamic(&q_lines, (uchar*) &command))
|
||||
die(NullS);
|
||||
|
||||
command->require_file[0]= 0;
|
||||
@ -4233,18 +4235,18 @@ static struct my_option my_long_options[] =
|
||||
{
|
||||
{"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"basedir", 'b', "Basedir for tests.", (gptr*) &opt_basedir,
|
||||
(gptr*) &opt_basedir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"basedir", 'b', "Basedir for tests.", (uchar**) &opt_basedir,
|
||||
(uchar**) &opt_basedir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"character-sets-dir", OPT_CHARSETS_DIR,
|
||||
"Directory where character sets are.", (gptr*) &opt_charsets_dir,
|
||||
(gptr*) &opt_charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Directory where character sets are.", (uchar**) &opt_charsets_dir,
|
||||
(uchar**) &opt_charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"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},
|
||||
{"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},
|
||||
{"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},
|
||||
#ifdef DBUG_OFF
|
||||
{"debug", '#', "This is a non-debug version. Catch this and exit",
|
||||
@ -4253,51 +4255,51 @@ static struct my_option my_long_options[] =
|
||||
{"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.",
|
||||
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#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},
|
||||
{"include", 'i', "Include SQL before each test case.", (gptr*) &opt_include,
|
||||
(gptr*) &opt_include, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"logdir", OPT_LOG_DIR, "Directory for log files", (gptr*) &opt_logdir,
|
||||
(gptr*) &opt_logdir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"include", 'i', "Include SQL before each test case.", (uchar**) &opt_include,
|
||||
(uchar**) &opt_include, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"logdir", OPT_LOG_DIR, "Directory for log files", (uchar**) &opt_logdir,
|
||||
(uchar**) &opt_logdir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"mark-progress", OPT_MARK_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},
|
||||
{"max-connect-retries", OPT_MAX_CONNECT_RETRIES,
|
||||
"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},
|
||||
{"password", 'p', "Password to use when connecting to server.",
|
||||
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"port", 'P', "Port number to use for connection.", (gptr*) &opt_port,
|
||||
(gptr*) &opt_port, 0, GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"port", 'P', "Port number to use for connection.", (uchar**) &opt_port,
|
||||
(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",
|
||||
(gptr*) &ps_protocol, (gptr*) &ps_protocol, 0,
|
||||
(uchar**) &ps_protocol, (uchar**) &ps_protocol, 0,
|
||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"quiet", 's', "Suppress all normal output.", (gptr*) &silent,
|
||||
(gptr*) &silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"quiet", 's', "Suppress all normal output.", (uchar**) &silent,
|
||||
(uchar**) &silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"record", 'r', "Record output of test_file into result file.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"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},
|
||||
{"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},
|
||||
{"server-file", 'F', "Read embedded server arguments from file.",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"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,
|
||||
"Don't use the memory allocation checking.", 0, 0, 0, GET_NO_ARG, NO_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"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},
|
||||
{"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},
|
||||
{"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},
|
||||
#include "sslopt-longopts.h"
|
||||
{"test-file", 'x', "Read test from/in this file (default stdin).",
|
||||
@ -4306,14 +4308,14 @@ static struct my_option my_long_options[] =
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"tmpdir", 't', "Temporary directory where sockets are put.",
|
||||
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},
|
||||
{"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},
|
||||
{"version", 'V', "Output version information and exit.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"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},
|
||||
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
||||
};
|
||||
@ -4529,7 +4531,7 @@ void str_to_file2(const char *fname, char *str, int size, my_bool append)
|
||||
die("Could not open %s: errno = %d", buff, errno);
|
||||
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);
|
||||
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");
|
||||
my_close(fd, MYF(0));
|
||||
}
|
||||
@ -4646,7 +4648,7 @@ void init_win_path_patterns()
|
||||
continue;
|
||||
}
|
||||
|
||||
if (insert_dynamic(&patterns, (gptr) &p))
|
||||
if (insert_dynamic(&patterns, (uchar*) &p))
|
||||
die(NullS);
|
||||
|
||||
DBUG_PRINT("info", ("p: %s", p));
|
||||
@ -4666,7 +4668,7 @@ void free_win_path_patterns()
|
||||
for (i=0 ; i < patterns.elements ; i++)
|
||||
{
|
||||
const char** pattern= dynamic_element(&patterns, i, const char**);
|
||||
my_free((gptr) *pattern, MYF(0));
|
||||
my_free((char*) *pattern, MYF(0));
|
||||
}
|
||||
delete_dynamic(&patterns);
|
||||
}
|
||||
@ -4848,12 +4850,12 @@ void append_stmt_result(DYNAMIC_STRING *ds, MYSQL_STMT *stmt,
|
||||
for (i= 0; i < num_fields; i++)
|
||||
{
|
||||
/* 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 */
|
||||
my_free((gptr)my_bind , MYF(MY_WME | MY_FAE));
|
||||
my_free((gptr)length , MYF(MY_WME | MY_FAE));
|
||||
my_free((gptr)is_null , MYF(MY_WME | MY_FAE));
|
||||
my_free(my_bind , MYF(MY_WME | MY_FAE));
|
||||
my_free(length , MYF(MY_WME | MY_FAE));
|
||||
my_free(is_null , MYF(MY_WME | MY_FAE));
|
||||
}
|
||||
|
||||
|
||||
@ -6561,15 +6563,15 @@ void free_replace_column()
|
||||
|
||||
typedef struct st_pointer_array { /* when using array-strings */
|
||||
TYPELIB typelib; /* Pointer to strings */
|
||||
byte *str; /* Strings is here */
|
||||
uchar *str; /* Strings is here */
|
||||
int7 *flag; /* Flag about each var. */
|
||||
uint array_allocs,max_count,length,max_length;
|
||||
} POINTER_ARRAY;
|
||||
|
||||
struct st_replace;
|
||||
struct st_replace *init_replace(my_string *from, my_string *to, uint count,
|
||||
my_string word_end_chars);
|
||||
int insert_pointer_name(reg1 POINTER_ARRAY *pa,my_string name);
|
||||
struct st_replace *init_replace(char * *from, char * *to, uint count,
|
||||
char * word_end_chars);
|
||||
int insert_pointer_name(reg1 POINTER_ARRAY *pa,char * name);
|
||||
void replace_strings_append(struct st_replace *rep, DYNAMIC_STRING* ds,
|
||||
const char *from, int len);
|
||||
void free_pointer_array(POINTER_ARRAY *pa);
|
||||
@ -6633,7 +6635,7 @@ void free_replace()
|
||||
DBUG_ENTER("free_replace");
|
||||
if (glob_replace)
|
||||
{
|
||||
my_free((char*) glob_replace,MYF(0));
|
||||
my_free(glob_replace,MYF(0));
|
||||
glob_replace=0;
|
||||
}
|
||||
DBUG_VOID_RETURN;
|
||||
@ -6844,7 +6846,7 @@ struct st_replace_regex* init_replace_regex(char* expr)
|
||||
reg.icase= 1;
|
||||
|
||||
/* done parsing the statement, now place it in regex_arr */
|
||||
if (insert_dynamic(&res->regex_arr,(gptr) ®))
|
||||
if (insert_dynamic(&res->regex_arr,(uchar*) ®))
|
||||
die("Out of memory");
|
||||
}
|
||||
res->odd_buf_len= res->even_buf_len= 8192;
|
||||
@ -6855,7 +6857,7 @@ struct st_replace_regex* init_replace_regex(char* expr)
|
||||
return res;
|
||||
|
||||
err:
|
||||
my_free((gptr)res,0);
|
||||
my_free(res,0);
|
||||
die("Error parsing replace_regex \"%s\"", expr);
|
||||
return 0;
|
||||
}
|
||||
@ -6896,7 +6898,7 @@ int multi_reg_replace(struct st_replace_regex* r,char* val)
|
||||
struct st_regex re;
|
||||
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,
|
||||
in_buf, re.icase))
|
||||
@ -6949,7 +6951,7 @@ void free_replace_regex()
|
||||
delete_dynamic(&glob_replace_regex->regex_arr);
|
||||
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((char*) glob_replace_regex,MYF(0));
|
||||
my_free(glob_replace_regex,MYF(0));
|
||||
glob_replace_regex=0;
|
||||
}
|
||||
}
|
||||
@ -7144,7 +7146,7 @@ int reg_replace(char** buf_p, int* buf_len_p, char *pattern,
|
||||
str_p= str_end;
|
||||
}
|
||||
}
|
||||
my_free((gptr)subs, MYF(0));
|
||||
my_free(subs, MYF(0));
|
||||
my_regfree(&r);
|
||||
*res_p= 0;
|
||||
*buf_p= buf;
|
||||
@ -7204,13 +7206,13 @@ int get_next_bit(REP_SET *set,uint lastpos);
|
||||
int find_set(REP_SETS *sets,REP_SET *find);
|
||||
int find_found(FOUND_SET *found_set,uint table_offset,
|
||||
int found_offset);
|
||||
uint start_at_word(my_string pos);
|
||||
uint end_of_word(my_string pos);
|
||||
uint start_at_word(char * pos);
|
||||
uint end_of_word(char * pos);
|
||||
|
||||
static uint found_sets=0;
|
||||
|
||||
|
||||
uint replace_len(my_string str)
|
||||
uint replace_len(char * str)
|
||||
{
|
||||
uint len=0;
|
||||
while (*str)
|
||||
@ -7225,8 +7227,8 @@ uint replace_len(my_string str)
|
||||
|
||||
/* Init a replace structure for further calls */
|
||||
|
||||
REPLACE *init_replace(my_string *from, my_string *to,uint count,
|
||||
my_string word_end_chars)
|
||||
REPLACE *init_replace(char * *from, char * *to,uint count,
|
||||
char * word_end_chars)
|
||||
{
|
||||
static const int SPACE_CHAR= 256;
|
||||
static const int START_OF_LINE= 257;
|
||||
@ -7235,7 +7237,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;
|
||||
int used_sets,chr,default_state;
|
||||
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_SET *set,*start_states,*word_states,*new_set;
|
||||
FOLLOWS *follow,*follow_ptr;
|
||||
@ -7280,7 +7282,7 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count,
|
||||
if (!(follow=(FOLLOWS*) my_malloc((states+2)*sizeof(FOLLOWS),MYF(MY_WME))))
|
||||
{
|
||||
free_sets(&sets);
|
||||
my_free((gptr) found_set,MYF(0));
|
||||
my_free(found_set,MYF(0));
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
@ -7471,12 +7473,12 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count,
|
||||
|
||||
if ((replace=(REPLACE*) my_malloc(sizeof(REPLACE)*(sets.count)+
|
||||
sizeof(REPLACE_STRING)*(found_sets+1)+
|
||||
sizeof(my_string)*count+result_len,
|
||||
sizeof(char *)*count+result_len,
|
||||
MYF(MY_WME | MY_ZEROFILL))))
|
||||
{
|
||||
rep_str=(REPLACE_STRING*) (replace+sets.count);
|
||||
to_array=(my_string*) (rep_str+found_sets+1);
|
||||
to_pos=(my_string) (to_array+count);
|
||||
to_array= (char **) (rep_str+found_sets+1);
|
||||
to_pos=(char *) (to_array+count);
|
||||
for (i=0 ; i < count ; i++)
|
||||
{
|
||||
to_array[i]=to_pos;
|
||||
@ -7487,7 +7489,8 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count,
|
||||
for (i=1 ; i <= found_sets ; i++)
|
||||
{
|
||||
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].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)+
|
||||
@ -7502,9 +7505,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));
|
||||
}
|
||||
}
|
||||
my_free((gptr) follow,MYF(0));
|
||||
my_free(follow,MYF(0));
|
||||
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_RETURN(replace);
|
||||
}
|
||||
@ -7520,7 +7523,7 @@ int init_sets(REP_SETS *sets,uint states)
|
||||
if (!(sets->bit_buffer=(uint*) my_malloc(sizeof(uint)*sets->size_of_bits*
|
||||
SET_MALLOC_HUNC,MYF(MY_WME))))
|
||||
{
|
||||
my_free((gptr) sets->set,MYF(0));
|
||||
my_free(sets->set,MYF(0));
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
@ -7552,13 +7555,13 @@ REP_SET *make_new_set(REP_SETS *sets)
|
||||
return set;
|
||||
}
|
||||
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,
|
||||
MYF(MY_WME))))
|
||||
return 0;
|
||||
sets->set_buffer=set;
|
||||
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,
|
||||
MYF(MY_WME))))
|
||||
return 0;
|
||||
@ -7581,8 +7584,8 @@ void free_last_set(REP_SETS *sets)
|
||||
|
||||
void free_sets(REP_SETS *sets)
|
||||
{
|
||||
my_free((gptr)sets->set_buffer,MYF(0));
|
||||
my_free((gptr)sets->bit_buffer,MYF(0));
|
||||
my_free(sets->set_buffer,MYF(0));
|
||||
my_free(sets->bit_buffer,MYF(0));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -7609,13 +7612,13 @@ void or_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));
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
@ -7683,17 +7686,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*/
|
||||
|
||||
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);
|
||||
return ((end > pos+2 && !bcmp(end-2,"\\b",2)) ||
|
||||
(end >= pos+2 && !bcmp(end-2,"\\$",2))) ?
|
||||
1 : 0;
|
||||
char * end=strend(pos);
|
||||
return ((end > pos+2 && !bcmp((const uchar*) end-2,
|
||||
(const uchar*) "\\b", 2)) ||
|
||||
(end >= pos+2 && !bcmp((const uchar*) end-2,
|
||||
(const uchar*) "\\$",2))) ? 1 : 0;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
@ -7703,10 +7708,10 @@ uint end_of_word(my_string pos)
|
||||
#define PC_MALLOC 256 /* Bytes for pointers */
|
||||
#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;
|
||||
byte *new_pos;
|
||||
uchar *new_pos;
|
||||
const char **new_array;
|
||||
DBUG_ENTER("insert_pointer_name");
|
||||
|
||||
@ -7714,16 +7719,16 @@ int insert_pointer_name(reg1 POINTER_ARRAY *pa,my_string name)
|
||||
{
|
||||
if (!(pa->typelib.type_names=(const char **)
|
||||
my_malloc(((PC_MALLOC-MALLOC_OVERHEAD)/
|
||||
(sizeof(my_string)+sizeof(*pa->flag))*
|
||||
(sizeof(my_string)+sizeof(*pa->flag))),MYF(MY_WME))))
|
||||
(sizeof(char *)+sizeof(*pa->flag))*
|
||||
(sizeof(char *)+sizeof(*pa->flag))),MYF(MY_WME))))
|
||||
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))))
|
||||
{
|
||||
my_free((gptr) pa->typelib.type_names,MYF(0));
|
||||
my_free((char*) pa->typelib.type_names,MYF(0));
|
||||
DBUG_RETURN (-1);
|
||||
}
|
||||
pa->max_count=(PC_MALLOC-MALLOC_OVERHEAD)/(sizeof(byte*)+
|
||||
pa->max_count=(PC_MALLOC-MALLOC_OVERHEAD)/(sizeof(uchar*)+
|
||||
sizeof(*pa->flag));
|
||||
pa->flag= (int7*) (pa->typelib.type_names+pa->max_count);
|
||||
pa->length=0;
|
||||
@ -7733,7 +7738,7 @@ int insert_pointer_name(reg1 POINTER_ARRAY *pa,my_string name)
|
||||
length=(uint) strlen(name)+1;
|
||||
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),
|
||||
MYF(MY_WME))))
|
||||
DBUG_RETURN(1);
|
||||
@ -7752,23 +7757,23 @@ int insert_pointer_name(reg1 POINTER_ARRAY *pa,my_string name)
|
||||
int len;
|
||||
pa->array_allocs++;
|
||||
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/
|
||||
(sizeof(byte*)+sizeof(*pa->flag))*
|
||||
(sizeof(byte*)+sizeof(*pa->flag)),
|
||||
(sizeof(uchar*)+sizeof(*pa->flag))*
|
||||
(sizeof(uchar*)+sizeof(*pa->flag)),
|
||||
MYF(MY_WME))))
|
||||
DBUG_RETURN(1);
|
||||
pa->typelib.type_names=new_array;
|
||||
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);
|
||||
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));
|
||||
}
|
||||
pa->flag[pa->typelib.count]=0; /* Reset flag */
|
||||
pa->typelib.type_names[pa->typelib.count++]= pa->str+pa->length;
|
||||
pa->typelib.type_names[pa->typelib.count++]= (char*) pa->str+pa->length;
|
||||
pa->typelib.type_names[pa->typelib.count]= NullS; /* Put end-mark */
|
||||
VOID(strmov(pa->str+pa->length,name));
|
||||
VOID(strmov((char*) pa->str+pa->length,name));
|
||||
pa->length+=length;
|
||||
DBUG_RETURN(0);
|
||||
} /* insert_pointer_name */
|
||||
@ -7781,9 +7786,9 @@ void free_pointer_array(POINTER_ARRAY *pa)
|
||||
if (pa->typelib.count)
|
||||
{
|
||||
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;
|
||||
my_free((gptr) pa->str,MYF(0));
|
||||
my_free(pa->str,MYF(0));
|
||||
}
|
||||
} /* free_pointer_array */
|
||||
|
||||
@ -7880,7 +7885,7 @@ void dynstr_append_sorted(DYNAMIC_STRING* ds, DYNAMIC_STRING *ds_input)
|
||||
*line_end= 0;
|
||||
|
||||
/* 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");
|
||||
|
||||
start= line_end+1;
|
||||
|
@ -22,8 +22,8 @@
|
||||
|
||||
static bool init_line_buffer(LINE_BUFFER *buffer,File file,ulong size,
|
||||
ulong max_size);
|
||||
static bool init_line_buffer_from_string(LINE_BUFFER *buffer,my_string str);
|
||||
static uint fill_buffer(LINE_BUFFER *buffer);
|
||||
static bool init_line_buffer_from_string(LINE_BUFFER *buffer,char * str);
|
||||
static size_t fill_buffer(LINE_BUFFER *buffer);
|
||||
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;
|
||||
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 line_buff;
|
||||
@ -62,13 +62,13 @@ void batch_readline_end(LINE_BUFFER *line_buff)
|
||||
{
|
||||
if (line_buff)
|
||||
{
|
||||
my_free((gptr) line_buff->buffer,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free((char*) line_buff,MYF(0));
|
||||
my_free(line_buff->buffer,MYF(MY_ALLOW_ZERO_PTR));
|
||||
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=(LINE_BUFFER*)
|
||||
@ -76,7 +76,7 @@ LINE_BUFFER *batch_readline_command(LINE_BUFFER *line_buff, my_string str)
|
||||
return 0;
|
||||
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 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
|
||||
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 length= (uint) strlen(str);
|
||||
if (!(buffer->buffer= buffer->start_of_line= buffer->end_of_line=
|
||||
(char*)my_realloc(buffer->buffer, old_length+length+2,
|
||||
MYF(MY_FAE|MY_ALLOW_ZERO_PTR))))
|
||||
(char*) my_realloc((uchar*) buffer->buffer, old_length+length+2,
|
||||
MYF(MY_FAE|MY_ALLOW_ZERO_PTR))))
|
||||
return 1;
|
||||
buffer->end= buffer->buffer + 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.
|
||||
*/
|
||||
|
||||
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);
|
||||
|
||||
if (buffer->eof)
|
||||
@ -166,11 +166,11 @@ static uint fill_buffer(LINE_BUFFER *buffer)
|
||||
}
|
||||
|
||||
/* 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)
|
||||
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. */
|
||||
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 *pos;
|
||||
uint length;
|
||||
size_t length;
|
||||
DBUG_ENTER("intern_read_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 (!(length=fill_buffer(buffer)) || length == (uint) -1)
|
||||
if (!(length=fill_buffer(buffer)) || length == (size_t) -1)
|
||||
DBUG_RETURN(0);
|
||||
continue;
|
||||
}
|
||||
|
@ -32,7 +32,7 @@
|
||||
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);
|
||||
|
||||
#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))
|
||||
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);
|
||||
return TRUE;
|
||||
@ -520,7 +520,7 @@ bool String::append(IO_CACHE* file, uint32 arg_length)
|
||||
{
|
||||
if (realloc(str_length+arg_length))
|
||||
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);
|
||||
return TRUE;
|
||||
@ -645,7 +645,7 @@ bool String::replace(uint32 offset,uint32 arg_length,
|
||||
{
|
||||
if (realloc(str_length+(uint32) diff))
|
||||
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);
|
||||
}
|
||||
if (to_length)
|
||||
|
35
dbug/dbug.c
35
dbug/dbug.c
@ -264,7 +264,7 @@ static BOOLEAN DoTrace(CODE_STATE *cs);
|
||||
|
||||
/* Test to see if file is writable */
|
||||
#if !(!defined(HAVE_ACCESS) || defined(MSDOS))
|
||||
static BOOLEAN Writable(char *pathname);
|
||||
static BOOLEAN Writable(const char *pathname);
|
||||
/* Change file owner and group */
|
||||
static void ChangeOwner(CODE_STATE *cs, char *pathname);
|
||||
/* Allocate memory for runtime support */
|
||||
@ -343,12 +343,12 @@ static CODE_STATE *code_state(void)
|
||||
if (!(cs=(CODE_STATE *) tmp->dbug))
|
||||
{
|
||||
cs=(CODE_STATE*) DbugMalloc(sizeof(*cs));
|
||||
bzero((char*) cs,sizeof(*cs));
|
||||
bzero((uchar*) cs,sizeof(*cs));
|
||||
cs->process= db_process ? db_process : "dbug";
|
||||
cs->func="?func";
|
||||
cs->file="?file";
|
||||
cs->stack=&init_settings;
|
||||
tmp->dbug=(gptr) cs;
|
||||
tmp->dbug= (void*) cs;
|
||||
}
|
||||
}
|
||||
return cs;
|
||||
@ -715,7 +715,7 @@ void _db_push_(const char *control)
|
||||
void _db_set_init_(const char *control)
|
||||
{
|
||||
CODE_STATE tmp_cs;
|
||||
bzero((char*) &tmp_cs, sizeof(tmp_cs));
|
||||
bzero((uchar*) &tmp_cs, sizeof(tmp_cs));
|
||||
tmp_cs.stack= &init_settings;
|
||||
_db_set_(&tmp_cs, control);
|
||||
}
|
||||
@ -830,7 +830,7 @@ void _db_pop_()
|
||||
} \
|
||||
} 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;
|
||||
|
||||
@ -887,10 +887,10 @@ overflow:
|
||||
* see _db_explain_
|
||||
*/
|
||||
|
||||
int _db_explain_init_(char *buf, int len)
|
||||
int _db_explain_init_(char *buf, size_t len)
|
||||
{
|
||||
CODE_STATE cs;
|
||||
bzero((char*) &cs,sizeof(cs));
|
||||
bzero((uchar*) &cs,sizeof(cs));
|
||||
cs.stack=&init_settings;
|
||||
return _db_explain_(&cs, buf, len);
|
||||
}
|
||||
@ -1083,7 +1083,7 @@ void _db_pargs_(uint _line_, const char *keyword)
|
||||
CODE_STATE *cs=0;
|
||||
get_code_state_or_return;
|
||||
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.
|
||||
*/
|
||||
|
||||
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;
|
||||
char dbuff[90];
|
||||
@ -1168,7 +1169,7 @@ void _db_dump_(uint _line_, const char *keyword, const char *memory, uint length
|
||||
CODE_STATE *cs=0;
|
||||
get_code_state_or_return;
|
||||
|
||||
if (_db_keyword_(cs, (char*) keyword))
|
||||
if (_db_keyword_(cs, keyword))
|
||||
{
|
||||
if (!cs->locked)
|
||||
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);
|
||||
}
|
||||
sprintf(dbuff,"%s: Memory: 0x%lx Bytes: (%d)\n",
|
||||
sprintf(dbuff,"%s: Memory: 0x%lx Bytes: (%ld)\n",
|
||||
keyword,(ulong) memory, length);
|
||||
(void) fputs(dbuff,cs->stack->out_file);
|
||||
|
||||
@ -1292,7 +1293,7 @@ static struct link *ListDel(struct link *head,
|
||||
{
|
||||
struct link *delme=*cur;
|
||||
*cur=(*cur)->next_link;
|
||||
free((char*)delme);
|
||||
free((void*) delme);
|
||||
}
|
||||
} 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)
|
||||
DBUGCloseFile(cs, state->prof_file);
|
||||
if (free_state)
|
||||
free((char *) state);
|
||||
free((void*) state);
|
||||
}
|
||||
|
||||
|
||||
@ -1696,7 +1697,7 @@ static void FreeList(struct link *linkp)
|
||||
{
|
||||
old= linkp;
|
||||
linkp= linkp->next_link;
|
||||
free((char *) old);
|
||||
free((void*) old);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1815,7 +1816,7 @@ static void DBUGOpenFile(CODE_STATE *cs,
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!Writable((char*)name))
|
||||
if (!Writable(name))
|
||||
{
|
||||
(void) fprintf(stderr, ERR_OPEN, cs->process, name);
|
||||
perror("");
|
||||
@ -1988,7 +1989,7 @@ static char *DbugMalloc(size_t size)
|
||||
{
|
||||
register char *new_malloc;
|
||||
|
||||
if (!(new_malloc= (char*) malloc((size_t) size)))
|
||||
if (!(new_malloc= (char*) malloc(size)))
|
||||
DbugExit("out of memory");
|
||||
return new_malloc;
|
||||
}
|
||||
@ -2062,7 +2063,7 @@ static const char *BaseName(const char *pathname)
|
||||
|
||||
#ifndef Writable
|
||||
|
||||
static BOOLEAN Writable(char *pathname)
|
||||
static BOOLEAN Writable(const char *pathname)
|
||||
{
|
||||
REGISTER BOOLEAN granted;
|
||||
REGISTER char *lastslash;
|
||||
|
@ -99,31 +99,31 @@ static struct my_option my_long_options[]=
|
||||
{"debug", '#', "This is a non-debug version. Catch this and exit",
|
||||
0, 0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#else
|
||||
{"debug", '#', "Output debug log", (gptr *) & default_dbug_option,
|
||||
(gptr *) & default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"debug", '#', "Output debug log", (uchar**) & default_dbug_option,
|
||||
(uchar**) & default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"debug-info", 'T', "Print some debug info at exit.", (gptr *) & info_flag,
|
||||
(gptr *) & info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"debug-info", 'T', "Print some debug info at exit.", (uchar**) & info_flag,
|
||||
(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,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"version", 'V', "Prints version", 0, 0, 0, GET_NO_ARG,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"charset", 'C', "Charset dir", (gptr *) & charsets_dir,
|
||||
(gptr *) & charsets_dir,
|
||||
{"charset", 'C', "Charset dir", (uchar**) & charsets_dir,
|
||||
(uchar**) & charsets_dir,
|
||||
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},
|
||||
{"out_dir", 'D', "Output base directory", (gptr *) & DATADIRECTORY,
|
||||
(gptr *) & DATADIRECTORY,
|
||||
{"out_dir", 'D', "Output base directory", (uchar**) & DATADIRECTORY,
|
||||
(uchar**) & DATADIRECTORY,
|
||||
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"out_file", 'O', "Output filename (errmsg.sys)", (gptr *) & OUTFILE,
|
||||
(gptr *) & OUTFILE, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"header_file", 'H', "mysqld_error.h file ", (gptr *) & HEADERFILE,
|
||||
(gptr *) & HEADERFILE, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"name_file", 'N', "mysqld_ername.h file ", (gptr *) & NAMEFILE,
|
||||
(gptr *) & NAMEFILE, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"state_file", 'S', "sql_state.h file", (gptr *) & STATEFILE,
|
||||
(gptr *) & STATEFILE, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"out_file", 'O', "Output filename (errmsg.sys)", (uchar**) & OUTFILE,
|
||||
(uchar**) & OUTFILE, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"header_file", 'H', "mysqld_error.h file ", (uchar**) & HEADERFILE,
|
||||
(uchar**) & HEADERFILE, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"name_file", 'N', "mysqld_ername.h file ", (uchar**) & NAMEFILE,
|
||||
(uchar**) & NAMEFILE, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"state_file", 'S', "sql_state.h file", (uchar**) & STATEFILE,
|
||||
(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}
|
||||
};
|
||||
|
||||
@ -329,21 +329,21 @@ static int create_sys_files(struct languages *lang_head,
|
||||
|
||||
/* continue with header of the errmsg.sys file */
|
||||
length= ftell(to) - HEADER_LENGTH - row_count * 2;
|
||||
bzero((gptr) head, HEADER_LENGTH);
|
||||
bmove((byte *) head, (byte *) file_head, 4);
|
||||
bzero((uchar*) head, HEADER_LENGTH);
|
||||
bmove((uchar *) head, (uchar *) file_head, 4);
|
||||
head[4]= 1;
|
||||
int2store(head + 6, length);
|
||||
int2store(head + 8, row_count);
|
||||
head[30]= csnum;
|
||||
|
||||
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;
|
||||
|
||||
for (i= 0; i < row_count; 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;
|
||||
}
|
||||
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;
|
||||
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)
|
||||
{
|
||||
@ -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_long_name, 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)
|
||||
@ -381,17 +381,17 @@ static void clean_up(struct languages *lang_head, struct errors *error_head)
|
||||
{
|
||||
struct message *tmp;
|
||||
tmp= dynamic_element(&tmp_error->msg, i, struct message*);
|
||||
my_free((gptr) tmp->lang_short_name, MYF(0));
|
||||
my_free((gptr) tmp->text, MYF(0));
|
||||
my_free((uchar*) tmp->lang_short_name, MYF(0));
|
||||
my_free((uchar*) tmp->text, MYF(0));
|
||||
}
|
||||
|
||||
delete_dynamic(&tmp_error->msg);
|
||||
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])
|
||||
my_free((gptr) tmp_error->sql_code2, MYF(0));
|
||||
my_free((gptr) tmp_error->er_name, MYF(0));
|
||||
my_free((gptr) tmp_error, MYF(0));
|
||||
my_free((uchar*) tmp_error->sql_code2, MYF(0));
|
||||
my_free((uchar*) tmp_error->er_name, 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);
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
if (insert_dynamic(¤t_error->msg, (byte *) & current_message))
|
||||
if (insert_dynamic(¤t_error->msg, (uchar *) & current_message))
|
||||
DBUG_RETURN(0);
|
||||
continue;
|
||||
}
|
||||
@ -534,7 +534,7 @@ static uint parse_error_offset(char *str)
|
||||
|
||||
end= 0;
|
||||
ioffset= (uint) my_strtoll10(soffset, &end, &error);
|
||||
my_free((gptr) soffset, MYF(0));
|
||||
my_free((uchar*) soffset, MYF(0));
|
||||
DBUG_RETURN(ioffset);
|
||||
}
|
||||
|
||||
|
@ -51,10 +51,10 @@
|
||||
/* another argument to specify page ranges... seek to right spot and go from there */
|
||||
|
||||
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) */
|
||||
ulint mach_read_from_4(byte *b)
|
||||
ulint mach_read_from_4(uchar *b)
|
||||
{
|
||||
return( ((ulint)(b[0]) << 24)
|
||||
+ ((ulint)(b[1]) << 16)
|
||||
@ -78,7 +78,7 @@ ulint
|
||||
ut_fold_binary(
|
||||
/*===========*/
|
||||
/* out: folded value */
|
||||
byte* str, /* in: string of bytes */
|
||||
uchar* str, /* in: string of bytes */
|
||||
ulint len) /* in: length */
|
||||
{
|
||||
ulint i;
|
||||
@ -98,7 +98,7 @@ ulint
|
||||
buf_calc_page_new_checksum(
|
||||
/*=======================*/
|
||||
/* out: checksum */
|
||||
byte* page) /* in: buffer page */
|
||||
uchar* page) /* in: buffer page */
|
||||
{
|
||||
ulint checksum;
|
||||
|
||||
@ -123,7 +123,7 @@ ulint
|
||||
buf_calc_page_old_checksum(
|
||||
/*=======================*/
|
||||
/* out: checksum */
|
||||
byte* page) /* in: buffer page */
|
||||
uchar* page) /* in: buffer page */
|
||||
{
|
||||
ulint checksum;
|
||||
|
||||
@ -138,7 +138,7 @@ buf_calc_page_old_checksum(
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
FILE *f; /* our input file */
|
||||
byte *p; /* storage of pages read */
|
||||
uchar *p; /* storage of pages read */
|
||||
int bytes; /* bytes read count */
|
||||
ulint ct; /* current page number (0 based) */
|
||||
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) */
|
||||
p= (byte *)malloc(UNIV_PAGE_SIZE);
|
||||
p= (uchar *)malloc(UNIV_PAGE_SIZE);
|
||||
|
||||
/* main checksumming loop */
|
||||
ct= start_page;
|
||||
|
@ -47,30 +47,30 @@ static struct my_option my_long_options[] =
|
||||
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",
|
||||
(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},
|
||||
#ifdef DBUG_OFF
|
||||
{"debug", '#', "This is a non-debug version. Catch this and exit",
|
||||
0,0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#else
|
||||
{"debug", '#', "Output debug log", (gptr*) &default_dbug_option,
|
||||
(gptr*) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"debug", '#', "Output debug log", (uchar**) &default_dbug_option,
|
||||
(uchar**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#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",
|
||||
(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},
|
||||
{"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",
|
||||
(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},
|
||||
{"defaults-group-suffix", 'g',
|
||||
"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},
|
||||
{"extra-file", 'e',
|
||||
"Deprecated. Synonym for --defaults-extra-file.",
|
||||
(gptr*) &my_defaults_extra_file,
|
||||
(gptr*) &my_defaults_extra_file, 0, GET_STR,
|
||||
(uchar**) &my_defaults_extra_file,
|
||||
(uchar**) &my_defaults_extra_file, 0, GET_STR,
|
||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"no-defaults", 'n', "Return an empty string (useful for scripts).",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
|
@ -38,7 +38,7 @@ static struct my_option my_long_options[] =
|
||||
0, 0, 0, 0, 0},
|
||||
{"verbose", 'v',
|
||||
"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,
|
||||
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}
|
||||
|
@ -41,18 +41,18 @@ static struct my_option my_long_options[] =
|
||||
{"info", 'I', "Synonym for --help.", 0, 0, 0, GET_NO_ARG,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
|
||||
{"ndb", 257, "Ndbcluster storage engine specific error codes.", (gptr*) &ndb_code,
|
||||
(gptr*) &ndb_code, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"ndb", 257, "Ndbcluster storage engine specific error codes.", (uchar**) &ndb_code,
|
||||
(uchar**) &ndb_code, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
#ifdef HAVE_SYS_ERRLIST
|
||||
{"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},
|
||||
#endif
|
||||
{"silent", 's', "Only print the error message.", 0, 0, 0, GET_NO_ARG, NO_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"verbose", 'v', "Print error code and message (default).", (gptr*) &verbose,
|
||||
(gptr*) &verbose, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||
{"verbose", 'v', "Print error code and message (default).", (uchar**) &verbose,
|
||||
(uchar**) &verbose, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||
{"version", 'V', "Displays version information and exits.",
|
||||
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}
|
||||
|
103
extra/replace.c
103
extra/replace.c
@ -51,7 +51,7 @@
|
||||
|
||||
typedef struct st_pointer_array { /* when using array-strings */
|
||||
TYPELIB typelib; /* Pointer to strings */
|
||||
byte *str; /* Strings is here */
|
||||
uchar *str; /* Strings is here */
|
||||
int7 *flag; /* Flag about each var. */
|
||||
uint array_allocs,max_count,length,max_length;
|
||||
} POINTER_ARRAY;
|
||||
@ -83,14 +83,14 @@ static int static_get_options(int *argc,char * * *argv);
|
||||
static int get_replace_strings(int *argc,char * * *argv,
|
||||
POINTER_ARRAY *from_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 int convert_pipe(REPLACE *,FILE *,FILE *);
|
||||
static int convert_file(REPLACE *, my_string);
|
||||
static REPLACE *init_replace(my_string *from, my_string *to,uint count,
|
||||
my_string word_end_chars);
|
||||
static uint replace_strings(REPLACE *rep, my_string *start,uint *max_length,
|
||||
my_string from);
|
||||
static int convert_file(REPLACE *, char *);
|
||||
static REPLACE *init_replace(char * *from, char * *to,uint count,
|
||||
char * word_end_chars);
|
||||
static uint replace_strings(REPLACE *rep, char * *start,uint *max_length,
|
||||
char * from);
|
||||
static int initialize_buffer(void);
|
||||
static void reset_buffer(void);
|
||||
static void free_buffer(void);
|
||||
@ -245,10 +245,10 @@ POINTER_ARRAY *from_array,*to_array;
|
||||
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;
|
||||
byte *new_pos;
|
||||
uchar *new_pos;
|
||||
const char **new_array;
|
||||
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 **)
|
||||
my_malloc(((PC_MALLOC-MALLOC_OVERHEAD)/
|
||||
(sizeof(my_string)+sizeof(*pa->flag))*
|
||||
(sizeof(my_string)+sizeof(*pa->flag))),MYF(MY_WME))))
|
||||
(sizeof(char *)+sizeof(*pa->flag))*
|
||||
(sizeof(char *)+sizeof(*pa->flag))),MYF(MY_WME))))
|
||||
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))))
|
||||
{
|
||||
my_free((gptr) pa->typelib.type_names,MYF(0));
|
||||
my_free((uchar*) pa->typelib.type_names,MYF(0));
|
||||
DBUG_RETURN (-1);
|
||||
}
|
||||
pa->max_count=(PC_MALLOC-MALLOC_OVERHEAD)/(sizeof(byte*)+
|
||||
pa->max_count=(PC_MALLOC-MALLOC_OVERHEAD)/(sizeof(uchar*)+
|
||||
sizeof(*pa->flag));
|
||||
pa->flag= (int7*) (pa->typelib.type_names+pa->max_count);
|
||||
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->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,
|
||||
MYF(MY_WME))))
|
||||
DBUG_RETURN(1);
|
||||
@ -295,17 +295,17 @@ static int insert_pointer_name(reg1 POINTER_ARRAY *pa,my_string name)
|
||||
int len;
|
||||
pa->array_allocs++;
|
||||
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/
|
||||
(sizeof(byte*)+sizeof(*pa->flag))*
|
||||
(sizeof(byte*)+sizeof(*pa->flag)),
|
||||
(sizeof(uchar*)+sizeof(*pa->flag))*
|
||||
(sizeof(uchar*)+sizeof(*pa->flag)),
|
||||
MYF(MY_WME))))
|
||||
DBUG_RETURN(1);
|
||||
pa->typelib.type_names=new_array;
|
||||
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);
|
||||
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));
|
||||
}
|
||||
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)
|
||||
{
|
||||
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;
|
||||
my_free((gptr) pa->str,MYF(0));
|
||||
my_free((uchar*) pa->str,MYF(0));
|
||||
}
|
||||
return;
|
||||
} /* 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_found(FOUND_SET *found_set,uint table_offset,
|
||||
int found_offset);
|
||||
static uint start_at_word(my_string pos);
|
||||
static uint end_of_word(my_string pos);
|
||||
static uint replace_len(my_string pos);
|
||||
static uint start_at_word(char * pos);
|
||||
static uint end_of_word(char * pos);
|
||||
static uint replace_len(char * pos);
|
||||
|
||||
static uint found_sets=0;
|
||||
|
||||
|
||||
/* Init a replace structure for further calls */
|
||||
|
||||
static REPLACE *init_replace(my_string *from, my_string *to,uint count,
|
||||
my_string word_end_chars)
|
||||
static REPLACE *init_replace(char * *from, char * *to,uint count,
|
||||
char * word_end_chars)
|
||||
{
|
||||
uint i,j,states,set_nr,len,result_len,max_length,found_end,bits_set,bit_nr;
|
||||
int used_sets,chr;
|
||||
short default_state;
|
||||
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_SET *set,*start_states,*word_states,*new_set;
|
||||
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))))
|
||||
{
|
||||
free_sets(&sets);
|
||||
my_free((gptr) found_set,MYF(0));
|
||||
my_free((uchar*) found_set,MYF(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)+
|
||||
sizeof(REPLACE_STRING)*(found_sets+1)+
|
||||
sizeof(my_string)*count+result_len,
|
||||
sizeof(char *)*count+result_len,
|
||||
MYF(MY_WME | MY_ZEROFILL))))
|
||||
{
|
||||
rep_str=(REPLACE_STRING*) (replace+sets.count);
|
||||
to_array=(my_string*) (rep_str+found_sets+1);
|
||||
to_pos=(my_string) (to_array+count);
|
||||
to_array=(char **) (rep_str+found_sets+1);
|
||||
to_pos=(char *) (to_array+count);
|
||||
for (i=0 ; i < count ; i++)
|
||||
{
|
||||
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));
|
||||
}
|
||||
}
|
||||
my_free((gptr) follow,MYF(0));
|
||||
my_free((uchar*) follow,MYF(0));
|
||||
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_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*
|
||||
SET_MALLOC_HUNC,MYF(MY_WME))))
|
||||
{
|
||||
my_free((gptr) sets->set,MYF(0));
|
||||
my_free((uchar*) sets->set,MYF(0));
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
@ -713,13 +713,13 @@ static REP_SET *make_new_set(REP_SETS *sets)
|
||||
return set;
|
||||
}
|
||||
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,
|
||||
MYF(MY_WME))))
|
||||
return 0;
|
||||
sets->set_buffer=set;
|
||||
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,
|
||||
MYF(MY_WME))))
|
||||
return 0;
|
||||
@ -742,8 +742,8 @@ static void free_last_set(REP_SETS *sets)
|
||||
|
||||
static void free_sets(REP_SETS *sets)
|
||||
{
|
||||
my_free((gptr)sets->set_buffer,MYF(0));
|
||||
my_free((gptr)sets->bit_buffer,MYF(0));
|
||||
my_free((uchar*)sets->set_buffer,MYF(0));
|
||||
my_free((uchar*)sets->bit_buffer,MYF(0));
|
||||
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)
|
||||
{
|
||||
memcpy((byte*) to->bits,(byte*) from->bits,
|
||||
memcpy((uchar*) to->bits,(uchar*) from->bits,
|
||||
(size_t) (sizeof(uint) * to->size_of_bits));
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
@ -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*/
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
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)) ||
|
||||
(end >= pos+2 && !bcmp(end-2,"\\$",2))) ?
|
||||
1 : 0;
|
||||
}
|
||||
|
||||
|
||||
static uint replace_len(my_string str)
|
||||
static uint replace_len(char * str)
|
||||
{
|
||||
uint len=0;
|
||||
while (*str)
|
||||
@ -877,12 +877,12 @@ static uint replace_len(my_string str)
|
||||
|
||||
/* The actual loop */
|
||||
|
||||
static uint replace_strings(REPLACE *rep, my_string *start,uint *max_length,
|
||||
my_string from)
|
||||
static uint replace_strings(REPLACE *rep, char **start, uint *max_length,
|
||||
char *from)
|
||||
{
|
||||
reg1 REPLACE *rep_pos;
|
||||
reg2 REPLACE_STRING *rep_str;
|
||||
my_string to,end,pos,new;
|
||||
char *to, *end, *pos, *new;
|
||||
|
||||
end=(to= *start) + *max_length-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)
|
||||
return (uint) (to - *start)-1;
|
||||
updated=1; /* Some my_string is replaced */
|
||||
updated=1; /* Some char * is replaced */
|
||||
to-=rep_str->to_offset;
|
||||
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;
|
||||
FILE *in,*out;
|
||||
@ -1056,6 +1056,7 @@ static int convert_file(REPLACE *rep, my_string name)
|
||||
char link_name[FN_REFLEN];
|
||||
#endif
|
||||
File temp_file;
|
||||
size_t dir_buff_length;
|
||||
DBUG_ENTER("convert_file");
|
||||
|
||||
/* check if name is a symlink */
|
||||
@ -1065,7 +1066,7 @@ static int convert_file(REPLACE *rep, my_string name)
|
||||
#endif
|
||||
if (!(in= my_fopen(org_name,O_RDONLY,MYF(MY_WME))))
|
||||
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,
|
||||
MYF(MY_WME))) < 0)
|
||||
{
|
||||
|
@ -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},
|
||||
{"version", 'V', "Output version information and exit.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"symbols-file", 's', "Use specified symbols file.", (gptr*) &sym_fname,
|
||||
(gptr*) &sym_fname, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"symbols-file", 's', "Use specified symbols file.", (uchar**) &sym_fname,
|
||||
(uchar**) &sym_fname, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"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, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
||||
};
|
||||
@ -235,7 +235,7 @@ static void init_sym_table()
|
||||
SYM_ENTRY se;
|
||||
if (init_sym_entry(&se, buf))
|
||||
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");
|
||||
}
|
||||
|
||||
@ -255,7 +255,7 @@ static void verify_sort()
|
||||
for (i = 0; i < sym_table.elements; i++)
|
||||
{
|
||||
SYM_ENTRY se;
|
||||
get_dynamic(&sym_table, (gptr)&se, i);
|
||||
get_dynamic(&sym_table, (uchar*)&se, i);
|
||||
if (se.addr < last)
|
||||
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);
|
||||
@ -267,16 +267,16 @@ static void verify_sort()
|
||||
static SYM_ENTRY* resolve_addr(uchar* addr, SYM_ENTRY* se)
|
||||
{
|
||||
uint i;
|
||||
get_dynamic(&sym_table, (gptr)se, 0);
|
||||
get_dynamic(&sym_table, (uchar*)se, 0);
|
||||
if (addr < se->addr)
|
||||
return 0;
|
||||
|
||||
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)
|
||||
{
|
||||
get_dynamic(&sym_table, (gptr)se, i - 1);
|
||||
get_dynamic(&sym_table, (uchar*)se, i - 1);
|
||||
return se;
|
||||
}
|
||||
}
|
||||
|
@ -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},
|
||||
{"info", 'I', "Synonym for --help.",
|
||||
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},
|
||||
{"version", 'V', "Displays version information and exits.",
|
||||
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;
|
||||
}
|
||||
|
||||
/*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)
|
||||
{
|
||||
|
@ -310,10 +310,10 @@ inline double ulonglong2double(ulonglong value)
|
||||
#define doublestore(T,V) do { *((long *) T) = *((long*) &V); \
|
||||
*(((long *) T)+1) = *(((long*) &V)+1); } while(0)
|
||||
#define float4get(V,M) { *((long *) &(V)) = *((long*) (M)); }
|
||||
#define floatstore(T,V) memcpy((byte*)(T), (byte*)(&V), sizeof(float))
|
||||
#define floatget(V,M) memcpy((byte*)(&V), (byte*)(M), sizeof(float))
|
||||
#define floatstore(T,V) memcpy((uchar*)(T), (uchar*)(&V), sizeof(float))
|
||||
#define floatget(V,M) memcpy((uchar*)(&V), (uchar*)(M), sizeof(float))
|
||||
#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))
|
||||
#endif /* _WIN64 */
|
||||
|
||||
|
@ -39,8 +39,8 @@ int longlong2decimal(longlong from, decimal_t *to);
|
||||
int decimal2double(decimal_t *from, double *to);
|
||||
int double2decimal(double from, decimal_t *to);
|
||||
int decimal_actual_fraction(decimal_t *from);
|
||||
int decimal2bin(decimal_t *from, char *to, int precision, int scale);
|
||||
int bin2decimal(char *from, decimal_t *to, int precision, int scale);
|
||||
int decimal2bin(decimal_t *from, uchar *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_bin_size(int precision, int scale);
|
||||
|
@ -32,7 +32,7 @@ typedef struct st_ft_info FT_INFO;
|
||||
struct _ft_vft
|
||||
{
|
||||
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 *);
|
||||
float (*get_relevance)(FT_INFO *);
|
||||
void (*reinit_search)(FT_INFO *);
|
||||
@ -62,8 +62,8 @@ void ft_free_stopwords(void);
|
||||
#define FT_SORTED 2
|
||||
#define FT_EXPAND 4 /* query expansion */
|
||||
|
||||
FT_INFO *ft_init_search(uint,void *, uint, byte *, uint,CHARSET_INFO *, byte *);
|
||||
my_bool ft_boolean_check_syntax_string(const byte *);
|
||||
FT_INFO *ft_init_search(uint,void *, uint, uchar *, uint,CHARSET_INFO *, uchar *);
|
||||
my_bool ft_boolean_check_syntax_string(const uchar *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -30,12 +30,13 @@ extern "C" {
|
||||
/* flags for hash_init */
|
||||
#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 struct st_hash {
|
||||
uint key_offset,key_length; /* Length of key if const length */
|
||||
uint records, blength;
|
||||
size_t key_offset,key_length; /* Length of key if const length */
|
||||
size_t blength;
|
||||
ulong records;
|
||||
uint flags;
|
||||
DYNAMIC_ARRAY array; /* Place for hash_keys */
|
||||
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)
|
||||
my_bool _hash_init(HASH *hash, CHARSET_INFO *charset,
|
||||
uint default_array_elements, uint key_offset,
|
||||
uint key_length, hash_get_key get_key,
|
||||
ulong default_array_elements, size_t key_offset,
|
||||
size_t key_length, hash_get_key get_key,
|
||||
void (*free_element)(void*), uint flags CALLER_INFO_PROTO);
|
||||
void hash_free(HASH *tree);
|
||||
void my_hash_reset(HASH *hash);
|
||||
byte *hash_element(HASH *hash,uint idx);
|
||||
gptr hash_search(const HASH *info, const byte *key, uint length);
|
||||
gptr hash_first(const HASH *info, const byte *key, uint length,
|
||||
uchar *hash_element(HASH *hash,ulong idx);
|
||||
uchar *hash_search(const HASH *info, const uchar *key, size_t length);
|
||||
uchar *hash_first(const HASH *info, const uchar *key, size_t length,
|
||||
HASH_SEARCH_STATE *state);
|
||||
gptr hash_next(const HASH *info, const byte *key, uint length,
|
||||
HASH_SEARCH_STATE *state);
|
||||
my_bool my_hash_insert(HASH *info,const byte *data);
|
||||
my_bool hash_delete(HASH *hash,byte *record);
|
||||
my_bool hash_update(HASH *hash,byte *record,byte *old_key,uint old_key_length);
|
||||
void hash_replace(HASH *hash, HASH_SEARCH_STATE *state, byte *new_row);
|
||||
uchar *hash_next(const HASH *info, const uchar *key, size_t length,
|
||||
HASH_SEARCH_STATE *state);
|
||||
my_bool my_hash_insert(HASH *info,const uchar *data);
|
||||
my_bool hash_delete(HASH *hash,uchar *record);
|
||||
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, uchar *new_row);
|
||||
my_bool hash_check(HASH *hash); /* Only in debug library */
|
||||
|
||||
#define hash_clear(H) bzero((char*) (H),sizeof(*(H)))
|
||||
|
@ -57,7 +57,7 @@ typedef struct st_heapinfo /* Struct from heap_info */
|
||||
|
||||
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;
|
||||
|
||||
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
|
||||
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
|
||||
@ -123,10 +123,10 @@ typedef struct st_hp_keydef /* Key definition with open */
|
||||
ha_rows hash_buckets;
|
||||
TREE rb_tree;
|
||||
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,
|
||||
const byte *record, byte *recpos, int flag);
|
||||
uint (*get_key_length)(struct st_hp_keydef *keydef, const byte *key);
|
||||
const uchar *record, uchar *recpos, int flag);
|
||||
uint (*get_key_length)(struct st_hp_keydef *keydef, const uchar *key);
|
||||
} HP_KEYDEF;
|
||||
|
||||
typedef struct st_heap_share
|
||||
@ -144,8 +144,8 @@ typedef struct st_heap_share
|
||||
uint keys,max_key_length;
|
||||
uint currently_disabled_keys; /* saved value from "keys" when disabled */
|
||||
uint open_count;
|
||||
byte *del_link; /* Link to next block with del. rec */
|
||||
my_string name; /* Name of "memory-file" */
|
||||
uchar *del_link; /* Link to next block with del. rec */
|
||||
char * name; /* Name of "memory-file" */
|
||||
#ifdef THREAD
|
||||
THR_LOCK lock;
|
||||
pthread_mutex_t intern_lock; /* Locking for use with _locking */
|
||||
@ -162,14 +162,14 @@ struct st_hp_hash_info;
|
||||
typedef struct st_heap_info
|
||||
{
|
||||
HP_SHARE *s;
|
||||
byte *current_ptr;
|
||||
uchar *current_ptr;
|
||||
struct st_hp_hash_info *current_hash_ptr;
|
||||
ulong current_record,next_block;
|
||||
int lastinx,errkey;
|
||||
int mode; /* Mode of file (READONLY..) */
|
||||
uint opt_flag,update;
|
||||
byte *lastkey; /* Last used key with rkey */
|
||||
byte *recbuf; /* Record buffer for rb-tree keys */
|
||||
uchar *lastkey; /* Last used key with rkey */
|
||||
uchar *recbuf; /* Record buffer for rb-tree keys */
|
||||
enum ha_rkey_function last_find_flag;
|
||||
TREE_ELEMENT *parents[MAX_TREE_HEIGHT+1];
|
||||
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 int heap_close(HP_INFO *info);
|
||||
extern int heap_write(HP_INFO *info,const byte *buff);
|
||||
extern int heap_update(HP_INFO *info,const byte *old,const byte *newdata);
|
||||
extern int heap_rrnd(HP_INFO *info,byte *buf,byte *pos);
|
||||
extern int heap_write(HP_INFO *info,const uchar *buff);
|
||||
extern int heap_update(HP_INFO *info,const uchar *old,const uchar *newdata);
|
||||
extern int heap_rrnd(HP_INFO *info,uchar *buf,uchar *pos);
|
||||
extern int heap_scan_init(HP_INFO *info);
|
||||
extern int heap_scan(register HP_INFO *info, byte *record);
|
||||
extern int heap_delete(HP_INFO *info,const byte *buff);
|
||||
extern int heap_scan(register HP_INFO *info, uchar *record);
|
||||
extern int heap_delete(HP_INFO *info,const uchar *buff);
|
||||
extern int heap_info(HP_INFO *info,HEAPINFO *x,int flag);
|
||||
extern int heap_create(const char *name, uint keys, HP_KEYDEF *keydef,
|
||||
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_rename(const char *old_name,const char *new_name);
|
||||
extern int heap_panic(enum ha_panic_function flag);
|
||||
extern int heap_rsame(HP_INFO *info,byte *record,int inx);
|
||||
extern int heap_rnext(HP_INFO *info,byte *record);
|
||||
extern int heap_rprev(HP_INFO *info,byte *record);
|
||||
extern int heap_rfirst(HP_INFO *info,byte *record,int inx);
|
||||
extern int heap_rlast(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,uchar *record);
|
||||
extern int heap_rprev(HP_INFO *info,uchar *record);
|
||||
extern int heap_rfirst(HP_INFO *info,uchar *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_keys(HP_INFO *info);
|
||||
extern int heap_disable_indexes(HP_INFO *info);
|
||||
extern int heap_enable_indexes(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,
|
||||
key_range *max_key);
|
||||
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);
|
||||
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 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
|
||||
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)
|
||||
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);
|
||||
#endif
|
||||
#ifdef OLD_HEAP_VERSION
|
||||
@ -244,7 +244,7 @@ typedef ulong HEAP_PTR;
|
||||
#define heap_position(A) heap_position_old(A)
|
||||
#define heap_rrnd(A,B,C) heap_rrnd_old(A,B,C)
|
||||
#else
|
||||
typedef byte *HEAP_PTR;
|
||||
typedef uchar *HEAP_PTR;
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -66,9 +66,9 @@ typedef struct st_key_cache
|
||||
HASH_LINK **hash_root; /* arr. of entries into hash table buckets */
|
||||
HASH_LINK *hash_link_root; /* memory for hash table 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 */
|
||||
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_ins; /* ptr to the insertion block in LRU chain */
|
||||
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);
|
||||
extern void change_key_cache_param(KEY_CACHE *keycache, uint division_limit,
|
||||
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,
|
||||
byte *buff, uint length,
|
||||
uchar *buff, uint length,
|
||||
uint block_length,int return_buffer);
|
||||
extern int key_cache_insert(KEY_CACHE *keycache,
|
||||
File file, my_off_t filepos, int level,
|
||||
byte *buff, uint length);
|
||||
uchar *buff, uint length);
|
||||
extern int key_cache_write(KEY_CACHE *keycache,
|
||||
File file, my_off_t filepos, int level,
|
||||
byte *buff, uint length,
|
||||
uchar *buff, uint length,
|
||||
uint block_length,int force_write);
|
||||
extern int flush_key_blocks(KEY_CACHE *keycache,
|
||||
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 */
|
||||
extern my_bool multi_keycache_init(void);
|
||||
extern void multi_keycache_free(void);
|
||||
extern KEY_CACHE *multi_key_cache_search(byte *key, uint length);
|
||||
extern my_bool multi_key_cache_set(const byte *key, uint length,
|
||||
extern KEY_CACHE *multi_key_cache_search(uchar *key, uint length);
|
||||
extern my_bool multi_key_cache_set(const uchar *key, uint length,
|
||||
KEY_CACHE *key_cache);
|
||||
extern void multi_key_cache_change(KEY_CACHE *old_data,
|
||||
KEY_CACHE *new_data);
|
||||
|
@ -51,8 +51,8 @@ extern MY_UNICASE_INFO *my_unicase_turkish[256];
|
||||
|
||||
typedef struct uni_ctype_st
|
||||
{
|
||||
unsigned char pctype;
|
||||
unsigned char *ctype;
|
||||
uchar pctype;
|
||||
uchar *ctype;
|
||||
} MY_UNI_CTYPE;
|
||||
|
||||
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 */
|
||||
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 */
|
||||
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 *,
|
||||
const uchar *, uint, const uchar *, uint,
|
||||
const uchar *, size_t, const uchar *, size_t,
|
||||
my_bool diff_if_only_endspace_difference);
|
||||
int (*strnxfrm)(struct charset_info_st *,
|
||||
uchar *, uint, const uchar *, uint);
|
||||
uint (*strnxfrmlen)(struct charset_info_st *, uint);
|
||||
size_t (*strnxfrm)(struct charset_info_st *,
|
||||
uchar *, size_t, const uchar *, size_t);
|
||||
size_t (*strnxfrmlen)(struct charset_info_st *, size_t);
|
||||
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,
|
||||
uint res_length,
|
||||
size_t res_length,
|
||||
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 *,
|
||||
const char *str,const char *str_end,
|
||||
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 *);
|
||||
|
||||
uint (*instr)(struct charset_info_st *,
|
||||
const char *b, uint b_length,
|
||||
const char *s, uint s_length,
|
||||
const char *b, size_t b_length,
|
||||
const char *s, size_t s_length,
|
||||
my_match_t *match, uint nmatch);
|
||||
|
||||
/* 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);
|
||||
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;
|
||||
|
||||
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 */
|
||||
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 */
|
||||
int (*ismbchar)(struct charset_info_st *, const char *, const char *);
|
||||
int (*mbcharlen)(struct charset_info_st *, uint);
|
||||
uint (*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);
|
||||
uint (*well_formed_len)(struct charset_info_st *,
|
||||
uint (*ismbchar)(struct charset_info_st *, const char *, const char *);
|
||||
uint (*mbcharlen)(struct charset_info_st *, uint c);
|
||||
size_t (*numchars)(struct charset_info_st *, const char *b, const char *e);
|
||||
size_t (*charpos)(struct charset_info_st *, const char *b, const char *e,
|
||||
size_t pos);
|
||||
size_t (*well_formed_len)(struct charset_info_st *,
|
||||
const char *b,const char *e,
|
||||
uint nchars, int *error);
|
||||
uint (*lengthsp)(struct charset_info_st *, const char *ptr, uint length);
|
||||
uint (*numcells)(struct charset_info_st *, const char *b, const char *e);
|
||||
size_t nchars, int *error);
|
||||
size_t (*lengthsp)(struct charset_info_st *, const char *ptr, size_t length);
|
||||
size_t (*numcells)(struct charset_info_st *, const char *b, const char *e);
|
||||
|
||||
/* Unicode conversion */
|
||||
int (*mb_wc)(struct charset_info_st *cs,my_wc_t *wc,
|
||||
const 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,
|
||||
unsigned char *s,unsigned char *e);
|
||||
uchar *s,uchar *e);
|
||||
|
||||
/* CTYPE scanner */
|
||||
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 */
|
||||
uint (*caseup_str)(struct charset_info_st *, char *);
|
||||
uint (*casedn_str)(struct charset_info_st *, char *);
|
||||
uint (*caseup)(struct charset_info_st *, char *src, uint srclen,
|
||||
char *dst, uint dstlen);
|
||||
uint (*casedn)(struct charset_info_st *, char *src, uint srclen,
|
||||
char *dst, uint dstlen);
|
||||
size_t (*caseup_str)(struct charset_info_st *, char *);
|
||||
size_t (*casedn_str)(struct charset_info_st *, char *);
|
||||
size_t (*caseup)(struct charset_info_st *, char *src, size_t srclen,
|
||||
char *dst, size_t dstlen);
|
||||
size_t (*casedn)(struct charset_info_st *, char *src, size_t srclen,
|
||||
char *dst, size_t dstlen);
|
||||
|
||||
/* Charset dependant snprintf() */
|
||||
int (*snprintf)(struct charset_info_st *, char *to, uint n, const char *fmt,
|
||||
...) ATTRIBUTE_FORMAT_FPTR(printf, 4, 5);
|
||||
int (*long10_to_str)(struct charset_info_st *, char *to, uint n, int radix,
|
||||
long int val);
|
||||
int (*longlong10_to_str)(struct charset_info_st *, char *to, uint n,
|
||||
int radix, longlong val);
|
||||
size_t (*snprintf)(struct charset_info_st *, char *to, size_t n,
|
||||
const char *fmt,
|
||||
...) ATTRIBUTE_FORMAT_FPTR(printf, 4, 5);
|
||||
size_t (*long10_to_str)(struct charset_info_st *, char *to, size_t n,
|
||||
int radix, long int 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 */
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
longlong (*strtoll10)(struct charset_info_st *cs,
|
||||
const char *nptr, char **endptr, int *error);
|
||||
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);
|
||||
ulong (*scan)(struct charset_info_st *, const char *b, const char *e,
|
||||
int sq);
|
||||
size_t (*scan)(struct charset_info_st *, const char *b, const char *e,
|
||||
int sq);
|
||||
} MY_CHARSET_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;
|
||||
|
||||
/* declarations for simple charsets */
|
||||
extern int my_strnxfrm_simple(CHARSET_INFO *, uchar *, uint, const uchar *,
|
||||
uint);
|
||||
uint my_strnxfrmlen_simple(CHARSET_INFO *, uint);
|
||||
extern int my_strnncoll_simple(CHARSET_INFO *, const uchar *, uint,
|
||||
const uchar *, uint, my_bool);
|
||||
extern size_t my_strnxfrm_simple(CHARSET_INFO *, uchar *, size_t,
|
||||
const uchar *, size_t);
|
||||
size_t my_strnxfrmlen_simple(CHARSET_INFO *, size_t);
|
||||
extern int my_strnncoll_simple(CHARSET_INFO *, const uchar *, size_t,
|
||||
const uchar *, size_t, my_bool);
|
||||
|
||||
extern int my_strnncollsp_simple(CHARSET_INFO *, const uchar *, uint,
|
||||
const uchar *, uint,
|
||||
extern int my_strnncollsp_simple(CHARSET_INFO *, const uchar *, size_t,
|
||||
const uchar *, size_t,
|
||||
my_bool diff_if_only_endspace_difference);
|
||||
|
||||
extern void my_hash_sort_simple(CHARSET_INFO *cs,
|
||||
const uchar *key, uint len,
|
||||
const uchar *key, size_t len,
|
||||
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 *,
|
||||
const char *b, uint b_length,
|
||||
const char *s, uint s_length,
|
||||
const char *b, size_t b_length,
|
||||
const char *s, size_t s_length,
|
||||
my_match_t *match, uint nmatch);
|
||||
|
||||
|
||||
/* Functions for 8bit */
|
||||
extern uint my_caseup_str_8bit(CHARSET_INFO *, char *);
|
||||
extern uint my_casedn_str_8bit(CHARSET_INFO *, char *);
|
||||
extern uint my_caseup_8bit(CHARSET_INFO *, char *src, uint srclen,
|
||||
char *dst, uint dstlen);
|
||||
extern uint my_casedn_8bit(CHARSET_INFO *, char *src, uint srclen,
|
||||
char *dst, uint dstlen);
|
||||
extern size_t my_caseup_str_8bit(CHARSET_INFO *, char *);
|
||||
extern size_t my_casedn_str_8bit(CHARSET_INFO *, char *);
|
||||
extern size_t my_caseup_8bit(CHARSET_INFO *, char *src, size_t srclen,
|
||||
char *dst, size_t dstlen);
|
||||
extern size_t my_casedn_8bit(CHARSET_INFO *, char *src, size_t srclen,
|
||||
char *dst, size_t dstlen);
|
||||
|
||||
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_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,
|
||||
const char *fmt, ...)
|
||||
size_t my_snprintf_8bit(struct charset_info_st *, char *to, size_t n,
|
||||
const char *fmt, ...)
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
ulonglong my_strntoull_8bit(CHARSET_INFO *, const char *s, uint l, int base,
|
||||
char **e, int *err);
|
||||
double my_strntod_8bit(CHARSET_INFO *, char *s, uint l,char **e,
|
||||
double my_strntod_8bit(CHARSET_INFO *, char *s, size_t l,char **e,
|
||||
int *err);
|
||||
int my_long10_to_str_8bit(CHARSET_INFO *, char *to, uint l, int radix,
|
||||
long int val);
|
||||
int my_longlong10_to_str_8bit(CHARSET_INFO *, char *to, uint l, int radix,
|
||||
longlong val);
|
||||
size_t my_long10_to_str_8bit(CHARSET_INFO *, char *to, size_t l, int radix,
|
||||
long int val);
|
||||
size_t my_longlong10_to_str_8bit(CHARSET_INFO *, char *to, size_t l, int radix,
|
||||
longlong val);
|
||||
|
||||
longlong my_strtoll10_8bit(CHARSET_INFO *cs,
|
||||
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);
|
||||
|
||||
ulonglong my_strntoull10rnd_8bit(CHARSET_INFO *cs,
|
||||
const char *str, uint length, int unsigned_fl,
|
||||
char **endptr, int *error);
|
||||
const char *str, size_t length, int
|
||||
unsigned_fl, char **endptr, int *error);
|
||||
ulonglong my_strntoull10rnd_ucs2(CHARSET_INFO *cs,
|
||||
const char *str, uint length, int unsigned_fl,
|
||||
char **endptr, int *error);
|
||||
const char *str, size_t length,
|
||||
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,
|
||||
const char *ptr, uint ptr_length,
|
||||
const char *ptr, size_t ptr_length,
|
||||
pbool escape, pbool w_one, pbool w_many,
|
||||
uint res_length,
|
||||
size_t res_length,
|
||||
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,
|
||||
const char *ptr, uint ptr_length,
|
||||
const char *ptr, size_t ptr_length,
|
||||
pbool escape, pbool w_one, pbool w_many,
|
||||
uint res_length,
|
||||
size_t res_length,
|
||||
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,
|
||||
const char *ptr, uint ptr_length,
|
||||
const char *ptr, size_t ptr_length,
|
||||
pbool escape, pbool w_one, pbool w_many,
|
||||
uint res_length,
|
||||
size_t res_length,
|
||||
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 *,
|
||||
@ -407,35 +410,35 @@ int my_wildcmp_bin(CHARSET_INFO *,
|
||||
const char *wildstr,const char *wildend,
|
||||
int escape, int w_one, int w_many);
|
||||
|
||||
uint my_numchars_8bit(CHARSET_INFO *, const char *b, const char *e);
|
||||
uint 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);
|
||||
uint my_well_formed_len_8bit(CHARSET_INFO *, const char *b, const char *e,
|
||||
uint pos, int *error);
|
||||
int my_mbcharlen_8bit(CHARSET_INFO *, uint c);
|
||||
size_t my_numchars_8bit(CHARSET_INFO *, const char *b, const char *e);
|
||||
size_t my_numcells_8bit(CHARSET_INFO *, const char *b, const char *e);
|
||||
size_t my_charpos_8bit(CHARSET_INFO *, const char *b, const char *e, size_t pos);
|
||||
size_t my_well_formed_len_8bit(CHARSET_INFO *, const char *b, const char *e,
|
||||
size_t pos, int *error);
|
||||
uint my_mbcharlen_8bit(CHARSET_INFO *, uint c);
|
||||
|
||||
|
||||
/* Functions for multibyte charsets */
|
||||
extern uint my_caseup_str_mb(CHARSET_INFO *, char *);
|
||||
extern uint my_casedn_str_mb(CHARSET_INFO *, char *);
|
||||
extern uint my_caseup_mb(CHARSET_INFO *, char *src, uint srclen,
|
||||
char *dst, uint dstlen);
|
||||
extern uint my_casedn_mb(CHARSET_INFO *, char *src, uint srclen,
|
||||
char *dst, uint dstlen);
|
||||
extern size_t my_caseup_str_mb(CHARSET_INFO *, char *);
|
||||
extern size_t my_casedn_str_mb(CHARSET_INFO *, char *);
|
||||
extern size_t my_caseup_mb(CHARSET_INFO *, char *src, size_t srclen,
|
||||
char *dst, size_t dstlen);
|
||||
extern size_t my_casedn_mb(CHARSET_INFO *, char *src, size_t srclen,
|
||||
char *dst, size_t dstlen);
|
||||
extern int my_strcasecmp_mb(CHARSET_INFO * cs,const char *, const char *);
|
||||
|
||||
int my_wildcmp_mb(CHARSET_INFO *,
|
||||
const char *str,const char *str_end,
|
||||
const char *wildstr,const char *wildend,
|
||||
int escape, int w_one, int w_many);
|
||||
uint my_numchars_mb(CHARSET_INFO *, const char *b, const char *e);
|
||||
uint 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);
|
||||
uint my_well_formed_len_mb(CHARSET_INFO *, const char *b, const char *e,
|
||||
uint pos, int *error);
|
||||
size_t my_numchars_mb(CHARSET_INFO *, const char *b, const char *e);
|
||||
size_t my_numcells_mb(CHARSET_INFO *, const char *b, const char *e);
|
||||
size_t my_charpos_mb(CHARSET_INFO *, const char *b, const char *e, size_t pos);
|
||||
size_t my_well_formed_len_mb(CHARSET_INFO *, const char *b, const char *e,
|
||||
size_t pos, int *error);
|
||||
uint my_instr_mb(struct charset_info_st *,
|
||||
const char *b, uint b_length,
|
||||
const char *s, uint s_length,
|
||||
const char *b, size_t b_length,
|
||||
const char *s, size_t s_length,
|
||||
my_match_t *match, uint nmatch);
|
||||
|
||||
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,
|
||||
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));
|
||||
extern char *my_strchr(CHARSET_INFO *cs, const char *str, const char *end,
|
||||
pchar c);
|
||||
|
||||
my_bool my_propagate_simple(CHARSET_INFO *cs, const uchar *str, uint len);
|
||||
my_bool my_propagate_complex(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, size_t len);
|
||||
|
||||
|
||||
#define _MY_U 01 /* Upper case */
|
||||
|
@ -112,59 +112,59 @@ extern char NEAR _dig_vec_lower[];
|
||||
/* Prototypes for string functions */
|
||||
|
||||
#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
|
||||
|
||||
#if !defined(bzero) && !defined(HAVE_BZERO)
|
||||
extern void bzero(gptr dst,uint len);
|
||||
extern void bzero(uchar * dst,size_t len);
|
||||
#endif
|
||||
|
||||
#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
|
||||
#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
|
||||
#define bcmp(A,B,C) my_bcmp((A),(B),(C))
|
||||
#endif
|
||||
|
||||
#ifndef bmove512
|
||||
extern void bmove512(gptr dst,const gptr src,uint len);
|
||||
extern void bmove512(uchar *dst,const uchar *src,size_t len);
|
||||
#endif
|
||||
|
||||
#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
|
||||
|
||||
extern void bmove_upp(char *dst,const char *src,uint len);
|
||||
extern void bchange(char *dst,uint old_len,const char *src,
|
||||
uint new_len,uint tot_len);
|
||||
extern void strappend(char *s,uint len,pchar fill);
|
||||
extern void bmove_upp(uchar *dst,const uchar *src,size_t len);
|
||||
extern void bchange(uchar *dst,size_t old_len,const uchar *src,
|
||||
size_t new_len,size_t tot_len);
|
||||
extern void strappend(char *s,size_t len,pchar fill);
|
||||
extern char *strend(const char *s);
|
||||
extern char *strcend(const char *, pchar);
|
||||
extern char *strfield(char *src,int fields,int chars,int blanks,
|
||||
int tabch);
|
||||
extern char *strfill(my_string s,uint len,pchar fill);
|
||||
extern uint strinstr(const char *str,const char *search);
|
||||
extern uint r_strinstr(reg1 my_string str,int from, reg4 my_string search);
|
||||
extern char *strfill(char * s,size_t len,pchar fill);
|
||||
extern size_t strinstr(const char *str,const char *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 *strmake(char *dst,const char *src,uint length);
|
||||
extern char *strmake(char *dst,const char *src,size_t length);
|
||||
#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
|
||||
|
||||
#ifndef strmov
|
||||
extern char *strmov(char *dst,const char *src);
|
||||
#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 *strcont(const char *src,const char *set);
|
||||
extern char *strxcat _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 *strxncat _VARARGS((char *dst,uint len, const char *src, ...));
|
||||
extern char *strxnmov _VARARGS((char *dst,uint len, const char *src, ...));
|
||||
extern char *strxncpy _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,size_t len, const char *src, ...));
|
||||
extern char *strxncpy _VARARGS((char *dst,size_t len, const char *src, ...));
|
||||
|
||||
/* Prototypes of normal stringfunctions (with may ours) */
|
||||
|
||||
@ -179,7 +179,7 @@ extern size_t strlen(const char *);
|
||||
#endif
|
||||
#endif
|
||||
#ifndef HAVE_STRNLEN
|
||||
extern uint strnlen(const char *s, uint n);
|
||||
extern size_t strnlen(const char *s, size_t n);
|
||||
#endif
|
||||
|
||||
#if !defined(__cplusplus)
|
||||
@ -232,9 +232,9 @@ extern ulonglong strtoull(const char *str, char **ptr, int base);
|
||||
|
||||
/* my_vsnprintf.c */
|
||||
|
||||
extern int my_vsnprintf( char *str, size_t n,
|
||||
const char *format, va_list ap );
|
||||
extern int my_snprintf(char *to, size_t n, const char *fmt, ...)
|
||||
extern size_t my_vsnprintf(char *str, size_t n,
|
||||
const char *format, va_list ap);
|
||||
extern size_t my_snprintf(char *to, size_t n, const char *fmt, ...)
|
||||
ATTRIBUTE_FORMAT(printf, 3, 4);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
@ -245,17 +245,18 @@ extern int my_snprintf(char *to, size_t n, const char *fmt, ...)
|
||||
LEX_STRING -- a pair of a C-string and its length.
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char *str;
|
||||
uint length;
|
||||
size_t length;
|
||||
} LEX_STRING;
|
||||
|
||||
#define STRING_WITH_LEN(X) (X), ((uint) (sizeof(X) - 1))
|
||||
#define C_STRING_WITH_LEN(X) ((char *) (X)), ((uint) (sizeof(X) - 1))
|
||||
#define STRING_WITH_LEN(X) (X), ((size_t) (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
|
||||
|
@ -37,8 +37,8 @@ typedef struct st_mem_root
|
||||
USED_MEM *used; /* blocks almost without free memory */
|
||||
USED_MEM *pre_alloc; /* preallocated block */
|
||||
/* if block have less memory it will be put in 'used' list */
|
||||
unsigned int min_malloc;
|
||||
unsigned int block_size; /* initial block size */
|
||||
size_t min_malloc;
|
||||
size_t block_size; /* initial block size */
|
||||
unsigned int block_num; /* allocated blocks counter */
|
||||
/*
|
||||
first free block in queue test counter (if it exceed
|
||||
|
@ -478,7 +478,7 @@ enum data_file_type {
|
||||
|
||||
typedef struct st_key_range
|
||||
{
|
||||
const byte *key;
|
||||
const uchar *key;
|
||||
uint length;
|
||||
key_part_map keypart_map;
|
||||
enum ha_rkey_function flag;
|
||||
|
@ -23,8 +23,8 @@ extern "C" {
|
||||
struct _db_code_state_;
|
||||
extern int _db_keyword_(struct _db_code_state_ *cs, 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_init_(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, size_t len);
|
||||
extern void _db_setjmp_(void);
|
||||
extern void _db_longjmp_(void);
|
||||
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_doprnt_ _VARARGS((const char *format,...))
|
||||
ATTRIBUTE_FORMAT(printf, 1, 2);
|
||||
extern void _db_dump_(uint _line_,const char *keyword,const char *memory,
|
||||
uint length);
|
||||
extern void _db_dump_(uint _line_,const char *keyword,
|
||||
const unsigned char *memory, size_t length);
|
||||
extern void _db_end_(void);
|
||||
extern void _db_lock_file_(void);
|
||||
extern void _db_unlock_file_(void);
|
||||
|
@ -44,8 +44,8 @@ struct my_option
|
||||
const char *name; /* Name of the option */
|
||||
int id; /* unique id or short option */
|
||||
const char *comment; /* option comment, for autom. --help */
|
||||
gptr *value; /* The variable value */
|
||||
gptr *u_max_value; /* The user def. max variable value */
|
||||
uchar **value; /* The variable value */
|
||||
uchar **u_max_value; /* The user def. max variable value */
|
||||
struct st_typelib *typelib; /* Pointer to possible values */
|
||||
ulong var_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);
|
||||
extern void my_print_help(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 *));
|
||||
|
||||
ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp);
|
||||
|
@ -885,21 +885,14 @@ typedef long my_ptrdiff_t;
|
||||
typedef long long my_ptrdiff_t;
|
||||
#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 ALIGN_SIZE(A) MY_ALIGN((A),sizeof(double))
|
||||
/* Size to make adressable obj. */
|
||||
#define ALIGN_PTR(A, t) ((t*) MY_ALIGN((A),sizeof(t)))
|
||||
/* Offset of field f in structure t */
|
||||
#define OFFSET(t, f) ((size_t)(char *)&((t *)0)->f)
|
||||
#define ADD_TO_PTR(ptr,size,type) (type) ((byte*) (ptr)+size)
|
||||
#define PTR_BYTE_DIFF(A,B) (my_ptrdiff_t) ((byte*) (A) - (byte*) (B))
|
||||
#define ADD_TO_PTR(ptr,size,type) (type) ((uchar*) (ptr)+size)
|
||||
#define PTR_BYTE_DIFF(A,B) (my_ptrdiff_t) ((uchar*) (A) - (uchar*) (B))
|
||||
|
||||
/*
|
||||
Custom version of standard offsetof() macro which can be used to get
|
||||
@ -934,11 +927,6 @@ typedef unsigned long long my_size_t;
|
||||
|
||||
/* Typdefs for easyier portability */
|
||||
|
||||
#if defined(VOIDTYPE)
|
||||
typedef void *gptr; /* Generic pointer */
|
||||
#else
|
||||
typedef char *gptr; /* Generic pointer */
|
||||
#endif
|
||||
#ifndef HAVE_UCHAR
|
||||
typedef unsigned char uchar; /* Short for unsigned char */
|
||||
#endif
|
||||
@ -1059,12 +1047,7 @@ typedef off_t os_off_t;
|
||||
|
||||
typedef uint8 int7; /* Most effective integer 0 <= x <= 127 */
|
||||
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 */
|
||||
#ifndef byte_defined
|
||||
typedef char byte; /* Smallest addressable unit */
|
||||
#endif
|
||||
typedef char my_bool; /* Small bool */
|
||||
#if !defined(bool) && !defined(bool_defined) && (!defined(HAVE_BOOL) || !defined(__cplusplus))
|
||||
typedef char bool; /* Ordinary boolean values 0 1 */
|
||||
@ -1210,9 +1193,9 @@ do { doubleget_union _tmp; \
|
||||
} while (0)
|
||||
#define float4get(V,M) do { *((float *) &(V)) = *((float*) (M)); } while(0)
|
||||
#define float8get(V,M) doubleget((V),(M))
|
||||
#define float4store(V,M) memcpy((byte*) V,(byte*) (&M),sizeof(float))
|
||||
#define floatstore(T,V) memcpy((byte*)(T), (byte*)(&V),sizeof(float))
|
||||
#define floatget(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((uchar*)(T), (uchar*)(&V),sizeof(float))
|
||||
#define floatget(V,M) memcpy((uchar*) &V,(uchar*) (M),sizeof(float))
|
||||
#define float8store(V,M) doublestore((V),(M))
|
||||
#endif /* __i386__ */
|
||||
|
||||
@ -1295,59 +1278,59 @@ do { doubleget_union _tmp; \
|
||||
int4store((T),def_temp); \
|
||||
int4store((T+4),def_temp2); } while(0)
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
#define float4store(T,A) do { *(T)= ((byte *) &A)[3];\
|
||||
*((T)+1)=(char) ((byte *) &A)[2];\
|
||||
*((T)+2)=(char) ((byte *) &A)[1];\
|
||||
*((T)+3)=(char) ((byte *) &A)[0]; } while(0)
|
||||
#define float4store(T,A) do { *(T)= ((uchar *) &A)[3];\
|
||||
*((T)+1)=(char) ((uchar *) &A)[2];\
|
||||
*((T)+2)=(char) ((uchar *) &A)[1];\
|
||||
*((T)+3)=(char) ((uchar *) &A)[0]; } while(0)
|
||||
|
||||
#define float4get(V,M) do { float def_temp;\
|
||||
((byte*) &def_temp)[0]=(M)[3];\
|
||||
((byte*) &def_temp)[1]=(M)[2];\
|
||||
((byte*) &def_temp)[2]=(M)[1];\
|
||||
((byte*) &def_temp)[3]=(M)[0];\
|
||||
((uchar*) &def_temp)[0]=(M)[3];\
|
||||
((uchar*) &def_temp)[1]=(M)[2];\
|
||||
((uchar*) &def_temp)[2]=(M)[1];\
|
||||
((uchar*) &def_temp)[3]=(M)[0];\
|
||||
(V)=def_temp; } while(0)
|
||||
#define float8store(T,V) do { *(T)= ((byte *) &V)[7];\
|
||||
*((T)+1)=(char) ((byte *) &V)[6];\
|
||||
*((T)+2)=(char) ((byte *) &V)[5];\
|
||||
*((T)+3)=(char) ((byte *) &V)[4];\
|
||||
*((T)+4)=(char) ((byte *) &V)[3];\
|
||||
*((T)+5)=(char) ((byte *) &V)[2];\
|
||||
*((T)+6)=(char) ((byte *) &V)[1];\
|
||||
*((T)+7)=(char) ((byte *) &V)[0]; } while(0)
|
||||
#define float8store(T,V) do { *(T)= ((uchar *) &V)[7];\
|
||||
*((T)+1)=(char) ((uchar *) &V)[6];\
|
||||
*((T)+2)=(char) ((uchar *) &V)[5];\
|
||||
*((T)+3)=(char) ((uchar *) &V)[4];\
|
||||
*((T)+4)=(char) ((uchar *) &V)[3];\
|
||||
*((T)+5)=(char) ((uchar *) &V)[2];\
|
||||
*((T)+6)=(char) ((uchar *) &V)[1];\
|
||||
*((T)+7)=(char) ((uchar *) &V)[0]; } while(0)
|
||||
|
||||
#define float8get(V,M) do { double def_temp;\
|
||||
((byte*) &def_temp)[0]=(M)[7];\
|
||||
((byte*) &def_temp)[1]=(M)[6];\
|
||||
((byte*) &def_temp)[2]=(M)[5];\
|
||||
((byte*) &def_temp)[3]=(M)[4];\
|
||||
((byte*) &def_temp)[4]=(M)[3];\
|
||||
((byte*) &def_temp)[5]=(M)[2];\
|
||||
((byte*) &def_temp)[6]=(M)[1];\
|
||||
((byte*) &def_temp)[7]=(M)[0];\
|
||||
((uchar*) &def_temp)[0]=(M)[7];\
|
||||
((uchar*) &def_temp)[1]=(M)[6];\
|
||||
((uchar*) &def_temp)[2]=(M)[5];\
|
||||
((uchar*) &def_temp)[3]=(M)[4];\
|
||||
((uchar*) &def_temp)[4]=(M)[3];\
|
||||
((uchar*) &def_temp)[5]=(M)[2];\
|
||||
((uchar*) &def_temp)[6]=(M)[1];\
|
||||
((uchar*) &def_temp)[7]=(M)[0];\
|
||||
(V) = def_temp; } while(0)
|
||||
#else
|
||||
#define float4get(V,M) memcpy_fixed((byte*) &V,(byte*) (M),sizeof(float))
|
||||
#define float4store(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((uchar*) V,(uchar*) (&M),sizeof(float))
|
||||
|
||||
#if defined(__FLOAT_WORD_ORDER) && (__FLOAT_WORD_ORDER == __BIG_ENDIAN)
|
||||
#define doublestore(T,V) do { *(((char*)T)+0)=(char) ((byte *) &V)[4];\
|
||||
*(((char*)T)+1)=(char) ((byte *) &V)[5];\
|
||||
*(((char*)T)+2)=(char) ((byte *) &V)[6];\
|
||||
*(((char*)T)+3)=(char) ((byte *) &V)[7];\
|
||||
*(((char*)T)+4)=(char) ((byte *) &V)[0];\
|
||||
*(((char*)T)+5)=(char) ((byte *) &V)[1];\
|
||||
*(((char*)T)+6)=(char) ((byte *) &V)[2];\
|
||||
*(((char*)T)+7)=(char) ((byte *) &V)[3]; }\
|
||||
#define doublestore(T,V) do { *(((char*)T)+0)=(char) ((uchar *) &V)[4];\
|
||||
*(((char*)T)+1)=(char) ((uchar *) &V)[5];\
|
||||
*(((char*)T)+2)=(char) ((uchar *) &V)[6];\
|
||||
*(((char*)T)+3)=(char) ((uchar *) &V)[7];\
|
||||
*(((char*)T)+4)=(char) ((uchar *) &V)[0];\
|
||||
*(((char*)T)+5)=(char) ((uchar *) &V)[1];\
|
||||
*(((char*)T)+6)=(char) ((uchar *) &V)[2];\
|
||||
*(((char*)T)+7)=(char) ((uchar *) &V)[3]; }\
|
||||
while(0)
|
||||
#define doubleget(V,M) do { double def_temp;\
|
||||
((byte*) &def_temp)[0]=(M)[4];\
|
||||
((byte*) &def_temp)[1]=(M)[5];\
|
||||
((byte*) &def_temp)[2]=(M)[6];\
|
||||
((byte*) &def_temp)[3]=(M)[7];\
|
||||
((byte*) &def_temp)[4]=(M)[0];\
|
||||
((byte*) &def_temp)[5]=(M)[1];\
|
||||
((byte*) &def_temp)[6]=(M)[2];\
|
||||
((byte*) &def_temp)[7]=(M)[3];\
|
||||
((uchar*) &def_temp)[0]=(M)[4];\
|
||||
((uchar*) &def_temp)[1]=(M)[5];\
|
||||
((uchar*) &def_temp)[2]=(M)[6];\
|
||||
((uchar*) &def_temp)[3]=(M)[7];\
|
||||
((uchar*) &def_temp)[4]=(M)[0];\
|
||||
((uchar*) &def_temp)[5]=(M)[1];\
|
||||
((uchar*) &def_temp)[6]=(M)[2];\
|
||||
((uchar*) &def_temp)[7]=(M)[3];\
|
||||
(V) = def_temp; } while(0)
|
||||
#endif /* __FLOAT_WORD_ORDER */
|
||||
|
||||
@ -1378,16 +1361,16 @@ do { doubleget_union _tmp; \
|
||||
#define shortget(V,M) do { V = (short) (((short) ((uchar) (M)[1]))+\
|
||||
((short) ((short) (M)[0]) << 8)); } while(0)
|
||||
#define longget(V,M) do { int32 def_temp;\
|
||||
((byte*) &def_temp)[0]=(M)[0];\
|
||||
((byte*) &def_temp)[1]=(M)[1];\
|
||||
((byte*) &def_temp)[2]=(M)[2];\
|
||||
((byte*) &def_temp)[3]=(M)[3];\
|
||||
((uchar*) &def_temp)[0]=(M)[0];\
|
||||
((uchar*) &def_temp)[1]=(M)[1];\
|
||||
((uchar*) &def_temp)[2]=(M)[2];\
|
||||
((uchar*) &def_temp)[3]=(M)[3];\
|
||||
(V)=def_temp; } while(0)
|
||||
#define ulongget(V,M) do { uint32 def_temp;\
|
||||
((byte*) &def_temp)[0]=(M)[0];\
|
||||
((byte*) &def_temp)[1]=(M)[1];\
|
||||
((byte*) &def_temp)[2]=(M)[2];\
|
||||
((byte*) &def_temp)[3]=(M)[3];\
|
||||
((uchar*) &def_temp)[0]=(M)[0];\
|
||||
((uchar*) &def_temp)[1]=(M)[1];\
|
||||
((uchar*) &def_temp)[2]=(M)[2];\
|
||||
((uchar*) &def_temp)[3]=(M)[3];\
|
||||
(V)=def_temp; } while(0)
|
||||
#define shortstore(T,A) do { uint def_temp=(uint) (A) ;\
|
||||
*(((char*)T)+1)=(char)(def_temp); \
|
||||
@ -1397,12 +1380,12 @@ do { doubleget_union _tmp; \
|
||||
*(((char*)T)+1)=(((A) >> 16));\
|
||||
*(((char*)T)+0)=(((A) >> 24)); } while(0)
|
||||
|
||||
#define floatget(V,M) memcpy_fixed((byte*) &V,(byte*) (M),sizeof(float))
|
||||
#define floatstore(T,V) memcpy_fixed((byte*) (T),(byte*)(&V),sizeof(float))
|
||||
#define doubleget(V,M) memcpy_fixed((byte*) &V,(byte*) (M),sizeof(double))
|
||||
#define doublestore(T,V) memcpy_fixed((byte*) (T),(byte*) &V,sizeof(double))
|
||||
#define longlongget(V,M) memcpy_fixed((byte*) &V,(byte*) (M),sizeof(ulonglong))
|
||||
#define longlongstore(T,V) memcpy_fixed((byte*) (T),(byte*) &V,sizeof(ulonglong))
|
||||
#define floatget(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(float))
|
||||
#define floatstore(T,V) memcpy_fixed((uchar*) (T),(uchar*)(&V),sizeof(float))
|
||||
#define doubleget(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(double))
|
||||
#define doublestore(T,V) memcpy_fixed((uchar*) (T),(uchar*) &V,sizeof(double))
|
||||
#define longlongget(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(ulonglong))
|
||||
#define longlongstore(T,V) memcpy_fixed((uchar*) (T),(uchar*) &V,sizeof(ulonglong))
|
||||
|
||||
#else
|
||||
|
||||
@ -1413,15 +1396,15 @@ do { doubleget_union _tmp; \
|
||||
#define shortstore(T,V) int2store(T,V)
|
||||
#define longstore(T,V) int4store(T,V)
|
||||
#ifndef floatstore
|
||||
#define floatstore(T,V) memcpy_fixed((byte*) (T),(byte*) (&V),sizeof(float))
|
||||
#define floatget(V,M) memcpy_fixed((byte*) &V, (byte*) (M), sizeof(float))
|
||||
#define floatstore(T,V) memcpy_fixed((uchar*) (T),(uchar*) (&V),sizeof(float))
|
||||
#define floatget(V,M) memcpy_fixed((uchar*) &V, (uchar*) (M), sizeof(float))
|
||||
#endif
|
||||
#ifndef doubleget
|
||||
#define doubleget(V,M) memcpy_fixed((byte*) &V,(byte*) (M),sizeof(double))
|
||||
#define doublestore(T,V) memcpy_fixed((byte*) (T),(byte*) &V,sizeof(double))
|
||||
#define doubleget(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(double))
|
||||
#define doublestore(T,V) memcpy_fixed((uchar*) (T),(uchar*) &V,sizeof(double))
|
||||
#endif /* doubleget */
|
||||
#define longlongget(V,M) memcpy_fixed((byte*) &V,(byte*) (M),sizeof(ulonglong))
|
||||
#define longlongstore(T,V) memcpy_fixed((byte*) (T),(byte*) &V,sizeof(ulonglong))
|
||||
#define longlongget(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(ulonglong))
|
||||
#define longlongstore(T,V) memcpy_fixed((uchar*) (T),(uchar*) &V,sizeof(ulonglong))
|
||||
|
||||
#endif /* WORDS_BIGENDIAN */
|
||||
|
||||
|
@ -33,11 +33,11 @@ extern LIST *list_cons(void *data,LIST *root);
|
||||
extern LIST *list_reverse(LIST *root);
|
||||
extern void list_free(LIST *root,unsigned int free_data);
|
||||
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_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
|
||||
}
|
||||
|
@ -35,8 +35,9 @@ extern "C" {
|
||||
#undef my_seek
|
||||
#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)
|
||||
extern uint my_quick_read(File Filedes,byte *Buffer,uint Count,myf myFlags);
|
||||
extern uint my_quick_write(File Filedes,const byte *Buffer,uint Count);
|
||||
extern size_t my_quick_read(File Filedes,uchar *Buffer,size_t Count,
|
||||
myf myFlags);
|
||||
extern size_t my_quick_write(File Filedes,const uchar *Buffer,size_t Count);
|
||||
|
||||
#if !defined(SAFEMALLOC) && defined(USE_HALLOC)
|
||||
#define my_malloc(a,b) halloc(a,1)
|
||||
|
@ -688,7 +688,7 @@ struct st_my_thread_var
|
||||
struct st_my_thread_var *next,**prev;
|
||||
void *opt_info;
|
||||
#ifndef DBUG_OFF
|
||||
gptr dbug;
|
||||
void *dbug;
|
||||
char name[THREAD_NAME_SIZE+1];
|
||||
#endif
|
||||
};
|
||||
|
275
include/my_sys.h
275
include/my_sys.h
@ -41,7 +41,7 @@ extern int NEAR my_errno; /* Last error in mysys */
|
||||
|
||||
#define ERRMSGSIZE (SC_MAXWIDTH) /* Max length of a error message */
|
||||
#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 */
|
||||
#define MY_FFNF 1 /* Fatal if file not found */
|
||||
@ -153,13 +153,13 @@ extern ulonglong sf_malloc_mem_limit;
|
||||
#define TERMINATE(A) {}
|
||||
#define QUICK_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 )
|
||||
extern gptr my_realloc(gptr oldpoint,uint Size,myf MyFlags);
|
||||
extern void my_no_flags_free(gptr ptr);
|
||||
extern gptr my_memdup(const byte *from,uint length,myf MyFlags);
|
||||
extern void *my_realloc(void *oldpoint, size_t Size, myf MyFlags);
|
||||
extern void my_no_flags_free(void *ptr);
|
||||
extern void *my_memdup(const void *from,size_t length,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);
|
||||
/* 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))
|
||||
@ -171,8 +171,8 @@ extern char *my_strndup(const char *from, uint length,
|
||||
|
||||
#ifdef HAVE_LARGE_PAGES
|
||||
extern uint my_get_large_page_size(void);
|
||||
extern gptr my_large_malloc(uint size, myf my_flags);
|
||||
extern void my_large_free(gptr ptr, myf my_flags);
|
||||
extern uchar * my_large_malloc(size_t size, myf my_flags);
|
||||
extern void my_large_free(uchar * ptr, myf my_flags);
|
||||
#else
|
||||
#define my_get_large_page_size() (0)
|
||||
#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 not_pos; /* Start of not-theese-files */
|
||||
my_string *wild; /* Pointer to wildcards */
|
||||
char * *wild; /* Pointer to wildcards */
|
||||
} WF_PACK;
|
||||
|
||||
enum loglevel {
|
||||
@ -284,7 +284,7 @@ typedef struct st_record_cache /* Used when cacheing records */
|
||||
int rc_seek,error,inited;
|
||||
uint rc_length,read_length,reclength;
|
||||
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
|
||||
int use_async_io;
|
||||
my_aio_result aio_result;
|
||||
@ -300,7 +300,7 @@ enum file_type
|
||||
|
||||
struct st_my_file_info
|
||||
{
|
||||
my_string name;
|
||||
char * name;
|
||||
enum file_type type;
|
||||
#if defined(THREAD) && !defined(HAVE_PREAD)
|
||||
pthread_mutex_t mutex;
|
||||
@ -311,7 +311,7 @@ extern struct st_my_file_info *my_file_info;
|
||||
|
||||
typedef struct st_dynamic_array
|
||||
{
|
||||
char *buffer;
|
||||
uchar *buffer;
|
||||
uint elements,max_element;
|
||||
uint alloc_increment;
|
||||
uint size_of_element;
|
||||
@ -330,7 +330,7 @@ typedef struct st_my_tmpdir
|
||||
typedef struct st_dynamic_string
|
||||
{
|
||||
char *str;
|
||||
uint length,max_length,alloc_increment;
|
||||
size_t length,max_length,alloc_increment;
|
||||
} DYNAMIC_STRING;
|
||||
|
||||
struct st_io_cache;
|
||||
@ -346,8 +346,8 @@ typedef struct st_io_cache_share
|
||||
my_off_t pos_in_file;
|
||||
/* If a synchronized write cache is the source of the data. */
|
||||
struct st_io_cache *source_cache;
|
||||
byte *buffer; /* The read buffer. */
|
||||
byte *read_end; /* Behind last valid byte of buffer. */
|
||||
uchar *buffer; /* The read buffer. */
|
||||
uchar *read_end; /* Behind last valid byte of buffer. */
|
||||
int running_threads; /* threads not in lock. */
|
||||
int total_threads; /* threads sharing the cache. */
|
||||
int error; /* Last error. */
|
||||
@ -360,7 +360,7 @@ typedef struct st_io_cache_share
|
||||
|
||||
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;
|
||||
/*
|
||||
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;
|
||||
/* 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 */
|
||||
byte *read_end;
|
||||
byte *buffer; /* The read buffer */
|
||||
uchar *read_end;
|
||||
uchar *buffer; /* The read buffer */
|
||||
/* Used in ASYNC_IO */
|
||||
byte *request_pos;
|
||||
uchar *request_pos;
|
||||
|
||||
/* 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
|
||||
in the write buffer. Note that reads in SEQ_READ_APPEND caches can
|
||||
happen from both read buffer (byte* buffer) and write buffer
|
||||
(byte* write_buffer).
|
||||
happen from both read buffer (uchar* buffer) and write buffer
|
||||
(uchar* write_buffer).
|
||||
*/
|
||||
byte *append_read_pos;
|
||||
uchar *append_read_pos;
|
||||
/* Points to current write position in the write buffer */
|
||||
byte *write_pos;
|
||||
uchar *write_pos;
|
||||
/* 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
|
||||
@ -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
|
||||
WRITE_CACHE, and &read_pos and &read_end respectively otherwise
|
||||
*/
|
||||
byte **current_pos, **current_end;
|
||||
uchar **current_pos, **current_end;
|
||||
#ifdef THREAD
|
||||
/*
|
||||
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
|
||||
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
|
||||
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
|
||||
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;
|
||||
/* 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 */
|
||||
uint read_length;
|
||||
size_t read_length;
|
||||
myf myflags; /* Flags used to my_read/my_write */
|
||||
/*
|
||||
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))
|
||||
|
||||
#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 */
|
||||
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_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)
|
||||
|
||||
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_append(const char *from,const char *to,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_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 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_register_filename(File fd, const char *FileName,
|
||||
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_rename_with_symlink(const char *from,const char *to,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 uint my_pread(File Filedes,byte *Buffer,uint Count,my_off_t offset,
|
||||
extern size_t my_read(File Filedes,uchar *Buffer,size_t Count,myf MyFlags);
|
||||
extern size_t my_pread(File Filedes,uchar *Buffer,size_t Count,my_off_t offset,
|
||||
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_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);
|
||||
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);
|
||||
extern uint my_fread(FILE *stream,byte *Buffer,uint Count,myf MyFlags);
|
||||
extern uint my_fwrite(FILE *stream,const byte *Buffer,uint Count,
|
||||
extern size_t my_fread(FILE *stream,uchar *Buffer,size_t Count,myf MyFlags);
|
||||
extern size_t my_fwrite(FILE *stream,const uchar *Buffer,size_t Count,
|
||||
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 gptr _mymalloc(uint uSize,const char *sFile,
|
||||
uint uLine, myf MyFlag);
|
||||
extern gptr _myrealloc(gptr pPtr,uint uSize,const char *sFile,
|
||||
extern void *_mymalloc(size_t uSize,const char *sFile,
|
||||
uint uLine, myf MyFlag);
|
||||
extern void *_myrealloc(void *pPtr,size_t uSize,const char *sFile,
|
||||
uint uLine, myf MyFlag);
|
||||
extern gptr my_multi_malloc _VARARGS((myf MyFlags, ...));
|
||||
extern void _myfree(gptr pPtr,const char *sFile,uint uLine, myf MyFlag);
|
||||
extern int _sanity(const char *sFile,unsigned int uLine);
|
||||
extern gptr _my_memdup(const byte *from,uint length,
|
||||
const char *sFile, uint uLine,myf MyFlag);
|
||||
extern my_string _my_strdup(const char *from, const char *sFile, uint uLine,
|
||||
myf MyFlag);
|
||||
extern char *_my_strndup(const char *from, uint length,
|
||||
const char *sFile, uint uLine,
|
||||
myf MyFlag);
|
||||
extern void * my_multi_malloc _VARARGS((myf MyFlags, ...));
|
||||
extern void _myfree(void *pPtr,const char *sFile,uint uLine, myf MyFlag);
|
||||
extern int _sanity(const char *sFile, uint uLine);
|
||||
extern void *_my_memdup(const void *from, size_t length,
|
||||
const char *sFile, uint uLine,myf MyFlag);
|
||||
extern char * _my_strdup(const char *from, const char *sFile, uint uLine,
|
||||
myf MyFlag);
|
||||
extern char *_my_strndup(const char *from, size_t length,
|
||||
const char *sFile, uint uLine,
|
||||
myf MyFlag);
|
||||
|
||||
/* implemented in my_memmem.c */
|
||||
extern void *my_memmem(const void *haystack, size_t haystacklen,
|
||||
const void *needle, size_t needlelen);
|
||||
const void *needle, size_t needlelen);
|
||||
|
||||
|
||||
#ifdef __WIN__
|
||||
@ -639,7 +639,7 @@ extern my_bool my_init(void);
|
||||
extern void my_end(int infoflag);
|
||||
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 my_string my_filename(File fd);
|
||||
extern char * my_filename(File fd);
|
||||
|
||||
#ifndef THREAD
|
||||
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 my_remember_signal(int signal_number,sig_handler (*func)(int));
|
||||
extern uint dirname_part(my_string to,const char *name);
|
||||
extern uint dirname_length(const char *name);
|
||||
extern size_t dirname_part(char * to, const char *name, size_t *to_res_length);
|
||||
extern size_t dirname_length(const char *name);
|
||||
#define base_name(A) (A+dirname_length(A))
|
||||
extern int test_if_hard_path(const char *dir_name);
|
||||
extern my_bool has_path(const char *name);
|
||||
extern char *convert_dirname(char *to, const char *from, const char *from_end);
|
||||
extern void to_unix_path(my_string name);
|
||||
extern my_string fn_ext(const char *name);
|
||||
extern my_string fn_same(my_string toname,const char *name,int flag);
|
||||
extern my_string fn_format(my_string to,const char *name,const char *dir,
|
||||
extern void to_unix_path(char * name);
|
||||
extern char * fn_ext(const char *name);
|
||||
extern char * fn_same(char * toname,const char *name,int flag);
|
||||
extern char * fn_format(char * to,const char *name,const char *dir,
|
||||
const char *form, uint flag);
|
||||
extern size_s strlength(const char *str);
|
||||
extern void pack_dirname(my_string to,const char *from);
|
||||
extern uint unpack_dirname(my_string to,const char *from);
|
||||
extern uint cleanup_dirname(my_string to,const char *from);
|
||||
extern uint system_filename(my_string to,const char *from);
|
||||
extern uint unpack_filename(my_string to,const char *from);
|
||||
extern my_string intern_filename(my_string to,const char *from);
|
||||
extern my_string directory_file_name(my_string dst, const char *src);
|
||||
extern int pack_filename(my_string to, const char *name, size_s max_length);
|
||||
extern my_string my_path(my_string to,const char *progname,
|
||||
extern size_t strlength(const char *str);
|
||||
extern void pack_dirname(char * to,const char *from);
|
||||
extern size_t unpack_dirname(char * to,const char *from);
|
||||
extern size_t cleanup_dirname(char * to,const char *from);
|
||||
extern size_t system_filename(char * to,const char *from);
|
||||
extern size_t unpack_filename(char * to,const char *from);
|
||||
extern char * intern_filename(char * to,const char *from);
|
||||
extern char * directory_file_name(char * dst, const char *src);
|
||||
extern int pack_filename(char * to, const char *name, size_t max_length);
|
||||
extern char * my_path(char * to,const char *progname,
|
||||
const char *own_pathname_part);
|
||||
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);
|
||||
extern int wild_compare(const char *str,const char *wildstr,
|
||||
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 void wf_end(struct wild_file_pack *buffer);
|
||||
extern size_s strip_sp(my_string str);
|
||||
extern void get_date(my_string to,int timeflag,time_t use_time);
|
||||
extern void soundex(CHARSET_INFO *, my_string out_pntr, my_string in_pntr,
|
||||
extern size_t strip_sp(char * str);
|
||||
extern void get_date(char * to,int timeflag,time_t use_time);
|
||||
extern void soundex(CHARSET_INFO *, char * out_pntr, char * in_pntr,
|
||||
pbool remove_garbage);
|
||||
extern int init_record_cache(RECORD_CACHE *info,uint cachesize,File file,
|
||||
uint reclength,enum cache_type type,
|
||||
extern int init_record_cache(RECORD_CACHE *info,size_t cachesize,File file,
|
||||
size_t reclength,enum cache_type type,
|
||||
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 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 long my_clock(void);
|
||||
extern sig_handler sigtstp_handler(int signal_number);
|
||||
extern void handle_recived_signals(void);
|
||||
|
||||
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,
|
||||
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,
|
||||
qsort2_cmp cmp, void *cmp_argument);
|
||||
extern qsort2_cmp get_ptr_compare(uint);
|
||||
void my_store_ptr(byte *buff, uint pack_length, my_off_t pos);
|
||||
my_off_t my_get_ptr(byte *ptr, uint pack_length);
|
||||
extern int init_io_cache(IO_CACHE *info,File file,uint cachesize,
|
||||
extern qsort2_cmp get_ptr_compare(size_t);
|
||||
void my_store_ptr(uchar *buff, size_t pack_length, my_off_t pos);
|
||||
my_off_t my_get_ptr(uchar *ptr, size_t pack_length);
|
||||
extern int init_io_cache(IO_CACHE *info,File file,size_t cachesize,
|
||||
enum cache_type type,my_off_t seek_offset,
|
||||
pbool use_async_io, myf cache_myflags);
|
||||
extern my_bool reinit_io_cache(IO_CACHE *info,enum cache_type type,
|
||||
my_off_t seek_offset,pbool use_async_io,
|
||||
pbool clear_cache);
|
||||
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
|
||||
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,
|
||||
IO_CACHE *write_cache, uint num_threads);
|
||||
extern void remove_io_thread(IO_CACHE *info);
|
||||
#endif
|
||||
extern int _my_b_seq_read(IO_CACHE *info,byte *Buffer,uint Count);
|
||||
extern int _my_b_net_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,uchar *Buffer,size_t Count);
|
||||
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_write(IO_CACHE *info,const byte *Buffer,uint Count);
|
||||
extern int my_b_append(IO_CACHE *info,const byte *Buffer,uint Count);
|
||||
extern int my_b_safe_write(IO_CACHE *info,const 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 uchar *Buffer,size_t 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 uchar *Buffer,size_t Count);
|
||||
|
||||
extern int my_block_write(IO_CACHE *info, const byte *Buffer,
|
||||
uint Count, my_off_t pos);
|
||||
extern int my_block_write(IO_CACHE *info, const uchar *Buffer,
|
||||
size_t Count, my_off_t pos);
|
||||
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)
|
||||
|
||||
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 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 uint 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_printf(IO_CACHE *info, const char* fmt, ...);
|
||||
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,
|
||||
const char *prefix, uint cache_size,
|
||||
const char *prefix, size_t cache_size,
|
||||
myf cache_myflags);
|
||||
extern my_bool real_open_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,
|
||||
uint init_alloc,uint alloc_increment
|
||||
CALLER_INFO_PROTO);
|
||||
extern my_bool insert_dynamic(DYNAMIC_ARRAY *array,gptr element);
|
||||
extern byte *alloc_dynamic(DYNAMIC_ARRAY *array);
|
||||
extern byte *pop_dynamic(DYNAMIC_ARRAY*);
|
||||
extern my_bool set_dynamic(DYNAMIC_ARRAY *array,gptr element,uint array_index);
|
||||
extern void get_dynamic(DYNAMIC_ARRAY *array,gptr element,uint array_index);
|
||||
extern my_bool insert_dynamic(DYNAMIC_ARRAY *array,uchar * element);
|
||||
extern uchar *alloc_dynamic(DYNAMIC_ARRAY *array);
|
||||
extern uchar *pop_dynamic(DYNAMIC_ARRAY*);
|
||||
extern my_bool set_dynamic(DYNAMIC_ARRAY *array,uchar * 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_element(DYNAMIC_ARRAY *array, uint array_index);
|
||||
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_element(array,array_index,type) ((type)((array)->buffer) +(array_index))
|
||||
#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))
|
||||
|
||||
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);
|
||||
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_set(DYNAMIC_STRING *str, const char *init_str);
|
||||
extern my_bool dynstr_realloc(DYNAMIC_STRING *str, ulong additional_size);
|
||||
extern my_bool dynstr_trunc(DYNAMIC_STRING *str, int n);
|
||||
extern my_bool dynstr_realloc(DYNAMIC_STRING *str, size_t additional_size);
|
||||
extern my_bool dynstr_trunc(DYNAMIC_STRING *str, size_t n);
|
||||
extern void dynstr_free(DYNAMIC_STRING *str);
|
||||
#ifdef HAVE_MLOCK
|
||||
extern byte *my_malloc_lock(uint length,myf flags);
|
||||
extern void my_free_lock(byte *ptr,myf flags);
|
||||
extern void *my_malloc_lock(size_t length,myf flags);
|
||||
extern void my_free_lock(void *ptr,myf flags);
|
||||
#else
|
||||
#define my_malloc_lock(A,B) my_malloc((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_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)
|
||||
extern void init_alloc_root(MEM_ROOT *mem_root, uint block_size,
|
||||
uint pre_alloc_size);
|
||||
extern gptr alloc_root(MEM_ROOT *mem_root,unsigned int Size);
|
||||
extern gptr multi_alloc_root(MEM_ROOT *mem_root, ...);
|
||||
extern void init_alloc_root(MEM_ROOT *mem_root, size_t block_size,
|
||||
size_t pre_alloc_size);
|
||||
extern void *alloc_root(MEM_ROOT *mem_root, size_t Size);
|
||||
extern void *multi_alloc_root(MEM_ROOT *mem_root, ...);
|
||||
extern void free_root(MEM_ROOT *root, myf MyFLAGS);
|
||||
extern void set_prealloc_root(MEM_ROOT *root, char *ptr);
|
||||
extern void reset_root_defaults(MEM_ROOT *mem_root, uint block_size,
|
||||
uint prealloc_size);
|
||||
extern void reset_root_defaults(MEM_ROOT *mem_root, size_t block_size,
|
||||
size_t prealloc_size);
|
||||
extern char *strdup_root(MEM_ROOT *root,const char *str);
|
||||
extern char *strmake_root(MEM_ROOT *root,const char *str,uint len);
|
||||
extern char *memdup_root(MEM_ROOT *root,const char *str,uint len);
|
||||
extern char *strmake_root(MEM_ROOT *root,const char *str,size_t len);
|
||||
extern void *memdup_root(MEM_ROOT *root,const void *str, size_t len);
|
||||
extern int get_defaults_options(int argc, char **argv,
|
||||
char **defaults, char **extra_defaults,
|
||||
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 my_print_default_files(const char *conf_file);
|
||||
extern void print_defaults(const char *conf_file, const char **groups);
|
||||
extern my_bool my_compress(byte *, ulong *, ulong *);
|
||||
extern my_bool my_uncompress(byte *, ulong *, ulong *);
|
||||
extern byte *my_compress_alloc(const byte *packet, ulong *len, ulong *complen);
|
||||
extern int packfrm(const void *, uint, const void **, uint *);
|
||||
extern int unpackfrm(const void **, uint *, const void *);
|
||||
extern my_bool my_compress(uchar *, size_t *, size_t *);
|
||||
extern my_bool my_uncompress(uchar *, size_t , size_t *);
|
||||
extern uchar *my_compress_alloc(const uchar *packet, size_t *len,
|
||||
size_t *complen);
|
||||
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 uint32 my_round_up_to_next_power(uint32 v);
|
||||
extern uint my_count_bits(ulonglong v);
|
||||
extern uint my_count_bits_ushort(ushort v);
|
||||
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);
|
||||
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 init_compiled_charsets(myf flags);
|
||||
extern void add_compiled_collation(CHARSET_INFO *cs);
|
||||
extern ulong escape_string_for_mysql(CHARSET_INFO *charset_info,
|
||||
char *to, ulong to_length,
|
||||
const char *from, ulong length);
|
||||
extern size_t escape_string_for_mysql(CHARSET_INFO *charset_info,
|
||||
char *to, size_t to_length,
|
||||
const char *from, size_t length);
|
||||
#ifdef __WIN__
|
||||
#define BACKSLASH_MBTAIL
|
||||
/* File system character set */
|
||||
extern CHARSET_INFO *fs_character_set(void);
|
||||
#endif
|
||||
extern ulong escape_quotes_for_mysql(CHARSET_INFO *charset_info,
|
||||
char *to, ulong to_length,
|
||||
const char *from, ulong length);
|
||||
extern size_t escape_quotes_for_mysql(CHARSET_INFO *charset_info,
|
||||
char *to, size_t to_length,
|
||||
const char *from, size_t length);
|
||||
|
||||
extern void thd_increment_bytes_sent(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);
|
||||
|
||||
/* 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
|
||||
#ifdef __NETWARE__
|
||||
|
@ -25,10 +25,10 @@ extern "C" {
|
||||
#define MAX_TREE_HEIGHT 64
|
||||
|
||||
#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)))
|
||||
|
||||
#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
|
||||
|
||||
|
@ -22,7 +22,7 @@ extern "C" {
|
||||
typedef struct st_trie_node
|
||||
{
|
||||
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 *links; /* Array of edges leaving this node */
|
||||
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 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 void ac_trie_init (TRIE *trie, AC_TRIE_STATE *state);
|
||||
|
||||
|
||||
/* `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;
|
||||
DBUG_ENTER("trie_goto");
|
||||
@ -67,7 +67,7 @@ static inline TRIE_NODE *trie_goto (TRIE_NODE *root, TRIE_NODE *node, byte c)
|
||||
|
||||
/*
|
||||
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'
|
||||
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.
|
||||
*/
|
||||
|
||||
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;
|
||||
DBUG_ENTER("ac_trie_next");
|
||||
@ -94,7 +94,7 @@ static inline int ac_trie_next (AC_TRIE_STATE *state, byte *c)
|
||||
|
||||
/*
|
||||
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'
|
||||
key - valid pointer to key to insert
|
||||
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)
|
||||
*/
|
||||
|
||||
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;
|
||||
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++)
|
||||
{
|
||||
byte p;
|
||||
uchar p;
|
||||
if (! (node= node->links))
|
||||
DBUG_RETURN(FALSE);
|
||||
p= key[k];
|
||||
|
@ -25,9 +25,9 @@
|
||||
|
||||
C_MODE_START
|
||||
|
||||
void parse_user(const char *user_id_str, uint user_id_len,
|
||||
char *user_name_str, uint *user_name_len,
|
||||
char *host_name_str, uint *host_name_len);
|
||||
void parse_user(const char *user_id_str, size_t user_id_len,
|
||||
char *user_name_str, size_t *user_name_len,
|
||||
char *host_name_str, size_t *host_name_len);
|
||||
|
||||
C_MODE_END
|
||||
|
||||
|
@ -28,8 +28,8 @@ extern "C" {
|
||||
*/
|
||||
#define my_vle_sizeof(ITEM) (((sizeof(ITEM) * CHAR_BIT) + 6) / 7)
|
||||
|
||||
byte *my_vle_encode(byte *vle, my_size_t max, ulong value);
|
||||
byte const *my_vle_decode(ulong *value_ptr, byte const *vle);
|
||||
uchar *my_vle_encode(uchar *vle, size_t max, ulong value);
|
||||
uchar const *my_vle_decode(ulong *value_ptr, uchar const *vle);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -57,27 +57,27 @@ typedef struct xml_stack_st
|
||||
const char *cur;
|
||||
const char *end;
|
||||
void *user_data;
|
||||
int (*enter)(struct xml_stack_st *st,const char *val, uint len);
|
||||
int (*value)(struct xml_stack_st *st,const char *val, uint len);
|
||||
int (*leave_xml)(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, size_t len);
|
||||
int (*leave_xml)(struct xml_stack_st *st,const char *val, size_t len);
|
||||
} MY_XML_PARSER;
|
||||
|
||||
void my_xml_parser_create(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 *,
|
||||
const char *,
|
||||
uint len));
|
||||
size_t len));
|
||||
void my_xml_set_enter_handler(MY_XML_PARSER *st, int (*)(MY_XML_PARSER *,
|
||||
const char *,
|
||||
uint len));
|
||||
size_t len));
|
||||
void my_xml_set_leave_handler(MY_XML_PARSER *st, int (*)(MY_XML_PARSER *,
|
||||
const char *,
|
||||
uint len));
|
||||
size_t len));
|
||||
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);
|
||||
|
||||
const char *my_xml_error_string(MY_XML_PARSER *st);
|
||||
|
@ -227,7 +227,7 @@ typedef struct st_mi_decode_tree /* Decode huff-table */
|
||||
{
|
||||
uint16 *table;
|
||||
uint quick_table_bits;
|
||||
byte *intervalls;
|
||||
uchar *intervalls;
|
||||
} MI_DECODE_TREE;
|
||||
|
||||
|
||||
@ -259,7 +259,7 @@ typedef struct st_columndef /* column information */
|
||||
/* invalidator function reference for Query Cache */
|
||||
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_concurrent_insert;
|
||||
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 */
|
||||
|
||||
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,
|
||||
uint wait_if_locked);
|
||||
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_rkey(MI_INFO *info, byte *buf, int inx, const byte *key,
|
||||
extern int mi_rfirst(struct st_myisam_info *file,uchar *buf,int inx);
|
||||
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);
|
||||
extern int mi_rlast(struct st_myisam_info *file,byte *buf,int inx);
|
||||
extern int mi_rnext(struct st_myisam_info *file,byte *buf,int inx);
|
||||
extern int mi_rnext_same(struct st_myisam_info *info, byte *buf);
|
||||
extern int mi_rprev(struct st_myisam_info *file,byte *buf,int inx);
|
||||
extern int mi_rrnd(struct st_myisam_info *file,byte *buf, my_off_t pos);
|
||||
extern int mi_rlast(struct st_myisam_info *file,uchar *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, uchar *buf);
|
||||
extern int mi_rprev(struct st_myisam_info *file,uchar *buf,int inx);
|
||||
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(struct st_myisam_info *file,byte *buf);
|
||||
extern int mi_rsame(struct st_myisam_info *file,byte *record,int inx);
|
||||
extern int mi_rsame_with_pos(struct st_myisam_info *file,byte *record,
|
||||
extern int mi_scan(struct st_myisam_info *file,uchar *buf);
|
||||
extern int mi_rsame(struct st_myisam_info *file,uchar *record,int inx);
|
||||
extern int mi_rsame_with_pos(struct st_myisam_info *file,uchar *record,
|
||||
int inx, my_off_t pos);
|
||||
extern int mi_update(struct st_myisam_info *file,const byte *old,
|
||||
byte *new_record);
|
||||
extern int mi_write(struct st_myisam_info *file,byte *buff);
|
||||
extern int mi_update(struct st_myisam_info *file,const uchar *old,
|
||||
uchar *new_record);
|
||||
extern int mi_write(struct st_myisam_info *file,uchar *buff);
|
||||
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_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_is_changed(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);
|
||||
|
||||
/* 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_data_link(MI_CHECK *param, MI_INFO *info,int extend);
|
||||
int mi_repair(MI_CHECK *param, register MI_INFO *info,
|
||||
my_string name, int rep_quick);
|
||||
int mi_sort_index(MI_CHECK *param, register MI_INFO *info, my_string name);
|
||||
char * name, int rep_quick);
|
||||
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,
|
||||
const char * name, int rep_quick);
|
||||
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);
|
||||
int filecopy(MI_CHECK *param, File to,File from,my_off_t start,
|
||||
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);
|
||||
int write_data_suffix(SORT_INFO *sort_info, my_bool fix_datafile);
|
||||
int test_if_almost_full(MI_INFO *info);
|
||||
|
@ -78,20 +78,20 @@ typedef struct st_myrg_info
|
||||
/* Prototypes for merge-functions */
|
||||
|
||||
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 int myrg_panic(enum ha_panic_function function);
|
||||
extern int myrg_rfirst(MYRG_INFO *file,byte *buf,int inx);
|
||||
extern int myrg_rlast(MYRG_INFO *file,byte *buf,int inx);
|
||||
extern int myrg_rnext(MYRG_INFO *file,byte *buf,int inx);
|
||||
extern int myrg_rprev(MYRG_INFO *file,byte *buf,int inx);
|
||||
extern int myrg_rnext_same(MYRG_INFO *file,byte *buf);
|
||||
extern int myrg_rkey(MYRG_INFO *info,byte *buf,int inx, const byte *key,
|
||||
extern int myrg_rfirst(MYRG_INFO *file,uchar *buf,int inx);
|
||||
extern int myrg_rlast(MYRG_INFO *file,uchar *buf,int inx);
|
||||
extern int myrg_rnext(MYRG_INFO *file,uchar *buf,int inx);
|
||||
extern int myrg_rprev(MYRG_INFO *file,uchar *buf,int inx);
|
||||
extern int myrg_rnext_same(MYRG_INFO *file,uchar *buf);
|
||||
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);
|
||||
extern int myrg_rrnd(MYRG_INFO *file,byte *buf,ulonglong pos);
|
||||
extern int myrg_rsame(MYRG_INFO *file,byte *record,int inx);
|
||||
extern int myrg_update(MYRG_INFO *file,const byte *old,byte *new_rec);
|
||||
extern int myrg_write(MYRG_INFO *info,byte *rec);
|
||||
extern int myrg_rrnd(MYRG_INFO *file,uchar *buf,ulonglong pos);
|
||||
extern int myrg_rsame(MYRG_INFO *file,uchar *record,int inx);
|
||||
extern int myrg_update(MYRG_INFO *file,const uchar *old,uchar *new_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_lock_database(MYRG_INFO *file,int lock_type);
|
||||
extern int myrg_create(const char *name, const char **table_names,
|
||||
|
@ -53,7 +53,6 @@ typedef char my_bool;
|
||||
#else
|
||||
#define STDCALL __stdcall
|
||||
#endif
|
||||
typedef char * gptr;
|
||||
|
||||
#ifndef my_socket_defined
|
||||
#ifdef __WIN__
|
||||
@ -252,9 +251,9 @@ struct st_mysql_stmt;
|
||||
typedef struct st_mysql
|
||||
{
|
||||
NET net; /* Communication parameters */
|
||||
gptr connector_fd; /* ConnectorFd for SSL */
|
||||
char *host,*user,*passwd,*unix_socket,*server_version,*host_info,*info;
|
||||
char *db;
|
||||
unsigned char *connector_fd; /* ConnectorFd for SSL */
|
||||
char *host,*user,*passwd,*unix_socket,*server_version,*host_info;
|
||||
char *info, *db;
|
||||
struct charset_info_st *charset;
|
||||
MYSQL_FIELD *fields;
|
||||
MEM_ROOT field_alloc;
|
||||
@ -753,9 +752,9 @@ typedef struct st_mysql_methods
|
||||
my_bool (*read_query_result)(MYSQL *mysql);
|
||||
my_bool (*advanced_command)(MYSQL *mysql,
|
||||
enum enum_server_command command,
|
||||
const char *header,
|
||||
const unsigned char *header,
|
||||
unsigned long header_length,
|
||||
const char *arg,
|
||||
const unsigned char *arg,
|
||||
unsigned long arg_length,
|
||||
my_bool skip_check,
|
||||
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) \
|
||||
(*(mysql)->methods->advanced_command)(mysql, command, NullS, \
|
||||
(*(mysql)->methods->advanced_command)(mysql, command, 0, \
|
||||
0, arg, length, skip_check, NULL)
|
||||
#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)
|
||||
|
||||
#ifdef __NETWARE__
|
||||
|
@ -223,7 +223,7 @@ typedef struct st_net {
|
||||
'query_cache_query' should be accessed only via query cache
|
||||
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 return_errno;
|
||||
@ -344,13 +344,13 @@ my_bool my_net_init(NET *net, Vio* vio);
|
||||
void my_net_local_init(NET *net);
|
||||
void net_end(NET *net);
|
||||
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 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,
|
||||
const char *header, unsigned long head_len,
|
||||
const char *packet, unsigned long len);
|
||||
int net_real_write(NET *net,const char *packet,unsigned long len);
|
||||
const unsigned char *header, size_t head_len,
|
||||
const unsigned char *packet, size_t len);
|
||||
int net_real_write(NET *net,const unsigned char *packet, size_t len);
|
||||
unsigned long my_net_read(NET *net);
|
||||
|
||||
/*
|
||||
@ -446,7 +446,7 @@ void my_thread_end(void);
|
||||
#ifdef _global_h
|
||||
ulong STDCALL net_field_length(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
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -27,13 +27,13 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct st_queue {
|
||||
byte **root;
|
||||
uchar **root;
|
||||
void *first_cmp_arg;
|
||||
uint elements;
|
||||
uint max_elements;
|
||||
uint offset_to_key; /* compare is done on element+offset */
|
||||
int max_at_top; /* Set if queue_top gives max */
|
||||
int (*compare)(void *, byte *,byte *);
|
||||
int (*compare)(void *, uchar *,uchar *);
|
||||
uint auto_extent;
|
||||
} 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_max_at_top(queue, set_arg) \
|
||||
(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,
|
||||
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);
|
||||
int resize_queue(QUEUE *queue, uint max_elements);
|
||||
void delete_queue(QUEUE *queue);
|
||||
void queue_insert(QUEUE *queue,byte *element);
|
||||
int queue_insert_safe(QUEUE *queue, byte *element);
|
||||
byte *queue_remove(QUEUE *queue,uint idx);
|
||||
void queue_insert(QUEUE *queue,uchar *element);
|
||||
int queue_insert_safe(QUEUE *queue, uchar *element);
|
||||
uchar *queue_remove(QUEUE *queue,uint idx);
|
||||
#define queue_remove_all(queue) { (queue)->elements= 0; }
|
||||
#define queue_is_full(queue) (queue->elements == queue->max_elements)
|
||||
void _downheap(QUEUE *queue,uint idx);
|
||||
|
@ -32,9 +32,9 @@ void mysql_read_default_options(struct st_mysql_options *options,
|
||||
const char *filename,const char *group);
|
||||
my_bool
|
||||
cli_advanced_command(MYSQL *mysql, enum enum_server_command command,
|
||||
const char *header, ulong header_length,
|
||||
const char *arg, ulong arg_length, my_bool skip_check,
|
||||
MYSQL_STMT *stmt);
|
||||
const unsigned char *header, ulong header_length,
|
||||
const unsigned char *arg, ulong arg_length,
|
||||
my_bool skip_check, MYSQL_STMT *stmt);
|
||||
unsigned long cli_safe_read(MYSQL *mysql);
|
||||
void set_stmt_errmsg(MYSQL_STMT * stmt, const char *err, int errcode,
|
||||
const char *sqlstate);
|
||||
|
@ -17,29 +17,29 @@
|
||||
|
||||
{"ssl", OPT_SSL_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},
|
||||
{"ssl-ca", OPT_SSL_CA,
|
||||
"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},
|
||||
{"ssl-capath", OPT_SSL_CAPATH,
|
||||
"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},
|
||||
{"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},
|
||||
{"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},
|
||||
{"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},
|
||||
#ifdef MYSQL_CLIENT
|
||||
{"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.",
|
||||
(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},
|
||||
#endif
|
||||
#endif /* HAVE_OPENSSL */
|
||||
|
@ -54,6 +54,11 @@ enum thr_lock_type { TL_IGNORE=-1,
|
||||
TL_WRITE_CONCURRENT_INSERT,
|
||||
/* Write used by INSERT DELAYED. Allows READ locks */
|
||||
TL_WRITE_DELAYED,
|
||||
/*
|
||||
parser only! Late bound low_priority flag.
|
||||
At open_tables() becomes thd->update_lock_default.
|
||||
*/
|
||||
TL_WRITE_DEFAULT,
|
||||
/* WRITE lock that has lower priority than TL_READ */
|
||||
TL_WRITE_LOW_PRIORITY,
|
||||
/* Normal WRITE lock */
|
||||
|
@ -51,8 +51,8 @@ Vio* vio_new_win32shared_memory(NET *net,HANDLE handle_file_map,
|
||||
HANDLE event_client_wrote,
|
||||
HANDLE event_client_read,
|
||||
HANDLE event_conn_closed);
|
||||
int vio_read_pipe(Vio *vio, gptr buf, int size);
|
||||
int vio_write_pipe(Vio *vio, const gptr buf, int size);
|
||||
size_t vio_read_pipe(Vio *vio, uchar * buf, size_t size);
|
||||
size_t vio_write_pipe(Vio *vio, const uchar * buf, size_t size);
|
||||
int vio_close_pipe(Vio * vio);
|
||||
#else
|
||||
#define HANDLE void *
|
||||
@ -62,9 +62,9 @@ void vio_delete(Vio* vio);
|
||||
int vio_close(Vio* vio);
|
||||
void vio_reset(Vio* vio, enum enum_vio_type type,
|
||||
my_socket sd, HANDLE hPipe, uint flags);
|
||||
int vio_read(Vio *vio, gptr buf, int size);
|
||||
int vio_read_buff(Vio *vio, gptr buf, int size);
|
||||
int vio_write(Vio *vio, const gptr buf, int size);
|
||||
size_t vio_read(Vio *vio, uchar * buf, size_t size);
|
||||
size_t vio_read_buff(Vio *vio, uchar * buf, size_t 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);
|
||||
my_bool vio_is_blocking(Vio *vio);
|
||||
/* setsockopt TCP_NODELAY at IPPROTO_TCP level, when possible */
|
||||
@ -128,8 +128,8 @@ void free_vio_ssl_acceptor_fd(struct st_VioSSLFd *fd);
|
||||
#endif /* HAVE_OPENSSL */
|
||||
|
||||
#ifdef HAVE_SMEM
|
||||
int vio_read_shared_memory(Vio *vio, gptr buf, int size);
|
||||
int vio_write_shared_memory(Vio *vio, const gptr buf, int size);
|
||||
size_t vio_read_shared_memory(Vio *vio, uchar * buf, size_t size);
|
||||
size_t vio_write_shared_memory(Vio *vio, const uchar * buf, size_t size);
|
||||
int vio_close_shared_memory(Vio * vio);
|
||||
#endif
|
||||
|
||||
@ -187,8 +187,8 @@ struct st_vio
|
||||
/* function pointers. They are similar for socket/SSL/whatever */
|
||||
void (*viodelete)(Vio*);
|
||||
int (*vioerrno)(Vio*);
|
||||
int (*read)(Vio*, gptr, int);
|
||||
int (*write)(Vio*, const gptr, int);
|
||||
size_t (*read)(Vio*, uchar *, size_t);
|
||||
size_t (*write)(Vio*, const uchar *, size_t);
|
||||
int (*vioblocking)(Vio*, my_bool, my_bool *);
|
||||
my_bool (*is_blocking)(Vio*);
|
||||
int (*viokeepalive)(Vio*, my_bool);
|
||||
@ -210,7 +210,7 @@ struct st_vio
|
||||
HANDLE event_client_wrote;
|
||||
HANDLE event_client_read;
|
||||
HANDLE event_conn_closed;
|
||||
long shared_memory_remain;
|
||||
size_t shared_memory_remain;
|
||||
char *shared_memory_pos;
|
||||
NET *net;
|
||||
#endif /* HAVE_SMEM */
|
||||
|
@ -14,7 +14,7 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
extern uint mysql_port;
|
||||
extern my_string mysql_unix_port;
|
||||
extern char * mysql_unix_port;
|
||||
|
||||
#define CLIENT_CAPABILITIES (CLIENT_LONG_PASSWORD | CLIENT_LONG_FLAG | \
|
||||
CLIENT_TRANSACTIONS | \
|
||||
|
@ -625,7 +625,7 @@ mysql_connect(MYSQL *mysql,const char *host,
|
||||
if (!(res=mysql_real_connect(mysql,host,user,passwd,NullS,0,NullS,0)))
|
||||
{
|
||||
if (mysql->free_me)
|
||||
my_free((gptr) mysql,MYF(0));
|
||||
my_free((uchar*) mysql,MYF(0));
|
||||
}
|
||||
mysql->reconnect= 1;
|
||||
DBUG_RETURN(res);
|
||||
@ -946,7 +946,7 @@ static int default_local_infile_read(void *ptr, char *buf, uint buf_len)
|
||||
int count;
|
||||
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 */
|
||||
my_snprintf(data->error_msg, sizeof(data->error_msg)-1,
|
||||
@ -4539,7 +4539,7 @@ static int stmt_fetch_row(MYSQL_STMT *stmt, uchar *row)
|
||||
}
|
||||
if (!((bit<<=1) & 255))
|
||||
{
|
||||
bit= 1; /* To next byte */
|
||||
bit= 1; /* To next uchar */
|
||||
null_ptr++;
|
||||
}
|
||||
}
|
||||
@ -4732,7 +4732,7 @@ static void stmt_update_metadata(MYSQL_STMT *stmt, MYSQL_ROWS *data)
|
||||
DBUG_ASSERT(row <= row_end);
|
||||
if (!((bit<<=1) & 255))
|
||||
{
|
||||
bit= 1; /* To next byte */
|
||||
bit= 1; /* To next uchar */
|
||||
null_ptr++;
|
||||
}
|
||||
}
|
||||
@ -5043,7 +5043,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));
|
||||
}
|
||||
|
@ -206,10 +206,10 @@ void STDCALL mysql_manager_close(MYSQL_MANAGER* con)
|
||||
allocated in my_multimalloc() along with con->host, freeing
|
||||
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);
|
||||
if (con->free_me)
|
||||
my_free((gptr)con,MYF(0));
|
||||
my_free((uchar*)con,MYF(0));
|
||||
}
|
||||
|
||||
|
||||
|
@ -47,9 +47,9 @@ void Querycache_stream::store_short(ushort s)
|
||||
cur_data+= 2;
|
||||
return;
|
||||
}
|
||||
*cur_data= ((byte *)(&s))[0];
|
||||
*cur_data= ((uchar *)(&s))[0];
|
||||
use_next_block(TRUE);
|
||||
*(cur_data++)= ((byte *)(&s))[1];
|
||||
*(cur_data++)= ((uchar *)(&s))[1];
|
||||
}
|
||||
|
||||
void Querycache_stream::store_int(uint i)
|
||||
@ -100,7 +100,7 @@ void Querycache_stream::store_ll(ulonglong ll)
|
||||
}
|
||||
memcpy(cur_data, &ll, rest_len);
|
||||
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;
|
||||
}
|
||||
|
||||
@ -165,9 +165,9 @@ ushort Querycache_stream::load_short()
|
||||
cur_data+= 2;
|
||||
return result;
|
||||
}
|
||||
((byte*)&result)[0]= *cur_data;
|
||||
((uchar*)&result)[0]= *cur_data;
|
||||
use_next_block(FALSE);
|
||||
((byte*)&result)[1]= *(cur_data++);
|
||||
((uchar*)&result)[1]= *(cur_data++);
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -216,7 +216,7 @@ ulonglong Querycache_stream::load_ll()
|
||||
}
|
||||
memcpy(&result, cur_data, rest_len);
|
||||
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;
|
||||
return result;
|
||||
}
|
||||
@ -245,7 +245,7 @@ char *Querycache_stream::load_str(MEM_ROOT *alloc, uint *str_len)
|
||||
{
|
||||
char *result;
|
||||
*str_len= load_int();
|
||||
if (!(result= alloc_root(alloc, *str_len + 1)))
|
||||
if (!(result= (char*) alloc_root(alloc, *str_len + 1)))
|
||||
return 0;
|
||||
load_str_only(result, *str_len);
|
||||
return result;
|
||||
@ -259,7 +259,7 @@ int Querycache_stream::load_safe_str(MEM_ROOT *alloc, char **str, uint *str_len)
|
||||
return 0;
|
||||
}
|
||||
(*str_len)--;
|
||||
if (!(*str= alloc_root(alloc, *str_len + 1)))
|
||||
if (!(*str= (char*) alloc_root(alloc, *str_len + 1)))
|
||||
return 1;
|
||||
load_str_only(*str, *str_len);
|
||||
return 0;
|
||||
|
@ -15,8 +15,8 @@
|
||||
|
||||
class Querycache_stream
|
||||
{
|
||||
byte *cur_data;
|
||||
byte *data_end;
|
||||
uchar *cur_data;
|
||||
uchar *data_end;
|
||||
Query_cache_block *block;
|
||||
uint headers_len;
|
||||
public:
|
||||
@ -27,7 +27,7 @@ public:
|
||||
Querycache_stream(Query_cache_block *ini_block, uint 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);
|
||||
#ifndef DBUG_OFF
|
||||
first_block= ini_block;
|
||||
@ -54,7 +54,7 @@ public:
|
||||
else
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -68,13 +68,13 @@ void embedded_get_error(MYSQL *mysql, MYSQL_DATA *data)
|
||||
net->last_errno= ei->last_errno;
|
||||
strmake(net->last_error, ei->info, sizeof(net->last_error));
|
||||
memcpy(net->sqlstate, ei->sqlstate, sizeof(net->sqlstate));
|
||||
my_free((gptr) data, MYF(0));
|
||||
my_free(data, MYF(0));
|
||||
}
|
||||
|
||||
static my_bool
|
||||
emb_advanced_command(MYSQL *mysql, enum enum_server_command command,
|
||||
const char *header, ulong header_length,
|
||||
const char *arg, ulong arg_length, my_bool skip_check,
|
||||
const uchar *header, ulong header_length,
|
||||
const uchar *arg, ulong arg_length, my_bool skip_check,
|
||||
MYSQL_STMT *stmt)
|
||||
{
|
||||
my_bool result= 1;
|
||||
@ -180,7 +180,7 @@ static MYSQL_FIELD *emb_list_fields(MYSQL *mysql)
|
||||
res= ((THD*) mysql->thd)->cur_data;
|
||||
((THD*) mysql->thd)->cur_data= 0;
|
||||
mysql->field_alloc= res->alloc;
|
||||
my_free((gptr) res,MYF(0));
|
||||
my_free(res,MYF(0));
|
||||
mysql->status= MYSQL_STATUS_READY;
|
||||
return mysql->fields;
|
||||
}
|
||||
@ -209,7 +209,7 @@ static my_bool emb_read_prepare_result(MYSQL *mysql, MYSQL_STMT *stmt)
|
||||
stmt->fields= mysql->fields;
|
||||
stmt->mem_root= res->alloc;
|
||||
mysql->fields= NULL;
|
||||
my_free((gptr) res,MYF(0));
|
||||
my_free(res,MYF(0));
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -265,7 +265,7 @@ static my_bool emb_read_query_result(MYSQL *mysql)
|
||||
thd->cur_data= res;
|
||||
}
|
||||
else
|
||||
my_free((gptr) res, MYF(0));
|
||||
my_free(res, MYF(0));
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -273,7 +273,7 @@ static my_bool emb_read_query_result(MYSQL *mysql)
|
||||
static int emb_stmt_execute(MYSQL_STMT *stmt)
|
||||
{
|
||||
DBUG_ENTER("emb_stmt_execute");
|
||||
char header[5];
|
||||
uchar header[5];
|
||||
THD *thd;
|
||||
my_bool res;
|
||||
|
||||
@ -1063,22 +1063,22 @@ bool Protocol_text::store_null()
|
||||
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;
|
||||
if (!thd->mysql) // bootstrap file handling
|
||||
return false;
|
||||
return FALSE;
|
||||
|
||||
if (!(field_buf=alloc_root(alloc, length + sizeof(uint) + 1)))
|
||||
return true;
|
||||
if (!(field_buf= (char*) alloc_root(alloc, length + sizeof(uint) + 1)))
|
||||
return TRUE;
|
||||
*(uint *)field_buf= length;
|
||||
*next_field= field_buf + sizeof(uint);
|
||||
memcpy(*next_field, from, length);
|
||||
memcpy((uchar*) *next_field, from, length);
|
||||
(*next_field)[length]= 0;
|
||||
if (next_mysql_field->max_length < length)
|
||||
next_mysql_field->max_length=length;
|
||||
++next_field;
|
||||
++next_mysql_field;
|
||||
return false;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -265,8 +265,13 @@ sub mtr_report_stats ($) {
|
||||
else
|
||||
{
|
||||
# We report different types of problems in order
|
||||
foreach my $pattern ( "^Warning:", "^Error:", "^==.* at 0x",
|
||||
"InnoDB: Warning", "missing DBUG_RETURN",
|
||||
foreach my $pattern ( "^Warning:",
|
||||
"\\[Warning\\]",
|
||||
"\\[ERROR\\]",
|
||||
"^Error:", "^==.* at 0x",
|
||||
"InnoDB: Warning",
|
||||
"^safe_mutex:",
|
||||
"missing DBUG_RETURN",
|
||||
"mysqld: Warning",
|
||||
"allocated at line",
|
||||
"Attempting backtrace", "Assertion .* failed" )
|
||||
@ -292,10 +297,69 @@ sub mtr_report_stats ($) {
|
||||
}
|
||||
|
||||
# Skip some non fatal warnings from the log files
|
||||
if ( /Warning:\s+Table:.* on (delete|rename)/ or
|
||||
/Warning:\s+Setting lower_case_table_names=2/ or
|
||||
/Warning:\s+One can only use the --user.*root/ or
|
||||
/InnoDB: Warning: we did not need to do crash recovery/)
|
||||
if (
|
||||
/\"SELECT UNIX_TIMESTAMP\(\)\" failed on master/ or
|
||||
/Aborted connection/ or
|
||||
/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
|
||||
}
|
||||
|
@ -629,6 +629,11 @@ else
|
||||
TEST_MODE=`echo $TEST_MODE | sed 's/^ *//'`
|
||||
fi
|
||||
|
||||
#
|
||||
# Skip tests that doesn't work with shell version
|
||||
#
|
||||
SKIP_TEST="$SKIP_TEST bootstrap"
|
||||
|
||||
#++
|
||||
# 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_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_BINLOG="$MYSQL_BINLOG --debug-info --no-defaults --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_BINLOG="$MYSQL_BINLOG --no-defaults --debug-info --local-load=$MYSQL_TMP_DIR --character-sets-dir=$CHARSETSDIR $EXTRA_MYSQLBINLOG_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="$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
|
||||
|
@ -1796,6 +1796,17 @@ sub environment_setup () {
|
||||
split(':', $ENV{'DYLD_LIBRARY_PATH'}) : ());
|
||||
mtr_debug("DYLD_LIBRARY_PATH: $ENV{'DYLD_LIBRARY_PATH'}");
|
||||
|
||||
# The environment variable used for shared libs on AIX
|
||||
$ENV{'SHLIB_PATH'}= join(":", @ld_library_paths,
|
||||
$ENV{'SHLIB_PATH'} ?
|
||||
split(':', $ENV{'SHLIB_PATH'}) : ());
|
||||
mtr_debug("SHLIB_PATH: $ENV{'SHLIB_PATH'}");
|
||||
|
||||
# The environment variable used for shared libs on hp-ux
|
||||
$ENV{'LIBPATH'}= join(":", @ld_library_paths,
|
||||
$ENV{'LIBPATH'} ?
|
||||
split(':', $ENV{'LIBPATH'}) : ());
|
||||
mtr_debug("LIBPATH: $ENV{'LIBPATH'}");
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# Also command lines in .opt files may contain env vars
|
||||
|
@ -846,6 +846,25 @@ id
|
||||
50
|
||||
51
|
||||
drop table t1;
|
||||
set @orig_sql_mode = @@sql_mode;
|
||||
set sql_mode="no_zero_date";
|
||||
create table t1(f1 int);
|
||||
alter table t1 add column f2 datetime not null, add column f21 date not null;
|
||||
insert into t1 values(1,'2000-01-01','2000-01-01');
|
||||
alter table t1 add column f3 datetime not null;
|
||||
ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column 'f3' at row 1
|
||||
alter table t1 add column f3 date not null;
|
||||
ERROR 22007: Incorrect date value: '0000-00-00' for column 'f3' at row 1
|
||||
alter table t1 add column f4 datetime not null default '2002-02-02',
|
||||
add column f41 date not null;
|
||||
ERROR 22007: Incorrect date value: '0000-00-00' for column 'f41' at row 1
|
||||
alter table t1 add column f4 datetime not null default '2002-02-02',
|
||||
add column f41 date not null default '2002-02-02';
|
||||
select * from t1;
|
||||
f1 f2 f21 f4 f41
|
||||
1 2000-01-01 00:00:00 2000-01-01 2002-02-02 00:00:00 2002-02-02
|
||||
drop table t1;
|
||||
set sql_mode= @orig_sql_mode;
|
||||
create table t1 (v varchar(32));
|
||||
insert into t1 values ('def'),('abc'),('hij'),('3r4f');
|
||||
select * from t1;
|
||||
@ -1137,3 +1156,17 @@ Field Type Null Key Default Extra
|
||||
unsigned_int_field bigint(20) unsigned NO MUL
|
||||
char_field char(10) YES NULL
|
||||
DROP TABLE t2;
|
||||
CREATE TABLE t1 (f1 INT, f2 INT, f3 INT);
|
||||
INSERT INTO t1 VALUES (1, 2, NULL);
|
||||
SELECT * FROM t1;
|
||||
f1 f2 f3
|
||||
1 2 NULL
|
||||
ALTER TABLE t1 MODIFY COLUMN f3 INT AFTER f1;
|
||||
SELECT * FROM t1;
|
||||
f1 f3 f2
|
||||
1 NULL 2
|
||||
ALTER TABLE t1 MODIFY COLUMN f3 INT AFTER f2;
|
||||
SELECT * FROM t1;
|
||||
f1 f2 f3
|
||||
1 2 NULL
|
||||
DROP TABLE t1;
|
||||
|
@ -39,10 +39,10 @@ t2 CREATE TABLE `t2` (
|
||||
`Field_name` varbinary(255) NOT NULL DEFAULT '',
|
||||
`Min_value` varbinary(255) DEFAULT NULL,
|
||||
`Max_value` varbinary(255) DEFAULT NULL,
|
||||
`Min_length` int(11) NOT NULL DEFAULT '0',
|
||||
`Max_length` int(11) NOT NULL DEFAULT '0',
|
||||
`Empties_or_zeros` int(11) NOT NULL DEFAULT '0',
|
||||
`Nulls` int(11) NOT NULL DEFAULT '0',
|
||||
`Min_length` bigint(11) NOT NULL DEFAULT '0',
|
||||
`Max_length` bigint(11) NOT NULL DEFAULT '0',
|
||||
`Empties_or_zeros` bigint(11) NOT NULL DEFAULT '0',
|
||||
`Nulls` bigint(11) NOT NULL DEFAULT '0',
|
||||
`Avg_value_or_avg_length` varbinary(255) NOT NULL DEFAULT '',
|
||||
`Std` varbinary(255) DEFAULT NULL,
|
||||
`Optimal_fieldtype` varbinary(64) NOT NULL DEFAULT ''
|
||||
@ -58,10 +58,10 @@ t2 CREATE TABLE `t2` (
|
||||
`Field_name` varbinary(255) NOT NULL DEFAULT '',
|
||||
`Min_value` varbinary(255) DEFAULT NULL,
|
||||
`Max_value` varbinary(255) DEFAULT NULL,
|
||||
`Min_length` int(11) NOT NULL DEFAULT '0',
|
||||
`Max_length` int(11) NOT NULL DEFAULT '0',
|
||||
`Empties_or_zeros` int(11) NOT NULL DEFAULT '0',
|
||||
`Nulls` int(11) NOT NULL DEFAULT '0',
|
||||
`Min_length` bigint(11) NOT NULL DEFAULT '0',
|
||||
`Max_length` bigint(11) NOT NULL DEFAULT '0',
|
||||
`Empties_or_zeros` bigint(11) NOT NULL DEFAULT '0',
|
||||
`Nulls` bigint(11) NOT NULL DEFAULT '0',
|
||||
`Avg_value_or_avg_length` varbinary(255) NOT NULL DEFAULT '',
|
||||
`Std` varbinary(255) DEFAULT NULL,
|
||||
`Optimal_fieldtype` varbinary(64) NOT NULL DEFAULT ''
|
||||
@ -81,10 +81,10 @@ t2 CREATE TABLE `t2` (
|
||||
`Field_name` varbinary(255) NOT NULL DEFAULT '',
|
||||
`Min_value` varbinary(255) DEFAULT NULL,
|
||||
`Max_value` varbinary(255) DEFAULT NULL,
|
||||
`Min_length` int(11) NOT NULL DEFAULT '0',
|
||||
`Max_length` int(11) NOT NULL DEFAULT '0',
|
||||
`Empties_or_zeros` int(11) NOT NULL DEFAULT '0',
|
||||
`Nulls` int(11) NOT NULL DEFAULT '0',
|
||||
`Min_length` bigint(11) NOT NULL DEFAULT '0',
|
||||
`Max_length` bigint(11) NOT NULL DEFAULT '0',
|
||||
`Empties_or_zeros` bigint(11) NOT NULL DEFAULT '0',
|
||||
`Nulls` bigint(11) NOT NULL DEFAULT '0',
|
||||
`Avg_value_or_avg_length` varbinary(255) NOT NULL DEFAULT '',
|
||||
`Std` varbinary(255) DEFAULT NULL,
|
||||
`Optimal_fieldtype` varbinary(64) NOT NULL DEFAULT ''
|
||||
|
@ -402,8 +402,8 @@ Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t,
|
||||
Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r
|
||||
FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE g1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort; Using join cache
|
||||
1 SIMPLE g2 ALL NULL NULL NULL NULL 2 100.00
|
||||
1 SIMPLE g1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort
|
||||
1 SIMPLE g2 ALL NULL NULL NULL NULL 2 100.00 Using join buffer
|
||||
Warnings:
|
||||
Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,within(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,contains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,overlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,equals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,disjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,intersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,crosses(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `r` from `test`.`gis_geometrycollection` `g1` join `test`.`gis_geometrycollection` `g2` order by `test`.`g1`.`fid`,`test`.`g2`.`fid`
|
||||
DROP TABLE gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry;
|
||||
|
@ -1434,8 +1434,8 @@ companynr companynr
|
||||
41 40
|
||||
explain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 index NULL PRIMARY 1 NULL 12 Using index; Using temporary; Using join cache
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
|
||||
1 SIMPLE t4 index NULL PRIMARY 1 NULL 12 Using index; Using temporary
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer
|
||||
select t2.fld1,t2.companynr,fld3,period from t3,t2 where t2.fld1 = 38208 and t2.fld1=t3.t2nr and period = 1008 or t2.fld1 = 38008 and t2.fld1 =t3.t2nr and period = 1008;
|
||||
fld1 companynr fld3 period
|
||||
038008 37 reporters 1008
|
||||
|
@ -1454,8 +1454,8 @@ insert into t1 values ('123'), ('456');
|
||||
explain
|
||||
select substr(Z.a,-1), Z.a from t1 as Y join t1 as Z on Y.a=Z.a order by 1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE Y ALL NULL NULL NULL NULL 2 Using temporary; Using filesort; Using join cache
|
||||
1 SIMPLE Z ALL NULL NULL NULL NULL 2 Using where
|
||||
1 SIMPLE Y ALL NULL NULL NULL NULL 2 Using temporary; Using filesort
|
||||
1 SIMPLE Z ALL NULL NULL NULL NULL 2 Using where; Using join buffer
|
||||
select substr(Z.a,-1), Z.a from t1 as Y join t1 as Z on Y.a=Z.a order by 1;
|
||||
substr(Z.a,-1) a
|
||||
3 123
|
||||
|
@ -57,8 +57,8 @@ a b a b
|
||||
3 c 3 c
|
||||
explain select * from t1 as x1, (select * from t1) as x2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY x1 ALL NULL NULL NULL NULL 4 Using join cache
|
||||
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 4
|
||||
1 PRIMARY x1 ALL NULL NULL NULL NULL 4
|
||||
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 4 Using join buffer
|
||||
2 DERIVED t1 ALL NULL NULL NULL NULL 4
|
||||
drop table if exists t2,t3;
|
||||
select * from (select 1) as a;
|
||||
@ -188,14 +188,14 @@ pla_id test
|
||||
105 3
|
||||
explain SELECT STRAIGHT_JOIN d.pla_id, m2.mat_id FROM t1 m2 INNER JOIN (SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id GROUP BY mp.pla_id) d ON d.matintnum=m2.matintnum;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY m2 ALL NULL NULL NULL NULL 9 Using join cache
|
||||
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 6 Using where
|
||||
1 PRIMARY m2 ALL NULL NULL NULL NULL 9
|
||||
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 6 Using where; Using join buffer
|
||||
2 DERIVED mp ALL NULL NULL NULL NULL 9 Using temporary; Using filesort
|
||||
2 DERIVED m1 eq_ref PRIMARY PRIMARY 3 test.mp.mat_id 1
|
||||
explain SELECT STRAIGHT_JOIN d.pla_id, m2.test FROM t1 m2 INNER JOIN (SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id GROUP BY mp.pla_id) d ON d.matintnum=m2.matintnum;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY m2 ALL NULL NULL NULL NULL 9 Using join cache
|
||||
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 6 Using where
|
||||
1 PRIMARY m2 ALL NULL NULL NULL NULL 9
|
||||
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 6 Using where; Using join buffer
|
||||
2 DERIVED mp ALL NULL NULL NULL NULL 9 Using temporary; Using filesort
|
||||
2 DERIVED m1 eq_ref PRIMARY PRIMARY 3 test.mp.mat_id 1
|
||||
drop table t1,t2;
|
||||
@ -245,8 +245,8 @@ a a
|
||||
2 2
|
||||
explain select * from ( select * from t1 union select * from t1) a,(select * from t1 union select * from t1) b;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 Using join cache
|
||||
1 PRIMARY <derived4> ALL NULL NULL NULL NULL 2
|
||||
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2
|
||||
1 PRIMARY <derived4> ALL NULL NULL NULL NULL 2 Using join buffer
|
||||
4 DERIVED t1 ALL NULL NULL NULL NULL 2
|
||||
5 UNION t1 ALL NULL NULL NULL NULL 2
|
||||
NULL UNION RESULT <union4,5> ALL NULL NULL NULL NULL NULL
|
||||
@ -312,8 +312,8 @@ b 3.5000
|
||||
explain SELECT s.name, AVG(s.val) AS median FROM (SELECT x.name, x.val FROM t1 x, t1 y WHERE x.name=y.name GROUP BY x.name, x.val HAVING SUM(y.val <= x.val) >= COUNT(*)/2 AND SUM(y.val >= x.val) >= COUNT(*)/2) AS s GROUP BY s.name;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 3 Using temporary; Using filesort
|
||||
2 DERIVED x ALL NULL NULL NULL NULL 17 Using temporary; Using filesort; Using join cache
|
||||
2 DERIVED y ALL NULL NULL NULL NULL 17 Using where
|
||||
2 DERIVED x ALL NULL NULL NULL NULL 17 Using temporary; Using filesort
|
||||
2 DERIVED y ALL NULL NULL NULL NULL 17 Using where; Using join buffer
|
||||
drop table t1;
|
||||
create table t2 (a int, b int, primary key (a));
|
||||
insert into t2 values (1,7),(2,7);
|
||||
|
@ -174,8 +174,8 @@ INSERT INTO t3 VALUES (1,'1'),(2,'2'),(1,'1'),(2,'2');
|
||||
explain SELECT distinct t3.a FROM t3,t2,t1 WHERE t3.a=t1.b AND t1.a=t2.a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 4 Using temporary
|
||||
1 SIMPLE t3 ref a a 5 test.t1.b 2 Using where; Using index; Using join cache
|
||||
1 SIMPLE t2 index a a 4 NULL 5 Using where; Using index; Distinct
|
||||
1 SIMPLE t3 ref a a 5 test.t1.b 2 Using where; Using index
|
||||
1 SIMPLE t2 index a a 4 NULL 5 Using where; Using index; Distinct; Using join buffer
|
||||
SELECT distinct t3.a FROM t3,t2,t1 WHERE t3.a=t1.b AND t1.a=t2.a;
|
||||
a
|
||||
1
|
||||
@ -299,12 +299,12 @@ WHERE
|
||||
((t1.id=j_lj_t2.id AND t2_lj.id IS NULL) OR (t1.id=t2.id AND t2.idx=2))
|
||||
AND ((t1.id=j_lj_t3.id AND t3_lj.id IS NULL) OR (t1.id=t3.id AND t3.idx=2));
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index id id 4 NULL 2 Using index; Using temporary; Using join cache
|
||||
1 SIMPLE t2 index id id 8 NULL 1 Using index; Distinct; Using join cache
|
||||
1 SIMPLE t3 index id id 8 NULL 1 Using index; Distinct; Using join cache
|
||||
1 SIMPLE j_lj_t2 index id id 4 NULL 2 Using where; Using index; Distinct
|
||||
1 SIMPLE t2_lj ref id id 4 test.j_lj_t2.id 1 Using where; Using index; Distinct; Using join cache
|
||||
1 SIMPLE j_lj_t3 index id id 4 NULL 2 Using where; Using index; Distinct
|
||||
1 SIMPLE t1 index id id 4 NULL 2 Using index; Using temporary
|
||||
1 SIMPLE t2 index id id 8 NULL 1 Using index; Distinct; Using join buffer
|
||||
1 SIMPLE t3 index id id 8 NULL 1 Using index; Distinct; Using join buffer
|
||||
1 SIMPLE j_lj_t2 index id id 4 NULL 2 Using where; Using index; Distinct; Using join buffer
|
||||
1 SIMPLE t2_lj ref id id 4 test.j_lj_t2.id 1 Using where; Using index; Distinct
|
||||
1 SIMPLE j_lj_t3 index id id 4 NULL 2 Using where; Using index; Distinct; Using join buffer
|
||||
1 SIMPLE t3_lj ref id id 4 test.j_lj_t3.id 1 Using where; Using index; Distinct
|
||||
SELECT DISTINCT
|
||||
t1.id
|
||||
@ -514,8 +514,8 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
|
||||
EXPLAIN SELECT DISTINCT t1_1.a, t1_1.b FROM t1 t1_1, t1 t1_2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1_1 ALL NULL NULL NULL NULL 3 Using temporary; Using join cache
|
||||
1 SIMPLE t1_2 index NULL PRIMARY 4 NULL 3 Using index; Distinct
|
||||
1 SIMPLE t1_1 ALL NULL NULL NULL NULL 3 Using temporary
|
||||
1 SIMPLE t1_2 index NULL PRIMARY 4 NULL 3 Using index; Distinct; Using join buffer
|
||||
EXPLAIN SELECT DISTINCT t1_1.a, t1_1.b FROM t1 t1_1, t1 t1_2
|
||||
WHERE t1_1.a = t1_2.a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
|
@ -84,4 +84,15 @@ CAST('2006-09-26' AS DATE) + INTERVAL 1 YEAR
|
||||
SELECT CAST('2006-09-26' AS DATE) + INTERVAL 1 WEEK;
|
||||
CAST('2006-09-26' AS DATE) + INTERVAL 1 WEEK
|
||||
2006-10-03
|
||||
create table t1 (a int, b varchar(10));
|
||||
insert into t1 values (1, '2001-01-01'),(2, '2002-02-02');
|
||||
select '2007-01-01' + interval a day from t1;
|
||||
'2007-01-01' + interval a day
|
||||
2007-01-02
|
||||
2007-01-03
|
||||
select b + interval a day from t1;
|
||||
b + interval a day
|
||||
2001-01-02
|
||||
2002-02-04
|
||||
drop table t1;
|
||||
End of 5.0 tests
|
||||
|
@ -769,4 +769,51 @@ Warnings:
|
||||
Warning 1260 1 line(s) were cut by GROUP_CONCAT()
|
||||
SET group_concat_max_len = DEFAULT;
|
||||
DROP TABLE t1;
|
||||
SET group_concat_max_len= 65535;
|
||||
CREATE TABLE t1( a TEXT, b INTEGER );
|
||||
INSERT INTO t1 VALUES ( 'a', 0 ), ( 'b', 1 );
|
||||
SELECT GROUP_CONCAT( a ORDER BY b ) FROM t1;
|
||||
GROUP_CONCAT( a ORDER BY b )
|
||||
a,b
|
||||
SELECT GROUP_CONCAT(DISTINCT a ORDER BY b) FROM t1;
|
||||
GROUP_CONCAT(DISTINCT a ORDER BY b)
|
||||
a,b
|
||||
SELECT GROUP_CONCAT(DISTINCT a) FROM t1;
|
||||
GROUP_CONCAT(DISTINCT a)
|
||||
a,b
|
||||
SET group_concat_max_len= 10;
|
||||
SELECT GROUP_CONCAT(a ORDER BY b) FROM t1;
|
||||
GROUP_CONCAT(a ORDER BY b)
|
||||
a,b
|
||||
SELECT GROUP_CONCAT(DISTINCT a ORDER BY b) FROM t1;
|
||||
GROUP_CONCAT(DISTINCT a ORDER BY b)
|
||||
a,b
|
||||
SELECT GROUP_CONCAT(DISTINCT a) FROM t1;
|
||||
GROUP_CONCAT(DISTINCT a)
|
||||
a,b
|
||||
SET group_concat_max_len= 65535;
|
||||
CREATE TABLE t2( a TEXT );
|
||||
INSERT INTO t2 VALUES( REPEAT( 'a', 5000 ) );
|
||||
INSERT INTO t2 VALUES( REPEAT( 'b', 5000 ) );
|
||||
INSERT INTO t2 VALUES( REPEAT( 'a', 5000 ) );
|
||||
SELECT LENGTH( GROUP_CONCAT( DISTINCT a ) ) FROM t2;
|
||||
LENGTH( GROUP_CONCAT( DISTINCT a ) )
|
||||
10001
|
||||
CREATE TABLE t3( a TEXT, b INT );
|
||||
INSERT INTO t3 VALUES( REPEAT( 'a', 65534 ), 1 );
|
||||
INSERT INTO t3 VALUES( REPEAT( 'a', 65535 ), 2 );
|
||||
INSERT INTO t3 VALUES( REPEAT( 'a', 65536 ), 3 );
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'a' at row 1
|
||||
SELECT LENGTH( GROUP_CONCAT( a ) ) FROM t3 WHERE b = 1;
|
||||
LENGTH( GROUP_CONCAT( a ) )
|
||||
65534
|
||||
SELECT LENGTH( GROUP_CONCAT( a ) ) FROM t3 WHERE b = 2;
|
||||
LENGTH( GROUP_CONCAT( a ) )
|
||||
65535
|
||||
SELECT LENGTH( GROUP_CONCAT( a ) ) FROM t3 WHERE b = 3;
|
||||
LENGTH( GROUP_CONCAT( a ) )
|
||||
65535
|
||||
SET group_concat_max_len= DEFAULT;
|
||||
DROP TABLE t1, t2, t3;
|
||||
End of 5.0 tests
|
||||
|
@ -613,8 +613,8 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
explain
|
||||
select max(t1.a3), min(t2.a2) from t1, t2 where t1.a2 = 2 and t1.a3 < 'MIN' and t2.a3 > 'CA';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range k1 k1 7 NULL 1 Using where; Using index; Using join cache
|
||||
1 SIMPLE t2 range k1 k1 3 NULL 4 Using where; Using index
|
||||
1 SIMPLE t1 range k1 k1 7 NULL 1 Using where; Using index
|
||||
1 SIMPLE t2 range k1 k1 3 NULL 4 Using where; Using index; Using join buffer
|
||||
explain
|
||||
select min(a4 - 0.01) from t1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
@ -650,8 +650,8 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
explain
|
||||
select concat(min(t1.a1),min(t2.a4)) from t1, t2 where t2.a4 <> 'AME';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 range k2 k2 4 NULL 6 Using where; Using index; Using join cache
|
||||
1 SIMPLE t1 index NULL PRIMARY 3 NULL 15 Using index
|
||||
1 SIMPLE t2 range k2 k2 4 NULL 6 Using where; Using index
|
||||
1 SIMPLE t1 index NULL PRIMARY 3 NULL 15 Using index; Using join buffer
|
||||
drop table t1, t2;
|
||||
create table t1 (a char(10));
|
||||
insert into t1 values ('a'),('b'),('c');
|
||||
|
@ -78,8 +78,8 @@ min(7)
|
||||
7
|
||||
explain select min(7) from t2i join t1i;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2i ALL NULL NULL NULL NULL 1 Using join cache
|
||||
1 SIMPLE t1i ALL NULL NULL NULL NULL 1
|
||||
1 SIMPLE t2i ALL NULL NULL NULL NULL 1
|
||||
1 SIMPLE t1i ALL NULL NULL NULL NULL 1 Using join buffer
|
||||
select min(7) from t2i join t1i;
|
||||
min(7)
|
||||
NULL
|
||||
@ -94,8 +94,8 @@ max(7)
|
||||
7
|
||||
explain select max(7) from t2i join t1i;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2i ALL NULL NULL NULL NULL 1 Using join cache
|
||||
1 SIMPLE t1i ALL NULL NULL NULL NULL 1
|
||||
1 SIMPLE t2i ALL NULL NULL NULL NULL 1
|
||||
1 SIMPLE t1i ALL NULL NULL NULL NULL 1 Using join buffer
|
||||
select max(7) from t2i join t1i;
|
||||
max(7)
|
||||
NULL
|
||||
|
@ -22,6 +22,11 @@ hex(inet_aton('127.1.1'))
|
||||
select length(uuid()), charset(uuid()), length(unhex(replace(uuid(),_utf8'-',_utf8'')));
|
||||
length(uuid()) charset(uuid()) length(unhex(replace(uuid(),_utf8'-',_utf8'')))
|
||||
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;
|
||||
length(format('nan', 2)) > 0
|
||||
1
|
||||
|
@ -394,8 +394,8 @@ Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t,
|
||||
Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r
|
||||
FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE g1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort; Using join cache
|
||||
1 SIMPLE g2 ALL NULL NULL NULL NULL 2 100.00
|
||||
1 SIMPLE g1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort
|
||||
1 SIMPLE g2 ALL NULL NULL NULL NULL 2 100.00 Using join buffer
|
||||
Warnings:
|
||||
Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,within(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,contains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,overlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,equals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,disjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,intersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,crosses(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `r` from `test`.`gis_geometrycollection` `g1` join `test`.`gis_geometrycollection` `g2` order by `test`.`g1`.`fid`,`test`.`g2`.`fid`
|
||||
DROP TABLE gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry;
|
||||
|
@ -120,72 +120,72 @@ select @@optimizer_search_depth;
|
||||
63
|
||||
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 821.837037
|
||||
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 821.837037
|
||||
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using join cache
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index; Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index; Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 794.837037
|
||||
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using join cache
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index; Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index; Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 794.837037
|
||||
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using join cache
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where; Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where; Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 794.837037
|
||||
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using join cache
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where; Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where; Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
@ -200,72 +200,72 @@ select @@optimizer_search_depth;
|
||||
0
|
||||
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 821.837037
|
||||
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 821.837037
|
||||
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using join buffer
|
||||
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index; Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 289.418727
|
||||
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using join buffer
|
||||
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index; Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 289.418727
|
||||
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
|
||||
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where; Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 289.418727
|
||||
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
|
||||
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where; Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
@ -276,24 +276,24 @@ select @@optimizer_search_depth;
|
||||
1
|
||||
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 821.837037
|
||||
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
@ -303,10 +303,10 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index; Using join cache
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 794.837037
|
||||
@ -315,10 +315,10 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index; Using join cache
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 794.837037
|
||||
@ -327,10 +327,10 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where; Using join cache
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 794.837037
|
||||
@ -339,10 +339,10 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where; Using join cache
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 794.837037
|
||||
@ -352,72 +352,72 @@ select @@optimizer_search_depth;
|
||||
62
|
||||
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 821.837037
|
||||
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 821.837037
|
||||
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using join buffer
|
||||
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index; Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 289.418727
|
||||
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using join buffer
|
||||
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index; Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 289.418727
|
||||
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
|
||||
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where; Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 289.418727
|
||||
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
|
||||
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where; Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
@ -432,72 +432,72 @@ select @@optimizer_search_depth;
|
||||
0
|
||||
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 821.837037
|
||||
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 821.837037
|
||||
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using join cache
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index; Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index; Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 794.837037
|
||||
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using join cache
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index; Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index; Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 794.837037
|
||||
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using join cache
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where; Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where; Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 794.837037
|
||||
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using join cache
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where; Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where; Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
@ -508,24 +508,24 @@ select @@optimizer_search_depth;
|
||||
1
|
||||
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 821.837037
|
||||
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
@ -535,10 +535,10 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index; Using join cache
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 794.837037
|
||||
@ -547,10 +547,10 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index; Using join cache
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 794.837037
|
||||
@ -559,10 +559,10 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where; Using join cache
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 794.837037
|
||||
@ -571,10 +571,10 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where; Using join cache
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 794.837037
|
||||
@ -584,72 +584,72 @@ select @@optimizer_search_depth;
|
||||
62
|
||||
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 821.837037
|
||||
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 821.837037
|
||||
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using join cache
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index; Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index; Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 794.837037
|
||||
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using join cache
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index; Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index; Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 794.837037
|
||||
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using join cache
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where; Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where; Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 794.837037
|
||||
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using join cache
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where; Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where; Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
|
||||
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
|
||||
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
|
@ -536,12 +536,12 @@ a b
|
||||
1 1
|
||||
explain select t1.a,t2.b from t1,t2 where t1.a=t2.a group by t1.a,t2.b;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using temporary; Using filesort; Using join cache
|
||||
1 SIMPLE t2 ALL a NULL NULL NULL 4 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using temporary; Using filesort
|
||||
1 SIMPLE t2 ALL a NULL NULL NULL 4 Using where; Using join buffer
|
||||
explain select t1.a,t2.b from t1,t2 where t1.a=t2.a group by t1.a,t2.b ORDER BY NULL;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using temporary; Using join cache
|
||||
1 SIMPLE t2 ALL a NULL NULL NULL 4 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using temporary
|
||||
1 SIMPLE t2 ALL a NULL NULL NULL 4 Using where; Using join buffer
|
||||
drop table t1,t2;
|
||||
create table t1 (a int, b int);
|
||||
insert into t1 values (1, 4),(10, 40),(1, 4),(10, 43),(1, 4),(10, 41),(1, 4),(10, 43),(1, 4);
|
||||
|
@ -2266,8 +2266,8 @@ EXPLAIN SELECT 1 FROM t1 AS t1_outer1 JOIN t1 AS t1_outer2
|
||||
ON t1_outer1.a = (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2)
|
||||
AND t1_outer1.b = t1_outer2.b;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1_outer1 ref a a 5 const 1 Using where; Using index; Using join cache
|
||||
1 PRIMARY t1_outer2 index NULL a 10 NULL 15 Using where; Using index
|
||||
1 PRIMARY t1_outer1 ref a a 5 const 1 Using where; Using index
|
||||
1 PRIMARY t1_outer2 index NULL a 10 NULL 15 Using where; Using index; Using join buffer
|
||||
2 SUBQUERY t1 range NULL a 5 NULL 8 Using index for group-by
|
||||
EXPLAIN SELECT (SELECT (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) x
|
||||
FROM t1 AS t1_outer) x2 FROM t1 AS t1_outer2;
|
||||
|
@ -270,8 +270,8 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
explain select * from t0,t1 where t0.key1 = 5 and
|
||||
(t1.key1 = t0.key1 or t1.key8 = t0.key1);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 ref i1 i1 4 const 1 Using join cache
|
||||
1 SIMPLE t1 index_merge i1,i8 i1,i8 4,4 NULL 2 Using union(i1,i8); Using where
|
||||
1 SIMPLE t0 ref i1 i1 4 const 1
|
||||
1 SIMPLE t1 index_merge i1,i8 i1,i8 4,4 NULL 2 Using union(i1,i8); Using where; Using join buffer
|
||||
explain select * from t0,t1 where t0.key1 < 3 and
|
||||
(t1.key1 = t0.key1 or t1.key8 = t0.key1);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
@ -347,8 +347,8 @@ from t0 as A force index(i1,i2), t0 as B force index (i1,i2)
|
||||
where (A.key1 < 500000 or A.key2 < 3)
|
||||
and (B.key1 < 500000 or B.key2 < 3);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE A index_merge i1,i2 i1,i2 4,4 NULL 1013 Using sort_union(i1,i2); Using where; Using join cache
|
||||
1 SIMPLE B index_merge i1,i2 i1,i2 4,4 NULL 1013 Using sort_union(i1,i2); Using where
|
||||
1 SIMPLE A index_merge i1,i2 i1,i2 4,4 NULL 1013 Using sort_union(i1,i2); Using where
|
||||
1 SIMPLE B index_merge i1,i2 i1,i2 4,4 NULL 1013 Using sort_union(i1,i2); Using where; Using join buffer
|
||||
select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5)
|
||||
from t0 as A force index(i1,i2), t0 as B force index (i1,i2)
|
||||
where (A.key1 < 500000 or A.key2 < 3)
|
||||
@ -361,8 +361,8 @@ from t0 as A force index(i1,i2), t0 as B force index (i1,i2)
|
||||
where (A.key1 = 1 or A.key2 = 1)
|
||||
and (B.key1 = 1 or B.key2 = 1);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE A index_merge i1,i2 i1,i2 4,4 NULL 1020 Using union(i1,i2); Using where; Using join cache
|
||||
1 SIMPLE B index_merge i1,i2 i1,i2 4,4 NULL 1020 Using union(i1,i2); Using where
|
||||
1 SIMPLE A index_merge i1,i2 i1,i2 4,4 NULL 1020 Using union(i1,i2); Using where
|
||||
1 SIMPLE B index_merge i1,i2 i1,i2 4,4 NULL 1020 Using union(i1,i2); Using where; Using join buffer
|
||||
select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5)
|
||||
from t0 as A force index(i1,i2), t0 as B force index (i1,i2)
|
||||
where (A.key1 = 1 or A.key2 = 1)
|
||||
@ -376,8 +376,8 @@ from t0 as A, t0 as B
|
||||
where (A.key1 = 1 and A.key2 = 1 and A.key3 = 1 and A.key4=1 and A.key5=1 and A.key6=1 and A.key7 = 1 or A.key8=1)
|
||||
and (B.key1 = 1 and B.key2 = 1 and B.key3 = 1 and B.key4=1 and B.key5=1 and B.key6=1 and B.key7 = 1 or B.key8=1);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE A index_merge i1,i2,i3,i4,i5,i6,i7?,i8 i2,i3,i4,i5,i6,i7?,i8 X NULL # Using union(intersect(i2,i3,i4,i5,i6,i7?),i8); Using where; Using join cache
|
||||
1 SIMPLE B index_merge i1,i2,i3,i4,i5,i6,i7?,i8 i2,i3,i4,i5,i6,i7?,i8 X NULL # Using union(intersect(i2,i3,i4,i5,i6,i7?),i8); Using where
|
||||
1 SIMPLE A index_merge i1,i2,i3,i4,i5,i6,i7?,i8 i2,i3,i4,i5,i6,i7?,i8 X NULL # Using union(intersect(i2,i3,i4,i5,i6,i7?),i8); Using where
|
||||
1 SIMPLE B index_merge i1,i2,i3,i4,i5,i6,i7?,i8 i2,i3,i4,i5,i6,i7?,i8 X NULL # Using union(intersect(i2,i3,i4,i5,i6,i7?),i8); Using where; Using join buffer
|
||||
select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5)
|
||||
from t0 as A, t0 as B
|
||||
where (A.key1 = 1 and A.key2 = 1 and A.key3 = 1 and A.key4=1 and A.key5=1 and A.key6=1 and A.key7 = 1 or A.key8=1)
|
||||
|
@ -289,8 +289,8 @@ explain select a.ROUTINE_NAME from information_schema.ROUTINES a,
|
||||
information_schema.SCHEMATA b where
|
||||
a.ROUTINE_SCHEMA = b.SCHEMA_NAME;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE # ALL NULL NULL NULL NULL 2 Using join cache
|
||||
1 SIMPLE # ALL NULL NULL NULL NULL 2 Using where
|
||||
1 SIMPLE # ALL NULL NULL NULL NULL 2
|
||||
1 SIMPLE # ALL NULL NULL NULL NULL 2 Using where; Using join buffer
|
||||
select a.ROUTINE_NAME, b.name from information_schema.ROUTINES a,
|
||||
mysql.proc b where a.ROUTINE_NAME = convert(b.name using utf8) order by 1;
|
||||
ROUTINE_NAME name
|
||||
|
@ -402,8 +402,8 @@ Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t,
|
||||
Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r
|
||||
FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE g1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort; Using join cache
|
||||
1 SIMPLE g2 ALL NULL NULL NULL NULL 2 100.00
|
||||
1 SIMPLE g1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort
|
||||
1 SIMPLE g2 ALL NULL NULL NULL NULL 2 100.00 Using join buffer
|
||||
Warnings:
|
||||
Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,within(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,contains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,overlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,equals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,disjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,intersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,crosses(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `r` from `test`.`gis_geometrycollection` `g1` join `test`.`gis_geometrycollection` `g2` order by `test`.`g1`.`fid`,`test`.`g2`.`fid`
|
||||
DROP TABLE gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry;
|
||||
|
@ -184,8 +184,8 @@ min(7)
|
||||
7
|
||||
explain select min(7) from t2i join t1i;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2i ALL NULL NULL NULL NULL 1 Using join cache
|
||||
1 SIMPLE t1i ALL NULL NULL NULL NULL 1
|
||||
1 SIMPLE t2i ALL NULL NULL NULL NULL 1
|
||||
1 SIMPLE t1i ALL NULL NULL NULL NULL 1 Using join buffer
|
||||
select min(7) from t2i join t1i;
|
||||
min(7)
|
||||
NULL
|
||||
@ -200,8 +200,8 @@ max(7)
|
||||
7
|
||||
explain select max(7) from t2i join t1i;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2i ALL NULL NULL NULL NULL 1 Using join cache
|
||||
1 SIMPLE t1i ALL NULL NULL NULL NULL 1
|
||||
1 SIMPLE t2i ALL NULL NULL NULL NULL 1
|
||||
1 SIMPLE t1i ALL NULL NULL NULL NULL 1 Using join buffer
|
||||
select max(7) from t2i join t1i;
|
||||
max(7)
|
||||
NULL
|
||||
|
@ -403,8 +403,8 @@ EXPLAIN
|
||||
SELECT STRAIGHT_JOIN t2.e FROM t1,t2 WHERE t2.d=1 AND t1.b=t2.e
|
||||
ORDER BY t1.b, t1.c;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 32 Using temporary; Using filesort; Using join cache
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 16 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 32 Using temporary; Using filesort
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 16 Using where; Using join buffer
|
||||
SELECT STRAIGHT_JOIN t2.e FROM t1,t2 WHERE t2.d=1 AND t1.b=t2.e
|
||||
ORDER BY t1.b, t1.c;
|
||||
e
|
||||
|
@ -228,8 +228,8 @@ LEFT JOIN
|
||||
t8
|
||||
ON t7.b=t8.b AND t6.b < 10;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00 Using join cache
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00
|
||||
1 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using join buffer
|
||||
1 SIMPLE t8 ALL NULL NULL NULL NULL 2 100.00
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b` from `test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t7`.`b` = `test`.`t8`.`b`) and (`test`.`t6`.`b` < 10))) where 1
|
||||
@ -543,8 +543,8 @@ WHERE t0.a=1 AND
|
||||
t0.b=t1.b AND
|
||||
(t2.a >= 4 OR t2.c IS NULL);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join cache
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00
|
||||
@ -638,16 +638,16 @@ t0.b=t1.b AND
|
||||
(t8.b=t9.b OR t8.c IS NULL) AND
|
||||
(t9.a=1);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join cache
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
1 SIMPLE t5 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t8 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join cache
|
||||
1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t8 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) join `test`.`t9` where ((`test`.`t9`.`a` = 1) and (`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)) and ((`test`.`t3`.`a` < 5) or isnull(`test`.`t3`.`c`)) and ((`test`.`t4`.`b` = `test`.`t3`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t4`.`c`)) and ((`test`.`t5`.`a` >= 2) or isnull(`test`.`t5`.`c`)) and ((`test`.`t6`.`a` >= 4) or isnull(`test`.`t6`.`c`)) and ((`test`.`t7`.`a` <= 2) or isnull(`test`.`t7`.`c`)) and ((`test`.`t8`.`a` < 1) or isnull(`test`.`t8`.`c`)) and ((`test`.`t9`.`b` = `test`.`t8`.`b`) or isnull(`test`.`t8`.`c`)))
|
||||
SELECT t9.a,t9.b
|
||||
@ -835,8 +835,8 @@ t2
|
||||
ON t3.a=1 AND t2.b=t4.b
|
||||
WHERE t1.a <= 2;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join cache
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using join buffer
|
||||
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00
|
||||
Warnings:
|
||||
@ -849,8 +849,8 @@ LEFT JOIN
|
||||
(t1,t2)
|
||||
ON t3.a=1 AND t3.b=t2.b AND t2.b=t4.b;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using join cache
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00
|
||||
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00 Using join buffer
|
||||
1 SIMPLE t2 ref idx_b idx_b 5 test.t3.b 2 100.00
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
|
||||
Warnings:
|
||||
@ -905,16 +905,16 @@ t0.b=t1.b AND
|
||||
(t8.b=t9.b OR t8.c IS NULL) AND
|
||||
(t9.a=1);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join cache
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
1 SIMPLE t5 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t8 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join cache
|
||||
1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t8 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) join `test`.`t9` where ((`test`.`t9`.`a` = 1) and (`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)) and ((`test`.`t3`.`a` < 5) or isnull(`test`.`t3`.`c`)) and ((`test`.`t4`.`b` = `test`.`t3`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t4`.`c`)) and ((`test`.`t5`.`a` >= 2) or isnull(`test`.`t5`.`c`)) and ((`test`.`t6`.`a` >= 4) or isnull(`test`.`t6`.`c`)) and ((`test`.`t7`.`a` <= 2) or isnull(`test`.`t7`.`c`)) and ((`test`.`t8`.`a` < 1) or isnull(`test`.`t8`.`c`)) and ((`test`.`t9`.`b` = `test`.`t8`.`b`) or isnull(`test`.`t8`.`c`)))
|
||||
CREATE INDEX idx_b ON t4(b);
|
||||
@ -955,16 +955,16 @@ t0.b=t1.b AND
|
||||
(t8.b=t9.b OR t8.c IS NULL) AND
|
||||
(t9.a=1);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join cache
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
1 SIMPLE t4 ref idx_b idx_b 5 test.t2.b 2 100.00 Using where
|
||||
1 SIMPLE t5 ALL idx_b NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t8 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join cache
|
||||
1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t8 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) join `test`.`t9` where ((`test`.`t9`.`a` = 1) and (`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)) and ((`test`.`t3`.`a` < 5) or isnull(`test`.`t3`.`c`)) and ((`test`.`t4`.`b` = `test`.`t3`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t4`.`c`)) and ((`test`.`t5`.`a` >= 2) or isnull(`test`.`t5`.`c`)) and ((`test`.`t6`.`a` >= 4) or isnull(`test`.`t6`.`c`)) and ((`test`.`t7`.`a` <= 2) or isnull(`test`.`t7`.`c`)) and ((`test`.`t8`.`a` < 1) or isnull(`test`.`t8`.`c`)) and ((`test`.`t9`.`b` = `test`.`t8`.`b`) or isnull(`test`.`t8`.`c`)))
|
||||
CREATE INDEX idx_b ON t8(b);
|
||||
@ -1004,16 +1004,16 @@ t0.b=t1.b AND
|
||||
(t8.b=t9.b OR t8.c IS NULL) AND
|
||||
(t9.a=1);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join cache
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
1 SIMPLE t4 ref idx_b idx_b 5 test.t2.b 2 100.00 Using where
|
||||
1 SIMPLE t5 ALL idx_b NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t8 ref idx_b idx_b 5 test.t5.b 2 100.00 Using where; Using join cache
|
||||
1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t8 ref idx_b idx_b 5 test.t5.b 2 100.00 Using where
|
||||
1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) join `test`.`t9` where ((`test`.`t9`.`a` = 1) and (`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)) and ((`test`.`t3`.`a` < 5) or isnull(`test`.`t3`.`c`)) and ((`test`.`t4`.`b` = `test`.`t3`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t4`.`c`)) and ((`test`.`t5`.`a` >= 2) or isnull(`test`.`t5`.`c`)) and ((`test`.`t6`.`a` >= 4) or isnull(`test`.`t6`.`c`)) and ((`test`.`t7`.`a` <= 2) or isnull(`test`.`t7`.`c`)) and ((`test`.`t8`.`a` < 1) or isnull(`test`.`t8`.`c`)) and ((`test`.`t9`.`b` = `test`.`t8`.`b`) or isnull(`test`.`t8`.`c`)))
|
||||
CREATE INDEX idx_b ON t1(b);
|
||||
@ -1062,8 +1062,8 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t5 ALL idx_b NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t8 ref idx_b idx_b 5 test.t5.b 2 100.00 Using where; Using join cache
|
||||
1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t8 ref idx_b idx_b 5 test.t5.b 2 100.00 Using where
|
||||
1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) join `test`.`t9` where ((`test`.`t9`.`a` = 1) and (`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)) and ((`test`.`t3`.`a` < 5) or isnull(`test`.`t3`.`c`)) and ((`test`.`t4`.`b` = `test`.`t3`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t4`.`c`)) and ((`test`.`t5`.`a` >= 2) or isnull(`test`.`t5`.`c`)) and ((`test`.`t6`.`a` >= 4) or isnull(`test`.`t6`.`c`)) and ((`test`.`t7`.`a` <= 2) or isnull(`test`.`t7`.`c`)) and ((`test`.`t8`.`a` < 1) or isnull(`test`.`t8`.`c`)) and ((`test`.`t9`.`b` = `test`.`t8`.`b`) or isnull(`test`.`t8`.`c`)))
|
||||
SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
|
||||
|
@ -1239,3 +1239,18 @@ Handler_read_prev 0
|
||||
Handler_read_rnd 0
|
||||
Handler_read_rnd_next 6
|
||||
DROP TABLE t1,t2;
|
||||
CREATE TABLE t1 (c int PRIMARY KEY, e int NOT NULL);
|
||||
INSERT INTO t1 VALUES (1,0), (2,1);
|
||||
CREATE TABLE t2 (d int PRIMARY KEY);
|
||||
INSERT INTO t2 VALUES (1), (2), (3);
|
||||
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 ON e<>0 WHERE c=1 AND d IS NULL;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
|
||||
1 SIMPLE t2 index NULL PRIMARY 4 NULL 3 Using where; Using index; Not exists
|
||||
SELECT * FROM t1 LEFT JOIN t2 ON e<>0 WHERE c=1 AND d IS NULL;
|
||||
c e d
|
||||
1 0 NULL
|
||||
SELECT * FROM t1 LEFT JOIN t2 ON e<>0 WHERE c=1 AND d<=>NULL;
|
||||
c e d
|
||||
1 0 NULL
|
||||
DROP TABLE t1,t2;
|
||||
|
@ -35,8 +35,8 @@ D E a a
|
||||
a a a a
|
||||
explain select t1.*,t2.* from t1,t1 as t2 where t1.A=t2.B;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL a NULL NULL NULL 5 Using join cache
|
||||
1 SIMPLE t2 ALL b NULL NULL NULL 5 Using where
|
||||
1 SIMPLE t1 ALL a NULL NULL NULL 5
|
||||
1 SIMPLE t2 ALL b NULL NULL NULL 5 Using where; Using join buffer
|
||||
select t1.*,t2.* from t1,t1 as t2 where t1.A=t2.B order by binary t1.a,t2.a;
|
||||
a b a b
|
||||
A B a a
|
||||
|
@ -41,3 +41,87 @@ select 1;
|
||||
select RELEASE_LOCK("a");
|
||||
RELEASE_LOCK("a")
|
||||
1
|
||||
create table t1(f1 int);
|
||||
create function bug27563() returns int(11)
|
||||
deterministic
|
||||
begin
|
||||
declare continue handler for sqlstate '70100' set @a:= 'killed';
|
||||
declare continue handler for sqlexception set @a:= 'exception';
|
||||
set @a= get_lock("lock27563", 10);
|
||||
return 1;
|
||||
end|
|
||||
select get_lock("lock27563",10);
|
||||
get_lock("lock27563",10)
|
||||
1
|
||||
insert into t1 values (bug27563());
|
||||
ERROR 70100: Query execution was interrupted
|
||||
select @a;
|
||||
@a
|
||||
NULL
|
||||
select * from t1;
|
||||
f1
|
||||
insert into t1 values(0);
|
||||
update t1 set f1= bug27563();
|
||||
ERROR 70100: Query execution was interrupted
|
||||
select @a;
|
||||
@a
|
||||
NULL
|
||||
select * from t1;
|
||||
f1
|
||||
0
|
||||
insert into t1 values(1);
|
||||
delete from t1 where bug27563() is null;
|
||||
ERROR 70100: Query execution was interrupted
|
||||
select @a;
|
||||
@a
|
||||
NULL
|
||||
select * from t1;
|
||||
f1
|
||||
0
|
||||
1
|
||||
select * from t1 where f1= bug27563();
|
||||
ERROR 70100: Query execution was interrupted
|
||||
select @a;
|
||||
@a
|
||||
NULL
|
||||
create procedure proc27563()
|
||||
begin
|
||||
declare continue handler for sqlstate '70100' set @a:= 'killed';
|
||||
declare continue handler for sqlexception set @a:= 'exception';
|
||||
select get_lock("lock27563",10);
|
||||
select "shouldn't be selected";
|
||||
end|
|
||||
call proc27563();
|
||||
get_lock("lock27563",10)
|
||||
NULL
|
||||
ERROR 70100: Query execution was interrupted
|
||||
select @a;
|
||||
@a
|
||||
NULL
|
||||
create table t2 (f2 int);
|
||||
create trigger trg27563 before insert on t1 for each row
|
||||
begin
|
||||
declare continue handler for sqlstate '70100' set @a:= 'killed';
|
||||
declare continue handler for sqlexception set @a:= 'exception';
|
||||
set @a:= get_lock("lock27563",10);
|
||||
insert into t2 values(1);
|
||||
end|
|
||||
insert into t1 values(2),(3);
|
||||
ERROR 70100: Query execution was interrupted
|
||||
select @a;
|
||||
@a
|
||||
NULL
|
||||
select * from t1;
|
||||
f1
|
||||
0
|
||||
1
|
||||
select * from t2;
|
||||
f2
|
||||
select release_lock("lock27563");
|
||||
release_lock("lock27563")
|
||||
1
|
||||
drop table t1, t2;
|
||||
drop function bug27563;
|
||||
drop procedure proc27563;
|
||||
PREPARE stmt FROM 'EXPLAIN SELECT * FROM t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40 WHERE a1=a2 AND a2=a3 AND a3=a4 AND a4=a5 AND a5=a6 AND a6=a7 AND a7=a8 AND a8=a9 AND a9=a10 AND a10=a11 AND a11=a12 AND a12=a13 AND a13=a14 AND a14=a15 AND a15=a16 AND a16=a17 AND a17=a18 AND a18=a19 AND a19=a20 AND a20=a21 AND a21=a22 AND a22=a23 AND a23=a24 AND a24=a25 AND a25=a26 AND a26=a27 AND a27=a28 AND a28=a29 AND a29=a30 AND a30=a31 AND a31=a32 AND a32=a33 AND a33=a34 AND a34=a35 AND a35=a36 AND a36=a37 AND a37=a38 AND a38=a39 AND a39=a40 ';
|
||||
EXECUTE stmt;
|
||||
|
@ -130,3 +130,14 @@ def v3 renamed 8 12 0 Y 32896 0 63
|
||||
renamed
|
||||
drop table t1;
|
||||
drop view v1,v2,v3;
|
||||
select a.* from (select 2147483648 as v_large) a;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def a v_large v_large 8 10 10 N 32769 0 63
|
||||
v_large
|
||||
2147483648
|
||||
select a.* from (select 214748364 as v_small) a;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def a v_small v_small 3 9 9 N 32769 0 63
|
||||
v_small
|
||||
214748364
|
||||
End of 5.0 tests
|
||||
|
@ -345,12 +345,12 @@ t1 1 c_2 1 c A 5 NULL NULL YES BTREE
|
||||
t1 1 c_2 2 a A 5 NULL NULL BTREE
|
||||
explain select * from t1,t2 where t1.a=t2.a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL a NULL NULL NULL 2 Using join cache
|
||||
1 SIMPLE t1 ALL a NULL NULL NULL 5 Using where
|
||||
1 SIMPLE t2 ALL a NULL NULL NULL 2
|
||||
1 SIMPLE t1 ALL a NULL NULL NULL 5 Using where; Using join buffer
|
||||
explain select * from t1,t2 force index(a) where t1.a=t2.a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL a NULL NULL NULL 2 Using join cache
|
||||
1 SIMPLE t1 ALL a NULL NULL NULL 5 Using where
|
||||
1 SIMPLE t2 ALL a NULL NULL NULL 2
|
||||
1 SIMPLE t1 ALL a NULL NULL NULL 5 Using where; Using join buffer
|
||||
explain select * from t1 force index(a),t2 force index(a) where t1.a=t2.a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL a NULL NULL NULL 2
|
||||
@ -361,8 +361,8 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref b b 5 test.t2.b 1 Using where
|
||||
explain select * from t1,t2 force index(c) where t1.a=t2.a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 2 Using join cache
|
||||
1 SIMPLE t1 ALL a NULL NULL NULL 5 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 2
|
||||
1 SIMPLE t1 ALL a NULL NULL NULL 5 Using where; Using join buffer
|
||||
explain select * from t1 where a=0 or a=2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL a NULL NULL NULL 5 Using where
|
||||
@ -1768,6 +1768,32 @@ create table t3 (c1 int) engine=myisam pack_keys=default;
|
||||
create table t4 (c1 int) engine=myisam pack_keys=2;
|
||||
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 '2' at line 1
|
||||
drop table t1, t2, t3;
|
||||
CREATE TABLE t1(a INT, b INT, KEY inx (a), UNIQUE KEY uinx (b)) ENGINE=MyISAM;
|
||||
INSERT INTO t1(a,b) VALUES (1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
SELECT a FROM t1 FORCE INDEX (inx) WHERE a=1;
|
||||
a
|
||||
1
|
||||
ALTER TABLE t1 DISABLE KEYS;
|
||||
SELECT a FROM t1 FORCE INDEX (inx) WHERE a=1;
|
||||
a
|
||||
1
|
||||
SELECT a FROM t1 USE INDEX (inx) WHERE a=1;
|
||||
a
|
||||
1
|
||||
SELECT b FROM t1 FORCE INDEX (uinx) WHERE b=1;
|
||||
b
|
||||
1
|
||||
SELECT b FROM t1 USE INDEX (uinx) WHERE b=1;
|
||||
b
|
||||
1
|
||||
SELECT a FROM t1 FORCE INDEX (inx,uinx) WHERE a=1;
|
||||
a
|
||||
1
|
||||
ALTER TABLE t1 ENABLE KEYS;
|
||||
SELECT a FROM t1 FORCE INDEX (inx) WHERE a=1;
|
||||
a
|
||||
1
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
create table t1 (a int not null, key `a` (a) key_block_size=1024);
|
||||
show create table t1;
|
||||
|
@ -3309,6 +3309,17 @@ drop user user1;
|
||||
drop user user2;
|
||||
drop database mysqldump_test_db;
|
||||
#
|
||||
# Bug #28522: buffer overrun by '\0' byte using --hex-blob.
|
||||
#
|
||||
CREATE TABLE t1 (c1 INT, c2 LONGBLOB);
|
||||
INSERT INTO t1 SET c1=11, c2=REPEAT('q',509);
|
||||
CREATE TABLE `t1` (
|
||||
`c1` int(11) DEFAULT NULL,
|
||||
`c2` longblob
|
||||
);
|
||||
INSERT INTO `t1` VALUES (11,0x7171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171);
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# End of 5.0 tests
|
||||
#
|
||||
drop table if exists t1;
|
||||
|
@ -1730,8 +1730,8 @@ pk1 attr1 attr2 attr3 attr4
|
||||
explain
|
||||
select * from t2,t3 where t2.attr1 < 1 and t2.attr2 = t3.attr2 and t3.attr1 < 5 order by t2.pk1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL # Using where with pushed condition; Using temporary; Using filesort; Using join cache
|
||||
1 SIMPLE t3 ALL NULL NULL NULL NULL # Using where with pushed condition
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL # Using where with pushed condition; Using temporary; Using filesort
|
||||
1 SIMPLE t3 ALL NULL NULL NULL NULL # Using where with pushed condition; Using join buffer
|
||||
select * from t2,t3 where t2.attr1 < 1 and t2.attr2 = t3.attr2 and t3.attr1 < 5 order by t2.pk1;
|
||||
pk1 attr1 attr2 attr3 pk1 attr1 attr2 attr3 attr4
|
||||
0 0 0 a 0 0 0 0 a
|
||||
@ -1746,8 +1746,8 @@ pk1 attr1 attr2 attr3 attr4
|
||||
explain
|
||||
select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 range attr1 attr1 4 NULL # Using where with pushed condition; Using temporary; Using filesort; Using join cache
|
||||
1 SIMPLE t3 ALL NULL NULL NULL NULL # Using where
|
||||
1 SIMPLE t4 range attr1 attr1 4 NULL # Using where with pushed condition; Using temporary; Using filesort
|
||||
1 SIMPLE t3 ALL NULL NULL NULL NULL # Using where; Using join buffer
|
||||
select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1;
|
||||
pk1 attr1 attr2 attr3 attr4 pk1 attr1 attr2 attr3 attr4
|
||||
2 2 9223372036854775804 2 c 2 2 9223372036854775804 2 c
|
||||
|
@ -402,8 +402,8 @@ Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t,
|
||||
Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r
|
||||
FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE g1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort; Using join cache
|
||||
1 SIMPLE g2 ALL NULL NULL NULL NULL 2 100.00
|
||||
1 SIMPLE g1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort
|
||||
1 SIMPLE g2 ALL NULL NULL NULL NULL 2 100.00 Using join buffer
|
||||
Warnings:
|
||||
Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,within(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,contains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,overlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,equals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,disjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,intersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,crosses(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `r` from `test`.`gis_geometrycollection` `g1` join `test`.`gis_geometrycollection` `g2` order by `test`.`g1`.`fid`,`test`.`g2`.`fid`
|
||||
DROP TABLE gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry;
|
||||
@ -952,8 +952,8 @@ Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t,
|
||||
Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r
|
||||
FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE g1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort; Using join cache
|
||||
1 SIMPLE g2 ALL NULL NULL NULL NULL 2 100.00
|
||||
1 SIMPLE g1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort
|
||||
1 SIMPLE g2 ALL NULL NULL NULL NULL 2 100.00 Using join buffer
|
||||
Warnings:
|
||||
Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,within(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,contains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,overlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,equals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,disjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,intersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,crosses(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `r` from `test`.`gis_geometrycollection` `g1` join `test`.`gis_geometrycollection` `g2` order by `test`.`g1`.`fid`,`test`.`g2`.`fid`
|
||||
DROP TABLE gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry;
|
||||
|
@ -696,8 +696,8 @@ CREATE VIEW v1 AS
|
||||
SELECT a, LENGTH(a), COUNT(*) FROM t1 GROUP BY a WITH ROLLUP;
|
||||
DESC v1;
|
||||
Field Type Null Key Default Extra
|
||||
a int(11) YES 0
|
||||
LENGTH(a) int(10) YES NULL
|
||||
a bigint(11) YES NULL
|
||||
LENGTH(a) bigint(10) YES NULL
|
||||
COUNT(*) bigint(21) NO 0
|
||||
SELECT * FROM v1;
|
||||
a LENGTH(a) COUNT(*)
|
||||
|
@ -1927,8 +1927,8 @@ def @arg07 5 23 1 Y 32896 31 63
|
||||
def @arg08 5 23 1 Y 32896 31 63
|
||||
def @arg09 5 23 1 Y 32896 31 63
|
||||
def @arg10 5 23 1 Y 32896 31 63
|
||||
def @arg11 246 67 6 Y 128 30 63
|
||||
def @arg12 246 67 6 Y 128 30 63
|
||||
def @arg11 246 83 6 Y 128 30 63
|
||||
def @arg12 246 83 6 Y 128 30 63
|
||||
def @arg13 251 16777216 10 Y 128 31 63
|
||||
def @arg14 251 16777216 19 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -1974,8 +1974,8 @@ def @arg07 5 23 0 Y 32896 31 63
|
||||
def @arg08 5 23 0 Y 32896 31 63
|
||||
def @arg09 5 23 0 Y 32896 31 63
|
||||
def @arg10 5 23 0 Y 32896 31 63
|
||||
def @arg11 246 67 0 Y 128 30 63
|
||||
def @arg12 246 67 0 Y 128 30 63
|
||||
def @arg11 246 83 0 Y 128 30 63
|
||||
def @arg12 246 83 0 Y 128 30 63
|
||||
def @arg13 251 16777216 0 Y 128 31 63
|
||||
def @arg14 251 16777216 0 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -2024,8 +2024,8 @@ def @arg07 5 23 1 Y 32896 31 63
|
||||
def @arg08 5 23 1 Y 32896 31 63
|
||||
def @arg09 5 23 1 Y 32896 31 63
|
||||
def @arg10 5 23 1 Y 32896 31 63
|
||||
def @arg11 246 67 6 Y 128 30 63
|
||||
def @arg12 246 67 6 Y 128 30 63
|
||||
def @arg11 246 83 6 Y 128 30 63
|
||||
def @arg12 246 83 6 Y 128 30 63
|
||||
def @arg13 251 16777216 10 Y 128 31 63
|
||||
def @arg14 251 16777216 19 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -2064,8 +2064,8 @@ def @arg07 5 23 0 Y 32896 31 63
|
||||
def @arg08 5 23 0 Y 32896 31 63
|
||||
def @arg09 5 23 0 Y 32896 31 63
|
||||
def @arg10 5 23 0 Y 32896 31 63
|
||||
def @arg11 246 67 0 Y 128 30 63
|
||||
def @arg12 246 67 0 Y 128 30 63
|
||||
def @arg11 246 83 0 Y 128 30 63
|
||||
def @arg12 246 83 0 Y 128 30 63
|
||||
def @arg13 251 16777216 0 Y 128 31 63
|
||||
def @arg14 251 16777216 0 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -2112,8 +2112,8 @@ def @arg07 5 23 1 Y 32896 31 63
|
||||
def @arg08 5 23 1 Y 32896 31 63
|
||||
def @arg09 5 23 1 Y 32896 31 63
|
||||
def @arg10 5 23 1 Y 32896 31 63
|
||||
def @arg11 246 67 6 Y 128 30 63
|
||||
def @arg12 246 67 6 Y 128 30 63
|
||||
def @arg11 246 83 6 Y 128 30 63
|
||||
def @arg12 246 83 6 Y 128 30 63
|
||||
def @arg13 251 16777216 10 Y 128 31 63
|
||||
def @arg14 251 16777216 19 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -2156,8 +2156,8 @@ def @arg07 5 23 0 Y 32896 31 63
|
||||
def @arg08 5 23 0 Y 32896 31 63
|
||||
def @arg09 5 23 0 Y 32896 31 63
|
||||
def @arg10 5 23 0 Y 32896 31 63
|
||||
def @arg11 246 67 0 Y 128 30 63
|
||||
def @arg12 246 67 0 Y 128 30 63
|
||||
def @arg11 246 83 0 Y 128 30 63
|
||||
def @arg12 246 83 0 Y 128 30 63
|
||||
def @arg13 251 16777216 0 Y 128 31 63
|
||||
def @arg14 251 16777216 0 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -2202,8 +2202,8 @@ def @arg07 5 23 1 Y 32896 31 63
|
||||
def @arg08 5 23 1 Y 32896 31 63
|
||||
def @arg09 5 23 1 Y 32896 31 63
|
||||
def @arg10 5 23 1 Y 32896 31 63
|
||||
def @arg11 246 67 6 Y 128 30 63
|
||||
def @arg12 246 67 6 Y 128 30 63
|
||||
def @arg11 246 83 6 Y 128 30 63
|
||||
def @arg12 246 83 6 Y 128 30 63
|
||||
def @arg13 251 16777216 10 Y 128 31 63
|
||||
def @arg14 251 16777216 19 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -2240,8 +2240,8 @@ def @arg07 5 23 0 Y 32896 31 63
|
||||
def @arg08 5 23 0 Y 32896 31 63
|
||||
def @arg09 5 23 0 Y 32896 31 63
|
||||
def @arg10 5 23 0 Y 32896 31 63
|
||||
def @arg11 246 67 0 Y 128 30 63
|
||||
def @arg12 246 67 0 Y 128 30 63
|
||||
def @arg11 246 83 0 Y 128 30 63
|
||||
def @arg12 246 83 0 Y 128 30 63
|
||||
def @arg13 251 16777216 0 Y 128 31 63
|
||||
def @arg14 251 16777216 0 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
|
@ -1910,8 +1910,8 @@ def @arg07 5 23 1 Y 32896 31 63
|
||||
def @arg08 5 23 1 Y 32896 31 63
|
||||
def @arg09 5 23 1 Y 32896 31 63
|
||||
def @arg10 5 23 1 Y 32896 31 63
|
||||
def @arg11 246 67 6 Y 128 30 63
|
||||
def @arg12 246 67 6 Y 128 30 63
|
||||
def @arg11 246 83 6 Y 128 30 63
|
||||
def @arg12 246 83 6 Y 128 30 63
|
||||
def @arg13 251 16777216 10 Y 128 31 63
|
||||
def @arg14 251 16777216 19 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -1957,8 +1957,8 @@ def @arg07 5 23 0 Y 32896 31 63
|
||||
def @arg08 5 23 0 Y 32896 31 63
|
||||
def @arg09 5 23 0 Y 32896 31 63
|
||||
def @arg10 5 23 0 Y 32896 31 63
|
||||
def @arg11 246 67 0 Y 128 30 63
|
||||
def @arg12 246 67 0 Y 128 30 63
|
||||
def @arg11 246 83 0 Y 128 30 63
|
||||
def @arg12 246 83 0 Y 128 30 63
|
||||
def @arg13 251 16777216 0 Y 128 31 63
|
||||
def @arg14 251 16777216 0 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -2007,8 +2007,8 @@ def @arg07 5 23 1 Y 32896 31 63
|
||||
def @arg08 5 23 1 Y 32896 31 63
|
||||
def @arg09 5 23 1 Y 32896 31 63
|
||||
def @arg10 5 23 1 Y 32896 31 63
|
||||
def @arg11 246 67 6 Y 128 30 63
|
||||
def @arg12 246 67 6 Y 128 30 63
|
||||
def @arg11 246 83 6 Y 128 30 63
|
||||
def @arg12 246 83 6 Y 128 30 63
|
||||
def @arg13 251 16777216 10 Y 128 31 63
|
||||
def @arg14 251 16777216 19 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -2047,8 +2047,8 @@ def @arg07 5 23 0 Y 32896 31 63
|
||||
def @arg08 5 23 0 Y 32896 31 63
|
||||
def @arg09 5 23 0 Y 32896 31 63
|
||||
def @arg10 5 23 0 Y 32896 31 63
|
||||
def @arg11 246 67 0 Y 128 30 63
|
||||
def @arg12 246 67 0 Y 128 30 63
|
||||
def @arg11 246 83 0 Y 128 30 63
|
||||
def @arg12 246 83 0 Y 128 30 63
|
||||
def @arg13 251 16777216 0 Y 128 31 63
|
||||
def @arg14 251 16777216 0 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -2095,8 +2095,8 @@ def @arg07 5 23 1 Y 32896 31 63
|
||||
def @arg08 5 23 1 Y 32896 31 63
|
||||
def @arg09 5 23 1 Y 32896 31 63
|
||||
def @arg10 5 23 1 Y 32896 31 63
|
||||
def @arg11 246 67 6 Y 128 30 63
|
||||
def @arg12 246 67 6 Y 128 30 63
|
||||
def @arg11 246 83 6 Y 128 30 63
|
||||
def @arg12 246 83 6 Y 128 30 63
|
||||
def @arg13 251 16777216 10 Y 128 31 63
|
||||
def @arg14 251 16777216 19 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -2139,8 +2139,8 @@ def @arg07 5 23 0 Y 32896 31 63
|
||||
def @arg08 5 23 0 Y 32896 31 63
|
||||
def @arg09 5 23 0 Y 32896 31 63
|
||||
def @arg10 5 23 0 Y 32896 31 63
|
||||
def @arg11 246 67 0 Y 128 30 63
|
||||
def @arg12 246 67 0 Y 128 30 63
|
||||
def @arg11 246 83 0 Y 128 30 63
|
||||
def @arg12 246 83 0 Y 128 30 63
|
||||
def @arg13 251 16777216 0 Y 128 31 63
|
||||
def @arg14 251 16777216 0 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -2185,8 +2185,8 @@ def @arg07 5 23 1 Y 32896 31 63
|
||||
def @arg08 5 23 1 Y 32896 31 63
|
||||
def @arg09 5 23 1 Y 32896 31 63
|
||||
def @arg10 5 23 1 Y 32896 31 63
|
||||
def @arg11 246 67 6 Y 128 30 63
|
||||
def @arg12 246 67 6 Y 128 30 63
|
||||
def @arg11 246 83 6 Y 128 30 63
|
||||
def @arg12 246 83 6 Y 128 30 63
|
||||
def @arg13 251 16777216 10 Y 128 31 63
|
||||
def @arg14 251 16777216 19 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -2223,8 +2223,8 @@ def @arg07 5 23 0 Y 32896 31 63
|
||||
def @arg08 5 23 0 Y 32896 31 63
|
||||
def @arg09 5 23 0 Y 32896 31 63
|
||||
def @arg10 5 23 0 Y 32896 31 63
|
||||
def @arg11 246 67 0 Y 128 30 63
|
||||
def @arg12 246 67 0 Y 128 30 63
|
||||
def @arg11 246 83 0 Y 128 30 63
|
||||
def @arg12 246 83 0 Y 128 30 63
|
||||
def @arg13 251 16777216 0 Y 128 31 63
|
||||
def @arg14 251 16777216 0 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
|
@ -1911,8 +1911,8 @@ def @arg07 5 23 1 Y 32896 31 63
|
||||
def @arg08 5 23 1 Y 32896 31 63
|
||||
def @arg09 5 23 1 Y 32896 31 63
|
||||
def @arg10 5 23 1 Y 32896 31 63
|
||||
def @arg11 246 67 6 Y 128 30 63
|
||||
def @arg12 246 67 6 Y 128 30 63
|
||||
def @arg11 246 83 6 Y 128 30 63
|
||||
def @arg12 246 83 6 Y 128 30 63
|
||||
def @arg13 251 16777216 10 Y 128 31 63
|
||||
def @arg14 251 16777216 19 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -1958,8 +1958,8 @@ def @arg07 5 23 0 Y 32896 31 63
|
||||
def @arg08 5 23 0 Y 32896 31 63
|
||||
def @arg09 5 23 0 Y 32896 31 63
|
||||
def @arg10 5 23 0 Y 32896 31 63
|
||||
def @arg11 246 67 0 Y 128 30 63
|
||||
def @arg12 246 67 0 Y 128 30 63
|
||||
def @arg11 246 83 0 Y 128 30 63
|
||||
def @arg12 246 83 0 Y 128 30 63
|
||||
def @arg13 251 16777216 0 Y 128 31 63
|
||||
def @arg14 251 16777216 0 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -2008,8 +2008,8 @@ def @arg07 5 23 1 Y 32896 31 63
|
||||
def @arg08 5 23 1 Y 32896 31 63
|
||||
def @arg09 5 23 1 Y 32896 31 63
|
||||
def @arg10 5 23 1 Y 32896 31 63
|
||||
def @arg11 246 67 6 Y 128 30 63
|
||||
def @arg12 246 67 6 Y 128 30 63
|
||||
def @arg11 246 83 6 Y 128 30 63
|
||||
def @arg12 246 83 6 Y 128 30 63
|
||||
def @arg13 251 16777216 10 Y 128 31 63
|
||||
def @arg14 251 16777216 19 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -2048,8 +2048,8 @@ def @arg07 5 23 0 Y 32896 31 63
|
||||
def @arg08 5 23 0 Y 32896 31 63
|
||||
def @arg09 5 23 0 Y 32896 31 63
|
||||
def @arg10 5 23 0 Y 32896 31 63
|
||||
def @arg11 246 67 0 Y 128 30 63
|
||||
def @arg12 246 67 0 Y 128 30 63
|
||||
def @arg11 246 83 0 Y 128 30 63
|
||||
def @arg12 246 83 0 Y 128 30 63
|
||||
def @arg13 251 16777216 0 Y 128 31 63
|
||||
def @arg14 251 16777216 0 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -2096,8 +2096,8 @@ def @arg07 5 23 1 Y 32896 31 63
|
||||
def @arg08 5 23 1 Y 32896 31 63
|
||||
def @arg09 5 23 1 Y 32896 31 63
|
||||
def @arg10 5 23 1 Y 32896 31 63
|
||||
def @arg11 246 67 6 Y 128 30 63
|
||||
def @arg12 246 67 6 Y 128 30 63
|
||||
def @arg11 246 83 6 Y 128 30 63
|
||||
def @arg12 246 83 6 Y 128 30 63
|
||||
def @arg13 251 16777216 10 Y 128 31 63
|
||||
def @arg14 251 16777216 19 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -2140,8 +2140,8 @@ def @arg07 5 23 0 Y 32896 31 63
|
||||
def @arg08 5 23 0 Y 32896 31 63
|
||||
def @arg09 5 23 0 Y 32896 31 63
|
||||
def @arg10 5 23 0 Y 32896 31 63
|
||||
def @arg11 246 67 0 Y 128 30 63
|
||||
def @arg12 246 67 0 Y 128 30 63
|
||||
def @arg11 246 83 0 Y 128 30 63
|
||||
def @arg12 246 83 0 Y 128 30 63
|
||||
def @arg13 251 16777216 0 Y 128 31 63
|
||||
def @arg14 251 16777216 0 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -2186,8 +2186,8 @@ def @arg07 5 23 1 Y 32896 31 63
|
||||
def @arg08 5 23 1 Y 32896 31 63
|
||||
def @arg09 5 23 1 Y 32896 31 63
|
||||
def @arg10 5 23 1 Y 32896 31 63
|
||||
def @arg11 246 67 6 Y 128 30 63
|
||||
def @arg12 246 67 6 Y 128 30 63
|
||||
def @arg11 246 83 6 Y 128 30 63
|
||||
def @arg12 246 83 6 Y 128 30 63
|
||||
def @arg13 251 16777216 10 Y 128 31 63
|
||||
def @arg14 251 16777216 19 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -2224,8 +2224,8 @@ def @arg07 5 23 0 Y 32896 31 63
|
||||
def @arg08 5 23 0 Y 32896 31 63
|
||||
def @arg09 5 23 0 Y 32896 31 63
|
||||
def @arg10 5 23 0 Y 32896 31 63
|
||||
def @arg11 246 67 0 Y 128 30 63
|
||||
def @arg12 246 67 0 Y 128 30 63
|
||||
def @arg11 246 83 0 Y 128 30 63
|
||||
def @arg12 246 83 0 Y 128 30 63
|
||||
def @arg13 251 16777216 0 Y 128 31 63
|
||||
def @arg14 251 16777216 0 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
|
@ -1847,8 +1847,8 @@ def @arg07 5 23 1 Y 32896 31 63
|
||||
def @arg08 5 23 1 Y 32896 31 63
|
||||
def @arg09 5 23 1 Y 32896 31 63
|
||||
def @arg10 5 23 1 Y 32896 31 63
|
||||
def @arg11 246 67 6 Y 128 30 63
|
||||
def @arg12 246 67 6 Y 128 30 63
|
||||
def @arg11 246 83 6 Y 128 30 63
|
||||
def @arg12 246 83 6 Y 128 30 63
|
||||
def @arg13 251 16777216 10 Y 128 31 63
|
||||
def @arg14 251 16777216 19 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -1894,8 +1894,8 @@ def @arg07 5 23 0 Y 32896 31 63
|
||||
def @arg08 5 23 0 Y 32896 31 63
|
||||
def @arg09 5 23 0 Y 32896 31 63
|
||||
def @arg10 5 23 0 Y 32896 31 63
|
||||
def @arg11 246 67 0 Y 128 30 63
|
||||
def @arg12 246 67 0 Y 128 30 63
|
||||
def @arg11 246 83 0 Y 128 30 63
|
||||
def @arg12 246 83 0 Y 128 30 63
|
||||
def @arg13 251 16777216 0 Y 128 31 63
|
||||
def @arg14 251 16777216 0 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -1944,8 +1944,8 @@ def @arg07 5 23 1 Y 32896 31 63
|
||||
def @arg08 5 23 1 Y 32896 31 63
|
||||
def @arg09 5 23 1 Y 32896 31 63
|
||||
def @arg10 5 23 1 Y 32896 31 63
|
||||
def @arg11 246 67 6 Y 128 30 63
|
||||
def @arg12 246 67 6 Y 128 30 63
|
||||
def @arg11 246 83 6 Y 128 30 63
|
||||
def @arg12 246 83 6 Y 128 30 63
|
||||
def @arg13 251 16777216 10 Y 128 31 63
|
||||
def @arg14 251 16777216 19 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -1984,8 +1984,8 @@ def @arg07 5 23 0 Y 32896 31 63
|
||||
def @arg08 5 23 0 Y 32896 31 63
|
||||
def @arg09 5 23 0 Y 32896 31 63
|
||||
def @arg10 5 23 0 Y 32896 31 63
|
||||
def @arg11 246 67 0 Y 128 30 63
|
||||
def @arg12 246 67 0 Y 128 30 63
|
||||
def @arg11 246 83 0 Y 128 30 63
|
||||
def @arg12 246 83 0 Y 128 30 63
|
||||
def @arg13 251 16777216 0 Y 128 31 63
|
||||
def @arg14 251 16777216 0 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -2032,8 +2032,8 @@ def @arg07 5 23 1 Y 32896 31 63
|
||||
def @arg08 5 23 1 Y 32896 31 63
|
||||
def @arg09 5 23 1 Y 32896 31 63
|
||||
def @arg10 5 23 1 Y 32896 31 63
|
||||
def @arg11 246 67 6 Y 128 30 63
|
||||
def @arg12 246 67 6 Y 128 30 63
|
||||
def @arg11 246 83 6 Y 128 30 63
|
||||
def @arg12 246 83 6 Y 128 30 63
|
||||
def @arg13 251 16777216 10 Y 128 31 63
|
||||
def @arg14 251 16777216 19 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -2076,8 +2076,8 @@ def @arg07 5 23 0 Y 32896 31 63
|
||||
def @arg08 5 23 0 Y 32896 31 63
|
||||
def @arg09 5 23 0 Y 32896 31 63
|
||||
def @arg10 5 23 0 Y 32896 31 63
|
||||
def @arg11 246 67 0 Y 128 30 63
|
||||
def @arg12 246 67 0 Y 128 30 63
|
||||
def @arg11 246 83 0 Y 128 30 63
|
||||
def @arg12 246 83 0 Y 128 30 63
|
||||
def @arg13 251 16777216 0 Y 128 31 63
|
||||
def @arg14 251 16777216 0 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -2122,8 +2122,8 @@ def @arg07 5 23 1 Y 32896 31 63
|
||||
def @arg08 5 23 1 Y 32896 31 63
|
||||
def @arg09 5 23 1 Y 32896 31 63
|
||||
def @arg10 5 23 1 Y 32896 31 63
|
||||
def @arg11 246 67 6 Y 128 30 63
|
||||
def @arg12 246 67 6 Y 128 30 63
|
||||
def @arg11 246 83 6 Y 128 30 63
|
||||
def @arg12 246 83 6 Y 128 30 63
|
||||
def @arg13 251 16777216 10 Y 128 31 63
|
||||
def @arg14 251 16777216 19 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -2160,8 +2160,8 @@ def @arg07 5 23 0 Y 32896 31 63
|
||||
def @arg08 5 23 0 Y 32896 31 63
|
||||
def @arg09 5 23 0 Y 32896 31 63
|
||||
def @arg10 5 23 0 Y 32896 31 63
|
||||
def @arg11 246 67 0 Y 128 30 63
|
||||
def @arg12 246 67 0 Y 128 30 63
|
||||
def @arg11 246 83 0 Y 128 30 63
|
||||
def @arg12 246 83 0 Y 128 30 63
|
||||
def @arg13 251 16777216 0 Y 128 31 63
|
||||
def @arg14 251 16777216 0 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -4868,8 +4868,8 @@ def @arg07 5 23 1 Y 32896 31 63
|
||||
def @arg08 5 23 1 Y 32896 31 63
|
||||
def @arg09 5 23 1 Y 32896 31 63
|
||||
def @arg10 5 23 1 Y 32896 31 63
|
||||
def @arg11 246 67 6 Y 128 30 63
|
||||
def @arg12 246 67 6 Y 128 30 63
|
||||
def @arg11 246 83 6 Y 128 30 63
|
||||
def @arg12 246 83 6 Y 128 30 63
|
||||
def @arg13 251 16777216 10 Y 128 31 63
|
||||
def @arg14 251 16777216 19 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -4915,8 +4915,8 @@ def @arg07 5 23 0 Y 32896 31 63
|
||||
def @arg08 5 23 0 Y 32896 31 63
|
||||
def @arg09 5 23 0 Y 32896 31 63
|
||||
def @arg10 5 23 0 Y 32896 31 63
|
||||
def @arg11 246 67 0 Y 128 30 63
|
||||
def @arg12 246 67 0 Y 128 30 63
|
||||
def @arg11 246 83 0 Y 128 30 63
|
||||
def @arg12 246 83 0 Y 128 30 63
|
||||
def @arg13 251 16777216 0 Y 128 31 63
|
||||
def @arg14 251 16777216 0 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -4965,8 +4965,8 @@ def @arg07 5 23 1 Y 32896 31 63
|
||||
def @arg08 5 23 1 Y 32896 31 63
|
||||
def @arg09 5 23 1 Y 32896 31 63
|
||||
def @arg10 5 23 1 Y 32896 31 63
|
||||
def @arg11 246 67 6 Y 128 30 63
|
||||
def @arg12 246 67 6 Y 128 30 63
|
||||
def @arg11 246 83 6 Y 128 30 63
|
||||
def @arg12 246 83 6 Y 128 30 63
|
||||
def @arg13 251 16777216 10 Y 128 31 63
|
||||
def @arg14 251 16777216 19 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -5005,8 +5005,8 @@ def @arg07 5 23 0 Y 32896 31 63
|
||||
def @arg08 5 23 0 Y 32896 31 63
|
||||
def @arg09 5 23 0 Y 32896 31 63
|
||||
def @arg10 5 23 0 Y 32896 31 63
|
||||
def @arg11 246 67 0 Y 128 30 63
|
||||
def @arg12 246 67 0 Y 128 30 63
|
||||
def @arg11 246 83 0 Y 128 30 63
|
||||
def @arg12 246 83 0 Y 128 30 63
|
||||
def @arg13 251 16777216 0 Y 128 31 63
|
||||
def @arg14 251 16777216 0 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -5053,8 +5053,8 @@ def @arg07 5 23 1 Y 32896 31 63
|
||||
def @arg08 5 23 1 Y 32896 31 63
|
||||
def @arg09 5 23 1 Y 32896 31 63
|
||||
def @arg10 5 23 1 Y 32896 31 63
|
||||
def @arg11 246 67 6 Y 128 30 63
|
||||
def @arg12 246 67 6 Y 128 30 63
|
||||
def @arg11 246 83 6 Y 128 30 63
|
||||
def @arg12 246 83 6 Y 128 30 63
|
||||
def @arg13 251 16777216 10 Y 128 31 63
|
||||
def @arg14 251 16777216 19 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -5097,8 +5097,8 @@ def @arg07 5 23 0 Y 32896 31 63
|
||||
def @arg08 5 23 0 Y 32896 31 63
|
||||
def @arg09 5 23 0 Y 32896 31 63
|
||||
def @arg10 5 23 0 Y 32896 31 63
|
||||
def @arg11 246 67 0 Y 128 30 63
|
||||
def @arg12 246 67 0 Y 128 30 63
|
||||
def @arg11 246 83 0 Y 128 30 63
|
||||
def @arg12 246 83 0 Y 128 30 63
|
||||
def @arg13 251 16777216 0 Y 128 31 63
|
||||
def @arg14 251 16777216 0 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -5143,8 +5143,8 @@ def @arg07 5 23 1 Y 32896 31 63
|
||||
def @arg08 5 23 1 Y 32896 31 63
|
||||
def @arg09 5 23 1 Y 32896 31 63
|
||||
def @arg10 5 23 1 Y 32896 31 63
|
||||
def @arg11 246 67 6 Y 128 30 63
|
||||
def @arg12 246 67 6 Y 128 30 63
|
||||
def @arg11 246 83 6 Y 128 30 63
|
||||
def @arg12 246 83 6 Y 128 30 63
|
||||
def @arg13 251 16777216 10 Y 128 31 63
|
||||
def @arg14 251 16777216 19 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -5181,8 +5181,8 @@ def @arg07 5 23 0 Y 32896 31 63
|
||||
def @arg08 5 23 0 Y 32896 31 63
|
||||
def @arg09 5 23 0 Y 32896 31 63
|
||||
def @arg10 5 23 0 Y 32896 31 63
|
||||
def @arg11 246 67 0 Y 128 30 63
|
||||
def @arg12 246 67 0 Y 128 30 63
|
||||
def @arg11 246 83 0 Y 128 30 63
|
||||
def @arg12 246 83 0 Y 128 30 63
|
||||
def @arg13 251 16777216 0 Y 128 31 63
|
||||
def @arg14 251 16777216 0 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
|
@ -1910,8 +1910,8 @@ def @arg07 5 23 1 Y 32896 31 63
|
||||
def @arg08 5 23 1 Y 32896 31 63
|
||||
def @arg09 5 23 1 Y 32896 31 63
|
||||
def @arg10 5 23 1 Y 32896 31 63
|
||||
def @arg11 246 67 6 Y 128 30 63
|
||||
def @arg12 246 67 6 Y 128 30 63
|
||||
def @arg11 246 83 6 Y 128 30 63
|
||||
def @arg12 246 83 6 Y 128 30 63
|
||||
def @arg13 251 16777216 10 Y 128 31 63
|
||||
def @arg14 251 16777216 19 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -1957,8 +1957,8 @@ def @arg07 5 23 0 Y 32896 31 63
|
||||
def @arg08 5 23 0 Y 32896 31 63
|
||||
def @arg09 5 23 0 Y 32896 31 63
|
||||
def @arg10 5 23 0 Y 32896 31 63
|
||||
def @arg11 246 67 0 Y 128 30 63
|
||||
def @arg12 246 67 0 Y 128 30 63
|
||||
def @arg11 246 83 0 Y 128 30 63
|
||||
def @arg12 246 83 0 Y 128 30 63
|
||||
def @arg13 251 16777216 0 Y 128 31 63
|
||||
def @arg14 251 16777216 0 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -2007,8 +2007,8 @@ def @arg07 5 23 1 Y 32896 31 63
|
||||
def @arg08 5 23 1 Y 32896 31 63
|
||||
def @arg09 5 23 1 Y 32896 31 63
|
||||
def @arg10 5 23 1 Y 32896 31 63
|
||||
def @arg11 246 67 6 Y 128 30 63
|
||||
def @arg12 246 67 6 Y 128 30 63
|
||||
def @arg11 246 83 6 Y 128 30 63
|
||||
def @arg12 246 83 6 Y 128 30 63
|
||||
def @arg13 251 16777216 10 Y 128 31 63
|
||||
def @arg14 251 16777216 19 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -2047,8 +2047,8 @@ def @arg07 5 23 0 Y 32896 31 63
|
||||
def @arg08 5 23 0 Y 32896 31 63
|
||||
def @arg09 5 23 0 Y 32896 31 63
|
||||
def @arg10 5 23 0 Y 32896 31 63
|
||||
def @arg11 246 67 0 Y 128 30 63
|
||||
def @arg12 246 67 0 Y 128 30 63
|
||||
def @arg11 246 83 0 Y 128 30 63
|
||||
def @arg12 246 83 0 Y 128 30 63
|
||||
def @arg13 251 16777216 0 Y 128 31 63
|
||||
def @arg14 251 16777216 0 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -2095,8 +2095,8 @@ def @arg07 5 23 1 Y 32896 31 63
|
||||
def @arg08 5 23 1 Y 32896 31 63
|
||||
def @arg09 5 23 1 Y 32896 31 63
|
||||
def @arg10 5 23 1 Y 32896 31 63
|
||||
def @arg11 246 67 6 Y 128 30 63
|
||||
def @arg12 246 67 6 Y 128 30 63
|
||||
def @arg11 246 83 6 Y 128 30 63
|
||||
def @arg12 246 83 6 Y 128 30 63
|
||||
def @arg13 251 16777216 10 Y 128 31 63
|
||||
def @arg14 251 16777216 19 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -2139,8 +2139,8 @@ def @arg07 5 23 0 Y 32896 31 63
|
||||
def @arg08 5 23 0 Y 32896 31 63
|
||||
def @arg09 5 23 0 Y 32896 31 63
|
||||
def @arg10 5 23 0 Y 32896 31 63
|
||||
def @arg11 246 67 0 Y 128 30 63
|
||||
def @arg12 246 67 0 Y 128 30 63
|
||||
def @arg11 246 83 0 Y 128 30 63
|
||||
def @arg12 246 83 0 Y 128 30 63
|
||||
def @arg13 251 16777216 0 Y 128 31 63
|
||||
def @arg14 251 16777216 0 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -2185,8 +2185,8 @@ def @arg07 5 23 1 Y 32896 31 63
|
||||
def @arg08 5 23 1 Y 32896 31 63
|
||||
def @arg09 5 23 1 Y 32896 31 63
|
||||
def @arg10 5 23 1 Y 32896 31 63
|
||||
def @arg11 246 67 6 Y 128 30 63
|
||||
def @arg12 246 67 6 Y 128 30 63
|
||||
def @arg11 246 83 6 Y 128 30 63
|
||||
def @arg12 246 83 6 Y 128 30 63
|
||||
def @arg13 251 16777216 10 Y 128 31 63
|
||||
def @arg14 251 16777216 19 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -2223,8 +2223,8 @@ def @arg07 5 23 0 Y 32896 31 63
|
||||
def @arg08 5 23 0 Y 32896 31 63
|
||||
def @arg09 5 23 0 Y 32896 31 63
|
||||
def @arg10 5 23 0 Y 32896 31 63
|
||||
def @arg11 246 67 0 Y 128 30 63
|
||||
def @arg12 246 67 0 Y 128 30 63
|
||||
def @arg11 246 83 0 Y 128 30 63
|
||||
def @arg12 246 83 0 Y 128 30 63
|
||||
def @arg13 251 16777216 0 Y 128 31 63
|
||||
def @arg14 251 16777216 0 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user