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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
f57c7d8b
Commit
f57c7d8b
authored
Apr 05, 2005
by
ramil@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for bug #9571: Primary key creation causes server crash.
parent
81977103
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
3 deletions
+13
-3
mysql-test/r/type_bit.result
mysql-test/r/type_bit.result
+3
-0
mysql-test/t/type_bit.test
mysql-test/t/type_bit.test
+8
-0
sql/unireg.cc
sql/unireg.cc
+2
-3
No files found.
mysql-test/r/type_bit.result
View file @
f57c7d8b
...
@@ -377,3 +377,6 @@ hex(concat(a)) hex(concat(b))
...
@@ -377,3 +377,6 @@ hex(concat(a)) hex(concat(b))
07 0FFE
07 0FFE
01 01FF
01 01FF
drop table t1;
drop table t1;
create table t1(a int, b bit not null);
alter table t1 add primary key (a);
drop table t1;
mysql-test/t/type_bit.test
View file @
f57c7d8b
...
@@ -112,3 +112,11 @@ insert into t1 values (7,(1<<12)-2), (0x01,0x01ff);
...
@@ -112,3 +112,11 @@ insert into t1 values (7,(1<<12)-2), (0x01,0x01ff);
select
hex
(
a
),
hex
(
b
)
from
t1
;
select
hex
(
a
),
hex
(
b
)
from
t1
;
select
hex
(
concat
(
a
)),
hex
(
concat
(
b
))
from
t1
;
select
hex
(
concat
(
a
)),
hex
(
concat
(
b
))
from
t1
;
drop
table
t1
;
drop
table
t1
;
#
# Bug #9571: problem with primary key creation
#
create
table
t1
(
a
int
,
b
bit
not
null
);
alter
table
t1
add
primary
key
(
a
);
drop
table
t1
;
sql/unireg.cc
View file @
f57c7d8b
...
@@ -679,15 +679,14 @@ static bool make_empty_rec(THD *thd, File file,enum db_type table_type,
...
@@ -679,15 +679,14 @@ static bool make_empty_rec(THD *thd, File file,enum db_type table_type,
null_count
++
;
null_count
++
;
}
}
bfill
(
buff
,(
null_length
=
(
null_fields
+
7
)
/
8
),
255
);
bfill
(
buff
,(
null_length
=
(
null_fields
+
7
)
/
8
),
255
);
null_pos
=
buff
;
null_pos
=
buff
+
null_count
/
8
;
List_iterator
<
create_field
>
it
(
create_fields
);
List_iterator
<
create_field
>
it
(
create_fields
);
thd
->
count_cuted_fields
=
CHECK_FIELD_WARN
;
// To find wrong default values
thd
->
count_cuted_fields
=
CHECK_FIELD_WARN
;
// To find wrong default values
while
((
field
=
it
++
))
while
((
field
=
it
++
))
{
{
Field
*
regfield
=
make_field
((
char
*
)
buff
+
field
->
offset
,
field
->
length
,
Field
*
regfield
=
make_field
((
char
*
)
buff
+
field
->
offset
,
field
->
length
,
field
->
flags
&
NOT_NULL_FLAG
?
0
:
null_pos
,
null_pos
+
null_count
/
8
,
null_count
&
7
,
null_count
&
7
,
field
->
pack_flag
,
field
->
pack_flag
,
field
->
sql_type
,
field
->
sql_type
,
...
...
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