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
cb6dc573
Commit
cb6dc573
authored
Aug 22, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
after merge fixes
parent
24c008a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
myisammrg/myrg_open.c
myisammrg/myrg_open.c
+7
-3
No files found.
myisammrg/myrg_open.c
View file @
cb6dc573
...
@@ -43,6 +43,7 @@ MYRG_INFO *myrg_open(const char *name, int mode, int handle_locking)
...
@@ -43,6 +43,7 @@ MYRG_INFO *myrg_open(const char *name, int mode, int handle_locking)
DBUG_ENTER
(
"myrg_open"
);
DBUG_ENTER
(
"myrg_open"
);
LINT_INIT
(
m_info
);
LINT_INIT
(
m_info
);
m_info
=
0
;
isam
=
0
;
isam
=
0
;
errpos
=
files
=
0
;
errpos
=
files
=
0
;
bzero
((
char
*
)
&
file
,
sizeof
(
file
));
bzero
((
char
*
)
&
file
,
sizeof
(
file
));
...
@@ -75,7 +76,7 @@ MYRG_INFO *myrg_open(const char *name, int mode, int handle_locking)
...
@@ -75,7 +76,7 @@ MYRG_INFO *myrg_open(const char *name, int mode, int handle_locking)
if
(
!
strncmp
(
buff
+
1
,
"INSERT_METHOD="
,
14
))
if
(
!
strncmp
(
buff
+
1
,
"INSERT_METHOD="
,
14
))
{
/* Lookup insert method */
{
/* Lookup insert method */
int
tmp
=
find_type
(
buff
+
15
,
&
merge_insert_method
,
2
);
int
tmp
=
find_type
(
buff
+
15
,
&
merge_insert_method
,
2
);
m_info
.
merge_insert_method
=
(
uint
)
(
tmp
>=
0
?
tmp
:
0
);
m_info
->
merge_insert_method
=
(
uint
)
(
tmp
>=
0
?
tmp
:
0
);
}
}
continue
;
/* Skip comments */
continue
;
/* Skip comments */
}
}
...
@@ -115,7 +116,7 @@ MYRG_INFO *myrg_open(const char *name, int mode, int handle_locking)
...
@@ -115,7 +116,7 @@ MYRG_INFO *myrg_open(const char *name, int mode, int handle_locking)
m_info
->
open_tables
[
files
].
file_offset
=
(
my_off_t
)
file_offset
;
m_info
->
open_tables
[
files
].
file_offset
=
(
my_off_t
)
file_offset
;
file_offset
+=
isam
->
state
->
data_file_length
;
file_offset
+=
isam
->
state
->
data_file_length
;
files
++
;
files
++
;
if
(
m_info
.
reclength
!=
isam
->
s
->
base
.
reclength
)
if
(
m_info
->
reclength
!=
isam
->
s
->
base
.
reclength
)
{
{
my_errno
=
HA_ERR_WRONG_MRG_TABLE_DEF
;
my_errno
=
HA_ERR_WRONG_MRG_TABLE_DEF
;
goto
err
;
goto
err
;
...
@@ -128,6 +129,9 @@ MYRG_INFO *myrg_open(const char *name, int mode, int handle_locking)
...
@@ -128,6 +129,9 @@ MYRG_INFO *myrg_open(const char *name, int mode, int handle_locking)
m_info
->
rec_per_key_part
[
i
]
+=
isam
->
s
->
state
.
rec_per_key_part
[
i
]
/
m_info
->
tables
;
m_info
->
rec_per_key_part
[
i
]
+=
isam
->
s
->
state
.
rec_per_key_part
[
i
]
/
m_info
->
tables
;
}
}
if
(
!
m_info
&&
!
(
m_info
=
(
MYRG_INFO
*
)
my_malloc
(
sizeof
(
MYRG_INFO
),
MYF
(
MY_WME
|
MY_ZEROFILL
))))
goto
err
;
/* Don't mark table readonly, for ALTER TABLE ... UNION=(...) to work */
/* Don't mark table readonly, for ALTER TABLE ... UNION=(...) to work */
m_info
->
options
&=
~
(
HA_OPTION_COMPRESS_RECORD
|
HA_OPTION_READ_ONLY_DATA
);
m_info
->
options
&=
~
(
HA_OPTION_COMPRESS_RECORD
|
HA_OPTION_READ_ONLY_DATA
);
...
@@ -136,7 +140,7 @@ MYRG_INFO *myrg_open(const char *name, int mode, int handle_locking)
...
@@ -136,7 +140,7 @@ MYRG_INFO *myrg_open(const char *name, int mode, int handle_locking)
my_errno
=
HA_ERR_RECORD_FILE_FULL
;
my_errno
=
HA_ERR_RECORD_FILE_FULL
;
goto
err
;
goto
err
;
}
}
m_info
->
keys
=
(
files
)
?
m_info
->
open_tables
->
table
->
s
->
base
.
keys
:
0
;
m_info
->
keys
=
files
?
isam
->
s
->
base
.
keys
:
0
;
bzero
((
char
*
)
&
m_info
->
by_key
,
sizeof
(
m_info
->
by_key
));
bzero
((
char
*
)
&
m_info
->
by_key
,
sizeof
(
m_info
->
by_key
));
/* this works ok if the table list is empty */
/* this works ok if the table list is empty */
...
...
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