Commit 78be2cdc authored by unknown's avatar unknown

Merge alik.:/mnt/raid/alik/MySQL/devel/5.1

into  alik.:/mnt/raid/alik/MySQL/devel/5.1-rt


configure.in:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
sql/handler.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
parents 5856b836 55d84021
...@@ -15,3 +15,5 @@ ...@@ -15,3 +15,5 @@
45214442pBGT9KuZEGixBH71jTzbOA 45214442pBGT9KuZEGixBH71jTzbOA
45214a07hVsIGwvwa-WrO-jpeaSwVw 45214a07hVsIGwvwa-WrO-jpeaSwVw
452a92d0-31-8wSzSfZi165fcGcXPA 452a92d0-31-8wSzSfZi165fcGcXPA
454a7ef8gdvE_ddMlJyghvOAkKPNOQ
454f8960jsVT_kMKJtZ9OCgXoba0xQ
This diff is collapsed.
...@@ -2,8 +2,9 @@ This is a release of MySQL, a dual-license SQL database server. ...@@ -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. MySQL is brought to you by the MySQL team at MySQL AB.
License information can be found in these files: License information can be found in these files:
- For GPL (free) distributions, see the COPYING file. - For GPL (free) distributions, see the COPYING file and
- For commercial distributions, see the MySQLEULA.txt file. the EXCEPTIONS-CLIENT file.
- For commercial distributions, see the LICENSE.mysql file.
For further information about MySQL or additional documentation, see: For further information about MySQL or additional documentation, see:
...@@ -15,11 +16,10 @@ Some manual sections of special interest: ...@@ -15,11 +16,10 @@ Some manual sections of special interest:
- If you are migrating from an older version of MySQL, please read the - If you are migrating from an older version of MySQL, please read the
"Upgrading from..." section first! "Upgrading from..." section first!
- To see what MySQL can do, take a look at the features section. - To see what MySQL can do, take a look at the features section.
- For installation instructions, see the Installation chapter. - For installation instructions, see the Installing and Upgrading chapter.
- For future plans, see the TODO appendix. - For the new features/bugfix history, see the Change History appendix.
- For the new features/bugfix history, see the News appendix. - For the currently known bugs/misfeatures (known errors) see the Problems
- For the currently known bugs/misfeatures (known errors) see the problems and Common Errors appendix.
appendix.
- For a list of developers and other contributors, see the Credits - For a list of developers and other contributors, see the Credits
appendix. appendix.
......
...@@ -185,7 +185,7 @@ our $opt_fast; ...@@ -185,7 +185,7 @@ our $opt_fast;
our $opt_force; our $opt_force;
our $opt_reorder= 0; our $opt_reorder= 0;
our $opt_enable_disabled; our $opt_enable_disabled;
our $opt_mem; our $opt_mem= $ENV{'MTR_MEM'};
our $opt_gcov; our $opt_gcov;
our $opt_gcov_err; our $opt_gcov_err;
...@@ -743,7 +743,7 @@ sub command_line_setup () { ...@@ -743,7 +743,7 @@ sub command_line_setup () {
# Use /dev/shm as the preferred location for vardir and # Use /dev/shm as the preferred location for vardir and
# thus implicitly also tmpdir. Add other locations to list # 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) # One could maybe use "mount" to find tmpfs location(s)
foreach my $fs (@tmpfs_locations) foreach my $fs (@tmpfs_locations)
{ {
...@@ -3369,6 +3369,11 @@ sub mysqld_arguments ($$$$$) { ...@@ -3369,6 +3369,11 @@ sub mysqld_arguments ($$$$$) {
if ( $opt_valgrind_mysqld ) if ( $opt_valgrind_mysqld )
{ {
mtr_add_arg($args, "%s--skip-safemalloc", $prefix); mtr_add_arg($args, "%s--skip-safemalloc", $prefix);
if ( $mysql_version_id < 50100 )
{
mtr_add_arg($args, "%s--skip-bdb", $prefix);
}
} }
my $pidfile; my $pidfile;
...@@ -4649,9 +4654,9 @@ Options to control directories to use ...@@ -4649,9 +4654,9 @@ Options to control directories to use
vardir=DIR The directory where files generated from the test run vardir=DIR The directory where files generated from the test run
is stored (default: ./var). Specifying a ramdisk or is stored (default: ./var). Specifying a ramdisk or
tmpfs will speed up tests. 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) available(default: /dev/shm)
reads path from MTR_MEM environment variable
Options to control what test suites or cases to run Options to control what test suites or cases to run
......
...@@ -182,6 +182,81 @@ select 5.1 mod 3, 5.1 mod -3, -5.1 mod 3, -5.1 mod -3; ...@@ -182,6 +182,81 @@ 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; 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 5 mod 3 5 mod -3 -5 mod 3 -5 mod -3
2 2 -2 -2 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
create table t1 (a int, b int); create table t1 (a int, b int);
insert into t1 values (1,2), (2,3), (3,4), (4,5); insert into t1 values (1,2), (2,3), (3,4), (4,5);
select * from t1 where a not between 1 and 2; select * from t1 where a not between 1 and 2;
......
...@@ -18,6 +18,7 @@ Success: the process has been started. ...@@ -18,6 +18,7 @@ Success: the process has been started.
Killing the process... Killing the process...
Sleeping... Sleeping...
Success: the process was restarted. Success: the process was restarted.
Success: server is ready to accept connection on socket.
SHOW INSTANCE STATUS mysqld1; SHOW INSTANCE STATUS mysqld1;
instance_name state version_number version mysqld_compatible instance_name state version_number version mysqld_compatible
mysqld1 online VERSION_NUMBER VERSION no mysqld1 online VERSION_NUMBER VERSION no
......
...@@ -47,7 +47,7 @@ drop table t1; ...@@ -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 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 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 mysqltest: Could not open connection 'default': 2026 SSL connection error
...@@ -108,6 +108,40 @@ select 5.1 mod 3, 5.1 mod -3, -5.1 mod 3, -5.1 mod -3; ...@@ -108,6 +108,40 @@ 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; 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';
#
# Bug#6726: NOT BETWEEN parse failure # Bug#6726: NOT BETWEEN parse failure
# #
create table t1 (a int, b int); create table t1 (a int, b int);
......
...@@ -46,10 +46,13 @@ START INSTANCE mysqld2; ...@@ -46,10 +46,13 @@ START INSTANCE mysqld2;
# FIXME: START INSTANCE should be synchronous. # FIXME: START INSTANCE should be synchronous.
--exec $MYSQL_TEST_DIR/t/wait_for_process.sh $IM_MYSQLD2_PATH_PID 30 started --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/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. # 3. Issue some statement -- connection should be re-established.
# Give some time to begin accepting connections after restart. # Give some time to begin accepting connections after restart.
......
...@@ -123,7 +123,7 @@ copyfileto() ...@@ -123,7 +123,7 @@ copyfileto()
copyfileto $BASE/docs ChangeLog Docs/mysql.info copyfileto $BASE/docs ChangeLog Docs/mysql.info
copyfileto $BASE COPYING COPYING.LIB README Docs/INSTALL-BINARY \ copyfileto $BASE COPYING COPYING.LIB README Docs/INSTALL-BINARY \
EXCEPTIONS-CLIENT MySQLEULA.txt LICENSE.doc README.NW EXCEPTIONS-CLIENT LICENSE.mysql
# Non platform-specific bin dir files: # Non platform-specific bin dir files:
BIN_FILES="extra/comp_err$BS extra/replace$BS extra/perror$BS \ BIN_FILES="extra/comp_err$BS extra/replace$BS extra/perror$BS \
...@@ -308,10 +308,7 @@ if [ $BASE_SYSTEM = "netware" ] ; then ...@@ -308,10 +308,7 @@ if [ $BASE_SYSTEM = "netware" ] ; then
$BASE/support-files/build-tags \ $BASE/support-files/build-tags \
$BASE/support-files/MySQL-shared-compat.spec \ $BASE/support-files/MySQL-shared-compat.spec \
$BASE/support-files/ndb-config-2-node.ini \ $BASE/support-files/ndb-config-2-node.ini \
$BASE/INSTALL-BINARY \ $BASE/INSTALL-BINARY
$BASE/MySQLEULA.txt
else
rm -f $BASE/README.NW
fi fi
# Make safe_mysqld a symlink to mysqld_safe for backwards portability # Make safe_mysqld a symlink to mysqld_safe for backwards portability
......
...@@ -376,11 +376,12 @@ int ha_finalize_handlerton(st_plugin_int *plugin) ...@@ -376,11 +376,12 @@ int ha_finalize_handlerton(st_plugin_int *plugin)
case SHOW_OPTION_YES: case SHOW_OPTION_YES:
if (installed_htons[hton->db_type] == hton) if (installed_htons[hton->db_type] == hton)
installed_htons[hton->db_type]= NULL; installed_htons[hton->db_type]= NULL;
if (hton->panic && hton->panic(hton, HA_PANIC_CLOSE))
DBUG_RETURN(1);
break; break;
}; };
if (hton->panic)
hton->panic(hton, HA_PANIC_CLOSE);
if (plugin->plugin->deinit) if (plugin->plugin->deinit)
{ {
/* /*
...@@ -509,31 +510,22 @@ int ha_init() ...@@ -509,31 +510,22 @@ int ha_init()
DBUG_RETURN(error); DBUG_RETURN(error);
} }
/* int ha_end()
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; int error= 0;
if (hton->state == SHOW_OPTION_YES && hton->panic) DBUG_ENTER("ha_end");
((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); 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;
if (flag == HA_PANIC_CLOSE && ha_finish_errors()) DBUG_RETURN(error);
error[0]= 1; }
return error[0];
} /* ha_panic */
static my_bool dropdb_handlerton(THD *unused1, st_plugin_int *plugin, static my_bool dropdb_handlerton(THD *unused1, st_plugin_int *plugin,
void *path) void *path)
......
...@@ -1658,6 +1658,7 @@ static inline bool ha_storage_engine_is_enabled(const handlerton *db_type) ...@@ -1658,6 +1658,7 @@ static inline bool ha_storage_engine_is_enabled(const handlerton *db_type)
/* basic stuff */ /* basic stuff */
int ha_init(void); int ha_init(void);
int ha_end(void);
int ha_initialize_handlerton(st_plugin_int *plugin); int ha_initialize_handlerton(st_plugin_int *plugin);
int ha_finalize_handlerton(st_plugin_int *plugin); int ha_finalize_handlerton(st_plugin_int *plugin);
......
...@@ -105,7 +105,7 @@ Item_func::Item_func(THD *thd, Item_func *item) ...@@ -105,7 +105,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: SYNOPSIS:
fix_fields() fix_fields()
...@@ -1397,6 +1397,13 @@ void Item_func_mod::result_precision() ...@@ -1397,6 +1397,13 @@ void Item_func_mod::result_precision()
} }
void Item_func_mod::fix_length_and_dec()
{
Item_num_op::fix_length_and_dec();
maybe_null= 1;
}
double Item_func_neg::real_op() double Item_func_neg::real_op()
{ {
double value= args[0]->val_real(); double value= args[0]->val_real();
......
...@@ -434,6 +434,7 @@ class Item_func_mod :public Item_num_op ...@@ -434,6 +434,7 @@ class Item_func_mod :public Item_num_op
my_decimal *decimal_op(my_decimal *); my_decimal *decimal_op(my_decimal *);
const char *func_name() const { return "%"; } const char *func_name() const { return "%"; }
void result_precision(); void result_precision();
void fix_length_and_dec();
}; };
......
...@@ -372,7 +372,6 @@ extern longlong innobase_log_file_size; ...@@ -372,7 +372,6 @@ extern longlong innobase_log_file_size;
extern long innobase_log_buffer_size; extern long innobase_log_buffer_size;
extern longlong innobase_buffer_pool_size; extern longlong innobase_buffer_pool_size;
extern long innobase_additional_mem_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_file_io_threads, innobase_lock_wait_timeout;
extern long innobase_force_recovery; extern long innobase_force_recovery;
extern long innobase_open_files; extern long innobase_open_files;
...@@ -1187,7 +1186,6 @@ void clean_up(bool print_message) ...@@ -1187,7 +1186,6 @@ void clean_up(bool print_message)
item_create_cleanup(); item_create_cleanup();
set_var_free(); set_var_free();
free_charsets(); free_charsets();
(void) ha_panic(HA_PANIC_CLOSE); /* close all tables and logs */
if (!opt_noacl) if (!opt_noacl)
{ {
#ifdef HAVE_DLOPEN #ifdef HAVE_DLOPEN
...@@ -1195,6 +1193,7 @@ void clean_up(bool print_message) ...@@ -1195,6 +1193,7 @@ void clean_up(bool print_message)
#endif #endif
} }
plugin_shutdown(); plugin_shutdown();
ha_end();
if (tc_log) if (tc_log)
tc_log->close(); tc_log->close();
xid_cache_free(); xid_cache_free();
...@@ -5801,10 +5800,6 @@ log and this option does nothing anymore.", ...@@ -5801,10 +5800,6 @@ log and this option does nothing anymore.",
(gptr*) &srv_auto_extend_increment, (gptr*) &srv_auto_extend_increment,
(gptr*) &srv_auto_extend_increment, (gptr*) &srv_auto_extend_increment,
0, GET_LONG, REQUIRED_ARG, 8L, 1L, 1000L, 0, 1L, 0}, 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, {"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.", "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, (gptr*) &innobase_buffer_pool_size, (gptr*) &innobase_buffer_pool_size, 0,
...@@ -8167,7 +8162,6 @@ longlong innobase_log_file_size; ...@@ -8167,7 +8162,6 @@ longlong innobase_log_file_size;
long innobase_log_buffer_size; long innobase_log_buffer_size;
longlong innobase_buffer_pool_size; longlong innobase_buffer_pool_size;
long innobase_additional_mem_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_file_io_threads, innobase_lock_wait_timeout;
long innobase_force_recovery; long innobase_force_recovery;
long innobase_open_files; long innobase_open_files;
......
...@@ -67,7 +67,6 @@ extern longlong innobase_log_file_size; ...@@ -67,7 +67,6 @@ extern longlong innobase_log_file_size;
extern long innobase_log_buffer_size; extern long innobase_log_buffer_size;
extern longlong innobase_buffer_pool_size; extern longlong innobase_buffer_pool_size;
extern long innobase_additional_mem_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_file_io_threads, innobase_lock_wait_timeout;
extern long innobase_force_recovery; extern long innobase_force_recovery;
extern long innobase_open_files; extern long innobase_open_files;
...@@ -819,7 +818,6 @@ SHOW_VAR init_vars[]= { ...@@ -819,7 +818,6 @@ SHOW_VAR init_vars[]= {
#ifdef WITH_INNOBASE_STORAGE_ENGINE #ifdef WITH_INNOBASE_STORAGE_ENGINE
{"innodb_additional_mem_pool_size", (char*) &innobase_additional_mem_pool_size, SHOW_LONG }, {"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}, {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_buffer_pool_size", (char*) &innobase_buffer_pool_size, SHOW_LONGLONG },
{"innodb_checksums", (char*) &innobase_use_checksums, SHOW_MY_BOOL}, {"innodb_checksums", (char*) &innobase_use_checksums, SHOW_MY_BOOL},
{sys_innodb_commit_concurrency.name, (char*) &sys_innodb_commit_concurrency, SHOW_SYS}, {sys_innodb_commit_concurrency.name, (char*) &sys_innodb_commit_concurrency, SHOW_SYS},
......
...@@ -2618,9 +2618,21 @@ improper_arguments: %d timed_out: %d", ...@@ -2618,9 +2618,21 @@ improper_arguments: %d timed_out: %d",
void set_slave_thread_options(THD* thd) void set_slave_thread_options(THD* thd)
{ {
DBUG_ENTER("set_slave_thread_options"); DBUG_ENTER("set_slave_thread_options");
/*
thd->options = ((opt_log_slave_updates) ? OPTION_BIN_LOG:0) | It's nonsense to constrain the slave threads with max_join_size; if a
OPTION_AUTO_IS_NULL; 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; thd->variables.completion_type= 0;
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
...@@ -2654,17 +2666,6 @@ static int init_slave_thread(THD* thd, SLAVE_THD_TYPE thd_type) ...@@ -2654,17 +2666,6 @@ static int init_slave_thread(THD* thd, SLAVE_THD_TYPE thd_type)
thd->net.read_timeout = slave_net_timeout; thd->net.read_timeout = slave_net_timeout;
thd->slave_thread = 1; thd->slave_thread = 1;
set_slave_thread_options(thd); 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->client_capabilities = CLIENT_LOCAL_FILES;
thd->real_id=pthread_self(); thd->real_id=pthread_self();
pthread_mutex_lock(&LOCK_thread_count); pthread_mutex_lock(&LOCK_thread_count);
......
...@@ -86,8 +86,7 @@ vio_set_cert_stuff(SSL_CTX *ctx, const char *cert_file, const char *key_file) ...@@ -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) 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)); DBUG_PRINT("error",("unable to get certificate from '%s'\n", cert_file));
/* FIX stderr */ fprintf(stderr,"SSL error: ");
fprintf(stderr,"Error when connection to server using SSL:");
ERR_print_errors_fp(stderr); ERR_print_errors_fp(stderr);
fprintf(stderr,"Unable to get certificate from '%s'\n", cert_file); fprintf(stderr,"Unable to get certificate from '%s'\n", cert_file);
fflush(stderr); fflush(stderr);
...@@ -100,8 +99,7 @@ vio_set_cert_stuff(SSL_CTX *ctx, const char *cert_file, const char *key_file) ...@@ -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) 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)); DBUG_PRINT("error", ("unable to get private key from '%s'\n", key_file));
/* FIX stderr */ fprintf(stderr,"SSL error: ");
fprintf(stderr,"Error when connection to server using SSL:");
ERR_print_errors_fp(stderr); ERR_print_errors_fp(stderr);
fprintf(stderr,"Unable to get private key from '%s'\n", key_file); fprintf(stderr,"Unable to get private key from '%s'\n", key_file);
fflush(stderr); fflush(stderr);
...@@ -252,6 +250,7 @@ new_VioSSLFd(const char *key_file, const char *cert_file, ...@@ -252,6 +250,7 @@ new_VioSSLFd(const char *key_file, const char *cert_file,
{ {
DBUG_PRINT("error", ("failed to set ciphers to use")); DBUG_PRINT("error", ("failed to set ciphers to use"));
report_errors(); report_errors();
SSL_CTX_free(ssl_fd->ssl_context);
my_free((void*)ssl_fd,MYF(0)); my_free((void*)ssl_fd,MYF(0));
DBUG_RETURN(0); DBUG_RETURN(0);
} }
...@@ -264,6 +263,7 @@ new_VioSSLFd(const char *key_file, const char *cert_file, ...@@ -264,6 +263,7 @@ new_VioSSLFd(const char *key_file, const char *cert_file,
{ {
DBUG_PRINT("error", ("SSL_CTX_set_default_verify_paths failed")); DBUG_PRINT("error", ("SSL_CTX_set_default_verify_paths failed"));
report_errors(); report_errors();
SSL_CTX_free(ssl_fd->ssl_context);
my_free((void*)ssl_fd,MYF(0)); my_free((void*)ssl_fd,MYF(0));
DBUG_RETURN(0); DBUG_RETURN(0);
} }
...@@ -273,6 +273,7 @@ new_VioSSLFd(const char *key_file, const char *cert_file, ...@@ -273,6 +273,7 @@ new_VioSSLFd(const char *key_file, const char *cert_file,
{ {
DBUG_PRINT("error", ("vio_set_cert_stuff failed")); DBUG_PRINT("error", ("vio_set_cert_stuff failed"));
report_errors(); report_errors();
SSL_CTX_free(ssl_fd->ssl_context);
my_free((void*)ssl_fd,MYF(0)); my_free((void*)ssl_fd,MYF(0));
DBUG_RETURN(0); DBUG_RETURN(0);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment