From 5c4a6807c1d9fa49b95f564f39f4fb6cf49ffc71 Mon Sep 17 00:00:00 2001 From: "brian@zim.(none)" <> Date: Wed, 11 Oct 2006 18:02:12 -0700 Subject: [PATCH 01/17] Panic was being called twice! Both on its own and in the plugin shutdown.... not so good. The code is a bit simpler, and we could now technically remove the panic all entirely if we wanted to. --- sql/handler.cc | 31 +++---------------------------- sql/mysqld.cc | 1 - 2 files changed, 3 insertions(+), 29 deletions(-) diff --git a/sql/handler.cc b/sql/handler.cc index ccf1a1ef8d9..4beef164ee1 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -376,11 +376,12 @@ int ha_finalize_handlerton(st_plugin_int *plugin) case SHOW_OPTION_YES: if (installed_htons[hton->db_type] == hton) installed_htons[hton->db_type]= NULL; - if (hton->panic && hton->panic(hton, HA_PANIC_CLOSE)) - DBUG_RETURN(1); break; }; + if (hton->panic) + hton->panic(hton, HA_PANIC_CLOSE); + if (plugin->plugin->deinit) { /* @@ -509,32 +510,6 @@ int ha_init() DBUG_RETURN(error); } -/* - close, flush or restart databases - Ignore this for other databases than ours -*/ - -static my_bool panic_handlerton(THD *unused1, st_plugin_int *plugin, void *arg) -{ - handlerton *hton= (handlerton *)plugin->data; - if (hton->state == SHOW_OPTION_YES && hton->panic) - ((int*)arg)[0]|= hton->panic(hton, (enum ha_panic_function)((int*)arg)[1]); - return FALSE; -} - - -int ha_panic(enum ha_panic_function flag) -{ - int error[2]; - - error[0]= 0; error[1]= (int)flag; - plugin_foreach(NULL, panic_handlerton, MYSQL_STORAGE_ENGINE_PLUGIN, error); - - if (flag == HA_PANIC_CLOSE && ha_finish_errors()) - error[0]= 1; - return error[0]; -} /* ha_panic */ - static my_bool dropdb_handlerton(THD *unused1, st_plugin_int *plugin, void *path) { diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 6674dd87757..b5e4115c376 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -1186,7 +1186,6 @@ void clean_up(bool print_message) lex_free(); /* Free some memory */ set_var_free(); free_charsets(); - (void) ha_panic(HA_PANIC_CLOSE); /* close all tables and logs */ if (!opt_noacl) { #ifdef HAVE_DLOPEN From 31e47a9511c44b1bd0d5e0327303b427402ffd40 Mon Sep 17 00:00:00 2001 From: "brian@zim.(none)" <> Date: Tue, 31 Oct 2006 20:10:32 -0800 Subject: [PATCH 02/17] Adding in an ha_end() call. This is the first part of the patch I and Monty have agreed on. In the future engines will have the option of shutting down more quickly via the panic call, or just shutting down during the unloading of a plugin. --- sql/handler.cc | 17 +++++++++++++++++ sql/handler.h | 1 + sql/mysqld.cc | 1 + 3 files changed, 19 insertions(+) diff --git a/sql/handler.cc b/sql/handler.cc index 4beef164ee1..01f73347397 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -510,6 +510,23 @@ int ha_init() DBUG_RETURN(error); } +int ha_end() +{ + int error= 0; + DBUG_ENTER("ha_end"); + + + /* + This should be eventualy based on the graceful shutdown flag. + So if flag is equal to HA_PANIC_CLOSE, the deallocate + the errors. + */ + if (ha_finish_errors()) + error= 1; + + DBUG_RETURN(error); +} + static my_bool dropdb_handlerton(THD *unused1, st_plugin_int *plugin, void *path) { diff --git a/sql/handler.h b/sql/handler.h index 5e26d9c7b63..56c34b8b75e 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -1654,6 +1654,7 @@ static inline bool ha_storage_engine_is_enabled(const handlerton *db_type) /* basic stuff */ int ha_init(void); +int ha_end(void); int ha_initialize_handlerton(st_plugin_int *plugin); int ha_finalize_handlerton(st_plugin_int *plugin); diff --git a/sql/mysqld.cc b/sql/mysqld.cc index b5e4115c376..877a2d5e220 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -1193,6 +1193,7 @@ void clean_up(bool print_message) #endif } plugin_shutdown(); + ha_end(); if (tc_log) tc_log->close(); xid_cache_free(); From 8bc5a891783359331d36a6efae77771af5bc8339 Mon Sep 17 00:00:00 2001 From: "anozdrin/alik@booka." <> Date: Thu, 2 Nov 2006 16:53:14 +0300 Subject: [PATCH 03/17] Wait for IM to start accepting connections after restart. --- mysql-test/t/im_daemon_life_cycle.imtest | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mysql-test/t/im_daemon_life_cycle.imtest b/mysql-test/t/im_daemon_life_cycle.imtest index 408133ca3ba..40db584bbf5 100644 --- a/mysql-test/t/im_daemon_life_cycle.imtest +++ b/mysql-test/t/im_daemon_life_cycle.imtest @@ -43,10 +43,13 @@ START INSTANCE mysqld2; # FIXME: START INSTANCE should be synchronous. --exec $MYSQL_TEST_DIR/t/wait_for_process.sh $IM_MYSQLD2_PATH_PID 30 started -# 2. Restart IM-main: kill it and IM-angel will restart it. +# 2. Restart IM-main: kill it and IM-angel will restart it; wait for IM to +# start accepting connections again. --exec $MYSQL_TEST_DIR/t/kill_n_check.sh $IM_PATH_PID restarted 30 +--exec $MYSQL_TEST_DIR/t/wait_for_socket.sh $EXE_MYSQL $IM_PATH_SOCK $IM_USERNAME $IM_PASSWORD '' 30 + # 3. Issue some statement -- connection should be re-established. # Give some time to begin accepting connections after restart. From 7096cd20a4ce5b22dd233280c63e5d71ed414df4 Mon Sep 17 00:00:00 2001 From: "anozdrin/alik@booka." <> Date: Thu, 2 Nov 2006 21:43:52 +0300 Subject: [PATCH 04/17] Wait for IM to start accepting connections after restart (part 2). --- mysql-test/r/im_daemon_life_cycle.result | 1 + 1 file changed, 1 insertion(+) diff --git a/mysql-test/r/im_daemon_life_cycle.result b/mysql-test/r/im_daemon_life_cycle.result index a0849313b19..b842a5f3bf9 100644 --- a/mysql-test/r/im_daemon_life_cycle.result +++ b/mysql-test/r/im_daemon_life_cycle.result @@ -18,6 +18,7 @@ Success: the process has been started. Killing the process... Sleeping... Success: the process was restarted. +Success: server is ready to accept connection on socket. SHOW INSTANCE STATUS mysqld1; instance_name status version mysqld1 online VERSION From afffedc0e3e0597c38a0ee9b362d6e05032f0349 Mon Sep 17 00:00:00 2001 From: "ramil/ram@mysql.com/myoffice.izhnet.ru" <> Date: Fri, 3 Nov 2006 15:27:37 +0400 Subject: [PATCH 05/17] Fix for bug #19736 VIEW: column names not quoted properly when view is replicated When we write 'query=...' string to a frm file for views on a slave, indentifiers are not properly quoted due to missing OPTION_QUOTE_SHOW_CREATE flag in the thd->options. Fix: properly set thd->options for the slave thread. --- mysql-test/r/rpl_view.result | 4 ++-- sql/slave.cc | 28 +++++++++++++++------------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/mysql-test/r/rpl_view.result b/mysql-test/r/rpl_view.result index 601f3d9cd14..be03f3f080a 100644 --- a/mysql-test/r/rpl_view.result +++ b/mysql-test/r/rpl_view.result @@ -47,11 +47,11 @@ show binlog events limit 1,100; Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000001 # Query 1 # use `test`; create table t1 (a int) slave-bin.000001 # Query 1 # use `test`; insert into t1 values (1) -slave-bin.000001 # Query 1 # use `test`; CREATE ALGORITHM=UNDEFINED DEFINER=root@localhost SQL SECURITY DEFINER VIEW v1 AS select a from t1 +slave-bin.000001 # Query 1 # use `test`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select a from t1 slave-bin.000001 # Query 1 # use `test`; insert into v1 values (2) slave-bin.000001 # Query 1 # use `test`; update v1 set a=3 where a=1 slave-bin.000001 # Query 1 # use `test`; delete from v1 where a=2 -slave-bin.000001 # Query 1 # use `test`; ALTER ALGORITHM=UNDEFINED DEFINER=root@localhost SQL SECURITY DEFINER VIEW v1 AS select a as b from t1 +slave-bin.000001 # Query 1 # use `test`; ALTER ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select a as b from t1 slave-bin.000001 # Query 1 # use `test`; drop view v1 slave-bin.000001 # Query 1 # use `test`; drop table t1 diff --git a/sql/slave.cc b/sql/slave.cc index 28bb7f12008..e3497a4f0ac 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -2854,8 +2854,21 @@ improper_arguments: %d timed_out: %d", void set_slave_thread_options(THD* thd) { - thd->options = ((opt_log_slave_updates) ? OPTION_BIN_LOG:0) | - OPTION_AUTO_IS_NULL; + /* + It's nonsense to constrain the slave threads with max_join_size; if a + query succeeded on master, we HAVE to execute it. So set + OPTION_BIG_SELECTS. Setting max_join_size to HA_POS_ERROR is not enough + (and it's not needed if we have OPTION_BIG_SELECTS) because an INSERT + SELECT examining more than 4 billion rows would still fail (yes, because + when max_join_size is 4G, OPTION_BIG_SELECTS is automatically set, but + only for client threads. + */ + ulonglong options= thd->options | OPTION_BIG_SELECTS; + if (opt_log_slave_updates) + options|= OPTION_BIN_LOG; + else + options&= ~OPTION_BIN_LOG; + thd->options= options; thd->variables.completion_type= 0; } @@ -2885,17 +2898,6 @@ static int init_slave_thread(THD* thd, SLAVE_THD_TYPE thd_type) thd->net.read_timeout = slave_net_timeout; thd->slave_thread = 1; set_slave_thread_options(thd); - /* - It's nonsense to constrain the slave threads with max_join_size; if a - query succeeded on master, we HAVE to execute it. So set - OPTION_BIG_SELECTS. Setting max_join_size to HA_POS_ERROR is not enough - (and it's not needed if we have OPTION_BIG_SELECTS) because an INSERT - SELECT examining more than 4 billion rows would still fail (yes, because - when max_join_size is 4G, OPTION_BIG_SELECTS is automatically set, but - only for client threads. - */ - thd->options = ((opt_log_slave_updates) ? OPTION_BIN_LOG:0) | - OPTION_AUTO_IS_NULL | OPTION_BIG_SELECTS; thd->client_capabilities = CLIENT_LOCAL_FILES; thd->real_id=pthread_self(); pthread_mutex_lock(&LOCK_thread_count); From 1a92614216565550c459a01371579021340b8dd1 Mon Sep 17 00:00:00 2001 From: "brian@zim.(none)" <> Date: Sun, 5 Nov 2006 12:03:19 -0800 Subject: [PATCH 06/17] Removed Innodb variable at request of Innobase. --- sql/mysqld.cc | 6 ------ sql/set_var.cc | 2 -- 2 files changed, 8 deletions(-) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 877a2d5e220..26c2b572047 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -372,7 +372,6 @@ extern longlong innobase_log_file_size; extern long innobase_log_buffer_size; extern longlong innobase_buffer_pool_size; extern long innobase_additional_mem_pool_size; -extern long innobase_buffer_pool_awe_mem_mb; extern long innobase_file_io_threads, innobase_lock_wait_timeout; extern long innobase_force_recovery; extern long innobase_open_files; @@ -5787,10 +5786,6 @@ log and this option does nothing anymore.", (gptr*) &srv_auto_extend_increment, (gptr*) &srv_auto_extend_increment, 0, GET_LONG, REQUIRED_ARG, 8L, 1L, 1000L, 0, 1L, 0}, - {"innodb_buffer_pool_awe_mem_mb", OPT_INNODB_BUFFER_POOL_AWE_MEM_MB, - "If Windows AWE is used, the size of InnoDB buffer pool allocated from the AWE memory.", - (gptr*) &innobase_buffer_pool_awe_mem_mb, (gptr*) &innobase_buffer_pool_awe_mem_mb, 0, - GET_LONG, REQUIRED_ARG, 0, 0, 63000, 0, 1, 0}, {"innodb_buffer_pool_size", OPT_INNODB_BUFFER_POOL_SIZE, "The size of the memory buffer InnoDB uses to cache data and indexes of its tables.", (gptr*) &innobase_buffer_pool_size, (gptr*) &innobase_buffer_pool_size, 0, @@ -8145,7 +8140,6 @@ longlong innobase_log_file_size; long innobase_log_buffer_size; longlong innobase_buffer_pool_size; long innobase_additional_mem_pool_size; -long innobase_buffer_pool_awe_mem_mb; long innobase_file_io_threads, innobase_lock_wait_timeout; long innobase_force_recovery; long innobase_open_files; diff --git a/sql/set_var.cc b/sql/set_var.cc index 4369c288cd5..586ed8543c2 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -67,7 +67,6 @@ extern longlong innobase_log_file_size; extern long innobase_log_buffer_size; extern longlong innobase_buffer_pool_size; extern long innobase_additional_mem_pool_size; -extern long innobase_buffer_pool_awe_mem_mb; extern long innobase_file_io_threads, innobase_lock_wait_timeout; extern long innobase_force_recovery; extern long innobase_open_files; @@ -819,7 +818,6 @@ SHOW_VAR init_vars[]= { #ifdef WITH_INNOBASE_STORAGE_ENGINE {"innodb_additional_mem_pool_size", (char*) &innobase_additional_mem_pool_size, SHOW_LONG }, {sys_innodb_autoextend_increment.name, (char*) &sys_innodb_autoextend_increment, SHOW_SYS}, - {"innodb_buffer_pool_awe_mem_mb", (char*) &innobase_buffer_pool_awe_mem_mb, SHOW_LONG }, {"innodb_buffer_pool_size", (char*) &innobase_buffer_pool_size, SHOW_LONGLONG }, {"innodb_checksums", (char*) &innobase_use_checksums, SHOW_MY_BOOL}, {sys_innodb_commit_concurrency.name, (char*) &sys_innodb_commit_concurrency, SHOW_SYS}, From 87a5134b7c1197dc23f3cd37b5e31c50f70fd27e Mon Sep 17 00:00:00 2001 From: "cmiller@zippy.cornsilk.net" <> Date: Mon, 6 Nov 2006 17:13:19 -0500 Subject: [PATCH 07/17] Bug#23411: ... MOD-ing zero returns strange result The Item_func_mod objects never had maybe_null set, so users had no reason to expect that they can be NULL, and may therefore deduce wrong results. Now, set maybe_null. --- BitKeeper/etc/collapsed | 2 + mysql-test/r/func_test.result | 75 +++++++++++++++++++++++++++++++++++ mysql-test/t/func_test.test | 32 +++++++++++++++ sql/item_func.cc | 3 +- 4 files changed, 111 insertions(+), 1 deletion(-) diff --git a/BitKeeper/etc/collapsed b/BitKeeper/etc/collapsed index 60be7fa5dc6..37c2793cc12 100644 --- a/BitKeeper/etc/collapsed +++ b/BitKeeper/etc/collapsed @@ -1 +1,3 @@ 452a92d0-31-8wSzSfZi165fcGcXPA +454a7ef8gdvE_ddMlJyghvOAkKPNOQ +454f8960jsVT_kMKJtZ9OCgXoba0xQ diff --git a/mysql-test/r/func_test.result b/mysql-test/r/func_test.result index 8a28312b348..39ec94bc3aa 100644 --- a/mysql-test/r/func_test.result +++ b/mysql-test/r/func_test.result @@ -183,3 +183,78 @@ select 5.1 mod 3, 5.1 mod -3, -5.1 mod 3, -5.1 mod -3; select 5 mod 3, 5 mod -3, -5 mod 3, -5 mod -3; 5 mod 3 5 mod -3 -5 mod 3 -5 mod -3 2 2 -2 -2 +select (12%0) <=> null as '1'; +1 +1 +select (12%0) is null as '1'; +1 +1 +select 12%0 as 'NULL'; +NULL +NULL +select 12%2 as '0'; +0 +0 +select 12%NULL as 'NULL'; +NULL +NULL +select 12 % null as 'NULL'; +NULL +NULL +select null % 12 as 'NULL'; +NULL +NULL +select null % 0 as 'NULL'; +NULL +NULL +select 0 % null as 'NULL'; +NULL +NULL +select null % null as 'NULL'; +NULL +NULL +select (12 mod 0) <=> null as '1'; +1 +1 +select (12 mod 0) is null as '1'; +1 +1 +select 12 mod 0 as 'NULL'; +NULL +NULL +select 12 mod 2 as '0'; +0 +0 +select 12 mod null as 'NULL'; +NULL +NULL +select null mod 12 as 'NULL'; +NULL +NULL +select null mod 0 as 'NULL'; +NULL +NULL +select 0 mod null as 'NULL'; +NULL +NULL +select null mod null as 'NULL'; +NULL +NULL +select mod(12.0, 0) as 'NULL'; +NULL +NULL +select mod(12, 0.0) as 'NULL'; +NULL +NULL +select mod(12, NULL) as 'NULL'; +NULL +NULL +select mod(12.0, NULL) as 'NULL'; +NULL +NULL +select mod(NULL, 2) as 'NULL'; +NULL +NULL +select mod(NULL, 2.0) as 'NULL'; +NULL +NULL diff --git a/mysql-test/t/func_test.test b/mysql-test/t/func_test.test index 2ad64b6c5a6..99519b54ca6 100644 --- a/mysql-test/t/func_test.test +++ b/mysql-test/t/func_test.test @@ -108,4 +108,36 @@ select 5.1 mod 3, 5.1 mod -3, -5.1 mod 3, -5.1 mod -3; select 5 mod 3, 5 mod -3, -5 mod 3, -5 mod -3; +# +# Bug#23411: The "%" (MOD) operator is not documented; MOD-ing zero returns strange result +# Manual: "Division by zero produces a NULL result" +# +select (12%0) <=> null as '1'; +select (12%0) is null as '1'; +select 12%0 as 'NULL'; +select 12%2 as '0'; +select 12%NULL as 'NULL'; +select 12 % null as 'NULL'; +select null % 12 as 'NULL'; +select null % 0 as 'NULL'; +select 0 % null as 'NULL'; +select null % null as 'NULL'; + +select (12 mod 0) <=> null as '1'; +select (12 mod 0) is null as '1'; +select 12 mod 0 as 'NULL'; +select 12 mod 2 as '0'; +select 12 mod null as 'NULL'; +select null mod 12 as 'NULL'; +select null mod 0 as 'NULL'; +select 0 mod null as 'NULL'; +select null mod null as 'NULL'; + +select mod(12.0, 0) as 'NULL'; +select mod(12, 0.0) as 'NULL'; +select mod(12, NULL) as 'NULL'; +select mod(12.0, NULL) as 'NULL'; +select mod(NULL, 2) as 'NULL'; +select mod(NULL, 2.0) as 'NULL'; + # End of 4.1 tests diff --git a/sql/item_func.cc b/sql/item_func.cc index 1af49179aee..117ae19137b 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -96,7 +96,7 @@ Item_func::Item_func(THD *thd, Item_func *item) /* - Resolve references to table column for a function and it's argument + Resolve references to table column for a function and its argument SYNOPSIS: fix_fields() @@ -707,6 +707,7 @@ longlong Item_func_mod::val_int() void Item_func_mod::fix_length_and_dec() { Item_num_op::fix_length_and_dec(); + maybe_null= 1; } From 19cb3d3bf744b2ec1af2eaddfe91ba1c96dc0bd6 Mon Sep 17 00:00:00 2001 From: "cmiller@zippy.cornsilk.net" <> Date: Mon, 6 Nov 2006 20:41:18 -0500 Subject: [PATCH 08/17] Fix after merge. --- sql/item_func.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sql/item_func.h b/sql/item_func.h index 31adc033034..f887ba6a7cd 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -430,6 +430,7 @@ public: my_decimal *decimal_op(my_decimal *); const char *func_name() const { return "%"; } void result_precision(); + void fix_length_and_dec(); }; From df27c5fa6baa756621bc094f0ac87d53d08d8d86 Mon Sep 17 00:00:00 2001 From: "cmiller@zippy.cornsilk.net" <> Date: Mon, 6 Nov 2006 23:02:40 -0500 Subject: [PATCH 09/17] Merge fix. --- mysql-test/r/func_test.result | 1 + 1 file changed, 1 insertion(+) diff --git a/mysql-test/r/func_test.result b/mysql-test/r/func_test.result index f3e618ffb4b..43832bdbccc 100644 --- a/mysql-test/r/func_test.result +++ b/mysql-test/r/func_test.result @@ -256,6 +256,7 @@ NULL NULL select mod(NULL, 2.0) as 'NULL'; NULL +NULL create table t1 (a int, b int); insert into t1 values (1,2), (2,3), (3,4), (4,5); select * from t1 where a not between 1 and 2; From 9d13ee4c0432d08486e2253180c599604f09bcc5 Mon Sep 17 00:00:00 2001 From: "msvensson@neptunus.(none)" <> Date: Tue, 7 Nov 2006 11:07:27 +0100 Subject: [PATCH 10/17] Make --mem settable with environment variable MTR_MEM and make it possible to pass the directory to use. I.e --mem= --- include/abi_check | 0 include/abi_check.ic | 914 +++++++++++++++++++++++++++++++++++ mysql-test/mysql-test-run.pl | 10 +- 3 files changed, 919 insertions(+), 5 deletions(-) create mode 100644 include/abi_check create mode 100644 include/abi_check.ic diff --git a/include/abi_check b/include/abi_check new file mode 100644 index 00000000000..e69de29bb2d diff --git a/include/abi_check.ic b/include/abi_check.ic new file mode 100644 index 00000000000..30ef44a1ccb --- /dev/null +++ b/include/abi_check.ic @@ -0,0 +1,914 @@ +struct rand_struct; +struct st_list; +struct st_mem_root; +struct st_mysql; +struct st_mysql_bind; +struct st_mysql_data; +struct st_mysql_field; +struct st_mysql_manager; +struct st_mysql_methods; +struct st_mysql_options; +struct st_mysql_parameters; +struct st_mysql_res; +struct st_mysql_rows; +struct st_mysql_stmt; +struct st_mysql_time; +struct st_net; +struct st_typelib; +struct st_udf_args; +struct st_udf_init; +struct st_used_mem; +enum Item_result; +enum enum_field_types; +enum enum_mysql_set_option; +enum enum_mysql_stmt_state; +enum enum_mysql_timestamp_type; +enum enum_server_command; +enum enum_stmt_attr_type; +enum mysql_enum_shutdown_level; +enum mysql_option; +enum mysql_protocol_type; +enum mysql_rpl_type; +enum mysql_status; +# 131 "mysql.h" +typedef struct st_mysql_rows MYSQL_ROWS; +# 24 "my_list.h" +typedef struct st_list LIST; +# 232 "mysql.h" +typedef struct st_mysql MYSQL; +# 571 "mysql.h" +typedef struct st_mysql_bind MYSQL_BIND; +# 93 "mysql.h" +typedef struct st_mysql_field MYSQL_FIELD; +# 117 "mysql.h" +typedef unsigned int MYSQL_FIELD_OFFSET; +# 323 "mysql.h" +typedef struct st_mysql_manager MYSQL_MANAGER; +# 337 "mysql.h" +typedef struct st_mysql_parameters MYSQL_PARAMETERS; +# 292 "mysql.h" +typedef struct st_mysql_res MYSQL_RES; +# 116 "mysql.h" +typedef char * * MYSQL_ROW; +# 137 "mysql.h" +typedef MYSQL_ROWS * MYSQL_ROW_OFFSET; +# 596 "mysql.h" +typedef struct st_mysql_stmt MYSQL_STMT; +# 151 "mysql_com.h" +typedef struct st_net NET; +# 21 "typelib.h" +typedef struct st_typelib TYPELIB; +# 141 "mysql_com.h" +typedef struct st_vio Vio; +# 57 "mysql.h" +typedef char * gptr; +# 29 "my_list.h" +typedef int (* list_walk_action)(void *, void *); +# 48 "mysql.h" +typedef char my_bool; +# 63 "mysql.h" +typedef int my_socket; +# 125 "mysql.h" +typedef unsigned long long int my_ulonglong; +# 35 "my_alloc.h" +typedef struct st_mem_root MEM_ROOT; +# 141 "mysql.h" +typedef struct st_mysql_data MYSQL_DATA; +# 648 "mysql.h" +typedef struct st_mysql_methods MYSQL_METHODS; +# 48 "mysql_time.h" +typedef struct st_mysql_time MYSQL_TIME; +# 315 "mysql_com.h" +typedef struct st_udf_args UDF_ARGS; +# 326 "mysql_com.h" +typedef struct st_udf_init UDF_INIT; +# 27 "my_alloc.h" +typedef struct st_used_mem USED_MEM; +# 302 "mysql_com.h" +struct __attribute__((aligned(__alignof__(unsigned long int)), aligned(__alignof__(double)))) rand_struct + { + unsigned long int seed1; + unsigned long int seed2; + unsigned long int max_value; + double max_value_dbl; + }; +# 24 "my_list.h" +struct __attribute__((aligned(__alignof__(void *)))) st_list + { + struct st_list * prev; + struct st_list * next; + void * data; + }; +# 35 "my_alloc.h" +struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned int)))) st_mem_root + { + USED_MEM * free; + USED_MEM * used; + USED_MEM * pre_alloc; + unsigned int min_malloc; + unsigned int block_size; + unsigned int block_num; + unsigned int first_block_usage; + void (* error_handler)(void); + }; +# 232 "mysql.h" +struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long long int)))) st_mysql + { + NET net; + gptr connector_fd; + char * host; + char * user; + char * passwd; + char * unix_socket; + char * server_version; + char * host_info; + char * info; + char * db; + struct charset_info_st * charset; + MYSQL_FIELD * fields; + MEM_ROOT field_alloc; + my_ulonglong affected_rows; + my_ulonglong insert_id; + my_ulonglong extra_info; + unsigned long int thread_id; + unsigned long int packet_length; + unsigned int port; + unsigned long int client_flag; + unsigned long int server_capabilities; + unsigned int protocol_version; + unsigned int field_count; + unsigned int server_status; + unsigned int server_language; + unsigned int warning_count; + struct st_mysql_options options; + enum mysql_status status; + my_bool free_me; + my_bool reconnect; + char scramble[(20 + 1)]; + my_bool rpl_pivot; + struct st_mysql * master; + struct st_mysql * next_slave; + struct st_mysql * last_used_slave; + struct st_mysql * last_used_con; + LIST * stmts; + struct st_mysql_methods const * methods; + void * thd; + my_bool * unbuffered_fetch_owner; + struct st_mysql_stmt * current_stmt; + }; +# 571 "mysql.h" +struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long int)))) st_mysql_bind + { + unsigned long int * length; + my_bool * is_null; + void * buffer; + enum enum_field_types buffer_type; + unsigned long int buffer_length; + unsigned char * inter_buffer; + unsigned long int offset; + unsigned long int internal_length; + unsigned int param_number; + unsigned int pack_length; + my_bool is_unsigned; + my_bool long_data_used; + my_bool internal_is_null; + void (* store_param_func)(NET * net, struct st_mysql_bind * param); + void (* fetch_result)(struct st_mysql_bind *, unsigned char * * row); + void (* skip_result)(struct st_mysql_bind *, MYSQL_FIELD *, unsigned char * * row); + }; +# 141 "mysql.h" +struct __attribute__((aligned(__alignof__(unsigned long long int)), aligned(__alignof__(void *)))) st_mysql_data + { + my_ulonglong rows; + unsigned int fields; + MYSQL_ROWS * data; + MEM_ROOT alloc; + MYSQL_ROWS * * prev_ptr; + }; +# 93 "mysql.h" +struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long int)))) st_mysql_field + { + char * name; + char * org_name; + char * table; + char * org_table; + char * db; + char * catalog; + char * def; + unsigned long int length; + unsigned long int max_length; + unsigned int name_length; + unsigned int org_name_length; + unsigned int table_length; + unsigned int org_table_length; + unsigned int db_length; + unsigned int catalog_length; + unsigned int def_length; + unsigned int flags; + unsigned int decimals; + unsigned int charsetnr; + enum enum_field_types type; + }; +# 323 "mysql.h" +struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long int)))) st_mysql_manager + { + NET net; + char * host; + char * user; + char * passwd; + unsigned int port; + my_bool free_me; + my_bool eof; + int cmd_status; + int last_errno; + char * net_buf; + char * net_buf_pos; + char * net_data_end; + int net_buf_size; + char last_error[256]; + }; +# 648 "mysql.h" +struct __attribute__((aligned(__alignof__(void *)))) st_mysql_methods + { + my_bool (* read_query_result)(MYSQL * mysql); + my_bool (* advanced_command)(MYSQL * mysql, enum enum_server_command, char const * header, unsigned long int, char const * arg, unsigned long int, my_bool, MYSQL_STMT * stmt); + MYSQL_DATA * (* read_rows)(MYSQL * mysql, MYSQL_FIELD * mysql_fields, unsigned int); + MYSQL_RES * (* use_result)(MYSQL * mysql); + void (* fetch_lengths)(unsigned long int * to, MYSQL_ROW, unsigned int); + void (* flush_use_result)(MYSQL * mysql); + MYSQL_FIELD * (* list_fields)(MYSQL * mysql); + my_bool (* read_prepare_result)(MYSQL * mysql, MYSQL_STMT * stmt); + int (* stmt_execute)(MYSQL_STMT * stmt); + int (* read_binary_rows)(MYSQL_STMT * stmt); + int (* unbuffered_fetch)(MYSQL * mysql, char * * row); + void (* free_embedded_thd)(MYSQL * mysql); + char const * (* read_statistics)(MYSQL * mysql); + my_bool (* next_result)(MYSQL * mysql); + int (* read_change_user_result)(MYSQL * mysql, char * buff, char const * passwd); + }; +# 162 "mysql.h" +struct __attribute__((aligned(__alignof__(unsigned long int)), aligned(__alignof__(void *)))) st_mysql_options + { + unsigned int connect_timeout; + unsigned int read_timeout; + unsigned int write_timeout; + unsigned int port; + unsigned int protocol; + unsigned long int client_flag; + char * host; + char * user; + char * password; + char * unix_socket; + char * db; + struct st_dynamic_array * init_commands; + char * my_cnf_file; + char * my_cnf_group; + char * charset_dir; + char * charset_name; + char * ssl_key; + char * ssl_cert; + char * ssl_ca; + char * ssl_capath; + char * ssl_cipher; + char * shared_memory_base_name; + unsigned long int max_allowed_packet; + my_bool use_ssl; + my_bool compress; + my_bool named_pipe; + my_bool rpl_probe; + my_bool rpl_parse; + my_bool no_master_reads; + my_bool separate_thread; + enum mysql_option methods_to_use; + char * client_ip; + my_bool secure_auth; + int (* local_infile_init)(void * *, char const *, void *); + int (* local_infile_read)(void *, char *, unsigned int); + void (* local_infile_end)(void); + int (* local_infile_error)(void *, char *, unsigned int); + void * local_infile_userdata; + }; +# 337 "mysql.h" +struct __attribute__((aligned(__alignof__(void *)))) st_mysql_parameters + { + unsigned long int * p_max_allowed_packet; + unsigned long int * p_net_buffer_length; + }; +# 292 "mysql.h" +struct __attribute__((aligned(__alignof__(unsigned long long int)), aligned(__alignof__(void *)))) st_mysql_res + { + my_ulonglong row_count; + MYSQL_FIELD * fields; + MYSQL_DATA * data; + MYSQL_ROWS * data_cursor; + unsigned long int * lengths; + MYSQL * handle; + MEM_ROOT field_alloc; + unsigned int field_count; + unsigned int current_field; + MYSQL_ROW row; + MYSQL_ROW current_row; + my_bool eof; + my_bool unbuffered_fetch_cancelled; + struct st_mysql_methods const * methods; + }; +# 131 "mysql.h" +struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long int)))) st_mysql_rows + { + struct st_mysql_rows * next; + MYSQL_ROW data; + unsigned long int length; + }; +# 596 "mysql.h" +struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long long int)))) st_mysql_stmt + { + MEM_ROOT mem_root; + LIST list; + MYSQL * mysql; + MYSQL_BIND * params; + MYSQL_BIND * bind; + MYSQL_FIELD * fields; + MYSQL_DATA result; + MYSQL_ROWS * data_cursor; + my_ulonglong affected_rows; + my_ulonglong insert_id; + int (* read_row_func)(struct st_mysql_stmt * stmt, unsigned char * * row); + unsigned long int stmt_id; + unsigned int last_errno; + unsigned int param_count; + unsigned int field_count; + enum enum_mysql_stmt_state state; + char last_error[512]; + char sqlstate[(5 + 1)]; + my_bool send_types_to_server; + my_bool bind_param_done; + my_bool bind_result_done; + my_bool unbuffered_fetch_cancelled; + my_bool update_max_length; + }; +# 48 "mysql_time.h" +struct __attribute__((aligned(__alignof__(unsigned long int)))) st_mysql_time + { + unsigned int year; + unsigned int month; + unsigned int day; + unsigned int hour; + unsigned int minute; + unsigned int second; + unsigned long int second_part; + my_bool neg; + enum enum_mysql_timestamp_type time_type; + }; +# 151 "mysql_com.h" +struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long int)))) st_net + { + Vio * vio; + unsigned char * buff; + unsigned char * buff_end; + unsigned char * write_pos; + unsigned char * read_pos; + my_socket fd; + unsigned long int max_packet; + unsigned long int max_packet_size; + unsigned int pkt_nr; + unsigned int compress_pkt_nr; + unsigned int write_timeout; + unsigned int read_timeout; + unsigned int retry_count; + int fcntl; + my_bool compress; + unsigned long int remain_in_buf; + unsigned long int length; + unsigned long int buf_length; + unsigned long int where_b; + unsigned int * return_status; + unsigned char reading_or_writing; + char save_char; + my_bool no_send_ok; + char last_error[512]; + char sqlstate[(5 + 1)]; + unsigned int last_errno; + unsigned char error; + gptr query_cache_query; + my_bool report_error; + my_bool return_errno; + }; +# 21 "typelib.h" +struct __attribute__((aligned(__alignof__(unsigned int)), aligned(__alignof__(void *)))) st_typelib + { + unsigned int count; + char const * name; + char const * * type_names; + unsigned int * type_lengths; + }; +# 315 "mysql_com.h" +struct __attribute__((aligned(__alignof__(unsigned int)), aligned(__alignof__(void *)))) st_udf_args + { + unsigned int arg_count; + enum Item_result * arg_type; + char * * args; + unsigned long int * lengths; + char * maybe_null; + }; +# 326 "mysql_com.h" +struct __attribute__((aligned(__alignof__(unsigned long int)), aligned(__alignof__(void *)))) st_udf_init + { + my_bool maybe_null; + unsigned int decimals; + unsigned long int max_length; + char * ptr; + my_bool const_item; + }; +# 27 "my_alloc.h" +struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned int)))) st_used_mem + { + struct st_used_mem * next; + unsigned int left; + unsigned int size; + }; +# 313 "mysql_com.h" +enum Item_result + { + STRING_RESULT = 0, + REAL_RESULT = 1, + INT_RESULT = 2, + ROW_RESULT = 3, + }; +# 186 "mysql_com.h" +enum enum_field_types + { + MYSQL_TYPE_DECIMAL = 0, + MYSQL_TYPE_TINY = 1, + MYSQL_TYPE_SHORT = 2, + MYSQL_TYPE_LONG = 3, + MYSQL_TYPE_FLOAT = 4, + MYSQL_TYPE_DOUBLE = 5, + MYSQL_TYPE_NULL = 6, + MYSQL_TYPE_TIMESTAMP = 7, + MYSQL_TYPE_LONGLONG = 8, + MYSQL_TYPE_INT24 = 9, + MYSQL_TYPE_DATE = 10, + MYSQL_TYPE_TIME = 11, + MYSQL_TYPE_DATETIME = 12, + MYSQL_TYPE_YEAR = 13, + MYSQL_TYPE_NEWDATE = 14, + MYSQL_TYPE_ENUM = 247, + MYSQL_TYPE_SET = 248, + MYSQL_TYPE_TINY_BLOB = 249, + MYSQL_TYPE_MEDIUM_BLOB = 250, + MYSQL_TYPE_LONG_BLOB = 251, + MYSQL_TYPE_BLOB = 252, + MYSQL_TYPE_VAR_STRING = 253, + MYSQL_TYPE_STRING = 254, + MYSQL_TYPE_GEOMETRY = 255, + }; +# 269 "mysql_com.h" +enum enum_mysql_set_option + { + MYSQL_OPTION_MULTI_STATEMENTS_ON = 0, + MYSQL_OPTION_MULTI_STATEMENTS_OFF = 1, + }; +# 563 "mysql.h" +enum enum_mysql_stmt_state + { + MYSQL_STMT_INIT_DONE = 1, + MYSQL_STMT_PREPARE_DONE = 2, + MYSQL_STMT_EXECUTE_DONE = 3, + MYSQL_STMT_FETCH_DONE = 4, + }; +# 29 "mysql_time.h" +enum enum_mysql_timestamp_type + { + MYSQL_TIMESTAMP_NONE = -(2), + MYSQL_TIMESTAMP_ERROR = -(1), + MYSQL_TIMESTAMP_DATE = 0, + MYSQL_TIMESTAMP_DATETIME = 1, + MYSQL_TIMESTAMP_TIME = 2, + }; +# 39 "mysql_com.h" +enum enum_server_command + { + COM_SLEEP = 0, + COM_QUIT = 1, + COM_INIT_DB = 2, + COM_QUERY = 3, + COM_FIELD_LIST = 4, + COM_CREATE_DB = 5, + COM_DROP_DB = 6, + COM_REFRESH = 7, + COM_SHUTDOWN = 8, + COM_STATISTICS = 9, + COM_PROCESS_INFO = 10, + COM_CONNECT = 11, + COM_PROCESS_KILL = 12, + COM_DEBUG = 13, + COM_PING = 14, + COM_TIME = 15, + COM_DELAYED_INSERT = 16, + COM_CHANGE_USER = 17, + COM_BINLOG_DUMP = 18, + COM_TABLE_DUMP = 19, + COM_CONNECT_OUT = 20, + COM_REGISTER_SLAVE = 21, + COM_PREPARE = 22, + COM_EXECUTE = 23, + COM_LONG_DATA = 24, + COM_CLOSE_STMT = 25, + COM_RESET_STMT = 26, + COM_SET_OPTION = 27, + COM_END = 28, + }; +# 635 "mysql.h" +enum enum_stmt_attr_type + { + STMT_ATTR_UPDATE_MAX_LENGTH = 0, + }; +# 244 "mysql_com.h" +enum mysql_enum_shutdown_level + { + SHUTDOWN_DEFAULT = 0, + SHUTDOWN_WAIT_CONNECTIONS = (unsigned char)((1 << 0)), + SHUTDOWN_WAIT_TRANSACTIONS = (unsigned char)((1 << 1)), + SHUTDOWN_WAIT_UPDATES = (unsigned char)((1 << 3)), + SHUTDOWN_WAIT_ALL_BUFFERS = ((unsigned char)((1 << 3)) << 1), + SHUTDOWN_WAIT_CRITICAL_BUFFERS = (((unsigned char)((1 << 3)) << 1) + 1), + KILL_CONNECTION = 255, + }; +# 151 "mysql.h" +enum mysql_option + { + MYSQL_OPT_CONNECT_TIMEOUT = 0, + MYSQL_OPT_COMPRESS = 1, + MYSQL_OPT_NAMED_PIPE = 2, + MYSQL_INIT_COMMAND = 3, + MYSQL_READ_DEFAULT_FILE = 4, + MYSQL_READ_DEFAULT_GROUP = 5, + MYSQL_SET_CHARSET_DIR = 6, + MYSQL_SET_CHARSET_NAME = 7, + MYSQL_OPT_LOCAL_INFILE = 8, + MYSQL_OPT_PROTOCOL = 9, + MYSQL_SHARED_MEMORY_BASE_NAME = 10, + MYSQL_OPT_READ_TIMEOUT = 11, + MYSQL_OPT_WRITE_TIMEOUT = 12, + MYSQL_OPT_USE_RESULT = 13, + MYSQL_OPT_USE_REMOTE_CONNECTION = 14, + MYSQL_OPT_USE_EMBEDDED_CONNECTION = 15, + MYSQL_OPT_GUESS_CONNECTION = 16, + MYSQL_SET_CLIENT_IP = 17, + MYSQL_SECURE_AUTH = 18, + }; +# 214 "mysql.h" +enum mysql_protocol_type + { + MYSQL_PROTOCOL_DEFAULT = 0, + MYSQL_PROTOCOL_TCP = 1, + MYSQL_PROTOCOL_SOCKET = 2, + MYSQL_PROTOCOL_PIPE = 3, + MYSQL_PROTOCOL_MEMORY = 4, + }; +# 224 "mysql.h" +enum mysql_rpl_type + { + MYSQL_RPL_MASTER = 0, + MYSQL_RPL_SLAVE = 1, + MYSQL_RPL_ADMIN = 2, + }; +# 209 "mysql.h" +enum mysql_status + { + MYSQL_STATUS_READY = 0, + MYSQL_STATUS_GET_RESULT = 1, + MYSQL_STATUS_USE_RESULT = 2, + }; +# 365 "mysql_com.h" +extern my_bool check_scramble(char const * reply, char const * message, unsigned char const * hash_stage2); +# 358 "mysql_com.h" +extern my_bool check_scramble_323(char const *, char const * message, unsigned long int * salt); +# 353 "mysql_com.h" +extern void create_random_string(char * to, unsigned int, struct rand_struct * rand_st); +# 28 "typelib.h" +extern int find_type(char * x, TYPELIB * typelib, unsigned int); +# 367 "mysql_com.h" +extern void get_salt_from_password(unsigned char * res, char const * password); +# 360 "mysql_com.h" +extern void get_salt_from_password_323(unsigned long int * res, char const * password); +# 372 "mysql_com.h" +extern char * get_tty_password(char * opt_message); +# 30 "typelib.h" +extern char const * get_type(TYPELIB * typelib, unsigned int); +# 355 "mysql_com.h" +extern void hash_password(unsigned long int * to, char const * password, unsigned int); +# 31 "my_list.h" +extern LIST * list_add(LIST * root, LIST * element); +# 33 "my_list.h" +extern LIST * list_cons(void * data, LIST * root); +# 32 "my_list.h" +extern LIST * list_delete(LIST * root, LIST * element); +# 35 "my_list.h" +extern void list_free(LIST * root, unsigned int); +# 36 "my_list.h" +extern unsigned int list_length(LIST *); +# 34 "my_list.h" +extern LIST * list_reverse(LIST * root); +# 37 "my_list.h" +extern int list_walk(LIST *, list_walk_action, gptr); +# 378 "mysql_com.h" +extern int load_defaults(char const * conf_file, char const * * groups, int * argc, char * * * argv); +# 368 "mysql_com.h" +extern void make_password_from_salt(char * to, unsigned char const * hash_stage2); +# 361 "mysql_com.h" +extern void make_password_from_salt_323(char * to, unsigned long int const * salt); +# 363 "mysql_com.h" +extern void make_scrambled_password(char * to, char const * password); +# 356 "mysql_com.h" +extern void make_scrambled_password_323(char * to, char const * password); +# 29 "typelib.h" +extern void make_type(char * to, unsigned int, TYPELIB * typelib); +# 299 "mysql_com.h" +extern int my_connect(my_socket, struct sockaddr const * name, unsigned int, unsigned int); +# 377 "mysql_com.h" +extern my_bool my_init(void); +# 281 "mysql_com.h" +extern my_bool my_net_init(NET * net, Vio * vio); +# 282 "mysql_com.h" +extern void my_net_local_init(NET * net); +# 292 "mysql_com.h" +extern unsigned long int my_net_read(NET * net); +# 287 "mysql_com.h" +extern my_bool my_net_write(NET * net, char const * packet, unsigned long int); +# 352 "mysql_com.h" +extern double my_rnd(struct rand_struct *); +# 381 "mysql_com.h" +extern void my_thread_end(void); +# 380 "mysql_com.h" +extern my_bool my_thread_init(void); +# 539 "mysql.h" +extern void myodbc_remove_escape(MYSQL * mysql, char * name); +# 481 "mysql.h" +extern int mysql_add_slave(MYSQL * mysql, char const * host, unsigned int, char const * user, char const * passwd); +# 393 "mysql.h" +extern my_ulonglong mysql_affected_rows(MYSQL * mysql); +# 720 "mysql.h" +extern my_bool mysql_autocommit(MYSQL * mysql, my_bool); +# 408 "mysql.h" +extern my_bool mysql_change_user(MYSQL * mysql, char const * user, char const * passwd, char const * db); +# 401 "mysql.h" +extern char const * mysql_character_set_name(MYSQL * mysql); +# 723 "mysql.h" +extern void mysql_close(MYSQL * sock); +# 718 "mysql.h" +extern my_bool mysql_commit(MYSQL * mysql); +# 510 "mysql.h" +extern void mysql_data_seek(MYSQL_RES * result, my_ulonglong); +# 528 "mysql.h" +extern void mysql_debug(char const * debug); +# 467 "mysql.h" +extern void mysql_disable_reads_from_master(MYSQL * mysql); +# 461 "mysql.h" +extern void mysql_disable_rpl_parse(MYSQL * mysql); +# 489 "mysql.h" +extern int mysql_dump_debug_info(MYSQL * mysql); +# 541 "mysql.h" +extern my_bool mysql_embedded(void); +# 466 "mysql.h" +extern void mysql_enable_reads_from_master(MYSQL * mysql); +# 460 "mysql.h" +extern void mysql_enable_rpl_parse(MYSQL * mysql); +# 385 "mysql.h" +extern my_bool mysql_eof(MYSQL_RES * res); +# 395 "mysql.h" +extern unsigned int mysql_errno(MYSQL * mysql); +# 373 "mysql_com.h" +extern char const * mysql_errno_to_sqlstate(unsigned int); +# 396 "mysql.h" +extern char const * mysql_error(MYSQL * mysql); +# 521 "mysql.h" +extern unsigned long int mysql_escape_string(char * to, char const * from, unsigned long int); +# 518 "mysql.h" +extern MYSQL_FIELD * mysql_fetch_field(MYSQL_RES * result); +# 386 "mysql.h" +extern MYSQL_FIELD * mysql_fetch_field_direct(MYSQL_RES * res, unsigned int); +# 388 "mysql.h" +extern MYSQL_FIELD * mysql_fetch_fields(MYSQL_RES * res); +# 517 "mysql.h" +extern unsigned long int * mysql_fetch_lengths(MYSQL_RES * result); +# 516 "mysql.h" +extern MYSQL_ROW mysql_fetch_row(MYSQL_RES * result); +# 392 "mysql.h" +extern unsigned int mysql_field_count(MYSQL * mysql); +# 514 "mysql.h" +extern MYSQL_FIELD_OFFSET mysql_field_seek(MYSQL_RES * result, MYSQL_FIELD_OFFSET); +# 390 "mysql.h" +extern MYSQL_FIELD_OFFSET mysql_field_tell(MYSQL_RES * res); +# 509 "mysql.h" +extern void mysql_free_result(MYSQL_RES * result); +# 499 "mysql.h" +extern char const * mysql_get_client_info(void); +# 500 "mysql.h" +extern unsigned long int mysql_get_client_version(void); +# 501 "mysql.h" +extern char const * mysql_get_host_info(MYSQL * mysql); +# 367 "mysql.h" +extern MYSQL_PARAMETERS * mysql_get_parameters(void); +# 503 "mysql.h" +extern unsigned int mysql_get_proto_info(MYSQL * mysql); +# 498 "mysql.h" +extern char const * mysql_get_server_info(MYSQL * mysql); +# 502 "mysql.h" +extern unsigned long int mysql_get_server_version(MYSQL * mysql); +# 523 "mysql.h" +extern unsigned long int mysql_hex_string(char * to, char const * from, unsigned long int); +# 399 "mysql.h" +extern char const * mysql_info(MYSQL * mysql); +# 404 "mysql.h" +extern MYSQL * mysql_init(MYSQL * mysql); +# 394 "mysql.h" +extern my_ulonglong mysql_insert_id(MYSQL * mysql); +# 492 "mysql.h" +extern int mysql_kill(MYSQL * mysql, unsigned long int); +# 504 "mysql.h" +extern MYSQL_RES * mysql_list_dbs(MYSQL * mysql, char const * wild); +# 519 "mysql.h" +extern MYSQL_RES * mysql_list_fields(MYSQL * mysql, char const * table, char const * wild); +# 506 "mysql.h" +extern MYSQL_RES * mysql_list_processes(MYSQL * mysql); +# 505 "mysql.h" +extern MYSQL_RES * mysql_list_tables(MYSQL * mysql, char const * wild); +# 548 "mysql.h" +extern void mysql_manager_close(MYSQL_MANAGER * con); +# 549 "mysql.h" +extern int mysql_manager_command(MYSQL_MANAGER * con, char const * cmd, int); +# 543 "mysql.h" +extern MYSQL_MANAGER * mysql_manager_connect(MYSQL_MANAGER * con, char const * host, char const * user, char const * passwd, unsigned int); +# 551 "mysql.h" +extern int mysql_manager_fetch_line(MYSQL_MANAGER * con, char * res_buf, int); +# 542 "mysql.h" +extern MYSQL_MANAGER * mysql_manager_init(MYSQL_MANAGER * con); +# 427 "mysql.h" +extern my_bool mysql_master_query(MYSQL * mysql, char const * q, unsigned long int); +# 429 "mysql.h" +extern my_bool mysql_master_send_query(MYSQL * mysql, char const * q, unsigned long int); +# 721 "mysql.h" +extern my_bool mysql_more_results(MYSQL * mysql); +# 722 "mysql.h" +extern int mysql_next_result(MYSQL * mysql); +# 384 "mysql.h" +extern unsigned int mysql_num_fields(MYSQL_RES * res); +# 383 "mysql.h" +extern my_ulonglong mysql_num_rows(MYSQL_RES * res); +# 529 "mysql.h" +extern char * mysql_odbc_escape_string(MYSQL * mysql, char * to, unsigned long int, char const * from, unsigned long int, void * param, char * (* extend_buffer)(void *, char * to, unsigned long int * length)); +# 507 "mysql.h" +extern int mysql_options(MYSQL * mysql, enum mysql_option, char const * arg); +# 496 "mysql.h" +extern int mysql_ping(MYSQL * mysql); +# 75 "mysql.h" +extern unsigned int mysql_port; +# 418 "mysql.h" +extern int mysql_query(MYSQL * mysql, char const * q); +# 554 "mysql.h" +extern my_bool mysql_read_query_result(MYSQL * mysql); +# 469 "mysql.h" +extern my_bool mysql_reads_from_master_enabled(MYSQL * mysql); +# 410 "mysql.h" +extern MYSQL * mysql_real_connect(MYSQL * mysql, char const * host, char const * user, char const * passwd, char const * db, unsigned int, char const * unix_socket, unsigned long int); +# 525 "mysql.h" +extern unsigned long int mysql_real_escape_string(MYSQL * mysql, char * to, char const * from, unsigned long int); +# 421 "mysql.h" +extern int mysql_real_query(MYSQL * mysql, char const * q, unsigned long int); +# 490 "mysql.h" +extern int mysql_refresh(MYSQL * mysql, unsigned int); +# 719 "mysql.h" +extern my_bool mysql_rollback(MYSQL * mysql); +# 512 "mysql.h" +extern MYSQL_ROW_OFFSET mysql_row_seek(MYSQL_RES * result, MYSQL_ROW_OFFSET); +# 389 "mysql.h" +extern MYSQL_ROW_OFFSET mysql_row_tell(MYSQL_RES * res); +# 463 "mysql.h" +extern int mysql_rpl_parse_enabled(MYSQL * mysql); +# 474 "mysql.h" +extern my_bool mysql_rpl_probe(MYSQL * mysql); +# 471 "mysql.h" +extern enum mysql_rpl_type mysql_rpl_query_type(char const * q, int); +# 417 "mysql.h" +extern int mysql_select_db(MYSQL * mysql, char const * db); +# 419 "mysql.h" +extern int mysql_send_query(MYSQL * mysql, char const * q, unsigned long int); +# 354 "mysql.h" +extern void mysql_server_end(void); +# 353 "mysql.h" +extern int mysql_server_init(int, char * * argv, char * * groups); +# 402 "mysql.h" +extern int mysql_set_character_set(MYSQL * mysql, char const * csname); +# 452 "mysql.h" +extern void mysql_set_local_infile_default(MYSQL * mysql); +# 441 "mysql.h" +extern void mysql_set_local_infile_handler(MYSQL * mysql, int (* local_infile_init)(void * *, char const *, void *), int (* local_infile_read)(void *, char *, unsigned int), void (* local_infile_end)(void), int (* local_infile_error)(void *, char *, unsigned int), void *); +# 477 "mysql.h" +extern int mysql_set_master(MYSQL * mysql, char const * host, unsigned int, char const * user, char const * passwd); +# 493 "mysql.h" +extern int mysql_set_server_option(MYSQL * mysql, enum enum_mysql_set_option); +# 486 "mysql.h" +extern int mysql_shutdown(MYSQL * mysql, enum mysql_enum_shutdown_level); +# 432 "mysql.h" +extern my_bool mysql_slave_query(MYSQL * mysql, char const * q, unsigned long int); +# 434 "mysql.h" +extern my_bool mysql_slave_send_query(MYSQL * mysql, char const * q, unsigned long int); +# 397 "mysql.h" +extern char const * mysql_sqlstate(MYSQL * mysql); +# 405 "mysql.h" +extern my_bool mysql_ssl_set(MYSQL * mysql, char const * key, char const * cert, char const * ca, char const * capath, char const * cipher); +# 497 "mysql.h" +extern char const * mysql_stat(MYSQL * mysql); +# 714 "mysql.h" +extern my_ulonglong mysql_stmt_affected_rows(MYSQL_STMT * stmt); +# 692 "mysql.h" +extern my_bool mysql_stmt_attr_get(MYSQL_STMT * stmt, enum enum_stmt_attr_type, void * attr); +# 689 "mysql.h" +extern my_bool mysql_stmt_attr_set(MYSQL_STMT * stmt, enum enum_stmt_attr_type, void const * attr); +# 695 "mysql.h" +extern my_bool mysql_stmt_bind_param(MYSQL_STMT * stmt, MYSQL_BIND * bnd); +# 696 "mysql.h" +extern my_bool mysql_stmt_bind_result(MYSQL_STMT * stmt, MYSQL_BIND * bnd); +# 697 "mysql.h" +extern my_bool mysql_stmt_close(MYSQL_STMT * stmt); +# 712 "mysql.h" +extern void mysql_stmt_data_seek(MYSQL_STMT * stmt, my_ulonglong); +# 706 "mysql.h" +extern unsigned int mysql_stmt_errno(MYSQL_STMT * stmt); +# 707 "mysql.h" +extern char const * mysql_stmt_error(MYSQL_STMT * stmt); +# 682 "mysql.h" +extern int mysql_stmt_execute(MYSQL_STMT * stmt); +# 683 "mysql.h" +extern int mysql_stmt_fetch(MYSQL_STMT * stmt); +# 684 "mysql.h" +extern int mysql_stmt_fetch_column(MYSQL_STMT * stmt, MYSQL_BIND * bind, unsigned int, unsigned long int); +# 716 "mysql.h" +extern unsigned int mysql_stmt_field_count(MYSQL_STMT * stmt); +# 699 "mysql.h" +extern my_bool mysql_stmt_free_result(MYSQL_STMT * stmt); +# 679 "mysql.h" +extern MYSQL_STMT * mysql_stmt_init(MYSQL * mysql); +# 715 "mysql.h" +extern my_ulonglong mysql_stmt_insert_id(MYSQL_STMT * stmt); +# 713 "mysql.h" +extern my_ulonglong mysql_stmt_num_rows(MYSQL_STMT * stmt); +# 688 "mysql.h" +extern unsigned long int mysql_stmt_param_count(MYSQL_STMT * stmt); +# 705 "mysql.h" +extern MYSQL_RES * mysql_stmt_param_metadata(MYSQL_STMT * stmt); +# 680 "mysql.h" +extern int mysql_stmt_prepare(MYSQL_STMT * stmt, char const * query, unsigned long int); +# 698 "mysql.h" +extern my_bool mysql_stmt_reset(MYSQL_STMT * stmt); +# 704 "mysql.h" +extern MYSQL_RES * mysql_stmt_result_metadata(MYSQL_STMT * stmt); +# 709 "mysql.h" +extern MYSQL_ROW_OFFSET mysql_stmt_row_seek(MYSQL_STMT * stmt, MYSQL_ROW_OFFSET); +# 711 "mysql.h" +extern MYSQL_ROW_OFFSET mysql_stmt_row_tell(MYSQL_STMT * stmt); +# 700 "mysql.h" +extern my_bool mysql_stmt_send_long_data(MYSQL_STMT * stmt, unsigned int, char const * data, unsigned long int); +# 708 "mysql.h" +extern char const * mysql_stmt_sqlstate(MYSQL_STMT * stmt); +# 687 "mysql.h" +extern int mysql_stmt_store_result(MYSQL_STMT * stmt); +# 423 "mysql.h" +extern MYSQL_RES * mysql_store_result(MYSQL * mysql); +# 376 "mysql.h" +extern void mysql_thread_end(void); +# 400 "mysql.h" +extern unsigned long int mysql_thread_id(MYSQL * mysql); +# 375 "mysql.h" +extern my_bool mysql_thread_init(void); +# 540 "mysql.h" +extern unsigned int mysql_thread_safe(void); +# 76 "mysql.h" +extern char * mysql_unix_port; +# 424 "mysql.h" +extern MYSQL_RES * mysql_use_result(MYSQL * mysql); +# 398 "mysql.h" +extern unsigned int mysql_warning_count(MYSQL * mysql); +# 284 "mysql_com.h" +extern void net_clear(NET * net); +# 283 "mysql_com.h" +extern void net_end(NET * net); +# 286 "mysql_com.h" +extern my_bool net_flush(NET * net); +# 291 "mysql_com.h" +extern int net_real_write(NET * net, char const * packet, unsigned long int); +# 285 "mysql_com.h" +extern my_bool net_realloc(NET * net, unsigned long int); +# 751 "mysql.h" +extern unsigned long int net_safe_read(MYSQL * mysql); +# 288 "mysql_com.h" +extern my_bool net_write_command(NET * net, unsigned char, char const * header, unsigned long int, char const * packet, unsigned long int); +# 350 "mysql_com.h" +extern void randominit(struct rand_struct *, unsigned long int, unsigned long int); +# 364 "mysql_com.h" +extern void scramble(char * to, char const * message, char const * password); +# 357 "mysql_com.h" +extern void scramble_323(char * to, char const * message, char const * password); +# 32 "typelib.h" +extern TYPELIB sql_protocol_typelib; diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index de2498a7246..4a02c4114e2 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -181,7 +181,7 @@ our $opt_fast; our $opt_force; our $opt_reorder= 0; our $opt_enable_disabled; -our $opt_mem; +our $opt_mem= $ENV{'MTR_MEM'}; our $opt_gcov; our $opt_gcov_err; @@ -667,7 +667,7 @@ sub command_line_setup () { 'tmpdir=s' => \$opt_tmpdir, 'vardir=s' => \$opt_vardir, 'benchdir=s' => \$glob_mysql_bench_dir, - 'mem' => \$opt_mem, + 'mem=s' => \$opt_mem, # Misc 'comment=s' => \$opt_comment, @@ -756,7 +756,7 @@ sub command_line_setup () { # Use /dev/shm as the preferred location for vardir and # thus implicitly also tmpdir. Add other locations to list - my @tmpfs_locations= ("/dev/shm"); + my @tmpfs_locations= ($opt_mem, "/dev/shm"); # One could maybe use "mount" to find tmpfs location(s) foreach my $fs (@tmpfs_locations) { @@ -2476,7 +2476,7 @@ sub run_suite () { next; } - mtr_timer_start($glob_timers,"testcase", 60 * $opt_testcase_timeout); + mtr_timer_start($glob_timers,"testcase", $opt_testcase_timeout); run_testcase($tinfo); mtr_timer_stop($glob_timers,"testcase"); } @@ -4629,7 +4629,7 @@ Options to control directories to use tmpfs will speed up tests. mem=DIR Run testsuite in "memory" using tmpfs if available(default: /dev/shm) - + reads from MTR_MEM environment variable Options to control what test suites or cases to run From eea46ce15bcc9ade54c6f70786ecf066a6751e83 Mon Sep 17 00:00:00 2001 From: "msvensson@neptunus.(none)" <> Date: Tue, 7 Nov 2006 12:56:55 +0100 Subject: [PATCH 11/17] Correct faulty commit, the opt_tastcase_timeout value is in minutes, to it need to be multiplied with 60 before ping passed to mtr_timer_start --- mysql-test/mysql-test-run.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 4a02c4114e2..34a24fb71ff 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -2476,7 +2476,7 @@ sub run_suite () { next; } - mtr_timer_start($glob_timers,"testcase", $opt_testcase_timeout); + mtr_timer_start($glob_timers,"testcase", 60 * $opt_testcase_timeout); run_testcase($tinfo); mtr_timer_stop($glob_timers,"testcase"); } From a3602ca86d9cf2a70fc317ee4b88dcb3f346f1d3 Mon Sep 17 00:00:00 2001 From: "msvensson@neptunus.(none)" <> Date: Tue, 7 Nov 2006 13:01:32 +0100 Subject: [PATCH 12/17] Don't allow path to be passed to --mem --- mysql-test/mysql-test-run.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 34a24fb71ff..b6121249116 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -667,7 +667,7 @@ sub command_line_setup () { 'tmpdir=s' => \$opt_tmpdir, 'vardir=s' => \$opt_vardir, 'benchdir=s' => \$glob_mysql_bench_dir, - 'mem=s' => \$opt_mem, + 'mem' => \$opt_mem, # Misc 'comment=s' => \$opt_comment, @@ -4627,9 +4627,9 @@ Options to control directories to use vardir=DIR The directory where files generated from the test run is stored (default: ./var). Specifying a ramdisk or tmpfs will speed up tests. - mem=DIR Run testsuite in "memory" using tmpfs if + mem Run testsuite in "memory" using tmpfs if available(default: /dev/shm) - reads from MTR_MEM environment variable + reads path from MTR_MEM environment variable Options to control what test suites or cases to run From ffa100d2d0e530fda8da89eb85468061b9a9ed53 Mon Sep 17 00:00:00 2001 From: "msvensson@neptunus.(none)" <> Date: Tue, 7 Nov 2006 15:20:24 +0100 Subject: [PATCH 13/17] Bug#23981 memory leaks from yassl code + other - Fix memory leak in vio_VioSSLFD that occurs when one of the calls to SSL_* function fails. As in the "ssl_des" test case where the server is currently not supposed to be able to read the specific cert/key file. - Change error message to be generic as it's called both from server and client code. --- vio/viosslfactories.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c index 9fd18579351..34ce1fefaa9 100644 --- a/vio/viosslfactories.c +++ b/vio/viosslfactories.c @@ -86,8 +86,7 @@ vio_set_cert_stuff(SSL_CTX *ctx, const char *cert_file, const char *key_file) if (SSL_CTX_use_certificate_file(ctx, cert_file, SSL_FILETYPE_PEM) <= 0) { DBUG_PRINT("error",("unable to get certificate from '%s'\n", cert_file)); - /* FIX stderr */ - fprintf(stderr,"Error when connection to server using SSL:"); + fprintf(stderr,"SSL error: "); ERR_print_errors_fp(stderr); fprintf(stderr,"Unable to get certificate from '%s'\n", cert_file); fflush(stderr); @@ -100,8 +99,7 @@ vio_set_cert_stuff(SSL_CTX *ctx, const char *cert_file, const char *key_file) if (SSL_CTX_use_PrivateKey_file(ctx, key_file, SSL_FILETYPE_PEM) <= 0) { DBUG_PRINT("error", ("unable to get private key from '%s'\n", key_file)); - /* FIX stderr */ - fprintf(stderr,"Error when connection to server using SSL:"); + fprintf(stderr,"SSL error: "); ERR_print_errors_fp(stderr); fprintf(stderr,"Unable to get private key from '%s'\n", key_file); fflush(stderr); @@ -252,6 +250,7 @@ new_VioSSLFd(const char *key_file, const char *cert_file, { DBUG_PRINT("error", ("failed to set ciphers to use")); report_errors(); + SSL_CTX_free(ssl_fd->ssl_context); my_free((void*)ssl_fd,MYF(0)); DBUG_RETURN(0); } @@ -264,6 +263,7 @@ new_VioSSLFd(const char *key_file, const char *cert_file, { DBUG_PRINT("error", ("SSL_CTX_set_default_verify_paths failed")); report_errors(); + SSL_CTX_free(ssl_fd->ssl_context); my_free((void*)ssl_fd,MYF(0)); DBUG_RETURN(0); } @@ -273,6 +273,7 @@ new_VioSSLFd(const char *key_file, const char *cert_file, { DBUG_PRINT("error", ("vio_set_cert_stuff failed")); report_errors(); + SSL_CTX_free(ssl_fd->ssl_context); my_free((void*)ssl_fd,MYF(0)); DBUG_RETURN(0); } From f5550c3304160e37607b4fbf9141f29dd55b122d Mon Sep 17 00:00:00 2001 From: "msvensson@neptunus.(none)" <> Date: Tue, 7 Nov 2006 16:09:32 +0100 Subject: [PATCH 14/17] Bug#23981 memory leaks from yassl code + other - Readd --skip-bdb when valgrinding --- mysql-test/mysql-test-run.pl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index b6121249116..465d058f97a 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -3347,6 +3347,11 @@ sub mysqld_arguments ($$$$$) { if ( $opt_valgrind_mysqld ) { mtr_add_arg($args, "%s--skip-safemalloc", $prefix); + + if ( $mysql_version_id < 50100 ) + { + mtr_add_arg($args, "%s--skip-bdb", $prefix); + } } my $pidfile; From 6bc6064ec4137e21ce94341b5e66a87df84bf01f Mon Sep 17 00:00:00 2001 From: "msvensson@neptunus.(none)" <> Date: Tue, 7 Nov 2006 17:42:15 +0100 Subject: [PATCH 15/17] Update result file after having changed error message --- mysql-test/r/openssl_1.result | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/openssl_1.result b/mysql-test/r/openssl_1.result index 8f9fd50eced..914fe25119f 100644 --- a/mysql-test/r/openssl_1.result +++ b/mysql-test/r/openssl_1.result @@ -47,7 +47,7 @@ drop table t1; mysqltest: Could not open connection 'default': 2026 SSL connection error mysqltest: Could not open connection 'default': 2026 SSL connection error mysqltest: Could not open connection 'default': 2026 SSL connection error -Error when connection to server using SSL:Unable to get private key from '' +SSL error: Unable to get private key from '' mysqltest: Could not open connection 'default': 2026 SSL connection error -Error when connection to server using SSL:Unable to get certificate from '' +SSL error: Unable to get certificate from '' mysqltest: Could not open connection 'default': 2026 SSL connection error From f28c36d0794a6fa220dfd25ee91e31a036a96ac8 Mon Sep 17 00:00:00 2001 From: "msvensson@neptunus.(none)" <> Date: Tue, 7 Nov 2006 18:21:52 +0100 Subject: [PATCH 16/17] Bump version to 5.0.30 --- configure.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index 76c60e1c201..5799a639314 100644 --- a/configure.in +++ b/configure.in @@ -7,7 +7,7 @@ AC_INIT(sql/mysqld.cc) AC_CANONICAL_SYSTEM # The Docs Makefile.am parses this line! # remember to also change ndb version below and update version.c in ndb -AM_INIT_AUTOMAKE(mysql, 5.0.29) +AM_INIT_AUTOMAKE(mysql, 5.0.30) AM_CONFIG_HEADER(config.h) PROTOCOL_VERSION=10 @@ -19,7 +19,7 @@ SHARED_LIB_VERSION=$SHARED_LIB_MAJOR_VERSION:0:0 # ndb version NDB_VERSION_MAJOR=5 NDB_VERSION_MINOR=0 -NDB_VERSION_BUILD=29 +NDB_VERSION_BUILD=30 NDB_VERSION_STATUS="" # Set all version vars based on $VERSION. How do we do this more elegant ? From 3d7a9bdd6b66f7e82bdf911482fc75162db825d3 Mon Sep 17 00:00:00 2001 From: "kent@mysql.com/c-634072d5.010-2112-6f72651.cust.bredbandsbolaget.se" <> Date: Tue, 7 Nov 2006 22:26:37 +0100 Subject: [PATCH 17/17] make_binary_distribution.sh: Added LICENSE.mysql, removed LICENSE.doc README.NW. Removed obselete section about MySQLEULA.txt and README.NW. README: Added reference to the EXCEPTIONS-CLIENT file. Changed reference to the commercial license file. Corrected references into chapters in the manual. .del-MySQLEULA.txt~4a1afd9284f9be5a: Delete: Docs/MySQLEULA.txt --- Docs/MySQLEULA.txt | 252 ---------------------------- README | 14 +- scripts/make_binary_distribution.sh | 11 +- 3 files changed, 8 insertions(+), 269 deletions(-) delete mode 100644 Docs/MySQLEULA.txt diff --git a/Docs/MySQLEULA.txt b/Docs/MySQLEULA.txt deleted file mode 100644 index f50c50298b1..00000000000 --- a/Docs/MySQLEULA.txt +++ /dev/null @@ -1,252 +0,0 @@ - License Agreement for Commercial Use of MySQL[tm] Software - -This Agreement ("License") is between MySQL AB, a Swedish company -("Licensor"), and the customer ("Licensee") identified on the electronic order -form submitted on behalf of Licensee (the "Order Form"). In consideration of -the mutual promises, covenants and conditions contained herein, the -sufficiency of which is hereby acknowledged, the parties agree as follows. - -1. License Grant. -"Licensed Software" means a complete and unchanged copy of the object code -version of the MySQL relational database management software identified in the -Order Form and posted on a special download page of the MySQL AB web site (the -"Download Page") made available to Licensee immediately after payment as -provided in Section 4. Subject to payment and the other terms and conditions -hereof, Licensor grants to Licensee a limited, non-exclusive and -non-transferable right to: (a) make one copy of the Licensed Software for each -license purchased (each, a "Licensed Copy"); (b) compile and/or link each -Licensed Copy to one copy of the Licensee software identified in the Order -Form (the "Licensee Application") without modifying the Licensed Software -(each, an "Integrated Product"); and (c) load and use the Licensed Copy -portion of an Integrated Product on one machine or instrument in the operating -system environment(s), and on the hardware platform(s) specified in the Order -Form, and solely for running and extracting data from, the Licensee -Application. "Use" means operation by one person for internal business -purposes in accordance with the terms and conditions hereof. Licensed Copies -shall be deemed accepted by Licensee immediately upon download. Licensee may -make one additional copy of each Licensed Copy for backup and archival -purposes only. - -2. Transfer. -Only after Licensee has linked or compiled a Licensed Copy as permitted in -Section 1, Licensee may transfer to a third party (the "Transferee") the right -to use such copy as described in Section 1. As a condition to any such -transfer: (a) Licensee must deliver the Licensed Copy and any backup copy to -the Transferee along with a copy of this License (including the Sales Order); -and (b) the Transferee must accept the terms and conditions of this License. -Any and all of Licensee's rights to a Licensed Copy shall terminate upon -transfer of the right to use such copy. A Transferee's rights are limited to -the use rights described in Section 1(c), and do not include the linking, -compilation or copying rights (except for backup and archival copies) -described in Section 1. If you did not purchase this License directly from -MySQL AB, then you are a Transferee. Licensee and any Transferee must comply -with all applicable export laws and regulations. - -3. Restrictions. -Licensee may use the Licensed Software only as expressly provided in Section -1. Without limiting the foregoing, Licensee shall not: (a) lease, license, -use, make available, distribute or modify all or any part of the Licensed -Software to any third party, except as otherwise expressly permitted herein; -(b) use the Licensed Software to operate in or as a time-sharing, outsourcing, -service bureau, application service provider or managed service provider -environment; (c) lease, license, use, make available or distribute the -Licensed Software as a general SQL server, as a stand alone application or -with applications other than the Licensee Application under this License; (d) -copy the Licensed Software onto any public or distributed network; (e) -distribute Integrated Products pursuant to a public or open source license; -(f) port the Licensed Software to any operating system other than as described -in the Order Form; or (g) change any proprietary rights notices which appear -in the Licensed Software. Except as otherwise provided in Section 2, the -rights granted to Licensee herein are rights that may be exercised solely by -Licensee. - -4. Price and payment. -No later than thirty (30) days after submission of the Order Form, Licensee -shall remit one non-refundable license fee per Licensed Copy as posted on -http://shop.mysql.com on the date Licensee submitted the Order Form (the -"License Fee"). All payments shall be made in Euros or U.S. dollars. Licensee -shall be responsible for paying all local, state, federal and international -sales, value added, excise and other taxes and duties payable in connection -with this License, other than taxes based upon Licensor's net income. Licensee -shall not be permitted to access the Download Page until Licensor has received -payment in full. - -5. Termination. -Licensor may terminate this License immediately if the Licensee shall breach -any of the provisions of this License and such breach remains uncured 30 days -after receipt of notice. In the event that Licensee becomes liquidated, -dissolved, bankrupt or insolvent, whether voluntarily or involuntarily, or -shall take any action to be so declared, Licensor shall have the right to -terminate this License immediately. Upon expiration, cancellation or other -termination of this License, Licensee shall immediately: (a) discontinue -distribution of Integrated Products that include Licensed Software; and (b) -destroy all copies of the Licensed Software, including (without limitation) as -linked or compiled in any Integrated Product. Sections 4 through 10 shall -survive the termination of this License for any reason. - -6. Proprietary Rights. -Licensee agrees that the copyright, patent, trade secrets and all other -intellectual proprietary rights of whatever nature in the Licensed Software -and related documentation, including derivative works, are and shall remain -the exclusive property of Licensor and any third party suppliers. Nothing in -this License should be construed as transferring any aspects of such rights to -Licensee or any third party. Licensor reserves any and all rights not -expressly granted herein. MySQL is a trademark of MySQL AB, and shall not be -used by Licensee without Licensor's express written authorization. Licensee -shall include in the Integrated Products a conspicuous notice that the -Integrated Products include software whose copyright is owned by MySQL AB. - -7. Disclaimer of Warranties. -THE LICENSED SOFTWARE IS LICENSED "AS IS," WITHOUT ANY WARRANTIES WHATSOEVER. -LICENSOR EXPRESSLY DISCLAIMS, AND LICENSEE EXPRESSLY WAIVES, ALL WARRANTIES, -WHETHER EXPRESS OR IMPLIED, INCLUDING WARRANTIES OF MERCHANTIBILITY, FITNESS -FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, SYSTEM INTEGRATION, -NON-INTERFERENCE AND ACCURACY OF INFORMATIONAL CONTENT. LICENSOR DOES NOT -WARRANT THAT THE LICENSED SOFTWARE WILL MEET LICENSEE'S REQUIREMENTS OR THAT -THE OPERATION OF THE LICENSED SOFTWARE WILL BE UNINTERRUPTED OR ERROR-FREE, OR -THAT ERRORS WILL BE CORRECTED. THE ENTIRE RISK OF THE LICENSED SOFTWARE'S -QUALITY AND PERFORMANCE IS WITH LICENSEE. Without limiting the generality of -the foregoing disclaimer, Licensee acknowledges that the Licensed Software is -not specifically designed, manufactured or intended for use in the planning, -construction, maintenance, control or direct operation of nuclear facilities, -aircraft navigation, control or communication systems, weapons systems or -direct life support systems. - -8. Indemnification. -Licensee hereby indemnifies and agrees to defend Licensor against any and all -damages, judgments and costs (including reasonable attorneys' fees) related to -any claim based upon: (a) an allegation that the Licensee Application -infringes the intellectual property of a third party; (b) use of the Licensed -Software in a manner prohibited under this License or in a manner for which -the Licensed Software was not designed; (c) integration or use of the Licensed -Software with the Licensee Application (where use of the Licensed Software -alone would not infringe); (d) changes made by Licensee to the Licensed -Software (where use of unmodified Licensed Software would not infringe); (e) -changes made, or actions taken, by Licensor upon Licensee's direct -instructions; or (f) bodily injury, property damage or any other damage or -injury due to the use or inability to use an Integrated Product. - -9. Limitation of Liability. -LICENSOR SHALL HAVE NO LIABILITY WITH RESPECT TO ITS OBLIGATIONS UNDER THIS -AGREEMENT OR OTHERWISE FOR CONSEQUENTIAL, EXEMPLARY, SPECIAL, INDIRECT, -INCIDENTAL OR PUNITIVE DAMAGES, INCLUDING (WITHOUT LIMITATION) ANY LOST -PROFITS OR LOST SAVINGS (WHETHER RESULTING FROM IMPAIRED OR LOST DATA, -SOFTWARE OR COMPUTER FAILURE OR ANY OTHER CAUSE), EVEN IF IT HAS BEEN ADVISED -OF THE POSSIBILITY OF SUCH DAMAGES. NOTWITHSTANDING ANY OTHER PROVISION IN -THIS AGREEMENT, THE LIABILITY OF LICENSOR FOR ANY REASON AND UPON ANY CAUSE OF -ACTION SHALL BE LIMITED TO THE AMOUNT PAID TO LICENSOR BY LICENSEE UNDER THIS -AGREEMENT. THIS LIMITATION APPLIES TO ALL CAUSES OF ACTION IN THE AGGREGATE, -INCLUDING (WITHOUT LIMITATION) BREACH OF CONTRACT, BREACH OF WARRANTY, -NEGLIGENCE, MISREPRESENTATIONS AND OTHER TORTS. THE PARTIES AGREE THAT THE -REMEDIES AND LIMITATIONS HEREIN ALLOCATE THE RISKS BETWEEN THE PARTIES AS -AUTHORIZED BY APPLICABLE LAWS. THE LICENSE FEES ARE SET IN RELIANCE UPON THIS -ALLOCATION OF RISK AND THE EXCLUSION OF CERTAIN DAMAGES AS SET FORTH IN THIS -AGREEMENT. - -10. Miscellaneous. - -10.1 Interpretation. -Failure by Licensor to exercise any right or remedy does not signify -acceptance of the event giving rise to such right or remedy. No action arising -out of this License may be brought by Licensee more than one year after the -cause of action has accrued. If any part of this License is held by a court of -competent jurisdiction to be illegal or unenforceable, the validity or -enforceability of the remainder of this License shall not be affected and such -provision shall be deemed modified to the minimum extent necessary to make -such provision consistent with applicable law and, in its modified form, such -provision shall be enforceable and enforced. Licensor reserves the right not -to accept any Order Form. Any invoice issued by Licensor in connection with -this License shall be deemed a part of this Agreement. To the extent of any -inconsistency between an Order Form and an invoice issued by Licensor, the -terms and conditions of the invoice shall prevail; Licensee shall be deemed to -have accepted an invoice upon payment of such invoice. In the event that -Licensee placed an order by telephone or through an authorized sales -representative, the invoice issued by Licensor shall constitute the Order -Form. The terms and conditions of this Agreement shall replace and serve as a -novation of the terms and conditions of any commercial (i.e., non-GPL) license -purchased online by Licensee prior to August 2002. - -10.2 Binding. -This Agreement will be binding upon and inure to the benefit of the parties, -their respective successors and permitted assigns. Except as otherwise -provided in Section 2, without the prior written consent of Licensor, Licensee -may not assign this License or its rights or obligations under this License to -any person or party, whether by operation of law or otherwise; any attempt by -Licensee to assign this License without Licensor's prior written consent shall -be null and void. There are no intended third party beneficiaries of this -License. The parties are, and shall remain, independent contractors; nothing -in this License is designed to create, nor shall create between them, a -partnership, joint venture, agency, or employment relationship. - -10.3 Governing Law; Dispute Forum. -If Licensee's residence, principal place of business or place of organization -is in the United States of America ("USA"), then this License shall be deemed -to have been executed in the USA and shall be governed by the laws of the -State of Delaware, without regard to the conflict of laws provisions thereof. -If Licensee's residence, principal place of business or place of organization -is in any country other than the USA, then this License shall be deemed to -have been executed in Sweden and shall be governed by the laws of Sweden, -without regard to the conflict of laws provisions thereof. In no event shall -the United Nations Convention on Contracts for the International Sale of Goods -apply to, or govern, this License. The parties consent to the exclusive -jurisdiction of the courts of Sweden and the USA, as provided in this Section. -In the event that Licensor initiates an action in connection with this License -or any other dispute between the parties, the exclusive jurisdiction of such -action shall be in: (a) Newark, Delaware, if Licensee's residence, principal -place of business or place of organization is in the USA; or (b) Uppsala, -Sweden, if Licensee's residence, principal place of business or place of -organization is in any country other than the USA. In the event that Licensee -initiates an action in connection with this License or any other dispute -between the parties, the exclusive jurisdiction of such action shall be in -Stockholm, Sweden. Notwithstanding the foregoing, either party may bring a -counterclaim in an action in the same jurisdiction in which the originating -claim was filed, and either party may enforce any judgment rendered by such -court in any court of competent jurisdiction. Licensee shall comply at its own -expense with all relevant and applicable laws related to use and distribution -of the Licensed Software as permitted in this License. Notwithstanding the -foregoing, Licensor may seek injunctive or other equitable relief in any -jurisdiction in order to protect its intellectual property rights. The parties -have agreed to execute this License in the English language, and the English -language version of the Agreement will control for all purposes. Any action -brought under this License shall be conducted in the English language. -Licensee shall be responsible for Licensor's attorneys fees and other expenses -associated with the enforcement of this License or the collection of any -amounts due under this License. - -10.4 Notice. -Unless otherwise agreed, any notice under this License shall be delivered and -addressed to Licensee at the address set forth on the Order Form, and to -Licensor at Bangardsgatan 8, 753 20, Uppsala, Sweden. Notice shall be deemed -received by any party: (a) on the day given, if personally delivered or if -sent by confirmed facsimile transmission, receipt verified; (b) on the third -day after deposit, if mailed by certified, first class, postage prepaid, -return receipt requested mail, or by reputable, expedited overnight courier; -or (c) on the fifth day after deposit, if sent by reputable, expedited -international courier. Either party may change its address for notice -purposes upon notice in accordance with this Section. Licensor may identify -Licensee as a commercial licensee, including on the MySQL web site. - -10.5 GPL. -The GPL License shall continue to apply to any and all uses and distributions -of the Licensed Software undertaken by Licensee either prior to the Effective -Date, after termination, or otherwise outside the scope of this License. This -Agreement shall not be deemed to replace or otherwise amend any Licensee -rights or obligations pursuant to the GPL License with respect to any uses of -the Licensed Software described in the preceding sentence. - -10.6 Entire Agreement. -This Agreement (including the Order Form and the invoice) comprises the entire -agreement, and supercedes and merges all prior proposals, understandings and -agreements, oral and written, between the parties relating to the subject -matter of this License. This Agreement may be amended or modified only in a -writing executed by both parties. To the extent of any conflict or -inconsistency between this License and any invoice or other document submitted -by Licensee to Licensor, this License will control. Licensor's acceptance of -any document shall not be construed as an acceptance of provisions which are -in any way in conflict or inconsistent with, or in addition to, this License, -unless such terms are separately and specifically accepted in writing by an -authorized officer of Licensor. - -10.7 Print this License. -For record keeping purposes, we encourage Licensee to print this License and -the Order Form on the date that the Order Form is submitted. diff --git a/README b/README index d37b37cd918..56bd912d3d6 100644 --- a/README +++ b/README @@ -2,8 +2,9 @@ This is a release of MySQL, a dual-license SQL database server. MySQL is brought to you by the MySQL team at MySQL AB. License information can be found in these files: -- For GPL (free) distributions, see the COPYING file. -- For commercial distributions, see the MySQLEULA.txt file. +- For GPL (free) distributions, see the COPYING file and + the EXCEPTIONS-CLIENT file. +- For commercial distributions, see the LICENSE.mysql file. For further information about MySQL or additional documentation, see: @@ -15,11 +16,10 @@ Some manual sections of special interest: - If you are migrating from an older version of MySQL, please read the "Upgrading from..." section first! - To see what MySQL can do, take a look at the features section. -- For installation instructions, see the Installation chapter. -- For future plans, see the TODO appendix. -- For the new features/bugfix history, see the News appendix. -- For the currently known bugs/misfeatures (known errors) see the problems - appendix. +- For installation instructions, see the Installing and Upgrading chapter. +- For the new features/bugfix history, see the Change History appendix. +- For the currently known bugs/misfeatures (known errors) see the Problems + and Common Errors appendix. - For a list of developers and other contributors, see the Credits appendix. diff --git a/scripts/make_binary_distribution.sh b/scripts/make_binary_distribution.sh index ae24752d290..5748c024387 100644 --- a/scripts/make_binary_distribution.sh +++ b/scripts/make_binary_distribution.sh @@ -85,7 +85,7 @@ do done for i in COPYING COPYING.LIB README Docs/INSTALL-BINARY \ - EXCEPTIONS-CLIENT MySQLEULA.txt LICENSE.doc README.NW + EXCEPTIONS-CLIENT LICENSE.mysql LICENSE.doc do if [ -f $i ] then @@ -246,15 +246,6 @@ fi rm -f $BASE/bin/Makefile* $BASE/bin/*.in $BASE/bin/*.sh $BASE/bin/mysql_install_db $BASE/bin/make_binary_distribution $BASE/bin/setsomevars $BASE/support-files/Makefile* $BASE/support-files/*.sh -# -# Remove system dependent files -# -if [ $BASE_SYSTEM = "netware" ] ; then - rm -f $BASE/MySQLEULA.txt -else - rm -f $BASE/README.NW -fi - # Make safe_mysqld a symlink to mysqld_safe for backwards portability (cd $BASE/bin ; ln -s mysqld_safe safe_mysqld )