~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: patrick crews
  • Date: 2011-03-15 12:12:09 UTC
  • mfrom: (1099.4.216 drizzle)
  • Revision ID: gleebix@gmail.com-20110315121209-8g2tkf31w0rx9ter
Tags: 2011.03.12
Updated translations

Show diffs side-by-side

added added

removed removed

Lines of Context:
529
529
        if (!file) {
530
530
                file = repo->openRepoFile();
531
531
                lock_(myRepostoryList);
532
 
                repo->addRepoFile(file);
533
 
                file->retain();
 
532
                repo->addRepoFile(RETAIN(file));
534
533
                unlock_(myRepostoryList);
535
534
        }
536
535
        return_(file);
545
544
        push_(file);
546
545
        if ((repo = file->myRepo)) {
547
546
                if (repo->isRemovingFP) {
548
 
                        repo->removeRepoFile(RETAIN(file));
 
547
                        repo->removeRepoFile(file); // No retain expected
549
548
                        myRepostoryList->wakeup();
550
549
                }
551
550
                else
552
 
                        repo->returnRepoFile(RETAIN(file));
 
551
                        repo->returnRepoFile(file); // No retain expected
553
552
                repo->release(); /* [++] here is the release.  */
554
553
        }
555
554
        release_(file);
1047
1046
        return getDatabase(CSString::newString(db_name), create);
1048
1047
}
1049
1048
 
1050
 
MSDatabase *MSDatabase::getDatabase(uint32_t db_id)
 
1049
MSDatabase *MSDatabase::getDatabase(uint32_t db_id, bool missing_ok)
1051
1050
{
1052
1051
        MSDatabase *db;
1053
1052
        
1088
1087
        }
1089
1088
        unlock_(gDatabaseList);
1090
1089
        
1091
 
        if (!db) {
 
1090
        if ((!db) && !missing_ok) {
1092
1091
                char buffer[CS_EXC_MESSAGE_SIZE];
1093
1092
 
1094
1093
                cs_strcpy(CS_EXC_MESSAGE_SIZE, buffer, "Unknown database #");