Skip to content

Conversation

@MoonE
Copy link
Contributor

@MoonE MoonE commented Aug 11, 2023

Fixes #490

Adds BOOL as data type, has been available since at least MySQL 3.23
https://github.com/mysql/mysql-server/blob/f4c589ff6c653d1d2a09c26e46ead3c8a15655d8/sql/sql_yacc.yy#L818-L819

Signed-off-by: Maximilian Krög <[email protected]>
Copy link
Member

@williamdes williamdes left a comment

Choose a reason for hiding this comment

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

Thank you!

@williamdes williamdes added this to the 5.9.0 milestone Aug 12, 2023
@williamdes williamdes self-assigned this Aug 12, 2023
@kamil-tekiela
Copy link
Contributor

kamil-tekiela commented Aug 17, 2023

Can you please expand this to all aliases? https://dev.mysql.com/doc/refman/8.0/en/other-vendor-data-types.html
Currently PMA crashes badly if SP uses some of these types.

Test:

CREATE PROCEDURE `p` (
         IN b1 BOOL,
         IN b2 BOOLEAN,
         IN b3 CHARACTER VARYING(5),
         IN b4 FIXED,
         IN b5 FLOAT4,
         IN b6 FLOAT8,
         IN b7 INT1,
         IN b8 LONG VARBINARY,
         IN b9 NUMERIC,
         IN b10 LONG
     ) BEGIN END;

Ref #18633

@MoonE
Copy link
Contributor Author

MoonE commented Aug 17, 2023

What is the correct flag here? I used (D) for BOOL because that's what BOOLEAN was already using. But INT uses (D) and (R). Why isn't BOOLEAN a reserved word, how would you know?

Also why aren't all types defined in _common.txt where it's the always the same?
Imo it could be INT (R) (D) there.

@kamil-tekiela
Copy link
Contributor

I don't know why some words are not reserved words. See the full list here https://dev.mysql.com/doc/refman/8.0/en/keywords.html

@MauricioFauth MauricioFauth removed this from the 5.8.1 milestone Sep 16, 2023
@MauricioFauth MauricioFauth changed the base branch from 5.8.x to 5.9.x September 16, 2023 19:45
@MauricioFauth MauricioFauth added this to the 5.9.0 milestone Sep 16, 2023
@MauricioFauth MauricioFauth merged commit a25f486 into phpmyadmin:5.9.x Sep 16, 2023
@MauricioFauth MauricioFauth self-assigned this Sep 16, 2023
@williamdes williamdes added the kind/support A request for adding support label Sep 18, 2023
@MoonE MoonE deleted the bool-datatype branch April 6, 2024 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/support A request for adding support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants