From 18343b9454e7711b8fea5319360f2f325d8d9d15 Mon Sep 17 00:00:00 2001 From: "serg@serg.mylan" <> Date: Sun, 13 Mar 2005 16:34:40 +0100 Subject: [PATCH 1/2] correct not_null_tables() for XOR and AND correct top_level_item for XOR --- mysql-test/r/join_outer.result | 6 ++++++ mysql-test/t/join_outer.test | 1 + sql/item_cmpfunc.h | 4 +++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result index 7981fc9c733..b035f88da41 100644 --- a/mysql-test/r/join_outer.result +++ b/mysql-test/r/join_outer.result @@ -857,4 +857,10 @@ a b a b 1 1 1 2 2 1 2 2 3 1 NULL NULL +SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.a WHERE not(0+(t1.a=30 and t2.b=1)); +a b a b +1 1 1 2 +2 1 2 2 +3 1 NULL NULL +4 2 NULL NULL DROP TABLE t1,t2; diff --git a/mysql-test/t/join_outer.test b/mysql-test/t/join_outer.test index 2ed7086746f..fe9ec1e0963 100644 --- a/mysql-test/t/join_outer.test +++ b/mysql-test/t/join_outer.test @@ -610,6 +610,7 @@ SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.a; SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.a WHERE t1.b=1; SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.a WHERE t1.b=1 XOR (NOT ISNULL(t2.a) AND t2.b=1); +SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.a WHERE not(0+(t1.a=30 and t2.b=1)); DROP TABLE t1,t2; diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 7c48854850e..37b0674a094 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -966,6 +966,8 @@ public: enum Functype functype() const { return COND_AND_FUNC; } longlong val_int(); const char *func_name() const { return "and"; } + table_map not_null_tables() const + { return abort_on_null ? not_null_tables_cache: and_tables_cache; } Item* copy_andor_structure(THD *thd) { Item_cond_and *item; @@ -1013,7 +1015,7 @@ public: enum Type type() const { return FUNC_ITEM; } longlong val_int(); const char *func_name() const { return "xor"; } - table_map not_null_tables() const { return and_tables_cache; } + void top_level_item() {} }; From 13ec961c3a4f5eb6b61a5b955926aaba0dfa96f9 Mon Sep 17 00:00:00 2001 From: "msvensson@neptunus.(none)" <> Date: Mon, 14 Mar 2005 12:07:49 +0100 Subject: [PATCH 2/2] BUG#6554 Problem Building MySql on Fedora Core 3 - Moved static variables defined inside of function to file scope to avoid this linking problem on FC3 --- BitKeeper/etc/logging_ok | 1 + sql/ha_berkeley.cc | 3 ++- sql/ha_ndbcluster.cc | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok index 9749be3448e..f64d9ca4042 100644 --- a/BitKeeper/etc/logging_ok +++ b/BitKeeper/etc/logging_ok @@ -148,6 +148,7 @@ mronstrom@build.mysql.com mronstrom@mysql.com mskold@mysql.com msvensson@build.mysql.com +msvensson@neptunus.(none) mwagner@cash.mwagner.org mwagner@evoq.mwagner.org mwagner@here.mwagner.org diff --git a/sql/ha_berkeley.cc b/sql/ha_berkeley.cc index e33cd3fca1b..626201a38a6 100644 --- a/sql/ha_berkeley.cc +++ b/sql/ha_berkeley.cc @@ -340,8 +340,9 @@ void berkeley_cleanup_log_files(void) ** Berkeley DB tables *****************************************************************************/ +static const char *ha_bdb_bas_exts[]= { ha_berkeley_ext, NullS }; const char **ha_berkeley::bas_ext() const -{ static const char *ext[]= { ha_berkeley_ext, NullS }; return ext; } +{ return ha_bdb_bas_exts; } ulong ha_berkeley::index_flags(uint idx, uint part, bool all_parts) const diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index f0988affc2e..66bcc303fd1 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -2979,9 +2979,9 @@ int ha_ndbcluster::reset() DBUG_RETURN(1); } - +static const char *ha_ndb_bas_exts[]= { ha_ndb_ext, NullS }; const char **ha_ndbcluster::bas_ext() const -{ static const char *ext[]= { ha_ndb_ext, NullS }; return ext; } +{ return ha_ndb_bas_exts; } /*