~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/handler/handler0alter.cc

  • Committer: Monty Taylor
  • Date: 2010-05-21 06:34:40 UTC
  • mfrom: (1530.3.1)
  • mto: (1530.2.8)
  • mto: This revision was merged to the branch mainline in revision 1556.
  • Revision ID: mordred@inaugust.com-20100521063440-n98r0n8mgb0hg65d
Merged align-static-plugins into plugin-to-module.

Show diffs side-by-side

added added

removed removed

Lines of Context:
140
140
        const ulint*            offsets)        /*!< in: rec_get_offsets(
141
141
                                                rec, index, ...) */
142
142
{
143
 
        uint    n_fields        = table->s->fields;
 
143
        uint    n_fields        = table->getShare()->fields;
144
144
        uint    i;
145
145
 
146
146
        ut_ad(n_fields == dict_table_get_n_user_cols(index->table));
186
186
/*===============*/
187
187
        Table*                  table)          /*!< in/out: MySQL table */
188
188
{
189
 
        uint    n_fields        = table->s->fields;
 
189
        uint    n_fields        = table->getShare()->fields;
190
190
        uint    i;
191
191
 
192
192
        for (i = 0; i < n_fields; i++) {
228
228
int
229
229
innobase_check_index_keys(
230
230
/*======================*/
231
 
        const KEY*      key_info,       /*!< in: Indexes to be created */
 
231
        const KeyInfo*  key_info,       /*!< in: Indexes to be created */
232
232
        ulint           num_of_keys)    /*!< in: Number of indexes to
233
233
                                        be created */
234
234
{
238
238
        ut_ad(num_of_keys);
239
239
 
240
240
        for (key_num = 0; key_num < num_of_keys; key_num++) {
241
 
                const KEY&      key = key_info[key_num];
 
241
                const KeyInfo&  key = key_info[key_num];
242
242
 
243
243
                /* Check that the same index name does not appear
244
244
                twice in indexes to be created. */
245
245
 
246
246
                for (ulint i = 0; i < key_num; i++) {
247
 
                        const KEY&      key2 = key_info[i];
 
247
                        const KeyInfo&  key2 = key_info[i];
248
248
 
249
249
                        if (0 == strcmp(key.name, key2.name)) {
250
250
                                errmsg_printf(ERRMSG_LVL_ERROR, "InnoDB: key name `%s` appears"
260
260
                that the same colum does not appear twice in the index. */
261
261
 
262
262
                for (ulint i = 0; i < key.key_parts; i++) {
263
 
                        const KEY_PART_INFO&    key_part1
 
263
                        const KeyPartInfo&      key_part1
264
264
                                = key.key_part[i];
265
265
                        const Field*            field
266
266
                                = key_part1.field;
300
300
                        }
301
301
 
302
302
                        for (ulint j = 0; j < i; j++) {
303
 
                                const KEY_PART_INFO&    key_part2
 
303
                                const KeyPartInfo&      key_part2
304
304
                                        = key.key_part[j];
305
305
 
306
306
                                if (strcmp(key_part1.field->field_name,
327
327
void
328
328
innobase_create_index_field_def(
329
329
/*============================*/
330
 
        KEY_PART_INFO*          key_part,       /*!< in: MySQL key definition */
 
330
        KeyPartInfo*            key_part,       /*!< in: MySQL key definition */
331
331
        mem_heap_t*             heap,           /*!< in: memory heap */
332
332
        merge_index_field_t*    index_field)    /*!< out: index field
333
333
                                                definition for key_part */
367
367
void
368
368
innobase_create_index_def(
369
369
/*======================*/
370
 
        KEY*                    key,            /*!< in: key definition */
 
370
        KeyInfo*                        key,            /*!< in: key definition */
371
371
        bool                    new_primary,    /*!< in: TRUE=generating
372
372
                                                a new primary key
373
373
                                                on the table */
492
492
        const dict_table_t*table,               /*!< in: table definition */
493
493
        mem_heap_t*     heap,           /*!< in: heap where space for key
494
494
                                        definitions are allocated */
495
 
        KEY*            key_info,       /*!< in: Indexes to be created */
 
495
        KeyInfo*                key_info,       /*!< in: Indexes to be created */
496
496
        ulint&          n_keys)         /*!< in/out: Number of indexes to
497
497
                                        be created */
498
498
{
604
604
ha_innobase::add_index(
605
605
/*===================*/
606
606
        Table*  i_table,        /*!< in: Table where indexes are created */
607
 
        KEY*    key_info,       /*!< in: Indexes to be created */
 
607
        KeyInfo*        key_info,       /*!< in: Indexes to be created */
608
608
        uint    num_of_keys)    /*!< in: Number of indexes to be created */
609
609
{
610
610
        dict_index_t**  index;          /*!< Index to be created */
943
943
        }
944
944
 
945
945
        for (n_key = 0; n_key < num_of_keys; n_key++) {
946
 
                const KEY*      key;
 
946
                const KeyInfo*  key;
947
947
                dict_index_t*   index;
948
948
 
949
949
                key = i_table->key_info + key_num[n_key];