Error
Error Code:
1120
MariaDB Error 1120: Outer Join Cross Dependency
Description
This error indicates that the MariaDB optimizer detected an invalid or ambiguous reference within an `ON` condition of an `OUTER JOIN` clause. It typically occurs when an `ON` condition references a table that is not directly involved in the current join pair, creating a dependency loop or an unresolvable access path, preventing the query from being optimized correctly.
Error Message
Cross dependency found in OUTER JOIN; examine your ON conditions
Known Causes
3 known causesComplex ON Conditions
An `ON` condition in an `OUTER JOIN` references columns from tables that are not directly being joined in that specific clause, leading to an invalid dependency.
Nested Outer Joins
In a query with multiple nested `OUTER JOIN` operations, an `ON` clause for an inner join attempts to reference a table from an outer join that is not yet available or causes a circular dependency.
Misplaced Predicates
Predicates intended for the `WHERE` clause are incorrectly placed within an `OUTER JOIN`'s `ON` clause, altering the join's behavior and potentially creating cross-dependencies.
Solutions
Coming SoonGeneral Troubleshooting Tips
- Check the error message carefully for specific details
- Review recent changes that might have caused the error
- Search for the exact error code in the official documentation
- Check log files for additional context
- Try restarting the application or service