Repository navigation
MDEV-31053 UUID(size) should be disallowed #4287
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
base: 10.11
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10758,3 +10758,5 @@ ER_CM_OPTION_MISSING_REQUIREMENT | |
| eng "CHANGE MASTER TO option '%s=%s' is missing requirement %s" | ||
| ER_SLAVE_STATEMENT_TIMEOUT 70100 | ||
| eng "Slave log event execution was interrupted (slave_max_statement_time exceeded)" | ||
| ER_NO_LENGTH_PRECISION_ALLOWED | ||
| eng "Type '%s' does not accept length nor precision values" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. dunno. A dedicated error, different from built-in types. Ideally plugin types should behave exactly the same as builtin types. Perhaps you can move the check into the parser? Like but with less code duplication
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll try it out 👍 |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1217,6 +1217,18 @@ class Type_handler_fbt: public Type_handler | |
| const Record_addr tmp(NULL, Bit_addr(true)); | ||
| return new (table->in_use->mem_root) Field_fbt(&empty_clex_str, tmp); | ||
| } | ||
|
|
||
| bool Column_definition_set_attributes(THD *thd, | ||
| Column_definition *def, | ||
| const Lex_field_type_st &attr, | ||
| column_definition_type_t type) const override | ||
| { | ||
| if (FbtImpl::allowed(attr, singleton()->name())) | ||
| return true; | ||
| return Type_handler::Column_definition_set_attributes(thd, def, | ||
| attr, type); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why do you need a new
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I could've changed descendant types to implement their own I tried changing this to be a non-static virtual method instead, but there's a lot that assumes it is a static method and that an object isn't needed. I attempted to supply a different implementation for the internals of the static With this approach, we don't need to care about |
||
| } | ||
|
|
||
| // Fix attributes after the parser | ||
| bool Column_definition_fix_attributes(Column_definition *c) const override | ||
| { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why? what does it mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the code and our documentation, it has no meaning. Perhaps it did at one point in the past, for compatibility? The MySQL docs don't mention a specific
inet6type. Searching around online, it seems thatvarbinary(16)is recommended for storing ipv6 in MySQL. So I wonder if we allowed a length here to ease a transition from MySQL to MariaDB (i.e. only change the type, not the values in parens)?