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

Row.get("cert") returns VARBINARY as String with version 1.1.1-rc #28

Closed
mp911de opened this issue Jan 24, 2022 · 1 comment
Closed

Comments

@mp911de
Copy link

mp911de commented Jan 24, 2022

Calling Row.get("<name of varbinary column>") returns VARBINARY values as String instead using byte[]. In previous versions, this has worked.

Example SQL:

CREATE TABLE legoset (
    id          integer PRIMARY KEY,
    name        varchar(255) NOT NULL,
    manual      integer NULL,
    cert        varbinary(255) NULL
) ENGINE=InnoDB;

Reproducer:

Connection connection = Mono.from(connectionFactory.create()).block();

Flux.from(connection.createStatement("SELECT * FROM legoset").execute())
		.flatMap(it -> it.map(readable -> {

			Object cert = readable.get("cert");

			System.out.println(cert); // should be byte[]
			return cert;
		})).blockLast();

JDBC driver returns byte[5] correctly:

value = byte[5]
 0 = 1
 1 = 2
 2 = 3
 3 = 4
 4 = 5
@rusher rusher closed this as completed Dec 21, 2022
@rusher
Copy link
Collaborator

rusher commented Dec 21, 2022

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

2 participants