<!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>[184025] branches/safari-600.7-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/184025">184025</a></dd>
<dt>Author</dt> <dd>bshafiei@apple.com</dd>
<dt>Date</dt> <dd>2015-05-08 16:13:13 -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/20840113</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari6007branchLayoutTestsChangeLog">branches/safari-600.7-branch/LayoutTests/ChangeLog</a></li>
<li><a href="#branchessafari6007branchLayoutTestsstoragewebsqltestauthorizerexpectedtxt">branches/safari-600.7-branch/LayoutTests/storage/websql/test-authorizer-expected.txt</a></li>
<li><a href="#branchessafari6007branchLayoutTestsstoragewebsqltestauthorizerjs">branches/safari-600.7-branch/LayoutTests/storage/websql/test-authorizer.js</a></li>
<li><a href="#branchessafari6007branchSourceWebCoreChangeLog">branches/safari-600.7-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari6007branchSourceWebCoreModuleswebdatabaseDatabaseBackendBasecpp">branches/safari-600.7-branch/Source/WebCore/Modules/webdatabase/DatabaseBackendBase.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#branchessafari6007branchLayoutTestsstoragewebsqlaltertoinfotableexpectedtxt">branches/safari-600.7-branch/LayoutTests/storage/websql/alter-to-info-table-expected.txt</a></li>
<li><a href="#branchessafari6007branchLayoutTestsstoragewebsqlaltertoinfotablehtml">branches/safari-600.7-branch/LayoutTests/storage/websql/alter-to-info-table.html</a></li>
<li><a href="#branchessafari6007branchLayoutTestsstoragewebsqlaltertoinfotablejs">branches/safari-600.7-branch/LayoutTests/storage/websql/alter-to-info-table.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari6007branchLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.7-branch/LayoutTests/ChangeLog (184024 => 184025)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.7-branch/LayoutTests/ChangeLog        2015-05-08 23:11:56 UTC (rev 184024)
+++ branches/safari-600.7-branch/LayoutTests/ChangeLog        2015-05-08 23:13:13 UTC (rev 184025)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2015-05-08  Babak Shafiei  &lt;bshafiei@apple.com&gt;
+
+        Merge r183646.
+
+    2015-04-30  Brady Eidson  &lt;beidson@apple.com&gt;
+
+            Javascript using WebSQL can create their own WebKit info table.
+            &lt;rdar://problem/20688792&gt; 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-29  Andy Estes  &lt;aestes@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Merge r183106, r183108, r183135, r183137, r183171, r183437, r183444, r183445, r183464, r183470, r183484, and r183549.
</span></span></pre></div>
<a id="branchessafari6007branchLayoutTestsstoragewebsqlaltertoinfotableexpectedtxtfromrev183646trunkLayoutTestsstoragewebsqlaltertoinfotableexpectedtxt"></a>
<div class="copfile"><h4>Copied: branches/safari-600.7-branch/LayoutTests/storage/websql/alter-to-info-table-expected.txt (from rev 183646, trunk/LayoutTests/storage/websql/alter-to-info-table-expected.txt) (0 => 184025)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.7-branch/LayoutTests/storage/websql/alter-to-info-table-expected.txt                                (rev 0)
+++ branches/safari-600.7-branch/LayoutTests/storage/websql/alter-to-info-table-expected.txt        2015-05-08 23:13:13 UTC (rev 184025)
</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="branchessafari6007branchLayoutTestsstoragewebsqlaltertoinfotablehtmlfromrev183646trunkLayoutTestsstoragewebsqlaltertoinfotablehtml"></a>
<div class="copfile"><h4>Copied: branches/safari-600.7-branch/LayoutTests/storage/websql/alter-to-info-table.html (from rev 183646, trunk/LayoutTests/storage/websql/alter-to-info-table.html) (0 => 184025)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.7-branch/LayoutTests/storage/websql/alter-to-info-table.html                                (rev 0)
+++ branches/safari-600.7-branch/LayoutTests/storage/websql/alter-to-info-table.html        2015-05-08 23:13:13 UTC (rev 184025)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;resources/database-common.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;alter-to-info-table.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body onload=&quot;setupAndRunTest();&quot;&gt;
+This tests that a tricky way to setup your own info table fails.&lt;br&gt;
+&lt;pre id=&quot;console&quot;&gt;
+FAILURE: test didn't run.
+&lt;/pre&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="branchessafari6007branchLayoutTestsstoragewebsqlaltertoinfotablejsfromrev183646trunkLayoutTestsstoragewebsqlaltertoinfotablejs"></a>
<div class="copfile"><h4>Copied: branches/safari-600.7-branch/LayoutTests/storage/websql/alter-to-info-table.js (from rev 183646, trunk/LayoutTests/storage/websql/alter-to-info-table.js) (0 => 184025)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.7-branch/LayoutTests/storage/websql/alter-to-info-table.js                                (rev 0)
+++ branches/safari-600.7-branch/LayoutTests/storage/websql/alter-to-info-table.js        2015-05-08 23:13:13 UTC (rev 184025)
</span><span class="lines">@@ -0,0 +1,112 @@
</span><ins>+function terminateTest()
+{
+    if (window.testRunner)
+        testRunner.notifyDone();
+}
+
+function logAndTerminateTest(message, error)
+{
+    log(message + &quot;: &quot; + error.message);
+    terminateTest();
+}
+
+function cleanup(db)
+{
+    db.transaction(function(tx) {
+        tx.executeSql(&quot;DROP TABLE IF EXISTS Results;&quot;);
+        tx.executeSql(&quot;DROP TABLE IF EXISTS TempTable;&quot;);
+        tx.executeSql(&quot;DROP TRIGGER IF EXISTS TempTrigger;&quot;);
+    },
+    function(error) { 
+        logAndTerminateTest(&quot;Cleanup failed&quot;, error); 
+    });
+}
+
+function statementSuccessCallback(statementType)
+{
+    log(statementType + &quot; statement succeeded.&quot;);
+}
+
+function statementErrorCallback(statementType, error)
+{
+    log(statementType + &quot; statement failed: &quot; + 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, &quot;CREATE TABLE Results (Key TEXT, Value TEXT);&quot;, &quot;CREATE TABLE&quot;);
+
+        // Create a temporary table with the same schema as __WebKitDatabaseInfoTable__ and populate it with a valid version.
+        executeStatement(tx, &quot;CREATE TEMPORARY TABLE TempTable (key TEXT NOT NULL ON CONFLICT FAIL UNIQUE ON CONFLICT REPLACE, value TEXT NOT NULL ON CONFLICT FAIL);&quot;, &quot;CREATE TEMP TABLE&quot;);
+        executeStatement(tx, &quot;INSERT INTO TempTable VALUES ('WebKitDatabaseVersionKey','1.0');&quot;, &quot;INSERT IN TEMP TABLE&quot;);
+
+    // Set up a trigger to capture changes to the table we just created.
+        executeStatement(tx, &quot;CREATE TRIGGER TempTrigger BEFORE INSERT ON TempTable BEGIN INSERT INTO Results VALUES (NEW.key, NEW.value); END;&quot;, &quot;CREATE TRIGGER&quot;);
+        
+        // Try to spoof that table as the info table.
+        executeStatement(tx, &quot;ALTER TABLE TempTable RENAME TO __WebKitDatabaseInfoTable__;&quot;, &quot;ALTER TO INFO TABLE&quot;);
+}
+
+function testStep1(db)
+{
+    db.transaction(function(tx) {
+        testCallbacks(tx);
+    },
+    function(error) { 
+        logAndTerminateTest(&quot;Step 1 transaction failed&quot;, error); 
+    },
+    function() {
+        log(&quot;Step 1 transaction succeeded.&quot;);
+        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(&quot;Failed to change DB version - &quot; + error.message);
+    }, 
+    function() {
+        log(&quot;Successfully changed DB version&quot;);
+    });
+    
+    // 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(&quot;SELECT * FROM Results;&quot;, [], function(tx, results) {
+            if (results.rows.length == 0)
+                return;
+            log(&quot;The Results table actually has stuff in it, and it shouldn't&quot;);
+            var result = results.rows.item(0);
+            for (n in result)
+                log(n + &quot; &quot; + result[n]);
+        }); 
+    },
+    function(error) { 
+        logAndTerminateTest(&quot;Step 2 transaction failed&quot;, error); 
+    },
+    function() { 
+        log(&quot;Step 2 transaction succeeded.&quot;);
+        terminateTest(); 
+    });        
+}
+
+function runTest()
+{
+    var db = openDatabaseWithSuffix(&quot;AlterInfoTableTest&quot;, &quot;1.0&quot;, &quot;Tests altering the info table&quot;, 32768);
+    cleanup(db);
+    testStep1(db);
+}
</ins></span></pre></div>
<a id="branchessafari6007branchLayoutTestsstoragewebsqltestauthorizerexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-600.7-branch/LayoutTests/storage/websql/test-authorizer-expected.txt (184024 => 184025)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.7-branch/LayoutTests/storage/websql/test-authorizer-expected.txt        2015-05-08 23:11:56 UTC (rev 184024)
+++ branches/safari-600.7-branch/LayoutTests/storage/websql/test-authorizer-expected.txt        2015-05-08 23:13:13 UTC (rev 184025)
</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="branchessafari6007branchLayoutTestsstoragewebsqltestauthorizerjs"></a>
<div class="modfile"><h4>Modified: branches/safari-600.7-branch/LayoutTests/storage/websql/test-authorizer.js (184024 => 184025)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.7-branch/LayoutTests/storage/websql/test-authorizer.js        2015-05-08 23:11:56 UTC (rev 184024)
+++ branches/safari-600.7-branch/LayoutTests/storage/websql/test-authorizer.js        2015-05-08 23:13:13 UTC (rev 184025)
</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, &quot;ALTER TABLE TestTable RENAME To Test;&quot;, &quot;SQLITE_ALTER_TABLE&quot;);
</span><span class="cx"> 
</span><ins>+    // These should always fail, as nobody gets to mess with the info table.
+    executeStatement(tx, &quot;ALTER TABLE __WebKitDatabaseInfoTable__ RENAME TO TestTable;&quot;, &quot;SQLITE_ALTER_INFO_TABLE&quot;);
+    executeStatement(tx, &quot;ALTER TABLE main.__WebKitDatabaseInfoTable__ RENAME TO TestTable;&quot;, &quot;SQLITE_ALTER_INFO_TABLE&quot;);
+    executeStatement(tx, &quot;ALTER TABLE Test RENAME TO __WebKitDatabaseInfoTable__;&quot;, &quot;SQLITE_ALTER_INFO_TABLE&quot;);
+
</ins><span class="cx">     executeStatement(tx, &quot;BEGIN TRANSACTION;&quot;, &quot;SQLITE_TRANSACTION&quot;);
</span><span class="cx">     executeStatement(tx, &quot;ATTACH main AS TestMain;&quot;, &quot;SQLITE_ATTACH&quot;);
</span><span class="cx">     executeStatement(tx, &quot;DETACH TestMain;&quot;, &quot;SQLITE_DETACH&quot;);
</span></span></pre></div>
<a id="branchessafari6007branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.7-branch/Source/WebCore/ChangeLog (184024 => 184025)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.7-branch/Source/WebCore/ChangeLog        2015-05-08 23:11:56 UTC (rev 184024)
+++ branches/safari-600.7-branch/Source/WebCore/ChangeLog        2015-05-08 23:13:13 UTC (rev 184025)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2015-05-08  Babak Shafiei  &lt;bshafiei@apple.com&gt;
+
+        Merge r183646.
+
+    2015-04-30  Brady Eidson  &lt;beidson@apple.com&gt;
+
+            Javascript using WebSQL can create their own WebKit info table.
+            &lt;rdar://problem/20688792&gt; 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 &quot;main.&quot; 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-05-01  Babak Shafiei  &lt;bshafiei@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Merge r183524.
</span></span></pre></div>
<a id="branchessafari6007branchSourceWebCoreModuleswebdatabaseDatabaseBackendBasecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.7-branch/Source/WebCore/Modules/webdatabase/DatabaseBackendBase.cpp (184024 => 184025)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.7-branch/Source/WebCore/Modules/webdatabase/DatabaseBackendBase.cpp        2015-05-08 23:11:56 UTC (rev 184024)
+++ branches/safari-600.7-branch/Source/WebCore/Modules/webdatabase/DatabaseBackendBase.cpp        2015-05-08 23:13:13 UTC (rev 184025)
</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[] = &quot;WebKitDatabaseVersionKey&quot;;
</span><del>-static const char infoTableName[] = &quot;__WebKitDatabaseInfoTable__&quot;;
</del><ins>+static const char unqualifiedInfoTableName[] = &quot;__WebKitDatabaseInfoTable__&quot;;
</ins><span class="cx"> 
</span><ins>+const char* DatabaseBackendBase::databaseInfoTableName()
+{
+    return unqualifiedInfoTableName;
+}
+
+static const char* fullyQualifiedInfoTableName()
+{
+    static const char qualifier[] = &quot;main.&quot;;
+    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(&quot;%s (%d %s)&quot;, 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-&gt;securityOrigin()-&gt;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&amp; version, bool shouldCacheVersion)
</span><span class="cx"> {
</span><del>-    String query(String(&quot;SELECT value FROM &quot;) + infoTableName +  &quot; WHERE key = '&quot; + versionKey + &quot;';&quot;);
</del><ins>+    String query(String(&quot;SELECT value FROM &quot;) + fullyQualifiedInfoTableName() +  &quot; WHERE key = '&quot; + versionKey + &quot;';&quot;);
</ins><span class="cx"> 
</span><span class="cx">     m_databaseAuthorizer-&gt;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(&quot;INSERT INTO &quot;) + infoTableName +  &quot; (key, value) VALUES ('&quot; + versionKey + &quot;', ?);&quot;);
</del><ins>+    String query(String(&quot;INSERT INTO &quot;) + fullyQualifiedInfoTableName() +  &quot; (key, value) VALUES ('&quot; + versionKey + &quot;', ?);&quot;);
</ins><span class="cx"> 
</span><span class="cx">     m_databaseAuthorizer-&gt;disable();
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>