Remove temporary table from comment.install
chx - November 6, 2007 - 18:13
| Project: | Drupal |
| Version: | 6.x-dev |
| Component: | comment.module |
| Category: | task |
| Priority: | critical |
| Assigned: | chx |
| Status: | closed |
Jump to:
Description
http://dev.mysql.com/doc/refman/4.1/en/insert-select.html
Prior to MySQL 4.0.14, the target table of the INSERT statement cannot appear in the FROM clause of the SELECT part of the query. This limitation is lifted in 4.0.14.
We require MySQL 4.1.
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| db_temp_table_joins_lock_table_in_the_grave.patch | 962 bytes | Ignored | None | None |

#1
#189832 was duplicate, yay!
#2
Make perfect sense to me; I wasn't even aware of that limitation in pre 4.1 MySQL.
#3
disabled comment module.
Posted a node - no record made in node_comment_statistics
applied the patch
enabled comment module
node_comment_statistics was updated, and the values were all fine.
Bye bye then.
#4
To continue the quote from MySQL manual
I just tested that INSERT...SELECT works into the same table with just INSERT and SELECT grants. So while the manual says there is a temporary table being made that's behind the scenes, somewhat similar to the well known fact that some ordinary SELECTs result in a temporary table (and when those get on disk, your performance plumets).
#5
Who tested this on PostgreSQL?
#6
Me.
test=# create table boo (foo int);CREATE TABLE
test=# insert into boo values (1);
INSERT 0 1
test=# insert into boo values (2);
INSERT 0 1
test=# insert into boo select * from boo;
INSERT 0 2
test=# select * from boo;
foo
-----
1
2
1
2
(4 rows)
#7
OK, committed, thanks.
#8
Automatically closed -- issue fixed for two weeks with no activity.