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
33455ee0
Commit
33455ee0
authored
Jun 14, 2006
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added flag to detect renaming of fields (not supported as fast alter table for ndbcluster)
parent
64b1508b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
include/mysql_com.h
include/mysql_com.h
+1
-0
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+2
-2
sql/sql_table.cc
sql/sql_table.cc
+5
-0
No files found.
include/mysql_com.h
View file @
33455ee0
...
...
@@ -99,6 +99,7 @@ enum enum_server_command
#define GET_FIXED_FIELDS_FLAG (1 << 18)
/* Used to get fields in item tree */
#define FIELD_IN_PART_FUNC_FLAG (1 << 19)
/* Field part of partition func */
#define FIELD_IN_ADD_INDEX (1<< 20)
/* Intern: Field used in ADD INDEX */
#define FIELD_IS_RENAMED (1<< 21)
/* Intern: Field is being renamed */
#define REFRESH_GRANT 1
/* Refresh grant tables */
#define REFRESH_LOG 2
/* Start on new log file */
...
...
sql/ha_ndbcluster.cc
View file @
33455ee0
...
...
@@ -9833,8 +9833,8 @@ bool ha_ndbcluster::check_if_incompatible_data(HA_CREATE_INFO *info,
for
(
i
=
0
;
i
<
table
->
s
->
fields
;
i
++
)
{
Field
*
field
=
table
->
field
[
i
];
const
NDBCOL
*
col
=
tab
->
getColumn
(
field
->
field_name
);
if
(
!
col
)
const
NDBCOL
*
col
=
tab
->
getColumn
(
i
);
if
(
field
->
flags
&
FIELD_IS_RENAMED
)
{
DBUG_PRINT
(
"info"
,
(
"Field has been renamed, copy table"
));
DBUG_RETURN
(
COMPATIBLE_DATA_NO
);
...
...
sql/sql_table.cc
View file @
33455ee0
...
...
@@ -4744,6 +4744,11 @@ static uint compare_tables(TABLE *table, List<create_field> *create_list,
create_info
->
row_type
!=
ROW_TYPE_FIXED
)
create_info
->
table_options
|=
HA_OPTION_PACK_RECORD
;
/* Check if field was renamed */
if
(
my_strcasecmp
(
system_charset_info
,
field
->
field_name
,
new_field
->
field_name
))
field
->
flags
|=
FIELD_IS_RENAMED
;
/* Evaluate changes bitmap and send to check_if_incompatible_data() */
if
(
!
(
tmp
=
field
->
is_equal
(
new_field
)))
DBUG_RETURN
(
ALTER_TABLE_DATA_CHANGED
);
...
...
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