summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2001-10-19 22:10:54 +0300
committerunknown <monty@hundin.mysql.fi>2001-10-19 22:10:54 +0300
commit253b9ecb1113131de67df7b8e1b2413a5ee113bb (patch)
treee717f4195e6b7d87809d3867302f30ea43732546 /sql
parent6f2d56162b2b3c1117780ddc2686a5369bd172db (diff)
downloadmariadb-git-253b9ecb1113131de67df7b8e1b2413a5ee113bb.tar.gz
Don't use signal() on windows.
Added missing InnoDB variables to SHOW VARIABLES. Fixed bug when doing WHERE 'column_name=NULL' on an indexed column that had NULL values. Fixed bug when doing 'LEFT JOIN ... ON (column_name = constant) WHERE column_name = constant' Docs/manual.texi: Changelog libmysql/libmysql.c: Don't use signal() on windows. mysql-test/r/join_outer.result: Test for bugfix mysql-test/r/null.result: Test for bugfix mysql-test/t/join_outer.test: Test for bugfix mysql-test/t/null.test: Test for bugfix sql/mysqld.cc: Add missing InnoDB variables to SHOW VARIABLES. sql/sql_select.cc: Fixed bug when doing WHERE 'column_name=NULL' on an indexed column that had NULL values. Fixed bug when doing 'LEFT JOIN ... ON (column_name = constant) WHERE column_name = constant'
Diffstat (limited to 'sql')
-rw-r--r--sql/mysqld.cc10
-rw-r--r--sql/sql_select.cc9
2 files changed, 14 insertions, 5 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 2207fe81e94..abcfbd0d457 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -2901,13 +2901,21 @@ struct show_var_st init_vars[]= {
{"have_openssl", (char*) &have_ssl, SHOW_HAVE},
{"init_file", (char*) &opt_init_file, SHOW_CHAR_PTR},
#ifdef HAVE_INNOBASE_DB
+ {"innodb_additional_mem_pool_size", (char*) &innobase_additional_mem_pool_size, SHOW_LONG },
+ {"innodb_buffer_pool_size", (char*) &innobase_buffer_pool_size, SHOW_LONG },
{"innodb_data_file_path", (char*) &innobase_data_file_path, SHOW_CHAR_PTR},
{"innodb_data_home_dir", (char*) &innobase_data_home_dir, SHOW_CHAR_PTR},
+ {"innodb_file_io_threads", (char*) &innobase_file_io_threads, SHOW_LONG },
{"innodb_flush_log_at_trx_commit", (char*) &innobase_flush_log_at_trx_commit, SHOW_MY_BOOL},
+ {"innodb_flush_method", (char*) &innobase_unix_file_flush_method, SHOW_CHAR_PTR},
+ {"innodb_lock_wait_timeout", (char*) &innobase_lock_wait_timeout, SHOW_LONG },
{"innodb_log_arch_dir", (char*) &innobase_log_arch_dir, SHOW_CHAR_PTR},
{"innodb_log_archive", (char*) &innobase_log_archive, SHOW_MY_BOOL},
+ {"innodb_log_buffer_size", (char*) &innobase_log_buffer_size, SHOW_LONG },
+ {"innodb_log_file_size", (char*) &innobase_log_file_size, SHOW_LONG},
+ {"innodb_log_files_in_group", (char*) &innobase_log_files_in_group, SHOW_LONG},
{"innodb_log_group_home_dir", (char*) &innobase_log_group_home_dir, SHOW_CHAR_PTR},
- {"innodb_flush_method", (char*) &innobase_unix_file_flush_method, SHOW_CHAR_PTR},
+ {"innodb_mirrored_log_groups", (char*) &innobase_mirrored_log_groups, SHOW_LONG},
#endif
{"interactive_timeout", (char*) &net_interactive_timeout, SHOW_LONG},
{"join_buffer_size", (char*) &join_buff_size, SHOW_LONG},
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index e97fa3b0abf..ef3cacf114c 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -4963,15 +4963,16 @@ end_write_group(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
static bool test_if_ref(Item_field *left_item,Item *right_item)
{
Field *field=left_item->field;
- if (!field->table->const_table) // No need to change const test
+ // No need to change const test. We also have to keep tests on LEFT JOIN
+ if (!field->table->const_table && !field->table->maybe_null)
{
Item *ref_item=part_of_refkey(field->table,field);
if (ref_item && ref_item->eq(right_item))
{
if (right_item->type() == Item::FIELD_ITEM)
- return (field->eq_def(((Item_field *) right_item)->field) &&
- !field->table->maybe_null);
- if (right_item->const_item())
+ return (field->eq_def(((Item_field *) right_item)->field));
+ if (right_item->const_item() &&
+ (right_item->val_int() || !right_item->null_value))
{
// We can remove binary fields and numerical fields except float,
// as float comparison isn't 100 % secure