barryvdh / laravel-debugbar

Debugbar for Laravel (Integrates PHP Debug Bar)
MIT License
16.57k stars 1.53k forks source link

Queries with union and uses wrong binding parameters (in some cases) #1602

Open machlon-caveo-nl opened 3 months ago

machlon-caveo-nl commented 3 months ago

I was investigating a query and found this:

Main Query (with 2 binding params) keys [0, 1] Union Query (with 3 binding params) keys [2, 3, 4]

Debug bar uses [0, 1] for Main and [0, 1, 2] for Union query

In this case the sql is rendered incorrect

erikn69 commented 3 months ago

image I couldn't replicate it, what driver do you use, Laravel version, laravel-debugbar version?

machlon-caveo-nl commented 3 months ago

Hi Erik,

Thanks for responding so quickly.

barryvdh/laravel-debugbar: v3.6.7

laravel/framework: v8.83.14

Kindest Regards / Met vriendelijke groet,

Machlon Laarman

Van: erikn69 @.> Verzonden: dinsdag 2 april 2024 17:55 Aan: barryvdh/laravel-debugbar @.> CC: machlon-caveo-nl @.>; Author @.> Onderwerp: Re: [barryvdh/laravel-debugbar] Queries with union and uses wrong binding parameters (in some cases) (Issue #1602)

image.png (view on web) https://github.com/barryvdh/laravel-debugbar/assets/4933954/13c29e72-99cc-45e0-aad7-428e9e25ec39 I couldn't replicate it, what driver do you use, Laravel version, laravel-debugbar version?

— Reply to this email directly, view it on GitHub https://github.com/barryvdh/laravel-debugbar/issues/1602#issuecomment-2032438386 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AZLVB4U3OATMIAB4XROYL4TY3LIEHAVCNFSM6AAAAABFTKK3O6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZSGQZTQMZYGY . You are receiving this because you authored the thread.Message ID: @.***>

erikn69 commented 3 months ago

You have very really outdated versions try adding "repositories" with my fork, i added laravel 8 with the current changes

"require-dev": {
    "barryvdh/laravel-debugbar": "^3.6.7",
    ///
},
"repositories":[
    {
        "type": "vcs",
        "url": "git@github.com:erikn69/laravel-debugbar.git"
    }
],
machlon-caveo-nl commented 3 months ago

Hi Erik,

I tried your patch but still the same result.

It’s not a big deal but maybe the problem is still present in master branch.

Thanks anyway

Met vriendelijke groet,

Machlon Laarman

Van: erikn69 @.> Verzonden: woensdag 3 april 2024 16:16 Aan: barryvdh/laravel-debugbar @.> CC: machlon-caveo-nl @.>; Author @.> Onderwerp: Re: [barryvdh/laravel-debugbar] Queries with union and uses wrong binding parameters (in some cases) (Issue #1602)

You have very really outdated versions try adding "repositories" with my fork, i added laravel 8 with the current changes

"require-dev": { "barryvdh/laravel-debugbar": "^3.6.7", /// }, "repositories":[ { "type": "vcs", "url": @.***:erikn69/laravel-debugbar.git" } ],

— Reply to this email directly, view it on GitHub https://github.com/barryvdh/laravel-debugbar/issues/1602#issuecomment-2034743168 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AZLVB4SXXKTBOIILYAXPWE3Y3QFK3AVCNFSM6AAAAABFTKK3O6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZUG42DGMJWHA . You are receiving this because you authored the thread.Message ID: @.***>