List:Cluster« Previous MessageNext Message »
From:Hartmut Holzgraefe Date:September 14 2010 8:04am
Subject:Re: Problem with the NDB database engine
View as plain text  
On 09/13/2010 06:04 PM, Massimiliano Ziccardi wrote:
> HI all!
> The previous error has gone, however, it fails creating this table:
>
> create table User_ (
...
> ) engine NDB;
>
> the error is :
>
> ERROR 1005 (HY000): Can't create table 'lportal.user_' (errno: 140)

sometimes it helps to check whether an error has raised
additional warnings. I can reproduce your problem, but
only when using UTF8 as the default character set for
the table. With this i'm getting error 140 and SHOW
WARNINGS tells:

   mysql> SHOW WARNINGS;
   +-------+------+----------------------------------------------+
   | Level | Code | Message                                      |
   +-------+------+----------------------------------------------+
   | Error | 1296 | Got error 738 'Record too big' from NDB      |
   | Error | 1005 | Can't create table 'test.User_' (errno: 140) |
   +-------+------+----------------------------------------------+

So the maximum row length of this table is simply beyond the
8K row length limit of NDB.

Things you can do:

   * check whether you really need utf8 as character set for
     the varchar fields, use latin1 character set for columns
     that don't need utf8, or for the full table

     utf8 takes up to three bytes to store a character while
     latin1 only takes one, and even though cluster has true
     varchar with dynamic storage by now the worst case of
     number of characters times three is still what needs
     to be taken into account when checking that the row
     length does not exceed the 8k maximum

   * use TEXT instead of VARCHAR(1024) for the openId column
     as only the first 256 bytes of a TEXT or BLOB colum are
     stored in the main table row itself

-- 
Hartmut Holzgraefe | MySQL Regional Support Manager, EMEA

Phone: +49-2102-4511-0
Oracle MySQL Support

ORACLE Deutschland B.V. & Co. KG | Brandenburger Straße 2 | 40880 Ratingen

ORACLE Deutschland B.V. & Co. KG
Hauptverwaltung: Riesstr. 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603

Komplementärin: ORACLE Deutschland Verwaltung B.V.
Rijnzathe 6, 3454PV De Meern, Niederlande
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
Geschäftsführer: Jürgen Kunz, Marcel van de Molen, Alexander van der Ven

Thread
Problem with the NDB database engineMassimiliano Ziccardi13 Sep
  • Re: Problem with the NDB database engineDavid Ennis13 Sep
    • Re: Problem with the NDB database engineMassimiliano Ziccardi13 Sep
  • Re: Problem with the NDB database engineJon Stephens13 Sep
    • Re: Problem with the NDB database engineMassimiliano Ziccardi13 Sep
      • Re: Problem with the NDB database engineMassimiliano Ziccardi13 Sep
  • Re: Problem with the NDB database engineHartmut Holzgraefe13 Sep
    • Re: Problem with the NDB database engineMassimiliano Ziccardi13 Sep
      • RE: Problem with the NDB database engineAndrew Morgan13 Sep
        • Re: Problem with the NDB database engineMassimiliano Ziccardi13 Sep
          • Re: Problem with the NDB database engineMassimiliano Ziccardi13 Sep
            • Re: Problem with the NDB database engineDavid Ennis13 Sep
              • Re: Problem with the NDB database engineMassimiliano Ziccardi14 Sep
                • Re: Problem with the NDB database enginePekka Nousiainen14 Sep
                • Re: Problem with the NDB database engineMassimiliano Ziccardi14 Sep
                  • Re: Problem with the NDB database engineGeert Vanderkelen14 Sep
                    • Re: Problem with the NDB database engineMassimiliano Ziccardi14 Sep
            • Re: Problem with the NDB database engineHartmut Holzgraefe14 Sep
Re: Problem with the NDB database engineMassimiliano Ziccardi13 Sep