Commit f8d3661a 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 59ee0c1b 817ba0ad
......@@ -15,3 +15,5 @@
45214442pBGT9KuZEGixBH71jTzbOA
45214a07hVsIGwvwa-WrO-jpeaSwVw
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.
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.
......
......@@ -185,7 +185,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;
......@@ -743,7 +743,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)
{
......@@ -3369,6 +3369,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;
......@@ -4649,9 +4654,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 path from MTR_MEM environment variable
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;
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
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;
......
......@@ -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 state version_number version mysqld_compatible
mysqld1 online VERSION_NUMBER VERSION no
......
......@@ -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
......@@ -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;
#
# 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
#
create table t1 (a int, b int);
......
......@@ -46,10 +46,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.
......
......@@ -123,7 +123,7 @@ copyfileto()
copyfileto $BASE/docs ChangeLog Docs/mysql.info
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:
BIN_FILES="extra/comp_err$BS extra/replace$BS extra/perror$BS \
......@@ -308,10 +308,7 @@ if [ $BASE_SYSTEM = "netware" ] ; then
$BASE/support-files/build-tags \
$BASE/support-files/MySQL-shared-compat.spec \
$BASE/support-files/ndb-config-2-node.ini \
$BASE/INSTALL-BINARY \
$BASE/MySQLEULA.txt
else
rm -f $BASE/README.NW
$BASE/INSTALL-BINARY
fi
# Make safe_mysqld a symlink to mysqld_safe for backwards portability
......
......@@ -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,31 +510,22 @@ 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)
int ha_end()
{
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 error= 0;
DBUG_ENTER("ha_end");
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())
error[0]= 1;
return error[0];
} /* ha_panic */
DBUG_RETURN(error);
}
static my_bool dropdb_handlerton(THD *unused1, st_plugin_int *plugin,
void *path)
......
......@@ -1658,6 +1658,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);
......
......@@ -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:
fix_fields()
......@@ -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 value= args[0]->val_real();
......
......@@ -434,6 +434,7 @@ class Item_func_mod :public Item_num_op
my_decimal *decimal_op(my_decimal *);
const char *func_name() const { return "%"; }
void result_precision();
void fix_length_and_dec();
};
......
......@@ -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;
......@@ -1187,7 +1186,6 @@ void clean_up(bool print_message)
item_create_cleanup();
set_var_free();
free_charsets();
(void) ha_panic(HA_PANIC_CLOSE); /* close all tables and logs */
if (!opt_noacl)
{
#ifdef HAVE_DLOPEN
......@@ -1195,6 +1193,7 @@ void clean_up(bool print_message)
#endif
}
plugin_shutdown();
ha_end();
if (tc_log)
tc_log->close();
xid_cache_free();
......@@ -5801,10 +5800,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,
......@@ -8167,7 +8162,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;
......
......@@ -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},
......
......@@ -2618,9 +2618,21 @@ improper_arguments: %d timed_out: %d",
void set_slave_thread_options(THD* thd)
{
DBUG_ENTER("set_slave_thread_options");
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;
DBUG_VOID_RETURN;
}
......@@ -2654,17 +2666,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);
......
......@@ -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);
}
......
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