sk89q/worldguard — pull request #214 by frost-byte (2012-07-18 04:47:58+00:00)
Title: MySQL update for a problem with Location Flags

This is a solution for the problem that some of us seem to be having when we try to use MySQL databases.

The default configuration has the value column, in the region_flag table, set as VARCHAR(256). A SQLException is thrown and appears in the server log, basically indicating that the string used to store the vector for the location isn't being saved/parsed properly.

By altering the table from VARCHAR to BLOB, the /region flag id spawn/teleport then works. But the changes don't persist between server restarts. I've updated the MySQLDatabase class to use a few stream classes to properly handle how an Object get's serialized and stored. (Otherwise you just get an unuseable value and the location can't be read and is removed)