summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <konstantin@mysql.com>2005-07-14 20:02:32 +0400
committerunknown <konstantin@mysql.com>2005-07-14 20:02:32 +0400
commit5858a8cd42392832a443e19ce12abb8aabad12e6 (patch)
treef9d3af9a30fe2cd38664ddcef3096d663741dc68 /mysql-test
parent20d8170adc735d49acc95981845ebd0844c00653 (diff)
parent69ecbbcbf31aeb5165c9134d8fa1180f42d91da1 (diff)
downloadmariadb-git-5858a8cd42392832a443e19ce12abb8aabad12e6.tar.gz
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
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/fulltext_order_by.result74
-rw-r--r--mysql-test/r/ps_2myisam.result20
-rw-r--r--mysql-test/r/ps_3innodb.result20
-rw-r--r--mysql-test/r/ps_4heap.result16
-rw-r--r--mysql-test/r/ps_5merge.result40
-rw-r--r--mysql-test/r/ps_6bdb.result20
-rw-r--r--mysql-test/r/ps_7ndb.result20
-rw-r--r--mysql-test/r/select.result35
-rw-r--r--mysql-test/t/fulltext_order_by.test81
-rw-r--r--mysql-test/t/select.test40
10 files changed, 298 insertions, 68 deletions
diff --git a/mysql-test/r/fulltext_order_by.result b/mysql-test/r/fulltext_order_by.result
index dc51454f1d5..130d096e00f 100644
--- a/mysql-test/r/fulltext_order_by.result
+++ b/mysql-test/r/fulltext_order_by.result
@@ -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;
diff --git a/mysql-test/r/ps_2myisam.result b/mysql-test/r/ps_2myisam.result
index a9342636349..64dc09f864c 100644
--- a/mysql-test/r/ps_2myisam.result
+++ b/mysql-test/r/ps_2myisam.result
@@ -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
diff --git a/mysql-test/r/ps_3innodb.result b/mysql-test/r/ps_3innodb.result
index 3a470d218d1..792d74231f2 100644
--- a/mysql-test/r/ps_3innodb.result
+++ b/mysql-test/r/ps_3innodb.result
@@ -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
diff --git a/mysql-test/r/ps_4heap.result b/mysql-test/r/ps_4heap.result
index beeaff05ece..7dcb8546a83 100644
--- a/mysql-test/r/ps_4heap.result
+++ b/mysql-test/r/ps_4heap.result
@@ -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
diff --git a/mysql-test/r/ps_5merge.result b/mysql-test/r/ps_5merge.result
index fada983a561..77b1a242452 100644
--- a/mysql-test/r/ps_5merge.result
+++ b/mysql-test/r/ps_5merge.result
@@ -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
diff --git a/mysql-test/r/ps_6bdb.result b/mysql-test/r/ps_6bdb.result
index 404c25c2c37..0489c7ef078 100644
--- a/mysql-test/r/ps_6bdb.result
+++ b/mysql-test/r/ps_6bdb.result
@@ -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
diff --git a/mysql-test/r/ps_7ndb.result b/mysql-test/r/ps_7ndb.result
index ffddec6d5c2..b0049b3e943 100644
--- a/mysql-test/r/ps_7ndb.result
+++ b/mysql-test/r/ps_7ndb.result
@@ -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
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result
index d02c28a0a97..d0503d1b83b 100644
--- a/mysql-test/r/select.result
+++ b/mysql-test/r/select.result
@@ -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;
diff --git a/mysql-test/t/fulltext_order_by.test b/mysql-test/t/fulltext_order_by.test
index 5c1b4127d8c..6894f63fa77 100644
--- a/mysql-test/t/fulltext_order_by.test
+++ b/mysql-test/t/fulltext_order_by.test
@@ -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;
+
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test
index 2e4bb3e13ad..712658a19a6 100644
--- a/mysql-test/t/select.test
+++ b/mysql-test/t/select.test
@@ -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;
+