diff options
-rw-r--r-- | Docs/manual.texi | 30 | ||||
-rw-r--r-- | myisam/myisamchk.c | 4 | ||||
-rw-r--r-- | sql/mysqld.cc | 2 | ||||
-rw-r--r-- | sql/sql_base.cc | 10 |
4 files changed, 38 insertions, 8 deletions
diff --git a/Docs/manual.texi b/Docs/manual.texi index bafc990f0e6..4dbf03d8c16 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -29836,6 +29836,32 @@ mysql> select 1 IS NOT NULL, 0 IS NOT NULL, NULL IS NOT NULL; -> 1 1 0 @end example +@cindex ODBC compatibility +@cindex compatibility, with ODBC +To be able to work good with other programs, MySQL supports the following +extra features when using @code{IS NULL}: + +@itemize @bullet +@item +You can find the last inserted row with: + +@example +SELECT * FROM tbl_name WHERE auto_col IS NULL +@end example + +This can be disabled by setting @code{SQL_AUTO_IS_NULL=0}. @xref{SET OPTION}. +@item +For @code{NOT NULL} @code{DATE} and @code{DATETIME} columns you can find +the special date @code{0000-00-00} by using: + +@example +SELECT * FROM tbl_name WHERE date_column IS NULL +@end example + +This is needed to get some ODBC applications to work (as ODBC doesn't +support a @code{0000-00-00} date) +@end itemize + @findex BETWEEN ... AND @item expr BETWEEN min AND max If @code{expr} is greater than or equal to @code{min} and @code{expr} is @@ -48435,8 +48461,8 @@ Fixed bug in multi table delete. @item Fixed bug in @code{SELECT CONCAT(argument-list) ... GROUP BY 1}. @item -@code{SELECT ... INSERT} did a full rollback in case of an error. Fixed -so that we only roll back the last statement. +@code{INSERT ... SELECT} did a full rollback in case of an error. Fixed +so that we only roll back the last statement in the current transaction. @item Fixed bug with empty expression for boolean fulltext search. @item diff --git a/myisam/myisamchk.c b/myisam/myisamchk.c index 60ffbaeccdb..c421d3b5578 100644 --- a/myisam/myisamchk.c +++ b/myisam/myisamchk.c @@ -575,9 +575,13 @@ get_one_option(int optid, break; case '#': if (argument && *argument == '0') + { DBUG_POP(); + } else + { DBUG_PUSH(argument ? argument : "d:t:o,/tmp/myisamchk.trace"); + } break; case 'V': print_version(); diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 7250288c924..d30d285d0b8 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -3068,7 +3068,7 @@ struct show_var_st init_vars[]= { {"log_update", (char*) &opt_update_log, SHOW_BOOL}, {"log_bin", (char*) &opt_bin_log, SHOW_BOOL}, {"log_slave_updates", (char*) &opt_log_slave_updates, SHOW_BOOL}, - {"log_long_queries", (char*) &opt_slow_log, SHOW_BOOL}, + {"log_slow_queries", (char*) &opt_slow_log, SHOW_BOOL}, {"long_query_time", (char*) &long_query_time, SHOW_LONG}, {"low_priority_updates", (char*) &low_priority_updates, SHOW_BOOL}, {"lower_case_table_names", (char*) &lower_case_table_names, SHOW_LONG}, diff --git a/sql/sql_base.cc b/sql/sql_base.cc index a5116fa0e20..f4a70db2e5d 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -708,11 +708,11 @@ TABLE *reopen_name_locked_table(THD* thd, TABLE_LIST* table_list) if (open_unireg_entry(thd, table, db, table_name, table_name, 1) || !(table->table_cache_key =memdup_root(&table->mem_root,(char*) key, key_length))) - { - closefrm(table); - pthread_mutex_unlock(&LOCK_open); - DBUG_RETURN(0); - } + { + closefrm(table); + pthread_mutex_unlock(&LOCK_open); + DBUG_RETURN(0); + } table->key_length=key_length; table->version=0; |