From 0a4dd844b8a3d6edb7712d3bb4edf1b4f0e9dc4c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 16 Sep 2016 12:06:40 +0300 Subject: [ci skip] Don't try to insert_batch() when we know it's not supported on Firebird --- system/database/drivers/ibase/ibase_driver.php | 17 +++++++++++++++++ .../drivers/pdo/subdrivers/pdo_firebird_driver.php | 16 ++++++++++++++++ user_guide_src/source/changelog.rst | 1 + 3 files changed, 34 insertions(+) diff --git a/system/database/drivers/ibase/ibase_driver.php b/system/database/drivers/ibase/ibase_driver.php index c1055c1e6..671a353bc 100644 --- a/system/database/drivers/ibase/ibase_driver.php +++ b/system/database/drivers/ibase/ibase_driver.php @@ -383,6 +383,23 @@ class CI_DB_ibase_driver extends CI_DB { // -------------------------------------------------------------------- + /** + * Insert batch statement + * + * Generates a platform-specific insert string from the supplied data. + * + * @param string $table Table name + * @param array $keys INSERT keys + * @param array $values INSERT values + * @return string|bool + */ + protected function _insert_batch($table, $keys, $values) + { + return ($this->db->db_debug) ? $this->db->display_error('db_unsupported_feature') : FALSE; + } + + // -------------------------------------------------------------------- + /** * Close DB Connection * diff --git a/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php b/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php index 96dcc5ec1..7811d3da4 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php @@ -260,4 +260,20 @@ class CI_DB_pdo_firebird_driver extends CI_DB_pdo_driver { return preg_replace('`SELECT`i', 'SELECT '.$select, $sql); } + // -------------------------------------------------------------------- + + /** + * Insert batch statement + * + * Generates a platform-specific insert string from the supplied data. + * + * @param string $table Table name + * @param array $keys INSERT keys + * @param array $values INSERT values + * @return string|bool + */ + protected function _insert_batch($table, $keys, $values) + { + return ($this->db->db_debug) ? $this->db->display_error('db_unsupported_feature') : FALSE; + } } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 2c8a131ff..d99e44276 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -26,6 +26,7 @@ Bug fixes for 3.1.1 - Fixed a bug (#4787) - :doc:`Form Validation Library ` method ``valid_email()`` triggered ``E_WARNING`` when input emails have empty domain names. - Fixed a bug (#4805) - :doc:`Database ` driver 'mysqli' didn't use the ``MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT`` flag properly. - Fixed a bug (#4808) - :doc:`Database ` method ``is_write_type()`` only looked at the first line of a queries using ``RETURNING`` with the 'postgre', 'pdo/pgsql', 'odbc' and 'pdo/odbc' drivers. +- Fixed a bug where :doc:`Query Builder ` method ``insert_batch()`` tried to execute an unsupported SQL query with the 'ibase' and 'pdo/firebird' drivers. Version 3.1.0 ============= -- cgit v1.2.3-24-g4f1b