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
11225c18
Commit
11225c18
authored
Dec 01, 2018
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dict_table_t::prepare_instant(): Set n_nullable correctly
parent
3464e039
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
storage/innobase/handler/handler0alter.cc
storage/innobase/handler/handler0alter.cc
+10
-6
No files found.
storage/innobase/handler/handler0alter.cc
View file @
11225c18
...
...
@@ -306,7 +306,7 @@ inline void dict_table_t::prepare_instant(const dict_table_t& old,
->
is_nullable
());
if
(
index
.
fields
[
i
].
col
->
is_nullable
()
&&
!
oindex
.
fields
[
i
].
col
->
is_nullable
())
{
&&
oindex
.
fields
[
i
].
col
->
was_not_null
())
{
instant
->
leaf_redundant
=
1
;
break
;
}
...
...
@@ -383,7 +383,7 @@ inline void dict_table_t::prepare_instant(const dict_table_t& old,
DBUG_ASSERT
(
!
f
.
name
);
f
.
col
=
instant
->
dropped
+
d
;
}
if
(
f
.
col
->
is_nullable
())
{
if
(
!
f
.
col
->
was_not_null
())
{
found_nullable:
n_nullable
++
;
ut_d
(
core_null
...
...
@@ -419,8 +419,13 @@ inline void dict_table_t::prepare_instant(const dict_table_t& old,
DBUG_ASSERT
(
!
fields
[
i
].
col
->
is_dropped
());
DBUG_ASSERT
(
fields
[
i
].
name
==
fields
[
i
].
col
->
name
(
*
this
));
DBUG_ASSERT
(
fields
[
i
].
same
(
oindex
.
fields
[
i
]));
if
(
fields
[
i
].
col
->
is_nullable
())
{
goto
found_nullable
;
if
(
!
oindex
.
fields
[
i
]
.
col
->
was_not_null
())
{
goto
found_nullable
;
}
fields
[
i
].
col
->
set_was_not_null
();
}
continue
;
}
...
...
@@ -429,7 +434,7 @@ inline void dict_table_t::prepare_instant(const dict_table_t& old,
DBUG_ASSERT
(
d
<
n_drop
);
f
.
col
=
&
instant
->
dropped
[
d
++
];
f
.
name
=
NULL
;
if
(
f
.
col
->
is_nullable
())
{
if
(
!
f
.
col
->
was_not_null
())
{
goto
found_nullable
;
}
}
...
...
@@ -443,7 +448,7 @@ inline void dict_table_t::prepare_instant(const dict_table_t& old,
DBUG_ASSERT
(
d
==
n_drop
);
for
(;
i
<
n_fields
;
i
++
)
{
fields
[
i
]
=
index
.
fields
[
j
++
];
n_nullable
+=
fields
[
i
].
col
->
is_nullable
();
n_nullable
+=
!
fields
[
i
].
col
->
was_not_null
();
DBUG_ASSERT
(
!
fields
[
i
].
col
->
is_dropped
());
DBUG_ASSERT
(
fields
[
i
].
name
==
fields
[
i
].
col
->
name
(
*
this
));
...
...
@@ -451,7 +456,6 @@ inline void dict_table_t::prepare_instant(const dict_table_t& old,
DBUG_ASSERT
(
j
==
index
.
n_fields
);
index
.
n_fields
=
index
.
n_def
=
n_fields
;
index
.
fields
=
fields
;
DBUG_ASSERT
(
n_nullable
>=
index
.
n_nullable
);
DBUG_ASSERT
(
n_nullable
>=
oindex
.
n_nullable
);
index
.
n_nullable
=
n_nullable
;
goto
set_core_fields
;
...
...
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