asyncer-io / r2dbc-mysql

Reactive Relational Database Connectivity for MySQL. The official successor to mirromutth/r2dbc-mysql(dev.miku:r2dbc-mysql).
https://r2dbc.io
Apache License 2.0
184 stars 18 forks source link

[bug]Boolean bind variable is echoed back as ByteBuffer #209

Closed jchrys closed 5 months ago

jchrys commented 6 months ago

Describe the bug Boolean bind variable is echoed back as ByteBuffer

To Reproduce

System.out.println(
Flux.from(cf.create())
    .flatMap(c -> Mono.from(c.createStatement("select ?p1, true").bind(0, true).execute()))
    .flatMap(it -> it.map((r, m) -> r.get(0) + ":" + r.get(1)))
    .blockFirst()
);

It prints:

java.nio.HeapByteBuffer[pos=0 lim=1 cap=1]:1

Expected behavior it should prints 1:1

Additional context Refiled from: https://github.com/mirromutth/r2dbc-mysql/issues/178