MySQL Forums
Forum List  »  NDB clusters

disk data storage and mediumtext column
Posted by: a.noort
Date: November 23, 2006 08:31AM

Hello,

Part (or all) of the data of a mediumtext column of a table that is to be stored on a tablespace on disk, seems to be stored in main-memory instead. This results in a table-full error much earlier than expected.

I use MySQL version 5.1.12-beta.

I use the following cluster configuration:

[NDBD DEFAULT]
NoOfReplicas=2
DataMemory=32M
IndexMemory=16M

[TCP DEFAULT]
portnumber=2202

[NDB_MGMD]
hostname=mgmnode
datadir=/var/lib/mysql-cluster

[NDBD]
hostname=ndbd1
datadir=/usr/local/mysql/data

[NDBD]
hostname=ndbd2
datadir=/usr/local/mysql/data

[MYSQLD]
hostname=sqlnode

I created one table in de ndbcluster engine with the following SQL code:

CREATE LOGFILE GROUP lg_test
ADD UNDOFILE 'undo_test.dat'
INITIAL_SIZE 16M
UNDO_BUFFER_SIZE 2M
ENGINE NDB;

CREATE TABLESPACE ts_test
ADD DATAFILE 'data_test.dat'
USE LOGFILE GROUP lg_test
INITIAL_SIZE 32M
ENGINE NDB;

CREATE TABLE testtext (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
data MEDIUMTEXT
)
TABLESPACE ts_test STORAGE DISK
ENGINE NDB;

I tried to insert 1500 rows with 16 kB data in the data field of each row, but got the error "ERROR 1114 (HY000) at line 371: The table 'testtext' is full" when inserting the 1395-th row.

This is not what I would have expected.

My hypothesis is that the data of the MEDIUMTEXT column is stored in main-memory instead of in the tablespace on disk. The fact that the number of free_extents of the 'data_test.dat' file as found in the table information_schema.files, is exactly the same after inserting the rows as it was before, support this hypothesis.

I would like to have the content of the MEDIUMTEXT column in the tablespace on disk, so I can store more data with less main memory.
I want to apply a MySQL cluster for High-Availability only, not for High-Performance, so I do not mind to store the data on disk.

Can someone give some comments on this. Is this a bug, or is it meant to be this way?

Thanks in advance,

Alex

Options: ReplyQuote


Subject
Views
Written By
Posted
disk data storage and mediumtext column
1733
November 23, 2006 08:31AM
1008
November 27, 2006 03:18AM
1027
November 29, 2006 04:43AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.