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

SQL UPDATE on Object mapped to mysqlconn fails

Log workAgile BoardRank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsAdd voteVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned Assign to me
            kc14 Frank Kemmer

            Dates

              Created:
              Updated:

              Slack

                Issue deployment