db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Graham Lea (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DDLUTILS-287) readModelFromDatabase() fails on MariaDB when schema being read is not the schema in the connection URL
Date Fri, 24 Apr 2015 11:48:38 GMT

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

Graham Lea commented on DDLUTILS-287:
-------------------------------------

I should note that my environment wasn't always doing this. When I first installed MariaDB
and was just doing some testing with root against the default installed schemas, everything
worked fine. Then I added in some custom users and schemas and this bug started showing up.
I tried reverting all I'd changed but couldn't get the issue to go away.

> readModelFromDatabase() fails on MariaDB when schema being read is not the schema in
the connection URL
> -------------------------------------------------------------------------------------------------------
>
>                 Key: DDLUTILS-287
>                 URL: https://issues.apache.org/jira/browse/DDLUTILS-287
>             Project: DdlUtils
>          Issue Type: Bug
>          Components: Core (No specific database), Core - MySql
>    Affects Versions: 1.0
>         Environment: MariaDB 10.0.17-MariaDB Homebrew
>            Reporter: Graham Lea
>            Assignee: Thomas Dudziak
>              Labels: easyfix
>
> MariaDB (and MySQL) JDBC connector requires a schema to be named as part of the JDBC
URL. This results in that schema being the "default" schema for that connection, i.e. queries
with unqualified table names are looked for in that schema.
> When Platform.readModelFromDatabase() is called for a schema OTHER THAN the schema named
in the URL, MariaDB looks for the table under the other schema and doesn't find it, throwing
an error like:
> {code}
> org.apache.ddlutils.DatabaseOperationException: java.sql.SQLSyntaxErrorException: Table
'information_schema.column_stats' doesn't exist
> {code}
> (column_stats is a table in the 'mysql' schema)



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

Mime
View raw message