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

[CUBRIDQA-1203] Refining execute.c and adding PL/CSQL parsing #669

Merged
merged 13 commits into from
Dec 15, 2023

Conversation

hyunikn
Copy link
Contributor

@hyunikn hyunikn commented Dec 15, 2023

http://jira.cubrid.org/browse/CUBRIDQA-1203

  • code refinements
    • adjust include and lib directories paths considering cubrid-cci submodule addition (this will be canceled by CBRD-25126)
    • git ignore geneated binary files execute and ccqt and a generated header file interface_verify.h
    • use memmove instead of two memcopy's in trimline()
    • disallow -- holdcas on/off : there are no such directives in the TCs
    • allow --+holdcas on/off (note no space between --+ and holdcas) : there are TCs which have them
    • remove unnecessary variable 'iscallwithoutvalue'
    • simplify iscomment() function
    • simplify endwith() function and rename it to endswithsemicolon()
    • rename char_cmp() to startswith()
    • add startswithCI() : CI for Case Insensitive
    • use stack instead of heap for str_tmp, and rename str_tmp to sql_buf
    • rename linelength to sql_len
    • trim input string line at the start of every iteration of the while loop in readFile() to avoid repeated trimming later
    • exit when whole sql line overflows str_buf
    • avoid the repeated call of trimline(p) in formatplan() function
  • add PL/CSQL parser - line_scanner.c which is copied from CUBRID's csql_support.c, and is distilled.
  • fix a segmentation fault in ccqt

…ubmodule addition

(2) add .gitignore to ignore generated binary files ccqt and execute
. use memmove instead of two memcopy's
. disallow -- holdcas on/off (only allow --+ holdcas on/off)
. remove unneccessary state variable 'iscallwithoutvalue'
. correct a typo: 'linelenght' --> 'linelength'
. simplify iscomment() function
. simplify endwith() function and rename it to endswithsemicolon()
. rename char_cmp() to startswith()
. add startswithCI() : CI for Case Insensitive
. use stack area instead of heap for str_tmp, and rename str_tmp to sql_buf
. rename linelength to sql_len
. trim input string line at the start of every iteration of the while loop in readFile()
    . to avoid repeated trimming afterwards
. exit when whole sql line overflows str_buf
. avoid the repeated call of trimline(p) in formatplan() function
  . it is copied from CUBRID's csql_support.c
@hyunikn hyunikn self-assigned this Dec 15, 2023
@hyunikn hyunikn marked this pull request as ready for review December 15, 2023 05:28
@hyunikn hyunikn merged commit f8ce8b3 into CUBRID:develop Dec 15, 2023
1 check passed
@hyunikn hyunikn deleted the CUBRIDQA-1203-plcsql-parsing branch December 15, 2023 10:05
ssihil added a commit to ssihil/cubrid-testtools that referenced this pull request Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants