Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mysql 5.7: 'SELECT list is not in GROUP BY clause' in createMissingTablesAndColumns() #71

Closed
crazyproger opened this issue Nov 25, 2016 · 0 comments

Comments

@crazyproger
Copy link
Contributor

With Mysql 5.7 last part of createMissingTablesAndColumns() fails with this error:

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expression #4 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'information_schema.s.NON_UNIQUE' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
	at com.mysql.jdbc.Util.getInstance(Util.java:408)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:943)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3970)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3906)
	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2524)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2677)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2545)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2503)
	at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1369)
	at org.jetbrains.exposed.sql.vendors.MysqlDialect.existingIndices(Mysql.kt:87)
	at org.jetbrains.exposed.sql.QueriesKt.checkExcessiveIndices(Queries.kt:114)
	at org.jetbrains.exposed.sql.QueriesKt.checkMappingConsistence(Queries.kt:90)
	at org.jetbrains.exposed.sql.SchemaUtils$createMissingTablesAndColumns$$inlined$with$lambda$1.invoke(SchemaUtils.kt:130)
	at org.jetbrains.exposed.sql.SchemaUtils$createMissingTablesAndColumns$$inlined$with$lambda$1.invoke(SchemaUtils.kt:8)
	at org.jetbrains.exposed.sql.SchemaUtils.withDataBaseLock(SchemaUtils.kt:149)
	at org.jetbrains.exposed.sql.SchemaUtils.createMissingTablesAndColumns(SchemaUtils.kt:108)

this is because by default 5.7 ships with sql_mode=only_full_group_by

crazyproger added a commit to crazyproger/Exposed that referenced this issue Nov 25, 2016
@Tapac Tapac closed this as completed in 676db85 Nov 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant