summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--system/database/drivers/mssql/mssql_forge.php1
-rw-r--r--system/database/drivers/sqlsrv/sqlsrv_forge.php1
-rw-r--r--user_guide_src/source/changelog.rst4
3 files changed, 4 insertions, 2 deletions
diff --git a/system/database/drivers/mssql/mssql_forge.php b/system/database/drivers/mssql/mssql_forge.php
index 3708c2233..5454e37b3 100644
--- a/system/database/drivers/mssql/mssql_forge.php
+++ b/system/database/drivers/mssql/mssql_forge.php
@@ -67,6 +67,7 @@ class CI_DB_mssql_forge extends CI_DB_forge {
else
{
$attributes = array_change_key_case($attributes, CASE_UPPER);
+ $attributes['TYPE'] = preg_replace('/(INT)\(\d+\)/i', '$1', $attributes['TYPE']);
$sql .= "\n\t".$this->db->escape_identifiers($field).' '.$attributes['TYPE'];
diff --git a/system/database/drivers/sqlsrv/sqlsrv_forge.php b/system/database/drivers/sqlsrv/sqlsrv_forge.php
index 1529b2a21..bd107476e 100644
--- a/system/database/drivers/sqlsrv/sqlsrv_forge.php
+++ b/system/database/drivers/sqlsrv/sqlsrv_forge.php
@@ -67,6 +67,7 @@ class CI_DB_sqlsrv_forge extends CI_DB_forge {
else
{
$attributes = array_change_key_case($attributes, CASE_UPPER);
+ $attributes['TYPE'] = preg_replace('/(INT)\(\d+\)/i', '$1', $attributes['TYPE']);
$sql .= "\n\t".$this->db->escape_identifiers($field).' '.$attributes['TYPE'];
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index a7bf6fa6e..942a52cdf 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -172,7 +172,7 @@ Bug fixes for 3.0
- Fixed a bug (#797) - timespan() was using incorrect seconds for year and month.
- Fixed a bug in CI_Cart::contents() where if called without a TRUE (or equal) parameter, it would fail due to a typo.
- Fixed a bug (#696) - make oci_execute() calls inside num_rows() non-committing, since they are only there to reset which row is next in line for oci_fetch calls and thus don't need to be committed.
-- Fixed a bug (#406) - sqlsrv DB driver not returning resource on ``db_pconnect()``.
+- Fixed a bug (#406) - SQLSRV DB driver not returning resource on ``db_pconnect()``.
- Fixed a bug in CI_Image_lib::gd_loaded() where it was possible for the script execution to end or a PHP E_WARNING message to be emitted.
- Fixed a bug in the :doc:`Pagination library <libraries/pagination>` where when use_page_numbers=TRUE previous link and page 1 link did not have the same url.
- Fixed a bug (#561) - Errors in :doc:`XML-RPC Library <libraries/xmlrpc>` were not properly escaped.
@@ -230,7 +230,7 @@ Bug fixes for 3.0
- Fixed a bug (#121) - ``CI_DB_result::row()`` returned an array when there's no actual result to be returned.
- Fixed a bug (#319) - SQLSRV's affected_rows() method failed due to a scrollable cursor being created for write-type queries.
- Fixed a bug (#356) - PostgreSQL driver didn't have an _update_batch() method, which resulted in fatal error being triggered when update_batch() is used with it.
-- Fixed a bug (#862) - create_table() failed on SQLSRV/MSSQL when used with 'IF NOT EXISTS'.
+- Fixed a bug (#784, #862) - create_table() failed on SQLSRV/MSSQL when used with 'IF NOT EXISTS'.
- Fixed a bug (#1419) - libraries/Driver.php had a static variable that was causing an error.
- Fixed a bug (#1411) - the :doc:`Email library <libraries/email>` used its own short list of MIMEs instead the one from config/mimes.php.
- Fixed a bug where the magic_quotes_runtime setting wasn't turned off for PHP 5.3 (where it is indeed deprecated, but not non-existent).