~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/key.test

  • Committer: Brian Aker
  • Date: 2008-10-02 19:18:43 UTC
  • mto: (438.4.1 drizzle-clean-code)
  • mto: This revision was merged to the branch mainline in revision 435.
  • Revision ID: brian@tangent.org-20081002191843-tw3nnufik8qwf9rz
Removed UNSIGNED from parser.

Show diffs side-by-side

added added

removed removed

Lines of Context:
161
161
 
162
162
CREATE TABLE t1 (
163
163
  a tinytext NOT NULL,
164
 
  b int(3) unsigned NOT NULL default '0',
 
164
  b int(3) NOT NULL default '0',
165
165
  PRIMARY KEY (a(32),b)
166
166
) ENGINE=MyISAM;
167
167
INSERT INTO t1 VALUES ('a',1),('a',2);
213
213
# Test of key read with primary key (Bug #3497)
214
214
#
215
215
 
216
 
CREATE TABLE t1 (id int unsigned auto_increment, name char(50), primary key (id)) engine=myisam;
 
216
CREATE TABLE t1 (id int auto_increment, name char(50), primary key (id)) engine=myisam;
217
217
insert into t1 (name) values ('a'), ('b'),('c'),('d'),('e'),('f'),('g');
218
218
explain select 1 from t1 where id =2;
219
219
explain select 1 from t1 where id =2 or id=3;
226
226
# Test of problem with key read (Bug #3666)
227
227
#
228
228
 
229
 
CREATE TABLE t1 (numeropost mediumint(8) unsigned NOT NULL default '0', numreponse int(10) unsigned NOT NULL auto_increment, PRIMARY KEY (numeropost,numreponse), UNIQUE KEY numreponse (numreponse));
 
229
CREATE TABLE t1 (numeropost mediumint(8) NOT NULL default '0', numreponse int(10) NOT NULL auto_increment, PRIMARY KEY (numeropost,numreponse), UNIQUE KEY numreponse (numreponse));
230
230
INSERT INTO t1 (numeropost,numreponse) VALUES ('1','1'),('1','2'),('2','3'),('2','4');
231
231
SELECT numeropost FROM t1 WHERE numreponse='1';
232
232
EXPLAIN SELECT numeropost FROM t1 WHERE numreponse='1';