diff options
author | Marc Alexander <admin@m-a-styles.de> | 2017-12-31 14:00:36 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2018-01-01 18:57:50 +0100 |
commit | ee8b72d733a3e096f35ec65a7eaf3c63a237cb4b (patch) | |
tree | 92bea6ae93a3f3d9c90523256c80b07c496a903e /phpBB/phpbb/db/tools/mssql.php | |
parent | d99ef034463ec94739026ca5154e597db77df8a9 (diff) | |
download | forums-ee8b72d733a3e096f35ec65a7eaf3c63a237cb4b.tar forums-ee8b72d733a3e096f35ec65a7eaf3c63a237cb4b.tar.gz forums-ee8b72d733a3e096f35ec65a7eaf3c63a237cb4b.tar.bz2 forums-ee8b72d733a3e096f35ec65a7eaf3c63a237cb4b.tar.xz forums-ee8b72d733a3e096f35ec65a7eaf3c63a237cb4b.zip |
[ticket/15055] Properly support index length check on mssql
PHPBB3-15055
Diffstat (limited to 'phpBB/phpbb/db/tools/mssql.php')
-rw-r--r-- | phpBB/phpbb/db/tools/mssql.php | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/phpBB/phpbb/db/tools/mssql.php b/phpBB/phpbb/db/tools/mssql.php index 1e4d3aee2f..b84c0db403 100644 --- a/phpBB/phpbb/db/tools/mssql.php +++ b/phpBB/phpbb/db/tools/mssql.php @@ -545,10 +545,7 @@ class mssql extends tools { $statements = array(); - if ($this->mssql_is_sql_server_2000()) - { - $this->check_index_name_length($table_name, $index_name); - } + $this->check_index_name_length($table_name, $index_name); // remove index length $column = preg_replace('#:.*$#', '', $column); @@ -559,6 +556,21 @@ class mssql extends tools } /** + * {@inheritdoc} + */ + protected function get_max_index_name_length() + { + if ($this->mssql_is_sql_server_2000()) + { + return parent::get_max_index_name_length(); + } + else + { + return 128; + } + } + + /** * {@inheritDoc} */ function sql_list_index($table_name) |