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
830d3089
Commit
830d3089
authored
Sep 20, 2000
by
monty@donna.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for SAFE_MUTEX on windows
parent
2780278f
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
46 additions
and
21 deletions
+46
-21
Docs/manual.texi
Docs/manual.texi
+8
-8
include/my_pthread.h
include/my_pthread.h
+1
-0
mysys/my_thr_init.c
mysys/my_thr_init.c
+14
-1
mysys/my_winthread.c
mysys/my_winthread.c
+4
-4
mysys/thr_mutex.c
mysys/thr_mutex.c
+2
-3
sql/mysqld.cc
sql/mysqld.cc
+0
-3
sql/sql_table.cc
sql/sql_table.cc
+1
-1
support-files/Makefile.am
support-files/Makefile.am
+2
-1
support-files/magic
support-files/magic
+14
-0
No files found.
Docs/manual.texi
View file @
830d3089
...
...
@@ -1385,14 +1385,14 @@ and PHP's @strong{MySQL}-related functions
@item Price @tab $34.95
@end multitable
This book teaches you how to use @strong{MySQL} and @code{mSQL}, two
popular and
robust database products that support key subsets of SQL on both Linux
and UNIX systems. Anyone who knows basic C, Java, Perl, or Python can
write a program to interact with a database, either as a stand-alone
application or through a Web page. This book takes you through the
whole process, from installation and configuration to programming
interfaces and basic administration. Includes ample tutorial
material.
This book teaches you how to use @strong{MySQL} and @code{mSQL}, two
popular and robust database products that support key subsets of SQL on
both Linux and UNIX systems. Anyone who knows basic C, Java, Perl, or
Python can write a program to interact with a database, either as a
stand-alone application or through a Web page. This book takes you
through the whole process, from installation and configuration to
programming interfaces and basic administration. Includes ample
tutorial
material.
@multitable @columnfractions .3 .7
@item Title @tab @uref{http://shop.barnesandnoble.com/bookSearch/isbnInquiry.asp?isbn=0672319144,Sams Teach Yourself MySQL in 21 Days}
include/my_pthread.h
View file @
830d3089
...
...
@@ -85,6 +85,7 @@ void pthread_exit(unsigned A); /* was #define pthread_exit(A) ExitThread(A)*/
#define HAVE_PTHREAD_ATTR_SETSTACKSIZE
#ifdef USE_TLS
/* For LIBMYSQL.DLL */
#undef SAFE_MUTEX
/* This will cause conflicts */
#define pthread_key(T,V) DWORD V
#define pthread_key_create(A,B) ((*A=TlsAlloc())==0xFFFFFFFF)
#define pthread_getspecific(A) (TlsGetValue(A))
...
...
mysys/my_thr_init.c
View file @
830d3089
...
...
@@ -77,10 +77,19 @@ void my_thread_global_end(void)
static
long
thread_id
=
0
;
/*
We can't use mutex_locks here if we re using windows as
we may have compiled the program with SAFE_MUTEX, in which
case the checking of mutex_locks will not work until
the pthread_self thread specific variable is initialized.
*/
my_bool
my_thread_init
(
void
)
{
struct
st_my_thread_var
*
tmp
;
#if !defined(__WIN__) || defined(USE_TLS) || ! defined(SAFE_MUTEX)
pthread_mutex_lock
(
&
THR_LOCK_lock
);
#endif
#if !defined(__WIN__) || defined(USE_TLS)
if
(
my_pthread_getspecific
(
struct
st_my_thread_var
*
,
THR_KEY_mysys
))
{
...
...
@@ -98,9 +107,11 @@ my_bool my_thread_init(void)
pthread_setspecific
(
THR_KEY_mysys
,
tmp
);
#else
if
(
THR_KEY_mysys
.
id
)
/* Al
l
ready initialized */
if
(
THR_KEY_mysys
.
id
)
/* Already initialized */
{
#if !defined(__WIN__) || defined(USE_TLS) || ! defined(SAFE_MUTEX)
pthread_mutex_unlock
(
&
THR_LOCK_lock
);
#endif
return
0
;
}
tmp
=
&
THR_KEY_mysys
;
...
...
@@ -108,7 +119,9 @@ my_bool my_thread_init(void)
tmp
->
id
=
++
thread_id
;
pthread_mutex_init
(
&
tmp
->
mutex
,
NULL
);
pthread_cond_init
(
&
tmp
->
suspend
,
NULL
);
#if !defined(__WIN__) || defined(USE_TLS) || ! defined(SAFE_MUTEX)
pthread_mutex_unlock
(
&
THR_LOCK_lock
);
#endif
return
0
;
}
...
...
mysys/my_winthread.c
View file @
830d3089
...
...
@@ -48,13 +48,13 @@ static pthread_handler_decl(pthread_start,param)
{
pthread_handler
func
=
((
struct
pthread_map
*
)
param
)
->
func
;
void
*
func_param
=
((
struct
pthread_map
*
)
param
)
->
param
;
my_thread_init
();
pthread_mutex_lock
(
&
THR_LOCK_thread
);
/* Wait for be
ing
thread to return */
my_thread_init
();
/* Will always succeed in windows */
pthread_mutex_lock
(
&
THR_LOCK_thread
);
/* Wait for be
gin
thread to return */
win_pthread_self
=
((
struct
pthread_map
*
)
param
)
->
pthreadself
;
pthread_mutex_unlock
(
&
THR_LOCK_thread
);
free
((
char
*
)
param
);
free
((
char
*
)
param
);
/* Free param from create */
pthread_exit
((
*
func
)(
func_param
));
return
0
;
return
0
;
/* Safety */
}
...
...
mysys/thr_mutex.c
View file @
830d3089
...
...
@@ -218,9 +218,8 @@ int safe_mutex_destroy(safe_mutex_t *mp, const char *file, uint line)
pthread_mutex_destroy
(
&
mp
->
global
);
pthread_mutex_destroy
(
&
mp
->
mutex
);
#else
if
(
pthread_mutex_destroy
(
&
mp
->
global
)
||
pthread_mutex_destroy
(
&
mp
->
mutex
))
error
=
1
;
error
=
(
int
)
(
pthread_mutex_destroy
(
&
mp
->
global
)
||
pthread_mutex_destroy
(
&
mp
->
mutex
));
#endif
return
error
;
}
...
...
sql/mysqld.cc
View file @
830d3089
...
...
@@ -1872,9 +1872,6 @@ pthread_handler_decl(handle_connections_sockets,arg __attribute__((unused)))
struct
sockaddr_in
cAddr
;
int
ip_flags
=
0
,
socket_flags
=
0
,
flags
;
Vio
*
vio_tmp
;
#ifdef __WIN__
my_thread_init
();
#endif
DBUG_ENTER
(
"handle_connections_sockets"
);
LINT_INIT
(
new_sock
);
...
...
sql/sql_table.cc
View file @
830d3089
...
...
@@ -1024,7 +1024,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
strmov
(
new_name_buff
,
new_name
);
fn_same
(
new_name_buff
,
table_name
,
3
);
#ifdef FN_LOWER_CASE
if
(
!
strcasecmp
(
new_name_buff
,
table_name
))
// Check if name changed
if
(
!
my_strcasecmp
(
new_name_buff
,
table_name
))
// Check if name changed
#else
if
(
!
strcmp
(
new_name_buff
,
table_name
))
// Check if name changed
#endif
...
...
support-files/Makefile.am
View file @
830d3089
...
...
@@ -24,7 +24,8 @@ EXTRA_DIST = mysql.spec.sh \
my-huge.cnf.sh
\
mysql-log-rotate.sh
\
mysql.server.sh
\
binary-configure.sh
binary-configure.sh
\
magic
pkgdata_DATA
=
my-small.cnf
\
my-medium.cnf
\
...
...
support-files/magic
0 → 100644
View file @
830d3089
#
# Add the following to the end of your /etc/magic file to get the 'file'
# command to recognize some MySQL files.
#
0 beshort 0xfe01 MySQL table definition file
>2 byte x Version %d
0 belong&0xffffff00 0xfefe0300 MySQL MISAM index file
>3 byte x Version %d
0 belong&0xffffff00 0xfefe0700 MySQL MISAM compressed data file
>3 byte x Version %d
0 belong&0xffffff00 0xfefe0500 MySQL ISAM index file
>3 byte x Version %d
0 belong&0xffffff00 0xfefe0600 MySQL ISAM compressed data file
>3 byte x Version %d
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