UPDATE can be TRUNCATE on TEMPORARY TABLE
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Drizzle |
Fix Released
|
Critical
|
Stewart Smith |
Bug Description
drizzle> create temporary table t1 (col1 int not null, col2 char(4) not null, primary key(col1)) engine=memory;
Query OK, 0 rows affected (0 sec)
drizzle> alter table t1 engine=myisam;
Query OK, 0 rows affected (0.03 sec)
Records: 0 Duplicates: 0 Warnings: 0
drizzle> insert into t1 values (1,1),(
Query OK, 5 rows affected (0 sec)
Records: 5 Duplicates: 0 Warnings: 0
drizzle> select * from t1;
+------+------+
| col1 | col2 |
+------+------+
| 1 | 1 |
| 5 | 2 |
| 2 | 3 |
| 3 | 4 |
| 4 | 4 |
+------+------+
5 rows in set (0 sec)
drizzle> update t1 set col2='7' where col1='4';
Query OK, 0 rows affected (0 sec)
Rows matched: 0 Changed: 0 Warnings: 0
drizzle> select * from t1;
Empty set (0 sec)
Related branches
- Jay Pipes (community): Approve
- Diff: None lines
Changed in drizzle: | |
status: | New → Fix Committed |
Changed in drizzle: | |
assignee: | nobody → Stewart Smith (stewart-flamingspork) |
From mix2_myisam in working tree for fixing tests for temp-only myisam:
--- /home/stewart/ drizzle/ brian-tmp- fix/tests/ r/mix2_ myisam. result 2009-06-16 07:37:17.413726871 +0300 drizzle/ brian-tmp- fix/tests/ r/mix2_ myisam. reject 2009-06-16 07:54:30.381725593 +0300
+++ /home/stewart/
@@ -278,27 +278,12 @@
update t1 set col2='7' where col1='4';
select * from t1;
col1 col2
-1 1
-5 2
-2 3
-3 4
-4 7
alter table t1 add co3 int not null;
select * from t1;
col1 col2 co3
-1 1 0
-5 2 0
-2 3 0
-3 4 0
-4 7 0
update t1 set col2='9' where col1='2';
select * from t1;
col1 col2 co3
-1 1 0
-5 2 0
-2 9 0
-3 4 0
-4 7 0
drop table t1;
create TEMPORARY table t1 (a int not null , b int, primary key (a)) engine = MyISAM;
create TEMPORARY table t2 (a int not null , b int, primary key (a)) engine = MEMORY;