~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/innobase/handler/ha_innodb.cc

  • Committer: Grant Limberg
  • Date: 2008-08-12 21:13:01 UTC
  • mto: (322.1.1 codestyle)
  • mto: This revision was merged to the branch mainline in revision 324.
  • Revision ID: grant@glsoftware.net-20080812211301-ym3wsowelkgp16s2
renamed all instances of MYSQL_ to DRIZZLE_

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
#include <mysys/mysys_err.h>
34
34
#include "ha_innodb.h"
35
35
 
36
 
#ifndef MYSQL_SERVER
 
36
#ifndef DRIZZLE_SERVER
37
37
/* This is needed because of Bug #3596.  Let us hope that pthread_mutex_t
38
38
is defined the same in both builds: the MySQL server and the InnoDB plugin. */
39
39
extern pthread_mutex_t LOCK_thread_count;
40
 
#endif /* MYSQL_SERVER */
 
40
#endif /* DRIZZLE_SERVER */
41
41
 
42
42
/** to protect innobase_open_files */
43
43
static pthread_mutex_t innobase_share_mutex;
163
163
static const char innobase_hton_name[]= "InnoDB";
164
164
 
165
165
 
166
 
static MYSQL_THDVAR_BOOL(support_xa, PLUGIN_VAR_OPCMDARG,
 
166
static DRIZZLE_THDVAR_BOOL(support_xa, PLUGIN_VAR_OPCMDARG,
167
167
  "Enable InnoDB support for the XA two-phase commit",
168
168
  /* check_func */ NULL, /* update_func */ NULL,
169
169
  /* default */ TRUE);
170
170
 
171
 
static MYSQL_THDVAR_BOOL(table_locks, PLUGIN_VAR_OPCMDARG,
 
171
static DRIZZLE_THDVAR_BOOL(table_locks, PLUGIN_VAR_OPCMDARG,
172
172
  "Enable InnoDB locking in LOCK TABLES",
173
173
  /* check_func */ NULL, /* update_func */ NULL,
174
174
  /* default */ TRUE);
1419
1419
        innobase_hton->flags=HTON_NO_FLAGS;
1420
1420
        innobase_hton->release_temporary_latches=innobase_release_temporary_latches;
1421
1421
 
1422
 
        ut_a(DATA_MYSQL_TRUE_VARCHAR == (ulint)DRIZZLE_TYPE_VARCHAR);
 
1422
        ut_a(DATA_DRIZZLE_TRUE_VARCHAR == (ulint)DRIZZLE_TYPE_VARCHAR);
1423
1423
 
1424
1424
#ifdef UNIV_DEBUG
1425
1425
        static const char       test_filename[] = "-@";
1616
1616
 
1617
1617
        data_mysql_default_charset_coll = (ulint)default_charset_info->number;
1618
1618
 
1619
 
        ut_a(DATA_MYSQL_LATIN1_SWEDISH_CHARSET_COLL ==
 
1619
        ut_a(DATA_DRIZZLE_LATIN1_SWEDISH_CHARSET_COLL ==
1620
1620
                                        my_charset_latin1.number);
1621
 
        ut_a(DATA_MYSQL_BINARY_CHARSET_COLL == my_charset_bin.number);
 
1621
        ut_a(DATA_DRIZZLE_BINARY_CHARSET_COLL == my_charset_bin.number);
1622
1622
 
1623
1623
        /* Store the latin1_swedish_ci character ordering table to InnoDB. For
1624
1624
        non-latin1_swedish_ci charsets we use the MySQL comparison functions,
2045
2045
          (unless we are in sub-statement), so SQL layer ensures that
2046
2046
          this method is never called in such situation.
2047
2047
        */
2048
 
#ifdef MYSQL_SERVER /* plugins cannot access thd->in_sub_stmt */
 
2048
#ifdef DRIZZLE_SERVER /* plugins cannot access thd->in_sub_stmt */
2049
2049
        assert(thd_test_options(thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN) ||
2050
2050
                thd->in_sub_stmt);
2051
 
#endif /* MYSQL_SERVER */
 
2051
#endif /* DRIZZLE_SERVER */
2052
2052
 
2053
2053
        trx = check_trx_exists(thd);
2054
2054
 
2913
2913
        row_prebuilt_t* prebuilt,       /* in/out: prebuilt struct */
2914
2914
        THD*            thd __attribute__((unused)),            /* in: current user thread, used
2915
2915
                                        only if templ_type is
2916
 
                                        ROW_MYSQL_REC_FIELDS */
 
2916
                                        ROW_DRIZZLE_REC_FIELDS */
2917
2917
        TABLE*          table,          /* in: MySQL table */
2918
2918
        ha_innobase*    file,           /* in: ha_innobase handler */
2919
 
        uint            templ_type)     /* in: ROW_MYSQL_WHOLE_ROW or
2920
 
                                        ROW_MYSQL_REC_FIELDS */
 
2919
        uint            templ_type)     /* in: ROW_DRIZZLE_WHOLE_ROW or
 
2920
                                        ROW_DRIZZLE_REC_FIELDS */
2921
2921
{
2922
2922
        dict_index_t*   index;
2923
2923
        dict_index_t*   clust_index;
2938
2938
                use exclusive row level locks, for example, if the read is
2939
2939
                done in an UPDATE statement. */
2940
2940
 
2941
 
                templ_type = ROW_MYSQL_WHOLE_ROW;
 
2941
                templ_type = ROW_DRIZZLE_WHOLE_ROW;
2942
2942
        }
2943
2943
 
2944
 
        if (templ_type == ROW_MYSQL_REC_FIELDS) {
 
2944
        if (templ_type == ROW_DRIZZLE_REC_FIELDS) {
2945
2945
                if (prebuilt->hint_need_to_fetch_extra_cols
2946
2946
                        == ROW_RETRIEVE_ALL_COLS) {
2947
2947
 
2958
2958
 
2959
2959
                                fetch_all_in_key = TRUE;
2960
2960
                        } else {
2961
 
                                templ_type = ROW_MYSQL_WHOLE_ROW;
 
2961
                                templ_type = ROW_DRIZZLE_WHOLE_ROW;
2962
2962
                        }
2963
2963
                } else if (prebuilt->hint_need_to_fetch_extra_cols
2964
2964
                        == ROW_RETRIEVE_PRIMARY_KEY) {
2975
2975
 
2976
2976
        clust_index = dict_table_get_first_index_noninline(prebuilt->table);
2977
2977
 
2978
 
        if (templ_type == ROW_MYSQL_REC_FIELDS) {
 
2978
        if (templ_type == ROW_DRIZZLE_REC_FIELDS) {
2979
2979
                index = prebuilt->index;
2980
2980
        } else {
2981
2981
                index = clust_index;
3023
3023
                templ = prebuilt->mysql_template + n_requested_fields;
3024
3024
                field = table->field[i];
3025
3025
 
3026
 
                if (UNIV_LIKELY(templ_type == ROW_MYSQL_REC_FIELDS)) {
 
3026
                if (UNIV_LIKELY(templ_type == ROW_DRIZZLE_REC_FIELDS)) {
3027
3027
                        /* Decide which columns we should fetch
3028
3028
                        and which we can skip. */
3029
3029
                        register const ibool    index_contains_field =
3106
3106
                templ->type = index->table->cols[i].mtype;
3107
3107
                templ->mysql_type = (ulint)field->type();
3108
3108
 
3109
 
                if (templ->mysql_type == DATA_MYSQL_TRUE_VARCHAR) {
 
3109
                if (templ->mysql_type == DATA_DRIZZLE_TRUE_VARCHAR) {
3110
3110
                        templ->mysql_length_bytes = (ulint)
3111
3111
                                (((Field_varstring*)field)->length_bytes);
3112
3112
                }
3385
3385
        }
3386
3386
 
3387
3387
        if (prebuilt->mysql_template == NULL
3388
 
            || prebuilt->template_type != ROW_MYSQL_WHOLE_ROW) {
 
3388
            || prebuilt->template_type != ROW_DRIZZLE_WHOLE_ROW) {
3389
3389
 
3390
3390
                /* Build the template used in converting quickly between
3391
3391
                the two database formats */
3392
3392
 
3393
3393
                build_template(prebuilt, NULL, table, 
3394
 
                                                   this, ROW_MYSQL_WHOLE_ROW);
 
3394
                                                   this, ROW_DRIZZLE_WHOLE_ROW);
3395
3395
        }
3396
3396
 
3397
3397
        innodb_srv_conc_enter_innodb(prebuilt->trx);
3664
3664
        /* This is not a delete */
3665
3665
        prebuilt->upd_node->is_delete = FALSE;
3666
3666
 
3667
 
        assert(prebuilt->template_type == ROW_MYSQL_WHOLE_ROW);
 
3667
        assert(prebuilt->template_type == ROW_DRIZZLE_WHOLE_ROW);
3668
3668
 
3669
3669
        innodb_srv_conc_enter_innodb(trx);
3670
3670
 
4011
4011
 
4012
4012
        if (prebuilt->sql_stat_start) {
4013
4013
                build_template(prebuilt, user_thd, table, this,
4014
 
                                                        ROW_MYSQL_REC_FIELDS);
 
4014
                                                        ROW_DRIZZLE_REC_FIELDS);
4015
4015
        }
4016
4016
 
4017
4017
        if (key_ptr) {
4166
4166
        /* MySQL changes the active index for a handle also during some
4167
4167
        queries, for example SELECT MAX(a), SUM(a) first retrieves the MAX()
4168
4168
        and then calculates the sum. Previously we played safe and used
4169
 
        the flag ROW_MYSQL_WHOLE_ROW below, but that caused unnecessary
 
4169
        the flag ROW_DRIZZLE_WHOLE_ROW below, but that caused unnecessary
4170
4170
        copying. Starting from MySQL-4.1 we use a more efficient flag here. */
4171
4171
 
4172
 
        build_template(prebuilt, user_thd, table, this, ROW_MYSQL_REC_FIELDS);
 
4172
        build_template(prebuilt, user_thd, table, this, ROW_DRIZZLE_REC_FIELDS);
4173
4173
 
4174
4174
        return(0);
4175
4175
}
5763
5763
                /* Build the template; we will use a dummy template
5764
5764
                in index scans done in checking */
5765
5765
 
5766
 
                build_template(prebuilt, NULL, table, this, ROW_MYSQL_WHOLE_ROW);
 
5766
                build_template(prebuilt, NULL, table, this, ROW_DRIZZLE_WHOLE_ROW);
5767
5767
        }
5768
5768
 
5769
5769
        ret = row_check_table_for_mysql(prebuilt);
7546
7546
                return(0);
7547
7547
        }
7548
7548
 
7549
 
        thd_get_xid(thd, (MYSQL_XID*) &trx->xid);
 
7549
        thd_get_xid(thd, (DRIZZLE_XID*) &trx->xid);
7550
7550
 
7551
7551
        /* Release a possible FIFO ticket and search latch. Since we will
7552
7552
        reserve the kernel mutex, we have to release the search system latch
7758
7758
 
7759
7759
 
7760
7760
/* plugin options */
7761
 
static MYSQL_SYSVAR_BOOL(checksums, innobase_use_checksums,
 
7761
static DRIZZLE_SYSVAR_BOOL(checksums, innobase_use_checksums,
7762
7762
  PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
7763
7763
  "Enable InnoDB checksums validation (enabled by default). "
7764
7764
  "Disable with --skip-innodb-checksums.",
7765
7765
  NULL, NULL, TRUE);
7766
7766
 
7767
 
static MYSQL_SYSVAR_STR(data_home_dir, innobase_data_home_dir,
 
7767
static DRIZZLE_SYSVAR_STR(data_home_dir, innobase_data_home_dir,
7768
7768
  PLUGIN_VAR_READONLY,
7769
7769
  "The common part for InnoDB table spaces.",
7770
7770
  NULL, NULL, NULL);
7771
7771
 
7772
 
static MYSQL_SYSVAR_BOOL(doublewrite, innobase_use_doublewrite,
 
7772
static DRIZZLE_SYSVAR_BOOL(doublewrite, innobase_use_doublewrite,
7773
7773
  PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
7774
7774
  "Enable InnoDB doublewrite buffer (enabled by default). "
7775
7775
  "Disable with --skip-innodb-doublewrite.",
7776
7776
  NULL, NULL, TRUE);
7777
7777
 
7778
 
static MYSQL_SYSVAR_ULONG(fast_shutdown, innobase_fast_shutdown,
 
7778
static DRIZZLE_SYSVAR_ULONG(fast_shutdown, innobase_fast_shutdown,
7779
7779
  PLUGIN_VAR_OPCMDARG,
7780
7780
  "Speeds up the shutdown process of the InnoDB storage engine. Possible "
7781
7781
  "values are 0, 1 (faster)"
7787
7787
  ".",
7788
7788
  NULL, NULL, 1, 0, 2, 0);
7789
7789
 
7790
 
static MYSQL_SYSVAR_BOOL(file_per_table, innobase_file_per_table,
 
7790
static DRIZZLE_SYSVAR_BOOL(file_per_table, innobase_file_per_table,
7791
7791
  PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
7792
7792
  "Stores each InnoDB table to an .ibd file in the database dir.",
7793
7793
  NULL, NULL, FALSE);
7794
7794
 
7795
 
static MYSQL_SYSVAR_ULONG(flush_log_at_trx_commit, srv_flush_log_at_trx_commit,
 
7795
static DRIZZLE_SYSVAR_ULONG(flush_log_at_trx_commit, srv_flush_log_at_trx_commit,
7796
7796
  PLUGIN_VAR_OPCMDARG,
7797
7797
  "Set to 0 (write and flush once per second),"
7798
7798
  " 1 (write and flush at each commit)"
7799
7799
  " or 2 (write at commit, flush once per second).",
7800
7800
  NULL, NULL, 1, 0, 2, 0);
7801
7801
 
7802
 
static MYSQL_SYSVAR_STR(flush_method, innobase_unix_file_flush_method,
 
7802
static DRIZZLE_SYSVAR_STR(flush_method, innobase_unix_file_flush_method,
7803
7803
  PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
7804
7804
  "With which method to flush data.", NULL, NULL, NULL);
7805
7805
 
7806
 
static MYSQL_SYSVAR_BOOL(locks_unsafe_for_binlog, innobase_locks_unsafe_for_binlog,
 
7806
static DRIZZLE_SYSVAR_BOOL(locks_unsafe_for_binlog, innobase_locks_unsafe_for_binlog,
7807
7807
  PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
7808
7808
  "Force InnoDB to not use next-key locking, to use only row-level locking.",
7809
7809
  NULL, NULL, FALSE);
7810
7810
 
7811
7811
#ifdef UNIV_LOG_ARCHIVE
7812
 
static MYSQL_SYSVAR_STR(log_arch_dir, innobase_log_arch_dir,
 
7812
static DRIZZLE_SYSVAR_STR(log_arch_dir, innobase_log_arch_dir,
7813
7813
  PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
7814
7814
  "Where full logs should be archived.", NULL, NULL, NULL);
7815
7815
 
7816
 
static MYSQL_SYSVAR_BOOL(log_archive, innobase_log_archive,
 
7816
static DRIZZLE_SYSVAR_BOOL(log_archive, innobase_log_archive,
7817
7817
  PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_READONLY,
7818
7818
  "Set to 1 if you want to have logs archived.", NULL, NULL, FALSE);
7819
7819
#endif /* UNIV_LOG_ARCHIVE */
7820
7820
 
7821
 
static MYSQL_SYSVAR_STR(log_group_home_dir, innobase_log_group_home_dir,
 
7821
static DRIZZLE_SYSVAR_STR(log_group_home_dir, innobase_log_group_home_dir,
7822
7822
  PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
7823
7823
  "Path to InnoDB log files.", NULL, NULL, NULL);
7824
7824
 
7825
 
static MYSQL_SYSVAR_ULONG(max_dirty_pages_pct, srv_max_buf_pool_modified_pct,
 
7825
static DRIZZLE_SYSVAR_ULONG(max_dirty_pages_pct, srv_max_buf_pool_modified_pct,
7826
7826
  PLUGIN_VAR_RQCMDARG,
7827
7827
  "Percentage of dirty pages allowed in bufferpool.",
7828
7828
  NULL, NULL, 90, 0, 100, 0);
7829
7829
 
7830
 
static MYSQL_SYSVAR_ULONG(max_purge_lag, srv_max_purge_lag,
 
7830
static DRIZZLE_SYSVAR_ULONG(max_purge_lag, srv_max_purge_lag,
7831
7831
  PLUGIN_VAR_RQCMDARG,
7832
7832
  "Desired maximum length of the purge queue (0 = no limit)",
7833
7833
  NULL, NULL, 0, 0, ~0L, 0);
7834
7834
 
7835
 
static MYSQL_SYSVAR_BOOL(rollback_on_timeout, innobase_rollback_on_timeout,
 
7835
static DRIZZLE_SYSVAR_BOOL(rollback_on_timeout, innobase_rollback_on_timeout,
7836
7836
  PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_READONLY,
7837
7837
  "Roll back the complete transaction on lock wait timeout, for 4.x compatibility (disabled by default)",
7838
7838
  NULL, NULL, FALSE);
7839
7839
 
7840
 
static MYSQL_SYSVAR_BOOL(status_file, innobase_create_status_file,
 
7840
static DRIZZLE_SYSVAR_BOOL(status_file, innobase_create_status_file,
7841
7841
  PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_NOSYSVAR,
7842
7842
  "Enable SHOW INNODB STATUS output in the innodb_status.<pid> file",
7843
7843
  NULL, NULL, FALSE);
7844
7844
 
7845
 
static MYSQL_SYSVAR_BOOL(stats_on_metadata, innobase_stats_on_metadata,
 
7845
static DRIZZLE_SYSVAR_BOOL(stats_on_metadata, innobase_stats_on_metadata,
7846
7846
  PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_NOSYSVAR,
7847
7847
  "Enable statistics gathering for metadata commands such as SHOW TABLE STATUS (on by default)",
7848
7848
  NULL, NULL, TRUE);
7849
7849
 
7850
 
static MYSQL_SYSVAR_BOOL(use_adaptive_hash_indexes, innobase_use_adaptive_hash_indexes,
 
7850
static DRIZZLE_SYSVAR_BOOL(use_adaptive_hash_indexes, innobase_use_adaptive_hash_indexes,
7851
7851
  PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_READONLY,
7852
7852
  "Enable the InnoDB adaptive hash indexes (enabled by default)",
7853
7853
  NULL, NULL, TRUE);
7854
7854
 
7855
 
static MYSQL_SYSVAR_LONG(additional_mem_pool_size, innobase_additional_mem_pool_size,
 
7855
static DRIZZLE_SYSVAR_LONG(additional_mem_pool_size, innobase_additional_mem_pool_size,
7856
7856
  PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
7857
7857
  "Size of a memory pool InnoDB uses to store data dictionary information and other internal data structures.",
7858
7858
  NULL, NULL, 1*1024*1024L, 512*1024L, ~0L, 1024);
7859
7859
 
7860
 
static MYSQL_SYSVAR_ULONG(autoextend_increment, srv_auto_extend_increment,
 
7860
static DRIZZLE_SYSVAR_ULONG(autoextend_increment, srv_auto_extend_increment,
7861
7861
  PLUGIN_VAR_RQCMDARG,
7862
7862
  "Data file autoextend increment in megabytes",
7863
7863
  NULL, NULL, 8L, 1L, 1000L, 0);
7864
7864
 
7865
 
static MYSQL_SYSVAR_LONGLONG(buffer_pool_size, innobase_buffer_pool_size,
 
7865
static DRIZZLE_SYSVAR_LONGLONG(buffer_pool_size, innobase_buffer_pool_size,
7866
7866
  PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
7867
7867
  "The size of the memory buffer InnoDB uses to cache data and indexes of its tables.",
7868
7868
  NULL, NULL, 8*1024*1024L, 1024*1024L, INT64_MAX, 1024*1024L);
7869
7869
 
7870
 
static MYSQL_SYSVAR_ULONG(commit_concurrency, srv_commit_concurrency,
 
7870
static DRIZZLE_SYSVAR_ULONG(commit_concurrency, srv_commit_concurrency,
7871
7871
  PLUGIN_VAR_RQCMDARG,
7872
7872
  "Helps in performance tuning in heavily concurrent environments.",
7873
7873
  NULL, NULL, 0, 0, 1000, 0);
7874
7874
 
7875
 
static MYSQL_SYSVAR_ULONG(concurrency_tickets, srv_n_free_tickets_to_enter,
 
7875
static DRIZZLE_SYSVAR_ULONG(concurrency_tickets, srv_n_free_tickets_to_enter,
7876
7876
  PLUGIN_VAR_RQCMDARG,
7877
7877
  "Number of times a thread is allowed to enter InnoDB within the same SQL query after it has once got the ticket",
7878
7878
  NULL, NULL, 500L, 1L, ~0L, 0);
7879
7879
 
7880
 
static MYSQL_SYSVAR_LONG(file_io_threads, innobase_file_io_threads,
 
7880
static DRIZZLE_SYSVAR_LONG(file_io_threads, innobase_file_io_threads,
7881
7881
  PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
7882
7882
  "Number of file I/O threads in InnoDB.",
7883
7883
  NULL, NULL, 4, 4, 64, 0);
7884
7884
 
7885
 
static MYSQL_SYSVAR_LONG(force_recovery, innobase_force_recovery,
 
7885
static DRIZZLE_SYSVAR_LONG(force_recovery, innobase_force_recovery,
7886
7886
  PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
7887
7887
  "Helps to save your data in case the disk image of the database becomes corrupt.",
7888
7888
  NULL, NULL, 0, 0, 6, 0);
7889
7889
 
7890
 
static MYSQL_SYSVAR_LONG(lock_wait_timeout, innobase_lock_wait_timeout,
 
7890
static DRIZZLE_SYSVAR_LONG(lock_wait_timeout, innobase_lock_wait_timeout,
7891
7891
  PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
7892
7892
  "Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back.",
7893
7893
  NULL, NULL, 50, 1, 1024 * 1024 * 1024, 0);
7894
7894
 
7895
 
static MYSQL_SYSVAR_LONG(log_buffer_size, innobase_log_buffer_size,
 
7895
static DRIZZLE_SYSVAR_LONG(log_buffer_size, innobase_log_buffer_size,
7896
7896
  PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
7897
7897
  "The size of the buffer which InnoDB uses to write log to the log files on disk.",
7898
7898
  NULL, NULL, 1024*1024L, 256*1024L, ~0L, 1024);
7899
7899
 
7900
 
static MYSQL_SYSVAR_LONGLONG(log_file_size, innobase_log_file_size,
 
7900
static DRIZZLE_SYSVAR_LONGLONG(log_file_size, innobase_log_file_size,
7901
7901
  PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
7902
7902
  "Size of each log file in a log group.",
7903
7903
  NULL, NULL, 5*1024*1024L, 1*1024*1024L, INT64_MAX, 1024*1024L);
7904
7904
 
7905
 
static MYSQL_SYSVAR_LONG(log_files_in_group, innobase_log_files_in_group,
 
7905
static DRIZZLE_SYSVAR_LONG(log_files_in_group, innobase_log_files_in_group,
7906
7906
  PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
7907
7907
  "Number of log files in the log group. InnoDB writes to the files in a circular fashion. Value 3 is recommended here.",
7908
7908
  NULL, NULL, 2, 2, 100, 0);
7909
7909
 
7910
 
static MYSQL_SYSVAR_LONG(mirrored_log_groups, innobase_mirrored_log_groups,
 
7910
static DRIZZLE_SYSVAR_LONG(mirrored_log_groups, innobase_mirrored_log_groups,
7911
7911
  PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
7912
7912
  "Number of identical copies of log groups we keep for the database. Currently this should be set to 1.",
7913
7913
  NULL, NULL, 1, 1, 10, 0);
7914
7914
 
7915
 
static MYSQL_SYSVAR_LONG(open_files, innobase_open_files,
 
7915
static DRIZZLE_SYSVAR_LONG(open_files, innobase_open_files,
7916
7916
  PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
7917
7917
  "How many files at the maximum InnoDB keeps open at the same time.",
7918
7918
  NULL, NULL, 300L, 10L, ~0L, 0);
7919
7919
 
7920
 
static MYSQL_SYSVAR_ULONG(sync_spin_loops, srv_n_spin_wait_rounds,
 
7920
static DRIZZLE_SYSVAR_ULONG(sync_spin_loops, srv_n_spin_wait_rounds,
7921
7921
  PLUGIN_VAR_RQCMDARG,
7922
7922
  "Count of spin-loop rounds in InnoDB mutexes",
7923
7923
  NULL, NULL, 20L, 0L, ~0L, 0);
7924
7924
 
7925
 
static MYSQL_SYSVAR_ULONG(thread_concurrency, srv_thread_concurrency,
 
7925
static DRIZZLE_SYSVAR_ULONG(thread_concurrency, srv_thread_concurrency,
7926
7926
  PLUGIN_VAR_RQCMDARG,
7927
7927
  "Helps in performance tuning in heavily concurrent environments. Sets the maximum number of threads allowed inside InnoDB. Value 0 will disable the thread throttling.",
7928
7928
  NULL, NULL, 8, 0, 1000, 0);
7929
7929
 
7930
 
static MYSQL_SYSVAR_ULONG(thread_sleep_delay, srv_thread_sleep_delay,
 
7930
static DRIZZLE_SYSVAR_ULONG(thread_sleep_delay, srv_thread_sleep_delay,
7931
7931
  PLUGIN_VAR_RQCMDARG,
7932
7932
  "Time of innodb thread sleeping before joining InnoDB queue (usec). Value 0 disable a sleep",
7933
7933
  NULL, NULL, 10000L, 0L, ~0L, 0);
7934
7934
 
7935
 
static MYSQL_SYSVAR_STR(data_file_path, innobase_data_file_path,
 
7935
static DRIZZLE_SYSVAR_STR(data_file_path, innobase_data_file_path,
7936
7936
  PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
7937
7937
  "Path to individual files and their sizes.",
7938
7938
  NULL, NULL, NULL);
7939
7939
 
7940
 
static MYSQL_SYSVAR_LONG(autoinc_lock_mode, innobase_autoinc_lock_mode,
 
7940
static DRIZZLE_SYSVAR_LONG(autoinc_lock_mode, innobase_autoinc_lock_mode,
7941
7941
  PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
7942
7942
  "The AUTOINC lock modes supported by InnoDB:\n"
7943
7943
  "  0 => Old style AUTOINC locking (for backward compatibility)\n"
7949
7949
  AUTOINC_NO_LOCKING, 0);       /* Maximum value */
7950
7950
 
7951
7951
static struct st_mysql_sys_var* innobase_system_variables[]= {
7952
 
  MYSQL_SYSVAR(additional_mem_pool_size),
7953
 
  MYSQL_SYSVAR(autoextend_increment),
7954
 
  MYSQL_SYSVAR(buffer_pool_size),
7955
 
  MYSQL_SYSVAR(checksums),
7956
 
  MYSQL_SYSVAR(commit_concurrency),
7957
 
  MYSQL_SYSVAR(concurrency_tickets),
7958
 
  MYSQL_SYSVAR(data_file_path),
7959
 
  MYSQL_SYSVAR(data_home_dir),
7960
 
  MYSQL_SYSVAR(doublewrite),
7961
 
  MYSQL_SYSVAR(fast_shutdown),
7962
 
  MYSQL_SYSVAR(file_io_threads),
7963
 
  MYSQL_SYSVAR(file_per_table),
7964
 
  MYSQL_SYSVAR(flush_log_at_trx_commit),
7965
 
  MYSQL_SYSVAR(flush_method),
7966
 
  MYSQL_SYSVAR(force_recovery),
7967
 
  MYSQL_SYSVAR(locks_unsafe_for_binlog),
7968
 
  MYSQL_SYSVAR(lock_wait_timeout),
 
7952
  DRIZZLE_SYSVAR(additional_mem_pool_size),
 
7953
  DRIZZLE_SYSVAR(autoextend_increment),
 
7954
  DRIZZLE_SYSVAR(buffer_pool_size),
 
7955
  DRIZZLE_SYSVAR(checksums),
 
7956
  DRIZZLE_SYSVAR(commit_concurrency),
 
7957
  DRIZZLE_SYSVAR(concurrency_tickets),
 
7958
  DRIZZLE_SYSVAR(data_file_path),
 
7959
  DRIZZLE_SYSVAR(data_home_dir),
 
7960
  DRIZZLE_SYSVAR(doublewrite),
 
7961
  DRIZZLE_SYSVAR(fast_shutdown),
 
7962
  DRIZZLE_SYSVAR(file_io_threads),
 
7963
  DRIZZLE_SYSVAR(file_per_table),
 
7964
  DRIZZLE_SYSVAR(flush_log_at_trx_commit),
 
7965
  DRIZZLE_SYSVAR(flush_method),
 
7966
  DRIZZLE_SYSVAR(force_recovery),
 
7967
  DRIZZLE_SYSVAR(locks_unsafe_for_binlog),
 
7968
  DRIZZLE_SYSVAR(lock_wait_timeout),
7969
7969
#ifdef UNIV_LOG_ARCHIVE
7970
 
  MYSQL_SYSVAR(log_arch_dir),
7971
 
  MYSQL_SYSVAR(log_archive),
 
7970
  DRIZZLE_SYSVAR(log_arch_dir),
 
7971
  DRIZZLE_SYSVAR(log_archive),
7972
7972
#endif /* UNIV_LOG_ARCHIVE */
7973
 
  MYSQL_SYSVAR(log_buffer_size),
7974
 
  MYSQL_SYSVAR(log_file_size),
7975
 
  MYSQL_SYSVAR(log_files_in_group),
7976
 
  MYSQL_SYSVAR(log_group_home_dir),
7977
 
  MYSQL_SYSVAR(max_dirty_pages_pct),
7978
 
  MYSQL_SYSVAR(max_purge_lag),
7979
 
  MYSQL_SYSVAR(mirrored_log_groups),
7980
 
  MYSQL_SYSVAR(open_files),
7981
 
  MYSQL_SYSVAR(rollback_on_timeout),
7982
 
  MYSQL_SYSVAR(stats_on_metadata),
7983
 
  MYSQL_SYSVAR(use_adaptive_hash_indexes),
7984
 
  MYSQL_SYSVAR(status_file),
7985
 
  MYSQL_SYSVAR(support_xa),
7986
 
  MYSQL_SYSVAR(sync_spin_loops),
7987
 
  MYSQL_SYSVAR(table_locks),
7988
 
  MYSQL_SYSVAR(thread_concurrency),
7989
 
  MYSQL_SYSVAR(thread_sleep_delay),
7990
 
  MYSQL_SYSVAR(autoinc_lock_mode),
 
7973
  DRIZZLE_SYSVAR(log_buffer_size),
 
7974
  DRIZZLE_SYSVAR(log_file_size),
 
7975
  DRIZZLE_SYSVAR(log_files_in_group),
 
7976
  DRIZZLE_SYSVAR(log_group_home_dir),
 
7977
  DRIZZLE_SYSVAR(max_dirty_pages_pct),
 
7978
  DRIZZLE_SYSVAR(max_purge_lag),
 
7979
  DRIZZLE_SYSVAR(mirrored_log_groups),
 
7980
  DRIZZLE_SYSVAR(open_files),
 
7981
  DRIZZLE_SYSVAR(rollback_on_timeout),
 
7982
  DRIZZLE_SYSVAR(stats_on_metadata),
 
7983
  DRIZZLE_SYSVAR(use_adaptive_hash_indexes),
 
7984
  DRIZZLE_SYSVAR(status_file),
 
7985
  DRIZZLE_SYSVAR(support_xa),
 
7986
  DRIZZLE_SYSVAR(sync_spin_loops),
 
7987
  DRIZZLE_SYSVAR(table_locks),
 
7988
  DRIZZLE_SYSVAR(thread_concurrency),
 
7989
  DRIZZLE_SYSVAR(thread_sleep_delay),
 
7990
  DRIZZLE_SYSVAR(autoinc_lock_mode),
7991
7991
  NULL
7992
7992
};
7993
7993
 
7994
7994
mysql_declare_plugin(innobase)
7995
7995
{
7996
 
  MYSQL_STORAGE_ENGINE_PLUGIN,
 
7996
  DRIZZLE_STORAGE_ENGINE_PLUGIN,
7997
7997
  innobase_hton_name,
7998
7998
  "1.0", 
7999
7999
  "Innobase OY",