mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-23 05:36:46 +01:00
Syntax is important
This commit is contained in:
parent
bfeac43f12
commit
93ad040936
@ -1374,7 +1374,7 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
|||||||
private void checkNameUniqueness(final Statement statement) throws SQLException {
|
private void checkNameUniqueness(final Statement statement) throws SQLException {
|
||||||
ResultSet resultSet = null;
|
ResultSet resultSet = null;
|
||||||
try {
|
try {
|
||||||
resultSet = statement.executeQuery("SHOW INDEXES"
|
resultSet = statement.executeQuery("SHOW INDEXES "
|
||||||
+ "FROM `" + tablePrefix + "users` "
|
+ "FROM `" + tablePrefix + "users` "
|
||||||
+ "WHERE Column_name='user' "
|
+ "WHERE Column_name='user' "
|
||||||
+ " AND NOT Non_unique");
|
+ " AND NOT Non_unique");
|
||||||
@ -1383,7 +1383,7 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
|||||||
}
|
}
|
||||||
resultSet.close();
|
resultSet.close();
|
||||||
mcMMO.p.getLogger().info("Updating mcMMO MySQL tables to drop name uniqueness...");
|
mcMMO.p.getLogger().info("Updating mcMMO MySQL tables to drop name uniqueness...");
|
||||||
statement.execute("ALTER TABLE `" + tablePrefix + "users`"
|
statement.execute("ALTER TABLE `" + tablePrefix + "users` "
|
||||||
+ "DROP INDEX `user`,"
|
+ "DROP INDEX `user`,"
|
||||||
+ "ADD INDEX `user` (`user`(20) ASC)");
|
+ "ADD INDEX `user` (`user`(20) ASC)");
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
|
Loading…
Reference in New Issue
Block a user