From c1b53f1284e814932724642d2f4c8e706387aef3 Mon Sep 17 00:00:00 2001 From: amzn-mike <80125227+amzn-mike@users.noreply.github.com> Date: Wed, 2 Feb 2022 11:04:27 -0600 Subject: [PATCH] [LYN-4034] Asset Processor: Sqlite inclusivity fix (#7291) * Update sqlite package for windows Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com> * Add assert to make sure sqlite header and lib version match Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com> * Update linux Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com> * Update Builting Package / Mac for Sqlite 3.37.2-rev1 Signed-off-by: spham <82231385+spham-amzn@users.noreply.github.com> * Re-add newline at end of file Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com> * Inclusivity: change sqlite_master to sqlite_schema alias Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com> Co-authored-by: spham <82231385+spham-amzn@users.noreply.github.com> --- .../AzToolsFramework/SQLite/SQLiteConnection.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/SQLite/SQLiteConnection.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/SQLite/SQLiteConnection.cpp index 9e2a458d97..35ff0a88f7 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/SQLite/SQLiteConnection.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/SQLite/SQLiteConnection.cpp @@ -349,7 +349,7 @@ namespace AzToolsFramework return false; } - StatementPrototype stmt("SELECT COUNT(*) FROM sqlite_master WHERE type='table' AND name=:1;"); + StatementPrototype stmt("SELECT COUNT(*) FROM sqlite_schema WHERE type='table' AND name=:1;"); Statement* execute = stmt.Prepare(m_db); // execute now belongs to stmt and will die when stmt leaves scope. if (!execute->Prepared()) { @@ -501,7 +501,7 @@ namespace AzToolsFramework // https://www.sqlite.org/c3ref/prepare.html ^^^^^^^^^ int res = sqlite3_prepare_v2(db, m_parentPrototype->GetSqlText().c_str(), (int)m_parentPrototype->GetSqlText().length() + 1, &m_statement, NULL); - + AZ_Assert(res == SQLITE_OK, "Statement::PrepareFirstTime: failed! %s ( prototype is '%s'). Error code returned is %d.", sqlite3_errmsg(db), m_parentPrototype->GetSqlText().c_str(), res); return ((res == SQLITE_OK)&&(m_statement)); } @@ -703,7 +703,7 @@ namespace AzToolsFramework int res = sqlite3_clear_bindings(m_statement); AZ_Assert(res == SQLITE_OK, "Statement::sqlite3_clear_bindings: failed!"); return (res == SQLITE_OK); - + } int Statement::GetNamedParamIdx(const char* name)