OlafvdSpek / xbt

High-Performance BitTorrent Tracker
GNU General Public License v3.0
175 stars 67 forks source link

replace left in xbt_peers since it's a reserved word #93

Open VisiGod opened 4 years ago

VisiGod commented 4 years ago

I would like to know if it's possible to replace the left field in xbt_peers with something else (left1 i.e.) since left is a reserved word for MySQL/MariaDB and it's impossible to update the tables via scripting.

The field is used on the tracker in the following files: tracker.cpp tracker.h tracker_input.cpp tracker_input.h transaction.cpp xbt_tracker.sql (not really used for compilation but it's the DB schema)

Note1: I think there's a restrition due to the bittorrent protocol itself use of the "left" field but wanted to know if there are alternatives...

OlafvdSpek commented 4 years ago

Table names can be quoted with backticks, doesn't that solve the problem in a script?

VisiGod commented 4 years ago

I know, just wanted to make sure the db was more standard. The left can be used to overcome that.

You may close the ticket if you do not wish to go on with it.

OlafvdSpek commented 4 years ago

It might be nice to have it configurable indeed..