Below is the list of changes that have just been committed into a local
5.0 repository of antony. When antony does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1979 05/08/11 12:18:53 acurtis@stripped +29 -0
Merge xiphis.org:/usr/home/antony/work2/mysql-4.1
into xiphis.org:/usr/home/antony/work2/merge-5.0
tests/mysql_client_test.c
1.152 05/08/11 12:18:38 acurtis@stripped +0 -3
manual merge 4.1->5.0
strings/Makefile.am
1.49 05/08/11 12:18:38 acurtis@stripped +1 -2
manual merge 4.1->5.0
sql/sql_union.cc
1.125 05/08/11 12:18:38 acurtis@stripped +0 -3
manual merge 4.1->5.0
sql/sql_select.cc
1.355 05/08/11 12:18:38 acurtis@stripped +0 -2
manual merge 4.1->5.0
sql/sql_base.cc
1.277 05/08/11 12:18:37 acurtis@stripped +0 -1
manual merge 4.1->5.0
sql/item_strfunc.cc
1.246 05/08/11 12:18:37 acurtis@stripped +0 -1
manual merge 4.1->5.0
sql/ha_ndbcluster.cc
1.199 05/08/11 12:18:37 acurtis@stripped +0 -1
manual merge 4.1->5.0
mysys/charset.c
1.143 05/08/11 12:18:37 acurtis@stripped +0 -0
manual merge 4.1->5.0
mysql-test/t/subselect.test
1.105 05/08/11 12:18:37 acurtis@stripped +1 -1
manual merge 4.1->5.0
mysql-test/r/subselect.result
1.122 05/08/11 12:18:37 acurtis@stripped +0 -0
manual merge 4.1->5.0
mysql-test/r/bigint.result
1.28 05/08/11 12:18:37 acurtis@stripped +1 -1
manual merge 4.1->5.0
include/my_sys.h
1.165 05/08/11 12:18:37 acurtis@stripped +0 -0
manual merge 4.1->5.0
sql-common/my_time.c
1.18 05/08/11 12:02:47 acurtis@stripped +0 -0
Auto merged
sql/sql_parse.cc
1.466 05/08/11 12:02:45 acurtis@stripped +0 -0
Auto merged
sql/sql_cache.cc
1.82 05/08/11 12:02:44 acurtis@stripped +0 -0
Auto merged
sql/slave.cc
1.255 05/08/11 12:02:44 acurtis@stripped +0 -0
Auto merged
sql/item_cmpfunc.cc
1.165 05/08/11 12:02:43 acurtis@stripped +0 -0
Auto merged
sql/field.cc
1.281 05/08/11 12:02:42 acurtis@stripped +0 -1
Auto merged
mysql-test/t/rpl_drop_temp.test
1.5 05/08/11 12:02:41 acurtis@stripped +0 -2
Auto merged
mysql-test/t/func_str.test
1.80 05/08/11 12:02:41 acurtis@stripped +0 -0
Auto merged
mysql-test/t/bigint.test
1.25 05/08/11 12:02:40 acurtis@stripped +0 -0
Auto merged
mysql-test/r/type_datetime.result
1.29 05/08/11 12:02:40 acurtis@stripped +0 -0
Auto merged
mysql-test/r/rpl_drop_temp.result
1.3 05/08/11 12:02:40 acurtis@stripped +0 -1
Auto merged
mysql-test/r/func_str.result
1.105 05/08/11 12:02:40 acurtis@stripped +0 -0
Auto merged
myisammrg/myrg_static.c
1.9 05/08/11 12:02:39 acurtis@stripped +0 -1
Auto merged
myisam/ft_boolean_search.c
1.92 05/08/11 12:02:39 acurtis@stripped +0 -0
Auto merged
client/mysqltest.c
1.154 05/08/11 12:02:39 acurtis@stripped +0 -0
Auto merged
client/mysqldump.c
1.194 05/08/11 12:02:39 acurtis@stripped +0 -1
Auto merged
client/mysql.cc
1.177 05/08/11 12:02:38 acurtis@stripped +0 -0
Auto merged
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: acurtis
# Host: ltantony.xiphis.org
# Root: /usr/home/antony/work2/merge-5.0/RESYNC
--- 1.176/client/mysql.cc 2005-07-31 10:49:45 +01:00
+++ 1.177/client/mysql.cc 2005-08-11 12:02:38 +01:00
@@ -1598,11 +1598,8 @@
mysql_free_result(fields);
}
else
- {
- tee_fprintf(stdout,
- "Didn't find any fields in table '%s'\n",table_row[0]);
field_names[i]= 0;
- }
+
i++;
}
mysql_free_result(tables);
--- 1.164/include/my_sys.h 2005-07-31 10:49:46 +01:00
+++ 1.165/include/my_sys.h 2005-08-11 12:18:37 +01:00
@@ -866,6 +866,11 @@
extern ulong escape_string_for_mysql(CHARSET_INFO *charset_info,
char *to, ulong to_length,
const char *from, ulong length);
+#ifdef __WIN__
+#define BACKSLASH_MBTAIL
+/* File system character set */
+extern CHARSET_INFO *fs_character_set(void);
+#endif
extern ulong escape_quotes_for_mysql(CHARSET_INFO *charset_info,
char *to, ulong to_length,
const char *from, ulong length);
--- 1.142/mysys/charset.c 2005-07-28 14:08:52 +01:00
+++ 1.143/mysys/charset.c 2005-08-11 12:18:37 +01:00
@@ -679,6 +679,32 @@
}
+#ifdef BACKSLASH_MBTAIL
+static CHARSET_INFO *fs_cset_cache= NULL;
+
+CHARSET_INFO *fs_character_set()
+{
+ if (!fs_cset_cache)
+ {
+ char buf[10]= "cp";
+ GetLocaleInfo(LOCALE_SYSTEM_DEFAULT, LOCALE_IDEFAULTANSICODEPAGE,
+ buf+2, sizeof(buf)-3);
+ /*
+ We cannot call get_charset_by_name here
+ because fs_character_set() is executed before
+ LOCK_THD_charset mutex initialization, which
+ is used inside get_charset_by_name.
+ As we're now interested in cp932 only,
+ let's just detect it using strcmp().
+ */
+ fs_cset_cache= !strcmp(buf, "cp932") ?
+ &my_charset_cp932_japanese_ci : &my_charset_bin;
+ }
+ return fs_cset_cache;
+}
+#endif
+
+
/*
Escape apostrophes by doubling them up
--- 1.164/sql/item_cmpfunc.cc 2005-07-18 16:36:10 +01:00
+++ 1.165/sql/item_cmpfunc.cc 2005-08-11 12:02:43 +01:00
@@ -1903,6 +1903,8 @@
byte *in_row::get_value(Item *item)
{
tmp.store_value(item);
+ if (item->is_null())
+ return 0;
return (byte *)&tmp;
}
--- 1.245/sql/item_strfunc.cc 2005-07-22 20:32:27 +01:00
+++ 1.246/sql/item_strfunc.cc 2005-08-11 12:18:37 +01:00
@@ -1177,11 +1177,23 @@
}
}
else
- { // Start counting at end
- for (offset=res->length() ; ; offset-=delimeter_length-1)
+ {
+ /*
+ Negative index, start counting at the end
+ */
+ for (offset=res->length(); offset ;)
{
+ /*
+ this call will result in finding the position pointing to one
+ address space less than where the found substring is located
+ in res
+ */
if ((int) (offset=res->strrstr(*delimeter,offset)) < 0)
return res; // Didn't find, return org string
+ /*
+ At this point, we've searched for the substring
+ the number of times as supplied by the index value
+ */
if (!++count)
{
offset+=delimeter_length;
--- 1.254/sql/slave.cc 2005-08-02 01:08:34 +01:00
+++ 1.255/sql/slave.cc 2005-08-11 12:02:44 +01:00
@@ -2396,8 +2396,8 @@
&my_charset_bin);
protocol->store((ulonglong) mi->rli.group_relay_log_pos);
protocol->store(mi->rli.group_master_log_name, &my_charset_bin);
- protocol->store(mi->slave_running == MYSQL_SLAVE_RUN_CONNECT
- ? "Yes":"No", &my_charset_bin);
+ protocol->store(mi->slave_running == MYSQL_SLAVE_RUN_CONNECT ?
+ "Yes" : "No", &my_charset_bin);
protocol->store(mi->rli.slave_running ? "Yes":"No", &my_charset_bin);
protocol->store(&replicate_do_db);
protocol->store(&replicate_ignore_db);
--- 1.81/sql/sql_cache.cc 2005-07-23 05:53:23 +01:00
+++ 1.82/sql/sql_cache.cc 2005-08-11 12:02:44 +01:00
@@ -762,7 +762,7 @@
TABLE_COUNTER_TYPE local_tables;
ulong tot_length;
DBUG_ENTER("Query_cache::store_query");
- if (query_cache_size == 0)
+ if (query_cache_size == 0 || thd->locked_tables)
DBUG_VOID_RETURN;
uint8 tables_type= 0;
@@ -936,8 +936,8 @@
Query_cache_query_flags flags;
DBUG_ENTER("Query_cache::send_result_to_client");
- if (query_cache_size == 0 || thd->variables.query_cache_type == 0)
-
+ if (query_cache_size == 0 || thd->locked_tables ||
+ thd->variables.query_cache_type == 0)
goto err;
/* Check that we haven't forgot to reset the query cache variables */
--- 1.465/sql/sql_parse.cc 2005-08-11 07:29:52 +01:00
+++ 1.466/sql/sql_parse.cc 2005-08-11 12:02:45 +01:00
@@ -5311,10 +5311,12 @@
We set the name of Item to @@session.var_name because that then is used
as the column name in the output.
*/
- var= get_system_var(thd, OPT_SESSION, tmp, null_lex_string);
- end= strxmov(buff, "@@session.", var_name, NullS);
- var->set_name(buff, end-buff, system_charset_info);
- add_item_to_list(thd, var);
+ if ((var= get_system_var(thd, OPT_SESSION, tmp, null_lex_string)))
+ {
+ end= strxmov(buff, "@@session.", var_name, NullS);
+ var->set_name(buff, end-buff, system_charset_info);
+ add_item_to_list(thd, var);
+ }
DBUG_VOID_RETURN;
}
@@ -6464,11 +6466,13 @@
THR_LOCK_DATA **end_p= lock_p + thd->locked_tables->lock_count;
for (; lock_p < end_p; lock_p++)
+ {
if ((*lock_p)->type == TL_WRITE)
{
my_error(ER_LOCK_OR_ACTIVE_TRANSACTION, MYF(0));
return 1;
}
+ }
}
/*
Writing to the binlog could cause deadlocks, as we don't log
--- 1.48/strings/Makefile.am 2005-08-03 00:19:47 +01:00
+++ 1.49/strings/Makefile.am 2005-08-11 12:18:38 +01:00
@@ -22,7 +22,7 @@
# Exact one of ASSEMBLER_X
if ASSEMBLER_x86
ASRCS = strings-x86.s longlong2str-x86.s my_strtoll10-x86.s
-CSRCS = bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c
strtod.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c ctype.c
ctype-simple.c ctype-mb.c ctype-big5.c ctype-cp932.c ctype-czech.c ctype-eucjpms.c
ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-tis620.c ctype-ujis.c
ctype-utf8.c ctype-ucs2.c ctype-uca.c ctype-win1250ch.c ctype-bin.c ctype-latin1.c
my_vsnprintf.c xml.c decimal.c ctype-extra.c str_alloc.c
+CSRCS = bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c
strtod.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c ctype.c
ctype-simple.c ctype-mb.c ctype-big5.c ctype-cp932.c ctype-czech.c ctype-eucjpms.c
ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-tis620.c ctype-ujis.c
ctype-utf8.c ctype-ucs2.c ctype-uca.c ctype-win1250ch.c ctype-bin.c ctype-latin1.c
my_vsnprintf.c xml.c decimal.c ctype-extra.c str_alloc.c longlong2str_asm.c
else
if ASSEMBLER_sparc32
# These file MUST all be on the same line!! Otherwise automake
@@ -45,7 +45,7 @@
ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-utf8.c \
ctype-ucs2.c ctype-uca.c ctype-tis620.c ctype-ujis.c \
xml.c decimal.c strto.c strings-x86.s \
- longlong2str.c longlong2str-x86.s \
+ longlong2str.c longlong2str-x86.s longlong2str_asm.c \
my_strtoll10.c my_strtoll10-x86.s \
strxmov.c bmove_upp.c strappend.c strcont.c strend.c \
strfill.c strcend.c is_prefix.c strstr.c strinstr.c \
--- 1.124/sql/sql_union.cc 2005-08-07 22:32:25 +01:00
+++ 1.125/sql/sql_union.cc 2005-08-11 12:18:38 +01:00
@@ -289,6 +289,7 @@
List_iterator_fast<Item> tp(types);
Query_arena *arena= thd->current_arena;
Item *type;
+ ulong create_options;
while ((type= tp++))
{
--- 1.121/mysql-test/r/subselect.result 2005-08-07 21:38:36 +01:00
+++ 1.122/mysql-test/r/subselect.result 2005-08-11 12:18:37 +01:00
@@ -2753,7 +2753,28 @@
one two flag
5 6 N
7 8 N
+insert into t2 values (null,null,'N');
+SELECT one,two,ROW(one,two) IN (SELECT one,two FROM t2 WHERE flag = 'N') as 'test' from
t1;
+one two test
+1 2 0
+2 3 0
+3 4 0
+5 6 1
+7 8 1
+SELECT one,two,ROW(one,two) IN (SELECT one,two FROM t2 WHERE flag = 'N' group by one,two)
as 'test' from t1;
+one two test
+1 2 NULL
+2 3 NULL
+3 4 NULL
+5 6 1
+7 8 1
DROP TABLE t1,t2;
+CREATE TABLE t1 (a char(5), b char(5));
+INSERT INTO t1 VALUES (NULL,'aaa'), ('aaa','aaa');
+SELECT * FROM t1 WHERE (a,b) IN (('aaa','aaa'), ('aaa','bbb'));
+a b
+aaa aaa
+DROP TABLE t1;
create table t1 (df decimal(5,1));
insert into t1 values(1.1);
insert into t1 values(2.2);
--- 1.104/mysql-test/t/subselect.test 2005-08-07 21:23:53 +01:00
+++ 1.105/mysql-test/t/subselect.test 2005-08-11 12:18:37 +01:00
@@ -1773,7 +1773,22 @@
SELECT * FROM t1
WHERE ROW(one,two) IN (SELECT DISTINCT one,two FROM t1 WHERE flag = 'N');
+insert into t2 values (null,null,'N');
+SELECT one,two,ROW(one,two) IN (SELECT one,two FROM t2 WHERE flag = 'N') as 'test' from
t1;
+SELECT one,two,ROW(one,two) IN (SELECT one,two FROM t2 WHERE flag = 'N' group by one,two)
as 'test' from t1;
+
DROP TABLE t1,t2;
+
+#
+# Bug #12392: where cond with IN predicate for rows and NULL values in table
+#
+
+CREATE TABLE t1 (a char(5), b char(5));
+INSERT INTO t1 VALUES (NULL,'aaa'), ('aaa','aaa');
+
+SELECT * FROM t1 WHERE (a,b) IN (('aaa','aaa'), ('aaa','bbb'));
+
+DROP TABLE t1;
# End of 4.1 tests
--- 1.17/sql-common/my_time.c 2005-08-07 22:32:25 +01:00
+++ 1.18/sql-common/my_time.c 2005-08-11 12:02:47 +01:00
@@ -197,7 +197,9 @@
If length= 8 or >= 14 then year is of format YYYY.
(YYYY-MM-DD, YYYYMMDD, YYYYYMMDDHHMMSS)
*/
- for (pos=str; pos != end && my_isdigit(&my_charset_latin1,*pos) ; pos++)
+ for (pos=str;
+ pos != end && (my_isdigit(&my_charset_latin1,*pos) || *pos == 'T');
+ pos++)
;
digits= (uint) (pos-str);
@@ -263,7 +265,7 @@
const char *start= str;
ulong tmp_value= (uint) (uchar) (*str++ - '0');
while (str != end && my_isdigit(&my_charset_latin1,str[0]) &&
- --field_length)
+ (!is_internal_format || --field_length))
{
tmp_value=tmp_value*10 + (ulong) (uchar) (*str - '0');
str++;
--- 1.27/mysql-test/r/bigint.result 2005-04-30 01:14:38 +01:00
+++ 1.28/mysql-test/r/bigint.result 2005-08-11 12:18:37 +01:00
@@ -17,6 +17,15 @@
select -(0-3),round(-(0-3)), round(9999999999999999999);
-(0-3) round(-(0-3)) round(9999999999999999999)
3 3 9999999999999999999
+select
1,11,101,1001,10001,100001,1000001,10000001,100000001,1000000001,10000000001,100000000001,1000000000001,10000000000001,100000000000001,1000000000000001,10000000000000001,100000000000000001,1000000000000000001,10000000000000000001;
+1 11 101 1001 10001 100001 1000001 10000001 100000001 1000000001 10000000001 100000000001 1000000000001 10000000000001 100000000000001 1000000000000001 10000000000000001 100000000000000001 1000000000000000001 10000000000000000001
+1 11 101 1001 10001 100001 1000001 10000001 100000001 1000000001 10000000001 100000000001 1000000000001 10000000000001 100000000000001 1000000000000001 10000000000000001 100000000000000001 1000000000000000001 10000000000000000001
+select
-1,-11,-101,-1001,-10001,-100001,-1000001,-10000001,-100000001,-1000000001,-10000000001,-100000000001,-1000000000001,-10000000000001,-100000000000001,-1000000000000001,-10000000000000001,-100000000000000001,-1000000000000000001,-10000000000000000001;
+-1 -11 -101 -1001 -10001 -100001 -1000001 -10000001 -100000001 -1000000001 -10000000001 -100000000001 -1000000000001 -10000000000001 -100000000000001 -1000000000000001 -10000000000000001 -100000000000000001 -1000000000000000001 -10000000000000000001
+-1 -11 -101 -1001 -10001 -100001 -1000001 -10000001 -100000001 -1000000001 -10000000001 -100000000001 -1000000000001 -10000000000001 -100000000000001 -1000000000000001 -10000000000000001 -100000000000000001 -1000000000000000001 -10000000000000000000
+select
conv(1,10,16),conv((1<<2)-1,10,16),conv((1<<10)-2,10,16),conv((1<<16)-3,10,16),conv((1<<25)-4,10,16),conv((1<<31)-5,10,16),conv((1<<36)-6,10,16),conv((1<<47)-7,10,16),conv((1<<48)-8,10,16),conv((1<<55)-9,10,16),conv((1<<56)-10,10,16),conv((1<<63)-11,10,16);
+conv(1,10,16) conv((1<<2)-1,10,16) conv((1<<10)-2,10,16) conv((1<<16)-3,10,16) conv((1<<25)-4,10,16) conv((1<<31)-5,10,16) conv((1<<36)-6,10,16) conv((1<<47)-7,10,16) conv((1<<48)-8,10,16) conv((1<<55)-9,10,16) conv((1<<56)-10,10,16) conv((1<<63)-11,10,16)
+1 3 3FE FFFD 1FFFFFC 7FFFFFFB FFFFFFFFA 7FFFFFFFFFF9 FFFFFFFFFFF8 7FFFFFFFFFFFF7 FFFFFFFFFFFFF6 7FFFFFFFFFFFFFF5
create table t1 (a bigint unsigned not null, primary key(a));
insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE),
(18446744073709551613), (18446744073709551612);
select * from t1;
--- 1.28/mysql-test/r/type_datetime.result 2005-08-07 22:32:24 +01:00
+++ 1.29/mysql-test/r/type_datetime.result 2005-08-11 12:02:40 +01:00
@@ -26,6 +26,8 @@
test.t1 check status OK
delete from t1;
insert into t1
values("000101"),("691231"),("700101"),("991231"),("00000101"),("00010101"),("99991231"),("00101000000"),("691231000000"),("700101000000"),("991231235959"),("10000101000000"),("99991231235959"),("20030100000000"),("20030000000000");
+insert into t1 values ("2003-003-03");
+insert into t1 values ("20030102T131415"),("2001-01-01T01:01:01"), ("2001-1-1T1:01:01");
select * from t1;
t
2000-01-01 00:00:00
@@ -43,6 +45,17 @@
9999-12-31 23:59:59
2003-01-00 00:00:00
2003-00-00 00:00:00
+2003-03-03 00:00:00
+2003-01-02 13:14:15
+2001-01-01 01:01:01
+2001-01-01 01:01:01
+truncate table t1;
+insert into t1 values("2003-0303 12:13:14");
+Warnings:
+Warning 1264 Data truncated; out of range for column 't' at row 1
+select * from t1;
+t
+0000-00-00 00:00:00
drop table t1;
CREATE TABLE t1 (a timestamp, b date, c time, d datetime);
insert into t1 (b,c,d) values(now(),curtime(),now());
@@ -152,14 +165,4 @@
2000-00-00 01:00:00
0000-00-00 00:00:00
0000-00-00 00:00:00
-drop table t1;
-create table t1 (dt datetime);
-insert into t1 values ("20010101T010101");
-insert into t1 values ("2001-01-01T01:01:01");
-insert into t1 values ("2001-1-1T1:01:01");
-select * from t1;
-dt
-2001-01-01 01:01:01
-2001-01-01 01:01:01
-2001-01-01 01:01:01
drop table t1;
--- 1.24/mysql-test/t/bigint.test 2005-07-28 15:09:48 +01:00
+++ 1.25/mysql-test/t/bigint.test 2005-08-11 12:02:40 +01:00
@@ -14,6 +14,9 @@
select cast(9223372036854775808 as unsigned)+1;
select 9223372036854775808+1;
select -(0-3),round(-(0-3)), round(9999999999999999999);
+select
1,11,101,1001,10001,100001,1000001,10000001,100000001,1000000001,10000000001,100000000001,1000000000001,10000000000001,100000000000001,1000000000000001,10000000000000001,100000000000000001,1000000000000000001,10000000000000000001;
+select
-1,-11,-101,-1001,-10001,-100001,-1000001,-10000001,-100000001,-1000000001,-10000000001,-100000000001,-1000000000001,-10000000000001,-100000000000001,-1000000000000001,-10000000000000001,-100000000000000001,-1000000000000000001,-10000000000000000001;
+select
conv(1,10,16),conv((1<<2)-1,10,16),conv((1<<10)-2,10,16),conv((1<<16)-3,10,16),conv((1<<25)-4,10,16),conv((1<<31)-5,10,16),conv((1<<36)-6,10,16),conv((1<<47)-7,10,16),conv((1<<48)-8,10,16),conv((1<<55)-9,10,16),conv((1<<56)-10,10,16),conv((1<<63)-11,10,16);
#
# In 3.23 we have to disable the test of column to bigint as
--- 1.104/mysql-test/r/func_str.result 2005-07-22 20:32:27 +01:00
+++ 1.105/mysql-test/r/func_str.result 2005-08-11 12:02:40 +01:00
@@ -45,6 +45,123 @@
select substring_index('.tcx.se','.',-2),substring_index('.tcx.se','.tcx',-1);
substring_index('.tcx.se','.',-2) substring_index('.tcx.se','.tcx',-1)
tcx.se .se
+select substring_index('aaaaaaaaa1','a',1);
+substring_index('aaaaaaaaa1','a',1)
+
+select substring_index('aaaaaaaaa1','aa',1);
+substring_index('aaaaaaaaa1','aa',1)
+
+select substring_index('aaaaaaaaa1','aa',2);
+substring_index('aaaaaaaaa1','aa',2)
+aa
+select substring_index('aaaaaaaaa1','aa',3);
+substring_index('aaaaaaaaa1','aa',3)
+aaaa
+select substring_index('aaaaaaaaa1','aa',4);
+substring_index('aaaaaaaaa1','aa',4)
+aaaaaa
+select substring_index('aaaaaaaaa1','aa',5);
+substring_index('aaaaaaaaa1','aa',5)
+aaaaaaaaa1
+select substring_index('aaaaaaaaa1','aaa',1);
+substring_index('aaaaaaaaa1','aaa',1)
+
+select substring_index('aaaaaaaaa1','aaa',2);
+substring_index('aaaaaaaaa1','aaa',2)
+aaa
+select substring_index('aaaaaaaaa1','aaa',3);
+substring_index('aaaaaaaaa1','aaa',3)
+aaaaaa
+select substring_index('aaaaaaaaa1','aaa',4);
+substring_index('aaaaaaaaa1','aaa',4)
+aaaaaaaaa1
+select substring_index('aaaaaaaaa1','aaaa',1);
+substring_index('aaaaaaaaa1','aaaa',1)
+
+select substring_index('aaaaaaaaa1','aaaa',2);
+substring_index('aaaaaaaaa1','aaaa',2)
+aaaa
+select substring_index('aaaaaaaaa1','1',1);
+substring_index('aaaaaaaaa1','1',1)
+aaaaaaaaa
+select substring_index('aaaaaaaaa1','a',-1);
+substring_index('aaaaaaaaa1','a',-1)
+1
+select substring_index('aaaaaaaaa1','aa',-1);
+substring_index('aaaaaaaaa1','aa',-1)
+1
+select substring_index('aaaaaaaaa1','aa',-2);
+substring_index('aaaaaaaaa1','aa',-2)
+aa1
+select substring_index('aaaaaaaaa1','aa',-3);
+substring_index('aaaaaaaaa1','aa',-3)
+aaaa1
+select substring_index('aaaaaaaaa1','aa',-4);
+substring_index('aaaaaaaaa1','aa',-4)
+aaaaaa1
+select substring_index('aaaaaaaaa1','aa',-5);
+substring_index('aaaaaaaaa1','aa',-5)
+aaaaaaaaa1
+select substring_index('aaaaaaaaa1','aaa',-1);
+substring_index('aaaaaaaaa1','aaa',-1)
+1
+select substring_index('aaaaaaaaa1','aaa',-2);
+substring_index('aaaaaaaaa1','aaa',-2)
+aaa1
+select substring_index('aaaaaaaaa1','aaa',-3);
+substring_index('aaaaaaaaa1','aaa',-3)
+aaaaaa1
+select substring_index('aaaaaaaaa1','aaa',-4);
+substring_index('aaaaaaaaa1','aaa',-4)
+
+select substring_index('the king of thethe hill','the',-2);
+substring_index('the king of thethe hill','the',-2)
+the hill
+select substring_index('the king of the the hill','the',-2);
+substring_index('the king of the the hill','the',-2)
+ the hill
+select substring_index('the king of the the hill','the',-2);
+substring_index('the king of the the hill','the',-2)
+ the hill
+select substring_index('the king of the the hill',' the ',-1);
+substring_index('the king of the the hill',' the ',-1)
+hill
+select substring_index('the king of the the hill',' the ',-2);
+substring_index('the king of the the hill',' the ',-2)
+ the hill
+select substring_index('the king of the the hill',' ',-1);
+substring_index('the king of the the hill',' ',-1)
+hill
+select substring_index('the king of the the hill',' ',-2);
+substring_index('the king of the the hill',' ',-2)
+the hill
+select substring_index('the king of the the hill',' ',-3);
+substring_index('the king of the the hill',' ',-3)
+ the hill
+select substring_index('the king of the the hill',' ',-4);
+substring_index('the king of the the hill',' ',-4)
+the the hill
+select substring_index('the king of the the hill',' ',-5);
+substring_index('the king of the the hill',' ',-5)
+of the the hill
+select substring_index('the king of the.the hill','the',-2);
+substring_index('the king of the.the hill','the',-2)
+.the hill
+select substring_index('the king of thethethe.the hill','the',-3);
+substring_index('the king of thethethe.the hill','the',-3)
+the.the hill
+select substring_index('the king of thethethe.the hill','the',-1);
+substring_index('the king of thethethe.the hill','the',-1)
+ hill
+select substring_index('the king of the the hill','the',1);
+substring_index('the king of the the hill','the',1)
+
+select substring_index('the king of the the hill','the',2);
+substring_index('the king of the the hill','the',2)
+the king of
+select substring_index('the king of the the hill','the',3);
+substring_index('the king of the the hill','the',3)
+the king of the
select concat(':',ltrim(' left '),':',rtrim(' right '),':');
concat(':',ltrim(' left '),':',rtrim(' right '),':')
:left : right:
--- 1.79/mysql-test/t/func_str.test 2005-07-28 14:12:33 +01:00
+++ 1.80/mysql-test/t/func_str.test 2005-08-11 12:02:41 +01:00
@@ -23,6 +23,45 @@
select substring_index('www.tcx.se','.',-2),substring_index('www.tcx.se','.',1);
select substring_index('www.tcx.se','tcx',1),substring_index('www.tcx.se','tcx',-1);
select substring_index('.tcx.se','.',-2),substring_index('.tcx.se','.tcx',-1);
+select substring_index('aaaaaaaaa1','a',1);
+select substring_index('aaaaaaaaa1','aa',1);
+select substring_index('aaaaaaaaa1','aa',2);
+select substring_index('aaaaaaaaa1','aa',3);
+select substring_index('aaaaaaaaa1','aa',4);
+select substring_index('aaaaaaaaa1','aa',5);
+select substring_index('aaaaaaaaa1','aaa',1);
+select substring_index('aaaaaaaaa1','aaa',2);
+select substring_index('aaaaaaaaa1','aaa',3);
+select substring_index('aaaaaaaaa1','aaa',4);
+select substring_index('aaaaaaaaa1','aaaa',1);
+select substring_index('aaaaaaaaa1','aaaa',2);
+select substring_index('aaaaaaaaa1','1',1);
+select substring_index('aaaaaaaaa1','a',-1);
+select substring_index('aaaaaaaaa1','aa',-1);
+select substring_index('aaaaaaaaa1','aa',-2);
+select substring_index('aaaaaaaaa1','aa',-3);
+select substring_index('aaaaaaaaa1','aa',-4);
+select substring_index('aaaaaaaaa1','aa',-5);
+select substring_index('aaaaaaaaa1','aaa',-1);
+select substring_index('aaaaaaaaa1','aaa',-2);
+select substring_index('aaaaaaaaa1','aaa',-3);
+select substring_index('aaaaaaaaa1','aaa',-4);
+select substring_index('the king of thethe hill','the',-2);
+select substring_index('the king of the the hill','the',-2);
+select substring_index('the king of the the hill','the',-2);
+select substring_index('the king of the the hill',' the ',-1);
+select substring_index('the king of the the hill',' the ',-2);
+select substring_index('the king of the the hill',' ',-1);
+select substring_index('the king of the the hill',' ',-2);
+select substring_index('the king of the the hill',' ',-3);
+select substring_index('the king of the the hill',' ',-4);
+select substring_index('the king of the the hill',' ',-5);
+select substring_index('the king of the.the hill','the',-2);
+select substring_index('the king of thethethe.the hill','the',-3);
+select substring_index('the king of thethethe.the hill','the',-1);
+select substring_index('the king of the the hill','the',1);
+select substring_index('the king of the the hill','the',2);
+select substring_index('the king of the the hill','the',3);
select concat(':',ltrim(' left '),':',rtrim(' right '),':');
select concat(':',trim(leading from ' left '),':',trim(trailing from ' right '),':');
--- 1.91/myisam/ft_boolean_search.c 2005-06-20 23:02:41 +01:00
+++ 1.92/myisam/ft_boolean_search.c 2005-08-11 12:02:39 +01:00
@@ -221,6 +221,7 @@
MI_INFO *info=ftb->info;
uint off, extra=HA_FT_WLEN+info->s->base.rec_reflength;
byte *lastkey_buf=ftbw->word+ftbw->off;
+ LINT_INIT(off);
LINT_INIT(off);
if (ftbw->flags & FTB_FLAG_TRUNC)
--- 1.153/client/mysqltest.c 2005-08-03 00:27:58 +01:00
+++ 1.154/client/mysqltest.c 2005-08-11 12:02:39 +01:00
@@ -2781,6 +2781,7 @@
if (!disable_result_log)
{
ulong affected_rows; /* Ok to be undef if 'disable_info' is set */
+ LINT_INIT(affected_rows);
if (res)
{
--- 1.151/tests/mysql_client_test.c 2005-08-10 15:36:03 +01:00
+++ 1.152/tests/mysql_client_test.c 2005-08-11 12:18:38 +01:00
@@ -7195,7 +7195,7 @@
}
}
-#endif
+#endif /* EMBEDDED_LIBRARY */
/*
Test a crash when invalid/corrupted .frm is used in the
| Thread |
|---|
| • bk commit into 5.0 tree (acurtis:1.1979) | antony | 11 Aug |