Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
fb995cb8
Commit
fb995cb8
authored
Dec 02, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge (new code fixed the ALTER TABLE problem)
parent
9cc9d514
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
25 deletions
+0
-25
sql/field.cc
sql/field.cc
+0
-23
sql/mysql_priv.h
sql/mysql_priv.h
+0
-2
No files found.
sql/field.cc
View file @
fb995cb8
...
...
@@ -5853,33 +5853,10 @@ void create_field::create_length_to_internal_length(void)
pack_length
=
calc_pack_length
(
sql_type
==
FIELD_TYPE_VAR_STRING
?
FIELD_TYPE_STRING
:
sql_type
,
length
);
break
;
#ifdef CORRECT_CODE_BUT_CANT_YET_BE_USED
case
MYSQL_TYPE_ENUM
:
case
MYSQL_TYPE_SET
:
length
*=
charset
->
mbmaxlen
;
break
;
#else
/*
Because of a bug in MySQL 4.1 where length was extended for ENUM and SET
fields for every ALTER TABLE, we have to recalculate lengths here
*/
case
MYSQL_TYPE_ENUM
:
{
uint32
tot_length
,
max_length
;
calculate_interval_lengths
(
current_thd
,
interval
,
&
max_length
,
&
tot_length
);
length
=
max_length
*
charset
->
mbmaxlen
;
break
;
}
case
MYSQL_TYPE_SET
:
{
uint32
tot_length
,
max_length
;
calculate_interval_lengths
(
current_thd
,
interval
,
&
max_length
,
&
tot_length
);
length
=
(
tot_length
+
(
interval
->
count
-
1
))
*
charset
->
mbmaxlen
;
break
;
}
#endif
default:
/* do nothing */
break
;
...
...
sql/mysql_priv.h
View file @
fb995cb8
...
...
@@ -370,8 +370,6 @@ int insert_precheck(THD *thd, TABLE_LIST *tables);
int
create_table_precheck
(
THD
*
thd
,
TABLE_LIST
*
tables
,
TABLE_LIST
*
create_table
);
Item
*
negate_expression
(
THD
*
thd
,
Item
*
expr
);
void
calculate_interval_lengths
(
THD
*
thd
,
TYPELIB
*
interval
,
uint
*
max_length
,
uint
*
tot_length
);
#include "sql_class.h"
#include "opt_range.h"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment