# Testcase derived from NIST
#   user = SUN, table STAFF16
#          schema8
#          cdr001
#
SET STORAGE_ENGINE='Falcon';

--echo #---- Bug 191 ----
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings

# GRADE BIGINT instead of DECIMAL is harmless
eval CREATE TABLE t1 (EMPNUM    CHAR(3) NOT NULL,
       EMPNAME  CHAR(20) DEFAULT NULL,
       GRADE DECIMAL(4) NOT NULL ,
       CITY   CHAR(15), PRIMARY KEY (GRADE));

INSERT INTO t1 (EMPNUM,EMPNAME,GRADE)
       VALUES ('E3','Bill',151);

SELECT * FROM t1;
# !!! I miss the record within the next result set.
SELECT * FROM t1 WHERE GRADE= 151;

# DROP PRIMARY KEY removes the problem
ALTER TABLE t1 DROP PRIMARY KEY;
SELECT * FROM t1;
SELECT * FROM t1 WHERE GRADE= 151;

DROP TABLE t1;

