xbt icon indicating copy to clipboard operation
xbt copied to clipboard

replace left in xbt_peers since it's a reserved word

Open VisiGod opened this issue 4 years ago • 3 comments

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...

VisiGod avatar Aug 19 '20 23:08 VisiGod

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

OlafvdSpek avatar Aug 20 '20 07:08 OlafvdSpek

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.

VisiGod avatar Aug 20 '20 08:08 VisiGod

It might be nice to have it configurable indeed..

OlafvdSpek avatar Aug 20 '20 10:08 OlafvdSpek