From c88b91020866b1505404157c76c56cbb92410ec5 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 7 Nov 2002 03:54:00 +0200 Subject: Portability fixes for Fortre C++ 5.0 (on Sun) in 32 and 64 bit modes. client/mysqlbinlog.cc: Portability fix configure.in: Added use of ASFLAGS (For Solaris with Forte 5.0) include/my_global.h: Portability fix include/myisam.h: Portability fix include/queues.h: Portability fix innobase/include/ut0ut.h: Portability fix innobase/log/log0log.c: Portability fix innobase/rem/rem0cmp.c: Portability fix innobase/trx/trx0sys.c: Portability fix isam/pack_isam.c: Portability fix myisam/ft_boolean_search.c: Portability fix myisam/mi_dynrec.c: Code change to go around bug in Forte 5.0 myisam/sort.c: Portability fix mysys/my_aes.c: Portability fix scripts/Makefile.am: Support for ASFLAGS scripts/mysqlbug.sh: Support for ASFLAGS sql/field.cc: Portability fix sql/filesort.cc: Portability fix sql/gen_lex_hash.cc: Portability fix sql/ha_innodb.cc: Portability fix Changed SHOW INNODB STATUS to return error instead of writing message to log file. sql/ha_isammrg.cc: Portability fix sql/ha_myisam.cc: Portability fix sql/ha_myisammrg.cc: Portability fix sql/hash_filo.h: Portability fix sql/hostname.cc: Portability fix sql/item_cmpfunc.h: Indentation change sql/item_func.cc: Portability fix sql/item_func.h: Portability fix sql/log.cc: Portability fix sql/log_event.cc: Portability fix sql/mysql_priv.h: Portability fix sql/mysqld.cc: Portability fix Fixed bug with rpl_recovery_rank command line option on 64 bit systems sql/opt_range.cc: Portability fix sql/repl_failsafe.cc: Portability fix sql/slave.cc: Portability fix sql/slave.h: Portability fix sql/sql_acl.cc: Portability fix sql/sql_base.cc: Portability fix sql/sql_cache.cc: Portability fix sql/sql_cache.h: Portability fix sql/sql_class.cc: Portability fix sql/sql_delete.cc: Portability fix sql/sql_insert.cc: Portability fix sql/sql_manager.cc: Portability fix sql/sql_parse.cc: Portability fix BUILD/compile-solaris-sparc-forte: C sql/sql_udf.cc: Portability fix sql/sql_update.cc: Portability fix strings/Makefile.am: Portability fix strings/bmove_upp-sparc.s: Fix so that this works on 32 and 64 bit sparcs strings/str_test.c: Cleanup strings/strappend-sparc.s: Fix so that this works on 32 and 64 bit sparcs strings/strend-sparc.s: Fix so that this works on 32 and 64 bit sparcs strings/strmake-sparc.s: Fix so that this works on 32 and 64 bit sparcs strings/strmov-sparc.s: Fix so that this works on 32 and 64 bit sparcs strings/strnmov-sparc.s: Fix so that this works on 32 and 64 bit sparcs strings/strstr-sparc.s: Fix so that this works on 32 and 64 bit sparcs strings/strxmov-sparc.s: Fixes to make this more portable, but it's still not usable on 64 bit systems :( BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted --- sql/item_cmpfunc.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sql/item_cmpfunc.h') diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 9d83a8a9673..214abff4b77 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -292,9 +292,9 @@ public: virtual void set(uint pos,Item *item)=0; virtual byte *get_value(Item *item)=0; void sort() - { - qsort(base,used_count,size,compare); - } + { + qsort(base,used_count,size,compare); + } int find(Item *item); }; -- cgit v1.2.1 From b3a8b8bd193dc9b22b8d5bc28c894c49f6153647 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 9 Nov 2002 09:51:03 +0200 Subject: Fixed bug in MAX() optimization when used with JOIN and ON expressions sql/item_cmpfunc.cc: Create an AND expression from two expressions sql/item_cmpfunc.h: Create an AND expression from two expressions --- sql/item_cmpfunc.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sql/item_cmpfunc.h') diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 214abff4b77..83035720df6 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -621,3 +621,6 @@ public: longlong val_int(); const char *func_name() const { return "xor"; } }; + + +Item *and_expressions(Item *a, Item *b, Item **org_item); -- cgit v1.2.1 From 3165440cdec9d1270a2101973cb75e67e334dc5c Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 11 Nov 2002 15:57:35 +0200 Subject: Fixed that NULL and 0 returns 0 instead of NULL This is coded to not cause a speed impact on top level AND expressions where we don't care if an AND expression returns 0 or NULL mysql-test/r/bdb.result: Fix results after serges last patch mysql-test/r/innodb.result: Fix results after serges last patch mysql-test/r/null.result: Update for new AND handling of NULL scripts/mysqld_safe.sh: Fix 'isroot' test to work even if user is not root sql/item.h: Fixed that NULL and 0 returns 0 instead of NULL sql/item_cmpfunc.cc: Fixed that NULL and 0 returns 0 instead of NULL sql/item_cmpfunc.h: Fixed that NULL and 0 returns 0 instead of NULL sql/sql_base.cc: Fixed that NULL and 0 returns 0 instead of NULL sql/sql_parse.cc: Fixed that NULL and 0 returns 0 instead of NULL sql/sql_select.cc: Fixed that NULL and 0 returns 0 instead of NULL sql/sql_yacc.yy: Fixed that NULL and 0 returns 0 instead of NULL --- sql/item_cmpfunc.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'sql/item_cmpfunc.h') diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 83035720df6..f2c0ee403d2 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -560,10 +560,12 @@ class Item_cond :public Item_bool_func { protected: List list; + bool abort_on_null; public: - Item_cond() : Item_bool_func() { const_item_cache=0; } - Item_cond(Item *i1,Item *i2) :Item_bool_func() - { list.push_back(i1); list.push_back(i2); } + /* Item_cond() is only used to create top level items */ + Item_cond() : Item_bool_func(), abort_on_null(1) { const_item_cache=0; } + Item_cond(Item *i1,Item *i2) :Item_bool_func(), abort_on_null(0) + { list.push_back(i1); list.push_back(i2); } ~Item_cond() { list.delete_elements(); } bool add(Item *item) { return list.push_back(item); } bool fix_fields(THD *,struct st_table_list *); @@ -576,6 +578,7 @@ public: void split_sum_func(List &fields); friend int setup_conds(THD *thd,TABLE_LIST *tables,COND **conds); unsigned int size_of() { return sizeof(*this);} + void top_level_item() { abort_on_null=1; } }; -- cgit v1.2.1 From e1c1abd0e189e4581b9a22aed923df37e535e89b Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 12 Nov 2002 12:42:42 +0200 Subject: Extended WEEK() to be able to handle ISO weeks. unlink socket file if mysqld dies on startup Some optimization of AND expressions mysql-test/r/func_time.result: Update for new week() handling mysql-test/t/func_time.test: Update for new week() handling sql/item_cmpfunc.cc: Optimization of IF( and-expression,,) sql/item_cmpfunc.h: Optimization of AND expressions sql/item_timefunc.cc: Extended WEEK() to be able to handle ISO weeks. sql/mysqld.cc: unlink socket file if mysqld dies on startup sql/sql_base.cc: Fixed problem with SIGHUP and INSERT DELAYED tests/Makefile.am: Added missing myisam-big-rows.tst file to source distribution --- sql/item_cmpfunc.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sql/item_cmpfunc.h') diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index f2c0ee403d2..e163bc40a6e 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -216,6 +216,11 @@ public: longlong val_int(); String *val_str(String *str); enum Item_result result_type () const { return cached_result_type; } + bool fix_fields(THD *thd,struct st_table_list *tlist) + { + args[0]->top_level_item(); + return Item_func::fix_fields(thd,tlist); + } void fix_length_and_dec(); const char *func_name() const { return "if"; } unsigned int size_of() { return sizeof(*this);} -- cgit v1.2.1