can't create table via jdbc?

3 posts / 0 new
Last post
nsousa
nsousa's picture
Offline
Last seen: 2 weeks 8 min ago
Joined: Jul 22 2014
Junior Boarder

Posts: 2

Nelson Sousa
can't create table via jdbc?

Hi,

 

I'm new in InfiniDB and my guess is I'm probably doing something wrong, but I can't seem to be able to create any tables with engine=infinidb.

 

I created a user called etl_user, here are its grants:

 

+--------------------------------------------------------------------------------------------------------+

| Grants for etluser@%                                                                                   |

+--------------------------------------------------------------------------------------------------------+

| GRANT USAGE ON *.* TO 'etluser'@'%' IDENTIFIED BY PASSWORD '****************' |

| GRANT ALL PRIVILEGES ON `infinidb_vtable`.* TO 'etluser'@'%'                                           |

| GRANT ALL PRIVILEGES ON `me_stage`.* TO 'etluser'@'%'                                                  |

| GRANT ALL PRIVILEGES ON `me_dwh`.* TO 'etluser'@'%'                                                    |

| GRANT ALL PRIVILEGES ON `me_etl`.* TO 'etluser'@'%'                                                    |

+--------------------------------------------------------------------------------------------------------+

5 rows in set (0.00 sec)

 

 

When I connect via JDBC using mysql connector/J, I create tables with engine=myisam with no issue, but when I do the same with engine=infinidb I get an error.

 

The statement is as follows:

 

 

create table test(

column_a int,

column_b varchar(10)

)engine=infinidb;

 

 

And I get this:

 

SQL Error [138] [HY000]: The syntax or the data type(s) is not supported by InfiniDB. Please check the InfiniDB syntax guide for supported syntax or data types.
  The syntax or the data type(s) is not supported by InfiniDB. Please check the InfiniDB syntax guide for supported syntax or data types.
 
 
I'm using Dbeaver on Mac, but I got the same issue with Squirrel. What am I doing wrong?
 
 
 
 

 

radams
radams's picture
Online
Last seen: 5 min 35 sec ago
Joined: Jan 3 2011
Administrator

Posts: 493

Robert Adams
can't create table via jdbc?

 

There does not seem to be anything wrong with the syntax which is the error being reported.

 

mysql> create table test( column_a int, column_b varchar(10) )engine=infinidb;                                                           
Query OK, 0 rows affected (0.27 sec)
 
Are you able to create the same table when not using a JDBC using mysql connector?
Maybe the tool is inserting something into the create table statement?
 
Thanks,
 
Robert
 
 

 

nsousa
nsousa's picture
Offline
Last seen: 2 weeks 8 min ago
Joined: Jul 22 2014
Junior Boarder

Posts: 2

Nelson Sousa
I have no problem creating

I have no problem creating the table directly from the console, it creates easily.

 

but over JDBC I never manage to get it running, either for create or drop tables. A simple "drop table mytable" fails with that same syntax error.

 

I'm using com.mysql.jdbc_5.1.27.jar to connect through Dbeaver and mysql-connector-java-5.1.31-bin.jar to connect through Pentaho Data Integration. Neither allows the creation of tables, apparently.