~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/insert_update.result

  • 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:
52
52
SELECT *, VALUES(a) FROM t1;
53
53
a       b       c       VALUES(a)
54
54
1       2       10      NULL
55
 
2       1       11      NULL
56
55
3       4       127     NULL
57
56
5       0       30      NULL
58
57
8       9       60      NULL
 
58
2       1       11      NULL
59
59
explain extended SELECT *, VALUES(a) FROM t1;
60
60
id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
61
61
1       SIMPLE  t1      ALL     NULL    NULL    NULL    NULL    5       100.00  
163
163
SELECT *, VALUES(a) FROM t1;
164
164
a       b       c       VALUES(a)
165
165
1       2       10      NULL
166
 
2       1       11      NULL
167
166
3       4       127     NULL
168
167
5       0       30      NULL
169
168
8       9       60      NULL
 
169
2       1       11      NULL
170
170
DROP TABLE t1;
171
171
DROP TABLE t2;
172
 
create table t1 (a int not null unique);
 
172
create table t1 (a int not null unique) engine=myisam;
173
173
insert into t1 values (1),(2);
174
174
insert ignore into t1 select 1 on duplicate key update a=2;
175
175
select * from t1;
191
191
insert ignore into t1 select a from t1 on duplicate key update a=t1.a+1 ;
192
192
ERROR 23000: Column 't1.a' in field list is ambiguous
193
193
drop table t1;
194
 
CREATE TEMPORARY TABLE t1 (
 
194
CREATE TABLE t1 (
195
195
a BIGINT NOT NULL DEFAULT 0,
196
196
PRIMARY KEY  (a)
197
197
) ENGINE=MyISAM;
328
328
SELECT id, f1 FROM t1;
329
329
id      f1
330
330
1       test1
331
 
REPLACE INTO t1 VALUES (null,"test1",null);
 
331
REPLACE INTO t1 VALUES (0,"test1",null);
332
332
SELECT id, f1 FROM t1;
333
333
id      f1
334
334
2       test1
389
389
id      c1      cnt
390
390
1       0       3
391
391
2       2       1
392
 
DROP TABLE t1,t2;
 
392
DROP TABLE t1;
393
393
create table t1(f1 int primary key,
394
394
f2 timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP);
395
395
insert into t1(f1) values(1);