Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
a1a05ac8
Commit
a1a05ac8
authored
Jul 14, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/opt/local/work/mysql-5.0-root
parents
51b60984
841f71b1
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
397 additions
and
73 deletions
+397
-73
libmysql/libmysql.c
libmysql/libmysql.c
+11
-0
mysql-test/r/fulltext_order_by.result
mysql-test/r/fulltext_order_by.result
+74
-0
mysql-test/r/ps_2myisam.result
mysql-test/r/ps_2myisam.result
+10
-10
mysql-test/r/ps_3innodb.result
mysql-test/r/ps_3innodb.result
+10
-10
mysql-test/r/ps_4heap.result
mysql-test/r/ps_4heap.result
+8
-8
mysql-test/r/ps_5merge.result
mysql-test/r/ps_5merge.result
+20
-20
mysql-test/r/ps_6bdb.result
mysql-test/r/ps_6bdb.result
+10
-10
mysql-test/r/ps_7ndb.result
mysql-test/r/ps_7ndb.result
+10
-10
mysql-test/r/select.result
mysql-test/r/select.result
+35
-0
mysql-test/t/fulltext_order_by.test
mysql-test/t/fulltext_order_by.test
+81
-0
mysql-test/t/select.test
mysql-test/t/select.test
+40
-0
sql/field.cc
sql/field.cc
+3
-1
sql/item_func.cc
sql/item_func.cc
+3
-0
sql/sql_select.cc
sql/sql_select.cc
+9
-3
tests/mysql_client_test.c
tests/mysql_client_test.c
+73
-1
No files found.
libmysql/libmysql.c
View file @
a1a05ac8
...
...
@@ -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
;
...
...
mysql-test/r/fulltext_order_by.result
View file @
a1a05ac8
...
...
@@ -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;
mysql-test/r/ps_2myisam.result
View file @
a1a05ac8
...
...
@@ -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
1677721
5 8 Y 144 0 63
def test t9 t9 c30 c30 252
1677721
5 8 Y 16 0 8
def test t9 t9 c29 c29 252
429496729
5 8 Y 144 0 63
def test t9 t9 c30 c30 252
429496729
5 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
1677721
5 3 Y 16 0 8
def test t5 t5 param04 param04 252
429496729
5 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
1677721
5 3 Y 144 0 63
def test t5 t5 param05 param05 252
429496729
5 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
1677721
5 10 Y 16 0 8
def test t5 t5 param06 param06 252
429496729
5 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
1677721
5 10 Y 144 0 63
def test t5 t5 param07 param07 252
429496729
5 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
1677721
5 19 Y 16 0 8
def test t5 t5 param08 param08 252
429496729
5 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
1677721
5 19 Y 144 0 63
def test t5 t5 param09 param09 252
429496729
5 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
1677721
5 0 Y 16 0 8
def test t5 t5 param15 param15 252
1677721
5 0 Y 144 0 63
def test t5 t5 param14 param14 252
429496729
5 0 Y 16 0 8
def test t5 t5 param15 param15 252
429496729
5 0 Y 144 0 63
const01 8
param01 8
const02 8.0
...
...
mysql-test/r/ps_3innodb.result
View file @
a1a05ac8
...
...
@@ -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
1677721
5 8 Y 144 0 63
def test t9 t9 c30 c30 252
1677721
5 8 Y 16 0 8
def test t9 t9 c29 c29 252
429496729
5 8 Y 144 0 63
def test t9 t9 c30 c30 252
429496729
5 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
1677721
5 3 Y 16 0 8
def test t5 t5 param04 param04 252
429496729
5 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
1677721
5 3 Y 144 0 63
def test t5 t5 param05 param05 252
429496729
5 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
1677721
5 10 Y 16 0 8
def test t5 t5 param06 param06 252
429496729
5 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
1677721
5 10 Y 144 0 63
def test t5 t5 param07 param07 252
429496729
5 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
1677721
5 19 Y 16 0 8
def test t5 t5 param08 param08 252
429496729
5 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
1677721
5 19 Y 144 0 63
def test t5 t5 param09 param09 252
429496729
5 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
1677721
5 0 Y 16 0 8
def test t5 t5 param15 param15 252
1677721
5 0 Y 144 0 63
def test t5 t5 param14 param14 252
429496729
5 0 Y 16 0 8
def test t5 t5 param15 param15 252
429496729
5 0 Y 144 0 63
const01 8
param01 8
const02 8.0
...
...
mysql-test/r/ps_4heap.result
View file @
a1a05ac8
...
...
@@ -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
1677721
5 3 Y 16 0 8
def test t5 t5 param04 param04 252
429496729
5 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
1677721
5 3 Y 144 0 63
def test t5 t5 param05 param05 252
429496729
5 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
1677721
5 10 Y 16 0 8
def test t5 t5 param06 param06 252
429496729
5 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
1677721
5 10 Y 144 0 63
def test t5 t5 param07 param07 252
429496729
5 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
1677721
5 19 Y 16 0 8
def test t5 t5 param08 param08 252
429496729
5 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
1677721
5 19 Y 144 0 63
def test t5 t5 param09 param09 252
429496729
5 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
1677721
5 0 Y 16 0 8
def test t5 t5 param15 param15 252
1677721
5 0 Y 144 0 63
def test t5 t5 param14 param14 252
429496729
5 0 Y 16 0 8
def test t5 t5 param15 param15 252
429496729
5 0 Y 144 0 63
const01 8
param01 8
const02 8.0
...
...
mysql-test/r/ps_5merge.result
View file @
a1a05ac8
...
...
@@ -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
1677721
5 8 Y 144 0 63
def test t9 t9 c30 c30 252
1677721
5 8 Y 16 0 8
def test t9 t9 c29 c29 252
429496729
5 8 Y 144 0 63
def test t9 t9 c30 c30 252
429496729
5 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
1677721
5 3 Y 16 0 8
def test t5 t5 param04 param04 252
429496729
5 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
1677721
5 3 Y 144 0 63
def test t5 t5 param05 param05 252
429496729
5 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
1677721
5 10 Y 16 0 8
def test t5 t5 param06 param06 252
429496729
5 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
1677721
5 10 Y 144 0 63
def test t5 t5 param07 param07 252
429496729
5 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
1677721
5 19 Y 16 0 8
def test t5 t5 param08 param08 252
429496729
5 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
1677721
5 19 Y 144 0 63
def test t5 t5 param09 param09 252
429496729
5 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
1677721
5 0 Y 16 0 8
def test t5 t5 param15 param15 252
1677721
5 0 Y 144 0 63
def test t5 t5 param14 param14 252
429496729
5 0 Y 16 0 8
def test t5 t5 param15 param15 252
429496729
5 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
1677721
5 8 Y 144 0 63
def test t9 t9 c30 c30 252
1677721
5 8 Y 16 0 8
def test t9 t9 c29 c29 252
429496729
5 8 Y 144 0 63
def test t9 t9 c30 c30 252
429496729
5 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
1677721
5 3 Y 16 0 8
def test t5 t5 param04 param04 252
429496729
5 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
1677721
5 3 Y 144 0 63
def test t5 t5 param05 param05 252
429496729
5 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
1677721
5 10 Y 16 0 8
def test t5 t5 param06 param06 252
429496729
5 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
1677721
5 10 Y 144 0 63
def test t5 t5 param07 param07 252
429496729
5 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
1677721
5 19 Y 16 0 8
def test t5 t5 param08 param08 252
429496729
5 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
1677721
5 19 Y 144 0 63
def test t5 t5 param09 param09 252
429496729
5 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
1677721
5 0 Y 16 0 8
def test t5 t5 param15 param15 252
1677721
5 0 Y 144 0 63
def test t5 t5 param14 param14 252
429496729
5 0 Y 16 0 8
def test t5 t5 param15 param15 252
429496729
5 0 Y 144 0 63
const01 8
param01 8
const02 8.0
...
...
mysql-test/r/ps_6bdb.result
View file @
a1a05ac8
...
...
@@ -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
1677721
5 8 Y 144 0 63
def test t9 t9 c30 c30 252
1677721
5 8 Y 16 0 8
def test t9 t9 c29 c29 252
429496729
5 8 Y 144 0 63
def test t9 t9 c30 c30 252
429496729
5 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
1677721
5 3 Y 16 0 8
def test t5 t5 param04 param04 252
429496729
5 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
1677721
5 3 Y 144 0 63
def test t5 t5 param05 param05 252
429496729
5 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
1677721
5 10 Y 16 0 8
def test t5 t5 param06 param06 252
429496729
5 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
1677721
5 10 Y 144 0 63
def test t5 t5 param07 param07 252
429496729
5 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
1677721
5 19 Y 16 0 8
def test t5 t5 param08 param08 252
429496729
5 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
1677721
5 19 Y 144 0 63
def test t5 t5 param09 param09 252
429496729
5 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
1677721
5 0 Y 16 0 8
def test t5 t5 param15 param15 252
1677721
5 0 Y 144 0 63
def test t5 t5 param14 param14 252
429496729
5 0 Y 16 0 8
def test t5 t5 param15 param15 252
429496729
5 0 Y 144 0 63
const01 8
param01 8
const02 8.0
...
...
mysql-test/r/ps_7ndb.result
View file @
a1a05ac8
...
...
@@ -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
1677721
5 8 Y 144 0 63
def test t9 t9 c30 c30 252
1677721
5 8 Y 16 0 8
def test t9 t9 c29 c29 252
429496729
5 8 Y 144 0 63
def test t9 t9 c30 c30 252
429496729
5 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
1677721
5 3 Y 16 0 8
def test t5 t5 param04 param04 252
429496729
5 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
1677721
5 3 Y 144 0 63
def test t5 t5 param05 param05 252
429496729
5 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
1677721
5 10 Y 16 0 8
def test t5 t5 param06 param06 252
429496729
5 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
1677721
5 10 Y 144 0 63
def test t5 t5 param07 param07 252
429496729
5 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
1677721
5 19 Y 16 0 8
def test t5 t5 param08 param08 252
429496729
5 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
1677721
5 19 Y 144 0 63
def test t5 t5 param09 param09 252
429496729
5 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
1677721
5 0 Y 16 0 8
def test t5 t5 param15 param15 252
1677721
5 0 Y 144 0 63
def test t5 t5 param14 param14 252
429496729
5 0 Y 16 0 8
def test t5 t5 param15 param15 252
429496729
5 0 Y 144 0 63
const01 8
param01 8
const02 8.0
...
...
mysql-test/r/select.result
View file @
a1a05ac8
...
...
@@ -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;
mysql-test/t/fulltext_order_by.test
View file @
a1a05ac8
...
...
@@ -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
;
mysql-test/t/select.test
View file @
a1a05ac8
...
...
@@ -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
;
sql/field.cc
View file @
a1a05ac8
...
...
@@ -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
)
...
...
sql/item_func.cc
View file @
a1a05ac8
...
...
@@ -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
++
)
{
...
...
sql/sql_select.cc
View file @
a1a05ac8
...
...
@@ -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
);
...
...
tests/mysql_client_test.c
View file @
a1a05ac8
...
...
@@ -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 :`%l
d`
\t
(expected: `%ld
`)"
,
fprintf
(
stdout
,
"
\n
length :`%l
u`
\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,76 @@ 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
);
}
/* Bug#11183 "mysql_stmt_reset() doesn't reset information about error" */
static
void
test_bug11183
()
{
int
rc
;
MYSQL_STMT
*
stmt
;
char
bug_statement
[]
=
"insert into t1 values (1)"
;
myheader
(
"test_bug11183"
);
mysql_query
(
mysql
,
"drop table t1 if exists"
);
mysql_query
(
mysql
,
"create table t1 (a int)"
);
stmt
=
mysql_stmt_init
(
mysql
);
DIE_UNLESS
(
stmt
!=
0
);
rc
=
mysql_stmt_prepare
(
stmt
,
bug_statement
,
strlen
(
bug_statement
));
check_execute
(
stmt
,
rc
);
rc
=
mysql_query
(
mysql
,
"drop table t1"
);
myquery
(
rc
);
/* Trying to execute statement that should fail on execute stage */
rc
=
mysql_stmt_execute
(
stmt
);
DIE_UNLESS
(
rc
);
mysql_stmt_reset
(
stmt
);
DIE_UNLESS
(
mysql_stmt_errno
(
stmt
)
==
0
);
mysql_query
(
mysql
,
"create table t1 (a int)"
);
/* Trying to execute statement that should pass ok */
if
(
mysql_stmt_execute
(
stmt
))
{
mysql_stmt_reset
(
stmt
);
DIE_UNLESS
(
mysql_stmt_errno
(
stmt
)
==
0
);
}
mysql_stmt_close
(
stmt
);
rc
=
mysql_query
(
mysql
,
"drop table t1"
);
myquery
(
rc
);
}
/*
Read and parse arguments and MySQL options from my.cnf
...
...
@@ -13876,6 +13946,8 @@ static struct my_tests_st my_tests[]= {
{
"test_bug11172"
,
test_bug11172
},
{
"test_bug11656"
,
test_bug11656
},
{
"test_bug10214"
,
test_bug10214
},
{
"test_bug9735"
,
test_bug9735
},
{
"test_bug11183"
,
test_bug11183
},
{
0
,
0
}
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment