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
22531a8e
Commit
22531a8e
authored
Jul 10, 2007
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into mysql.com:/home/ram/work/mysql-5.1-maint
parents
c9e01795
29ca25a6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
2 deletions
+16
-2
mysql-test/r/csv.result
mysql-test/r/csv.result
+2
-0
storage/csv/ha_tina.cc
storage/csv/ha_tina.cc
+13
-2
storage/csv/ha_tina.h
storage/csv/ha_tina.h
+1
-0
No files found.
mysql-test/r/csv.result
View file @
22531a8e
...
...
@@ -4945,6 +4945,8 @@ SELECT * FROM bug13894;
val
6
6
5
11
DROP TABLE bug13894;
DROP TABLE IF EXISTS bug14672;
CREATE TABLE bug14672 (c1 integer) engine = CSV;
...
...
storage/csv/ha_tina.cc
View file @
22531a8e
...
...
@@ -904,6 +904,7 @@ int ha_tina::open_update_temp_file_if_needed()
0
,
O_RDWR
|
O_TRUNC
,
MYF
(
MY_WME
)))
<
0
)
return
1
;
share
->
update_file_opened
=
TRUE
;
temp_file_length
=
0
;
}
return
0
;
}
...
...
@@ -928,6 +929,13 @@ int ha_tina::update_row(const uchar * old_data, uchar * new_data)
size
=
encode_quote
(
new_data
);
/*
During update we mark each updating record as deleted
(see the chain_append()) then write new one to the temporary data file.
At the end of the sequence in the rnd_end() we append all non-marked
records from the data file to the temporary data file then rename it.
The temp_file_length is used to calculate new data file length.
*/
if
(
chain_append
())
DBUG_RETURN
(
-
1
);
...
...
@@ -937,6 +945,7 @@ int ha_tina::update_row(const uchar * old_data, uchar * new_data)
if
(
my_write
(
update_temp_file
,
(
uchar
*
)
buffer
.
ptr
(),
size
,
MYF
(
MY_WME
|
MY_NABP
)))
DBUG_RETURN
(
-
1
);
temp_file_length
+=
size
;
/* UPDATE should never happen on the log tables */
DBUG_ASSERT
(
!
share
->
is_log_table
);
...
...
@@ -1154,7 +1163,6 @@ int ha_tina::rnd_end()
if
((
chain_ptr
-
chain
)
>
0
)
{
off_t
temp_file_length
=
0
;
tina_set
*
ptr
=
chain
;
/*
...
...
@@ -1244,7 +1252,10 @@ int ha_tina::rnd_end()
Here we record this fact to the meta-file.
*/
(
void
)
write_meta_file
(
share
->
meta_file
,
share
->
rows_recorded
,
FALSE
);
/*
Update local_saved_data_file_length with the real length of the
data file.
*/
local_saved_data_file_length
=
temp_file_length
;
}
...
...
storage/csv/ha_tina.h
View file @
22531a8e
...
...
@@ -63,6 +63,7 @@ class ha_tina: public handler
off_t
current_position
;
/* Current position in the file during a file scan */
off_t
next_position
;
/* Next position in the file scan */
off_t
local_saved_data_file_length
;
/* save position for reads */
off_t
temp_file_length
;
uchar
byte_buffer
[
IO_SIZE
];
Transparent_file
*
file_buff
;
File
data_file
;
/* File handler for readers */
...
...
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