Ticket #8585: mysql-5.5.patch

File mysql-5.5.patch, 7.9 KB (added by kormoc, 15 months ago)

First run at #8585

  • mythtv/libs/libmyth/programinfo.cpp

    diff --git a/mythtv/libs/libmyth/programinfo.cpp b/mythtv/libs/libmyth/programinfo.cpp
    index 8c8991a..8325f82 100644
    a b bool ProgramInfo::LoadProgramFromRecorded( 
    15891589        "WHERE r.chanid    = :CHANID AND " 
    15901590        "      r.starttime = :RECSTARTTS"); 
    15911591    query.bindValue(":CHANID",     _chanid); 
    1592     query.bindValue(":RECSTARTTS", _recstartts); 
     1592    query.bindValue(":RECSTARTTS", _recstartts.toString("yyyy-MM-dd hh:mm:ss")); 
    15931593 
    15941594    if (!query.exec()) 
    15951595    { 
    void ProgramInfo::UpdateLastDelete(bool setTime) const 
    26692669    } 
    26702670    else 
    26712671    { 
    2672         query.prepare("UPDATE record SET last_delete = '0000-00-00T00:00:00' " 
     2672        query.prepare("UPDATE record SET last_delete = '0000-00-00 00:00:00' " 
    26732673                      "WHERE recordid = :RECORDID"); 
    26742674    } 
    26752675    query.bindValue(":RECORDID", recordid); 
    void ProgramInfo::SaveMarkupMap( 
    28882888                          " (chanid, starttime, mark, type)" 
    28892889                          " VALUES ( :CHANID , :STARTTIME , :MARK , :TYPE );"); 
    28902890            query.bindValue(":CHANID", chanid); 
    2891             query.bindValue(":STARTTIME", recstartts); 
     2891            query.bindValue(":STARTTIME", recstartts.toString("yyyy-MM-dd hh:mm:ss")); 
    28922892        } 
    28932893        query.bindValue(":MARK", (quint64)frame); 
    28942894        query.bindValue(":TYPE", mark_type); 
    void ProgramInfo::SaveAspect( 
    32883288                    " VALUES" 
    32893289                    " ( :CHANID, :STARTTIME, :MARK, :TYPE, :DATA);"); 
    32903290    query.bindValue(":CHANID", chanid); 
    3291     query.bindValue(":STARTTIME", recstartts); 
     3291    query.bindValue(":STARTTIME", recstartts.toString("yyyy-MM-dd hh:mm:ss")); 
    32923292 
    32933293    query.bindValue(":MARK", (quint64)frame); 
    32943294    query.bindValue(":TYPE", type); 
    void ProgramInfo::SaveFrameRate(uint64_t frame, uint framerate) 
    33173317                  "    VALUES" 
    33183318                  " ( :CHANID, :STARTTIME, :MARK, :TYPE, :DATA);"); 
    33193319    query.bindValue(":CHANID", chanid); 
    3320     query.bindValue(":STARTTIME", recstartts); 
     3320    query.bindValue(":STARTTIME", recstartts.toString("yyyy-MM-dd hh:mm:ss")); 
    33213321    query.bindValue(":MARK", (quint64)frame); 
    33223322    query.bindValue(":TYPE", MARK_VIDEO_RATE); 
    33233323    query.bindValue(":DATA", framerate); 
    void ProgramInfo::SaveTotalDuration(int64_t duration) 
    33513351                  "    VALUES" 
    33523352                  " ( :CHANID, :STARTTIME, 0, :TYPE, :DATA);"); 
    33533353    query.bindValue(":CHANID", chanid); 
    3354     query.bindValue(":STARTTIME", recstartts); 
     3354    query.bindValue(":STARTTIME", recstartts.toString("yyyy-MM-dd hh:mm:ss")); 
    33553355    query.bindValue(":TYPE", MARK_DURATION_MS); 
    33563356    query.bindValue(":DATA", (uint)(duration / 1000)); 
    33573357 
    void ProgramInfo::SaveResolution(uint64_t frame, uint width, uint height) 
    33753375                  "    VALUES" 
    33763376                  " ( :CHANID, :STARTTIME, :MARK, :TYPE, :DATA);"); 
    33773377    query.bindValue(":CHANID", chanid); 
    3378     query.bindValue(":STARTTIME", recstartts); 
     3378    query.bindValue(":STARTTIME", recstartts.toString("yyyy-MM-dd hh:mm:ss")); 
    33793379    query.bindValue(":MARK", (quint64)frame); 
    33803380    query.bindValue(":TYPE", MARK_VIDEO_WIDTH); 
    33813381    query.bindValue(":DATA", width); 
    void ProgramInfo::SaveResolution(uint64_t frame, uint width, uint height) 
    33883388                  "    VALUES" 
    33893389                  " ( :CHANID, :STARTTIME, :MARK, :TYPE, :DATA);"); 
    33903390    query.bindValue(":CHANID", chanid); 
    3391     query.bindValue(":STARTTIME", recstartts); 
     3391    query.bindValue(":STARTTIME", recstartts.toString("yyyy-MM-dd hh:mm:ss")); 
    33923392    query.bindValue(":MARK", (quint64)frame); 
    33933393    query.bindValue(":TYPE", MARK_VIDEO_HEIGHT); 
    33943394    query.bindValue(":DATA", height); 
  • mythtv/libs/libmythtv/dbcheck.cpp

    diff --git a/mythtv/libs/libmythtv/dbcheck.cpp b/mythtv/libs/libmythtv/dbcheck.cpp
    index fa43d1a..f21ec29 100644
    a b NULL 
    20192019"UPDATE settings SET value = 'MythFillGrabberSuggestsTime' " 
    20202020    "WHERE value = 'HonorGrabberNextSuggestedMythfilldatabaseRunTime';", 
    20212021"UPDATE settings SET value = 'MythFillSuggestedRunTime', " 
    2022     "    data = '1970-01-01T00:00:00' " 
     2022    "    data = '1970-01-01 00:00:00' " 
    20232023    "WHERE value = 'NextSuggestedMythfilldatabaseRun';", 
    20242024NULL 
    20252025}; 
  • mythtv/programs/mythbackend/scheduler.cpp

    diff --git a/mythtv/programs/mythbackend/scheduler.cpp b/mythtv/programs/mythbackend/scheduler.cpp
    index bd81323..76b5308 100644
    a b void Scheduler::UpdateRecStatus(RecordingInfo *pginfo) 
    532532        { 
    533533            if (p->GetRecordingStatus() != pginfo->GetRecordingStatus()) 
    534534            { 
    535                 VERBOSE(VB_IMPORTANT,  
     535                VERBOSE(VB_IMPORTANT, 
    536536                    QString("Updating status for %1 on cardid %2 (%3 => %4)") 
    537537                        .arg(p->toString(ProgramInfo::kTitleSubtitle)) 
    538538                        .arg(p->GetCardID()) 
    539                         .arg(toString(p->GetRecordingStatus(),  
     539                        .arg(toString(p->GetRecordingStatus(), 
    540540                                      p->GetRecordingRuleType())) 
    541                         .arg(toString(pginfo->GetRecordingStatus(),  
     541                        .arg(toString(pginfo->GetRecordingStatus(), 
    542542                                      p->GetRecordingRuleType()))); 
    543                 bool resched =  
     543                bool resched = 
    544544                    ((p->GetRecordingStatus() != rsRecording && 
    545545                      p->GetRecordingStatus() != rsTuning) || 
    546546                     (pginfo->GetRecordingStatus() != rsRecording && 
    void Scheduler::UpdateRecStatus(uint cardid, uint chanid, 
    577577 
    578578            if (p->GetRecordingStatus() != recstatus) 
    579579            { 
    580                 VERBOSE(VB_IMPORTANT,  
     580                VERBOSE(VB_IMPORTANT, 
    581581                    QString("Updating status for %1 on cardid %2 (%3 => %4)") 
    582582                        .arg(p->toString(ProgramInfo::kTitleSubtitle)) 
    583583                        .arg(p->GetCardID()) 
    584                         .arg(toString(p->GetRecordingStatus(),  
     584                        .arg(toString(p->GetRecordingStatus(), 
    585585                                      p->GetRecordingRuleType())) 
    586                         .arg(toString(recstatus,  
     586                        .arg(toString(recstatus, 
    587587                                      p->GetRecordingRuleType()))); 
    588                 bool resched =  
     588                bool resched = 
    589589                    ((p->GetRecordingStatus() != rsRecording && 
    590590                      p->GetRecordingStatus() != rsTuning) || 
    591591                     (recstatus != rsRecording && 
    void Scheduler::UpdateNextRecord(void) 
    14461446            if (nextRecMap[recid].isNull() || !next_record.isValid()) 
    14471447            { 
    14481448                subquery.prepare("UPDATE record " 
    1449                                  "SET next_record = '0000-00-00T00:00:00' " 
     1449                                 "SET next_record = '0000-00-00 00:00:00' " 
    14501450                                 "WHERE recordid = :RECORDID;"); 
    14511451                subquery.bindValue(":RECORDID", recid); 
    14521452            } 
    void Scheduler::UpdateNextRecord(void) 
    14551455                subquery.prepare("UPDATE record SET next_record = :NEXTREC " 
    14561456                                 "WHERE recordid = :RECORDID;"); 
    14571457                subquery.bindValue(":RECORDID", recid); 
    1458                 subquery.bindValue(":NEXTREC", nextRecMap[recid]); 
     1458                subquery.bindValue(":NEXTREC", nextRecMap[recid].toString("yyyy-MM-dd hh:mm:ss")); 
    14591459            } 
    14601460            if (!subquery.exec()) 
    14611461                MythDB::DBError("Update next_record", subquery); 
    static bool comp_storage_perc_free_space(FileSystemInfo *a, FileSystemInfo *b) 
    38763876    if (b->totalSpaceKB == 0) 
    38773877        return true; 
    38783878 
    3879     if ((a->freeSpaceKB * 100.0) / a->totalSpaceKB >  
     3879    if ((a->freeSpaceKB * 100.0) / a->totalSpaceKB > 
    38803880        (b->freeSpaceKB * 100.0) / b->totalSpaceKB) 
    38813881        return true; 
    38823882