diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2018-08-20 13:06:33 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2018-08-20 14:11:36 +0100 |
commit | ee98e95e25bc8abe2be61d3449974d8ba078b351 (patch) | |
tree | 6c021088a795b0730ff4741ae30675401382bc4f | |
parent | 4299b82ad813a1ad5dfc84f02415eedfcf731bbc (diff) | |
download | mariadb-git-ee98e95e25bc8abe2be61d3449974d8ba078b351.tar.gz |
MDEV-16536 Remove shared memory transport
34 files changed, 66 insertions, 3561 deletions
diff --git a/client/client_priv.h b/client/client_priv.h index ada72187569..ffdf0fc4b8f 100644 --- a/client/client_priv.h +++ b/client/client_priv.h @@ -49,7 +49,7 @@ enum options_client OPT_SSL_CIPHER, OPT_SHUTDOWN_TIMEOUT, OPT_LOCAL_INFILE, OPT_DELETE_MASTER_LOGS, OPT_COMPACT, OPT_PROMPT, OPT_IGN_LINES,OPT_TRANSACTION,OPT_MYSQL_PROTOCOL, - OPT_SHARED_MEMORY_BASE_NAME, OPT_FRM, OPT_SKIP_OPTIMIZATION, + OPT_FRM, OPT_SKIP_OPTIMIZATION, OPT_COMPATIBLE, OPT_RECONNECT, OPT_DELIMITER, OPT_SECURE_AUTH, OPT_OPEN_FILES_LIMIT, OPT_SET_CHARSET, OPT_SERVER_ARG, OPT_STOP_POSITION, OPT_START_DATETIME, OPT_STOP_DATETIME, diff --git a/client/mysql.cc b/client/mysql.cc index 6a720c38ef1..f6a4569fce9 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -196,9 +196,6 @@ static char delimiter[16]= DEFAULT_DELIMITER; static uint delimiter_length= 1; unsigned short terminal_width= 80; -#ifdef HAVE_SMEM -static char *shared_memory_base_name=0; -#endif static uint opt_protocol=0; static CHARSET_INFO *charset_info= &my_charset_latin1; @@ -1340,9 +1337,6 @@ sig_handler mysql_end(int sig) my_free(full_username); my_free(part_username); my_free(default_prompt); -#ifdef HAVE_SMEM - my_free(shared_memory_base_name); -#endif my_free(current_prompt); while (embedded_server_arg_count > 1) my_free(embedded_server_args[--embedded_server_arg_count]); @@ -1373,10 +1367,6 @@ static bool do_connect(MYSQL *mysql, const char *host, const char *user, #endif if (opt_protocol) mysql_options(mysql,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol); -#ifdef HAVE_SMEM - if (shared_memory_base_name) - mysql_options(mysql,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name); -#endif if (opt_plugin_dir && *opt_plugin_dir) mysql_options(mysql, MYSQL_PLUGIN_DIR, opt_plugin_dir); @@ -1612,7 +1602,7 @@ static struct my_option my_long_options[] = {"prompt", OPT_PROMPT, "Set the mysql prompt to this value.", ¤t_prompt, ¤t_prompt, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"protocol", OPT_MYSQL_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe, memory).", + {"protocol", OPT_MYSQL_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe).", 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 " @@ -1626,11 +1616,6 @@ static struct my_option my_long_options[] = &opt_reconnect, &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.", &shared_memory_base_name, - &shared_memory_base_name, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, -#endif {"socket", 'S', "The socket file to use for connection.", &opt_mysql_unix_port, &opt_mysql_unix_port, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c index ef1630dd0e3..c5a79e24c03 100644 --- a/client/mysql_upgrade.c +++ b/client/mysql_upgrade.c @@ -135,13 +135,8 @@ static struct my_option my_long_options[]= "built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"protocol", OPT_MYSQL_PROTOCOL, - "The protocol to use for connection (tcp, socket, pipe, memory).", + "The protocol to use for connection (tcp, socket, pipe).", 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.", 0, - 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, -#endif {"silent", OPT_SILENT, "Print less information", &opt_silent, &opt_silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"socket", 'S', "The socket file to use for connection.", @@ -354,7 +349,6 @@ get_one_option(int optid, const struct my_option *opt, case 'P': /* --port */ case 'S': /* --socket */ case OPT_MYSQL_PROTOCOL: /* --protocol */ - case OPT_SHARED_MEMORY_BASE_NAME: /* --shared-memory-base-name */ case OPT_PLUGIN_DIR: /* --plugin-dir */ case OPT_DEFAULT_AUTH: /* --default-auth */ add_one_option_cmd_line(&conn_args, opt, argument); diff --git a/client/mysqladmin.cc b/client/mysqladmin.cc index 5e7fb80b2b5..be81deb2780 100644 --- a/client/mysqladmin.cc +++ b/client/mysqladmin.cc @@ -49,9 +49,6 @@ static char * unix_port=0; static char *opt_plugin_dir= 0, *opt_default_auth= 0; static bool sql_log_bin_off= false; -#ifdef HAVE_SMEM -static char *shared_memory_base_name=0; -#endif static uint opt_protocol=0; static myf error_flags; /* flags to pass to my_printf_error, like ME_BELL */ @@ -185,18 +182,13 @@ static struct my_option my_long_options[] = #endif "built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").", &tcp_port, &tcp_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"protocol", OPT_MYSQL_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe, memory).", + {"protocol", OPT_MYSQL_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe).", 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 only works with extended-status.", &opt_relative, &opt_relative, 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.", &shared_memory_base_name, &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', "The socket file to use for connection.", @@ -367,10 +359,6 @@ int main(int argc,char *argv[]) #endif if (opt_protocol) mysql_options(&mysql,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol); -#ifdef HAVE_SMEM - if (shared_memory_base_name) - mysql_options(&mysql,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name); -#endif mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, default_charset); error_flags= (myf)(opt_nobeep ? 0 : ME_BELL); @@ -496,9 +484,6 @@ err2: mysql_library_end(); my_free(opt_password); my_free(user); -#ifdef HAVE_SMEM - my_free(shared_memory_base_name); -#endif free_defaults(save_argv); my_end(my_end_arg); return error; diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index 14656705805..1b6c94aaf6d 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -124,9 +124,6 @@ static uint my_end_arg; static const char* sock= 0; static char *opt_plugindir= 0, *opt_default_auth= 0; -#ifdef HAVE_SMEM -static const char *shared_memory_base_name= 0; -#endif static char* user = 0; static char* pass = 0; static char *charset= 0; @@ -1644,7 +1641,7 @@ static struct my_option my_options[] = &port, &port, 0, GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"protocol", OPT_MYSQL_PROTOCOL, - "The protocol to use for connection (tcp, socket, pipe, memory).", + "The protocol to use for connection (tcp, socket, pipe).", 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.", &remote_opt, &remote_opt, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, @@ -1685,12 +1682,6 @@ static struct my_option my_options[] = {"set-charset", OPT_SET_CHARSET, "Add 'SET NAMES character_set' to the output.", &charset, &charset, 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.", &shared_memory_base_name, - &shared_memory_base_name, - 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, -#endif {"short-form", 's', "Just show regular queries: no extra info, no " "row-based events and no row counts. This is mainly for testing only, " "and should not be used to feed to the MariaDB server. " @@ -2134,11 +2125,6 @@ static Exit_status safe_connect() if (opt_protocol) mysql_options(mysql, MYSQL_OPT_PROTOCOL, (char*) &opt_protocol); -#ifdef HAVE_SMEM - if (shared_memory_base_name) - mysql_options(mysql, MYSQL_SHARED_MEMORY_BASE_NAME, - shared_memory_base_name); -#endif mysql_options(mysql, MYSQL_OPT_CONNECT_ATTR_RESET, 0); mysql_options4(mysql, MYSQL_OPT_CONNECT_ATTR_ADD, "program_name", "mysqlbinlog"); diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c index 5e366c5e3d1..432c7abcbe1 100644 --- a/client/mysqlcheck.c +++ b/client/mysqlcheck.c @@ -55,7 +55,6 @@ static int first_error = 0; static char *opt_skip_database; DYNAMIC_ARRAY tables4repair, tables4rebuild, alter_table_cmds; DYNAMIC_ARRAY views4repair; -static char *shared_memory_base_name=0; static uint opt_protocol=0; enum operations { DO_CHECK=1, DO_REPAIR, DO_ANALYZE, DO_OPTIMIZE, DO_FIX_NAMES }; @@ -179,7 +178,7 @@ static struct my_option my_long_options[] = "built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").", &opt_mysql_port, &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"protocol", OPT_MYSQL_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe, memory).", + {"protocol", OPT_MYSQL_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe).", 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.", @@ -188,11 +187,6 @@ static struct my_option my_long_options[] = {"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.", &shared_memory_base_name, &shared_memory_base_name, - 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, -#endif {"silent", 's', "Print only error messages.", &opt_silent, &opt_silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"skip_database", 0, "Don't process the database specified as argument", @@ -1112,8 +1106,6 @@ static int dbConnect(char *host, char *user, char *passwd) #endif if (opt_protocol) mysql_options(&mysql_connection,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol); - if (shared_memory_base_name) - mysql_options(&mysql_connection,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name); if (opt_plugin_dir && *opt_plugin_dir) mysql_options(&mysql_connection, MYSQL_PLUGIN_DIR, opt_plugin_dir); @@ -1253,8 +1245,7 @@ int main(int argc, char **argv) delete_dynamic(&alter_table_cmds); } end1: - my_free(opt_password); - my_free(shared_memory_base_name); + my_free(opt_password);; mysql_library_end(); free_defaults(defaults_argv); my_end(my_end_arg); diff --git a/client/mysqldump.c b/client/mysqldump.c index c2c1aa6fc6c..1958d5c173a 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -159,9 +159,6 @@ static MYSQL_RES *routine_res, *routine_list_res; FILE *md_result_file= 0; FILE *stderror_file=0; -#ifdef HAVE_SMEM -static char *shared_memory_base_name=0; -#endif static uint opt_protocol= 0; static char *opt_plugin_dir= 0, *opt_default_auth= 0; @@ -472,7 +469,7 @@ static struct my_option my_long_options[] = &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"protocol", OPT_MYSQL_PROTOCOL, - "The protocol to use for connection (tcp, socket, pipe, memory).", + "The protocol to use for connection (tcp, socket, pipe).", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"quick", 'q', "Don't buffer query, dump directly to stdout.", &quick, &quick, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, @@ -494,11 +491,6 @@ static struct my_option my_long_options[] = "Add 'SET NAMES default_character_set' to the output.", &opt_set_charset, &opt_set_charset, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, -#ifdef HAVE_SMEM - {"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME, - "Base name of shared memory.", &shared_memory_base_name, &shared_memory_base_name, - 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, -#endif /* Note that the combination --single-transaction --master-data will give bullet-proof binlog position only if server >=4.1.3. That's the @@ -1719,10 +1711,6 @@ static int connect_to_db(char *host, char *user,char *passwd) #endif if (opt_protocol) mysql_options(&mysql_connection,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol); -#ifdef HAVE_SMEM - if (shared_memory_base_name) - mysql_options(&mysql_connection,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name); -#endif mysql_options(&mysql_connection, MYSQL_SET_CHARSET_NAME, default_charset); if (opt_plugin_dir && *opt_plugin_dir) @@ -6255,10 +6243,6 @@ err: if (opt_slave_data) do_start_slave_sql(mysql); -#ifdef HAVE_SMEM - my_free(shared_memory_base_name); -#endif - dbDisconnect(current_host); if (!path) write_footer(md_result_file); diff --git a/client/mysqlimport.c b/client/mysqlimport.c index c7432992d45..2e4e8550fe3 100644 --- a/client/mysqlimport.c +++ b/client/mysqlimport.c @@ -65,10 +65,6 @@ static longlong opt_ignore_lines= -1; static char **argv_to_free; -#ifdef HAVE_SMEM -static char *shared_memory_base_name=0; -#endif - static struct my_option my_long_options[] = { {"character-sets-dir", OPT_CHARSETS_DIR, @@ -157,15 +153,10 @@ static struct my_option my_long_options[] = &opt_mysql_port, &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"protocol", OPT_MYSQL_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe, memory).", + {"protocol", OPT_MYSQL_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe).", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"replace", 'r', "If duplicate unique key was found, replace old row.", &replace, &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.", &shared_memory_base_name, &shared_memory_base_name, - 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, -#endif {"silent", 's', "Be more silent.", &silent, &silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"socket", 'S', "The socket file to use for connection.", @@ -458,10 +449,6 @@ static MYSQL *db_connect(char *host, char *database, #endif if (opt_protocol) mysql_options(mysql,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol); -#ifdef HAVE_SMEM - if (shared_memory_base_name) - mysql_options(mysql,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name); -#endif if (opt_plugin_dir && *opt_plugin_dir) mysql_options(mysql, MYSQL_PLUGIN_DIR, opt_plugin_dir); @@ -514,9 +501,6 @@ static void safe_exit(int error, MYSQL *mysql) if (mysql) mysql_close(mysql); -#ifdef HAVE_SMEM - my_free(shared_memory_base_name); -#endif free_defaults(argv_to_free); mysql_library_end(); my_free(opt_password); diff --git a/client/mysqlshow.c b/client/mysqlshow.c index 484ca661d9e..d7c4dbec27e 100644 --- a/client/mysqlshow.c +++ b/client/mysqlshow.c @@ -39,9 +39,6 @@ static uint opt_verbose=0; static char *default_charset= (char*) MYSQL_AUTODETECT_CHARSET_NAME; static char *opt_plugin_dir= 0, *opt_default_auth= 0; -#ifdef HAVE_SMEM -static char *shared_memory_base_name=0; -#endif static uint opt_protocol=0; static void get_options(int *argc,char ***argv); @@ -131,10 +128,7 @@ int main(int argc, char **argv) #endif if (opt_protocol) mysql_options(&mysql,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol); -#ifdef HAVE_SMEM - if (shared_memory_base_name) - mysql_options(&mysql,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name); -#endif + mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, default_charset); if (opt_plugin_dir && *opt_plugin_dir) @@ -177,9 +171,6 @@ error: mysql_close(&mysql); /* Close & free connection */ my_free(opt_password); mysql_server_end(); -#ifdef HAVE_SMEM - my_free(shared_memory_base_name); -#endif free_defaults(defaults_argv); my_end(my_end_arg); exit(error ? 1 : 0); @@ -243,14 +234,8 @@ static struct my_option my_long_options[] = NO_ARG, 0, 0, 0, 0, 0, 0}, #endif {"protocol", OPT_MYSQL_PROTOCOL, - "The protocol to use for connection (tcp, socket, pipe, memory).", + "The protocol to use for connection (tcp, socket, pipe).", 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.", &shared_memory_base_name, - &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.", &opt_table_type, &opt_table_type, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, diff --git a/client/mysqlslap.c b/client/mysqlslap.c index 4cb6cbcc15b..3b9703fe6d4 100644 --- a/client/mysqlslap.c +++ b/client/mysqlslap.c @@ -98,9 +98,6 @@ TODO: #define snprintf _snprintf #endif -#ifdef HAVE_SMEM -static char *shared_memory_base_name=0; -#endif /* Global Thread counter */ uint thread_counter; @@ -309,10 +306,6 @@ void set_mysql_connect_options(MYSQL *mysql) #endif if (opt_protocol) mysql_options(mysql,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol); -#ifdef HAVE_SMEM - if (shared_memory_base_name) - mysql_options(mysql,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name); -#endif mysql_options(mysql, MYSQL_SET_CHARSET_NAME, default_charset); } @@ -423,10 +416,6 @@ int main(int argc, char **argv) statement_cleanup(pre_statements); statement_cleanup(post_statements); option_cleanup(engine_options); - -#ifdef HAVE_SMEM - my_free(shared_memory_base_name); -#endif free_defaults(defaults_argv); mysql_library_end(); my_end(my_end_arg); @@ -689,17 +678,11 @@ static struct my_option my_long_options[] = &pre_system, &pre_system, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"protocol", OPT_MYSQL_PROTOCOL, - "The protocol to use for connection (tcp, socket, pipe, memory).", + "The protocol to use for connection (tcp, socket, pipe).", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"query", 'q', "Query to run or file containing query to run.", &user_supplied_query, &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.", &shared_memory_base_name, - &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.", &opt_silent, &opt_silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, diff --git a/client/mysqltest.cc b/client/mysqltest.cc index 829ae0b95c1..38e89236896 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -107,7 +107,6 @@ enum { static int record= 0, opt_sleep= -1; static char *opt_db= 0, *opt_pass= 0; const char *opt_user= 0, *opt_host= 0, *unix_sock= 0, *opt_basedir= "./"; -static char *shared_memory_base_name=0; const char *opt_logdir= ""; const char *opt_prologue= 0, *opt_charsets_dir; static int opt_port= 0; @@ -5950,7 +5949,6 @@ do_handle_error: <opts> - options to use for the connection * SSL - use SSL if available * COMPRESS - use compression if available - * SHM - use shared memory if available * PIPE - use named pipe if available */ @@ -5962,7 +5960,6 @@ void do_connect(struct st_command *command) char *ssl_cipher __attribute__((unused))= 0; my_bool con_ssl= 0, con_compress= 0; my_bool con_pipe= 0; - my_bool con_shm __attribute__ ((unused))= 0; int read_timeout= 0; int write_timeout= 0; int connect_timeout= 0; @@ -5977,9 +5974,6 @@ void do_connect(struct st_command *command) static DYNAMIC_STRING ds_sock; static DYNAMIC_STRING ds_options; static DYNAMIC_STRING ds_default_auth; -#ifdef HAVE_SMEM - static DYNAMIC_STRING ds_shm; -#endif const struct command_arg connect_args[] = { { "connection name", ARG_STRING, TRUE, &ds_connection_name, "Name of the connection" }, { "host", ARG_STRING, TRUE, &ds_host, "Host to connect to" }, @@ -6008,11 +6002,6 @@ void do_connect(struct st_command *command) die("Illegal argument for port: '%s'", ds_port.str); } -#ifdef HAVE_SMEM - /* Shared memory */ - init_dynamic_string(&ds_shm, ds_sock.str, 0, 0); -#endif - /* Sock */ if (ds_sock.length) { @@ -6061,8 +6050,6 @@ void do_connect(struct st_command *command) con_compress= 1; else if (length == 4 && !strncmp(con_options, "PIPE", 4)) con_pipe= 1; - else if (length == 3 && !strncmp(con_options, "SHM", 3)) - con_shm= 1; else if (strncasecmp(con_options, "read_timeout=", sizeof("read_timeout=")-1) == 0) { @@ -6168,22 +6155,6 @@ void do_connect(struct st_command *command) (char*)&connect_timeout); } -#ifdef HAVE_SMEM - if (con_shm) - { - uint protocol= MYSQL_PROTOCOL_MEMORY; - if (!ds_shm.length) - die("Missing shared memory base name"); - mysql_options(con_slot->mysql, MYSQL_SHARED_MEMORY_BASE_NAME, ds_shm.str); - mysql_options(con_slot->mysql, MYSQL_OPT_PROTOCOL, &protocol); - } - else if (shared_memory_base_name) - { - mysql_options(con_slot->mysql, MYSQL_SHARED_MEMORY_BASE_NAME, - shared_memory_base_name); - } -#endif - /* Use default db name */ if (ds_database.length == 0) dynstr_set(&ds_database, opt_db); @@ -6223,9 +6194,6 @@ void do_connect(struct st_command *command) dynstr_free(&ds_sock); dynstr_free(&ds_options); dynstr_free(&ds_default_auth); -#ifdef HAVE_SMEM - dynstr_free(&ds_shm); -#endif DBUG_VOID_RETURN; } @@ -7109,7 +7077,7 @@ static struct my_option my_long_options[] = GET_INT, REQUIRED_ARG, DEFAULT_MAX_CONN, 8, 5120, 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}, - {"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory).", + {"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe).", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"port", 'P', "Port number to use for connection or 0 for default to, in " "order of preference, my.cnf, $MYSQL_TCP_PORT, " @@ -7142,10 +7110,6 @@ static struct my_option my_long_options[] = 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}, - {"shared-memory-base-name", 0, - "Base name of shared memory.", &shared_memory_base_name, - &shared_memory_base_name, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, - 0, 0, 0}, {"silent", 's', "Suppress all normal output. Synonym for --quiet.", &silent, &silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"sleep", 'T', "Always sleep this many seconds on sleep commands.", @@ -9340,11 +9304,6 @@ int main(int argc, char **argv) } #endif -#ifdef HAVE_SMEM - if (shared_memory_base_name) - mysql_options(con->mysql,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name); -#endif - if (!(con->name = my_strdup("default", MYF(MY_WME)))) die("Out of memory"); mysql_options(con->mysql, MYSQL_OPT_NONBLOCK, 0); diff --git a/include/my_global.h b/include/my_global.h index 11d17ad146a..40a83c6ab48 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -133,11 +133,6 @@ #define F_UNLCK 3 #define F_TO_EOF 0x3FFFFFFF -/* Shared memory and named pipe connections are supported. */ -#define HAVE_SMEM 1 -#define HAVE_NAMED_PIPE 1 -#define shared_memory_buffer_length 16000 -#define default_shared_memory_base_name "MYSQL" #endif /* _WIN32*/ @@ -1186,8 +1181,6 @@ typedef struct { const char *dli_fname, dli_fbase; } Dl_info; /* Things we don't need in the embedded version of MySQL */ /* TODO HF add #undef HAVE_VIO if we don't want client in embedded library */ -#undef HAVE_SMEM /* No shared memory */ - #else #define HAVE_REPLICATION #define HAVE_EXTERNAL_CLIENT diff --git a/include/mysql_embed.h b/include/mysql_embed.h index 12b18ff965e..3047593fb6c 100644 --- a/include/mysql_embed.h +++ b/include/mysql_embed.h @@ -25,7 +25,6 @@ /* TODO HF add #undef HAVE_VIO if we don't want client in embedded library */ #undef HAVE_DLOPEN /* No udf functions */ -#undef HAVE_SMEM /* No shared memory */ #endif /* EMBEDDED_LIBRARY */ #endif /* MYSQL_EMBED_INCLUDED */ diff --git a/include/violite.h b/include/violite.h index 19c117ebd85..4d75d7435b9 100644 --- a/include/violite.h +++ b/include/violite.h @@ -38,7 +38,7 @@ typedef struct st_vio Vio; enum enum_vio_type { VIO_CLOSED, VIO_TYPE_TCPIP, VIO_TYPE_SOCKET, VIO_TYPE_NAMEDPIPE, - VIO_TYPE_SSL, VIO_TYPE_SHARED_MEMORY + VIO_TYPE_SSL }; /** @@ -265,17 +265,6 @@ struct st_vio #ifdef HAVE_OPENSSL void *ssl_arg; #endif -#ifdef HAVE_SMEM - HANDLE handle_file_map; - char *handle_map; - HANDLE event_server_wrote; - HANDLE event_server_read; - HANDLE event_client_wrote; - HANDLE event_client_read; - HANDLE event_conn_closed; - size_t shared_memory_remain; - char *shared_memory_pos; -#endif /* HAVE_SMEM */ #ifdef _WIN32 HANDLE hPipe; OVERLAPPED overlapped; diff --git a/mysql-test/lib/My/ConfigFactory.pm b/mysql-test/lib/My/ConfigFactory.pm index 830b49d431f..d481058902f 100644 --- a/mysql-test/lib/My/ConfigFactory.pm +++ b/mysql-test/lib/My/ConfigFactory.pm @@ -209,13 +209,6 @@ my @mysqld_rules= { 'bind-address' => \&fix_bind_address }, ); -if (IS_WINDOWS) -{ - # For simplicity, we use the same names for shared memory and - # named pipes. - push(@mysqld_rules, {'shared-memory-base-name' => \&fix_socket}); -} - # # Rules to run for [client] section # - will be run in order listed here @@ -281,19 +274,6 @@ sub post_check_client_group { } $config->insert($client_group_name, $name_to, $option->value()) } - - if (IS_WINDOWS) - { - if (! $self->{ARGS}->{embedded}) - { - # Shared memory base may or may not be defined (e.g not defined in embedded) - my $shm = $group_to_copy_from->option("shared-memory-base-name"); - if (defined $shm) - { - $config->insert($client_group_name,"shared-memory-base-name", $shm->value()); - } - } - } } @@ -340,7 +320,6 @@ sub post_check_embedded_group { ( 'log-error', # Embedded server writes stderr to mysqltest's log file 'slave-net-timeout', # Embedded server are not build with replication - 'shared-memory-base-name', # No shared memory for embedded ); foreach my $option ( $mysqld->options(), $first_mysqld->options() ) { diff --git a/mysql-test/main/mysqld--help,win.rdiff b/mysql-test/main/mysqld--help,win.rdiff index 89d2cd36112..6aba3acab28 100644 --- a/mysql-test/main/mysqld--help,win.rdiff +++ b/mysql-test/main/mysqld--help,win.rdiff @@ -1,6 +1,6 @@ ---- a/mysql-test/r/mysqld--help.result -+++ b/mysql-test/r/mysqld--help.result -@@ -381,7 +381,6 @@ The following options may be given as the first argument: +--- mysqld--help.result 2018-08-12 00:10:13.694793500 +0100 ++++ mysqld--help,win.reject 2018-08-16 20:31:08.353317200 +0100 +@@ -386,7 +386,6 @@ The number of segments in a key cache -L, --language=name Client error messages in given language. May be given as a full path. Deprecated. Use --lc-messages-dir instead. @@ -8,7 +8,7 @@ --lc-messages=name Set the language used for the error messages. -L, --lc-messages-dir=name Directory where error messages are -@@ -603,6 +602,7 @@ The following options may be given as the first argument: +@@ -608,6 +607,7 @@ Use MySQL-5.6 (instead of MariaDB-5.3) format for TIME, DATETIME, TIMESTAMP columns. (Defaults to on; use --skip-mysql56-temporal-format to disable.) @@ -16,17 +16,7 @@ --net-buffer-length=# Buffer length for TCP/IP and socket communication --net-read-timeout=# -@@ -1048,6 +1048,9 @@ The following options may be given as the first argument: - characteristics (isolation level, read only/read - write,snapshot - but not any work done / data modified - within the transaction). -+ --shared-memory Enable the shared memory -+ --shared-memory-base-name=name -+ Base name of shared memory - --show-slave-auth-info - Show user and password in SHOW SLAVE HOSTS on this - master. -@@ -1171,6 +1174,10 @@ The following options may be given as the first argument: +@@ -1188,6 +1188,10 @@ Log slow queries to given log file. Defaults logging to 'hostname'-slow.log. Must be enabled to activate other slow log options @@ -37,7 +27,7 @@ --socket=name Socket file to use for connection --sort-buffer-size=# Each thread that needs to do a sort allocates a buffer of -@@ -1190,6 +1197,7 @@ The following options may be given as the first argument: +@@ -1207,6 +1211,7 @@ EMPTY_STRING_IS_NULL, SIMULTANEOUS_ASSIGNMENT --stack-trace Print a symbolic stack trace on failure (Defaults to on; use --skip-stack-trace to disable.) @@ -45,7 +35,7 @@ --standard-compliant-cte Allow only CTEs compliant to SQL standard (Defaults to on; use --skip-standard-compliant-cte to disable.) -@@ -1257,6 +1265,11 @@ The following options may be given as the first argument: +@@ -1277,6 +1282,11 @@ --thread-pool-max-threads=# Maximum allowed number of worker threads in the thread pool @@ -57,7 +47,7 @@ --thread-pool-oversubscribe=# How many additional active worker threads in a group are allowed. -@@ -1295,8 +1308,8 @@ The following options may be given as the first argument: +@@ -1315,8 +1325,8 @@ automatically convert it to an on-disk MyISAM or Aria table. -t, --tmpdir=name Path for temporary files. Several paths may be specified, @@ -68,7 +58,7 @@ --transaction-alloc-block-size=# Allocation block size for transactions to be stored in binary log -@@ -1430,7 +1443,6 @@ key-cache-block-size 1024 +@@ -1451,7 +1461,6 @@ key-cache-division-limit 100 key-cache-file-hash-size 512 key-cache-segments 0 @@ -76,7 +66,7 @@ lc-messages en_US lc-messages-dir MYSQL_SHAREDIR/ lc-time-names en_US -@@ -1502,6 +1514,7 @@ myisam-sort-buffer-size 134216704 +@@ -1523,6 +1532,7 @@ myisam-stats-method NULLS_UNEQUAL myisam-use-mmap FALSE mysql56-temporal-format TRUE @@ -84,16 +74,7 @@ net-buffer-length 16384 net-read-timeout 30 net-retry-count 10 -@@ -1612,6 +1625,8 @@ session-track-schema TRUE - session-track-state-change FALSE - session-track-system-variables autocommit,character_set_client,character_set_connection,character_set_results,time_zone - session-track-transaction-info OFF -+shared-memory FALSE -+shared-memory-base-name MYSQL - show-slave-auth-info FALSE - silent-startup FALSE - skip-grant-tables TRUE -@@ -1638,6 +1653,7 @@ slave-transaction-retry-interval 0 +@@ -1660,6 +1670,7 @@ slave-type-conversions slow-launch-time 2 slow-query-log FALSE @@ -101,7 +82,7 @@ sort-buffer-size 2097152 sql-mode STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION stack-trace TRUE -@@ -1652,9 +1668,9 @@ sync-relay-log 10000 +@@ -1674,9 +1685,9 @@ sync-relay-log-info 10000 sysdate-is-now FALSE system-versioning-alter-history ERROR @@ -113,7 +94,7 @@ table-open-cache-instances 8 tc-heuristic-recover OFF tcp-keepalive-interval 0 -@@ -1663,6 +1679,8 @@ tcp-keepalive-time 0 +@@ -1686,6 +1697,8 @@ thread-cache-size 151 thread-pool-idle-timeout 60 thread-pool-max-threads 65536 diff --git a/mysql-test/main/shm-master.opt b/mysql-test/main/shm-master.opt deleted file mode 100644 index d71395213b1..00000000000 --- a/mysql-test/main/shm-master.opt +++ /dev/null @@ -1 +0,0 @@ ---skip-grant-tables --loose-shared-memory-base-name=HeyMrBaseNameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX$MTR_BUILD_THREAD --loose-shared-memory=1 diff --git a/mysql-test/main/shm.result b/mysql-test/main/shm.result deleted file mode 100644 index 65187b6b19b..00000000000 --- a/mysql-test/main/shm.result +++ /dev/null @@ -1,2170 +0,0 @@ -connect shm_con,localhost,root,,,,$shm_name,SHM; -drop table if exists t1,t2,t3,t4; -CREATE TABLE t1 ( -Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, -Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL -); -INSERT INTO t1 VALUES (9410,9412); -select period from t1; -period -9410 -select * from t1; -Period Varor_period -9410 9412 -select t1.* from t1; -Period Varor_period -9410 9412 -CREATE TABLE t2 ( -auto int not null auto_increment, -fld1 int(6) unsigned zerofill DEFAULT '000000' NOT NULL, -companynr tinyint(2) unsigned zerofill DEFAULT '00' NOT NULL, -fld3 char(30) DEFAULT '' NOT NULL, -fld4 char(35) DEFAULT '' NOT NULL, -fld5 char(35) DEFAULT '' NOT NULL, -fld6 char(4) DEFAULT '' NOT NULL, -UNIQUE fld1 (fld1), -KEY fld3 (fld3), -PRIMARY KEY (auto) -); -select t2.fld3 from t2 where companynr = 58 and fld3 like "%imaginable%"; -fld3 -imaginable -select fld3 from t2 where fld3 like "%cultivation" ; -fld3 -cultivation -select t2.fld3,companynr from t2 where companynr = 57+1 order by fld3; -fld3 companynr -concoct 58 -druggists 58 -engrossing 58 -Eurydice 58 -exclaimers 58 -ferociousness 58 -hopelessness 58 -Huey 58 -imaginable 58 -judges 58 -merging 58 -ostrich 58 -peering 58 -Phelps 58 -presumes 58 -Ruth 58 -sentences 58 -Shylock 58 -straggled 58 -synergy 58 -thanking 58 -tying 58 -unlocks 58 -select fld3,companynr from t2 where companynr = 58 order by fld3; -fld3 companynr -concoct 58 -druggists 58 -engrossing 58 -Eurydice 58 -exclaimers 58 -ferociousness 58 -hopelessness 58 -Huey 58 -imaginable 58 -judges 58 -merging 58 -ostrich 58 -peering 58 -Phelps 58 -presumes 58 -Ruth 58 -sentences 58 -Shylock 58 -straggled 58 -synergy 58 -thanking 58 -tying 58 -unlocks 58 -select fld3 from t2 order by fld3 desc limit 10; -fld3 -youthfulness -yelped -Wotan -workers -Witt -witchcraft -Winsett -Willy -willed -wildcats -select fld3 from t2 order by fld3 desc limit 5; -fld3 -youthfulness -yelped -Wotan -workers -Witt -select fld3 from t2 order by fld3 desc limit 5,5; -fld3 -witchcraft -Winsett -Willy -willed -wildcats -select t2.fld3 from t2 where fld3 = 'honeysuckle'; -fld3 -honeysuckle -select t2.fld3 from t2 where fld3 LIKE 'honeysuckl_'; -fld3 -honeysuckle -select t2.fld3 from t2 where fld3 LIKE 'hon_ysuckl_'; -fld3 -honeysuckle -select t2.fld3 from t2 where fld3 LIKE 'honeysuckle%'; -fld3 -honeysuckle -select t2.fld3 from t2 where fld3 LIKE 'h%le'; -fld3 -honeysuckle -select t2.fld3 from t2 where fld3 LIKE 'honeysuckle_'; -fld3 -select t2.fld3 from t2 where fld3 LIKE 'don_t_find_me_please%'; -fld3 -explain select t2.fld3 from t2 where fld3 = 'honeysuckle'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ref fld3 fld3 30 const 1 Using where; Using index -explain select fld3 from t2 ignore index (fld3) where fld3 = 'honeysuckle'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where -explain select fld3 from t2 use index (fld1) where fld3 = 'honeysuckle'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where -explain select fld3 from t2 use index (fld3) where fld3 = 'honeysuckle'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ref fld3 fld3 30 const 1 Using where; Using index -explain select fld3 from t2 use index (fld1,fld3) where fld3 = 'honeysuckle'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ref fld3 fld3 30 const 1 Using where; Using index -explain select fld3 from t2 ignore index (fld3,not_used); -ERROR 42000: Key 'not_used' doesn't exist in table 't2' -explain select fld3 from t2 use index (not_used); -ERROR 42000: Key 'not_used' doesn't exist in table 't2' -select t2.fld3 from t2 where fld3 >= 'honeysuckle' and fld3 <= 'honoring' order by fld3; -fld3 -honeysuckle -honoring -explain select t2.fld3 from t2 where fld3 >= 'honeysuckle' and fld3 <= 'honoring' order by fld3; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 range fld3 fld3 30 NULL 2 Using where; Using index -select fld1,fld3 from t2 where fld3="Colombo" or fld3 = "nondecreasing" order by fld3; -fld1 fld3 -148504 Colombo -068305 Colombo -000000 nondecreasing -select fld1,fld3 from t2 where companynr = 37 and fld3 = 'appendixes'; -fld1 fld3 -232605 appendixes -1232605 appendixes -1232606 appendixes -1232607 appendixes -1232608 appendixes -1232609 appendixes -select fld1 from t2 where fld1=250501 or fld1="250502"; -fld1 -250501 -250502 -explain select fld1 from t2 where fld1=250501 or fld1="250502"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 range fld1 fld1 4 NULL 2 Using where; Using index -select fld1 from t2 where fld1=250501 or fld1=250502 or fld1 >= 250505 and fld1 <= 250601 or fld1 between 250501 and 250502; -fld1 -250501 -250502 -250505 -250601 -explain select fld1 from t2 where fld1=250501 or fld1=250502 or fld1 >= 250505 and fld1 <= 250601 or fld1 between 250501 and 250502; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 range fld1 fld1 4 NULL 4 Using where; Using index -select fld1,fld3 from t2 where companynr = 37 and fld3 like 'f%'; -fld1 fld3 -012001 flanking -013602 foldout -013606 fingerings -018007 fanatic -018017 featherweight -018054 fetters -018103 flint -018104 flopping -036002 funereal -038017 fetched -038205 firearm -058004 Fenton -088303 feminine -186002 freakish -188007 flurried -188505 fitting -198006 furthermore -202301 Fitzpatrick -208101 fiftieth -208113 freest -218008 finishers -218022 feed -218401 faithful -226205 foothill -226209 furnishings -228306 forthcoming -228311 fated -231315 freezes -232102 forgivably -238007 filial -238008 fixedly -select fld3 from t2 where fld3 like "L%" and fld3 = "ok"; -fld3 -select fld3 from t2 where (fld3 like "C%" and fld3 = "Chantilly"); -fld3 -Chantilly -select fld1,fld3 from t2 where fld1 like "25050%"; -fld1 fld3 -250501 poisoning -250502 Iraqis -250503 heaving -250504 population -250505 bomb -select fld1,fld3 from t2 where fld1 like "25050_"; -fld1 fld3 -250501 poisoning -250502 Iraqis -250503 heaving -250504 population -250505 bomb -select distinct companynr from t2; -companynr -00 -37 -36 -50 -58 -29 -40 -53 -65 -41 -34 -68 -select distinct companynr from t2 order by companynr; -companynr -00 -29 -34 -36 -37 -40 -41 -50 -53 -58 -65 -68 -select distinct companynr from t2 order by companynr desc; -companynr -68 -65 -58 -53 -50 -41 -40 -37 -36 -34 -29 -00 -select distinct t2.fld3,period from t2,t1 where companynr=37 and fld3 like "O%"; -fld3 period -obliterates 9410 -offload 9410 -opaquely 9410 -organizer 9410 -overestimating 9410 -overlay 9410 -select distinct fld3 from t2 where companynr = 34 order by fld3; -fld3 -absentee -accessed -ahead -alphabetic -Asiaticizations -attitude -aye -bankruptcies -belays -Blythe -bomb -boulevard -bulldozes -cannot -caressing -charcoal -checksumming -chess -clubroom -colorful -cosy -creator -crying -Darius -diffusing -duality -Eiffel -Epiphany -Ernestine -explorers -exterminated -famine -forked -Gershwins -heaving -Hodges -Iraqis -Italianization -Lagos -landslide -libretto -Majorca -mastering -narrowed -occurred -offerers -Palestine -Peruvianizes -pharmaceutic -poisoning -population -Pygmalion -rats -realest -recording -regimented -retransmitting -reviver -rouses -scars -sicker -sleepwalk -stopped -sugars -translatable -uncles -unexpected -uprisings -versatility -vest -select distinct fld3 from t2 limit 10; -fld3 -abates -abiding -Abraham -abrogating -absentee -abut -accessed -accruing -accumulating -accuracies -select distinct fld3 from t2 having fld3 like "A%" limit 10; -fld3 -abates -abiding -Abraham -abrogating -absentee -abut -accessed -accruing -accumulating -accuracies -select distinct substring(fld3,1,3) from t2 where fld3 like "A%"; -substring(fld3,1,3) -aba -abi -Abr -abs -abu -acc -acq -acu -Ade -adj -Adl -adm -Ado -ads -adv -aer -aff -afi -afl -afo -agi -ahe -aim -air -Ald -alg -ali -all -alp -alr -ama -ame -amm -ana -and -ane -Ang -ani -Ann -Ant -api -app -aqu -Ara -arc -Arm -arr -Art -Asi -ask -asp -ass -ast -att -aud -Aug -aut -ave -avo -awe -aye -Azt -select distinct substring(fld3,1,3) as a from t2 having a like "A%" order by a limit 10; -a -aba -abi -Abr -abs -abu -acc -acq -acu -Ade -adj -select distinct substring(fld3,1,3) from t2 where fld3 like "A%" limit 10; -substring(fld3,1,3) -aba -abi -Abr -abs -abu -acc -acq -acu -Ade -adj -select distinct substring(fld3,1,3) as a from t2 having a like "A%" limit 10; -a -aba -abi -Abr -abs -abu -acc -acq -acu -Ade -adj -create table t3 ( -period int not null, -name char(32) not null, -companynr int not null, -price double(11,0), -price2 double(11,0), -key (period), -key (name) -); -create temporary table tmp engine = myisam select * from t3; -insert into t3 select * from tmp; -insert into tmp select * from t3; -insert into t3 select * from tmp; -insert into tmp select * from t3; -insert into t3 select * from tmp; -insert into tmp select * from t3; -insert into t3 select * from tmp; -insert into tmp select * from t3; -insert into t3 select * from tmp; -insert into tmp select * from t3; -insert into t3 select * from tmp; -insert into tmp select * from t3; -insert into t3 select * from tmp; -insert into tmp select * from t3; -insert into t3 select * from tmp; -insert into tmp select * from t3; -insert into t3 select * from tmp; -alter table t3 add t2nr int not null auto_increment primary key first; -drop table tmp; -SET BIG_TABLES=1; -select distinct concat(fld3," ",fld3) as namn from t2,t3 where t2.fld1=t3.t2nr order by namn limit 10; -namn -Abraham Abraham -abrogating abrogating -admonishing admonishing -Adolph Adolph -afield afield -aging aging -ammonium ammonium -analyzable analyzable -animals animals -animized animized -SET BIG_TABLES=0; -select distinct concat(fld3," ",fld3) from t2,t3 where t2.fld1=t3.t2nr order by fld3 limit 10; -concat(fld3," ",fld3) -Abraham Abraham -abrogating abrogating -admonishing admonishing -Adolph Adolph -afield afield -aging aging -ammonium ammonium -analyzable analyzable -animals animals -animized animized -select distinct fld5 from t2 limit 10; -fld5 -neat -Steinberg -jarring -tinily -balled -persist -attainments -fanatic -measures -rightfulness -select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10; -fld3 count(*) -affixed 1 -and 1 -annoyers 1 -Anthony 1 -assayed 1 -assurers 1 -attendants 1 -bedlam 1 -bedpost 1 -boasted 1 -SET BIG_TABLES=1; -select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10; -fld3 count(*) -affixed 1 -and 1 -annoyers 1 -Anthony 1 -assayed 1 -assurers 1 -attendants 1 -bedlam 1 -bedpost 1 -boasted 1 -SET BIG_TABLES=0; -select distinct fld3,repeat("a",length(fld3)),count(*) from t2 group by companynr,fld3 limit 100,10; -fld3 repeat("a",length(fld3)) count(*) -circus aaaaaa 1 -cited aaaaa 1 -Colombo aaaaaaa 1 -congresswoman aaaaaaaaaaaaa 1 -contrition aaaaaaaaaa 1 -corny aaaaa 1 -cultivation aaaaaaaaaaa 1 -definiteness aaaaaaaaaaaa 1 -demultiplex aaaaaaaaaaa 1 -disappointing aaaaaaaaaaaaa 1 -select distinct companynr,rtrim(space(512+companynr)) from t3 order by 1,2; -companynr rtrim(space(512+companynr)) -37 -78 -101 -154 -311 -447 -512 -select distinct fld3 from t2,t3 where t2.companynr = 34 and t2.fld1=t3.t2nr order by fld3; -fld3 -explain select t3.t2nr,fld3 from t2,t3 where t2.companynr = 34 and t2.fld1=t3.t2nr order by t3.t2nr,fld3; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL fld1 NULL NULL NULL 1199 Using where; Using temporary; Using filesort -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.fld1 1 Using where; Using index -explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL period NULL NULL NULL 41810 Using filesort -1 SIMPLE t3 ref period period 4 test.t1.period 4181 -explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period limit 10; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 index period period 4 NULL 1 -1 SIMPLE t1 ref period period 4 test.t3.period 4181 -explain select * from t3 as t1,t3 where t1.period=t3.period order by t1.period limit 10; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index period period 4 NULL 1 -1 SIMPLE t3 ref period period 4 test.t1.period 4181 -select period from t1; -period -9410 -select period from t1 where period=1900; -period -select fld3,period from t1,t2 where fld1 = 011401 order by period; -fld3 period -breaking 9410 -select fld3,period from t2,t3 where t2.fld1 = 011401 and t2.fld1=t3.t2nr and t3.period=1001; -fld3 period -breaking 1001 -explain select fld3,period from t2,t3 where t2.fld1 = 011401 and t3.t2nr=t2.fld1 and 1001 = t3.period; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 const fld1 fld1 4 const 1 -1 SIMPLE t3 const PRIMARY,period PRIMARY 4 const 1 -select fld3,period from t2,t1 where companynr*10 = 37*10; -fld3 period -breaking 9410 -Romans 9410 -intercepted 9410 -bewilderingly 9410 -astound 9410 -admonishing 9410 -sumac 9410 -flanking 9410 -combed 9410 -subjective 9410 -scatterbrain 9410 -Eulerian 9410 -Kane 9410 -overlay 9410 -perturb 9410 -goblins 9410 -annihilates 9410 -Wotan 9410 -snatching 9410 -concludes 9410 -laterally 9410 -yelped 9410 -grazing 9410 -Baird 9410 -celery 9410 -misunderstander 9410 -handgun 9410 -foldout 9410 -mystic 9410 -succumbed 9410 -Nabisco 9410 -fingerings 9410 -aging 9410 -afield 9410 -ammonium 9410 -boat 9410 -intelligibility 9410 -Augustine 9410 -teethe 9410 -dreaded 9410 -scholastics 9410 -audiology 9410 -wallet 9410 -parters 9410 -eschew 9410 -quitter 9410 -neat 9410 -Steinberg 9410 -jarring 9410 -tinily 9410 -balled 9410 -persist 9410 -attainments 9410 -fanatic 9410 -measures 9410 -rightfulness 9410 -capably 9410 -impulsive 9410 -starlet 9410 -terminators 9410 -untying 9410 -announces 9410 -featherweight 9410 -pessimist 9410 -daughter 9410 -decliner 9410 -lawgiver 9410 -stated 9410 -readable 9410 -attrition 9410 -cascade 9410 -motors 9410 -interrogate 9410 -pests 9410 -stairway 9410 -dopers 9410 -testicle 9410 -Parsifal 9410 -leavings 9410 -postulation 9410 -squeaking 9410 -contrasted 9410 -leftover 9410 -whiteners 9410 -erases 9410 -Punjab 9410 -Merritt 9410 -Quixotism 9410 -sweetish 9410 -dogging 9410 -scornfully 9410 -bellow 9410 -bills 9410 -cupboard 9410 -sureties 9410 -puddings 9410 -fetters 9410 -bivalves 9410 -incurring 9410 -Adolph 9410 -pithed 9410 -Miles 9410 -trimmings 9410 -tragedies 9410 -skulking 9410 -flint 9410 -flopping 9410 -relaxing 9410 -offload 9410 -suites 9410 -lists 9410 -animized 9410 -multilayer 9410 -standardizes 9410 -Judas 9410 -vacuuming 9410 -dentally 9410 -humanness 9410 -inch 9410 -Weissmuller 9410 -irresponsibly 9410 -luckily 9410 -culled 9410 -medical 9410 -bloodbath 9410 -subschema 9410 -animals 9410 -Micronesia 9410 -repetitions 9410 -Antares 9410 -ventilate 9410 -pityingly 9410 -interdependent 9410 -Graves 9410 -neonatal 9410 -chafe 9410 -honoring 9410 -realtor 9410 -elite 9410 -funereal 9410 -abrogating 9410 -sorters 9410 -Conley 9410 -lectured 9410 -Abraham 9410 -Hawaii 9410 -cage 9410 -hushes 9410 -Simla 9410 -reporters 9410 -Dutchman 9410 -descendants 9410 -groupings 9410 -dissociate 9410 -coexist 9410 -Beebe 9410 -Taoism 9410 -Connally 9410 -fetched 9410 -checkpoints 9410 -rusting 9410 -galling 9410 -obliterates 9410 -traitor 9410 -resumes 9410 -analyzable 9410 -terminator 9410 -gritty 9410 -firearm 9410 -minima 9410 -Selfridge 9410 -disable 9410 -witchcraft 9410 -betroth 9410 -Manhattanize 9410 -imprint 9410 -peeked 9410 -swelling 9410 -interrelationships 9410 -riser 9410 -Gandhian 9410 -peacock 9410 -bee 9410 -kanji 9410 -dental 9410 -scarf 9410 -chasm 9410 -insolence 9410 -syndicate 9410 -alike 9410 -imperial 9410 -convulsion 9410 -railway 9410 -validate 9410 -normalizes 9410 -comprehensive 9410 -chewing 9410 -denizen 9410 -schemer 9410 -chronicle 9410 -Kline 9410 -Anatole 9410 -partridges 9410 -brunch 9410 -recruited 9410 -dimensions 9410 -Chicana 9410 -announced 9410 -praised 9410 -employing 9410 -linear 9410 -quagmire 9410 -western 9410 -relishing 9410 -serving 9410 -scheduling 9410 -lore 9410 -eventful 9410 -arteriole 9410 -disentangle 9410 -cured 9410 -Fenton 9410 -avoidable 9410 -drains 9410 -detectably 9410 -husky 9410 -impelling 9410 -undoes 9410 -evened 9410 -squeezes 9410 -destroyer 9410 -rudeness 9410 -beaner 9410 -boorish 9410 -Everhart 9410 -encompass 9410 -mushrooms 9410 -Alison 9410 -externally 9410 -pellagra 9410 -cult 9410 -creek 9410 -Huffman 9410 -Majorca 9410 -governing 9410 -gadfly 9410 -reassigned 9410 -intentness 9410 -craziness 9410 -psychic 9410 -squabbled 9410 -burlesque 9410 -capped 9410 -extracted 9410 -DiMaggio 9410 -exclamation 9410 -subdirectory 9410 -Gothicism 9410 -feminine 9410 -metaphysically 9410 -sanding 9410 -Miltonism 9410 -freakish 9410 -index 9410 -straight 9410 -flurried 9410 -denotative 9410 -coming 9410 -commencements 9410 -gentleman 9410 -gifted 9410 -Shanghais 9410 -sportswriting 9410 -sloping 9410 -navies 9410 -leaflet 9410 -shooter 9410 -Joplin 9410 -babies 9410 -assails 9410 -admiring 9410 -swaying 9410 -Goldstine 9410 -fitting 9410 -Norwalk 9410 -analogy 9410 -deludes 9410 -cokes 9410 -Clayton 9410 -exhausts 9410 -causality 9410 -sating 9410 -icon 9410 -throttles 9410 -communicants 9410 -dehydrate 9410 -priceless 9410 -publicly 9410 -incidentals 9410 -commonplace 9410 -mumbles 9410 -furthermore 9410 -cautioned 9410 -parametrized 9410 -registration 9410 -sadly 9410 -positioning 9410 -babysitting 9410 -eternal 9410 -hoarder 9410 -congregates 9410 -rains 9410 -workers 9410 -sags 9410 -unplug 9410 -garage 9410 -boulder 9410 -specifics 9410 -Teresa 9410 -Winsett 9410 -convenient 9410 -buckboards 9410 -amenities 9410 -resplendent 9410 -sews 9410 -participated 9410 -Simon 9410 -certificates 9410 -Fitzpatrick 9410 -Evanston 9410 -misted 9410 -textures 9410 -save 9410 -count 9410 -rightful 9410 -chaperone 9410 -Lizzy 9410 -clenched 9410 -effortlessly 9410 -accessed 9410 -beaters 9410 -Hornblower 9410 -vests 9410 -indulgences 9410 -infallibly 9410 -unwilling 9410 -excrete 9410 -spools 9410 -crunches 9410 -overestimating 9410 -ineffective 9410 -humiliation 9410 -sophomore 9410 -star 9410 -rifles 9410 -dialysis 9410 -arriving 9410 -indulge 9410 -clockers 9410 -languages 9410 -Antarctica 9410 -percentage 9410 -ceiling 9410 -specification 9410 -regimented 9410 -ciphers 9410 -pictures 9410 -serpents 9410 -allot 9410 -realized 9410 -mayoral 9410 -opaquely 9410 -hostess 9410 -fiftieth 9410 -incorrectly 9410 -decomposition 9410 -stranglings 9410 -mixture 9410 -electroencephalography 9410 -similarities 9410 -charges 9410 -freest 9410 -Greenberg 9410 -tinting 9410 -expelled 9410 -warm 9410 -smoothed 9410 -deductions 9410 -Romano 9410 -bitterroot 9410 -corset 9410 -securing 9410 -environing 9410 -cute 9410 -Crays 9410 -heiress 9410 -inform 9410 -avenge 9410 -universals 9410 -Kinsey 9410 -ravines 9410 -bestseller 9410 -equilibrium 9410 -extents 9410 -relatively 9410 -pressure 9410 -critiques 9410 -befouled 9410 -rightfully 9410 -mechanizing 9410 -Latinizes 9410 -timesharing 9410 -Aden 9410 -embassies 9410 -males 9410 -shapelessly 9410 -mastering 9410 -Newtonian 9410 -finishers 9410 -abates 9410 -teem 9410 -kiting 9410 -stodgy 9410 -feed 9410 -guitars 9410 -airships 9410 -store 9410 -denounces 9410 -Pyle 9410 -Saxony 9410 -serializations 9410 -Peruvian 9410 -taxonomically 9410 -kingdom 9410 -stint 9410 -Sault 9410 -faithful 9410 -Ganymede 9410 -tidiness 9410 -gainful 9410 -contrary 9410 -Tipperary 9410 -tropics 9410 -theorizers 9410 -renew 9410 -already 9410 -terminal 9410 -Hegelian 9410 -hypothesizer 9410 -warningly 9410 -journalizing 9410 -nested 9410 -Lars 9410 -saplings 9410 -foothill 9410 -labeled 9410 -imperiously 9410 -reporters 9410 -furnishings 9410 -precipitable 9410 -discounts 9410 -excises 9410 -Stalin 9410 -despot 9410 -ripeness 9410 -Arabia 9410 -unruly 9410 -mournfulness 9410 -boom 9410 -slaughter 9410 -Sabine 9410 -handy 9410 -rural 9410 -organizer 9410 -shipyard 9410 -civics 9410 -inaccuracy 9410 -rules 9410 -juveniles 9410 -comprised 9410 -investigations 9410 -stabilizes 9410 -seminaries 9410 -Hunter 9410 -sporty 9410 -test 9410 -weasels 9410 -CERN 9410 -tempering 9410 -afore 9410 -Galatean 9410 -techniques 9410 -error 9410 -veranda 9410 -severely 9410 -Cassites 9410 -forthcoming 9410 -guides 9410 -vanish 9410 -lied 9410 -sawtooth 9410 -fated 9410 -gradually 9410 -widens 9410 -preclude 9410 -evenhandedly 9410 -percentage 9410 -disobedience 9410 -humility 9410 -gleaning 9410 -petted 9410 -bloater 9410 -minion 9410 -marginal 9410 -apiary 9410 -measures 9410 -precaution 9410 -repelled 9410 -primary 9410 -coverings 9410 -Artemia 9410 -navigate 9410 -spatial 9410 -Gurkha 9410 -meanwhile 9410 -Melinda 9410 -Butterfield 9410 -Aldrich 9410 -previewing 9410 -glut 9410 -unaffected 9410 -inmate 9410 -mineral 9410 -impending 9410 -meditation 9410 -ideas 9410 -miniaturizes 9410 -lewdly 9410 -title 9410 -youthfulness 9410 -creak 9410 -Chippewa 9410 -clamored 9410 -freezes 9410 -forgivably 9410 -reduce 9410 -McGovern 9410 -Nazis 9410 -epistle 9410 -socializes 9410 -conceptions 9410 -Kevin 9410 -uncovering 9410 -chews 9410 -appendixes 9410 -appendixes 9410 -appendixes 9410 -appendixes 9410 -appendixes 9410 -appendixes 9410 -raining 9410 -infest 9410 -compartment 9410 -minting 9410 -ducks 9410 -roped 9410 -waltz 9410 -Lillian 9410 -repressions 9410 -chillingly 9410 -noncritical 9410 -lithograph 9410 -spongers 9410 -parenthood 9410 -posed 9410 -instruments 9410 -filial 9410 -fixedly 9410 -relives 9410 -Pandora 9410 -watering 9410 -ungrateful 9410 -secures 9410 -poison 9410 -dusted 9410 -encompasses 9410 -presentation 9410 -Kantian 9410 -select fld3,period,price,price2 from t2,t3 where t2.fld1=t3.t2nr and period >= 1001 and period <= 1002 and t2.companynr = 37 order by fld3,period, price; -fld3 period price price2 -admonishing 1002 28357832 8723648 -analyzable 1002 28357832 8723648 -annihilates 1001 5987435 234724 -Antares 1002 28357832 8723648 -astound 1001 5987435 234724 -audiology 1001 5987435 234724 -Augustine 1002 28357832 8723648 -Baird 1002 28357832 8723648 -bewilderingly 1001 5987435 234724 -breaking 1001 5987435 234724 -Conley 1001 5987435 234724 -dentally 1002 28357832 8723648 -dissociate 1002 28357832 8723648 -elite 1001 5987435 234724 -eschew 1001 5987435 234724 -Eulerian 1001 5987435 234724 -flanking 1001 5987435 234724 -foldout 1002 28357832 8723648 -funereal 1002 28357832 8723648 -galling 1002 28357832 8723648 -Graves 1001 5987435 234724 -grazing 1001 5987435 234724 -groupings 1001 5987435 234724 -handgun 1001 5987435 234724 -humility 1002 28357832 8723648 -impulsive 1002 28357832 8723648 -inch 1001 5987435 234724 -intelligibility 1001 5987435 234724 -jarring 1001 5987435 234724 -lawgiver 1001 5987435 234724 -lectured 1002 28357832 8723648 -Merritt 1002 28357832 8723648 -neonatal 1001 5987435 234724 -offload 1002 28357832 8723648 -parters 1002 28357832 8723648 -pityingly 1002 28357832 8723648 -puddings 1002 28357832 8723648 -Punjab 1001 5987435 234724 -quitter 1002 28357832 8723648 -realtor 1001 5987435 234724 -relaxing 1001 5987435 234724 -repetitions 1001 5987435 234724 -resumes 1001 5987435 234724 -Romans 1002 28357832 8723648 -rusting 1001 5987435 234724 -scholastics 1001 5987435 234724 -skulking 1002 28357832 8723648 -stated 1002 28357832 8723648 -suites 1002 28357832 8723648 -sureties 1001 5987435 234724 -testicle 1002 28357832 8723648 -tinily 1002 28357832 8723648 -tragedies 1001 5987435 234724 -trimmings 1001 5987435 234724 -vacuuming 1001 5987435 234724 -ventilate 1001 5987435 234724 -wallet 1001 5987435 234724 -Weissmuller 1002 28357832 8723648 -Wotan 1002 28357832 8723648 -select t2.fld1,fld3,period,price,price2 from t2,t3 where t2.fld1>= 18201 and t2.fld1 <= 18811 and t2.fld1=t3.t2nr and period = 1001 and t2.companynr = 37; -fld1 fld3 period price price2 -018201 relaxing 1001 5987435 234724 -018601 vacuuming 1001 5987435 234724 -018801 inch 1001 5987435 234724 -018811 repetitions 1001 5987435 234724 -create table t4 ( -companynr tinyint(2) unsigned zerofill NOT NULL default '00', -companyname char(30) NOT NULL default '', -PRIMARY KEY (companynr), -UNIQUE KEY companyname(companyname) -) ENGINE=MyISAM MAX_ROWS=50 PACK_KEYS=1 COMMENT='companynames'; -select STRAIGHT_JOIN t2.companynr,companyname from t4,t2 where t2.companynr=t4.companynr group by t2.companynr; -companynr companyname -00 Unknown -29 company 1 -34 company 2 -36 company 3 -37 company 4 -40 company 5 -41 company 6 -50 company 11 -53 company 7 -58 company 8 -65 company 9 -68 company 10 -select SQL_SMALL_RESULT t2.companynr,companyname from t4,t2 where t2.companynr=t4.companynr group by t2.companynr; -companynr companyname -00 Unknown -29 company 1 -34 company 2 -36 company 3 -37 company 4 -40 company 5 -41 company 6 -50 company 11 -53 company 7 -58 company 8 -65 company 9 -68 company 10 -select * from t1,t1 t12; -Period Varor_period Period Varor_period -9410 9412 9410 9412 -select t2.fld1,t22.fld1 from t2,t2 t22 where t2.fld1 >= 250501 and t2.fld1 <= 250505 and t22.fld1 >= 250501 and t22.fld1 <= 250505; -fld1 fld1 -250501 250501 -250502 250501 -250503 250501 -250504 250501 -250505 250501 -250501 250502 -250502 250502 -250503 250502 -250504 250502 -250505 250502 -250501 250503 -250502 250503 -250503 250503 -250504 250503 -250505 250503 -250501 250504 -250502 250504 -250503 250504 -250504 250504 -250505 250504 -250501 250505 -250502 250505 -250503 250505 -250504 250505 -250505 250505 -SET @save_optimizer_switch=@@optimizer_switch; -SET optimizer_switch='outer_join_with_cache=off'; -insert into t2 (fld1, companynr) values (999999,99); -select t2.companynr,companyname from t2 left join t4 using (companynr) where t4.companynr is null; -companynr companyname -99 NULL -select count(*) from t2 left join t4 using (companynr) where t4.companynr is not null; -count(*) -1199 -explain select t2.companynr,companyname from t2 left join t4 using (companynr) where t4.companynr is null; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 -1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using where; Not exists -explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr is null; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 -1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where; Not exists -select companynr,companyname from t2 left join t4 using (companynr) where companynr is null; -companynr companyname -select count(*) from t2 left join t4 using (companynr) where companynr is not null; -count(*) -1200 -explain select companynr,companyname from t2 left join t4 using (companynr) where companynr is null; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE -explain select companynr,companyname from t4 left join t2 using (companynr) where companynr is null; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE -delete from t2 where fld1=999999; -explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where -1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 -explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr < 0; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where -1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 -explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 and t4.companynr > 0; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where -1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 -explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where -explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where -explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 and companynr > 0; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where -explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr is null; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where -explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr < 0 or t4.companynr > 0; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where -explain select t2.companynr,companyname from t4 left join t2 using (companynr) where ifnull(t2.companynr,1)>0; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where -explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr is null; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where -explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0 or companynr > 0; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where -explain select companynr,companyname from t4 left join t2 using (companynr) where ifnull(companynr,1)>0; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where -SET optimizer_switch=@save_optimizer_switch; -select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1; -companynr companynr -37 36 -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 -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (flat, BNL join) -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 -038208 37 Selfridge 1008 -select t2.fld1,t2.companynr,fld3,period from t3,t2 where (t2.fld1 = 38208 or t2.fld1 = 38008) and t2.fld1=t3.t2nr and period>=1008 and period<=1009; -fld1 companynr fld3 period -038008 37 reporters 1008 -038208 37 Selfridge 1008 -select t2.fld1,t2.companynr,fld3,period from t3,t2 where (t3.t2nr = 38208 or t3.t2nr = 38008) and t2.fld1=t3.t2nr and period>=1008 and period<=1009; -fld1 companynr fld3 period -038008 37 reporters 1008 -038208 37 Selfridge 1008 -select period from t1 where (((period > 0) or period < 10000 or (period = 1900)) and (period=1900 and period <= 1901) or (period=1903 and (period=1903)) and period>=1902) or ((period=1904 or period=1905) or (period=1906 or period>1907)) or (period=1908 and period = 1909); -period -9410 -select period from t1 where ((period > 0 and period < 1) or (((period > 0 and period < 100) and (period > 10)) or (period > 10)) or (period > 0 and (period > 5 or period > 6))); -period -9410 -select a.fld1 from t2 as a,t2 b where ((a.fld1 = 250501 and a.fld1=b.fld1) or a.fld1=250502 or a.fld1=250503 or (a.fld1=250505 and a.fld1<=b.fld1 and b.fld1>=a.fld1)) and a.fld1=b.fld1; -fld1 -250501 -250502 -250503 -250505 -select fld1 from t2 where fld1 in (250502,98005,98006,250503,250605,250606) and fld1 >=250502 and fld1 not in (250605,250606); -fld1 -250502 -250503 -select fld1 from t2 where fld1 between 250502 and 250504; -fld1 -250502 -250503 -250504 -select fld3 from t2 where (((fld3 like "_%L%" ) or (fld3 like "%ok%")) and ( fld3 like "L%" or fld3 like "G%")) and fld3 like "L%" ; -fld3 -label -labeled -labeled -landslide -laterally -leaflet -lewdly -Lillian -luckily -select count(*) from t1; -count(*) -1 -select companynr,count(*),sum(fld1) from t2 group by companynr; -companynr count(*) sum(fld1) -00 82 10355753 -29 95 14473298 -34 70 17788966 -36 215 22786296 -37 588 83602098 -40 37 6618386 -41 52 12816335 -50 11 1595438 -53 4 793210 -58 23 2254293 -65 10 2284055 -68 12 3097288 -select companynr,count(*) from t2 group by companynr order by companynr desc limit 5; -companynr count(*) -68 12 -65 10 -58 23 -53 4 -50 11 -select count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from t2 where companynr = 34 and fld4<>""; -count(*) min(fld4) max(fld4) sum(fld1) avg(fld1) std(fld1) variance(fld1) -70 absentee vest 17788966 254128.0857 3272.5940 10709871.3069 -explain extended select count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from t2 where companynr = 34 and fld4<>""; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 100.00 Using where -Warnings: -Note 1003 select count(0) AS `count(*)`,min(`test`.`t2`.`fld4`) AS `min(fld4)`,max(`test`.`t2`.`fld4`) AS `max(fld4)`,sum(`test`.`t2`.`fld1`) AS `sum(fld1)`,avg(`test`.`t2`.`fld1`) AS `avg(fld1)`,std(`test`.`t2`.`fld1`) AS `std(fld1)`,variance(`test`.`t2`.`fld1`) AS `variance(fld1)` from `test`.`t2` where `test`.`t2`.`companynr` = 34 and `test`.`t2`.`fld4` <> '' -select companynr,count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from t2 group by companynr limit 3; -companynr count(*) min(fld4) max(fld4) sum(fld1) avg(fld1) std(fld1) variance(fld1) -00 82 Anthony windmills 10355753 126289.6707 115550.9757 13352027981.7087 -29 95 abut wetness 14473298 152350.5053 8368.5480 70032594.9026 -34 70 absentee vest 17788966 254128.0857 3272.5940 10709871.3069 -select companynr,t2nr,count(price),sum(price),min(price),max(price),avg(price) from t3 where companynr = 37 group by companynr,t2nr limit 10; -companynr t2nr count(price) sum(price) min(price) max(price) avg(price) -37 1 1 5987435 5987435 5987435 5987435.0000 -37 2 1 28357832 28357832 28357832 28357832.0000 -37 3 1 39654943 39654943 39654943 39654943.0000 -37 11 1 5987435 5987435 5987435 5987435.0000 -37 12 1 28357832 28357832 28357832 28357832.0000 -37 13 1 39654943 39654943 39654943 39654943.0000 -37 21 1 5987435 5987435 5987435 5987435.0000 -37 22 1 28357832 28357832 28357832 28357832.0000 -37 23 1 39654943 39654943 39654943 39654943.0000 -37 31 1 5987435 5987435 5987435 5987435.0000 -select /*! SQL_SMALL_RESULT */ companynr,t2nr,count(price),sum(price),min(price),max(price),avg(price) from t3 where companynr = 37 group by companynr,t2nr limit 10; -companynr t2nr count(price) sum(price) min(price) max(price) avg(price) -37 1 1 5987435 5987435 5987435 5987435.0000 -37 2 1 28357832 28357832 28357832 28357832.0000 -37 3 1 39654943 39654943 39654943 39654943.0000 -37 11 1 5987435 5987435 5987435 5987435.0000 -37 12 1 28357832 28357832 28357832 28357832.0000 -37 13 1 39654943 39654943 39654943 39654943.0000 -37 21 1 5987435 5987435 5987435 5987435.0000 -37 22 1 28357832 28357832 28357832 28357832.0000 -37 23 1 39654943 39654943 39654943 39654943.0000 -37 31 1 5987435 5987435 5987435 5987435.0000 -select companynr,count(price),sum(price),min(price),max(price),avg(price) from t3 group by companynr ; -companynr count(price) sum(price) min(price) max(price) avg(price) -37 12543 309394878010 5987435 39654943 24666736.6667 -78 8362 414611089292 726498 98439034 49582766.0000 -101 4181 3489454238 834598 834598 834598.0000 -154 4181 4112197254950 983543950 983543950 983543950.0000 -311 4181 979599938 234298 234298 234298.0000 -447 4181 9929180954 2374834 2374834 2374834.0000 -512 4181 3288532102 786542 786542 786542.0000 -select distinct mod(companynr,10) from t4 group by companynr; -mod(companynr,10) -0 -9 -4 -6 -7 -1 -3 -8 -5 -select distinct 1 from t4 group by companynr; -1 -1 -select count(distinct fld1) from t2; -count(distinct fld1) -1199 -select companynr,count(distinct fld1) from t2 group by companynr; -companynr count(distinct fld1) -00 82 -29 95 -34 70 -36 215 -37 588 -40 37 -41 52 -50 11 -53 4 -58 23 -65 10 -68 12 -select companynr,count(*) from t2 group by companynr; -companynr count(*) -00 82 -29 95 -34 70 -36 215 -37 588 -40 37 -41 52 -50 11 -53 4 -58 23 -65 10 -68 12 -select companynr,count(distinct concat(fld1,repeat(65,1000))) from t2 group by companynr; -companynr count(distinct concat(fld1,repeat(65,1000))) -00 82 -29 95 -34 70 -36 215 -37 588 -40 37 -41 52 -50 11 -53 4 -58 23 -65 10 -68 12 -select companynr,count(distinct concat(fld1,repeat(65,200))) from t2 group by companynr; -companynr count(distinct concat(fld1,repeat(65,200))) -00 82 -29 95 -34 70 -36 215 -37 588 -40 37 -41 52 -50 11 -53 4 -58 23 -65 10 -68 12 -select companynr,count(distinct floor(fld1/100)) from t2 group by companynr; -companynr count(distinct floor(fld1/100)) -00 47 -29 35 -34 14 -36 69 -37 108 -40 16 -41 11 -50 9 -53 1 -58 1 -65 1 -68 1 -select companynr,count(distinct concat(repeat(65,1000),floor(fld1/100))) from t2 group by companynr; -companynr count(distinct concat(repeat(65,1000),floor(fld1/100))) -00 47 -29 35 -34 14 -36 69 -37 108 -40 16 -41 11 -50 9 -53 1 -58 1 -65 1 -68 1 -select sum(fld1),fld3 from t2 where fld3="Romans" group by fld1 limit 10; -sum(fld1) fld3 -11402 Romans -select name,count(*) from t3 where name='cloakroom' group by name; -name count(*) -cloakroom 4181 -select name,count(*) from t3 where name='cloakroom' and price>10 group by name; -name count(*) -cloakroom 4181 -select count(*) from t3 where name='cloakroom' and price2=823742; -count(*) -4181 -select name,count(*) from t3 where name='cloakroom' and price2=823742 group by name; -name count(*) -cloakroom 4181 -select name,count(*) from t3 where name >= "extramarital" and price <= 39654943 group by name; -name count(*) -extramarital 4181 -gazer 4181 -gems 4181 -Iranizes 4181 -spates 4181 -tucked 4181 -violinist 4181 -select t2.fld3,count(*) from t2,t3 where t2.fld1=158402 and t3.name=t2.fld3 group by t3.name; -fld3 count(*) -spates 4181 -select companynr|0,companyname from t4 group by 1; -companynr|0 companyname -0 Unknown -29 company 1 -34 company 2 -36 company 3 -37 company 4 -40 company 5 -41 company 6 -50 company 11 -53 company 7 -58 company 8 -65 company 9 -68 company 10 -select t2.companynr,companyname,count(*) from t2,t4 where t2.companynr=t4.companynr group by t2.companynr order by companyname; -companynr companyname count(*) -29 company 1 95 -68 company 10 12 -50 company 11 11 -34 company 2 70 -36 company 3 215 -37 company 4 588 -40 company 5 37 -41 company 6 52 -53 company 7 4 -58 company 8 23 -65 company 9 10 -00 Unknown 82 -select t2.fld1,count(*) from t2,t3 where t2.fld1=158402 and t3.name=t2.fld3 group by t3.name; -fld1 count(*) -158402 4181 -select sum(Period)/count(*) from t1; -sum(Period)/count(*) -9410.0000 -select companynr,count(price) as "count",sum(price) as "sum" ,abs(sum(price)/count(price)-avg(price)) as "diff",(0+count(price))*companynr as func from t3 group by companynr; -companynr count sum diff func -37 12543 309394878010 0.0000 464091 -78 8362 414611089292 0.0000 652236 -101 4181 3489454238 0.0000 422281 -154 4181 4112197254950 0.0000 643874 -311 4181 979599938 0.0000 1300291 -447 4181 9929180954 0.0000 1868907 -512 4181 3288532102 0.0000 2140672 -select companynr,sum(price)/count(price) as avg from t3 group by companynr having avg > 70000000 order by avg; -companynr avg -154 983543950.0000 -select companynr,count(*) from t2 group by companynr order by 2 desc; -companynr count(*) -37 588 -36 215 -29 95 -00 82 -34 70 -41 52 -40 37 -58 23 -68 12 -50 11 -65 10 -53 4 -select companynr,count(*) from t2 where companynr > 40 group by companynr order by 2 desc; -companynr count(*) -41 52 -58 23 -68 12 -50 11 -65 10 -53 4 -select t2.fld4,t2.fld1,count(price),sum(price),min(price),max(price),avg(price) from t3,t2 where t3.companynr = 37 and t2.fld1 = t3.t2nr group by fld1,t2.fld4; -fld4 fld1 count(price) sum(price) min(price) max(price) avg(price) -teethe 000001 1 5987435 5987435 5987435 5987435.0000 -dreaded 011401 1 5987435 5987435 5987435 5987435.0000 -scholastics 011402 1 28357832 28357832 28357832 28357832.0000 -audiology 011403 1 39654943 39654943 39654943 39654943.0000 -wallet 011501 1 5987435 5987435 5987435 5987435.0000 -parters 011701 1 5987435 5987435 5987435 5987435.0000 -eschew 011702 1 28357832 28357832 28357832 28357832.0000 -quitter 011703 1 39654943 39654943 39654943 39654943.0000 -neat 012001 1 5987435 5987435 5987435 5987435.0000 -Steinberg 012003 1 39654943 39654943 39654943 39654943.0000 -balled 012301 1 5987435 5987435 5987435 5987435.0000 -persist 012302 1 28357832 28357832 28357832 28357832.0000 -attainments 012303 1 39654943 39654943 39654943 39654943.0000 -capably 012501 1 5987435 5987435 5987435 5987435.0000 -impulsive 012602 1 28357832 28357832 28357832 28357832.0000 -starlet 012603 1 39654943 39654943 39654943 39654943.0000 -featherweight 012701 1 5987435 5987435 5987435 5987435.0000 -pessimist 012702 1 28357832 28357832 28357832 28357832.0000 -daughter 012703 1 39654943 39654943 39654943 39654943.0000 -lawgiver 013601 1 5987435 5987435 5987435 5987435.0000 -stated 013602 1 28357832 28357832 28357832 28357832.0000 -readable 013603 1 39654943 39654943 39654943 39654943.0000 -testicle 013801 1 5987435 5987435 5987435 5987435.0000 -Parsifal 013802 1 28357832 28357832 28357832 28357832.0000 -leavings 013803 1 39654943 39654943 39654943 39654943.0000 -squeaking 013901 1 5987435 5987435 5987435 5987435.0000 -contrasted 016001 1 5987435 5987435 5987435 5987435.0000 -leftover 016201 1 5987435 5987435 5987435 5987435.0000 -whiteners 016202 1 28357832 28357832 28357832 28357832.0000 -erases 016301 1 5987435 5987435 5987435 5987435.0000 -Punjab 016302 1 28357832 28357832 28357832 28357832.0000 -Merritt 016303 1 39654943 39654943 39654943 39654943.0000 -sweetish 018001 1 5987435 5987435 5987435 5987435.0000 -dogging 018002 1 28357832 28357832 28357832 28357832.0000 -scornfully 018003 1 39654943 39654943 39654943 39654943.0000 -fetters 018012 1 28357832 28357832 28357832 28357832.0000 -bivalves 018013 1 39654943 39654943 39654943 39654943.0000 -skulking 018021 1 5987435 5987435 5987435 5987435.0000 -flint 018022 1 28357832 28357832 28357832 28357832.0000 -flopping 018023 1 39654943 39654943 39654943 39654943.0000 -Judas 018032 1 28357832 28357832 28357832 28357832.0000 -vacuuming 018033 1 39654943 39654943 39654943 39654943.0000 -medical 018041 1 5987435 5987435 5987435 5987435.0000 -bloodbath 018042 1 28357832 28357832 28357832 28357832.0000 -subschema 018043 1 39654943 39654943 39654943 39654943.0000 -interdependent 018051 1 5987435 5987435 5987435 5987435.0000 -Graves 018052 1 28357832 28357832 28357832 28357832.0000 -neonatal 018053 1 39654943 39654943 39654943 39654943.0000 -sorters 018061 1 5987435 5987435 5987435 5987435.0000 -epistle 018062 1 28357832 28357832 28357832 28357832.0000 -Conley 018101 1 5987435 5987435 5987435 5987435.0000 -lectured 018102 1 28357832 28357832 28357832 28357832.0000 -Abraham 018103 1 39654943 39654943 39654943 39654943.0000 -cage 018201 1 5987435 5987435 5987435 5987435.0000 -hushes 018202 1 28357832 28357832 28357832 28357832.0000 -Simla 018402 1 28357832 28357832 28357832 28357832.0000 -reporters 018403 1 39654943 39654943 39654943 39654943.0000 -coexist 018601 1 5987435 5987435 5987435 5987435.0000 -Beebe 018602 1 28357832 28357832 28357832 28357832.0000 -Taoism 018603 1 39654943 39654943 39654943 39654943.0000 -Connally 018801 1 5987435 5987435 5987435 5987435.0000 -fetched 018802 1 28357832 28357832 28357832 28357832.0000 -checkpoints 018803 1 39654943 39654943 39654943 39654943.0000 -gritty 018811 1 5987435 5987435 5987435 5987435.0000 -firearm 018812 1 28357832 28357832 28357832 28357832.0000 -minima 019101 1 5987435 5987435 5987435 5987435.0000 -Selfridge 019102 1 28357832 28357832 28357832 28357832.0000 -disable 019103 1 39654943 39654943 39654943 39654943.0000 -witchcraft 019201 1 5987435 5987435 5987435 5987435.0000 -betroth 030501 1 5987435 5987435 5987435 5987435.0000 -Manhattanize 030502 1 28357832 28357832 28357832 28357832.0000 -imprint 030503 1 39654943 39654943 39654943 39654943.0000 -swelling 031901 1 5987435 5987435 5987435 5987435.0000 -interrelationships 036001 1 5987435 5987435 5987435 5987435.0000 -riser 036002 1 28357832 28357832 28357832 28357832.0000 -bee 038001 1 5987435 5987435 5987435 5987435.0000 -kanji 038002 1 28357832 28357832 28357832 28357832.0000 -dental 038003 1 39654943 39654943 39654943 39654943.0000 -railway 038011 1 5987435 5987435 5987435 5987435.0000 -validate 038012 1 28357832 28357832 28357832 28357832.0000 -normalizes 038013 1 39654943 39654943 39654943 39654943.0000 -Kline 038101 1 5987435 5987435 5987435 5987435.0000 -Anatole 038102 1 28357832 28357832 28357832 28357832.0000 -partridges 038103 1 39654943 39654943 39654943 39654943.0000 -recruited 038201 1 5987435 5987435 5987435 5987435.0000 -dimensions 038202 1 28357832 28357832 28357832 28357832.0000 -Chicana 038203 1 39654943 39654943 39654943 39654943.0000 -select t3.companynr,fld3,sum(price) from t3,t2 where t2.fld1 = t3.t2nr and t3.companynr = 512 group by companynr,fld3; -companynr fld3 sum(price) -512 boat 786542 -512 capably 786542 -512 cupboard 786542 -512 decliner 786542 -512 descendants 786542 -512 dopers 786542 -512 erases 786542 -512 Micronesia 786542 -512 Miles 786542 -512 skies 786542 -select t2.companynr,count(*),min(fld3),max(fld3),sum(price),avg(price) from t2,t3 where t3.companynr >= 30 and t3.companynr <= 58 and t3.t2nr = t2.fld1 and 1+1=2 group by t2.companynr; -companynr count(*) min(fld3) max(fld3) sum(price) avg(price) -00 1 Omaha Omaha 5987435 5987435.0000 -36 1 dubbed dubbed 28357832 28357832.0000 -37 83 Abraham Wotan 1908978016 22999735.1325 -50 2 scribbled tapestry 68012775 34006387.5000 -select t3.companynr+0,t3.t2nr,fld3,sum(price) from t3,t2 where t2.fld1 = t3.t2nr and t3.companynr = 37 group by 1,t3.t2nr,fld3,fld3,fld3,fld3,fld3 order by fld1; -t3.companynr+0 t2nr fld3 sum(price) -37 1 Omaha 5987435 -37 11401 breaking 5987435 -37 11402 Romans 28357832 -37 11403 intercepted 39654943 -37 11501 bewilderingly 5987435 -37 11701 astound 5987435 -37 11702 admonishing 28357832 -37 11703 sumac 39654943 -37 12001 flanking 5987435 -37 12003 combed 39654943 -37 12301 Eulerian 5987435 -37 12302 dubbed 28357832 -37 12303 Kane 39654943 -37 12501 annihilates 5987435 -37 12602 Wotan 28357832 -37 12603 snatching 39654943 -37 12701 grazing 5987435 -37 12702 Baird 28357832 -37 12703 celery 39654943 -37 13601 handgun 5987435 -37 13602 foldout 28357832 -37 13603 mystic 39654943 -37 13801 intelligibility 5987435 -37 13802 Augustine 28357832 -37 13803 teethe 39654943 -37 13901 scholastics 5987435 -37 16001 audiology 5987435 -37 16201 wallet 5987435 -37 16202 parters 28357832 -37 16301 eschew 5987435 -37 16302 quitter 28357832 -37 16303 neat 39654943 -37 18001 jarring 5987435 -37 18002 tinily 28357832 -37 18003 balled 39654943 -37 18012 impulsive 28357832 -37 18013 starlet 39654943 -37 18021 lawgiver 5987435 -37 18022 stated 28357832 -37 18023 readable 39654943 -37 18032 testicle 28357832 -37 18033 Parsifal 39654943 -37 18041 Punjab 5987435 -37 18042 Merritt 28357832 -37 18043 Quixotism 39654943 -37 18051 sureties 5987435 -37 18052 puddings 28357832 -37 18053 tapestry 39654943 -37 18061 trimmings 5987435 -37 18062 humility 28357832 -37 18101 tragedies 5987435 -37 18102 skulking 28357832 -37 18103 flint 39654943 -37 18201 relaxing 5987435 -37 18202 offload 28357832 -37 18402 suites 28357832 -37 18403 lists 39654943 -37 18601 vacuuming 5987435 -37 18602 dentally 28357832 -37 18603 humanness 39654943 -37 18801 inch 5987435 -37 18802 Weissmuller 28357832 -37 18803 irresponsibly 39654943 -37 18811 repetitions 5987435 -37 18812 Antares 28357832 -37 19101 ventilate 5987435 -37 19102 pityingly 28357832 -37 19103 interdependent 39654943 -37 19201 Graves 5987435 -37 30501 neonatal 5987435 -37 30502 scribbled 28357832 -37 30503 chafe 39654943 -37 31901 realtor 5987435 -37 36001 elite 5987435 -37 36002 funereal 28357832 -37 38001 Conley 5987435 -37 38002 lectured 28357832 -37 38003 Abraham 39654943 -37 38011 groupings 5987435 -37 38012 dissociate 28357832 -37 38013 coexist 39654943 -37 38101 rusting 5987435 -37 38102 galling 28357832 -37 38103 obliterates 39654943 -37 38201 resumes 5987435 -37 38202 analyzable 28357832 -37 38203 terminator 39654943 -select sum(price) from t3,t2 where t2.fld1 = t3.t2nr and t3.companynr = 512 and t3.t2nr = 38008 and t2.fld1 = 38008 or t2.fld1= t3.t2nr and t3.t2nr = 38008 and t2.fld1 = 38008; -sum(price) -234298 -select t2.fld1,sum(price) from t3,t2 where t2.fld1 = t3.t2nr and t3.companynr = 512 and t3.t2nr = 38008 and t2.fld1 = 38008 or t2.fld1 = t3.t2nr and t3.t2nr = 38008 and t2.fld1 = 38008 or t3.t2nr = t2.fld1 and t2.fld1 = 38008 group by t2.fld1; -fld1 sum(price) -038008 234298 -explain select fld3 from t2 where 1>2 or 2>3; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE -explain select fld3 from t2 where fld1=fld1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 -select companynr,fld1 from t2 HAVING fld1=250501 or fld1=250502; -companynr fld1 -34 250501 -34 250502 -select companynr,fld1 from t2 WHERE fld1>=250501 HAVING fld1<=250502; -companynr fld1 -34 250501 -34 250502 -select companynr,count(*) as count,sum(fld1) as sum from t2 group by companynr having count > 40 and sum/count >= 120000; -companynr count sum -00 82 10355753 -29 95 14473298 -34 70 17788966 -37 588 83602098 -41 52 12816335 -select companynr from t2 group by companynr having count(*) > 40 and sum(fld1)/count(*) >= 120000 ; -companynr -00 -29 -34 -37 -41 -select t2.companynr,companyname,count(*) from t2,t4 where t2.companynr=t4.companynr group by companyname having t2.companynr >= 40; -companynr companyname count(*) -68 company 10 12 -50 company 11 11 -40 company 5 37 -41 company 6 52 -53 company 7 4 -58 company 8 23 -65 company 9 10 -select count(*) from t2; -count(*) -1199 -select count(*) from t2 where fld1 < 098024; -count(*) -387 -select min(fld1) from t2 where fld1>= 098024; -min(fld1) -98024 -select max(fld1) from t2 where fld1>= 098024; -max(fld1) -1232609 -select count(*) from t3 where price2=76234234; -count(*) -4181 -select count(*) from t3 where companynr=512 and price2=76234234; -count(*) -4181 -explain select min(fld1),max(fld1),count(*) from t2; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away -select min(fld1),max(fld1),count(*) from t2; -min(fld1) max(fld1) count(*) -0 1232609 1199 -select min(t2nr),max(t2nr) from t3 where t2nr=2115 and price2=823742; -min(t2nr) max(t2nr) -2115 2115 -select count(*),min(t2nr),max(t2nr) from t3 where name='spates' and companynr=78; -count(*) min(t2nr) max(t2nr) -4181 4 41804 -select t2nr,count(*) from t3 where name='gems' group by t2nr limit 20; -t2nr count(*) -9 1 -19 1 -29 1 -39 1 -49 1 -59 1 -69 1 -79 1 -89 1 -99 1 -109 1 -119 1 -129 1 -139 1 -149 1 -159 1 -169 1 -179 1 -189 1 -199 1 -select max(t2nr) from t3 where price=983543950; -max(t2nr) -41807 -select t1.period from t3 = t1 limit 1; -period -1001 -select t1.period from t1 as t1 limit 1; -period -9410 -select t1.period as "Nuvarande period" from t1 as t1 limit 1; -Nuvarande period -9410 -select period as ok_period from t1 limit 1; -ok_period -9410 -select period as ok_period from t1 group by ok_period limit 1; -ok_period -9410 -select 1+1 as summa from t1 group by summa limit 1; -summa -2 -select period as "Nuvarande period" from t1 group by "Nuvarande period" limit 1; -Nuvarande period -9410 -show tables; -Tables_in_test -t1 -t2 -t3 -t4 -show tables from test like "s%"; -Tables_in_test (s%) -show tables from test like "t?"; -Tables_in_test (t?) -show full columns from t2; -Field Type Collation Null Key Default Extra Privileges Comment -auto int(11) NULL NO PRI NULL auto_increment # -fld1 int(6) unsigned zerofill NULL NO UNI 000000 # -companynr tinyint(2) unsigned zerofill NULL NO 00 # -fld3 char(30) latin1_swedish_ci NO MUL # -fld4 char(35) latin1_swedish_ci NO # -fld5 char(35) latin1_swedish_ci NO # -fld6 char(4) latin1_swedish_ci NO # -show full columns from t2 from test like 'f%'; -Field Type Collation Null Key Default Extra Privileges Comment -fld1 int(6) unsigned zerofill NULL NO UNI 000000 # -fld3 char(30) latin1_swedish_ci NO MUL # -fld4 char(35) latin1_swedish_ci NO # -fld5 char(35) latin1_swedish_ci NO # -fld6 char(4) latin1_swedish_ci NO # -show full columns from t2 from test like 's%'; -Field Type Collation Null Key Default Extra Privileges Comment -show keys from t2; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment -t2 0 PRIMARY 1 auto A 1199 NULL NULL BTREE -t2 0 fld1 1 fld1 A 1199 NULL NULL BTREE -t2 1 fld3 1 fld3 A NULL NULL NULL BTREE -drop table t4, t3, t2, t1; -CREATE TABLE t1 ( -cont_nr int(11) NOT NULL auto_increment, -ver_nr int(11) NOT NULL default '0', -aufnr int(11) NOT NULL default '0', -username varchar(50) NOT NULL default '', -hdl_nr int(11) NOT NULL default '0', -eintrag date NOT NULL default '0000-00-00', -st_klasse varchar(40) NOT NULL default '', -st_wert varchar(40) NOT NULL default '', -st_zusatz varchar(40) NOT NULL default '', -st_bemerkung varchar(255) NOT NULL default '', -kunden_art varchar(40) NOT NULL default '', -mcbs_knr int(11) default NULL, -mcbs_aufnr int(11) NOT NULL default '0', -schufa_status char(1) default '?', -bemerkung text, -wirknetz text, -wf_igz int(11) NOT NULL default '0', -tarifcode varchar(80) default NULL, -recycle char(1) default NULL, -sim varchar(30) default NULL, -mcbs_tpl varchar(30) default NULL, -emp_nr int(11) NOT NULL default '0', -laufzeit int(11) default NULL, -hdl_name varchar(30) default NULL, -prov_hdl_nr int(11) NOT NULL default '0', -auto_wirknetz varchar(50) default NULL, -auto_billing varchar(50) default NULL, -touch timestamp NOT NULL, -kategorie varchar(50) default NULL, -kundentyp varchar(20) NOT NULL default '', -sammel_rech_msisdn varchar(30) NOT NULL default '', -p_nr varchar(9) NOT NULL default '', -suffix char(3) NOT NULL default '', -PRIMARY KEY (cont_nr), -KEY idx_aufnr(aufnr), -KEY idx_hdl_nr(hdl_nr), -KEY idx_st_klasse(st_klasse), -KEY ver_nr(ver_nr), -KEY eintrag_idx(eintrag), -KEY emp_nr_idx(emp_nr), -KEY wf_igz(wf_igz), -KEY touch(touch), -KEY hdl_tag(eintrag,hdl_nr), -KEY prov_hdl_nr(prov_hdl_nr), -KEY mcbs_aufnr(mcbs_aufnr), -KEY kundentyp(kundentyp), -KEY p_nr(p_nr,suffix) -) ENGINE=MyISAM; -INSERT INTO t1 VALUES (3359356,405,3359356,'Mustermann Musterfrau',52500,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1485525,2122316,'+','','N',1909160,'MobilComSuper92000D2',NULL,NULL,'MS9ND2',3,24,'MobilCom Shop Koeln',52500,NULL,'auto',20010202105916,'Mobilfunk','PP','','',''); -INSERT INTO t1 VALUES (3359357,468,3359357,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1503580,2139699,'+','','P',1909171,'MobilComSuper9D1T10SFreisprech(Akquise)',NULL,NULL,'MS9NS1',327,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','',''); -INSERT INTO t1 VALUES (3359358,407,3359358,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1501358,2137473,'N','','N',1909159,'MobilComSuper92000D2',NULL,NULL,'MS9ND2',325,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','',''); -INSERT INTO t1 VALUES (3359359,468,3359359,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1507831,2143894,'+','','P',1909162,'MobilComSuper9D1T10SFreisprech(Akquise)',NULL,NULL,'MS9NS1',327,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','',''); -INSERT INTO t1 VALUES (3359360,0,0,'Mustermann Musterfrau',29674907,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1900169997,2414578,'+',NULL,'N',1909148,'',NULL,NULL,'RV99066_2',20,NULL,'POS',29674907,NULL,NULL,20010202105916,'Mobilfunk','','','97317481','007'); -INSERT INTO t1 VALUES (3359361,406,3359361,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag storniert','','(7001-84):Storno, Kd. möchte nicht mehr','privat',NULL,0,'+','','P',1909150,'MobilComSuper92000D1(Akquise)',NULL,NULL,'MS9ND1',325,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','',''); -INSERT INTO t1 VALUES (3359362,406,3359362,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1509984,2145874,'+','','P',1909154,'MobilComSuper92000D1(Akquise)',NULL,NULL,'MS9ND1',327,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','',''); -SELECT ELT(FIELD(kundentyp,'PP','PPA','PG','PGA','FK','FKA','FP','FPA','K','KA','V','VA',''), 'Privat (Private Nutzung)','Privat (Private Nutzung) Sitz im Ausland','Privat (geschaeftliche Nutzung)','Privat (geschaeftliche Nutzung) Sitz im Ausland','Firma (Kapitalgesellschaft)','Firma (Kapitalgesellschaft) Sitz im Ausland','Firma (Personengesellschaft)','Firma (Personengesellschaft) Sitz im Ausland','oeff. rechtl. Koerperschaft','oeff. rechtl. Koerperschaft Sitz im Ausland','Eingetragener Verein','Eingetragener Verein Sitz im Ausland','Typ unbekannt') AS Kundentyp ,kategorie FROM t1 WHERE hdl_nr < 2000000 AND kategorie IN ('Prepaid','Mobilfunk') AND st_klasse = 'Workflow' GROUP BY kundentyp ORDER BY kategorie; -Kundentyp kategorie -Privat (Private Nutzung) Mobilfunk -Warnings: -Warning 1052 Column 'kundentyp' in group statement is ambiguous -drop table t1; -connection default; -disconnect shm_con; -mysqld is alive -SET @max_allowed_packet= @@global.max_allowed_packet; -SET @net_buffer_length= @@global.net_buffer_length; -SET GLOBAL max_allowed_packet= 1024; -Warnings: -Warning 1708 The value of 'max_allowed_packet' should be no less than the value of 'net_buffer_length' -SET GLOBAL net_buffer_length= 1024; -ERROR 1153 (08S01) at line 1: Got a packet bigger than 'max_allowed_packet' bytes -SET GLOBAL max_allowed_packet= @max_allowed_packet; -SET GLOBAL net_buffer_length= @net_buffer_length; -End of 5.0 tests. diff --git a/mysql-test/main/shm.test b/mysql-test/main/shm.test deleted file mode 100644 index 346ce49476e..00000000000 --- a/mysql-test/main/shm.test +++ /dev/null @@ -1,47 +0,0 @@ -# We currently only have shm support on windows, so in order -# to optimize things we skip this test on all other platforms ---source include/windows.inc - -# thread pool causes different results --- source include/not_threadpool.inc - -# Only run this test if shared memory is avaliable -let $shm= query_get_value("SHOW VARIABLES LIKE 'shared_memory'", Value, 1); -if ($shm != ON){ - skip No shm support; -} -let $shm_name= query_get_value("SHOW GLOBAL VARIABLES LIKE 'shared_memory_base_name'", Value, 1); - -# Connect using SHM for testing -connect(shm_con,localhost,root,,,,$shm_name,SHM); - -# Source select test case --- source include/common-tests.inc - -connection default; -disconnect shm_con; - -# -# Bug #24924: shared-memory-base-name that is too long causes buffer overflow -# ---exec $MYSQLADMIN --user=root --host=127.0.0.1 --port=$MASTER_MYPORT --shared-memory-base-name=HeyMrBaseNameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ping - -# -# Bug #33899: Deadlock in mysql_real_query with shared memory connections -# - -let $stmt= `SELECT REPEAT('a', 2048)`; - -SET @max_allowed_packet= @@global.max_allowed_packet; -SET @net_buffer_length= @@global.net_buffer_length; - -SET GLOBAL max_allowed_packet= 1024; -SET GLOBAL net_buffer_length= 1024; - ---error 1 ---exec echo SELECT '$stmt'| $MYSQL --protocol=memory --shared-memory-base-name=$shm_name 2>&1 - -SET GLOBAL max_allowed_packet= @max_allowed_packet; -SET GLOBAL net_buffer_length= @net_buffer_length; - ---echo End of 5.0 tests. diff --git a/mysql-test/suite/sys_vars/r/shared_memory_base_name_basic.result b/mysql-test/suite/sys_vars/r/shared_memory_base_name_basic.result deleted file mode 100644 index 356b3c9e879..00000000000 --- a/mysql-test/suite/sys_vars/r/shared_memory_base_name_basic.result +++ /dev/null @@ -1,21 +0,0 @@ -select @@global.shared_memory_base_name; -@@global.shared_memory_base_name -MYSQL_TMP_DIR/mysqld.1.sock -select @@session.shared_memory_base_name; -ERROR HY000: Variable 'shared_memory_base_name' is a GLOBAL variable -show global variables like 'shared_memory_base_name'; -Variable_name Value -shared_memory_base_name MYSQL_TMP_DIR/mysqld.1.sock -show session variables like 'shared_memory_base_name'; -Variable_name Value -shared_memory_base_name MYSQL_TMP_DIR/mysqld.1.sock -select * from information_schema.global_variables where variable_name='shared_memory_base_name'; -VARIABLE_NAME VARIABLE_VALUE -SHARED_MEMORY_BASE_NAME MYSQL_TMP_DIR/mysqld.1.sock -select * from information_schema.session_variables where variable_name='shared_memory_base_name'; -VARIABLE_NAME VARIABLE_VALUE -SHARED_MEMORY_BASE_NAME MYSQL_TMP_DIR/mysqld.1.sock -set global shared_memory_base_name=1; -ERROR HY000: Variable 'shared_memory_base_name' is a read only variable -set session shared_memory_base_name=1; -ERROR HY000: Variable 'shared_memory_base_name' is a read only variable diff --git a/mysql-test/suite/sys_vars/r/shared_memory_basic.result b/mysql-test/suite/sys_vars/r/shared_memory_basic.result deleted file mode 100644 index ab671af610c..00000000000 --- a/mysql-test/suite/sys_vars/r/shared_memory_basic.result +++ /dev/null @@ -1,21 +0,0 @@ -select @@global.shared_memory; -@@global.shared_memory -0 -select @@session.shared_memory; -ERROR HY000: Variable 'shared_memory' is a GLOBAL variable -show global variables like 'shared_memory'; -Variable_name Value -shared_memory OFF -show session variables like 'shared_memory'; -Variable_name Value -shared_memory OFF -select * from information_schema.global_variables where variable_name='shared_memory'; -VARIABLE_NAME VARIABLE_VALUE -SHARED_MEMORY OFF -select * from information_schema.session_variables where variable_name='shared_memory'; -VARIABLE_NAME VARIABLE_VALUE -SHARED_MEMORY OFF -set global shared_memory=1; -ERROR HY000: Variable 'shared_memory' is a read only variable -set session shared_memory=1; -ERROR HY000: Variable 'shared_memory' is a read only variable diff --git a/mysql-test/suite/sys_vars/t/shared_memory_base_name_basic.test b/mysql-test/suite/sys_vars/t/shared_memory_base_name_basic.test deleted file mode 100644 index da165564791..00000000000 --- a/mysql-test/suite/sys_vars/t/shared_memory_base_name_basic.test +++ /dev/null @@ -1,25 +0,0 @@ ---source include/windows.inc ---source include/not_embedded.inc -# -# only global -# ---replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR -select @@global.shared_memory_base_name; ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -select @@session.shared_memory_base_name; ---replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR -show global variables like 'shared_memory_base_name'; ---replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR -show session variables like 'shared_memory_base_name'; ---replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR -select * from information_schema.global_variables where variable_name='shared_memory_base_name'; ---replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR -select * from information_schema.session_variables where variable_name='shared_memory_base_name'; - -# -# show that it's read-only -# ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -set global shared_memory_base_name=1; ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -set session shared_memory_base_name=1; diff --git a/mysql-test/suite/sys_vars/t/shared_memory_basic.test b/mysql-test/suite/sys_vars/t/shared_memory_basic.test deleted file mode 100644 index 57be4ef7ecd..00000000000 --- a/mysql-test/suite/sys_vars/t/shared_memory_basic.test +++ /dev/null @@ -1,20 +0,0 @@ ---source include/windows.inc ---source include/not_embedded.inc -# -# only global -# -select @@global.shared_memory; ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -select @@session.shared_memory; -show global variables like 'shared_memory'; -show session variables like 'shared_memory'; -select * from information_schema.global_variables where variable_name='shared_memory'; -select * from information_schema.session_variables where variable_name='shared_memory'; - -# -# show that it's read-only -# ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -set global shared_memory=1; ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -set session shared_memory=1; diff --git a/mysys/my_static.c b/mysys/my_static.c index f2a9fbb7335..7b69deea8e1 100644 --- a/mysys/my_static.c +++ b/mysys/my_static.c @@ -102,7 +102,7 @@ my_bool my_disable_copystat_in_redel=0; /* Typelib by all clients */ const char *sql_protocol_names_lib[] = -{ "TCP", "SOCKET", "PIPE", "MEMORY", NullS }; +{ "TCP", "SOCKET", "PIPE", NullS }; TYPELIB sql_protocol_typelib ={ array_elements(sql_protocol_names_lib) - 1, "", sql_protocol_names_lib, NULL }; diff --git a/sql-common/client.c b/sql-common/client.c index 1d354cefb0b..69404e43613 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -121,10 +121,6 @@ char *mysql_unix_port= 0; const char *unknown_sqlstate= "HY000"; const char *not_error_sqlstate= "00000"; const char *cant_connect_sqlstate= "08001"; -#ifdef HAVE_SMEM -char *shared_memory_base_name= 0; -const char *def_shared_memory_base_name= default_shared_memory_base_name; -#endif static void mysql_close_free_options(MYSQL *mysql); static void mysql_close_free(MYSQL *mysql); @@ -320,248 +316,6 @@ HANDLE create_named_pipe(MYSQL *mysql, uint connect_timeout, char **arg_host, #endif -/* - Create new shared memory connection, return handler of connection - - SYNOPSIS - create_shared_memory() - mysql Pointer of mysql structure - net Pointer of net structure - connect_timeout Timeout of connection -*/ - -#ifdef HAVE_SMEM -HANDLE create_shared_memory(MYSQL *mysql,NET *net, uint connect_timeout) -{ - ulong smem_buffer_length = shared_memory_buffer_length + 4; - /* - event_connect_request is event object for start connection actions - event_connect_answer is event object for confirm, that server put data - handle_connect_file_map is file-mapping object, use for create shared - memory - handle_connect_map is pointer on shared memory - handle_map is pointer on shared memory for client - event_server_wrote, - event_server_read, - event_client_wrote, - event_client_read are events for transfer data between server and client - handle_file_map is file-mapping object, use for create shared memory - */ - HANDLE event_connect_request = NULL; - HANDLE event_connect_answer = NULL; - HANDLE handle_connect_file_map = NULL; - char *handle_connect_map = NULL; - - char *handle_map = NULL; - HANDLE event_server_wrote = NULL; - HANDLE event_server_read = NULL; - HANDLE event_client_wrote = NULL; - HANDLE event_client_read = NULL; - HANDLE event_conn_closed = NULL; - HANDLE handle_file_map = NULL; - ulong connect_number; - char connect_number_char[22], *p; - char *tmp= NULL; - char *suffix_pos; - DWORD error_allow = 0; - DWORD error_code = 0; - DWORD event_access_rights= SYNCHRONIZE | EVENT_MODIFY_STATE; - char *shared_memory_base_name = mysql->options.shared_memory_base_name; - static const char *name_prefixes[] = {"","Global\\"}; - const char *prefix; - uint i; - - /* - If this is NULL, somebody freed the MYSQL* options. mysql_close() - is a good candidate. We don't just silently (re)set it to - def_shared_memory_base_name as that would create really confusing/buggy - behavior if the user passed in a different name on the command-line or - in a my.cnf. - */ - DBUG_ASSERT(shared_memory_base_name != NULL); - - /* - get enough space base-name + '_' + longest suffix we might ever send - */ - if (!(tmp= (char *)my_malloc(strlen(shared_memory_base_name) + 32L, MYF(MY_FAE)))) - goto err; - - /* - The name of event and file-mapping events create agree next rule: - shared_memory_base_name+unique_part - Where: - shared_memory_base_name is unique value for each server - unique_part is uniquel value for each object (events and file-mapping) - */ - for (i = 0; i< array_elements(name_prefixes); i++) - { - prefix= name_prefixes[i]; - suffix_pos = strxmov(tmp, prefix , shared_memory_base_name, "_", NullS); - strmov(suffix_pos, "CONNECT_REQUEST"); - event_connect_request= OpenEvent(event_access_rights, FALSE, tmp); - if (event_connect_request) - { - break; - } - } - if (!event_connect_request) - { - error_allow = CR_SHARED_MEMORY_CONNECT_REQUEST_ERROR; - goto err; - } - strmov(suffix_pos, "CONNECT_ANSWER"); - if (!(event_connect_answer= OpenEvent(event_access_rights,FALSE,tmp))) - { - error_allow = CR_SHARED_MEMORY_CONNECT_ANSWER_ERROR; - goto err; - } - strmov(suffix_pos, "CONNECT_DATA"); - if (!(handle_connect_file_map= OpenFileMapping(FILE_MAP_WRITE,FALSE,tmp))) - { - error_allow = CR_SHARED_MEMORY_CONNECT_FILE_MAP_ERROR; - goto err; - } - if (!(handle_connect_map= MapViewOfFile(handle_connect_file_map, - FILE_MAP_WRITE,0,0,sizeof(DWORD)))) - { - error_allow = CR_SHARED_MEMORY_CONNECT_MAP_ERROR; - goto err; - } - - /* Send to server request of connection */ - if (!SetEvent(event_connect_request)) - { - error_allow = CR_SHARED_MEMORY_CONNECT_SET_ERROR; - goto err; - } - - /* Wait of answer from server */ - if (WaitForSingleObject(event_connect_answer,connect_timeout*1000) != - WAIT_OBJECT_0) - { - error_allow = CR_SHARED_MEMORY_CONNECT_ABANDONED_ERROR; - goto err; - } - - /* Get number of connection */ - connect_number = uint4korr(handle_connect_map);/*WAX2*/ - p= int10_to_str(connect_number, connect_number_char, 10); - - /* - The name of event and file-mapping events create agree next rule: - shared_memory_base_name+unique_part+number_of_connection - - Where: - shared_memory_base_name is uniquel value for each server - unique_part is uniquel value for each object (events and file-mapping) - number_of_connection is number of connection between server and client - */ - suffix_pos = strxmov(tmp, prefix , shared_memory_base_name, "_", connect_number_char, - "_", NullS); - strmov(suffix_pos, "DATA"); - if ((handle_file_map = OpenFileMapping(FILE_MAP_WRITE,FALSE,tmp)) == NULL) - { - error_allow = CR_SHARED_MEMORY_FILE_MAP_ERROR; - goto err2; - } - if ((handle_map = MapViewOfFile(handle_file_map,FILE_MAP_WRITE,0,0, - smem_buffer_length)) == NULL) - { - error_allow = CR_SHARED_MEMORY_MAP_ERROR; - goto err2; - } - - strmov(suffix_pos, "SERVER_WROTE"); - if ((event_server_wrote = OpenEvent(event_access_rights,FALSE,tmp)) == NULL) - { - error_allow = CR_SHARED_MEMORY_EVENT_ERROR; - goto err2; - } - - strmov(suffix_pos, "SERVER_READ"); - if ((event_server_read = OpenEvent(event_access_rights,FALSE,tmp)) == NULL) - { - error_allow = CR_SHARED_MEMORY_EVENT_ERROR; - goto err2; - } - - strmov(suffix_pos, "CLIENT_WROTE"); - if ((event_client_wrote = OpenEvent(event_access_rights,FALSE,tmp)) == NULL) - { - error_allow = CR_SHARED_MEMORY_EVENT_ERROR; - goto err2; - } - - strmov(suffix_pos, "CLIENT_READ"); - if ((event_client_read = OpenEvent(event_access_rights,FALSE,tmp)) == NULL) - { - error_allow = CR_SHARED_MEMORY_EVENT_ERROR; - goto err2; - } - - strmov(suffix_pos, "CONNECTION_CLOSED"); - if ((event_conn_closed = OpenEvent(event_access_rights,FALSE,tmp)) == NULL) - { - error_allow = CR_SHARED_MEMORY_EVENT_ERROR; - goto err2; - } - /* - Set event that server should send data - */ - SetEvent(event_server_read); - -err2: - if (error_allow == 0) - { - net->vio= vio_new_win32shared_memory(handle_file_map,handle_map, - event_server_wrote, - event_server_read,event_client_wrote, - event_client_read,event_conn_closed); - } - else - { - error_code = GetLastError(); - if (event_server_read) - CloseHandle(event_server_read); - if (event_server_wrote) - CloseHandle(event_server_wrote); - if (event_client_read) - CloseHandle(event_client_read); - if (event_client_wrote) - CloseHandle(event_client_wrote); - if (event_conn_closed) - CloseHandle(event_conn_closed); - if (handle_map) - UnmapViewOfFile(handle_map); - if (handle_file_map) - CloseHandle(handle_file_map); - } -err: - my_free(tmp); - if (error_allow) - error_code = GetLastError(); - if (event_connect_request) - CloseHandle(event_connect_request); - if (event_connect_answer) - CloseHandle(event_connect_answer); - if (handle_connect_map) - UnmapViewOfFile(handle_connect_map); - if (handle_connect_file_map) - CloseHandle(handle_connect_file_map); - if (error_allow) - { - if (error_allow == CR_SHARED_MEMORY_EVENT_ERROR) - set_mysql_extended_error(mysql, error_allow, unknown_sqlstate, - ER(error_allow), suffix_pos, error_code); - else - set_mysql_extended_error(mysql, error_allow, unknown_sqlstate, - ER(error_allow), error_code); - return(INVALID_HANDLE_VALUE); - } - return(handle_map); -} -#endif - /** Read a packet from server. Give error message if socket was down or packet is an error message @@ -981,7 +735,7 @@ static const char *default_options[]= "ssl-key" ,"ssl-cert" ,"ssl-ca" ,"ssl-capath", "character-sets-dir", "default-character-set", "interactive-timeout", "connect-timeout", "local-infile", "disable-local-infile", - "ssl-cipher", "max-allowed-packet", "protocol", "shared-memory-base-name", + "ssl-cipher", "max-allowed-packet", "protocol", "multi-results", "multi-statements", "multi-queries", "secure-auth", "report-data-truncation", "plugin-dir", "default-auth", "bind-address", "ssl-crl", "ssl-crlpath", @@ -994,7 +748,7 @@ enum option_id { OPT_ssl_key, OPT_ssl_cert, OPT_ssl_ca, OPT_ssl_capath, OPT_character_sets_dir, OPT_default_character_set, OPT_interactive_timeout, OPT_connect_timeout, OPT_local_infile, OPT_disable_local_infile, - OPT_ssl_cipher, OPT_max_allowed_packet, OPT_protocol, OPT_shared_memory_base_name, + OPT_ssl_cipher, OPT_max_allowed_packet, OPT_protocol, OPT_multi_results, OPT_multi_statements, OPT_multi_queries, OPT_secure_auth, OPT_report_data_truncation, OPT_plugin_dir, OPT_default_auth, OPT_bind_address, OPT_ssl_crl, OPT_ssl_crlpath, @@ -1235,13 +989,6 @@ void mysql_read_default_options(struct st_mysql_options *options, options->protocol= UINT_MAX32; } break; - case OPT_shared_memory_base_name: -#ifdef HAVE_SMEM - if (options->shared_memory_base_name != def_shared_memory_base_name) - my_free(options->shared_memory_base_name); - options->shared_memory_base_name=my_strdup(opt_arg,MYF(MY_WME)); -#endif - break; case OPT_multi_results: options->client_flag|= CLIENT_MULTI_RESULTS; break; @@ -1632,10 +1379,6 @@ mysql_init(MYSQL *mysql) mysql->options.client_flag|= CLIENT_LOCAL_FILES; #endif -#ifdef HAVE_SMEM - mysql->options.shared_memory_base_name= (char*) def_shared_memory_base_name; -#endif - mysql->options.methods_to_use= MYSQL_OPT_GUESS_CONNECTION; mysql->options.report_data_truncation= TRUE; /* default */ @@ -2840,12 +2583,6 @@ void mpvio_info(Vio *vio, MYSQL_PLUGIN_VIO_INFO *info) info->protocol= MYSQL_VIO_PIPE; info->handle= vio->hPipe; return; - case VIO_TYPE_SHARED_MEMORY: - info->protocol= MYSQL_VIO_MEMORY; -#ifdef HAVE_SMEM - info->handle= vio->handle_file_map; /* or what ? */ -#endif - return; #endif default: DBUG_ASSERT(0); } @@ -3180,42 +2917,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user, /* Part 0: Grab a socket and connect it to the server */ -#if defined(HAVE_SMEM) - if ((!mysql->options.protocol || - mysql->options.protocol == MYSQL_PROTOCOL_MEMORY) && - (!host || !strcmp(host,LOCAL_HOST)) && - mysql->options.shared_memory_base_name) - { - DBUG_PRINT("info", ("Using shared memory")); - if ((create_shared_memory(mysql,net, mysql->options.connect_timeout)) == - INVALID_HANDLE_VALUE) - { - DBUG_PRINT("error", - ("host: '%s' socket: '%s' shared memory: %s have_tcpip: %d", - host ? host : "<null>", - unix_socket ? unix_socket : "<null>", - mysql->options.shared_memory_base_name, - (int) have_tcpip)); - if (mysql->options.protocol == MYSQL_PROTOCOL_MEMORY) - goto error; - /* - Try also with PIPE or TCP/IP. Clear the error from - create_shared_memory(). - */ - - net_clear_error(net); - } - else - { - mysql->options.protocol=MYSQL_PROTOCOL_MEMORY; - unix_socket = 0; - host=mysql->options.shared_memory_base_name; - my_snprintf(host_info=buff, sizeof(buff)-1, - ER(CR_SHARED_MEMORY_CONNECTION), host); - } - } -#endif /* HAVE_SMEM */ #if defined(HAVE_SYS_UN_H) if (!net->vio && (!mysql->options.protocol || @@ -3828,10 +3530,6 @@ static void mysql_close_free_options(MYSQL *mysql) #if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY) mysql_ssl_free(mysql); #endif /* HAVE_OPENSSL && !EMBEDDED_LIBRARY */ -#ifdef HAVE_SMEM - if (mysql->options.shared_memory_base_name != def_shared_memory_base_name) - my_free(mysql->options.shared_memory_base_name); -#endif /* HAVE_SMEM */ if (mysql->options.extension) { struct mysql_async_context *ctxt= mysql->options.extension->async_context; @@ -4314,13 +4012,6 @@ mysql_options(MYSQL *mysql,enum mysql_option option, const void *arg) case MYSQL_OPT_PROTOCOL: mysql->options.protocol= *(uint*) arg; break; - case MYSQL_SHARED_MEMORY_BASE_NAME: -#ifdef HAVE_SMEM - if (mysql->options.shared_memory_base_name != def_shared_memory_base_name) - my_free(mysql->options.shared_memory_base_name); - mysql->options.shared_memory_base_name=my_strdup(arg,MYF(MY_WME)); -#endif - break; case MYSQL_OPT_USE_REMOTE_CONNECTION: case MYSQL_OPT_USE_EMBEDDED_CONNECTION: case MYSQL_OPT_GUESS_CONNECTION: @@ -4458,8 +4149,8 @@ mysql_options(MYSQL *mysql,enum mysql_option option, const void *arg) } } break; + case MYSQL_SHARED_MEMORY_BASE_NAME: default: - break; DBUG_RETURN(1); } DBUG_RETURN(0); diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 31ee89a7cd3..3ed6846bde9 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -319,22 +319,15 @@ MY_TIMER_INFO sys_timer_info; /* static variables */ #ifdef HAVE_PSI_INTERFACE -#if (defined(_WIN32) || defined(HAVE_SMEM)) && !defined(EMBEDDED_LIBRARY) +#if defined(_WIN32) && !defined(EMBEDDED_LIBRARY) static PSI_thread_key key_thread_handle_con_namedpipes; static PSI_cond_key key_COND_handler_count; -#endif /* _WIN32 || HAVE_SMEM && !EMBEDDED_LIBRARY */ - -#if defined(HAVE_SMEM) && !defined(EMBEDDED_LIBRARY) -static PSI_thread_key key_thread_handle_con_sharedmem; -#endif /* HAVE_SMEM && !EMBEDDED_LIBRARY */ - -#if (defined(_WIN32) || defined(HAVE_SMEM)) && !defined(EMBEDDED_LIBRARY) static PSI_thread_key key_thread_handle_con_sockets; -#endif /* _WIN32 || HAVE_SMEM && !EMBEDDED_LIBRARY */ +#endif /* _WIN32 |&& !EMBEDDED_LIBRARY */ -#ifdef __WIN__ +#ifdef _WIN32 static PSI_thread_key key_thread_handle_shutdown; -#endif /* __WIN__ */ +#endif #ifdef HAVE_OPENSSL10 static PSI_rwlock_key key_rwlock_openssl; @@ -1098,9 +1091,9 @@ PSI_cond_key key_COND_ack_receiver; static PSI_cond_info all_server_conds[]= { -#if (defined(_WIN32) || defined(HAVE_SMEM)) && !defined(EMBEDDED_LIBRARY) +#if defined(_WIN32) && !defined(EMBEDDED_LIBRARY) { &key_COND_handler_count, "COND_handler_count", PSI_FLAG_GLOBAL}, -#endif /* _WIN32 || HAVE_SMEM && !EMBEDDED_LIBRARY */ +#endif /* _WIN32 && !EMBEDDED_LIBRARY */ #ifdef HAVE_MMAP { &key_PAGE_cond, "PAGE::cond", 0}, { &key_COND_active, "TC_LOG_MMAP::COND_active", 0}, @@ -1161,21 +1154,11 @@ PSI_thread_key key_thread_ack_receiver; static PSI_thread_info all_server_threads[]= { -#if (defined(_WIN32) || defined(HAVE_SMEM)) && !defined(EMBEDDED_LIBRARY) +#if (defined (_WIN32) && !defined (EMBEDDED_LIBRARY)) { &key_thread_handle_con_namedpipes, "con_named_pipes", PSI_FLAG_GLOBAL}, -#endif /* _WIN32 || HAVE_SMEM && !EMBEDDED_LIBRARY */ - -#if defined(HAVE_SMEM) && !defined(EMBEDDED_LIBRARY) - { &key_thread_handle_con_sharedmem, "con_shared_mem", PSI_FLAG_GLOBAL}, -#endif /* HAVE_SMEM && !EMBEDDED_LIBRARY */ - -#if (defined(_WIN32) || defined(HAVE_SMEM)) && !defined(EMBEDDED_LIBRARY) { &key_thread_handle_con_sockets, "con_sockets", PSI_FLAG_GLOBAL}, -#endif /* _WIN32 || HAVE_SMEM && !EMBEDDED_LIBRARY */ - -#ifdef __WIN__ { &key_thread_handle_shutdown, "shutdown", PSI_FLAG_GLOBAL}, -#endif /* __WIN__ */ +#endif { &key_thread_bootstrap, "bootstrap", PSI_FLAG_GLOBAL}, { &key_thread_delayed_insert, "delayed_insert", 0}, @@ -1519,11 +1502,7 @@ int deny_severity = LOG_WARNING; ulong query_cache_min_res_unit= QUERY_CACHE_MIN_RESULT_DATA_SIZE; Query_cache query_cache; #endif -#ifdef HAVE_SMEM -const char *shared_memory_base_name= default_shared_memory_base_name; -my_bool opt_enable_shared_memory; -HANDLE smem_event_connect_request= 0; -#endif + my_bool opt_use_ssl = 0; char *opt_ssl_ca= NULL, *opt_ssl_capath= NULL, *opt_ssl_cert= NULL, @@ -1585,9 +1564,6 @@ static bool read_init_file(char *file_name); #ifdef _WIN32 pthread_handler_t handle_connections_namedpipes(void *arg); #endif -#ifdef HAVE_SMEM -pthread_handler_t handle_connections_shared_memory(void *arg); -#endif pthread_handler_t handle_slave(void *arg); static void clean_up(bool print_message); static int test_if_case_insensitive(const char *dir_name); @@ -2011,21 +1987,6 @@ static void __cdecl kill_server(int sig_ptr) else sql_print_error(ER_DEFAULT(ER_GOT_SIGNAL),my_progname,sig); /* purecov: inspected */ -#ifdef HAVE_SMEM - /* - Send event to smem_event_connect_request for aborting - */ - if (opt_enable_shared_memory) - { - if (!SetEvent(smem_event_connect_request)) - { - DBUG_PRINT("error", - ("Got error: %ld from SetEvent of smem_event_connect_request", - GetLastError())); - } - } -#endif - /* Stop wsrep threads in case they are running. */ if (wsrep_running_threads > 0) { @@ -5629,7 +5590,7 @@ static int init_server_components() #ifndef EMBEDDED_LIBRARY - +#ifdef _WIN32 static void create_shutdown_thread() { #ifdef __WIN__ @@ -5647,19 +5608,14 @@ static void create_shutdown_thread() #endif /* __WIN__ */ } -#endif /* EMBEDDED_LIBRARY */ - -#if (defined(_WIN32) || defined(HAVE_SMEM)) && !defined(EMBEDDED_LIBRARY) static void handle_connections_methods() { pthread_t hThread; int error; DBUG_ENTER("handle_connections_methods"); - if (hPipe == INVALID_HANDLE_VALUE && - (!have_tcpip || opt_disable_networking) && - !opt_enable_shared_memory) + if (hPipe == INVALID_HANDLE_VALUE && opt_disable_networking) { - sql_print_error("TCP/IP, --shared-memory, or --named-pipe should be configured on NT OS"); + sql_print_error("TCP/IP, or --named-pipe should be configured on Windows"); unireg_abort(1); // Will not return } @@ -5690,20 +5646,6 @@ static void handle_connections_methods() handler_count--; } } -#ifdef HAVE_SMEM - if (opt_enable_shared_memory) - { - handler_count++; - if ((error= mysql_thread_create(key_thread_handle_con_sharedmem, - &hThread, &connection_attrib, - handle_connections_shared_memory, 0))) - { - sql_print_warning("Can't create thread to handle shared memory", - " (errno= %d)", error); - handler_count--; - } - } -#endif while (handler_count > 0) mysql_cond_wait(&COND_handler_count, &LOCK_start_thread); @@ -5719,10 +5661,11 @@ void decrement_handler_count() mysql_mutex_unlock(&LOCK_start_thread); my_thread_end(); } -#else +#else /* WIN32*/ +#define create_shutdown_thread() #define decrement_handler_count() -#endif /* defined(_WIN32) || defined(HAVE_SMEM) */ - +#endif +#endif /* EMBEDDED_LIBRARY */ #ifndef EMBEDDED_LIBRARY @@ -6194,11 +6137,11 @@ int mysqld_main(int argc, char **argv) /* Memory used when everything is setup */ start_memory_used= global_status_var.global_memory_used; -#if defined(_WIN32) || defined(HAVE_SMEM) +#ifdef _WIN32 handle_connections_methods(); #else handle_connections_sockets(); -#endif /* _WIN32 || HAVE_SMEM */ +#endif /* _WIN32 */ /* (void) pthread_attr_destroy(&connection_attrib); */ @@ -7029,250 +6972,6 @@ pthread_handler_t handle_connections_namedpipes(void *arg) } #endif /* _WIN32 */ - -#ifdef HAVE_SMEM - -/** - Thread of shared memory's service. - - @param arg Arguments of thread -*/ -pthread_handler_t handle_connections_shared_memory(void *arg) -{ - /* file-mapping object, use for create shared memory */ - HANDLE handle_connect_file_map= 0; - char *handle_connect_map= 0; // pointer on shared memory - HANDLE event_connect_answer= 0; - ulong smem_buffer_length= shared_memory_buffer_length + 4; - ulong connect_number= 1; - char *tmp= NULL; - char *suffix_pos; - char connect_number_char[22], *p; - const char *errmsg= 0; - SECURITY_ATTRIBUTES *sa_event= 0, *sa_mapping= 0; - my_thread_init(); - DBUG_ENTER("handle_connections_shared_memorys"); - DBUG_PRINT("general",("Waiting for allocated shared memory.")); - - /* - get enough space base-name + '_' + longest suffix we might ever send - */ - if (!(tmp= (char *)my_malloc(strlen(shared_memory_base_name) + 32L, - MYF(MY_FAE)))) - goto error; - - if (my_security_attr_create(&sa_event, &errmsg, - GENERIC_ALL, SYNCHRONIZE | EVENT_MODIFY_STATE)) - goto error; - - if (my_security_attr_create(&sa_mapping, &errmsg, - GENERIC_ALL, FILE_MAP_READ | FILE_MAP_WRITE)) - goto error; - - /* - The name of event and file-mapping events create agree next rule: - shared_memory_base_name+unique_part - Where: - shared_memory_base_name is unique value for each server - unique_part is unique value for each object (events and file-mapping) - */ - suffix_pos= strxmov(tmp,shared_memory_base_name,"_",NullS); - strmov(suffix_pos, "CONNECT_REQUEST"); - if ((smem_event_connect_request= CreateEvent(sa_event, - FALSE, FALSE, tmp)) == 0) - { - errmsg= "Could not create request event"; - goto error; - } - strmov(suffix_pos, "CONNECT_ANSWER"); - if ((event_connect_answer= CreateEvent(sa_event, FALSE, FALSE, tmp)) == 0) - { - errmsg="Could not create answer event"; - goto error; - } - strmov(suffix_pos, "CONNECT_DATA"); - if ((handle_connect_file_map= - CreateFileMapping(INVALID_HANDLE_VALUE, sa_mapping, - PAGE_READWRITE, 0, sizeof(connect_number), tmp)) == 0) - { - errmsg= "Could not create file mapping"; - goto error; - } - if ((handle_connect_map= (char *)MapViewOfFile(handle_connect_file_map, - FILE_MAP_WRITE,0,0, - sizeof(DWORD))) == 0) - { - errmsg= "Could not create shared memory service"; - goto error; - } - - while (!abort_loop) - { - /* Wait a request from client */ - WaitForSingleObject(smem_event_connect_request,INFINITE); - - /* - it can be after shutdown command - */ - if (abort_loop) - goto error; - - HANDLE handle_client_file_map= 0; - char *handle_client_map= 0; - HANDLE event_client_wrote= 0; - HANDLE event_client_read= 0; // for transfer data server <-> client - HANDLE event_server_wrote= 0; - HANDLE event_server_read= 0; - HANDLE event_conn_closed= 0; - CONNECT *connect= 0; - - p= int10_to_str(connect_number, connect_number_char, 10); - /* - The name of event and file-mapping events create agree next rule: - shared_memory_base_name+unique_part+number_of_connection - Where: - shared_memory_base_name is uniquel value for each server - unique_part is unique value for each object (events and file-mapping) - number_of_connection is connection-number between server and client - */ - suffix_pos= strxmov(tmp,shared_memory_base_name,"_",connect_number_char, - "_",NullS); - strmov(suffix_pos, "DATA"); - if ((handle_client_file_map= - CreateFileMapping(INVALID_HANDLE_VALUE, sa_mapping, - PAGE_READWRITE, 0, smem_buffer_length, tmp)) == 0) - { - errmsg= "Could not create file mapping"; - goto errorconn; - } - if ((handle_client_map= (char*)MapViewOfFile(handle_client_file_map, - FILE_MAP_WRITE,0,0, - smem_buffer_length)) == 0) - { - errmsg= "Could not create memory map"; - goto errorconn; - } - strmov(suffix_pos, "CLIENT_WROTE"); - if ((event_client_wrote= CreateEvent(sa_event, FALSE, FALSE, tmp)) == 0) - { - errmsg= "Could not create client write event"; - goto errorconn; - } - strmov(suffix_pos, "CLIENT_READ"); - if ((event_client_read= CreateEvent(sa_event, FALSE, FALSE, tmp)) == 0) - { - errmsg= "Could not create client read event"; - goto errorconn; - } - strmov(suffix_pos, "SERVER_READ"); - if ((event_server_read= CreateEvent(sa_event, FALSE, FALSE, tmp)) == 0) - { - errmsg= "Could not create server read event"; - goto errorconn; - } - strmov(suffix_pos, "SERVER_WROTE"); - if ((event_server_wrote= CreateEvent(sa_event, - FALSE, FALSE, tmp)) == 0) - { - errmsg= "Could not create server write event"; - goto errorconn; - } - strmov(suffix_pos, "CONNECTION_CLOSED"); - if ((event_conn_closed= CreateEvent(sa_event, - TRUE, FALSE, tmp)) == 0) - { - errmsg= "Could not create closed connection event"; - goto errorconn; - } - if (abort_loop) - goto errorconn; - - if (!(connect= new CONNECT)) - { - errmsg= "Could not create CONNECT object"; - goto errorconn; - } - - /* Send number of connection to client */ - int4store(handle_connect_map, connect_number); - if (!SetEvent(event_connect_answer)) - { - errmsg= "Could not send answer event"; - goto errorconn; - } - /* Set event that client should receive data */ - if (!SetEvent(event_client_read)) - { - errmsg= "Could not set client to read mode"; - goto errorconn; - } - if (!(connect->vio= vio_new_win32shared_memory(handle_client_file_map, - handle_client_map, - event_client_wrote, - event_client_read, - event_server_wrote, - event_server_read, - event_conn_closed))) - { - errmsg= "Could not create VIO object"; - goto errorconn; - } - connect->host= my_localhost; /* Host is unknown */ - create_new_thread(connect); - connect_number++; - continue; - -errorconn: - /* Could not form connection; Free used handlers/memort and retry */ - if (errmsg) - { - char buff[180]; - strxmov(buff, "Can't create shared memory connection: ", errmsg, ".", - NullS); - sql_perror(buff); - } - if (handle_client_file_map) - CloseHandle(handle_client_file_map); - if (handle_client_map) - UnmapViewOfFile(handle_client_map); - if (event_server_wrote) - CloseHandle(event_server_wrote); - if (event_server_read) - CloseHandle(event_server_read); - if (event_client_wrote) - CloseHandle(event_client_wrote); - if (event_client_read) - CloseHandle(event_client_read); - if (event_conn_closed) - CloseHandle(event_conn_closed); - - delete connect; - statistic_increment(aborted_connects,&LOCK_status); - statistic_increment(connection_errors_internal, &LOCK_status); - } - - /* End shared memory handling */ -error: - if (tmp) - my_free(tmp); - - if (errmsg) - { - char buff[180]; - strxmov(buff, "Can't create shared memory service: ", errmsg, ".", NullS); - sql_perror(buff); - } - my_security_attr_free(sa_event); - my_security_attr_free(sa_mapping); - if (handle_connect_map) UnmapViewOfFile(handle_connect_map); - if (handle_connect_file_map) CloseHandle(handle_connect_file_map); - if (event_connect_answer) CloseHandle(event_connect_answer); - if (smem_event_connect_request) CloseHandle(smem_event_connect_request); - DBUG_LEAVE; - decrement_handler_count(); - return 0; -} -#endif /* HAVE_SMEM */ #endif /* EMBEDDED_LIBRARY */ @@ -9076,9 +8775,6 @@ static int mysql_init_variables(void) ssl_acceptor_fd= 0; #endif /* ! EMBEDDED_LIBRARY */ #endif /* HAVE_OPENSSL */ -#ifdef HAVE_SMEM - shared_memory_base_name= default_shared_memory_base_name; -#endif #if defined(__WIN__) /* Allow Win32 users to move MySQL anywhere */ diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index 6f65b960132..37ae2fbb68a 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -2711,17 +2711,6 @@ static Sys_var_ulong Sys_query_prealloc_size( BLOCK_SIZE(1024), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), ON_UPDATE(fix_thd_mem_root)); -#ifdef HAVE_SMEM -static Sys_var_mybool Sys_shared_memory( - "shared_memory", "Enable the shared memory", - READ_ONLY GLOBAL_VAR(opt_enable_shared_memory), CMD_LINE(OPT_ARG), - DEFAULT(FALSE)); - -static Sys_var_charptr Sys_shared_memory_base_name( - "shared_memory_base_name", "Base name of shared memory", - READ_ONLY GLOBAL_VAR(shared_memory_base_name), CMD_LINE(REQUIRED_ARG), - IN_FS_CHARSET, DEFAULT(0)); -#endif // this has to be NO_CMD_LINE as the command-line option has a different name static Sys_var_mybool Sys_skip_external_locking( diff --git a/sql/threadpool_win.cc b/sql/threadpool_win.cc index 0cc683c631d..3bc1ae3b371 100644 --- a/sql/threadpool_win.cc +++ b/sql/threadpool_win.cc @@ -75,7 +75,6 @@ static bool skip_completion_port_on_success = false; io_completion_callback - handle client request timer_callback - handle wait timeout (kill connection) - shm_read_callback, shm_close_callback - shared memory stuff login_callback - user login (submitted as threadpool work) */ @@ -89,9 +88,6 @@ static void CALLBACK io_completion_callback(PTP_CALLBACK_INSTANCE instance, static void CALLBACK work_callback(PTP_CALLBACK_INSTANCE instance, PVOID context, PTP_WORK work); -static void CALLBACK shm_read_callback(PTP_CALLBACK_INSTANCE instance, - PVOID Context, PTP_WAIT wait,TP_WAIT_RESULT wait_result); - static void pre_callback(PVOID context, PTP_CALLBACK_INSTANCE instance); /* Get current time as Windows time */ @@ -120,7 +116,6 @@ public: PTP_CALLBACK_INSTANCE callback_instance; PTP_IO io; PTP_TIMER timer; - PTP_WAIT shm_read; PTP_WORK work; bool long_callback; @@ -149,7 +144,6 @@ TP_connection_win::TP_connection_win(CONNECT *c) : callback_instance(0), io(0), timer(0), - shm_read(0), work(0) { } @@ -170,30 +164,20 @@ int TP_connection_win::init() case VIO_TYPE_NAMEDPIPE: handle= (HANDLE)vio->hPipe; break; - case VIO_TYPE_SHARED_MEMORY: - handle= vio->event_server_wrote; - break; default: abort(); } - if (vio_type == VIO_TYPE_SHARED_MEMORY) + + /* Performance tweaks (s. MSDN documentation)*/ + UCHAR flags= FILE_SKIP_SET_EVENT_ON_HANDLE; + if (skip_completion_port_on_success) { - CHECK_ALLOC_ERROR(shm_read= CreateThreadpoolWait(shm_read_callback, this, &callback_environ)); + flags |= FILE_SKIP_COMPLETION_PORT_ON_SUCCESS; } - else - { - /* Performance tweaks (s. MSDN documentation)*/ - UCHAR flags= FILE_SKIP_SET_EVENT_ON_HANDLE; - if (skip_completion_port_on_success) - { - flags |= FILE_SKIP_COMPLETION_PORT_ON_SUCCESS; - } - (void)SetFileCompletionNotificationModes(handle, flags); - /* Assign io completion callback */ - CHECK_ALLOC_ERROR(io= CreateThreadpoolIo(handle, io_completion_callback, this, &callback_environ)); - } - + (void)SetFileCompletionNotificationModes(handle, flags); + /* Assign io completion callback */ + CHECK_ALLOC_ERROR(io= CreateThreadpoolIo(handle, io_completion_callback, this, &callback_environ)); CHECK_ALLOC_ERROR(timer= CreateThreadpoolTimer(timer_callback, this, &callback_environ)); CHECK_ALLOC_ERROR(work= CreateThreadpoolWork(work_callback, this, &callback_environ)); return 0; @@ -214,11 +198,6 @@ int TP_connection_win::start_io() DWORD last_error= 0; int retval; - if (shm_read) - { - SetThreadpoolWait(shm_read, handle, NULL); - return 0; - } StartThreadpoolIo(io); if (vio_type == VIO_TYPE_TCPIP || vio_type == VIO_TYPE_SSL) @@ -297,9 +276,6 @@ TP_connection_win::~TP_connection_win() if (io) CloseThreadpoolIo(io); - if (shm_read) - CloseThreadpoolWait(shm_read); - if (work) CloseThreadpoolWork(work); @@ -420,29 +396,6 @@ static VOID CALLBACK timer_callback(PTP_CALLBACK_INSTANCE instance, } } - -/* - Shared memory read callback. - Invoked when read event is set on connection. -*/ - -static void CALLBACK shm_read_callback(PTP_CALLBACK_INSTANCE instance, - PVOID context, PTP_WAIT wait,TP_WAIT_RESULT wait_result) -{ - TP_connection_win *c= (TP_connection_win *)context; - /* Disarm wait. */ - SetThreadpoolWait(wait, NULL, NULL); - - /* - This is an autoreset event, and one wakeup is eaten already by threadpool, - and the current state is "not set". Thus we need to reset the event again, - or vio_read will hang. - */ - SetEvent(c->handle); - tp_callback(instance, context); -} - - static void CALLBACK work_callback(PTP_CALLBACK_INSTANCE instance, PVOID context, PTP_WORK work) { tp_callback(instance, context); diff --git a/tests/mysql_client_fw.c b/tests/mysql_client_fw.c index 2a529c12c63..c39b5138309 100644 --- a/tests/mysql_client_fw.c +++ b/tests/mysql_client_fw.c @@ -50,9 +50,6 @@ static char *opt_user= 0; static char *opt_password= 0; static char *opt_host= 0; static char *opt_unix_socket= 0; -#ifdef HAVE_SMEM -static char *shared_memory_base_name= 0; -#endif static unsigned int opt_port; static my_bool tty_password= 0, opt_silent= 0; @@ -253,10 +250,6 @@ static void print_st_error(MYSQL_STMT *stmt, const char *msg) static MYSQL *mysql_client_init(MYSQL* con) { MYSQL* res = mysql_init(con); -#ifdef HAVE_SMEM - if (res && shared_memory_base_name) - mysql_options(res, MYSQL_SHARED_MEMORY_BASE_NAME, shared_memory_base_name); -#endif if (res && non_blocking_api_enabled) mysql_options(res, MYSQL_OPT_NONBLOCK, 0); if (opt_plugin_dir && *opt_plugin_dir) @@ -1229,11 +1222,6 @@ static struct my_option client_test_long_options[] = 0, 0, 0, 0, 0, 0}, {"silent", 's', "Be more silent", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, -#ifdef HAVE_SMEM - {"shared-memory-base-name", 'm', "Base name of shared memory.", - &shared_memory_base_name, (uchar**)&shared_memory_base_name, 0, - GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, -#endif {"socket", 'S', "Socket file to use for connection", &opt_unix_socket, &opt_unix_socket, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, diff --git a/vio/CMakeLists.txt b/vio/CMakeLists.txt index cdb28799ada..95748224f97 100644 --- a/vio/CMakeLists.txt +++ b/vio/CMakeLists.txt @@ -17,6 +17,6 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${SSL_INCLUDE_DIRS}) ADD_DEFINITIONS(${SSL_DEFINES}) -SET(VIO_SOURCES vio.c viosocket.c viossl.c viopipe.c vioshm.c viosslfactories.c) +SET(VIO_SOURCES vio.c viosocket.c viossl.c viopipe.c viosslfactories.c) ADD_CONVENIENCE_LIBRARY(vio ${VIO_SOURCES}) TARGET_LINK_LIBRARIES(vio ${LIBSOCKET}) diff --git a/vio/vio.c b/vio/vio.c index 34ca9ed872d..985a6568e3c 100644 --- a/vio/vio.c +++ b/vio/vio.c @@ -54,18 +54,6 @@ static my_bool has_no_data(Vio *vio __attribute__((unused))) } #ifdef _WIN32 -my_bool vio_shared_memory_has_data(Vio *vio) -{ - return (vio->shared_memory_remain > 0); -} - -int vio_shared_memory_shutdown(Vio *vio, int how) -{ - SetEvent(vio->event_conn_closed); - SetEvent(vio->event_server_wrote); - return 0; -} - int vio_pipe_shutdown(Vio *vio, int how) { return CancelIoEx(vio->hPipe, NULL); @@ -116,28 +104,7 @@ static void vio_init(Vio *vio, enum enum_vio_type type, DBUG_VOID_RETURN; } #endif -#ifdef HAVE_SMEM - if (type == VIO_TYPE_SHARED_MEMORY) - { - vio->viodelete =vio_delete; - vio->vioerrno =vio_errno; - vio->read =vio_read_shared_memory; - vio->write =vio_write_shared_memory; - vio->fastsend =vio_fastsend; - vio->viokeepalive =vio_keepalive; - vio->should_retry =vio_should_retry; - vio->was_timeout =vio_was_timeout; - vio->vioclose =vio_close_shared_memory; - vio->peer_addr =vio_peer_addr; - vio->vioblocking =vio_blocking; - vio->is_blocking =vio_is_blocking; - vio->io_wait =no_io_wait; - vio->is_connected =vio_is_connected_shared_memory; - vio->has_data =vio_shared_memory_has_data; - vio->shutdown =vio_shared_memory_shutdown; - DBUG_VOID_RETURN; - } -#endif + #ifdef HAVE_OPENSSL if (type == VIO_TYPE_SSL) { @@ -296,31 +263,7 @@ Vio *vio_new_win32pipe(HANDLE hPipe) DBUG_RETURN(vio); } -#ifdef HAVE_SMEM -Vio *vio_new_win32shared_memory(HANDLE handle_file_map, HANDLE handle_map, - HANDLE event_server_wrote, HANDLE event_server_read, - HANDLE event_client_wrote, HANDLE event_client_read, - HANDLE event_conn_closed) -{ - Vio *vio; - DBUG_ENTER("vio_new_win32shared_memory"); - if ((vio = (Vio*) my_malloc(sizeof(Vio),MYF(MY_WME)))) - { - vio_init(vio, VIO_TYPE_SHARED_MEMORY, 0, VIO_LOCALHOST); - vio->desc= "shared memory"; - vio->handle_file_map= handle_file_map; - vio->handle_map= handle_map; - vio->event_server_wrote= event_server_wrote; - vio->event_server_read= event_server_read; - vio->event_client_wrote= event_client_wrote; - vio->event_client_read= event_client_read; - vio->event_conn_closed= event_conn_closed; - vio->shared_memory_remain= 0; - vio->shared_memory_pos= handle_map; - } - DBUG_RETURN(vio); -} -#endif + #endif diff --git a/vio/vio_priv.h b/vio/vio_priv.h index 248e1a59b23..6f5364417ac 100644 --- a/vio/vio_priv.h +++ b/vio/vio_priv.h @@ -35,14 +35,6 @@ int cancel_io(HANDLE handle, DWORD thread_id); int vio_shutdown_pipe(Vio *vio,int how); #endif -#ifdef HAVE_SMEM -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); -my_bool vio_is_connected_shared_memory(Vio *vio); -int vio_close_shared_memory(Vio * vio); -my_bool vio_shared_memory_has_data(Vio *vio); -int vio_shutdown_shared_memory(Vio *vio, int how); -#endif int vio_socket_shutdown(Vio *vio, int how); my_bool vio_buff_has_data(Vio *vio); diff --git a/vio/vioshm.c b/vio/vioshm.c deleted file mode 100644 index acc7d2402c5..00000000000 --- a/vio/vioshm.c +++ /dev/null @@ -1,217 +0,0 @@ -/* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ - -#include "vio_priv.h" - -#if defined(_WIN32) && defined(HAVE_SMEM) - -size_t vio_read_shared_memory(Vio *vio, uchar *buf, size_t size) -{ - size_t length; - size_t remain_local; - char *current_position; - HANDLE events[2]; - DWORD timeout; - DBUG_ENTER("vio_read_shared_memory"); - - remain_local= size; - current_position= buf; - timeout= vio->read_timeout >= 0 ? vio->read_timeout : INFINITE; - - events[0]= vio->event_server_wrote; - events[1]= vio->event_conn_closed; - - do - { - if (vio->shared_memory_remain == 0) - { - DWORD wait_status; - - wait_status= WaitForMultipleObjects(array_elements(events), events, - FALSE, timeout); - - /* - WaitForMultipleObjects can return next values: - WAIT_OBJECT_0+0 - event from vio->event_server_wrote - WAIT_OBJECT_0+1 - event from vio->event_conn_closed. - We can't read anything - WAIT_ABANDONED_0 and WAIT_TIMEOUT - fail. We can't read anything - */ - if (wait_status != WAIT_OBJECT_0) - { - /* - If wait_status is WAIT_TIMEOUT, set error code to indicate a - timeout error. If vio->event_conn_closed was set, use an EOF - condition (return value of zero) to indicate that the operation - has been aborted. - */ - if (wait_status == WAIT_TIMEOUT) - SetLastError(SOCKET_ETIMEDOUT); - else if (wait_status == (WAIT_OBJECT_0 + 1)) - DBUG_RETURN(0); - - DBUG_RETURN(-1); - } - - vio->shared_memory_pos= vio->handle_map; - vio->shared_memory_remain= uint4korr((ulong*)vio->shared_memory_pos); - vio->shared_memory_pos+= 4; - } - - length= size; - - if (vio->shared_memory_remain < length) - length= vio->shared_memory_remain; - if (length > remain_local) - length= remain_local; - - memcpy(current_position, vio->shared_memory_pos, length); - - vio->shared_memory_remain-= length; - vio->shared_memory_pos+= length; - current_position+= length; - remain_local-= length; - - if (!vio->shared_memory_remain) - { - if (!SetEvent(vio->event_client_read)) - DBUG_RETURN(-1); - } - } while (remain_local); - length= size; - - DBUG_RETURN(length); -} - - -size_t vio_write_shared_memory(Vio *vio, const uchar *buf, size_t size) -{ - size_t length, remain, sz; - HANDLE pos; - const uchar *current_position; - HANDLE events[2]; - DWORD timeout; - DBUG_ENTER("vio_write_shared_memory"); - - remain= size; - current_position= buf; - timeout= vio->write_timeout >= 0 ? vio->write_timeout : INFINITE; - - events[0]= vio->event_server_read; - events[1]= vio->event_conn_closed; - - while (remain != 0) - { - DWORD wait_status; - - wait_status= WaitForMultipleObjects(array_elements(events), events, - FALSE, timeout); - - if (wait_status != WAIT_OBJECT_0) - { - /* Set error code to indicate a timeout error or disconnect. */ - if (wait_status == WAIT_TIMEOUT) - SetLastError(SOCKET_ETIMEDOUT); - else - SetLastError(ERROR_GRACEFUL_DISCONNECT); - - DBUG_RETURN((size_t) -1); - } - - sz= (remain > shared_memory_buffer_length ? shared_memory_buffer_length : - remain); - - int4store(vio->handle_map, sz); - pos= vio->handle_map + 4; - memcpy(pos, current_position, sz); - remain-= sz; - current_position+= sz; - if (!SetEvent(vio->event_client_wrote)) - DBUG_RETURN((size_t) -1); - } - length= size; - - DBUG_RETURN(length); -} - - -my_bool vio_is_connected_shared_memory(Vio *vio) -{ - return (WaitForSingleObject(vio->event_conn_closed, 0) != WAIT_OBJECT_0); -} - - -/** - Close shared memory and DBUG_PRINT any errors that happen on closing. - @return Zero if all closing functions succeed, and nonzero otherwise. -*/ -int vio_close_shared_memory(Vio * vio) -{ - int error_count= 0; - DBUG_ENTER("vio_close_shared_memory"); - if (vio->type != VIO_CLOSED) - { - /* - Set event_conn_closed for notification of both client and server that - connection is closed - */ - SetEvent(vio->event_conn_closed); - /* - Close all handlers. UnmapViewOfFile and CloseHandle return non-zero - result if they are success. - */ - if (UnmapViewOfFile(vio->handle_map) == 0) - { - error_count++; - DBUG_PRINT("vio_error", ("UnmapViewOfFile() failed")); - } - if (CloseHandle(vio->event_server_wrote) == 0) - { - error_count++; - DBUG_PRINT("vio_error", ("CloseHandle(vio->esw) failed")); - } - if (CloseHandle(vio->event_server_read) == 0) - { - error_count++; - DBUG_PRINT("vio_error", ("CloseHandle(vio->esr) failed")); - } - if (CloseHandle(vio->event_client_wrote) == 0) - { - error_count++; - DBUG_PRINT("vio_error", ("CloseHandle(vio->ecw) failed")); - } - if (CloseHandle(vio->event_client_read) == 0) - { - error_count++; - DBUG_PRINT("vio_error", ("CloseHandle(vio->ecr) failed")); - } - if (CloseHandle(vio->handle_file_map) == 0) - { - error_count++; - DBUG_PRINT("vio_error", ("CloseHandle(vio->hfm) failed")); - } - if (CloseHandle(vio->event_conn_closed) == 0) - { - error_count++; - DBUG_PRINT("vio_error", ("CloseHandle(vio->ecc) failed")); - } - } - vio->type= VIO_CLOSED; - vio->mysql_socket= MYSQL_INVALID_SOCKET; - DBUG_RETURN(error_count); -} - -#endif /* #if defined(_WIN32) && defined(HAVE_SMEM) */ - diff --git a/vio/viosocket.c b/vio/viosocket.c index dbc66e288b6..8fc58ef8f43 100644 --- a/vio/viosocket.c +++ b/vio/viosocket.c @@ -74,8 +74,7 @@ int vio_errno(Vio *vio __attribute__((unused))) { /* These transport types are not Winsock based. */ #ifdef _WIN32 - if (vio->type == VIO_TYPE_NAMEDPIPE || - vio->type == VIO_TYPE_SHARED_MEMORY) + if (vio->type == VIO_TYPE_NAMEDPIPE) return GetLastError(); #endif @@ -363,7 +362,7 @@ int vio_blocking(Vio *vio, my_bool set_blocking_mode, my_bool *old_mode) r= set_blocking_mode ? 0 : 1; #endif /* !defined(NO_FCNTL_NONBLOCK) */ #else /* !defined(__WIN__) */ - if (vio->type != VIO_TYPE_NAMEDPIPE && vio->type != VIO_TYPE_SHARED_MEMORY) + if (vio->type != VIO_TYPE_NAMEDPIPE) { ulong arg; int old_fcntl=vio->fcntl_mode; @@ -442,8 +441,7 @@ int vio_nodelay(Vio *vio, my_bool on) int no_delay= MY_TEST(on); DBUG_ENTER("vio_nodelay"); - if (vio->type == VIO_TYPE_NAMEDPIPE || vio->type == VIO_TYPE_SHARED_MEMORY - || vio->type == VIO_TYPE_SOCKET) + if (vio->type == VIO_TYPE_NAMEDPIPE || vio->type == VIO_TYPE_SOCKET) { DBUG_RETURN(0); } @@ -468,7 +466,7 @@ int vio_fastsend(Vio * vio) int r=0; DBUG_ENTER("vio_fastsend"); - if (vio->type == VIO_TYPE_NAMEDPIPE ||vio->type == VIO_TYPE_SHARED_MEMORY) + if (vio->type == VIO_TYPE_NAMEDPIPE) { DBUG_RETURN(0); } @@ -502,7 +500,7 @@ int vio_keepalive(Vio* vio, my_bool set_keep_alive) (int)mysql_socket_getfd(vio->mysql_socket), (int)set_keep_alive)); - if (vio->type != VIO_TYPE_NAMEDPIPE && vio->type != VIO_TYPE_SHARED_MEMORY) + if (vio->type != VIO_TYPE_NAMEDPIPE) { if (set_keep_alive) opt = 1; @@ -521,7 +519,7 @@ int vio_set_keepalive_options(Vio* vio, const struct vio_keepalive_opts *opts) struct tcp_keepalive s; DWORD nbytes; - if (vio->type == VIO_TYPE_NAMEDPIPE || vio->type == VIO_TYPE_SHARED_MEMORY) + if (vio->type == VIO_TYPE_NAMEDPIPE) return 0; if (!opts->idle && !opts->interval) |