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
d24f2936
Commit
d24f2936
authored
Sep 15, 2004
by
jani@rhols221.adsl.netsonic.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added some missing per status variables.
parent
9a781af1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
16 deletions
+23
-16
sql/ha_isam.cc
sql/ha_isam.cc
+18
-12
sql/ha_isammrg.cc
sql/ha_isammrg.cc
+5
-4
No files found.
sql/ha_isam.cc
View file @
d24f2936
...
@@ -69,7 +69,7 @@ uint ha_isam::min_record_length(uint options) const
...
@@ -69,7 +69,7 @@ uint ha_isam::min_record_length(uint options) const
int
ha_isam
::
write_row
(
byte
*
buf
)
int
ha_isam
::
write_row
(
byte
*
buf
)
{
{
statistic_increment
(
ha_write_count
,
&
LOCK_status
);
statistic_increment
(
current_thd
->
status_var
.
ha_write_count
,
&
LOCK_status
);
if
(
table
->
timestamp_default_now
)
if
(
table
->
timestamp_default_now
)
update_timestamp
(
buf
+
table
->
timestamp_default_now
-
1
);
update_timestamp
(
buf
+
table
->
timestamp_default_now
-
1
);
if
(
table
->
next_number_field
&&
buf
==
table
->
record
[
0
])
if
(
table
->
next_number_field
&&
buf
==
table
->
record
[
0
])
...
@@ -79,7 +79,7 @@ int ha_isam::write_row(byte * buf)
...
@@ -79,7 +79,7 @@ int ha_isam::write_row(byte * buf)
int
ha_isam
::
update_row
(
const
byte
*
old_data
,
byte
*
new_data
)
int
ha_isam
::
update_row
(
const
byte
*
old_data
,
byte
*
new_data
)
{
{
statistic_increment
(
ha_update_count
,
&
LOCK_status
);
statistic_increment
(
current_thd
->
status_var
.
ha_update_count
,
&
LOCK_status
);
if
(
table
->
timestamp_on_update_now
)
if
(
table
->
timestamp_on_update_now
)
update_timestamp
(
new_data
+
table
->
timestamp_on_update_now
-
1
);
update_timestamp
(
new_data
+
table
->
timestamp_on_update_now
-
1
);
return
!
nisam_update
(
file
,
old_data
,
new_data
)
?
0
:
my_errno
?
my_errno
:
-
1
;
return
!
nisam_update
(
file
,
old_data
,
new_data
)
?
0
:
my_errno
?
my_errno
:
-
1
;
...
@@ -87,14 +87,14 @@ int ha_isam::update_row(const byte * old_data, byte * new_data)
...
@@ -87,14 +87,14 @@ int ha_isam::update_row(const byte * old_data, byte * new_data)
int
ha_isam
::
delete_row
(
const
byte
*
buf
)
int
ha_isam
::
delete_row
(
const
byte
*
buf
)
{
{
statistic_increment
(
ha_delete_count
,
&
LOCK_status
);
statistic_increment
(
current_thd
->
status_var
.
ha_delete_count
,
&
LOCK_status
);
return
!
nisam_delete
(
file
,
buf
)
?
0
:
my_errno
?
my_errno
:
-
1
;
return
!
nisam_delete
(
file
,
buf
)
?
0
:
my_errno
?
my_errno
:
-
1
;
}
}
int
ha_isam
::
index_read
(
byte
*
buf
,
const
byte
*
key
,
int
ha_isam
::
index_read
(
byte
*
buf
,
const
byte
*
key
,
uint
key_len
,
enum
ha_rkey_function
find_flag
)
uint
key_len
,
enum
ha_rkey_function
find_flag
)
{
{
statistic_increment
(
ha_read_key_count
,
&
LOCK_status
);
statistic_increment
(
current_thd
->
status_var
.
ha_read_key_count
,
&
LOCK_status
);
int
error
=
nisam_rkey
(
file
,
buf
,
active_index
,
key
,
key_len
,
find_flag
);
int
error
=
nisam_rkey
(
file
,
buf
,
active_index
,
key
,
key_len
,
find_flag
);
table
->
status
=
error
?
STATUS_NOT_FOUND
:
0
;
table
->
status
=
error
?
STATUS_NOT_FOUND
:
0
;
return
!
error
?
0
:
my_errno
?
my_errno
:
-
1
;
return
!
error
?
0
:
my_errno
?
my_errno
:
-
1
;
...
@@ -103,7 +103,7 @@ int ha_isam::index_read(byte * buf, const byte * key,
...
@@ -103,7 +103,7 @@ int ha_isam::index_read(byte * buf, const byte * key,
int
ha_isam
::
index_read_idx
(
byte
*
buf
,
uint
index
,
const
byte
*
key
,
int
ha_isam
::
index_read_idx
(
byte
*
buf
,
uint
index
,
const
byte
*
key
,
uint
key_len
,
enum
ha_rkey_function
find_flag
)
uint
key_len
,
enum
ha_rkey_function
find_flag
)
{
{
statistic_increment
(
ha_read_key_count
,
&
LOCK_status
);
statistic_increment
(
current_thd
->
status_var
.
ha_read_key_count
,
&
LOCK_status
);
int
error
=
nisam_rkey
(
file
,
buf
,
index
,
key
,
key_len
,
find_flag
);
int
error
=
nisam_rkey
(
file
,
buf
,
index
,
key
,
key_len
,
find_flag
);
table
->
status
=
error
?
STATUS_NOT_FOUND
:
0
;
table
->
status
=
error
?
STATUS_NOT_FOUND
:
0
;
return
!
error
?
0
:
my_errno
?
my_errno
:
-
1
;
return
!
error
?
0
:
my_errno
?
my_errno
:
-
1
;
...
@@ -111,7 +111,7 @@ int ha_isam::index_read_idx(byte * buf, uint index, const byte * key,
...
@@ -111,7 +111,7 @@ int ha_isam::index_read_idx(byte * buf, uint index, const byte * key,
int
ha_isam
::
index_read_last
(
byte
*
buf
,
const
byte
*
key
,
uint
key_len
)
int
ha_isam
::
index_read_last
(
byte
*
buf
,
const
byte
*
key
,
uint
key_len
)
{
{
statistic_increment
(
ha_read_key_count
,
&
LOCK_status
);
statistic_increment
(
current_thd
->
status_var
.
ha_read_key_count
,
&
LOCK_status
);
int
error
=
nisam_rkey
(
file
,
buf
,
active_index
,
key
,
key_len
,
int
error
=
nisam_rkey
(
file
,
buf
,
active_index
,
key
,
key_len
,
HA_READ_PREFIX_LAST
);
HA_READ_PREFIX_LAST
);
table
->
status
=
error
?
STATUS_NOT_FOUND
:
0
;
table
->
status
=
error
?
STATUS_NOT_FOUND
:
0
;
...
@@ -120,7 +120,8 @@ int ha_isam::index_read_last(byte * buf, const byte * key, uint key_len)
...
@@ -120,7 +120,8 @@ int ha_isam::index_read_last(byte * buf, const byte * key, uint key_len)
int
ha_isam
::
index_next
(
byte
*
buf
)
int
ha_isam
::
index_next
(
byte
*
buf
)
{
{
statistic_increment
(
ha_read_next_count
,
&
LOCK_status
);
statistic_increment
(
current_thd
->
status_var
.
ha_read_next_count
,
&
LOCK_status
);
int
error
=
nisam_rnext
(
file
,
buf
,
active_index
);
int
error
=
nisam_rnext
(
file
,
buf
,
active_index
);
table
->
status
=
error
?
STATUS_NOT_FOUND
:
0
;
table
->
status
=
error
?
STATUS_NOT_FOUND
:
0
;
return
!
error
?
0
:
my_errno
?
my_errno
:
HA_ERR_END_OF_FILE
;
return
!
error
?
0
:
my_errno
?
my_errno
:
HA_ERR_END_OF_FILE
;
...
@@ -128,7 +129,8 @@ int ha_isam::index_next(byte * buf)
...
@@ -128,7 +129,8 @@ int ha_isam::index_next(byte * buf)
int
ha_isam
::
index_prev
(
byte
*
buf
)
int
ha_isam
::
index_prev
(
byte
*
buf
)
{
{
statistic_increment
(
ha_read_prev_count
,
&
LOCK_status
);
statistic_increment
(
current_thd
->
status_var
.
ha_read_prev_count
,
&
LOCK_status
);
int
error
=
nisam_rprev
(
file
,
buf
,
active_index
);
int
error
=
nisam_rprev
(
file
,
buf
,
active_index
);
table
->
status
=
error
?
STATUS_NOT_FOUND
:
0
;
table
->
status
=
error
?
STATUS_NOT_FOUND
:
0
;
return
!
error
?
0
:
my_errno
?
my_errno
:
HA_ERR_END_OF_FILE
;
return
!
error
?
0
:
my_errno
?
my_errno
:
HA_ERR_END_OF_FILE
;
...
@@ -136,7 +138,8 @@ int ha_isam::index_prev(byte * buf)
...
@@ -136,7 +138,8 @@ int ha_isam::index_prev(byte * buf)
int
ha_isam
::
index_first
(
byte
*
buf
)
int
ha_isam
::
index_first
(
byte
*
buf
)
{
{
statistic_increment
(
ha_read_first_count
,
&
LOCK_status
);
statistic_increment
(
current_thd
->
status_var
.
ha_read_first_count
,
&
LOCK_status
);
int
error
=
nisam_rfirst
(
file
,
buf
,
active_index
);
int
error
=
nisam_rfirst
(
file
,
buf
,
active_index
);
table
->
status
=
error
?
STATUS_NOT_FOUND
:
0
;
table
->
status
=
error
?
STATUS_NOT_FOUND
:
0
;
return
!
error
?
0
:
my_errno
?
my_errno
:
HA_ERR_END_OF_FILE
;
return
!
error
?
0
:
my_errno
?
my_errno
:
HA_ERR_END_OF_FILE
;
...
@@ -144,7 +147,8 @@ int ha_isam::index_first(byte * buf)
...
@@ -144,7 +147,8 @@ int ha_isam::index_first(byte * buf)
int
ha_isam
::
index_last
(
byte
*
buf
)
int
ha_isam
::
index_last
(
byte
*
buf
)
{
{
statistic_increment
(
ha_read_last_count
,
&
LOCK_status
);
statistic_increment
(
current_thd
->
status_var
.
ha_read_last_count
,
&
LOCK_status
);
int
error
=
nisam_rlast
(
file
,
buf
,
active_index
);
int
error
=
nisam_rlast
(
file
,
buf
,
active_index
);
table
->
status
=
error
?
STATUS_NOT_FOUND
:
0
;
table
->
status
=
error
?
STATUS_NOT_FOUND
:
0
;
return
!
error
?
0
:
my_errno
?
my_errno
:
HA_ERR_END_OF_FILE
;
return
!
error
?
0
:
my_errno
?
my_errno
:
HA_ERR_END_OF_FILE
;
...
@@ -157,7 +161,8 @@ int ha_isam::rnd_init(bool scan)
...
@@ -157,7 +161,8 @@ int ha_isam::rnd_init(bool scan)
int
ha_isam
::
rnd_next
(
byte
*
buf
)
int
ha_isam
::
rnd_next
(
byte
*
buf
)
{
{
statistic_increment
(
ha_read_rnd_next_count
,
&
LOCK_status
);
statistic_increment
(
current_thd
->
status_var
.
ha_read_rnd_next_count
,
&
LOCK_status
);
int
error
=
nisam_rrnd
(
file
,
buf
,
NI_POS_ERROR
);
int
error
=
nisam_rrnd
(
file
,
buf
,
NI_POS_ERROR
);
table
->
status
=
error
?
STATUS_NOT_FOUND
:
0
;
table
->
status
=
error
?
STATUS_NOT_FOUND
:
0
;
return
!
error
?
0
:
my_errno
?
my_errno
:
-
1
;
return
!
error
?
0
:
my_errno
?
my_errno
:
-
1
;
...
@@ -165,7 +170,8 @@ int ha_isam::rnd_next(byte *buf)
...
@@ -165,7 +170,8 @@ int ha_isam::rnd_next(byte *buf)
int
ha_isam
::
rnd_pos
(
byte
*
buf
,
byte
*
pos
)
int
ha_isam
::
rnd_pos
(
byte
*
buf
,
byte
*
pos
)
{
{
statistic_increment
(
ha_read_rnd_count
,
&
LOCK_status
);
statistic_increment
(
current_thd
->
status_var
.
ha_read_rnd_count
,
&
LOCK_status
);
int
error
=
nisam_rrnd
(
file
,
buf
,
(
ulong
)
ha_get_ptr
(
pos
,
ref_length
));
int
error
=
nisam_rrnd
(
file
,
buf
,
(
ulong
)
ha_get_ptr
(
pos
,
ref_length
));
table
->
status
=
error
?
STATUS_NOT_FOUND
:
0
;
table
->
status
=
error
?
STATUS_NOT_FOUND
:
0
;
return
!
error
?
0
:
my_errno
?
my_errno
:
-
1
;
return
!
error
?
0
:
my_errno
?
my_errno
:
-
1
;
...
...
sql/ha_isammrg.cc
View file @
d24f2936
...
@@ -77,7 +77,7 @@ int ha_isammrg::write_row(byte * buf)
...
@@ -77,7 +77,7 @@ int ha_isammrg::write_row(byte * buf)
int
ha_isammrg
::
update_row
(
const
byte
*
old_data
,
byte
*
new_data
)
int
ha_isammrg
::
update_row
(
const
byte
*
old_data
,
byte
*
new_data
)
{
{
statistic_increment
(
ha_update_count
,
&
LOCK_status
);
statistic_increment
(
current_thd
->
status_var
.
ha_update_count
,
&
LOCK_status
);
if
(
table
->
timestamp_on_update_now
)
if
(
table
->
timestamp_on_update_now
)
update_timestamp
(
new_data
+
table
->
timestamp_on_update_now
-
1
);
update_timestamp
(
new_data
+
table
->
timestamp_on_update_now
-
1
);
return
!
mrg_update
(
file
,
old_data
,
new_data
)
?
0
:
my_errno
?
my_errno
:
-
1
;
return
!
mrg_update
(
file
,
old_data
,
new_data
)
?
0
:
my_errno
?
my_errno
:
-
1
;
...
@@ -85,7 +85,7 @@ int ha_isammrg::update_row(const byte * old_data, byte * new_data)
...
@@ -85,7 +85,7 @@ int ha_isammrg::update_row(const byte * old_data, byte * new_data)
int
ha_isammrg
::
delete_row
(
const
byte
*
buf
)
int
ha_isammrg
::
delete_row
(
const
byte
*
buf
)
{
{
statistic_increment
(
ha_delete_count
,
&
LOCK_status
);
statistic_increment
(
current_thd
->
status_var
.
ha_delete_count
,
&
LOCK_status
);
return
!
mrg_delete
(
file
,
buf
)
?
0
:
my_errno
?
my_errno
:
-
1
;
return
!
mrg_delete
(
file
,
buf
)
?
0
:
my_errno
?
my_errno
:
-
1
;
}
}
...
@@ -128,7 +128,8 @@ int ha_isammrg::rnd_init(bool scan)
...
@@ -128,7 +128,8 @@ int ha_isammrg::rnd_init(bool scan)
int
ha_isammrg
::
rnd_next
(
byte
*
buf
)
int
ha_isammrg
::
rnd_next
(
byte
*
buf
)
{
{
statistic_increment
(
ha_read_rnd_next_count
,
&
LOCK_status
);
statistic_increment
(
current_thd
->
status_var
.
ha_read_rnd_next_count
,
&
LOCK_status
);
int
error
=
mrg_rrnd
(
file
,
buf
,
~
(
mrg_off_t
)
0
);
int
error
=
mrg_rrnd
(
file
,
buf
,
~
(
mrg_off_t
)
0
);
table
->
status
=
error
?
STATUS_NOT_FOUND
:
0
;
table
->
status
=
error
?
STATUS_NOT_FOUND
:
0
;
return
!
error
?
0
:
my_errno
?
my_errno
:
-
1
;
return
!
error
?
0
:
my_errno
?
my_errno
:
-
1
;
...
@@ -136,7 +137,7 @@ int ha_isammrg::rnd_next(byte *buf)
...
@@ -136,7 +137,7 @@ int ha_isammrg::rnd_next(byte *buf)
int
ha_isammrg
::
rnd_pos
(
byte
*
buf
,
byte
*
pos
)
int
ha_isammrg
::
rnd_pos
(
byte
*
buf
,
byte
*
pos
)
{
{
statistic_increment
(
ha_read_rnd_count
,
&
LOCK_status
);
statistic_increment
(
current_thd
->
status_var
.
ha_read_rnd_count
,
&
LOCK_status
);
int
error
=
mrg_rrnd
(
file
,
buf
,
(
ulong
)
ha_get_ptr
(
pos
,
ref_length
));
int
error
=
mrg_rrnd
(
file
,
buf
,
(
ulong
)
ha_get_ptr
(
pos
,
ref_length
));
table
->
status
=
error
?
STATUS_NOT_FOUND
:
0
;
table
->
status
=
error
?
STATUS_NOT_FOUND
:
0
;
return
!
error
?
0
:
my_errno
?
my_errno
:
-
1
;
return
!
error
?
0
:
my_errno
?
my_errno
:
-
1
;
...
...
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