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
fab1abb4
Commit
fab1abb4
authored
Aug 18, 2000
by
monty@donna.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed blanks
parent
a753a3a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
23 deletions
+23
-23
sql/ha_myisam.cc
sql/ha_myisam.cc
+23
-23
No files found.
sql/ha_myisam.cc
View file @
fab1abb4
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
...
...
@@ -72,7 +72,7 @@ static void mi_check_print_msg(MI_CHECK *param, const char* msg_type,
fprintf
(
stderr
,
"Failed on my_net_write, writing to stderr instead: %s
\n
"
,
msgbuf
);
return
;
return
;
}
extern
"C"
{
...
...
@@ -134,7 +134,7 @@ int ha_myisam::net_read_dump(NET* net)
goto
err
;
}
}
err:
return
error
;
}
...
...
@@ -186,7 +186,7 @@ int ha_myisam::dump(THD* thd, int fd)
my_net_write
(
net
,
""
,
0
);
net_flush
(
net
);
}
err:
my_free
((
gptr
)
buf
,
MYF
(
0
));
return
error
;
...
...
@@ -233,13 +233,13 @@ int ha_myisam::check(THD* thd, HA_CHECK_OPT* check_opt)
int
error
;
MI_CHECK
param
;
MYISAM_SHARE
*
share
=
file
->
s
;
myisamchk_init
(
&
param
);
param
.
thd
=
thd
;
param
.
op_name
=
(
char
*
)
"check"
;
param
.
table_name
=
table
->
table_name
;
param
.
testflag
=
check_opt
->
flags
|
T_CHECK
|
T_SILENT
|
T_MEDIUM
;
if
(
!
(
table
->
db_stat
&
HA_READ_ONLY
))
param
.
testflag
|=
T_STATISTICS
;
param
.
using_global_keycache
=
1
;
...
...
@@ -270,8 +270,8 @@ int ha_myisam::check(THD* thd, HA_CHECK_OPT* check_opt)
}
}
if
(
!
error
)
{
if
((
share
->
state
.
changed
&
(
STATE_CHANGED
|
{
if
((
share
->
state
.
changed
&
(
STATE_CHANGED
|
STATE_CRASHED_ON_REPAIR
|
STATE_CRASHED
|
STATE_NOT_ANALYZED
))
||
(
param
.
testflag
&
T_STATISTICS
))
...
...
@@ -299,7 +299,7 @@ int ha_myisam::check(THD* thd, HA_CHECK_OPT* check_opt)
mi_mark_crashed
(
file
);
file
->
update
|=
HA_STATE_CHANGED
|
HA_STATE_ROW_CHANGED
;
}
return
error
?
HA_CHECK_CORRUPT
:
HA_CHECK_OK
;
}
...
...
@@ -315,7 +315,7 @@ int ha_myisam::analyze(THD *thd)
int
error
=
0
;
MI_CHECK
param
;
MYISAM_SHARE
*
share
=
file
->
s
;
myisamchk_init
(
&
param
);
param
.
thd
=
thd
;
param
.
op_name
=
(
char
*
)
" analyze"
;
...
...
@@ -328,7 +328,7 @@ int ha_myisam::analyze(THD *thd)
{
error
=
chk_key
(
&
param
,
file
);
if
(
!
error
)
{
{
pthread_mutex_lock
(
&
share
->
intern_lock
);
#ifndef HAVE_PREAD
pthread_mutex_lock
(
&
THR_LOCK_keycache
);
// QQ; Has to be removed!
...
...
@@ -357,7 +357,7 @@ int ha_myisam::repair(THD* thd, HA_CHECK_OPT *check_opt)
param
.
op_name
=
(
char
*
)
"repair"
;
param
.
testflag
=
(
check_opt
->
flags
|
T_SILENT
|
T_FORCE_CREATE
|
T_REP_BY_SORT
|
T_STATISTICS
);
if
(
check_opt
->
quick
)
if
(
check_opt
->
quick
)
param
.
opt_rep_quick
++
;
param
.
sort_buffer_length
=
check_opt
->
sort_buffer_size
;
return
repair
(
thd
,
param
);
...
...
@@ -377,11 +377,11 @@ int ha_myisam::repair(THD *thd, MI_CHECK ¶m)
VOID
(
fn_format
(
fixed_name
,
file
->
filename
,
""
,
MI_NAME_IEXT
,
4
+
(
param
.
opt_follow_links
?
16
:
0
)));
if
(
mi_test_if_sort_rep
(
file
,
file
->
state
->
records
))
error
=
mi_repair_by_sort
(
&
param
,
file
,
fixed_name
,
param
.
opt_rep_quick
);
error
=
mi_repair_by_sort
(
&
param
,
file
,
fixed_name
,
param
.
opt_rep_quick
);
else
error
=
mi_repair
(
&
param
,
file
,
fixed_name
,
param
.
opt_rep_quick
);
error
=
mi_repair
(
&
param
,
file
,
fixed_name
,
param
.
opt_rep_quick
);
if
(
!
error
)
{
{
if
(
share
->
state
.
changed
&
STATE_CHANGED
)
{
share
->
state
.
changed
&=
~
(
STATE_CHANGED
|
STATE_CRASHED
|
...
...
@@ -415,7 +415,7 @@ int ha_myisam::repair(THD *thd, MI_CHECK ¶m)
if
(
param
.
out_flag
&
O_NEW_DATA
)
error
|=
change_to_newfile
(
fixed_name
,
MI_NAME_DEXT
,
DATA_TMP_EXT
,
0
);
if
(
param
.
out_flag
&
O_NEW_INDEX
)
error
|=
change_to_newfile
(
fixed_name
,
MI_NAME_IEXT
,
INDEX_TMP_EXT
,
0
);
...
...
@@ -448,7 +448,7 @@ bool ha_myisam::activate_all_index(THD *thd)
thd
->
proc_info
=
"creating index"
;
myisamchk_init
(
&
param
);
param
.
op_name
=
(
char
*
)
"recreating_index"
;
param
.
testflag
=
(
T_SILENT
|
T_REP_BY_SORT
|
param
.
testflag
=
(
T_SILENT
|
T_REP_BY_SORT
|
T_STATISTICS
|
T_CREATE_MISSING_KEYS
|
T_TRUST_HEADER
);
param
.
myf_rw
&=
~
MY_WAIT_IF_FULL
;
param
.
sort_buffer_length
=
myisam_sort_buffer_size
;
...
...
@@ -506,7 +506,7 @@ int ha_myisam::index_prev(byte * buf)
table
->
status
=
error
?
STATUS_NOT_FOUND
:
0
;
return
error
;
}
int
ha_myisam
::
index_first
(
byte
*
buf
)
{
statistic_increment
(
ha_read_first_count
,
&
LOCK_status
);
...
...
@@ -641,7 +641,7 @@ int ha_myisam::delete_table(const char *name)
int
ha_myisam
::
external_lock
(
THD
*
thd
,
int
lock_type
)
{
return
mi_lock_database
(
file
,
lock_type
);
}
}
THR_LOCK_DATA
**
ha_myisam
::
store_lock
(
THD
*
thd
,
...
...
@@ -848,8 +848,8 @@ int ha_myisam::create(const char *name, register TABLE *form,
((
options
&
HA_OPTION_CHECKSUM
)
?
HA_CREATE_CHECKSUM
:
0
)
|
((
options
&
HA_OPTION_DELAY_KEY_WRITE
)
?
HA_CREATE_DELAY_KEY_WRITE
:
0
)));
my_free
((
gptr
)
recinfo
,
MYF
(
0
));
DBUG_RETURN
(
error
);
}
...
...
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