Mailing List
Home
Forum Home
MySQL General - General MySQL discussion
MySQL++ - Programming with the C++ API to MySQL
MaxDB - Everything about MaxDB, formerly known as SAP DB
ODBC - ODBC with the MySQL Connector/ODBC driver
MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP
Java Help - Mostly related to the MySQL Connector/J driver
Perl - Perl support for MySQL with DBI and DBD::mysql
GUI - MySQL GUI Tools
Announcement
Subjects
Subject: mysql openssl Question
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
Update one field with more fields from another table
Subject: Getting Identity after INSERT
ERROR 2002: Can 't connect to local MySQL server through socket
mysql test 4 1 fails with the gis test
Subject: MySQL Cluster Software
Downgrade Mysql from 4 to 3 23
Mysql 4 0 Oracle Stored Procedure Trigger Conversion
Can 't access mysql after kernel upgrade
Executing MySQL Commands From Within C Program
Comparing and writing out BLOBS
Subject: Re: Preventing Duplicate Entries
FULLTEXT query format question
Strange behavior, Table Level Permission
Does the binary log enabling affect the MySQL performances?
mysql:it 's a db not a dbms how it 's possible?!
mysql have same function mthod as Oracle decode()
 
Row too long (-2000)

Row too long (-2000)

2007-07-24       - By Dusan Kolesar

 Back
Reply:     1     2     3  

Hello
I'm using MaxDb 7.6.0.34 on WinXp SP2.

My DB schema is :
CREATE TABLE logTb
(
  "ID"                Integer              NOT NULL    DEFAULT SERIAL (1),
  "TSTAMP"            Timestamp            NOT NULL    DEFAULT TIMESTAMP,
  "TYPE"              Integer              NOT NULL    DEFAULT 1,
  "SENDER_ADDRESS"    Varchar (255) ASCII  NOT NULL    DEFAULT '',
  "RECEIVER_ADDRESS"  Varchar (255) ASCII  NOT NULL    DEFAULT '',
  PRIMARY KEY ("ID")
)
//
CREATE TABLE inTb
(
  "ID"               Integer              NOT NULL  DEFAULT SERIAL (1),
  "TSTAMP"           Timestamp            NOT NULL  DEFAULT TIMESTAMP,
  "LOGTB_ID"         Integer              NOT NULL  DEFAULT -1,
  "DATA"             Varchar (4096) BYTE  NOT NULL,
  PRIMARY KEY ("ID"),
  FOREIGN KEY FK_LOGTB_ID ("LOGTB_ID") REFERENCES
    logTb (Id) ON DELETE  SET DEFAULT
)
//
CREATE TABLE outTb
(
  "ID"               Integer              NOT NULL  DEFAULT SERIAL (1),
  "TSTAMP"           Timestamp            NOT NULL  DEFAULT TIMESTAMP,
  "LOGTB_ID"         Integer              NOT NULL  DEFAULT -1,
  "DATA"             Varchar (4096) BYTE  NOT NULL,
  PRIMARY KEY ("ID"),
  FOREIGN KEY FK_LOGTB_ID ("LOGTB_ID") REFERENCES
    logTb (Id) ON DELETE  SET DEFAULT
)

when I do:

select
  logTb.Id,
  Value (inTb.Data, outTb.Data) as DataMsg
from logTb
  left join inTb on logTb.Id = inTb.LogTb_Id
  left join outTb on logTb.Id = outTb.LogTb_Id

Syntax error or access violation;-2000 POS(8214) Row too long

It seems that sql parser sums length of all columns listed in the
statement.
(Integer + Varchar (4096) BYTE + Varchar (4096) BYTE) > 8088 bytes (max.
length of a table row)
But when I use Value (Col1, Col2), then maximal length of this column is
max of Col1 and Col2 length.

The same is when I do:

select
  logTb.Id,
  Value (Substr (inTb.Data, 1, 10), Substr (outTb.Data, 1, 10)) as DataMsg
from logTb
  left join inTb on logTb.Id = inTb.LogTb_Id
  left join outTb on logTb.Id = outTb.LogTb_Id

Length of Substr (Column, 1, n) is n but not Length of Column type.

Is there any way how to restrict length of output columns ???


Thank you very much for support.
  Regards, Dusan

--
Dusan Kolesar
Helsinska 19
040 13  Kosice
Slovakia
e-mail primary : d.kolesar@(protected)
e-mail alternative : d.kolesar@(protected)
ICQ# : 160507424

--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/maxdb?unsub=mysql@(protected)