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
544f95c4
Commit
544f95c4
authored
Jun 02, 2002
by
monty@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Plain Diff
merge with 3.23
parents
44a631f1
5f93b1e4
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
43 additions
and
16 deletions
+43
-16
Docs/manual.texi
Docs/manual.texi
+16
-0
configure.in
configure.in
+4
-4
extra/resolveip.c
extra/resolveip.c
+1
-1
include/my_net.h
include/my_net.h
+1
-1
include/my_pthread.h
include/my_pthread.h
+1
-1
libmysql/libmysql.c
libmysql/libmysql.c
+5
-0
mysql-test/r/func_math.result
mysql-test/r/func_math.result
+2
-4
mysql-test/t/func_math.test
mysql-test/t/func_math.test
+1
-1
mysys/my_gethostbyname.c
mysys/my_gethostbyname.c
+1
-1
sql/ha_innodb.cc
sql/ha_innodb.cc
+1
-0
sql/item_func.cc
sql/item_func.cc
+6
-1
sql/mysqld.cc
sql/mysqld.cc
+1
-1
sql/sql_show.cc
sql/sql_show.cc
+3
-1
No files found.
Docs/manual.texi
View file @
544f95c4
...
...
@@ -31379,6 +31379,17 @@ mysql> SELECT 'David!' LIKE 'David_';
-> 1
mysql> SELECT 'David!' LIKE '%D%v%';
-> 1
mysql> select TRUNCATE(-1,999,1);
-> -1.9
@end example
Starting from MySQL 3.23.51 all numbers are rounded towards zero.
If @code{D} is negative, then the whole part of the number is zeroed out:
@example
mysql> select truncate(122,-2);
-> 100
@end example
To test for literal instances of a wildcard character, precede the character
...
...
@@ -47075,6 +47086,11 @@ the following things:
@itemize @bullet
@item
Cleaned up @code{NULL} handling for default values in @code{DESCRIBE
table_name}.
@item
Fixed @code{truncate()} to round up negative values to the nearest integer.
@item
Take down the @code{mysqld} daemon with @code{mysqladmin shutdown}, run
@code{myisamchk --silent --force */*.MYI} on all tables, and restart the
@code{mysqld} daemon. This will ensure that you are running from a clean
configure.in
View file @
544f95c4
...
...
@@ -1601,7 +1601,7 @@ then
fi
AC_TRY_COMPILE
(
[
#undef inline
#if !defined(SCO) && !defined(__osf__)
#if !defined(SCO) && !defined(__osf__)
&& !defined(_REENTRANT)
#define _REENTRANT
#endif
#include <pthread.h>
...
...
@@ -1634,7 +1634,7 @@ then
fi
AC_TRY_COMPILE
(
[
#undef inline
#if !defined(SCO) && !defined(__osf__)
#if !defined(SCO) && !defined(__osf__)
&& !defined(_REENTRANT)
#define _REENTRANT
#endif
#include <pthread.h>
...
...
@@ -1666,7 +1666,7 @@ then
fi
AC_TRY_COMPILE
(
[
#undef inline
#if !defined(SCO) && !defined(__osf__)
#if !defined(SCO) && !defined(__osf__)
&& !defined(_REENTRANT)
#define _REENTRANT
#endif
#include <pthread.h>
...
...
@@ -1692,7 +1692,7 @@ then
# Check definition of pthread_getspecific
AC_CACHE_CHECK
(
"args to pthread_getspecific"
, mysql_cv_getspecific_args,
AC_TRY_COMPILE
(
[
#if !defined(SCO) && !defined(__osf__)
[
#if !defined(SCO) && !defined(__osf__)
&& !defined(_REENTRANT)
#define _REENTRANT
#endif
#define _POSIX_PTHREAD_SEMANTICS
...
...
extra/resolveip.c
View file @
544f95c4
...
...
@@ -20,7 +20,6 @@
#include <my_global.h>
#include <m_ctype.h>
#include <my_net.h>
#include <my_sys.h>
#include <m_string.h>
#include <sys/types.h>
...
...
@@ -30,6 +29,7 @@
#endif
#include <arpa/inet.h>
#include <netdb.h>
#include <my_net.h>
#include <my_getopt.h>
#if !defined(_AIX) && !defined(HAVE_UNIXWARE7_THREADS) && !defined(HAVE_UNIXWARE7_POSIX) && !defined(h_errno)
...
...
include/my_net.h
View file @
544f95c4
...
...
@@ -84,7 +84,7 @@ struct hostent *my_gethostbyname_r(const char *name,
struct
hostent
*
result
,
char
*
buffer
,
int
buflen
,
int
*
h_errnop
);
#define my_gethostbyname_r_free()
#if !defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE)
#if !defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE)
&& !defined(HPUX)
#define GETHOSTBYNAME_BUFF_SIZE sizeof(struct hostent_data)
#endif
/* !defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE) */
...
...
include/my_pthread.h
View file @
544f95c4
...
...
@@ -349,7 +349,7 @@ extern void my_pthread_attr_setprio(pthread_attr_t *attr, int priority);
#undef HAVE_GETHOSTBYADDR_R
/* No definition */
#endif
#if defined(HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT)
#if defined(HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT)
&& !defined(SAFE_MUTEX)
extern
int
my_pthread_cond_timedwait
(
pthread_cond_t
*
cond
,
pthread_mutex_t
*
mutex
,
struct
timespec
*
abstime
);
...
...
libmysql/libmysql.c
View file @
544f95c4
...
...
@@ -217,8 +217,13 @@ int my_connect(my_socket s, const struct sockaddr *name, uint namelen,
{
tv
.
tv_sec
=
(
long
)
timeout
;
tv
.
tv_usec
=
0
;
#if defined(HPUX) && defined(THREAD)
if
((
res
=
select
(
s
+
1
,
NULL
,
(
int
*
)
&
sfds
,
NULL
,
&
tv
))
>=
0
)
break
;
#else
if
((
res
=
select
(
s
+
1
,
NULL
,
&
sfds
,
NULL
,
&
tv
))
>=
0
)
break
;
#endif
now_time
=
time
(
NULL
);
timeout
-=
(
uint
)
(
now_time
-
start_time
);
if
(
errno
!=
EINTR
||
(
int
)
timeout
<=
0
)
...
...
mysql-test/r/func_math.result
View file @
544f95c4
...
...
@@ -4,10 +4,8 @@ floor(5.5) floor(-5.5)
select ceiling(5.5),ceiling(-5.5);
ceiling(5.5) ceiling(-5.5)
6 -5
select truncate(52.64,1),truncate(52.64,2),truncate(52.64,-1),truncate(52.64,-2);
truncate(52.64,1) truncate(52.64,2) truncate(52.64,-1) truncate(52.64,-2)
52.6 52.64 50 0
select round(5.5),round(-5.5);
truncate(52.64,1) truncate(52.64,2) truncate(52.64,-1) truncate(52.64,-2) truncate(-52.64,1) truncate(-52.64,-1)
52.6 52.64 50 0 -52.6 -50
round(5.5) round(-5.5)
6 -6
select round(5.64,1),round(5.64,2),round(5.64,-1),round(5.64,-2);
...
...
mysql-test/t/func_math.test
View file @
544f95c4
...
...
@@ -4,7 +4,7 @@
select
floor
(
5.5
),
floor
(
-
5.5
);
select
ceiling
(
5.5
),
ceiling
(
-
5.5
);
select
truncate
(
52.64
,
1
),
truncate
(
52.64
,
2
),
truncate
(
52.64
,
-
1
),
truncate
(
52.64
,
-
2
);
select
truncate
(
52.64
,
1
),
truncate
(
52.64
,
2
),
truncate
(
52.64
,
-
1
),
truncate
(
52.64
,
-
2
)
,
truncate
(
-
52.64
,
1
),
truncate
(
-
52.64
,
-
1
)
;
select
round
(
5.5
),
round
(
-
5.5
);
select
round
(
5.64
,
1
),
round
(
5.64
,
2
),
round
(
5.64
,
-
1
),
round
(
5.64
,
-
2
);
select
abs
(
-
10
),
sign
(
-
5
),
sign
(
5
),
sign
(
0
);
...
...
mysys/my_gethostbyname.c
View file @
544f95c4
...
...
@@ -20,10 +20,10 @@
#include "mysys_priv.h"
#include "my_pthread.h"
#include <assert.h>
#include <my_net.h>
#if !defined(MSDOS) && !defined(__WIN__)
#include <netdb.h>
#endif
#include <my_net.h>
/* This file is not needed if my_gethostbyname_r is a macro */
#if !defined(my_gethostbyname_r)
...
...
sql/ha_innodb.cc
View file @
544f95c4
...
...
@@ -655,6 +655,7 @@ innobase_close_connection(
(
thd
->
transaction
.
all
.
innobase_tid
));
trx_free_for_mysql
((
trx_t
*
)
(
thd
->
transaction
.
all
.
innobase_tid
));
thd
->
transaction
.
all
.
innobase_tid
=
NULL
;
}
return
(
0
);
...
...
sql/item_func.cc
View file @
544f95c4
...
...
@@ -627,7 +627,12 @@ double Item_func_round::val()
log_10
[
abs_dec
]
:
pow
(
10.0
,(
double
)
abs_dec
));
if
(
truncate
)
return
dec
<
0
?
floor
(
value
/
tmp
)
*
tmp
:
floor
(
value
*
tmp
)
/
tmp
;
{
if
(
value
>=
0
)
return
dec
<
0
?
floor
(
value
/
tmp
)
*
tmp
:
floor
(
value
*
tmp
)
/
tmp
;
else
return
dec
<
0
?
ceil
(
value
/
tmp
)
*
tmp
:
ceil
(
value
*
tmp
)
/
tmp
;
}
return
dec
<
0
?
rint
(
value
/
tmp
)
*
tmp
:
rint
(
value
*
tmp
)
/
tmp
;
}
...
...
sql/mysqld.cc
View file @
544f95c4
...
...
@@ -2407,7 +2407,7 @@ static void create_new_thread(THD *thd)
inline
void
kill_broken_server
()
{
/* hack to get around signals ignored in syscalls for problem OS's */
if
(
unix_sock
==
INVALID_SOCKET
||
ip_sock
==
INVALID_SOCKET
)
if
(
unix_sock
==
INVALID_SOCKET
||
(
!
opt_disable_networking
&&
ip_sock
==
INVALID_SOCKET
)
)
{
select_thread_in_use
=
0
;
kill_server
((
void
*
)
MYSQL_KILL_SIGNAL
);
/* never returns */
...
...
sql/sql_show.cc
View file @
544f95c4
...
...
@@ -432,6 +432,7 @@ mysqld_show_fields(THD *thd, TABLE_LIST *table_list,const char *wild,
TABLE
*
table
;
handler
*
file
;
char
tmp
[
MAX_FIELD_WIDTH
];
Item
*
item
;
CONVERT
*
convert
=
thd
->
convert_set
;
DBUG_ENTER
(
"mysqld_show_fields"
);
DBUG_PRINT
(
"enter"
,(
"db: %s table: %s"
,
table_list
->
db
,
...
...
@@ -451,7 +452,8 @@ mysqld_show_fields(THD *thd, TABLE_LIST *table_list,const char *wild,
field_list
.
push_back
(
new
Item_empty_string
(
"Type"
,
40
));
field_list
.
push_back
(
new
Item_empty_string
(
"Null"
,
1
));
field_list
.
push_back
(
new
Item_empty_string
(
"Key"
,
3
));
field_list
.
push_back
(
new
Item_empty_string
(
"Default"
,
NAME_LEN
));
field_list
.
push_back
(
item
=
new
Item_empty_string
(
"Default"
,
NAME_LEN
));
item
->
maybe_null
=
1
;
field_list
.
push_back
(
new
Item_empty_string
(
"Extra"
,
20
));
if
(
verbose
)
field_list
.
push_back
(
new
Item_empty_string
(
"Privileges"
,
80
));
...
...
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