DevotedMC / BanStick

Player / IP / CIDR / VPN / Shared connection banning with a vengeance. Built for Spigot 1.16.4
http://www.devotedmc.com
BSD 3-Clause "New" or "Revised" License
1 stars 4 forks source link

Bizarre SQL error we can't figure out #13

Closed GavJenks closed 4 years ago

GavJenks commented 4 years ago

We had 6 exclusions in bs_exclusion, and types a command "/untangle [4 names]" It said in game in green "it worked!" text that it added 4 exclusions and deleted 6 exclusions.

But in the logs, it says

[09:15:37] [Server thread/ERROR]: [BanStick] Removal of Exclusion failed: 171 com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for th e right syntax to use near '* FROM bs_exclusion WHERE eid = 171' at line 1

the only part of the code mentioning "removal of exclusion failed" though is BSExclusion class, which only mentioned a DELETE statement, not a SELECT, and no "*", so ... wat?

and why would it have a problem here anyway? And why would it report that it worked when it didn't?

ProgrammerDan commented 4 years ago

These are excellent questions. I wonder if @Maxopoly has any insight?

On Wed, Mar 4, 2020 at 7:18 PM GavJenks notifications@github.com wrote:

We had 6 exclusions in bs_exclusion, and types a command "/untangle [4 names]" It said in game in green "it worked!" text that it added 4 exclusions and deleted 6 exclusions.

But in the logs, it says

[09:15:37] [Server thread/ERROR]: [BanStick] Removal of Exclusion failed: 171 com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for th e right syntax to use near '* FROM bs_exclusion WHERE eid = 171' at line 1

the only part of the code mentioning "removal of exclusion failed" though is BSExclusion class, which only mentioned a DELETE statement, not a SELECT, and no "*", so ... wat?

and why would it have a problem here anyway? And why would it report that it worked when it didn't?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/DevotedMC/BanStick/issues/13?email_source=notifications&email_token=AADD5DVNK5RX52WDE74AAU3RF3VT5A5CNFSM4LB62EEKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4ISTUHXA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADD5DW4TBD7OCK3MHCBNXTRF3VT5ANCNFSM4LB62EEA .

GavJenks commented 4 years ago

Followup: We have determined that it only affects DB, the hashmap goes through and it works until next restart

Maxopoly commented 4 years ago

Fixed almost a year ago https://github.com/DevotedMC/BanStick/commit/a8fb6707c976dd64c57bc28e2863eafd9e26f38b

ProgrammerDan commented 4 years ago

Just need a new build then, eh?

On Fri, Mar 6, 2020, 17:59 Maxopoly notifications@github.com wrote:

Fixed almost a year ago a8fb670 https://github.com/DevotedMC/BanStick/commit/a8fb6707c976dd64c57bc28e2863eafd9e26f38b

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/DevotedMC/BanStick/issues/13?email_source=notifications&email_token=AADD5DVNSPLXJFQEWCDHDM3RGF55ZA5CNFSM4LB62EEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEODD5TA#issuecomment-596000460, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADD5DSA4QTIPKFHS5SGISTRGF55ZANCNFSM4LB62EEA .

Maxopoly commented 4 years ago

I would assume so

GavJenks commented 4 years ago

yup that worked, sorry!