aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/db/tools
diff options
context:
space:
mode:
authorDavid Colón <david@davidiq.com>2017-01-26 18:44:18 -0500
committerDavid Colón <david@davidiq.com>2017-01-26 18:44:18 -0500
commit2416a743f51dd5b995bb2bf1d6316f347fa0000e (patch)
tree4b2817713f73e5c316455fdc417bd17d948ab46b /phpBB/phpbb/db/tools
parentfae78b4c011de598e4e05e26ff3129610ae087a0 (diff)
downloadforums-2416a743f51dd5b995bb2bf1d6316f347fa0000e.tar
forums-2416a743f51dd5b995bb2bf1d6316f347fa0000e.tar.gz
forums-2416a743f51dd5b995bb2bf1d6316f347fa0000e.tar.bz2
forums-2416a743f51dd5b995bb2bf1d6316f347fa0000e.tar.xz
forums-2416a743f51dd5b995bb2bf1d6316f347fa0000e.zip
[ticket/15047] Reinstate length check for MSSQL 2000
Diffstat (limited to 'phpBB/phpbb/db/tools')
-rw-r--r--phpBB/phpbb/db/tools/mssql.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/phpBB/phpbb/db/tools/mssql.php b/phpBB/phpbb/db/tools/mssql.php
index 81e7424136..d31aa2ba0b 100644
--- a/phpBB/phpbb/db/tools/mssql.php
+++ b/phpBB/phpbb/db/tools/mssql.php
@@ -524,6 +524,11 @@ class mssql extends tools
{
$statements = array();
+ if ($this->is_sql_server_2000())
+ {
+ $this->check_index_name_length($table_name, $index_name);
+ }
+
$statements[] = 'CREATE UNIQUE INDEX [' . $index_name . '] ON [' . $table_name . ']([' . implode('], [', $column) . '])';
return $this->_sql_run_sql($statements);
@@ -536,6 +541,11 @@ class mssql extends tools
{
$statements = array();
+ if ($this->is_sql_server_2000())
+ {
+ $this->check_index_name_length($table_name, $index_name);
+ }
+
// remove index length
$column = preg_replace('#:.*$#', '', $column);
@@ -702,7 +712,7 @@ class mssql extends tools
$is_identity = $this->db->sql_fetchfield('is_identity');
$this->db->sql_freeresult($result);
- return (bool)$is_identity;
+ return (bool) $is_identity;
}
/**