FPtje / DarkRP

DarkRP, a non-serious roleplay gamemode for Garry's Mod.
https://darkrp.miraheze.org
MIT License
463 stars 710 forks source link

MySQL error with darkrp_position #2799

Closed mcNuggets1 closed 6 years ago

mcNuggets1 commented 6 years ago

Description of the bug

Jail positions are bugged for some reason. I didn't modify anything about the table in mysql.

How to make the bug happen

Unknown

Lua errors

Lua Error: gamemodes/darkrp/gamemode/libraries/mysqlite/mysqlite.lua:265: Unknown column 'T' in 'where clause' (DELETE FROM darkrp_position WHERE type = 'J' AND map = "rp_retribution_v2";)

Why the developer of DarkRP is responsible for this issue

darkrp_position table

FPtje commented 6 years ago

Head to the forums: forum.darkrp.com

mcNuggets1 commented 6 years ago

Wait, no. This is not a an issue I provoked at all.

I didn't do anything to the mysql tables.

This error occured by themself and prevents deleting positions. I couldn't yet reproduce why it happens, but it has something to do with jail positions, I think.

FPtje commented 6 years ago

The error happens either when setting a jail position, or when an addon does something weird.

The error is whack too, by the way. The 'T' referenced by the error does not occur in the query. Could you do some debugging?

mcNuggets1 commented 6 years ago

I did most of my addons myself. Nowhere I fuck with the darkrp mysql tables.

I will try to reproduce, this issue is ancient btw, I had it happen over years, I just cleared the columns all the time.

mcNuggets1 commented 6 years ago

I have reset the entire table now, let's see if it occurs again, will report back sooner or later.

FPtje commented 6 years ago

Does the Lua error have a stack trace by the way?

mcNuggets1 commented 6 years ago

No. It's a mysql error.

FPtje commented 6 years ago

It should be re-thrown as a Lua error, which should give a stack trace

mcNuggets1 commented 6 years ago

no, it's just that.

https://i.imgur.com/vhmBYxy.png

FPtje commented 6 years ago

That may be your log file being inaccurate. Turn on lua_log_sv 1 and see if that shows the entire stack trace.

Kefta commented 6 years ago

Stack traces aren't displayed for errors in callbacks since it's originating from a C call.

FPtje commented 6 years ago

Ah that's true. I'm still mystified by the error itself though. Column T, What column T?

mcNuggets1 commented 6 years ago

It's back.

Lua Error: gamemodes/darkrp/gamemode/libraries/mysqlite/mysqlite.lua:265: Unknown column 'T' in 'where clause' (DELETE FROM darkrp_position WHERE type = 'J' AND map = "rp_bangclaw";)

I didn't do anything.