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
19351839
Commit
19351839
authored
22 years ago
by
lenz@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Portability fixes for HP compiler on HPUX11 (backport from 4.0 tree)
- sql_analyse.cc: Fixed bug in decimal handling
parent
b9d8e521
No related merge requests found
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
26 additions
and
9 deletions
+26
-9
configure.in
configure.in
+6
-0
libmysql/password.c
libmysql/password.c
+1
-1
mysys/hash.c
mysys/hash.c
+10
-5
mysys/my_static.c
mysys/my_static.c
+1
-1
mysys/my_static.h
mysys/my_static.h
+1
-1
mysys/my_tempnam.c
mysys/my_tempnam.c
+6
-0
sql/sql_analyse.cc
sql/sql_analyse.cc
+1
-1
No files found.
configure.in
View file @
19351839
...
@@ -893,6 +893,12 @@ case $SYSTEM_TYPE in
...
@@ -893,6 +893,12 @@ case $SYSTEM_TYPE in
echo
"Using --with-named-thread=-lpthread"
echo
"Using --with-named-thread=-lpthread"
with_named_thread
=
"-lpthread"
with_named_thread
=
"-lpthread"
fi
fi
# Fixes for HPUX 11.0 compiler
if
test
"
$ac_cv_prog_gcc
"
=
"no"
then
CFLAGS
=
"
$CFLAGS
+DD64 -DHAVE_BROKEN_INLINE"
CXXFLAGS
=
"
$CXXFLAGS
+DD64 +O2"
fi
;;
;;
*
rhapsody
*
)
*
rhapsody
*
)
if
test
"
$ac_cv_prog_gcc
"
=
"yes"
if
test
"
$ac_cv_prog_gcc
"
=
"yes"
...
...
This diff is collapsed.
Click to expand it.
libmysql/password.c
View file @
19351839
...
@@ -92,7 +92,7 @@ void make_scrambled_password(char *to,const char *password)
...
@@ -92,7 +92,7 @@ void make_scrambled_password(char *to,const char *password)
sprintf
(
to
,
"%08lx%08lx"
,
hash_res
[
0
],
hash_res
[
1
]);
sprintf
(
to
,
"%08lx%08lx"
,
hash_res
[
0
],
hash_res
[
1
]);
}
}
static
inline
uint
char_val
(
char
X
)
static
inline
u
nsigned
int
char_val
(
char
X
)
{
{
return
(
uint
)
(
X
>=
'0'
&&
X
<=
'9'
?
X
-
'0'
:
return
(
uint
)
(
X
>=
'0'
&&
X
<=
'9'
?
X
-
'0'
:
X
>=
'A'
&&
X
<=
'Z'
?
X
-
'A'
+
10
:
X
>=
'A'
&&
X
<=
'Z'
?
X
-
'A'
+
10
:
...
...
This diff is collapsed.
Click to expand it.
mysys/hash.c
View file @
19351839
...
@@ -83,7 +83,12 @@ void hash_free(HASH *hash)
...
@@ -83,7 +83,12 @@ void hash_free(HASH *hash)
/* some helper functions */
/* some helper functions */
inline
byte
*
/*
This function is char* instead of byte* as HPUX11 compiler can't
handle inline functions that are not defined as native types
*/
inline
char
*
hash_key
(
HASH
*
hash
,
const
byte
*
record
,
uint
*
length
,
my_bool
first
)
hash_key
(
HASH
*
hash
,
const
byte
*
record
,
uint
*
length
,
my_bool
first
)
{
{
if
(
hash
->
get_key
)
if
(
hash
->
get_key
)
...
@@ -104,7 +109,7 @@ static uint hash_rec_mask(HASH *hash,HASH_LINK *pos,uint buffmax,
...
@@ -104,7 +109,7 @@ static uint hash_rec_mask(HASH *hash,HASH_LINK *pos,uint buffmax,
uint
maxlength
)
uint
maxlength
)
{
{
uint
length
;
uint
length
;
byte
*
key
=
hash_key
(
hash
,
pos
->
data
,
&
length
,
0
);
byte
*
key
=
(
byte
*
)
hash_key
(
hash
,
pos
->
data
,
&
length
,
0
);
return
hash_mask
((
*
hash
->
calc_hashnr
)(
key
,
length
),
buffmax
,
maxlength
);
return
hash_mask
((
*
hash
->
calc_hashnr
)(
key
,
length
),
buffmax
,
maxlength
);
}
}
...
@@ -183,10 +188,10 @@ uint calc_hashnr_caseup(const byte *key, uint len)
...
@@ -183,10 +188,10 @@ uint calc_hashnr_caseup(const byte *key, uint len)
#ifndef __SUNPRO_C
/* SUNPRO can't handle this */
#ifndef __SUNPRO_C
/* SUNPRO can't handle this */
inline
inline
#endif
#endif
uint
rec_hashnr
(
HASH
*
hash
,
const
byte
*
record
)
u
nsigned
int
rec_hashnr
(
HASH
*
hash
,
const
byte
*
record
)
{
{
uint
length
;
uint
length
;
byte
*
key
=
hash_key
(
hash
,
record
,
&
length
,
0
);
byte
*
key
=
(
byte
*
)
hash_key
(
hash
,
record
,
&
length
,
0
);
return
(
*
hash
->
calc_hashnr
)(
key
,
length
);
return
(
*
hash
->
calc_hashnr
)(
key
,
length
);
}
}
...
@@ -273,7 +278,7 @@ static void movelink(HASH_LINK *array,uint find,uint next_link,uint newlink)
...
@@ -273,7 +278,7 @@ static void movelink(HASH_LINK *array,uint find,uint next_link,uint newlink)
static
int
hashcmp
(
HASH
*
hash
,
HASH_LINK
*
pos
,
const
byte
*
key
,
uint
length
)
static
int
hashcmp
(
HASH
*
hash
,
HASH_LINK
*
pos
,
const
byte
*
key
,
uint
length
)
{
{
uint
rec_keylength
;
uint
rec_keylength
;
byte
*
rec_key
=
hash_key
(
hash
,
pos
->
data
,
&
rec_keylength
,
1
);
byte
*
rec_key
=
(
byte
*
)
hash_key
(
hash
,
pos
->
data
,
&
rec_keylength
,
1
);
return
(
length
&&
length
!=
rec_keylength
)
||
return
(
length
&&
length
!=
rec_keylength
)
||
(
hash
->
flags
&
HASH_CASE_INSENSITIVE
?
(
hash
->
flags
&
HASH_CASE_INSENSITIVE
?
my_casecmp
(
rec_key
,
key
,
rec_keylength
)
:
my_casecmp
(
rec_key
,
key
,
rec_keylength
)
:
...
...
This diff is collapsed.
Click to expand it.
mysys/my_static.c
View file @
19351839
...
@@ -61,7 +61,7 @@ USED_MEM* my_once_root_block=0; /* pointer to first block */
...
@@ -61,7 +61,7 @@ USED_MEM* my_once_root_block=0; /* pointer to first block */
uint
my_once_extra
=
ONCE_ALLOC_INIT
;
/* Memory to alloc / block */
uint
my_once_extra
=
ONCE_ALLOC_INIT
;
/* Memory to alloc / block */
/* from my_tempnam */
/* from my_tempnam */
#if
ndef HAVE_TEMPNAM
#if
!defined(HAVE_TEMPNAM) || defined(HPUX11)
int
_my_tempnam_used
=
0
;
int
_my_tempnam_used
=
0
;
#endif
#endif
...
...
This diff is collapsed.
Click to expand it.
mysys/my_static.h
View file @
19351839
...
@@ -57,7 +57,7 @@ extern const char *soundex_map;
...
@@ -57,7 +57,7 @@ extern const char *soundex_map;
extern
USED_MEM
*
my_once_root_block
;
extern
USED_MEM
*
my_once_root_block
;
extern
uint
my_once_extra
;
extern
uint
my_once_extra
;
#if
ndef HAVE_TEMPNAM
#if
!defined(HAVE_TEMPNAM) || defined(HPUX11)
extern
int
_my_tempnam_used
;
extern
int
_my_tempnam_used
;
#endif
#endif
...
...
This diff is collapsed.
Click to expand it.
mysys/my_tempnam.c
View file @
19351839
...
@@ -24,6 +24,12 @@
...
@@ -24,6 +24,12 @@
#include "mysys_priv.h"
#include "mysys_priv.h"
#include <m_string.h>
#include <m_string.h>
/* HPUX 11.0 doesn't allow us to change the environ pointer */
#ifdef HPUX11
#undef HAVE_TEMPNAM
#endif
#include "my_static.h"
#include "my_static.h"
#include "mysys_err.h"
#include "mysys_err.h"
...
...
This diff is collapsed.
Click to expand it.
sql/sql_analyse.cc
View file @
19351839
...
@@ -641,7 +641,7 @@ bool analyse::end_of_records()
...
@@ -641,7 +641,7 @@ bool analyse::end_of_records()
case
FIELD_TYPE_DECIMAL
:
case
FIELD_TYPE_DECIMAL
:
ans
.
append
(
"DECIMAL"
,
7
);
ans
.
append
(
"DECIMAL"
,
7
);
// if item is FIELD_ITEM, it _must_be_ Field_num in this case
// if item is FIELD_ITEM, it _must_be_ Field_num in this case
if
(((
Field_num
*
)
(
*
f
)
->
item
)
->
zerofill
)
if
(((
Field_num
*
)
(
(
Item_field
*
)
(
*
f
)
->
item
)
->
field
)
->
zerofill
)
ans
.
append
(
" ZEROFILL"
);
ans
.
append
(
" ZEROFILL"
);
break
;
break
;
default:
default:
...
...
This diff is collapsed.
Click to expand it.
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