developers
Threads by month
- ----- 2025 -----
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- 3 participants
- 6830 discussions

[Maria-developers] bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (knielsen:2777)
by knielsenīŧ knielsen-hq.org 16 Dec '09
by knielsenīŧ knielsen-hq.org 16 Dec '09
16 Dec '09
#At lp:maria
2777 knielsen(a)knielsen-hq.org 2009-12-16 [merge]
Automatic merge with MariaDB trunk.
modified:
BUILD/FINISH.sh
BUILD/SETUP.sh
client/mysql.cc
client/mysqlcheck.c
client/mysqlslap.c
client/mysqltest.cc
dbug/dbug.c
extra/yassl/taocrypt/include/block.hpp
mysql-test/lib/mtr_cases.pm
mysql-test/lib/mtr_report.pm
mysql-test/lib/v1/mysql-test-run.pl
mysql-test/mysql-test-run.pl
mysql-test/r/ctype_ucs.result
mysql-test/r/warnings.result
mysql-test/suite/federated/disabled.def
mysql-test/suite/federated/federated_server.result
mysql-test/suite/federated/federated_server.test
mysql-test/suite/funcs_1/r/innodb_func_view.result
mysql-test/suite/funcs_1/r/memory_func_view.result
mysql-test/suite/funcs_1/r/myisam_func_view.result
mysql-test/t/ctype_ucs.test
mysql-test/t/warnings.test
plugin/fulltext/plugin_example.c
sql-common/client.c
sql/my_decimal.cc
sql/mysqld.cc
sql/share/errmsg.txt
sql/slave.cc
sql/sql_base.cc
sql/sql_class.cc
sql/sql_insert.cc
storage/federatedx/ha_federatedx.cc
strings/ctype-ucs2.c
unittest/mysys/Makefile.am
vio/viosslfactories.c
=== modified file 'BUILD/FINISH.sh'
--- a/BUILD/FINISH.sh 2009-10-27 13:20:34 +0000
+++ b/BUILD/FINISH.sh 2009-12-06 17:34:54 +0000
@@ -1,6 +1,6 @@
-cflags="$c_warnings $extra_flags"
-cxxflags="$cxx_warnings $base_cxxflags $extra_flags"
-extra_configs="$extra_configs $local_infile_configs"
+cflags="$c_warnings $extra_flags $EXTRA_FLAGS $EXTRA_CFLAGS"
+cxxflags="$cxx_warnings $base_cxxflags $extra_flags $EXTRA_FLAGS $EXTRA_CXXFLAGS"
+extra_configs="$extra_configs $local_infile_configs $EXTRA_CONFIGS"
configure="./configure $base_configs $extra_configs"
commands="\
=== modified file 'BUILD/SETUP.sh'
--- a/BUILD/SETUP.sh 2009-10-29 00:04:56 +0000
+++ b/BUILD/SETUP.sh 2009-12-06 17:34:54 +0000
@@ -34,6 +34,14 @@ parse_options()
full_debug="=full";;
--warning-mode=*)
warning_mode=`get_key_value "$1"`;;
+ --extra-flags=*)
+ EXTRA_FLAGS=`get_key_value "$1"`;;
+ --extra-cflags=*)
+ EXTRA_CFLAGS=`get_key_value "$1"`;;
+ --extra-cxxflags=*)
+ EXTRA_CXXFLAGS=`get_key_value "$1"`;;
+ --extra-configs=*)
+ EXTRA_CONFIGS=`get_key_value "$1"`;;
-c | --just-configure)
just_configure=1;;
-n | --just-print | --print)
=== modified file 'client/mysql.cc'
--- a/client/mysql.cc 2009-11-30 21:37:27 +0000
+++ b/client/mysql.cc 2009-12-03 11:34:11 +0000
@@ -1280,7 +1280,6 @@ sig_handler handle_sigint(int sig)
MYSQL *kill_mysql= NULL;
/* terminate if no query being executed, or we already tried interrupting */
- /* terminate if no query being executed, or we already tried interrupting */
if (!executing_query || (interrupted_query == 2))
{
tee_fprintf(stdout, "Ctrl-C -- exit!\n");
@@ -1295,6 +1294,7 @@ sig_handler handle_sigint(int sig)
goto err;
}
+ /* First time try to kill the query, second time the connection */
interrupted_query++;
/* mysqld < 5 does not understand KILL QUERY, skip to KILL CONNECTION */
@@ -1305,10 +1305,13 @@ sig_handler handle_sigint(int sig)
sprintf(kill_buffer, "KILL %s%lu",
(interrupted_query == 1) ? "QUERY " : "",
mysql_thread_id(&mysql));
- tee_fprintf(stdout, "Ctrl-C -- sending \"%s\" to server ...\n", kill_buffer);
+ if (verbose)
+ tee_fprintf(stdout, "Ctrl-C -- sending \"%s\" to server ...\n",
+ kill_buffer);
mysql_real_query(kill_mysql, kill_buffer, (uint) strlen(kill_buffer));
mysql_close(kill_mysql);
- tee_fprintf(stdout, "Ctrl-C -- query aborted.\n");
+ tee_fprintf(stdout, "Ctrl-C -- query killed. Continuing normally.\n");
+ interrupted_query= 0;
return;
@@ -1321,7 +1324,6 @@ err:
handler called mysql_end().
*/
mysql_thread_end();
- return;
#else
mysql_end(sig);
#endif
@@ -2881,13 +2883,8 @@ com_help(String *buffer __attribute__((u
return com_server_help(buffer,line,help_arg);
}
- put_info("\nFor information about MySQL products and services, visit:\n"
- " http://www.mysql.com/\n"
- "For developer information, including the MySQL Reference Manual, "
- "visit:\n"
- " http://dev.mysql.com/\n"
- "To buy MySQL Enterprise support, training, or other products, visit:\n"
- " https://shop.mysql.com/\n", INFO_INFO);
+ put_info("\nGeneral information about MariaDB can be found at\n"
+ "http://askmonty.org/wiki/index.php/Manual:Contents\n", INFO_INFO);
put_info("List of all MySQL commands:", INFO_INFO);
if (!named_cmds)
put_info("Note that all text commands must be first on line and end with ';'",INFO_INFO);
=== modified file 'client/mysqlcheck.c'
--- a/client/mysqlcheck.c 2009-09-28 06:24:19 +0000
+++ b/client/mysqlcheck.c 2009-12-03 11:19:05 +0000
@@ -857,7 +857,8 @@ int main(int argc, char **argv)
if (!opt_write_binlog)
{
- if (disable_binlog()) {
+ if (disable_binlog())
+ {
first_error= 1;
goto end;
}
=== modified file 'client/mysqlslap.c'
--- a/client/mysqlslap.c 2009-11-30 21:37:27 +0000
+++ b/client/mysqlslap.c 2009-12-03 11:34:11 +0000
@@ -472,11 +472,10 @@ void concurrency_loop(MYSQL *mysql, uint
if (commit_rate)
run_query(mysql, "SET AUTOCOMMIT=0", strlen("SET AUTOCOMMIT=0"));
- if (pre_system)
- if ((sysret= system(pre_system)) != 0)
- fprintf(stderr,
- "Warning: Execution of pre_system option returned %d.\n",
- sysret);
+ if (pre_system && (sysret= system(pre_system)) != 0)
+ fprintf(stderr,
+ "Warning: Execution of pre_system option returned %d.\n",
+ sysret);
/*
Pre statements are always run after all other logic so they can
@@ -490,11 +489,10 @@ void concurrency_loop(MYSQL *mysql, uint
if (post_statements)
run_statements(mysql, post_statements);
- if (post_system)
- if ((sysret= system(post_system)) != 0)
- fprintf(stderr,
- "Warning: Execution of post_system option returned %d.\n",
- sysret);
+ if (post_system && (sysret= system(post_system)) != 0)
+ fprintf(stderr,
+ "Warning: Execution of post_system option returned %d.\n",
+ sysret);
/* We are finished with this run */
if (auto_generate_sql_autoincrement || auto_generate_sql_guid_primary)
drop_primary_key_list();
=== modified file 'client/mysqltest.cc'
--- a/client/mysqltest.cc 2009-11-16 20:49:51 +0000
+++ b/client/mysqltest.cc 2009-12-03 11:19:05 +0000
@@ -3497,9 +3497,10 @@ void do_diff_files(struct st_command *co
if ((error= compare_files(ds_filename.str, ds_filename2.str)) &&
match_expected_error(command, error, NULL) < 0)
{
- /* Compare of the two files failed, append them to output
- so the failure can be analyzed, but only if it was not
- expected to fail.
+ /*
+ Compare of the two files failed, append them to output
+ so the failure can be analyzed, but only if it was not
+ expected to fail.
*/
show_diff(&ds_res, ds_filename.str, ds_filename2.str);
log_file.write(&ds_res);
@@ -5013,7 +5014,8 @@ void do_connect(struct st_command *comma
con_options= ds_options.str;
while (*con_options)
{
- char* end;
+ size_t length;
+ char *end;
/* Step past any spaces in beginning of option*/
while (*con_options && my_isspace(charset_info, *con_options))
con_options++;
@@ -5021,13 +5023,14 @@ void do_connect(struct st_command *comma
end= con_options;
while (*end && !my_isspace(charset_info, *end))
end++;
- if (!strncmp(con_options, "SSL", 3))
+ length= (size_t) (end - con_options);
+ if (length == 3 && !strncmp(con_options, "SSL", 3))
con_ssl= 1;
- else if (!strncmp(con_options, "COMPRESS", 8))
+ else if (length == 8 && !strncmp(con_options, "COMPRESS", 8))
con_compress= 1;
- else if (!strncmp(con_options, "PIPE", 4))
+ else if (length == 4 && !strncmp(con_options, "PIPE", 4))
con_pipe= 1;
- else if (!strncmp(con_options, "SHM", 3))
+ else if (length == 3 && !strncmp(con_options, "SHM", 3))
con_shm= 1;
else
die("Illegal option to connect: %.*s",
@@ -5096,14 +5099,13 @@ void do_connect(struct st_command *comma
mysql_options(&con_slot->mysql, MYSQL_SHARED_MEMORY_BASE_NAME, ds_shm.str);
mysql_options(&con_slot->mysql, MYSQL_OPT_PROTOCOL, &protocol);
}
- else if(shared_memory_base_name)
+ else if (shared_memory_base_name)
{
mysql_options(&con_slot->mysql, MYSQL_SHARED_MEMORY_BASE_NAME,
- shared_memory_base_name);
+ shared_memory_base_name);
}
#endif
-
/* Use default db name */
if (ds_database.length == 0)
dynstr_set(&ds_database, opt_db);
@@ -6879,10 +6881,8 @@ void run_query_stmt(MYSQL *mysql, struct
MYSQL_STMT *stmt;
DYNAMIC_STRING ds_prepare_warnings;
DYNAMIC_STRING ds_execute_warnings;
- ulonglong affected_rows;
DBUG_ENTER("run_query_stmt");
DBUG_PRINT("query", ("'%-.60s'", query));
- LINT_INIT(affected_rows);
/*
Init a new stmt if it's not already one created for this connection
@@ -6981,6 +6981,9 @@ void run_query_stmt(MYSQL *mysql, struct
handle_no_error(command);
if (!disable_result_log)
{
+ ulonglong affected_rows;
+ LINT_INIT(affected_rows);
+
/*
Not all statements creates a result set. If there is one we can
now create another normal result set that contains the meta
@@ -7026,39 +7029,33 @@ void run_query_stmt(MYSQL *mysql, struct
Need to grab affected rows information before getting
warnings here
*/
- {
- ulonglong affected_rows;
- LINT_INIT(affected_rows);
+ if (!disable_info)
+ affected_rows= mysql_affected_rows(mysql);
- if (!disable_info)
- affected_rows= mysql_affected_rows(mysql);
+ if (!disable_warnings)
+ {
+ /* Get the warnings from execute */
- if (!disable_warnings)
+ /* Append warnings to ds - if there are any */
+ if (append_warnings(&ds_execute_warnings, mysql) ||
+ ds_execute_warnings.length ||
+ ds_prepare_warnings.length ||
+ ds_warnings->length)
{
- /* Get the warnings from execute */
-
- /* Append warnings to ds - if there are any */
- if (append_warnings(&ds_execute_warnings, mysql) ||
- ds_execute_warnings.length ||
- ds_prepare_warnings.length ||
- ds_warnings->length)
- {
- dynstr_append_mem(ds, "Warnings:\n", 10);
- if (ds_warnings->length)
- dynstr_append_mem(ds, ds_warnings->str,
- ds_warnings->length);
- if (ds_prepare_warnings.length)
- dynstr_append_mem(ds, ds_prepare_warnings.str,
- ds_prepare_warnings.length);
- if (ds_execute_warnings.length)
- dynstr_append_mem(ds, ds_execute_warnings.str,
- ds_execute_warnings.length);
- }
+ dynstr_append_mem(ds, "Warnings:\n", 10);
+ if (ds_warnings->length)
+ dynstr_append_mem(ds, ds_warnings->str,
+ ds_warnings->length);
+ if (ds_prepare_warnings.length)
+ dynstr_append_mem(ds, ds_prepare_warnings.str,
+ ds_prepare_warnings.length);
+ if (ds_execute_warnings.length)
+ dynstr_append_mem(ds, ds_execute_warnings.str,
+ ds_execute_warnings.length);
}
-
- if (!disable_info)
- append_info(ds, affected_rows, mysql_info(mysql));
}
+ if (!disable_info)
+ append_info(ds, affected_rows, mysql_info(mysql));
}
end:
@@ -7235,7 +7232,6 @@ void run_query(struct st_connection *cn,
}
dynstr_free(&query_str);
-
}
if (sp_protocol_enabled &&
@@ -7662,6 +7658,7 @@ int main(int argc, char **argv)
my_bool q_send_flag= 0, abort_flag= 0;
uint command_executed= 0, last_command_executed= 0;
char save_file[FN_REFLEN];
+ bool empty_result= FALSE;
MY_INIT(argv[0]);
save_file[0]= 0;
@@ -7819,6 +7816,7 @@ int main(int argc, char **argv)
verbose_msg("Start processing test commands from '%s' ...", cur_file->file_name);
while (!read_command(&command) && !abort_flag)
{
+ my_bool ok_to_do;
int current_line_inc = 1, processed = 0;
if (command->type == Q_UNKNOWN || command->type == Q_COMMENT_WITH_COMMAND)
get_command_type(command);
@@ -7831,7 +7829,7 @@ int main(int argc, char **argv)
command->type= Q_COMMENT;
}
- my_bool ok_to_do= cur_block->ok;
+ ok_to_do= cur_block->ok;
/*
Some commands need to be "done" the first time if they may get
re-iterated over in a true context. This can only happen if there's
@@ -8167,8 +8165,6 @@ int main(int argc, char **argv)
if (parsing_disabled)
die("Test ended with parsing disabled");
- my_bool empty_result= FALSE;
-
/*
The whole test has been executed _sucessfully_.
Time to compare result or save it to record file.
=== modified file 'dbug/dbug.c'
--- a/dbug/dbug.c 2009-09-07 20:50:10 +0000
+++ b/dbug/dbug.c 2009-12-07 00:52:40 +0000
@@ -497,12 +497,18 @@ int DbugParse(CODE_STATE *cs, const char
const char *end;
int rel, f_used=0;
struct settings *stack;
+ int org_cs_locked;
stack= cs->stack;
+ if (!(org_cs_locked= cs->locked))
+ {
+ cs->locked= 1;
+ pthread_mutex_lock(&THR_LOCK_dbug);
+ }
+
if (control[0] == '-' && control[1] == '#')
control+=2;
-
rel= control[0] == '+' || control[0] == '-';
if ((!rel || (!stack->out_file && !stack->next)))
{
@@ -550,9 +556,11 @@ int DbugParse(CODE_STATE *cs, const char
while (control < end)
{
int c, sign= (*control == '+') ? 1 : (*control == '-') ? -1 : 0;
- if (sign) control++;
+ if (sign)
+ control++;
c= *control++;
- if (*control == ',') control++;
+ if (*control == ',')
+ control++;
/* XXX when adding new cases here, don't forget _db_explain_ ! */
switch (c) {
case 'd':
@@ -570,7 +578,7 @@ int DbugParse(CODE_STATE *cs, const char
{
if (DEBUGGING)
stack->keywords= ListDel(stack->keywords, control, end);
- break;
+ break;
}
stack->keywords= ListAdd(stack->keywords, control, end);
stack->flags |= DEBUG_ON;
@@ -718,8 +726,13 @@ int DbugParse(CODE_STATE *cs, const char
control=end+1;
end= DbugStrTok(control);
}
- return !rel || f_used;
-}
+ if (!org_cs_locked)
+ {
+ pthread_mutex_unlock(&THR_LOCK_dbug);
+ cs->locked= 0;
+ }
+ return !rel || f_used;}
+
#define framep_trace_flag(cs, frp) (frp ? \
frp->level & TRACE_ON : \
@@ -1340,11 +1353,11 @@ void _db_doprnt_(const char *format,...)
va_start(args,format);
+ if (!cs->locked)
+ pthread_mutex_lock(&THR_LOCK_dbug);
if (_db_keyword_(cs, cs->u_keyword, 0))
{
int save_errno=errno;
- if (!cs->locked)
- pthread_mutex_lock(&THR_LOCK_dbug);
DoPrefix(cs, cs->u_line);
if (TRACING)
Indent(cs, cs->level + 1);
@@ -1356,6 +1369,9 @@ void _db_doprnt_(const char *format,...)
DbugFlush(cs);
errno=save_errno;
}
+ else if (!cs->locked)
+ pthread_mutex_unlock(&THR_LOCK_dbug);
+
va_end(args);
}
@@ -1386,10 +1402,10 @@ void _db_dump_(uint _line_, const char *
CODE_STATE *cs;
get_code_state_or_return;
+ if (!cs->locked)
+ pthread_mutex_lock(&THR_LOCK_dbug);
if (_db_keyword_(cs, keyword, 0))
{
- if (!cs->locked)
- pthread_mutex_lock(&THR_LOCK_dbug);
DoPrefix(cs, _line_);
if (TRACING)
{
@@ -1420,6 +1436,8 @@ void _db_dump_(uint _line_, const char *
(void) fputc('\n',cs->stack->out_file);
DbugFlush(cs);
}
+ else if (!cs->locked)
+ pthread_mutex_unlock(&THR_LOCK_dbug);
}
@@ -2105,7 +2123,8 @@ static void DBUGCloseFile(CODE_STATE *cs
{
if (fp != stderr && fp != stdout && fclose(fp) == EOF)
{
- pthread_mutex_lock(&THR_LOCK_dbug);
+ if (!cs->locked)
+ pthread_mutex_lock(&THR_LOCK_dbug);
(void) fprintf(cs->stack->out_file, ERR_CLOSE, cs->process);
perror("");
DbugFlush(cs);
=== modified file 'extra/yassl/taocrypt/include/block.hpp'
--- a/extra/yassl/taocrypt/include/block.hpp 2009-02-10 22:47:54 +0000
+++ b/extra/yassl/taocrypt/include/block.hpp 2009-12-06 17:34:54 +0000
@@ -167,7 +167,8 @@ public:
void CleanNew(word32 newSize)
{
New(newSize);
- memset(buffer_, 0, sz_ * sizeof(T));
+ if (sz_ > 0)
+ memset(buffer_, 0, sz_ * sizeof(T));
}
void New(word32 newSize)
=== modified file 'mysql-test/lib/mtr_cases.pm'
--- a/mysql-test/lib/mtr_cases.pm 2009-11-16 20:49:51 +0000
+++ b/mysql-test/lib/mtr_cases.pm 2009-12-06 17:34:54 +0000
@@ -101,7 +101,6 @@ sub init_pattern {
sub collect_test_cases ($$) {
my $suites= shift; # Semicolon separated list of test suites
- my %found_suites;
my $opt_cases= shift;
my $cases= []; # Array of hash(one hash for each testcase)
@@ -115,7 +114,6 @@ sub collect_test_cases ($$) {
["ha_innodb_plugin.dll", "ha_innodb_plugin.so",
"ha_innodb_plugin.sl"],
NOT_REQUIRED);
-
$do_innodb_plugin= ($::mysql_version_id >= 50100 &&
!(IS_WINDOWS && $::opt_embedded_server) &&
$lib_innodb_plugin);
@@ -123,7 +121,6 @@ sub collect_test_cases ($$) {
foreach my $suite (split(",", $suites))
{
push(@$cases, collect_one_suite($suite, $opt_cases));
- $found_suites{$suite}= 1;
last if $some_test_found;
}
@@ -136,12 +133,6 @@ sub collect_test_cases ($$) {
{
my $found= 0;
my ($sname, $tname, $extension)= split_testname($test_name_spec);
- if (defined($sname) && !defined($found_suites{$sname}))
- {
- $found_suites{$sname}= 1;
- push(@$cases, collect_one_suite($sname));
- }
-
foreach my $test ( @$cases )
{
# test->{name} is always in suite.name format
@@ -247,7 +238,7 @@ sub split_testname {
}
-sub collect_one_suite($)
+sub collect_one_suite
{
my $suite= shift; # Test suite name
my $opt_cases= shift;
@@ -767,7 +758,6 @@ sub process_opts_file {
}
}
-
##############################################################################
#
# Collect information about a single test case
=== modified file 'mysql-test/lib/mtr_report.pm'
--- a/mysql-test/lib/mtr_report.pm 2009-11-16 20:49:51 +0000
+++ b/mysql-test/lib/mtr_report.pm 2009-12-03 11:19:05 +0000
@@ -388,7 +388,7 @@ MSG
}
elsif (@$extra_warnings)
{
- mtr_error("There were errors/warnings in server logs after running test cases.");
+ mtr_error("There where errors/warnings in server logs after running test cases.");
}
elsif ($fail)
{
=== modified file 'mysql-test/lib/v1/mysql-test-run.pl'
--- a/mysql-test/lib/v1/mysql-test-run.pl 2009-02-15 10:58:34 +0000
+++ b/mysql-test/lib/v1/mysql-test-run.pl 2009-12-09 16:43:00 +0000
@@ -178,6 +178,7 @@ our @opt_extra_mysqltest_opt;
our $opt_compress;
our $opt_ssl;
+our $opt_skip_ssl;
our $opt_ssl_supported;
our $opt_ps_protocol;
our $opt_sp_protocol;
=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl 2009-11-30 21:37:27 +0000
+++ b/mysql-test/mysql-test-run.pl 2009-12-06 17:34:54 +0000
@@ -201,10 +201,10 @@ my $opt_mark_progress;
my $opt_sleep;
-my $opt_testcase_timeout= 15; # minutes
-my $opt_suite_timeout = 300; # minutes
-my $opt_shutdown_timeout= 10; # seconds
-my $opt_start_timeout = 180; # seconds
+my $opt_testcase_timeout= 15; # 15 minutes
+my $opt_suite_timeout = 360; # 6 hours
+my $opt_shutdown_timeout= 10; # 10 seconds
+my $opt_start_timeout = 180; # 180 seconds
sub testcase_timeout { return $opt_testcase_timeout * 60; };
sub suite_timeout { return $opt_suite_timeout * 60; };
@@ -1319,6 +1319,8 @@ sub command_line_setup {
{
# Indicate that we are using debugger
$glob_debugger= 1;
+ $opt_testcase_timeout= 60*60*24; # Don't abort debugging with timeout
+ $opt_suite_timeout= $opt_testcase_timeout;
$opt_retry= 1;
$opt_retry_failure= 1;
@@ -2151,7 +2153,6 @@ sub environment_setup {
# Create an environment variable to make it possible
# to detect that valgrind is being used from test cases
$ENV{'VALGRIND_TEST'}= $opt_valgrind;
-
}
@@ -2908,8 +2909,8 @@ sub mysql_install_db {
my $bootstrap_sql_file= "$opt_vardir/tmp/bootstrap.sql";
my $path_sql= my_find_file($install_basedir,
- ["mysql", "sql/share", "share/mysql",
- "share/mariadb", "share", "scripts"],
+ ["mysql", "sql/share", "share/mariadb",
+ "share/mysql", "share", "scripts"],
"mysql_system_tables.sql",
NOT_REQUIRED);
@@ -3861,7 +3862,7 @@ sub extract_server_log ($$) {
my ($error_log, $tname) = @_;
# Open the servers .err log file and read all lines
- # belonging to current tets into @lines
+ # belonging to current test into @lines
my $Ferr = IO::File->new($error_log)
or mtr_error("Could not open file '$error_log' for reading: $!");
@@ -5682,12 +5683,15 @@ Misc options
servers to exit before finishing the process
fast Run as fast as possible, dont't wait for servers
to shutdown etc.
- parallel=N Run tests in N parallel threads (default=1)
+ parallel=N Run tests in N parallel threads (default 1)
Use parallel=auto for auto-setting of N
repeat=N Run each test N number of times
- retry=N Retry tests that fail N times, limit number of failures
- to $opt_retry_failure
- retry-failure=N Limit number of retries for a failed test
+ retry=N Retry tests that fail up to N times (default $opt_retry).
+ Retries are also limited by the maximum number of
+ failures before stopping, set with the --retry-failure
+ option
+ retry-failure=N When using the --retry option to retry failed tests,
+ stop when N failures have occured (default $opt_retry_failure)
reorder Reorder tests to get fewer server restarts
help Get this help text
=== modified file 'mysql-test/r/ctype_ucs.result'
--- a/mysql-test/r/ctype_ucs.result 2008-12-23 14:21:01 +0000
+++ b/mysql-test/r/ctype_ucs.result 2009-12-03 12:02:37 +0000
@@ -1211,3 +1211,47 @@ HEX(DAYNAME(19700101))
0427043504420432043504400433
SET character_set_connection=latin1;
End of 5.0 tests
+Start of 5.1 tests
+SET NAMES utf8;
+CREATE TABLE t1 (
+a varchar(10) CHARACTER SET ucs2 COLLATE ucs2_czech_ci,
+key(a)
+);
+INSERT INTO t1 VALUES
+('aa'),('bb'),('cc'),('dd'),('ee'),('ff'),('gg'),('hh'),('ii'),
+('jj'),('kk'),('ll'),('mm'),('nn'),('oo'),('pp'),('rr'),('ss'),
+('tt'),('uu'),('vv'),('ww'),('xx'),('yy'),('zz');
+INSERT INTO t1 VALUES ('ca'),('cz'),('ch');
+INSERT INTO t1 VALUES ('da'),('dz'), (X'0064017E');
+EXPLAIN SELECT * FROM t1 WHERE a LIKE 'b%';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range a a 23 NULL 1 Using where; Using index
+EXPLAIN SELECT * FROM t1 WHERE a LIKE 'c%';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range a a 23 NULL 30 Using where; Using index
+SELECT * FROM t1 WHERE a LIKE 'c%';
+a
+ca
+cc
+cz
+ch
+EXPLAIN SELECT * FROM t1 WHERE a LIKE 'ch%';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range a a 23 NULL 1 Using where; Using index
+SELECT * FROM t1 WHERE a LIKE 'ch%';
+a
+ch
+ALTER TABLE t1 MODIFY a VARCHAR(10) CHARACTER SET ucs2 COLLATE ucs2_croatian_ci;
+EXPLAIN SELECT * FROM t1 WHERE a LIKE 'd%';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range a a 23 NULL 1 Using where; Using index
+SELECT hex(concat('d',_ucs2 0x017E,'%'));
+hex(concat('d',_ucs2 0x017E,'%'))
+0064017E0025
+EXPLAIN SELECT * FROM t1 WHERE a LIKE concat('d',_ucs2 0x017E,'%');
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range a a 23 NULL 1 Using where; Using index
+SELECT hex(a) FROM t1 WHERE a LIKE concat('D',_ucs2 0x017E,'%');
+hex(a)
+0064017E
+DROP TABLE t1;
=== modified file 'mysql-test/r/warnings.result'
--- a/mysql-test/r/warnings.result 2009-09-10 08:49:49 +0000
+++ b/mysql-test/r/warnings.result 2009-12-06 17:26:12 +0000
@@ -319,3 +319,17 @@ SHOW ERRORS;
Level Code Message
Error 1051 Unknown table 't1'
End of 5.0 tests
+set sql_mode = default;
+select CAST(a AS DECIMAL(13,5)) FROM (SELECT '' as a) t;
+CAST(a AS DECIMAL(13,5))
+0.00000
+Warnings:
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Warning 1292 Truncated incorrect DECIMAL value: ''
+create table t1 (a integer unsigned);
+insert into t1 values (1),(-1),(0),(-2);
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 2
+Warning 1264 Out of range value for column 'a' at row 4
+drop table t1;
+End of 5.1 tests
=== modified file 'mysql-test/suite/federated/disabled.def'
--- a/mysql-test/suite/federated/disabled.def 2009-10-30 18:50:56 +0000
+++ b/mysql-test/suite/federated/disabled.def 2009-11-14 19:33:59 +0000
@@ -9,5 +9,4 @@
# Do not use any TAB characters for whitespace.
#
##############################################################################
-federated_server : needs fixup
=== modified file 'mysql-test/suite/federated/federated_server.result'
--- a/mysql-test/suite/federated/federated_server.result 2009-10-30 18:50:56 +0000
+++ b/mysql-test/suite/federated/federated_server.result 2009-11-14 19:33:59 +0000
@@ -175,6 +175,8 @@ CREATE TABLE db_bogus.t1 (
)
;
INSERT INTO db_bogus.t1 VALUES ('2','this is bogus');
+create user test_fed@localhost identified by 'foo';
+grant all on db_legitimate.* to test_fed@localhost;
create server 's1' foreign data wrapper 'mysql' options
(HOST '127.0.0.1',
DATABASE 'db_legitimate',
@@ -211,15 +213,14 @@ id name
alter server s1 options (database 'db_bogus');
flush tables;
select * from federated.t1;
-id name
-2 this is bogus
+ERROR HY000: There was a problem processing the query on the foreign data source. Data source error: : 1044 : Access denied for user 'test_fed'@'localhost' to databa
drop server if exists 's1';
ERROR 42000: Access denied; you need the SUPER privilege for this operation
create server 's1' foreign data wrapper 'mysql' options
(HOST '127.0.0.1',
DATABASE 'db_legitimate',
-USER 'root',
-PASSWORD '',
+USER 'test_fed',
+PASSWORD 'foo',
PORT SLAVE_PORT,
SOCKET '',
OWNER 'root');
@@ -228,8 +229,8 @@ drop server 's1';
create server 's1' foreign data wrapper 'mysql' options
(HOST '127.0.0.1',
DATABASE 'db_legitimate',
-USER 'root',
-PASSWORD '',
+USER 'test_fed',
+PASSWORD 'foo',
PORT SLAVE_PORT,
SOCKET '',
OWNER 'root');
@@ -237,6 +238,7 @@ flush tables;
select * from federated.t1;
id name
1 this is legitimate
+drop user test_fed@localhost;
drop database db_legitimate;
drop database db_bogus;
drop user guest_super@localhost;
@@ -275,6 +277,6 @@ call p1();
drop procedure p1;
drop server if exists s;
DROP TABLE IF EXISTS federated.t1;
-DROP DATABASE federated;
+DROP DATABASE IF EXISTS federated;
DROP TABLE IF EXISTS federated.t1;
-DROP DATABASE federated;
+DROP DATABASE IF EXISTS federated;
=== modified file 'mysql-test/suite/federated/federated_server.test'
--- a/mysql-test/suite/federated/federated_server.test 2009-10-30 18:50:56 +0000
+++ b/mysql-test/suite/federated/federated_server.test 2009-11-14 19:33:59 +0000
@@ -239,6 +239,7 @@ alter server s1 options (database 'db_bo
connection master;
flush tables;
+--error ER_QUERY_ON_FOREIGN_DATA_SOURCE
select * from federated.t1;
connection conn_select;
@@ -249,8 +250,8 @@ drop server if exists 's1';
eval create server 's1' foreign data wrapper 'mysql' options
(HOST '127.0.0.1',
DATABASE 'db_legitimate',
- USER 'root',
- PASSWORD '',
+ USER 'test_fed',
+ PASSWORD 'foo',
PORT $SLAVE_MYPORT,
SOCKET '',
OWNER 'root');
@@ -261,8 +262,8 @@ drop server 's1';
eval create server 's1' foreign data wrapper 'mysql' options
(HOST '127.0.0.1',
DATABASE 'db_legitimate',
- USER 'root',
- PASSWORD '',
+ USER 'test_fed',
+ PASSWORD 'foo',
PORT $SLAVE_MYPORT,
SOCKET '',
OWNER 'root');
@@ -273,6 +274,7 @@ select * from federated.t1;
# clean up test
connection slave;
+drop user test_fed@localhost;
drop database db_legitimate;
drop database db_bogus;
=== modified file 'mysql-test/suite/funcs_1/r/innodb_func_view.result'
--- a/mysql-test/suite/funcs_1/r/innodb_func_view.result 2009-05-15 12:57:51 +0000
+++ b/mysql-test/suite/funcs_1/r/innodb_func_view.result 2009-12-06 17:26:12 +0000
@@ -3372,9 +3372,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 29
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as decimal(37,2)) AS `CAST(my_varbinary_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3389,9 +3389,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 29
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
DROP VIEW v1;
@@ -3408,11 +3408,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 28
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ' ---īŋŊīŋŊīŋŊ*$-- '
Warning 1292 Truncated incorrect DECIMAL value: '-1'
Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333'
@@ -3430,11 +3430,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 28
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ' ---īŋŊīŋŊīŋŊ*$-- '
Warning 1292 Truncated incorrect DECIMAL value: '-1'
Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333'
@@ -3454,9 +3454,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 27
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as decimal(37,2)) AS `CAST(my_varchar_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3471,9 +3471,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 27
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
DROP VIEW v1;
@@ -3490,11 +3490,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 26
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ' '
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ' ---īŋŊīŋŊīŋŊ*$-- '
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
@@ -3510,11 +3510,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 26
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ' '
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ' ---īŋŊīŋŊīŋŊ*$-- '
DROP VIEW v1;
=== modified file 'mysql-test/suite/funcs_1/r/memory_func_view.result'
--- a/mysql-test/suite/funcs_1/r/memory_func_view.result 2009-02-14 16:00:11 +0000
+++ b/mysql-test/suite/funcs_1/r/memory_func_view.result 2009-12-06 17:26:12 +0000
@@ -3373,9 +3373,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 29
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as decimal(37,2)) AS `CAST(my_varbinary_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3390,9 +3390,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 29
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
DROP VIEW v1;
@@ -3409,11 +3409,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 28
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ' ---īŋŊīŋŊīŋŊ*$-- '
Warning 1292 Truncated incorrect DECIMAL value: '-1'
Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333'
@@ -3431,11 +3431,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 28
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ' ---īŋŊīŋŊīŋŊ*$-- '
Warning 1292 Truncated incorrect DECIMAL value: '-1'
Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333'
@@ -3455,9 +3455,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 27
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as decimal(37,2)) AS `CAST(my_varchar_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3472,9 +3472,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 27
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
DROP VIEW v1;
@@ -3491,11 +3491,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 26
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ' '
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ' ---īŋŊīŋŊīŋŊ*$-- '
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
@@ -3511,11 +3511,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 26
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ' '
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ' ---īŋŊīŋŊīŋŊ*$-- '
DROP VIEW v1;
=== modified file 'mysql-test/suite/funcs_1/r/myisam_func_view.result'
--- a/mysql-test/suite/funcs_1/r/myisam_func_view.result 2009-02-14 16:00:11 +0000
+++ b/mysql-test/suite/funcs_1/r/myisam_func_view.result 2009-12-06 17:26:12 +0000
@@ -3373,9 +3373,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 29
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as decimal(37,2)) AS `CAST(my_varbinary_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3390,9 +3390,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 29
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
DROP VIEW v1;
@@ -3409,11 +3409,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 28
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ' ---īŋŊīŋŊīŋŊ*$-- '
Warning 1292 Truncated incorrect DECIMAL value: '-1'
Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333'
@@ -3431,11 +3431,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 28
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ' ---īŋŊīŋŊīŋŊ*$-- '
Warning 1292 Truncated incorrect DECIMAL value: '-1'
Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333'
@@ -3455,9 +3455,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 27
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as decimal(37,2)) AS `CAST(my_varchar_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3472,9 +3472,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 27
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
DROP VIEW v1;
@@ -3491,11 +3491,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 26
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ' '
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ' ---īŋŊīŋŊīŋŊ*$-- '
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
@@ -3511,11 +3511,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 26
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ' '
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ' ---īŋŊīŋŊīŋŊ*$-- '
DROP VIEW v1;
=== modified file 'mysql-test/t/ctype_ucs.test'
--- a/mysql-test/t/ctype_ucs.test 2008-12-23 14:21:01 +0000
+++ b/mysql-test/t/ctype_ucs.test 2009-12-03 12:02:37 +0000
@@ -723,3 +723,34 @@ SELECT HEX(DAYNAME(19700101));
SET character_set_connection=latin1;
--echo End of 5.0 tests
+
+
+--echo Start of 5.1 tests
+#
+# Checking my_like_range_ucs2
+#
+SET NAMES utf8;
+CREATE TABLE t1 (
+ a varchar(10) CHARACTER SET ucs2 COLLATE ucs2_czech_ci,
+ key(a)
+);
+INSERT INTO t1 VALUES
+('aa'),('bb'),('cc'),('dd'),('ee'),('ff'),('gg'),('hh'),('ii'),
+('jj'),('kk'),('ll'),('mm'),('nn'),('oo'),('pp'),('rr'),('ss'),
+('tt'),('uu'),('vv'),('ww'),('xx'),('yy'),('zz');
+INSERT INTO t1 VALUES ('ca'),('cz'),('ch');
+INSERT INTO t1 VALUES ('da'),('dz'), (X'0064017E');
+# This one should scan only one row
+EXPLAIN SELECT * FROM t1 WHERE a LIKE 'b%';
+# This one should scan many rows: 'c' is a contraction head
+EXPLAIN SELECT * FROM t1 WHERE a LIKE 'c%';
+SELECT * FROM t1 WHERE a LIKE 'c%';
+EXPLAIN SELECT * FROM t1 WHERE a LIKE 'ch%';
+SELECT * FROM t1 WHERE a LIKE 'ch%';
+ALTER TABLE t1 MODIFY a VARCHAR(10) CHARACTER SET ucs2 COLLATE ucs2_croatian_ci;
+EXPLAIN SELECT * FROM t1 WHERE a LIKE 'd%';
+SELECT hex(concat('d',_ucs2 0x017E,'%'));
+EXPLAIN SELECT * FROM t1 WHERE a LIKE concat('d',_ucs2 0x017E,'%');
+SELECT hex(a) FROM t1 WHERE a LIKE concat('D',_ucs2 0x017E,'%');
+
+DROP TABLE t1;
=== modified file 'mysql-test/t/warnings.test'
--- a/mysql-test/t/warnings.test 2009-11-16 20:49:51 +0000
+++ b/mysql-test/t/warnings.test 2009-12-06 17:26:12 +0000
@@ -194,7 +194,6 @@ DROP PROCEDURE sp1;
DROP PROCEDURE sp2;
DROP PROCEDURE sp3;
-
#
# Bug#30059: End-space truncation warnings are inconsistent or incorrect
#
@@ -235,3 +234,15 @@ DROP TABLE t1;
SHOW ERRORS;
--echo End of 5.0 tests
+
+#
+# Test warning with row numbers
+#
+
+set sql_mode = default;
+select CAST(a AS DECIMAL(13,5)) FROM (SELECT '' as a) t;
+create table t1 (a integer unsigned);
+insert into t1 values (1),(-1),(0),(-2);
+drop table t1;
+
+--echo End of 5.1 tests
=== modified file 'plugin/fulltext/plugin_example.c'
--- a/plugin/fulltext/plugin_example.c 2007-04-26 19:26:04 +0000
+++ b/plugin/fulltext/plugin_example.c 2009-12-06 17:34:54 +0000
@@ -145,7 +145,7 @@ static int simple_parser_deinit(MYSQL_FT
the list of search terms when parsing a search string.
*/
-static void add_word(MYSQL_FTPARSER_PARAM *param, char *word, size_t len)
+static void add_word(MYSQL_FTPARSER_PARAM *param, const unsigned char *word, size_t len)
{
MYSQL_FTPARSER_BOOLEAN_INFO bool_info=
{ FT_TOKEN_WORD, 0, 0, 0, 0, ' ', 0 };
@@ -169,7 +169,7 @@ static void add_word(MYSQL_FTPARSER_PARA
static int simple_parser_parse(MYSQL_FTPARSER_PARAM *param)
{
- char *end, *start, *docend= param->doc + param->length;
+ const unsigned char *end, *start, *docend= param->doc + param->length;
number_of_calls++;
=== modified file 'sql-common/client.c'
--- a/sql-common/client.c 2009-11-16 20:49:51 +0000
+++ b/sql-common/client.c 2009-12-03 15:26:54 +0000
@@ -3208,7 +3208,7 @@ const char * STDCALL mysql_error(MYSQL *
mysql Connection
EXAMPLE
- 4.1.0-alfa -> 40100
+ MariaDB-4.1.0-alfa -> 40100
NOTES
We will ensure that a newer server always has a bigger number.
@@ -3221,7 +3221,11 @@ ulong STDCALL
mysql_get_server_version(MYSQL *mysql)
{
uint major, minor, version;
- char *pos= mysql->server_version, *end_pos;
+ const char *pos= mysql->server_version;
+ char *end_pos;
+ /* Skip possible prefix */
+ while (*pos && !my_isdigit(&my_charset_latin1, *pos))
+ pos++;
major= (uint) strtoul(pos, &end_pos, 10); pos=end_pos+1;
minor= (uint) strtoul(pos, &end_pos, 10); pos=end_pos+1;
version= (uint) strtoul(pos, &end_pos, 10);
=== modified file 'sql/my_decimal.cc'
--- a/sql/my_decimal.cc 2008-11-27 11:33:04 +0000
+++ b/sql/my_decimal.cc 2009-12-06 17:26:12 +0000
@@ -38,7 +38,7 @@ int decimal_operation_results(int result
case E_DEC_TRUNCATED:
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
WARN_DATA_TRUNCATED, ER(WARN_DATA_TRUNCATED),
- "", (long)-1);
+ "", (ulong) 0);
break;
case E_DEC_OVERFLOW:
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
@@ -54,7 +54,7 @@ int decimal_operation_results(int result
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
ER_TRUNCATED_WRONG_VALUE_FOR_FIELD,
ER(ER_TRUNCATED_WRONG_VALUE_FOR_FIELD),
- "decimal", "", "", (long)-1);
+ "decimal", "", "", (ulong) 0);
break;
case E_DEC_OOM:
my_error(ER_OUT_OF_RESOURCES, MYF(0));
=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc 2009-11-30 21:37:27 +0000
+++ b/sql/mysqld.cc 2009-12-04 15:12:22 +0000
@@ -4169,8 +4169,10 @@ server.");
Need to unlock as global_system_variables.table_plugin
was acquired during plugin_init()
*/
+ pthread_mutex_lock(&LOCK_global_system_variables);
plugin_unlock(0, global_system_variables.table_plugin);
global_system_variables.table_plugin= plugin;
+ pthread_mutex_unlock(&LOCK_global_system_variables);
}
}
#if defined(WITH_MARIA_STORAGE_ENGINE) && defined(USE_MARIA_FOR_TMP_TABLES)
=== modified file 'sql/share/errmsg.txt'
--- a/sql/share/errmsg.txt 2009-11-16 20:49:51 +0000
+++ b/sql/share/errmsg.txt 2009-12-06 17:26:12 +0000
@@ -3173,22 +3173,22 @@ ER_CANT_CREATE_THREAD
swe "Kan inte skapa en ny trīŋŊ(errno %d)"
ukr "īŋŊīŋŊīŋŊ īŋŊīŋŊīŋŊīŋŊ īŋŊīŋŊ ĮĻīŋŊīŋŊ(īŋŊīŋŊīŋŊīŋŊ%d). īŋŊ īŋŊ īŋŊ īŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊ īŋŊ īŋŊīŋŊīŋŊīŋŊīŋŊ īŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊ īŋŊīŋŊīŋŊ īŋŊ- īŋŊīŋŊīŋŊīŋŊīŋŊ īŋŊīŋŊīŋŊīŋŊīŋŊ
ER_WRONG_VALUE_COUNT_ON_ROW 21S01
- cze "Po-BīŋŊ sloupcīŋŊdpovīŋŊ poīŋŊ hodnot na īŋŊ %ld"
- dan "Kolonne antallet stemmer ikke overens med antallet af vīŋŊier i post %ld"
- nla "Kolom aantal komt niet overeen met waarde aantal in rij %ld"
- eng "Column count doesn't match value count at row %ld"
- est "Tulpade hulk erineb vīŋŊtuste hulgast real %ld"
- ger "Anzahl der Felder stimmt nicht mit der Anzahl der Werte in Zeile %ld īŋŊn"
- hun "Az oszlopban talalhato ertek nem egyezik meg a %ld sorban szamitott ertekkel"
- ita "Il numero delle colonne non corrisponde al conteggio alla riga %ld"
- kor "Row %ldīŋŊīŋŊīŋŊīŋŊ ÄŽīŋŊīŋŊ ÄĢīŋŊīŋŊīŋŊīŋŊvalue ÄĢīŋŊīŋŊīŋŊīŋŊīŋŊÄĄīŋŊīŋŊ īŋŊĘŊīŋŊĪ´īŋŊ"
- por "Contagem de colunas nīŋŊconfere com a contagem de valores na linha %ld"
- rum "Numarul de coloane nu corespunde cu numarul de valori la linia %ld"
- rus "īŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊ īŋŊ īŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊ īŋŊīŋŊīŋŊīŋŊ %ld"
- serbian "Broj kolona ne odgovara broju vrednosti u slogu %ld"
- spa "El nīŋŊ de columnas no corresponde al nīŋŊ en la līŋŊa %ld"
- swe "Antalet kolumner motsvarar inte antalet vīŋŊen pīŋŊad: %ld"
- ukr "īŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊ īŋŊīŋŊīŋŊīŋŊīŋŊ īŋŊËĻīŋŊËĻīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊÃĻ %ld"
+ cze "Po-BīŋŊ sloupcīŋŊdpovīŋŊ poīŋŊ hodnot na īŋŊ %lu"
+ dan "Kolonne antallet stemmer ikke overens med antallet af vīŋŊier i post %lu"
+ nla "Kolom aantal komt niet overeen met waarde aantal in rij %lu"
+ eng "Column count doesn't match value count at row %lu"
+ est "Tulpade hulk erineb vīŋŊtuste hulgast real %lu"
+ ger "Anzahl der Felder stimmt nicht mit der Anzahl der Werte in Zeile %lu īŋŊn"
+ hun "Az oszlopban talalhato ertek nem egyezik meg a %lu sorban szamitott ertekkel"
+ ita "Il numero delle colonne non corrisponde al conteggio alla riga %lu"
+ kor "Row %luīŋŊīŋŊīŋŊīŋŊ ÄŽīŋŊīŋŊ ÄĢīŋŊīŋŊīŋŊīŋŊvalue ÄĢīŋŊīŋŊīŋŊīŋŊīŋŊÄĄīŋŊīŋŊ īŋŊĘŊīŋŊĪ´īŋŊ"
+ por "Contagem de colunas nīŋŊconfere com a contagem de valores na linha %lu"
+ rum "Numarul de coloane nu corespunde cu numarul de valori la linia %lu"
+ rus "īŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊ īŋŊ īŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊ īŋŊīŋŊīŋŊīŋŊ %lu"
+ serbian "Broj kolona ne odgovara broju vrednosti u slogu %lu"
+ spa "El nīŋŊ de columnas no corresponde al nīŋŊ en la līŋŊa %lu"
+ swe "Antalet kolumner motsvarar inte antalet vīŋŊen pīŋŊad: %lu"
+ ukr "īŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊ īŋŊīŋŊīŋŊīŋŊīŋŊ īŋŊËĻīŋŊËĻīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊīŋŊÃĻ %lu"
ER_CANT_REOPEN_TABLE
cze "Nemohu znovuotev-BīŋŊabulku: '%-.192s"
dan "Kan ikke genīŋŊe tabel '%-.192s"
@@ -4887,29 +4887,29 @@ ER_CUT_VALUE_GROUP_CONCAT
swe "%d rad(er) kapades av group_concat()"
ukr "%d line(s) was(were) cut by group_concat()"
ER_WARN_TOO_FEW_RECORDS 01000
- eng "Row %ld doesn't contain data for all columns"
- ger "Zeile %ld enthīŋŊ nicht fīŋŊe Felder Daten"
- nla "Rij %ld bevat niet de data voor alle kolommen"
- por "Conta de registro īŋŊenor que a conta de coluna na linha %ld"
- spa "LīŋŊa %ld no contiene datos para todas las columnas"
+ eng "Row %lu doesn't contain data for all columns"
+ ger "Zeile %lu enthīŋŊ nicht fīŋŊe Felder Daten"
+ nla "Rij %lu bevat niet de data voor alle kolommen"
+ por "Conta de registro īŋŊenor que a conta de coluna na linha %lu"
+ spa "LīŋŊa %lu no contiene datos para todas las columnas"
ER_WARN_TOO_MANY_RECORDS 01000
- eng "Row %ld was truncated; it contained more data than there were input columns"
- ger "Zeile %ld gekīŋŊdie Zeile enthielt mehr Daten, als es Eingabefelder gibt"
- nla "Regel %ld ingekort, bevatte meer data dan invoer kolommen"
- por "Conta de registro īŋŊaior que a conta de coluna na linha %ld"
- spa "LīŋŊa %ld fuīŋŊruncada; La misma contine mas datos que las que existen en las columnas de entrada"
+ eng "Row %lu was truncated; it contained more data than there were input columns"
+ ger "Zeile %lu gekīŋŊdie Zeile enthielt mehr Daten, als es Eingabefelder gibt"
+ nla "Regel %lu ingekort, bevatte meer data dan invoer kolommen"
+ por "Conta de registro īŋŊaior que a conta de coluna na linha %lu"
+ spa "LīŋŊa %lu fuīŋŊruncada; La misma contine mas datos que las que existen en las columnas de entrada"
ER_WARN_NULL_TO_NOTNULL 22004
- eng "Column set to default value; NULL supplied to NOT NULL column '%s' at row %ld"
- ger "Feld auf Vorgabewert gesetzt, da NULL fīŋŊ-NULL-Feld '%s' in Zeile %ld angegeben"
- por "Dado truncado, NULL fornecido para NOT NULL coluna '%s' na linha %ld"
- spa "Datos truncado, NULL suministrado para NOT NULL columna '%s' en la līŋŊa %ld"
+ eng "Column set to default value; NULL supplied to NOT NULL column '%s' at row %lu"
+ ger "Feld auf Vorgabewert gesetzt, da NULL fīŋŊ-NULL-Feld '%s' in Zeile %lu angegeben"
+ por "Dado truncado, NULL fornecido para NOT NULL coluna '%s' na linha %lu"
+ spa "Datos truncado, NULL suministrado para NOT NULL columna '%s' en la līŋŊa %lu"
ER_WARN_DATA_OUT_OF_RANGE 22003
- eng "Out of range value for column '%s' at row %ld"
+ eng "Out of range value for column '%s' at row %lu"
WARN_DATA_TRUNCATED 01000
- eng "Data truncated for column '%s' at row %ld"
- ger "Daten abgeschnitten fīŋŊd '%s' in Zeile %ld"
- por "Dado truncado para coluna '%s' na linha %ld"
- spa "Datos truncados para columna '%s' en la līŋŊa %ld"
+ eng "Data truncated for column '%s' at row %lu"
+ ger "Daten abgeschnitten fīŋŊd '%s' in Zeile %lu"
+ por "Dado truncado para coluna '%s' na linha %lu"
+ spa "Datos truncados para columna '%s' en la līŋŊa %lu"
ER_WARN_USING_OTHER_HANDLER
eng "Using storage engine %s for table '%s'"
ger "FīŋŊelle '%s' wird Speicher-Engine %s benutzt"
@@ -5090,8 +5090,8 @@ ER_UNKNOWN_TIME_ZONE
eng "Unknown or incorrect time zone: '%-.64s'"
ger "Unbekannte oder falsche Zeitzone: '%-.64s'"
ER_WARN_INVALID_TIMESTAMP
- eng "Invalid TIMESTAMP value in column '%s' at row %ld"
- ger "UngīŋŊr TIMESTAMP-Wert in Feld '%s', Zeile %ld"
+ eng "Invalid TIMESTAMP value in column '%s' at row %lu"
+ ger "UngīŋŊr TIMESTAMP-Wert in Feld '%s', Zeile %lu"
ER_INVALID_CHARACTER_STRING
eng "Invalid %s character string: '%.64s'"
ger "UngīŋŊr %s-Zeichen-String: '%.64s'"
@@ -5322,8 +5322,8 @@ ER_DIVISION_BY_ZERO 22012
eng "Division by 0"
ger "Division durch 0"
ER_TRUNCATED_WRONG_VALUE_FOR_FIELD
- eng "Incorrect %-.32s value: '%-.128s' for column '%.192s' at row %ld"
- ger "Falscher %-.32s-Wert: '%-.128s' fīŋŊd '%.192s' in Zeile %ld"
+ eng "Incorrect %-.32s value: '%-.128s' for column '%.192s' at row %lu"
+ ger "Falscher %-.32s-Wert: '%-.128s' fīŋŊd '%.192s' in Zeile %lu"
ER_ILLEGAL_VALUE_FOR_TYPE 22007
eng "Illegal %s '%-.192s' value found during parsing"
ger "Nicht zulīŋŊiger %s-Wert '%-.192s' beim Parsen gefunden"
@@ -5456,8 +5456,8 @@ ER_PROC_AUTO_REVOKE_FAIL
eng "Failed to revoke all privileges to dropped routine"
ger "RīŋŊme aller Rechte fīŋŊ gelīŋŊte Routine fehlgeschlagen"
ER_DATA_TOO_LONG 22001
- eng "Data too long for column '%s' at row %ld"
- ger "Daten zu lang fīŋŊd '%s' in Zeile %ld"
+ eng "Data too long for column '%s' at row %lu"
+ ger "Daten zu lang fīŋŊd '%s' in Zeile %lu"
ER_SP_BAD_SQLSTATE 42000
eng "Bad SQLSTATE: '%s'"
ger "UngīŋŊr SQLSTATE: '%s'"
=== modified file 'sql/slave.cc'
--- a/sql/slave.cc 2009-11-16 20:49:51 +0000
+++ b/sql/slave.cc 2009-12-06 17:51:48 +0000
@@ -1117,18 +1117,27 @@ be equal for the Statement-format replic
goto err;
}
}
- else if (is_network_error(mysql_errno(mysql)))
+ else if (is_network_error(err_code= mysql_errno(mysql)))
{
- mi->report(WARNING_LEVEL, mysql_errno(mysql),
- "Get master TIME_ZONE failed with error: %s", mysql_error(mysql));
+ mi->report(ERROR_LEVEL, err_code,
+ "Get master TIME_ZONE failed with error: %s",
+ mysql_error(mysql));
goto network_err;
- }
+ }
+ else if (err_code == ER_UNKNOWN_SYSTEM_VARIABLE)
+ {
+ /* We use ERROR_LEVEL to get the error logged to file */
+ mi->report(ERROR_LEVEL, err_code,
+
+ "MySQL master doesn't have a TIME_ZONE variable. Note that"
+ "if your timezone is not same between master and slave, your "
+ "slave may get wrong data into timestamp columns");
+ }
else
{
/* Fatal error */
errmsg= "The slave I/O thread stops because a fatal error is encountered \
when it try to get the value of TIME_ZONE global variable from master.";
- err_code= mysql_errno(mysql);
sprintf(err_buff, "%s Error: %s", errmsg, mysql_error(mysql));
goto err;
}
=== modified file 'sql/sql_base.cc'
--- a/sql/sql_base.cc 2009-11-30 21:37:27 +0000
+++ b/sql/sql_base.cc 2009-12-04 15:12:22 +0000
@@ -8488,19 +8488,26 @@ bool remove_table_from_cache(THD *thd, c
result=1;
}
/* Kill delayed insert threads */
- if ((in_use->system_thread & SYSTEM_THREAD_DELAYED_INSERT) &&
- ! in_use->killed)
+ if ((in_use->system_thread & SYSTEM_THREAD_DELAYED_INSERT))
{
- in_use->killed= THD::KILL_CONNECTION;
- pthread_mutex_lock(&in_use->mysys_var->mutex);
- if (in_use->mysys_var->current_cond)
- {
- pthread_mutex_lock(in_use->mysys_var->current_mutex);
- signalled= 1;
- pthread_cond_broadcast(in_use->mysys_var->current_cond);
- pthread_mutex_unlock(in_use->mysys_var->current_mutex);
- }
- pthread_mutex_unlock(&in_use->mysys_var->mutex);
+ if (!in_use->killed)
+ {
+ in_use->killed= THD::KILL_CONNECTION;
+ pthread_mutex_lock(&in_use->mysys_var->mutex);
+ if (in_use->mysys_var->current_cond)
+ {
+ pthread_mutex_lock(in_use->mysys_var->current_mutex);
+ signalled= 1;
+ pthread_cond_broadcast(in_use->mysys_var->current_cond);
+ pthread_mutex_unlock(in_use->mysys_var->current_mutex);
+ }
+ pthread_mutex_unlock(&in_use->mysys_var->mutex);
+ }
+ /*
+ Don't abort locks. Instead give the delayed insert thread
+ time to finish it's inserts and die gracefully.
+ */
+ continue;
}
/*
Now we must abort all tables locks used by this thread
=== modified file 'sql/sql_class.cc'
--- a/sql/sql_class.cc 2009-11-30 21:37:27 +0000
+++ b/sql/sql_class.cc 2009-12-04 15:12:22 +0000
@@ -2046,7 +2046,7 @@ bool select_export::send_data(List<Item>
ER_TRUNCATED_WRONG_VALUE_FOR_FIELD,
ER(ER_TRUNCATED_WRONG_VALUE_FOR_FIELD),
"string", printable_buff,
- item->name, row_count);
+ item->name, (ulong) row_count);
}
cvt_str.length(bytes);
res= &cvt_str;
=== modified file 'sql/sql_insert.cc'
--- a/sql/sql_insert.cc 2009-11-30 21:37:27 +0000
+++ b/sql/sql_insert.cc 2009-12-04 15:12:22 +0000
@@ -2618,7 +2618,7 @@ bool Delayed_insert::handle_inserts(void
or if another thread is removing the current table definition
from the table cache.
*/
- my_error(ER_DELAYED_CANT_CHANGE_LOCK,MYF(ME_FATALERROR),
+ my_error(ER_DELAYED_CANT_CHANGE_LOCK, MYF(ME_FATALERROR | ME_NOREFRESH),
table->s->table_name.str);
goto err;
}
@@ -2791,10 +2791,11 @@ bool Delayed_insert::handle_inserts(void
query_cache_invalidate3(&thd, table, 1);
if (thr_reschedule_write_lock(*thd.lock->locks))
{
- /* This is not known to happen. */
- my_error(ER_DELAYED_CANT_CHANGE_LOCK,MYF(ME_FATALERROR),
- table->s->table_name.str);
- goto err;
+ /* This is not known to happen. */
+ my_error(ER_DELAYED_CANT_CHANGE_LOCK,
+ MYF(ME_FATALERROR | ME_NOREFRESH),
+ table->s->table_name.str);
+ goto err;
}
if (!using_bin_log)
table->file->extra(HA_EXTRA_WRITE_CACHE);
=== modified file 'storage/federatedx/ha_federatedx.cc'
--- a/storage/federatedx/ha_federatedx.cc 2009-11-30 21:37:27 +0000
+++ b/storage/federatedx/ha_federatedx.cc 2009-12-03 11:34:11 +0000
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008, Patrick Galbraith
+Copyright (c) 2008-2009, Patrick Galbraith & Antony Curtis
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -308,7 +308,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
*/
-#define MYSQL_SERVER 1q
+#define MYSQL_SERVER 1
#include "mysql_priv.h"
#include <mysql/plugin.h>
@@ -1627,7 +1627,13 @@ static int free_server(federatedx_txn *t
{
MEM_ROOT mem_root;
- txn->close(server);
+ if (!txn)
+ {
+ federatedx_txn tmp_txn;
+ tmp_txn.close(server);
+ }
+ else
+ txn->close(server);
DBUG_ASSERT(server->io_count == 0);
@@ -1785,21 +1791,25 @@ int ha_federatedx::close(void)
if (stored_result)
retval= free_result();
- /* Disconnect from mysql. thd may be null during refresh */
- txn= thd ? get_txn(thd, true) : new federatedx_txn();
+ /* Disconnect from mysql */
+ if (!thd || !(txn= get_txn(thd, true)))
+ {
+ federatedx_txn tmp_txn;
+
+ tmp_txn.release(&io);
- if (txn)
+ DBUG_ASSERT(io == NULL);
+
+ if ((error= free_share(&tmp_txn, share)))
+ retval= error;
+ }
+ else
{
txn->release(&io);
-
DBUG_ASSERT(io == NULL);
if ((error= free_share(txn, share)))
retval= error;
-
- if (!thd)
- delete txn;
-
}
DBUG_RETURN(retval);
}
@@ -2793,14 +2803,16 @@ int ha_federatedx::rnd_end()
int ha_federatedx::free_result()
{
int error;
+ federatedx_io *tmp_io= 0, **iop;
DBUG_ASSERT(stored_result);
- if ((error= txn->acquire(share, FALSE, &io)))
+ if (!*(iop= &io) && (error= txn->acquire(share, TRUE, (iop= &tmp_io))))
{
DBUG_ASSERT(0); // Fail when testing
return error;
}
- io->free_result(stored_result);
+ (*iop)->free_result(stored_result);
stored_result= 0;
+ txn->release(&tmp_io);
return 0;
}
@@ -2985,7 +2997,7 @@ int ha_federatedx::info(uint flag)
{
char error_buffer[FEDERATEDX_QUERY_BUFFER_SIZE];
uint error_code;
- federatedx_io *tmp_io= 0;
+ federatedx_io *tmp_io= 0, **iop= 0;
DBUG_ENTER("ha_federatedx::info");
error_code= ER_QUERY_ON_FOREIGN_DATA_SOURCE;
@@ -2993,7 +3005,7 @@ int ha_federatedx::info(uint flag)
/* we want not to show table status if not needed to do so */
if (flag & (HA_STATUS_VARIABLE | HA_STATUS_CONST | HA_STATUS_AUTO))
{
- if ((error_code= txn->acquire(share, TRUE, &tmp_io)))
+ if (!*(iop= &io) && (error_code= txn->acquire(share, TRUE, (iop= &tmp_io))))
goto fail;
}
@@ -3006,13 +3018,13 @@ int ha_federatedx::info(uint flag)
if (flag & HA_STATUS_CONST)
stats.block_size= 4096;
- if (tmp_io->table_metadata(&stats, share->table_name,
+ if ((*iop)->table_metadata(&stats, share->table_name,
share->table_name_length, flag))
goto error;
}
if (flag & HA_STATUS_AUTO)
- stats.auto_increment_value= tmp_io->last_insert_id();
+ stats.auto_increment_value= (*iop)->last_insert_id();
/*
If ::info created it's own transaction, close it. This happens in case
@@ -3023,10 +3035,10 @@ int ha_federatedx::info(uint flag)
DBUG_RETURN(0);
error:
- if (tmp_io)
+ if (iop && *iop)
{
my_sprintf(error_buffer, (error_buffer, ": %d : %s",
- tmp_io->error_code(), tmp_io->error_str()));
+ (*iop)->error_code(), (*iop)->error_str()));
my_error(error_code, MYF(0), error_buffer);
}
else
=== modified file 'strings/ctype-ucs2.c'
--- a/strings/ctype-ucs2.c 2009-11-30 12:42:24 +0000
+++ b/strings/ctype-ucs2.c 2009-12-03 12:02:37 +0000
@@ -1498,6 +1498,14 @@ void my_hash_sort_ucs2_bin(CHARSET_INFO
}
}
+
+static inline my_wc_t
+ucs2_to_wc(const uchar *ptr)
+{
+ return (((uint) ptr[0]) << 8) + ptr[1];
+}
+
+
/*
** Calculate min_str and max_str that ranges a LIKE string.
** Arguments:
@@ -1531,6 +1539,7 @@ my_bool my_like_range_ucs2(CHARSET_INFO
for ( ; ptr + 1 < end && min_str + 1 < min_end && charlen > 0
; ptr+=2, charlen--)
{
+ my_wc_t wc;
if (ptr[0] == '\0' && ptr[1] == escape && ptr + 1 < end)
{
ptr+=2; /* Skip escape */
@@ -1567,9 +1576,9 @@ fill_max_and_min:
}
if (have_contractions && ptr + 3 < end &&
- ptr[0] == '\0' &&
- my_uca_can_be_contraction_head(cs, (uchar) ptr[1]))
+ my_uca_can_be_contraction_head(cs, (wc= ucs2_to_wc((uchar*) ptr))))
{
+ my_wc_t wc2;
/* Contraction head found */
if (ptr[2] == '\0' && (ptr[3] == w_one || ptr[3] == w_many))
{
@@ -1581,9 +1590,8 @@ fill_max_and_min:
Check if the second letter can be contraction part,
and if two letters really produce a contraction.
*/
- if (ptr[2] == '\0' &&
- my_uca_can_be_contraction_tail(cs, (uchar) ptr[3]) &&
- my_uca_contraction2_weight(cs,(uchar) ptr[1], (uchar) ptr[3]))
+ if (my_uca_can_be_contraction_tail(cs, (wc2= ucs2_to_wc((uchar*) ptr + 2))) &&
+ my_uca_contraction2_weight(cs, wc , wc2))
{
/* Contraction found */
if (charlen == 1 || min_str + 2 >= min_end)
=== modified file 'unittest/mysys/Makefile.am'
--- a/unittest/mysys/Makefile.am 2009-11-26 08:44:38 +0000
+++ b/unittest/mysys/Makefile.am 2009-12-03 11:19:05 +0000
@@ -24,7 +24,7 @@ LDADD = $(top_builddir)/unittest/mytap
$(top_builddir)/strings/libmystrings.a
EXTRA_DIST = CMakeLists.txt
-noinst_PROGRAMS = bitmap-t base64-t lf-t waiting_threads-t
+noinst_PROGRAMS = bitmap-t base64-t my_atomic-t lf-t waiting_threads-t
if NEED_THREAD
# my_atomic-t is used to check thread functions, so it is safe to
=== modified file 'vio/viosslfactories.c'
--- a/vio/viosslfactories.c 2009-10-27 13:20:34 +0000
+++ b/vio/viosslfactories.c 2009-12-06 17:34:54 +0000
@@ -19,7 +19,6 @@
static my_bool ssl_algorithms_added = FALSE;
static my_bool ssl_error_strings_loaded= FALSE;
-static int verify_depth = 0;
static unsigned char dh512_p[]=
{
1
0

[Maria-developers] bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (knielsen:2775)
by knielsenīŧ knielsen-hq.org 16 Dec '09
by knielsenīŧ knielsen-hq.org 16 Dec '09
16 Dec '09
#At lp:maria
2775 knielsen(a)knielsen-hq.org 2009-12-16 [merge]
Automatic merge of PBXT rc3 into MariaDB trunk.
modified:
client/mysql.cc
client/mysqlcheck.c
client/mysqlslap.c
client/mysqltest.cc
cmd-line-utils/readline/config_readline.h
mysql-test/lib/mtr_report.pm
mysql-test/mysql-test-run.pl
mysql-test/r/ctype_ucs.result
mysql-test/suite/federated/disabled.def
mysql-test/suite/federated/federated_server.result
mysql-test/suite/federated/federated_server.test
mysql-test/t/ctype_ucs.test
sql-common/client.c
sql/mysqld.cc
sql/share/errmsg.txt
sql/sql_base.cc
sql/sql_class.cc
sql/sql_insert.cc
storage/federatedx/ha_federatedx.cc
strings/ctype-uca.c
strings/ctype-ucs2.c
unittest/mysys/Makefile.am
=== modified file 'client/mysql.cc'
--- a/client/mysql.cc 2009-11-30 21:37:27 +0000
+++ b/client/mysql.cc 2009-12-03 11:34:11 +0000
@@ -1280,7 +1280,6 @@ sig_handler handle_sigint(int sig)
MYSQL *kill_mysql= NULL;
/* terminate if no query being executed, or we already tried interrupting */
- /* terminate if no query being executed, or we already tried interrupting */
if (!executing_query || (interrupted_query == 2))
{
tee_fprintf(stdout, "Ctrl-C -- exit!\n");
@@ -1295,6 +1294,7 @@ sig_handler handle_sigint(int sig)
goto err;
}
+ /* First time try to kill the query, second time the connection */
interrupted_query++;
/* mysqld < 5 does not understand KILL QUERY, skip to KILL CONNECTION */
@@ -1305,10 +1305,13 @@ sig_handler handle_sigint(int sig)
sprintf(kill_buffer, "KILL %s%lu",
(interrupted_query == 1) ? "QUERY " : "",
mysql_thread_id(&mysql));
- tee_fprintf(stdout, "Ctrl-C -- sending \"%s\" to server ...\n", kill_buffer);
+ if (verbose)
+ tee_fprintf(stdout, "Ctrl-C -- sending \"%s\" to server ...\n",
+ kill_buffer);
mysql_real_query(kill_mysql, kill_buffer, (uint) strlen(kill_buffer));
mysql_close(kill_mysql);
- tee_fprintf(stdout, "Ctrl-C -- query aborted.\n");
+ tee_fprintf(stdout, "Ctrl-C -- query killed. Continuing normally.\n");
+ interrupted_query= 0;
return;
@@ -1321,7 +1324,6 @@ err:
handler called mysql_end().
*/
mysql_thread_end();
- return;
#else
mysql_end(sig);
#endif
@@ -2881,13 +2883,8 @@ com_help(String *buffer __attribute__((u
return com_server_help(buffer,line,help_arg);
}
- put_info("\nFor information about MySQL products and services, visit:\n"
- " http://www.mysql.com/\n"
- "For developer information, including the MySQL Reference Manual, "
- "visit:\n"
- " http://dev.mysql.com/\n"
- "To buy MySQL Enterprise support, training, or other products, visit:\n"
- " https://shop.mysql.com/\n", INFO_INFO);
+ put_info("\nGeneral information about MariaDB can be found at\n"
+ "http://askmonty.org/wiki/index.php/Manual:Contents\n", INFO_INFO);
put_info("List of all MySQL commands:", INFO_INFO);
if (!named_cmds)
put_info("Note that all text commands must be first on line and end with ';'",INFO_INFO);
=== modified file 'client/mysqlcheck.c'
--- a/client/mysqlcheck.c 2009-09-28 06:24:19 +0000
+++ b/client/mysqlcheck.c 2009-12-03 11:19:05 +0000
@@ -857,7 +857,8 @@ int main(int argc, char **argv)
if (!opt_write_binlog)
{
- if (disable_binlog()) {
+ if (disable_binlog())
+ {
first_error= 1;
goto end;
}
=== modified file 'client/mysqlslap.c'
--- a/client/mysqlslap.c 2009-11-30 21:37:27 +0000
+++ b/client/mysqlslap.c 2009-12-03 11:34:11 +0000
@@ -472,11 +472,10 @@ void concurrency_loop(MYSQL *mysql, uint
if (commit_rate)
run_query(mysql, "SET AUTOCOMMIT=0", strlen("SET AUTOCOMMIT=0"));
- if (pre_system)
- if ((sysret= system(pre_system)) != 0)
- fprintf(stderr,
- "Warning: Execution of pre_system option returned %d.\n",
- sysret);
+ if (pre_system && (sysret= system(pre_system)) != 0)
+ fprintf(stderr,
+ "Warning: Execution of pre_system option returned %d.\n",
+ sysret);
/*
Pre statements are always run after all other logic so they can
@@ -490,11 +489,10 @@ void concurrency_loop(MYSQL *mysql, uint
if (post_statements)
run_statements(mysql, post_statements);
- if (post_system)
- if ((sysret= system(post_system)) != 0)
- fprintf(stderr,
- "Warning: Execution of post_system option returned %d.\n",
- sysret);
+ if (post_system && (sysret= system(post_system)) != 0)
+ fprintf(stderr,
+ "Warning: Execution of post_system option returned %d.\n",
+ sysret);
/* We are finished with this run */
if (auto_generate_sql_autoincrement || auto_generate_sql_guid_primary)
drop_primary_key_list();
=== modified file 'client/mysqltest.cc'
--- a/client/mysqltest.cc 2009-11-16 20:49:51 +0000
+++ b/client/mysqltest.cc 2009-12-03 11:19:05 +0000
@@ -3497,9 +3497,10 @@ void do_diff_files(struct st_command *co
if ((error= compare_files(ds_filename.str, ds_filename2.str)) &&
match_expected_error(command, error, NULL) < 0)
{
- /* Compare of the two files failed, append them to output
- so the failure can be analyzed, but only if it was not
- expected to fail.
+ /*
+ Compare of the two files failed, append them to output
+ so the failure can be analyzed, but only if it was not
+ expected to fail.
*/
show_diff(&ds_res, ds_filename.str, ds_filename2.str);
log_file.write(&ds_res);
@@ -5013,7 +5014,8 @@ void do_connect(struct st_command *comma
con_options= ds_options.str;
while (*con_options)
{
- char* end;
+ size_t length;
+ char *end;
/* Step past any spaces in beginning of option*/
while (*con_options && my_isspace(charset_info, *con_options))
con_options++;
@@ -5021,13 +5023,14 @@ void do_connect(struct st_command *comma
end= con_options;
while (*end && !my_isspace(charset_info, *end))
end++;
- if (!strncmp(con_options, "SSL", 3))
+ length= (size_t) (end - con_options);
+ if (length == 3 && !strncmp(con_options, "SSL", 3))
con_ssl= 1;
- else if (!strncmp(con_options, "COMPRESS", 8))
+ else if (length == 8 && !strncmp(con_options, "COMPRESS", 8))
con_compress= 1;
- else if (!strncmp(con_options, "PIPE", 4))
+ else if (length == 4 && !strncmp(con_options, "PIPE", 4))
con_pipe= 1;
- else if (!strncmp(con_options, "SHM", 3))
+ else if (length == 3 && !strncmp(con_options, "SHM", 3))
con_shm= 1;
else
die("Illegal option to connect: %.*s",
@@ -5096,14 +5099,13 @@ void do_connect(struct st_command *comma
mysql_options(&con_slot->mysql, MYSQL_SHARED_MEMORY_BASE_NAME, ds_shm.str);
mysql_options(&con_slot->mysql, MYSQL_OPT_PROTOCOL, &protocol);
}
- else if(shared_memory_base_name)
+ else if (shared_memory_base_name)
{
mysql_options(&con_slot->mysql, MYSQL_SHARED_MEMORY_BASE_NAME,
- shared_memory_base_name);
+ shared_memory_base_name);
}
#endif
-
/* Use default db name */
if (ds_database.length == 0)
dynstr_set(&ds_database, opt_db);
@@ -6879,10 +6881,8 @@ void run_query_stmt(MYSQL *mysql, struct
MYSQL_STMT *stmt;
DYNAMIC_STRING ds_prepare_warnings;
DYNAMIC_STRING ds_execute_warnings;
- ulonglong affected_rows;
DBUG_ENTER("run_query_stmt");
DBUG_PRINT("query", ("'%-.60s'", query));
- LINT_INIT(affected_rows);
/*
Init a new stmt if it's not already one created for this connection
@@ -6981,6 +6981,9 @@ void run_query_stmt(MYSQL *mysql, struct
handle_no_error(command);
if (!disable_result_log)
{
+ ulonglong affected_rows;
+ LINT_INIT(affected_rows);
+
/*
Not all statements creates a result set. If there is one we can
now create another normal result set that contains the meta
@@ -7026,39 +7029,33 @@ void run_query_stmt(MYSQL *mysql, struct
Need to grab affected rows information before getting
warnings here
*/
- {
- ulonglong affected_rows;
- LINT_INIT(affected_rows);
+ if (!disable_info)
+ affected_rows= mysql_affected_rows(mysql);
- if (!disable_info)
- affected_rows= mysql_affected_rows(mysql);
+ if (!disable_warnings)
+ {
+ /* Get the warnings from execute */
- if (!disable_warnings)
+ /* Append warnings to ds - if there are any */
+ if (append_warnings(&ds_execute_warnings, mysql) ||
+ ds_execute_warnings.length ||
+ ds_prepare_warnings.length ||
+ ds_warnings->length)
{
- /* Get the warnings from execute */
-
- /* Append warnings to ds - if there are any */
- if (append_warnings(&ds_execute_warnings, mysql) ||
- ds_execute_warnings.length ||
- ds_prepare_warnings.length ||
- ds_warnings->length)
- {
- dynstr_append_mem(ds, "Warnings:\n", 10);
- if (ds_warnings->length)
- dynstr_append_mem(ds, ds_warnings->str,
- ds_warnings->length);
- if (ds_prepare_warnings.length)
- dynstr_append_mem(ds, ds_prepare_warnings.str,
- ds_prepare_warnings.length);
- if (ds_execute_warnings.length)
- dynstr_append_mem(ds, ds_execute_warnings.str,
- ds_execute_warnings.length);
- }
+ dynstr_append_mem(ds, "Warnings:\n", 10);
+ if (ds_warnings->length)
+ dynstr_append_mem(ds, ds_warnings->str,
+ ds_warnings->length);
+ if (ds_prepare_warnings.length)
+ dynstr_append_mem(ds, ds_prepare_warnings.str,
+ ds_prepare_warnings.length);
+ if (ds_execute_warnings.length)
+ dynstr_append_mem(ds, ds_execute_warnings.str,
+ ds_execute_warnings.length);
}
-
- if (!disable_info)
- append_info(ds, affected_rows, mysql_info(mysql));
}
+ if (!disable_info)
+ append_info(ds, affected_rows, mysql_info(mysql));
}
end:
@@ -7235,7 +7232,6 @@ void run_query(struct st_connection *cn,
}
dynstr_free(&query_str);
-
}
if (sp_protocol_enabled &&
@@ -7662,6 +7658,7 @@ int main(int argc, char **argv)
my_bool q_send_flag= 0, abort_flag= 0;
uint command_executed= 0, last_command_executed= 0;
char save_file[FN_REFLEN];
+ bool empty_result= FALSE;
MY_INIT(argv[0]);
save_file[0]= 0;
@@ -7819,6 +7816,7 @@ int main(int argc, char **argv)
verbose_msg("Start processing test commands from '%s' ...", cur_file->file_name);
while (!read_command(&command) && !abort_flag)
{
+ my_bool ok_to_do;
int current_line_inc = 1, processed = 0;
if (command->type == Q_UNKNOWN || command->type == Q_COMMENT_WITH_COMMAND)
get_command_type(command);
@@ -7831,7 +7829,7 @@ int main(int argc, char **argv)
command->type= Q_COMMENT;
}
- my_bool ok_to_do= cur_block->ok;
+ ok_to_do= cur_block->ok;
/*
Some commands need to be "done" the first time if they may get
re-iterated over in a true context. This can only happen if there's
@@ -8167,8 +8165,6 @@ int main(int argc, char **argv)
if (parsing_disabled)
die("Test ended with parsing disabled");
- my_bool empty_result= FALSE;
-
/*
The whole test has been executed _sucessfully_.
Time to compare result or save it to record file.
=== modified file 'cmd-line-utils/readline/config_readline.h'
--- a/cmd-line-utils/readline/config_readline.h 2009-11-30 21:37:27 +0000
+++ b/cmd-line-utils/readline/config_readline.h 2009-12-01 16:09:02 +0000
@@ -7,6 +7,13 @@
# include <config.h>
#endif
+#ifdef NOT_YET /* causes problem on MacOSX */
+/* to get wcwidth() defined */
+#define _XOPEN_SOURCE 600
+#define _XOPEN_SOURCE_EXTENDED
+#define _XOPEN_
+#endif
+
/*
Ultrix botches type-ahead when switching from canonical to
non-canonical mode, at least through version 4.3
=== modified file 'mysql-test/lib/mtr_report.pm'
--- a/mysql-test/lib/mtr_report.pm 2009-11-16 20:49:51 +0000
+++ b/mysql-test/lib/mtr_report.pm 2009-12-03 11:19:05 +0000
@@ -388,7 +388,7 @@ MSG
}
elsif (@$extra_warnings)
{
- mtr_error("There were errors/warnings in server logs after running test cases.");
+ mtr_error("There where errors/warnings in server logs after running test cases.");
}
elsif ($fail)
{
=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl 2009-11-30 21:37:27 +0000
+++ b/mysql-test/mysql-test-run.pl 2009-12-03 11:34:11 +0000
@@ -201,10 +201,10 @@ my $opt_mark_progress;
my $opt_sleep;
-my $opt_testcase_timeout= 15; # minutes
-my $opt_suite_timeout = 300; # minutes
-my $opt_shutdown_timeout= 10; # seconds
-my $opt_start_timeout = 180; # seconds
+my $opt_testcase_timeout= 15; # 15 minutes
+my $opt_suite_timeout = 360; # 6 hours
+my $opt_shutdown_timeout= 10; # 10 seconds
+my $opt_start_timeout = 180; # 180 seconds
sub testcase_timeout { return $opt_testcase_timeout * 60; };
sub suite_timeout { return $opt_suite_timeout * 60; };
@@ -1319,6 +1319,8 @@ sub command_line_setup {
{
# Indicate that we are using debugger
$glob_debugger= 1;
+ $opt_testcase_timeout= 60*60*24; # Don't abort debugging with timeout
+ $opt_suite_timeout= $opt_testcase_timeout;
$opt_retry= 1;
$opt_retry_failure= 1;
@@ -2151,7 +2153,6 @@ sub environment_setup {
# Create an environment variable to make it possible
# to detect that valgrind is being used from test cases
$ENV{'VALGRIND_TEST'}= $opt_valgrind;
-
}
@@ -2908,8 +2909,8 @@ sub mysql_install_db {
my $bootstrap_sql_file= "$opt_vardir/tmp/bootstrap.sql";
my $path_sql= my_find_file($install_basedir,
- ["mysql", "sql/share", "share/mysql",
- "share/mariadb", "share", "scripts"],
+ ["mysql", "sql/share", "share/mariadb",
+ "share/mysql", "share", "scripts"],
"mysql_system_tables.sql",
NOT_REQUIRED);
@@ -3861,7 +3862,7 @@ sub extract_server_log ($$) {
my ($error_log, $tname) = @_;
# Open the servers .err log file and read all lines
- # belonging to current tets into @lines
+ # belonging to current test into @lines
my $Ferr = IO::File->new($error_log)
or mtr_error("Could not open file '$error_log' for reading: $!");
=== modified file 'mysql-test/r/ctype_ucs.result'
--- a/mysql-test/r/ctype_ucs.result 2008-12-23 14:21:01 +0000
+++ b/mysql-test/r/ctype_ucs.result 2009-12-03 12:02:37 +0000
@@ -1211,3 +1211,47 @@ HEX(DAYNAME(19700101))
0427043504420432043504400433
SET character_set_connection=latin1;
End of 5.0 tests
+Start of 5.1 tests
+SET NAMES utf8;
+CREATE TABLE t1 (
+a varchar(10) CHARACTER SET ucs2 COLLATE ucs2_czech_ci,
+key(a)
+);
+INSERT INTO t1 VALUES
+('aa'),('bb'),('cc'),('dd'),('ee'),('ff'),('gg'),('hh'),('ii'),
+('jj'),('kk'),('ll'),('mm'),('nn'),('oo'),('pp'),('rr'),('ss'),
+('tt'),('uu'),('vv'),('ww'),('xx'),('yy'),('zz');
+INSERT INTO t1 VALUES ('ca'),('cz'),('ch');
+INSERT INTO t1 VALUES ('da'),('dz'), (X'0064017E');
+EXPLAIN SELECT * FROM t1 WHERE a LIKE 'b%';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range a a 23 NULL 1 Using where; Using index
+EXPLAIN SELECT * FROM t1 WHERE a LIKE 'c%';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range a a 23 NULL 30 Using where; Using index
+SELECT * FROM t1 WHERE a LIKE 'c%';
+a
+ca
+cc
+cz
+ch
+EXPLAIN SELECT * FROM t1 WHERE a LIKE 'ch%';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range a a 23 NULL 1 Using where; Using index
+SELECT * FROM t1 WHERE a LIKE 'ch%';
+a
+ch
+ALTER TABLE t1 MODIFY a VARCHAR(10) CHARACTER SET ucs2 COLLATE ucs2_croatian_ci;
+EXPLAIN SELECT * FROM t1 WHERE a LIKE 'd%';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range a a 23 NULL 1 Using where; Using index
+SELECT hex(concat('d',_ucs2 0x017E,'%'));
+hex(concat('d',_ucs2 0x017E,'%'))
+0064017E0025
+EXPLAIN SELECT * FROM t1 WHERE a LIKE concat('d',_ucs2 0x017E,'%');
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range a a 23 NULL 1 Using where; Using index
+SELECT hex(a) FROM t1 WHERE a LIKE concat('D',_ucs2 0x017E,'%');
+hex(a)
+0064017E
+DROP TABLE t1;
=== modified file 'mysql-test/suite/federated/disabled.def'
--- a/mysql-test/suite/federated/disabled.def 2009-10-30 18:50:56 +0000
+++ b/mysql-test/suite/federated/disabled.def 2009-11-14 19:33:59 +0000
@@ -9,5 +9,4 @@
# Do not use any TAB characters for whitespace.
#
##############################################################################
-federated_server : needs fixup
=== modified file 'mysql-test/suite/federated/federated_server.result'
--- a/mysql-test/suite/federated/federated_server.result 2009-10-30 18:50:56 +0000
+++ b/mysql-test/suite/federated/federated_server.result 2009-11-14 19:33:59 +0000
@@ -175,6 +175,8 @@ CREATE TABLE db_bogus.t1 (
)
;
INSERT INTO db_bogus.t1 VALUES ('2','this is bogus');
+create user test_fed@localhost identified by 'foo';
+grant all on db_legitimate.* to test_fed@localhost;
create server 's1' foreign data wrapper 'mysql' options
(HOST '127.0.0.1',
DATABASE 'db_legitimate',
@@ -211,15 +213,14 @@ id name
alter server s1 options (database 'db_bogus');
flush tables;
select * from federated.t1;
-id name
-2 this is bogus
+ERROR HY000: There was a problem processing the query on the foreign data source. Data source error: : 1044 : Access denied for user 'test_fed'@'localhost' to databa
drop server if exists 's1';
ERROR 42000: Access denied; you need the SUPER privilege for this operation
create server 's1' foreign data wrapper 'mysql' options
(HOST '127.0.0.1',
DATABASE 'db_legitimate',
-USER 'root',
-PASSWORD '',
+USER 'test_fed',
+PASSWORD 'foo',
PORT SLAVE_PORT,
SOCKET '',
OWNER 'root');
@@ -228,8 +229,8 @@ drop server 's1';
create server 's1' foreign data wrapper 'mysql' options
(HOST '127.0.0.1',
DATABASE 'db_legitimate',
-USER 'root',
-PASSWORD '',
+USER 'test_fed',
+PASSWORD 'foo',
PORT SLAVE_PORT,
SOCKET '',
OWNER 'root');
@@ -237,6 +238,7 @@ flush tables;
select * from federated.t1;
id name
1 this is legitimate
+drop user test_fed@localhost;
drop database db_legitimate;
drop database db_bogus;
drop user guest_super@localhost;
@@ -275,6 +277,6 @@ call p1();
drop procedure p1;
drop server if exists s;
DROP TABLE IF EXISTS federated.t1;
-DROP DATABASE federated;
+DROP DATABASE IF EXISTS federated;
DROP TABLE IF EXISTS federated.t1;
-DROP DATABASE federated;
+DROP DATABASE IF EXISTS federated;
=== modified file 'mysql-test/suite/federated/federated_server.test'
--- a/mysql-test/suite/federated/federated_server.test 2009-10-30 18:50:56 +0000
+++ b/mysql-test/suite/federated/federated_server.test 2009-11-14 19:33:59 +0000
@@ -239,6 +239,7 @@ alter server s1 options (database 'db_bo
connection master;
flush tables;
+--error ER_QUERY_ON_FOREIGN_DATA_SOURCE
select * from federated.t1;
connection conn_select;
@@ -249,8 +250,8 @@ drop server if exists 's1';
eval create server 's1' foreign data wrapper 'mysql' options
(HOST '127.0.0.1',
DATABASE 'db_legitimate',
- USER 'root',
- PASSWORD '',
+ USER 'test_fed',
+ PASSWORD 'foo',
PORT $SLAVE_MYPORT,
SOCKET '',
OWNER 'root');
@@ -261,8 +262,8 @@ drop server 's1';
eval create server 's1' foreign data wrapper 'mysql' options
(HOST '127.0.0.1',
DATABASE 'db_legitimate',
- USER 'root',
- PASSWORD '',
+ USER 'test_fed',
+ PASSWORD 'foo',
PORT $SLAVE_MYPORT,
SOCKET '',
OWNER 'root');
@@ -273,6 +274,7 @@ select * from federated.t1;
# clean up test
connection slave;
+drop user test_fed@localhost;
drop database db_legitimate;
drop database db_bogus;
=== modified file 'mysql-test/t/ctype_ucs.test'
--- a/mysql-test/t/ctype_ucs.test 2008-12-23 14:21:01 +0000
+++ b/mysql-test/t/ctype_ucs.test 2009-12-03 12:02:37 +0000
@@ -723,3 +723,34 @@ SELECT HEX(DAYNAME(19700101));
SET character_set_connection=latin1;
--echo End of 5.0 tests
+
+
+--echo Start of 5.1 tests
+#
+# Checking my_like_range_ucs2
+#
+SET NAMES utf8;
+CREATE TABLE t1 (
+ a varchar(10) CHARACTER SET ucs2 COLLATE ucs2_czech_ci,
+ key(a)
+);
+INSERT INTO t1 VALUES
+('aa'),('bb'),('cc'),('dd'),('ee'),('ff'),('gg'),('hh'),('ii'),
+('jj'),('kk'),('ll'),('mm'),('nn'),('oo'),('pp'),('rr'),('ss'),
+('tt'),('uu'),('vv'),('ww'),('xx'),('yy'),('zz');
+INSERT INTO t1 VALUES ('ca'),('cz'),('ch');
+INSERT INTO t1 VALUES ('da'),('dz'), (X'0064017E');
+# This one should scan only one row
+EXPLAIN SELECT * FROM t1 WHERE a LIKE 'b%';
+# This one should scan many rows: 'c' is a contraction head
+EXPLAIN SELECT * FROM t1 WHERE a LIKE 'c%';
+SELECT * FROM t1 WHERE a LIKE 'c%';
+EXPLAIN SELECT * FROM t1 WHERE a LIKE 'ch%';
+SELECT * FROM t1 WHERE a LIKE 'ch%';
+ALTER TABLE t1 MODIFY a VARCHAR(10) CHARACTER SET ucs2 COLLATE ucs2_croatian_ci;
+EXPLAIN SELECT * FROM t1 WHERE a LIKE 'd%';
+SELECT hex(concat('d',_ucs2 0x017E,'%'));
+EXPLAIN SELECT * FROM t1 WHERE a LIKE concat('d',_ucs2 0x017E,'%');
+SELECT hex(a) FROM t1 WHERE a LIKE concat('D',_ucs2 0x017E,'%');
+
+DROP TABLE t1;
=== modified file 'sql-common/client.c'
--- a/sql-common/client.c 2009-11-16 20:49:51 +0000
+++ b/sql-common/client.c 2009-12-03 15:26:54 +0000
@@ -3208,7 +3208,7 @@ const char * STDCALL mysql_error(MYSQL *
mysql Connection
EXAMPLE
- 4.1.0-alfa -> 40100
+ MariaDB-4.1.0-alfa -> 40100
NOTES
We will ensure that a newer server always has a bigger number.
@@ -3221,7 +3221,11 @@ ulong STDCALL
mysql_get_server_version(MYSQL *mysql)
{
uint major, minor, version;
- char *pos= mysql->server_version, *end_pos;
+ const char *pos= mysql->server_version;
+ char *end_pos;
+ /* Skip possible prefix */
+ while (*pos && !my_isdigit(&my_charset_latin1, *pos))
+ pos++;
major= (uint) strtoul(pos, &end_pos, 10); pos=end_pos+1;
minor= (uint) strtoul(pos, &end_pos, 10); pos=end_pos+1;
version= (uint) strtoul(pos, &end_pos, 10);
=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc 2009-11-30 21:37:27 +0000
+++ b/sql/mysqld.cc 2009-12-04 15:12:22 +0000
@@ -4169,8 +4169,10 @@ server.");
Need to unlock as global_system_variables.table_plugin
was acquired during plugin_init()
*/
+ pthread_mutex_lock(&LOCK_global_system_variables);
plugin_unlock(0, global_system_variables.table_plugin);
global_system_variables.table_plugin= plugin;
+ pthread_mutex_unlock(&LOCK_global_system_variables);
}
}
#if defined(WITH_MARIA_STORAGE_ENGINE) && defined(USE_MARIA_FOR_TMP_TABLES)
=== modified file 'sql/share/errmsg.txt'
--- a/sql/share/errmsg.txt 2009-11-16 20:49:51 +0000
+++ b/sql/share/errmsg.txt 2009-12-04 15:12:22 +0000
@@ -5322,8 +5322,8 @@ ER_DIVISION_BY_ZERO 22012
eng "Division by 0"
ger "Division durch 0"
ER_TRUNCATED_WRONG_VALUE_FOR_FIELD
- eng "Incorrect %-.32s value: '%-.128s' for column '%.192s' at row %ld"
- ger "Falscher %-.32s-Wert: '%-.128s' fīŋŊd '%.192s' in Zeile %ld"
+ eng "Incorrect %-.32s value: '%-.128s' for column '%.192s' at row %lu"
+ ger "Falscher %-.32s-Wert: '%-.128s' fīŋŊd '%.192s' in Zeile %lu"
ER_ILLEGAL_VALUE_FOR_TYPE 22007
eng "Illegal %s '%-.192s' value found during parsing"
ger "Nicht zulīŋŊiger %s-Wert '%-.192s' beim Parsen gefunden"
=== modified file 'sql/sql_base.cc'
--- a/sql/sql_base.cc 2009-11-30 21:37:27 +0000
+++ b/sql/sql_base.cc 2009-12-04 15:12:22 +0000
@@ -8488,19 +8488,26 @@ bool remove_table_from_cache(THD *thd, c
result=1;
}
/* Kill delayed insert threads */
- if ((in_use->system_thread & SYSTEM_THREAD_DELAYED_INSERT) &&
- ! in_use->killed)
+ if ((in_use->system_thread & SYSTEM_THREAD_DELAYED_INSERT))
{
- in_use->killed= THD::KILL_CONNECTION;
- pthread_mutex_lock(&in_use->mysys_var->mutex);
- if (in_use->mysys_var->current_cond)
- {
- pthread_mutex_lock(in_use->mysys_var->current_mutex);
- signalled= 1;
- pthread_cond_broadcast(in_use->mysys_var->current_cond);
- pthread_mutex_unlock(in_use->mysys_var->current_mutex);
- }
- pthread_mutex_unlock(&in_use->mysys_var->mutex);
+ if (!in_use->killed)
+ {
+ in_use->killed= THD::KILL_CONNECTION;
+ pthread_mutex_lock(&in_use->mysys_var->mutex);
+ if (in_use->mysys_var->current_cond)
+ {
+ pthread_mutex_lock(in_use->mysys_var->current_mutex);
+ signalled= 1;
+ pthread_cond_broadcast(in_use->mysys_var->current_cond);
+ pthread_mutex_unlock(in_use->mysys_var->current_mutex);
+ }
+ pthread_mutex_unlock(&in_use->mysys_var->mutex);
+ }
+ /*
+ Don't abort locks. Instead give the delayed insert thread
+ time to finish it's inserts and die gracefully.
+ */
+ continue;
}
/*
Now we must abort all tables locks used by this thread
=== modified file 'sql/sql_class.cc'
--- a/sql/sql_class.cc 2009-11-30 21:37:27 +0000
+++ b/sql/sql_class.cc 2009-12-04 15:12:22 +0000
@@ -2046,7 +2046,7 @@ bool select_export::send_data(List<Item>
ER_TRUNCATED_WRONG_VALUE_FOR_FIELD,
ER(ER_TRUNCATED_WRONG_VALUE_FOR_FIELD),
"string", printable_buff,
- item->name, row_count);
+ item->name, (ulong) row_count);
}
cvt_str.length(bytes);
res= &cvt_str;
=== modified file 'sql/sql_insert.cc'
--- a/sql/sql_insert.cc 2009-11-30 21:37:27 +0000
+++ b/sql/sql_insert.cc 2009-12-04 15:12:22 +0000
@@ -2618,7 +2618,7 @@ bool Delayed_insert::handle_inserts(void
or if another thread is removing the current table definition
from the table cache.
*/
- my_error(ER_DELAYED_CANT_CHANGE_LOCK,MYF(ME_FATALERROR),
+ my_error(ER_DELAYED_CANT_CHANGE_LOCK, MYF(ME_FATALERROR | ME_NOREFRESH),
table->s->table_name.str);
goto err;
}
@@ -2791,10 +2791,11 @@ bool Delayed_insert::handle_inserts(void
query_cache_invalidate3(&thd, table, 1);
if (thr_reschedule_write_lock(*thd.lock->locks))
{
- /* This is not known to happen. */
- my_error(ER_DELAYED_CANT_CHANGE_LOCK,MYF(ME_FATALERROR),
- table->s->table_name.str);
- goto err;
+ /* This is not known to happen. */
+ my_error(ER_DELAYED_CANT_CHANGE_LOCK,
+ MYF(ME_FATALERROR | ME_NOREFRESH),
+ table->s->table_name.str);
+ goto err;
}
if (!using_bin_log)
table->file->extra(HA_EXTRA_WRITE_CACHE);
=== modified file 'storage/federatedx/ha_federatedx.cc'
--- a/storage/federatedx/ha_federatedx.cc 2009-11-30 21:37:27 +0000
+++ b/storage/federatedx/ha_federatedx.cc 2009-12-03 11:34:11 +0000
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008, Patrick Galbraith
+Copyright (c) 2008-2009, Patrick Galbraith & Antony Curtis
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -308,7 +308,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
*/
-#define MYSQL_SERVER 1q
+#define MYSQL_SERVER 1
#include "mysql_priv.h"
#include <mysql/plugin.h>
@@ -1627,7 +1627,13 @@ static int free_server(federatedx_txn *t
{
MEM_ROOT mem_root;
- txn->close(server);
+ if (!txn)
+ {
+ federatedx_txn tmp_txn;
+ tmp_txn.close(server);
+ }
+ else
+ txn->close(server);
DBUG_ASSERT(server->io_count == 0);
@@ -1785,21 +1791,25 @@ int ha_federatedx::close(void)
if (stored_result)
retval= free_result();
- /* Disconnect from mysql. thd may be null during refresh */
- txn= thd ? get_txn(thd, true) : new federatedx_txn();
+ /* Disconnect from mysql */
+ if (!thd || !(txn= get_txn(thd, true)))
+ {
+ federatedx_txn tmp_txn;
+
+ tmp_txn.release(&io);
- if (txn)
+ DBUG_ASSERT(io == NULL);
+
+ if ((error= free_share(&tmp_txn, share)))
+ retval= error;
+ }
+ else
{
txn->release(&io);
-
DBUG_ASSERT(io == NULL);
if ((error= free_share(txn, share)))
retval= error;
-
- if (!thd)
- delete txn;
-
}
DBUG_RETURN(retval);
}
@@ -2793,14 +2803,16 @@ int ha_federatedx::rnd_end()
int ha_federatedx::free_result()
{
int error;
+ federatedx_io *tmp_io= 0, **iop;
DBUG_ASSERT(stored_result);
- if ((error= txn->acquire(share, FALSE, &io)))
+ if (!*(iop= &io) && (error= txn->acquire(share, TRUE, (iop= &tmp_io))))
{
DBUG_ASSERT(0); // Fail when testing
return error;
}
- io->free_result(stored_result);
+ (*iop)->free_result(stored_result);
stored_result= 0;
+ txn->release(&tmp_io);
return 0;
}
@@ -2985,7 +2997,7 @@ int ha_federatedx::info(uint flag)
{
char error_buffer[FEDERATEDX_QUERY_BUFFER_SIZE];
uint error_code;
- federatedx_io *tmp_io= 0;
+ federatedx_io *tmp_io= 0, **iop= 0;
DBUG_ENTER("ha_federatedx::info");
error_code= ER_QUERY_ON_FOREIGN_DATA_SOURCE;
@@ -2993,7 +3005,7 @@ int ha_federatedx::info(uint flag)
/* we want not to show table status if not needed to do so */
if (flag & (HA_STATUS_VARIABLE | HA_STATUS_CONST | HA_STATUS_AUTO))
{
- if ((error_code= txn->acquire(share, TRUE, &tmp_io)))
+ if (!*(iop= &io) && (error_code= txn->acquire(share, TRUE, (iop= &tmp_io))))
goto fail;
}
@@ -3006,13 +3018,13 @@ int ha_federatedx::info(uint flag)
if (flag & HA_STATUS_CONST)
stats.block_size= 4096;
- if (tmp_io->table_metadata(&stats, share->table_name,
+ if ((*iop)->table_metadata(&stats, share->table_name,
share->table_name_length, flag))
goto error;
}
if (flag & HA_STATUS_AUTO)
- stats.auto_increment_value= tmp_io->last_insert_id();
+ stats.auto_increment_value= (*iop)->last_insert_id();
/*
If ::info created it's own transaction, close it. This happens in case
@@ -3023,10 +3035,10 @@ int ha_federatedx::info(uint flag)
DBUG_RETURN(0);
error:
- if (tmp_io)
+ if (iop && *iop)
{
my_sprintf(error_buffer, (error_buffer, ": %d : %s",
- tmp_io->error_code(), tmp_io->error_str()));
+ (*iop)->error_code(), (*iop)->error_str()));
my_error(error_code, MYF(0), error_buffer);
}
else
=== modified file 'strings/ctype-uca.c'
--- a/strings/ctype-uca.c 2009-11-30 12:42:24 +0000
+++ b/strings/ctype-uca.c 2009-12-03 11:34:11 +0000
@@ -36,6 +36,12 @@
#include "m_string.h"
#include "m_ctype.h"
+
+#define MY_UCA_CNT_FLAG_SIZE 4096
+#define MY_UCA_CNT_FLAG_MASK 4095
+#define MY_UCA_CNT_HEAD 1
+#define MY_UCA_CNT_TAIL 2
+
#ifdef HAVE_UCA_COLLATIONS
#define MY_UCA_NPAGES 256
@@ -6756,16 +6762,6 @@ typedef struct my_uca_scanner_handler_st
static uint16 nochar[]= {0,0};
-
-#define MY_UCA_CNT_FLAG_SIZE 4096
-#define MY_UCA_CNT_FLAG_MASK 4095
-
-#define MY_UCA_CNT_HEAD 1
-#define MY_UCA_CNT_TAIL 2
-
-
-
-
/********** Helper functions to handle contraction ************/
@@ -6836,85 +6832,6 @@ my_uca_alloc_contractions(CHARSET_INFO *
return 0;
}
-
-/**
- Check if UCA data has contractions (public version)
-
- @cs Pointer to CHARSET_INFO data
- @retval 0 - no contraction, 1 - have contractions.
-*/
-
-my_bool
-my_uca_have_contractions(CHARSET_INFO *cs)
-{
- return cs->contractions != NULL;
-}
-
-
-/**
- Check if a character can be contraction head
-
- @cs Pointer to CHARSET_INFO data
- @wc Code point
-
- @retval 0 - cannot be contraction head
- @retval 1 - can be contraction head
-*/
-
-my_bool
-my_uca_can_be_contraction_head(CHARSET_INFO *cs, my_wc_t wc)
-{
- return cs->contractions->flags[wc & MY_UCA_CNT_FLAG_MASK] & MY_UCA_CNT_HEAD;
-}
-
-
-/**
- Check if a character can be contraction tail
-
- @cs Pointer to CHARSET_INFO data
- @wc Code point
-
- @retval 0 - cannot be contraction tail
- @retval 1 - can be contraction tail
-*/
-
-my_bool
-my_uca_can_be_contraction_tail(CHARSET_INFO *cs, my_wc_t wc)
-{
- return cs->contractions->flags[wc & MY_UCA_CNT_FLAG_MASK] & MY_UCA_CNT_TAIL;
-}
-
-
-/**
- Find a contraction and return its weight array
-
- @cs Pointer to CHARSET data
- @wc1 First character
- @wc2 Second character
-
- @return Weight array
- @retval NULL - no contraction found
- @retval ptr - contraction weight array
-*/
-
-uint16 *
-my_uca_contraction2_weight(CHARSET_INFO *cs, my_wc_t wc1, my_wc_t wc2)
-{
- MY_CONTRACTIONS *list= cs->contractions;
- MY_CONTRACTION *c, *last;
- for (c= list->item, last= &list->item[list->nitems]; c < last; c++)
- {
- if (c->ch[0] == wc1 && c->ch[1] == wc2)
- {
- return c->weight;
- }
- }
- return NULL;
-}
-
-
-
-
#ifdef HAVE_CHARSET_ucs2
/*
Initialize collation weight scanner
@@ -9607,3 +9524,78 @@ CHARSET_INFO my_charset_utf8_croatian_uc
#endif /* HAVE_CHARSET_utf8 */
#endif /* HAVE_UCA_COLLATIONS */
+
+/**
+ Check if UCA data has contractions (public version)
+
+ @cs Pointer to CHARSET_INFO data
+ @retval 0 - no contraction, 1 - have contractions.
+*/
+
+my_bool
+my_uca_have_contractions(CHARSET_INFO *cs)
+{
+ return cs->contractions != NULL;
+}
+
+/**
+ Check if a character can be contraction head
+
+ @cs Pointer to CHARSET_INFO data
+ @wc Code point
+
+ @retval 0 - cannot be contraction head
+ @retval 1 - can be contraction head
+*/
+
+my_bool
+my_uca_can_be_contraction_head(CHARSET_INFO *cs, my_wc_t wc)
+{
+ return cs->contractions->flags[wc & MY_UCA_CNT_FLAG_MASK] & MY_UCA_CNT_HEAD;
+}
+
+
+/**
+ Check if a character can be contraction tail
+
+ @cs Pointer to CHARSET_INFO data
+ @wc Code point
+
+ @retval 0 - cannot be contraction tail
+ @retval 1 - can be contraction tail
+*/
+
+my_bool
+my_uca_can_be_contraction_tail(CHARSET_INFO *cs, my_wc_t wc)
+{
+ return cs->contractions->flags[wc & MY_UCA_CNT_FLAG_MASK] & MY_UCA_CNT_TAIL;
+}
+
+
+/**
+ Find a contraction and return its weight array
+
+ @cs Pointer to CHARSET data
+ @wc1 First character
+ @wc2 Second character
+
+ @return Weight array
+ @retval NULL - no contraction found
+ @retval ptr - contraction weight array
+*/
+
+uint16 *
+my_uca_contraction2_weight(CHARSET_INFO *cs, my_wc_t wc1, my_wc_t wc2)
+{
+ MY_CONTRACTIONS *list= cs->contractions;
+ MY_CONTRACTION *c, *last;
+ for (c= list->item, last= &list->item[list->nitems]; c < last; c++)
+ {
+ if (c->ch[0] == wc1 && c->ch[1] == wc2)
+ {
+ return c->weight;
+ }
+ }
+ return NULL;
+}
+
=== modified file 'strings/ctype-ucs2.c'
--- a/strings/ctype-ucs2.c 2009-11-30 12:42:24 +0000
+++ b/strings/ctype-ucs2.c 2009-12-03 12:02:37 +0000
@@ -1498,6 +1498,14 @@ void my_hash_sort_ucs2_bin(CHARSET_INFO
}
}
+
+static inline my_wc_t
+ucs2_to_wc(const uchar *ptr)
+{
+ return (((uint) ptr[0]) << 8) + ptr[1];
+}
+
+
/*
** Calculate min_str and max_str that ranges a LIKE string.
** Arguments:
@@ -1531,6 +1539,7 @@ my_bool my_like_range_ucs2(CHARSET_INFO
for ( ; ptr + 1 < end && min_str + 1 < min_end && charlen > 0
; ptr+=2, charlen--)
{
+ my_wc_t wc;
if (ptr[0] == '\0' && ptr[1] == escape && ptr + 1 < end)
{
ptr+=2; /* Skip escape */
@@ -1567,9 +1576,9 @@ fill_max_and_min:
}
if (have_contractions && ptr + 3 < end &&
- ptr[0] == '\0' &&
- my_uca_can_be_contraction_head(cs, (uchar) ptr[1]))
+ my_uca_can_be_contraction_head(cs, (wc= ucs2_to_wc((uchar*) ptr))))
{
+ my_wc_t wc2;
/* Contraction head found */
if (ptr[2] == '\0' && (ptr[3] == w_one || ptr[3] == w_many))
{
@@ -1581,9 +1590,8 @@ fill_max_and_min:
Check if the second letter can be contraction part,
and if two letters really produce a contraction.
*/
- if (ptr[2] == '\0' &&
- my_uca_can_be_contraction_tail(cs, (uchar) ptr[3]) &&
- my_uca_contraction2_weight(cs,(uchar) ptr[1], (uchar) ptr[3]))
+ if (my_uca_can_be_contraction_tail(cs, (wc2= ucs2_to_wc((uchar*) ptr + 2))) &&
+ my_uca_contraction2_weight(cs, wc , wc2))
{
/* Contraction found */
if (charlen == 1 || min_str + 2 >= min_end)
=== modified file 'unittest/mysys/Makefile.am'
--- a/unittest/mysys/Makefile.am 2009-11-26 08:44:38 +0000
+++ b/unittest/mysys/Makefile.am 2009-12-03 11:19:05 +0000
@@ -24,7 +24,7 @@ LDADD = $(top_builddir)/unittest/mytap
$(top_builddir)/strings/libmystrings.a
EXTRA_DIST = CMakeLists.txt
-noinst_PROGRAMS = bitmap-t base64-t lf-t waiting_threads-t
+noinst_PROGRAMS = bitmap-t base64-t my_atomic-t lf-t waiting_threads-t
if NEED_THREAD
# my_atomic-t is used to check thread functions, so it is safe to
1
0

[Maria-developers] Rev 2737: Add ds_mrr.cc to CMakeLists.txt in file:///home/psergey/dev/maria-5.2-dsmrr/
by Sergey Petrunya 15 Dec '09
by Sergey Petrunya 15 Dec '09
15 Dec '09
At file:///home/psergey/dev/maria-5.2-dsmrr/
------------------------------------------------------------
revno: 2737
revision-id: psergey(a)askmonty.org-20091215223739-f6xymmvanylqlrg9
parent: psergey(a)askmonty.org-20091215213555-h15367vp2hjei1da
committer: Sergey Petrunya <psergey(a)askmonty.org>
branch nick: maria-5.2-dsmrr
timestamp: Wed 2009-12-16 01:37:39 +0300
message:
Add ds_mrr.cc to CMakeLists.txt
=== modified file 'libmysqld/CMakeLists.txt'
--- a/libmysqld/CMakeLists.txt 2009-10-03 19:24:13 +0000
+++ b/libmysqld/CMakeLists.txt 2009-12-15 22:37:39 +0000
@@ -137,6 +137,7 @@
../sql/time.cc ../sql/tztime.cc ../sql/uniques.cc ../sql/unireg.cc
../sql/partition_info.cc ../sql/sql_connect.cc
../sql/scheduler.cc ../sql/event_parse_data.cc
+ ../sql/ds_mrr.cc
${GEN_SOURCES}
${LIB_SOURCES})
=== modified file 'sql/CMakeLists.txt'
--- a/sql/CMakeLists.txt 2009-09-15 10:46:35 +0000
+++ b/sql/CMakeLists.txt 2009-12-15 22:37:39 +0000
@@ -76,6 +76,7 @@
rpl_rli.cc rpl_mi.cc sql_servers.cc
sql_connect.cc scheduler.cc
sql_profile.cc event_parse_data.cc opt_table_elimination.cc
+ ds_mrr.cc
${PROJECT_SOURCE_DIR}/sql/sql_yacc.cc
${PROJECT_SOURCE_DIR}/sql/sql_yacc.h
${PROJECT_SOURCE_DIR}/include/mysqld_error.h
1
0

[Maria-developers] Rev 2736: Fix compile failure in file:///home/psergey/dev/maria-5.2-dsmrr/
by Sergey Petrunya 15 Dec '09
by Sergey Petrunya 15 Dec '09
15 Dec '09
At file:///home/psergey/dev/maria-5.2-dsmrr/
------------------------------------------------------------
revno: 2736
revision-id: psergey(a)askmonty.org-20091215213555-h15367vp2hjei1da
parent: psergey(a)askmonty.org-20091215172355-m8gr6zzr3r8m399y
committer: Sergey Petrunya <psergey(a)askmonty.org>
branch nick: maria-5.2-dsmrr
timestamp: Wed 2009-12-16 00:35:55 +0300
message:
Fix compile failure
=== modified file 'sql/ds_mrr.h'
--- a/sql/ds_mrr.h 2009-12-15 17:23:55 +0000
+++ b/sql/ds_mrr.h 2009-12-15 21:35:55 +0000
@@ -69,5 +69,3 @@
uint *buffer_size, COST_VECT *cost);
};
-void push_index_cond(JOIN_TAB *tab, uint keyno, bool other_tbls_ok);
-
=== modified file 'sql/sql_select.h'
--- a/sql/sql_select.h 2009-12-15 17:23:55 +0000
+++ b/sql/sql_select.h 2009-12-15 21:35:55 +0000
@@ -780,4 +780,5 @@
void eliminate_tables(JOIN *join);
+void push_index_cond(JOIN_TAB *tab, uint keyno, bool other_tbls_ok);
1
0

[Maria-developers] Rev 2735: Backport into MariaDB-5.2 the following: in file:///home/psergey/dev/maria-5.2-dsmrr/
by Sergey Petrunya 15 Dec '09
by Sergey Petrunya 15 Dec '09
15 Dec '09
At file:///home/psergey/dev/maria-5.2-dsmrr/
------------------------------------------------------------
revno: 2735
revision-id: psergey(a)askmonty.org-20091215172355-m8gr6zzr3r8m399y
parent: psergey(a)askmonty.org-20091215145330-oqv8jlxh36sl863m
committer: Sergey Petrunya <psergey(a)askmonty.org>
branch nick: maria-5.2-dsmrr
timestamp: Tue 2009-12-15 20:23:55 +0300
message:
Backport into MariaDB-5.2 the following:
WL#2474 "Multi Range Read: Change the default MRR implementation to implement new MRR interface"
WL#2475 "Batched range read functions for MyISAM/InnoDb"
"Index condition pushdown for MyISAM/InnoDB"
- Adjust test results (checked)
- Code cleanup.
=== modified file 'mysql-test/r/myisam_mrr.result'
--- a/mysql-test/r/myisam_mrr.result 2009-12-15 07:16:46 +0000
+++ b/mysql-test/r/myisam_mrr.result 2009-12-15 17:23:55 +0000
@@ -3,9 +3,6 @@
set read_rnd_buffer_size=79;
Warnings:
Warning 1292 Truncated incorrect read_rnd_buffer_size value: '79'
-select @@read_rnd_buffer_size;
-@@read_rnd_buffer_size
-8228
create table t1(a int);
show create table t1;
Table Create Table
=== modified file 'mysql-test/suite/maria/r/maria.result'
--- a/mysql-test/suite/maria/r/maria.result 2009-06-29 21:03:30 +0000
+++ b/mysql-test/suite/maria/r/maria.result 2009-12-15 17:23:55 +0000
@@ -382,20 +382,20 @@
explain select * from t1,t2 where t1.b=t2.b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL b NULL NULL NULL 2
-1 SIMPLE t1 ref b b 5 test.t2.b 1 Using where
+1 SIMPLE t1 ref b b 5 test.t2.b 1
explain select * from t1,t2 force index(c) where t1.a=t2.a;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 2
1 SIMPLE t1 ref a a 4 test.t2.a 3
explain select * from t1 where a=0 or a=2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 4 NULL 4 Using where
+1 SIMPLE t1 range a a 4 NULL 4 Using index condition; Using MRR
explain select * from t1 force index (a) where a=0 or a=2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 4 NULL 4 Using where
+1 SIMPLE t1 range a a 4 NULL 4 Using index condition; Using MRR
explain select * from t1 where c=1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref c,c_2 c 5 const 1 Using where
+1 SIMPLE t1 ref c,c_2 c 5 const 1
explain select * from t1 use index() where c=1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
@@ -1131,7 +1131,7 @@
*a *a*a *
explain select * from t1 where v='a';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref v,v_2 # 13 const # Using where
+1 SIMPLE t1 ref v,v_2 # 13 const # Using index condition
select v,count(*) from t1 group by v limit 10;
v count(*)
a 1
@@ -1307,7 +1307,7 @@
1 SIMPLE t1 ref v v 303 const # Using where; Using index
explain select * from t1 where v='a';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref v v 303 const # Using where
+1 SIMPLE t1 ref v v 303 const # Using index condition
select v,count(*) from t1 group by v limit 10;
v count(*)
a 1
=== modified file 'mysql-test/suite/parts/r/partition_special_innodb.result'
--- a/mysql-test/suite/parts/r/partition_special_innodb.result 2009-10-06 11:39:57 +0000
+++ b/mysql-test/suite/parts/r/partition_special_innodb.result 2009-12-15 17:23:55 +0000
@@ -31,9 +31,9 @@
2000-06-15 jukg zikhuk m
select * from t1 where a<19851231;
a b c d
+1975-01-01 abcde abcde m
+1980-10-14 fgbbd dtzndtz w
1983-12-31 cdef srtbvsr w
-1980-10-14 fgbbd dtzndtz w
-1975-01-01 abcde abcde m
drop table t1;
create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h)) engine='InnoDB'
partition by key(a,b,c,d,e,f,g,h) (
@@ -73,9 +73,9 @@
2000-06-15 jukg zikhuk m 45675 6465754.13 435242623462 18 pib mdotkbm.m
select * from t1 where a<19851231;
a b c d e f g h i
+1975-01-01 abcde abcde m 1234 123.45 32412341234 113 tbhth nrzh ztfghgfh fzh ftzhj fztjh
1980-10-14 fgbbd dtzndtz w 67856 5463354.67 3567845333 124 d,f sÃÂļierugsig msireg siug ei5ggth lrutluitgzeÃÂļjrtnb.rkjthuekuhzrkuthgjdnffjmbr
1983-12-31 cdef srtbvsr w 45634 13452.56 3452346456 127 liuugbzvdmrlti b itiortudirtfgtibm dfi
-1975-01-01 abcde abcde m 1234 123.45 32412341234 113 tbhth nrzh ztfghgfh fzh ftzhj fztjh
drop table t1;
create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, a1 date not null, b1 varchar(50) not null, c1 varchar(50) not null, d1 enum('m', 'w') not null, e1 int not null, f1 decimal (18,2) not null, g1 bigint not null, h1 tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1)) engine='InnoDB'
partition by key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1) (
@@ -123,9 +123,9 @@
2000-06-15 jukg zikhuk m 45675 6465754.13 435242623462 18 2000-06-15 jukg zikhuk m 45675 6465754.13 435242623462 18 pib mdotkbm.m
select * from t1 where a<19851231;
a b c d e f g h a1 b1 c1 d1 e1 f1 g1 h1 i
+1975-01-01 abcde abcde m 1234 123.45 32412341234 113 1975-01-01 abcde abcde m 1234 123.45 32412341234 113 tbhth nrzh ztfghgfh fzh ftzhj fztjh
+1980-10-14 fgbbd dtzndtz w 67856 5463354.67 3567845333 124 1980-10-14 fgbbd dtzndtz w 67856 5463354.67 3567845333 124 d,f sÃÂļierugsig msireg siug ei5ggth lrutluitgzeÃÂļjrtnb.rkjthuekuhzrkuthgjdnffjmbr
1983-12-31 cdef srtbvsr w 45634 13452.56 3452346456 127 1983-12-31 cdef srtbvsr w 45634 13452.56 3452346456 127 liuugbzvdmrlti b itiortudirtfgtibm dfi
-1980-10-14 fgbbd dtzndtz w 67856 5463354.67 3567845333 124 1980-10-14 fgbbd dtzndtz w 67856 5463354.67 3567845333 124 d,f sÃÂļierugsig msireg siug ei5ggth lrutluitgzeÃÂļjrtnb.rkjthuekuhzrkuthgjdnffjmbr
-1975-01-01 abcde abcde m 1234 123.45 32412341234 113 1975-01-01 abcde abcde m 1234 123.45 32412341234 113 tbhth nrzh ztfghgfh fzh ftzhj fztjh
drop table t1;
create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, a1 date not null, b1 varchar(50) not null, c1 varchar(50) not null, d1 enum('m', 'w') not null, e1 int not null, f1 decimal (18,2) not null, g1 bigint not null, h1 tinyint not null, a2 date not null, b2 varchar(50) not null, c2 varchar(50) not null, d2 enum('m', 'w') not null, e2 int not null, f2 decimal (18,2) not null, g2 bigint not null, h2 tinyint not null, a3 date not null, b3 varchar(50) not null, c3 varchar(50) not null, d3 enum('m', 'w') not null, e3 int not null, f3 decimal (18,2) not null, g3 bigint not null, h3 tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1,a2,b2,c2,d2,e2,f2,g2,h2,a3,b3,c3,d3,e3,f3,g3,h3,a4)) engine='InnoDB'
partition by key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1,a2,b2,c2,d2,e2,f2,g2,h2,a3,b3,c3,d3,e3,f3,g3,h3,a4) (
@@ -203,9 +203,9 @@
2000-06-15 jukg zikhuk m 45675 6465754.13 435242623462 18 2000-06-15 jukg zikhuk m 45675 6465754.13 435242623462 18 2000-06-15 jukg zikhuk m 45675 6465754.13 435242623462 18 2000-06-15 jukg zikhuk m 45675 6465754.13 435242623462 18 pib mdotkbm.m
select * from t1 where a<19851231;
a b c d e f g h a1 b1 c1 d1 e1 f1 g1 h1 a2 b2 c2 d2 e2 f2 g2 h2 a3 b3 c3 d3 e3 f3 g3 h3 i
+1975-01-01 abcde abcde m 1234 123.45 32412341234 113 1975-01-01 abcde abcde m 1234 123.45 32412341234 113 1975-01-01 abcde abcde m 1234 123.45 32412341234 113 1975-01-01 abcde abcde m 1234 123.45 32412341234 113 tbhth nrzh ztfghgfh fzh ftzhj fztjh
1980-10-14 fgbbd dtzndtz w 67856 5463354.67 3567845333 124 1980-10-14 fgbbd dtzndtz w 67856 5463354.67 3567845333 124 1980-10-14 fgbbd dtzndtz w 67856 5463354.67 3567845333 124 1980-10-14 fgbbd dtzndtz w 67856 5463354.67 3567845333 124 d,f sÃÂļierugsig msireg siug ei5ggth lrutluitgzeÃÂļjrtnb.rkjthuekuhzrkuthgjdnffjmbr
1983-12-31 cdef srtbvsr w 45634 13452.56 3452346456 127 1983-12-31 cdef srtbvsr w 45634 13452.56 3452346456 127 1983-12-31 cdef srtbvsr w 45634 13452.56 3452346456 127 1983-12-31 cdef srtbvsr w 45634 13452.56 3452346456 127 liuugbzvdmrlti b itiortudirtfgtibm dfi
-1975-01-01 abcde abcde m 1234 123.45 32412341234 113 1975-01-01 abcde abcde m 1234 123.45 32412341234 113 1975-01-01 abcde abcde m 1234 123.45 32412341234 113 1975-01-01 abcde abcde m 1234 123.45 32412341234 113 tbhth nrzh ztfghgfh fzh ftzhj fztjh
drop table t1;
# Bug#34604 - Assertion 'inited==RND' failed in handler::ha_rnd_end
CREATE TABLE t1 (
=== modified file 'mysql-test/suite/parts/r/partition_special_myisam.result'
--- a/mysql-test/suite/parts/r/partition_special_myisam.result 2009-10-06 11:39:57 +0000
+++ b/mysql-test/suite/parts/r/partition_special_myisam.result 2009-12-15 17:23:55 +0000
@@ -73,9 +73,9 @@
2000-06-15 jukg zikhuk m 45675 6465754.13 435242623462 18 pib mdotkbm.m
select * from t1 where a<19851231;
a b c d e f g h i
+1975-01-01 abcde abcde m 1234 123.45 32412341234 113 tbhth nrzh ztfghgfh fzh ftzhj fztjh
1980-10-14 fgbbd dtzndtz w 67856 5463354.67 3567845333 124 d,f sÃÂļierugsig msireg siug ei5ggth lrutluitgzeÃÂļjrtnb.rkjthuekuhzrkuthgjdnffjmbr
1983-12-31 cdef srtbvsr w 45634 13452.56 3452346456 127 liuugbzvdmrlti b itiortudirtfgtibm dfi
-1975-01-01 abcde abcde m 1234 123.45 32412341234 113 tbhth nrzh ztfghgfh fzh ftzhj fztjh
drop table t1;
create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, a1 date not null, b1 varchar(50) not null, c1 varchar(50) not null, d1 enum('m', 'w') not null, e1 int not null, f1 decimal (18,2) not null, g1 bigint not null, h1 tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1)) engine='MyISAM'
partition by key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1) (
@@ -123,9 +123,9 @@
2000-06-15 jukg zikhuk m 45675 6465754.13 435242623462 18 2000-06-15 jukg zikhuk m 45675 6465754.13 435242623462 18 pib mdotkbm.m
select * from t1 where a<19851231;
a b c d e f g h a1 b1 c1 d1 e1 f1 g1 h1 i
+1975-01-01 abcde abcde m 1234 123.45 32412341234 113 1975-01-01 abcde abcde m 1234 123.45 32412341234 113 tbhth nrzh ztfghgfh fzh ftzhj fztjh
+1980-10-14 fgbbd dtzndtz w 67856 5463354.67 3567845333 124 1980-10-14 fgbbd dtzndtz w 67856 5463354.67 3567845333 124 d,f sÃÂļierugsig msireg siug ei5ggth lrutluitgzeÃÂļjrtnb.rkjthuekuhzrkuthgjdnffjmbr
1983-12-31 cdef srtbvsr w 45634 13452.56 3452346456 127 1983-12-31 cdef srtbvsr w 45634 13452.56 3452346456 127 liuugbzvdmrlti b itiortudirtfgtibm dfi
-1980-10-14 fgbbd dtzndtz w 67856 5463354.67 3567845333 124 1980-10-14 fgbbd dtzndtz w 67856 5463354.67 3567845333 124 d,f sÃÂļierugsig msireg siug ei5ggth lrutluitgzeÃÂļjrtnb.rkjthuekuhzrkuthgjdnffjmbr
-1975-01-01 abcde abcde m 1234 123.45 32412341234 113 1975-01-01 abcde abcde m 1234 123.45 32412341234 113 tbhth nrzh ztfghgfh fzh ftzhj fztjh
drop table t1;
create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, a1 date not null, b1 varchar(50) not null, c1 varchar(50) not null, d1 enum('m', 'w') not null, e1 int not null, f1 decimal (18,2) not null, g1 bigint not null, h1 tinyint not null, a2 date not null, b2 varchar(50) not null, c2 varchar(50) not null, d2 enum('m', 'w') not null, e2 int not null, f2 decimal (18,2) not null, g2 bigint not null, h2 tinyint not null, a3 date not null, b3 varchar(50) not null, c3 varchar(50) not null, d3 enum('m', 'w') not null, e3 int not null, f3 decimal (18,2) not null, g3 bigint not null, h3 tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1,a2,b2,c2,d2,e2,f2,g2,h2,a3,b3,c3,d3,e3,f3,g3,h3,a4)) engine='MyISAM'
partition by key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1,a2,b2,c2,d2,e2,f2,g2,h2,a3,b3,c3,d3,e3,f3,g3,h3,a4) (
@@ -203,7 +203,7 @@
2000-06-15 jukg zikhuk m 45675 6465754.13 435242623462 18 2000-06-15 jukg zikhuk m 45675 6465754.13 435242623462 18 2000-06-15 jukg zikhuk m 45675 6465754.13 435242623462 18 2000-06-15 jukg zikhuk m 45675 6465754.13 435242623462 18 pib mdotkbm.m
select * from t1 where a<19851231;
a b c d e f g h a1 b1 c1 d1 e1 f1 g1 h1 a2 b2 c2 d2 e2 f2 g2 h2 a3 b3 c3 d3 e3 f3 g3 h3 i
+1975-01-01 abcde abcde m 1234 123.45 32412341234 113 1975-01-01 abcde abcde m 1234 123.45 32412341234 113 1975-01-01 abcde abcde m 1234 123.45 32412341234 113 1975-01-01 abcde abcde m 1234 123.45 32412341234 113 tbhth nrzh ztfghgfh fzh ftzhj fztjh
1980-10-14 fgbbd dtzndtz w 67856 5463354.67 3567845333 124 1980-10-14 fgbbd dtzndtz w 67856 5463354.67 3567845333 124 1980-10-14 fgbbd dtzndtz w 67856 5463354.67 3567845333 124 1980-10-14 fgbbd dtzndtz w 67856 5463354.67 3567845333 124 d,f sÃÂļierugsig msireg siug ei5ggth lrutluitgzeÃÂļjrtnb.rkjthuekuhzrkuthgjdnffjmbr
1983-12-31 cdef srtbvsr w 45634 13452.56 3452346456 127 1983-12-31 cdef srtbvsr w 45634 13452.56 3452346456 127 1983-12-31 cdef srtbvsr w 45634 13452.56 3452346456 127 1983-12-31 cdef srtbvsr w 45634 13452.56 3452346456 127 liuugbzvdmrlti b itiortudirtfgtibm dfi
-1975-01-01 abcde abcde m 1234 123.45 32412341234 113 1975-01-01 abcde abcde m 1234 123.45 32412341234 113 1975-01-01 abcde abcde m 1234 123.45 32412341234 113 1975-01-01 abcde abcde m 1234 123.45 32412341234 113 tbhth nrzh ztfghgfh fzh ftzhj fztjh
drop table t1;
=== modified file 'mysql-test/suite/pbxt/r/distinct.result'
--- a/mysql-test/suite/pbxt/r/distinct.result 2009-08-17 15:57:58 +0000
+++ b/mysql-test/suite/pbxt/r/distinct.result 2009-12-15 17:23:55 +0000
@@ -175,7 +175,7 @@
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 4 Using temporary
1 SIMPLE t2 ref a a 4 test.t1.a 1 Using index
-1 SIMPLE t3 ref a a 5 test.t1.b 1 Using where; Using index
+1 SIMPLE t3 ref a a 5 test.t1.b 1 Using index
SELECT distinct t3.a FROM t3,t2,t1 WHERE t3.a=t1.b AND t1.a=t2.a;
a
1
@@ -190,7 +190,7 @@
explain select distinct t1.a from t1,t3 where t1.a=t3.a;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index PRIMARY PRIMARY 4 NULL 4 Using index; Using temporary
-1 SIMPLE t3 ref a a 5 test.t1.a 1 Using where; Using index; Distinct
+1 SIMPLE t3 ref a a 5 test.t1.a 1 Using index; Distinct
select distinct t1.a from t1,t3 where t1.a=t3.a;
a
1
=== modified file 'mysql-test/suite/pbxt/r/explain.result'
--- a/mysql-test/suite/pbxt/r/explain.result 2009-04-02 10:03:14 +0000
+++ b/mysql-test/suite/pbxt/r/explain.result 2009-12-15 17:23:55 +0000
@@ -50,7 +50,7 @@
insert into ÃÃÃ (ÃÃÃ0) values (2);
explain select ÃÃÃ0 from ÃÃÃ where ÃÃÃ0=1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE ÃÃÃ ref ÃÃÃ0,ÃÃÃ01 ÃÃÃ0 5 const 1 Using where; Using index
+1 SIMPLE ÃÃÃ ref ÃÃÃ0,ÃÃÃ01 ÃÃÃ0 5 const 1 Using index
drop table ÃÃÃ;
set names latin1;
select 3 into @v1;
=== modified file 'mysql-test/suite/pbxt/r/heap.result'
--- a/mysql-test/suite/pbxt/r/heap.result 2009-04-02 10:03:14 +0000
+++ b/mysql-test/suite/pbxt/r/heap.result 2009-12-15 17:23:55 +0000
@@ -204,7 +204,7 @@
INSERT INTO t1 VALUES (10), (10), (10);
EXPLAIN SELECT * FROM t1 WHERE a=10;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref a a 5 const 3 Using where
+1 SIMPLE t1 ref a a 5 const 3
SELECT * FROM t1 WHERE a=10;
a
10
=== modified file 'mysql-test/suite/pbxt/r/join.result'
--- a/mysql-test/suite/pbxt/r/join.result 2009-08-17 15:57:58 +0000
+++ b/mysql-test/suite/pbxt/r/join.result 2009-12-15 17:23:55 +0000
@@ -774,7 +774,7 @@
explain select * from t2,t3 where t2.a < 200 and t2.b=t3.b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range a,b a 5 NULL 1 Using where
-1 SIMPLE t3 ref b b 5 test.t2.b 1 Using where
+1 SIMPLE t3 ref b b 5 test.t2.b 1
drop table t1, t2, t3;
create table t1 (a int);
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
=== modified file 'mysql-test/suite/pbxt/r/join_nested.result'
--- a/mysql-test/suite/pbxt/r/join_nested.result 2009-08-17 15:57:58 +0000
+++ b/mysql-test/suite/pbxt/r/join_nested.result 2009-12-15 17:23:55 +0000
@@ -74,7 +74,7 @@
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where
-1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00
+1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00 Using where
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b` from `test`.`t2` left join (`test`.`t3` join `test`.`t4`) on((`test`.`t4`.`b` = `test`.`t2`.`b`)) where ((`test`.`t3`.`a` = 1) or isnull(`test`.`t3`.`c`))
SELECT t2.a,t2.b,t3.a,t3.b,t4.a,t4.b
@@ -150,7 +150,7 @@
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where
-1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00
+1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00 Using where
1 SIMPLE t5 ALL NULL NULL NULL NULL 3 100.00
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b` from `test`.`t2` left join (`test`.`t3` join `test`.`t4` join `test`.`t5`) on((`test`.`t4`.`b` = `test`.`t2`.`b`)) where ((`test`.`t3`.`a` > 1) or isnull(`test`.`t3`.`c`))
@@ -180,7 +180,7 @@
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where
-1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00
+1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00 Using where
1 SIMPLE t5 ALL NULL NULL NULL NULL 3 100.00 Using where
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b` from `test`.`t2` left join (`test`.`t3` join `test`.`t4` join `test`.`t5`) on((`test`.`t4`.`b` = `test`.`t2`.`b`)) where (((`test`.`t3`.`a` > 1) or isnull(`test`.`t3`.`c`)) and ((`test`.`t5`.`a` < 3) or isnull(`test`.`t5`.`c`)))
@@ -230,7 +230,7 @@
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00
1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using join buffer
-1 SIMPLE t8 ALL NULL NULL NULL NULL 2 100.00
+1 SIMPLE t8 ALL NULL NULL NULL NULL 2 100.00 Using where
Warnings:
Note 1003 select `test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b` from `test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t7`.`b` = `test`.`t8`.`b`) and (`test`.`t6`.`b` < 10))) where 1
SELECT t6.a,t6.b,t7.a,t7.b,t8.a,t8.b
@@ -546,12 +546,12 @@
1 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where
-1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00
-1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00
+1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where
+1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00 Using where
1 SIMPLE t5 ALL NULL NULL NULL NULL 3 100.00
-1 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00
-1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00
-1 SIMPLE t8 ALL NULL NULL NULL NULL 2 100.00
+1 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00 Using where
+1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using where
+1 SIMPLE t8 ALL NULL NULL NULL NULL 2 100.00 Using where
Warnings:
Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.
`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) where ((`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)))
SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
@@ -837,8 +837,8 @@
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using join buffer
-1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00
-1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00
+1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where
+1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00 Using where
Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b` from `test`.`t1` join `test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) where (`test`.`t1`.`a` <= 2)
CREATE INDEX idx_b ON t2(b);
@@ -851,7 +851,7 @@
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00
1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00 Using join buffer
-1 SIMPLE t2 ref idx_b idx_b 5 test.t3.b 1 100.00
+1 SIMPLE t2 ref idx_b idx_b 5 test.t3.b 1 100.00 Using where
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b` from `test`.`t3` join `test`.`t4` left join (`test`.`t1` join `test`.`t2`) on(((`test`.`t3`.`a` = 1) and (`test`.`t3`.`b` = `test`.`t2`.`b`) and (`test`.`t2`.`b` = `test`.`t4`.`b`))) where 1
@@ -1054,8 +1054,8 @@
(t8.b=t9.b OR t8.c IS NULL) AND
(t9.a=1);
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t0 ref idx_a idx_a 5 const 1 100.00 Using where
-1 SIMPLE t1 ref idx_b idx_b 5 test.t0.b 1 100.00 Using where
+1 SIMPLE t0 ref idx_a idx_a 5 const 1 100.00
+1 SIMPLE t1 ref idx_b idx_b 5 test.t0.b 1 100.00
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where
1 SIMPLE t4 ref idx_b idx_b 5 test.t2.b 1 100.00
@@ -1202,13 +1202,13 @@
EXPLAIN SELECT a, b, c FROM t1 LEFT JOIN (t2, t3) ON c < 3 and b = c;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL a 5 NULL 21 Using index
-1 SIMPLE t3 index c c 5 NULL 6 Using index
+1 SIMPLE t3 index c c 5 NULL 6 Using where; Using index
1 SIMPLE t2 ref b b 5 test.t3.c 1 Using index
EXPLAIN SELECT a, b, c FROM t1 LEFT JOIN (t2, t3) ON b < 3 and b = c;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL a 5 NULL # Using index
1 SIMPLE t3 index c c 5 NULL # Using index
-1 SIMPLE t2 ref b b 5 test.t3.c # Using index
+1 SIMPLE t2 ref b b 5 test.t3.c # Using where; Using index
SELECT a, b, c FROM t1 LEFT JOIN (t2, t3) ON b < 3 and b = c;
a b c
NULL 0 0
@@ -1279,7 +1279,7 @@
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL a 5 NULL # Using index
1 SIMPLE t3 index c c 5 NULL # Using index
-1 SIMPLE t2 ref b b 5 test.t3.c # Using index
+1 SIMPLE t2 ref b b 5 test.t3.c # Using where; Using index
SELECT a, b, c FROM t1 LEFT JOIN (t2, t3) ON b < 3 and b = c;
a b c
NULL NULL NULL
@@ -1323,8 +1323,8 @@
EXPLAIN SELECT * FROM t1 LEFT JOIN (t2 LEFT JOIN t3 ON c21=c31) ON c11=c21;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2
-1 SIMPLE t2 ALL NULL NULL NULL NULL 0
-1 SIMPLE t3 ALL NULL NULL NULL NULL 0
+1 SIMPLE t2 ALL NULL NULL NULL NULL 0 Using where
+1 SIMPLE t3 ALL NULL NULL NULL NULL 0 Using where
DROP TABLE t1,t2,t3;
CREATE TABLE t1 (goods int(12) NOT NULL, price varchar(128) NOT NULL);
INSERT INTO t1 VALUES (23, 2340), (26, 9900);
=== modified file 'mysql-test/suite/pbxt/r/key_cache.result'
--- a/mysql-test/suite/pbxt/r/key_cache.result 2009-08-17 15:57:58 +0000
+++ b/mysql-test/suite/pbxt/r/key_cache.result 2009-12-15 17:23:55 +0000
@@ -122,7 +122,7 @@
explain select count(*) from t1, t2 where t1.p = t2.i;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index PRIMARY PRIMARY 4 NULL 2 Using index
-1 SIMPLE t2 ref k1 k1 5 test.t1.p 1 Using where; Using index
+1 SIMPLE t2 ref k1 k1 5 test.t1.p 1 Using index
select count(*) from t1, t2 where t1.p = t2.i;
count(*)
3
=== modified file 'mysql-test/suite/pbxt/r/negation_elimination.result'
--- a/mysql-test/suite/pbxt/r/negation_elimination.result 2009-04-02 10:03:14 +0000
+++ b/mysql-test/suite/pbxt/r/negation_elimination.result 2009-12-15 17:23:55 +0000
@@ -79,7 +79,7 @@
19
explain select * from t1 where not(a != 10);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref a a 5 const 1 Using where; Using index
+1 SIMPLE t1 ref a a 5 const 1 Using index
select * from t1 where not(a != 1);
a
1
=== modified file 'mysql-test/suite/pbxt/r/null.result'
--- a/mysql-test/suite/pbxt/r/null.result 2009-08-17 15:57:58 +0000
+++ b/mysql-test/suite/pbxt/r/null.result 2009-12-15 17:23:55 +0000
@@ -170,7 +170,7 @@
insert into t1 values(null);
explain select * from t1 where i=2 or i is null;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref_or_null i i 5 const # Using where; Using index
+1 SIMPLE t1 ref_or_null i i 5 const # Using index
select count(*) from t1 where i=2 or i is null;
count(*)
10
=== modified file 'mysql-test/suite/pbxt/r/null_key.result'
--- a/mysql-test/suite/pbxt/r/null_key.result 2009-08-17 15:57:58 +0000
+++ b/mysql-test/suite/pbxt/r/null_key.result 2009-12-15 17:23:55 +0000
@@ -21,10 +21,10 @@
1 SIMPLE t1 range a,b a 9 NULL 3 Using where; Using index
explain select * from t1 where (a is null or a = 7) and b=7;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref_or_null a,b a 9 const,const 2 Using where; Using index
+1 SIMPLE t1 ref_or_null a,b a 9 const,const 2 Using index
explain select * from t1 where (a is null or a = 7) and b=7 order by a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref_or_null a,b a 9 const,const 2 Using where; Using index; Using filesort
+1 SIMPLE t1 ref_or_null a,b a 9 const,const 2 Using index; Using filesort
explain select * from t1 where (a is null and b>a) or a is null and b=7 limit 2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref a,b a 5 const 3 Using where; Using index
@@ -151,7 +151,7 @@
insert into t1 values (7,null), (8,null), (8,7);
explain select * from t1 where a = 7 and (b=7 or b is null);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref_or_null a,b a 10 const,const 2 Using where; Using index
+1 SIMPLE t1 ref_or_null a,b a 10 const,const 2 Using index
select * from t1 where a = 7 and (b=7 or b is null);
a b
7 7
@@ -166,7 +166,7 @@
NULL 7
explain select * from t1 where (a = 7 or a is null) and (a = 7 or a is null);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref_or_null a a 5 const 5 Using where; Using index
+1 SIMPLE t1 ref_or_null a a 5 const 5 Using index
select * from t1 where (a = 7 or a is null) and (a = 7 or a is null);
a b
7 NULL
@@ -192,7 +192,7 @@
explain select * from t2,t1 where t1.a=t2.a and (b= 7 or b is null);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 2
-1 SIMPLE t1 ref_or_null a a 10 test.t2.a,const 4 Using where; Using index
+1 SIMPLE t1 ref_or_null a a 10 test.t2.a,const 4 Using index
select * from t2,t1 where t1.a=t2.a and (b= 7 or b is null);
a a b
7 7 7
@@ -202,7 +202,7 @@
explain select * from t2,t1 where (t1.a=t2.a or t1.a is null) and b= 7;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 2
-1 SIMPLE t1 ref_or_null a a 10 test.t2.a,const 4 Using where; Using index
+1 SIMPLE t1 ref_or_null a a 10 test.t2.a,const 4 Using index
select * from t2,t1 where (t1.a=t2.a or t1.a is null) and b= 7;
a a b
7 7 7
@@ -226,7 +226,7 @@
explain select * from t2,t1 where t1.a=t2.a or t1.a is null;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 4
-1 SIMPLE t1 ref_or_null a a 5 test.t2.a 4 Using where; Using index
+1 SIMPLE t1 ref_or_null a a 5 test.t2.a 4 Using index
explain select * from t2,t1 where t1.a<=>t2.a or (t1.a is null and t1.b <> 9);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 4
@@ -258,7 +258,7 @@
INSERT INTO t2 VALUES (1,NULL),(2,NULL),(3,1),(4,2),(5,NULL),(6,NULL),(7,3),(8,4),(9,NULL),(10,NULL);
explain select id from t1 where uniq_id is null;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref idx1 idx1 5 const 5 Using where
+1 SIMPLE t1 ref idx1 idx1 5 const 5 Using index condition
explain select id from t1 where uniq_id =1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const idx1 idx1 5 const 1
=== modified file 'mysql-test/t/myisam_mrr.test'
--- a/mysql-test/t/myisam_mrr.test 2009-12-15 07:16:46 +0000
+++ b/mysql-test/t/myisam_mrr.test 2009-12-15 17:23:55 +0000
@@ -8,7 +8,6 @@
set @read_rnd_buffer_size_save= @@read_rnd_buffer_size;
set read_rnd_buffer_size=79;
-select @@read_rnd_buffer_size;
-- source include/mrr_tests.inc
=== modified file 'sql/ds_mrr.cc'
--- a/sql/ds_mrr.cc 2009-12-15 07:16:46 +0000
+++ b/sql/ds_mrr.cc 2009-12-15 17:23:55 +0000
@@ -950,8 +950,15 @@
((tab->table->file->index_flags(keyno, 0, 1) &
HA_DO_INDEX_COND_PUSHDOWN) &&
tab->join->thd->variables.engine_condition_pushdown);
- // psergey:
- //
+
+ /*
+ Do not try index condition pushdown on indexes which have partially-covered
+ columns. Unpacking from a column prefix into index tuple is not a supported
+ operation in some engines, see e.g. MySQL BUG#42991.
+ TODO: a better solution would be not to consider partially-covered columns
+ as parts of the index and still produce/check index condition for
+ fully-covered index columns.
+ */
KEY *key_info= tab->table->key_info + keyno;
for (uint kp= 0; kp < key_info->key_parts; kp++)
{
@@ -961,7 +968,7 @@
break;
}
}
- // :psergey
+
/*
When WL#5116 is done this DBUG statement must be removed. It's just a
temporary hack to allow us to discriminate whether a test failure relates
@@ -984,7 +991,8 @@
Item *idx_remainder_cond= 0;
tab->pre_idx_push_select_cond= tab->select_cond;
#if 0
- // The following is only needed for BKA:
+ /*
+ psergey: enable the below when we backport BKA: */
/*
For BKA cache we store condition to special BKA cache field
because evaluation of the condition requires additional operations
=== modified file 'sql/ds_mrr.h'
--- a/sql/ds_mrr.h 2009-12-15 07:16:46 +0000
+++ b/sql/ds_mrr.h 2009-12-15 17:23:55 +0000
@@ -1,4 +1,8 @@
-
+/*
+ This file contains declarations for
+ - Disk-Sweep MultiRangeRead (DS-MRR) implementation
+ - Index Condition Pushdown helper functions
+*/
/**
A Disk-Sweep MRR interface implementation
@@ -65,4 +69,5 @@
uint *buffer_size, COST_VECT *cost);
};
+void push_index_cond(JOIN_TAB *tab, uint keyno, bool other_tbls_ok);
=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc 2009-09-07 20:50:10 +0000
+++ b/sql/ha_ndbcluster.cc 2009-12-15 17:23:55 +0000
@@ -8702,6 +8702,8 @@
DBUG_RETURN(FALSE);
}
+#if 0
+/* MRR/NDB is disabled, for details see method declarations in ha_ndbcluster.h */
int
ha_ndbcluster::read_multi_range_first(KEY_MULTI_RANGE **found_range_p,
KEY_MULTI_RANGE *ranges,
@@ -9074,6 +9076,7 @@
m_multi_range_result_ptr += reclength;
DBUG_RETURN(0);
}
+#endif
int
ha_ndbcluster::setup_recattr(const NdbRecAttr* curr)
=== modified file 'sql/ha_ndbcluster.h'
--- a/sql/ha_ndbcluster.h 2008-05-29 18:39:25 +0000
+++ b/sql/ha_ndbcluster.h 2009-12-15 17:23:55 +0000
@@ -259,10 +259,20 @@
/**
* Multi range stuff
*/
+#if 0
+ /*
+ MRR/NDB is disabled in MariaDB. This is because in MariaDB, we've
+ backported
+ - the latest version of MRR interface (BKA needs this)
+ - the latest version of DS-MRR implementation
+ but didn't backport the latest version MRR/NDB implementation.
+
+ */
int read_multi_range_first(KEY_MULTI_RANGE **found_range_p,
KEY_MULTI_RANGE*ranges, uint range_count,
bool sorted, HANDLER_BUFFER *buffer);
int read_multi_range_next(KEY_MULTI_RANGE **found_range_p);
+#endif
bool null_value_index_search(KEY_MULTI_RANGE *ranges,
KEY_MULTI_RANGE *end_range,
HANDLER_BUFFER *buffer);
=== modified file 'sql/handler.cc'
--- a/sql/handler.cc 2009-12-15 07:16:46 +0000
+++ b/sql/handler.cc 2009-12-15 17:23:55 +0000
@@ -4193,136 +4193,6 @@
return read_time;
}
-#if 0
-// psergey-mrr
-
-/**
- Read the first row of a multi-range set.
-
- @param found_range_p Returns a pointer to the element in 'ranges' that
- corresponds to the returned row.
- @param ranges An array of KEY_MULTI_RANGE range descriptions.
- @param range_count Number of ranges in 'ranges'.
- @param sorted If result should be sorted per key.
- @param buffer A HANDLER_BUFFER for internal handler usage.
-
- @note
- - Record is read into table->record[0].
- - *found_range_p returns a valid value only if read_multi_range_first()
- returns 0.
- - Sorting is done within each range. If you want an overall sort, enter
- 'ranges' with sorted ranges.
-
- @retval
- 0 OK, found a row
- @retval
- HA_ERR_END_OF_FILE No rows in range
- @retval
- \# Error code
-*/
-int handler::read_multi_range_first(KEY_MULTI_RANGE **found_range_p,
- KEY_MULTI_RANGE *ranges, uint range_count,
- bool sorted, HANDLER_BUFFER *buffer)
-{
- int result= HA_ERR_END_OF_FILE;
- DBUG_ENTER("handler::read_multi_range_first");
- multi_range_sorted= sorted;
- multi_range_buffer= buffer;
-
- table->mark_columns_used_by_index_no_reset(active_index, table->read_set);
- table->column_bitmaps_set(table->read_set, table->write_set);
-
- for (multi_range_curr= ranges, multi_range_end= ranges + range_count;
- multi_range_curr < multi_range_end;
- multi_range_curr++)
- {
- result= read_range_first(multi_range_curr->start_key.keypart_map ?
- &multi_range_curr->start_key : 0,
- multi_range_curr->end_key.keypart_map ?
- &multi_range_curr->end_key : 0,
- test(multi_range_curr->range_flag & EQ_RANGE),
- multi_range_sorted);
- if (result != HA_ERR_END_OF_FILE)
- break;
- }
-
- *found_range_p= multi_range_curr;
- DBUG_PRINT("exit",("result %d", result));
- DBUG_RETURN(result);
-}
-
-
-/**
- Read the next row of a multi-range set.
-
- @param found_range_p Returns a pointer to the element in 'ranges' that
- corresponds to the returned row.
-
- @note
- - Record is read into table->record[0].
- - *found_range_p returns a valid value only if read_multi_range_next()
- returns 0.
-
- @retval
- 0 OK, found a row
- @retval
- HA_ERR_END_OF_FILE No (more) rows in range
- @retval
- \# Error code
-*/
-int handler::read_multi_range_next(KEY_MULTI_RANGE **found_range_p)
-{
- int result;
- DBUG_ENTER("handler::read_multi_range_next");
-
- /* We should not be called after the last call returned EOF. */
- DBUG_ASSERT(multi_range_curr < multi_range_end);
-
- do
- {
- /* Save a call if there can be only one row in range. */
- if (multi_range_curr->range_flag != (UNIQUE_RANGE | EQ_RANGE))
- {
- result= read_range_next();
-
- /* On success or non-EOF errors jump to the end. */
- if (result != HA_ERR_END_OF_FILE)
- break;
- }
- else
- {
- if (was_semi_consistent_read())
- goto scan_it_again;
- /*
- We need to set this for the last range only, but checking this
- condition is more expensive than just setting the result code.
- */
- result= HA_ERR_END_OF_FILE;
- }
-
- multi_range_curr++;
-scan_it_again:
- /* Try the next range(s) until one matches a record. */
- for (; multi_range_curr < multi_range_end; multi_range_curr++)
- {
- result= read_range_first(multi_range_curr->start_key.keypart_map ?
- &multi_range_curr->start_key : 0,
- multi_range_curr->end_key.keypart_map ?
- &multi_range_curr->end_key : 0,
- test(multi_range_curr->range_flag & EQ_RANGE),
- multi_range_sorted);
- if (result != HA_ERR_END_OF_FILE)
- break;
- }
- }
- while ((result == HA_ERR_END_OF_FILE) &&
- (multi_range_curr < multi_range_end));
-
- *found_range_p= multi_range_curr;
- DBUG_PRINT("exit",("handler::read_multi_range_next: result %d", result));
- DBUG_RETURN(result);
-}
-#endif
/**
Read first row between two ranges.
=== modified file 'sql/handler.h'
--- a/sql/handler.h 2009-12-15 14:53:30 +0000
+++ b/sql/handler.h 2009-12-15 17:23:55 +0000
@@ -1290,15 +1290,6 @@
ha_statistics stats;
- /** The following are for read_multi_range */
-//////psergey: was:
-#if 0
- bool multi_range_sorted;
- KEY_MULTI_RANGE *multi_range_curr;
- KEY_MULTI_RANGE *multi_range_end;
- HANDLER_BUFFER *multi_range_buffer;
-#endif
-//////psergey
/** MultiRangeRead-related members: */
range_seq_t mrr_iter; /* Interator to traverse the range sequence */
RANGE_SEQ_IF mrr_funcs; /* Range sequence traversal functions */
@@ -1311,7 +1302,6 @@
bool mrr_have_range;
/** Current range (the one we're now returning rows from) */
KEY_MULTI_RANGE mrr_cur_range;
-//////psergey
/** The following are for read_range() */
key_range save_end_range, *end_range;
@@ -1744,13 +1734,6 @@
update_index_statistics();
return error;
}
-#if 0
- virtual int read_multi_range_first(KEY_MULTI_RANGE **found_range_p,
- KEY_MULTI_RANGE *ranges, uint range_count,
- bool sorted, HANDLER_BUFFER *buffer);
- virtual int read_multi_range_next(KEY_MULTI_RANGE **found_range_p);
-#endif
- //psergey-mrr:
virtual ha_rows multi_range_read_info_const(uint keyno, RANGE_SEQ_IF *seq,
void *seq_init_param,
uint n_ranges, uint *bufsz,
@@ -1761,7 +1744,6 @@
uint n_ranges, uint mode,
HANDLER_BUFFER *buf);
virtual int multi_range_read_next(char **range_info);
- //psergey-mrr: ends
virtual int read_range_first(const key_range *start_key,
const key_range *end_key,
bool eq_range, bool sorted);
=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc 2009-12-15 07:16:46 +0000
+++ b/sql/sql_select.cc 2009-12-15 17:23:55 +0000
@@ -16734,11 +16734,12 @@
if (keyno != MAX_KEY && keyno == table->file->pushed_idx_cond_keyno &&
table->file->pushed_idx_cond)
extra.append(STRING_WITH_LEN("; Using index condition"));
- /**
- psergey-mrr:
+ /*
+ psergey: enable the below when we backport BKA:
+
else if (tab->cache_idx_cond)
extra.append(STRING_WITH_LEN("; Using index condition(BKA)"));
- **/
+ */
if (quick_type == QUICK_SELECT_I::QS_TYPE_ROR_UNION ||
quick_type == QUICK_SELECT_I::QS_TYPE_ROR_INTERSECT ||
quick_type == QUICK_SELECT_I::QS_TYPE_INDEX_MERGE)
=== modified file 'sql/sql_select.h'
--- a/sql/sql_select.h 2009-12-15 07:16:46 +0000
+++ b/sql/sql_select.h 2009-12-15 17:23:55 +0000
@@ -780,7 +780,4 @@
void eliminate_tables(JOIN *join);
-/// psergey-mrr:
-void push_index_cond(JOIN_TAB *tab, uint keyno, bool other_tbls_ok);
-
1
0

[Maria-developers] Rev 2734: Backport into MariaDB-5.2 the following: in file:///home/psergey/dev/maria-5.2-dsmrr/
by Sergey Petrunya 15 Dec '09
by Sergey Petrunya 15 Dec '09
15 Dec '09
At file:///home/psergey/dev/maria-5.2-dsmrr/
------------------------------------------------------------
revno: 2734
revision-id: psergey(a)askmonty.org-20091215145330-oqv8jlxh36sl863m
parent: psergey(a)askmonty.org-20091215071646-gbq7406d2xpopd82
committer: Sergey Petrunya <psergey(a)askmonty.org>
branch nick: maria-5.2-dsmrr
timestamp: Tue 2009-12-15 17:53:30 +0300
message:
Backport into MariaDB-5.2 the following:
WL#2474 "Multi Range Read: Change the default MRR implementation to implement new MRR interface"
WL#2475 "Batched range read functions for MyISAM/InnoDb"
"Index condition pushdown for MyISAM/InnoDB"
- Fix valgrind failures
=== modified file 'sql/handler.h'
--- a/sql/handler.h 2009-12-15 07:16:46 +0000
+++ b/sql/handler.h 2009-12-15 14:53:30 +0000
@@ -1381,7 +1381,9 @@
ref_length(sizeof(my_off_t)),
ft_handler(0), inited(NONE),
locked(FALSE), implicit_emptied(0),
- pushed_cond(0), next_insert_id(0), insert_id_for_cur_row(0),
+ pushed_cond(0), pushed_idx_cond(NULL),
+ pushed_idx_cond_keyno(MAX_KEY),
+ next_insert_id(0), insert_id_for_cur_row(0),
auto_inc_intervals_count(0)
{
reset_statistics();
1
0

[Maria-developers] Rev 2733: Backport into MariaDB-5.2 the following: in file:///home/psergey/dev/maria-5.2-dsmrr/
by Sergey Petrunya 15 Dec '09
by Sergey Petrunya 15 Dec '09
15 Dec '09
At file:///home/psergey/dev/maria-5.2-dsmrr/
------------------------------------------------------------
revno: 2733
revision-id: psergey(a)askmonty.org-20091215071646-gbq7406d2xpopd82
parent: igor(a)askmonty.org-20091112043128-yd6odg8zr5ribjal
committer: Sergey Petrunya <psergey(a)askmonty.org>
branch nick: maria-5.2-dsmrr
timestamp: Tue 2009-12-15 10:16:46 +0300
message:
Backport into MariaDB-5.2 the following:
WL#2474 "Multi Range Read: Change the default MRR implementation to implement new MRR interface"
WL#2475 "Batched range read functions for MyISAM/InnoDb"
"Index condition pushdown for MyISAM/InnoDB"
Igor's fix from sp1r-igor(a)olga.mysql.com-20080330055902-07614:
There could be observed the following problems:
1. EXPLAIN did not mention pushdown conditions from on expressions in the
'extra' column. As a result if a query had no where conditions pushed
down to a table, but had on conditions pushed to this table the 'extra'
column in the EXPLAIN for the table missed 'using where'.
2. Conditions for ref access were not eliminated from on expressions
though such conditions were eliminated from the where condition.
Diff too large for email (23741 lines, the limit is 1000).
1
0

[Maria-developers] bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (knielsen:2776)
by knielsenīŧ knielsen-hq.org 14 Dec '09
by knielsenīŧ knielsen-hq.org 14 Dec '09
14 Dec '09
#At lp:maria
2776 knielsen(a)knielsen-hq.org 2009-12-14 [merge]
Merge latest PBXT fixes from Paul.
modified:
storage/pbxt/src/myxt_xt.cc
=== modified file 'storage/pbxt/src/myxt_xt.cc'
--- a/storage/pbxt/src/myxt_xt.cc 2009-12-01 09:50:46 +0000
+++ b/storage/pbxt/src/myxt_xt.cc 2009-12-10 11:36:05 +0000
@@ -3041,14 +3041,6 @@ xtPublic MX_CHARSET_INFO *myxt_getcharse
return (MX_CHARSET_INFO *)&my_charset_utf8_general_ci;
}
-#ifdef DBUG_OFF
-//typedef struct st_plugin_int *plugin_ref;
-#define REF_MYSQL_PLUGIN(x) (x)
-#else
-//typedef struct st_plugin_int **plugin_ref;
-#define REF_MYSQL_PLUGIN(x) (*(x))
-#endif
-
xtPublic void *myxt_create_thread()
{
#ifdef DRIZZLED
@@ -3109,14 +3101,18 @@ xtPublic void *myxt_create_thread()
/*
* If PBXT is the default storage engine, then creating any THD objects will add extra
- * references to the PBXT plugin object and will effectively deadlock the plugin so
- * that server will have to force plugin shutdown. To avoid deadlocking and forced shutdown
- * we must dereference the plugin after creating THD objects.
+ * references to the PBXT plugin object. because the threads are created but PBXT
+ * this creates a self reference, and the reference count does not go to zero
+ * on shutdown.
+ *
+ * The server then issues a message that it is forcing shutdown of the plugin.
+ *
+ * However, the engine reference is not required by the THDs used by PBXT, so
+ * I just remove them here.
*/
- LEX_STRING& plugin_name = REF_MYSQL_PLUGIN(new_thd->variables.table_plugin)->name;
- if ((plugin_name.length == 4) && (strncmp(plugin_name.str, "PBXT", plugin_name.length) == 0)) {
- REF_MYSQL_PLUGIN(new_thd->variables.table_plugin)->ref_count--;
- }
+ plugin_unlock(NULL, new_thd->variables.table_plugin);
+ new_thd->variables.table_plugin = NULL;
+
new_thd->thread_stack = (char *) &new_thd;
new_thd->store_globals();
lex_start(new_thd);
@@ -3151,17 +3147,6 @@ xtPublic void myxt_destroy_thread(void *
#else
close_thread_tables(thd);
#endif
-
- /*
- * In myxt_create_thread we decremented plugin ref-count to avoid dead-locking.
- * Here we need to increment ref-count to avoid assertion failures.
- */
- if (thd->variables.table_plugin) {
- LEX_STRING& plugin_name = REF_MYSQL_PLUGIN(thd->variables.table_plugin)->name;
- if ((plugin_name.length == 4) && (strncmp(plugin_name.str, "PBXT", plugin_name.length) == 0)) {
- REF_MYSQL_PLUGIN(thd->variables.table_plugin)->ref_count++;
- }
- }
delete thd;
1
0

[Maria-developers] bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (knielsen:2784)
by knielsenīŧ knielsen-hq.org 13 Dec '09
by knielsenīŧ knielsen-hq.org 13 Dec '09
13 Dec '09
#At lp:maria
2784 knielsen(a)knielsen-hq.org 2009-12-13
Fix source tarball name and 99 char path limitation.
Fix obsolete automake usage in AM_INIT_AUTOMAKE so we can use the option to use
tar version without 99 char pathname limit.
modified:
configure.in
win/configure.js
win/make_mariadb_win_dist
per-file messages:
configure.in
Fix obsolete usage of AM_INIT_AUTOMAKE.
Set option to use tar file format without 99 char lenght limit.
win/configure.js
Update parsing of configure.in
win/make_mariadb_win_dist
Update parsing of configure.in
=== modified file 'configure.in'
--- a/configure.in 2009-12-03 11:34:11 +0000
+++ b/configure.in 2009-12-13 22:04:39 +0000
@@ -3,8 +3,6 @@ dnl Process this file with autoconf to p
AC_PREREQ(2.52)dnl Minimum Autoconf version required.
-AC_INIT(sql/mysqld.cc)
-AC_CANONICAL_SYSTEM
# The Docs Makefile.am parses this line!
# remember to also update version.c in ndb
#
@@ -15,7 +13,12 @@ AC_CANONICAL_SYSTEM
# MySQL version number.
#
# Note: the following line must be parseable by win/configure.js:GetVersion()
-AM_INIT_AUTOMAKE(mysql, 5.1.41-MariaDB-beta)
+# and by win/make_mariadb_win_dist
+AC_INIT(mysql, 5.1.41-MariaDB-beta)
+AC_CONFIG_SRCDIR(sql/mysqld.cc)
+AC_CANONICAL_SYSTEM
+
+AM_INIT_AUTOMAKE([tar-ustar])
AM_CONFIG_HEADER([include/config.h:config.h.in])
PROTOCOL_VERSION=10
=== modified file 'win/configure.js'
--- a/win/configure.js 2009-10-07 21:00:29 +0000
+++ b/win/configure.js 2009-12-13 22:04:39 +0000
@@ -155,8 +155,8 @@ function GetValue(str, key)
function GetVersion(str)
{
- var key = "AM_INIT_AUTOMAKE(mysql, ";
- var key2 = "AM_INIT_AUTOMAKE(mariadb, ";
+ var key = "AC_INIT(mysql, ";
+ var key2 = "AC_INIT(mariadb, ";
var key_len = key.length;
var pos = str.indexOf(key); //5.0.6-beta)
if (pos == -1)
=== modified file 'win/make_mariadb_win_dist'
--- a/win/make_mariadb_win_dist 2009-10-30 10:50:48 +0000
+++ b/win/make_mariadb_win_dist 2009-12-13 22:04:39 +0000
@@ -25,7 +25,7 @@ devenv.com MySQL.sln /build Debug
# TODO extract version number
VER=`cat configure.in |
- perl -e 'while (<>) { if (/^AM_INIT_AUTOMAKE\([a-z ]*, *([0-9a-z\.-]+)/) { print "$1\n"; exit(0)} } ; exit 1'`
+ perl -e 'while (<>) { if (/^AC_INIT\([a-z ]*, *([0-9a-z\.-]+)/) { print "$1\n"; exit(0)} } ; exit 1'`
echo Version string: $VER.
1
0

[Maria-developers] bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (knielsen:2784)
by knielsenīŧ knielsen-hq.org 11 Dec '09
by knielsenīŧ knielsen-hq.org 11 Dec '09
11 Dec '09
#At lp:maria
2784 knielsen(a)knielsen-hq.org 2009-12-12
Fix source tarball name and 99 char path limitation.
Fix obsolete automake usage in AM_INIT_AUTOMAKE so we can use the option to use
tar version without 99 char pathname limit.
Change package name to get the source tarball to be named mariadb- not mysql-.
Remove extra -MariaDB version string; we can instead change the package name and
use --with-server-suffix when building packages.
modified:
CMakeLists.txt
Makefile.am
configure.in
include/config-netware.h
include/config-win.h
scripts/Makefile.am
support-files/Makefile.am
win/configure.js
win/make_mariadb_win_dist
per-file messages:
CMakeLists.txt
PACKAGE macro should not be needed.
Makefile.am
Fix tarball path name.
configure.in
Fix obsolete usage of AM_INIT_AUTOMAKE.
Change package name to mariadb to get proper naming of source tarball.
Set option to use tar file format without 99 char lenght limit.
include/config-netware.h
PACKAGE macro should not be needed.
include/config-win.h
PACKAGE macro should not be needed.
scripts/Makefile.am
The path should be /mysql not /mariadb for compatibility reasons.
support-files/Makefile.am
The path should be /mysql not /mariadb for compatibility reasons.
win/configure.js
Update parsing of configure.in
win/make_mariadb_win_dist
Update parsing of configure.in
=== modified file 'CMakeLists.txt'
--- a/CMakeLists.txt 2009-12-03 11:19:05 +0000
+++ b/CMakeLists.txt 2009-12-11 23:26:09 +0000
@@ -36,7 +36,6 @@ ADD_DEFINITIONS(-DDEFAULT_MYSQL_HOME="c:
ADD_DEFINITIONS(-DDEFAULT_BASEDIR="c:/Program Files/MySQL/")
ADD_DEFINITIONS(-DMYSQL_DATADIR="c:/Program Files/MySQL/MySQL Server ${MYSQL_BASE_VERSION}/data")
ADD_DEFINITIONS(-DDEFAULT_CHARSET_HOME="c:/Program Files/MySQL/MySQL Server ${MYSQL_BASE_VERSION}/")
-ADD_DEFINITIONS(-DPACKAGE=mysql)
ADD_DEFINITIONS(-DSHAREDIR="share")
# Set debug options
=== modified file 'Makefile.am'
--- a/Makefile.am 2009-12-03 11:19:05 +0000
+++ b/Makefile.am 2009-12-11 23:26:09 +0000
@@ -63,7 +63,7 @@ dist-hook:
# Simple target to allow scripts etc. to get the name of the source
# tarball easily.
show-dist-name:
- @echo "$(PACKAGE)-$(VERSION)"
+ @echo "$(PACKAGE_TARNAME)-$(VERSION)"
all-local: @ABI_CHECK@
=== modified file 'configure.in'
--- a/configure.in 2009-12-03 11:34:11 +0000
+++ b/configure.in 2009-12-11 23:26:09 +0000
@@ -3,8 +3,6 @@ dnl Process this file with autoconf to p
AC_PREREQ(2.52)dnl Minimum Autoconf version required.
-AC_INIT(sql/mysqld.cc)
-AC_CANONICAL_SYSTEM
# The Docs Makefile.am parses this line!
# remember to also update version.c in ndb
#
@@ -15,7 +13,12 @@ AC_CANONICAL_SYSTEM
# MySQL version number.
#
# Note: the following line must be parseable by win/configure.js:GetVersion()
-AM_INIT_AUTOMAKE(mysql, 5.1.41-MariaDB-beta)
+# and by win/make_mariadb_win_dist
+AC_INIT([MariaDB], [5.1.41-beta])
+AC_CONFIG_SRCDIR(sql/mysqld.cc)
+AC_CANONICAL_SYSTEM
+
+AM_INIT_AUTOMAKE([tar-ustar])
AM_CONFIG_HEADER([include/config.h:config.h.in])
PROTOCOL_VERSION=10
=== modified file 'include/config-netware.h'
--- a/include/config-netware.h 2009-07-31 19:28:15 +0000
+++ b/include/config-netware.h 2009-12-11 23:26:09 +0000
@@ -127,7 +127,6 @@ extern "C" {
/* default directory information */
#define DEFAULT_MYSQL_HOME "sys:/mysql"
-#define PACKAGE "mysql"
#define DEFAULT_BASEDIR "sys:/"
#define SHAREDIR "share/"
#define DEFAULT_CHARSET_HOME "sys:/mysql/"
=== modified file 'include/config-win.h'
--- a/include/config-win.h 2009-09-07 20:50:10 +0000
+++ b/include/config-win.h 2009-12-11 23:26:09 +0000
@@ -348,7 +348,6 @@ inline ulonglong double2ulonglong(double
#ifndef CMAKE_CONFIGD
#define DEFAULT_MYSQL_HOME "c:\\mysql"
#define MYSQL_DATADIR "c:\\mysql\\data"
-#define PACKAGE "mysql"
#define DEFAULT_BASEDIR "C:\\"
#define SHAREDIR "share"
#define DEFAULT_CHARSET_HOME "C:/mysql/"
=== modified file 'scripts/Makefile.am'
--- a/scripts/Makefile.am 2008-12-10 09:02:25 +0000
+++ b/scripts/Makefile.am 2009-12-11 23:26:09 +0000
@@ -96,7 +96,7 @@ CLEANFILES = @server_scripts@ \
pkgplugindir = $(pkglibdir)/plugin
# Default same as 'pkgdatadir', but we can override it
-pkgsuppdir = $(datadir)/@PACKAGE@
+pkgsuppdir = $(datadir)/mysql
# mysqlbug should be distributed built so that people can report build
# failures with it.
=== modified file 'support-files/Makefile.am'
--- a/support-files/Makefile.am 2009-10-23 16:48:54 +0000
+++ b/support-files/Makefile.am 2009-12-11 23:26:09 +0000
@@ -38,7 +38,7 @@ EXTRA_DIST = mysql.spec.sh \
SUBDIRS = MacOSX RHEL4-SElinux
# Default same as 'pkgdatadir', but we can override it
-pkgsuppdir = $(datadir)/@PACKAGE@
+pkgsuppdir = $(datadir)/mysql
pkgsupp_DATA = my-small.cnf \
my-medium.cnf \
=== modified file 'win/configure.js'
--- a/win/configure.js 2009-10-07 21:00:29 +0000
+++ b/win/configure.js 2009-12-11 23:26:09 +0000
@@ -155,8 +155,8 @@ function GetValue(str, key)
function GetVersion(str)
{
- var key = "AM_INIT_AUTOMAKE(mysql, ";
- var key2 = "AM_INIT_AUTOMAKE(mariadb, ";
+ var key = "AC_INIT([mysql], [";
+ var key2 = "AC_INIT([mariadb], [";
var key_len = key.length;
var pos = str.indexOf(key); //5.0.6-beta)
if (pos == -1)
@@ -166,7 +166,7 @@ function GetVersion(str)
}
if (pos == -1) return null;
pos += key_len;
- var end = str.indexOf(")", pos);
+ var end = str.indexOf("]", pos);
if (end == -1) return null;
return str.substring(pos, end);
}
=== modified file 'win/make_mariadb_win_dist'
--- a/win/make_mariadb_win_dist 2009-10-30 10:50:48 +0000
+++ b/win/make_mariadb_win_dist 2009-12-11 23:26:09 +0000
@@ -25,7 +25,7 @@ devenv.com MySQL.sln /build Debug
# TODO extract version number
VER=`cat configure.in |
- perl -e 'while (<>) { if (/^AM_INIT_AUTOMAKE\([a-z ]*, *([0-9a-z\.-]+)/) { print "$1\n"; exit(0)} } ; exit 1'`
+ perl -e 'while (<>) { if (/^AC_INIT\(\[[a-z ]*\], *\[([0-9a-z\.-]+)\]/) { print "$1\n"; exit(0)} } ; exit 1'`
echo Version string: $VER.
1
0