Restore fix lost in merge: [LY-121929] Asset Processor Error : Sqlite - Failed to prepare statement. (#2202)
Fixed unresolved product dependency query to be able to handle much larger queries (tested with 100,000 products) by storing queried products in a temp table first Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
This commit is contained in:
@@ -302,7 +302,10 @@ namespace AzToolsFramework
|
||||
return false;
|
||||
}
|
||||
|
||||
bindCallback(statement);
|
||||
if (bindCallback)
|
||||
{
|
||||
bindCallback(statement);
|
||||
}
|
||||
|
||||
res = sqlite3_step(statement);
|
||||
bool validResult = res == SQLITE_DONE;
|
||||
@@ -495,7 +498,7 @@ namespace AzToolsFramework
|
||||
|
||||
int res = sqlite3_prepare_v2(db, m_parentPrototype->GetSqlText().c_str(), (int)m_parentPrototype->GetSqlText().length() + 1, &m_statement, NULL);
|
||||
|
||||
AZ_Error("SQLiteConnection", res == SQLITE_OK, "Statement::PrepareFirstTime: failed! %s ( prototype is '%s'). Error code returned is %d.", sqlite3_errmsg(db), m_parentPrototype->GetSqlText().c_str(), res);
|
||||
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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user