Hi, I just wanted to cross-post this just in case: I noticed if I run this query (designed to reproduce this issue) against MySQL 5.7 (running on Google Cloud SQL) it crashes the connection and that "bad connection" stays in the connection pool thereafter:
(SELECT ? AS `bugCauser`, (SELECT NULL FROM (SELECT NULL) AS `tableB`) AS `countSelected` FROM (SELECT * FROM (SELECT NULL) AS `tableA` ORDER BY (SELECT NULL FROM (SELECT NULL) AS `tableB`)) AS `tableA` ORDER BY `countSelected`)
... Results: - run via Go on MySQL 5.7 server — FAILS! - run via SQL client on MySQL 5.7 server - OK - run via Go on MySQL 5.6 server — OK - run via SQL client on MySQL 5.6 server - OK
... It crashes 100% of the time against 5.7 for me. I posted this issue in the Go SQL Driver issue, but can it please be confirmed that this is not a GORM issue? https://github.com/go-sql-driver/mysql/issues/554
Comment From: benguild
Reported to MySQL as bug with prepared queries on server v5.7 release.
Comment From: 9bany
+1