Skip to content
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

[CBRD-24516] multi-aggregate-optimize: replace the information which is printed in "show trace" from aggregate function optimization #4424

Merged
merged 2 commits into from
Jun 20, 2023

Conversation

beyondykk9
Copy link
Contributor

@beyondykk9 beyondykk9 commented Jun 14, 2023

http://jira.cubrid.org/browse/CBRD-24516

SHOW TRACE is will be shown as like below:

Trace Statistics:
 SELECT (time: 3736, fetch: 7664, ioread: 0)
   SCAN (table: dba.mx), (heap time: 3505, fetch: 7664, ioread: 0, readrows: 1000000, rows: 1000000, agl: [idx_mx, idx_min])

…is printed in "show trace" from aggregate function optimization
@beyondykk9 beyondykk9 added this to the fig milestone Jun 14, 2023
@beyondykk9 beyondykk9 self-assigned this Jun 14, 2023
@@ -302,6 +302,13 @@ struct scan_pos
QFILE_TUPLE_POSITION ls_tplpos; /* List file index scan position */
}; /* Scan position structure */

typedef struct scan_agl SCAN_AGL;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Q] Does AGL stands for Aggregation List?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agl stands for Aggregation Lookup.

free (p->s_id.scan_stats.agg_index_name);
SCAN_AGL *agl;

for (agl = p->s_id.scan_stats.agl; agl; agl = agl->next)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agl->next : accessing next of the freed agl seems unsafe.

Copy link
Contributor Author

@beyondykk9 beyondykk9 Jun 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I modified at the next commit.

agl = (SCAN_AGL *) malloc (sizeof (SCAN_AGL));
if (agl == NULL)
{
return ER_FAILED;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

free (agg_index_name);
return ER_FAILED;

@beyondykk9 beyondykk9 merged commit 05dbaad into CUBRID:develop Jun 20, 2023
@beyondykk9 beyondykk9 deleted the CBRD-24516-multi-agg branch June 20, 2023 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants