You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Vladimir Ozerov (JIRA)" <ji...@apache.org> on 2017/09/25 13:51:00 UTC

[jira] [Resolved] (IGNITE-6457) Incorrect exception when used schema name in lower case

     [ https://issues.apache.org/jira/browse/IGNITE-6457?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vladimir Ozerov resolved IGNITE-6457.
-------------------------------------
    Resolution: Fixed

> Incorrect exception when used schema name in lower case 
> --------------------------------------------------------
>
>                 Key: IGNITE-6457
>                 URL: https://issues.apache.org/jira/browse/IGNITE-6457
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 2.1
>         Environment: Cache configuration:
> {noformat}
>         <property name="cacheConfiguration">
>             <list>
>                 <!-- Partitioned cache example configuration (Atomic mode). -->
>                 <bean class="org.apache.ignite.configuration.CacheConfiguration">
>                     <property name="name" value="cache1"/>
>                     <property name="atomicityMode" value="ATOMIC"/>
>                     <property name="sqlSchema" value="test"/>
>                     <property name="backups" value="1"/>
>                 </bean>
>             </list>
>         </property>
> {noformat}
>            Reporter: Ilya Suntsov
>            Assignee: Taras Ledkov
>              Labels: usability
>             Fix For: 2.3
>
>
> Scenario:
> 1. Start 1 node
> 2. connect to node via sqlline (https://github.com/julianhyde/sqlline)
> {noformat} ./sqlline -d org.apache.ignite.IgniteJdbcThinDriver --color=true --verbose=true --showWarnings=true --showNestedErrs=true -u jdbc:ignite:thin://127.0.0.1:10800/test{noformat}
> 3. Create table:
> {noformat}CREATE TABLE city1 (id LONG PRIMARY KEY, name VARCHAR);{noformat}
> Result:
> {noformat}
> [16:35:27,506][SEVERE][client-connector-#40%null%][JdbcRequestHandler] Failed to execute SQL query [reqId=0, req=JdbcQueryExecuteRequest [schemaName=test, pageSize=1024, maxRows=0, sqlQry=CREATE TABLE city1 (id LONG PRIMARY KEY, name VARCHAR), args=[], stmtType=ANY_STATEMENT_TYPE]]
> class org.apache.ignite.internal.processors.query.IgniteSQLException: Failed to set schema for DB connection for thread [schema=test]
> 	at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.connectionForThread(IgniteH2Indexing.java:439)
> 	at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.connectionForSchema(IgniteH2Indexing.java:356)
> 	at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.queryDistributedSqlFields(IgniteH2Indexing.java:1287)
> 	at org.apache.ignite.internal.processors.query.GridQueryProcessor$6.applyx(GridQueryProcessor.java:1918)
> 	at org.apache.ignite.internal.processors.query.GridQueryProcessor$6.applyx(GridQueryProcessor.java:1914)
> 	at org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36)
> 	at org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:2396)
> 	at org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFieldsNoCache(GridQueryProcessor.java:1922)
> 	at org.apache.ignite.internal.processors.odbc.jdbc.JdbcRequestHandler.executeQuery(JdbcRequestHandler.java:286)
> 	at org.apache.ignite.internal.processors.odbc.jdbc.JdbcRequestHandler.handle(JdbcRequestHandler.java:149)
> 	at org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:141)
> 	at org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:40)
> 	at org.apache.ignite.internal.util.nio.GridNioFilterChain$TailFilter.onMessageReceived(GridNioFilterChain.java:279)
> 	at org.apache.ignite.internal.util.nio.GridNioFilterAdapter.proceedMessageReceived(GridNioFilterAdapter.java:109)
> 	at org.apache.ignite.internal.util.nio.GridNioAsyncNotifyFilter$3.body(GridNioAsyncNotifyFilter.java:97)
> 	at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
> 	at org.apache.ignite.internal.util.worker.GridWorkerPool$1.run(GridWorkerPool.java:70)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> 	at java.lang.Thread.run(Thread.java:745)
> Caused by: org.h2.jdbc.JdbcSQLException: Schema "test" not found; SQL statement:
> SET SCHEMA "test" [90079-195]
> 	at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
> 	at org.h2.message.DbException.get(DbException.java:179)
> 	at org.h2.message.DbException.get(DbException.java:155)
> 	at org.h2.engine.Database.getSchema(Database.java:1755)
> 	at org.h2.command.dml.Set.update(Set.java:408)
> 	at org.h2.command.CommandContainer.update(CommandContainer.java:101)
> 	at org.h2.command.Command.executeUpdate(Command.java:260)
> 	at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:137)
> 	at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:122)
> 	at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.connectionForThread(IgniteH2Indexing.java:431)
> 	... 19 more
> {noformat}
> So we have incorrect exception.
> Correct one appears if used the following jdbc url: {{jdbc:ignite:thin://127.0.0.1:10800/TEST}}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)