Commit d57c44f
committed
MDEV-31277 Wrong result on 2-nd execution of PS to select from view using derived
As a result of this bug the second execution of the prepared statement created for select from materialized view could return a wrong result set if - the specification of the view used a left join - an inner table the left join was a mergeable derived table - the derived table contained a constant column. The problem appeared because the flag 'maybe-null' of the wrapper Item_direct_view_ref constructed for the constant field of the mergeable derived table was not set to 'true' on the second execution of the prepared statement. The patch always sets this flag properly when calling the function Item_direct_view_ref::set_null_ref-table(). The latter is invoked in Item_direct_view_ref constructor if it is created for some reference of a constant column belonging to a mergeable derived table. Approved by Oleksandr Byelkin <sanja@mariadb.com>1 parent 0f0da95 commit d57c44f
File tree
4 files changed
+70
-12
lines changed- mysql-test/main
- sql
4 files changed
+70
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4250 | 4250 | | |
4251 | 4251 | | |
4252 | 4252 | | |
| 4253 | + | |
| 4254 | + | |
| 4255 | + | |
| 4256 | + | |
| 4257 | + | |
| 4258 | + | |
| 4259 | + | |
| 4260 | + | |
| 4261 | + | |
| 4262 | + | |
| 4263 | + | |
| 4264 | + | |
| 4265 | + | |
| 4266 | + | |
| 4267 | + | |
| 4268 | + | |
| 4269 | + | |
| 4270 | + | |
| 4271 | + | |
| 4272 | + | |
| 4273 | + | |
| 4274 | + | |
| 4275 | + | |
| 4276 | + | |
| 4277 | + | |
| 4278 | + | |
| 4279 | + | |
| 4280 | + | |
| 4281 | + | |
| 4282 | + | |
| 4283 | + | |
| 4284 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2832 | 2832 | | |
2833 | 2833 | | |
2834 | 2834 | | |
| 2835 | + | |
| 2836 | + | |
| 2837 | + | |
| 2838 | + | |
| 2839 | + | |
| 2840 | + | |
| 2841 | + | |
| 2842 | + | |
| 2843 | + | |
| 2844 | + | |
| 2845 | + | |
| 2846 | + | |
| 2847 | + | |
| 2848 | + | |
| 2849 | + | |
| 2850 | + | |
| 2851 | + | |
| 2852 | + | |
| 2853 | + | |
| 2854 | + | |
| 2855 | + | |
| 2856 | + | |
| 2857 | + | |
| 2858 | + | |
| 2859 | + | |
| 2860 | + | |
| 2861 | + | |
| 2862 | + | |
| 2863 | + | |
| 2864 | + | |
| 2865 | + | |
| 2866 | + | |
| 2867 | + | |
| 2868 | + | |
| 2869 | + | |
| 2870 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2372 | 2372 | | |
2373 | 2373 | | |
2374 | 2374 | | |
2375 | | - | |
2376 | | - | |
2377 | 2375 | | |
2378 | 2376 | | |
2379 | | - | |
2380 | 2377 | | |
2381 | 2378 | | |
2382 | 2379 | | |
| |||
2391 | 2388 | | |
2392 | 2389 | | |
2393 | 2390 | | |
2394 | | - | |
2395 | | - | |
2396 | 2391 | | |
2397 | | - | |
2398 | 2392 | | |
2399 | 2393 | | |
2400 | 2394 | | |
| |||
2408 | 2402 | | |
2409 | 2403 | | |
2410 | 2404 | | |
2411 | | - | |
2412 | | - | |
2413 | 2405 | | |
2414 | 2406 | | |
2415 | 2407 | | |
| |||
2422 | 2414 | | |
2423 | 2415 | | |
2424 | 2416 | | |
2425 | | - | |
2426 | 2417 | | |
2427 | 2418 | | |
2428 | 2419 | | |
| |||
2436 | 2427 | | |
2437 | 2428 | | |
2438 | 2429 | | |
2439 | | - | |
2440 | | - | |
2441 | 2430 | | |
2442 | | - | |
2443 | 2431 | | |
2444 | 2432 | | |
2445 | 2433 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5876 | 5876 | | |
5877 | 5877 | | |
5878 | 5878 | | |
| 5879 | + | |
| 5880 | + | |
5879 | 5881 | | |
5880 | 5882 | | |
5881 | 5883 | | |
| |||
0 commit comments