~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/pbms/src/database_ms.cc

  • Committer: Lee Bieber
  • Date: 2010-10-22 16:47:38 UTC
  • mfrom: (1841.1.7 drizzle_pbms)
  • Revision ID: kalebral@gmail.com-20101022164738-vv8w22b8towpb307
Merge Barry - fix bug 657830: PBMS build failure in GCC 4.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
545
545
        push_(file);
546
546
        if ((repo = file->myRepo)) {
547
547
                if (repo->isRemovingFP) {
548
 
                        repo->removeRepoFile(file);
 
548
                        repo->removeRepoFile(RETAIN(file));
549
549
                        myRepostoryList->wakeup();
550
550
                }
551
551
                else
552
 
                        repo->returnRepoFile(file);
 
552
                        repo->returnRepoFile(RETAIN(file));
553
553
                repo->release(); /* [++] here is the release.  */
554
554
        }
555
555
        release_(file);
1076
1076
                                                int len = ptr - dir_name;
1077
1077
                                                ptr++;
1078
1078
                                                if ((strtoul(ptr, NULL, 10) == db_id) && len) {
1079
 
                                                        db = getDatabase(CSCString::newString(dir_name, len), true);
 
1079
                                                        db = getDatabase(CSString::newString(dir_name, len), true);
1080
1080
                                                        ASSERT(db->myDatabaseID == db_id);
1081
1081
                                                }
1082
1082
                                        }
1259
1259
         * The database name is case sensitive here if the file system names are
1260
1260
         * case sensitive. This is desirable.
1261
1261
         */
1262
 
        path = CSPath::newPath(ms_my_get_mysql_home_path().c_str(), RETAIN(db_name));
 
1262
        path = CSPath::newPath(ms_my_get_mysql_home_path(), RETAIN(db_name));
1263
1263
        push_(path);
1264
1264
        if (create && !path->exists()) {
1265
1265
                CSException::throwException(CS_CONTEXT, MS_ERR_UNKNOWN_DB, db_name->getCString());
1597
1597
                        gDatabaseList->remove(doomedDatabase->getKey());
1598
1598
                if (!self->myMustQuit) 
1599
1599
                        unlock_(gDatabaseList); 
1600
 
                ASSERT(doomedDatabase->iRefCount == 1);
 
1600
                ASSERT(doomedDatabase->getRefCount() == 1);
1601
1601
                release_(doomedDatabase);
1602
1602
                
1603
1603
        } else {
1605
1605
                bool create = false;
1606
1606
                uint32_t db_id;
1607
1607
                
1608
 
                path = createDatabasePath(ms_my_get_mysql_home_path().c_str(), CSString::newString(db_name), &db_id, &create);
 
1608
                path = createDatabasePath(ms_my_get_mysql_home_path(), CSString::newString(db_name), &db_id, &create);
1609
1609
                
1610
1610
                if (path) {
1611
1611
                        MSTransactionManager::dropDatabase(db_id);
1636
1636
// 3: <database>/<table>
1637
1637
bool MSDatabase::convertTablePathToIDs(const char *table_path, uint32_t *db_id, uint32_t *tab_id, bool create) 
1638
1638
{
1639
 
        const char      *base = ms_my_get_mysql_home_path().c_str();
 
1639
        const char      *base = ms_my_get_mysql_home_path();
1640
1640
        CSString        *table_url;
1641
1641
        CSString        *db_path = NULL;
1642
1642
        CSString        *db_name = NULL;
1736
1736
        MSDatabase *db;
1737
1737
        enter_();
1738
1738
        
1739
 
        db = newDatabase(ms_my_get_mysql_home_path().c_str(), db_name, 0, create);
 
1739
        db = newDatabase(ms_my_get_mysql_home_path(), db_name, 0, create);
1740
1740
        
1741
1741
        if (db) {
1742
1742
                push_(db);