mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
fixed bug of unchecked random part of WHERE clause (bug #142)
mysql-test/r/select.result: test of random WHERE clause mysql-test/t/select.test: test of random WHERE clause sql/sql_select.cc: fixed bug of unchecked random part of WHERE clause
This commit is contained in:
parent
312f0366bc
commit
8162aec6b9
3 changed files with 19 additions and 1 deletions
|
|
@ -1712,8 +1712,23 @@ show full columns from t2 from test like 'f%';
|
|||
show full columns from t2 from test like 's%';
|
||||
show keys from t2;
|
||||
|
||||
#
|
||||
# random in WHERE clause
|
||||
#
|
||||
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (
|
||||
id mediumint(8) unsigned NOT NULL auto_increment,
|
||||
pseudo varchar(35) NOT NULL default '',
|
||||
PRIMARY KEY (id),
|
||||
UNIQUE KEY pseudo (pseudo)
|
||||
);
|
||||
INSERT INTO t1 (pseudo) VALUES ('test');
|
||||
INSERT INTO t1 (pseudo) VALUES ('test1');
|
||||
SELECT 1 from t1 where rand() > 2;
|
||||
|
||||
#
|
||||
# Drop the test tables
|
||||
#
|
||||
|
||||
drop table t4, t3,t2, t1;
|
||||
drop table t4, t3, t2, t1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue