mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
After merge fixes
Added more DBUG statements Ensure that we are comparing end space with BINARY strings Use 'any_db' instead of '' to mean any database. (For HANDLER command) Only strip ' ' when comparing CHAR, not other space-like characters (like \t) BitKeeper/deleted/.del-ctype_tis620.result-old~3578ceb0b8284685: Delete: mysql-test/r/ctype_tis620.result-old BitKeeper/deleted/.del-ctype_tis620.test-old~ffb1bbd2935d1aba: Delete: mysql-test/t/ctype_tis620.test-old client/mysqlbinlog.cc: Added DBUG statements Added call of my_end() to free all used memory on exit heap/hp_info.c: After merge fixes heap/hp_open.c: After merge fixes include/heap.h: After merge fixes include/m_ctype.h: Use pchar instead of 'int' for character parameters. Added 'my_binary_compare()' include/m_string.h: Fixed wrong define innobase/ibuf/ibuf0ibuf.c: After merge fixes innobase/srv/srv0start.c: After merge fixes mysql-test/r/alter_table.result: Fixed results after merge mysql-test/r/auto_increment.result: Fixed results after merge mysql-test/r/bdb.result: Fixed results after merge mysql-test/r/binary.result: Fixed results after merge mysql-test/r/create.result: Fixed results after merge mysql-test/r/ctype_mb.result: Fixed results after merge mysql-test/r/ctype_tis620.result: Fixed results after merge mysql-test/r/ctype_utf8.result: Fixed results after merge mysql-test/r/delete.result: Fixed results after merge mysql-test/r/func_compress.result: Fixed results after merge mysql-test/r/func_gconcat.result: Fixed results after merge mysql-test/r/func_group.result: Fixed results after merge mysql-test/r/func_str.result: Fixed results after merge mysql-test/r/innodb.result: Fixed results after merge mysql-test/r/insert.result: Fixed results after merge mysql-test/r/insert_select.result: Fixed results after merge mysql-test/r/key.result: Fixed results after merge mysql-test/r/loaddata.result: Fixed results after merge mysql-test/r/lock.result: Fixed results after merge mysql-test/r/myisam.result: Fixed results after merge mysql-test/r/null.result: Fixed results after merge mysql-test/r/null_key.result: Fixed results after merge mysql-test/r/order_by.result: Fixed results after merge mysql-test/r/query_cache.result: Fixed results after merge mysql-test/r/range.result: Fixed results after merge mysql-test/r/rpl_multi_delete.result: Fixed results after merge mysql-test/r/rpl_until.result: Fixed results after merge mysql-test/r/subselect.result: Fixed results after merge mysql-test/r/subselect_innodb.result: Fixed results after merge mysql-test/r/type_blob.result: Fixed results after merge mysql-test/r/type_datetime.result: Fixed results after merge mysql-test/r/type_decimal.result: Fixed results after merge mysql-test/r/type_enum.result: Fixed results after merge mysql-test/r/type_float.result: Fixed results after merge mysql-test/r/type_ranges.result: Fixed results after merge mysql-test/r/type_time.result: Fixed results after merge mysql-test/r/type_timestamp.result: Fixed results after merge mysql-test/r/type_uint.result: Fixed results after merge mysql-test/r/type_year.result: Fixed results after merge mysql-test/r/variables.result: Fixed results after merge mysql-test/r/warnings.result: Fixed results after merge mysql-test/t/case.test: Fixed shifted error messages mysql-test/t/create.test: Fixed shifted error messages mysql-test/t/ctype_collate.test: Fixed shifted error messages mysql-test/t/ctype_tis620.test: Merge with 4.0 ctype_tis620 test mysql-test/t/delete.test: Fixed shifted error messages mysql-test/t/derived.test: Fixed shifted error messages mysql-test/t/fulltext.test: Fixed shifted error messages mysql-test/t/func_in.test: Fixed shifted error messages mysql-test/t/func_str.test: Fixed shifted error messages mysql-test/t/func_test.test: Fixed shifted error messages mysql-test/t/grant.test: Fixed shifted error messages mysql-test/t/innodb.test: Change to 4.1 syntax mysql-test/t/key_cache.test: Fixed shifted error messages mysql-test/t/myisam.test: New test of blob and end space mysql-test/t/row.test: Fixed shifted error messages mysql-test/t/rpl_until.test: Fixed shifted error messages mysql-test/t/subselect.test: Fixed shifted error messages mysql-test/t/subselect_innodb.test: Fix test to take into account foreign key constraints mysql-test/t/union.test: Fixed shifted error messages mysql-test/t/user_var.test: Fixed shifted error messages mysql-test/t/variables.test: Fixed shifted error messages mysys/my_handler.c: Merge with 4.0 code sql/ha_heap.cc: After merge fixes sql/handler.cc: After merge fixes sql/item.cc: After merge fixes sql/item_cmpfunc.cc: Ensure that we are comparing end space with BINARY strings sql/item_cmpfunc.h: Ensure that we are comparing end space with BINARY strings sql/log_event.cc: More DBUG statements Ensure that we use all options to LOAD DATA in replication sql/opt_range.cc: After merge fixes sql/sql_db.cc: After merge fixes sql/sql_handler.cc: After merge fixes Use 'any_db' instead of '' to mean 'no database comparison' sql/sql_parse.cc: After merge fixes sql/sql_select.cc: After merge fixes Added function comment for setup_group() sql/sql_string.cc: Added stringcmp() for binary comparison. Added function comments for sortcmp() and stringcmp() sql/sql_string.h: Added stringcmp() sql/sql_table.cc: After merge fixes sql/sql_update.cc: After merge fixes sql/sql_yacc.yy: Use 'any_db' instead of '' to mean any database. Using "" causes a 'wrong db name' error. strings/ctype-big5.c: Strip only end space, not other space characters. strings/ctype-bin.c: Removed some not needed functions. Added function comments Don't remove end space in comparisons Change my_wildcmp_bin() to be 'identical' with other similar code strings/ctype-czech.c: Strip only end space, not other space characters. strings/ctype-gbk.c: Strip only end space, not other space characters. strings/ctype-latin1.c: Strip only end space, not other space characters. strings/ctype-mb.c: Strip only end space, not other space characters. strings/ctype-simple.c: Strip only end space, not other space characters. strings/ctype-sjis.c: Strip only end space, not other space characters. strings/ctype-tis620.c: Added usage of my_instr_simple. This needs to be cleaned up! strings/ctype-utf8.c: Strip only end space, not other space characters. strings/ctype-win1250ch.c: Strip only end space, not other space characters. Fixed indentation strings/strto.c: Code cleanup
This commit is contained in:
@ -66,8 +66,8 @@ int my_strnncollsp_simple(CHARSET_INFO * cs, const uchar *s, uint slen,
|
||||
uchar *map= cs->sort_order;
|
||||
int len;
|
||||
|
||||
for ( ; slen && my_isspace(cs, s[slen-1]) ; slen--);
|
||||
for ( ; tlen && my_isspace(cs, t[tlen-1]) ; tlen--);
|
||||
for ( ; slen && s[slen-1] == ' ' ; slen--);
|
||||
for ( ; tlen && t[tlen-1] == ' ' ; tlen--);
|
||||
|
||||
len = ( slen > tlen ) ? tlen : slen;
|
||||
|
||||
@ -186,9 +186,9 @@ void my_hash_sort_simple(CHARSET_INFO *cs,
|
||||
}
|
||||
|
||||
|
||||
long my_strntol_8bit(CHARSET_INFO *cs,
|
||||
const char *nptr, uint l, int base,
|
||||
char **endptr, int *err)
|
||||
long my_strntol_8bit(CHARSET_INFO *cs,
|
||||
const char *nptr, uint l, int base,
|
||||
char **endptr, int *err)
|
||||
{
|
||||
int negative;
|
||||
register ulong cutoff;
|
||||
@ -309,9 +309,9 @@ noconv:
|
||||
}
|
||||
|
||||
|
||||
ulong my_strntoul_8bit(CHARSET_INFO *cs,
|
||||
const char *nptr, uint l, int base,
|
||||
char **endptr, int *err)
|
||||
ulong my_strntoul_8bit(CHARSET_INFO *cs,
|
||||
const char *nptr, uint l, int base,
|
||||
char **endptr, int *err)
|
||||
{
|
||||
int negative;
|
||||
register ulong cutoff;
|
||||
@ -423,9 +423,9 @@ noconv:
|
||||
}
|
||||
|
||||
|
||||
longlong my_strntoll_8bit(CHARSET_INFO *cs __attribute__((unused)),
|
||||
const char *nptr, uint l, int base,
|
||||
char **endptr,int *err)
|
||||
longlong my_strntoll_8bit(CHARSET_INFO *cs __attribute__((unused)),
|
||||
const char *nptr, uint l, int base,
|
||||
char **endptr,int *err)
|
||||
{
|
||||
int negative;
|
||||
register ulonglong cutoff;
|
||||
@ -825,7 +825,7 @@ cnv:
|
||||
#define likeconv(s,A) (uchar) (s)->sort_order[(uchar) (A)]
|
||||
#endif
|
||||
|
||||
#define INC_PTR(cs,A,B) A++
|
||||
#define INC_PTR(cs,A,B) (A)++
|
||||
|
||||
|
||||
int my_wildcmp_8bit(CHARSET_INFO *cs,
|
||||
@ -833,7 +833,7 @@ int my_wildcmp_8bit(CHARSET_INFO *cs,
|
||||
const char *wildstr,const char *wildend,
|
||||
int escape, int w_one, int w_many)
|
||||
{
|
||||
int result= -1; /* Not found, using wildcards */
|
||||
int result= -1; /* Not found, using wildcards */
|
||||
|
||||
while (wildstr != wildend)
|
||||
{
|
||||
@ -845,7 +845,7 @@ int my_wildcmp_8bit(CHARSET_INFO *cs,
|
||||
if (str == str_end || likeconv(cs,*wildstr++) != likeconv(cs,*str++))
|
||||
return(1); /* No match */
|
||||
if (wildstr == wildend)
|
||||
return (str != str_end); /* Match if both are at end */
|
||||
return(str != str_end); /* Match if both are at end */
|
||||
result=1; /* Found an anchor char */
|
||||
}
|
||||
if (*wildstr == w_one)
|
||||
@ -853,7 +853,7 @@ int my_wildcmp_8bit(CHARSET_INFO *cs,
|
||||
do
|
||||
{
|
||||
if (str == str_end) /* Skip one char if possible */
|
||||
return (result);
|
||||
return(result);
|
||||
INC_PTR(cs,str,str_end);
|
||||
} while (++wildstr < wildend && *wildstr == w_one);
|
||||
if (wildstr == wildend)
|
||||
@ -872,7 +872,7 @@ int my_wildcmp_8bit(CHARSET_INFO *cs,
|
||||
if (*wildstr == w_one)
|
||||
{
|
||||
if (str == str_end)
|
||||
return (-1);
|
||||
return(-1);
|
||||
INC_PTR(cs,str,str_end);
|
||||
continue;
|
||||
}
|
||||
@ -881,28 +881,29 @@ int my_wildcmp_8bit(CHARSET_INFO *cs,
|
||||
if (wildstr == wildend)
|
||||
return(0); /* Ok if w_many is last */
|
||||
if (str == str_end)
|
||||
return -1;
|
||||
return(-1);
|
||||
|
||||
if ((cmp= *wildstr) == escape && wildstr+1 != wildend)
|
||||
cmp= *++wildstr;
|
||||
|
||||
INC_PTR(cs,wildstr,wildend); /* This is compared trough cmp */
|
||||
cmp=likeconv(cs,cmp);
|
||||
INC_PTR(cs,wildstr,wildend); /* This is compared trough cmp */
|
||||
cmp=likeconv(cs,cmp);
|
||||
do
|
||||
{
|
||||
while (str != str_end && likeconv(cs,*str) != cmp)
|
||||
str++;
|
||||
if (str++ == str_end) return (-1);
|
||||
while (str != str_end && (uchar) likeconv(cs,*str) != cmp)
|
||||
str++;
|
||||
if (str++ == str_end) return(-1);
|
||||
{
|
||||
int tmp=my_wildcmp_8bit(cs,str,str_end,wildstr,wildend,escape,w_one,w_many);
|
||||
int tmp=my_wildcmp_8bit(cs,str,str_end,wildstr,wildend,escape,w_one,
|
||||
w_many);
|
||||
if (tmp <= 0)
|
||||
return (tmp);
|
||||
return(tmp);
|
||||
}
|
||||
} while (str != str_end && wildstr[0] != w_many);
|
||||
return(-1);
|
||||
}
|
||||
}
|
||||
return (str != str_end ? 1 : 0);
|
||||
return(str != str_end ? 1 : 0);
|
||||
}
|
||||
|
||||
|
||||
@ -924,11 +925,11 @@ int my_wildcmp_8bit(CHARSET_INFO *cs,
|
||||
*/
|
||||
|
||||
my_bool my_like_range_simple(CHARSET_INFO *cs,
|
||||
const char *ptr,uint ptr_length,
|
||||
int escape, int w_one, int w_many,
|
||||
uint res_length,
|
||||
char *min_str,char *max_str,
|
||||
uint *min_length,uint *max_length)
|
||||
const char *ptr,uint ptr_length,
|
||||
pbool escape, pbool w_one, pbool w_many,
|
||||
uint res_length,
|
||||
char *min_str,char *max_str,
|
||||
uint *min_length,uint *max_length)
|
||||
{
|
||||
const char *end=ptr+ptr_length;
|
||||
char *min_org=min_str;
|
||||
@ -953,7 +954,7 @@ my_bool my_like_range_simple(CHARSET_INFO *cs,
|
||||
*min_length= (uint) (min_str - min_org);
|
||||
*max_length=res_length;
|
||||
do {
|
||||
*min_str++ = ' '; /* Because if key compression */
|
||||
*min_str++ = ' '; /* Because if key compression */
|
||||
*max_str++ = cs->max_sort_char;
|
||||
} while (min_str != min_end);
|
||||
return 0;
|
||||
@ -970,7 +971,7 @@ my_bool my_like_range_simple(CHARSET_INFO *cs,
|
||||
}
|
||||
|
||||
while (min_str != min_end)
|
||||
*min_str++ = *max_str++ = ' '; /* Because if key compression */
|
||||
*min_str++ = *max_str++ = ' '; /* Because if key compression */
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user