#2353 - Index length support
| Identifier | #2353 |
|---|---|
| Issue type | Feature request or suggestion |
| Title | Index length support |
| Status | Closed (rejected) |
| Handling member | Chris Graham |
| Addon | core_database_drivers |
| Description | Allow varchar indexes to be given a length, via a new parameter to create_index(). Have a supports_index_lengths() function.
|
| Steps to reproduce | |
| Additional information | Allows us to cleanup any code where we are doing like this...
if (substr(get_db_type(), 0, 5) == 'mysql') { $GLOBALS['SITE_DB']->create_index('translate', 'equiv_lang', array('text_original(4)')); $GLOBALS['SITE_DB']->create_index('translate', 'decache', array('text_parsed(2)')); } to... if ($GLOBALS['SITE_DB']->supports_index_lengths()) { $GLOBALS['SITE_DB']->create_index('translate', 'equiv_lang', array('text_original'), 4); $GLOBALS['SITE_DB']->create_index('translate', 'decache', array('text_parsed'), 2); } |
| Funded? | No |
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".
Comments
We are assuming index lengths are supported in the API, then stripping them out for non-MySQL, or skipping making the index completely for problematic cases.