dbeaver / dbeaver/dbeaver

Auto-generated script for BLOB update won't work if executed manually but the commit itself is fine

Open
#19,840 2 comments 0 reactions 0 assignees View on GitHub
enhancement xf:sql
Dominant language
Java
Stars
51.8k
Forks
4.4k
Avg merge
3d 8h
Merged PRs (30d)
188

Description

### Description

See the [video](https://user-images.githubusercontent.com/2260980/235370549-19f4e93f-79be-4a7e-9dc9-94108119aed1.mp4).

### DBeaver Version

Community Edition 23.0.3

### Operating System

Windows 10 x64

### Database and driver

1. Database name and version: Red Database 2.6 (based on Firebird 2.5)
2. Driver name and version: jaybird-full-3.0.12.jar

### Steps to reproduce

_No response_

### Additional context

On 0:20 I copied auto-generated SQL script:
`UPDATE SVZ_NETWORK
SET NETWORK_ORGANIZATION_SCHEME=0x31313131313131313131313131313131313131313131313131313131313131313131
WHERE ID=8564;`

On 0:25 you see that the saving was successfull (`test` became `1111111111111111111111111`).
Despite saving was successfull you see on 0:42 that the auto-generated script I copied can't be executed.
On 1:03 I manually have changed blob content to `222222222222222222222222` to use it as indicator for one of the next step.

On 1:17 I manually have composed update-script using `cast as blob` and hex-value (without `0x`) I have got from dbeaver's auto-generated script. My script is:
`UPDATE SVZ_NETWORK SET NETWORK_ORGANIZATION_SCHEME = cast(x'31313131313131313131313131313131313131313131313131313131313131313131' as blob sub_type binary) where ID=8564`
My script is definitely had worked fine because on 1:37 you see that `222222222222222222222222` became `1111111111111111111111111`.

**Thus I have two questions:**
1. What script actually dbeaver had executed on 0:23? It is definitely not the one I copied on 0:20.
2. Can we do something with script being incorrectly auto-generated?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.