Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fix some DB locking issues on MySQL 5.5

affecting DB upgrades.
  • Loading branch information...
commit 0bc768ee6c73a23fc46042aec4be5f69d67e9f36 1 parent 9fb1c3e
Michael T. Dean authored March 09, 2012
11  mythtv/libs/libmythtv/dbcheck.cpp
@@ -3729,12 +3729,7 @@ NULL
3729 3729
         }
3730 3730
 
3731 3731
         // Perform the actual upgrade
3732  
-        QString qtmp = QString(
3733  
-            "ALTER DATABASE %1 DEFAULT CHARACTER SET latin1;")
3734  
-            .arg(gCoreContext->GetDatabaseParams().dbName);
3735  
-        QByteArray tmp = qtmp.toAscii();
3736 3732
         const char *updates[] = {
3737  
-tmp.constData(),
3738 3733
 "ALTER TABLE callsignnetworkmap"
3739 3734
 "  MODIFY callsign varbinary(20) NOT NULL default '',"
3740 3735
 "  MODIFY network varbinary(20) NOT NULL default '';",
@@ -3978,13 +3973,7 @@ NULL
3978 3973
 
3979 3974
     if (dbver == "1216")
3980 3975
     {
3981  
-        QString qtmp = QString(
3982  
-            "ALTER DATABASE %1 DEFAULT CHARACTER SET "
3983  
-            "utf8 COLLATE utf8_general_ci;")
3984  
-            .arg(gCoreContext->GetDatabaseParams().dbName);
3985  
-        QByteArray tmp = qtmp.toAscii();
3986 3976
         const char *updates[] = {
3987  
-tmp.constData(),
3988 3977
 "ALTER TABLE callsignnetworkmap"
3989 3978
 "  DEFAULT CHARACTER SET default,"
3990 3979
 "  MODIFY callsign varchar(20) CHARACTER SET utf8 NOT NULL default '',"
4  mythtv/libs/libmythtv/videodbcheck.cpp
@@ -379,8 +379,6 @@ bool doUpgradeVideoDatabaseSchema(void)
379 379
     if (dbver == "1016")
380 380
     {
381 381
         const QString updates[] = {
382  
-QString("ALTER DATABASE %1 DEFAULT CHARACTER SET latin1;")
383  
-        .arg(gCoreContext->GetDatabaseParams().dbName),
384 382
 "ALTER TABLE dvdbookmark"
385 383
 "  MODIFY serialid varbinary(16) NOT NULL default '',"
386 384
 "  MODIFY name varbinary(32) default NULL;",
@@ -425,8 +423,6 @@ QString("ALTER DATABASE %1 DEFAULT CHARACTER SET latin1;")
425 423
     if (dbver == "1017")
426 424
     {
427 425
         const QString updates[] = {
428  
-QString("ALTER DATABASE %1 DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;")
429  
-        .arg(gCoreContext->GetDatabaseParams().dbName),
430 426
 "ALTER TABLE dvdbookmark"
431 427
 "  DEFAULT CHARACTER SET default,"
432 428
 "  MODIFY serialid varchar(16) CHARACTER SET utf8 NOT NULL default '',"

0 notes on commit 0bc768e

Please sign in to comment.
Something went wrong with that request. Please try again.