twitter / finagle

A fault tolerant, protocol-agnostic RPC system

Home Page:https://twitter.github.io/finagle

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Migration to Mysql 8.0

RicoGit opened this issue · comments

Describe the bug

After updating Mysql server from 5.7.25 to 8.0 some queries started to fail with error:
java.lang.UnsupportedOperationException: LongBlob is not supported!

To Reproduce
Mysql server version: 5.7.25
finagle-mysql version: 21.8.0
Query:

val result = mysqlClient.client.select(s"select group_concat('1', '2', '3')")(_.values(0))
Await.result(result) shouldBe List(StringValue("123"))

Result: Ok, test passed as expected.

Mysql server version: 8.0
finagle-mysql version: 21.8.0
Query:

val result = mysqlClient.client.select(s"select group_concat('1', '2', '3')")(_.values(0))
Await.result(result) shouldBe List(StringValue("123"))

Result:

LongBlob is not supported!
java.lang.UnsupportedOperationException: LongBlob is not supported!
	at com.twitter.finagle.mysql.StringEncodedRow.$anonfun$values$1(StringEncodedRow.scala:69)
	at scala.collection.immutable.Vector1.map(Vector.scala:1872)
	at scala.collection.immutable.Vector1.map(Vector.scala:375)
	at com.twitter.finagle.mysql.StringEncodedRow.values$lzycompute(StringEncodedRow.scala:25)
	at com.twitter.finagle.mysql.StringEncodedRow.values(StringEncodedRow.scala:23)

image

Field decoded with field type 251 but should be 253.

Expected behavior
Error LongBlob is not supported! shouldn't be thrown, because finagle-mysql 21.8.0, supports Mysql 8.0 and should provide the same behavior for Mysql 8.0 and 5.7.

Environment
finagle-mysql version: 21.8.0
Ubuntu 20.04.4 LTS
build tool: SBT 1.6.1

@RicoGit, thanks for reporting; we can reproduce the issue locally.

What we found so far is the packets received are different between MySQL 5 and MySQL 8 servers.
Are you aware of any protocol/spec changes? We are still looking into.