Repository navigation
Fix "Warn when updating a table fails" test without requiring SUPER privilege - #253
Conversation
Creating a trigger fails with ERROR 1419 when binary logging is enabled and the test user lacks the SUPER privilege. Trigger the update error via a unique key conflict instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UWTd5qRHChT2dgTfE2dswC
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
The
Warn when updating a table fails due to a database errorscenario started failing in CI (log):The test created a
BEFORE UPDATEtrigger as the non-root test user. MySQL 8 has binary logging on by default, and in that case it won't let a user without SUPER create a trigger.This PR causes the update error a different way: the
datacolumn now has aUNIQUEkey, and the table already holds bothold-valueandnew-value. Replacingold-valuewithnew-valuehits a duplicate-key error. That happens on the SQLREPLACE()path and on the PHP path alike, and it needs no special privileges. The test now expectsDuplicate entryinstead of the custom trigger message.Generated by Claude Code
Summary by CodeRabbit