[ 
https://issues.apache.org/jira/browse/IGNITE-1993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15055939#comment-15055939
 ] 

Denis Magda commented on IGNITE-1993:
-------------------------------------

Nigel,

This operation below is no longer atomic as it was before when table existence 
and creation happened as a part of single query.

{noformat}
ResultSet tables = dbm.getTables(null, null, ADDRS_TABLE_NAME, null);
 if (!tables.next()) {
   stmt = conn.createStatement();
   stmt.executeUpdate(CREATE_ADDRS_TABLE_QRY);
   conn.commit();
 }
{noformat}

There can be a situation when two or more nodes start executing table creation 
query in parallel. One will succeed while the other will fail with an 
exception. 

Please address this issue in your pull-request as well.

> JDBC discovery uses non-standard SQL when creating table (not compatible with 
> Oracle)
> -------------------------------------------------------------------------------------
>
>                 Key: IGNITE-1993
>                 URL: https://issues.apache.org/jira/browse/IGNITE-1993
>             Project: Ignite
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: ignite-1.4
>         Environment: Oracle database
>            Reporter: Nigel Westbury
>              Labels: easyfix, patch
>             Fix For: 1.4
>
>         Attachments: IGNITE1993.patch
>
>
> The SQL used by TcpDiscoveryJdbcIpFinder to create the table (defined by 
> CREATE_ADDRS_TABLE_QRY) uses 'if not exists' clause.  However this clause is 
> not supported by Oracle and causes SQLSyntaxErrorException: "ORA-00922: 
> missing or invalid option" to be thrown.  This prevents JDBC discovery from 
> being used with an Oracle database.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to