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
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);
static
size_t
packed_fields_length
(
List
<
Create_field
>
&
);
static
bool
make_empty_rec
(
THD
*
,
uchar
*
,
uint
,
List
<
Create_field
>
&
,
uint
,
ulong
);
/*
/*
*
Create a frm (table definition) file
SYNOPSIS
build_frm_image()
thd Thread handler
table Name of table
create_info create info parameters
create_fields Fields to create
keys number of keys to create
key_info Keys to create
db_file Handler to use.
@param thd Thread handler
@param table Name of table
@param create_info create info parameters
@param create_fields Fields to create
@param keys number of keys to create
@param key_info Keys to create
@param db_file Handler to use.
RETURN
false ok
true error
@return the generated frm image as a LEX_CUSTRING,
or null LEX_CUSTRING (str==0) in case of an error.
*/
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
);
frm
.
length
=
FRM_HEADER_SIZE
;
// fileinfo;
frm
.
length
+=
7
;
// "form entry"
frm
.
length
=
FRM_HEADER_SIZE
;
// fileinfo;
frm
.
length
+=
uint2korr
(
fileinfo
+
4
)
+
4
;
// "form entry"
int2store
(
fileinfo
+
6
,
frm
.
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
;
filepos
=
frm
.
length
;
frm
.
length
+=
FRM_FORMINFO_SIZE
;
// forminfo
frm
.
length
+=
FRM_FORMINFO_SIZE
;
// forminfo
frm
.
length
+=
packed_fields_length
(
create_fields
);
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