Donatas Ciuksys wrote:
>
> Hello,
>
> The error can be reproduced in this way:
>
> 1. Lets have some table with constraint defined (my table is shown
> bellow).
> In my case constraint is following:
> CONSTRAINT "CNSTR_DARBU_ATLIKIMO_METAI" CHECK
> "K_DARBU_ATLIKIMO_METAI" = YEAR(K_DATA)
>
> 2. After some time I decided to change type of some columns (that are not
> used in constraint definition). I changed type of columns
> "K_SUNAIKINTAGYVPLOTO" and "K_SUGADINTAGYVPLOTO" from smallint to integer.
>
> 3. After this change no insert into this table works anymore, giving 300
> error.
>
> If constraint is droped and recreated, everything works again.
>
> Hope this helps to identify problem.
Sorry for the late answer, the problem was nearly lost in no-mans-land.
Unfortunately it is a bug. If there are constraints on columns stored (in the record)
behind those columns which are modified (changing its internal length) and none of the
modified columns is part of such a constraint, the definition of the constraint is not
changed accordingly to the changed column-definition describing the new
column-position in the record, causing the error 300 when the constraint is checked.
The only workaround is to drop and re-create the constraint.
The bug will be fixed in the next versions of the kernel.
Thank you for reporting.
Elke
SAP Labs Berlin
>
> Regards,
> Donatas
>
> --------------------------------------------------------
>
> CREATE TABLE "ADMIN"."KORTELE"
> (
> "K_ID" Integer NOT NULL,
> "K_NR" Integer NOT NULL,
> "K_DATA" Date NOT NULL,
> "K_KUR" Smallint,
> "K_KURKODAS" Smallint,
> "K_VIETOS_TIPAS" Smallint NOT NULL,
> "K_ADRESAS" Varchar (100) UNICODE NOT NULL,
> "K_SAVININKAS" Varchar (100) UNICODE,
> "K_PRLAIKASDATA" Date,
> "K_PRLAIKASLAIKAS" Time,
> "K_PIRMDATA" Date,
> "K_PIRMLAIKAS" Time,
> "K_PASKDATA" Date,
> "K_PASKLAIKAS" Time,
> "K_LOKDATA" Date,
> "K_LOKLAIKAS" Time,
> "K_LIKVDATA" Date,
> "K_LIKVLAIKAS" Time,
> "K_BAIGDATA" Date,
> "K_BAIGLAIKAS" Time,
> "K_INCVIETA" Smallint,
> "K_INC_GAMINYS_MEDZIAGA" Smallint,
> "K_PRIEZASTIS" Smallint,
> "K_ISGZMONIU" Smallint DEFAULT 0,
> "K_ISGNEPILNAMECIU" Smallint DEFAULT 0,
> "K_ISGSTATINIU" Smallint DEFAULT 0,
> "K_EVAKZMONIU" Smallint DEFAULT 0,
> "K_ZUVOZMONIU" Smallint DEFAULT 0,
> "K_ZUVONEPILNAMECIU" Smallint DEFAULT 0,
> "K_ZUVIMOAPLINKYBE" Smallint,
> "K_TRAUMUOTA" Smallint DEFAULT 0,
> "K_TRAUMUOTANEPILNAMECIU" Smallint DEFAULT 0,
> "K_TRAUMUOTAPGT" Smallint DEFAULT 0,
> "K_TRAUMUOTAPGP" Smallint DEFAULT 0,
> "K_SUNAIKINTASTATINIU" Smallint DEFAULT 0,
> "K_SUNAIKINTAGYVPLOTO" Smallint DEFAULT 0,
> "K_SUNAIKINTANEGYVPLOTO" Integer DEFAULT
> 0,
> "K_SUGADINTAGYVPLOTO" Smallint DEFAULT 0,
> "K_SUGADITANEGYVPLOTO" Integer DEFAULT 0,
> "K_SUNAIKINTAPASARU" Smallint DEFAULT 0,
> "K_ISDATVTERITORIJA" Smallint,
> "K_DKAGRANDZIUSK" Smallint DEFAULT 0,
> "K_DKADARBSK" Smallint DEFAULT 0,
> "K_NARUSK" Smallint DEFAULT 0,
> "K_ZMCHEMUSTSK" Smallint DEFAULT 0,
> "K_PMP_PRIEZASTIS_APRASYMAS" Varchar (500) UNICODE,
> "K_PMP_PRIEMONE_APRASYMAS" Varchar (700) UNICODE,
> "K_PMP_VEIKSMAS_APRASYMAS" Varchar (200) UNICODE,
> "K_APRASYMAS" Varchar (1700) UNICODE,
> "K_UZPILDE" Integer NOT NULL,
> "K_UZPILDATA" Date NOT NULL DEFAULT DATE,
> "K_ISDEG_ATV_TER_ARU_SK" Integer DEFAULT
> 0,
> "K_INC_VIETA_AUKSTAS" Smallint,
> "K_PADALINYS" Smallint NOT NULL,
> "K_DARBU_ATLIKIMO_METAI" Smallint NOT NULL,
> "K_UZPILLAIKAS" Time NOT NULL DEFAULT TIME,
> "K_PAGR_KORTELE" Integer,
> "K_REDAGAVO" Integer,
> "K_REDAGDATA" Date,
> "K_REDAGLAIKAS" Time,
> "INCIDENTO_SVARBA" Smallint NOT NULL DEFAULT
> 0,
> "KAIMYNAI_DALYVAVO" Smallint,
> PRIMARY KEY ("K_ID"),
> CONSTRAINT "CNSTR_DARBU_ATLIKIMO_METAI" CHECK
> "K_DARBU_ATLIKIMO_METAI" = YEAR(K_DATA),
> FOREIGN KEY "DARBAS_ATLIKTAS_KORTELE" ("K_KUR") REFERENCES
> "ADMIN"."DARBAS_ATLIKTAS" ("KODAS") ON DELETE RESTRICT,
> FOREIGN KEY "ADM_VIENETAS_KORTELE" ("K_KURKODAS") REFERENCES
> "ADMIN"."ADM_VIENETAS" ("KODAS") ON DELETE RESTRICT,
> FOREIGN KEY "VIETOS_TIPAS_KORTELE" ("K_VIETOS_TIPAS")
> REFERENCES "ADMIN"."VIETOS_TIPAS" ("KODAS") ON DELETE RESTRICT,
> FOREIGN KEY "INCIDENTO_KILIMO_VIETA_KORTELE" ("K_INCVIETA")
> REFERENCES "ADMIN"."INCIDENTO_KILIMO_VIETA" ("KODAS") ON DELETE RESTRICT,
> FOREIGN KEY "GAMINYS_MEDZIAGA_KORTELE" ("K_INC_GAMINYS_MEDZIAGA")
> REFERENCES "ADMIN"."GAMINYS_MEDZIAGA" ("KODAS") ON DELETE RESTRICT,
> FOREIGN KEY "PRIEZASTIS_KORTELE" ("K_PRIEZASTIS") REFERENCES
> "ADMIN"."PRIEZASTIS" ("KODAS") ON DELETE RESTRICT,
> FOREIGN KEY "ATVIROJI_TERITORIJA_KORTELE"
> ("K_ISDATVTERITORIJA") REFERENCES "ADMIN"."ATVIROJI_TERITORIJA" ("KODAS")
> ON
> DELETE RESTRICT,
> FOREIGN KEY "ZUVIMO_APLINKYBE_KORTELE" ("K_ZUVIMOAPLINKYBE")
> REFERENCES "ADMIN"."ZUVIMO_APLINKYBE" ("KODAS") ON DELETE RESTRICT,
> FOREIGN KEY "ADM_VIENETAS_KORTELE1" ("K_PADALINYS") REFERENCES
> "ADMIN"."ADM_VIENETAS" ("KODAS") ON DELETE RESTRICT,
> FOREIGN KEY "KORTELE_KORTELE" ("K_PAGR_KORTELE") REFERENCES
> "ADMIN"."KORTELE" ("K_ID") ON DELETE RESTRICT,
> FOREIGN KEY "DARBUOTOJAS_KORTELE" ("K_UZPILDE") REFERENCES
> "ADMIN"."DARBUOTOJAS" ("ID") ON DELETE RESTRICT,
> FOREIGN KEY "KORTELE_DARBUOTOJAS_REDAGAVO" ("K_REDAGAVO")
> REFERENCES "ADMIN"."DARBUOTOJAS" ("ID") ON DELETE RESTRICT
> )
--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]