Commit a1a05ac8 authored by unknown's avatar unknown
Browse files

Merge bk-internal.mysql.com:/home/bk/mysql-5.0

into  mysql.com:/opt/local/work/mysql-5.0-root

parents 51b60984 841f71b1
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -1869,6 +1869,16 @@ static void net_clear_error(NET *net)
  }
}

static void stmt_clear_error(MYSQL_STMT *stmt)
{
  if (stmt->last_errno)
  {
    stmt->last_errno= 0;
    stmt->last_error[0]= '\0';
    strmov(stmt->sqlstate, not_error_sqlstate);
  }
}

/*
  Set statement error code, sqlstate, and error message
  from given errcode and sqlstate.
@@ -4959,6 +4969,7 @@ static my_bool reset_stmt_handle(MYSQL_STMT *stmt, uint flags)
          stmt->state= MYSQL_STMT_INIT_DONE;
          return 1;
        }
        stmt_clear_error(stmt);
      }
    }
    stmt->state= MYSQL_STMT_PREPARE_DONE;
+74 −0
Original line number Diff line number Diff line
@@ -86,3 +86,77 @@ a rel
1	1
2	2
drop table t1;
CREATE TABLE t1 (
id int(11) NOT NULL auto_increment,
thread int(11) NOT NULL default '0',
beitrag longtext NOT NULL,
PRIMARY KEY  (id),
KEY thread (thread),
FULLTEXT KEY beitrag (beitrag)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=7923 ;
CREATE TABLE t2 (
id int(11) NOT NULL auto_increment,
text varchar(100) NOT NULL default '',
PRIMARY KEY  (id),
KEY text (text)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=63 ;
CREATE TABLE t3 (
id int(11) NOT NULL auto_increment,
forum int(11) NOT NULL default '0',
betreff varchar(70) NOT NULL default '',
PRIMARY KEY  (id),
KEY forum (forum),
FULLTEXT KEY betreff (betreff)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=996 ;
select a.text, b.id, b.betreff
from 
t2 a inner join t3 b on a.id = b.forum inner join
t1 c on b.id = c.thread
where 
match(b.betreff) against ('+abc' in boolean mode)
group by a.text, b.id, b.betreff
union
select a.text, b.id, b.betreff
from 
t2 a inner join t3 b on a.id = b.forum inner join
t1 c on b.id = c.thread
where 
match(c.beitrag) against ('+abc' in boolean mode)
group by 
a.text, b.id, b.betreff
order by 
match(b.betreff) against ('+abc' in boolean mode) desc;
ERROR 42S02: Unknown table 'b' in order clause
select a.text, b.id, b.betreff
from 
t2 a inner join t3 b on a.id = b.forum inner join
t1 c on b.id = c.thread
where 
match(b.betreff) against ('+abc' in boolean mode)
union
select a.text, b.id, b.betreff
from 
t2 a inner join t3 b on a.id = b.forum inner join
t1 c on b.id = c.thread
where 
match(c.beitrag) against ('+abc' in boolean mode)
order by 
match(b.betreff) against ('+abc' in boolean mode) desc;
ERROR 42S02: Unknown table 'b' in order clause
select a.text, b.id, b.betreff
from 
t2 a inner join t3 b on a.id = b.forum inner join
t1 c on b.id = c.thread
where 
match(b.betreff) against ('+abc' in boolean mode)
union
select a.text, b.id, b.betreff
from 
t2 a inner join t3 b on a.id = b.forum inner join
t1 c on b.id = c.thread
where 
match(c.beitrag) against ('+abc' in boolean mode)
order by 
match(betreff) against ('+abc' in boolean mode) desc;
text	id	betreff
drop table t1,t2,t3;
+10 −10
Original line number Diff line number Diff line
@@ -77,8 +77,8 @@ def test t9 t9 c25 c25 252 65535 4 Y 144 0 63
def	test	t9	t9	c26	c26	252	65535	4	Y	16	0	8
def	test	t9	t9	c27	c27	252	16777215	10	Y	144	0	63
def	test	t9	t9	c28	c28	252	16777215	10	Y	16	0	8
def	test	t9	t9	c29	c29	252	16777215	8	Y	144	0	63
def	test	t9	t9	c30	c30	252	16777215	8	Y	16	0	8
def	test	t9	t9	c29	c29	252	4294967295	8	Y	144	0	63
def	test	t9	t9	c30	c30	252	4294967295	8	Y	16	0	8
def	test	t9	t9	c31	c31	254	5	3	Y	256	0	8
def	test	t9	t9	c32	c32	254	24	7	Y	2048	0	8
c1	c2	c3	c4	c5	c6	c7	c8	c9	c10	c11	c12	c13	c14	c15	c16	c17	c18	c19	c20	c21	c22	c23	c24	c25	c26	c27	c28	c29	c30	c31	c32
@@ -1810,17 +1810,17 @@ def test t5 t5 param02 param02 246 67 32 Y 0 30 63
def	test	t5	t5	const03	const03	5	17	1	N	32769	31	63
def	test	t5	t5	param03	param03	5	23	1	Y	32768	31	63
def	test	t5	t5	const04	const04	253	3	3	N	1	0	8
def	test	t5	t5	param04	param04	252	16777215	3	Y	16	0	8
def	test	t5	t5	param04	param04	252	4294967295	3	Y	16	0	8
def	test	t5	t5	const05	const05	253	3	3	N	129	0	63
def	test	t5	t5	param05	param05	252	16777215	3	Y	144	0	63
def	test	t5	t5	param05	param05	252	4294967295	3	Y	144	0	63
def	test	t5	t5	const06	const06	253	10	10	N	1	0	8
def	test	t5	t5	param06	param06	252	16777215	10	Y	16	0	8
def	test	t5	t5	param06	param06	252	4294967295	10	Y	16	0	8
def	test	t5	t5	const07	const07	10	10	10	Y	128	0	63
def	test	t5	t5	param07	param07	252	16777215	10	Y	144	0	63
def	test	t5	t5	param07	param07	252	4294967295	10	Y	144	0	63
def	test	t5	t5	const08	const08	253	19	19	N	1	0	8
def	test	t5	t5	param08	param08	252	16777215	19	Y	16	0	8
def	test	t5	t5	param08	param08	252	4294967295	19	Y	16	0	8
def	test	t5	t5	const09	const09	12	19	19	Y	128	0	63
def	test	t5	t5	param09	param09	252	16777215	19	Y	144	0	63
def	test	t5	t5	param09	param09	252	4294967295	19	Y	144	0	63
def	test	t5	t5	const10	const10	3	10	9	N	32769	0	63
def	test	t5	t5	param10	param10	8	20	9	Y	32768	0	63
def	test	t5	t5	const11	const11	3	4	4	Y	32768	0	63
@@ -1828,8 +1828,8 @@ def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
def	test	t5	t5	const12	const12	254	0	0	Y	128	0	63
def	test	t5	t5	param12	param12	8	20	0	Y	32768	0	63
def	test	t5	t5	param13	param13	246	67	0	Y	0	30	63
def	test	t5	t5	param14	param14	252	16777215	0	Y	16	0	8
def	test	t5	t5	param15	param15	252	16777215	0	Y	144	0	63
def	test	t5	t5	param14	param14	252	4294967295	0	Y	16	0	8
def	test	t5	t5	param15	param15	252	4294967295	0	Y	144	0	63
const01	8
param01	8
const02	8.0
+10 −10
Original line number Diff line number Diff line
@@ -77,8 +77,8 @@ def test t9 t9 c25 c25 252 65535 4 Y 144 0 63
def	test	t9	t9	c26	c26	252	65535	4	Y	16	0	8
def	test	t9	t9	c27	c27	252	16777215	10	Y	144	0	63
def	test	t9	t9	c28	c28	252	16777215	10	Y	16	0	8
def	test	t9	t9	c29	c29	252	16777215	8	Y	144	0	63
def	test	t9	t9	c30	c30	252	16777215	8	Y	16	0	8
def	test	t9	t9	c29	c29	252	4294967295	8	Y	144	0	63
def	test	t9	t9	c30	c30	252	4294967295	8	Y	16	0	8
def	test	t9	t9	c31	c31	254	5	3	Y	256	0	8
def	test	t9	t9	c32	c32	254	24	7	Y	2048	0	8
c1	c2	c3	c4	c5	c6	c7	c8	c9	c10	c11	c12	c13	c14	c15	c16	c17	c18	c19	c20	c21	c22	c23	c24	c25	c26	c27	c28	c29	c30	c31	c32
@@ -1793,17 +1793,17 @@ def test t5 t5 param02 param02 246 67 32 Y 0 30 63
def	test	t5	t5	const03	const03	5	17	1	N	32769	31	63
def	test	t5	t5	param03	param03	5	23	1	Y	32768	31	63
def	test	t5	t5	const04	const04	253	3	3	N	1	0	8
def	test	t5	t5	param04	param04	252	16777215	3	Y	16	0	8
def	test	t5	t5	param04	param04	252	4294967295	3	Y	16	0	8
def	test	t5	t5	const05	const05	253	3	3	N	129	0	63
def	test	t5	t5	param05	param05	252	16777215	3	Y	144	0	63
def	test	t5	t5	param05	param05	252	4294967295	3	Y	144	0	63
def	test	t5	t5	const06	const06	253	10	10	N	1	0	8
def	test	t5	t5	param06	param06	252	16777215	10	Y	16	0	8
def	test	t5	t5	param06	param06	252	4294967295	10	Y	16	0	8
def	test	t5	t5	const07	const07	10	10	10	Y	128	0	63
def	test	t5	t5	param07	param07	252	16777215	10	Y	144	0	63
def	test	t5	t5	param07	param07	252	4294967295	10	Y	144	0	63
def	test	t5	t5	const08	const08	253	19	19	N	1	0	8
def	test	t5	t5	param08	param08	252	16777215	19	Y	16	0	8
def	test	t5	t5	param08	param08	252	4294967295	19	Y	16	0	8
def	test	t5	t5	const09	const09	12	19	19	Y	128	0	63
def	test	t5	t5	param09	param09	252	16777215	19	Y	144	0	63
def	test	t5	t5	param09	param09	252	4294967295	19	Y	144	0	63
def	test	t5	t5	const10	const10	3	10	9	N	32769	0	63
def	test	t5	t5	param10	param10	8	20	9	Y	32768	0	63
def	test	t5	t5	const11	const11	3	4	4	Y	32768	0	63
@@ -1811,8 +1811,8 @@ def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
def	test	t5	t5	const12	const12	254	0	0	Y	128	0	63
def	test	t5	t5	param12	param12	8	20	0	Y	32768	0	63
def	test	t5	t5	param13	param13	246	67	0	Y	0	30	63
def	test	t5	t5	param14	param14	252	16777215	0	Y	16	0	8
def	test	t5	t5	param15	param15	252	16777215	0	Y	144	0	63
def	test	t5	t5	param14	param14	252	4294967295	0	Y	16	0	8
def	test	t5	t5	param15	param15	252	4294967295	0	Y	144	0	63
const01	8
param01	8
const02	8.0
+8 −8
Original line number Diff line number Diff line
@@ -1794,17 +1794,17 @@ def test t5 t5 param02 param02 246 67 32 Y 0 30 63
def	test	t5	t5	const03	const03	5	17	1	N	32769	31	63
def	test	t5	t5	param03	param03	5	23	1	Y	32768	31	63
def	test	t5	t5	const04	const04	253	3	3	N	1	0	8
def	test	t5	t5	param04	param04	252	16777215	3	Y	16	0	8
def	test	t5	t5	param04	param04	252	4294967295	3	Y	16	0	8
def	test	t5	t5	const05	const05	253	3	3	N	129	0	63
def	test	t5	t5	param05	param05	252	16777215	3	Y	144	0	63
def	test	t5	t5	param05	param05	252	4294967295	3	Y	144	0	63
def	test	t5	t5	const06	const06	253	10	10	N	1	0	8
def	test	t5	t5	param06	param06	252	16777215	10	Y	16	0	8
def	test	t5	t5	param06	param06	252	4294967295	10	Y	16	0	8
def	test	t5	t5	const07	const07	10	10	10	Y	128	0	63
def	test	t5	t5	param07	param07	252	16777215	10	Y	144	0	63
def	test	t5	t5	param07	param07	252	4294967295	10	Y	144	0	63
def	test	t5	t5	const08	const08	253	19	19	N	1	0	8
def	test	t5	t5	param08	param08	252	16777215	19	Y	16	0	8
def	test	t5	t5	param08	param08	252	4294967295	19	Y	16	0	8
def	test	t5	t5	const09	const09	12	19	19	Y	128	0	63
def	test	t5	t5	param09	param09	252	16777215	19	Y	144	0	63
def	test	t5	t5	param09	param09	252	4294967295	19	Y	144	0	63
def	test	t5	t5	const10	const10	3	10	9	N	32769	0	63
def	test	t5	t5	param10	param10	8	20	9	Y	32768	0	63
def	test	t5	t5	const11	const11	3	4	4	Y	32768	0	63
@@ -1812,8 +1812,8 @@ def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
def	test	t5	t5	const12	const12	254	0	0	Y	128	0	63
def	test	t5	t5	param12	param12	8	20	0	Y	32768	0	63
def	test	t5	t5	param13	param13	246	67	0	Y	0	30	63
def	test	t5	t5	param14	param14	252	16777215	0	Y	16	0	8
def	test	t5	t5	param15	param15	252	16777215	0	Y	144	0	63
def	test	t5	t5	param14	param14	252	4294967295	0	Y	16	0	8
def	test	t5	t5	param15	param15	252	4294967295	0	Y	144	0	63
const01	8
param01	8
const02	8.0
Loading