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
e05df20d
Commit
e05df20d
authored
Jan 01, 2001
by
monty@donna.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed gethostname_r tests to be more portable
parent
336019a5
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
46 additions
and
37 deletions
+46
-37
BUILD/FINISH.sh
BUILD/FINISH.sh
+3
-2
Docs/manual.texi
Docs/manual.texi
+8
-0
acconfig.h
acconfig.h
+4
-4
configure.in
configure.in
+2
-7
include/my_pthread.h
include/my_pthread.h
+10
-8
mysql-test/r/func_str.result
mysql-test/r/func_str.result
+0
-3
mysql-test/r/func_timestamp.result
mysql-test/r/func_timestamp.result
+3
-0
mysql-test/t/func_str.test
mysql-test/t/func_str.test
+0
-9
mysql-test/t/func_timestamp.test
mysql-test/t/func_timestamp.test
+12
-0
mysql-test/t/order_by.test
mysql-test/t/order_by.test
+1
-1
mysys/my_pthread.c
mysys/my_pthread.c
+2
-2
sql/sql_parse.cc
sql/sql_parse.cc
+1
-1
No files found.
BUILD/FINISH.sh
View file @
e05df20d
...
...
@@ -14,7 +14,8 @@ fi
$make
$AM_MAKEFLAGS
if
[
"x
$strip
"
=
"xyes"
]
;
then
nm
--numeric-sort
sql/mysqld
>
mysqld.sym
objdump
-d
sql/mysqld
>
mysqld.S
mkdir
-p
tmp
nm
--numeric-sort
sql/mysqld
>
tmp/mysqld.sym
objdump
-d
sql/mysqld
>
tmp/mysqld.S
strip sql/mysqld
fi
Docs/manual.texi
View file @
e05df20d
...
...
@@ -18274,6 +18274,9 @@ exist.
@code{RESTRICT} and @code{CASCADE} are allowed to make porting easier.
For the moment they don't do anything.
@strong{NOTE}: @code{DROP TABLE} is not transaction safe and will
automaticly commit any active transactions.
@cindex tables, defragment
@cindex tables, fragmentation
@findex OPTIMIZE TABLE
...
...
@@ -21276,6 +21279,9 @@ You can also lock all tables in all databases with read locks with the
convinient way to get backups if you have a file system, like Veritas,
that can take snapshots in time.
@strong{NOTE}: @code{LOCK TABLES} is not transaction safe and will
automaticly commit any active transactions before attempting to lock the
tables.
@findex SET OPTION
@node SET OPTION, GRANT, LOCK TABLES, Reference
...
...
@@ -40018,6 +40024,8 @@ though, so Version 3.23 is not released as a stable version yet.
@appendixsubsec Changes in release 3.23.30
@itemize @bullet
@item
@code{LOCK TABLES} will now automaticly start a new transaction.
@item
Changed BDB tables to not use internal subtransactions and reuse open files to
get more speed.
@item
acconfig.h
View file @
e05df20d
...
...
@@ -68,12 +68,12 @@
/* READLINE: */
#undef HAVE_GETPW_DECLS
/* In OSF 4.0f the 3'd argument to gethostname_r is hostent_data * */
#undef HAVE_GETHOSTBYNAME_R_WITH_HOSTENT_DATA
/* Solaris define gethostbyname_r with 5 arguments. glibc2 defines
this with 6 arguments */
#undef HAVE_GLIBC2_STYLE_GETHOSTBYNAME_R
#undef HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE
/* In OSF 4.0f the 3'd argument to gethostname_r is hostent_data * */
#undef HAVE_GETHOSTBYNAME_R_RETURN_INT
/* Define if int8, int16 and int32 types exist */
#undef HAVE_INT_8_16_32
...
...
configure.in
View file @
e05df20d
...
...
@@ -728,11 +728,6 @@ case $SYSTEM_TYPE in
fi
CXXFLAGS
=
"-D_BOOL"
;;
*
dec-osf4
*
)
echo
"Adding fix to not use gethostbyname_r"
CFLAGS
=
"
$CFLAGS
-DUNDEF_HAVE_GETHOSTBYNAME_R"
CXXFLAGS
=
"
$CXXFLAGS
-DUNDEF_HAVE_GETHOSTBYNAME_R"
;;
*
aix4.3
*
)
echo
"Adding defines for AIX"
CFLAGS
=
"
$CFLAGS
-Wa,-many -DUNDEF_HAVE_INITGROUPS"
...
...
@@ -1341,7 +1336,7 @@ AC_LANG_RESTORE
CXXFLAGS="$ac_save_CXXFLAGS"
if test "$mysql_cv_gethostname_style" = "glibc2"
then
AC_DEFINE(HAVE_G
LIBC2_STYLE_GETHOSTBYNAME_R
)
AC_DEFINE(HAVE_G
ETHOSTBYNAME_R_GLIBC2_STYLE
)
fi
# Check 3rd argument of getthostbyname_r
...
...
@@ -1371,7 +1366,7 @@ AC_LANG_RESTORE
CXXFLAGS="$ac_save_CXXFLAGS"
if test "$mysql_cv_gethostname_arg" = "hostent_data"
then
AC_DEFINE(HAVE_GETHOSTBYNAME_R_
WITH_HOSTENT_DATA
)
AC_DEFINE(HAVE_GETHOSTBYNAME_R_
RETURN_INT
)
fi
...
...
include/my_pthread.h
View file @
e05df20d
...
...
@@ -234,7 +234,7 @@ extern int my_pthread_create_detached;
#define HAVE_LOCALTIME_R
#undef HAVE_PTHREAD_ATTR_SETSCOPE
#define HAVE_PTHREAD_ATTR_SETSCOPE
#undef HAVE_G
LIBC2_STYLE_GETHOSTBYNAME_R
/* If we are running linux */
#undef HAVE_G
ETHOSTBYNAME_R_GLIBC2_STYLE
/* If we are running linux */
#undef HAVE_RWLOCK_T
#undef HAVE_RWLOCK_INIT
#undef HAVE_PTHREAD_RWLOCK_RDLOCK
...
...
@@ -378,28 +378,30 @@ struct tm *localtime_r(const time_t *clock, struct tm *res);
#define HAVE_PTHREAD_KILL
#endif
#if defined(HAVE_PTHREAD_ATTR_CREATE) || defined(_AIX) || defined(HAVE_G
LIBC2_STYLE_GETHOSTBYNAME_R
)
#if defined(HAVE_PTHREAD_ATTR_CREATE) || defined(_AIX) || defined(HAVE_G
ETHOSTBYNAME_R_GLIBC2_STYLE
)
#if !defined(HPUX)
struct
hostent
;
#endif
/* HPUX */
struct
hostent
*
my_gethostbyname_r
(
const
char
*
name
,
struct
hostent
*
result
,
char
*
buffer
,
int
buflen
,
int
*
h_errnop
);
#if defined(HAVE_G
LIBC2_STYLE_GETHOSTBYNAME_R
)
#if defined(HAVE_G
ETHOSTBYNAME_R_GLIBC2_STYLE
)
#define GETHOSTBYNAME_BUFF_SIZE 2048
#else
#define GETHOSTBYNAME_BUFF_SIZE sizeof(struct hostent_data)
#endif
/* defined(HAVE_G
LIBC2_STYLE_GETHOSTBYNAME_R
) */
#endif
/* defined(HAVE_G
ETHOSTBYNAME_R_GLIBC2_STYLE
) */
#else
#ifdef HAVE_GETHOSTBYNAME_R_
WITH_HOSTENT_DATA
#ifdef HAVE_GETHOSTBYNAME_R_
RETURN_INT
#define GETHOSTBYNAME_BUFF_SIZE sizeof(struct hostent_data)
#define my_gethostbyname_r(A,B,C,D,E) gethostbyname_r((A),(B),(struct hostent_data*) (C))
struct
hostent
*
my_gethostbyname_r
(
const
char
*
name
,
struct
hostent
*
result
,
char
*
buffer
,
int
buflen
,
int
*
h_errnop
);
#else
#define GETHOSTBYNAME_BUFF_SIZE 2048
#define my_gethostbyname_r(A,B,C,D,E) gethostbyname_r((A),(B),(C),(D),(E))
#endif
/* HAVE_GETHOSTBYNAME_R_
WITH_HOSTENT_DATA
*/
#endif
/* defined(HAVE_PTHREAD_ATTR_CREATE) || defined(_AIX) || defined(HAVE_G
LIBC2_STYLE_GETHOSTBYNAME_R
) */
#endif
/* HAVE_GETHOSTBYNAME_R_
RETURN_INT
*/
#endif
/* defined(HAVE_PTHREAD_ATTR_CREATE) || defined(_AIX) || defined(HAVE_G
ETHOSTBYNAME_R_GLIBC2_STYLE
) */
#endif
/* defined(__WIN__) */
...
...
mysql-test/r/func_str.result
View file @
e05df20d
...
...
@@ -90,9 +90,6 @@ length(repeat("a",65500)) length(concat(repeat("a",32000),repeat("a",32000))) le
65500 64000 50000 60000
length(repeat("a",1000000)) length(concat(repeat("a",32000),repeat("a",32000),repeat("a",32000))) length(replace("aaaaa","a",concat(repeat("a",32000)))) length(insert(repeat("a",48000),1,1000,repeat("a",48000)))
1000000 96000 160000 95000
Date Unix
1998-9-16 09:26:00 905927160
1998-9-16 09:26:00 905927160
domain
hello.de
domain
...
...
mysql-test/r/func_timestamp.result
0 → 100644
View file @
e05df20d
Date Unix
1998-9-16 09:26:00 905927160
1998-9-16 09:26:00 905927160
mysql-test/t/func_str.test
View file @
e05df20d
...
...
@@ -64,15 +64,6 @@ select length(repeat("a",1000000)),length(concat(repeat("a",32000),repeat("a",32
# Problem med concat
#
drop
table
if
exists
t1
;
create
table
t1
(
Zeit
time
,
Tag
tinyint
not
null
,
Monat
tinyint
not
null
,
Jahr
smallint
not
null
,
index
(
Tag
),
index
(
Monat
),
index
(
Jahr
)
);
insert
into
t1
values
(
"09:26:00"
,
16
,
9
,
1998
);
insert
into
t1
values
(
"09:26:00"
,
16
,
9
,
1998
);
SELECT
CONCAT
(
Jahr
,
'-'
,
Monat
,
'-'
,
Tag
,
' '
,
Zeit
)
AS
Date
,
UNIX_TIMESTAMP
(
CONCAT
(
Jahr
,
'-'
,
Monat
,
'-'
,
Tag
,
' '
,
Zeit
))
AS
Unix
FROM
t1
;
drop
table
t1
;
create
table
t1
(
domain
char
(
50
)
);
insert
into
t1
VALUES
(
"hello.de"
),
(
"test.de"
);
select
domain
from
t1
where
concat
(
'@'
,
trim
(
leading
'.'
from
concat
(
'.'
,
domain
)))
=
'@hello.de'
;
...
...
mysql-test/t/func_timestamp.test
0 → 100644
View file @
e05df20d
#
# Tests that depend on the timestamp and the TZ variable
#
drop
table
if
exists
t1
;
create
table
t1
(
Zeit
time
,
Tag
tinyint
not
null
,
Monat
tinyint
not
null
,
Jahr
smallint
not
null
,
index
(
Tag
),
index
(
Monat
),
index
(
Jahr
)
);
insert
into
t1
values
(
"09:26:00"
,
16
,
9
,
1998
),(
"09:26:00"
,
16
,
9
,
1998
);
SELECT
CONCAT
(
Jahr
,
'-'
,
Monat
,
'-'
,
Tag
,
' '
,
Zeit
)
AS
Date
,
UNIX_TIMESTAMP
(
CONCAT
(
Jahr
,
'-'
,
Monat
,
'-'
,
Tag
,
' '
,
Zeit
))
AS
Unix
FROM
t1
;
drop
table
t1
;
mysql-test/t/order_by.test
View file @
e05df20d
...
...
@@ -74,7 +74,7 @@ select distinct i from t1;
select
distinct
i
from
t1
order
by
rand
(
5
);
select
distinct
i
from
t1
order
by
i
desc
;
select
distinct
i
from
t1
order
by
1
-
i
;
select
distinct
i
from
t1
order
by
mod
(
i
,
2
);
select
distinct
i
from
t1
order
by
mod
(
i
,
2
)
,
i
;
drop
table
t1
;
#
...
...
mysys/my_pthread.c
View file @
e05df20d
...
...
@@ -417,7 +417,7 @@ int my_pthread_cond_init(pthread_cond_t *mp, const pthread_condattr_t *attr)
#if !defined(my_gethostbyname_r) && defined(HAVE_GETHOSTBYNAME_R)
#if defined(HAVE_G
LIBC2_STYLE_GETHOSTBYNAME_R
)
#if defined(HAVE_G
ETHOSTBYNAME_R_GLIBC2_STYLE
)
struct
hostent
*
my_gethostbyname_r
(
const
char
*
name
,
struct
hostent
*
result
,
char
*
buffer
,
...
...
@@ -430,7 +430,7 @@ struct hostent *my_gethostbyname_r(const char *name,
return
hp
;
}
#elif defined(
_HPUX_SOURCE) || (defined(_AIX) && !defined(_AIX32_THREADS)
)
#elif defined(
HAVE_GETHOSTBYNAME_R_RETURN_INT
)
struct
hostent
*
my_gethostbyname_r
(
const
char
*
name
,
struct
hostent
*
result
,
char
*
buffer
,
...
...
sql/sql_parse.cc
View file @
e05df20d
...
...
@@ -1652,7 +1652,7 @@ mysql_execute_command(void)
thd
->
locked_tables
=
0
;
// Will be automaticly closed
close_thread_tables
(
thd
);
}
if
(
check_db_used
(
thd
,
tables
))
if
(
check_db_used
(
thd
,
tables
)
||
end_active_trans
(
thd
)
)
goto
error
;
thd
->
in_lock_tables
=
1
;
if
(
!
(
res
=
open_and_lock_tables
(
thd
,
tables
)))
...
...
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