From 760d42e7d00a387dec00590cef1775e9e3132438 Mon Sep 17 00:00:00 2001 From: Alexey Botchkov Date: Fri, 9 Oct 2009 19:44:22 +0500 Subject: Bug#47216 programs should quit if the file specified by --defaults-file option isn't found added code to exit a tool if the forced config file wasn't found per-file comments: client/mysql.cc Bug#47216 programs should quit if the file specified by --defaults-file option isn't found added code to exit a tool if the forced config file wasn't found client/mysql_upgrade.c Bug#47216 programs should quit if the file specified by --defaults-file option isn't found added code to exit a tool if the forced config file wasn't found client/mysqladmin.cc Bug#47216 programs should quit if the file specified by --defaults-file option isn't found added code to exit a tool if the forced config file wasn't found client/mysqlcheck.c Bug#47216 programs should quit if the file specified by --defaults-file option isn't found added code to exit a tool if the forced config file wasn't found client/mysqldump.c Bug#47216 programs should quit if the file specified by --defaults-file option isn't found added code to exit a tool if the forced config file wasn't found client/mysqlimport.c Bug#47216 programs should quit if the file specified by --defaults-file option isn't found added code to exit a tool if the forced config file wasn't found client/mysqlshow.c Bug#47216 programs should quit if the file specified by --defaults-file option isn't found added code to exit a tool if the forced config file wasn't found client/mysqlslap.c Bug#47216 programs should quit if the file specified by --defaults-file option isn't found added code to exit a tool if the forced config file wasn't found mysql-test/t/mysql.test Bug#47216 programs should quit if the file specified by --defaults-file option isn't found test added sql/mysqld.cc Bug#47216 programs should quit if the file specified by --defaults-file option isn't found added code to exit a tool if the forced config file wasn't found storage/myisam/myisamchk.c Bug#47216 programs should quit if the file specified by --defaults-file option isn't found added code to exit a tool if the forced config file wasn't found storage/myisam/myisampack.c Bug#47216 programs should quit if the file specified by --defaults-file option isn't found added code to exit a tool if the forced config file wasn't found --- sql/mysqld.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sql/mysqld.cc') diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 896be4a7f19..4c070f53e23 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -3283,7 +3283,8 @@ static int init_common_variables(const char *conf_file_name, int argc, orig_argc=argc; orig_argv=argv; - load_defaults(conf_file_name, groups, &argc, &argv); + if (load_defaults(conf_file_name, groups, &argc, &argv)) + return 1; defaults_argv=argv; defaults_argc=argc; if (get_options(&defaults_argc, defaults_argv)) -- cgit v1.2.1 From d9ea0d0cd5030da40b791a75269cc4dbc4e0d8fe Mon Sep 17 00:00:00 2001 From: Alexey Botchkov Date: Tue, 3 Nov 2009 17:54:41 +0400 Subject: Bug#41371 Select returns 1 row with condition "col is not null and col is null" For application compatibility reasons MySQL converts " IS NULL" predicates to " = LAST_INSERT_ID()" in the first SELECT following an INSERT regardless of whether they're top level predicates or not. This causes wrong and obscure results when these predicates are combined with others on the same columns. Fixed by only doing the transformation on a single top-level predicate if a special SQL mode is turned on (sql_auto_is_null). Also made sql_auto_is_null off by default. per-file comments: mysql-test/r/func_isnull.result Bug#41371 Select returns 1 row with condition "col is not null and col is null" test result updated mysql-test/t/func_isnull.test Bug#41371 Select returns 1 row with condition "col is not null and col is null" test case added sql/mysqld.cc Bug#41371 Select returns 1 row with condition "col is not null and col is null" sql_auto_is_null now is OFF by default. sql/sql_select.cc Bug#41371 Select returns 1 row with condition "col is not null and col is null" remove_eq_conds() split in two parts - one only checks the upper condition, the req_remove_eq_conds() recursively checks all the condition tree. mysql-test/extra/rpl_tests/rpl_insert_id.test Bug#41371 Select returns 1 row with condition "col is not null and col is null" test fixed (set the sql_auto_is_null variable) mysql-test/r/mysqlbinlog.result Bug#41371 Select returns 1 row with condition "col is not null and col is null" result updated mysql-test/r/mysqlbinlog2.result Bug#41371 Select returns 1 row with condition "col is not null and col is null" result updated mysql-test/r/odbc.result Bug#41371 Select returns 1 row with condition "col is not null and col is null" result updated mysql-test/r/query_cache.result Bug#41371 Select returns 1 row with condition "col is not null and col is null" result updated mysql-test/r/user_var-binlog.result Bug#41371 Select returns 1 row with condition "col is not null and col is null" result updated mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result Bug#41371 Select returns 1 row with condition "col is not null and col is null" result updated mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result Bug#41371 Select returns 1 row with condition "col is not null and col is null" result updated mysql-test/suite/rpl/r/rpl_insert_id.result Bug#41371 Select returns 1 row with condition "col is not null and col is null" result updated mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result Bug#41371 Select returns 1 row with condition "col is not null and col is null" result updated mysql-test/suite/rpl/r/rpl_sp.result Bug#41371 Select returns 1 row with condition "col is not null and col is null" result updated mysql-test/t/odbc.test Bug#41371 Select returns 1 row with condition "col is not null and col is null" test fixed (set the sql_auto_is_null variable) --- sql/mysqld.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/mysqld.cc') diff --git a/sql/mysqld.cc b/sql/mysqld.cc index ee31339c77e..c432b3d9e0a 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -7792,7 +7792,7 @@ static int mysql_init_variables(void) log_error_file_ptr= log_error_file; lc_messages_dir_ptr= lc_messages_dir; mysql_data_home= mysql_real_data_home; - thd_startup_options= (OPTION_AUTO_IS_NULL | OPTION_BIN_LOG | + thd_startup_options= (OPTION_BIN_LOG | OPTION_QUOTE_SHOW_CREATE | OPTION_SQL_NOTES); protocol_version= PROTOCOL_VERSION; what_to_log= ~ (1L << (uint) COM_TIME); -- cgit v1.2.1