~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/insert_select.test

  • Committer: Monty Taylor
  • Date: 2009-04-14 19:16:51 UTC
  • mto: (997.2.5 mordred)
  • mto: This revision was merged to the branch mainline in revision 994.
  • Revision ID: mordred@inaugust.com-20090414191651-ltbww6hpqks8k7qk
Clarified instructions in README.

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 TEMPORARY TABLE `t1` (
 
24
CREATE 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 TEMPORARY TABLE `t2` (
 
40
CREATE 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
 
);
 
162
) ENGINE=MyISAM;
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;
235
235
 
236
236
flush status;
237
237
INSERT INTO t1 SELECT a + 2 FROM t1 LIMIT 1;
238
 
--replace_column 2 #
239
238
show status like 'Handler_read%';
240
239
 
241
240
DROP TABLE t1;
353
352
--echo #
354
353
create table t1(f1 int);
355
354
insert into t1 values(1),(2),(3);
356
 
create temporary table t2 (key(f1)) engine=myisam select sql_buffer_result f1 from t1;
357
 
check table t2;
 
355
create table t2 (key(f1)) engine=myisam select sql_buffer_result f1 from t1;
 
356
check table t2 extended;
358
357
drop table t1,t2;
359
358
--echo ##################################################################
360
359