Adalennis opened a new issue, #9166:
URL: https://github.com/apache/hop/issues/9166

   ### Apache Hop version?
   
   SNAPSHOT-20261021
   
   ### Java version?
   
   Java 21
   
   ### Operating system
   
   macOS
   
   ### What happened?
   
   Two bugs in ActionMysqlBulkFile, found while documenting the action's result 
(#9143). Both are described in a NOTE on the docs page, which can be removed 
when they're fixed.
   
   **1. High Priority (checked by default) makes the action fail**
   
   With *High Priority* checked, which is the default (`highPriority = true` in 
the constructor), the action fails on MySQL 8.4:
   
       ERROR: An error occurred executing this action : Table e appears in 
multiple locking clauses.
   
   The action builds `SELECT HIGH_PRIORITY ... INTO OUTFILE ... FROM <table> 
... LOCK IN SHARE MODE` and always appends `LOCK IN SHARE MODE` (line 315). Run 
directly on MySQL 8.4.13:
   
   - `SELECT HIGH_PRIORITY * INTO OUTFILE '/x/q1.txt' FROM e LOCK IN SHARE 
MODE` → ERROR 3569 (HY000): Table e appears in multiple locking clauses.
   - `SELECT * INTO OUTFILE '/x/q2.txt' FROM e LOCK IN SHARE MODE` → works
   - `SELECT HIGH_PRIORITY * FROM e` → works
   
   So a new action with default settings can't export. Unchecking High Priority 
works around it. Possible fixes: stop adding LOCK IN SHARE MODE (it gives 
nothing on InnoDB), or don't combine it with HIGH_PRIORITY.
   
   **2. NullPointerException when the connection doesn't exist**
   
   When *Connection* names a connection that isn't in the project, 
`findDatabase()` returns null and execute() passes it to `new Database(...)` 
without a check (lines 225–228). The NPE escapes execute(), so the workflow 
stops instead of the action being false:
   
       ERROR: java.lang.NullPointerException: Cannot invoke 
"org.apache.hop.core.database.DatabaseMeta.getName()" because 
"this.databaseMeta" is null
           at 
org.apache.hop.workflow.actions.mysqlbulkfile.ActionMysqlBulkFile.execute(ActionMysqlBulkFile.java:228)
       ERROR: A serious error occurred during workflow execution
   
   hop-run exits with 1 and no hop from the action is followed. In the same 
case, Bulk load into MySQL and Bulk load into MSSQL are false with 1 error, 
which is what I'd expect here too.
   
   
   ### Issue Priority
   
   Priority: 3
   
   ### Issue Component
   
   Component: Hop Gui


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to