List:Cluster« Previous MessageNext Message »
From:Tomas Ulin Date:October 11 2004 8:42am
Subject:Re: mysql-4.1.6-gamma: 'REPLACE INTO' BLOB problem
View as plain text  
Please report as bug in category MySQL Cluster at bugs.mysql.com

Thanks,

T

Joseph E. Sacco, Ph.D. wrote:

>Encountered a problem with 'REPLACE INTO' and blobs.
>
>Given an NDB table named 'story_version':
>
>
>mysql> describe story_version;
>+----------+----------------------+------+-----+---------+-------+
>| Field    | Type                 | Null | Key | Default | Extra |
>+----------+----------------------+------+-----+---------+-------+
>| story_id | int(10) unsigned     |      | PRI | 0       |       |
>| version  | smallint(5) unsigned |      | PRI | 0       |       |
>| data     | longtext             | YES  |     | NULL    |       |
>+----------+----------------------+------+-----+---------+-------+
>
>
>Consider the following PERL subroutine:
>
># save to the version table
>sub _save_version {
>    my $self = shift;
>    my $dbh  = dbh;
>   
>    # save version
>    $dbh->do('REPLACE INTO story_version (story_id, version, data)
>              VALUES (?,?,?)', undef,
>            $self->{story_id}, $self->{version}, freeze($self));
>}
>
>When run, the cluster complains:
>
>        DBD::mysql::db do failed: Got error 4264 'Invalid usage of blob
>        attribute' from ndbcluster
>
>If the exercise is repeated using a myISAM table instread of an NDB
>table, all is well.
>
>
>Thoughts???
>
>
>-Joseph
>
>  
>

Thread
mysql-4.1.6-gamma: 'REPLACE INTO' BLOB problemPh.D. Joseph E. Sacco11 Oct
  • Re: mysql-4.1.6-gamma: 'REPLACE INTO' BLOB problemTomas Ulin11 Oct
    • Re: mysql-4.1.6-gamma: 'REPLACE INTO' BLOB problemMagnus Svensson11 Oct