diff options
author | unknown <monty@mashka.mysql.fi> | 2003-02-12 21:55:37 +0200 |
---|---|---|
committer | unknown <monty@mashka.mysql.fi> | 2003-02-12 21:55:37 +0200 |
commit | d79e52a77c9968bb2645d542da158ee27b4a5fd7 (patch) | |
tree | 3ac37e452f15c8f05e9d1f338a6050281f838048 /strings | |
parent | 8754d58fe0c0c4b6eb1a81aee087615b901e9a7c (diff) | |
download | mariadb-git-d79e52a77c9968bb2645d542da158ee27b4a5fd7.tar.gz |
Fixed a lot of wrong memory references as reported by valgrind
Portability fixes
Added new client function: mysql_get_server_version()
New server help code (From Victor Vagin)
Fixed wrong usage of binary()
Disabled RTREE usage for now.
BitKeeper/etc/ignore:
added scripts/fill_help_tables.sql
client/mysql.cc:
Some fixes when using 'help'
cmd-line-utils/libedit/compat.h:
Portability fix
cmd-line-utils/libedit/fgetln.c:
Portability fix
include/mysql.h:
Added new client function: mysql_get_server_version()
libmysql/libmysql.c:
Added new client function: mysql_get_server_version()
libmysqld/libmysqld.c:
Fixed prototype
mysql-test/install_test_db.sh:
Added creation of help tables
mysql-test/r/connect.result:
Added help tables
mysql-test/r/myisam.result:
Test of RTREE index
mysql-test/r/type_ranges.result:
updated results
mysql-test/t/myisam.test:
Test of RTREE index
mysql-test/t/type_ranges.test:
Updated test
mysys/charset.c:
Indentation change
mysys/my_symlink.c:
Removed compiler warning
scripts/fill_help_tables.sh:
Update for new help tables
sql/field.cc:
Indentation changes
sql/filesort.cc:
Optimized character set usage
sql/item_cmpfunc.cc:
Fix wrong usage of binary()
sql/item_cmpfunc.h:
Fix wrong usage of binary()
sql/item_func.cc:
Fix wrong usage of binary()
sql/item_func.h:
Fix wrong usage of binary()
sql/item_strfunc.cc:
Fix wrong usage of binary()
sql/item_sum.cc:
Fix wrong usage of binary()
sql/item_sum.h:
Fix wrong usage of binary()
sql/key.cc:
Indentation change
sql/lex.h:
HELP -> HELP_SYM
sql/mysql_priv.h:
Make get_field() more general
sql/password.c:
Indentation change + variable initialisation moved
sql/sql_acl.cc:
Make get_field() more general
sql/sql_base.cc:
Added comments + assertion for double call to mysql_lock_tables
sql/sql_cache.cc:
Indentation changes
sql/sql_class.h:
Added need_strxnfrm to SORT_FIELD to be able to optimise character set handling in filesort
sql/sql_derived.cc:
Renamed variables
sql/sql_help.cc:
New help functions (from Victor Vagin)
sql/sql_lex.cc:
Removed variables that doesn't have to be initialized for each query
sql/sql_lex.h:
Removed not used variable (olap)
sql/sql_parse.cc:
Fixed (not fatal) access of unitialized memory
Indentation / code cleanup
sql/sql_prepare.cc:
Indentaion cleanup
sql/sql_table.cc:
Disabled RTREE until 5.0
sql/sql_udf.cc:
Make get_field() more general
sql/sql_yacc.yy:
Removed access to uninitialized memory
Always set offset_limit and select_limit when using LIMIT (removed warnings)
Allow usage of 'help week'
sql/table.cc:
Make get_field() more general
More comments
sql/table.h:
Fixded type of TABLE_LIST->derived
sql/time.cc:
Stricter date / datetime handling (to be able to handle timestamps with days and microseconds)
strings/ctype-bin.c:
Added cha
Diffstat (limited to 'strings')
-rw-r--r-- | strings/ctype-bin.c | 64 |
1 files changed, 44 insertions, 20 deletions
diff --git a/strings/ctype-bin.c b/strings/ctype-bin.c index 4d428828826..c219bd95fd4 100644 --- a/strings/ctype-bin.c +++ b/strings/ctype-bin.c @@ -22,24 +22,48 @@ #include "m_string.h" #include "m_ctype.h" -static uchar ctype_bin[] = { - 0, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, +static uchar ctype_bin[]= +{ + 0, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16, - 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16, - 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 16, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 16, 2, 2, 2, 2, 2, 2, 2, 2 + 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16, + 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 16, 1, 1, 1, 1, 1, 1, 1, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 16, 2, 2, 2, 2, 2, 2, 2, 2 +}; + + +/* Dummy array for toupper / tolower / sortorder */ + +static uchar bin_char_array[] = +{ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111, + 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127, + 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143, + 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159, + 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175, + 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191, + 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207, + 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223, + 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239, + 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255 }; @@ -277,9 +301,9 @@ CHARSET_INFO my_charset_bin = "binary", /* name */ "", /* comment */ ctype_bin, /* ctype */ - NULL, /* to_lower */ - NULL, /* to_upper */ - NULL, /* sort_order */ + bin_char_array, /* to_lower */ + bin_char_array, /* to_upper */ + bin_char_array, /* sort_order */ NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ 0, /* strxfrm_multiply */ |