List:Commits« Previous MessageNext Message »
From:Evgeny Potemkin Date:October 7 2010 4:54pm
Subject:bzr push into mysql-5.5-bugteam branch (epotemkin:3214)
View as plain text  
 3214 Evgeny Potemkin	2010-10-07 [merge]
      Auto-merged.

    removed:
      mysql-test/suite/innodb/r/innodb-system-table-view.result
      mysql-test/suite/innodb/t/innodb-system-table-view-master.opt
      mysql-test/suite/innodb/t/innodb-system-table-view.test
      pstack/
      pstack/Makefile.am
      pstack/aout/
      pstack/aout/Makefile.am
      pstack/aout/aout64.h
      pstack/aout/stab.def
      pstack/aout/stab_gnu.h
      pstack/bucomm.c
      pstack/bucomm.h
      pstack/budbg.h
      pstack/debug.c
      pstack/debug.h
      pstack/demangle.h
      pstack/filemode.c
      pstack/ieee.c
      pstack/ieee.h
      pstack/libiberty.h
      pstack/linuxthreads.c
      pstack/linuxthreads.h
      pstack/pstack.c
      pstack/pstack.h
      pstack/pstacktrace.h
      pstack/rddbg.c
      pstack/stabs.c
      storage/innobase/COPYING
      storage/innobase/COPYING.Sun_Microsystems
      storage/innobase/include/ut0auxconf.h
      storage/innobase/ut/ut0auxconf_atomic_pthread_t_gcc.c
      storage/innobase/ut/ut0auxconf_atomic_pthread_t_solaris.c
      storage/innobase/ut/ut0auxconf_have_gcc_atomics.c
      storage/innobase/ut/ut0auxconf_have_solaris_atomics.c
      storage/innobase/ut/ut0auxconf_pause.c
      storage/innobase/ut/ut0auxconf_sizeof_pthread_t.c
    added:
      include/mysql/client_plugin.h
      include/mysql/client_plugin.h.pp
      include/mysql/plugin_auth.h
      include/mysql/plugin_auth.h.pp
      include/mysql/plugin_auth_common.h
      include/welcome_copyright_notice.h
      mysql-test/include/have_plugin_auth.inc
      mysql-test/r/plugin_auth.result
      mysql-test/r/plugin_load_option.result
      mysql-test/std_data/parts/t1TIMESTAMP.frm
      mysql-test/suite/innodb/r/innodb-truncate.result
      mysql-test/suite/innodb/r/innodb_bug56716.result
      mysql-test/suite/innodb/t/innodb-truncate.test
      mysql-test/suite/innodb/t/innodb_bug56716.test
      mysql-test/suite/sys_vars/r/external_user_basic.result
      mysql-test/suite/sys_vars/r/proxy_user_basic.result
      mysql-test/suite/sys_vars/t/external_user_basic.test
      mysql-test/suite/sys_vars/t/proxy_user_basic.test
      mysql-test/t/plugin_auth-master.opt
      mysql-test/t/plugin_auth.test
      mysql-test/t/plugin_load_option-master.opt
      mysql-test/t/plugin_load_option.test
      plugin/auth/
      plugin/auth/CMakeLists.txt
      plugin/auth/Makefile.am
      plugin/auth/auth_socket.c
      plugin/auth/dialog.c
      plugin/auth/plug.in
      plugin/auth/test_plugin.c
      sql-common/client_plugin.c
    renamed:
      config/ac-macros/ha_ndbcluster.m4 => storage/ndb/ndb_configure.m4
    modified:
      Makefile.am
      README
      client/CMakeLists.txt
      client/client_priv.h
      client/mysql.cc
      client/mysql_upgrade.c
      client/mysqladmin.cc
      client/mysqlbinlog.cc
      client/mysqlcheck.c
      client/mysqldump.c
      client/mysqlimport.c
      client/mysqlshow.c
      client/mysqlslap.c
      client/mysqltest.cc
      cmake/os/WindowsCache.cmake
      config.h.cmake
      configure.in
      dbug/dbug.c
      include/Makefile.am
      include/errmsg.h
      include/my_global.h
      include/my_no_pthread.h
      include/my_pthread.h
      include/my_sys.h
      include/mysql.h
      include/mysql.h.pp
      include/mysql/plugin.h
      include/mysql_com.h
      include/mysql_embed.h
      include/sha1.h
      include/sql_common.h
      libmysql/CMakeLists.txt
      libmysql/Makefile.shared
      libmysql/client_settings.h
      libmysql/errmsg.c
      libmysql/libmysql.c
      libmysql/libmysql.def
      libmysqld/CMakeLists.txt
      libmysqld/Makefile.am
      libmysqld/embedded_priv.h
      libmysqld/lib_sql.cc
      libmysqld/libmysqld.c
      mysql-test/collections/default.daily
      mysql-test/collections/default.experimental
      mysql-test/collections/default.weekly
      mysql-test/include/ctype_numconv.inc
      mysql-test/include/index_merge2.inc
      mysql-test/lib/mtr_cases.pm
      mysql-test/lib/mtr_report.pm
      mysql-test/mysql-test-run.pl
      mysql-test/r/1st.result
      mysql-test/r/cache_innodb.result
      mysql-test/r/change_user.result
      mysql-test/r/connect.result
      mysql-test/r/ctype_ucs.result
      mysql-test/r/delete.result
      mysql-test/r/events_bugs.result
      mysql-test/r/func_time.result
      mysql-test/r/grant.result
      mysql-test/r/grant2.result
      mysql-test/r/grant_cache_no_prot.result
      mysql-test/r/grant_cache_ps_prot.result
      mysql-test/r/index_merge_myisam.result
      mysql-test/r/information_schema.result
      mysql-test/r/log_tables_upgrade.result
      mysql-test/r/mdl_sync.result
      mysql-test/r/merge.result
      mysql-test/r/mysql_upgrade.result
      mysql-test/r/mysql_upgrade_ssl.result
      mysql-test/r/mysqlcheck.result
      mysql-test/r/mysqld--help-win.result
      mysql-test/r/mysqlshow.result
      mysql-test/r/mysqltest.result
      mysql-test/r/partition.result
      mysql-test/r/partition_error.result
      mysql-test/r/ps.result
      mysql-test/r/sp_notembedded.result
      mysql-test/r/sp_trans.result
      mysql-test/r/system_mysql_db.result
      mysql-test/r/trigger-trans.result
      mysql-test/r/variables_debug.result
      mysql-test/suite/federated/federated.result
      mysql-test/suite/funcs_1/r/innodb_trig_03e.result
      mysql-test/suite/funcs_1/r/is_columns_is.result
      mysql-test/suite/funcs_1/r/is_columns_mysql.result
      mysql-test/suite/funcs_1/r/is_key_column_usage.result
      mysql-test/suite/funcs_1/r/is_statistics.result
      mysql-test/suite/funcs_1/r/is_statistics_mysql.result
      mysql-test/suite/funcs_1/r/is_table_constraints.result
      mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result
      mysql-test/suite/funcs_1/r/is_tables_mysql.result
      mysql-test/suite/funcs_1/r/is_user_privileges.result
      mysql-test/suite/funcs_1/r/memory_trig_03e.result
      mysql-test/suite/funcs_1/r/myisam_trig_03e.result
      mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result
      mysql-test/suite/funcs_1/r/processlist_priv_ps.result
      mysql-test/suite/funcs_1/t/is_user_privileges.test
      mysql-test/suite/innodb/r/innodb-index.result
      mysql-test/suite/innodb/r/innodb-zip.result
      mysql-test/suite/innodb/r/innodb.result
      mysql-test/suite/innodb/r/innodb_bug52745.result
      mysql-test/suite/innodb/r/innodb_bug53591.result
      mysql-test/suite/innodb/r/innodb_file_format.result
      mysql-test/suite/innodb/r/innodb_mysql.result
      mysql-test/suite/innodb/t/innodb.test
      mysql-test/suite/innodb/t/innodb_mysql.test
      mysql-test/suite/parts/inc/partition_check.inc
      mysql-test/suite/parts/inc/partition_check_drop.inc
      mysql-test/suite/parts/inc/partition_crash.inc
      mysql-test/suite/parts/inc/partition_fail.inc
      mysql-test/suite/parts/inc/partition_layout.inc
      mysql-test/suite/parts/inc/partition_layout_check1.inc
      mysql-test/suite/parts/inc/partition_layout_check2.inc
      mysql-test/suite/parts/r/partition_debug_innodb.result
      mysql-test/suite/parts/r/partition_debug_myisam.result
      mysql-test/suite/parts/r/partition_recover_myisam.result
      mysql-test/suite/parts/r/partition_special_innodb.result
      mysql-test/suite/parts/r/partition_special_myisam.result
      mysql-test/suite/parts/t/part_supported_sql_func_innodb.test
      mysql-test/suite/parts/t/partition_alter1_1_2_innodb.test
      mysql-test/suite/parts/t/partition_alter1_2_innodb.test
      mysql-test/suite/parts/t/partition_alter2_1_1_innodb.test
      mysql-test/suite/parts/t/partition_alter2_1_2_innodb.test
      mysql-test/suite/parts/t/partition_alter2_2_2_innodb.test
      mysql-test/suite/parts/t/partition_alter4_innodb.test
      mysql-test/suite/parts/t/partition_debug_sync_innodb.test
      mysql-test/suite/parts/t/partition_recover_myisam.test
      mysql-test/suite/parts/t/partition_special_innodb.test
      mysql-test/suite/parts/t/partition_special_myisam.test
      mysql-test/suite/perfschema/r/column_privilege.result
      mysql-test/suite/perfschema/r/pfs_upgrade.result
      mysql-test/suite/perfschema/r/privilege.result
      mysql-test/suite/rpl/r/rpl_do_grant.result
      mysql-test/suite/rpl/r/rpl_ignore_table.result
      mysql-test/suite/rpl/r/rpl_stm_000001.result
      mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test
      mysql-test/suite/sys_vars/r/foreign_key_checks_func.result
      mysql-test/suite/sys_vars/r/innodb_file_format_basic.result
      mysql-test/suite/sys_vars/t/div_precision_increment_func.test
      mysql-test/suite/sys_vars/t/foreign_key_checks_func.test
      mysql-test/suite/sys_vars/t/secure_file_priv.test
      mysql-test/t/cache_innodb.test
      mysql-test/t/change_user.test
      mysql-test/t/delete.test
      mysql-test/t/func_time.test
      mysql-test/t/grant.test
      mysql-test/t/grant2.test
      mysql-test/t/mdl_sync.test
      mysql-test/t/merge.test
      mysql-test/t/mysqltest.test
      mysql-test/t/partition.test
      mysql-test/t/partition_binlog_stmt.test
      mysql-test/t/partition_error.test
      mysql-test/t/sp_trans.test
      mysql-test/t/system_mysql_db_fix40123.test
      mysql-test/t/system_mysql_db_fix50030.test
      mysql-test/t/system_mysql_db_fix50117.test
      mysql-test/t/trigger-trans.test
      mysql-test/t/variables_debug.test
      mysys/my_wincond.c
      mysys/my_winfile.c
      mysys/my_winthread.c
      mysys/sha1.c
      mysys/thr_rwlock.c
      scripts/CMakeLists.txt
      scripts/mysql_system_tables.sql
      scripts/mysql_system_tables_data.sql
      scripts/mysql_system_tables_fix.sql
      sql-common/Makefile.am
      sql-common/client.c
      sql/CMakeLists.txt
      sql/Makefile.am
      sql/client_settings.h
      sql/ha_ndbcluster.cc
      sql/ha_ndbcluster_binlog.cc
      sql/ha_partition.cc
      sql/ha_partition.h
      sql/handler.cc
      sql/handler.h
      sql/item_cmpfunc.cc
      sql/item_timefunc.cc
      sql/item_timefunc.h
      sql/lex.h
      sql/mysqld.cc
      sql/partition_info.cc
      sql/partition_info.h
      sql/password.c
      sql/protocol.cc
      sql/protocol.h
      sql/set_var.cc
      sql/share/errmsg-utf8.txt
      sql/sp_head.cc
      sql/sp_head.h
      sql/sql_acl.cc
      sql/sql_acl.h
      sql/sql_audit.h
      sql/sql_builtin.cc.in
      sql/sql_cache.cc
      sql/sql_class.cc
      sql/sql_class.h
      sql/sql_connect.cc
      sql/sql_connect.h
      sql/sql_delete.cc
      sql/sql_insert.cc
      sql/sql_lex.cc
      sql/sql_lex.h
      sql/sql_load.cc
      sql/sql_parse.cc
      sql/sql_partition.cc
      sql/sql_partition.h
      sql/sql_partition_admin.cc
      sql/sql_partition_admin.h
      sql/sql_plugin.cc
      sql/sql_plugin.h
      sql/sql_show.cc
      sql/sql_string.h
      sql/sql_table.cc
      sql/sql_truncate.cc
      sql/sql_truncate.h
      sql/sql_update.cc
      sql/sql_update.h
      sql/sql_yacc.yy
      sql/structs.h
      sql/sys_vars.cc
      sql/sys_vars.h
      sql/table.cc
      sql/table.h
      storage/archive/ha_archive.cc
      storage/archive/ha_archive.h
      storage/blackhole/ha_blackhole.cc
      storage/blackhole/ha_blackhole.h
      storage/example/ha_example.cc
      storage/example/ha_example.h
      storage/federated/ha_federated.cc
      storage/federated/ha_federated.h
      storage/heap/ha_heap.cc
      storage/heap/ha_heap.h
      storage/ibmdb2i/db2i_constraints.cc
      storage/ibmdb2i/ha_ibmdb2i.cc
      storage/innobase/CMakeLists.txt
      storage/innobase/Doxyfile
      storage/innobase/Makefile.am
      storage/innobase/btr/btr0btr.c
      storage/innobase/btr/btr0cur.c
      storage/innobase/btr/btr0pcur.c
      storage/innobase/btr/btr0sea.c
      storage/innobase/buf/buf0flu.c
      storage/innobase/compile-innodb
      storage/innobase/dict/dict0crea.c
      storage/innobase/dict/dict0dict.c
      storage/innobase/eval/eval0eval.c
      storage/innobase/handler/ha_innodb.cc
      storage/innobase/handler/ha_innodb.h
      storage/innobase/handler/i_s.cc
      storage/innobase/handler/i_s.h
      storage/innobase/ibuf/ibuf0ibuf.c
      storage/innobase/include/buf0flu.h
      storage/innobase/include/os0sync.h
      storage/innobase/include/rem0rec.h
      storage/innobase/include/srv0srv.h
      storage/innobase/include/univ.i
      storage/innobase/include/ut0rbt.h
      storage/innobase/include/ut0rnd.ic
      storage/innobase/log/log0recv.c
      storage/innobase/os/os0file.c
      storage/innobase/que/que0que.c
      storage/innobase/row/row0mysql.c
      storage/innobase/row/row0purge.c
      storage/innobase/row/row0sel.c
      storage/innobase/row/row0umod.c
      storage/innobase/row/row0vers.c
      storage/innobase/srv/srv0srv.c
      storage/innobase/srv/srv0start.c
      storage/innobase/trx/trx0purge.c
      storage/innobase/trx/trx0roll.c
      storage/innobase/trx/trx0sys.c
      storage/innobase/trx/trx0trx.c
      storage/innobase/trx/trx0undo.c
      storage/myisam/ha_myisam.cc
      storage/myisam/ha_myisam.h
      storage/myisammrg/ha_myisammrg.cc
      storage/myisammrg/ha_myisammrg.h
      storage/ndb/plug.in
      storage/perfschema/ha_perfschema.cc
      storage/perfschema/ha_perfschema.h
      tests/mysql_client_test.c
      unittest/mysys/CMakeLists.txt
      storage/ndb/ndb_configure.m4
=== modified file 'mysql-test/r/type_datetime.result'
--- a/mysql-test/r/type_datetime.result	2010-09-07 06:45:00 +0000
+++ b/mysql-test/r/type_datetime.result	2010-10-07 16:16:30 +0000
@@ -680,5 +680,17 @@ id	select_type	table	type	possible_keys	
 1	SIMPLE	t2	const	PRIMARY	PRIMARY	8	const	1	Using index
 DROP TABLE t1,t2;
 #
+# Bug#57095: Wrongly chosen expression cache type led to a wrong
+#            result.
+#
+CREATE TABLE t1 (`b` datetime );
+INSERT INTO t1 VALUES ('2010-01-01 00:00:00'), ('2010-01-01 00:00:00');
+SELECT * FROM t1 WHERE b <= coalesce(NULL, now());
+b
+2010-01-01 00:00:00
+2010-01-01 00:00:00
+DROP TABLE t1;
+#
+#
 # End of 5.5 tests
 #

=== modified file 'mysql-test/t/type_datetime.test'
--- a/mysql-test/t/type_datetime.test	2010-09-07 06:45:00 +0000
+++ b/mysql-test/t/type_datetime.test	2010-10-07 16:16:30 +0000
@@ -485,5 +485,15 @@ explain select * from t2 where f1=STR_TO
 DROP TABLE t1,t2;
 
 --echo #
+--echo # Bug#57095: Wrongly chosen expression cache type led to a wrong
+--echo #            result.
+--echo #
+CREATE TABLE t1 (`b` datetime );
+INSERT INTO t1 VALUES ('2010-01-01 00:00:00'), ('2010-01-01 00:00:00');
+SELECT * FROM t1 WHERE b <= coalesce(NULL, now());
+DROP TABLE t1;
+--echo #
+
+--echo #
 --echo # End of 5.5 tests
 --echo #

=== modified file 'sql/item.cc'
--- a/sql/item.cc	2010-09-24 13:18:45 +0000
+++ b/sql/item.cc	2010-10-07 16:16:30 +0000
@@ -7356,9 +7356,11 @@ Item_cache* Item_cache::get_cache(const 
   case DECIMAL_RESULT:
     return new Item_cache_decimal();
   case STRING_RESULT:
-    if (item->field_type() == MYSQL_TYPE_DATE ||
-        item->field_type() == MYSQL_TYPE_DATETIME ||
-        item->field_type() == MYSQL_TYPE_TIME)
+    /* Not all functions that return DATE/TIME are actually DATE/TIME funcs. */
+    if ((item->field_type() == MYSQL_TYPE_DATE ||
+         item->field_type() == MYSQL_TYPE_DATETIME ||
+         item->field_type() == MYSQL_TYPE_TIME) &&
+        (const_cast<Item*>(item))->result_as_longlong())
       return new Item_cache_datetime(item->field_type());
     return new Item_cache_str(item);
   case ROW_RESULT:


Attachment: [text/bzr-bundle] bzr/epotemkin@mysql.com-20101007163924-vow3x9pekhh0hz6h.bundle
Thread
bzr push into mysql-5.5-bugteam branch (epotemkin:3214)Evgeny Potemkin7 Oct