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
97797d91
Commit
97797d91
authored
Aug 02, 2005
by
jimw@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/jimw/my/mysql-5.0-7003
into mysql.com:/home/jimw/my/mysql-5.0-clean
parents
2b706159
409592e6
Changes
17
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
113 additions
and
10 deletions
+113
-10
VC++Files/client/mysqlclient.dsp
VC++Files/client/mysqlclient.dsp
+4
-0
VC++Files/client/mysqlclient_ia64.dsp
VC++Files/client/mysqlclient_ia64.dsp
+4
-0
VC++Files/libmysql/libmysql.dsp
VC++Files/libmysql/libmysql.dsp
+4
-0
VC++Files/libmysql/libmysql_ia64.dsp
VC++Files/libmysql/libmysql_ia64.dsp
+4
-0
VC++Files/libmysqld/libmysqld.dsp
VC++Files/libmysqld/libmysqld.dsp
+4
-0
VC++Files/libmysqld/libmysqld_ia64.dsp
VC++Files/libmysqld/libmysqld_ia64.dsp
+4
-0
VC++Files/strings/backup/strings.dsp
VC++Files/strings/backup/strings.dsp
+6
-1
VC++Files/strings/noMASM/strings.dsp
VC++Files/strings/noMASM/strings.dsp
+4
-0
VC++Files/strings/strings.dsp
VC++Files/strings/strings.dsp
+4
-0
VC++Files/strings/strings_ia64.dsp
VC++Files/strings/strings_ia64.dsp
+4
-0
include/m_string.h
include/m_string.h
+7
-0
libmysql/Makefile.shared
libmysql/Makefile.shared
+1
-1
sql/mysqld.cc
sql/mysqld.cc
+20
-1
strings/Makefile.am
strings/Makefile.am
+3
-3
strings/conf_to_src.c
strings/conf_to_src.c
+2
-0
strings/ctype-tis620.c
strings/ctype-tis620.c
+4
-4
strings/str_alloc.c
strings/str_alloc.c
+34
-0
No files found.
VC++Files/client/mysqlclient.dsp
View file @
97797d91
...
@@ -567,6 +567,10 @@ SOURCE=..\strings\strxnmov.c
...
@@ -567,6 +567,10 @@ SOURCE=..\strings\strxnmov.c
# End Source File
# End Source File
# Begin Source File
# Begin Source File
SOURCE=..\strings\str_alloc.c
# End Source File
# Begin Source File
SOURCE=..\mysys\thr_mutex.c
SOURCE=..\mysys\thr_mutex.c
# End Source File
# End Source File
# Begin Source File
# Begin Source File
...
...
VC++Files/client/mysqlclient_ia64.dsp
View file @
97797d91
...
@@ -548,6 +548,10 @@ SOURCE=..\strings\strxnmov.c
...
@@ -548,6 +548,10 @@ SOURCE=..\strings\strxnmov.c
# End Source File
# End Source File
# Begin Source File
# Begin Source File
SOURCE=..\strings\str_alloc.c
# End Source File
# Begin Source File
SOURCE=..\mysys\thr_mutex.c
SOURCE=..\mysys\thr_mutex.c
# End Source File
# End Source File
# Begin Source File
# Begin Source File
...
...
VC++Files/libmysql/libmysql.dsp
View file @
97797d91
...
@@ -535,6 +535,10 @@ SOURCE=..\strings\strxnmov.c
...
@@ -535,6 +535,10 @@ SOURCE=..\strings\strxnmov.c
# End Source File
# End Source File
# Begin Source File
# Begin Source File
SOURCE=..\strings\str_alloc.c
# End Source File
# Begin Source File
SOURCE=..\mysys\thr_mutex.c
SOURCE=..\mysys\thr_mutex.c
# End Source File
# End Source File
# Begin Source File
# Begin Source File
...
...
VC++Files/libmysql/libmysql_ia64.dsp
View file @
97797d91
...
@@ -522,6 +522,10 @@ SOURCE=..\strings\strxnmov.c
...
@@ -522,6 +522,10 @@ SOURCE=..\strings\strxnmov.c
# End Source File
# End Source File
# Begin Source File
# Begin Source File
SOURCE=..\strings\str_alloc.c
# End Source File
# Begin Source File
SOURCE=..\mysys\thr_mutex.c
SOURCE=..\mysys\thr_mutex.c
# End Source File
# End Source File
# Begin Source File
# Begin Source File
...
...
VC++Files/libmysqld/libmysqld.dsp
View file @
97797d91
...
@@ -600,6 +600,10 @@ SOURCE=..\strings\strxnmov.c
...
@@ -600,6 +600,10 @@ SOURCE=..\strings\strxnmov.c
# End Source File
# End Source File
# Begin Source File
# Begin Source File
SOURCE=..\strings\str_alloc.c
# End Source File
# Begin Source File
SOURCE=..\sql\table.cpp
SOURCE=..\sql\table.cpp
# End Source File
# End Source File
# Begin Source File
# Begin Source File
...
...
VC++Files/libmysqld/libmysqld_ia64.dsp
View file @
97797d91
...
@@ -538,6 +538,10 @@ SOURCE=..\strings\strxnmov.c
...
@@ -538,6 +538,10 @@ SOURCE=..\strings\strxnmov.c
# End Source File
# End Source File
# Begin Source File
# Begin Source File
SOURCE=..\strings\str_alloc.c
# End Source File
# Begin Source File
SOURCE=..\sql\table.cpp
SOURCE=..\sql\table.cpp
# End Source File
# End Source File
# Begin Source File
# Begin Source File
...
...
VC++Files/strings/backup/strings.dsp
View file @
97797d91
...
@@ -240,5 +240,10 @@ InputName=Strxmov
...
@@ -240,5 +240,10 @@ InputName=Strxmov
SOURCE=.\strxnmov.c
SOURCE=.\strxnmov.c
# End Source File
# End Source File
# Begin Source File
SOURCE=.\str_alloc.c
# End Source File
# End Target
# End Target
# End Project
# End Project
VC++Files/strings/noMASM/strings.dsp
View file @
97797d91
...
@@ -256,6 +256,10 @@ SOURCE=.\strxnmov.c
...
@@ -256,6 +256,10 @@ SOURCE=.\strxnmov.c
# End Source File
# End Source File
# Begin Source File
# Begin Source File
SOURCE=.\str_alloc.c
# End Source File
# Begin Source File
SOURCE=.\xml.c
SOURCE=.\xml.c
# End Source File
# End Source File
# End Target
# End Target
...
...
VC++Files/strings/strings.dsp
View file @
97797d91
...
@@ -273,6 +273,10 @@ SOURCE=.\strxnmov.c
...
@@ -273,6 +273,10 @@ SOURCE=.\strxnmov.c
# End Source File
# End Source File
# Begin Source File
# Begin Source File
SOURCE=.\str_alloc.c
# End Source File
# Begin Source File
SOURCE=.\xml.c
SOURCE=.\xml.c
# End Source File
# End Source File
# End Target
# End Target
...
...
VC++Files/strings/strings_ia64.dsp
View file @
97797d91
...
@@ -272,6 +272,10 @@ SOURCE=.\strxnmov.c
...
@@ -272,6 +272,10 @@ SOURCE=.\strxnmov.c
# End Source File
# End Source File
# Begin Source File
# Begin Source File
SOURCE=.\str_alloc.c
# End Source File
# Begin Source File
SOURCE=.\xml.c
SOURCE=.\xml.c
# End Source File
# End Source File
# End Target
# End Target
...
...
include/m_string.h
View file @
97797d91
...
@@ -88,6 +88,13 @@
...
@@ -88,6 +88,13 @@
extern
"C"
{
extern
"C"
{
#endif
#endif
/*
my_str_malloc() and my_str_free() are assigned to implementations in
strings/alloc.c, but can be overridden in the calling program.
*/
extern
void
*
(
*
my_str_malloc
)(
size_t
);
extern
void
(
*
my_str_free
)(
void
*
);
#if defined(HAVE_STPCPY) && !defined(HAVE_mit_thread)
#if defined(HAVE_STPCPY) && !defined(HAVE_mit_thread)
#define strmov(A,B) stpcpy((A),(B))
#define strmov(A,B) stpcpy((A),(B))
#ifndef stpcpy
#ifndef stpcpy
...
...
libmysql/Makefile.shared
View file @
97797d91
...
@@ -46,7 +46,7 @@ mystringsobjects = strmov.lo strxmov.lo strxnmov.lo strnmov.lo \
...
@@ -46,7 +46,7 @@ mystringsobjects = strmov.lo strxmov.lo strxnmov.lo strnmov.lo \
ctype-win1250ch.lo ctype-utf8.lo ctype-extra.lo
\
ctype-win1250ch.lo ctype-utf8.lo ctype-extra.lo
\
ctype-ucs2.lo ctype-gb2312.lo ctype-gbk.lo
\
ctype-ucs2.lo ctype-gb2312.lo ctype-gbk.lo
\
ctype-sjis.lo ctype-tis620.lo ctype-ujis.lo
\
ctype-sjis.lo ctype-tis620.lo ctype-ujis.lo
\
ctype-uca.lo xml.lo my_strtoll10.lo
ctype-uca.lo xml.lo my_strtoll10.lo
str_alloc.lo
mystringsextra
=
strto.c
mystringsextra
=
strto.c
dbugobjects
=
dbug.lo
# IT IS IN SAFEMALLOC.C sanity.lo
dbugobjects
=
dbug.lo
# IT IS IN SAFEMALLOC.C sanity.lo
...
...
sql/mysqld.cc
View file @
97797d91
...
@@ -2356,6 +2356,19 @@ static int my_message_sql(uint error, const char *str, myf MyFlags)
...
@@ -2356,6 +2356,19 @@ static int my_message_sql(uint error, const char *str, myf MyFlags)
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
}
}
static
void
*
my_str_malloc_mysqld
(
size_t
size
)
{
return
my_malloc
(
size
,
MYF
(
MY_FAE
));
}
static
void
my_str_free_mysqld
(
void
*
ptr
)
{
my_free
((
gptr
)
ptr
,
MYF
(
MY_FAE
));
}
#ifdef __WIN__
#ifdef __WIN__
struct
utsname
struct
utsname
...
@@ -3212,11 +3225,17 @@ we force server id to 2, but this MySQL server will not act as a slave.");
...
@@ -3212,11 +3225,17 @@ we force server id to 2, but this MySQL server will not act as a slave.");
}
}
#endif
#endif
/*
Initialize my_str_malloc() and my_str_free()
*/
my_str_malloc
=
&
my_str_malloc_mysqld
;
my_str_free
=
&
my_str_free_mysqld
;
/*
/*
init signals & alarm
init signals & alarm
After this we can't quit by a simple unireg_abort
After this we can't quit by a simple unireg_abort
*/
*/
error_handler_hook
=
my_message_sql
;
error_handler_hook
=
my_message_sql
;
start_signal_handler
();
// Creates pidfile
start_signal_handler
();
// Creates pidfile
if
(
acl_init
((
THD
*
)
0
,
opt_noacl
)
||
if
(
acl_init
((
THD
*
)
0
,
opt_noacl
)
||
my_tz_init
((
THD
*
)
0
,
default_tz_name
,
opt_bootstrap
))
my_tz_init
((
THD
*
)
0
,
default_tz_name
,
opt_bootstrap
))
...
...
strings/Makefile.am
View file @
97797d91
...
@@ -22,19 +22,19 @@ pkglib_LIBRARIES = libmystrings.a
...
@@ -22,19 +22,19 @@ pkglib_LIBRARIES = libmystrings.a
# Exact one of ASSEMBLER_X
# Exact one of ASSEMBLER_X
if
ASSEMBLER_x86
if
ASSEMBLER_x86
ASRCS
=
strings-x86.s longlong2str-x86.s my_strtoll10-x86.s
ASRCS
=
strings-x86.s longlong2str-x86.s my_strtoll10-x86.s
CSRCS
=
bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c strtod.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-cp932.c ctype-czech.c ctype-eucjpms.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-tis620.c ctype-ujis.c ctype-utf8.c ctype-ucs2.c ctype-uca.c ctype-win1250ch.c ctype-bin.c ctype-latin1.c my_vsnprintf.c xml.c decimal.c ctype-extra.c
CSRCS
=
bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c strtod.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-cp932.c ctype-czech.c ctype-eucjpms.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-tis620.c ctype-ujis.c ctype-utf8.c ctype-ucs2.c ctype-uca.c ctype-win1250ch.c ctype-bin.c ctype-latin1.c my_vsnprintf.c xml.c decimal.c ctype-extra.c
str_alloc.c
else
else
if
ASSEMBLER_sparc32
if
ASSEMBLER_sparc32
# These file MUST all be on the same line!! Otherwise automake
# These file MUST all be on the same line!! Otherwise automake
# generats a very broken makefile
# generats a very broken makefile
ASRCS
=
bmove_upp-sparc.s strappend-sparc.s strend-sparc.s strinstr-sparc.s strmake-sparc.s strmov-sparc.s strnmov-sparc.s strstr-sparc.s
ASRCS
=
bmove_upp-sparc.s strappend-sparc.s strend-sparc.s strinstr-sparc.s strmake-sparc.s strmov-sparc.s strnmov-sparc.s strstr-sparc.s
CSRCS
=
strcont.c strfill.c strcend.c is_prefix.c longlong2str.c bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c strtod.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c strxmov.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-cp932.c ctype-czech.c ctype-eucjpms.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-tis620.c ctype-ujis.c ctype-utf8.c ctype-ucs2.c ctype-uca.c ctype-win1250ch.c ctype-bin.c ctype-latin1.c my_vsnprintf.c xml.c decimal.c ctype-extra.c my_strtoll10.c
CSRCS
=
strcont.c strfill.c strcend.c is_prefix.c longlong2str.c bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c strtod.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c strxmov.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-cp932.c ctype-czech.c ctype-eucjpms.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-tis620.c ctype-ujis.c ctype-utf8.c ctype-ucs2.c ctype-uca.c ctype-win1250ch.c ctype-bin.c ctype-latin1.c my_vsnprintf.c xml.c decimal.c ctype-extra.c my_strtoll10.c
str_alloc.c
else
else
#no assembler
#no assembler
ASRCS
=
ASRCS
=
# These file MUST all be on the same line!! Otherwise automake
# These file MUST all be on the same line!! Otherwise automake
# generats a very broken makefile
# generats a very broken makefile
CSRCS
=
strxmov.c bmove_upp.c strappend.c strcont.c strend.c strfill.c strcend.c is_prefix.c strstr.c strinstr.c strmake.c strnmov.c strmov.c longlong2str.c bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c strtod.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-cp932.c ctype-czech.c ctype-eucjpms.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-tis620.c ctype-ujis.c ctype-utf8.c ctype-ucs2.c ctype-uca.c ctype-win1250ch.c ctype-bin.c ctype-latin1.c my_vsnprintf.c xml.c decimal.c ctype-extra.c my_strtoll10.c
CSRCS
=
strxmov.c bmove_upp.c strappend.c strcont.c strend.c strfill.c strcend.c is_prefix.c strstr.c strinstr.c strmake.c strnmov.c strmov.c longlong2str.c bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c strtod.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-cp932.c ctype-czech.c ctype-eucjpms.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-tis620.c ctype-ujis.c ctype-utf8.c ctype-ucs2.c ctype-uca.c ctype-win1250ch.c ctype-bin.c ctype-latin1.c my_vsnprintf.c xml.c decimal.c ctype-extra.c my_strtoll10.c
str_alloc.c
endif
endif
endif
endif
...
...
strings/conf_to_src.c
View file @
97797d91
...
@@ -75,6 +75,8 @@ static int get_charset_number(const char *charset_name)
...
@@ -75,6 +75,8 @@ static int get_charset_number(const char *charset_name)
char
*
mdup
(
const
char
*
src
,
uint
len
)
char
*
mdup
(
const
char
*
src
,
uint
len
)
{
{
char
*
dst
=
(
char
*
)
malloc
(
len
);
char
*
dst
=
(
char
*
)
malloc
(
len
);
if
(
!
dst
)
exit
(
1
);
memcpy
(
dst
,
src
,
len
);
memcpy
(
dst
,
src
,
len
);
return
dst
;
return
dst
;
}
}
...
...
strings/ctype-tis620.c
View file @
97797d91
...
@@ -541,7 +541,7 @@ int my_strnncoll_tis620(CHARSET_INFO *cs __attribute__((unused)),
...
@@ -541,7 +541,7 @@ int my_strnncoll_tis620(CHARSET_INFO *cs __attribute__((unused)),
tc1
=
buf
;
tc1
=
buf
;
if
((
len1
+
len2
+
2
)
>
(
int
)
sizeof
(
buf
))
if
((
len1
+
len2
+
2
)
>
(
int
)
sizeof
(
buf
))
tc1
=
(
uchar
*
)
malloc
(
len1
+
len2
+
2
);
tc1
=
(
uchar
*
)
m
y_str_m
alloc
(
len1
+
len2
+
2
);
tc2
=
tc1
+
len1
+
1
;
tc2
=
tc1
+
len1
+
1
;
memcpy
((
char
*
)
tc1
,
(
char
*
)
s1
,
len1
);
memcpy
((
char
*
)
tc1
,
(
char
*
)
s1
,
len1
);
tc1
[
len1
]
=
0
;
/* if length(s1)> len1, need to put 'end of string' */
tc1
[
len1
]
=
0
;
/* if length(s1)> len1, need to put 'end of string' */
...
@@ -551,7 +551,7 @@ int my_strnncoll_tis620(CHARSET_INFO *cs __attribute__((unused)),
...
@@ -551,7 +551,7 @@ int my_strnncoll_tis620(CHARSET_INFO *cs __attribute__((unused)),
thai2sortable
(
tc2
,
len2
);
thai2sortable
(
tc2
,
len2
);
i
=
strcmp
((
char
*
)
tc1
,
(
char
*
)
tc2
);
i
=
strcmp
((
char
*
)
tc1
,
(
char
*
)
tc2
);
if
(
tc1
!=
buf
)
if
(
tc1
!=
buf
)
free
(
tc1
);
my_str_
free
(
tc1
);
return
i
;
return
i
;
}
}
...
@@ -572,7 +572,7 @@ int my_strnncollsp_tis620(CHARSET_INFO * cs __attribute__((unused)),
...
@@ -572,7 +572,7 @@ int my_strnncollsp_tis620(CHARSET_INFO * cs __attribute__((unused)),
a
=
buf
;
a
=
buf
;
if
((
a_length
+
b_length
+
2
)
>
(
int
)
sizeof
(
buf
))
if
((
a_length
+
b_length
+
2
)
>
(
int
)
sizeof
(
buf
))
alloced
=
a
=
(
uchar
*
)
malloc
(
a_length
+
b_length
+
2
);
alloced
=
a
=
(
uchar
*
)
m
y_str_m
alloc
(
a_length
+
b_length
+
2
);
b
=
a
+
a_length
+
1
;
b
=
a
+
a_length
+
1
;
memcpy
((
char
*
)
a
,
(
char
*
)
a0
,
a_length
);
memcpy
((
char
*
)
a
,
(
char
*
)
a0
,
a_length
);
...
@@ -621,7 +621,7 @@ int my_strnncollsp_tis620(CHARSET_INFO * cs __attribute__((unused)),
...
@@ -621,7 +621,7 @@ int my_strnncollsp_tis620(CHARSET_INFO * cs __attribute__((unused)),
ret:
ret:
if
(
alloced
)
if
(
alloced
)
free
(
alloced
);
my_str_
free
(
alloced
);
return
res
;
return
res
;
}
}
...
...
strings/str_alloc.c
0 → 100644
View file @
97797d91
/* Copyright (C) 2000 MySQL 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 */
#include <my_global.h>
#include <m_string.h>
static
void
*
my_str_malloc_default
(
size_t
size
)
{
void
*
ret
=
malloc
(
size
);
if
(
!
ret
)
exit
(
1
);
return
ret
;
}
static
void
my_str_free_default
(
void
*
ptr
)
{
free
(
ptr
);
}
void
*
(
*
my_str_malloc
)(
size_t
)
=
&
my_str_malloc_default
;
void
(
*
my_str_free
)(
void
*
)
=
&
my_str_free_default
;
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