~jaypipes/drizzle/item-class-file-reorg

« back to all changes in this revision

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

  • Committer: Brian Aker
  • Date: 2008-07-26 18:39:33 UTC
  • mfrom: (212.1.3 codestyle)
  • Revision ID: brian@tangent.org-20080726183933-hueup0fcy2zs1hug
Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
529
529
innobase_release_temporary_latches(
530
530
/*===============================*/
531
531
                                /* out: 0 */
532
 
        handlerton*     hton __attribute__((__unused__)),       /* in: handlerton */
 
532
        handlerton*     hton __attribute__((unused)),   /* in: handlerton */
533
533
        THD*            thd)    /* in: MySQL thread */
534
534
{
535
535
        trx_t*  trx;
1122
1122
                                name */
1123
1123
        uint    full_name_len,  /* in: length of the full name, i.e.
1124
1124
                                len(dbname) + len(tablename) + 1 */
1125
 
        uint64_t *unused __attribute__((__unused__)))   /* unused for this engine */
 
1125
        uint64_t *unused __attribute__((unused)))       /* unused for this engine */
1126
1126
{
1127
1127
        ibool   is_autocommit;
1128
1128
        trx_t*  trx;
1220
1220
void
1221
1221
innobase_invalidate_query_cache(
1222
1222
/*============================*/
1223
 
        trx_t*  trx __attribute__((__unused__)),                /* in: transaction which modifies the table */
1224
 
        char*   full_name __attribute__((__unused__)),  /* in: concatenation of database name, null
 
1223
        trx_t*  trx __attribute__((unused)),            /* in: transaction which modifies the table */
 
1224
        char*   full_name __attribute__((unused)),      /* in: concatenation of database name, null
1225
1225
                                char '\0', table name, null char'\0';
1226
1226
                                NOTE that in Windows this is always
1227
1227
                                in LOWER CASE! */
1228
 
        ulint   full_name_len __attribute__((__unused__)))      /* in: full name length where also the null
 
1228
        ulint   full_name_len __attribute__((unused)))  /* in: full name length where also the null
1229
1229
                                chars count */
1230
1230
{
1231
1231
        /* Note that the sync0sync.h rank of the query cache mutex is just
1680
1680
Closes an InnoDB database. */
1681
1681
static
1682
1682
int
1683
 
innobase_end(handlerton *hton __attribute__((__unused__)),
1684
 
             ha_panic_function type __attribute__((__unused__)))
 
1683
innobase_end(handlerton *hton __attribute__((unused)),
 
1684
             ha_panic_function type __attribute__((unused)))
1685
1685
/*==============*/
1686
1686
                                /* out: TRUE if error */
1687
1687
{
1712
1712
the logs, and the name of this function should be innobase_checkpoint. */
1713
1713
static
1714
1714
bool
1715
 
innobase_flush_logs(handlerton *hton __attribute__((__unused__)))
 
1715
innobase_flush_logs(handlerton *hton __attribute__((unused)))
1716
1716
/*=====================*/
1717
1717
                                /* out: TRUE if error */
1718
1718
{
1791
1791
innobase_commit(
1792
1792
/*============*/
1793
1793
                        /* out: 0 */
1794
 
        handlerton *hton __attribute__((__unused__)), /* in: Innodb handlerton */ 
 
1794
        handlerton *hton __attribute__((unused)), /* in: Innodb handlerton */ 
1795
1795
        THD*    thd,    /* in: MySQL thread handle of the user for whom
1796
1796
                        the transaction should be committed */
1797
1797
        bool    all)    /* in:  TRUE - commit transaction
1915
1915
innobase_rollback(
1916
1916
/*==============*/
1917
1917
                        /* out: 0 or error number */
1918
 
        handlerton *hton __attribute__((__unused__)), /* in: Innodb handlerton */ 
 
1918
        handlerton *hton __attribute__((unused)), /* in: Innodb handlerton */ 
1919
1919
        THD*    thd,    /* in: handle to the MySQL thread of the user
1920
1920
                        whose transaction should be rolled back */
1921
1921
        bool    all)    /* in:  TRUE - commit transaction
1989
1989
/*===========================*/
1990
1990
                                /* out: 0 if success, HA_ERR_NO_SAVEPOINT if
1991
1991
                                no savepoint with the given name */
1992
 
        handlerton *hton __attribute__((__unused__)),       /* in: Innodb handlerton */ 
 
1992
        handlerton *hton __attribute__((unused)),       /* in: Innodb handlerton */ 
1993
1993
        THD*    thd,            /* in: handle to the MySQL thread of the user
1994
1994
                                whose transaction should be rolled back */
1995
1995
        void*   savepoint)      /* in: savepoint data */
2024
2024
/*=======================*/
2025
2025
                                /* out: 0 if success, HA_ERR_NO_SAVEPOINT if
2026
2026
                                no savepoint with the given name */
2027
 
        handlerton*     hton __attribute__((__unused__)),       /* in: handlerton for Innodb */
 
2027
        handlerton*     hton __attribute__((unused)),   /* in: handlerton for Innodb */
2028
2028
        THD*    thd,            /* in: handle to the MySQL thread of the user
2029
2029
                                whose transaction should be rolled back */
2030
2030
        void*   savepoint)      /* in: savepoint data */
2051
2051
innobase_savepoint(
2052
2052
/*===============*/
2053
2053
                                /* out: always 0, that is, always succeeds */
2054
 
        handlerton*     hton __attribute__((__unused__)),   /* in: handle to the Innodb handlerton */
 
2054
        handlerton*     hton __attribute__((unused)),   /* in: handle to the Innodb handlerton */
2055
2055
        THD*    thd,            /* in: handle to the MySQL thread */
2056
2056
        void*   savepoint)      /* in: savepoint data */
2057
2057
{
2095
2095
innobase_close_connection(
2096
2096
/*======================*/
2097
2097
                        /* out: 0 or error number */
2098
 
        handlerton*     hton __attribute__((__unused__)),       /* in:  innobase handlerton */
 
2098
        handlerton*     hton __attribute__((unused)),   /* in:  innobase handlerton */
2099
2099
        THD*    thd)    /* in: handle to the MySQL thread of the user
2100
2100
                        whose resources should be free'd */
2101
2101
{
2970
2970
build_template(
2971
2971
/*===========*/
2972
2972
        row_prebuilt_t* prebuilt,       /* in/out: prebuilt struct */
2973
 
        THD*            thd __attribute__((__unused__)),                /* in: current user thread, used
 
2973
        THD*            thd __attribute__((unused)),            /* in: current user thread, used
2974
2974
                                        only if templ_type is
2975
2975
                                        ROW_MYSQL_REC_FIELDS */
2976
2976
        TABLE*          table,          /* in: MySQL table */
3549
3549
        uchar*          upd_buff,       /* in: buffer to use */
3550
3550
        ulint           buff_len,       /* in: buffer length */
3551
3551
        row_prebuilt_t* prebuilt,       /* in: InnoDB prebuilt struct */
3552
 
        THD*            thd __attribute__((__unused__)))                /* in: user thread */
 
3552
        THD*            thd __attribute__((unused)))            /* in: user thread */
3553
3553
{
3554
3554
        uchar*          original_upd_buff = upd_buff;
3555
3555
        Field*          field;
3901
3901
/*====================*/
3902
3902
                        /* out: 0 or error number */
3903
3903
        uint    keynr,  /* in: key (index) number */
3904
 
        bool sorted __attribute__((__unused__)))        /* in: 1 if result MUST be sorted according to index */
 
3904
        bool sorted __attribute__((unused)))    /* in: 1 if result MUST be sorted according to index */
3905
3905
{
3906
3906
        int     error   = 0;
3907
3907
 
4330
4330
                                /* out: 0, HA_ERR_END_OF_FILE, or error
4331
4331
                                number */
4332
4332
        uchar*          buf,    /* in/out: buffer for the row */
4333
 
        const uchar*    key __attribute__((__unused__)),        /* in: key value */
4334
 
        uint            keylen __attribute__((__unused__)))     /* in: key value length */
 
4333
        const uchar*    key __attribute__((unused)),    /* in: key value */
 
4334
        uint            keylen __attribute__((unused))) /* in: key value length */
4335
4335
{
4336
4336
        ha_statistic_increment(&SSV::ha_read_next_count);
4337
4337
 
5198
5198
innobase_drop_database(
5199
5199
/*===================*/
5200
5200
                        /* out: error number */
5201
 
        handlerton *hton __attribute__((__unused__)), /* in: handlerton of Innodb */
 
5201
        handlerton *hton __attribute__((unused)), /* in: handlerton of Innodb */
5202
5202
        char*   path)   /* in: database path; inside InnoDB the name
5203
5203
                        of the last directory in the path is used as
5204
5204
                        the database name: for example, in 'mysql/data/test'
5775
5775
ha_innobase::analyze(
5776
5776
/*=================*/
5777
5777
                                        /* out: returns always 0 (success) */
5778
 
        THD*            thd __attribute__((__unused__)),                /* in: connection thread handle */
5779
 
        HA_CHECK_OPT*   check_opt __attribute__((__unused__)))  /* in: currently ignored */
 
5778
        THD*            thd __attribute__((unused)),            /* in: connection thread handle */
 
5779
        HA_CHECK_OPT*   check_opt __attribute__((unused)))      /* in: currently ignored */
5780
5780
{
5781
5781
        /* Simply call ::info() with all the flags */
5782
5782
        info(HA_STATUS_TIME | HA_STATUS_CONST | HA_STATUS_VARIABLE);
5791
5791
int
5792
5792
ha_innobase::optimize(
5793
5793
/*==================*/
5794
 
        THD*            thd __attribute__((__unused__)),                /* in: connection thread handle */
5795
 
        HA_CHECK_OPT*   check_opt __attribute__((__unused__)))  /* in: currently ignored */
 
5794
        THD*            thd __attribute__((unused)),            /* in: connection thread handle */
 
5795
        HA_CHECK_OPT*   check_opt __attribute__((unused)))      /* in: currently ignored */
5796
5796
{
5797
5797
        return(HA_ADMIN_TRY_ALTER);
5798
5798
}
5808
5808
                                        /* out: HA_ADMIN_CORRUPT or
5809
5809
                                        HA_ADMIN_OK */
5810
5810
        THD*            thd,            /* in: user thread handle */
5811
 
        HA_CHECK_OPT*   check_opt __attribute__((__unused__)))  /* in: check options, currently
 
5811
        HA_CHECK_OPT*   check_opt __attribute__((unused)))      /* in: check options, currently
5812
5812
                                        ignored */
5813
5813
{
5814
5814
        ulint           ret;
6620
6620
bool
6621
6621
innodb_show_status(
6622
6622
/*===============*/
6623
 
        handlerton*     hton __attribute__((__unused__)),       /* in: the innodb handlerton */
 
6623
        handlerton*     hton __attribute__((unused)),   /* in: the innodb handlerton */
6624
6624
        THD*    thd,    /* in: the MySQL query thread of the caller */
6625
6625
        stat_print_fn *stat_print)
6626
6626
{
6705
6705
bool
6706
6706
innodb_mutex_show_status(
6707
6707
/*=====================*/
6708
 
        handlerton*     hton __attribute__((__unused__)),       /* in: the innodb handlerton */
 
6708
        handlerton*     hton __attribute__((unused)),   /* in: the innodb handlerton */
6709
6709
        THD*            thd,            /* in: the MySQL query thread of the
6710
6710
                                        caller */
6711
6711
        stat_print_fn*  stat_print)
7256
7256
void
7257
7257
ha_innobase::get_auto_increment(
7258
7258
/*============================*/
7259
 
        uint64_t        offset __attribute__((__unused__)),              /* in: */
 
7259
        uint64_t        offset __attribute__((unused)),              /* in: */
7260
7260
        uint64_t        increment,           /* in: table autoinc increment */
7261
7261
        uint64_t        nb_desired_values,   /* in: number of values reqd */
7262
7262
        uint64_t        *first_value,        /* out: the autoinc value */
7363
7363
 
7364
7364
/* See comment in handler.cc */
7365
7365
bool
7366
 
ha_innobase::get_error_message(int error __attribute__((__unused__)), String *buf)
 
7366
ha_innobase::get_error_message(int error __attribute__((unused)), String *buf)
7367
7367
{
7368
7368
        trx_t*  trx = check_trx_exists(ha_thd());
7369
7369
 
7565
7565
innobase_xa_prepare(
7566
7566
/*================*/
7567
7567
                        /* out: 0 or error number */
7568
 
        handlerton *hton __attribute__((__unused__)),
 
7568
        handlerton *hton __attribute__((unused)),
7569
7569
        THD*    thd,    /* in: handle to the MySQL thread of the user
7570
7570
                        whose XA transaction should be prepared */
7571
7571
        bool    all)    /* in: TRUE - commit transaction
7660
7660
/*================*/
7661
7661
                                /* out: number of prepared transactions
7662
7662
                                stored in xid_list */
7663
 
        handlerton *hton __attribute__((__unused__)),
 
7663
        handlerton *hton __attribute__((unused)),
7664
7664
        XID*    xid_list,       /* in/out: prepared transactions */
7665
7665
        uint    len)            /* in: number of slots in xid_list */
7666
7666
{
7680
7680
innobase_commit_by_xid(
7681
7681
/*===================*/
7682
7682
                        /* out: 0 or error number */
7683
 
        handlerton *hton __attribute__((__unused__)),
 
7683
        handlerton *hton __attribute__((unused)),
7684
7684
        XID*    xid)    /* in: X/Open XA transaction identification */
7685
7685
{
7686
7686
        trx_t*  trx;
7704
7704
innobase_rollback_by_xid(
7705
7705
/*=====================*/
7706
7706
                        /* out: 0 or error number */
7707
 
        handlerton *hton __attribute__((__unused__)),
 
7707
        handlerton *hton __attribute__((unused)),
7708
7708
        XID     *xid)   /* in: X/Open XA transaction identification */
7709
7709
{
7710
7710
        trx_t*  trx;
7728
7728
innobase_create_cursor_view(
7729
7729
/*========================*/
7730
7730
                          /* out: pointer to cursor view or NULL */
7731
 
        handlerton *hton __attribute__((__unused__)), /* in: innobase hton */
 
7731
        handlerton *hton __attribute__((unused)), /* in: innobase hton */
7732
7732
        THD* thd)         /* in: user thread handle */
7733
7733
{
7734
7734
        return(read_cursor_view_create_for_mysql(check_trx_exists(thd)));
7742
7742
void
7743
7743
innobase_close_cursor_view(
7744
7744
/*=======================*/
7745
 
        handlerton *hton __attribute__((__unused__)),
 
7745
        handlerton *hton __attribute__((unused)),
7746
7746
        THD*    thd,    /* in: user thread handle */
7747
7747
        void*   curview)/* in: Consistent read view to be closed */
7748
7748
{
7759
7759
void
7760
7760
innobase_set_cursor_view(
7761
7761
/*=====================*/
7762
 
        handlerton *hton __attribute__((__unused__)),
 
7762
        handlerton *hton __attribute__((unused)),
7763
7763
        THD*    thd,    /* in: user thread handle */
7764
7764
        void*   curview)/* in: Consistent cursor view to be set */
7765
7765
{
7796
7796
 
7797
7797
/* TODO: Fix the cast below!!! */
7798
7798
 
7799
 
static int show_innodb_vars(THD *thd __attribute__((__unused__)),
7800
 
                            SHOW_VAR *var, char *buff __attribute__((__unused__)))
 
7799
static int show_innodb_vars(THD *thd __attribute__((unused)),
 
7800
                            SHOW_VAR *var, char *buff __attribute__((unused)))
7801
7801
{
7802
7802
  innodb_export_status();
7803
7803
  var->type= SHOW_ARRAY;