Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add extended indexes for hook_status_scheduled_date_gmt and status_sheduled_date_gmt #992

Merged
merged 1 commit into from
Oct 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions classes/schema/ActionScheduler_StoreSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ protected function get_table_definition( $table ) {
$table_name = $wpdb->$table;
$charset_collate = $wpdb->get_charset_collate();
$max_index_length = 191; // @see wp_get_db_schema()
$hook_status_scheduled_date_gmt_max_index_length = $max_index_length - 20 - 8; // - status, - scheduled_date_gmt
$default_date = self::DEFAULT_DATE;
switch ( $table ) {

Expand All @@ -59,8 +60,8 @@ protected function get_table_definition( $table ) {
claim_id bigint(20) unsigned NOT NULL default '0',
extended_args varchar(8000) DEFAULT NULL,
PRIMARY KEY (action_id),
KEY hook (hook($max_index_length)),
KEY status (status),
KEY hook_status_scheduled_date_gmt (hook($hook_status_scheduled_date_gmt_max_index_length), status, scheduled_date_gmt),
KEY status_scheduled_date_gmt (status, scheduled_date_gmt),
KEY scheduled_date_gmt (scheduled_date_gmt),
KEY args (args($max_index_length)),
KEY group_id (group_id),
Expand Down
Loading