Skip to content

Commit

Permalink
Save 'strlen' value in variable (#270)
Browse files Browse the repository at this point in the history
  • Loading branch information
ashenBlade authored Oct 7, 2024
1 parent 47354c2 commit 5a258d2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions columnar/src/backend/columnar/columnar_planner_hook.c
Original file line number Diff line number Diff line change
Expand Up @@ -408,11 +408,12 @@ static bool
IsCreateTableAs(const char *query)
{
char *c, *t, *a;
char *haystack = (char *) palloc(strlen(query) + 1);
int16 i;
size_t query_len = strlen(query);
char *haystack = (char *) palloc(query_len + 1);
int32 i;

/* Create a lower case copy of the string. */
for (i = 0; i < strlen(query); i++)
for (i = 0; i < query_len; i++)
{
haystack[i] = tolower(query[i]);
}
Expand Down

0 comments on commit 5a258d2

Please sign in to comment.