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
01cda092
Commit
01cda092
authored
Jul 18, 2001
by
monty@work.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
66ab2056
40aa7c6d
Changes
70
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
70 changed files
with
1289 additions
and
435 deletions
+1289
-435
Docs/manual.texi
Docs/manual.texi
+142
-38
bdb/include/db.src
bdb/include/db.src
+1
-0
configure.in
configure.in
+22
-8
include/thr_lock.h
include/thr_lock.h
+1
-0
mit-pthreads/gen/ctime.c
mit-pthreads/gen/ctime.c
+1
-1
mit-pthreads/machdep/netbsd-1.1/__signal.h
mit-pthreads/machdep/netbsd-1.1/__signal.h
+7
-0
mit-pthreads/stdio/strerror.c
mit-pthreads/stdio/strerror.c
+6
-1
myisam/mi_check.c
myisam/mi_check.c
+15
-1
myisam/myisamchk.c
myisam/myisamchk.c
+1
-1
mysql-test/r/auto_increment.result
mysql-test/r/auto_increment.result
+5
-0
mysql-test/r/bdb.result
mysql-test/r/bdb.result
+11
-0
mysql-test/r/limit.result
mysql-test/r/limit.result
+3
-0
mysql-test/r/lock.result
mysql-test/r/lock.result
+4
-0
mysql-test/r/rpl_mystery22.result
mysql-test/r/rpl_mystery22.result
+4
-0
mysql-test/r/rpl_sporadic_master.result
mysql-test/r/rpl_sporadic_master.result
+6
-6
mysql-test/t/auto_increment.test
mysql-test/t/auto_increment.test
+11
-0
mysql-test/t/bdb.test
mysql-test/t/bdb.test
+15
-0
mysql-test/t/limit.test
mysql-test/t/limit.test
+11
-0
mysql-test/t/lock.test
mysql-test/t/lock.test
+42
-0
mysql-test/t/rpl_mystery22.test
mysql-test/t/rpl_mystery22.test
+43
-0
mysql-test/t/rpl_sporadic_master.test
mysql-test/t/rpl_sporadic_master.test
+15
-6
mysys/thr_lock.c
mysys/thr_lock.c
+25
-20
sql-bench/Results/ATIS-mysql-Linux_2.2.16_SMP_alpha
sql-bench/Results/ATIS-mysql-Linux_2.2.16_SMP_alpha
+10
-10
sql-bench/Results/RUN-mysql-Linux_2.2.16_SMP_alpha
sql-bench/Results/RUN-mysql-Linux_2.2.16_SMP_alpha
+92
-91
sql-bench/Results/alter-table-mysql-Linux_2.2.16_SMP_alpha
sql-bench/Results/alter-table-mysql-Linux_2.2.16_SMP_alpha
+5
-5
sql-bench/Results/big-tables-mysql-Linux_2.2.16_SMP_alpha
sql-bench/Results/big-tables-mysql-Linux_2.2.16_SMP_alpha
+6
-6
sql-bench/Results/connect-mysql-Linux_2.2.16_SMP_alpha
sql-bench/Results/connect-mysql-Linux_2.2.16_SMP_alpha
+10
-10
sql-bench/Results/create-mysql-Linux_2.2.16_SMP_alpha
sql-bench/Results/create-mysql-Linux_2.2.16_SMP_alpha
+7
-7
sql-bench/Results/insert-mysql-Linux_2.2.16_SMP_alpha
sql-bench/Results/insert-mysql-Linux_2.2.16_SMP_alpha
+49
-49
sql-bench/Results/select-mysql-Linux_2.2.16_SMP_alpha
sql-bench/Results/select-mysql-Linux_2.2.16_SMP_alpha
+17
-17
sql-bench/Results/wisconsin-mysql-Linux_2.2.16_SMP_alpha
sql-bench/Results/wisconsin-mysql-Linux_2.2.16_SMP_alpha
+5
-5
sql/ha_berkeley.cc
sql/ha_berkeley.cc
+14
-5
sql/ha_gemini.cc
sql/ha_gemini.cc
+3
-2
sql/ha_gemini.h
sql/ha_gemini.h
+1
-1
sql/ha_innobase.cc
sql/ha_innobase.cc
+45
-0
sql/ha_innobase.h
sql/ha_innobase.h
+1
-0
sql/mysqld.cc
sql/mysqld.cc
+5
-0
sql/slave.cc
sql/slave.cc
+3
-0
sql/slave.h
sql/slave.h
+4
-0
sql/sql_acl.cc
sql/sql_acl.cc
+3
-4
sql/sql_delete.cc
sql/sql_delete.cc
+4
-3
sql/sql_insert.cc
sql/sql_insert.cc
+1
-0
sql/sql_parse.cc
sql/sql_parse.cc
+1
-1
sql/sql_show.cc
sql/sql_show.cc
+1
-1
sql/sql_update.cc
sql/sql_update.cc
+2
-1
support-files/debian/README.debian
support-files/debian/README.debian
+9
-0
support-files/debian/changelog
support-files/debian/changelog
+135
-2
support-files/debian/control
support-files/debian/control
+54
-13
support-files/debian/gomi
support-files/debian/gomi
+5
-4
support-files/debian/libmysqlclient10.dirs
support-files/debian/libmysqlclient10.dirs
+1
-0
support-files/debian/libmysqlclient10.postinst
support-files/debian/libmysqlclient10.postinst
+3
-0
support-files/debian/move
support-files/debian/move
+15
-6
support-files/debian/mysql-max-debug.dirs
support-files/debian/mysql-max-debug.dirs
+1
-0
support-files/debian/mysql-max-debug.postinst
support-files/debian/mysql-max-debug.postinst
+3
-0
support-files/debian/mysql-max-debug.postrm
support-files/debian/mysql-max-debug.postrm
+3
-0
support-files/debian/mysql-max-shared.dirs
support-files/debian/mysql-max-shared.dirs
+1
-0
support-files/debian/mysql-max-shared.postinst
support-files/debian/mysql-max-shared.postinst
+3
-0
support-files/debian/mysql-max-shared.postrm
support-files/debian/mysql-max-shared.postrm
+3
-0
support-files/debian/mysql-max.dirs
support-files/debian/mysql-max.dirs
+1
-0
support-files/debian/mysql-max.postinst
support-files/debian/mysql-max.postinst
+3
-0
support-files/debian/mysql-max.postrm
support-files/debian/mysql-max.postrm
+3
-0
support-files/debian/patches/ab
support-files/debian/patches/ab
+11
-20
support-files/debian/patches/ad
support-files/debian/patches/ad
+6
-47
support-files/debian/patches/ae
support-files/debian/patches/ae
+21
-27
support-files/debian/patches/ta
support-files/debian/patches/ta
+68
-0
support-files/debian/patches/tb
support-files/debian/patches/tb
+86
-0
support-files/debian/rules
support-files/debian/rules
+72
-9
support-files/debian/shlibs
support-files/debian/shlibs
+1
-1
tests/fork2_test.pl
tests/fork2_test.pl
+33
-2
tests/fork_big.pl
tests/fork_big.pl
+68
-4
No files found.
Docs/manual.texi
View file @
01cda092
This diff is collapsed.
Click to expand it.
bdb/include/db.src
View file @
01cda092
...
...
@@ -119,6 +119,7 @@ struct __db_dbt {
u_int32_t dlen; /* RO: get/put record length. */
u_int32_t doff; /* RO: get/put record offset. */
void *app_private; /* Application-private handle. */
#define DB_DBT_ISSET 0x001 /* Lower level calls set value. */
#define DB_DBT_MALLOC 0x002 /* Return in malloc'd memory. */
#define DB_DBT_PARTIAL 0x004 /* Partial put/get. */
...
...
configure.in
View file @
01cda092
...
...
@@ -629,7 +629,10 @@ struct request_info *req;
AC_MSG_RESULT
(
yes
)
AC_DEFINE
(
LIBWRAP
)
AC_DEFINE
(
HAVE_LIBWRAP
)
WRAPLIBS
=
"-L
$with_libwrap
/lib -lwrap"
,
if
test
"
$with_libwrap
"
!=
"yes"
;
then
WRAPLIBS
=
"-L
${
with_libwrap
}
/lib"
fi
WRAPLIBS
=
"
${
WRAPLIBS
}
-lwrap"
,
AC_MSG_RESULT
(
no
)
CPPFLAGS
=
${
_cppflags
}
LDFLAGS
=
${
_ldflags
}
)
,
CPPFLAGS
=
${
_cppflags
}
LDFLAGS
=
${
_ldflags
}
)
...
...
@@ -831,6 +834,12 @@ case $SYSTEM_TYPE in
echo
"Adding fix for interrupted reads"
CXXFLAGS
=
"
$CXXFLAGS
-DMYSQLD_NET_RETRY_COUNT=1000000"
;;
*
netbsd
*
)
echo
"Adding flag -Dunix"
CFLAGS
=
"
$CFLAGS
-Dunix"
CXXFLAGS
=
"
$CXXFLAGS
-Dunix"
OVERRIDE_MT_LD_ADD
=
"
\$
(top_srcdir)/mit-pthreads/obj/libpthread.a"
;;
*
bsdi
*
)
echo
"Adding fix for BSDI"
CFLAGS
=
"
$CFLAGS
-D__BSD__ -DHAVE_BROKEN_REALPATH"
...
...
@@ -1155,10 +1164,10 @@ if test "$ac_cv_lib_pthread_strtok_r" = "no"
then
my_save_LIBS
=
"
$LIBS
"
AC_CHECK_LIB
(
c_r,strtok_r
)
if
test
"
$with_osf32_threads
"
=
"yes"
-o
"
$target_os
"
=
"FreeBSD"
-o
"
$target_os
"
=
"freebsd"
then
LIBS
=
"
$my_save_LIBS
"
fi
case
"
$with_osf32_threads
---
$target_os
"
in
# Don't keep -lc_r in LIBS; -pthread handles it magically
yes---
*
|
*
---freebsd
*
)
LIBS
=
"
$my_save_LIBS
"
;;
esac
AC_CHECK_FUNCS
(
strtok_r pthread_init
)
else
AC_CHECK_FUNCS
(
strtok_r
)
...
...
@@ -2058,7 +2067,7 @@ and GNU make work together causes some files to depend on this
header, even if we're not building with Berkeley DB.
Obviously, if this file *is* used, it'll break and hopefully we can find
out why this file was generated by
$
(
top_srcdir
)
/configure instead of
out why this file was generated by
$
{
top_srcdir
}
/configure instead of
the real db.h.
If you run into some problems because of this file, please use mysql_bug
...
...
@@ -2099,15 +2108,20 @@ EOF
AC_DEFINE
(
HAVE_mit_thread
)
MT_INCLUDES
=
"-I
\$
(top_srcdir)/mit-pthreads/include"
AC_SUBST
(
MT_INCLUDES
)
if
test
-n
"
$OVERRIDE_MT_LD_ADD
"
then
MT_LD_ADD
=
"
$OVERRIDE_MT_LD_ADD
"
else
MT_LD_ADD
=
"-L
\$
(top_srcdir)/mit-pthreads/obj/ -lpthread"
fi
AC_SUBST
(
MT_LD_ADD
)
LIBS
=
"
$MT_LD_ADD
$LIBS
"
echo
""
echo
"Configuring MIT Pthreads"
# We will never install so installation paths are not needed.
(
cd
mit-pthreads
;
sh ./configure
)
echo
"End of MIT Pthreads configuration"
echo
""
LIBS
=
"
$MT_LD_ADD
$LIBS
"
fi
fi
AC_SUBST
(
sql_server_dirs
)
...
...
include/thr_lock.h
View file @
01cda092
...
...
@@ -65,6 +65,7 @@ enum thr_lock_type { TL_IGNORE=-1,
extern
ulong
max_write_lock_count
;
extern
my_bool
thr_lock_inited
;
extern
enum
thr_lock_type
thr_upgraded_concurrent_insert_lock
;
typedef
struct
st_thr_lock_data
{
pthread_t
thread
;
...
...
mit-pthreads/gen/ctime.c
View file @
01cda092
...
...
@@ -177,7 +177,7 @@ time_t altzone = 0;
static
int
detzcode
(
const
char
*
codep
)
{
long
result
;
int
result
;
int
i
;
result
=
0
;
...
...
mit-pthreads/machdep/netbsd-1.1/__signal.h
View file @
01cda092
#include <sys/signal.h>
__BEGIN_DECLS
#if NSIG <= 32
#define __SIGEMPTYSET 0
#define __SIGFILLSET 0xffffffff
...
...
@@ -8,6 +10,9 @@
#define __SIGISMEMBER(s, n) ((*(s) & (1 << ((n) - 1))) != 0)
#else
/* XXX Netbsd >= 1.3H */
int
sigaction
__P_
((
int
,
const
struct
sigaction
*
,
struct
sigaction
*
))
__RENAME
(
__sigaction14
);
#define __SIGEMPTYSET { 0, 0, 0, 0}
#define __SIGFILLSET { 0xffffffff, 0xffffffff, \
0xffffffff, 0xffffffff }
...
...
@@ -18,3 +23,5 @@
#define __SIGISMEMBER(s, n) (((s)->__bits[__SIGWORD(n)] & __SIGMASK(n)) != 0)
#endif
__END_DECLS
mit-pthreads/stdio/strerror.c
View file @
01cda092
...
...
@@ -36,13 +36,18 @@ static char sccsid[] = "@(#)strerror.c 5.6 (Berkeley) 5/4/91";
#endif
/* LIBC_SCCS and not lint */
#include <string.h>
#if defined(__NetBSD__)
#include <errno.h>
#endif
char
*
strerror
(
num
)
int
num
;
{
#if !defined(__NetBSD__)
extern
int
sys_nerr
;
extern
char
*
sys_errlist
[];
#endif
#define UPREFIX "Unknown error: "
static
char
ebuf
[
40
]
=
UPREFIX
;
/* 64-bit number + slop */
register
unsigned
int
errnum
;
...
...
@@ -51,7 +56,7 @@ strerror(num)
errnum
=
num
;
/* convert to unsigned */
if
(
errnum
<
sys_nerr
)
return
(
sys_errlist
[
errnum
]);
return
(
(
char
*
)
sys_errlist
[
errnum
]);
/* Do this by hand, so we don't include stdio(3). */
t
=
tmp
;
...
...
myisam/mi_check.c
View file @
01cda092
...
...
@@ -434,9 +434,9 @@ int chk_key(MI_CHECK *param, register MI_INFO *info)
}
else
full_text_keys
++
;
/* Check that auto_increment key is bigger than max key value */
if
((
uint
)
share
->
base
.
auto_key
-
1
==
key
)
{
/* Check that auto_increment key is bigger than max key value */
ulonglong
save_auto_value
=
info
->
s
->
state
.
auto_increment
;
info
->
s
->
state
.
auto_increment
=
0
;
info
->
lastinx
=
key
;
...
...
@@ -456,6 +456,20 @@ int chk_key(MI_CHECK *param, register MI_INFO *info)
}
else
info
->
s
->
state
.
auto_increment
=
save_auto_value
;
/* Check that there isn't a row with auto_increment = 0 in the table */
mi_extra
(
info
,
HA_EXTRA_KEYREAD
);
bzero
(
info
->
lastkey
,
keyinfo
->
seg
->
length
);
if
(
!
mi_rkey
(
info
,
info
->
rec_buff
,
key
,
info
->
lastkey
,
keyinfo
->
seg
->
length
,
HA_READ_KEY_EXACT
))
{
/* Don't count this as a real warning, as myisamchk can't correct it */
uint
save
=
param
->
warning_printed
;
mi_check_print_warning
(
param
,
"Found row where the auto_increment column has the value 0"
);
param
->
warning_printed
=
save
;
}
mi_extra
(
info
,
HA_EXTRA_NO_KEYREAD
);
}
length
=
(
my_off_t
)
isam_key_length
(
info
,
keyinfo
)
*
keys
+
param
->
key_blocks
*
2
;
...
...
myisam/myisamchk.c
View file @
01cda092
...
...
@@ -206,7 +206,7 @@ static struct option long_options[] =
static
void
print_version
(
void
)
{
printf
(
"%s Ver 1.4
7
for %s at %s
\n
"
,
my_progname
,
SYSTEM_TYPE
,
printf
(
"%s Ver 1.4
8
for %s at %s
\n
"
,
my_progname
,
SYSTEM_TYPE
,
MACHINE_TYPE
);
}
...
...
mysql-test/r/auto_increment.result
View file @
01cda092
...
...
@@ -55,3 +55,8 @@ ordid ord
2 sdj
3 sdj
1 zzz
a
0
Table Op Msg_type Msg_text
test.t1 check warning Found row where the auto_increment column has the value 0
test.t1 check status OK
mysql-test/r/bdb.result
View file @
01cda092
...
...
@@ -511,3 +511,14 @@ id id3
100 2
KINMU_DATE
KINMU_DATE
a b
1 1
1 2
a b a b
1 1 1 1
1 1 1 2
1 2 1 1
1 2 1 2
a b
1 1
1 2
mysql-test/r/limit.result
View file @
01cda092
...
...
@@ -20,3 +20,6 @@ a b
a b
2 2
3 4
i
2
1
mysql-test/r/lock.result
View file @
01cda092
...
...
@@ -4,3 +4,7 @@ Table Op Msg_type Msg_text
test.t1 check status OK
Table Op Msg_type Msg_text
test.t2 check error Table 't2' was not locked with LOCK TABLES
n
4
n
1
mysql-test/r/rpl_mystery22.result
0 → 100644
View file @
01cda092
n
1
2
3
mysql-test/r/rpl_sporadic_master.result
View file @
01cda092
n
1
2
3
4
5
6
1
0
11
12
13
14
15
mysql-test/t/auto_increment.test
View file @
01cda092
...
...
@@ -64,3 +64,14 @@ create table t1 (ordid int(8) not null auto_increment, ord varchar(50) not null
insert
into
t1
values
(
NULL
,
'sdj'
),(
NULL
,
'sdj'
),(
NULL
,
"abc"
),(
NULL
,
'abc'
),(
NULL
,
'zzz'
),(
NULL
,
'sdj'
),(
NULL
,
'abc'
);
select
*
from
t1
;
drop
table
t1
;
#
# Test of auto_increment columns when they are set to 0
#
create
table
t1
(
a
int
not
null
primary
key
auto_increment
);
insert
into
t1
values
(
0
);
update
t1
set
a
=
0
;
select
*
from
t1
;
check
table
t1
;
drop
table
t1
;
mysql-test/t/bdb.test
View file @
01cda092
...
...
@@ -715,3 +715,18 @@ CREATE TABLE t2 ( SYAIN_NO char(5) NOT NULL default '',STR_DATE char(8) NOT NULL
select
T1
.
KINMU_DATE
from
t1
T1
,
t2
T2
where
T1
.
SYAIN_NO
=
'12345'
and
T1
.
KINMU_DATE
=
'200106'
and
T2
.
SYAIN_NO
=
T1
.
SYAIN_NO
;
select
T1
.
KINMU_DATE
from
t1
T1
,
t2
T2
where
T1
.
SYAIN_NO
=
'12345'
and
T1
.
KINMU_DATE
=
'200106'
and
T2
.
SYAIN_NO
=
T1
.
SYAIN_NO
;
DROP
TABLE
t1
,
t2
;
#
# Test problem with joining table to itself on a multi-part unique key
#
drop
table
if
exists
t
;
create
table
t
(
a
int
(
11
)
not
null
,
b
int
(
11
)
not
null
,
unique
(
a
,
b
))
type
=
bdb
;
insert
into
t
values
(
1
,
1
),
(
1
,
2
);
select
*
from
t
where
a
=
1
;
select
t1
.*
,
t2
.*
from
t
t1
,
t
t2
where
t1
.
a
=
t2
.
a
and
t2
.
a
=
1
;
select
*
from
t
where
a
=
1
;
drop
table
t
;
mysql-test/t/limit.test
View file @
01cda092
...
...
@@ -17,3 +17,14 @@ select * from t1;
delete
from
t1
limit
1
;
select
*
from
t1
;
drop
table
t1
;
create
table
t1
(
i
int
);
insert
into
t1
(
i
)
values
(
1
);
insert
into
t1
(
i
)
values
(
1
);
insert
into
t1
(
i
)
values
(
1
);
delete
from
t1
limit
1
;
update
t1
set
i
=
2
limit
1
;
delete
from
t1
limit
0
;
update
t1
set
i
=
3
limit
0
;
select
*
from
t1
;
drop
table
t1
;
mysql-test/t/lock.test
View file @
01cda092
...
...
@@ -53,3 +53,45 @@ lock tables t1 write;
check
table
t2
;
unlock
tables
;
drop
table
t1
,
t2
;
#test to see if select will get the lock ahead of low priority update
connect
(
locker
,
localhost
,
root
,,);
connect
(
reader
,
localhost
,
root
,,);
connect
(
writer
,
localhost
,
root
,,);
connection
locker
;
create
table
t1
(
n
int
);
insert
into
t1
values
(
1
);
lock
tables
t1
write
;
connection
writer
;
send
update
low_priority
t1
set
n
=
4
;
connection
reader
;
--
sleep
2
send
select
n
from
t1
;
connection
locker
;
--
sleep
2
unlock
tables
;
connection
writer
;
reap
;
connection
reader
;
reap
;
drop
table
t1
;
connection
locker
;
create
table
t1
(
n
int
);
insert
into
t1
values
(
1
);
lock
tables
t1
read
;
connection
writer
;
send
update
low_priority
t1
set
n
=
4
;
connection
reader
;
--
sleep
2
send
select
n
from
t1
;
connection
locker
;
--
sleep
2
unlock
tables
;
connection
writer
;
reap
;
connection
reader
;
reap
;
drop
table
t1
;
mysql-test/t/rpl_mystery22.test
0 → 100644
View file @
01cda092
# test case to make slave thread get ahead by 22 bytes
source
include
/
master
-
slave
.
inc
;
connection
master
;
# first, cause a duplicate key problem on the slave
create
table
t1
(
n
int
auto_increment
primary
key
);
save_master_pos
;
connection
slave
;
sync_with_master
;
insert
into
t1
values
(
2
);
connection
master
;
insert
into
t1
values
(
NULL
);
insert
into
t1
values
(
NULL
);
save_master_pos
;
connection
slave
;
sleep
1
;
# there is no way around this sleep - we have to wait until
# the slave tries to run the query, fails and aborts slave thread
delete
from
t1
where
n
=
2
;
slave
start
;
sync_with_master
;
#now the buggy slave would be confused on the offset but it can replicate
#in order to make it break, we need to stop/start the slave one more time
slave
stop
;
connection
master
;
# to be able to really confuse the slave, we need some non-auto-increment
# events in the log
create
table
t2
(
n
int
);
drop
table
t2
;
insert
into
t1
values
(
NULL
);
save_master_pos
;
connection
slave
;
slave
start
;
#now the truth comes out - if the slave is buggy, it will never sync because
#the slave thread is not able to read events
sync_with_master
;
select
*
from
t1
;
#clean up
connection
master
;
drop
table
t1
;
save_master_pos
;
connection
slave
;
sync_with_master
;
mysql-test/t/rpl_sporadic_master.test
View file @
01cda092
#test to see if replication can continue when master sporadically fails on
#
test to see if replication can continue when master sporadically fails on
# COM_BINLOG_DUMP and additionally limits the number of events per dump
source
include
/
master
-
slave
.
inc
;
connection
master
;
drop
table
if
exists
t1
;
drop
table
if
exists
t1
,
t2
;
create
table
t2
(
n
int
);
create
table
t1
(
n
int
not
null
auto_increment
primary
key
);
insert
into
t1
values
(
NULL
),(
NULL
);
truncate
table
t1
;
insert
into
t1
values
(
NULL
),(
NULL
);
# We have to use 4 in the following to make this test work with all table types
insert
into
t1
values
(
4
),(
NULL
);
save_master_pos
;
connection
slave
;
sync_with_master
;
slave
stop
;
slave
start
;
connection
master
;
insert
into
t1
values
(
NULL
),(
NULL
);
flush
logs
;
truncate
table
t1
;
insert
into
t1
values
(
NULL
),(
NULL
);
insert
into
t1
values
(
NULL
),(
NULL
)
;
insert
into
t1
values
(
10
),(
NULL
);
insert
into
t1
values
(
NULL
),(
NULL
)
insert
into
t1
values
(
NULL
),(
NULL
);
save_master_pos
;
connection
slave
;
sync_with_master
;
select
*
from
t1
;
connection
master
;
drop
table
t1
;
drop
table
t1
,
t2
;
save_master_pos
;
connection
slave
;
sync_with_master
;
mysys/thr_lock.c
View file @
01cda092
...
...
@@ -85,6 +85,7 @@ multiple read locks.
my_bool
thr_lock_inited
=
0
;
ulong
locks_immediate
=
0L
,
locks_waited
=
0L
;
enum
thr_lock_type
thr_upgraded_concurrent_insert_lock
=
TL_WRITE
;
/* The following constants are only for debug output */
#define MAX_THREADS 100
...
...
@@ -110,7 +111,8 @@ my_bool init_thr_lock()
}
#ifdef EXTRA_DEBUG
static
int
found_errors
=
0
;
#define MAX_FOUND_ERRORS 10
/* Report 10 first errors */
static
uint
found_errors
=
0
;
static
int
check_lock
(
struct
st_lock_list
*
list
,
const
char
*
lock_type
,
const
char
*
where
,
my_bool
same_thread
)
...
...
@@ -167,15 +169,16 @@ static int check_lock(struct st_lock_list *list, const char* lock_type,
static
void
check_locks
(
THR_LOCK
*
lock
,
const
char
*
where
,
my_bool
allow_no_locks
)
{
if
(
!
found_errors
)
uint
old_found_errors
=
found_errors
;
if
(
found_errors
<
MAX_FOUND_ERRORS
)
{
if
(
check_lock
(
&
lock
->
write
,
"write"
,
where
,
1
)
|
check_lock
(
&
lock
->
write_wait
,
"write_wait"
,
where
,
0
)
|
check_lock
(
&
lock
->
read
,
"read"
,
where
,
0
)
|
check_lock
(
&
lock
->
read_wait
,
"read_wait"
,
where
,
0
))
found_errors
=
1
;
found_errors
++
;
if
(
!
found_errors
)
if
(
found_errors
<
MAX_FOUND_ERRORS
)
{
uint
count
=
0
;
THR_LOCK_DATA
*
data
;
...
...
@@ -186,7 +189,7 @@ static void check_locks(THR_LOCK *lock, const char *where,
}
if
(
count
!=
lock
->
read_no_write_count
)
{
found_errors
=
1
;
found_errors
++
;
fprintf
(
stderr
,
"Warning at '%s': Locks read_no_write_count was %u when it should have been %u
\n
"
,
where
,
lock
->
read_no_write_count
,
count
);
}
...
...
@@ -196,7 +199,7 @@ static void check_locks(THR_LOCK *lock, const char *where,
if
(
!
allow_no_locks
&&
!
lock
->
read
.
data
&&
(
lock
->
write_wait
.
data
||
lock
->
read_wait
.
data
))
{
found_errors
=
1
;
found_errors
++
;
fprintf
(
stderr
,
"Warning at '%s': No locks in use but locks are in wait queue
\n
"
,
where
);
...
...
@@ -205,7 +208,7 @@ static void check_locks(THR_LOCK *lock, const char *where,
{
if
(
!
allow_no_locks
&&
lock
->
read_wait
.
data
)
{
found_errors
=
1
;
found_errors
++
;
fprintf
(
stderr
,
"Warning at '%s': No write locks and waiting read locks
\n
"
,
where
);
...
...
@@ -221,7 +224,7 @@ static void check_locks(THR_LOCK *lock, const char *where,
(
lock
->
write_wait
.
data
->
type
==
TL_WRITE_DELAYED
&&
!
lock
->
read
.
data
)))
{
found_errors
=
1
;
found_errors
++
;
fprintf
(
stderr
,
"Warning at '%s': Write lock %d waiting while no exclusive read locks
\n
"
,
where
,(
int
)
lock
->
write_wait
.
data
->
type
);
}
...
...
@@ -235,7 +238,7 @@ static void check_locks(THR_LOCK *lock, const char *where,
lock
->
write
.
data
->
type
==
TL_WRITE_ALLOW_WRITE
&&
lock
->
write_wait
.
data
->
type
==
TL_WRITE_ALLOW_WRITE
)
{
found_errors
=
1
;
found_errors
++
;
fprintf
(
stderr
,
"Warning at '%s': Found WRITE_ALLOW_WRITE lock waiting for WRITE_ALLOW_WRITE lock
\n
"
,
where
);
...
...
@@ -243,16 +246,18 @@ static void check_locks(THR_LOCK *lock, const char *where,
}
if
(
lock
->
read
.
data
)
{
if
((
!
pthread_equal
(
lock
->
write
.
data
->
thread
,
lock
->
read
.
data
->
thread
)
&&
lock
->
write
.
data
->
type
>
TL_WRITE_DELAYED
)
||
if
((
!
pthread_equal
(
lock
->
write
.
data
->
thread
,
lock
->
read
.
data
->
thread
)
&&
lock
->
write
.
data
->
type
>
TL_WRITE_DELAYED
&&
lock
->
write
.
data
->
type
!=
TL_WRITE_ONLY
)
||
((
lock
->
write
.
data
->
type
==
TL_WRITE_CONCURRENT_INSERT
||
lock
->
write
.
data
->
type
==
TL_WRITE_ALLOW_WRITE
)
&&
lock
->
read_no_write_count
))
{
found_errors
=
1
;
found_errors
++
;
fprintf
(
stderr
,
"Warning at '%s': Found lock that is write and read locked
\n
"
,
where
);
"Warning at '%s': Found lock
of type %d
that is write and read locked
\n
"
,
where
,
lock
->
write
.
data
->
type
);
}
}
if
(
lock
->
read_wait
.
data
)
...
...
@@ -260,7 +265,7 @@ static void check_locks(THR_LOCK *lock, const char *where,
if
(
!
allow_no_locks
&&
lock
->
write
.
data
->
type
<=
TL_WRITE_DELAYED
&&
lock
->
read_wait
.
data
->
type
<=
TL_READ_HIGH_PRIORITY
)
{
found_errors
=
1
;
found_errors
++
;
fprintf
(
stderr
,
"Warning at '%s': Found read lock of type %d waiting for write lock of type %d
\n
"
,
where
,
...
...
@@ -270,7 +275,7 @@ static void check_locks(THR_LOCK *lock, const char *where,
}
}
}
if
(
found_errors
)
if
(
found_errors
!=
old_found_errors
)
{
DBUG_PRINT
(
"error"
,(
"Found wrong lock"
));
}
...
...
@@ -510,7 +515,7 @@ int thr_lock(THR_LOCK_DATA *data,enum thr_lock_type lock_type)
}
}
else
if
(
lock_type
==
TL_WRITE_CONCURRENT_INSERT
&&
!
lock
->
check_status
)
data
->
type
=
lock_type
=
TL_WRITE
;
/* not supported */
data
->
type
=
lock_type
=
thr_upgraded_concurrent_insert_lock
;
if
(
lock
->
write
.
data
)
/* If there is a write lock */
{
...
...
@@ -552,7 +557,7 @@ int thr_lock(THR_LOCK_DATA *data,enum thr_lock_type lock_type)
{
/* no scheduled write locks */
if
(
lock_type
==
TL_WRITE_CONCURRENT_INSERT
&&
(
*
lock
->
check_status
)(
data
->
status_param
))
data
->
type
=
lock_type
=
TL_WRITE
;
/* Upgrade lock */
data
->
type
=
lock_type
=
thr_upgraded_concurrent_insert_lock
;
if
(
!
lock
->
read
.
data
||
(
lock_type
<=
TL_WRITE_DELAYED
&&
...
...
@@ -939,10 +944,10 @@ my_bool thr_upgrade_write_delay_lock(THR_LOCK_DATA *data)
DBUG_ENTER
(
"thr_upgrade_write_delay_lock"
);
pthread_mutex_lock
(
&
lock
->
mutex
);
if
(
data
->
type
==
TL_UNLOCK
||
data
->
type
==
TL_WRITE
)
/* Aborted */
if
(
data
->
type
==
TL_UNLOCK
||
data
->
type
>=
TL_WRITE_LOW_PRIORITY
)
{
pthread_mutex_unlock
(
&
lock
->
mutex
);
DBUG_RETURN
(
data
->
type
==
TL_UNLOCK
);
DBUG_RETURN
(
data
->
type
==
TL_UNLOCK
);
/* Test if Aborted */
}
check_locks
(
lock
,
"before upgrading lock"
,
0
);
/* TODO: Upgrade to TL_WRITE_CONCURRENT_INSERT in some cases */
...
...
sql-bench/Results/ATIS-mysql-Linux_2.2.16_SMP_alpha
View file @
01cda092
Testing server 'MySQL 3.23.3
6' at 2001-03-26 1:22:18
Testing server 'MySQL 3.23.3
9' at 2002-09-08 10:26:22
ATIS table test
Creating tables
Time for create_table (28): 0 wallclock secs ( 0.00 usr 0.0
0
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for create_table (28): 0 wallclock secs ( 0.00 usr 0.0
1
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Inserting data
Time to insert (9768):
4 wallclock secs ( 0.57 usr 0.65
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to insert (9768):
3 wallclock secs ( 0.51 usr 0.59
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Retrieving data
Time for select_simple_join (500):
1
wallclock secs ( 0.58 usr 0.37 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_join (100): 2 wallclock secs ( 0.4
4
usr 0.33 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_key_prefix_join (100): 1
1 wallclock secs ( 3.47 usr 2.55
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_distinct (800): 1
0 wallclock secs ( 1.53 usr 0.98
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_group (2800): 11 wallclock secs ( 1.4
4 usr 0.65
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_simple_join (500):
2
wallclock secs ( 0.58 usr 0.37 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_join (100): 2 wallclock secs ( 0.4
8
usr 0.33 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_key_prefix_join (100): 1
0 wallclock secs ( 3.45 usr 2.53
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_distinct (800): 1
1 wallclock secs ( 1.54 usr 0.97
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_group (2800): 11 wallclock secs ( 1.4
8 usr 0.63
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Removing tables
Time to drop_table (28): 0 wallclock secs ( 0.00 usr 0.0
0
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 39 wallclock secs ( 8.05 usr 5.
53
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to drop_table (28): 0 wallclock secs ( 0.00 usr 0.0
1
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 39 wallclock secs ( 8.05 usr 5.
44
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
sql-bench/Results/RUN-mysql-Linux_2.2.16_SMP_alpha
View file @
01cda092
This diff is collapsed.
Click to expand it.
sql-bench/Results/alter-table-mysql-Linux_2.2.16_SMP_alpha
View file @
01cda092
Testing server 'MySQL 3.23.3
6' at 2001-03-26 1:22:58
Testing server 'MySQL 3.23.3
9' at 2002-09-08 10:27:01
Testing of ALTER TABLE
Testing with 1000 columns and 1000 rows in 20 steps
Insert data into the table
Time for insert (1000) 0 wallclock secs ( 0.0
7 usr 0.06
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for insert (1000) 0 wallclock secs ( 0.0
5 usr 0.05
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for alter_table_add (992):
219 wallclock secs ( 0.16 usr 0.07
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for alter_table_add (992):
187 wallclock secs ( 0.18 usr 0.06
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for create_index (8): 4 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for drop_index (8): 4 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for alter_table_drop (496): 1
78 wallclock secs ( 0.06 usr 0.04
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for alter_table_drop (496): 1
50 wallclock secs ( 0.05 usr 0.05
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time:
405 wallclock secs ( 0.30 usr 0.16
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time:
345 wallclock secs ( 0.29 usr 0.17
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
sql-bench/Results/big-tables-mysql-Linux_2.2.16_SMP_alpha
View file @
01cda092
Testing server 'MySQL 3.23.3
6' at 2001-03-26 1:29:43
Testing server 'MySQL 3.23.3
9' at 2002-09-08 10:32:47
Testing of some unusual tables
All tests are done 1000 times with 1000 fields
Testing table with 1000 fields
Testing select * from table with 1 record
Time to select_many_fields(1000): 10 wallclock secs ( 3.
55 usr 5.04
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to select_many_fields(1000): 10 wallclock secs ( 3.
45 usr 4.65
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing select all_fields from table with 1 record
Time to select_many_fields(1000): 1
5 wallclock secs ( 3.61 usr 5.0
6 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to select_many_fields(1000): 1
4 wallclock secs ( 3.39 usr 4.7
6 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing insert VALUES()
Time to insert_many_fields(1000): 5 wallclock secs ( 0.3
0 usr 0.09
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to insert_many_fields(1000): 5 wallclock secs ( 0.3
1 usr 0.07
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing insert (all_fields) VALUES()
Time to insert_many_fields(1000): 9 wallclock secs ( 0.03 usr 0.0
5
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to insert_many_fields(1000): 9 wallclock secs ( 0.03 usr 0.0
6
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time:
40 wallclock secs ( 7.49 usr 10.23
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time:
38 wallclock secs ( 7.19 usr 9.54
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
sql-bench/Results/connect-mysql-Linux_2.2.16_SMP_alpha
View file @
01cda092
Testing server 'MySQL 3.23.3
6' at 2001-03-26 1:30:23
Testing server 'MySQL 3.23.3
9' at 2002-09-08 10:33:26
Testing the speed of connecting to the server and sending of data
All tests are done 10000 times
Testing connection/disconnect
Time to connect (10000): 14 wallclock secs (
7.60 usr 2.34
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to connect (10000): 14 wallclock secs (
8.11 usr 2.28
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Test connect/simple select/disconnect
Time for connect+select_simple (10000): 16 wallclock secs (
7.88 usr 3.28
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for connect+select_simple (10000): 16 wallclock secs (
8.44 usr 2.99
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Test simple select
Time for select_simple (10000): 1 wallclock secs ( 0.
33 usr 0.77
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_simple (10000): 1 wallclock secs ( 0.
29 usr 0.81
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing connect/select 1 row from table/disconnect
Time to connect+select_1_row (10000): 17 wallclock secs ( 8.
25 usr 3.12
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to connect+select_1_row (10000): 17 wallclock secs ( 8.
45 usr 3.08
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing select 1 row from table
Time to select_1_row (10000): 3 wallclock secs ( 0.
30 usr 0.80
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to select_1_row (10000): 3 wallclock secs ( 0.
28 usr 0.85
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing select 2 rows from table
Time to select_2_rows (10000):
2 wallclock secs ( 0.32 usr 0.95
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to select_2_rows (10000):
3 wallclock secs ( 0.37 usr 0.91
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Test select with aritmetic (+)
Time for select_column+column (10000): 3 wallclock secs ( 0.31 usr 0.7
9
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_column+column (10000): 3 wallclock secs ( 0.31 usr 0.7
1
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing retrieval of big records (65000 bytes)
Time to select_big
(10000): 20 wallclock secs ( 8.34 usr 6.75
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to select_big
_str (10000): 19 wallclock secs ( 7.79 usr 6.10
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 76 wallclock secs (3
3.34 usr 18.80
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 76 wallclock secs (3
4.04 usr 17.73
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
sql-bench/Results/create-mysql-Linux_2.2.16_SMP_alpha
View file @
01cda092
Testing server 'MySQL 3.23.3
6' at 2001-03-26 1:31:40
Testing server 'MySQL 3.23.3
9' at 2002-09-08 10:34:42
Testing the speed of creating and droping tables
Testing with 10000 tables and 10000 loop count
Testing create of tables
Time for create_MANY_tables (10000): 1
04 wallclock secs ( 1.76 usr 0.73
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for create_MANY_tables (10000): 1
83 wallclock secs ( 1.96 usr 0.78
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Accessing tables
Time to select_group_when_MANY_tables (10000):
6 wallclock secs ( 0.95 usr 0.90
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to select_group_when_MANY_tables (10000):
7 wallclock secs ( 0.99 usr 0.95
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing drop
Time for drop_table_when_MANY_tables (10000):
7 wallclock secs ( 0.64 usr 0.63
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for drop_table_when_MANY_tables (10000):
6 wallclock secs ( 0.61 usr 0.57
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing create+drop
Time for create+drop (10000): 1
3 wallclock secs ( 2.39 usr 1.35
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for create_key+drop (10000): 17 wallclock secs ( 4.0
0
usr 1.40 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time:
147 wallclock secs ( 9.75 usr 5.02
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for create+drop (10000): 1
2 wallclock secs ( 2.44 usr 1.26
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for create_key+drop (10000): 17 wallclock secs ( 4.0
3
usr 1.40 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time:
225 wallclock secs (10.03 usr 4.95
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
sql-bench/Results/insert-mysql-Linux_2.2.16_SMP_alpha
View file @
01cda092
This diff is collapsed.
Click to expand it.
sql-bench/Results/select-mysql-Linux_2.2.16_SMP_alpha
View file @
01cda092
Testing server 'MySQL 3.23.3
6' at 2001-03-26 2:12:47
Testing server 'MySQL 3.23.3
9' at 2002-09-08 11:16:28
Testing the speed of selecting on keys that consist of many parts
The test-table has 10000 rows and the test is done with 500 ranges.
Creating table
Inserting 10000 rows
Time to insert (10000): 4 wallclock secs ( 0.
81 usr 0.63
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to insert (10000): 4 wallclock secs ( 0.
71 usr 0.65
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Test if the database has a query cache
Time for select_query_cache (10000): 82 wallclock secs ( 3.
31 usr 1.00
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_query_cache (10000): 82 wallclock secs ( 3.
53 usr 0.98
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_query_cache2 (10000): 8
3 wallclock secs ( 3.20 usr 0.96
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_query_cache2 (10000): 8
4 wallclock secs ( 3.50 usr 1.01
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing big selects on the table
Time for select_big (70:17207):
1
wallclock secs ( 0.12 usr 0.08 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_range (410:1057904): 2
25 wallclock secs ( 7.61 usr 5.12
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for min_max_on_key (70000): 155 wallclock secs (2
1.44 usr 6.55
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_on_key (50000): 3
55 wallclock secs (16.27 usr 4.6
9 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_big (70:17207):
0
wallclock secs ( 0.12 usr 0.08 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_range (410:1057904): 2
30 wallclock secs ( 7.50 usr 5.11
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for min_max_on_key (70000): 155 wallclock secs (2
2.55 usr 6.20
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_on_key (50000): 3
49 wallclock secs (17.12 usr 4.5
9 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_group_on_key_parts (1000:100000):
42 wallclock secs ( 0.94 usr 0.56
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_group_on_key_parts (1000:100000):
38 wallclock secs ( 0.89 usr 0.59
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing count(distinct) on the table
Time for count_distinct_key_prefix (1000:1000):
38 wallclock secs ( 0.39 usr 0.12
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct (1000:1000):
48 wallclock secs ( 0.40 usr 0.10
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_2 (1000:1000):
50 wallclock secs ( 0.42 usr 0.12
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_group_on_key (1000:6000): 4
2 wallclock secs ( 0.42 usr 0.15
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_group_on_key_parts (1000:100000): 7
0 wallclock secs ( 0.97 usr 0.59
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_group (1000:100000):
69 wallclock secs ( 0.98 usr 0.61
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_big (100:1000000): 8
2 wallclock secs ( 6.04 usr 7.21
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 13
46 wallclock secs (63.34 usr 28.50
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_key_prefix (1000:1000):
41 wallclock secs ( 0.42 usr 0.13
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct (1000:1000):
51 wallclock secs ( 0.44 usr 0.11
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_2 (1000:1000):
49 wallclock secs ( 0.41 usr 0.14
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_group_on_key (1000:6000): 4
7 wallclock secs ( 0.45 usr 0.14
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_group_on_key_parts (1000:100000): 7
5 wallclock secs ( 0.98 usr 0.61
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_group (1000:100000):
75 wallclock secs ( 0.97 usr 0.60
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_big (100:1000000): 8
0 wallclock secs ( 6.08 usr 6.96
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 13
60 wallclock secs (65.68 usr 27.91
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
sql-bench/Results/wisconsin-mysql-Linux_2.2.16_SMP_alpha
View file @
01cda092
Testing server 'MySQL 3.23.3
6' at 2001-03-26 2:35:13
Testing server 'MySQL 3.23.3
9' at 2002-09-08 11:39:09
Wisconsin benchmark test
Time for create_table (3): 0 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Inserting data
Time to insert (31000): 1
5 wallclock secs ( 2.39 usr 2.3
0 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to delete_big (1):
0
wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to insert (31000): 1
4 wallclock secs ( 2.17 usr 2.1
0 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to delete_big (1):
1
wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Running actual benchmark
Time for wisc_benchmark (114):
4 wallclock secs ( 1.59 usr 0.88
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for wisc_benchmark (114):
3 wallclock secs ( 1.61 usr 0.89
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 1
9 wallclock secs ( 3.99 usr 3.17
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 1
8 wallclock secs ( 3.78 usr 3.00
sys + 0.00 cusr 0.00 csys = 0.00 CPU)
sql/ha_berkeley.cc
View file @
01cda092
...
...
@@ -351,7 +351,8 @@ berkeley_cmp_hidden_key(DB* file, const DBT *new_key, const DBT *saved_key)
static
int
berkeley_cmp_packed_key
(
DB
*
file
,
const
DBT
*
new_key
,
const
DBT
*
saved_key
)
{
KEY
*
key
=
(
KEY
*
)
(
file
->
app_private
);
KEY
*
key
=
(
new_key
->
app_private
?
(
KEY
*
)
new_key
->
app_private
:
(
KEY
*
)
(
file
->
app_private
));
char
*
new_key_ptr
=
(
char
*
)
new_key
->
data
;
char
*
saved_key_ptr
=
(
char
*
)
saved_key
->
data
;
KEY_PART_INFO
*
key_part
=
key
->
key_part
,
*
end
=
key_part
+
key
->
key_parts
;
...
...
@@ -388,7 +389,8 @@ berkeley_cmp_packed_key(DB *file, const DBT *new_key, const DBT *saved_key)
static
int
berkeley_cmp_fix_length_key
(
DB
*
file
,
const
DBT
*
new_key
,
const
DBT
*
saved_key
)
{
KEY
*
key
=
(
KEY
*
)
(
file
->
app_private
);
KEY
*
key
=
(
new_key
->
app_private
?
(
KEY
*
)
new_key
->
app_private
:
(
KEY
*
)
(
file
->
app_private
));
char
*
new_key_ptr
=
(
char
*
)
new_key
->
data
;
char
*
saved_key_ptr
=
(
char
*
)
saved_key
->
data
;
KEY_PART_INFO
*
key_part
=
key
->
key_part
,
*
end
=
key_part
+
key
->
key_parts
;
...
...
@@ -453,8 +455,10 @@ int ha_berkeley::open(const char *name, int mode, uint test_if_locked)
if
((
primary_key
=
table
->
primary_key
)
>=
MAX_KEY
)
{
// No primary key
primary_key
=
table
->
keys
;
key_used_on_scan
=
MAX_KEY
;
ref_length
=
hidden_primary_key
=
BDB_HIDDEN_PRIMARY_KEY_LENGTH
;
}
else
key_used_on_scan
=
primary_key
;
/* Need some extra memory in case of packed keys */
...
...
@@ -728,9 +732,9 @@ DBT *ha_berkeley::create_key(DBT *key, uint keynr, char *buff,
const
byte
*
record
,
int
key_length
)
{
bzero
((
char
*
)
key
,
sizeof
(
*
key
));
if
(
hidden_primary_key
&&
keynr
==
primary_key
)
{
/* We don't need to set app_private here */
key
->
data
=
current_ident
;
key
->
size
=
BDB_HIDDEN_PRIMARY_KEY_LENGTH
;
return
key
;
...
...
@@ -742,6 +746,7 @@ DBT *ha_berkeley::create_key(DBT *key, uint keynr, char *buff,
DBUG_ENTER
(
"create_key"
);
key
->
data
=
buff
;
key
->
app_private
=
key_info
;
for
(
;
key_part
!=
end
&&
key_length
>
0
;
key_part
++
)
{
if
(
key_part
->
null_bit
)
...
...
@@ -775,10 +780,11 @@ DBT *ha_berkeley::pack_key(DBT *key, uint keynr, char *buff,
KEY
*
key_info
=
table
->
key_info
+
keynr
;
KEY_PART_INFO
*
key_part
=
key_info
->
key_part
;
KEY_PART_INFO
*
end
=
key_part
+
key_info
->
key_parts
;
DBUG_ENTER
(
"
pack_key2
"
);
DBUG_ENTER
(
"
bdb:pack_key
"
);
bzero
((
char
*
)
key
,
sizeof
(
*
key
));
key
->
data
=
buff
;
key
->
app_private
=
(
void
*
)
key_info
;
for
(;
key_part
!=
end
&&
(
int
)
key_length
>
0
;
key_part
++
)
{
...
...
@@ -1371,6 +1377,7 @@ int ha_berkeley::read_row(int error, char *buf, uint keynr, DBT *row,
bzero
((
char
*
)
&
key
,
sizeof
(
key
));
key
.
data
=
key_buff
;
key
.
size
=
row
->
size
;
key
.
app_private
=
(
void
*
)
(
table
->
key_info
+
primary_key
);
memcpy
(
key_buff
,
row
->
data
,
row
->
size
);
/* Read the data into current_row */
current_row
.
flags
=
DB_DBT_REALLOC
;
...
...
@@ -1535,6 +1542,7 @@ int ha_berkeley::rnd_next(byte *buf)
DBT
*
ha_berkeley
::
get_pos
(
DBT
*
to
,
byte
*
pos
)
{
/* We don't need to set app_private here */
bzero
((
char
*
)
to
,
sizeof
(
*
to
));
to
->
data
=
pos
;
...
...
@@ -1948,6 +1956,7 @@ longlong ha_berkeley::get_auto_increment()
table
->
next_number_key_offset
);
/* Store for compare */
memcpy
(
old_key
.
data
=
key_buff2
,
key_buff
,
(
old_key
.
size
=
last_key
.
size
));
old_key
.
app_private
=
(
void
*
)
key_info
;
error
=
1
;
{
/* Modify the compare so that we will find the next key */
...
...
sql/ha_gemini.cc
View file @
01cda092
/* Copyright (C) 2000 NuSphere Corporation
/* Copyright (C) 2000
MySQL AB &
NuSphere Corporation
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
...
...
@@ -14,6 +14,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* This file is based on ha_berkeley.cc */
#ifdef __GNUC__
#pragma implementation // gcc: Class implementation
...
...
sql/ha_gemini.h
View file @
01cda092
/* Copyright (C) 2000 NuSphere Corporation
/* Copyright (C) 2000
MySQL AB &
NuSphere Corporation
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
...
...
sql/ha_innobase.cc
View file @
01cda092
...
...
@@ -2885,4 +2885,49 @@ ha_innobase::store_lock(
return
(
to
);
}
/***********************************************************************
Returns the next auto-increment column value for the table. write_row
normally fetches the value from the cache in the data dictionary. This
function in used by SHOW TABLE STATUS and when the first insert to the table
is done after database startup. */
longlong
ha_innobase
::
get_auto_increment
()
/*=============================*/
/* out: the next auto-increment column value */
{
row_prebuilt_t
*
prebuilt
=
(
row_prebuilt_t
*
)
innobase_prebuilt
;
longlong
nr
;
int
error
;
(
void
)
extra
(
HA_EXTRA_KEYREAD
);
index_init
(
table
->
next_number_index
);
/* We use an exclusive lock when we read the max key value from the
auto-increment column index. This is because then build_template will
advise InnoDB to fetch all columns. In SHOW TABLE STATUS the query
id of the auto-increment column is not changed, and previously InnoDB
did not fetch it, causing SHOW TABLE STATUS to show wrong values
for the autoinc column. */
prebuilt
->
select_lock_type
=
LOCK_X
;
prebuilt
->
trx
->
mysql_n_tables_locked
+=
1
;
error
=
index_last
(
table
->
record
[
1
]);
if
(
error
)
{
nr
=
1
;
}
else
{
nr
=
(
longlong
)
table
->
next_number_field
->
val_int_offset
(
table
->
rec_buff_length
)
+
1
;
}
(
void
)
extra
(
HA_EXTRA_NO_KEYREAD
);
index_end
();
return
(
nr
);
}
#endif
/* HAVE_INNOBASE_DB */
sql/ha_innobase.h
View file @
01cda092
...
...
@@ -147,6 +147,7 @@ class ha_innobase: public handler
THR_LOCK_DATA
**
store_lock
(
THD
*
thd
,
THR_LOCK_DATA
**
to
,
enum
thr_lock_type
lock_type
);
longlong
get_auto_increment
();
};
extern
bool
innodb_skip
;
...
...
sql/mysqld.cc
View file @
01cda092
...
...
@@ -272,6 +272,7 @@ ulong keybuff_size,sortbuff_size,max_item_sort_length,table_cache_size,
net_interactive_timeout
,
slow_launch_time
=
2L
,
net_read_timeout
,
net_write_timeout
,
slave_open_temp_tables
=
0
,
open_files_limit
=
0
,
max_binlog_size
;
ulong
slave_net_timeout
;
ulong
thread_cache_size
=
0
,
binlog_cache_size
=
0
,
max_binlog_cache_size
=
0
;
volatile
ulong
cached_thread_count
=
0
;
...
...
@@ -2782,6 +2783,8 @@ CHANGEABLE_VAR changeable_vars[] = {
0
,
MALLOC_OVERHEAD
,
(
long
)
~
0
,
MALLOC_OVERHEAD
,
IO_SIZE
},
{
"record_buffer"
,
(
long
*
)
&
my_default_record_cache_size
,
128
*
1024L
,
IO_SIZE
*
2
+
MALLOC_OVERHEAD
,
~
0L
,
MALLOC_OVERHEAD
,
IO_SIZE
},
{
"slave_net_timeout"
,
(
long
*
)
&
slave_net_timeout
,
SLAVE_NET_TIMEOUT
,
1
,
65535
,
0
,
1
},
{
"slow_launch_time"
,
(
long
*
)
&
slow_launch_time
,
2L
,
0L
,
~
0L
,
0
,
1
},
{
"sort_buffer"
,
(
long
*
)
&
sortbuff_size
,
...
...
@@ -2903,6 +2906,7 @@ struct show_var_st init_vars[]= {
{
"query_buffer_size"
,
(
char
*
)
&
query_buff_size
,
SHOW_LONG
},
{
"safe_show_database"
,
(
char
*
)
&
opt_safe_show_db
,
SHOW_BOOL
},
{
"server_id"
,
(
char
*
)
&
server_id
,
SHOW_LONG
},
{
"slave_net_timeout"
,
(
char
*
)
&
slave_net_timeout
,
SHOW_LONG
},
{
"skip_locking"
,
(
char
*
)
&
my_disable_locking
,
SHOW_MY_BOOL
},
{
"skip_networking"
,
(
char
*
)
&
opt_disable_networking
,
SHOW_BOOL
},
{
"skip_show_database"
,
(
char
*
)
&
opt_skip_show_db
,
SHOW_BOOL
},
...
...
@@ -3601,6 +3605,7 @@ static void get_options(int argc,char **argv)
break
;
case
OPT_LOW_PRIORITY_UPDATES
:
thd_startup_options
|=
OPTION_LOW_PRIORITY_UPDATES
;
thr_upgraded_concurrent_insert_lock
=
TL_WRITE_LOW_PRIORITY
;
low_priority_updates
=
1
;
break
;
case
OPT_BOOTSTRAP
:
...
...
sql/slave.cc
View file @
01cda092
...
...
@@ -735,6 +735,7 @@ static int init_slave_thread(THD* thd)
thd
->
system_thread
=
thd
->
bootstrap
=
1
;
thd
->
client_capabilities
=
0
;
my_net_init
(
&
thd
->
net
,
0
);
thd
->
net
.
timeout
=
slave_net_timeout
;
thd
->
max_packet_length
=
thd
->
net
.
max_packet
;
thd
->
master_access
=
~
0
;
thd
->
priv_user
=
0
;
...
...
@@ -1330,6 +1331,8 @@ pthread_handler_decl(handle_slave,arg __attribute__((unused)))
thd
->
thread_stack
=
(
char
*
)
&
thd
;
// remember where our stack is
thd
->
temporary_tables
=
save_temporary_tables
;
// restore temp tables
threads
.
append
(
thd
);
glob_mi
.
pending
=
0
;
//this should always be set to 0 when the slave thread
// is started
DBUG_PRINT
(
"info"
,(
"master info: log_file_name=%s, position=%s"
,
glob_mi
.
log_file_name
,
llstr
(
glob_mi
.
pos
,
llbuff
)));
...
...
sql/slave.h
View file @
01cda092
...
...
@@ -3,6 +3,10 @@
#include "mysql.h"
#define SLAVE_NET_TIMEOUT 3600
extern
ulong
slave_net_timeout
;
typedef
struct
st_master_info
{
char
log_file_name
[
FN_REFLEN
];
...
...
sql/sql_acl.cc
View file @
01cda092
...
...
@@ -1824,9 +1824,8 @@ int mysql_grant (THD *thd, const char *db, List <LEX_USER> &list, uint rights,
*
Str
,
(
!
db
?
rights
:
0
),
what
)))
result
=
-
1
;
if
(
db
)
if
((
replace_db_table
(
tables
[
1
].
table
,
db
,
*
Str
,
rights
,
what
)))
if
(
db
&&
replace_db_table
(
tables
[
1
].
table
,
db
,
*
Str
,
rights
&
DB_ACLS
,
what
))
result
=
-
1
;
}
VOID
(
pthread_mutex_unlock
(
&
acl_cache
->
lock
));
...
...
sql/sql_delete.cc
View file @
01cda092
...
...
@@ -178,12 +178,13 @@ int mysql_delete(THD *thd,
select
=
make_select
(
table
,
0
,
0
,
conds
,
&
error
);
if
(
error
)
DBUG_RETURN
(
-
1
);
if
(
select
&&
select
->
check_quick
(
test
(
thd
->
options
&
SQL_SAFE_UPDATES
),
limit
))
if
((
select
&&
select
->
check_quick
(
test
(
thd
->
options
&
SQL_SAFE_UPDATES
),
limit
))
||
!
limit
)
{
delete
select
;
send_ok
(
&
thd
->
net
,
0L
);
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
// Nothing to delete
}
/* If running in safe sql mode, don't allow updates without keys */
...
...
sql/sql_insert.cc
View file @
01cda092
...
...
@@ -871,6 +871,7 @@ static pthread_handler_decl(handle_delayed_insert,arg)
/* Add thread to THD list so that's it's visible in 'show processlist' */
pthread_mutex_lock
(
&
LOCK_thread_count
);
thd
->
thread_id
=
thread_id
++
;
thd
->
end_time
();
threads
.
append
(
thd
);
pthread_mutex_unlock
(
&
LOCK_thread_count
);
...
...
sql/sql_parse.cc
View file @
01cda092
...
...
@@ -556,7 +556,7 @@ pthread_handler_decl(handle_one_connection,arg)
free_root
(
&
thd
->
mem_root
,
MYF
(
0
));
if
(
net
->
error
&&
net
->
vio
!=
0
)
{
if
(
!
thd
->
killed
&&
!
opt_warnings
)
if
(
!
thd
->
killed
&&
opt_warnings
)
sql_print_error
(
ER
(
ER_NEW_ABORTING_CONNECTION
),
thd
->
thread_id
,(
thd
->
db
?
thd
->
db
:
"unconnected"
),
thd
->
user
?
thd
->
user
:
"unauthenticated"
,
...
...
sql/sql_show.cc
View file @
01cda092
...
...
@@ -599,7 +599,7 @@ mysqld_show_logs(THD *thd)
DBUG_RETURN
(
1
);
#ifdef HAVE_BERKELEY_DB
if
(
berkeley_show_logs
(
thd
))
if
(
!
berkeley_skip
&&
berkeley_show_logs
(
thd
))
DBUG_RETURN
(
-
1
);
#endif
...
...
sql/sql_update.cc
View file @
01cda092
...
...
@@ -114,7 +114,8 @@ int mysql_update(THD *thd,
select
=
make_select
(
table
,
0
,
0
,
conds
,
&
error
);
if
(
error
||
(
select
&&
select
->
check_quick
(
test
(
thd
->
options
&
SQL_SAFE_UPDATES
),
limit
)))
limit
))
||
!
limit
)
{
delete
select
;
table
->
time_stamp
=
save_time_stamp
;
// Restore timestamp pointer
...
...
support-files/debian/README.debian
View file @
01cda092
...
...
@@ -18,6 +18,15 @@ Comments regarding the Package
mysql-server-debug:
--with-debug flag. mysqld only. (/usr/sbin/mysqld-debug)
* about MySQL-Max packages:
mysql-max :
this is static linked MySQL-Max server only. (/usr/sbin/mysqld-max-static).
mysql-max-shared:
this is dynamic linked MySQL server only. (/usr/sbin/mysqld-max-shared)
mysql-max-debug:
--with-debug flag. mysqld only. (/usr/sbin/mysqld-max-debug)
* about charset
I build MySQL server --with-extra-charsets=all
...
...
support-files/debian/changelog
View file @
01cda092
mysql (3.23.23-1potato.2) unstable; urgency=low
mysql (3.23.39-1) unstable; urgency=low
* new
-- takeshi <takeshi@softagency.co.jp> Sat, 12 May 2001 05:07:35 +0900
mysql (3.23.38-1potato) unstable; urgency=low
* new
-- takeshi <takeshi@softagency.co.jp> Sat, 12 May 2001 05:07:35 +0900
mysql (3.23.37-1potato.2) unstable; urgency=low
* new
* add mysql-max multi packages.
-- takeshi <takeshi@softagency.co.jp> Thr, 26 Apr 2001 05:07:35 +0900
mysql (3.23.37-1potato) unstable; urgency=low
* new
-- takeshi <takeshi@softagency.co.jp> Thr, 26 Apr 2001 05:07:35 +0900
mysql (3.23.36-1potato) unstable; urgency=low
* new
-- takeshi <takeshi@softagency.co.jp> Thr, 29 Mar 2001 05:07:35 +0900
mysql (3.23.35-1potato.1) unstable; urgency=low
* sql fix patch
-- takeshi <takeshi@softagency.co.jp> Thr, 22 Mar 2001 05:07:35 +0900
mysql (3.23.35-1potato) unstable; urgency=low
* new
* --with-innobase
-- takeshi <takeshi@softagency.co.jp> Sat, 17 Mar 2001 05:07:35 +0900
mysql (3.23.34a-1potato) unstable; urgency=low
* new
* --with-innobase
-- takeshi <takeshi@softagency.co.jp> Wed, 14 Mar 2001 05:07:35 +0900
mysql (3.23.33-1potato) unstable; urgency=low
* new
-- takeshi <takeshi@softagency.co.jp> Tue, 13 Feb 2001 05:07:35 +0900
mysql (3.23.32-1potato) unstable; urgency=low
* new
-- takeshi <takeshi@softagency.co.jp> Tue, 23 Jan 2001 05:07:35 +0900
mysql (3.23.31-1potato) unstable; urgency=low
* new
-- takeshi <takeshi@softagency.co.jp> Fri, 19 Jan 2001 05:07:35 +0900
mysql (3.23.30-gamma-1potato) unstable; urgency=low
* new
-- takeshi <takeshi@softagency.co.jp> Sat, 6 Jan 2001 05:07:35 +0900
mysql (3.23.29a-gamma-1potato.3) unstable; urgency=low
* server:/usr/sbin/{mysql_config, mysqltest} -> client:/usr/bin/
* server:/usr/bin/my_print_defaults -> client:/usr/bin/
* /usr/mysql-test -> mysql-bench /var/mysql/mysql-test
-- takeshi <takeshi@softagency.co.jp> Fri, 29 Dec 2000 05:07:35 +0900
mysql (3.23.29a-gamma-1potato.2) unstable; urgency=low
* /usr/mysql-test -> mysql-bench /var/mysql/mysql-test
-- takeshi <takeshi@softagency.co.jp> Sun, 17 Dec 2000 05:07:35 +0900
mysql (3.23.29a-gamma-1potato) unstable; urgency=low
* new
-- takeshi <takeshi@softagency.co.jp> Sun, 17 Dec 2000 05:07:35 +0900
mysql (3.23.28-gamma-1potato) unstable; urgency=low
* new
-- takeshi <takeshi@softagency.co.jp> Fri, 24 Nov 2000 05:07:35 +0900
mysql (3.23.27-beta-1potato) unstable; urgency=low
* new
-- takeshi <takeshi@softagency.co.jp> Fri, 28 Oct 2000 05:07:35 +0900
mysql (3.23.26-beta-1potato) unstable; urgency=low
* new
-- takeshi <takeshi@softagency.co.jp> Sun, 22 Oct 2000 05:07:35 +0900
mysql (3.23.25-beta-1potato) unstable; urgency=low
* new , libmysqlclient10
* change debian/control file. remove Provides keyword
-- takeshi <takeshi@softagency.co.jp> Fri, 29 Sep 2000 05:07:35 +0900
mysql (3.23.24-1potato.2) unstable; urgency=low
* fix debian/control file
* move patch into debian/patches/
if you want to make new patch,
write patch file and put it into debian/patches/.
debian/rules do patch debian/patches/* automatically.
* change debian/rules , debian/move
* back mysql_resolveip -> resolveip , mysql_perror -> perror
-- takeshi <takeshi@softagency.co.jp> Thr, 14 Sep 2000 05:07:35 +0900
mysql (3.23.24-1potato) unstable; urgency=low
* move patch into debian/patches/
if you want to make new patch,
write patch file and put it into debian/patches/.
debian/rules do patch debian/patches/* automatically.
* change debian/rules , debian/move
* back mysql_resolveip -> resolveip , mysql_perror -> perror
-- takeshi <takeshi@softagency.co.jp>
Tue, 5
Sep 2000 05:07:35 +0900
-- takeshi <takeshi@softagency.co.jp>
Sat, 9
Sep 2000 05:07:35 +0900
mysql (3.23.23-1potato) unstable; urgency=low
...
...
support-files/debian/control
View file @
01cda092
...
...
@@ -11,38 +11,44 @@ Description: mysql
Package: mysql-doc
Architecture: all
Section: doc
Priority: extra
Replaces: mysql-gpl-doc
Description: mysql Documentation (html)
MySQL Doc.
Package: libmysqlclient
9
Package: libmysqlclient
10
Architecture: any
Provides: libmysqlclient9
Description: libmysqlclient.so.9
libmysqlclient.so.9
Section: libs
Priority: extra
Description: libmysqlclient.so.10
libmysqlclient.so.10
Package: mysql-client
Architecture: any
Depends: ${shlibs:Depends}
Section:
devel
Section:
misc
Priority: extra
Conflicts: mysql-client-ujis, mysql-client-sjis
Replaces: mysql-base (<< 3.22.11), mysql-base-ujis (<< 3.22.11), mysql-base-sjis (<< 3.22.11), mysql-client-ujis, mysql-client-sjis
Provides: mysql-client
Replaces: mysql-gpl-client, mysql-base (<< 3.22.11), mysql-base-ujis (<< 3.22.11), mysql-base-sjis (<< 3.22.11), mysql-client-ujis, mysql-client-sjis
Description: mysql clients.
MySQL clients programs.
Package: mysql-server
Architecture: any
Section: misc
Priority: extra
Depends: ${shlibs:Depends}
Conflicts: mysql-server-sjis, mysql-server-ujis, mysql-server (<< 3.23.0)
Replaces: mysql-server-sjis, mysql-base (<< 3.22.11), mysql-base-ujis (<< 3.22.11), mysql-base-sjis (<< 3.22.11), mysql-server-sjis, mysql-server-ujis, mysql-server (<< 3.23.0)
Provides: mysql-server
Replaces: mysql-server-sjis, mysql-base (<< 3.22.11), mysql-base-ujis (<< 3.22.11), mysql-base-sjis (<< 3.22.11), mysql-server-sjis, mysql-server-ujis, mysql-server (<< 3.23.0), mysql-common
Description: MySQL server (static linked)
MySQL server. static linked.
Package: mysql-server-shared
Architecture: any
Depends: ${shlibs:Depends}
Section: misc
Priority: extra
Depends: mysql-server, ${shlibs:Depends}
Conflicts: mysql-server-sjis, mysql-server-ujis, mysql-server (<< 3.23.0)
Replaces: mysql-server-sjis, mysql-base (<< 3.22.11), mysql-base-ujis (<< 3.22.11), mysql-base-sjis (<< 3.22.11), mysql-server-sjis, mysql-server-ujis, mysql-server (<< 3.23.0)
Description: MySQL server (dynamic linked)
...
...
@@ -50,22 +56,57 @@ Description: MySQL server (dynamic linked)
Package: mysql-server-debug
Architecture: any
Depends: ${shlibs:Depends}
Section: misc
Priority: extra
Depends: mysql-server, ${shlibs:Depends}
Conflicts: mysql-server-sjis, mysql-server-ujis, mysql-server (<< 3.23.0)
Replaces: mysql-server-sjis, mysql-base (<< 3.22.11), mysql-base-ujis (<< 3.22.11), mysql-base-sjis (<< 3.22.11), mysql-server-sjis, mysql-server-ujis, mysql-server (<< 3.23.0)
Description: MySQL server debug
MySQL server. debug
Package: mysql-max
Architecture: any
Section: misc
Priority: extra
Depends: mysql-server
Conflicts: mysql-server-sjis, mysql-server-ujis, mysql-server (<< 3.23.0)
Replaces: mysql-server-sjis, mysql-base (<< 3.22.11), mysql-base-ujis (<< 3.22.11), mysql-base-sjis (<< 3.22.11), mysql-server-sjis, mysql-server-ujis, mysql-server (<< 3.23.0)
Description: MySQL-MAX server (static linked)
MySQL-Max server. (static linked)
Package: mysql-max-shared
Architecture: any
Section: misc
Priority: extra
Depends: mysql-server, ${shlibs:Depends}
Conflicts: mysql-server-sjis, mysql-server-ujis, mysql-server (<< 3.23.0)
Replaces: mysql-server-sjis, mysql-base (<< 3.22.11), mysql-base-ujis (<< 3.22.11), mysql-base-sjis (<< 3.22.11), mysql-server-sjis, mysql-server-ujis, mysql-server (<< 3.23.0)
Description: MySQL-MAX server (shared linked)
MySQL-Max server. (shared linked)
Package: mysql-max-debug
Architecture: any
Section: misc
Priority: extra
Depends: mysql-server, ${shlibs:Depends}
Conflicts: mysql-server-sjis, mysql-server-ujis, mysql-server (<< 3.23.0)
Replaces: mysql-server-sjis, mysql-base (<< 3.22.11), mysql-base-ujis (<< 3.22.11), mysql-base-sjis (<< 3.22.11), mysql-server-sjis, mysql-server-ujis, mysql-server (<< 3.23.0)
Description: MySQL-MAX server (with debug shared linked)
MySQL-Max server. (with debug and shared linked)
Package: mysql-dev
Architecture: any
Section: devel
Priority: extra
Depends: ${shlibs:Depends}
Conflicts: mysql-dev-sjis, mysql-dev-ujis
Replaces: mysql-dev-sjis, mysql-dev-ujis, libmysqlclient6-ujis, libmysqlclient6-sjis
Provides: mysql-dev
Replaces: mysql-devel, libmysqlclient10-dev, libmysqlclient9-dev, libmysqlclient6-dev, mysql-gpl-dev, mysql-dev-sjis, mysql-dev-ujis, libmysqlclient6-ujis, libmysqlclient6-sjis
Description: MySQL develop suite
MySQL develop.
Package: mysql-bench
Architecture: all
Section: misc
Priority: extra
Description: mysql benchmark suite.
MySQL sql-bench files.
support-files/debian/gomi
View file @
01cda092
Docs/Makefile
strings/Makefile
dbug/Makefile
mysys/Makefile
extra/Makefile
regex/Makefile
isam/Makefile
heap/Makefile
isam/Makefile
merge/Makefile
mysys/Makefile
readline/Makefile
regex/Makefile
sql/Makefile
sql/share/Makefile
strings/Makefile
support-files/binary-configure
support-files/my-example.cnf
support-files/mysql-log-rotate
...
...
support-files/debian/libmysqlclient10.dirs
0 → 100644
View file @
01cda092
usr/lib
support-files/debian/libmysqlclient10.postinst
0 → 100644
View file @
01cda092
#!/bin/sh
ldconfig
support-files/debian/move
View file @
01cda092
...
...
@@ -7,7 +7,7 @@ if [ -e $STAMPFILE ]; then
fi
#----------
CLIENT1
=
"msql2mysql mysql mysql_convert_table_format mysql_find_rows mysql_fix_privilege_tables mysql_setpermission mysql_zap mysqlaccess mysqladmin mysqlbug mysqldump mysqlhotcopy mysqlimport mysqlshow"
CLIENT1
=
"msql2mysql mysql mysql_convert_table_format mysql_find_rows mysql_fix_privilege_tables mysql_setpermission mysql_zap mysqlaccess mysqladmin mysqlbug mysqldump mysqlhotcopy mysqlimport mysqlshow
mysql_config mysqltest my_print_defaults
"
# CLIENT2="add_file_priv add_func_table add_long_password make_binary_distribution"
...
...
@@ -20,7 +20,7 @@ for CHAR in build
do
#-----
cp
-Rpd
debian/
${
CHAR
}
/usr debian/mysql-server/
cp
-Rpd
debian/
${
CHAR
}
-shared
/usr/lib/mysql/libmysqlclient.so.
*
debian/libmysqlclient
9
/usr/lib/
cp
-Rpd
debian/
${
CHAR
}
-shared
/usr/lib/mysql/libmysqlclient.so.
*
debian/libmysqlclient
10
/usr/lib/
#----- mysql-server-shared ---
cp
-Rpd
debian/
${
CHAR
}
-shared
/usr/sbin/mysqld debian/mysql-server-shared/usr/sbin/mysqld-shared
...
...
@@ -31,20 +31,28 @@ do
#----- mysql-server ---
mv
debian/mysql-server/usr/sbin/mysqld debian/mysql-server/usr/sbin/mysqld-static
#----- mysql-max-shared ---
cp
-Rpd
debian/
${
CHAR
}
-max-shared
/usr/sbin/mysqld debian/mysql-max-shared/usr/sbin/mysqld-max-shared
#----- mysql-max-debug ---
cp
-Rpd
debian/
${
CHAR
}
-max-debug
/usr/sbin/mysqld debian/mysql-max-debug/usr/sbin/mysqld-max-debug
#----- mysql-max ---
mv
debian/
${
CHAR
}
-max
/usr/sbin/mysqld debian/mysql-max/usr/sbin/mysqld-max-static
#----- mysql-client ----
cd
${
P
}
/debian/mysql-server/usr/bin/
&&
mv
$CLIENT1
../../../mysql-client/usr/bin/
cd
${
P
}
mv
-f
debian/mysql-server/usr/
{
man,info
}
debian/mysql-client/usr/share/
mv
debian/mysql-server/usr/share/mysql/my-example
.cnf debian/mysql-client/usr/share/mysql/
# mv debian/mysql-server/usr/share/mysql/my-*
.cnf debian/mysql-client/usr/share/mysql/
mv
-f
debian/mysql-server/usr/bin/replace debian/mysql-client/usr/bin/mysql_replace
#----- mysql-server ---
mv
debian/mysql-server/usr/bin/
*
debian/mysql-server/usr/sbin/
mv
debian/mysql-server/usr/sbin/my_print_defaults debian/mysql-server/usr/bin/
mv
debian/mysql-server/usr/sbin/comp_err debian/mysql-server/usr/bin/
mv
debian/mysql-server/usr/sbin/perror debian/mysql-server/usr/bin/
mysql_perror
mv
debian/mysql-server/usr/sbin/resolveip debian/mysql-server/usr/bin/
mysql_resolveip
mv
debian/mysql-server/usr/sbin/perror debian/mysql-server/usr/bin/
mv
debian/mysql-server/usr/sbin/resolveip debian/mysql-server/usr/bin/
#----- mysql-dev ----
cp
-Rpd
debian/
${
CHAR
}
-shared
/usr/lib/mysql/libmysqlclient.so debian/mysql-dev/usr/lib/
...
...
@@ -67,6 +75,7 @@ cp -r COPYING* MIRRORS README* Docs/* debian/mysql-doc/usr/share/doc/mysql/
#### sql-bench
mv
debian/mysql-server/usr/sql-bench
\
debian/mysql-server/usr/mysql-test
\
debian/mysql-bench/var/mysql/
touch
$STAMPFILE
support-files/debian/mysql-max-debug.dirs
0 → 100644
View file @
01cda092
usr/sbin
support-files/debian/mysql-max-debug.postinst
0 → 100644
View file @
01cda092
#!/bin/sh
update-alternatives
--install
/usr/sbin/mysqld mysqld /usr/sbin/mysqld-max-debug 40
support-files/debian/mysql-max-debug.postrm
0 → 100644
View file @
01cda092
#!/bin/sh
update-alternatives
--auto
mysqld
support-files/debian/mysql-max-shared.dirs
0 → 100644
View file @
01cda092
usr/sbin
support-files/debian/mysql-max-shared.postinst
0 → 100644
View file @
01cda092
#!/bin/sh
update-alternatives
--install
/usr/sbin/mysqld mysqld /usr/sbin/mysqld-max-shared 35
support-files/debian/mysql-max-shared.postrm
0 → 100644
View file @
01cda092
#!/bin/sh
update-alternatives
--auto
mysqld
support-files/debian/mysql-max.dirs
0 → 100644
View file @
01cda092
usr/sbin
support-files/debian/mysql-max.postinst
0 → 100644
View file @
01cda092
#!/bin/sh
update-alternatives
--install
/usr/sbin/mysqld mysqld /usr/sbin/mysqld-max-static 30
support-files/debian/mysql-max.postrm
0 → 100644
View file @
01cda092
#!/bin/sh
update-alternatives
--auto
mysqld
support-files/debian/patches/ab
View file @
01cda092
--- mysql-3.23.23.orig/scripts/Makefile.in
+++ mysql-3.23.23/scripts/Makefile.in
@@ -337,6 +337,7 @@
@RM@ -f $@ $@-t
@SED@ \
-e 's!@''bindir''@!$(bindir)!g' \
+ -e 's!@''sbindir''@!$(sbindir)!g' \
-e 's!@''scriptdir''@!$(bindir)!g' \
-e 's!@''prefix''@!$(prefix)!g' \
-e 's!@''datadir''@!$(datadir)!g' \
--- mysql-3.23.23.orig/support-files/Makefile.in
+++ mysql-3.23.23/support-files/Makefile.in
@@ -308,6 +308,7 @@
@RM@ -f $@ $@-t
@SED@ \
-e 's!@''bindir''@!$(bindir)!g' \
+ -e 's!@''sbindir''@!$(sbindir)!g' \
-e 's!@''scriptdir''@!$(bindir)!g' \
-e 's!@''prefix''@!$(prefix)!g' \
-e 's!@''datadir''@!$(datadir)!g' \
--- mysql-3.23.34a/sql/Makefile.in.orig Mon Mar 12 08:27:39 2001
+++ mysql-3.23.34a/sql/Makefile.in Thu Mar 15 04:11:14 2001
@@ -373,7 +373,7 @@
mysqlbinlog: $(mysqlbinlog_OBJECTS) $(mysqlbinlog_DEPENDENCIES)
@rm -f mysqlbinlog
- $(CXXLINK) $(mysqlbinlog_LDFLAGS) $(mysqlbinlog_OBJECTS) $(mysqlbinlog_LDADD) $(LIBS)
+ $(CXXLINK) $(mysqld_LDFLAGS) $(mysqlbinlog_OBJECTS) $(mysqld_LDADD) $(LIBS)
mysqld: $(mysqld_OBJECTS) $(mysqld_DEPENDENCIES)
@rm -f mysqld
support-files/debian/patches/ad
View file @
01cda092
--- mysql-3.23.23.orig/scripts/mysql_install_db.sh
+++ mysql-3.23.23/scripts/mysql_install_db.sh
@@ -11,6 +11,7 @@
ldata=@localstatedir@
execdir=@libexecdir@
bindir=@bindir@
+sbindir=@sbindir@
force=0
IN_RPM=0
defaults=
@@ -47,6 +48,10 @@
--- mysql-3.23.34a/scripts/mysql_install_db.sh.orig Mon Mar 12 08:18:27 2001
+++ mysql-3.23.34a/scripts/mysql_install_db.sh Thu Mar 15 04:12:28 2001
@@ -325,7 +325,7 @@
if test "$IN_RPM" -eq 0
then
bindir=`grep "^bindir" $conf | sed 's;^[^=]*=[ \t]*;;' | sed 's;[ \t]$;;'`
fi
+ if grep "^sbindir" $conf >/dev/null
+ then
+ sbindir=`grep "^sbindir" $conf | sed '.*=[ \t]*//`
+ fi
if grep "^user" $conf >/dev/null
then
user=`grep "^user" $conf | sed 's;^[^=]*=[ \t]*;;' | sed 's;[ \t]$;;'`
@@ -56,7 +61,7 @@
for arg
do
case "$arg" in
- --basedir=*) basedir=`echo "$arg"|sed 's;^--basedir=;;'`; bindir="$basedir/bin"; execdir="$basedir/libexec" ;;
+ --basedir=*) basedir=`echo "$arg"|sed 's;^--basedir=;;'`; bindir="$basedir/bin"; sbindir="$basedir/sbin"; execdir="$basedir/libexec" ;;
--datadir=*) ldata=`echo "$arg"|sed 's;^--datadir=;;'` ;;
--user=*) user=`echo "$arg"|sed 's;^--user=;;'` ;;
esac
@@ -82,10 +87,10 @@
# Check if hostname is valid
if test "$IN_RPM" -eq 0 -a $force -eq 0
then
- resolved=`$bindir/resolveip $hostname 2>&1`
+ resolved=`$bindir/mysql_resolveip $hostname 2>&1`
if [ $? -ne 0 ]
then
- resolved=`$bindir/resolveip localhost 2>&1`
+ resolved=`$bindir/mysql_resolveip localhost 2>&1`
if [ $? -eq 0 ]
then
echo "Sorry, the host '$hostname' could not be looked up."
@@ -300,7 +305,7 @@
if test -z "$IN_RPM"
then
echo "You can start the MySQL demon with:"
echo "You can start the MySQL daemon with:"
- echo "cd @prefix@ ; $bindir/safe_mysqld &"
+ echo "cd @prefix@ ; $sbindir/safe_mysqld &"
echo
echo "You can test the MySQL demon with the benchmarks in the 'sql-bench' directory:"
echo "You can test the MySQL d
a
emon with the benchmarks in the 'sql-bench' directory:"
echo "cd sql-bench ; run-all-tests"
support-files/debian/patches/ae
View file @
01cda092
--- mysql-3.23.
23.orig/support-files/mysql.server.sh Tue Sep 5 19:13:35 2000
+++ mysql-3.23.
23/support-files/mysql.server.sh Tue Sep 5 19:19:40 2000
@@ -
16,6 +16,7
@@
PATH=/sbin:/usr/sbin:/bin:/usr/bi
n
--- mysql-3.23.
30-gamma/support-files/mysql.server.sh.orig Thu Jan 4 11:03:57 2001
+++ mysql-3.23.
30-gamma/support-files/mysql.server.sh Sat Jan 6 12:18:50 2001
@@ -
28,8 +28,10
@@
the
n
basedir=@prefix@
bindir=@bindir@
+sbindir=@sbindir@
datadir=@localstatedir@
pid_file=@localstatedir@/mysqld.pid
log_file=@localstatedir@/mysqld.log
@@ -64,6 +65,10 @@
then
bindir=`grep "^bindir" $conf | cut -f 2 -d= | tr -d ' '`
+ sbindir=@sbindir@
else
bindir="$basedir/bin"
+ sbindir="$basedir/sbin"
fi
+ if grep "^sbindir" $conf >/dev/null
+ then
+ sbindir=`grep "^sbindir" $conf | cut -f 2 -d= | tr -d ' '`
+ fi
if grep "^log[ \t]*=" $conf >/dev/null
if test -z "$pid_file"
then
log_file=`grep "log[ \t]*=" $conf | cut -f 2 -d= | tr -d ' '`
@@ -78,14 +83,15 @@
@@ -100,18 +102,18 @@
'start')
# Start daemon
...
...
@@ -28,11 +20,13 @@
then
# Give extra arguments to mysqld with the my.cnf file. This script may
# be overwritten at next upgrade.
- $bindir/safe_mysqld \
- --user=$mysql_daemon_user --datadir=$datadir --pid-file=$pid_file --log=$log_file &
+ $sbindir/safe_mysqld \
+ --user=$mysql_daemon_user --datadir=$datadir --pid-file=$pid_file &
+# --log=$log_file &
- $bindir/safe_mysqld --datadir=$datadir --pid-file=$pid_file &
+ $sbindir/safe_mysqld --datadir=$datadir --pid-file=$pid_file &
# Make lock for RedHat / SuSE
if test -w /var/lock/subsys
then
touch /var/lock/subsys/mysql
fi
else
- echo "Can't execute $bindir/safe_mysqld"
+ echo "Can't execute $sbindir/safe_mysqld"
...
...
support-files/debian/patches/ta
0 → 100644
View file @
01cda092
--- mysql-3.23.34a/mysql-test/install_test_db.sh.orig Mon Mar 12 08:18:24 2001
+++ mysql-3.23.34a/mysql-test/install_test_db.sh Thu Mar 15 04:11:14 2001
@@ -5,6 +5,15 @@
# This scripts creates the privilege tables db, host, user, tables_priv,
# columns_priv in the mysql database, as well as the func table.
+if [ x$1 = x"-debian" ]; then
+ DEBIAN=1
+ shift 1
+ execdir=/usr/sbin
+ bindir=/usr/bin
+ BINARY_DIST=1
+ fix_bin=/var/mysql/mysql-test
+else
+
if [ x$1 = x"-bin" ]; then
shift 1
execdir=../bin
@@ -17,6 +26,10 @@
fix_bin=.
fi
+fi
+
+
+
vardir=var
logdir=$vardir/log
if [ x$1 = x"-slave" ]
@@ -47,12 +60,17 @@
#create the directories
[ -d $vardir ] || mkdir $vardir
[ -d $logdir ] || mkdir $logdir
+[ "x$RUN_USER" != "x" ] && chown -R $RUN_USER $logdir
# Create database directories mysql & test
if [ -d $data ] ; then rm -rf $data ; fi
mkdir $data $data/mysql $data/test
#for error messages
+if [ "x$DEBIAN" = "x1" ]; then
+ basedir=/usr
+else
+
if [ x$BINARY_DIST = x1 ] ; then
basedir=..
else
@@ -62,6 +80,10 @@
ln -sf ../../sql/share share/mysql
fi
+fi
+
+
+
# Initialize variables
c_d="" i_d=""
c_h="" i_h=""
@@ -211,7 +233,9 @@
$c_c
END_OF_DATA
then
+ [ "x$RUN_USER" != "x" ] && chown -R $RUN_USER $ldata
exit 0
else
+ [ "x$RUN_USER" != "x" ] && chown -R $RUN_USER $ldata
exit 1
fi
support-files/debian/patches/tb
0 → 100644
View file @
01cda092
--- mysql-3.23.34a/mysql-test/mysql-test-run.sh.orig Mon Mar 12 08:18:27 2001
+++ mysql-3.23.34a/mysql-test/mysql-test-run.sh Thu Mar 15 04:11:14 2001
@@ -37,9 +37,23 @@
XARGS=`which xargs | head -1`
SED=sed
+if [ $USER = root ]; then
+ RUN_USER="mysql"
+ RUN_USER_OPT="--user=$RUN_USER"
+ export RUN_USER
+fi
+
+
# Are we using a source or a binary distribution?
testdir=@testdir@
+
+if [ -d /var/mysql/mysql-test ]; then
+ DEBIAN=1
+ cd /var/mysql/mysql-test
+ testdir=/var/mysql
+fi
+
if [ -d bin/mysqld ] && [ -d mysql-test ] ; then
cd mysql-test
else
@@ -56,6 +70,10 @@
exit 1
fi
+if [ x$DEBIAN = x1 ]; then
+ MY_BASEDIR=/usr
+fi
+
#++
# Misc. Definitions
#--
@@ -184,12 +202,21 @@
[ -d $MYSQL_TEST_DIR/var ] || mkdir $MYSQL_TEST_DIR/var
[ -d $MYSQL_TEST_DIR/var/tmp ] || mkdir $MYSQL_TEST_DIR/var/tmp
[ -d $MYSQL_TEST_DIR/var/run ] || mkdir $MYSQL_TEST_DIR/var/run
+[ -d $MYSQL_TEST_DIR -a "x$RUN_USER" != "x" ] && chown -R $RUN_USER $MYSQL_TEST_DIR
[ -z "$COLUMNS" ] && COLUMNS=80
E=`$EXPR $COLUMNS - 8`
#DASH72=`expr substr '------------------------------------------------------------------------' 1 $E`
DASH72=`$ECHO '------------------------------------------------------------------------'|$CUT -c 1-$E`
+if [ "x$DEBIAN" = "x1" ]; then
+ MYSQLD="/usr/sbin/mysqld"
+ MYSQL_TEST="/usr/sbin/mysqltest"
+ MYSQLADMIN="/usr/bin/mysqladmin"
+ INSTALL_DB="/var/mysql/mysql-test/install_test_db -debian"
+
+else
+
# on source dist, we pick up freshly build executables
# on binary, use what is installed
if [ x$SOURCE_DIST = x1 ] ; then
@@ -250,6 +277,8 @@
read unused
}
+fi
+
error () {
$ECHO "Error: $1"
@@ -365,7 +394,7 @@
--language=english \
--innobase_data_file_path=ibdata1:50M \
$SMALL_SERVER \
- $EXTRA_MASTER_OPT $EXTRA_MASTER_MYSQLD_OPT"
+ $RUN_USER_OPT $EXTRA_MASTER_OPT $EXTRA_MASTER_MYSQLD_OPT"
if [ x$DO_DDD = x1 ]
then
$ECHO "set args $master_args" > $GDB_MASTER_INIT
@@ -420,7 +449,7 @@
--language=english \
--skip-innobase \
$SMALL_SERVER \
- $EXTRA_SLAVE_OPT $EXTRA_SLAVE_MYSQLD_OPT"
+ $RUN_USER_OPT $EXTRA_SLAVE_OPT $EXTRA_SLAVE_MYSQLD_OPT"
if [ x$DO_DDD = x1 ]
then
$ECHO "set args $master_args" > $GDB_SLAVE_INIT
support-files/debian/rules
View file @
01cda092
...
...
@@ -4,9 +4,11 @@
package=mysql
CHARSET=ujis
SYSNAME=
TEMPINST=build
#CFLAGS="-O6 -mpentium -mstack-align-double -fomit-frame-pointer" CXX=gcc CXXFLAGS="-O6 -mpentium -mstack-align-double -fomit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --enable-assembler --with-mysqld-ldflags=-all-static
#
CFLAGS="-O6 -mpentium -mstack-align-double -fomit-frame-pointer" CXX=gcc CXXFLAGS="-O6 -mpentium -mstack-align-double -fomit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --enable-assembler --with-mysqld-ldflags=-all-static
CC=gcc
CFLAGS=-O6 -fomit-frame-pointer
...
...
@@ -14,7 +16,6 @@ CXX=gcc
CXXFLAGS=-O6 -fomit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti
# CXXFLAGS=-O6 -fomit-frame-pointer -felide-constructors -fno-rtti
SYSNAME=
COMMONCONF= --prefix=/usr --libexecdir=/usr/sbin \
--localstatedir=/var/mysql/data \
--enable-shared \
...
...
@@ -26,8 +27,14 @@ COMMONCONF= --prefix=/usr --libexecdir=/usr/sbin \
SERVERCONF=$(COMMONCONF) --enable-assembler \
--with-raid
MYSQLMAXCONF= --with-server-suffix=-Max \
--with-innodb \
--with-berkeley-db
# --with-gemini \
# --with-berkeley-db-includes=/usr/include/db3 \
# --with-berkeley-db-libs=/usr/lib
/libdb3.a
# --with-berkeley-db-libs=/usr/lib
STATICCONF=--with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static
...
...
@@ -37,6 +44,7 @@ CLIENTCONF=$(COMMONCONF) --without-server
patches debian/stamp-patches:
-test -e debian/stamp-patches || \
for i in `find debian/patches -type f -print` ; do \
echo "==== $$i ====" ; \
patch -p1 < $$i ; \
done
touch debian/stamp-patches
...
...
@@ -46,9 +54,15 @@ premkdir debian/stamp-premkdir:
$(checkdir)
-rm -rf debian/tmp debian/$(TEMPINST)*
dh_installdirs
-install -d debian/$(TEMPINST)/usr/{bin,sbin,share,man,include,info}
-install -d debian/$(TEMPINST)-shared/usr/{bin,sbin,share,man,include,info}
-install -d debian/$(TEMPINST)-debug/usr/{bin,sbin,share,man,include,info}
for i in '' -shared -debug -max -max-shared -max-debug ; do \
install -d debian/$(TEMPINST)$${i}/usr/{bin,sbin,share,man,include,info} ; \
done
# -install -d debian/$(TEMPINST)$${i}/usr/{bin,sbin,share,man,include,info}
# -install -d debian/$(TEMPINST)-shared/usr/{bin,sbin,share,man,include,info}
# -install -d debian/$(TEMPINST)-debug/usr/{bin,sbin,share,man,include,info}
touch debian/stamp-premkdir
##################################################
...
...
@@ -59,6 +73,7 @@ config debian/stamp-config: debian/stamp-premkdir debian/stamp-patches
--with-charset=$(CHARSET) \
--with-bench \
$(SYSNAME)
# sed 's/-fno-implicit-templates//g' sql/Makefile > .m
# mv .m sql/Makefile
touch debian/stamp-config
...
...
@@ -101,6 +116,51 @@ build-debug debian/stamp-build-debug: debian/stamp-patches
touch debian/stamp-build-debug
##################################################
debian/stamp-mysql-max: debian/stamp-mysql-max-static debian/stamp-mysql-max-shared debian/stamp-mysql-max-debug
debian/stamp-mysql-max-static: debian/stamp-premkdir debian/stamp-patches
-make distclean
CC=$(CC) CFLAGS="$(CFLAGS)" CXX=$(CXX) CXXFLAGS="$(CXXFLAGS)" \
./configure $(SERVERCONF) $(STATICCONF) \
$(MYSQLMAXCONF) \
--with-charset=$(CHARSET) \
$(SYSNAME)
make LDFLAGS="-static"
make install DESTDIR=`pwd`/debian/$(TEMPINST)-max
touch debian/stamp-mysql-max-static
debian/stamp-mysql-max-shared: debian/stamp-premkdir debian/stamp-patches
-make distclean
CC=$(CC) CFLAGS="$(CFLAGS)" CXX=$(CXX) CXXFLAGS="$(CXXFLAGS)" \
./configure $(SERVERCONF) \
$(MYSQLMAXCONF) \
--with-charset=$(CHARSET) \
$(SYSNAME)
make
make install DESTDIR=`pwd`/debian/$(TEMPINST)-max-shared
touch debian/stamp-mysql-max-shared
debian/stamp-mysql-max-debug: debian/stamp-premkdir debian/stamp-patches
-make distclean
CC=$(CC) CFLAGS="$(CFLAGS)" CXX=$(CXX) CXXFLAGS="$(CXXFLAGS)" \
./configure $(SERVERCONF) \
$(MYSQLMAXCONF) \
--with-charset=$(CHARSET) \
--with-debug \
$(SYSNAME)
make
make install DESTDIR=`pwd`/debian/$(TEMPINST)-max-debug
touch debian/stamp-mysql-max-debug
##################################################
clean:
$(checkdir)
...
...
@@ -123,12 +183,12 @@ binary-indep: checkroot build
# generated by this package. If there were any they would be
# made here.
binary-arch: checkroot build debian/stamp-build-shared debian/stamp-build-debug
binary-arch: checkroot build debian/stamp-build-shared debian/stamp-build-debug
debian/stamp-mysql-max
sh debian/move
### init, post*
dh_installdeb
cp debian/shlibs debian/libmysqlclient
9
/DEBIAN/
cp debian/shlibs debian/libmysqlclient
10
/DEBIAN/
cp debian/my.cnf debian/mysql-server/etc/
cp support-files/mysql.server debian/mysql-server/etc/init.d/mysql ; chmod +x debian/mysql-server/etc/init.d/mysql
...
...
@@ -143,7 +203,7 @@ binary-arch: checkroot build debian/stamp-build-shared debian/stamp-build-debug
dh_shlibdeps
dh_gencontrol
dpkg --build debian/libmysqlclient
9
..
dpkg --build debian/libmysqlclient
10
..
dpkg --build debian/mysql-client ..
dpkg --build debian/mysql-server ..
dpkg --build debian/mysql-server-shared ..
...
...
@@ -151,6 +211,9 @@ binary-arch: checkroot build debian/stamp-build-shared debian/stamp-build-debug
dpkg --build debian/mysql-dev ..
dpkg --build debian/mysql-bench ..
dpkg --build debian/mysql-doc ..
dpkg --build debian/mysql-max ..
dpkg --build debian/mysql-max-shared ..
dpkg --build debian/mysql-max-debug ..
define checkdir
test -f debian/rules
...
...
support-files/debian/shlibs
View file @
01cda092
libmysqlclient
9 libmysqlclient9
libmysqlclient
10 libmysqlclient10
tests/fork2_test.pl
View file @
01cda092
...
...
@@ -6,6 +6,9 @@
# the last 3 does different selects on the tables.
# Er, hmmm..., something like that :^)
# Modified to do crazy-join, la Nasdaq.
#
# This test uses the old obsolete mysql interface. For a test that uses
# DBI, please take a look at fork_big.pl
$opt_loop_count
=
10000
;
# Change this to make test harder/easier
...
...
@@ -26,8 +29,8 @@ GetOptions("host=s","db=s","loop-count=i","skip-create","skip-in",
"
force
")
||
die
"
Aborted
";
$opt_verbose
=
$opt_debug
=
$opt_lock_tables
=
$opt_fast_insert
=
$opt_fast
=
$opt_skip_in
=
$
Mysql::
db_errstr
=
$opt_force
=
undef
;
# Ignore warnings from these
print
"
Testing
9
multiple connections to a server with 1 insert/update
\n
";
print
"
and 8 select connections.
\n
";
print
"
Testing
10
multiple connections to a server with 1 insert/update
\n
";
print
"
and 8 select connections
and one ALTER TABLE
.
\n
";
@testtables
=
qw(bench_f21 bench_f22 bench_f23 bench_f24 bench_f25)
;
...
...
@@ -83,6 +86,7 @@ test_2() if (($pid=fork()) == 0); $work{$pid}="simple3";
test_3
()
if
((
$pid
=
fork
())
==
0
);
$work
{
$pid
}
=
"
funny3
";
test_2
()
if
((
$pid
=
fork
())
==
0
);
$work
{
$pid
}
=
"
simple4
";
test_3
()
if
((
$pid
=
fork
())
==
0
);
$work
{
$pid
}
=
"
funny4
";
alter_test
()
if
((
$pid
=
fork
())
==
0
);
$work
{
$pid
}
=
"
alter
";
$errors
=
0
;
while
((
$pid
=
wait
())
!=
-
1
)
...
...
@@ -205,6 +209,33 @@ sub test_3
exit
(
0
);
}
#
# Do an ALTER TABLE every 20 seconds
#
sub
alter_test
{
my
(
$dbh
,
$count
,
$old_row_count
,
$row_count
,
$id
,
@row
,
$sth
);
$dbh
=
Mysql
->
Connect
(
$opt_host
,
$opt_db
)
||
die
$
Mysql::
db_errstr
;
$id
=
$count
=
$row_count
=
0
;
$old_row_count
=
-
1
;
# Execute the test as long as we get more data into the table
while
(
$row_count
!=
$old_row_count
)
{
sleep
(
10
);
$sth
=
$dbh
->
Query
("
ALTER TABLE
$testtables
[
$id
] modify info varchar(32)
")
or
die
"
Couldn't execute ALTER TABLE
\n
";
$sth
=
0
;
$id
=
(
$id
+
1
)
%
$numtables
;
# Test if insert test has ended
$sth
=
$dbh
->
query
("
select count(*) from
$testtables
[0]
")
or
die
"
Couldn't execute count(*)
\n
";
@row
=
$sth
->
FetchRow
();
$old_row_count
=
$row_count
;
$row_count
=
$row
[
0
];
$count
++
;
}
$dbh
=
0
;
print
"
alter: Executed
$count
ALTER TABLE commands
\n
";
exit
(
0
);
}
tests/fork_big.pl
View file @
01cda092
...
...
@@ -23,7 +23,7 @@ GetOptions("host=s","db=s","user=s","password=s","loop-count=i","skip-create","s
$opt_verbose
=
$opt_debug
=
$opt_lock_tables
=
$opt_fast_insert
=
$opt_fast
=
$opt_skip_in
=
$opt_force
=
undef
;
# Ignore warnings from these
print
"
Test of multiple connections that test the following things:
\n
";
print
"
insert, select, delete, update, check, repair and flush
\n
";
print
"
insert, select, delete, update,
alter,
check, repair and flush
\n
";
@testtables
=
(
["
bench_f31
",
""],
["
bench_f32
",
"
row_format=fixed
"],
...
...
@@ -34,6 +34,7 @@ $abort_table="bench_f39";
$numtables
=
$#testtables
+
1
;
srand
100
;
# Make random numbers repeatable
####
#### Start timeing and start test
####
...
...
@@ -88,12 +89,14 @@ for ($i=0 ; $i < $opt_threads ; $i ++)
{
test_select
()
if
((
$pid
=
fork
())
==
0
);
$work
{
$pid
}
=
"
select_key
";
}
test_join
()
if
((
$pid
=
fork
())
==
0
);
$work
{
$pid
}
=
"
test_join
";
test_select_count
()
if
((
$pid
=
fork
())
==
0
);
$work
{
$pid
}
=
"
select_count
";
test_delete
()
if
((
$pid
=
fork
())
==
0
);
$work
{
$pid
}
=
"
delete
";
test_update
()
if
((
$pid
=
fork
())
==
0
);
$work
{
$pid
}
=
"
update
";
test_flush
()
if
((
$pid
=
fork
())
==
0
);
$work
{
$pid
}
=
"
flush
";
test_check
()
if
((
$pid
=
fork
())
==
0
);
$work
{
$pid
}
=
"
check
";
test_repair
()
if
((
$pid
=
fork
())
==
0
);
$work
{
$pid
}
=
"
repair
";
test_alter
()
if
((
$pid
=
fork
())
==
0
);
$work
{
$pid
}
=
"
alter
";
#test_database("test2") if (($pid=fork()) == 0); $work{$pid}="check_database";
print
"
Started
"
.
(
$opt_threads
*
2
+
4
)
.
"
threads
\n
";
...
...
@@ -243,6 +246,44 @@ sub test_select_count
exit
(
0
);
}
#
# select records
# Do continously joins between the first and second table
#
sub
test_join
{
my
(
$dbh
,
$i
,
$j
,
$count
,
$loop
);
$dbh
=
DBI
->
connect
("
DBI:mysql:
$opt_db
:
$opt_host
",
$opt_user
,
$opt_password
,
{
PrintError
=>
0
})
||
die
$
DBI::
errstr
;
$count_query
=
make_count_query
(
$numtables
);
$count
=
0
;
$loop
=
9999
;
$i
=
0
;
while
((
$i
++
%
100
)
||
!
test_if_abort
(
$dbh
))
{
if
(
$loop
++
>=
100
)
{
$loop
=
0
;
$row_counts
=
simple_query
(
$dbh
,
$count_query
);
}
for
(
$j
=
0
;
$j
<
$numtables
-
1
;
$j
++
)
{
my
(
$id
)
=
int
rand
$row_counts
->
[
$j
];
my
(
$t1
,
$t2
)
=
(
$testtables
[
$j
]
->
[
0
],
$testtables
[
$j
+
1
]
->
[
0
]);
simple_query
(
$dbh
,
"
select
$t1
.id,
$t2
.info from
$t1
,
$t2
where
$t1
.id=
$t2
.id and
$t1
.id=
$id
");
$count
++
;
}
}
$dbh
->
disconnect
;
$dbh
=
0
;
print
"
Test_join: Executed
$count
joins
\n
";
exit
(
0
);
}
#
# Delete 1-5 rows from the first 2 tables.
# Test ends when the number of rows for table 3 didn't change during
...
...
@@ -457,6 +498,29 @@ sub test_database
exit
(
0
);
}
#
# Test ALTER TABLE on the second table
#
sub
test_alter
{
my
(
$dbh
,
$row
,
$i
,
$type
,
$table
);
$dbh
=
DBI
->
connect
("
DBI:mysql:
$opt_db
:
$opt_host
",
$opt_user
,
$opt_password
,
{
PrintError
=>
0
})
||
die
$
DBI::
errstr
;
for
(
$i
=
0
;
!
test_if_abort
(
$dbh
)
;
$i
++
)
{
sleep
(
100
);
$table
=
$testtables
[
1
]
->
[
0
];
$sth
=
$dbh
->
prepare
("
ALTER table
$table
modify info char(32)
")
||
die
"
Got error on prepare:
$DBI
::errstr
\n
";
$sth
->
execute
||
die
$
DBI::
errstr
;
}
$dbh
->
disconnect
;
$dbh
=
0
;
print
"
test_alter: Executed
$i
ALTER TABLE
\n
";
exit
(
0
);
}
#
# Help functions
...
...
@@ -507,8 +571,8 @@ sub simple_query()
my
(
$dbh
,
$query
)
=
@_
;
my
(
$sth
,
$row
);
$sth
=
$dbh
->
prepare
(
$query
)
||
die
"
Got error on '
$query
':
$DBI
::errstr
\n
";
$sth
->
execute
||
die
"
Got error on '
$query
':
$dbh
->errstr
\n
";
$sth
=
$dbh
->
prepare
(
$query
)
||
die
"
Got error on '
$query
':
"
.
$dbh
->
errstr
.
"
\n
";
$sth
->
execute
||
die
"
Got error on '
$query
':
"
.
$dbh
->
errstr
.
"
\n
";
$row
=
$sth
->
fetchrow_arrayref
();
$sth
=
0
;
return
$row
;
...
...
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