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

add support for CREATE TEMPORARY TABLE #438

Merged
merged 5 commits into from
Aug 5, 2019

Conversation

leiysky
Copy link
Contributor

@leiysky leiysky commented Aug 5, 2019

What problem does this PR solve?

Add support for CREATE TEMPORARY TABLE #408

What is changed and how it works?

MySQL syntax:

create_table_stmt:
          CREATE opt_temporary TABLE_SYM opt_if_not_exists table_ident
          '(' table_element_list ')' opt_create_table_options_etc
        | CREATE opt_temporary TABLE_SYM opt_if_not_exists table_ident
          opt_create_table_options_etc

Check List

Tests

  • Unit test

@codecov
Copy link

codecov bot commented Aug 5, 2019

Codecov Report

Merging #438 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #438      +/-   ##
==========================================
+ Coverage   70.84%   70.85%   +0.01%     
==========================================
  Files          32       32              
  Lines        7501     7504       +3     
==========================================
+ Hits         5314     5317       +3     
  Misses       1674     1674              
  Partials      513      513
Impacted Files Coverage Δ
parser.go 70.58% <ø> (ø) ⬆️
ast/ddl.go 78.5% <100%> (+0.04%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d93f654...fd9e762. Read the comment docs.

@tangenta
Copy link
Contributor

tangenta commented Aug 5, 2019

@leiysky TiDB does not support TEMPORARY tables. Would you please add a warning in the parser for both CreateTableStmt and DropTableStmt?

@leiysky leiysky changed the title add support for CREATE TEMPORARY TABLE [WIP]add support for CREATE TEMPORARY TABLE Aug 5, 2019
@leiysky
Copy link
Contributor Author

leiysky commented Aug 5, 2019

@tangenta PTAL

@leiysky leiysky changed the title [WIP]add support for CREATE TEMPORARY TABLE add support for CREATE TEMPORARY TABLE Aug 5, 2019
Copy link
Contributor

@tangenta tangenta left a comment

Choose a reason for hiding this comment

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

LGTM

@tangenta
Copy link
Contributor

tangenta commented Aug 5, 2019

@leoppro PTAL

parser.y Outdated Show resolved Hide resolved
parser.y Outdated Show resolved Hide resolved
parser.y Outdated Show resolved Hide resolved
parser.y Show resolved Hide resolved
parser_test.go Show resolved Hide resolved
- add test cases
- throw warn in TEMPORARY rule
Copy link
Contributor

@zier-one zier-one left a comment

Choose a reason for hiding this comment

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

LGTM

@zier-one zier-one merged commit 638d5cb into pingcap:master Aug 5, 2019
@zier-one zier-one added the status/LGT2 LGT2 label Aug 5, 2019
@leiysky leiysky deleted the fix/temporary branch August 5, 2019 10:58
tiancaiamao pushed a commit to tiancaiamao/parser that referenced this pull request Apr 27, 2021
lyonzhi pushed a commit to lyonzhi/parser that referenced this pull request Apr 25, 2024
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.

3 participants