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
a34be87f
Commit
a34be87f
authored
Mar 06, 2006
by
mskold@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into mysql.com:/usr/local/home/marty/MySQL/mysql-5.1-new
parents
965fd06a
7380a4dd
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
8 deletions
+20
-8
mysql-test/r/ndb_dd_ddl.result
mysql-test/r/ndb_dd_ddl.result
+1
-1
mysql-test/t/ndb_dd_ddl.test
mysql-test/t/ndb_dd_ddl.test
+1
-1
sql/sql_table.cc
sql/sql_table.cc
+18
-6
No files found.
mysql-test/r/ndb_dd_ddl.result
View file @
a34be87f
...
@@ -175,7 +175,7 @@ CREATE TABLE t1
...
@@ -175,7 +175,7 @@ CREATE TABLE t1
(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL)
(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL)
TABLESPACE ts1 STORAGE DISK
TABLESPACE ts1 STORAGE DISK
ENGINE NDB;
ENGINE NDB;
CREATE INDEX c on t1(c);
CREATE INDEX c on t1(
b,
c);
DROP TABLE t1;
DROP TABLE t1;
ALTER TABLESPACE ts1
ALTER TABLESPACE ts1
DROP DATAFILE 'datafile2.dat'
DROP DATAFILE 'datafile2.dat'
...
...
mysql-test/t/ndb_dd_ddl.test
View file @
a34be87f
...
@@ -263,7 +263,7 @@ CREATE TABLE t1
...
@@ -263,7 +263,7 @@ CREATE TABLE t1
TABLESPACE
ts1
STORAGE
DISK
TABLESPACE
ts1
STORAGE
DISK
ENGINE
NDB
;
ENGINE
NDB
;
CREATE
INDEX
c
on
t1
(
c
);
CREATE
INDEX
c
on
t1
(
b
,
c
);
DROP
TABLE
t1
;
DROP
TABLE
t1
;
...
...
sql/sql_table.cc
View file @
a34be87f
...
@@ -3706,6 +3706,8 @@ static uint compare_tables(TABLE *table, List<create_field> *create_list,
...
@@ -3706,6 +3706,8 @@ static uint compare_tables(TABLE *table, List<create_field> *create_list,
uint
changes
=
0
,
tmp
;
uint
changes
=
0
,
tmp
;
List_iterator_fast
<
create_field
>
new_field_it
(
*
create_list
);
List_iterator_fast
<
create_field
>
new_field_it
(
*
create_list
);
create_field
*
new_field
;
create_field
*
new_field
;
KEY_PART_INFO
*
key_part
;
KEY_PART_INFO
*
end
;
DBUG_ENTER
(
"compare_tables"
);
DBUG_ENTER
(
"compare_tables"
);
/*
/*
...
@@ -3833,9 +3835,14 @@ static uint compare_tables(TABLE *table, List<create_field> *create_list,
...
@@ -3833,9 +3835,14 @@ static uint compare_tables(TABLE *table, List<create_field> *create_list,
/* Key modified. Add the offset of the key to both buffers. */
/* Key modified. Add the offset of the key to both buffers. */
index_drop_buffer
[(
*
index_drop_count
)
++
]
=
table_key
-
table
->
key_info
;
index_drop_buffer
[(
*
index_drop_count
)
++
]
=
table_key
-
table
->
key_info
;
index_add_buffer
[(
*
index_add_count
)
++
]
=
new_key
-
key_info_buffer
;
index_add_buffer
[(
*
index_add_count
)
++
]
=
new_key
-
key_info_buffer
;
field
=
table
->
field
[
new_key
->
key_part
->
fieldnr
];
key_part
=
new_key
->
key_part
;
end
=
key_part
+
new_key
->
key_parts
;
for
(;
key_part
!=
end
;
key_part
++
)
{
// Mark field to be part of new key
// Mark field to be part of new key
field
=
table
->
field
[
key_part
->
fieldnr
];
field
->
add_index
=
1
;
field
->
add_index
=
1
;
}
DBUG_PRINT
(
"info"
,
(
"index changed: '%s'"
,
table_key
->
name
));
DBUG_PRINT
(
"info"
,
(
"index changed: '%s'"
,
table_key
->
name
));
}
}
/*end of for (; table_key < table_key_end;) */
/*end of for (; table_key < table_key_end;) */
...
@@ -3855,9 +3862,14 @@ static uint compare_tables(TABLE *table, List<create_field> *create_list,
...
@@ -3855,9 +3862,14 @@ static uint compare_tables(TABLE *table, List<create_field> *create_list,
{
{
/* Key not found. Add the offset of the key to the add buffer. */
/* Key not found. Add the offset of the key to the add buffer. */
index_add_buffer
[(
*
index_add_count
)
++
]
=
new_key
-
key_info_buffer
;
index_add_buffer
[(
*
index_add_count
)
++
]
=
new_key
-
key_info_buffer
;
field
=
table
->
field
[
new_key
->
key_part
->
fieldnr
];
key_part
=
new_key
->
key_part
;
end
=
key_part
+
new_key
->
key_parts
;
for
(;
key_part
!=
end
;
key_part
++
)
{
// Mark field to be part of new key
// Mark field to be part of new key
field
=
table
->
field
[
key_part
->
fieldnr
];
field
->
add_index
=
1
;
field
->
add_index
=
1
;
}
DBUG_PRINT
(
"info"
,
(
"index added: '%s'"
,
new_key
->
name
));
DBUG_PRINT
(
"info"
,
(
"index added: '%s'"
,
new_key
->
name
));
}
}
}
}
...
...
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