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
f6108b1f
Commit
f6108b1f
authored
Apr 09, 2013
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comments
parent
b10937ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
17 deletions
+14
-17
sql/unireg.cc
sql/unireg.cc
+14
-17
No files found.
sql/unireg.cc
View file @
f6108b1f
...
@@ -45,22 +45,19 @@ static bool pack_fields(uchar *, List<Create_field> &, ulong);
...
@@ -45,22 +45,19 @@ static bool pack_fields(uchar *, List<Create_field> &, ulong);
static
size_t
packed_fields_length
(
List
<
Create_field
>
&
);
static
size_t
packed_fields_length
(
List
<
Create_field
>
&
);
static
bool
make_empty_rec
(
THD
*
,
uchar
*
,
uint
,
List
<
Create_field
>
&
,
uint
,
ulong
);
static
bool
make_empty_rec
(
THD
*
,
uchar
*
,
uint
,
List
<
Create_field
>
&
,
uint
,
ulong
);
/*
/*
*
Create a frm (table definition) file
Create a frm (table definition) file
SYNOPSIS
@param thd Thread handler
build_frm_image()
@param table Name of table
thd Thread handler
@param create_info create info parameters
table Name of table
@param create_fields Fields to create
create_info create info parameters
@param keys number of keys to create
create_fields Fields to create
@param key_info Keys to create
keys number of keys to create
@param db_file Handler to use.
key_info Keys to create
db_file Handler to use.
RETURN
@return the generated frm image as a LEX_CUSTRING,
false ok
or null LEX_CUSTRING (str==0) in case of an error.
true error
*/
*/
LEX_CUSTRING
build_frm_image
(
THD
*
thd
,
const
char
*
table
,
LEX_CUSTRING
build_frm_image
(
THD
*
thd
,
const
char
*
table
,
...
@@ -200,16 +197,16 @@ LEX_CUSTRING build_frm_image(THD *thd, const char *table,
...
@@ -200,16 +197,16 @@ LEX_CUSTRING build_frm_image(THD *thd, const char *table,
key_buff_length
=
uint4korr
(
fileinfo
+
47
);
key_buff_length
=
uint4korr
(
fileinfo
+
47
);
frm
.
length
=
FRM_HEADER_SIZE
;
// fileinfo;
frm
.
length
=
FRM_HEADER_SIZE
;
// fileinfo;
frm
.
length
+=
7
;
// "form entry"
frm
.
length
+=
uint2korr
(
fileinfo
+
4
)
+
4
;
// "form entry"
int2store
(
fileinfo
+
6
,
frm
.
length
);
int2store
(
fileinfo
+
6
,
frm
.
length
);
frm
.
length
+=
key_buff_length
;
frm
.
length
+=
key_buff_length
;
frm
.
length
+=
reclength
;
// row with default values
frm
.
length
+=
reclength
;
// row with default values
frm
.
length
+=
create_info
->
extra_size
;
frm
.
length
+=
create_info
->
extra_size
;
filepos
=
frm
.
length
;
filepos
=
frm
.
length
;
frm
.
length
+=
FRM_FORMINFO_SIZE
;
// forminfo
frm
.
length
+=
FRM_FORMINFO_SIZE
;
// forminfo
frm
.
length
+=
packed_fields_length
(
create_fields
);
frm
.
length
+=
packed_fields_length
(
create_fields
);
frm_ptr
=
(
uchar
*
)
my_malloc
(
frm
.
length
,
MYF
(
MY_WME
|
MY_ZEROFILL
|
frm_ptr
=
(
uchar
*
)
my_malloc
(
frm
.
length
,
MYF
(
MY_WME
|
MY_ZEROFILL
|
...
...
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