| 5194 | */ |
| 5195 | |
| 5196 | static void thd_send_progress(THD *thd) |
| 5197 | { |
| 5198 | /* Check if we should send the client a progress report */ |
| 5199 | ulonglong report_time= my_interval_timer(); |
| 5200 | if (report_time > thd->progress.next_report_time) |
| 5201 | { |
| 5202 | uint seconds_to_next= MY_MAX(thd->variables.progress_report_time, |
| 5203 | global_system_variables.progress_report_time); |
| 5204 | if (seconds_to_next == 0) // Turned off |
| 5205 | seconds_to_next= 1; // Check again after 1 second |
| 5206 | |
| 5207 | thd->progress.next_report_time= (report_time + |
| 5208 | seconds_to_next * 1000000000ULL); |
| 5209 | if (global_system_variables.progress_report_time && |
| 5210 | thd->variables.progress_report_time && !thd->is_error()) |
| 5211 | { |
| 5212 | net_send_progress_packet(thd); |
| 5213 | if (thd->is_error()) |
| 5214 | thd->clear_error(); |
| 5215 | } |
| 5216 | } |
| 5217 | } |
| 5218 | |
| 5219 | |
| 5220 | /** Initialize progress report handling **/ |
no test coverage detected