Merge lp:~phablet-team/history-service/trace_sqlite into lp:history-service/staging

Proposed by Gustavo Pichorim Boiko
Status: Merged
Approved by: Tiago Salem Herrmann
Approved revision: 229
Merged at revision: 264
Proposed branch: lp:~phablet-team/history-service/trace_sqlite
Merge into: lp:history-service/staging
Prerequisite: lp:~phablet-team/history-service/no_participants_on_threads
Diff against target: 43 lines (+15/-0)
2 files modified
CMakeLists.txt (+5/-0)
plugins/sqlite/sqlitedatabase.cpp (+10/-0)
To merge this branch: bzr merge lp:~phablet-team/history-service/trace_sqlite
Reviewer Review Type Date Requested Status
Tiago Salem Herrmann (community) Approve
PS Jenkins bot continuous-integration Pending
system-apps-ci-bot continuous-integration Pending
Review via email: mp+320500@code.launchpad.net

This proposal supersedes a proposal from 2016-06-17.

Commit message

Make it possible to debug sqlite commands.

Description of the change

Make it possible to debug sqlite commands.

To post a comment you must log in.
Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote : Posted in a previous version of this proposal
Download full text (3.3 KiB)

FAILED: Continuous integration, rev:228
https://jenkins.canonical.com/system-apps/job/lp-history-service-ci/3/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build/635
    SUCCESS: https://jenkins.canonical.com/system-apps/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=default/83
    FAILURE: https://jenkins.canonical.com/system-apps/job/test-0-autopkgtest/label=phone-armhf,release=xenial+overlay,testname=default/83/console
    FAILURE: https://jenkins.canonical.com/system-apps/job/test-0-autopkgtest/label=phone-armhf,release=yakkety,testname=default/83/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/635
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=vivid+overlay/604
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=xenial+overlay/604
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=yakkety/604
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/597
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/597/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/597
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/597/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/597
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/597/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/597
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/597/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/597
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/597/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/597
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/597/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/597
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/597/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/597
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/597/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/597
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpk...

Read more...

review: Needs Fixing (continuous-integration)
Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote : Posted in a previous version of this proposal

PASSED: Continuous integration, rev:229
https://jenkins.canonical.com/system-apps/job/lp-history-service-ci/1/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build/2330
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/2329
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2151
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2151/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2151
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2151/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2151
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2151/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2151
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2151/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2151
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2151/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2151
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2151/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-history-service-ci/1/rebuild

review: Approve (continuous-integration)
Revision history for this message
Tiago Salem Herrmann (tiagosh) wrote :

looks good. this will be useful for debugging.
thanks.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2016-08-16 21:06:10 +0000
+++ CMakeLists.txt 2017-03-21 14:19:17 +0000
@@ -50,6 +50,11 @@
5050
51find_program(DBUS_RUNNER dbus-test-runner)51find_program(DBUS_RUNNER dbus-test-runner)
5252
53option(TRACE_SQLITE "Print Sqlite commants to the log." off)
54if (${TRACE_SQLITE})
55 add_definitions(-DTRACE_SQLITE)
56endif()
57
53add_definitions(-DQT_NO_KEYWORDS)58add_definitions(-DQT_NO_KEYWORDS)
5459
55include_directories(60include_directories(
5661
=== modified file 'plugins/sqlite/sqlitedatabase.cpp'
--- plugins/sqlite/sqlitedatabase.cpp 2016-11-08 19:43:53 +0000
+++ plugins/sqlite/sqlitedatabase.cpp 2017-03-21 14:19:17 +0000
@@ -183,6 +183,12 @@
183 return true;183 return true;
184}184}
185185
186
187void trace(void *something, const char *query)
188{
189 qDebug() << "SQLITE TRACE:" << query;
190}
191
186bool SQLiteDatabase::createOrUpdateDatabase()192bool SQLiteDatabase::createOrUpdateDatabase()
187{193{
188 bool create = !QFile(mDatabasePath).exists();194 bool create = !QFile(mDatabasePath).exists();
@@ -199,6 +205,10 @@
199 // and also create the normalizeId function205 // and also create the normalizeId function
200 sqlite3_create_function(handle, "normalizeId", 2, SQLITE_ANY, NULL, &normalizeId, NULL, NULL);206 sqlite3_create_function(handle, "normalizeId", 2, SQLITE_ANY, NULL, &normalizeId, NULL, NULL);
201207
208#ifdef TRACE_SQLITE
209 sqlite3_trace(handle, &trace, NULL);
210#endif
211
202 parseVersionInfo();212 parseVersionInfo();
203213
204 QSqlQuery query(mDatabase);214 QSqlQuery query(mDatabase);

Subscribers

People subscribed via source and target branches

to all changes: