2 # Check that conflicting unique IDs triggers failover to alternative query
9 Tmp-String-0 := "%{sql_postgresql:DELETE FROM radacct WHERE AcctSessionId = '00000001'}"
19 # Insert the Accounting-Request start
21 sql_postgresql.accounting
30 # Check the database has at least one row
33 Tmp-Integer-0 := "%{sql_postgresql:SELECT count(*) FROM radacct WHERE AcctSessionId = '00000001'}"
35 if (!&Tmp-Integer-0 || (&Tmp-Integer-0 != 1)) {
43 # Check acctsessiontime matches the value in the request
46 Tmp-Integer-0 := "%{sql_postgresql:SELECT acctsessiontime FROM radacct WHERE AcctSessionId = '00000001'}"
48 if (!&Tmp-Integer-0 || (&Tmp-Integer-0 != 0)) {
56 # Change acctsessiontime and verify it's updated
59 Connect-Info = 'updated'
61 sql_postgresql.accounting
69 Tmp-String-0 := "%{sql_postgresql:SELECT connectinfo_start FROM radacct WHERE AcctSessionId = '00000001'}"
71 if (!&Tmp-Integer-0 || (&Tmp-String-0 != 'updated')) {