Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Edit Of Blob Column Cannot Be Saved

forums forums SQLyog SQLyog: Bugs / Feature Requests Edit Of Blob Column Cannot Be Saved

  • This topic is empty.
Viewing 2 reply threads
  • Author
    Posts
    • #9968
      ravxafax
      Member

      hi all,

      I encountered the following problem.

      I have a table that looks as follows:

      CREATE TABLE `t_token` (

      `userID` bigint(20) NOT NULL,

      `token` blob NOT NULL,

      `description` varchar(64) NOT NULL default '',

      `credential` varchar(64) default NULL,

      `enabled` tinyint(1) NOT NULL default '1',

      PRIMARY KEY (`token`(767))

      ) ENGINE=InnoDB DEFAULT CHARSET=utf8

      Whe I try to edit in the “Table Data” form one of the token column values with the text/blob editor (or any other column) it all looks ok. There apears in red that save needs to be pressed to save the changes. But when I do that it results an error.

      In SQLYog 5.19: You have an error in your sql syntax near ''

      The query that is to be executed looks like this:

      update `t_token` set `userID`='378133285',`token`='6665',`description`='',`credential`=NULL, `enabled`='1' where

      Here the part after where is missing.

      In SQLYog 5.2 beta6: Duplicate Entry

      The query that is to be executed looks like this:

      update `t_token` set `userID`='378133285',`token`='6665',`description`='',`credential`=NULL, `enabled`='1'

      The Where clause is completely missing, resulting in trying to update all rows.

      I know the following exists (as explained in the FAQ):

      You should also be aware that SQLyog never includes (TINY/MEDIUM/LONG) TEXTs and BLOBS in the WHERE-condition that it generates. So with a table definition without a PK and where only the content of such TEXT/BLOBs differ betwen rows you can get this message too. We recommend that you use a PK and CHAR/VARCHAR/VARBINARY types and not TEXT/BLOB types whenever possible. In particular note that a LONGTEXT/LONGBLOB can be as big as 4 GB (GigaByte). Using such long data in a WHERE-condition is not practicable of course.

      But I think that if the PK is the Blob itself that then there should be a where clause in the query, the blob itself or all other columns that are not text/blob.

      I hope something can be done for this problem.

    • #22783
      ravxafax
      Member

      It seems to be working ok in SQLyog 5.2 beta8.

      Thanks for solving this.

    • #22784
      peterlaursen
      Participant

      Sorry for not replying here in the first place.

      and yes – we did change a little in beta 8:

      Please refer to: http://www.webyog.com/faq/28_70_en.html

      Quote:
      The two situations where (TINY/MEDIUM/LONG) TEXTs and BLOBS are included in the WHERE-condition are

      * TEXT/BLOBs that are primary keys

      * WHEN there is a single column in a table only and this is TEXT/BLOB

Viewing 2 reply threads
  • You must be logged in to reply to this topic.