~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/insert_select.result

  • Committer: Monty
  • Date: 2008-11-07 05:51:15 UTC
  • mto: This revision was merged to the branch mainline in revision 579.
  • Revision ID: mordred@palanthas.inaugust.com-20081107055115-0275gvq62buzls77
Fixed a decimal sign thing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
20
22
22
22
23
23
drop table t1,t2;
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,
28
28
`contenu` text NOT NULL,
29
29
`pseudo` varchar(50) NOT NULL default '',
30
 
`date` datetime,
 
30
`date` datetime NOT NULL default '0000-00-00 00:00:00',
31
31
`ip` bigint NOT NULL default '0',
32
32
`signature` int NOT NULL default '0',
33
33
PRIMARY KEY  (`numeropost`,`numreponse`)
36
36
KEY `pseudo` (`pseudo`),
37
37
KEY `numreponse` (`numreponse`)
38
38
) ENGINE=MyISAM;
39
 
CREATE TEMPORARY TABLE `t2` (
 
39
CREATE TABLE `t2` (
40
40
`numeropost` bigint NOT NULL default '0',
41
41
`icone` int NOT NULL default '0',
42
42
`numreponse` bigint NOT NULL auto_increment,
43
43
`contenu` text NOT NULL,
44
44
`pseudo` varchar(50) NOT NULL default '',
45
 
`date` datetime,
 
45
`date` datetime NOT NULL default '0000-00-00 00:00:00',
46
46
`ip` bigint NOT NULL default '0',
47
47
`signature` int NOT NULL default '0',
48
48
PRIMARY KEY  (`numeropost`,`numreponse`),
130
130
3
131
131
4
132
132
5
133
 
insert into t1 select t2.a from t1,t2 where t1.a > 0;
 
133
insert into t1 select t2.a from t1,t2;
134
134
select * from t1;
135
135
a
136
136
1
613
613
SEQ          int NOT NULL default '0',
614
614
PRIMARY KEY  (ID),
615
615
KEY t1$NO    (SEQ,NO)
616
 
);
 
616
) ENGINE=MyISAM;
617
617
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);
618
618
select SQL_BUFFER_RESULT * from t1 WHERE (SEQ = 1);
619
619
ID      NO      SEQ
686
686
INSERT INTO t1 SELECT a + 2 FROM t1 LIMIT 1;
687
687
show status like 'Handler_read%';
688
688
Variable_name   Value
689
 
Handler_read_first      #
690
 
Handler_read_key        #
691
 
Handler_read_next       #
692
 
Handler_read_prev       #
693
 
Handler_read_rnd        #
694
 
Handler_read_rnd_next   #
 
689
Handler_read_first      1
 
690
Handler_read_key        2
 
691
Handler_read_next       0
 
692
Handler_read_prev       0
 
693
Handler_read_rnd        0
 
694
Handler_read_rnd_next   1
695
695
DROP TABLE t1;
696
696
CREATE TABLE t1 (
697
697
f1 int NOT NULL auto_increment PRIMARY KEY,
787
787
#
788
788
create table t1(f1 int);
789
789
insert into t1 values(1),(2),(3);
790
 
create temporary table t2 (key(f1)) engine=myisam select sql_buffer_result f1 from t1;
791
 
check table t2;
 
790
create table t2 (key(f1)) engine=myisam select sql_buffer_result f1 from t1;
 
791
check table t2 extended;
792
792
Table   Op      Msg_type        Msg_text
793
793
test.t2 check   status  OK
794
794
drop table t1,t2;