diff options
| author | Nils Adermann <naderman@naderman.de> | 2010-05-14 02:17:45 +0200 |
|---|---|---|
| committer | Nils Adermann <naderman@naderman.de> | 2010-05-14 02:17:45 +0200 |
| commit | 8196d7d7113b45b52b8316849b2db5355de43429 (patch) | |
| tree | ec2107b2216b07bf118adc2c0c1258885cde765c /phpBB/includes | |
| parent | 528816dcbd23ace73d0d269844eaadd6630c9463 (diff) | |
| parent | 9ce0873bd1dadac9ebd1a74d857f71c43166fa05 (diff) | |
| download | forums-8196d7d7113b45b52b8316849b2db5355de43429.tar forums-8196d7d7113b45b52b8316849b2db5355de43429.tar.gz forums-8196d7d7113b45b52b8316849b2db5355de43429.tar.bz2 forums-8196d7d7113b45b52b8316849b2db5355de43429.tar.xz forums-8196d7d7113b45b52b8316849b2db5355de43429.zip | |
Merge branch 'ticket/bantu/9514' into develop-olympus
* ticket/bantu/9514:
[ticket/9514] Correctly delete big datasets when deleting a forum including topics/posts on non-MySQL databases.
Diffstat (limited to 'phpBB/includes')
| -rw-r--r-- | phpBB/includes/acp/acp_forums.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php index 5a5adc57ae..54bf905374 100644 --- a/phpBB/includes/acp/acp_forums.php +++ b/phpBB/includes/acp/acp_forums.php @@ -1705,6 +1705,9 @@ class acp_forums ) ); + // Amount of rows we select and delete in one iteration. + $batch_size = 500; + foreach ($tables_ary as $field => $tables) { $start = 0; @@ -1714,7 +1717,7 @@ class acp_forums $sql = "SELECT $field FROM " . POSTS_TABLE . ' WHERE forum_id = ' . $forum_id; - $result = $db->sql_query_limit($sql, 500, $start); + $result = $db->sql_query_limit($sql, $batch_size, $start); $ids = array(); while ($row = $db->sql_fetchrow($result)) @@ -1733,7 +1736,7 @@ class acp_forums } } } - while ($row); + while (sizeof($ids) == $batch_size); } unset($ids); |
