Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-17655

SQL UPDATE on Object mapped to mysqlconn fails

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • hpl/sql
    • None

    Description

      We have a MySQL Database configured in hplsql-site.xml:

      <property>
        <name>hplsql.conn.mysqlconn</name>
        <value>com.mysql.jdbc.Driver;jdbc:mysql://<our my sql server>/defaultdb;luser;strenggeheim</value>
        <description>MySQL connection</description>
      </property>
      

      In hplsqlrc:

      MAP OBJECT T TO defaultdb.T AT mysqlconn;
      

      This works:

      $ hplsql -e "select * from T;"
      Open connection: jdbc:mysql:/<our mysql server>/defaultdb (649 ms)
      Starting query
      Query executed successfully (5 ms)
      1 Hans
      $ 
      

      This not:

      $ hplsql -e "UPDATE T SET name = 'Peter' WHERE id = 1;"
      

      This funnily tries to open the hive connection and fails with not knowing table T ... ofc T exists only on our MySQL DB ...

      Really strange ... if we set the mysqlconn as default connection, then everything works as expected ...

      It looks like hplsql forgets to lookup the mapped object and assumes it only needs to access the default connection.

      Personally I would much more prefer, to have the connection in the table specification than in a MAP statement, like for exmaple in presto:

      SELECT * FROM mysqlconn.T;
      

      We are using cloudera 5.12 and I have downloaded hplsql-0.3.31 ...

      Thx for any info in advance.

      Attachments

        Activity

          People

            Unassigned Unassigned
            kc14 Frank Kemmer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: