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
f93ebc20
Commit
f93ebc20
authored
Apr 12, 2005
by
ramil@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bit type: code clean-up.
parent
24d4264d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
sql/field.h
sql/field.h
+1
-0
sql/sql_table.cc
sql/sql_table.cc
+4
-3
No files found.
sql/field.h
View file @
f93ebc20
...
...
@@ -1321,6 +1321,7 @@ public:
enum
utype
unireg_check_arg
,
const
char
*
field_name_arg
,
struct
st_table
*
table_arg
);
enum
ha_base_keytype
key_type
()
const
{
return
HA_KEYTYPE_BINARY
;
}
uint
size_of
()
const
{
return
sizeof
(
*
this
);
}
int
store
(
const
char
*
to
,
uint
length
,
CHARSET_INFO
*
charset
);
int
store
(
double
nr
)
{
return
Field_bit
::
store
(
nr
);
}
int
store
(
longlong
nr
)
{
return
Field_bit
::
store
(
nr
);
}
...
...
sql/sql_table.cc
View file @
f93ebc20
...
...
@@ -563,9 +563,9 @@ int prepare_create_field(create_field *sql_field,
sql_field
->
pack_flag
=
f_settype
((
uint
)
sql_field
->
sql_type
);
break
;
case
FIELD_TYPE_BIT
:
sql_field
->
pack_flag
=
f_bit_as_char
(
sql_field
->
pack_flag
)
?
FIELDFLAG_NUMBER
|
FIELDFLAG_TREAT_BIT_AS_CHAR
:
FIELDFLAG_NUMBER
;
/*
We have sql_field->pack_flag already set here, see mysql_prepare_table().
*/
break
;
case
FIELD_TYPE_NEWDECIMAL
:
sql_field
->
pack_flag
=
(
FIELDFLAG_NUMBER
|
...
...
@@ -773,6 +773,7 @@ static int mysql_prepare_table(THD *thd, HA_CREATE_INFO *create_info,
if
(
sql_field
->
sql_type
==
FIELD_TYPE_BIT
)
{
sql_field
->
pack_flag
=
FIELDFLAG_NUMBER
;
if
(
file
->
table_flags
()
&
HA_CAN_BIT_FIELD
)
total_uneven_bit_length
+=
sql_field
->
length
&
7
;
else
...
...
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