Commit 5858a8cd authored by unknown's avatar unknown

Merge mysql.com:/opt/local/work/mysql-4.1-root

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


mysql-test/r/ps_2myisam.result:
  Auto merged
mysql-test/r/ps_3innodb.result:
  Auto merged
mysql-test/r/ps_4heap.result:
  Auto merged
mysql-test/r/ps_5merge.result:
  Auto merged
mysql-test/r/ps_6bdb.result:
  Auto merged
mysql-test/r/ps_7ndb.result:
  Auto merged
sql/field.cc:
  manual merge
tests/mysql_client_test.c:
  manual merge
mysql-test/r/select.result:
  manual merge
mysql-test/t/select.test:
  manual merge
sql/sql_select.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
parents 20d8170a 69ecbbcb
......@@ -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;
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -120,8 +120,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
......@@ -1730,17 +1730,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
......@@ -1748,8 +1748,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
......@@ -3132,8 +3132,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
......@@ -4742,17 +4742,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
......@@ -4760,8 +4760,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
......
......@@ -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
......
......@@ -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
......
......@@ -2711,3 +2711,38 @@ DROP TABLE t1,t2;
select x'10' + 0, X'10' + 0, b'10' + 0, B'10' + 0;
x'10' + 0 X'10' + 0 b'10' + 0 B'10' + 0
16 16 2 2
CREATE TABLE t1 (
acct_id int(11) NOT NULL default '0',
profile_id smallint(6) default NULL,
UNIQUE KEY t1$acct_id (acct_id),
KEY t1$profile_id (profile_id)
);
INSERT INTO t1 VALUES (132,17),(133,18);
CREATE TABLE t2 (
profile_id smallint(6) default NULL,
queue_id int(11) default NULL,
seq int(11) default NULL,
KEY t2$queue_id (queue_id)
);
INSERT INTO t2 VALUES (17,31,4),(17,30,3),(17,36,2),(17,37,1);
CREATE TABLE t3 (
id int(11) NOT NULL default '0',
qtype int(11) default NULL,
seq int(11) default NULL,
warn_lvl int(11) default NULL,
crit_lvl int(11) default NULL,
rr1 tinyint(4) NOT NULL default '0',
rr2 int(11) default NULL,
default_queue tinyint(4) NOT NULL default '0',
KEY t3$qtype (qtype),
KEY t3$id (id)
);
INSERT INTO t3 VALUES (30,1,29,NULL,NULL,0,NULL,0),(31,1,28,NULL,NULL,0,NULL,0),
(36,1,34,NULL,NULL,0,NULL,0),(37,1,35,NULL,NULL,0,121,0);
SELECT COUNT(*) FROM t1 a STRAIGHT_JOIN t2 pq STRAIGHT_JOIN t3 q
WHERE
(pq.profile_id = a.profile_id) AND (a.acct_id = 132) AND
(pq.queue_id = q.id) AND (q.rr1 <> 1);
COUNT(*)
4
drop table t1,t2,t3;
......@@ -54,3 +54,84 @@ SELECT a, MATCH (message) AGAINST ('t* f*' IN BOOLEAN MODE) as rel FROM t1;
SELECT a, MATCH (message) AGAINST ('t* f*' IN BOOLEAN MODE) as rel FROM t1 ORDER BY rel,a;
drop table t1;
# BUG#11869
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 ;
--error 1109
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 1109
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;
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;
drop table t1,t2,t3;
......@@ -2290,3 +2290,43 @@ DROP TABLE t1,t2;
#
select x'10' + 0, X'10' + 0, b'10' + 0, B'10' + 0;
# Test for BUG#11700
CREATE TABLE t1 (
acct_id int(11) NOT NULL default '0',
profile_id smallint(6) default NULL,
UNIQUE KEY t1$acct_id (acct_id),
KEY t1$profile_id (profile_id)
);
INSERT INTO t1 VALUES (132,17),(133,18);
CREATE TABLE t2 (
profile_id smallint(6) default NULL,
queue_id int(11) default NULL,
seq int(11) default NULL,
KEY t2$queue_id (queue_id)
);
INSERT INTO t2 VALUES (17,31,4),(17,30,3),(17,36,2),(17,37,1);
CREATE TABLE t3 (
id int(11) NOT NULL default '0',
qtype int(11) default NULL,
seq int(11) default NULL,
warn_lvl int(11) default NULL,
crit_lvl int(11) default NULL,
rr1 tinyint(4) NOT NULL default '0',
rr2 int(11) default NULL,
default_queue tinyint(4) NOT NULL default '0',
KEY t3$qtype (qtype),
KEY t3$id (id)
);
INSERT INTO t3 VALUES (30,1,29,NULL,NULL,0,NULL,0),(31,1,28,NULL,NULL,0,NULL,0),
(36,1,34,NULL,NULL,0,NULL,0),(37,1,35,NULL,NULL,0,121,0);
SELECT COUNT(*) FROM t1 a STRAIGHT_JOIN t2 pq STRAIGHT_JOIN t3 q
WHERE
(pq.profile_id = a.profile_id) AND (a.acct_id = 132) AND
(pq.queue_id = q.id) AND (q.rr1 <> 1);
drop table t1,t2,t3;
......@@ -47,6 +47,8 @@ uchar Field_null::null[1]={1};
const char field_separator=',';
#define DOUBLE_TO_STRING_CONVERSION_BUFFER_SIZE 320
#define BLOB_PACK_LENGTH_TO_MAX_LENGH(arg) \
((ulong) ((LL(1) << min(arg, 4) * 8) - LL(1)))
/*
Rules for merging different types of fields in UNION
......@@ -6696,7 +6698,7 @@ Field_blob::Field_blob(char *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg,
enum utype unireg_check_arg, const char *field_name_arg,
struct st_table *table_arg,uint blob_pack_length,
CHARSET_INFO *cs)
:Field_longstr(ptr_arg, (1L << min(blob_pack_length,3)*8)-1L,
:Field_longstr(ptr_arg, BLOB_PACK_LENGTH_TO_MAX_LENGH(blob_pack_length),
null_ptr_arg, null_bit_arg, unireg_check_arg, field_name_arg,
table_arg, cs),
packlength(blob_pack_length)
......
......@@ -4395,6 +4395,9 @@ bool Item_func_match::fix_index()
if (key == NO_SUCH_KEY)
return 0;
if (!table)
goto err;
for (keynr=0 ; keynr < table->s->keys ; keynr++)
{
......
......@@ -5169,11 +5169,17 @@ static void add_not_null_conds(JOIN *join)
DBUG_ASSERT(item->type() == Item::FIELD_ITEM);
Item_field *not_null_item= (Item_field*)item;
JOIN_TAB *referred_tab= not_null_item->field->table->reginfo.join_tab;
Item_func_isnotnull *notnull;
Item *notnull;
if (!(notnull= new Item_func_isnotnull(not_null_item)))
DBUG_VOID_RETURN;
notnull->quick_fix_field();
/*
We need to do full fix_fields() call here in order to have correct
notnull->const_item(). This is needed e.g. by test_quick_select
when it is called from make_join_select after this function is
called.
*/
if (notnull->fix_fields(join->thd, join->tables_list, &notnull))
DBUG_VOID_RETURN;
DBUG_EXECUTE("where",print_where(notnull,
referred_tab->table->alias););
add_cond_and_fix(&referred_tab->select_cond, notnull);
......
......@@ -698,7 +698,7 @@ static void verify_prepare_field(MYSQL_RES *result,
fprintf(stdout, "\n org_table:`%s`\t(expected: `%s`)",
field->org_table, org_table);
fprintf(stdout, "\n database :`%s`\t(expected: `%s`)", field->db, db);
fprintf(stdout, "\n length :`%ld`\t(expected: `%ld`)",
fprintf(stdout, "\n length :`%lu`\t(expected: `%lu`)",
field->length, length * cs->mbmaxlen);
fprintf(stdout, "\n maxlength:`%ld`", field->max_length);
fprintf(stdout, "\n charsetnr:`%d`", field->charsetnr);
......@@ -13634,6 +13634,31 @@ static void test_client_character_set()
myquery(rc);
}
/* Test correct max length for MEDIUMTEXT and LONGTEXT columns */
static void test_bug9735()
{
MYSQL_RES *res;
int rc;
myheader("test_bug9735");
rc= mysql_query(mysql, "drop table if exists t1");
myquery(rc);
rc= mysql_query(mysql, "create table t1 (a mediumtext, b longtext) "
"character set latin1");
myquery(rc);
rc= mysql_query(mysql, "select * from t1");
myquery(rc);
res= mysql_store_result(mysql);
verify_prepare_field(res, 0, "a", "a", MYSQL_TYPE_BLOB,
"t1", "t1", current_db, (1U << 24)-1, 0);
verify_prepare_field(res, 1, "b", "b", MYSQL_TYPE_BLOB,
"t1", "t1", current_db, ~0U, 0);
mysql_free_result(res);
rc= mysql_query(mysql, "drop table t1");
myquery(rc);
}
/*
Read and parse arguments and MySQL options from my.cnf
......@@ -13876,6 +13901,7 @@ static struct my_tests_st my_tests[]= {
{ "test_bug11172", test_bug11172 },
{ "test_bug11656", test_bug11656 },
{ "test_bug10214", test_bug10214 },
{ "test_bug9735", test_bug9735 },
{ 0, 0 }
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment