diff options
author | unknown <monty@mysql.com> | 2005-02-28 11:59:46 +0200 |
---|---|---|
committer | unknown <monty@mysql.com> | 2005-02-28 11:59:46 +0200 |
commit | 8b8c9452ddc734c42301f64e625c31779968232a (patch) | |
tree | 93113f7a95c643d072853092d2abc4344982b8e9 /sql/field.h | |
parent | 54dadffc749e283b95ff513f0a686fd84a1132d9 (diff) | |
download | mariadb-git-8b8c9452ddc734c42301f64e625c31779968232a.tar.gz |
Fixed wrong memory references found by purify
(No really critical errors found, but a few possible wrong results)
innobase/dict/dict0dict.c:
Replace memcmp with comparison of characters to avoid warnings from purify when 'sptr' points to a very short string
mysql-test/r/select_found.result:
Add missing drop table
mysql-test/r/type_set.result:
More tests
mysql-test/t/select_found.test:
Add missing drop table
mysql-test/t/type_set.test:
More tests
mysys/my_init.c:
Avoid warning from purify (purify doesn't handle getrusage() properly)
sql/field.h:
enum & set are sorted as numbers. This fixes an access to uninitialized memory when enum/set are multi-byte characters
sql/filesort.cc:
enum & set are sorted as numbers. This fixes an access to uninitialized memory when enum/set are multi-byte characters
sql/item_cmpfunc.cc:
Fixed warning from purify. (Not critical as the arguments are passed to a function but not used)
Allocate Arg_comparator() with 'new' instead of sql_alloc() to ensure proper initialization
sql/mysqld.cc:
Wait for signal handler to stop when running --bootstrap
(Fixes warning from purify)
sql/sql_insert.cc:
Initialize slot used by innodb.cc (not critical)
sql/sql_lex.h:
Better comments
sql/sql_repl.cc:
memcmp -> bcmp() to avoid warning from purify
sql/sql_select.cc:
Fix for out-of-bound memory reference when doing DISTINCT on const expressions
strings/ctype-simple.c:
Fixes to not access uninitialized memory
(Not critical)
Diffstat (limited to 'sql/field.h')
-rw-r--r-- | sql/field.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/field.h b/sql/field.h index fd0f2f9c2f1..b5d88504939 100644 --- a/sql/field.h +++ b/sql/field.h @@ -277,6 +277,7 @@ public: virtual bool get_date(TIME *ltime,uint fuzzydate); virtual bool get_time(TIME *ltime); virtual CHARSET_INFO *charset(void) const { return &my_charset_bin; } + virtual CHARSET_INFO *sort_charset(void) const { return charset(); } virtual bool has_charset(void) const { return FALSE; } virtual void set_charset(CHARSET_INFO *charset) { } bool set_warning(const unsigned int level, const unsigned int code, @@ -1152,6 +1153,8 @@ public: bool optimize_range(uint idx, uint part) { return 0; } bool eq_def(Field *field); bool has_charset(void) const { return TRUE; } + /* enum and set are sorted as integers */ + CHARSET_INFO *sort_charset(void) const { return &my_charset_bin; } field_cast_enum field_cast_type() { return FIELD_CAST_ENUM; } }; |