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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
af845f6e
Commit
af845f6e
authored
Jan 12, 2006
by
jani@ua141d10.elisa.omakaista.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NetWare specific change to increase thread stack size.
Changes to Netware specific mysqld_safe.c
parent
fd4a0403
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
27 deletions
+32
-27
include/config-netware.h
include/config-netware.h
+3
-0
innobase/os/os0thread.c
innobase/os/os0thread.c
+9
-0
netware/mysqld_safe.c
netware/mysqld_safe.c
+15
-27
sql/mysqld.cc
sql/mysqld.cc
+5
-0
No files found.
include/config-netware.h
View file @
af845f6e
...
...
@@ -92,6 +92,9 @@ extern "C" {
/* On NetWare, stack grows towards lower address*/
#define STACK_DIRECTION -1
/* On NetWare, we need to set stack size for threads, otherwise default 16K is used */
#define NW_THD_STACKSIZE 65536
/* On NetWare, to fix the problem with the deletion of open files */
#define CANT_DELETE_OPEN_FILES 1
...
...
innobase/os/os0thread.c
View file @
af845f6e
...
...
@@ -147,6 +147,15 @@ os_thread_create(
"InnoDB: Error: pthread_attr_setstacksize returned %d
\n
"
,
ret
);
exit
(
1
);
}
#endif
#ifdef __NETWARE__
ret
=
pthread_attr_setstacksize
(
&
attr
,
(
size_t
)
NW_THD_STACKSIZE
);
if
(
ret
)
{
fprintf
(
stderr
,
"InnoDB: Error: pthread_attr_setstacksize returned %d
\n
"
,
ret
);
exit
(
1
);
}
#endif
os_mutex_enter
(
os_sync_mutex
);
os_thread_count
++
;
...
...
netware/mysqld_safe.c
View file @
af845f6e
...
...
@@ -252,51 +252,39 @@ void finish_defaults()
******************************************************************************/
void
read_defaults
(
arg_list_t
*
pal
)
{
arg_list_t
al
;
char
defaults_file
[
PATH_MAX
];
char
mydefaults
[
PATH_MAX
];
char
mydefaults_command
[
3
*
PATH_MAX
];
char
line
[
PATH_MAX
];
FILE
*
fp
;
// defaults output file
snprintf
(
defaults_file
,
PATH_MAX
,
"%s/bin/defaults.out"
,
basedir
);
remove
(
defaults_file
);
// mysqladmin file
// my_print_defaults file
snprintf
(
mydefaults
,
PATH_MAX
,
"%s/bin/my_print_defaults"
,
basedir
);
// args
init_args
(
&
al
);
add_arg
(
&
al
,
mydefaults
);
if
(
default_option
[
0
])
add_arg
(
&
al
,
default_option
);
add_arg
(
&
al
,
"mysqld"
);
add_arg
(
&
al
,
"server"
);
add_arg
(
&
al
,
"mysqld_safe"
);
add_arg
(
&
al
,
"safe_mysqld"
);
spawn
(
mydefaults
,
&
al
,
TRUE
,
NULL
,
defaults_file
,
NULL
);
free_args
(
&
al
);
// args to my_print_defaults
if
(
default_option
[
0
])
{
snprintf
(
mydefaults_command
,
3
*
PATH_MAX
,
"%s %s mysqld server mysqld_safe safe_mysqld"
,
mydefaults
,
default_option
);
}
else
{
snprintf
(
mydefaults_command
,
3
*
PATH_MAX
,
"%s mysqld server mysqld_safe safe_mysqld"
,
mydefaults
);
}
// gather defaults
if
((
fp
=
fopen
(
defaults_file
,
"r"
))
!=
NULL
)
if
((
fp
=
popen
(
mydefaults_command
,
"r"
))
!=
NULL
)
{
while
(
fgets
(
line
,
PATH_MAX
,
fp
))
{
char
*
p
;
// remove end-of-line character
if
((
p
=
strrchr
(
line
,
'\n'
))
!=
NULL
)
*
p
=
'\0'
;
if
((
p
=
strrchr
(
line
,
'\n'
))
!=
NULL
)
*
p
=
'\0'
;
// add the option as an argument
add_arg
(
pal
,
line
);
}
fclose
(
fp
);
pclose
(
fp
);
}
// remove file
remove
(
defaults_file
);
}
/******************************************************************************
...
...
sql/mysqld.cc
View file @
af845f6e
...
...
@@ -2401,6 +2401,11 @@ You should consider changing lower_case_table_names to 1 or 2",
thread_stack
=
stack_size
;
}
}
#endif
#ifdef __NETWARE__
/* Increasing stacksize of threads on NetWare */
pthread_attr_setstacksize
(
&
connection_attrib
,
NW_THD_STACKSIZE
);
#endif
if
(
!
(
opt_specialflag
&
SPECIAL_NO_PRIOR
))
my_pthread_attr_setprio
(
&
connection_attrib
,
WAIT_PRIOR
);
...
...
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