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
e000baab
Commit
e000baab
authored
May 20, 2006
by
petr@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WL#3244 "CSV engine: convert mmap to read/write calls"
post-review fixes
parent
e8d9458f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
12 deletions
+10
-12
storage/csv/ha_tina.cc
storage/csv/ha_tina.cc
+8
-4
storage/csv/ha_tina.h
storage/csv/ha_tina.h
+2
-8
No files found.
storage/csv/ha_tina.cc
View file @
e000baab
...
...
@@ -282,8 +282,7 @@ static TINA_SHARE *get_share(const char *table_name, TABLE *table)
share
->
crashed
=
TRUE
;
/*
After we read, we set the file to dirty. When we close, we will do the
opposite. If the meta file will not open we assume it is crashed and
If the meta file will not open we assume it is crashed and
mark it as such.
*/
if
(
read_meta_file
(
share
->
meta_file
,
&
share
->
rows_recorded
))
...
...
@@ -524,6 +523,7 @@ ha_tina::ha_tina(TABLE_SHARE *table_arg)
/* Set our original buffers from pre-allocated memory */
buffer
.
set
((
char
*
)
byte_buffer
,
IO_SIZE
,
system_charset_info
);
chain
=
chain_buffer
;
file_buff
=
new
Transparent_file
();
}
...
...
@@ -857,8 +857,6 @@ int ha_tina::open(const char *name, int mode, uint open_options)
if
((
data_file
=
my_open
(
share
->
data_file_name
,
O_RDONLY
,
MYF
(
0
)))
==
-
1
)
DBUG_RETURN
(
0
);
file_buff
=
new
Transparent_file
(
data_file
);
/*
Init locking. Pass handler object to the locking routines,
so that they could save/update local_saved_data_file_length value
...
...
@@ -1268,6 +1266,12 @@ int ha_tina::rnd_end()
if
(((
data_file
=
my_open
(
share
->
data_file_name
,
O_RDONLY
,
MYF
(
0
)))
==
-
1
)
||
my_sync
(
data_file
,
MYF
(
MY_WME
)))
DBUG_RETURN
(
-
1
);
/*
The datafile is consistent at this point and the write filedes is
closed, so nothing worrying will happen to it in case of a crash.
Here we record this fact to the meta-file.
*/
(
void
)
write_meta_file
(
share
->
meta_file
,
share
->
rows_recorded
,
FALSE
);
}
DBUG_RETURN
(
0
);
...
...
storage/csv/ha_tina.h
View file @
e000baab
...
...
@@ -19,7 +19,6 @@
#include <my_dir.h>
#define DEFAULT_CHAIN_LENGTH 512
#define DEFAULT_FILE_WINDOW_SIZE 4096
/*
Version for file format.
1 - Initial Version. That is, the version when the metafile was introduced.
...
...
@@ -68,13 +67,8 @@ class Transparent_file
public:
Transparent_file
(
File
filedes_arg
)
:
lower_bound
(
0
),
buff_size
(
DEFAULT_FILE_WINDOW_SIZE
)
{
buff
=
(
byte
*
)
my_malloc
(
buff_size
*
sizeof
(
byte
),
MYF
(
MY_WME
));
/* read the beginning of the file */
init_buff
(
filedes_arg
);
}
Transparent_file
()
:
lower_bound
(
0
),
buff_size
(
IO_SIZE
)
{
buff
=
(
byte
*
)
my_malloc
(
buff_size
*
sizeof
(
byte
),
MYF
(
MY_WME
));
}
~
Transparent_file
()
{
my_free
(
buff
,
MYF
(
MY_ALLOW_ZERO_PTR
));
}
...
...
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