Originally created by: johnj255... (code.google.com)@gmail.com
What exact steps will reproduce the problem?
1. Open table in HeidiSQL. (create code: CREATE TABLE "signatures" (
"id" INT NOT NULL,
"name" VARCHAR(50) NOT NULL,
"signature" VARBINARY NULL
);
2. Select "Data" panel and choose "insert row (Ins)" on the context menu (don't known how it seems on english version). Next choose "insert files in TEXT/BLOB..."
3. Add a png-image file, checkbox binary already is set.
4. Fill fields with next data:
id = [not changed]
name = 'test'
signature = '%filecontent%'
5. Click on Import files button.
What was the expected output?
A new line with new data, or new SQL query in new tab for edition (why not?)
What happened instead?
Error SQL (102).
Suggested fix (optional)?
In the log at bottom of Heidi, generated SQL are next:
"INSERT INTO "signature"."signatures" ("name", "signature") VALUES ('test', _binary 0x89504E470D0A1A0A0000000[...]/* большой запрос SQL (25,3 KB), ограничен 2 000 символами */
/* Ошибка SQL (102): Неправильный синтаксис около конструкции "0x89504e470d0a1a0a0000000[...]". */"
some bytes was cutted..
if we changed query to next:
"INSERT INTO "signature"."signatures" ("name", "signature") VALUES ('test', 0x89504E470D0A1A0A0000000[...])"
it will be worked!
But long queries was cutted in log...
Version used?
HeidiSQL revision: 8.0.0.4428 (2013-06-18 17:33:06)
MySQL Server version: Microsoft SQL Server 2008 [r2] (SP2) - 10.50.4000.0 (X64)
Jun 28 2012 08:36:30
Copyright (c) Microsoft Corporation
Standard Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200: ) (Hypervisor)
Operating system: Windows 8 (x64)
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: johnj255... (code.google.com)@gmail.com
HeidiSQL Revision: 4428 (у вас: 4428)
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: a...@anse.de
You mean, leaving out the "_binary" prefix just works? Easy to fix.
Summary: insert image to varbinary data: sql error
Labels: MSSQL
Status: Accepted
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: johnj255... (code.google.com)@gmail.com
May be just it... I'm not expert :)
Thank you!
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: a...@anse.de
This issue was closed by revision [r4432].
Status: Fixed
Related
Commit: [r4432]
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: a...@anse.de
(No comment was entered for this change.)
Labels: Severity-Broken