change the method of rewriting ALTER query to support ADD INDEX without index name, and the method of removing index hinting to support IGNORE and FORCE
git-svn-id: https://plugins.svn.wordpress.org/sqlite-integration/trunk@752352 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
parent
4147af7334
commit
aa897ce408
|
@ -286,7 +286,7 @@ class PDOSQLiteDriver {
|
|||
* @return void
|
||||
*/
|
||||
private function _delete_index_hints(){
|
||||
$pattern = '/use\s+index\s*\(.*?\)/i';
|
||||
$pattern = '/\\s*(use|ignore|force)\\s+index\\s*\(.*?\)/i';
|
||||
$this->_query = preg_replace($pattern, '', $this->_query);
|
||||
}
|
||||
|
||||
|
|
|
@ -84,7 +84,11 @@ class AlterQuery {
|
|||
$tokens['column_name'] = '('.trim($col_name).')';
|
||||
} elseif (in_array($match_2, array('index', 'key'))) {
|
||||
$tokens['command'] = $match_1.' '.$match_2;
|
||||
if ($match_3 == '') {
|
||||
$tokens['index_name'] = str_replace(array('(', ')'), '', $the_rest);
|
||||
} else {
|
||||
$tokens['index_name'] = $match_3;
|
||||
}
|
||||
$tokens['column_name'] = trim($the_rest);
|
||||
} else {
|
||||
$tokens['command'] = $match_1.' column';
|
||||
|
|
|
@ -46,7 +46,7 @@ Please contact us with the methods below:
|
|||
|
||||
Post to [Support Forum](http://wordpress.org/support/plugin/sqlite-integration/).
|
||||
|
||||
Notes: WordPress.org doesn't officially support using any other database than MySQL. So there will be no supports from WordPress.org. Even if you post to the general Forum, you have few chances to get the answer. And if you use patched plugins, you will have be no support from the plugin authors, eithter.
|
||||
Notes: WordPress.org doesn't officially support using any other database than MySQL. So there will be no supports from WordPress.org. Even if you post to the general Forum, you have few chances to get the answer. And if you use patched plugins, you will have no support from the plugin authors, eithter.
|
||||
|
||||
= Translation =
|
||||
|
||||
|
|
Loading…
Reference in New Issue