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
ba9bc33b
Commit
ba9bc33b
authored
Nov 03, 2008
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
24d1df1a
2b521320
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
28 additions
and
1 deletion
+28
-1
storage/maria/ha_maria.cc
storage/maria/ha_maria.cc
+10
-0
storage/maria/ha_maria.h
storage/maria/ha_maria.h
+1
-0
storage/maria/ma_delete.c
storage/maria/ma_delete.c
+1
-0
storage/maria/ma_open.c
storage/maria/ma_open.c
+1
-0
storage/maria/ma_state.c
storage/maria/ma_state.c
+10
-0
storage/maria/ma_state.h
storage/maria/ma_state.h
+2
-0
storage/maria/ma_update.c
storage/maria/ma_update.c
+1
-0
storage/maria/ma_write.c
storage/maria/ma_write.c
+1
-0
storage/maria/trnman.c
storage/maria/trnman.c
+1
-1
No files found.
storage/maria/ha_maria.cc
View file @
ba9bc33b
...
...
@@ -3074,6 +3074,16 @@ static int mark_recovery_success(void)
}
/*
Return 1 if table has changed during the current transaction
*/
bool
ha_maria
::
is_changed
()
const
{
return
file
->
state
->
changed
;
}
static
int
ha_maria_init
(
void
*
p
)
{
int
res
;
...
...
storage/maria/ha_maria.h
View file @
ba9bc33b
...
...
@@ -139,6 +139,7 @@ class ha_maria :public handler
int
repair
(
THD
*
thd
,
HA_CHECK_OPT
*
check_opt
);
bool
check_and_repair
(
THD
*
thd
);
bool
is_crashed
()
const
;
bool
is_changed
()
const
;
bool
auto_repair
()
const
{
return
1
;
}
int
optimize
(
THD
*
thd
,
HA_CHECK_OPT
*
check_opt
);
int
restore
(
THD
*
thd
,
HA_CHECK_OPT
*
check_opt
);
...
...
storage/maria/ma_delete.c
View file @
ba9bc33b
...
...
@@ -116,6 +116,7 @@ int maria_delete(MARIA_HA *info,const uchar *record)
info
->
update
=
HA_STATE_CHANGED
+
HA_STATE_DELETED
+
HA_STATE_ROW_CHANGED
;
share
->
state
.
changed
|=
(
STATE_NOT_OPTIMIZED_ROWS
|
STATE_NOT_MOVABLE
|
STATE_NOT_ZEROFILLED
);
info
->
state
->
changed
=
1
;
mi_sizestore
(
lastpos
,
info
->
cur_row
.
lastpos
);
VOID
(
_ma_writeinfo
(
info
,
WRITEINFO_UPDATE_KEYFILE
));
...
...
storage/maria/ma_open.c
View file @
ba9bc33b
...
...
@@ -824,6 +824,7 @@ MARIA_HA *maria_open(const char *name, int mode, uint open_flags)
VOID
(
my_rwlock_init
(
&
share
->
mmap_lock
,
NULL
));
share
->
row_is_visible
=
_ma_row_visible_always
;
share
->
lock
.
get_status
=
_ma_reset_update_flag
;
if
(
!
thr_lock_inited
)
{
/* Probably a single threaded program; Don't use concurrent inserts */
...
...
storage/maria/ma_state.c
View file @
ba9bc33b
...
...
@@ -96,6 +96,8 @@ my_bool _ma_setup_live_state(MARIA_HA *info)
pthread_mutex_unlock
(
&
share
->
intern_lock
);
/* The current item can't be deleted as it's the first one visible for us */
tables
->
state_start
=
tables
->
state_current
=
history
->
state
;
tables
->
state_current
.
changed
=
0
;
DBUG_PRINT
(
"info"
,
(
"records: %ld"
,
(
ulong
)
tables
->
state_start
.
records
));
end:
...
...
@@ -262,6 +264,7 @@ void _ma_get_status(void* param, my_bool concurrent_insert)
#endif
info
->
state_save
=
info
->
s
->
state
.
state
;
info
->
state
=
&
info
->
state_save
;
info
->
state
->
changed
=
0
;
info
->
append_insert_at_end
=
concurrent_insert
;
DBUG_VOID_RETURN
;
}
...
...
@@ -315,6 +318,13 @@ void _ma_copy_status(void* to, void *from)
}
void
_ma_reset_update_flag
(
void
*
param
)
{
MARIA_HA
*
info
=
(
MARIA_HA
*
)
param
;
info
->
state
->
changed
=
0
;
}
/**
@brief Check if should allow concurrent inserts
...
...
storage/maria/ma_state.h
View file @
ba9bc33b
...
...
@@ -24,6 +24,7 @@ typedef struct st_maria_status_info
my_off_t
key_file_length
;
my_off_t
data_file_length
;
ha_checksum
checksum
;
my_bool
changed
;
}
MARIA_STATUS_INFO
;
...
...
@@ -62,6 +63,7 @@ void _ma_get_status(void* param, my_bool concurrent_insert);
void
_ma_update_status
(
void
*
param
);
void
_ma_restore_status
(
void
*
param
);
void
_ma_copy_status
(
void
*
to
,
void
*
from
);
void
_ma_reset_update_flag
(
void
*
param
);
my_bool
_ma_check_status
(
void
*
param
);
void
_ma_block_get_status
(
void
*
param
,
my_bool
concurrent_insert
);
void
_ma_block_update_status
(
void
*
param
);
...
...
storage/maria/ma_update.c
View file @
ba9bc33b
...
...
@@ -173,6 +173,7 @@ int maria_update(register MARIA_HA *info, const uchar *oldrec, uchar *newrec)
*/
info
->
update
=
(
HA_STATE_CHANGED
|
HA_STATE_ROW_CHANGED
|
key_changed
);
share
->
state
.
changed
|=
STATE_NOT_MOVABLE
|
STATE_NOT_ZEROFILLED
;
info
->
state
->
changed
=
1
;
/*
Every Maria function that updates Maria table must end with
...
...
storage/maria/ma_write.c
View file @
ba9bc33b
...
...
@@ -289,6 +289,7 @@ int maria_write(MARIA_HA *info, uchar *record)
info
->
update
=
(
HA_STATE_CHANGED
|
HA_STATE_AKTIV
|
HA_STATE_WRITTEN
|
HA_STATE_ROW_CHANGED
);
share
->
state
.
changed
|=
STATE_NOT_MOVABLE
|
STATE_NOT_ZEROFILLED
;
info
->
state
->
changed
=
1
;
info
->
cur_row
.
lastpos
=
filepos
;
VOID
(
_ma_writeinfo
(
info
,
WRITEINFO_UPDATE_KEYFILE
));
...
...
storage/maria/trnman.c
View file @
ba9bc33b
...
...
@@ -222,7 +222,7 @@ static TrID new_trid()
static
uint
get_short_trid
(
TRN
*
trn
)
{
int
i
=
(
int
)
((
global_trid_generator
+
(
intptr
)
trn
)
*
312089
%
SHORT_TRID_MAX
+
1
)
;
SHORT_TRID_MAX
)
+
1
;
uint
res
=
0
;
for
(
;
!
res
;
i
=
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