• Marco Bubke's avatar
    Sqlite: Add locking for sqlite transactions · 62313559
    Marco Bubke authored
    If you use the database in a multi-threaded environment, you must always
    your statements in transactions.
    
    For read-only statements, you use DeferredTransaction and write statements
    you use ImmediateTransaction. If you mix read and write statements you have
    to use ImmediateTransaction. Don't use DeferredTransaction because it leads
    to undefined behavior.
    
    Change-Id: Ida298a20f33423c8da09e768a7b658dd8e918f46
    Reviewed-by: Tim Jenssen's avatarTim Jenssen <tim.jenssen@qt.io>
    Reviewed-by: Marco Bubke's avatarMarco Bubke <marco.bubke@qt.io>
    62313559
sqlitetransaction-test.cpp 3.75 KB