~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Monty Taylor
  • Date: 2010-07-09 14:06:50 UTC
  • Revision ID: mordred@inaugust.com-20100709140650-ojeih829v3wbdkyv
Added include guard for generator.h to make cpplint happy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (C) 2008 PrimeBase Technologies GmbH, Germany
 
1
/* Copyright (c) 2008 PrimeBase Technologies GmbH, Germany
2
2
 *
3
3
 * PrimeBase Media Stream for MySQL
4
4
 *
14
14
 *
15
15
 * You should have received a copy of the GNU General Public License
16
16
 * along with this program; if not, write to the Free Software
17
 
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
17
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
18
 *
19
19
 * Original author: Paul McCullagh
20
20
 * Continued development: Barry Leslie
28
28
 */
29
29
 
30
30
#ifdef DRIZZLED
31
 
#include <config.h>
 
31
#include "config.h"
32
32
#include <drizzled/common.h>
33
33
#include <drizzled/session.h>
34
34
#include <drizzled/table.h>
35
35
#include <drizzled/message/table.pb.h>
36
 
#include <drizzled/charset_info.h>
 
36
#include "drizzled/charset_info.h"
37
37
#include <drizzled/table_proto.h>
38
38
#include <drizzled/field.h>
39
39
#endif
545
545
        push_(file);
546
546
        if ((repo = file->myRepo)) {
547
547
                if (repo->isRemovingFP) {
548
 
                        repo->removeRepoFile(RETAIN(file));
 
548
                        repo->removeRepoFile(file);
549
549
                        myRepostoryList->wakeup();
550
550
                }
551
551
                else
552
 
                        repo->returnRepoFile(RETAIN(file));
 
552
                        repo->returnRepoFile(file);
553
553
                repo->release(); /* [++] here is the release.  */
554
554
        }
555
555
        release_(file);
974
974
        pop_(backup_info);
975
975
        iBackupThread = MSBackup::newMSBackup(backup_info);
976
976
        
 
977
        push_(iBackupThread);
977
978
        try_(a) {
978
979
                iBackupThread->startBackup(RETAIN(this));
979
980
        }
1076
1077
                                                int len = ptr - dir_name;
1077
1078
                                                ptr++;
1078
1079
                                                if ((strtoul(ptr, NULL, 10) == db_id) && len) {
1079
 
                                                        db = getDatabase(CSString::newString(dir_name, len), true);
 
1080
                                                        db = getDatabase(CSCString::newString(dir_name, len), true);
1080
1081
                                                        ASSERT(db->myDatabaseID == db_id);
1081
1082
                                                }
1082
1083
                                        }
1254
1255
 
1255
1256
        //is_pbms = (strcmp(db_name->getCString(), "pbms") == 0); To be done later.
1256
1257
        
1257
 
        /*
1258
 
         * Block the creation of the pbms database if there is no MySQL database. 
1259
 
         * The database name is case sensitive here if the file system names are
1260
 
         * case sensitive. This is desirable.
1261
 
         */
 
1258
        /* Block the creation of the pbms database if there is no MySQL database. */
1262
1259
        path = CSPath::newPath(ms_my_get_mysql_home_path(), RETAIN(db_name));
1263
1260
        push_(path);
1264
1261
        if (create && !path->exists()) {
1597
1594
                        gDatabaseList->remove(doomedDatabase->getKey());
1598
1595
                if (!self->myMustQuit) 
1599
1596
                        unlock_(gDatabaseList); 
1600
 
                ASSERT(doomedDatabase->getRefCount() == 1);
 
1597
                ASSERT(doomedDatabase->iRefCount == 1);
1601
1598
                release_(doomedDatabase);
1602
1599
                
1603
1600
        } else {