You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@trafodion.apache.org by mathieu ferlay <mf...@gnubila.fr> on 2017/03/16 09:05:11 UTC

issue wtih foreign keys

Hi, i'll try to create the following table C. I assume that tables A & B are
executed before C.  But when I try to execute the statement for the table C,
the process nerver back from the statement.execute(request). Furthermore, I
obtain also the following trace when I force the commit with
connection.commit();

' (line 120): *** ERROR[8838] Unable to receive reply from Compiler,
possibly caused by internal errors when compiling SQL statements, processing
DDL statements, or executing the builtin stored procedures. [2017-03-16
09:02:56]

Could you tell me which kind of reasons could provoked it.

 

      

 

CREATE TABLE IF NOT EXISTS A (

  AID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT  NOT NULL,

  Description  VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT  NULL,

  PRIMARY KEY(AID)

) 

 

CREATE TABLE IF NOT EXISTS B (

  Name VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,

  FirstName VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,

  BID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,

  PRIMARY KEY(BID)

)

 

 

 

CREATE TABLE IF NOT EXISTS C (

  BID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,

  AID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,

  PRIMARY KEY(AID,BID),

  FOREIGN KEY(AID)

    REFERENCES A(AID),

  FOREIGN KEY(BID)

    REFERENCES B(BID)

)

 

 

Regards

Mathieu FERLAY

 


RE: issue wtih foreign keys

Posted by mathieu ferlay <mf...@gnubila.fr>.
Hi Dave,

I’m using the version of the docker image trafodion\incubator and I believe
it’s the 2.0.0 .

 

Regards,

Mathieu

 

De : Dave Birdsall [mailto:dave.birdsall@esgyn.com] 
Envoyé : jeudi 16 mars 2017 16:26
À : user@trafodion.incubator.apache.org
Objet : RE: issue wtih foreign keys

 

Hi Mathieu,

 

Error 8838 usually indicates a core in the tdm_arkcmp process. So you’re
likely running into a bug. What version of Trafodion are you using? (What
banner comes up when you enter, sqlci?)

 

I tried your CREATE statements in the latest version of Trafodion and they
worked for me.

 

Dave

 

From: mathieu ferlay [mailto:mferlay@gnubila.fr] 
Sent: Thursday, March 16, 2017 7:46 AM
To: user@trafodion.incubator.apache.org
<ma...@trafodion.incubator.apache.org> 
Subject: RE: issue wtih foreign keys

 

Hi again, 

I don’t know if explain my process will help but maybe:

    try (Connection connection = DriverManager.getConnection(dbUrl, dbUser,
dbPwd);

        BufferedReader reader = new BufferedReader(

            new FileReader("create-tables.sql"));) {

     ScriptRunner runner = new ScriptRunner(connection, false, true);

      runner.runScript(reader);

      connection.close();

    } catch (Exception e) {

      e.printStackTrace();

      throw e;

    }

 

In the sql file, I have all my requests to create all my tables and the
script runner execute one statement by request.

I  start to think that’s due to the autocommit and so by consequence the
“database” access.

 

Regards,

Mathieu

 

De : mathieu ferlay [mailto:mferlay@gnubila.fr] 
Envoyé : jeudi 16 mars 2017 15:02
À : user@trafodion.incubator.apache.org
<ma...@trafodion.incubator.apache.org> 
Objet : RE: issue wtih foreign keys

 

Hi, 

I have change my request by using alter table do it but I still have some
“lost” of process. It’s look like an infinite loop inside the execute
statement.

I don’t know what it could causes that.

 

Regards,

Mathieu

 

De : mathieu ferlay [mailto:mferlay@gnubila.fr] 
Envoyé : jeudi 16 mars 2017 10:05
À : user@trafodion.incubator.apache.org
<ma...@trafodion.incubator.apache.org> 
Objet : issue wtih foreign keys

 

Hi, i’ll try to create the following table C. I assume that tables A & B are
executed before C.  But when I try to execute the statement for the table C,
the process nerver back from the statement.execute(request). Furthermore, I
obtain also the following trace when I force the commit with
connection.commit();

' (line 120): *** ERROR[8838] Unable to receive reply from Compiler,
possibly caused by internal errors when compiling SQL statements, processing
DDL statements, or executing the builtin stored procedures. [2017-03-16
09:02:56]

Could you tell me which kind of reasons could provoked it.

 

      

 

CREATE TABLE IF NOT EXISTS A (

  AID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT  NOT NULL,

  Description  VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT  NULL,

  PRIMARY KEY(AID)

) 

 

CREATE TABLE IF NOT EXISTS B (

  Name VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,

  FirstName VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,

  BID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,

  PRIMARY KEY(BID)

)

 

 

 

CREATE TABLE IF NOT EXISTS C (

  BID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,

  AID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,

  PRIMARY KEY(AID,BID),

  FOREIGN KEY(AID)

    REFERENCES A(AID),

  FOREIGN KEY(BID)

    REFERENCES B(BID)

)

 

 

Regards

Mathieu FERLAY

 


RE: issue wtih foreign keys

Posted by Dave Birdsall <da...@esgyn.com>.
Hi Mathieu,

Error 8838 usually indicates a core in the tdm_arkcmp process. So you're likely running into a bug. What version of Trafodion are you using? (What banner comes up when you enter, sqlci?)

I tried your CREATE statements in the latest version of Trafodion and they worked for me.

Dave

From: mathieu ferlay [mailto:mferlay@gnubila.fr]
Sent: Thursday, March 16, 2017 7:46 AM
To: user@trafodion.incubator.apache.org
Subject: RE: issue wtih foreign keys

Hi again,
I don't know if explain my process will help but maybe:
    try (Connection connection = DriverManager.getConnection(dbUrl, dbUser, dbPwd);
        BufferedReader reader = new BufferedReader(
            new FileReader("create-tables.sql"));) {
     ScriptRunner runner = new ScriptRunner(connection, false, true);
      runner.runScript(reader);
      connection.close();
    } catch (Exception e) {
      e.printStackTrace();
      throw e;
    }

In the sql file, I have all my requests to create all my tables and the script runner execute one statement by request.
I  start to think that's due to the autocommit and so by consequence the "database" access.

Regards,
Mathieu

De : mathieu ferlay [mailto:mferlay@gnubila.fr]
Envoyé : jeudi 16 mars 2017 15:02
À : user@trafodion.incubator.apache.org<ma...@trafodion.incubator.apache.org>
Objet : RE: issue wtih foreign keys

Hi,
I have change my request by using alter table do it but I still have some "lost" of process. It's look like an infinite loop inside the execute statement.
I don't know what it could causes that.

Regards,
Mathieu

De : mathieu ferlay [mailto:mferlay@gnubila.fr]
Envoyé : jeudi 16 mars 2017 10:05
À : user@trafodion.incubator.apache.org<ma...@trafodion.incubator.apache.org>
Objet : issue wtih foreign keys

Hi, i'll try to create the following table C. I assume that tables A & B are executed before C.  But when I try to execute the statement for the table C, the process nerver back from the statement.execute(request). Furthermore, I obtain also the following trace when I force the commit with connection.commit();
' (line 120): *** ERROR[8838] Unable to receive reply from Compiler, possibly caused by internal errors when compiling SQL statements, processing DDL statements, or executing the builtin stored procedures. [2017-03-16 09:02:56]
Could you tell me which kind of reasons could provoked it.



CREATE TABLE IF NOT EXISTS A (
  AID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT  NOT NULL,
  Description  VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT  NULL,
  PRIMARY KEY(AID)
)

CREATE TABLE IF NOT EXISTS B (
  Name VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,
  FirstName VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,
  BID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,
  PRIMARY KEY(BID)
)



CREATE TABLE IF NOT EXISTS C (
  BID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,
  AID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,
  PRIMARY KEY(AID,BID),
  FOREIGN KEY(AID)
    REFERENCES A(AID),
  FOREIGN KEY(BID)
    REFERENCES B(BID)
)


Regards
Mathieu FERLAY


RE: issue wtih foreign keys

Posted by mathieu ferlay <mf...@gnubila.fr>.
Hi again, I’m still working on the V2.0.0 for the moment and I obtain the
following issuer when I try to create a foreign key via an alter table:

java.io.IOException: Error executing 'alter table UsersGroups add constraint
UserGroupsfk1 FOREIGN KEY(GroupID) REFERENCES Groups(GroupID) ': Error
executing 'alter table UsersGroups add constraint UserGroupsfk1 FOREIGN
KEY(GroupID) REFERENCES Groups(GroupID) ' (line 7): *** ERROR[8448] Unable
to access Hbase interface. Call to ExpHbaseInterface::scanOpen returned
error HBASE_OPEN_ERROR(-704). Cause: 

java.lang.RuntimeException: java.lang.OutOfMemoryError: unable to create new
native thread.

 

I have increased my memory to 8go of ram to my docker  but I have no way to
increase the java memory. Do you know how to do it in the container?

 

Regards,

Mathieu

 

 

De : mathieu ferlay [mailto:mferlay@gnubila.fr] 
Envoyé : vendredi 17 mars 2017 08:02
À : user@trafodion.incubator.apache.org
Objet : RE: issue wtih foreign keys

 

Hi everybody,

Thanks to all for your help. So I’ll waiting for the 2.1 and see the
behavior.

 

Regards,

Mathieu

 

 

De : Sandhya Sundaresan [mailto:sandhya.sundaresan@esgyn.com] 
Envoyé : jeudi 16 mars 2017 18:12
À : user@trafodion.incubator.apache.org
<ma...@trafodion.incubator.apache.org> 
Objet : RE: issue wtih foreign keys

 

Hi,

FYI - I will be staging a 2.1 version of Trafodion in a couple of days to
the dev staging site. Not quite ready for today – most likely Monday. 2.1
version has 300+ fixes.

Sandhya

 

From: Qifan Chen [mailto:qifan.chen@esgyn.com] 
Sent: Thursday, March 16, 2017 9:50 AM
To: user@trafodion.incubator.apache.org
<ma...@trafodion.incubator.apache.org> 
Subject: Re: issue wtih foreign keys

 

Hi Dave and Eric,

 

I wonder if providing Mathieu with the latest Trafodion is an option. 

 

I did not recall similar bugs in this area. 

 

Thanks --Qifan

  _____  

From: Dave Birdsall <dave.birdsall@esgyn.com
<ma...@esgyn.com> >
Sent: Thursday, March 16, 2017 11:33:21 AM
To: user@trafodion.incubator.apache.org
<ma...@trafodion.incubator.apache.org> 
Subject: RE: issue wtih foreign keys 

 

So, evidently this is a bug that has been fixed?

 

I wonder if we can find a JIRA reference.

 

From: Eric Owhadi [mailto:eric.owhadi@esgyn.com] 
Sent: Thursday, March 16, 2017 8:55 AM
To: user@trafodion.incubator.apache.org
<ma...@trafodion.incubator.apache.org> 
Subject: RE: issue wtih foreign keys

 

With trafci on latest of esgynDB (derivative of trafodion), both with
autocommit on or off, this set of create table work fine.

Eric

 

From: Dave Birdsall [mailto:dave.birdsall@esgyn.com] 
Sent: Thursday, March 16, 2017 10:33 AM
To: user@trafodion.incubator.apache.org
<ma...@trafodion.incubator.apache.org> 
Subject: RE: issue wtih foreign keys

 

Hi Eric & Mathieu,

 

I tried Mathieu’s three CREATE statements in sqlci twice, once with
autocommit on and (after dropping the tables) once with autocommit off, and
it worked both times for me. But that’s on the latest Trafodion (master
branch).

 

I haven’t tried it in trafci… maybe the behavior is different?

 

Dave

 

From: Eric Owhadi [mailto:eric.owhadi@esgyn.com] 
Sent: Thursday, March 16, 2017 8:25 AM
To: user@trafodion.incubator.apache.org
<ma...@trafodion.incubator.apache.org> 
Subject: RE: issue wtih foreign keys

 

Are you saying that autocommit is off, and you are executing the 3 ddl
statement then manual commit? Then you see  the issue?

Or autocommit is on, and you see the issue?

When you perform the same ddl operation using command line with sqlci, you
see no problem right?
Eric

 

From: mathieu ferlay [mailto:mferlay@gnubila.fr] 
Sent: Thursday, March 16, 2017 9:46 AM
To: user@trafodion.incubator.apache.org
<ma...@trafodion.incubator.apache.org> 
Subject: RE: issue wtih foreign keys

 

Hi again, 

I don’t know if explain my process will help but maybe:

    try (Connection connection = DriverManager.getConnection(dbUrl, dbUser,
dbPwd);

        BufferedReader reader = new BufferedReader(

            new FileReader("create-tables.sql"));) {

     ScriptRunner runner = new ScriptRunner(connection, false, true);

      runner.runScript(reader);

      connection.close();

    } catch (Exception e) {

      e.printStackTrace();

      throw e;

    }

 

In the sql file, I have all my requests to create all my tables and the
script runner execute one statement by request.

I  start to think that’s due to the autocommit and so by consequence the
“database” access.

 

Regards,

Mathieu

 

De : mathieu ferlay [mailto:mferlay@gnubila.fr] 
Envoyé : jeudi 16 mars 2017 15:02
À : user@trafodion.incubator.apache.org
<ma...@trafodion.incubator.apache.org> 
Objet : RE: issue wtih foreign keys

 

Hi, 

I have change my request by using alter table do it but I still have some
“lost” of process. It’s look like an infinite loop inside the execute
statement.

I don’t know what it could causes that.

 

Regards,

Mathieu

 

De : mathieu ferlay [mailto:mferlay@gnubila.fr] 
Envoyé : jeudi 16 mars 2017 10:05
À : user@trafodion.incubator.apache.org
<ma...@trafodion.incubator.apache.org> 
Objet : issue wtih foreign keys

 

Hi, i’ll try to create the following table C. I assume that tables A & B are
executed before C.  But when I try to execute the statement for the table C,
the process nerver back from the statement.execute(request). Furthermore, I
obtain also the following trace when I force the commit with
connection.commit();

' (line 120): *** ERROR[8838] Unable to receive reply from Compiler,
possibly caused by internal errors when compiling SQL statements, processing
DDL statements, or executing the builtin stored procedures. [2017-03-16
09:02:56]

Could you tell me which kind of reasons could provoked it.

 

      

 

CREATE TABLE IF NOT EXISTS A (

  AID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT  NOT NULL,

  Description  VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT  NULL,

  PRIMARY KEY(AID)

) 

 

CREATE TABLE IF NOT EXISTS B (

  Name VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,

  FirstName VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,

  BID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,

  PRIMARY KEY(BID)

)

 

 

 

CREATE TABLE IF NOT EXISTS C (

  BID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,

  AID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,

  PRIMARY KEY(AID,BID),

  FOREIGN KEY(AID)

    REFERENCES A(AID),

  FOREIGN KEY(BID)

    REFERENCES B(BID)

)

 

 

Regards

Mathieu FERLAY

 


RE: issue wtih foreign keys

Posted by mathieu ferlay <mf...@gnubila.fr>.
Hi everybody,

Thanks to all for your help. So I’ll waiting for the 2.1 and see the
behavior.

 

Regards,

Mathieu

 

 

De : Sandhya Sundaresan [mailto:sandhya.sundaresan@esgyn.com] 
Envoyé : jeudi 16 mars 2017 18:12
À : user@trafodion.incubator.apache.org
Objet : RE: issue wtih foreign keys

 

Hi,

FYI - I will be staging a 2.1 version of Trafodion in a couple of days to
the dev staging site. Not quite ready for today – most likely Monday. 2.1
version has 300+ fixes.

Sandhya

 

From: Qifan Chen [mailto:qifan.chen@esgyn.com] 
Sent: Thursday, March 16, 2017 9:50 AM
To: user@trafodion.incubator.apache.org
<ma...@trafodion.incubator.apache.org> 
Subject: Re: issue wtih foreign keys

 

Hi Dave and Eric,

 

I wonder if providing Mathieu with the latest Trafodion is an option. 

 

I did not recall similar bugs in this area. 

 

Thanks --Qifan

  _____  

From: Dave Birdsall <dave.birdsall@esgyn.com
<ma...@esgyn.com> >
Sent: Thursday, March 16, 2017 11:33:21 AM
To: user@trafodion.incubator.apache.org
<ma...@trafodion.incubator.apache.org> 
Subject: RE: issue wtih foreign keys 

 

So, evidently this is a bug that has been fixed?

 

I wonder if we can find a JIRA reference.

 

From: Eric Owhadi [mailto:eric.owhadi@esgyn.com] 
Sent: Thursday, March 16, 2017 8:55 AM
To: user@trafodion.incubator.apache.org
<ma...@trafodion.incubator.apache.org> 
Subject: RE: issue wtih foreign keys

 

With trafci on latest of esgynDB (derivative of trafodion), both with
autocommit on or off, this set of create table work fine.

Eric

 

From: Dave Birdsall [mailto:dave.birdsall@esgyn.com] 
Sent: Thursday, March 16, 2017 10:33 AM
To: user@trafodion.incubator.apache.org
<ma...@trafodion.incubator.apache.org> 
Subject: RE: issue wtih foreign keys

 

Hi Eric & Mathieu,

 

I tried Mathieu’s three CREATE statements in sqlci twice, once with
autocommit on and (after dropping the tables) once with autocommit off, and
it worked both times for me. But that’s on the latest Trafodion (master
branch).

 

I haven’t tried it in trafci… maybe the behavior is different?

 

Dave

 

From: Eric Owhadi [mailto:eric.owhadi@esgyn.com] 
Sent: Thursday, March 16, 2017 8:25 AM
To: user@trafodion.incubator.apache.org
<ma...@trafodion.incubator.apache.org> 
Subject: RE: issue wtih foreign keys

 

Are you saying that autocommit is off, and you are executing the 3 ddl
statement then manual commit? Then you see  the issue?

Or autocommit is on, and you see the issue?

When you perform the same ddl operation using command line with sqlci, you
see no problem right?
Eric

 

From: mathieu ferlay [mailto:mferlay@gnubila.fr] 
Sent: Thursday, March 16, 2017 9:46 AM
To: user@trafodion.incubator.apache.org
<ma...@trafodion.incubator.apache.org> 
Subject: RE: issue wtih foreign keys

 

Hi again, 

I don’t know if explain my process will help but maybe:

    try (Connection connection = DriverManager.getConnection(dbUrl, dbUser,
dbPwd);

        BufferedReader reader = new BufferedReader(

            new FileReader("create-tables.sql"));) {

     ScriptRunner runner = new ScriptRunner(connection, false, true);

      runner.runScript(reader);

      connection.close();

    } catch (Exception e) {

      e.printStackTrace();

      throw e;

    }

 

In the sql file, I have all my requests to create all my tables and the
script runner execute one statement by request.

I  start to think that’s due to the autocommit and so by consequence the
“database” access.

 

Regards,

Mathieu

 

De : mathieu ferlay [mailto:mferlay@gnubila.fr] 
Envoyé : jeudi 16 mars 2017 15:02
À : user@trafodion.incubator.apache.org
<ma...@trafodion.incubator.apache.org> 
Objet : RE: issue wtih foreign keys

 

Hi, 

I have change my request by using alter table do it but I still have some
“lost” of process. It’s look like an infinite loop inside the execute
statement.

I don’t know what it could causes that.

 

Regards,

Mathieu

 

De : mathieu ferlay [mailto:mferlay@gnubila.fr] 
Envoyé : jeudi 16 mars 2017 10:05
À : user@trafodion.incubator.apache.org
<ma...@trafodion.incubator.apache.org> 
Objet : issue wtih foreign keys

 

Hi, i’ll try to create the following table C. I assume that tables A & B are
executed before C.  But when I try to execute the statement for the table C,
the process nerver back from the statement.execute(request). Furthermore, I
obtain also the following trace when I force the commit with
connection.commit();

' (line 120): *** ERROR[8838] Unable to receive reply from Compiler,
possibly caused by internal errors when compiling SQL statements, processing
DDL statements, or executing the builtin stored procedures. [2017-03-16
09:02:56]

Could you tell me which kind of reasons could provoked it.

 

      

 

CREATE TABLE IF NOT EXISTS A (

  AID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT  NOT NULL,

  Description  VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT  NULL,

  PRIMARY KEY(AID)

) 

 

CREATE TABLE IF NOT EXISTS B (

  Name VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,

  FirstName VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,

  BID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,

  PRIMARY KEY(BID)

)

 

 

 

CREATE TABLE IF NOT EXISTS C (

  BID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,

  AID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,

  PRIMARY KEY(AID,BID),

  FOREIGN KEY(AID)

    REFERENCES A(AID),

  FOREIGN KEY(BID)

    REFERENCES B(BID)

)

 

 

Regards

Mathieu FERLAY

 


RE: issue wtih foreign keys

Posted by Sandhya Sundaresan <sa...@esgyn.com>.
Hi,
FYI - I will be staging a 2.1 version of Trafodion in a couple of days to the dev staging site. Not quite ready for today - most likely Monday. 2.1 version has 300+ fixes.
Sandhya

From: Qifan Chen [mailto:qifan.chen@esgyn.com]
Sent: Thursday, March 16, 2017 9:50 AM
To: user@trafodion.incubator.apache.org
Subject: Re: issue wtih foreign keys


Hi Dave and Eric,



I wonder if providing Mathieu with the latest Trafodion is an option.



I did not recall similar bugs in this area.



Thanks --Qifan

________________________________
From: Dave Birdsall <da...@esgyn.com>>
Sent: Thursday, March 16, 2017 11:33:21 AM
To: user@trafodion.incubator.apache.org<ma...@trafodion.incubator.apache.org>
Subject: RE: issue wtih foreign keys

So, evidently this is a bug that has been fixed?

I wonder if we can find a JIRA reference.

From: Eric Owhadi [mailto:eric.owhadi@esgyn.com]
Sent: Thursday, March 16, 2017 8:55 AM
To: user@trafodion.incubator.apache.org<ma...@trafodion.incubator.apache.org>
Subject: RE: issue wtih foreign keys

With trafci on latest of esgynDB (derivative of trafodion), both with autocommit on or off, this set of create table work fine.
Eric

From: Dave Birdsall [mailto:dave.birdsall@esgyn.com]
Sent: Thursday, March 16, 2017 10:33 AM
To: user@trafodion.incubator.apache.org<ma...@trafodion.incubator.apache.org>
Subject: RE: issue wtih foreign keys

Hi Eric & Mathieu,

I tried Mathieu's three CREATE statements in sqlci twice, once with autocommit on and (after dropping the tables) once with autocommit off, and it worked both times for me. But that's on the latest Trafodion (master branch).

I haven't tried it in trafci... maybe the behavior is different?

Dave

From: Eric Owhadi [mailto:eric.owhadi@esgyn.com]
Sent: Thursday, March 16, 2017 8:25 AM
To: user@trafodion.incubator.apache.org<ma...@trafodion.incubator.apache.org>
Subject: RE: issue wtih foreign keys

Are you saying that autocommit is off, and you are executing the 3 ddl statement then manual commit? Then you see  the issue?
Or autocommit is on, and you see the issue?
When you perform the same ddl operation using command line with sqlci, you see no problem right?
Eric

From: mathieu ferlay [mailto:mferlay@gnubila.fr]
Sent: Thursday, March 16, 2017 9:46 AM
To: user@trafodion.incubator.apache.org<ma...@trafodion.incubator.apache.org>
Subject: RE: issue wtih foreign keys

Hi again,
I don't know if explain my process will help but maybe:
    try (Connection connection = DriverManager.getConnection(dbUrl, dbUser, dbPwd);
        BufferedReader reader = new BufferedReader(
            new FileReader("create-tables.sql"));) {
     ScriptRunner runner = new ScriptRunner(connection, false, true);
      runner.runScript(reader);
      connection.close();
    } catch (Exception e) {
      e.printStackTrace();
      throw e;
    }

In the sql file, I have all my requests to create all my tables and the script runner execute one statement by request.
I  start to think that's due to the autocommit and so by consequence the "database" access.

Regards,
Mathieu

De : mathieu ferlay [mailto:mferlay@gnubila.fr]
Envoyé : jeudi 16 mars 2017 15:02
À : user@trafodion.incubator.apache.org<ma...@trafodion.incubator.apache.org>
Objet : RE: issue wtih foreign keys

Hi,
I have change my request by using alter table do it but I still have some "lost" of process. It's look like an infinite loop inside the execute statement.
I don't know what it could causes that.

Regards,
Mathieu

De : mathieu ferlay [mailto:mferlay@gnubila.fr]
Envoyé : jeudi 16 mars 2017 10:05
À : user@trafodion.incubator.apache.org<ma...@trafodion.incubator.apache.org>
Objet : issue wtih foreign keys

Hi, i'll try to create the following table C. I assume that tables A & B are executed before C.  But when I try to execute the statement for the table C, the process nerver back from the statement.execute(request). Furthermore, I obtain also the following trace when I force the commit with connection.commit();
' (line 120): *** ERROR[8838] Unable to receive reply from Compiler, possibly caused by internal errors when compiling SQL statements, processing DDL statements, or executing the builtin stored procedures. [2017-03-16 09:02:56]
Could you tell me which kind of reasons could provoked it.



CREATE TABLE IF NOT EXISTS A (
  AID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT  NOT NULL,
  Description  VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT  NULL,
  PRIMARY KEY(AID)
)

CREATE TABLE IF NOT EXISTS B (
  Name VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,
  FirstName VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,
  BID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,
  PRIMARY KEY(BID)
)



CREATE TABLE IF NOT EXISTS C (
  BID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,
  AID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,
  PRIMARY KEY(AID,BID),
  FOREIGN KEY(AID)
    REFERENCES A(AID),
  FOREIGN KEY(BID)
    REFERENCES B(BID)
)


Regards
Mathieu FERLAY


Re: issue wtih foreign keys

Posted by Qifan Chen <qi...@esgyn.com>.
Hi Dave and Eric,


I wonder if providing Mathieu with the latest Trafodion is an option.


I did not recall similar bugs in this area.


Thanks --Qifan

________________________________
From: Dave Birdsall <da...@esgyn.com>
Sent: Thursday, March 16, 2017 11:33:21 AM
To: user@trafodion.incubator.apache.org
Subject: RE: issue wtih foreign keys

So, evidently this is a bug that has been fixed?

I wonder if we can find a JIRA reference.

From: Eric Owhadi [mailto:eric.owhadi@esgyn.com]
Sent: Thursday, March 16, 2017 8:55 AM
To: user@trafodion.incubator.apache.org
Subject: RE: issue wtih foreign keys

With trafci on latest of esgynDB (derivative of trafodion), both with autocommit on or off, this set of create table work fine.
Eric

From: Dave Birdsall [mailto:dave.birdsall@esgyn.com]
Sent: Thursday, March 16, 2017 10:33 AM
To: user@trafodion.incubator.apache.org<ma...@trafodion.incubator.apache.org>
Subject: RE: issue wtih foreign keys

Hi Eric & Mathieu,

I tried Mathieu’s three CREATE statements in sqlci twice, once with autocommit on and (after dropping the tables) once with autocommit off, and it worked both times for me. But that’s on the latest Trafodion (master branch).

I haven’t tried it in trafci… maybe the behavior is different?

Dave

From: Eric Owhadi [mailto:eric.owhadi@esgyn.com]
Sent: Thursday, March 16, 2017 8:25 AM
To: user@trafodion.incubator.apache.org<ma...@trafodion.incubator.apache.org>
Subject: RE: issue wtih foreign keys

Are you saying that autocommit is off, and you are executing the 3 ddl statement then manual commit? Then you see  the issue?
Or autocommit is on, and you see the issue?
When you perform the same ddl operation using command line with sqlci, you see no problem right?
Eric

From: mathieu ferlay [mailto:mferlay@gnubila.fr]
Sent: Thursday, March 16, 2017 9:46 AM
To: user@trafodion.incubator.apache.org<ma...@trafodion.incubator.apache.org>
Subject: RE: issue wtih foreign keys

Hi again,
I don’t know if explain my process will help but maybe:
    try (Connection connection = DriverManager.getConnection(dbUrl, dbUser, dbPwd);
        BufferedReader reader = new BufferedReader(
            new FileReader("create-tables.sql"));) {
     ScriptRunner runner = new ScriptRunner(connection, false, true);
      runner.runScript(reader);
      connection.close();
    } catch (Exception e) {
      e.printStackTrace();
      throw e;
    }

In the sql file, I have all my requests to create all my tables and the script runner execute one statement by request.
I  start to think that’s due to the autocommit and so by consequence the “database” access.

Regards,
Mathieu

De : mathieu ferlay [mailto:mferlay@gnubila.fr]
Envoyé : jeudi 16 mars 2017 15:02
À : user@trafodion.incubator.apache.org<ma...@trafodion.incubator.apache.org>
Objet : RE: issue wtih foreign keys

Hi,
I have change my request by using alter table do it but I still have some “lost” of process. It’s look like an infinite loop inside the execute statement.
I don’t know what it could causes that.

Regards,
Mathieu

De : mathieu ferlay [mailto:mferlay@gnubila.fr]
Envoyé : jeudi 16 mars 2017 10:05
À : user@trafodion.incubator.apache.org<ma...@trafodion.incubator.apache.org>
Objet : issue wtih foreign keys

Hi, i’ll try to create the following table C. I assume that tables A & B are executed before C.  But when I try to execute the statement for the table C, the process nerver back from the statement.execute(request). Furthermore, I obtain also the following trace when I force the commit with connection.commit();
' (line 120): *** ERROR[8838] Unable to receive reply from Compiler, possibly caused by internal errors when compiling SQL statements, processing DDL statements, or executing the builtin stored procedures. [2017-03-16 09:02:56]
Could you tell me which kind of reasons could provoked it.



CREATE TABLE IF NOT EXISTS A (
  AID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT  NOT NULL,
  Description  VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT  NULL,
  PRIMARY KEY(AID)
)

CREATE TABLE IF NOT EXISTS B (
  Name VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,
  FirstName VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,
  BID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,
  PRIMARY KEY(BID)
)



CREATE TABLE IF NOT EXISTS C (
  BID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,
  AID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,
  PRIMARY KEY(AID,BID),
  FOREIGN KEY(AID)
    REFERENCES A(AID),
  FOREIGN KEY(BID)
    REFERENCES B(BID)
)


Regards
Mathieu FERLAY


RE: issue wtih foreign keys

Posted by Anoop Sharma <an...@esgyn.com>.
if there is a core file on the system that corresponds to the arkcmp crash(err 8838), then
a stack trace of that core file would help in detecting what could have
caused it.

From: Dave Birdsall [mailto:dave.birdsall@esgyn.com]
Sent: Thursday, March 16, 2017 9:33 AM
To: user@trafodion.incubator.apache.org
Subject: RE: issue wtih foreign keys

So, evidently this is a bug that has been fixed?

I wonder if we can find a JIRA reference.

From: Eric Owhadi [mailto:eric.owhadi@esgyn.com]
Sent: Thursday, March 16, 2017 8:55 AM
To: user@trafodion.incubator.apache.org<ma...@trafodion.incubator.apache.org>
Subject: RE: issue wtih foreign keys

With trafci on latest of esgynDB (derivative of trafodion), both with autocommit on or off, this set of create table work fine.
Eric

From: Dave Birdsall [mailto:dave.birdsall@esgyn.com]
Sent: Thursday, March 16, 2017 10:33 AM
To: user@trafodion.incubator.apache.org<ma...@trafodion.incubator.apache.org>
Subject: RE: issue wtih foreign keys

Hi Eric & Mathieu,

I tried Mathieu's three CREATE statements in sqlci twice, once with autocommit on and (after dropping the tables) once with autocommit off, and it worked both times for me. But that's on the latest Trafodion (master branch).

I haven't tried it in trafci... maybe the behavior is different?

Dave

From: Eric Owhadi [mailto:eric.owhadi@esgyn.com]
Sent: Thursday, March 16, 2017 8:25 AM
To: user@trafodion.incubator.apache.org<ma...@trafodion.incubator.apache.org>
Subject: RE: issue wtih foreign keys

Are you saying that autocommit is off, and you are executing the 3 ddl statement then manual commit? Then you see  the issue?
Or autocommit is on, and you see the issue?
When you perform the same ddl operation using command line with sqlci, you see no problem right?
Eric

From: mathieu ferlay [mailto:mferlay@gnubila.fr]
Sent: Thursday, March 16, 2017 9:46 AM
To: user@trafodion.incubator.apache.org<ma...@trafodion.incubator.apache.org>
Subject: RE: issue wtih foreign keys

Hi again,
I don't know if explain my process will help but maybe:
    try (Connection connection = DriverManager.getConnection(dbUrl, dbUser, dbPwd);
        BufferedReader reader = new BufferedReader(
            new FileReader("create-tables.sql"));) {
     ScriptRunner runner = new ScriptRunner(connection, false, true);
      runner.runScript(reader);
      connection.close();
    } catch (Exception e) {
      e.printStackTrace();
      throw e;
    }

In the sql file, I have all my requests to create all my tables and the script runner execute one statement by request.
I  start to think that's due to the autocommit and so by consequence the "database" access.

Regards,
Mathieu

De : mathieu ferlay [mailto:mferlay@gnubila.fr]
Envoyé : jeudi 16 mars 2017 15:02
À : user@trafodion.incubator.apache.org<ma...@trafodion.incubator.apache.org>
Objet : RE: issue wtih foreign keys

Hi,
I have change my request by using alter table do it but I still have some "lost" of process. It's look like an infinite loop inside the execute statement.
I don't know what it could causes that.

Regards,
Mathieu

De : mathieu ferlay [mailto:mferlay@gnubila.fr]
Envoyé : jeudi 16 mars 2017 10:05
À : user@trafodion.incubator.apache.org<ma...@trafodion.incubator.apache.org>
Objet : issue wtih foreign keys

Hi, i'll try to create the following table C. I assume that tables A & B are executed before C.  But when I try to execute the statement for the table C, the process nerver back from the statement.execute(request). Furthermore, I obtain also the following trace when I force the commit with connection.commit();
' (line 120): *** ERROR[8838] Unable to receive reply from Compiler, possibly caused by internal errors when compiling SQL statements, processing DDL statements, or executing the builtin stored procedures. [2017-03-16 09:02:56]
Could you tell me which kind of reasons could provoked it.



CREATE TABLE IF NOT EXISTS A (
  AID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT  NOT NULL,
  Description  VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT  NULL,
  PRIMARY KEY(AID)
)

CREATE TABLE IF NOT EXISTS B (
  Name VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,
  FirstName VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,
  BID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,
  PRIMARY KEY(BID)
)



CREATE TABLE IF NOT EXISTS C (
  BID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,
  AID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,
  PRIMARY KEY(AID,BID),
  FOREIGN KEY(AID)
    REFERENCES A(AID),
  FOREIGN KEY(BID)
    REFERENCES B(BID)
)


Regards
Mathieu FERLAY


RE: issue wtih foreign keys

Posted by Dave Birdsall <da...@esgyn.com>.
So, evidently this is a bug that has been fixed?

I wonder if we can find a JIRA reference.

From: Eric Owhadi [mailto:eric.owhadi@esgyn.com]
Sent: Thursday, March 16, 2017 8:55 AM
To: user@trafodion.incubator.apache.org
Subject: RE: issue wtih foreign keys

With trafci on latest of esgynDB (derivative of trafodion), both with autocommit on or off, this set of create table work fine.
Eric

From: Dave Birdsall [mailto:dave.birdsall@esgyn.com]
Sent: Thursday, March 16, 2017 10:33 AM
To: user@trafodion.incubator.apache.org<ma...@trafodion.incubator.apache.org>
Subject: RE: issue wtih foreign keys

Hi Eric & Mathieu,

I tried Mathieu's three CREATE statements in sqlci twice, once with autocommit on and (after dropping the tables) once with autocommit off, and it worked both times for me. But that's on the latest Trafodion (master branch).

I haven't tried it in trafci... maybe the behavior is different?

Dave

From: Eric Owhadi [mailto:eric.owhadi@esgyn.com]
Sent: Thursday, March 16, 2017 8:25 AM
To: user@trafodion.incubator.apache.org<ma...@trafodion.incubator.apache.org>
Subject: RE: issue wtih foreign keys

Are you saying that autocommit is off, and you are executing the 3 ddl statement then manual commit? Then you see  the issue?
Or autocommit is on, and you see the issue?
When you perform the same ddl operation using command line with sqlci, you see no problem right?
Eric

From: mathieu ferlay [mailto:mferlay@gnubila.fr]
Sent: Thursday, March 16, 2017 9:46 AM
To: user@trafodion.incubator.apache.org<ma...@trafodion.incubator.apache.org>
Subject: RE: issue wtih foreign keys

Hi again,
I don't know if explain my process will help but maybe:
    try (Connection connection = DriverManager.getConnection(dbUrl, dbUser, dbPwd);
        BufferedReader reader = new BufferedReader(
            new FileReader("create-tables.sql"));) {
     ScriptRunner runner = new ScriptRunner(connection, false, true);
      runner.runScript(reader);
      connection.close();
    } catch (Exception e) {
      e.printStackTrace();
      throw e;
    }

In the sql file, I have all my requests to create all my tables and the script runner execute one statement by request.
I  start to think that's due to the autocommit and so by consequence the "database" access.

Regards,
Mathieu

De : mathieu ferlay [mailto:mferlay@gnubila.fr]
Envoyé : jeudi 16 mars 2017 15:02
À : user@trafodion.incubator.apache.org<ma...@trafodion.incubator.apache.org>
Objet : RE: issue wtih foreign keys

Hi,
I have change my request by using alter table do it but I still have some "lost" of process. It's look like an infinite loop inside the execute statement.
I don't know what it could causes that.

Regards,
Mathieu

De : mathieu ferlay [mailto:mferlay@gnubila.fr]
Envoyé : jeudi 16 mars 2017 10:05
À : user@trafodion.incubator.apache.org<ma...@trafodion.incubator.apache.org>
Objet : issue wtih foreign keys

Hi, i'll try to create the following table C. I assume that tables A & B are executed before C.  But when I try to execute the statement for the table C, the process nerver back from the statement.execute(request). Furthermore, I obtain also the following trace when I force the commit with connection.commit();
' (line 120): *** ERROR[8838] Unable to receive reply from Compiler, possibly caused by internal errors when compiling SQL statements, processing DDL statements, or executing the builtin stored procedures. [2017-03-16 09:02:56]
Could you tell me which kind of reasons could provoked it.



CREATE TABLE IF NOT EXISTS A (
  AID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT  NOT NULL,
  Description  VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT  NULL,
  PRIMARY KEY(AID)
)

CREATE TABLE IF NOT EXISTS B (
  Name VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,
  FirstName VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,
  BID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,
  PRIMARY KEY(BID)
)



CREATE TABLE IF NOT EXISTS C (
  BID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,
  AID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,
  PRIMARY KEY(AID,BID),
  FOREIGN KEY(AID)
    REFERENCES A(AID),
  FOREIGN KEY(BID)
    REFERENCES B(BID)
)


Regards
Mathieu FERLAY


RE: issue wtih foreign keys

Posted by Eric Owhadi <er...@esgyn.com>.
With trafci on latest of esgynDB (derivative of trafodion), both with autocommit on or off, this set of create table work fine.
Eric

From: Dave Birdsall [mailto:dave.birdsall@esgyn.com]
Sent: Thursday, March 16, 2017 10:33 AM
To: user@trafodion.incubator.apache.org
Subject: RE: issue wtih foreign keys

Hi Eric & Mathieu,

I tried Mathieu's three CREATE statements in sqlci twice, once with autocommit on and (after dropping the tables) once with autocommit off, and it worked both times for me. But that's on the latest Trafodion (master branch).

I haven't tried it in trafci... maybe the behavior is different?

Dave

From: Eric Owhadi [mailto:eric.owhadi@esgyn.com]
Sent: Thursday, March 16, 2017 8:25 AM
To: user@trafodion.incubator.apache.org<ma...@trafodion.incubator.apache.org>
Subject: RE: issue wtih foreign keys

Are you saying that autocommit is off, and you are executing the 3 ddl statement then manual commit? Then you see  the issue?
Or autocommit is on, and you see the issue?
When you perform the same ddl operation using command line with sqlci, you see no problem right?
Eric

From: mathieu ferlay [mailto:mferlay@gnubila.fr]
Sent: Thursday, March 16, 2017 9:46 AM
To: user@trafodion.incubator.apache.org<ma...@trafodion.incubator.apache.org>
Subject: RE: issue wtih foreign keys

Hi again,
I don't know if explain my process will help but maybe:
    try (Connection connection = DriverManager.getConnection(dbUrl, dbUser, dbPwd);
        BufferedReader reader = new BufferedReader(
            new FileReader("create-tables.sql"));) {
     ScriptRunner runner = new ScriptRunner(connection, false, true);
      runner.runScript(reader);
      connection.close();
    } catch (Exception e) {
      e.printStackTrace();
      throw e;
    }

In the sql file, I have all my requests to create all my tables and the script runner execute one statement by request.
I  start to think that's due to the autocommit and so by consequence the "database" access.

Regards,
Mathieu

De : mathieu ferlay [mailto:mferlay@gnubila.fr]
Envoyé : jeudi 16 mars 2017 15:02
À : user@trafodion.incubator.apache.org<ma...@trafodion.incubator.apache.org>
Objet : RE: issue wtih foreign keys

Hi,
I have change my request by using alter table do it but I still have some "lost" of process. It's look like an infinite loop inside the execute statement.
I don't know what it could causes that.

Regards,
Mathieu

De : mathieu ferlay [mailto:mferlay@gnubila.fr]
Envoyé : jeudi 16 mars 2017 10:05
À : user@trafodion.incubator.apache.org<ma...@trafodion.incubator.apache.org>
Objet : issue wtih foreign keys

Hi, i'll try to create the following table C. I assume that tables A & B are executed before C.  But when I try to execute the statement for the table C, the process nerver back from the statement.execute(request). Furthermore, I obtain also the following trace when I force the commit with connection.commit();
' (line 120): *** ERROR[8838] Unable to receive reply from Compiler, possibly caused by internal errors when compiling SQL statements, processing DDL statements, or executing the builtin stored procedures. [2017-03-16 09:02:56]
Could you tell me which kind of reasons could provoked it.



CREATE TABLE IF NOT EXISTS A (
  AID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT  NOT NULL,
  Description  VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT  NULL,
  PRIMARY KEY(AID)
)

CREATE TABLE IF NOT EXISTS B (
  Name VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,
  FirstName VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,
  BID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,
  PRIMARY KEY(BID)
)



CREATE TABLE IF NOT EXISTS C (
  BID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,
  AID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,
  PRIMARY KEY(AID,BID),
  FOREIGN KEY(AID)
    REFERENCES A(AID),
  FOREIGN KEY(BID)
    REFERENCES B(BID)
)


Regards
Mathieu FERLAY


RE: issue wtih foreign keys

Posted by Dave Birdsall <da...@esgyn.com>.
Hi Eric & Mathieu,

I tried Mathieu's three CREATE statements in sqlci twice, once with autocommit on and (after dropping the tables) once with autocommit off, and it worked both times for me. But that's on the latest Trafodion (master branch).

I haven't tried it in trafci... maybe the behavior is different?

Dave

From: Eric Owhadi [mailto:eric.owhadi@esgyn.com]
Sent: Thursday, March 16, 2017 8:25 AM
To: user@trafodion.incubator.apache.org
Subject: RE: issue wtih foreign keys

Are you saying that autocommit is off, and you are executing the 3 ddl statement then manual commit? Then you see  the issue?
Or autocommit is on, and you see the issue?
When you perform the same ddl operation using command line with sqlci, you see no problem right?
Eric

From: mathieu ferlay [mailto:mferlay@gnubila.fr]
Sent: Thursday, March 16, 2017 9:46 AM
To: user@trafodion.incubator.apache.org<ma...@trafodion.incubator.apache.org>
Subject: RE: issue wtih foreign keys

Hi again,
I don't know if explain my process will help but maybe:
    try (Connection connection = DriverManager.getConnection(dbUrl, dbUser, dbPwd);
        BufferedReader reader = new BufferedReader(
            new FileReader("create-tables.sql"));) {
     ScriptRunner runner = new ScriptRunner(connection, false, true);
      runner.runScript(reader);
      connection.close();
    } catch (Exception e) {
      e.printStackTrace();
      throw e;
    }

In the sql file, I have all my requests to create all my tables and the script runner execute one statement by request.
I  start to think that's due to the autocommit and so by consequence the "database" access.

Regards,
Mathieu

De : mathieu ferlay [mailto:mferlay@gnubila.fr]
Envoyé : jeudi 16 mars 2017 15:02
À : user@trafodion.incubator.apache.org<ma...@trafodion.incubator.apache.org>
Objet : RE: issue wtih foreign keys

Hi,
I have change my request by using alter table do it but I still have some "lost" of process. It's look like an infinite loop inside the execute statement.
I don't know what it could causes that.

Regards,
Mathieu

De : mathieu ferlay [mailto:mferlay@gnubila.fr]
Envoyé : jeudi 16 mars 2017 10:05
À : user@trafodion.incubator.apache.org<ma...@trafodion.incubator.apache.org>
Objet : issue wtih foreign keys

Hi, i'll try to create the following table C. I assume that tables A & B are executed before C.  But when I try to execute the statement for the table C, the process nerver back from the statement.execute(request). Furthermore, I obtain also the following trace when I force the commit with connection.commit();
' (line 120): *** ERROR[8838] Unable to receive reply from Compiler, possibly caused by internal errors when compiling SQL statements, processing DDL statements, or executing the builtin stored procedures. [2017-03-16 09:02:56]
Could you tell me which kind of reasons could provoked it.



CREATE TABLE IF NOT EXISTS A (
  AID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT  NOT NULL,
  Description  VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT  NULL,
  PRIMARY KEY(AID)
)

CREATE TABLE IF NOT EXISTS B (
  Name VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,
  FirstName VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,
  BID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,
  PRIMARY KEY(BID)
)



CREATE TABLE IF NOT EXISTS C (
  BID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,
  AID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,
  PRIMARY KEY(AID,BID),
  FOREIGN KEY(AID)
    REFERENCES A(AID),
  FOREIGN KEY(BID)
    REFERENCES B(BID)
)


Regards
Mathieu FERLAY


RE: issue wtih foreign keys

Posted by mathieu ferlay <mf...@gnubila.fr>.
Hi Eric,

 

I have put this command SET TRANSACTION AUTOCOMMIT ON; at the entry of my
script but I’m not fully sure that it have no commit in the java part. I’m
currently checking on that.

 

With sqlci, I have not already did it yet, but I have no issue by passing
each request one by one.

 

Regards,

Mathieu

 

De : Eric Owhadi [mailto:eric.owhadi@esgyn.com] 
Envoyé : jeudi 16 mars 2017 16:25
À : user@trafodion.incubator.apache.org
Objet : RE: issue wtih foreign keys

 

Are you saying that autocommit is off, and you are executing the 3 ddl
statement then manual commit? Then you see  the issue?

Or autocommit is on, and you see the issue?

When you perform the same ddl operation using command line with sqlci, you
see no problem right?
Eric

 

From: mathieu ferlay [mailto:mferlay@gnubila.fr] 
Sent: Thursday, March 16, 2017 9:46 AM
To: user@trafodion.incubator.apache.org
<ma...@trafodion.incubator.apache.org> 
Subject: RE: issue wtih foreign keys

 

Hi again, 

I don’t know if explain my process will help but maybe:

    try (Connection connection = DriverManager.getConnection(dbUrl, dbUser,
dbPwd);

        BufferedReader reader = new BufferedReader(

            new FileReader("create-tables.sql"));) {

     ScriptRunner runner = new ScriptRunner(connection, false, true);

      runner.runScript(reader);

      connection.close();

    } catch (Exception e) {

      e.printStackTrace();

      throw e;

    }

 

In the sql file, I have all my requests to create all my tables and the
script runner execute one statement by request.

I  start to think that’s due to the autocommit and so by consequence the
“database” access.

 

Regards,

Mathieu

 

De : mathieu ferlay [mailto:mferlay@gnubila.fr] 
Envoyé : jeudi 16 mars 2017 15:02
À : user@trafodion.incubator.apache.org
<ma...@trafodion.incubator.apache.org> 
Objet : RE: issue wtih foreign keys

 

Hi, 

I have change my request by using alter table do it but I still have some
“lost” of process. It’s look like an infinite loop inside the execute
statement.

I don’t know what it could causes that.

 

Regards,

Mathieu

 

De : mathieu ferlay [mailto:mferlay@gnubila.fr] 
Envoyé : jeudi 16 mars 2017 10:05
À : user@trafodion.incubator.apache.org
<ma...@trafodion.incubator.apache.org> 
Objet : issue wtih foreign keys

 

Hi, i’ll try to create the following table C. I assume that tables A & B are
executed before C.  But when I try to execute the statement for the table C,
the process nerver back from the statement.execute(request). Furthermore, I
obtain also the following trace when I force the commit with
connection.commit();

' (line 120): *** ERROR[8838] Unable to receive reply from Compiler,
possibly caused by internal errors when compiling SQL statements, processing
DDL statements, or executing the builtin stored procedures. [2017-03-16
09:02:56]

Could you tell me which kind of reasons could provoked it.

 

      

 

CREATE TABLE IF NOT EXISTS A (

  AID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT  NOT NULL,

  Description  VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT  NULL,

  PRIMARY KEY(AID)

) 

 

CREATE TABLE IF NOT EXISTS B (

  Name VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,

  FirstName VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,

  BID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,

  PRIMARY KEY(BID)

)

 

 

 

CREATE TABLE IF NOT EXISTS C (

  BID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,

  AID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,

  PRIMARY KEY(AID,BID),

  FOREIGN KEY(AID)

    REFERENCES A(AID),

  FOREIGN KEY(BID)

    REFERENCES B(BID)

)

 

 

Regards

Mathieu FERLAY

 


RE: issue wtih foreign keys

Posted by Eric Owhadi <er...@esgyn.com>.
Are you saying that autocommit is off, and you are executing the 3 ddl statement then manual commit? Then you see  the issue?
Or autocommit is on, and you see the issue?
When you perform the same ddl operation using command line with sqlci, you see no problem right?
Eric

From: mathieu ferlay [mailto:mferlay@gnubila.fr]
Sent: Thursday, March 16, 2017 9:46 AM
To: user@trafodion.incubator.apache.org
Subject: RE: issue wtih foreign keys

Hi again,
I don't know if explain my process will help but maybe:
    try (Connection connection = DriverManager.getConnection(dbUrl, dbUser, dbPwd);
        BufferedReader reader = new BufferedReader(
            new FileReader("create-tables.sql"));) {
     ScriptRunner runner = new ScriptRunner(connection, false, true);
      runner.runScript(reader);
      connection.close();
    } catch (Exception e) {
      e.printStackTrace();
      throw e;
    }

In the sql file, I have all my requests to create all my tables and the script runner execute one statement by request.
I  start to think that's due to the autocommit and so by consequence the "database" access.

Regards,
Mathieu

De : mathieu ferlay [mailto:mferlay@gnubila.fr]
Envoyé : jeudi 16 mars 2017 15:02
À : user@trafodion.incubator.apache.org<ma...@trafodion.incubator.apache.org>
Objet : RE: issue wtih foreign keys

Hi,
I have change my request by using alter table do it but I still have some "lost" of process. It's look like an infinite loop inside the execute statement.
I don't know what it could causes that.

Regards,
Mathieu

De : mathieu ferlay [mailto:mferlay@gnubila.fr]
Envoyé : jeudi 16 mars 2017 10:05
À : user@trafodion.incubator.apache.org<ma...@trafodion.incubator.apache.org>
Objet : issue wtih foreign keys

Hi, i'll try to create the following table C. I assume that tables A & B are executed before C.  But when I try to execute the statement for the table C, the process nerver back from the statement.execute(request). Furthermore, I obtain also the following trace when I force the commit with connection.commit();
' (line 120): *** ERROR[8838] Unable to receive reply from Compiler, possibly caused by internal errors when compiling SQL statements, processing DDL statements, or executing the builtin stored procedures. [2017-03-16 09:02:56]
Could you tell me which kind of reasons could provoked it.



CREATE TABLE IF NOT EXISTS A (
  AID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT  NOT NULL,
  Description  VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT  NULL,
  PRIMARY KEY(AID)
)

CREATE TABLE IF NOT EXISTS B (
  Name VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,
  FirstName VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,
  BID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,
  PRIMARY KEY(BID)
)



CREATE TABLE IF NOT EXISTS C (
  BID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,
  AID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,
  PRIMARY KEY(AID,BID),
  FOREIGN KEY(AID)
    REFERENCES A(AID),
  FOREIGN KEY(BID)
    REFERENCES B(BID)
)


Regards
Mathieu FERLAY


RE: issue wtih foreign keys

Posted by mathieu ferlay <mf...@gnubila.fr>.
Hi again, 

I don’t know if explain my process will help but maybe:

    try (Connection connection = DriverManager.getConnection(dbUrl, dbUser,
dbPwd);

        BufferedReader reader = new BufferedReader(

            new FileReader("create-tables.sql"));) {

     ScriptRunner runner = new ScriptRunner(connection, false, true);

      runner.runScript(reader);

      connection.close();

    } catch (Exception e) {

      e.printStackTrace();

      throw e;

    }

 

In the sql file, I have all my requests to create all my tables and the
script runner execute one statement by request.

I  start to think that’s due to the autocommit and so by consequence the
“database” access.

 

Regards,

Mathieu

 

De : mathieu ferlay [mailto:mferlay@gnubila.fr] 
Envoyé : jeudi 16 mars 2017 15:02
À : user@trafodion.incubator.apache.org
Objet : RE: issue wtih foreign keys

 

Hi, 

I have change my request by using alter table do it but I still have some
“lost” of process. It’s look like an infinite loop inside the execute
statement.

I don’t know what it could causes that.

 

Regards,

Mathieu

 

De : mathieu ferlay [mailto:mferlay@gnubila.fr] 
Envoyé : jeudi 16 mars 2017 10:05
À : user@trafodion.incubator.apache.org
<ma...@trafodion.incubator.apache.org> 
Objet : issue wtih foreign keys

 

Hi, i’ll try to create the following table C. I assume that tables A & B are
executed before C.  But when I try to execute the statement for the table C,
the process nerver back from the statement.execute(request). Furthermore, I
obtain also the following trace when I force the commit with
connection.commit();

' (line 120): *** ERROR[8838] Unable to receive reply from Compiler,
possibly caused by internal errors when compiling SQL statements, processing
DDL statements, or executing the builtin stored procedures. [2017-03-16
09:02:56]

Could you tell me which kind of reasons could provoked it.

 

      

 

CREATE TABLE IF NOT EXISTS A (

  AID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT  NOT NULL,

  Description  VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT  NULL,

  PRIMARY KEY(AID)

) 

 

CREATE TABLE IF NOT EXISTS B (

  Name VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,

  FirstName VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,

  BID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,

  PRIMARY KEY(BID)

)

 

 

 

CREATE TABLE IF NOT EXISTS C (

  BID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,

  AID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,

  PRIMARY KEY(AID,BID),

  FOREIGN KEY(AID)

    REFERENCES A(AID),

  FOREIGN KEY(BID)

    REFERENCES B(BID)

)

 

 

Regards

Mathieu FERLAY

 


RE: issue wtih foreign keys

Posted by mathieu ferlay <mf...@gnubila.fr>.
Hi, 

I have change my request by using alter table do it but I still have some
“lost” of process. It’s look like an infinite loop inside the execute
statement.

I don’t know what it could causes that.

 

Regards,

Mathieu

 

De : mathieu ferlay [mailto:mferlay@gnubila.fr] 
Envoyé : jeudi 16 mars 2017 10:05
À : user@trafodion.incubator.apache.org
Objet : issue wtih foreign keys

 

Hi, i’ll try to create the following table C. I assume that tables A & B are
executed before C.  But when I try to execute the statement for the table C,
the process nerver back from the statement.execute(request). Furthermore, I
obtain also the following trace when I force the commit with
connection.commit();

' (line 120): *** ERROR[8838] Unable to receive reply from Compiler,
possibly caused by internal errors when compiling SQL statements, processing
DDL statements, or executing the builtin stored procedures. [2017-03-16
09:02:56]

Could you tell me which kind of reasons could provoked it.

 

      

 

CREATE TABLE IF NOT EXISTS A (

  AID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT  NOT NULL,

  Description  VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT  NULL,

  PRIMARY KEY(AID)

) 

 

CREATE TABLE IF NOT EXISTS B (

  Name VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,

  FirstName VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,

  BID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,

  PRIMARY KEY(BID)

)

 

 

 

CREATE TABLE IF NOT EXISTS C (

  BID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,

  AID VARCHAR(255) CHARACTER SET utf8 COLLATE DEFAULT NOT NULL,

  PRIMARY KEY(AID,BID),

  FOREIGN KEY(AID)

    REFERENCES A(AID),

  FOREIGN KEY(BID)

    REFERENCES B(BID)

)

 

 

Regards

Mathieu FERLAY