-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
10.11 mdev 35815 use after poison in get hash symbol #4318
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
base: 10.11
Are you sure you want to change the base?
10.11 mdev 35815 use after poison in get hash symbol #4318
Conversation
|
@bsrikanth-mariadb , did you see the tests failing with: CURRENT_TEST: main.view
--- /home/buildbot/amd64-debian-12/build/mysql-test/main/view.result 2025-09-26 06:47:13.000000000 +0000
+++ /home/buildbot/amd64-debian-12/build/mysql-test/main/view.reject 2025-09-26 06:54:03.068000000 +0000
@@ -6891,7 +6891,7 @@
SELECT v.id, v.foo AS bar FROM v1 v
WHERE id = 2
GROUP BY v.id;
-id bar
+id foo
2 2
Drop View v1;
Drop table t1; |
|
Notes from discussion: One Item_ref refers to another, not sure if this is ok or not. Copying of Item's name was introduced by: |
Yes Sergei, I am aware of this. Hence I haven't added any reviewers yet. Still it is WIP. Have to sync up with Sanja on this. |
6f36639 to
f28809b
Compare
|
f28809b to
f70d18d
Compare
Sure, made the suggested changes. Also, refined the logic in sql_select.cc with inputs from @sanja-byelkin |
6e87c47 to
d1074a1
Compare
When a PREPARED statment is executed twice, it is crashing during the second execution. For the following query: - PREPARE stmt FROM 'SELECT tbl.subject AS fld FROM v1 AS tbl GROUP BY fld HAVING 0 AND fld != 1'; Here v1 is a view on top of a table having a single longtext column. The column "subject" in v1 is defined as an expression using "ifnull" function. During the first execution: The Item "fld" in the HAVING clause, is an Item_ref instance with name "fld", where it has a ref to another Item_ref instance with the same name "fld" which in turn has a reference to another Item with name "subject". In the join prepare stage, while in the call to setup_copy_fields() from make_aggr_tables_info(), the name field of the last Item instance is replaced with the name in second Item_ref instance. However, after the first execution is done, the meory for the second Item_ref is freed. Now, during the second execution of the same statement, when trying to access name field Item_ref instance, it was getting crashed, because, that memory was already freed earlier. The fix is to allocate a new memory in the stmt_arena for the second Item_ref instance's name->str field.
d1074a1 to
cc56eeb
Compare
Uh oh!
There was an error while loading. Please reload this page.