~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Brian Aker
  • Date: 2008-07-13 22:21:51 UTC
  • Revision ID: brian@tangent.org-20080713222151-fv2tcpbsc829j2oc
Ulonglong to uint64_t

Show diffs side-by-side

added added

removed removed

Lines of Context:
1126
1126
                                name */
1127
1127
        uint    full_name_len,  /* in: length of the full name, i.e.
1128
1128
                                len(dbname) + len(tablename) + 1 */
1129
 
        ulonglong *unused __attribute__((__unused__)))  /* unused for this engine */
 
1129
        uint64_t *unused __attribute__((__unused__)))   /* unused for this engine */
1130
1130
{
1131
1131
        ibool   is_autocommit;
1132
1132
        trx_t*  trx;
3325
3325
/*================================*/
3326
3326
                                        /* out: DB_SUCCESS if all went well
3327
3327
                                        else error code */
3328
 
        ulonglong       autoinc)        /* in: value to store */
 
3328
        uint64_t        autoinc)        /* in: value to store */
3329
3329
{
3330
3330
        ulint           error;
3331
3331
 
3350
3350
/*==================================*/
3351
3351
                                        /* out: DB_SUCCES if all went well
3352
3352
                                        else error code */
3353
 
        ulonglong       auto_inc)       /* in: value to store */
 
3353
        uint64_t        auto_inc)       /* in: value to store */
3354
3354
{
3355
3355
        ulint           error;
3356
3356
 
3503
3503
        /* Handle duplicate key errors */
3504
3504
        if (auto_inc_used) {
3505
3505
                ulint           err;
3506
 
                ulonglong       auto_inc;
 
3506
                uint64_t        auto_inc;
3507
3507
 
3508
3508
                /* Note the number of rows processed for this statement, used
3509
3509
                by get_auto_increment() to determine the number of AUTO-INC
3830
3830
 
3831
3831
        /* Only if the table has an AUTOINC column */
3832
3832
        if (table->found_next_number_field && record == table->record[0]) {
3833
 
                ulonglong       dummy = 0;
 
3833
                uint64_t        dummy = 0;
3834
3834
 
3835
3835
                /* First check whether the AUTOINC sub-system has been
3836
3836
                initialized using the AUTOINC mutex. If not then we
5543
5543
                        /* out: upper bound of rows */
5544
5544
{
5545
5545
        dict_index_t*   index;
5546
 
        ulonglong       estimate;
5547
 
        ulonglong       local_data_file_length;
 
5546
        uint64_t        estimate;
 
5547
        uint64_t        local_data_file_length;
5548
5548
 
5549
5549
        DBUG_ENTER("estimate_rows_upper_bound");
5550
5550
 
5564
5564
 
5565
5565
        index = dict_table_get_first_index_noninline(prebuilt->table);
5566
5566
 
5567
 
        local_data_file_length = ((ulonglong) index->stat_n_leaf_pages)
 
5567
        local_data_file_length = ((uint64_t) index->stat_n_leaf_pages)
5568
5568
                                                        * UNIV_PAGE_SIZE;
5569
5569
 
5570
5570
        /* Calculate a minimum length for a clustered index record and from
5736
5736
 
5737
5737
                stats.records = (ha_rows)n_rows;
5738
5738
                stats.deleted = 0;
5739
 
                stats.data_file_length = ((ulonglong)
 
5739
                stats.data_file_length = ((uint64_t)
5740
5740
                                ib_table->stat_clustered_index_size)
5741
5741
                                        * UNIV_PAGE_SIZE;
5742
 
                stats.index_file_length = ((ulonglong)
 
5742
                stats.index_file_length = ((uint64_t)
5743
5743
                                ib_table->stat_sum_of_other_index_sizes)
5744
5744
                                        * UNIV_PAGE_SIZE;
5745
5745
                stats.delete_length = 0;
6817
6817
        ulint     rw_lock_count_spin_rounds= 0;
6818
6818
        ulint     rw_lock_count_os_wait= 0;
6819
6819
        ulint     rw_lock_count_os_yield= 0;
6820
 
        ulonglong rw_lock_wait_time= 0;
 
6820
        uint64_t rw_lock_wait_time= 0;
6821
6821
#endif /* UNIV_DEBUG */
6822
6822
        uint      hton_name_len= strlen(innobase_hton_name), buf1len, buf2len;
6823
6823
        DBUG_ENTER("innodb_mutex_show_status");
7283
7283
 
7284
7284
ulong
7285
7285
ha_innobase::innobase_get_auto_increment(
7286
 
        ulonglong*      value)          /* out: autoinc value */
 
7286
        uint64_t*       value)          /* out: autoinc value */
7287
7287
{
7288
7288
        ulong           error;
7289
7289
 
7329
7329
                                        error = DB_ERROR;
7330
7330
                                }
7331
7331
                        } else {
7332
 
                                *value = (ulonglong) autoinc;
 
7332
                                *value = (uint64_t) autoinc;
7333
7333
                        }
7334
7334
                /* A deadlock error during normal processing is OK
7335
7335
                and can be ignored. */
7356
7356
void
7357
7357
ha_innobase::get_auto_increment(
7358
7358
/*============================*/
7359
 
        ulonglong       offset __attribute__((__unused__)),              /* in: */
7360
 
        ulonglong       increment,           /* in: table autoinc increment */
7361
 
        ulonglong       nb_desired_values,   /* in: number of values reqd */
7362
 
        ulonglong       *first_value,        /* out: the autoinc value */
7363
 
        ulonglong       *nb_reserved_values) /* out: count of reserved values */
 
7359
        uint64_t        offset __attribute__((__unused__)),              /* in: */
 
7360
        uint64_t        increment,           /* in: table autoinc increment */
 
7361
        uint64_t        nb_desired_values,   /* in: number of values reqd */
 
7362
        uint64_t        *first_value,        /* out: the autoinc value */
 
7363
        uint64_t        *nb_reserved_values) /* out: count of reserved values */
7364
7364
{
7365
7365
        trx_t*          trx;
7366
7366
        ulint           error;
7367
 
        ulonglong       autoinc = 0;
 
7367
        uint64_t        autoinc = 0;
7368
7368
 
7369
7369
        /* Prepare prebuilt->trx in the table handle */
7370
7370
        update_thd(ha_thd());
7372
7372
        error = innobase_get_auto_increment(&autoinc);
7373
7373
 
7374
7374
        if (error != DB_SUCCESS) {
7375
 
                *first_value = (~(ulonglong) 0);
 
7375
                *first_value = (~(uint64_t) 0);
7376
7376
                return;
7377
7377
        }
7378
7378
 
7442
7442
int
7443
7443
ha_innobase::reset_auto_increment(
7444
7444
/*==============================*/
7445
 
        ulonglong       value)          /* in: new value for table autoinc */
 
7445
        uint64_t        value)          /* in: new value for table autoinc */
7446
7446
{
7447
7447
        DBUG_ENTER("ha_innobase::reset_auto_increment");
7448
7448
 
7562
7562
                        call_back,      /* out: pointer to function for
7563
7563
                                        checking if query caching
7564
7564
                                        is permitted */
7565
 
        ulonglong       *engine_data)   /* in/out: data to call_back */
 
7565
        uint64_t        *engine_data)   /* in/out: data to call_back */
7566
7566
{
7567
7567
        *call_back = innobase_query_caching_of_table_permitted;
7568
7568
        *engine_data = 0;
7577
7577
        return(trx_sys_mysql_bin_log_name);
7578
7578
}
7579
7579
 
7580
 
ulonglong
 
7580
uint64_t
7581
7581
ha_innobase::get_mysql_bin_log_pos()
7582
7582
{
7583
7583
        /* trx... is ib_longlong, which is a typedef for a 64-bit integer
7584
 
        (__int64 or longlong) so it's ok to cast it to ulonglong. */
 
7584
        (__int64 or longlong) so it's ok to cast it to uint64_t. */
7585
7585
 
7586
7586
        return(trx_sys_mysql_bin_log_pos);
7587
7587
}