From 1bd13acb753553ed5b9ab54144d0ca6507b031a3 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Wed, 27 Mar 2013 23:37:08 +0100 Subject: [PATCH] [ticket/11469] Use multi insert property from DB. Do not copy value to buffer. PHPBB3-11469 --- phpBB/includes/db/sql_insert_buffer.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/phpBB/includes/db/sql_insert_buffer.php b/phpBB/includes/db/sql_insert_buffer.php index 03c8a875b9..46d397e7b4 100644 --- a/phpBB/includes/db/sql_insert_buffer.php +++ b/phpBB/includes/db/sql_insert_buffer.php @@ -58,9 +58,6 @@ class phpbb_db_sql_insert_buffer /** @var phpbb_db_driver */ protected $db; - /** @var bool */ - protected $db_supports_multi_insert; - /** @var string */ protected $table_name; @@ -78,7 +75,6 @@ class phpbb_db_sql_insert_buffer public function __construct(phpbb_db_driver $db, $table_name, $max_buffered_rows = 500) { $this->db = $db; - $this->db_supports_multi_insert = $db->multi_insert; $this->table_name = $table_name; $this->max_buffered_rows = $max_buffered_rows; } @@ -100,7 +96,7 @@ class phpbb_db_sql_insert_buffer // Flush buffer if it is full or when DB does not support multi inserts. // In the later case, the buffer will always only contain one row. - if (!$this->db_supports_multi_insert || sizeof($this->buffer) >= $this->max_buffered_rows) + if (!$this->db->multi_insert || sizeof($this->buffer) >= $this->max_buffered_rows) { return $this->flush(); }