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
6f480c78
Commit
6f480c78
authored
May 30, 2007
by
ramil/ram@ramil.myoffice.izhnet.ru
Browse files
Options
Browse Files
Download
Plain Diff
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into mysql.com:/home/ram/work/b28631/b28631.5.1
parents
985d5e90
4f68dd9d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
0 deletions
+51
-0
mysql-test/r/type_bit.result
mysql-test/r/type_bit.result
+26
-0
mysql-test/t/type_bit.test
mysql-test/t/type_bit.test
+17
-0
sql/field.cc
sql/field.cc
+7
-0
sql/field.h
sql/field.h
+1
-0
No files found.
mysql-test/r/type_bit.result
View file @
6f480c78
...
...
@@ -619,3 +619,29 @@ bit_field int_field
handler t1 close;
drop table t1;
End of 5.0 tests
create table t1(a bit(7));
insert into t1 values(0x40);
alter table t1 modify column a bit(8);
select hex(a) from t1;
hex(a)
40
insert into t1 values(0x80);
select hex(a) from t1;
hex(a)
40
80
create index a on t1(a);
insert into t1 values(0x81);
select hex(a) from t1;
hex(a)
40
80
81
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bit(8) DEFAULT NULL,
KEY `a` (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
End of 5.1 tests
mysql-test/t/type_bit.test
View file @
6f480c78
...
...
@@ -273,3 +273,20 @@ handler t1 close;
drop
table
t1
;
--
echo
End
of
5.0
tests
#
# Bug #28631: problem after alter
#
create
table
t1
(
a
bit
(
7
));
insert
into
t1
values
(
0x40
);
alter
table
t1
modify
column
a
bit
(
8
);
select
hex
(
a
)
from
t1
;
insert
into
t1
values
(
0x80
);
select
hex
(
a
)
from
t1
;
create
index
a
on
t1
(
a
);
insert
into
t1
values
(
0x81
);
select
hex
(
a
)
from
t1
;
show
create
table
t1
;
drop
table
t1
;
--
echo
End
of
5.1
tests
sql/field.cc
View file @
6f480c78
...
...
@@ -8239,6 +8239,13 @@ Field *Field_bit::new_key_field(MEM_ROOT *root,
}
uint
Field_bit
::
is_equal
(
create_field
*
new_field
)
{
return
(
new_field
->
sql_type
==
real_type
()
&&
new_field
->
length
==
max_display_length
());
}
int
Field_bit
::
store
(
const
char
*
from
,
uint
length
,
CHARSET_INFO
*
cs
)
{
ASSERT_COLUMN_MARKED_FOR_WRITE
;
...
...
sql/field.h
View file @
6f480c78
...
...
@@ -1552,6 +1552,7 @@ class Field_bit :public Field {
bit_ptr
==
((
Field_bit
*
)
field
)
->
bit_ptr
&&
bit_ofs
==
((
Field_bit
*
)
field
)
->
bit_ofs
);
}
uint
is_equal
(
create_field
*
new_field
);
void
move_field_offset
(
my_ptrdiff_t
ptr_diff
)
{
Field
::
move_field_offset
(
ptr_diff
);
...
...
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