Add "create table AS" for increased db portability.
authorGreg Sabino Mullane <greg@users.mediawiki.org>
Thu, 9 Nov 2006 01:04:57 +0000 (01:04 +0000)
committerGreg Sabino Mullane <greg@users.mediawiki.org>
Thu, 9 Nov 2006 01:04:57 +0000 (01:04 +0000)
includes/Article.php

index 73f0585..cc2a5d9 100644 (file)
@@ -2458,7 +2458,7 @@ class Article {
                        if ($wgDBtype == 'mysql')
                                $dbw->query("LOCK TABLES $hitcounterTable WRITE");
                        $tabletype = $wgDBtype == 'mysql' ? "ENGINE=HEAP " : '';
-                       $dbw->query("CREATE TEMPORARY TABLE $acchitsTable $tabletype".
+                       $dbw->query("CREATE TEMPORARY TABLE $acchitsTable $tabletype AS".
                                "SELECT hc_id,COUNT(*) AS hc_n FROM $hitcounterTable ".
                                'GROUP BY hc_id');
                        $dbw->query("DELETE FROM $hitcounterTable");