I get an SQL EXCEPTION if I attempt to despawn entities that posses an underscore, when entities of the same name exist that have a space instead of an underscore when using /despawn_all or /despawn_sector. (/destroy_entity, and /destroy_entity_dock work ok).
This has the potential to be an exploit on scripted servers, as it provides a way for players to potentially 'block' the deletion of certain objects for scripted events.
server stack trace:
[2017-04-01 10:20:11] [ADMIN COMMAND] DESPAWN_SECTOR from RegisteredClient: Jeryia (1) connected: true params: [test_thing, all, true, 100, 100, -100]
[2017-04-01 10:20:11] [DESPAWN] using escaped matching string 'test_thing%'
[2017-04-01 10:20:11] java.sql.SQLSyntaxErrorException: unknown token:
[2017-04-01 10:20:11] at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
[2017-04-01 10:20:11] at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
[2017-04-01 10:20:11] at org.hsqldb.jdbc.JDBCStatement.fetchResult(Unknown Source)
[2017-04-01 10:20:11] at org.hsqldb.jdbc.JDBCStatement.executeUpdate(Unknown Source)
[2017-04-01 10:20:11] at org.schema.game.common.controller.database.DatabaseIndex.a(SourceFile:3219)
[2017-04-01 10:20:11] at obfuscated.axH.q(SourceFile:1244)
[2017-04-01 10:20:11] at obfuscated.axH.a(SourceFile:1600)
[2017-04-01 10:20:11] at org.schema.game.server.controller.GameServerController.update(SourceFile:1021)
[2017-04-01 10:20:11] at org.schema.schine.network.server.ServerController.run(SourceFile:275)
[2017-04-01 10:20:11] at java.lang.Thread.run(Thread.java:745)
[2017-04-01 10:20:11] Caused by: org.hsqldb.HsqlException: unknown token:
[2017-04-01 10:20:11] at org.hsqldb.error.Error.error(Unknown Source)
[2017-04-01 10:20:11] at org.hsqldb.error.Error.error(Unknown Source)
[2017-04-01 10:20:11] at org.hsqldb.ParserBase.read(Unknown Source)
[2017-04-01 10:20:11] at org.hsqldb.ParserDQL.readColumnOrFunctionExpression(Unknown Source)
[2017-04-01 10:20:11] at org.hsqldb.ParserDQL.XreadSimpleValueExpressionPrimary(Unknown Source)
[2017-04-01 10:20:11] at org.hsqldb.ParserDQL.XreadAllTypesValueExpressionPrimary(Unknown Source)
[2017-04-01 10:20:11] at org.hsqldb.ParserDQL.XreadAllTypesPrimary(Unknown Source)
[2017-04-01 10:20:11] at org.hsqldb.ParserDQL.XreadAllTypesFactor(Unknown Source)
[2017-04-01 10:20:11] at org.hsqldb.ParserDQL.XreadAllTypesTerm(Unknown Source)
[2017-04-01 10:20:11] at org.hsqldb.ParserDQL.XreadAllTypesCommonValueExpression(Unknown Source)
[2017-04-01 10:20:11] at org.hsqldb.ParserDQL.XreadRowOrCommonValueExpression(Unknown Source)
[2017-04-01 10:20:11] at org.hsqldb.ParserDQL.XreadRowValuePredicand(Unknown Source)
[2017-04-01 10:20:11] at org.hsqldb.ParserDQL.XreadPredicateRightPart(Unknown Source)
[2017-04-01 10:20:11] at org.hsqldb.ParserDQL.XreadBooleanPrimaryOrNull(Unknown Source)
[2017-04-01 10:20:11] at org.hsqldb.ParserDQL.XreadBooleanTestOrNull(Unknown Source)
[2017-04-01 10:20:11] at org.hsqldb.ParserDQL.XreadBooleanFactorOrNull(Unknown Source)
[2017-04-01 10:20:11] at org.hsqldb.ParserDQL.XreadBooleanTermOrNull(Unknown Source)
[2017-04-01 10:20:11] at org.hsqldb.ParserDQL.XreadBooleanValueExpression(Unknown Source)
[2017-04-01 10:20:11] at org.hsqldb.ParserDML.XreadAndResolveBooleanValueExpression(Unknown Source)
[2017-04-01 10:20:11] at org.hsqldb.ParserDML.compileDeleteStatement(Unknown Source)
[2017-04-01 10:20:11] at org.hsqldb.ParserCommand.compilePart(Unknown Source)
[2017-04-01 10:20:11] at org.hsqldb.ParserCommand.compileStatements(Unknown Source)
[2017-04-01 10:20:11] at org.hsqldb.Session.executeDirectStatement(Unknown Source)
[2017-04-01 10:20:11] at org.hsqldb.Session.execute(Unknown Source)
[2017-04-01 10:20:11] ... 8 more
[2017-04-01 10:20:11] [SEND][SERVERMESSAGE] [ADMIN COMMAND] [ERROR] SQL EXCEPTION to RegisteredClient: Jeryia (1) connected: true