~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/insert_select.test

  • Committer: Brian Aker
  • Date: 2009-07-12 00:49:18 UTC
  • mfrom: (1063.9.51 brian-tmp-fix)
  • Revision ID: brian@gaz-20090712004918-chprmyj387ex6l8a
Merge Stewart

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
# test case by Fournier Jocelyn <joc@presence-pc.com>
22
22
#
23
23
 
24
 
CREATE TABLE `t1` (
 
24
CREATE TEMPORARY TABLE `t1` (
25
25
  `numeropost` bigint NOT NULL default '0',
26
26
  `icone` int NOT NULL default '0',
27
27
  `numreponse` bigint NOT NULL auto_increment,
37
37
  KEY `numreponse` (`numreponse`)
38
38
) ENGINE=MyISAM;
39
39
 
40
 
CREATE TABLE `t2` (
 
40
CREATE TEMPORARY TABLE `t2` (
41
41
  `numeropost` bigint NOT NULL default '0',
42
42
  `icone` int NOT NULL default '0',
43
43
  `numreponse` bigint NOT NULL auto_increment,
159
159
  SEQ          int NOT NULL default '0',
160
160
  PRIMARY KEY  (ID),
161
161
  KEY t1$NO    (SEQ,NO)
162
 
) ENGINE=MyISAM;
 
162
);
163
163
INSERT INTO t1 (SEQ, NO) SELECT "1" AS SEQ, IF(MAX(NO) IS NULL, 0, MAX(NO)) + 1 AS NO FROM t1 WHERE (SEQ = 1);
164
164
select SQL_BUFFER_RESULT * from t1 WHERE (SEQ = 1);
165
165
drop table t1;
352
352
--echo #
353
353
create table t1(f1 int);
354
354
insert into t1 values(1),(2),(3);
355
 
create table t2 (key(f1)) engine=myisam select sql_buffer_result f1 from t1;
 
355
create temporary table t2 (key(f1)) engine=myisam select sql_buffer_result f1 from t1;
356
356
check table t2 extended;
357
357
drop table t1,t2;
358
358
--echo ##################################################################