Re: [firebird-support]Engine Error - Partner Index

2017-12-22 Thread Helen Borrie hele...@iinet.net.au [firebird-support]
Hello Nico,

Friday, December 22, 2017, 10:29:05 PM, you wrote:

> Hello,

> I have a problem with inserting a row in table
> OrderTypeDescriptions. Here you can find the sql script for the
> tables OrderTypes and OrderTypeDescriptions.


> CREATE TABLE ORDERTYPES (

>   ID  INTEGER GENERATED BY DEFAULT AS IDENTITY NOT NULL,

>   STOCKORDER  BOOLEAN DEFAULT FALSE NOT NULL,

>   ROWVERSION  TIMESTAMP,

>   /* Keys */

>   CONSTRAINT PK_ORDERTYPES

> PRIMARY KEY (ID)

> );



> CREATE TABLE ORDERTYPEDESCRIPTIONS (

>   IDINTEGER GENERATED BY DEFAULT AS IDENTITY NOT NULL,

>   ORDERTYPEID   INTEGER NOT NULL,

>   ORDERTYPEDESCRIPTION  VARCHAR(100) COLLATE UNICODE_CI_AI,

>   LANGUAGEIDINTEGER NOT NULL,

>   ROWVERSIONTIMESTAMP,

>   /* Keys */

>   CONSTRAINT PK_ORDERTYPEDESCRIPTIONS

> PRIMARY KEY (ID),

>   /* Foreign keys */

>   CONSTRAINT FK_ORDERTYPEDESC_LANGUAGEID

> FOREIGN KEY (LANGUAGEID)

> REFERENCES LANGUAGES(ID) <--

> ON DELETE CASCADE,

>   CONSTRAINT FK_ORDERTYPEDESC_ORDERTYPEID

> FOREIGN KEY (ORDERTYPEID)

> REFERENCES ORDERTYPES(ID)

> ON DELETE CASCADE

> );



> CREATE INDEX IX_ORDERTYPEDESC_DESCRIPTION

>   ON ORDERTYPEDESCRIPTIONS

>   (ORDERTYPEID, LANGUAGEID);

> If I insert a row in table OrderType there is no problem.
> Id = 1
> Stockorder = true

> If I post a new row in table OrderTypeDescriptions I got a problem

Insert into OrderTypeDescriptions (OrderTypeId, OrderTypeDescription, 
LanguageId)

values (1, 'Test', 1)

> Problem
> Engine Error (code = 335544333): internal Firebird consistency
> check (partner index description not found (175), file: idx.cpp line: 1271).
> SQL error (code = -902): Unsuccessful execution caused by a system
> error that precludes successful execution of subsequent statements.

Where is the insert for the master record in LANGUAGES with
LANGUAGEID=1?

Also, don't forget that you must commit the DDL for the master tables
before you can define foreign keys that refer to them.  If you are
using isql then the default behaviour is to autocommit DDL statements.
 The same is likely to be untrue if you are using a third-party tool.

 After that, if you have uncommitted inserts to a referenced table in
one transaction, then those uncommitted records are not visible to a
transaction that is trying to insert into the detail table.

Note that isql does not autocommit DML statements.

Helen




Re: [firebird-support] Engine Error - Partner Index

2017-12-22 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 22-12-2017 13:27, Nico Speleers nico.spele...@carfac.com 
[firebird-support] wrote:
> I only see version 3.0.1. How can I see the digits after comma ?

There is no comma in the version number, but if you mean after the third 
dot, there are several ways:

- Flamerobin: right click on server, "Retrieve server version"
- Windows: right click on firebird.exe, Properties, Details, under "File 
version"
- A service / database info query for the version

In any case, 3.0.1 is not the latest version for 3.0.x, several bugs 
were fixed in 3.0.2 (or wait for 3.0.3, which is expected to be released 
soon). As far as I can tell, your is not a known (or fixed) bug, but you 
might want to try it anyway.

You might also want to check your database with gfix, see 
https://www.firebirdsql.org/file/documentation/reference_manuals/user_manuals/html/gfix-dbverify.html

Mark
-- 
Mark Rotteveel


RE: [firebird-support] Engine Error - Partner Index

2017-12-22 Thread Nico Speleers nico.spele...@carfac.com [firebird-support]
I only see version 3.0.1. How can I see the digits after comma ?

Nico Speleers
Team Lead Analyse & Consultancy





Carfac bvba

[Beschrijving: Beschrijving: Beschrijving: CarfacAS 
(klein)]<http://www.carfac.be/>Driving on experience


Ambachtstraat 8 | 9700 Oudenaarde
Tel. +32 55 23 00 00 | Fax +32 55 31 00 95
nico.spele...@carfac.com<mailto:nico.spele...@carfac.com> | 
www.carfac.be<http://www.carfac.be/>

[Facebook]<http://www.facebook.com/groups/120709181286476/>[LinkedIn]<http://www.linkedin.com/company/hdc-software-nv>[Twitter]<https://twitter.com/carfacbvba>




Van: Mark Rotteveel m...@lawinegevaar.nl [firebird-support] 
[mailto:firebird-support@yahoogroups.com]
Verzonden: vrijdag 22 december 2017 13:20
Aan: firebird-support@yahoogroups.com
Onderwerp: Re: [firebird-support] Engine Error - Partner Index



On 22-12-2017 13:10, Nico Speleers nico.spele...@carfac.com
[firebird-support] wrote:
> We are using Firebird 3.0.

What is the full version (eg 3.0.2.32703)?

--
Mark Rotteveel



[Non-text portions of this message have been removed]



Re: [firebird-support] Engine Error - Partner Index

2017-12-22 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 22-12-2017 13:10, Nico Speleers nico.spele...@carfac.com 
[firebird-support] wrote:
> We are using Firebird 3.0.

What is the full version (eg 3.0.2.32703)?

-- 
Mark Rotteveel


RE: [firebird-support] Engine Error - Partner Index

2017-12-22 Thread Nico Speleers nico.spele...@carfac.com [firebird-support]
We are using Firebird 3.0.

Nico Speleers
Team Lead Analyse & Consultancy





Carfac bvba

[Beschrijving: Beschrijving: Beschrijving: CarfacAS 
(klein)]Driving on experience


Ambachtstraat 8 | 9700 Oudenaarde
Tel. +32 55 23 00 00 | Fax +32 55 31 00 95
nico.spele...@carfac.com | 
www.carfac.be

[Facebook][LinkedIn][Twitter]




Van: Mark Rotteveel m...@lawinegevaar.nl [firebird-support] 
[mailto:firebird-support@yahoogroups.com]
Verzonden: vrijdag 22 december 2017 12:56
Aan: firebird-support@yahoogroups.com
Onderwerp: Re: [firebird-support] info



On 22-12-2017 10:29, Nico Speleers nico.spele...@carfac.com
[firebird-support] wrote:

> Problem
> Engine Error (code = 335544333): internal Firebird consistency check (partner 
> index description not found (175), file: idx.cpp line: 1271).
> SQL error (code = -902): Unsuccessful execution caused by a system error that 
> precludes successful execution of subsequent statements.
Which version of Firebird are you using (specify the full version, please).

Mark
--
Mark Rotteveel



[Non-text portions of this message have been removed]