Bug #49174 | Possible documentation bug for CREATE [TEMPORARY] TABLE | ||
---|---|---|---|
Submitted: | 28 Nov 2009 4:39 | Modified: | 28 Nov 2009 4:51 |
Reporter: | Roel Van de Paar | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Documentation | Severity: | S3 (Non-critical) |
Version: | 5.1.4 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[28 Nov 2009 4:39]
Roel Van de Paar
[28 Nov 2009 4:43]
Roel Van de Paar
Verifying as D2 (Behavior contrary to documentation) Same on Linux: mysql> SHOW GLOBAL VARIABLES LIKE 'tmpdir'; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | tmpdir | /tmp | +---------------+-------+ 1 row in set (0.00 sec) --- roel@roel-ubuntu-vm:/tmp$ ls \#* ls: cannot access #*: No such file or directory --- mysql> CREATE TEMPORARY TABLE TESTDISK (ID INT) ENGINE=MYISAM; Query OK, 0 rows affected (0.00 sec) --- roel@roel-ubuntu-vm:/tmp$ ls -l \#sql* -rw-rw---- 1 roel roel 8556 2009-11-28 15:36 #sqlc4c_1_0.frm -rw-rw---- 1 roel roel 0 2009-11-28 15:36 #sqlc4c_1_0.MYD -rw-rw---- 1 roel roel 1024 2009-11-28 15:36 #sqlc4c_1_0.MYI
[28 Nov 2009 4:51]
Roel Van de Paar
Realized that the documentation means 'when a transaction has begun, and CREATE TEMPORARY TABLE is issued, it does not commit'. Interesting to note though is that the files get created immediately: roel@roel-ubuntu-vm:/tmp$ ls -l \#sql* ls: cannot access #sql*: No such file or directory --- mysql> BEGIN; Query OK, 0 rows affected (0.00 sec) mysql> CREATE TEMPORARY TABLE TESTDISK (ID INT) ENGINE=MYISAM; Query OK, 0 rows affected (0.00 sec) --- roel@roel-ubuntu-vm:/tmp$ ls -l \#sql* -rw-rw---- 1 roel roel 8556 2009-11-28 15:45 #sqlc4c_1_1.frm -rw-rw---- 1 roel roel 0 2009-11-28 15:45 #sqlc4c_1_1.MYD -rw-rw---- 1 roel roel 1024 2009-11-28 15:45 #sqlc4c_1_1.MYI