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
1dc796a1
Commit
1dc796a1
authored
Apr 14, 2005
by
ramil@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/usr/home/ram/work/5.0.bit_class
parents
7731e5f4
b2dbaea3
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
3 deletions
+38
-3
mysql-test/r/type_bit_innodb.result
mysql-test/r/type_bit_innodb.result
+22
-0
mysql-test/t/type_bit_innodb.test
mysql-test/t/type_bit_innodb.test
+12
-0
sql/field.cc
sql/field.cc
+3
-1
sql/field.h
sql/field.h
+1
-2
No files found.
mysql-test/r/type_bit_innodb.result
View file @
1dc796a1
...
...
@@ -380,3 +380,25 @@ drop table t1;
create table t1(a int, b bit not null) engine=innodb;
alter table t1 add primary key (a);
drop table t1;
create table t1 (a bit, b bit(10)) engine=innodb;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bit(1) default NULL,
`b` bit(10) default NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
alter table t1 engine=heap;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bit(1) default NULL,
`b` bit(10) default NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1
alter table t1 engine=innodb;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bit(1) default NULL,
`b` bit(10) default NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1;
mysql-test/t/type_bit_innodb.test
View file @
1dc796a1
...
...
@@ -121,3 +121,15 @@ drop table t1;
create
table
t1
(
a
int
,
b
bit
not
null
)
engine
=
innodb
;
alter
table
t1
add
primary
key
(
a
);
drop
table
t1
;
#
# altering tables
#
create
table
t1
(
a
bit
,
b
bit
(
10
))
engine
=
innodb
;
show
create
table
t1
;
alter
table
t1
engine
=
heap
;
show
create
table
t1
;
alter
table
t1
engine
=
innodb
;
show
create
table
t1
;
drop
table
t1
;
sql/field.cc
View file @
1dc796a1
...
...
@@ -8358,7 +8358,9 @@ create_field::create_field(Field *old_field,Field *orig_field)
break
;
#endif
case
FIELD_TYPE_BIT
:
length
=
((
Field_bit
*
)
old_field
)
->
bit_len
+
length
*
8
;
length
=
(
old_field
->
key_type
()
==
HA_KEYTYPE_BIT
)
?
((
Field_bit
*
)
old_field
)
->
bit_len
+
length
*
8
:
((
Field_bit_as_char
*
)
old_field
)
->
create_length
;
break
;
default:
break
;
...
...
sql/field.h
View file @
1dc796a1
...
...
@@ -1313,9 +1313,8 @@ public:
class
Field_bit_as_char
:
public
Field_bit
{
protected:
uchar
create_length
;
public:
uchar
create_length
;
Field_bit_as_char
(
char
*
ptr_arg
,
uint32
len_arg
,
uchar
*
null_ptr_arg
,
uchar
null_bit_arg
,
uchar
*
bit_ptr_arg
,
uchar
bit_ofs_arg
,
enum
utype
unireg_check_arg
,
const
char
*
field_name_arg
,
...
...
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