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:
unknown 2003-03-11 18:34:00 +02:00
commit 8162aec6b9
3 changed files with 19 additions and 1 deletions

View file

@ -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;