port Bug#34890862 Bug#35410465 Bug#34616553
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
Línea de trabajo
Comience con sql/item_subselect.cc y siga las rutas de resolución de ORDER BY y window-function de las tablas derivadas combinadas descritas en el issue. Compare el tratamiento de las expresiones ya resueltas, las referencias a real_item() y los elementos ocultos con las tres descripciones de regresión. Se considera terminado cuando las tres regresiones reportadas —el fallo, la aserción y el ORDER BY ignorado— estén solucionadas sin volver a resolver incorrectamente la expresión combinada.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Bug#34890862: Mysql server crash : `item->hidden == hidden' in assert_consistent_hidden_flags
This is regression from Bug#34616553. When deciding to not re-resolve a merged order by expression, the order by expression was always added as a hidden item. However if the order by expression is part of the visible fields list of the query block where the order by is merged, the view ref in the select expression would be marked visible where as the order by item which is also the referenced item by the select expression would be marked hidden. This leads to an assert later when it is detected that there is a mismatch in the hidden flag for the view ref and the underlying referenced item. Solution is to not add a hidden element when the order by item is found in the visible fields list of the query block where the order by is merged to.
Bug#35410465: Subquery ORDER BY is ignored
This is a regression from Bug#34890862. That fix made a change for already resolved ORDER BY items to not be re-resolved (it is usually the case when a derived table is merged). As part of the change, when comparing the order by items to the visible fields in the outer query block, it compared the order by item with the referenced item in the ref_item_array. For the case in bugpage, the order by item itself is a reference. This makes the comparison fail.
So we now compare the real_item() of the order by expression to the real_item() of the ref_item_array elements.
Also, when a hidden item is added, the original fix missed to set order->item to point to the correct ref array item like what is done in find_order_in_list().
Bug#34616553: SEGV (Item_subselect::print() at sql/item_subselect.cc:833) reported by ASan
The problem was introduced before version 8.0.22 and fixed in community version 8.0.33.
For this problem to happen, it needs several conditions to be met:
- A mergeable derived table having a subquery in select list which is referenced by ORDER BY through an alias. This makes the ORDER BY reference the select expression when it gets resolved.
- Needs to have a subquery with the same name in the query block where the derived table gets merged.
- Needs to have window function referencing the subquery through an alias in PARTITION BY or ORDER BY clause. This makes it take a special path while resolving the ordering item to point to the view reference (from the merged derived table) than the one in the select list.
When the derived table having the order by referencing the subquery in select expression gets merged, order by is moved to the outer query block. This makes another call to resolve the order by item. This time, it cleans up the order by item since it resolves against the select list again. Later, window function's partition by clause resolves against the view reference pointing to the subquery which was deleted previously leading to problems later during optimization.
Solution is to not do the resolving again for a merged order by expression. We now have a check for a non constant expression that is already resolved and for such a order by expression, we just add a hidden element to the merged query block instead of re-resolving it.
- Lenguaje dominante
- C++
- Estrellas
- 712
- Forks
- 428
- Merge medio
- 5 h 43 min
- PR fusionados (30 d)
- 1
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de OpenTenBase/TXSQL
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
OpenTenBase/TXSQL#95 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
OpenTenBase/TXSQL#57 · 1 comentario ·
-
基线卡在 8.0.30,上游 8.0 已经 EoLAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
OpenTenBase/TXSQL#119 ·
-
InnoDB Linux 原生 AIO 完成路径在持有数组互斥锁的状态下做页解密/解压,导致所有 I/O 线程串行化Posiblemente ocupada @puli2300 la tomó hace 82 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 32/100
OpenTenBase/TXSQL#113 ·
-
[optimization] Add AVX-512 VPCLMULQDQ accelerated CRC32-C for TXSQL 8.0.30Posiblemente ocupada @lgkw22 la tomó hace 44 días. Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
OpenTenBase/TXSQL#112 ·
Todos los issues de OpenTenBase/TXSQL
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
cp-algorithms/cp-algorithms#1774 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
telefonicaid/fiware-orion#4836 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
SanderMertens/flecs#2463 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
Los mantenedores suelen responder en 2 días
-
nixd exits at startup when its parent process belongs to another userPosiblemente ocupada @conao3 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
nix-community/nixd#930 ·
Los mantenedores suelen responder en 2 días