| Index: Source/core/platform/sql/SQLiteDatabase.cpp
|
| diff --git a/Source/core/platform/sql/SQLiteDatabase.cpp b/Source/core/platform/sql/SQLiteDatabase.cpp
|
| index aa41021792cb459a6a1d30fa375d06d0bdb8cac0..5035f1e171dcceedea8e74c70735d6726a2014bd 100644
|
| --- a/Source/core/platform/sql/SQLiteDatabase.cpp
|
| +++ b/Source/core/platform/sql/SQLiteDatabase.cpp
|
| @@ -95,7 +95,7 @@ bool SQLiteDatabase::open(const String& filename, bool forWebSQLDatabase)
|
| else
|
| m_openErrorMessage = "sqlite_open returned null";
|
|
|
| - if (!SQLiteStatement(*this, ASCIILiteral("PRAGMA temp_store = MEMORY;")).executeCommand())
|
| + if (!SQLiteStatement(*this, "PRAGMA temp_store = MEMORY;").executeCommand())
|
| LOG_ERROR("SQLite database could not set temp_store to memory");
|
|
|
| return isOpen();
|
| @@ -142,9 +142,9 @@ bool SQLiteDatabase::isInterrupted()
|
| void SQLiteDatabase::setFullsync(bool fsync)
|
| {
|
| if (fsync)
|
| - executeCommand(ASCIILiteral("PRAGMA fullfsync = 1;"));
|
| + executeCommand("PRAGMA fullfsync = 1;");
|
| else
|
| - executeCommand(ASCIILiteral("PRAGMA fullfsync = 0;"));
|
| + executeCommand("PRAGMA fullfsync = 0;");
|
| }
|
|
|
| int64_t SQLiteDatabase::maximumSize()
|
| @@ -154,7 +154,7 @@ int64_t SQLiteDatabase::maximumSize()
|
| {
|
| MutexLocker locker(m_authorizerLock);
|
| enableAuthorizer(false);
|
| - SQLiteStatement statement(*this, ASCIILiteral("PRAGMA max_page_count"));
|
| + SQLiteStatement statement(*this, "PRAGMA max_page_count");
|
| maxPageCount = statement.getColumnInt64(0);
|
| enableAuthorizer(true);
|
| }
|
| @@ -196,7 +196,7 @@ int SQLiteDatabase::pageSize()
|
| MutexLocker locker(m_authorizerLock);
|
| enableAuthorizer(false);
|
|
|
| - SQLiteStatement statement(*this, ASCIILiteral("PRAGMA page_size"));
|
| + SQLiteStatement statement(*this, "PRAGMA page_size");
|
| m_pageSize = statement.getColumnInt(0);
|
|
|
| enableAuthorizer(true);
|
| @@ -213,7 +213,7 @@ int64_t SQLiteDatabase::freeSpaceSize()
|
| MutexLocker locker(m_authorizerLock);
|
| enableAuthorizer(false);
|
| // Note: freelist_count was added in SQLite 3.4.1.
|
| - SQLiteStatement statement(*this, ASCIILiteral("PRAGMA freelist_count"));
|
| + SQLiteStatement statement(*this, "PRAGMA freelist_count");
|
| freelistCount = statement.getColumnInt64(0);
|
| enableAuthorizer(true);
|
| }
|
| @@ -228,7 +228,7 @@ int64_t SQLiteDatabase::totalSize()
|
| {
|
| MutexLocker locker(m_authorizerLock);
|
| enableAuthorizer(false);
|
| - SQLiteStatement statement(*this, ASCIILiteral("PRAGMA page_count"));
|
| + SQLiteStatement statement(*this, "PRAGMA page_count");
|
| pageCount = statement.getColumnInt64(0);
|
| enableAuthorizer(true);
|
| }
|
| @@ -281,7 +281,7 @@ bool SQLiteDatabase::tableExists(const String& tablename)
|
|
|
| void SQLiteDatabase::clearAllTables()
|
| {
|
| - String query = ASCIILiteral("SELECT name FROM sqlite_master WHERE type='table';");
|
| + String query = "SELECT name FROM sqlite_master WHERE type='table';";
|
| Vector<String> tables;
|
| if (!SQLiteStatement(*this, query).returnTextResults(0, tables)) {
|
| LOG(SQLDatabase, "Unable to retrieve list of tables from database");
|
| @@ -298,7 +298,7 @@ void SQLiteDatabase::clearAllTables()
|
|
|
| int SQLiteDatabase::runVacuumCommand()
|
| {
|
| - if (!executeCommand(ASCIILiteral("VACUUM;")))
|
| + if (!executeCommand("VACUUM;"))
|
| LOG(SQLDatabase, "Unable to vacuum database - %s", lastErrorMsg());
|
| return lastError();
|
| }
|
| @@ -308,7 +308,7 @@ int SQLiteDatabase::runIncrementalVacuumCommand()
|
| MutexLocker locker(m_authorizerLock);
|
| enableAuthorizer(false);
|
|
|
| - if (!executeCommand(ASCIILiteral("PRAGMA incremental_vacuum")))
|
| + if (!executeCommand("PRAGMA incremental_vacuum"))
|
| LOG(SQLDatabase, "Unable to run incremental vacuum - %s", lastErrorMsg());
|
|
|
| enableAuthorizer(true);
|
| @@ -468,7 +468,7 @@ bool SQLiteDatabase::isAutoCommitOn() const
|
|
|
| bool SQLiteDatabase::turnOnIncrementalAutoVacuum()
|
| {
|
| - SQLiteStatement statement(*this, ASCIILiteral("PRAGMA auto_vacuum"));
|
| + SQLiteStatement statement(*this, "PRAGMA auto_vacuum");
|
| int autoVacuumMode = statement.getColumnInt(0);
|
| int error = lastError();
|
|
|
| @@ -485,10 +485,10 @@ bool SQLiteDatabase::turnOnIncrementalAutoVacuum()
|
| case AutoVacuumIncremental:
|
| return true;
|
| case AutoVacuumFull:
|
| - return executeCommand(ASCIILiteral("PRAGMA auto_vacuum = 2"));
|
| + return executeCommand("PRAGMA auto_vacuum = 2");
|
| case AutoVacuumNone:
|
| default:
|
| - if (!executeCommand(ASCIILiteral("PRAGMA auto_vacuum = 2")))
|
| + if (!executeCommand("PRAGMA auto_vacuum = 2"))
|
| return false;
|
| runVacuumCommand();
|
| error = lastError();
|
|
|