<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[184020] branches/safari-600.1.4.16-branch</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/184020">184020</a></dd>
<dt>Author</dt> <dd>bshafiei@apple.com</dd>
<dt>Date</dt> <dd>2015-05-08 15:56:33 -0700 (Fri, 08 May 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Merged <a href="http://trac.webkit.org/projects/webkit/changeset/183646">r183646</a>. rdar://problem/20840031</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari6001416branchLayoutTestsChangeLog">branches/safari-600.1.4.16-branch/LayoutTests/ChangeLog</a></li>
<li><a href="#branchessafari6001416branchLayoutTestsstoragewebsqltestauthorizerexpectedtxt">branches/safari-600.1.4.16-branch/LayoutTests/storage/websql/test-authorizer-expected.txt</a></li>
<li><a href="#branchessafari6001416branchLayoutTestsstoragewebsqltestauthorizerjs">branches/safari-600.1.4.16-branch/LayoutTests/storage/websql/test-authorizer.js</a></li>
<li><a href="#branchessafari6001416branchSourceWebCoreChangeLog">branches/safari-600.1.4.16-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari6001416branchSourceWebCoreModuleswebdatabaseDatabaseBackendBasecpp">branches/safari-600.1.4.16-branch/Source/WebCore/Modules/webdatabase/DatabaseBackendBase.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#branchessafari6001416branchLayoutTestsstoragewebsqlaltertoinfotableexpectedtxt">branches/safari-600.1.4.16-branch/LayoutTests/storage/websql/alter-to-info-table-expected.txt</a></li>
<li><a href="#branchessafari6001416branchLayoutTestsstoragewebsqlaltertoinfotablehtml">branches/safari-600.1.4.16-branch/LayoutTests/storage/websql/alter-to-info-table.html</a></li>
<li><a href="#branchessafari6001416branchLayoutTestsstoragewebsqlaltertoinfotablejs">branches/safari-600.1.4.16-branch/LayoutTests/storage/websql/alter-to-info-table.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari6001416branchLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.16-branch/LayoutTests/ChangeLog (184019 => 184020)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.16-branch/LayoutTests/ChangeLog        2015-05-08 22:54:24 UTC (rev 184019)
+++ branches/safari-600.1.4.16-branch/LayoutTests/ChangeLog        2015-05-08 22:56:33 UTC (rev 184020)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2015-05-08 Babak Shafiei <bshafiei@apple.com>
+
+ Merge r183646.
+
+ 2015-04-30 Brady Eidson <beidson@apple.com>
+
+ Javascript using WebSQL can create their own WebKit info table.
+ <rdar://problem/20688792> and https://bugs.webkit.org/show_bug.cgi?id=144466
+
+ Reviewed by Alex Christensen.
+
+ * storage/websql/alter-to-info-table-expected.txt: Added.
+ * storage/websql/alter-to-info-table.html: Added.
+ * storage/websql/alter-to-info-table.js: Added.
+
</ins><span class="cx"> 2015-04-28 Babak Shafiei <bshafiei@apple.com>
</span><span class="cx">
</span><span class="cx"> Merge r183280.
</span></span></pre></div>
<a id="branchessafari6001416branchLayoutTestsstoragewebsqlaltertoinfotableexpectedtxtfromrev183646trunkLayoutTestsstoragewebsqlaltertoinfotableexpectedtxt"></a>
<div class="copfile"><h4>Copied: branches/safari-600.1.4.16-branch/LayoutTests/storage/websql/alter-to-info-table-expected.txt (from rev 183646, trunk/LayoutTests/storage/websql/alter-to-info-table-expected.txt) (0 => 184020)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.16-branch/LayoutTests/storage/websql/alter-to-info-table-expected.txt         (rev 0)
+++ branches/safari-600.1.4.16-branch/LayoutTests/storage/websql/alter-to-info-table-expected.txt        2015-05-08 22:56:33 UTC (rev 184020)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+This tests that a tricky way to setup your own info table fails.
+CREATE TABLE statement succeeded.
+CREATE TEMP TABLE statement succeeded.
+INSERT IN TEMP TABLE statement succeeded.
+CREATE TRIGGER statement succeeded.
+ALTER TO INFO TABLE statement succeeded.
+Step 1 transaction succeeded.
+Successfully changed DB version
+Step 2 transaction succeeded.
+
</ins></span></pre></div>
<a id="branchessafari6001416branchLayoutTestsstoragewebsqlaltertoinfotablehtmlfromrev183646trunkLayoutTestsstoragewebsqlaltertoinfotablehtml"></a>
<div class="copfile"><h4>Copied: branches/safari-600.1.4.16-branch/LayoutTests/storage/websql/alter-to-info-table.html (from rev 183646, trunk/LayoutTests/storage/websql/alter-to-info-table.html) (0 => 184020)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.16-branch/LayoutTests/storage/websql/alter-to-info-table.html         (rev 0)
+++ branches/safari-600.1.4.16-branch/LayoutTests/storage/websql/alter-to-info-table.html        2015-05-08 22:56:33 UTC (rev 184020)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+<html>
+<head>
+<script src="resources/database-common.js"></script>
+<script src="alter-to-info-table.js"></script>
+</head>
+<body onload="setupAndRunTest();">
+This tests that a tricky way to setup your own info table fails.<br>
+<pre id="console">
+FAILURE: test didn't run.
+</pre>
+</body>
+</html>
</ins></span></pre></div>
<a id="branchessafari6001416branchLayoutTestsstoragewebsqlaltertoinfotablejsfromrev183646trunkLayoutTestsstoragewebsqlaltertoinfotablejs"></a>
<div class="copfile"><h4>Copied: branches/safari-600.1.4.16-branch/LayoutTests/storage/websql/alter-to-info-table.js (from rev 183646, trunk/LayoutTests/storage/websql/alter-to-info-table.js) (0 => 184020)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.16-branch/LayoutTests/storage/websql/alter-to-info-table.js         (rev 0)
+++ branches/safari-600.1.4.16-branch/LayoutTests/storage/websql/alter-to-info-table.js        2015-05-08 22:56:33 UTC (rev 184020)
</span><span class="lines">@@ -0,0 +1,112 @@
</span><ins>+function terminateTest()
+{
+ if (window.testRunner)
+ testRunner.notifyDone();
+}
+
+function logAndTerminateTest(message, error)
+{
+ log(message + ": " + error.message);
+ terminateTest();
+}
+
+function cleanup(db)
+{
+ db.transaction(function(tx) {
+ tx.executeSql("DROP TABLE IF EXISTS Results;");
+ tx.executeSql("DROP TABLE IF EXISTS TempTable;");
+ tx.executeSql("DROP TRIGGER IF EXISTS TempTrigger;");
+ },
+ function(error) {
+ logAndTerminateTest("Cleanup failed", error);
+ });
+}
+
+function statementSuccessCallback(statementType)
+{
+ log(statementType + " statement succeeded.");
+}
+
+function statementErrorCallback(statementType, error)
+{
+ log(statementType + " statement failed: " + error.message);
+ return false;
+}
+
+function executeStatement(tx, statement, operation)
+{
+ tx.executeSql(statement, [],
+ function(result) {
+ statementSuccessCallback(operation);
+ },
+ function(tx, error) {
+ return statementErrorCallback(operation, error);
+ });
+}
+
+function testCallbacks(tx)
+{
+        executeStatement(tx, "CREATE TABLE Results (Key TEXT, Value TEXT);", "CREATE TABLE");
+
+        // Create a temporary table with the same schema as __WebKitDatabaseInfoTable__ and populate it with a valid version.
+        executeStatement(tx, "CREATE TEMPORARY TABLE TempTable (key TEXT NOT NULL ON CONFLICT FAIL UNIQUE ON CONFLICT REPLACE, value TEXT NOT NULL ON CONFLICT FAIL);", "CREATE TEMP TABLE");
+        executeStatement(tx, "INSERT INTO TempTable VALUES ('WebKitDatabaseVersionKey','1.0');", "INSERT IN TEMP TABLE");
+
+ // Set up a trigger to capture changes to the table we just created.
+        executeStatement(tx, "CREATE TRIGGER TempTrigger BEFORE INSERT ON TempTable BEGIN INSERT INTO Results VALUES (NEW.key, NEW.value); END;", "CREATE TRIGGER");
+        
+        // Try to spoof that table as the info table.
+        executeStatement(tx, "ALTER TABLE TempTable RENAME TO __WebKitDatabaseInfoTable__;", "ALTER TO INFO TABLE");
+}
+
+function testStep1(db)
+{
+ db.transaction(function(tx) {
+ testCallbacks(tx);
+ },
+ function(error) {
+ logAndTerminateTest("Step 1 transaction failed", error);
+ },
+ function() {
+ log("Step 1 transaction succeeded.");
+ testStep2(db);
+ });        
+}
+
+function testStep2(db)
+{
+ // At this point there's a temporary table named the same as the internal info table.
+ // WebKit should not use it.
+ db.changeVersion('1.0', '2.0', null, function(error) {
+ log("Failed to change DB version - " + error.message);
+ },
+ function() {
+ log("Successfully changed DB version");
+ });
+
+ // If our trigger fired it will have captured the changed to the info table and put them in the results table.
+ db.transaction(function(tx) {
+ tx.executeSql("SELECT * FROM Results;", [], function(tx, results) {
+ if (results.rows.length == 0)
+ return;
+ log("The Results table actually has stuff in it, and it shouldn't");
+ var result = results.rows.item(0);
+ for (n in result)
+ log(n + " " + result[n]);
+ });
+ },
+ function(error) {
+ logAndTerminateTest("Step 2 transaction failed", error);
+ },
+ function() {
+ log("Step 2 transaction succeeded.");
+ terminateTest();
+ });        
+}
+
+function runTest()
+{
+ var db = openDatabaseWithSuffix("AlterInfoTableTest", "1.0", "Tests altering the info table", 32768);
+ cleanup(db);
+ testStep1(db);
+}
</ins></span></pre></div>
<a id="branchessafari6001416branchLayoutTestsstoragewebsqltestauthorizerexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.16-branch/LayoutTests/storage/websql/test-authorizer-expected.txt (184019 => 184020)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.16-branch/LayoutTests/storage/websql/test-authorizer-expected.txt        2015-05-08 22:54:24 UTC (rev 184019)
+++ branches/safari-600.1.4.16-branch/LayoutTests/storage/websql/test-authorizer-expected.txt        2015-05-08 22:56:33 UTC (rev 184020)
</span><span class="lines">@@ -15,6 +15,9 @@
</span><span class="cx"> SQLITE_PRAGMA statement failed: could not prepare statement (23 not authorized)
</span><span class="cx"> SQLITE_ALTER_TABLE statement succeeded.
</span><span class="cx"> SQLITE_ALTER_TABLE statement succeeded.
</span><ins>+SQLITE_ALTER_INFO_TABLE statement failed: could not prepare statement (23 not authorized)
+SQLITE_ALTER_INFO_TABLE statement failed: could not prepare statement (23 not authorized)
+SQLITE_ALTER_INFO_TABLE statement failed: could not prepare statement (1 there is already another table or index with this name: __WebKitDatabaseInfoTable__)
</ins><span class="cx"> SQLITE_TRANSACTION statement failed: could not prepare statement (23 not authorized)
</span><span class="cx"> SQLITE_ATTACH statement failed: could not prepare statement (23 not authorized)
</span><span class="cx"> SQLITE_DETACH statement failed: could not prepare statement (23 not authorized)
</span><span class="lines">@@ -52,6 +55,9 @@
</span><span class="cx"> SQLITE_PRAGMA statement failed: could not prepare statement (23 not authorized)
</span><span class="cx"> SQLITE_ALTER_TABLE statement failed: could not prepare statement (23 not authorized)
</span><span class="cx"> SQLITE_ALTER_TABLE statement failed: could not prepare statement (1 no such table: TestTable)
</span><ins>+SQLITE_ALTER_INFO_TABLE statement failed: could not prepare statement (23 not authorized)
+SQLITE_ALTER_INFO_TABLE statement failed: could not prepare statement (23 not authorized)
+SQLITE_ALTER_INFO_TABLE statement failed: could not prepare statement (1 there is already another table or index with this name: __WebKitDatabaseInfoTable__)
</ins><span class="cx"> SQLITE_TRANSACTION statement failed: could not prepare statement (23 not authorized)
</span><span class="cx"> SQLITE_ATTACH statement failed: could not prepare statement (23 not authorized)
</span><span class="cx"> SQLITE_DETACH statement failed: could not prepare statement (23 not authorized)
</span></span></pre></div>
<a id="branchessafari6001416branchLayoutTestsstoragewebsqltestauthorizerjs"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.16-branch/LayoutTests/storage/websql/test-authorizer.js (184019 => 184020)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.16-branch/LayoutTests/storage/websql/test-authorizer.js        2015-05-08 22:54:24 UTC (rev 184019)
+++ branches/safari-600.1.4.16-branch/LayoutTests/storage/websql/test-authorizer.js        2015-05-08 22:56:33 UTC (rev 184020)
</span><span class="lines">@@ -73,6 +73,11 @@
</span><span class="cx"> // Rename the table back to its original name
</span><span class="cx"> executeStatement(tx, "ALTER TABLE TestTable RENAME To Test;", "SQLITE_ALTER_TABLE");
</span><span class="cx">
</span><ins>+ // These should always fail, as nobody gets to mess with the info table.
+ executeStatement(tx, "ALTER TABLE __WebKitDatabaseInfoTable__ RENAME TO TestTable;", "SQLITE_ALTER_INFO_TABLE");
+ executeStatement(tx, "ALTER TABLE main.__WebKitDatabaseInfoTable__ RENAME TO TestTable;", "SQLITE_ALTER_INFO_TABLE");
+ executeStatement(tx, "ALTER TABLE Test RENAME TO __WebKitDatabaseInfoTable__;", "SQLITE_ALTER_INFO_TABLE");
+
</ins><span class="cx"> executeStatement(tx, "BEGIN TRANSACTION;", "SQLITE_TRANSACTION");
</span><span class="cx"> executeStatement(tx, "ATTACH main AS TestMain;", "SQLITE_ATTACH");
</span><span class="cx"> executeStatement(tx, "DETACH TestMain;", "SQLITE_DETACH");
</span></span></pre></div>
<a id="branchessafari6001416branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.16-branch/Source/WebCore/ChangeLog (184019 => 184020)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.16-branch/Source/WebCore/ChangeLog        2015-05-08 22:54:24 UTC (rev 184019)
+++ branches/safari-600.1.4.16-branch/Source/WebCore/ChangeLog        2015-05-08 22:56:33 UTC (rev 184020)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2015-05-08 Babak Shafiei <bshafiei@apple.com>
+
+ Merge r183646.
+
+ 2015-04-30 Brady Eidson <beidson@apple.com>
+
+ Javascript using WebSQL can create their own WebKit info table.
+ <rdar://problem/20688792> and https://bugs.webkit.org/show_bug.cgi?id=144466
+
+ Reviewed by Alex Christensen.
+
+ Test: storage/websql/alter-to-info-table.html
+
+ * Modules/webdatabase/DatabaseBackendBase.cpp:
+ (WebCore::DatabaseBackendBase::databaseInfoTableName): Return the info table name.
+ (WebCore::fullyQualifiedInfoTableName): Append "main." to the info table name.
+ (WebCore::DatabaseBackendBase::DatabaseBackendBase): Use the fully qualified name.
+ (WebCore::DatabaseBackendBase::performOpenAndVerify): Ditto.
+ (WebCore::DatabaseBackendBase::getVersionFromDatabase): Ditto.
+ (WebCore::DatabaseBackendBase::setVersionInDatabase): Ditto.
+
</ins><span class="cx"> 2015-04-28 Babak Shafiei <bshafiei@apple.com>
</span><span class="cx">
</span><span class="cx"> Merge r183280.
</span></span></pre></div>
<a id="branchessafari6001416branchSourceWebCoreModuleswebdatabaseDatabaseBackendBasecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.16-branch/Source/WebCore/Modules/webdatabase/DatabaseBackendBase.cpp (184019 => 184020)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.16-branch/Source/WebCore/Modules/webdatabase/DatabaseBackendBase.cpp        2015-05-08 22:54:24 UTC (rev 184019)
+++ branches/safari-600.1.4.16-branch/Source/WebCore/Modules/webdatabase/DatabaseBackendBase.cpp        2015-05-08 22:56:33 UTC (rev 184020)
</span><span class="lines">@@ -85,8 +85,27 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> static const char versionKey[] = "WebKitDatabaseVersionKey";
</span><del>-static const char infoTableName[] = "__WebKitDatabaseInfoTable__";
</del><ins>+static const char unqualifiedInfoTableName[] = "__WebKitDatabaseInfoTable__";
</ins><span class="cx">
</span><ins>+const char* DatabaseBackendBase::databaseInfoTableName()
+{
+ return unqualifiedInfoTableName;
+}
+
+static const char* fullyQualifiedInfoTableName()
+{
+ static const char qualifier[] = "main.";
+ static char qualifiedName[sizeof(qualifier) + sizeof(unqualifiedInfoTableName) - 1];
+
+ static std::once_flag onceFlag;
+ std::call_once(onceFlag, []{
+ char* newDestination = stpcpy(qualifiedName, qualifier);
+ strcpy(newDestination, unqualifiedInfoTableName);
+ });
+
+ return qualifiedName;
+}
+
</ins><span class="cx"> static String formatErrorMessage(const char* message, int sqliteErrorCode, const char* sqliteErrorMessage)
</span><span class="cx"> {
</span><span class="cx"> return String::format("%s (%d %s)", message, sqliteErrorCode, sqliteErrorMessage);
</span><span class="lines">@@ -194,12 +213,6 @@
</span><span class="cx"> return guid;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-// static
-const char* DatabaseBackendBase::databaseInfoTableName()
-{
- return infoTableName;
-}
-
</del><span class="cx"> #if !LOG_DISABLED || !ERROR_DISABLED
</span><span class="cx"> String DatabaseBackendBase::databaseDebugName() const
</span><span class="cx"> {
</span><span class="lines">@@ -220,7 +233,7 @@
</span><span class="cx"> {
</span><span class="cx"> m_contextThreadSecurityOrigin = m_databaseContext->securityOrigin()->isolatedCopy();
</span><span class="cx">
</span><del>- m_databaseAuthorizer = DatabaseAuthorizer::create(infoTableName);
</del><ins>+ m_databaseAuthorizer = DatabaseAuthorizer::create(unqualifiedInfoTableName);
</ins><span class="cx">
</span><span class="cx"> if (m_name.isNull())
</span><span class="cx"> m_name = emptyString();
</span><span class="lines">@@ -350,7 +363,7 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- String tableName(infoTableName);
</del><ins>+ String tableName(unqualifiedInfoTableName);
</ins><span class="cx"> if (!m_sqliteDatabase.tableExists(tableName)) {
</span><span class="cx"> m_new = true;
</span><span class="cx">
</span><span class="lines">@@ -449,7 +462,7 @@
</span><span class="cx">
</span><span class="cx"> bool DatabaseBackendBase::getVersionFromDatabase(String& version, bool shouldCacheVersion)
</span><span class="cx"> {
</span><del>- String query(String("SELECT value FROM ") + infoTableName + " WHERE key = '" + versionKey + "';");
</del><ins>+ String query(String("SELECT value FROM ") + fullyQualifiedInfoTableName() + " WHERE key = '" + versionKey + "';");
</ins><span class="cx">
</span><span class="cx"> m_databaseAuthorizer->disable();
</span><span class="cx">
</span><span class="lines">@@ -469,7 +482,7 @@
</span><span class="cx"> {
</span><span class="cx"> // The INSERT will replace an existing entry for the database with the new version number, due to the UNIQUE ON CONFLICT REPLACE
</span><span class="cx"> // clause in the CREATE statement (see Database::performOpenAndVerify()).
</span><del>- String query(String("INSERT INTO ") + infoTableName + " (key, value) VALUES ('" + versionKey + "', ?);");
</del><ins>+ String query(String("INSERT INTO ") + fullyQualifiedInfoTableName() + " (key, value) VALUES ('" + versionKey + "', ?);");
</ins><span class="cx">
</span><span class="cx"> m_databaseAuthorizer->disable();
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>