Bug #9290 TRUNCATE a TEMPORARY table has no effect in 4.1.8-nt (4.1.10/Linux works)
Submitted: 18 Mar 2005 23:23 Modified: 18 Mar 2005 23:36
Reporter: Bob Stein (Candidate Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:4.1.8 OS:Windows (Windows 2000)
Assigned to: CPU Architecture:Any

[18 Mar 2005 23:23] Bob Stein
Description:
Works on non-temporary tables
Works on all tables in 4.1.10-standard, Apache on Linux

How to repeat:
Example:

  create temporary table t (i int);
  insert t(i) values(99);
  select * from t;
  truncate table t;
  select * from t;

And it's not empty!

  delete from t;
  select * from t;

Does empty it correctly.
[18 Mar 2005 23:36] MySQL Verification Team
The today server 4.1.10 not presents the behavior reported:

c:\mysql\bin>mysql -uroot test
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.1.10-nt

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>  create temporary table t (i int);
Query OK, 0 rows affected (0.07 sec)

mysql>   insert t(i) values(99);
Query OK, 1 row affected (0.03 sec)

mysql>   select * from t;
+------+
| i    |
+------+
|   99 |
+------+
1 row in set (0.00 sec)

mysql>   truncate table t;
Query OK, 0 rows affected (0.02 sec)

mysql>   select * from t;
Empty set (0.01 sec)

Please upgrade.
Thank you for the bug report.