-
Notifications
You must be signed in to change notification settings - Fork 10.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dot in database table prefix causing php 'Segmentation fault' #28307
Comments
Looks like uncontrolled recursion in |
@staudenmeir didn't we experience this issue before? |
@driesvints This is a different issue. It's caused by Laravel and affects all databases. I'll look into it. |
@staudenmeir thanks! |
This points to a bigger problem that Laravel cannot support tables with |
@CurosMJ We can't really support dots in table names because we can't differentiate between |
@staudenmeir Yes that's true. Also, to correct my previous comment, MySQL does not allow table and database names with |
@CurosMJ MySQL does support it if you quote the table name: select * from `table.with.dots` |
@driesvints I couldn't find a good solution and I suggest that we close this as "not supported". It's an extreme edge case and not really good practice to have table names with dots. Even with a fix, only the table prefix could contain dots but not the "main" table name (#28307 (comment)). |
Yeah, I think this is going to be impossible to fix. But we could change it in a major release if enough people would want it to be supported. Thanks for looking into it 👍 |
It feels somewhat hacky but I was able to pass in a table with a dot in the name by providing an
|
It might be long overdue but I second your answer. Looks like by passing it as an expression it bypasses the wrap method Which somehow ends in an infinite callback between the wrapTable and wrapSegments methods. This is all started by the compileFrom method. @staudenmeir or @bAngerman |
Edit: Laravel 11 looks like it supports it, lol
Issue explanation for older versions:I came back after exploring what is happening, it looks like it gets stuck in an infinite loop and eventually it Seg faults. Here is the simplified flow of what is happening if your prefix has dots in it "prefix.prefix.blabla" Sauce:
|
Description:
Something goes wrong while using tables prefix with dot (when trying to get data from tables like
sys.server_principals
via model). As a result we gotSegmentation fault
.The
gdb
showed that last call ismb_strpos
:By debug i found place in the code that corresponds
gdb
trace:Steps To Reproduce:
Illuminate\Database\Eloquent\Builder
.The text was updated successfully, but these errors were encountered: