IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 562 | 562 | " |
| 563 | 563 | CREATE TABLE {$wpdb->prefix}spatial_index_test ( |
| 564 | 564 | non_spatial bigint(20) unsigned NOT NULL, |
| 565 | | spatial_value geometrycollection NOT NULL, |
| | 565 | spatial_value geometrycollection NOT NULL SRID 0, |
| 566 | 566 | KEY non_spatial (non_spatial), |
| 567 | 567 | SPATIAL KEY spatial_key (spatial_value) |
| 568 | 568 | ) ENGINE=MyISAM; |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 295 | 295 | |
| 296 | 296 | $current_modes = $wpdb->get_var( 'SELECT @@SESSION.sql_mode;' ); |
| 297 | 297 | |
| 298 | | $new_modes = array( 'IGNORE_SPACE', 'NO_AUTO_CREATE_USER' ); |
| | 298 | $new_modes = array( 'IGNORE_SPACE', 'NO_AUTO_VALUE_ON_ZERO' ); |
| 299 | 299 | |
| 300 | 300 | $wpdb->set_sql_mode( $new_modes ); |
| 301 | 301 | |
| … |
… |
|
| 333 | 333 | |
| 334 | 334 | $current_modes = $wpdb->get_var( 'SELECT @@SESSION.sql_mode;' ); |
| 335 | 335 | |
| 336 | | $new_modes = array( 'IGNORE_SPACE', 'ONLY_FULL_GROUP_BY', 'NO_AUTO_CREATE_USER' ); |
| | 336 | $new_modes = array( 'IGNORE_SPACE', 'STRICT_TRANS_TABLES', 'NO_AUTO_VALUE_ON_ZERO' ); |
| 337 | 337 | |
| 338 | 338 | add_filter( 'incompatible_sql_modes', array( $this, 'filter_allowed_incompatible_sql_mode' ), 1, 1 ); |
| 339 | 339 | $wpdb->set_sql_mode( $new_modes ); |
| 340 | 340 | remove_filter( 'incompatible_sql_modes', array( $this, 'filter_allowed_incompatible_sql_mode' ), 1 ); |
| 341 | 341 | |
| 342 | 342 | $check_new_modes = $wpdb->get_var( 'SELECT @@SESSION.sql_mode;' ); |
| 343 | | $this->assertContains( 'ONLY_FULL_GROUP_BY', explode( ',', $check_new_modes ) ); |
| | 343 | $this->assertContains( 'STRICT_TRANS_TABLES', explode( ',', $check_new_modes ) ); |
| 344 | 344 | |
| 345 | 345 | $wpdb->set_sql_mode( explode( ',', $current_modes ) ); |
| 346 | 346 | } |
| 347 | 347 | |
| 348 | 348 | public function filter_allowed_incompatible_sql_mode( $modes ) { |
| 349 | | $pos = array_search( 'ONLY_FULL_GROUP_BY', $modes, true ); |
| | 349 | $pos = array_search( 'STRICT_TRANS_TABLES', $modes, true ); |
| 350 | 350 | $this->assertGreaterThanOrEqual( 0, $pos ); |
| 351 | 351 | |
| 352 | 352 | if ( false === $pos ) { |