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
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2016-08-16 21:06:10 +0000
3+++ CMakeLists.txt 2017-03-21 14:19:17 +0000
4@@ -50,6 +50,11 @@
5
6 find_program(DBUS_RUNNER dbus-test-runner)
7
8+option(TRACE_SQLITE "Print Sqlite commants to the log." off)
9+if (${TRACE_SQLITE})
10+ add_definitions(-DTRACE_SQLITE)
11+endif()
12+
13 add_definitions(-DQT_NO_KEYWORDS)
14
15 include_directories(
16
17=== modified file 'plugins/sqlite/sqlitedatabase.cpp'
18--- plugins/sqlite/sqlitedatabase.cpp 2016-11-08 19:43:53 +0000
19+++ plugins/sqlite/sqlitedatabase.cpp 2017-03-21 14:19:17 +0000
20@@ -183,6 +183,12 @@
21 return true;
22 }
23
24+
25+void trace(void *something, const char *query)
26+{
27+ qDebug() << "SQLITE TRACE:" << query;
28+}
29+
30 bool SQLiteDatabase::createOrUpdateDatabase()
31 {
32 bool create = !QFile(mDatabasePath).exists();
33@@ -199,6 +205,10 @@
34 // and also create the normalizeId function
35 sqlite3_create_function(handle, "normalizeId", 2, SQLITE_ANY, NULL, &normalizeId, NULL, NULL);
36
37+#ifdef TRACE_SQLITE
38+ sqlite3_trace(handle, &trace, NULL);
39+#endif
40+
41 parseVersionInfo();
42
43 QSqlQuery query(mDatabase);

Subscribers

People subscribed via source and target branches

to all changes: