We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 892fb1e commit fd0fb96Copy full SHA for fd0fb96
sqladvisor/main.cc
@@ -317,9 +317,18 @@ uint get_join_table_result_set(TABLE_LIST *table) {
317
int num_fields = mysql_num_fields(result);
318
319
MYSQL_ROW row;
320
-
+
321
+ int mysql_server_version = mysql_get_server_version(con);
322
+ if (options.verbose){
323
+ sql_print_information("mysql_server_version: %d\n",mysql_server_version);
324
+ }
325
if ((row = mysql_fetch_row(result))) {
- result_set_count = atoi(row[EXPLAIN_ROWS]);
326
+ if (mysql_server_version >= 50700){
327
+ result_set_count = atoi(row[9]);
328
329
+ else{
330
+ result_set_count = atoi(row[EXPLAIN_ROWS]);
331
332
}
333
g_string_free(cardinality_sql, TRUE);
334
mysql_free_result(result);
0 commit comments