List:Cluster« Previous MessageNext Message »
From:Magnus Svensson Date:August 12 2004 7:51am
Subject:Re: problems loading data
View as plain text  
Hi,

I have filed bug#5013 for this problem.
http://bugs.mysql.com/bug.php?id=5013

Best regards
Magnus

On Wed, 2004-08-11 at 16:41, Arne Hueggenberg wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> After getting the cluster running i ran into a problem importing my old
> data.
> 
> The data has quite a few occurences of TEXT NOT NULL columns.
> Quite frequently the contained text is the empty string.
> With MyISAM tables this is no problem:
> 
> 
> mysql> create table foobar ( id int(10) not null auto_increment, barfoo
> text not null, PRIMARY KEY (id));
> Query OK, 0 rows affected (0.00 sec)
> mysql> insert into foobar (barfoo) values ('');
> Query OK, 1 row affected (0.00 sec)
> 
> 
> using NDB tables this fails:
> 
> mysql> create table foobar ( id int(10) NOT NULL auto_increment, barfoo
> text NOT NULL, PRIMARY KEY (id) ) TYPE=NDB;
> Query OK, 0 rows affected, 1 warning (0.75 sec)
> 
> mysql> show table status;
>
> +--------+------------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+-------------+-------------+------------+-------------------+----------+----------------+---------+
> | Name   | Engine     | Version | Row_format | Rows | Avg_row_length |
> Data_length | Max_data_length | Index_length | Data_free | Auto_increment |
> Create_time | Update_time | Check_time | Collation         | Checksum |
> Create_options | Comment |
>
> +--------+------------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+-------------+-------------+------------+-------------------+----------+----------------+---------+
> | foobar | ndbcluster |       9 | Dynamic    |  100 |              0 |
> 0 |            NULL |            0 |         0 |              0 | NULL
> | NULL        | NULL       | latin1_swedish_ci |     NULL |
> |         |
>
> +--------+------------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+-------------+-------------+------------+-------------------+----------+----------------+---------+
> 1 row in set (0.00 sec)
> 
> mysql> insert into foobar (barfoo) values ("");
> ERROR 1296 (HY000): Got error 839 'Illegal null attribute' from ndbcluster
> 
> seems like mysql thinks the empty string is null?
> Why is this and how do i get around it?
> 
> - --
> Arne Hueggenberg <hueggenberg@stripped>
> System Administrator
> Sports & Bytes GmbH
> http://www.sports-and-bytes.com
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.1 (GNU/Linux)
> 
> iD8DBQFBGjAQdwf9KsfAc2kRAvLKAKC980T0yVsqYN24CuAnwy61ElW8EACcDO7X
> X2reXdzUKgESiPg6GqDWW5A=
> =WWtv
> -----END PGP SIGNATURE-----
-- 
Magnus Svensson, Software Engineer
MySQL AB, www.mysql.com
Office: +46 709 164 491

Thread
problems loading dataArne Hueggenberg11 Aug
  • Re: problems loading dataMagnus Svensson12 Aug