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
bd294f07
Commit
bd294f07
authored
Mar 24, 2003
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make myisam usable without threads (and even w/o pthread_t)
parent
fd8972cf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
2 deletions
+12
-2
include/myisam.h
include/myisam.h
+4
-0
myisam/mi_check.c
myisam/mi_check.c
+5
-1
myisam/sort.c
myisam/sort.c
+3
-1
No files found.
include/myisam.h
View file @
bd294f07
...
@@ -366,14 +366,18 @@ typedef struct st_sort_info
...
@@ -366,14 +366,18 @@ typedef struct st_sort_info
SORT_KEY_BLOCKS
*
key_block
,
*
key_block_end
;
SORT_KEY_BLOCKS
*
key_block
,
*
key_block_end
;
/* sync things*/
/* sync things*/
uint
got_error
,
threads_running
;
uint
got_error
,
threads_running
;
#ifdef THREAD
pthread_mutex_t
mutex
;
pthread_mutex_t
mutex
;
pthread_cond_t
cond
;
pthread_cond_t
cond
;
#endif
}
SORT_INFO
;
}
SORT_INFO
;
typedef
struct
st_mi_sort_param
typedef
struct
st_mi_sort_param
{
{
#ifdef THREAD
pthread_t
thr
;
pthread_t
thr
;
#endif
IO_CACHE
read_cache
,
tempfile
,
tempfile_for_exceptions
;
IO_CACHE
read_cache
,
tempfile
,
tempfile_for_exceptions
;
DYNAMIC_ARRAY
buffpek
;
DYNAMIC_ARRAY
buffpek
;
ulonglong
unique
[
MI_MAX_KEY_SEG
+
1
];
ulonglong
unique
[
MI_MAX_KEY_SEG
+
1
];
...
...
myisam/mi_check.c
View file @
bd294f07
...
@@ -2109,7 +2109,7 @@ int mi_repair_by_sort(MI_CHECK *param, register MI_INFO *info,
...
@@ -2109,7 +2109,7 @@ int mi_repair_by_sort(MI_CHECK *param, register MI_INFO *info,
Threaded repair of table using sorting
Threaded repair of table using sorting
SYNOPSIS
SYNOPSIS
mi_repair_
by_sort_r
()
mi_repair_
parallel
()
param Repair parameters
param Repair parameters
info MyISAM handler to repair
info MyISAM handler to repair
name Name of table (for warnings)
name Name of table (for warnings)
...
@@ -2128,6 +2128,9 @@ int mi_repair_by_sort(MI_CHECK *param, register MI_INFO *info,
...
@@ -2128,6 +2128,9 @@ int mi_repair_by_sort(MI_CHECK *param, register MI_INFO *info,
int
mi_repair_parallel
(
MI_CHECK
*
param
,
register
MI_INFO
*
info
,
int
mi_repair_parallel
(
MI_CHECK
*
param
,
register
MI_INFO
*
info
,
const
char
*
name
,
int
rep_quick
)
const
char
*
name
,
int
rep_quick
)
{
{
#ifndef THREAD
return
mi_repair_by_sort
(
param
,
info
,
name
,
rep_quick
);
#else
int
got_error
;
int
got_error
;
uint
i
,
key
,
total_key_length
,
istep
;
uint
i
,
key
,
total_key_length
,
istep
;
ulong
rec_length
;
ulong
rec_length
;
...
@@ -2489,6 +2492,7 @@ int mi_repair_parallel(MI_CHECK *param, register MI_INFO *info,
...
@@ -2489,6 +2492,7 @@ int mi_repair_parallel(MI_CHECK *param, register MI_INFO *info,
share
->
pack
.
header_length
=
0
;
share
->
pack
.
header_length
=
0
;
}
}
DBUG_RETURN
(
got_error
);
DBUG_RETURN
(
got_error
);
#endif
/* THREAD */
}
}
/* Read next record and return next key */
/* Read next record and return next key */
...
...
myisam/sort.c
View file @
bd294f07
...
@@ -275,6 +275,7 @@ static ha_rows NEAR_F find_all_keys(MI_SORT_PARAM *info, uint keys,
...
@@ -275,6 +275,7 @@ static ha_rows NEAR_F find_all_keys(MI_SORT_PARAM *info, uint keys,
}
/* find_all_keys */
}
/* find_all_keys */
#ifdef THREAD
/* Search after all keys and place them in a temp. file */
/* Search after all keys and place them in a temp. file */
pthread_handler_decl
(
thr_find_all_keys
,
arg
)
pthread_handler_decl
(
thr_find_all_keys
,
arg
)
...
@@ -284,7 +285,7 @@ pthread_handler_decl(thr_find_all_keys,arg)
...
@@ -284,7 +285,7 @@ pthread_handler_decl(thr_find_all_keys,arg)
uint
memavl
,
old_memavl
,
keys
,
sort_length
;
uint
memavl
,
old_memavl
,
keys
,
sort_length
;
uint
idx
,
maxbuffer
;
uint
idx
,
maxbuffer
;
uchar
**
sort_keys
=
0
;
uchar
**
sort_keys
=
0
;
error
=
1
;
error
=
1
;
if
(
my_thread_init
())
if
(
my_thread_init
())
...
@@ -542,6 +543,7 @@ int thr_write_keys(MI_SORT_PARAM *sort_param)
...
@@ -542,6 +543,7 @@ int thr_write_keys(MI_SORT_PARAM *sort_param)
my_free
((
gptr
)
mergebuf
,
MYF
(
MY_ALLOW_ZERO_PTR
));
my_free
((
gptr
)
mergebuf
,
MYF
(
MY_ALLOW_ZERO_PTR
));
return
got_error
;
return
got_error
;
}
}
#endif
/* THREAD */
/* Write all keys in memory to file for later merge */
/* Write all keys in memory to file for later merge */
...
...
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