Skip to content

Conversation

@MilovdZee
Copy link

It used to scan for 'INTO' but that fails on field names like 'MarginTotal' as that contain the sequence 'inTo'.
I did a lazy fix by searching for ' INTO '. So with two spaces. The code that checks strings is very deeply integrated and using a regex might be expensive.
This at least is better than before the previous bug.

See https://bugs.mysql.com/bug.php?id=119245
and 55f5db9#r168900828

private static final String[] ODKU_CLAUSE = new String[] { "ON", "DUPLICATE", "KEY", "UPDATE" };
private static final String LAST_INSERT_ID_FUNC = "LAST_INSERT_ID";
private static final String INTO_CLAUSE = "INTO";
private static final String INTO_CLAUSE = " INTO ";
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A regex would be nice but the whole comparing logic does not support that. Now '\nINTO ...' will be missed

@MilovdZee MilovdZee changed the title bug 119245: not 100% fix but better bug 119245: fix the detection logic of 'INTO' keyword Dec 13, 2025
@MilovdZee MilovdZee changed the title bug 119245: fix the detection logic of 'INTO' keyword bug 119245: fix the detection logic of the 'INTO' keyword Dec 13, 2025
@mysql-oca-bot
Copy link

Hi, thank you for submitting this pull request. In order to consider your code we need you to sign the Oracle Contribution Agreement (OCA). Please review the details and follow the instructions at https://oca.opensource.oracle.com/
Please make sure to include your MySQL bug system user (email) in the returned form.
Thanks

@MilovdZee
Copy link
Author

Hi, thank you for submitting this pull request. In order to consider your code we need you to sign the Oracle Contribution Agreement (OCA). Please review the details and follow the instructions at https://oca.opensource.oracle.com/ Please make sure to include your MySQL bug system user (email) in the returned form. Thanks

signed. It is in review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants