~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/fil/fil0fil.cc

  • Committer: Monty Taylor
  • Date: 2010-12-24 00:04:05 UTC
  • mto: This revision was merged to the branch mainline in revision 2038.
  • Revision ID: mordred@inaugust.com-20101224000405-pbeo7g3qs2s3xr7c
A stab at C++-izing InnoDB.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1338
1338
                                        in X mode */
1339
1339
{
1340
1340
        fil_space_t*    space;
1341
 
        fil_space_t*    namespace;
 
1341
        fil_space_t*    tablespace;
1342
1342
        fil_node_t*     fil_node;
1343
1343
 
1344
1344
        ut_ad(mutex_own(&fil_system->mutex));
1357
1357
 
1358
1358
        HASH_DELETE(fil_space_t, hash, fil_system->spaces, id, space);
1359
1359
 
1360
 
        namespace = fil_space_get_by_name(space->name);
1361
 
        ut_a(namespace);
1362
 
        ut_a(space == namespace);
 
1360
        tablespace = fil_space_get_by_name(space->name);
 
1361
        ut_a(tablespace);
 
1362
        ut_a(space == tablespace);
1363
1363
 
1364
1364
        HASH_DELETE(fil_space_t, name_hash, fil_system->name_hash,
1365
1365
                    ut_fold_string(space->name), space);
3698
3698
                                        matching tablespace is not found from
3699
3699
                                        memory */
3700
3700
{
3701
 
        fil_space_t*    namespace;
 
3701
        fil_space_t*    tablespace;
3702
3702
        fil_space_t*    space;
3703
3703
        char*           path;
3704
3704
 
3715
3715
        /* Look if there is a space with the same name; the name is the
3716
3716
        directory path from the datadir to the file */
3717
3717
 
3718
 
        namespace = fil_space_get_by_name(path);
3719
 
        if (space && space == namespace) {
 
3718
        tablespace = fil_space_get_by_name(path);
 
3719
        if (space && space == tablespace) {
3720
3720
                /* Found */
3721
3721
 
3722
3722
                if (mark_space) {
3738
3738
        }
3739
3739
 
3740
3740
        if (space == NULL) {
3741
 
                if (namespace == NULL) {
 
3741
                if (tablespace == NULL) {
3742
3742
                        ut_print_timestamp(stderr);
3743
3743
                        fputs("  InnoDB: Error: table ", stderr);
3744
3744
                        ut_print_filename(stderr, name);
3767
3767
                                "InnoDB: a tablespace of name %s and id %lu,"
3768
3768
                                " though. Have\n"
3769
3769
                                "InnoDB: you deleted or moved .ibd files?\n",
3770
 
                                (ulong) id, namespace->name,
3771
 
                                (ulong) namespace->id);
 
3770
                                (ulong) id, tablespace->name,
 
3771
                                (ulong) tablespace->id);
3772
3772
                }
3773
3773
error_exit:
3774
3774
                fputs("InnoDB: Please refer to\n"
3793
3793
                        "InnoDB: Have you deleted or moved .ibd files?\n",
3794
3794
                        (ulong) id, space->name);
3795
3795
 
3796
 
                if (namespace != NULL) {
 
3796
                if (tablespace != NULL) {
3797
3797
                        fputs("InnoDB: There is a tablespace"
3798
3798
                              " with the right name\n"
3799
3799
                              "InnoDB: ", stderr);
3800
 
                        ut_print_filename(stderr, namespace->name);
 
3800
                        ut_print_filename(stderr, tablespace->name);
3801
3801
                        fprintf(stderr, ", but its id is %lu.\n",
3802
 
                                (ulong) namespace->id);
 
3802
                                (ulong) tablespace->id);
3803
3803
                }
3804
3804
 
3805
3805
                goto error_exit;
3822
3822
        const char*     name)   /*!< in: table name in the standard
3823
3823
                                'databasename/tablename' format */
3824
3824
{
3825
 
        fil_space_t*    namespace;
 
3825
        fil_space_t*    tablespace;
3826
3826
        ulint           id              = ULINT_UNDEFINED;
3827
3827
        char*           path;
3828
3828
 
3835
3835
        /* Look if there is a space with the same name; the name is the
3836
3836
        directory path to the file */
3837
3837
 
3838
 
        namespace = fil_space_get_by_name(path);
 
3838
        tablespace = fil_space_get_by_name(path);
3839
3839
 
3840
 
        if (namespace) {
3841
 
                id = namespace->id;
 
3840
        if (tablespace) {
 
3841
                id = tablespace->id;
3842
3842
        }
3843
3843
 
3844
3844
        mem_free(path);