~vlad-lesin/percona-server/pintables

« back to all changes in this revision

Viewing changes to userstat.patch

  • Committer: Laurynas Biveinis
  • Date: 2011-06-21 02:36:36 UTC
  • mfrom: (123 merge)
  • mto: This revision was merged to the branch mainline in revision 124.
  • Revision ID: laurynas.biveinis@percona.com-20110621023636-ccp1iyyrncj181zt
MergeĀ fromĀ lp:percona-server

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
   DBUG_RETURN(error);
92
92
 }
93
93
 
94
 
@@ -2169,6 +2174,8 @@
 
94
@@ -2176,6 +2181,8 @@
95
95
       dup_ref=ref+ALIGN_SIZE(ref_length);
96
96
     cached_table_flags= table_flags();
97
97
   }
100
100
   DBUG_RETURN(error);
101
101
 }
102
102
 
103
 
@@ -3619,6 +3626,127 @@
 
103
@@ -3626,6 +3633,127 @@
104
104
   return;
105
105
 }
106
106
 
231
231
diff -ruN a/sql/handler.h b/sql/handler.h
232
232
--- a/sql/handler.h     2011-04-10 12:23:52.000000000 +0400
233
233
+++ b/sql/handler.h     2011-04-10 12:24:34.000000000 +0400
234
 
@@ -33,6 +33,10 @@
 
234
@@ -35,6 +35,10 @@
235
235
 #include <ft_global.h>
236
236
 #include <keycache.h>
237
237
 
242
242
 // the following is for checking tables
243
243
 
244
244
 #define HA_ADMIN_ALREADY_DONE    1
245
 
@@ -559,10 +563,12 @@
 
245
@@ -561,10 +565,12 @@
246
246
 enum enum_schema_tables
247
247
 {
248
248
   SCH_CHARSETS= 0,
255
255
   SCH_ENGINES,
256
256
   SCH_EVENTS,
257
257
   SCH_FILES,
258
 
@@ -590,9 +596,12 @@
 
258
@@ -592,9 +598,12 @@
259
259
   SCH_TABLE_CONSTRAINTS,
260
260
   SCH_TABLE_NAMES,
261
261
   SCH_TABLE_PRIVILEGES,
268
268
   SCH_VARIABLES,
269
269
   SCH_VIEWS
270
270
 };
271
 
@@ -1207,6 +1216,9 @@
 
271
@@ -1209,6 +1218,9 @@
272
272
   bool locked;
273
273
   bool implicit_emptied;                /* Can be !=0 only if HEAP */
274
274
   const COND *pushed_cond;
278
278
   /**
279
279
     next_insert_id is the next value which should be inserted into the
280
280
     auto_increment column: in a inserting-multi-row statement (like INSERT
281
 
@@ -1258,10 +1270,12 @@
 
281
@@ -1260,10 +1272,12 @@
282
282
     ref_length(sizeof(my_off_t)),
283
283
     ft_handler(0), inited(NONE),
284
284
     locked(FALSE), implicit_emptied(0),
293
293
   virtual ~handler(void)
294
294
   {
295
295
     DBUG_ASSERT(locked == FALSE);
296
 
@@ -1384,6 +1398,8 @@
 
296
@@ -1386,6 +1400,8 @@
297
297
   {
298
298
     table= table_arg;
299
299
     table_share= share;
302
302
   }
303
303
   virtual double scan_time()
304
304
   { return ulonglong2double(stats.data_file_length) / IO_SIZE + 2; }
305
 
@@ -1751,6 +1767,8 @@
 
305
@@ -1753,6 +1769,8 @@
306
306
   virtual bool is_crashed() const  { return 0; }
307
307
   virtual bool auto_repair() const { return 0; }
308
308
 
490
490
diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
491
491
--- a/sql/mysqld.cc     2011-04-10 12:23:56.000000000 +0400
492
492
+++ b/sql/mysqld.cc     2011-04-10 12:24:34.000000000 +0400
493
 
@@ -440,6 +440,7 @@
 
493
@@ -436,6 +436,7 @@
494
494
 uint    opt_debug_sync_timeout= 0;
495
495
 #endif /* defined(ENABLED_DEBUG_SYNC) */
496
496
 my_bool opt_old_style_user_limits= 0, trust_function_creators= 0;
498
498
 my_bool opt_optimizer_fix= 0;
499
499
 /*
500
500
   True if there is at least one per-hour limit for some user, so we should
501
 
@@ -491,6 +492,7 @@
 
501
@@ -487,6 +488,7 @@
502
502
 ulong binlog_cache_use= 0, binlog_cache_disk_use= 0;
503
503
 ulong binlog_stmt_cache_use= 0, binlog_stmt_cache_disk_use= 0;
504
504
 ulong max_connections, max_connect_errors;
506
506
 
507
507
 /* flashcache */
508
508
 int cachedev_fd;
509
 
@@ -640,7 +642,9 @@
 
509
@@ -636,7 +638,9 @@
510
510
   LOCK_crypt,
511
511
   LOCK_global_system_variables,
512
512
   LOCK_user_conn, LOCK_slave_list, LOCK_active_mi,
517
517
 /**
518
518
   The below lock protects access to two global server variables:
519
519
   max_prepared_stmt_count and prepared_stmt_count. These variables
520
 
@@ -1503,6 +1507,11 @@
 
520
@@ -1499,6 +1503,11 @@
521
521
 #ifdef HAVE_RESPONSE_TIME_DISTRIBUTION
522
522
   query_response_time_free();
523
523
 #endif // HAVE_RESPONSE_TIME_DISTRIBUTION
529
529
 #ifdef HAVE_REPLICATION
530
530
   end_slave_list();
531
531
 #endif
532
 
@@ -1606,6 +1615,10 @@
 
532
@@ -1602,6 +1611,10 @@
533
533
   mysql_cond_destroy(&COND_thread_cache);
534
534
   mysql_cond_destroy(&COND_flush_thread_cache);
535
535
   mysql_cond_destroy(&COND_manager);
540
540
 }
541
541
 #endif /*EMBEDDED_LIBRARY*/
542
542
 
543
 
@@ -3042,6 +3055,7 @@
 
543
@@ -3038,6 +3051,7 @@
544
544
   {"show_binlog_events",   (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_BINLOG_EVENTS]), SHOW_LONG_STATUS},
545
545
   {"show_binlogs",         (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_BINLOGS]), SHOW_LONG_STATUS},
546
546
   {"show_charsets",        (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_CHARSETS]), SHOW_LONG_STATUS},
548
548
   {"show_collations",      (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_COLLATIONS]), SHOW_LONG_STATUS},
549
549
   {"show_contributors",    (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_CONTRIBUTORS]), SHOW_LONG_STATUS},
550
550
   {"show_create_db",       (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_CREATE_DB]), SHOW_LONG_STATUS},
551
 
@@ -3062,6 +3076,7 @@
 
551
@@ -3058,6 +3072,7 @@
552
552
 #endif
553
553
   {"show_function_status", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_STATUS_FUNC]), SHOW_LONG_STATUS},
554
554
   {"show_grants",          (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_GRANTS]), SHOW_LONG_STATUS},
556
556
   {"show_keys",            (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_KEYS]), SHOW_LONG_STATUS},
557
557
   {"show_master_status",   (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_MASTER_STAT]), SHOW_LONG_STATUS},
558
558
   {"show_open_tables",     (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_OPEN_TABLES]), SHOW_LONG_STATUS},
559
 
@@ -3080,10 +3095,13 @@
 
559
@@ -3076,10 +3091,13 @@
560
560
   {"show_slave_status_nolock", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_SLAVE_NOLOCK_STAT]), SHOW_LONG_STATUS},
561
561
   {"show_status",          (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_STATUS]), SHOW_LONG_STATUS},
562
562
   {"show_storage_engines", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_STORAGE_ENGINES]), SHOW_LONG_STATUS},
570
570
   {"show_variables",       (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_VARIABLES]), SHOW_LONG_STATUS},
571
571
   {"show_warnings",        (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_WARNS]), SHOW_LONG_STATUS},
572
572
   {"slave_start",          (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SLAVE_START]), SHOW_LONG_STATUS},
573
 
@@ -3621,6 +3639,13 @@
 
573
@@ -3617,6 +3635,13 @@
574
574
   mysql_mutex_init(key_LOCK_server_started,
575
575
                    &LOCK_server_started, MY_MUTEX_INIT_FAST);
576
576
   mysql_cond_init(key_COND_server_started, &COND_server_started, NULL);
584
584
   sp_cache_init();
585
585
 #ifdef HAVE_EVENT_SCHEDULER
586
586
   Events::init_mutexes();
587
 
@@ -3990,6 +4015,9 @@
 
587
@@ -3986,6 +4011,9 @@
588
588
   query_response_time_init();
589
589
 #endif // HAVE_RESPONSE_TIME_DISTRIBUTION
590
590
   /* We have to initialize the storage engines before CSV logging */
594
594
   if (ha_init())
595
595
   {
596
596
     sql_print_error("Can't init databases");
597
 
@@ -4126,6 +4154,9 @@
 
597
@@ -4122,6 +4150,9 @@
598
598
 
599
599
   init_max_user_conn();
600
600
   init_update_queries();
604
604
   DBUG_RETURN(0);
605
605
 }
606
606
 
607
 
@@ -5172,6 +5203,7 @@
 
607
@@ -5168,6 +5199,7 @@
608
608
     {
609
609
       sql_print_warning("%s", ER_DEFAULT(ER_CON_COUNT_ERROR));
610
610
     }
612
612
     delete thd;
613
613
     DBUG_VOID_RETURN;
614
614
   }
615
 
@@ -7886,6 +7918,8 @@
 
615
@@ -7882,6 +7914,8 @@
616
616
   key_delayed_insert_mutex, key_hash_filo_lock, key_LOCK_active_mi,
617
617
   key_LOCK_connection_count, key_LOCK_crypt, key_LOCK_delayed_create,
618
618
   key_LOCK_delayed_insert, key_LOCK_delayed_status, key_LOCK_error_log,
621
621
   key_LOCK_gdl, key_LOCK_global_system_variables,
622
622
   key_LOCK_manager,
623
623
   key_LOCK_prepared_stmt_count,
624
 
@@ -7925,6 +7959,13 @@
 
624
@@ -7921,6 +7955,13 @@
625
625
   { &key_LOCK_delayed_insert, "LOCK_delayed_insert", PSI_FLAG_GLOBAL},
626
626
   { &key_LOCK_delayed_status, "LOCK_delayed_status", PSI_FLAG_GLOBAL},
627
627
   { &key_LOCK_error_log, "LOCK_error_log", PSI_FLAG_GLOBAL},
662
662
 extern ulong what_to_log,flush_time;
663
663
 extern ulong max_prepared_stmt_count, prepared_stmt_count;
664
664
 extern ulong open_files_limit;
665
 
@@ -208,6 +211,11 @@
 
665
@@ -209,6 +212,11 @@
666
666
 extern struct system_variables max_system_variables;
667
667
 extern struct system_status_var global_status_var;
668
668
 extern struct rand_struct sql_rand;
674
674
 extern const char *opt_date_time_formats[];
675
675
 extern handlerton *partition_hton;
676
676
 extern handlerton *myisam_hton;
677
 
@@ -245,6 +253,8 @@
 
677
@@ -246,6 +254,8 @@
678
678
   key_delayed_insert_mutex, key_hash_filo_lock, key_LOCK_active_mi,
679
679
   key_LOCK_connection_count, key_LOCK_crypt, key_LOCK_delayed_create,
680
680
   key_LOCK_delayed_insert, key_LOCK_delayed_status, key_LOCK_error_log,
683
683
   key_LOCK_gdl, key_LOCK_global_system_variables,
684
684
   key_LOCK_logger, key_LOCK_manager,
685
685
   key_LOCK_prepared_stmt_count,
686
 
@@ -344,7 +354,9 @@
 
686
@@ -345,7 +355,9 @@
687
687
        LOCK_delayed_status, LOCK_delayed_create, LOCK_crypt, LOCK_timezone,
688
688
        LOCK_slave_list, LOCK_active_mi, LOCK_manager,
689
689
        LOCK_global_system_variables, LOCK_user_conn,
694
694
 extern MYSQL_PLUGIN_IMPORT mysql_mutex_t LOCK_thread_count;
695
695
 #ifdef HAVE_OPENSSL
696
696
 extern mysql_mutex_t LOCK_des_key_file;
697
 
@@ -456,6 +468,16 @@
 
697
@@ -457,6 +469,16 @@
698
698
   return id;
699
699
 }
700
700
 
738
738
diff -ruN a/sql/sql_class.cc b/sql/sql_class.cc
739
739
--- a/sql/sql_class.cc  2011-04-10 12:23:56.000000000 +0400
740
740
+++ b/sql/sql_class.cc  2011-04-10 12:24:34.000000000 +0400
741
 
@@ -602,6 +602,13 @@
 
741
@@ -601,6 +601,13 @@
742
742
   mysys_var=0;
743
743
   binlog_evt_union.do_union= FALSE;
744
744
   enable_slow_log= 0;
752
752
 #ifndef DBUG_OFF
753
753
   dbug_sentry=THD_SENTRY_MAGIC;
754
754
 #endif
755
 
@@ -982,6 +989,7 @@
 
755
@@ -977,6 +984,7 @@
756
756
     variables.option_bits|= OPTION_BIN_LOG;
757
757
   else
758
758
     variables.option_bits&= ~OPTION_BIN_LOG;
760
760
 
761
761
 #if defined(ENABLED_DEBUG_SYNC)
762
762
   /* Initialize the Debug Sync Facility. See debug_sync.cc. */
763
 
@@ -989,6 +997,94 @@
 
763
@@ -984,6 +992,94 @@
764
764
 #endif /* defined(ENABLED_DEBUG_SYNC) */
765
765
 }
766
766
 
855
855
 
856
856
 /*
857
857
   Init THD for query processing.
858
 
@@ -1723,6 +1819,32 @@
 
858
@@ -1718,6 +1814,32 @@
859
859
 }
860
860
 #endif
861
861
 
888
888
 
889
889
 struct Item_change_record: public ilink
890
890
 {
891
 
@@ -1899,6 +2021,7 @@
 
891
@@ -1894,6 +2016,7 @@
892
892
   }
893
893
 
894
894
   thd->sent_row_count++;
896
896
 
897
897
   if (thd->vio_ok())
898
898
     DBUG_RETURN(protocol->write());
899
 
@@ -1991,6 +2114,7 @@
 
899
@@ -1986,6 +2109,7 @@
900
900
 select_export::~select_export()
901
901
 {
902
902
   thd->sent_row_count=row_count;
904
904
 }
905
905
 
906
906
 
907
 
@@ -3014,6 +3138,7 @@
 
907
@@ -3009,6 +3133,7 @@
908
908
   if (likely(thd != 0))
909
909
   { /* current_thd==0 when close_connection() calls net_send_error() */
910
910
     thd->status_var.bytes_sent+= length;
912
912
   }
913
913
 }
914
914
 
915
 
@@ -3021,6 +3146,7 @@
 
915
@@ -3016,6 +3141,7 @@
916
916
 void thd_increment_bytes_received(ulong length)
917
917
 {
918
918
   current_thd->status_var.bytes_received+= length;
923
923
diff -ruN a/sql/sql_class.h b/sql/sql_class.h
924
924
--- a/sql/sql_class.h   2011-04-10 12:23:56.000000000 +0400
925
925
+++ b/sql/sql_class.h   2011-04-10 12:24:34.000000000 +0400
926
 
@@ -1617,6 +1617,8 @@
 
926
@@ -1625,6 +1625,8 @@
927
927
   */
928
928
   enum enum_server_command command;
929
929
   uint32     server_id;
932
932
   uint32     file_id;                  // for LOAD DATA INFILE
933
933
   /* remote (peer) port */
934
934
   uint16 peer_port;
935
 
@@ -2088,6 +2090,8 @@
 
935
@@ -2096,6 +2098,8 @@
936
936
   */
937
937
   enum_tx_isolation tx_isolation;
938
938
   enum_check_fields count_cuted_fields;
941
941
 
942
942
   DYNAMIC_ARRAY user_var_events;        /* For user variables replication */
943
943
   MEM_ROOT      *user_var_events_alloc; /* Allocate above array elements here */
944
 
@@ -2183,6 +2187,49 @@
 
944
@@ -2190,6 +2194,49 @@
945
945
   */
946
946
   LOG_INFO*  current_linfo;
947
947
   NET*       slave_net;                        // network connection from slave -> m.
991
991
   /* Used by the sys_var class to store temporary values */
992
992
   union
993
993
   {
994
 
@@ -2263,6 +2310,11 @@
 
994
@@ -2270,6 +2317,11 @@
995
995
     alloc_root. 
996
996
   */
997
997
   void init_for_queries();
1003
1003
   void change_user(void);
1004
1004
   void cleanup(void);
1005
1005
   void cleanup_after_query();
1006
 
@@ -2734,6 +2786,15 @@
 
1006
@@ -2741,6 +2793,15 @@
1007
1007
   }
1008
1008
   thd_scheduler scheduler;
1009
1009
 
1019
1019
 public:
1020
1020
   inline Internal_error_handler *get_internal_handler()
1021
1021
   { return m_internal_handler; }
1022
 
@@ -2921,6 +2982,10 @@
 
1022
@@ -2929,6 +2990,10 @@
1023
1023
   LEX_STRING invoker_host;
1024
1024
 };
1025
1025
 
2754
2754
 
2755
2755
 /* collect status for all running threads */
2756
2756
 
2757
 
@@ -7519,6 +7835,104 @@
 
2757
@@ -7654,6 +7970,104 @@
2758
2758
 };
2759
2759
 
2760
2760
 
2859
2859
 ST_FIELD_INFO processlist_fields_info[]=
2860
2860
 {
2861
2861
   {"ID", 4, MYSQL_TYPE_LONGLONG, 0, 0, "Id", SKIP_OPEN_TABLE},
2862
 
@@ -7708,6 +8122,8 @@
 
2862
@@ -7843,6 +8257,8 @@
2863
2863
 {
2864
2864
   {"CHARACTER_SETS", charsets_fields_info, create_schema_table, 
2865
2865
    fill_schema_charsets, make_character_sets_old_format, 0, -1, -1, 0, 0},
2868
2868
   {"COLLATIONS", collation_fields_info, create_schema_table, 
2869
2869
    fill_schema_collation, make_old_format, 0, -1, -1, 0, 0},
2870
2870
   {"COLLATION_CHARACTER_SET_APPLICABILITY", coll_charset_app_fields_info,
2871
 
@@ -7717,6 +8133,8 @@
 
2871
@@ -7852,6 +8268,8 @@
2872
2872
    OPTIMIZE_I_S_TABLE|OPEN_VIEW_FULL},
2873
2873
   {"COLUMN_PRIVILEGES", column_privileges_fields_info, create_schema_table,
2874
2874
    fill_schema_column_privileges, 0, 0, -1, -1, 0, 0},
2877
2877
   {"ENGINES", engines_fields_info, create_schema_table,
2878
2878
    fill_schema_engines, make_old_format, 0, -1, -1, 0, 0},
2879
2879
 #ifdef HAVE_EVENT_SCHEDULER
2880
 
@@ -7789,14 +8207,20 @@
 
2880
@@ -7924,14 +8342,20 @@
2881
2881
    get_all_tables, make_table_names_old_format, 0, 1, 2, 1, 0},
2882
2882
   {"TABLE_PRIVILEGES", table_privileges_fields_info, create_schema_table,
2883
2883
    fill_schema_table_privileges, 0, 0, -1, -1, 0, 0},
3267
3267
diff -ruN a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc
3268
3268
--- a/storage/myisam/ha_myisam.cc       2011-04-10 12:16:42.000000000 +0400
3269
3269
+++ b/storage/myisam/ha_myisam.cc       2011-04-10 12:24:34.000000000 +0400
3270
 
@@ -768,6 +768,7 @@
 
3270
@@ -769,6 +769,7 @@
3271
3271
 
3272
3272
 int ha_myisam::write_row(uchar *buf)
3273
3273
 {
3275
3275
   ha_statistic_increment(&SSV::ha_write_count);
3276
3276
 
3277
3277
   /* If we have a timestamp column, update it to the current time */
3278
 
@@ -780,11 +781,13 @@
 
3278
@@ -781,11 +782,13 @@
3279
3279
   */
3280
3280
   if (table->next_number_field && buf == table->record[0])
3281
3281
   {
3291
3291
 }
3292
3292
 
3293
3293
 int ha_myisam::check(THD* thd, HA_CHECK_OPT* check_opt)
3294
 
@@ -1535,16 +1538,24 @@
 
3294
@@ -1536,16 +1539,24 @@
3295
3295
 
3296
3296
 int ha_myisam::update_row(const uchar *old_data, uchar *new_data)
3297
3297
 {
3318
3318
 }
3319
3319
 
3320
3320
 int ha_myisam::index_read_map(uchar *buf, const uchar *key,
3321
 
@@ -1556,6 +1567,14 @@
 
3321
@@ -1557,6 +1568,14 @@
3322
3322
   ha_statistic_increment(&SSV::ha_read_key_count);
3323
3323
   int error=mi_rkey(file, buf, active_index, key, keypart_map, find_flag);
3324
3324
   table->status=error ? STATUS_NOT_FOUND: 0;
3333
3333
   MYSQL_INDEX_READ_ROW_DONE(error);
3334
3334
   return error;
3335
3335
 }
3336
 
@@ -1568,6 +1587,14 @@
 
3336
@@ -1569,6 +1588,14 @@
3337
3337
   ha_statistic_increment(&SSV::ha_read_key_count);
3338
3338
   int error=mi_rkey(file, buf, index, key, keypart_map, find_flag);
3339
3339
   table->status=error ? STATUS_NOT_FOUND: 0;
3348
3348
   MYSQL_INDEX_READ_ROW_DONE(error);
3349
3349
   return error;
3350
3350
 }
3351
 
@@ -1582,6 +1609,14 @@
 
3351
@@ -1583,6 +1610,14 @@
3352
3352
   int error=mi_rkey(file, buf, active_index, key, keypart_map,
3353
3353
                     HA_READ_PREFIX_LAST);
3354
3354
   table->status=error ? STATUS_NOT_FOUND: 0;
3363
3363
   MYSQL_INDEX_READ_ROW_DONE(error);
3364
3364
   DBUG_RETURN(error);
3365
3365
 }
3366
 
@@ -1593,6 +1628,13 @@
 
3366
@@ -1594,6 +1629,13 @@
3367
3367
   ha_statistic_increment(&SSV::ha_read_next_count);
3368
3368
   int error=mi_rnext(file,buf,active_index);
3369
3369
   table->status=error ? STATUS_NOT_FOUND: 0;
3377
3377
   MYSQL_INDEX_READ_ROW_DONE(error);
3378
3378
   return error;
3379
3379
 }
3380
 
@@ -1604,6 +1646,13 @@
 
3380
@@ -1605,6 +1647,13 @@
3381
3381
   ha_statistic_increment(&SSV::ha_read_prev_count);
3382
3382
   int error=mi_rprev(file,buf, active_index);
3383
3383
   table->status=error ? STATUS_NOT_FOUND: 0;
3391
3391
   MYSQL_INDEX_READ_ROW_DONE(error);
3392
3392
   return error;
3393
3393
 }
3394
 
@@ -1615,6 +1664,14 @@
 
3394
@@ -1616,6 +1665,14 @@
3395
3395
   ha_statistic_increment(&SSV::ha_read_first_count);
3396
3396
   int error=mi_rfirst(file, buf, active_index);
3397
3397
   table->status=error ? STATUS_NOT_FOUND: 0;
3406
3406
   MYSQL_INDEX_READ_ROW_DONE(error);
3407
3407
   return error;
3408
3408
 }
3409
 
@@ -1626,6 +1683,14 @@
 
3409
@@ -1627,6 +1684,14 @@
3410
3410
   ha_statistic_increment(&SSV::ha_read_last_count);
3411
3411
   int error=mi_rlast(file, buf, active_index);
3412
3412
   table->status=error ? STATUS_NOT_FOUND: 0;
3421
3421
   MYSQL_INDEX_READ_ROW_DONE(error);
3422
3422
   return error;
3423
3423
 }
3424
 
@@ -1643,6 +1708,14 @@
 
3424
@@ -1644,6 +1709,14 @@
3425
3425
     error= mi_rnext_same(file,buf);
3426
3426
   } while (error == HA_ERR_RECORD_DELETED);
3427
3427
   table->status=error ? STATUS_NOT_FOUND: 0;
3436
3436
   MYSQL_INDEX_READ_ROW_DONE(error);
3437
3437
   return error;
3438
3438
 }
3439
 
@@ -1662,6 +1735,8 @@
 
3439
@@ -1663,6 +1736,8 @@
3440
3440
   ha_statistic_increment(&SSV::ha_read_rnd_next_count);
3441
3441
   int error=mi_scan(file, buf);
3442
3442
   table->status=error ? STATUS_NOT_FOUND: 0;
3445
3445
   MYSQL_READ_ROW_DONE(error);
3446
3446
   return error;
3447
3447
 }
3448
 
@@ -1678,6 +1753,8 @@
 
3448
@@ -1679,6 +1754,8 @@
3449
3449
   ha_statistic_increment(&SSV::ha_read_rnd_count);
3450
3450
   int error=mi_rrnd(file, buf, my_get_ptr(pos,ref_length));
3451
3451
   table->status=error ? STATUS_NOT_FOUND: 0;