~percona-dev/percona-server/release-5.1.52-11-fix-oleg-bug-for-11.6

« back to all changes in this revision

Viewing changes to slow_extended.patch

  • Committer: Aleksandr Kuzminsky
  • Date: 2010-11-07 16:05:20 UTC
  • Revision ID: aleksandr.kuzminsky@percona.com-20101107160520-dy2hijwwxiqzgds8
Ported to MySQL version 5.1.52

Show diffs side-by-side

added added

removed removed

Lines of Context:
216
216
                                             user_host_buff, user_host_len,
217
217
                                             query_utime, lock_utime, is_command,
218
218
                                             query, query_length) || error;
219
 
@@ -2276,12 +2304,13 @@
 
219
@@ -2280,12 +2308,13 @@
220
220
     TRUE - error occured
221
221
 */
222
222
 
231
231
   bool error= 0;
232
232
   DBUG_ENTER("MYSQL_QUERY_LOG::write");
233
233
 
234
 
@@ -2303,17 +2332,28 @@
 
234
@@ -2307,17 +2336,28 @@
235
235
 
236
236
     if (!(specialflag & SPECIAL_SHORT_LOG_FORMAT))
237
237
     {
267
267
 
268
268
         /* Note that my_b_write() assumes it knows the length for this */
269
269
         if (my_b_write(&log_file, (uchar*) buff, buff_len))
270
 
@@ -2331,12 +2371,64 @@
 
270
@@ -2335,12 +2375,64 @@
271
271
     sprintf(query_time_buff, "%.6f", ulonglong2double(query_utime)/1000000.0);
272
272
     sprintf(lock_time_buff,  "%.6f", ulonglong2double(lock_utime)/1000000.0);
273
273
     if (my_b_printf(&log_file,
1113
1113
diff -ruN a/sql/sql_cache.cc b/sql/sql_cache.cc
1114
1114
--- a/sql/sql_cache.cc  2010-08-04 02:24:34.000000000 +0900
1115
1115
+++ b/sql/sql_cache.cc  2010-08-27 14:32:37.630058141 +0900
1116
 
@@ -1653,6 +1653,7 @@
 
1116
@@ -1704,6 +1704,7 @@
1117
1117
 
1118
1118
   thd->limit_found_rows = query->found_rows();
1119
1119
   thd->status_var.last_query_cost= 0.0;
1121
1121
   if (!thd->main_da.is_set())
1122
1122
     thd->main_da.disable_status();
1123
1123
 
1124
 
@@ -1662,6 +1663,7 @@
 
1124
@@ -1713,6 +1714,7 @@
1125
1125
 err_unlock:
1126
1126
   unlock();
1127
1127
 err:
1132
1132
diff -ruN a/sql/sql_class.cc b/sql/sql_class.cc
1133
1133
--- a/sql/sql_class.cc  2010-08-04 02:24:34.000000000 +0900
1134
1134
+++ b/sql/sql_class.cc  2010-08-27 14:30:34.898058226 +0900
1135
 
@@ -339,6 +339,37 @@
 
1135
@@ -341,6 +341,37 @@
1136
1136
   thd->row_count++;
1137
1137
 }
1138
1138
 
1170
1170
 
1171
1171
 /**
1172
1172
   Dumps a text description of a thread, its security context
1173
 
@@ -759,6 +790,8 @@
 
1173
@@ -761,6 +792,8 @@
1174
1174
 bool THD::handle_error(uint sql_errno, const char *message,
1175
1175
                        MYSQL_ERROR::enum_warning_level level)
1176
1176
 {
1179
1179
   for (Internal_error_handler *error_handler= m_internal_handler;
1180
1180
        error_handler;
1181
1181
        error_handler= error_handler->m_prev_internal_handler)
1182
 
@@ -3175,6 +3208,12 @@
 
1182
@@ -3177,6 +3210,12 @@
1183
1183
     first_successful_insert_id_in_prev_stmt;
1184
1184
   backup->first_successful_insert_id_in_cur_stmt= 
1185
1185
     first_successful_insert_id_in_cur_stmt;
1192
1192
 
1193
1193
   if ((!lex->requires_prelocking() || is_update_query(lex->sql_command)) &&
1194
1194
       !current_stmt_binlog_row_based)
1195
 
@@ -3194,6 +3233,14 @@
 
1195
@@ -3196,6 +3235,14 @@
1196
1196
   cuted_fields= 0;
1197
1197
   transaction.savepoints= 0;
1198
1198
   first_successful_insert_id_in_cur_stmt= 0;
1207
1207
 }
1208
1208
 
1209
1209
 
1210
 
@@ -3256,6 +3303,12 @@
 
1210
@@ -3258,6 +3305,12 @@
1211
1211
   */
1212
1212
   examined_row_count+= backup->examined_row_count;
1213
1213
   cuted_fields+=       backup->cuted_fields;
1393
1393
diff -ruN a/sql/sql_select.cc b/sql/sql_select.cc
1394
1394
--- a/sql/sql_select.cc 2010-08-04 02:24:34.000000000 +0900
1395
1395
+++ b/sql/sql_select.cc 2010-08-27 14:30:34.925058584 +0900
1396
 
@@ -6745,7 +6745,10 @@
 
1396
@@ -6754,7 +6754,10 @@
1397
1397
          {
1398
1398
            join->thd->server_status|=SERVER_QUERY_NO_INDEX_USED;
1399
1399
            if (statistics)
1404
1404
          }
1405
1405
        }
1406
1406
        else
1407
 
@@ -6759,7 +6762,10 @@
 
1407
@@ -6768,7 +6771,10 @@
1408
1408
          {
1409
1409
            join->thd->server_status|=SERVER_QUERY_NO_INDEX_USED;
1410
1410
            if (statistics)
1415
1415
          }
1416
1416
        }
1417
1417
        if (!table->no_keyread)
1418
 
@@ -9958,6 +9964,7 @@
 
1418
@@ -9967,6 +9973,7 @@
1419
1419
               (ulong) rows_limit,test(group)));
1420
1420
 
1421
1421
   status_var_increment(thd->status_var.created_tmp_tables);
1423
1423
 
1424
1424
   if (use_temp_pool && !(test_flags & TEST_KEEP_TMP_TABLES))
1425
1425
     temp_pool_slot = bitmap_lock_set_next(&temp_pool);
1426
 
@@ -10839,6 +10846,7 @@
 
1426
@@ -10848,6 +10855,7 @@
1427
1427
     goto err;
1428
1428
   }
1429
1429
   status_var_increment(table->in_use->status_var.created_tmp_disk_tables);
1431
1431
   share->db_record_offset= 1;
1432
1432
   DBUG_RETURN(0);
1433
1433
  err:
1434
 
@@ -10857,6 +10865,14 @@
 
1434
@@ -10866,6 +10874,14 @@
1435
1435
   save_proc_info=thd->proc_info;
1436
1436
   thd_proc_info(thd, "removing tmp table");
1437
1437