2002-10-02 12:33:08 +02:00
|
|
|
/* Copyright (C) 2002 MySQL AB
|
2002-03-12 18:37:58 +01:00
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
|
|
|
|
|
|
|
#include <my_global.h>
|
2002-11-10 13:14:39 +01:00
|
|
|
#include "m_string.h"
|
2002-11-27 15:08:31 +01:00
|
|
|
#include "m_ctype.h"
|
2002-11-28 08:04:26 +01:00
|
|
|
#include <errno.h>
|
|
|
|
|
2002-11-10 13:14:39 +01:00
|
|
|
#include "stdarg.h"
|
2002-03-12 18:37:58 +01:00
|
|
|
#include "assert.h"
|
|
|
|
|
2002-11-27 15:08:31 +01:00
|
|
|
|
2002-03-12 18:37:58 +01:00
|
|
|
int my_strnxfrm_simple(CHARSET_INFO * cs,
|
2002-10-09 12:40:57 +02:00
|
|
|
uchar *dest, uint len,
|
|
|
|
const uchar *src, uint srclen)
|
2002-03-12 18:37:58 +01:00
|
|
|
{
|
2002-10-02 12:33:08 +02:00
|
|
|
uchar *map= cs->sort_order;
|
2002-03-12 18:37:58 +01:00
|
|
|
DBUG_ASSERT(len >= srclen);
|
2003-01-15 15:06:07 +01:00
|
|
|
len= min(len,srclen);
|
2003-04-01 09:45:16 +02:00
|
|
|
if (dest != src)
|
|
|
|
{
|
|
|
|
const uchar *end;
|
|
|
|
for ( end=src+len; src < end ; )
|
|
|
|
*dest++= map[*src++];
|
|
|
|
return len;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
const uchar *end;
|
|
|
|
for ( end=dest+len; dest < end ; dest++)
|
|
|
|
*dest= (char) map[(uchar) *dest];
|
|
|
|
return len;
|
|
|
|
}
|
2002-03-12 18:37:58 +01:00
|
|
|
}
|
|
|
|
|
2002-10-09 12:40:57 +02:00
|
|
|
int my_strnncoll_simple(CHARSET_INFO * cs, const uchar *s, uint slen,
|
|
|
|
const uchar *t, uint tlen)
|
2002-03-12 18:37:58 +01:00
|
|
|
{
|
|
|
|
int len = ( slen > tlen ) ? tlen : slen;
|
2002-10-02 12:33:08 +02:00
|
|
|
uchar *map= cs->sort_order;
|
2002-03-12 18:37:58 +01:00
|
|
|
while (len--)
|
|
|
|
{
|
2002-10-09 12:40:57 +02:00
|
|
|
if (map[*s++] != map[*t++])
|
|
|
|
return ((int) map[s[-1]] - (int) map[t[-1]]);
|
2002-03-12 18:37:58 +01:00
|
|
|
}
|
|
|
|
return (int) (slen-tlen);
|
|
|
|
}
|
|
|
|
|
2003-01-31 10:48:35 +01:00
|
|
|
|
|
|
|
int my_strnncollsp_simple(CHARSET_INFO * cs, const uchar *s, uint slen,
|
|
|
|
const uchar *t, uint tlen)
|
|
|
|
{
|
|
|
|
uchar *map= cs->sort_order;
|
|
|
|
int len;
|
|
|
|
|
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
2004-02-16 09:03:25 +01:00
|
|
|
for ( ; slen && s[slen-1] == ' ' ; slen--);
|
|
|
|
for ( ; tlen && t[tlen-1] == ' ' ; tlen--);
|
2003-01-31 10:48:35 +01:00
|
|
|
|
|
|
|
len = ( slen > tlen ) ? tlen : slen;
|
|
|
|
|
|
|
|
while (len--)
|
|
|
|
{
|
|
|
|
if (map[*s++] != map[*t++])
|
|
|
|
return ((int) map[s[-1]] - (int) map[t[-1]]);
|
|
|
|
}
|
|
|
|
return (int) (slen-tlen);
|
|
|
|
}
|
|
|
|
|
2002-03-12 18:37:58 +01:00
|
|
|
void my_caseup_str_8bit(CHARSET_INFO * cs,char *str)
|
|
|
|
{
|
2002-08-15 13:42:54 +02:00
|
|
|
register uchar *map=cs->to_upper;
|
|
|
|
while ((*str = (char) map[(uchar) *str]) != 0)
|
2002-03-12 18:37:58 +01:00
|
|
|
str++;
|
|
|
|
}
|
|
|
|
|
|
|
|
void my_casedn_str_8bit(CHARSET_INFO * cs,char *str)
|
|
|
|
{
|
2002-08-15 13:42:54 +02:00
|
|
|
register uchar *map=cs->to_lower;
|
|
|
|
while ((*str = (char) map[(uchar)*str]) != 0)
|
2002-03-12 18:37:58 +01:00
|
|
|
str++;
|
|
|
|
}
|
|
|
|
|
|
|
|
void my_caseup_8bit(CHARSET_INFO * cs, char *str, uint length)
|
|
|
|
{
|
2002-08-15 13:42:54 +02:00
|
|
|
register uchar *map=cs->to_upper;
|
2002-03-12 18:37:58 +01:00
|
|
|
for ( ; length>0 ; length--, str++)
|
2002-08-15 13:42:54 +02:00
|
|
|
*str= (char) map[(uchar)*str];
|
2002-03-12 18:37:58 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void my_casedn_8bit(CHARSET_INFO * cs, char *str, uint length)
|
|
|
|
{
|
2002-08-15 13:42:54 +02:00
|
|
|
register uchar *map=cs->to_lower;
|
2002-03-12 18:37:58 +01:00
|
|
|
for ( ; length>0 ; length--, str++)
|
2002-08-15 13:42:54 +02:00
|
|
|
*str= (char) map[(uchar) *str];
|
2002-03-12 18:37:58 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
int my_strcasecmp_8bit(CHARSET_INFO * cs,const char *s, const char *t)
|
|
|
|
{
|
2002-08-15 13:42:54 +02:00
|
|
|
register uchar *map=cs->to_upper;
|
|
|
|
while (map[(uchar) *s] == map[(uchar) *t++])
|
2002-03-12 18:37:58 +01:00
|
|
|
if (!*s++) return 0;
|
2002-08-15 13:42:54 +02:00
|
|
|
return ((int) map[(uchar) s[0]] - (int) map[(uchar) t[-1]]);
|
2002-03-12 18:37:58 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-03-29 13:06:06 +01:00
|
|
|
int my_mb_wc_8bit(CHARSET_INFO *cs,my_wc_t *wc,
|
|
|
|
const unsigned char *str,
|
|
|
|
const unsigned char *end __attribute__((unused)))
|
|
|
|
{
|
2003-01-27 13:46:03 +01:00
|
|
|
if (str >= end)
|
|
|
|
return MY_CS_TOOFEW(0);
|
|
|
|
|
2002-03-29 13:06:06 +01:00
|
|
|
*wc=cs->tab_to_uni[*str];
|
|
|
|
return (!wc[0] && str[0]) ? MY_CS_ILSEQ : 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
int my_wc_mb_8bit(CHARSET_INFO *cs,my_wc_t wc,
|
2003-01-14 13:28:36 +01:00
|
|
|
unsigned char *str,
|
|
|
|
unsigned char *end __attribute__((unused)))
|
2002-03-29 13:06:06 +01:00
|
|
|
{
|
|
|
|
MY_UNI_IDX *idx;
|
|
|
|
|
2003-01-27 13:46:03 +01:00
|
|
|
if (str >= end)
|
|
|
|
return MY_CS_TOOSMALL;
|
|
|
|
|
2003-01-14 13:28:36 +01:00
|
|
|
for (idx=cs->tab_from_uni; idx->tab ; idx++)
|
|
|
|
{
|
|
|
|
if (idx->from <= wc && idx->to >= wc)
|
|
|
|
{
|
|
|
|
str[0]= idx->tab[wc - idx->from];
|
|
|
|
return (!str[0] && wc) ? MY_CS_ILUNI : 1;
|
2002-03-29 13:06:06 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return MY_CS_ILUNI;
|
|
|
|
}
|
2002-10-10 13:52:22 +02:00
|
|
|
|
|
|
|
|
2003-01-14 13:28:36 +01:00
|
|
|
/*
|
|
|
|
We can't use vsprintf here as it's not guaranteed to return
|
|
|
|
the length on all operating systems.
|
|
|
|
This function is also not called in a safe environment, so the
|
|
|
|
end buffer must be checked.
|
|
|
|
*/
|
2002-11-10 13:14:39 +01:00
|
|
|
|
|
|
|
int my_snprintf_8bit(CHARSET_INFO *cs __attribute__((unused)),
|
2002-11-13 12:00:25 +01:00
|
|
|
char* to, uint n __attribute__((unused)),
|
|
|
|
const char* fmt, ...)
|
2002-11-10 13:14:39 +01:00
|
|
|
{
|
|
|
|
va_list args;
|
2003-01-14 13:28:36 +01:00
|
|
|
int result;
|
2002-11-10 13:14:39 +01:00
|
|
|
va_start(args,fmt);
|
2003-01-14 13:28:36 +01:00
|
|
|
result= my_vsnprintf(to, n, fmt, args);
|
|
|
|
va_end(args);
|
|
|
|
return result;
|
2002-11-10 13:14:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-10-10 13:52:22 +02:00
|
|
|
void my_hash_sort_simple(CHARSET_INFO *cs,
|
|
|
|
const uchar *key, uint len,
|
|
|
|
ulong *nr1, ulong *nr2)
|
|
|
|
{
|
|
|
|
register uchar *sort_order=cs->sort_order;
|
|
|
|
const uchar *pos = key;
|
|
|
|
|
|
|
|
key+= len;
|
|
|
|
|
|
|
|
for (; pos < (uchar*) key ; pos++)
|
|
|
|
{
|
|
|
|
nr1[0]^=(ulong) ((((uint) nr1[0] & 63)+nr2[0]) *
|
|
|
|
((uint) sort_order[(uint) *pos])) + (nr1[0] << 8);
|
|
|
|
nr2[0]+=3;
|
|
|
|
}
|
|
|
|
}
|
2002-11-13 14:13:29 +01:00
|
|
|
|
2002-11-27 15:08:31 +01: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
2004-02-16 09:03:25 +01:00
|
|
|
long my_strntol_8bit(CHARSET_INFO *cs,
|
|
|
|
const char *nptr, uint l, int base,
|
|
|
|
char **endptr, int *err)
|
2002-11-13 14:13:29 +01:00
|
|
|
{
|
2002-11-27 15:08:31 +01:00
|
|
|
int negative;
|
|
|
|
register ulong cutoff;
|
|
|
|
register unsigned int cutlim;
|
|
|
|
register ulong i;
|
|
|
|
register const char *s;
|
|
|
|
register unsigned char c;
|
|
|
|
const char *save, *e;
|
|
|
|
int overflow;
|
2003-01-17 10:17:22 +01:00
|
|
|
|
2003-01-17 15:33:54 +01:00
|
|
|
*err= 0; /* Initialize error indicator */
|
2003-01-17 15:45:17 +01:00
|
|
|
#ifdef NOT_USED
|
2002-11-27 15:08:31 +01:00
|
|
|
if (base < 0 || base == 1 || base > 36)
|
|
|
|
base = 10;
|
2003-01-17 10:17:22 +01:00
|
|
|
#endif
|
|
|
|
|
2002-11-27 15:08:31 +01:00
|
|
|
s = nptr;
|
|
|
|
e = nptr+l;
|
|
|
|
|
|
|
|
for ( ; s<e && my_isspace(cs, *s) ; s++);
|
|
|
|
|
|
|
|
if (s == e)
|
|
|
|
{
|
|
|
|
goto noconv;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Check for a sign. */
|
|
|
|
if (*s == '-')
|
|
|
|
{
|
|
|
|
negative = 1;
|
|
|
|
++s;
|
|
|
|
}
|
|
|
|
else if (*s == '+')
|
|
|
|
{
|
|
|
|
negative = 0;
|
|
|
|
++s;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
negative = 0;
|
|
|
|
|
2003-01-17 15:45:17 +01:00
|
|
|
#ifdef NOT_USED
|
2002-11-27 15:08:31 +01:00
|
|
|
if (base == 16 && s[0] == '0' && (s[1]=='X' || s[1]=='x'))
|
|
|
|
s += 2;
|
2003-01-17 10:17:22 +01:00
|
|
|
#endif
|
2002-11-27 15:08:31 +01:00
|
|
|
|
2003-01-17 15:45:17 +01:00
|
|
|
#ifdef NOT_USED
|
2002-11-27 15:08:31 +01:00
|
|
|
if (base == 0)
|
|
|
|
{
|
|
|
|
if (*s == '0')
|
|
|
|
{
|
|
|
|
if (s[1]=='X' || s[1]=='x')
|
|
|
|
{
|
|
|
|
s += 2;
|
|
|
|
base = 16;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
base = 8;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
base = 10;
|
|
|
|
}
|
2003-01-17 10:17:22 +01:00
|
|
|
#endif
|
2002-11-27 15:08:31 +01:00
|
|
|
|
|
|
|
save = s;
|
|
|
|
cutoff = ((ulong)~0L) / (unsigned long int) base;
|
|
|
|
cutlim = (uint) (((ulong)~0L) % (unsigned long int) base);
|
|
|
|
|
|
|
|
overflow = 0;
|
|
|
|
i = 0;
|
|
|
|
for (c = *s; s != e; c = *++s)
|
|
|
|
{
|
|
|
|
if (c>='0' && c<='9')
|
|
|
|
c -= '0';
|
|
|
|
else if (c>='A' && c<='F')
|
|
|
|
c = c - 'A' + 10;
|
|
|
|
else if (c>='a' && c<='f')
|
|
|
|
c = c - 'a' + 10;
|
|
|
|
else
|
|
|
|
break;
|
|
|
|
if (c >= base)
|
|
|
|
break;
|
|
|
|
if (i > cutoff || (i == cutoff && c > cutlim))
|
|
|
|
overflow = 1;
|
|
|
|
else
|
|
|
|
{
|
|
|
|
i *= (ulong) base;
|
|
|
|
i += c;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (s == save)
|
|
|
|
goto noconv;
|
|
|
|
|
|
|
|
if (endptr != NULL)
|
|
|
|
*endptr = (char *) s;
|
|
|
|
|
|
|
|
if (negative)
|
|
|
|
{
|
|
|
|
if (i > (ulong) LONG_MIN)
|
|
|
|
overflow = 1;
|
|
|
|
}
|
|
|
|
else if (i > (ulong) LONG_MAX)
|
|
|
|
overflow = 1;
|
|
|
|
|
|
|
|
if (overflow)
|
|
|
|
{
|
2003-01-16 14:17:07 +01:00
|
|
|
err[0]= ERANGE;
|
2002-11-27 15:08:31 +01:00
|
|
|
return negative ? LONG_MIN : LONG_MAX;
|
|
|
|
}
|
|
|
|
|
|
|
|
return (negative ? -((long) i) : (long) i);
|
|
|
|
|
|
|
|
noconv:
|
2003-01-16 14:17:07 +01:00
|
|
|
err[0]= EDOM;
|
2002-11-27 15:08:31 +01:00
|
|
|
if (endptr != NULL)
|
|
|
|
*endptr = (char *) nptr;
|
|
|
|
return 0L;
|
2002-11-13 14:13:29 +01:00
|
|
|
}
|
|
|
|
|
2002-11-27 15:08:31 +01: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
2004-02-16 09:03:25 +01:00
|
|
|
ulong my_strntoul_8bit(CHARSET_INFO *cs,
|
|
|
|
const char *nptr, uint l, int base,
|
|
|
|
char **endptr, int *err)
|
2002-11-13 14:13:29 +01:00
|
|
|
{
|
2002-11-27 15:08:31 +01:00
|
|
|
int negative;
|
|
|
|
register ulong cutoff;
|
|
|
|
register unsigned int cutlim;
|
|
|
|
register ulong i;
|
|
|
|
register const char *s;
|
|
|
|
register unsigned char c;
|
|
|
|
const char *save, *e;
|
|
|
|
int overflow;
|
|
|
|
|
2003-01-17 15:33:54 +01:00
|
|
|
*err= 0; /* Initialize error indicator */
|
2003-01-17 15:45:17 +01:00
|
|
|
#ifdef NOT_USED
|
2002-11-27 15:08:31 +01:00
|
|
|
if (base < 0 || base == 1 || base > 36)
|
|
|
|
base = 10;
|
2003-01-17 10:17:22 +01:00
|
|
|
#endif
|
|
|
|
|
2002-11-27 15:08:31 +01:00
|
|
|
s = nptr;
|
|
|
|
e = nptr+l;
|
|
|
|
|
|
|
|
for( ; s<e && my_isspace(cs, *s); s++);
|
|
|
|
|
|
|
|
if (s==e)
|
|
|
|
{
|
|
|
|
goto noconv;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (*s == '-')
|
|
|
|
{
|
|
|
|
negative = 1;
|
|
|
|
++s;
|
|
|
|
}
|
|
|
|
else if (*s == '+')
|
|
|
|
{
|
|
|
|
negative = 0;
|
|
|
|
++s;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
negative = 0;
|
|
|
|
|
2003-01-17 15:45:17 +01:00
|
|
|
#ifdef NOT_USED
|
2002-11-27 15:08:31 +01:00
|
|
|
if (base == 16 && s[0] == '0' && (s[1]=='X' || s[1]=='x'))
|
|
|
|
s += 2;
|
2003-01-17 10:17:22 +01:00
|
|
|
#endif
|
2002-11-27 15:08:31 +01:00
|
|
|
|
2003-01-17 15:45:17 +01:00
|
|
|
#ifdef NOT_USED
|
2002-11-27 15:08:31 +01:00
|
|
|
if (base == 0)
|
|
|
|
{
|
|
|
|
if (*s == '0')
|
|
|
|
{
|
|
|
|
if (s[1]=='X' || s[1]=='x')
|
|
|
|
{
|
|
|
|
s += 2;
|
|
|
|
base = 16;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
base = 8;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
base = 10;
|
|
|
|
}
|
2003-01-17 10:17:22 +01:00
|
|
|
#endif
|
2002-11-27 15:08:31 +01:00
|
|
|
|
|
|
|
save = s;
|
|
|
|
cutoff = ((ulong)~0L) / (unsigned long int) base;
|
|
|
|
cutlim = (uint) (((ulong)~0L) % (unsigned long int) base);
|
|
|
|
overflow = 0;
|
|
|
|
i = 0;
|
|
|
|
|
|
|
|
for (c = *s; s != e; c = *++s)
|
|
|
|
{
|
|
|
|
if (c>='0' && c<='9')
|
|
|
|
c -= '0';
|
|
|
|
else if (c>='A' && c<='F')
|
|
|
|
c = c - 'A' + 10;
|
2003-01-05 14:34:24 +01:00
|
|
|
else if (c>='a' && c<='f')
|
2002-11-27 15:08:31 +01:00
|
|
|
c = c - 'a' + 10;
|
|
|
|
else
|
|
|
|
break;
|
|
|
|
if (c >= base)
|
|
|
|
break;
|
|
|
|
if (i > cutoff || (i == cutoff && c > cutlim))
|
|
|
|
overflow = 1;
|
|
|
|
else
|
|
|
|
{
|
|
|
|
i *= (ulong) base;
|
|
|
|
i += c;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (s == save)
|
|
|
|
goto noconv;
|
|
|
|
|
|
|
|
if (endptr != NULL)
|
|
|
|
*endptr = (char *) s;
|
|
|
|
|
|
|
|
if (overflow)
|
|
|
|
{
|
2003-01-16 14:17:07 +01:00
|
|
|
err[0]= ERANGE;
|
2002-11-27 15:08:31 +01:00
|
|
|
return ((ulong)~0L);
|
|
|
|
}
|
|
|
|
|
|
|
|
return (negative ? -((long) i) : (long) i);
|
|
|
|
|
|
|
|
noconv:
|
2003-01-16 14:17:07 +01:00
|
|
|
err[0]= EDOM;
|
2002-11-27 15:08:31 +01:00
|
|
|
if (endptr != NULL)
|
|
|
|
*endptr = (char *) nptr;
|
|
|
|
return 0L;
|
2002-11-13 14:13:29 +01:00
|
|
|
}
|
|
|
|
|
2002-11-27 15:08:31 +01: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
2004-02-16 09:03:25 +01:00
|
|
|
longlong my_strntoll_8bit(CHARSET_INFO *cs __attribute__((unused)),
|
|
|
|
const char *nptr, uint l, int base,
|
|
|
|
char **endptr,int *err)
|
2002-11-13 14:13:29 +01:00
|
|
|
{
|
2002-11-27 15:08:31 +01:00
|
|
|
int negative;
|
|
|
|
register ulonglong cutoff;
|
|
|
|
register unsigned int cutlim;
|
|
|
|
register ulonglong i;
|
|
|
|
register const char *s, *e;
|
|
|
|
register unsigned char c;
|
|
|
|
const char *save;
|
|
|
|
int overflow;
|
|
|
|
|
2003-01-17 15:33:54 +01:00
|
|
|
*err= 0; /* Initialize error indicator */
|
2003-01-17 15:45:17 +01:00
|
|
|
#ifdef NOT_USED
|
2002-11-27 15:08:31 +01:00
|
|
|
if (base < 0 || base == 1 || base > 36)
|
|
|
|
base = 10;
|
2003-01-17 10:17:22 +01:00
|
|
|
#endif
|
2002-11-27 15:08:31 +01:00
|
|
|
|
|
|
|
s = nptr;
|
|
|
|
e = nptr+l;
|
|
|
|
|
|
|
|
for(; s<e && my_isspace(cs,*s); s++);
|
|
|
|
|
|
|
|
if (s == e)
|
|
|
|
{
|
|
|
|
goto noconv;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (*s == '-')
|
|
|
|
{
|
|
|
|
negative = 1;
|
|
|
|
++s;
|
|
|
|
}
|
|
|
|
else if (*s == '+')
|
|
|
|
{
|
|
|
|
negative = 0;
|
|
|
|
++s;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
negative = 0;
|
|
|
|
|
2003-01-17 15:45:17 +01:00
|
|
|
#ifdef NOT_USED
|
2002-11-27 15:08:31 +01:00
|
|
|
if (base == 16 && s[0] == '0' && (s[1]=='X'|| s[1]=='x'))
|
|
|
|
s += 2;
|
2003-01-17 10:17:22 +01:00
|
|
|
#endif
|
2002-11-27 15:08:31 +01:00
|
|
|
|
2003-01-17 15:45:17 +01:00
|
|
|
#ifdef NOT_USED
|
2002-11-27 15:08:31 +01:00
|
|
|
if (base == 0)
|
|
|
|
{
|
|
|
|
if (*s == '0')
|
|
|
|
{
|
|
|
|
if (s[1]=='X' || s[1]=='x')
|
|
|
|
{
|
|
|
|
s += 2;
|
|
|
|
base = 16;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
base = 8;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
base = 10;
|
|
|
|
}
|
2003-01-17 10:17:22 +01:00
|
|
|
#endif
|
2002-11-27 15:08:31 +01:00
|
|
|
|
|
|
|
save = s;
|
|
|
|
|
|
|
|
cutoff = (~(ulonglong) 0) / (unsigned long int) base;
|
|
|
|
cutlim = (uint) ((~(ulonglong) 0) % (unsigned long int) base);
|
|
|
|
|
|
|
|
overflow = 0;
|
|
|
|
i = 0;
|
|
|
|
for (c = *s; s != e; c = *++s)
|
|
|
|
{
|
|
|
|
if (c>='0' && c<='9')
|
|
|
|
c -= '0';
|
|
|
|
else if (c>='A' && c<='F')
|
|
|
|
c = c - 'A' + 10;
|
|
|
|
else if (c>='a' && c<='f')
|
|
|
|
c = c - 'a' + 10;
|
|
|
|
else
|
|
|
|
break;
|
|
|
|
if (c >= base)
|
|
|
|
break;
|
|
|
|
if (i > cutoff || (i == cutoff && c > cutlim))
|
|
|
|
overflow = 1;
|
|
|
|
else
|
|
|
|
{
|
|
|
|
i *= (ulonglong) base;
|
|
|
|
i += c;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (s == save)
|
|
|
|
goto noconv;
|
|
|
|
|
|
|
|
if (endptr != NULL)
|
|
|
|
*endptr = (char *) s;
|
|
|
|
|
|
|
|
if (negative)
|
|
|
|
{
|
|
|
|
if (i > (ulonglong) LONGLONG_MIN)
|
|
|
|
overflow = 1;
|
|
|
|
}
|
|
|
|
else if (i > (ulonglong) LONGLONG_MAX)
|
|
|
|
overflow = 1;
|
|
|
|
|
|
|
|
if (overflow)
|
|
|
|
{
|
2003-01-16 14:17:07 +01:00
|
|
|
err[0]= ERANGE;
|
2002-11-27 15:08:31 +01:00
|
|
|
return negative ? LONGLONG_MIN : LONGLONG_MAX;
|
|
|
|
}
|
|
|
|
|
|
|
|
return (negative ? -((longlong) i) : (longlong) i);
|
|
|
|
|
|
|
|
noconv:
|
2003-01-16 14:17:07 +01:00
|
|
|
err[0]= EDOM;
|
2002-11-27 15:08:31 +01:00
|
|
|
if (endptr != NULL)
|
|
|
|
*endptr = (char *) nptr;
|
|
|
|
return 0L;
|
2002-11-13 14:13:29 +01:00
|
|
|
}
|
|
|
|
|
2002-11-27 15:08:31 +01:00
|
|
|
|
|
|
|
ulonglong my_strntoull_8bit(CHARSET_INFO *cs,
|
2003-01-16 14:17:07 +01:00
|
|
|
const char *nptr, uint l, int base,
|
|
|
|
char **endptr, int *err)
|
2002-11-13 14:13:29 +01:00
|
|
|
{
|
2002-11-27 15:08:31 +01:00
|
|
|
int negative;
|
|
|
|
register ulonglong cutoff;
|
|
|
|
register unsigned int cutlim;
|
|
|
|
register ulonglong i;
|
|
|
|
register const char *s, *e;
|
|
|
|
register unsigned char c;
|
|
|
|
const char *save;
|
|
|
|
int overflow;
|
|
|
|
|
2003-01-17 15:33:54 +01:00
|
|
|
*err= 0; /* Initialize error indicator */
|
2003-01-17 15:45:17 +01:00
|
|
|
#ifdef NOT_USED
|
2002-11-27 15:08:31 +01:00
|
|
|
if (base < 0 || base == 1 || base > 36)
|
|
|
|
base = 10;
|
2003-01-17 10:17:22 +01:00
|
|
|
#endif
|
2002-11-27 15:08:31 +01:00
|
|
|
|
|
|
|
s = nptr;
|
|
|
|
e = nptr+l;
|
|
|
|
|
|
|
|
for(; s<e && my_isspace(cs,*s); s++);
|
|
|
|
|
|
|
|
if (s == e)
|
|
|
|
{
|
|
|
|
goto noconv;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (*s == '-')
|
|
|
|
{
|
|
|
|
negative = 1;
|
|
|
|
++s;
|
|
|
|
}
|
|
|
|
else if (*s == '+')
|
|
|
|
{
|
|
|
|
negative = 0;
|
|
|
|
++s;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
negative = 0;
|
|
|
|
|
2003-01-17 15:45:17 +01:00
|
|
|
#ifdef NOT_USED
|
2002-11-27 15:08:31 +01:00
|
|
|
if (base == 16 && s[0] == '0' && (s[1]=='X' || s[1]=='x'))
|
|
|
|
s += 2;
|
2003-01-17 10:17:22 +01:00
|
|
|
#endif
|
2002-11-27 15:08:31 +01:00
|
|
|
|
2003-01-17 15:45:17 +01:00
|
|
|
#ifdef NOT_USED
|
2002-11-27 15:08:31 +01:00
|
|
|
if (base == 0)
|
|
|
|
{
|
|
|
|
if (*s == '0')
|
|
|
|
{
|
|
|
|
if (s[1]=='X' || s[1]=='x')
|
|
|
|
{
|
|
|
|
s += 2;
|
|
|
|
base = 16;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
base = 8;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
base = 10;
|
|
|
|
}
|
2003-01-17 10:17:22 +01:00
|
|
|
#endif
|
2002-11-27 15:08:31 +01:00
|
|
|
|
|
|
|
save = s;
|
|
|
|
|
|
|
|
cutoff = (~(ulonglong) 0) / (unsigned long int) base;
|
|
|
|
cutlim = (uint) ((~(ulonglong) 0) % (unsigned long int) base);
|
|
|
|
|
|
|
|
overflow = 0;
|
|
|
|
i = 0;
|
|
|
|
for (c = *s; s != e; c = *++s)
|
|
|
|
{
|
|
|
|
if (c>='0' && c<='9')
|
|
|
|
c -= '0';
|
|
|
|
else if (c>='A' && c<='F')
|
|
|
|
c = c - 'A' + 10;
|
|
|
|
else if (c>='a' && c<='f')
|
|
|
|
c = c - 'a' + 10;
|
|
|
|
else
|
|
|
|
break;
|
|
|
|
if (c >= base)
|
|
|
|
break;
|
|
|
|
if (i > cutoff || (i == cutoff && c > cutlim))
|
|
|
|
overflow = 1;
|
|
|
|
else
|
|
|
|
{
|
|
|
|
i *= (ulonglong) base;
|
|
|
|
i += c;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (s == save)
|
|
|
|
goto noconv;
|
|
|
|
|
|
|
|
if (endptr != NULL)
|
|
|
|
*endptr = (char *) s;
|
|
|
|
|
|
|
|
if (overflow)
|
|
|
|
{
|
2003-01-16 14:17:07 +01:00
|
|
|
err[0]= ERANGE;
|
2002-11-27 15:08:31 +01:00
|
|
|
return (~(ulonglong) 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
return (negative ? -((longlong) i) : (longlong) i);
|
|
|
|
|
|
|
|
noconv:
|
2003-01-16 14:17:07 +01:00
|
|
|
err[0]= EDOM;
|
2002-11-27 15:08:31 +01:00
|
|
|
if (endptr != NULL)
|
|
|
|
*endptr = (char *) nptr;
|
|
|
|
return 0L;
|
2002-11-13 14:13:29 +01:00
|
|
|
}
|
|
|
|
|
2003-01-14 13:28:36 +01:00
|
|
|
/*
|
|
|
|
Read double from string
|
|
|
|
|
|
|
|
SYNOPSIS:
|
|
|
|
my_strntod_8bit()
|
|
|
|
cs Character set information
|
|
|
|
str String to convert to double
|
|
|
|
length Optional length for string.
|
2003-01-17 15:33:54 +01:00
|
|
|
end result pointer to end of converted string
|
|
|
|
err Error number if failed conversion
|
2003-01-14 13:28:36 +01:00
|
|
|
|
|
|
|
NOTES:
|
|
|
|
If length is not INT_MAX32 or str[length] != 0 then the given str must
|
|
|
|
be writeable
|
|
|
|
If length == INT_MAX32 the str must be \0 terminated.
|
|
|
|
|
|
|
|
It's implemented this way to save a buffer allocation and a memory copy.
|
|
|
|
|
|
|
|
RETURN
|
2003-01-17 15:33:54 +01:00
|
|
|
Value of number in string
|
2003-01-14 13:28:36 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
double my_strntod_8bit(CHARSET_INFO *cs __attribute__((unused)),
|
2004-02-13 15:27:21 +01:00
|
|
|
char *str, uint length,
|
2003-01-17 15:33:54 +01:00
|
|
|
char **end, int *err)
|
2002-11-13 14:13:29 +01:00
|
|
|
{
|
2003-01-14 13:28:36 +01:00
|
|
|
char end_char;
|
|
|
|
double result;
|
|
|
|
|
2003-01-17 15:33:54 +01:00
|
|
|
errno= 0; /* Safety */
|
2003-03-18 10:17:48 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
The following define is to avoid warnings from valgrind as str[length]
|
|
|
|
may not be defined (which is not fatal in real life)
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef HAVE_purify
|
|
|
|
if (length == INT_MAX32)
|
|
|
|
#else
|
2003-01-14 13:28:36 +01:00
|
|
|
if (length == INT_MAX32 || str[length] == 0)
|
2003-03-18 10:17:48 +01:00
|
|
|
#endif
|
2004-02-13 15:27:21 +01:00
|
|
|
result= my_strtod(str, end);
|
2003-01-17 15:33:54 +01:00
|
|
|
else
|
|
|
|
{
|
|
|
|
end_char= str[length];
|
|
|
|
str[length]= 0;
|
2004-02-13 15:27:21 +01:00
|
|
|
result= my_strtod(str, end);
|
2003-01-17 15:33:54 +01:00
|
|
|
str[length]= end_char; /* Restore end char */
|
|
|
|
}
|
|
|
|
*err= errno;
|
2003-01-14 13:28:36 +01:00
|
|
|
return result;
|
2002-11-13 14:13:29 +01:00
|
|
|
}
|
2002-11-14 13:07:29 +01:00
|
|
|
|
|
|
|
|
2002-12-11 09:30:05 +01:00
|
|
|
/*
|
|
|
|
This is a fast version optimized for the case of radix 10 / -10
|
2003-01-14 13:28:36 +01:00
|
|
|
|
|
|
|
Assume len >= 1
|
2002-12-11 09:30:05 +01:00
|
|
|
*/
|
|
|
|
|
2003-01-15 15:06:07 +01:00
|
|
|
int my_long10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)),
|
2002-12-11 09:30:05 +01:00
|
|
|
char *dst, uint len, int radix, long int val)
|
|
|
|
{
|
2002-12-11 12:26:49 +01:00
|
|
|
char buffer[66];
|
|
|
|
register char *p, *e;
|
|
|
|
long int new_val;
|
2003-01-14 13:28:36 +01:00
|
|
|
uint sign=0;
|
|
|
|
|
2002-12-11 12:26:49 +01:00
|
|
|
e = p = &buffer[sizeof(buffer)-1];
|
2003-01-14 13:28:36 +01:00
|
|
|
*p= 0;
|
2002-12-11 12:26:49 +01:00
|
|
|
|
|
|
|
if (radix < 0)
|
|
|
|
{
|
|
|
|
if (val < 0)
|
|
|
|
{
|
2003-01-14 13:28:36 +01:00
|
|
|
val= -val;
|
|
|
|
*dst++= '-';
|
|
|
|
len--;
|
|
|
|
sign= 1;
|
2002-12-11 12:26:49 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
new_val = (long) ((unsigned long int) val / 10);
|
|
|
|
*--p = '0'+ (char) ((unsigned long int) val - (unsigned long) new_val * 10);
|
|
|
|
val = new_val;
|
|
|
|
|
|
|
|
while (val != 0)
|
|
|
|
{
|
|
|
|
new_val=val/10;
|
|
|
|
*--p = '0' + (char) (val-new_val*10);
|
|
|
|
val= new_val;
|
|
|
|
}
|
|
|
|
|
2003-01-14 13:28:36 +01:00
|
|
|
len= min(len, (uint) (e-p));
|
|
|
|
memcpy(dst, p, len);
|
|
|
|
return (int) len+sign;
|
2002-12-11 12:26:49 +01:00
|
|
|
}
|
2002-12-11 09:30:05 +01:00
|
|
|
|
2003-01-14 13:28:36 +01:00
|
|
|
|
2003-01-15 15:06:07 +01:00
|
|
|
int my_longlong10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)),
|
2002-12-11 09:30:05 +01:00
|
|
|
char *dst, uint len, int radix, longlong val)
|
|
|
|
{
|
2002-12-11 12:26:49 +01:00
|
|
|
char buffer[65];
|
|
|
|
register char *p, *e;
|
|
|
|
long long_val;
|
2003-01-14 13:28:36 +01:00
|
|
|
uint sign= 0;
|
2002-12-11 12:26:49 +01:00
|
|
|
|
|
|
|
if (radix < 0)
|
|
|
|
{
|
|
|
|
if (val < 0)
|
|
|
|
{
|
|
|
|
val = -val;
|
2003-01-14 13:28:36 +01:00
|
|
|
*dst++= '-';
|
|
|
|
len--;
|
|
|
|
sign= 1;
|
2002-12-11 12:26:49 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
e = p = &buffer[sizeof(buffer)-1];
|
2003-01-14 13:28:36 +01:00
|
|
|
*p= 0;
|
2002-12-11 12:26:49 +01:00
|
|
|
|
|
|
|
if (val == 0)
|
|
|
|
{
|
2003-01-14 13:28:36 +01:00
|
|
|
*--p= '0';
|
|
|
|
len= 1;
|
2002-12-11 12:26:49 +01:00
|
|
|
goto cnv;
|
|
|
|
}
|
|
|
|
|
|
|
|
while ((ulonglong) val > (ulonglong) LONG_MAX)
|
|
|
|
{
|
|
|
|
ulonglong quo=(ulonglong) val/(uint) 10;
|
|
|
|
uint rem= (uint) (val- quo* (uint) 10);
|
|
|
|
*--p = '0' + rem;
|
|
|
|
val= quo;
|
|
|
|
}
|
|
|
|
|
|
|
|
long_val= (long) val;
|
|
|
|
while (long_val != 0)
|
|
|
|
{
|
|
|
|
long quo= long_val/10;
|
|
|
|
*--p = '0' + (long_val - quo*10);
|
|
|
|
long_val= quo;
|
|
|
|
}
|
|
|
|
|
2003-01-14 13:28:36 +01:00
|
|
|
len= min(len, (uint) (e-p));
|
2002-12-11 12:26:49 +01:00
|
|
|
cnv:
|
2003-01-14 13:28:36 +01:00
|
|
|
memcpy(dst, p, len);
|
|
|
|
return len+sign;
|
2002-12-11 09:30:05 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-11-14 13:07:29 +01:00
|
|
|
/*
|
|
|
|
** Compare string against string with wildcard
|
|
|
|
** 0 if matched
|
|
|
|
** -1 if not matched with wildcard
|
|
|
|
** 1 if matched with wildcard
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef LIKE_CMP_TOUPPER
|
|
|
|
#define likeconv(s,A) (uchar) my_toupper(s,A)
|
|
|
|
#else
|
|
|
|
#define likeconv(s,A) (uchar) (s)->sort_order[(uchar) (A)]
|
|
|
|
#endif
|
|
|
|
|
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
2004-02-16 09:03:25 +01:00
|
|
|
#define INC_PTR(cs,A,B) (A)++
|
2002-11-14 13:07:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
int my_wildcmp_8bit(CHARSET_INFO *cs,
|
|
|
|
const char *str,const char *str_end,
|
|
|
|
const char *wildstr,const char *wildend,
|
|
|
|
int escape, int w_one, int w_many)
|
|
|
|
{
|
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
2004-02-16 09:03:25 +01:00
|
|
|
int result= -1; /* Not found, using wildcards */
|
2002-11-14 13:07:29 +01:00
|
|
|
|
|
|
|
while (wildstr != wildend)
|
|
|
|
{
|
|
|
|
while (*wildstr != w_many && *wildstr != w_one)
|
|
|
|
{
|
|
|
|
if (*wildstr == escape && wildstr+1 != wildend)
|
|
|
|
wildstr++;
|
|
|
|
|
|
|
|
if (str == str_end || likeconv(cs,*wildstr++) != likeconv(cs,*str++))
|
2003-01-31 08:43:46 +01:00
|
|
|
return(1); /* No match */
|
2002-11-14 13:07:29 +01:00
|
|
|
if (wildstr == wildend)
|
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
2004-02-16 09:03:25 +01:00
|
|
|
return(str != str_end); /* Match if both are at end */
|
2003-01-31 08:43:46 +01:00
|
|
|
result=1; /* Found an anchor char */
|
2002-11-14 13:07:29 +01:00
|
|
|
}
|
|
|
|
if (*wildstr == w_one)
|
|
|
|
{
|
|
|
|
do
|
|
|
|
{
|
2003-01-31 08:43:46 +01:00
|
|
|
if (str == str_end) /* Skip one char if possible */
|
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
2004-02-16 09:03:25 +01:00
|
|
|
return(result);
|
2002-11-14 13:07:29 +01:00
|
|
|
INC_PTR(cs,str,str_end);
|
|
|
|
} while (++wildstr < wildend && *wildstr == w_one);
|
|
|
|
if (wildstr == wildend)
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
if (*wildstr == w_many)
|
2003-01-31 08:43:46 +01:00
|
|
|
{ /* Found w_many */
|
2002-11-14 13:07:29 +01:00
|
|
|
uchar cmp;
|
|
|
|
|
|
|
|
wildstr++;
|
|
|
|
/* Remove any '%' and '_' from the wild search string */
|
|
|
|
for (; wildstr != wildend ; wildstr++)
|
|
|
|
{
|
|
|
|
if (*wildstr == w_many)
|
|
|
|
continue;
|
|
|
|
if (*wildstr == w_one)
|
|
|
|
{
|
|
|
|
if (str == str_end)
|
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
2004-02-16 09:03:25 +01:00
|
|
|
return(-1);
|
2002-11-14 13:07:29 +01:00
|
|
|
INC_PTR(cs,str,str_end);
|
|
|
|
continue;
|
|
|
|
}
|
2003-01-31 08:43:46 +01:00
|
|
|
break; /* Not a wild character */
|
2002-11-14 13:07:29 +01:00
|
|
|
}
|
|
|
|
if (wildstr == wildend)
|
2003-01-31 08:43:46 +01:00
|
|
|
return(0); /* Ok if w_many is last */
|
2002-11-14 13:07:29 +01:00
|
|
|
if (str == str_end)
|
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
2004-02-16 09:03:25 +01:00
|
|
|
return(-1);
|
2002-11-14 13:07:29 +01:00
|
|
|
|
|
|
|
if ((cmp= *wildstr) == escape && wildstr+1 != wildend)
|
|
|
|
cmp= *++wildstr;
|
|
|
|
|
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
2004-02-16 09:03:25 +01:00
|
|
|
INC_PTR(cs,wildstr,wildend); /* This is compared trough cmp */
|
|
|
|
cmp=likeconv(cs,cmp);
|
2002-11-14 13:07:29 +01:00
|
|
|
do
|
|
|
|
{
|
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
2004-02-16 09:03:25 +01:00
|
|
|
while (str != str_end && (uchar) likeconv(cs,*str) != cmp)
|
|
|
|
str++;
|
|
|
|
if (str++ == str_end) return(-1);
|
2002-11-14 13:07:29 +01: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
2004-02-16 09:03:25 +01:00
|
|
|
int tmp=my_wildcmp_8bit(cs,str,str_end,wildstr,wildend,escape,w_one,
|
|
|
|
w_many);
|
2002-11-14 13:07:29 +01:00
|
|
|
if (tmp <= 0)
|
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
2004-02-16 09:03:25 +01:00
|
|
|
return(tmp);
|
2002-11-14 13:07:29 +01:00
|
|
|
}
|
|
|
|
} while (str != str_end && wildstr[0] != w_many);
|
|
|
|
return(-1);
|
|
|
|
}
|
|
|
|
}
|
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
2004-02-16 09:03:25 +01:00
|
|
|
return(str != str_end ? 1 : 0);
|
2002-11-14 13:07:29 +01:00
|
|
|
}
|
2002-11-15 08:44:23 +01:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
** Calculate min_str and max_str that ranges a LIKE string.
|
|
|
|
** Arguments:
|
|
|
|
** ptr Pointer to LIKE string.
|
|
|
|
** ptr_length Length of LIKE string.
|
|
|
|
** escape Escape character in LIKE. (Normally '\').
|
|
|
|
** All escape characters should be removed from min_str and max_str
|
|
|
|
** res_length Length of min_str and max_str.
|
|
|
|
** min_str Smallest case sensitive string that ranges LIKE.
|
|
|
|
** Should be space padded to res_length.
|
|
|
|
** max_str Largest case sensitive string that ranges LIKE.
|
|
|
|
** Normally padded with the biggest character sort value.
|
|
|
|
**
|
|
|
|
** The function should return 0 if ok and 1 if the LIKE string can't be
|
|
|
|
** optimized !
|
|
|
|
*/
|
|
|
|
|
|
|
|
my_bool my_like_range_simple(CHARSET_INFO *cs,
|
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
2004-02-16 09:03:25 +01:00
|
|
|
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)
|
2002-11-15 08:44:23 +01:00
|
|
|
{
|
|
|
|
const char *end=ptr+ptr_length;
|
|
|
|
char *min_org=min_str;
|
|
|
|
char *min_end=min_str+res_length;
|
|
|
|
|
|
|
|
for (; ptr != end && min_str != min_end ; ptr++)
|
|
|
|
{
|
|
|
|
if (*ptr == escape && ptr+1 != end)
|
|
|
|
{
|
2003-01-31 08:43:46 +01:00
|
|
|
ptr++; /* Skip escape */
|
2002-11-15 08:44:23 +01:00
|
|
|
*min_str++= *max_str++ = *ptr;
|
|
|
|
continue;
|
|
|
|
}
|
2003-01-31 08:43:46 +01:00
|
|
|
if (*ptr == w_one) /* '_' in SQL */
|
2002-11-15 08:44:23 +01:00
|
|
|
{
|
2003-01-31 08:43:46 +01:00
|
|
|
*min_str++='\0'; /* This should be min char */
|
2002-11-15 08:44:23 +01:00
|
|
|
*max_str++=cs->max_sort_char;
|
|
|
|
continue;
|
|
|
|
}
|
2003-01-31 08:43:46 +01:00
|
|
|
if (*ptr == w_many) /* '%' in SQL */
|
2002-11-15 08:44:23 +01:00
|
|
|
{
|
|
|
|
*min_length= (uint) (min_str - min_org);
|
|
|
|
*max_length=res_length;
|
|
|
|
do {
|
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
2004-02-16 09:03:25 +01:00
|
|
|
*min_str++ = ' '; /* Because if key compression */
|
2002-11-15 08:44:23 +01:00
|
|
|
*max_str++ = cs->max_sort_char;
|
|
|
|
} while (min_str != min_end);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
*min_str++= *max_str++ = *ptr;
|
|
|
|
}
|
|
|
|
*min_length= *max_length = (uint) (min_str - min_org);
|
|
|
|
|
|
|
|
/* Temporary fix for handling w_one at end of string (key compression) */
|
|
|
|
{
|
|
|
|
char *tmp;
|
|
|
|
for (tmp= min_str ; tmp > min_org && tmp[-1] == '\0';)
|
|
|
|
*--tmp=' ';
|
|
|
|
}
|
|
|
|
|
|
|
|
while (min_str != min_end)
|
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
2004-02-16 09:03:25 +01:00
|
|
|
*min_str++ = *max_str++ = ' '; /* Because if key compression */
|
2002-11-15 08:44:23 +01:00
|
|
|
return 0;
|
|
|
|
}
|
2003-01-17 15:14:54 +01:00
|
|
|
|
|
|
|
|
|
|
|
ulong my_scan_8bit(CHARSET_INFO *cs, const char *str, const char *end, int sq)
|
|
|
|
{
|
|
|
|
const char *str0= str;
|
|
|
|
switch (sq)
|
|
|
|
{
|
|
|
|
case MY_SEQ_INTTAIL:
|
|
|
|
if (*str == '.')
|
|
|
|
{
|
|
|
|
for(str++ ; str != end && *str == '0' ; str++);
|
|
|
|
return str-str0;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
case MY_SEQ_SPACES:
|
2003-01-28 11:58:06 +01:00
|
|
|
for ( ; str < end ; str++)
|
2003-01-17 15:14:54 +01:00
|
|
|
{
|
|
|
|
if (!my_isspace(cs,*str))
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return str-str0;
|
|
|
|
default:
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
2003-01-28 11:58:06 +01:00
|
|
|
|
|
|
|
void my_fill_8bit(CHARSET_INFO *cs __attribute__((unused)),
|
|
|
|
char *s, uint l, int fill)
|
|
|
|
{
|
|
|
|
bfill(s,l,fill);
|
2003-01-31 13:22:22 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
uint my_numchars_8bit(CHARSET_INFO *cs __attribute__((unused)),
|
|
|
|
const char *b, const char *e)
|
|
|
|
{
|
|
|
|
return e-b;
|
|
|
|
}
|
|
|
|
|
|
|
|
uint my_charpos_8bit(CHARSET_INFO *cs __attribute__((unused)),
|
|
|
|
const char *b __attribute__((unused)),
|
|
|
|
const char *e __attribute__((unused)),
|
|
|
|
uint pos)
|
|
|
|
{
|
|
|
|
return pos;
|
|
|
|
}
|
2003-05-23 14:45:52 +02:00
|
|
|
|
2004-02-06 13:59:25 +01:00
|
|
|
uint my_wellformedlen_8bit(CHARSET_INFO *cs __attribute__((unused)),
|
2004-02-09 13:59:41 +01:00
|
|
|
const char *start,
|
|
|
|
const char *end,
|
2004-02-06 13:59:25 +01:00
|
|
|
uint nchars)
|
|
|
|
{
|
2004-02-09 13:59:41 +01:00
|
|
|
uint nbytes= (uint) (end-start);
|
2004-02-06 13:59:25 +01:00
|
|
|
return nbytes < nchars ? nbytes : nchars;
|
|
|
|
}
|
|
|
|
|
2003-09-16 12:43:17 +02:00
|
|
|
uint my_lengthsp_8bit(CHARSET_INFO *cs __attribute__((unused)),
|
|
|
|
const char *ptr, uint length)
|
|
|
|
{
|
|
|
|
const char *end= ptr+length;
|
|
|
|
while (end > ptr && end[-1] == ' ')
|
|
|
|
end--;
|
|
|
|
return (uint) (end-ptr);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-09-25 10:35:21 +02:00
|
|
|
uint my_instr_simple(CHARSET_INFO *cs,
|
2003-10-15 14:34:28 +02:00
|
|
|
const char *b, uint b_length,
|
|
|
|
const char *s, uint s_length,
|
2003-09-25 10:35:21 +02:00
|
|
|
my_match_t *match, uint nmatch)
|
2003-09-19 12:18:19 +02:00
|
|
|
{
|
|
|
|
register const uchar *str, *search, *end, *search_end;
|
|
|
|
|
|
|
|
if (s_length <= b_length)
|
|
|
|
{
|
|
|
|
if (!s_length)
|
2003-09-25 10:35:21 +02:00
|
|
|
{
|
|
|
|
if (nmatch)
|
|
|
|
{
|
|
|
|
match->beg= 0;
|
|
|
|
match->end= 0;
|
|
|
|
match->mblen= 0;
|
|
|
|
}
|
|
|
|
return 1; /* Empty string is always found */
|
|
|
|
}
|
2003-09-19 12:18:19 +02:00
|
|
|
|
2003-10-15 14:34:28 +02:00
|
|
|
str= (const uchar*) b;
|
|
|
|
search= (const uchar*) s;
|
|
|
|
end= (const uchar*) b+b_length-s_length+1;
|
|
|
|
search_end= (const uchar*) s + s_length;
|
2003-09-19 12:18:19 +02:00
|
|
|
|
2004-02-02 17:25:39 +01:00
|
|
|
skip:
|
2003-09-19 12:18:19 +02:00
|
|
|
while (str != end)
|
|
|
|
{
|
|
|
|
if (cs->sort_order[*str++] == cs->sort_order[*search])
|
|
|
|
{
|
|
|
|
register const uchar *i,*j;
|
|
|
|
|
|
|
|
i= str;
|
|
|
|
j= search+1;
|
|
|
|
|
|
|
|
while (j != search_end)
|
|
|
|
if (cs->sort_order[*i++] != cs->sort_order[*j++])
|
2004-02-02 17:25:39 +01:00
|
|
|
goto skip;
|
2003-09-19 12:18:19 +02:00
|
|
|
|
2003-09-25 10:35:21 +02:00
|
|
|
if (nmatch > 0)
|
|
|
|
{
|
|
|
|
match[0].beg= 0;
|
2003-10-15 14:34:28 +02:00
|
|
|
match[0].end= str- (const uchar*)b-1;
|
2003-09-25 10:35:21 +02:00
|
|
|
match[0].mblen= match[0].end;
|
|
|
|
|
|
|
|
if (nmatch > 1)
|
|
|
|
{
|
|
|
|
match[1].beg= match[0].end;
|
|
|
|
match[1].end= match[0].end+s_length;
|
|
|
|
match[1].mblen= match[1].end-match[1].beg;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 2;
|
2003-09-19 12:18:19 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2003-09-25 10:35:21 +02:00
|
|
|
return 0;
|
2003-09-19 12:18:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-05-23 14:45:52 +02:00
|
|
|
MY_CHARSET_HANDLER my_charset_8bit_handler=
|
|
|
|
{
|
|
|
|
NULL, /* ismbchar */
|
2003-10-20 15:53:48 +02:00
|
|
|
my_mbcharlen_8bit, /* mbcharlen */
|
2003-05-23 14:45:52 +02:00
|
|
|
my_numchars_8bit,
|
|
|
|
my_charpos_8bit,
|
2004-02-06 13:59:25 +01:00
|
|
|
my_wellformedlen_8bit,
|
2003-09-16 12:43:17 +02:00
|
|
|
my_lengthsp_8bit,
|
2003-05-23 14:45:52 +02:00
|
|
|
my_mb_wc_8bit,
|
|
|
|
my_wc_mb_8bit,
|
|
|
|
my_caseup_str_8bit,
|
|
|
|
my_casedn_str_8bit,
|
|
|
|
my_caseup_8bit,
|
|
|
|
my_casedn_8bit,
|
|
|
|
my_snprintf_8bit,
|
|
|
|
my_long10_to_str_8bit,
|
|
|
|
my_longlong10_to_str_8bit,
|
|
|
|
my_fill_8bit,
|
|
|
|
my_strntol_8bit,
|
|
|
|
my_strntoul_8bit,
|
|
|
|
my_strntoll_8bit,
|
|
|
|
my_strntoull_8bit,
|
|
|
|
my_strntod_8bit,
|
|
|
|
my_scan_8bit
|
|
|
|
};
|
|
|
|
|
|
|
|
MY_COLLATION_HANDLER my_collation_8bit_simple_ci_handler =
|
|
|
|
{
|
|
|
|
my_strnncoll_simple,
|
|
|
|
my_strnncollsp_simple,
|
|
|
|
my_strnxfrm_simple,
|
|
|
|
my_like_range_simple,
|
|
|
|
my_wildcmp_8bit,
|
|
|
|
my_strcasecmp_8bit,
|
2003-09-19 12:18:19 +02:00
|
|
|
my_instr_simple,
|
2003-05-23 14:45:52 +02:00
|
|
|
my_hash_sort_simple
|
|
|
|
};
|