mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-11-01 00:10:12 +01:00
Fix exception when storing Extension boolean values with MySQL
Query was using reserved keyword 'stored' as a table alias Changed it to use 'indb' as the alias Affects issues: - Fixed #3508
This commit is contained in:
parent
9c43287f60
commit
670ef2aff3
@ -152,13 +152,13 @@ public class StorePlayerBooleanResultTransaction extends ThrowawayTransaction {
|
||||
// Need to select:
|
||||
// Provider IDs where condition of this provider is met
|
||||
@Language("SQL") String selectUnsatisfiedProviderIds = "SELECT unfulfilled.id " +
|
||||
"FROM plan_extension_providers stored " +
|
||||
"FROM plan_extension_providers indb " +
|
||||
"JOIN plan_extension_providers unfulfilled ON unfulfilled.condition_name=" +
|
||||
// This gives the unfulfilled condition, eg. if value is true not_condition is unfulfilled.
|
||||
(value ? "CONCAT('not_', " : "") + "stored.provided_condition" + (value ? ")" : "") +
|
||||
" AND stored.plugin_id=unfulfilled.plugin_id" +
|
||||
" WHERE stored.id=" + ExtensionProviderTable.STATEMENT_SELECT_PROVIDER_ID +
|
||||
" AND stored.provided_condition IS NOT NULL";
|
||||
(value ? "CONCAT('not_', " : "") + "indb.provided_condition" + (value ? ")" : "") +
|
||||
" AND indb.plugin_id=unfulfilled.plugin_id" +
|
||||
" WHERE indb.id=" + ExtensionProviderTable.STATEMENT_SELECT_PROVIDER_ID +
|
||||
" AND indb.provided_condition IS NOT NULL";
|
||||
|
||||
return extractIds(selectUnsatisfiedProviderIds);
|
||||
}
|
||||
@ -178,13 +178,13 @@ public class StorePlayerBooleanResultTransaction extends ThrowawayTransaction {
|
||||
// Need to select:
|
||||
// Provider IDs where condition of this provider is met
|
||||
@Language("SQL") String selectUnsatisfiedProviderIds = "SELECT unfulfilled.id " +
|
||||
"FROM plan_extension_providers stored " +
|
||||
"FROM plan_extension_providers indb " +
|
||||
"JOIN plan_extension_tables unfulfilled ON unfulfilled.condition_name=" +
|
||||
// This gives the unfulfilled condition, eg. if value is true not_condition is unfulfilled.
|
||||
(value ? "CONCAT('not_', " : "") + "stored.provided_condition" + (value ? ")" : "") +
|
||||
" AND stored.plugin_id=unfulfilled.plugin_id" +
|
||||
" WHERE stored.id=" + ExtensionProviderTable.STATEMENT_SELECT_PROVIDER_ID +
|
||||
" AND stored.provided_condition IS NOT NULL";
|
||||
(value ? "CONCAT('not_', " : "") + "indb.provided_condition" + (value ? ")" : "") +
|
||||
" AND indb.plugin_id=unfulfilled.plugin_id" +
|
||||
" WHERE indb.id=" + ExtensionProviderTable.STATEMENT_SELECT_PROVIDER_ID +
|
||||
" AND indb.provided_condition IS NOT NULL";
|
||||
|
||||
return extractIds(selectUnsatisfiedProviderIds);
|
||||
}
|
||||
|
@ -131,13 +131,13 @@ public class StoreServerBooleanResultTransaction extends ThrowawayTransaction {
|
||||
// Need to select:
|
||||
// Provider IDs where condition of this provider is met
|
||||
@Language("SQL") String selectUnsatisfiedProviderIds = "SELECT unfulfilled.id " +
|
||||
"FROM plan_extension_providers stored " +
|
||||
"FROM plan_extension_providers indb " +
|
||||
"JOIN plan_extension_providers unfulfilled ON unfulfilled.condition_name=" +
|
||||
// This gives the unfulfilled condition, eg. if value is true not_condition is unfulfilled.
|
||||
(value ? "CONCAT('not_', " : "") + "stored.provided_condition" + (value ? ")" : "") +
|
||||
" AND stored.plugin_id=unfulfilled.plugin_id" +
|
||||
" WHERE stored.id=" + ExtensionProviderTable.STATEMENT_SELECT_PROVIDER_ID +
|
||||
" AND stored.provided_condition IS NOT NULL";
|
||||
(value ? "CONCAT('not_', " : "") + "indb.provided_condition" + (value ? ")" : "") +
|
||||
" AND indb.plugin_id=unfulfilled.plugin_id" +
|
||||
" WHERE indb.id=" + ExtensionProviderTable.STATEMENT_SELECT_PROVIDER_ID +
|
||||
" AND indb.provided_condition IS NOT NULL";
|
||||
|
||||
return extractIds(selectUnsatisfiedProviderIds);
|
||||
}
|
||||
@ -163,13 +163,13 @@ public class StoreServerBooleanResultTransaction extends ThrowawayTransaction {
|
||||
// Need to select:
|
||||
// Provider IDs where condition of this provider is met
|
||||
@Language("SQL") String selectUnsatisfiedProviderIds = "SELECT unfulfilled.id " +
|
||||
"FROM plan_extension_providers stored " +
|
||||
"FROM plan_extension_providers indb " +
|
||||
"JOIN plan_extension_tables unfulfilled ON unfulfilled.condition_name=" +
|
||||
// This gives the unfulfilled condition, eg. if value is true not_condition is unfulfilled.
|
||||
(value ? "CONCAT('not_', " : "") + "stored.provided_condition" + (value ? ")" : "") +
|
||||
" AND stored.plugin_id=unfulfilled.plugin_id" +
|
||||
" WHERE stored.id=" + ExtensionProviderTable.STATEMENT_SELECT_PROVIDER_ID +
|
||||
" AND stored.provided_condition IS NOT NULL";
|
||||
(value ? "CONCAT('not_', " : "") + "indb.provided_condition" + (value ? ")" : "") +
|
||||
" AND indb.plugin_id=unfulfilled.plugin_id" +
|
||||
" WHERE indb.id=" + ExtensionProviderTable.STATEMENT_SELECT_PROVIDER_ID +
|
||||
" AND indb.provided_condition IS NOT NULL";
|
||||
|
||||
return extractIds(selectUnsatisfiedProviderIds);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user