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
79caca1d
Commit
79caca1d
authored
Nov 29, 2001
by
monty@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Plain Diff
Merge work:/home/bk/mysql-4.0 into hundin.mysql.fi:/my/bk/mysql-4.0
parents
6aef7476
ce7a0a02
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
216 additions
and
63 deletions
+216
-63
Build-tools/Do-compile
Build-tools/Do-compile
+5
-2
Docs/manual.texi
Docs/manual.texi
+104
-32
client/get_password.c
client/get_password.c
+13
-13
myisam/mi_locking.c
myisam/mi_locking.c
+3
-4
myisam/myisamdef.h
myisam/myisamdef.h
+1
-1
mysys/my_init.c
mysys/my_init.c
+1
-1
mysys/my_seek.c
mysys/my_seek.c
+1
-1
sql-bench/server-cfg.sh
sql-bench/server-cfg.sh
+74
-2
sql/sql_handler.cc
sql/sql_handler.cc
+4
-0
sql/sql_update.cc
sql/sql_update.cc
+2
-2
tests/mail_to_db.pl
tests/mail_to_db.pl
+6
-3
tools/mysqlmanager.c
tools/mysqlmanager.c
+2
-2
No files found.
Build-tools/Do-compile
View file @
79caca1d
...
@@ -19,7 +19,7 @@ if ($opt_innodb || $opt_bdb)
...
@@ -19,7 +19,7 @@ if ($opt_innodb || $opt_bdb)
chomp
(
$host
=
`
hostname
`);
chomp
(
$host
=
`
hostname
`);
$full_host_name
=
$host
;
$full_host_name
=
$host
;
info
("
Compiling MySQL
$version_suffix
at
$host
, stage:
$opt_stage
\n
");
info
("
Compiling MySQL
$version_suffix
at
$host
$suffix
, stage:
$opt_stage
\n
");
$connect_option
=
(
$opt_tcpip
?
"
--host=
$host
"
:
"");
$connect_option
=
(
$opt_tcpip
?
"
--host=
$host
"
:
"");
$host
=~
/^([^.-]*)/
;
$host
=~
/^([^.-]*)/
;
$host
=
$1
.
$opt_suffix
;
$host
=
$1
.
$opt_suffix
;
...
@@ -36,6 +36,10 @@ if (defined($gcc_version) && ! $opt_config_env)
...
@@ -36,6 +36,10 @@ if (defined($gcc_version) && ! $opt_config_env)
{
{
$opt_config_env
=
'
CC=gcc CFLAGS="-O2 -fno-omit-frame-pointer" CXX=gcc CXXFLAGS="-O2 -fno-omit-frame-pointer"
';
$opt_config_env
=
'
CC=gcc CFLAGS="-O2 -fno-omit-frame-pointer" CXX=gcc CXXFLAGS="-O2 -fno-omit-frame-pointer"
';
}
}
elsif
(
$tmp
=~
/version 3\.0\./
)
{
$opt_config_env
=
'
CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti"
';
}
else
else
{
{
$opt_config_env
=
'
CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXX=gcc CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti"
';
$opt_config_env
=
'
CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXX=gcc CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti"
';
...
@@ -107,7 +111,6 @@ $|=1;
...
@@ -107,7 +111,6 @@ $|=1;
safe_cd
("
$host
");
safe_cd
("
$host
");
if
(
$opt_stage
==
0
&&
!
$opt_use_old_distribution
)
if
(
$opt_stage
==
0
&&
!
$opt_use_old_distribution
)
{
{
my
(
$name
);
safe_system
("
gunzip <
$opt_distribution
|
$tar
xf -
");
safe_system
("
gunzip <
$opt_distribution
|
$tar
xf -
");
# Fix file times; This is needed because the time for files may be
# Fix file times; This is needed because the time for files may be
...
...
Docs/manual.texi
View file @
79caca1d
...
@@ -7704,6 +7704,11 @@ also work. There have been some problems with the @code{glibc} RPMs from
...
@@ -7704,6 +7704,11 @@ also work. There have been some problems with the @code{glibc} RPMs from
RedHat, so if you have problems, check whether or not there are any updates!
RedHat, so if you have problems, check whether or not there are any updates!
The @code{glibc} 2.0.7-19 and 2.0.7-29 RPMs are known to work.
The @code{glibc} 2.0.7-19 and 2.0.7-29 RPMs are known to work.
If you are using gcc 3.0 and above to compile MySQL, you must install
the @code{libstdc++v3} library before compiling MySQL; If you don't do
this you will get an error about a missing @code{__cxa_pure_virtual}
symbol during linking!
On some older Linux distributions, @code{configure} may produce an error
On some older Linux distributions, @code{configure} may produce an error
like this:
like this:
...
@@ -7757,7 +7762,7 @@ shell> CXX=gcc ./configure
...
@@ -7757,7 +7762,7 @@ shell> CXX=gcc ./configure
@end example
@end example
If you are running gcc 3.0 and above, you can't use the above trick with
If you are running gcc 3.0 and above, you can't use the above trick with
CXX=gcc, but you have to install libstd++
.
setting to CXX=gcc
.
@node Linux-SPARC, Linux-Alpha, Linux-x86, Linux
@node Linux-SPARC, Linux-Alpha, Linux-x86, Linux
@subsubsection Linux SPARC Notes
@subsubsection Linux SPARC Notes
...
@@ -9419,7 +9424,7 @@ work:
...
@@ -9419,7 +9424,7 @@ work:
CC="cc -pthread"
CC="cc -pthread"
CFLAGS="-O4 -ansi_alias -ansi_args -fast -inline speed all -arch host"
CFLAGS="-O4 -ansi_alias -ansi_args -fast -inline speed all -arch host"
CXX="cxx -pthread"
CXX="cxx -pthread"
CXXFLAGS="-O4 -ansi_alias -ansi_args -fast -inline speed all -arch host"
CXXFLAGS="-O4 -ansi_alias -ansi_args -fast -inline speed all -arch host
-noexceptions -nortti
"
export CC CFLAGS CXX CXXFLAGS
export CC CFLAGS CXX CXXFLAGS
./configure \
./configure \
--prefix=/usr/local/mysql \
--prefix=/usr/local/mysql \
...
@@ -18622,36 +18627,103 @@ one extra connection for a client with the @code{Process_priv} privilege
...
@@ -18622,36 +18627,103 @@ one extra connection for a client with the @code{Process_priv} privilege
to ensure that you should always be able to login and check the system
to ensure that you should always be able to login and check the system
(assuming you are not giving this privilege to all your users).
(assuming you are not giving this privilege to all your users).
Some frequently asked states in @code{mysqladmin processlist}
Some frequently states in @code{mysqladmin processlist}
@code{WAITING FOR TABLES}
@itemize @bullet
@item @code{Checking table}
This means that the server is trying to get a lock of a
The thread doing an [automatic ?] checking of the table.
table(s). Usually this should happen very fast, unless there is some
@item @code{Closing tables}
problem around, such as another program holding table files open (e.g
Means that the thread is flushing the changed table data to disk and
@code{myisamchk}, anohter instance of @code{mysqld}), @code{mysqld} is
closing the used tables. This should be a fast operation. If not, then
run without @code{--skip-locking}, table files are nfs mounted for
you should check that you don't have a full disk or that the disk is not
@code{mysqld}, etc.
in very heavy use.
@item @code{Copying to tmp table on disk}
@code{OPENING TABLES}
The temporary result set was larger than @code{tmp_table_size} and the
thread is now changing the in memory based temporary table to a disk
This simply means that the thread is trying to open a table. This also
based one to save memory.
should be very instant procedure, unless something prevents opening. An
@item @code{Creating tmp table}
@code{ALTER TABLE}, for example, can prevent opening a table until the
The thread is creating a temporary table to hold a part of the result for
command is finished. If someone runs @code{FLUSH TABLES} simultaneously
the query.
with an @code{ALTER TABLE}, then all the threads that are trying to use
@item @code{deleting from main table}
the table in @code{ALTER TABLE} query will be in this state.
When executing the first part of a multi-table delete and we are only
deleting from the first table.
@code{CLOSING TABLES}
@item @code{deleting from reference tables}
When executing the second part of a multi-table delete and we are deleting
Means that the thread is closing the tables that the thread was using.
the matched rows from the other tables.
If this is taking long, please check for the above for possible reasons
@item @code{Flushing tables}
why it might be taking long.
The thread is executing @code{FLUSH TABLES} and is waiting for all
threads to close their tables.
All of the above are usually very quick operations. If threads last
@item @code{Killed}
in any of these states for many seconds, there may be a problem around
Someone has sent a kill to the thread and it should abort next time it
that needs to be investigated. Check also that you have not run out
checks the kill flag. The flag is checked in each major loop in MySQL,
of harddisk space.
but in some cases it may still take a short time for the thread to die.
If the thread is locked by some other thread, the kill will take affect
as soon as the other thread releases it's lock.
@item @code{Sending data}
The thread is processing rows for a @code{SELECT} statement and is
also sending data to the client.
@item @code{Sorting for group}
The thread is doing a sort to satsify a @code{GROUP BY}.
@item @code{Sorting for order}
The thread is doing a sort to satsify a @code{ORDER BY}.
@item @code{Opening tables}
This simply means that the thread is trying to open a table. This is
should be very fast procedure, unless something prevents opening. For
example an @code{ALTER TABLE} or a @code{LOCK TABLE} can prevent opening
a table until the command is finished.
@item @code{Removing duplicates}
The query was using @code{SELECT DISTINCT} in such a way that MySQL
couldn't optimize that distinct away at an early stage. Because of this
MySQL has to do an extra stage to remove all duplicated rows before
sending the result to the client.
@item @code{Reopen table}
The thread got a lock for the table, but noticed after getting the lock
that the underlying table structure changed. It has freed the lock,
closed the table and is now trying to reopen it.
@item @code{Repair by sorting}
The repair code is using sorting to create indexes.
@item @code{Repair with keycache}
The repair code is using creating keys one by one through the key cache.
This is much slower than @code{Repair by sorting}.
@item @code{Searching rows for update}
The thread is doing a first phase to find all matching rows before
updating them. This has to be done if the @code{UPDATE} is changing
the index that is used to find the involved rows.
@item @code{Sleeping}
The thread is wating for the client to send a new command to it.
@item @code{System lock}
The thread is waiting for getting to get a external system lock for the
table. If you are not using multiple mysqld servers that are accessing
the same tables, you can disable system locks with the
@code{--skip-locking} option.
@item @code{Upgrading lock}
The @code{INSERT DELAYED} handler is trying to get a lock for the table
to insert rows.
@item @code{Updating}
The thread is searching for rows to update and updating them.
@item @code{User Lock}
The thread is waiting on a @code{GET_LOCK()}.
@item @code{Waiting for tables}
The thread got a notification that the underlying structure for a table
has changed and it needs to reopen the table to get the new structure.
To be able to reopen the table it must however wait until all other
threads have closed the table in question.
This notification happens if another thread has used @code{FLUSH TABLES}
or one of the following commands on the table in question: @code{FLUSH
TABLES table_name}, @code{ALTER TABLE}, @code{RENAME TABLE},
@code{REPAIR TABLE}, @code{ANALYZE TABLE} or @code{OPTIMIZE TABLE}.
@item @code{waiting for handler insert}
The @code{INSERT DELAYED} handler has processed all inserts and are
waiting to get new ones.
@end itemize
Most states are very quick operations. If threads last in any of these
states for many seconds, there may be a problem around that needs to be
investigated.
There are some other states that are not mentioned above, but most of
these are only useful to find bugs in @code{mysqld}.
@node SHOW GRANTS, SHOW CREATE TABLE, SHOW PROCESSLIST, SHOW
@node SHOW GRANTS, SHOW CREATE TABLE, SHOW PROCESSLIST, SHOW
@subsubsection @code{SHOW GRANTS}
@subsubsection @code{SHOW GRANTS}
client/get_password.c
View file @
79caca1d
...
@@ -72,7 +72,7 @@ char *get_tty_password(char *opt_message)
...
@@ -72,7 +72,7 @@ char *get_tty_password(char *opt_message)
char
*
pos
=
to
,
*
end
=
to
+
sizeof
(
to
)
-
1
;
char
*
pos
=
to
,
*
end
=
to
+
sizeof
(
to
)
-
1
;
int
i
=
0
;
int
i
=
0
;
DBUG_ENTER
(
"get_tty_password"
);
DBUG_ENTER
(
"get_tty_password"
);
fprintf
(
std
out
,
opt_message
?
opt_message
:
"Enter password: "
);
fprintf
(
std
err
,
opt_message
?
opt_message
:
"Enter password: "
);
for
(;;)
for
(;;)
{
{
char
tmp
;
char
tmp
;
...
@@ -125,8 +125,8 @@ static void get_password(char *to,uint length,int fd,bool echo)
...
@@ -125,8 +125,8 @@ static void get_password(char *to,uint length,int fd,bool echo)
{
{
if
(
echo
)
if
(
echo
)
{
{
fputs
(
"
\b
\b
"
,
std
out
);
fputs
(
"
\b
\b
"
,
std
err
);
fflush
(
std
out
);
fflush
(
std
err
);
}
}
pos
--
;
pos
--
;
continue
;
continue
;
...
@@ -138,8 +138,8 @@ static void get_password(char *to,uint length,int fd,bool echo)
...
@@ -138,8 +138,8 @@ static void get_password(char *to,uint length,int fd,bool echo)
continue
;
continue
;
if
(
echo
)
if
(
echo
)
{
{
fputc
(
'*'
,
std
out
);
fputc
(
'*'
,
std
err
);
fflush
(
std
out
);
fflush
(
std
err
);
}
}
*
(
pos
++
)
=
tmp
;
*
(
pos
++
)
=
tmp
;
}
}
...
@@ -172,10 +172,10 @@ char *get_tty_password(char *opt_message)
...
@@ -172,10 +172,10 @@ char *get_tty_password(char *opt_message)
memset
(
passbuff
,
0
,
_PASSWORD_LEN
);
memset
(
passbuff
,
0
,
_PASSWORD_LEN
);
#endif
#endif
#else
#else
if
(
isatty
(
fileno
(
std
out
)))
if
(
isatty
(
fileno
(
std
err
)))
{
{
fputs
(
opt_message
?
opt_message
:
"Enter password: "
,
std
out
);
fputs
(
opt_message
?
opt_message
:
"Enter password: "
,
std
err
);
fflush
(
std
out
);
fflush
(
std
err
);
}
}
#if defined(HAVE_TERMIOS_H)
#if defined(HAVE_TERMIOS_H)
tcgetattr
(
fileno
(
stdin
),
&
org
);
tcgetattr
(
fileno
(
stdin
),
&
org
);
...
@@ -184,7 +184,7 @@ char *get_tty_password(char *opt_message)
...
@@ -184,7 +184,7 @@ char *get_tty_password(char *opt_message)
tmp
.
c_cc
[
VMIN
]
=
1
;
tmp
.
c_cc
[
VMIN
]
=
1
;
tmp
.
c_cc
[
VTIME
]
=
0
;
tmp
.
c_cc
[
VTIME
]
=
0
;
tcsetattr
(
fileno
(
stdin
),
TCSADRAIN
,
&
tmp
);
tcsetattr
(
fileno
(
stdin
),
TCSADRAIN
,
&
tmp
);
get_password
(
buff
,
sizeof
(
buff
)
-
1
,
fileno
(
stdin
),
isatty
(
fileno
(
std
out
)));
get_password
(
buff
,
sizeof
(
buff
)
-
1
,
fileno
(
stdin
),
isatty
(
fileno
(
std
err
)));
tcsetattr
(
fileno
(
stdin
),
TCSADRAIN
,
&
org
);
tcsetattr
(
fileno
(
stdin
),
TCSADRAIN
,
&
org
);
#elif defined(HAVE_TERMIO_H)
#elif defined(HAVE_TERMIO_H)
ioctl
(
fileno
(
stdin
),
(
int
)
TCGETA
,
&
org
);
ioctl
(
fileno
(
stdin
),
(
int
)
TCGETA
,
&
org
);
...
@@ -193,7 +193,7 @@ char *get_tty_password(char *opt_message)
...
@@ -193,7 +193,7 @@ char *get_tty_password(char *opt_message)
tmp
.
c_cc
[
VMIN
]
=
1
;
tmp
.
c_cc
[
VMIN
]
=
1
;
tmp
.
c_cc
[
VTIME
]
=
0
;
tmp
.
c_cc
[
VTIME
]
=
0
;
ioctl
(
fileno
(
stdin
),(
int
)
TCSETA
,
&
tmp
);
ioctl
(
fileno
(
stdin
),(
int
)
TCSETA
,
&
tmp
);
get_password
(
buff
,
sizeof
(
buff
)
-
1
,
fileno
(
stdin
),
isatty
(
fileno
(
std
out
)));
get_password
(
buff
,
sizeof
(
buff
)
-
1
,
fileno
(
stdin
),
isatty
(
fileno
(
std
err
)));
ioctl
(
fileno
(
stdin
),(
int
)
TCSETA
,
&
org
);
ioctl
(
fileno
(
stdin
),(
int
)
TCSETA
,
&
org
);
#else
#else
gtty
(
fileno
(
stdin
),
&
org
);
gtty
(
fileno
(
stdin
),
&
org
);
...
@@ -201,11 +201,11 @@ char *get_tty_password(char *opt_message)
...
@@ -201,11 +201,11 @@ char *get_tty_password(char *opt_message)
tmp
.
sg_flags
&=
~
ECHO
;
tmp
.
sg_flags
&=
~
ECHO
;
tmp
.
sg_flags
|=
RAW
;
tmp
.
sg_flags
|=
RAW
;
stty
(
fileno
(
stdin
),
&
tmp
);
stty
(
fileno
(
stdin
),
&
tmp
);
get_password
(
buff
,
sizeof
(
buff
)
-
1
,
fileno
(
stdin
),
isatty
(
fileno
(
std
out
)));
get_password
(
buff
,
sizeof
(
buff
)
-
1
,
fileno
(
stdin
),
isatty
(
fileno
(
std
err
)));
stty
(
fileno
(
stdin
),
&
org
);
stty
(
fileno
(
stdin
),
&
org
);
#endif
#endif
if
(
isatty
(
fileno
(
std
out
)))
if
(
isatty
(
fileno
(
std
err
)))
fputc
(
'\n'
,
std
out
);
fputc
(
'\n'
,
std
err
);
#endif
/* HAVE_GETPASS */
#endif
/* HAVE_GETPASS */
DBUG_RETURN
(
my_strdup
(
buff
,
MYF
(
MY_FAE
)));
DBUG_RETURN
(
my_strdup
(
buff
,
MYF
(
MY_FAE
)));
...
...
myisam/mi_locking.c
View file @
79caca1d
...
@@ -305,7 +305,6 @@ int _mi_readinfo(register MI_INFO *info, int lock_type, int check_keybuffer)
...
@@ -305,7 +305,6 @@ int _mi_readinfo(register MI_INFO *info, int lock_type, int check_keybuffer)
MYISAM_SHARE
*
share
=
info
->
s
;
MYISAM_SHARE
*
share
=
info
->
s
;
if
(
!
share
->
tot_locks
)
if
(
!
share
->
tot_locks
)
{
{
if
((
info
->
tmp_lock_type
=
lock_type
)
!=
F_RDLCK
)
if
(
my_lock
(
share
->
kfile
,
lock_type
,
0L
,
F_TO_EOF
,
if
(
my_lock
(
share
->
kfile
,
lock_type
,
0L
,
F_TO_EOF
,
info
->
lock_wait
|
MY_SEEK_NOT_DONE
))
info
->
lock_wait
|
MY_SEEK_NOT_DONE
))
DBUG_RETURN
(
1
);
DBUG_RETURN
(
1
);
...
...
myisam/myisamdef.h
View file @
79caca1d
...
@@ -589,7 +589,7 @@ enum myisam_log_commands {
...
@@ -589,7 +589,7 @@ enum myisam_log_commands {
#define myisam_log_record(a,b,c,d,e) if (myisam_log_file >= 0) _myisam_log_record(a,b,c,d,e)
#define myisam_log_record(a,b,c,d,e) if (myisam_log_file >= 0) _myisam_log_record(a,b,c,d,e)
#define fast_mi_writeinfo(INFO) if (!(INFO)->s->tot_locks) (void) _mi_writeinfo((INFO),0)
#define fast_mi_writeinfo(INFO) if (!(INFO)->s->tot_locks) (void) _mi_writeinfo((INFO),0)
#define fast_mi_readinfo(INFO) (
!
(INFO)->lock_type == F_UNLCK) && _mi_readinfo((INFO),F_RDLCK,1)
#define fast_mi_readinfo(INFO) ((INFO)->lock_type == F_UNLCK) && _mi_readinfo((INFO),F_RDLCK,1)
#ifdef __cplusplus
#ifdef __cplusplus
extern
"C"
{
extern
"C"
{
...
...
mysys/my_init.c
View file @
79caca1d
...
@@ -125,6 +125,7 @@ void my_end(int infoflag)
...
@@ -125,6 +125,7 @@ void my_end(int infoflag)
DBUG_PRINT
(
"error"
,(
"%s"
,
errbuff
[
0
]));
DBUG_PRINT
(
"error"
,(
"%s"
,
errbuff
[
0
]));
}
}
}
}
free_charsets
();
if
(
infoflag
&
MY_GIVE_INFO
||
info_file
!=
stderr
)
if
(
infoflag
&
MY_GIVE_INFO
||
info_file
!=
stderr
)
{
{
#ifdef HAVE_GETRUSAGE
#ifdef HAVE_GETRUSAGE
...
@@ -149,7 +150,6 @@ Voluntary context switches %ld, Involuntary context switches %ld\n",
...
@@ -149,7 +150,6 @@ Voluntary context switches %ld, Involuntary context switches %ld\n",
#if defined(MSDOS) && !defined(__WIN__)
#if defined(MSDOS) && !defined(__WIN__)
fprintf
(
info_file
,
"
\n
Run time: %.1f
\n
"
,(
double
)
clock
()
/
CLOCKS_PER_SEC
);
fprintf
(
info_file
,
"
\n
Run time: %.1f
\n
"
,(
double
)
clock
()
/
CLOCKS_PER_SEC
);
#endif
#endif
free_charsets
();
#if defined(SAFEMALLOC)
#if defined(SAFEMALLOC)
TERMINATE
(
stderr
);
/* Give statistic on screen */
TERMINATE
(
stderr
);
/* Give statistic on screen */
#elif defined(__WIN__) && defined(_MSC_VER)
#elif defined(__WIN__) && defined(_MSC_VER)
...
...
mysys/my_seek.c
View file @
79caca1d
...
@@ -35,7 +35,7 @@ my_off_t my_seek(File fd, my_off_t pos, int whence,
...
@@ -35,7 +35,7 @@ my_off_t my_seek(File fd, my_off_t pos, int whence,
DBUG_PRINT
(
"error"
,(
"lseek: %lu, errno: %d"
,
newpos
,
errno
));
DBUG_PRINT
(
"error"
,(
"lseek: %lu, errno: %d"
,
newpos
,
errno
));
DBUG_RETURN
(
MY_FILEPOS_ERROR
);
DBUG_RETURN
(
MY_FILEPOS_ERROR
);
}
}
if
(
newpos
!=
pos
)
if
(
(
my_off_t
)
newpos
!=
pos
)
{
{
DBUG_PRINT
(
"exit"
,(
"pos: %lu"
,
(
ulong
)
newpos
));
DBUG_PRINT
(
"exit"
,(
"pos: %lu"
,
(
ulong
)
newpos
));
}
}
...
...
sql-bench/server-cfg.sh
View file @
79caca1d
...
@@ -335,6 +335,12 @@ sub reconnect_on_errors
...
@@ -335,6 +335,12 @@ sub reconnect_on_errors
return
0
;
return
0
;
}
}
sub fix_for_insert
{
my
(
$self
,
$cmd
)
=
@_
;
return
$cmd
;
}
#
#
# Optimize tables for better performance
# Optimize tables for better performance
#
#
...
@@ -354,7 +360,6 @@ sub vacuum
...
@@ -354,7 +360,6 @@ sub vacuum
}
}
}
}
#############################################################################
#############################################################################
# Definitions for mSQL
# Definitions for mSQL
#############################################################################
#############################################################################
...
@@ -548,6 +553,12 @@ sub reconnect_on_errors
...
@@ -548,6 +553,12 @@ sub reconnect_on_errors
return
0
;
return
0
;
}
}
sub fix_for_insert
{
my
(
$self
,
$cmd
)
=
@_
;
return
$cmd
;
}
#############################################################################
#############################################################################
# Definitions for PostgreSQL #
# Definitions for PostgreSQL #
#############################################################################
#############################################################################
...
@@ -806,6 +817,12 @@ sub reconnect_on_errors
...
@@ -806,6 +817,12 @@ sub reconnect_on_errors
return
0
;
return
0
;
}
}
sub fix_for_insert
{
my
(
$self
,
$cmd
)
=
@_
;
return
$cmd
;
}
sub vacuum
sub vacuum
{
{
my
(
$self
,
$full_vacuum
,
$dbh_ref
,@tables
)=
@_
;
my
(
$self
,
$full_vacuum
,
$dbh_ref
,@tables
)=
@_
;
...
@@ -1072,6 +1089,12 @@ sub small_rollback_segment
...
@@ -1072,6 +1089,12 @@ sub small_rollback_segment
return
0
;
return
0
;
}
}
sub fix_for_insert
{
my
(
$self
,
$cmd
)
=
@_
;
return
$cmd
;
}
sub reconnect_on_errors
sub reconnect_on_errors
{
{
return
0
;
return
0
;
...
@@ -1811,7 +1834,7 @@ sub query {
...
@@ -1811,7 +1834,7 @@ sub query {
sub fix_for_insert
sub fix_for_insert
{
{
my
(
$self
,
$cmd
)
=
@_
;
my
(
$self
,
$cmd
)
=
@_
;
$cmd
=
~ s/
\\
'//g;
$cmd
=
~ s/
\\
\
'
//g
;
return
$cmd
;
return
$cmd
;
}
}
...
@@ -1844,6 +1867,7 @@ sub reconnect_on_errors
...
@@ -1844,6 +1867,7 @@ sub reconnect_on_errors
return
0
;
return
0
;
}
}
#############################################################################
#############################################################################
# Configuration for Access
# Configuration for Access
#############################################################################
#############################################################################
...
@@ -2021,6 +2045,12 @@ sub reconnect_on_errors
...
@@ -2021,6 +2045,12 @@ sub reconnect_on_errors
return
1
;
return
1
;
}
}
sub fix_for_insert
{
my
(
$self
,
$cmd
)
=
@_
;
return
$cmd
;
}
#############################################################################
#############################################################################
# Configuration for Microsoft SQL server
# Configuration for Microsoft SQL server
#############################################################################
#############################################################################
...
@@ -2209,6 +2239,12 @@ sub reconnect_on_errors
...
@@ -2209,6 +2239,12 @@ sub reconnect_on_errors
return
0
;
return
0
;
}
}
sub fix_for_insert
{
my
(
$self
,
$cmd
)
=
@_
;
return
$cmd
;
}
#############################################################################
#############################################################################
# Configuration for Sybase
# Configuration for Sybase
#############################################################################
#############################################################################
...
@@ -2384,6 +2420,12 @@ sub reconnect_on_errors
...
@@ -2384,6 +2420,12 @@ sub reconnect_on_errors
return
0
;
return
0
;
}
}
sub fix_for_insert
{
my
(
$self
,
$cmd
)
=
@_
;
return
$cmd
;
}
#
#
# optimize the tables ....
# optimize the tables ....
#
#
...
@@ -2617,6 +2659,12 @@ sub reconnect_on_errors
...
@@ -2617,6 +2659,12 @@ sub reconnect_on_errors
return
0
;
return
0
;
}
}
sub fix_for_insert
{
my
(
$self
,
$cmd
)
=
@_
;
return
$cmd
;
}
#############################################################################
#############################################################################
# Configuration for IBM DB2
# Configuration for IBM DB2
#############################################################################
#############################################################################
...
@@ -2791,6 +2839,12 @@ sub reconnect_on_errors
...
@@ -2791,6 +2839,12 @@ sub reconnect_on_errors
return
0
;
return
0
;
}
}
sub fix_for_insert
{
my
(
$self
,
$cmd
)
=
@_
;
return
$cmd
;
}
#############################################################################
#############################################################################
# Configuration for MIMER
# Configuration for MIMER
#############################################################################
#############################################################################
...
@@ -2992,6 +3046,12 @@ sub reconnect_on_errors
...
@@ -2992,6 +3046,12 @@ sub reconnect_on_errors
return
0
;
return
0
;
}
}
sub fix_for_insert
{
my
(
$self
,
$cmd
)
=
@_
;
return
$cmd
;
}
#############################################################################
#############################################################################
# Configuration for InterBase
# Configuration for InterBase
#############################################################################
#############################################################################
...
@@ -3205,6 +3265,12 @@ sub reconnect_on_errors
...
@@ -3205,6 +3265,12 @@ sub reconnect_on_errors
return
1
;
return
1
;
}
}
sub fix_for_insert
{
my
(
$self
,
$cmd
)
=
@_
;
return
$cmd
;
}
#############################################################################
#############################################################################
# Configuration for FrontBase
# Configuration for FrontBase
#############################################################################
#############################################################################
...
@@ -3410,4 +3476,10 @@ sub reconnect_on_errors
...
@@ -3410,4 +3476,10 @@ sub reconnect_on_errors
return
1
;
return
1
;
}
}
sub fix_for_insert
{
my
(
$self
,
$cmd
)
=
@_
;
return
$cmd
;
}
1
;
1
;
sql/sql_handler.cc
View file @
79caca1d
...
@@ -63,7 +63,11 @@ int mysql_ha_close(THD *thd, TABLE_LIST *tables)
...
@@ -63,7 +63,11 @@ int mysql_ha_close(THD *thd, TABLE_LIST *tables)
TABLE
**
ptr
=
find_table_ptr_by_name
(
thd
,
tables
->
db
,
tables
->
name
);
TABLE
**
ptr
=
find_table_ptr_by_name
(
thd
,
tables
->
db
,
tables
->
name
);
if
(
*
ptr
)
if
(
*
ptr
)
{
VOID
(
pthread_mutex_lock
(
&
LOCK_open
));
close_thread_table
(
thd
,
ptr
);
close_thread_table
(
thd
,
ptr
);
VOID
(
pthread_mutex_unlock
(
&
LOCK_open
));
}
send_ok
(
&
thd
->
net
);
send_ok
(
&
thd
->
net
);
return
0
;
return
0
;
...
...
sql/sql_update.cc
View file @
79caca1d
...
@@ -199,7 +199,7 @@ int mysql_update(THD *thd,
...
@@ -199,7 +199,7 @@ int mysql_update(THD *thd,
}
}
init_read_record
(
&
info
,
thd
,
table
,
select
,
0
,
1
);
init_read_record
(
&
info
,
thd
,
table
,
select
,
0
,
1
);
thd
->
proc_info
=
"
searching
"
;
thd
->
proc_info
=
"
Searching rows for update
"
;
while
(
!
(
error
=
info
.
read_record
(
&
info
))
&&
!
thd
->
killed
)
while
(
!
(
error
=
info
.
read_record
(
&
info
))
&&
!
thd
->
killed
)
{
{
...
@@ -261,7 +261,7 @@ int mysql_update(THD *thd,
...
@@ -261,7 +261,7 @@ int mysql_update(THD *thd,
ha_rows
updated
=
0L
,
found
=
0L
;
ha_rows
updated
=
0L
,
found
=
0L
;
thd
->
count_cuted_fields
=
1
;
/* calc cuted fields */
thd
->
count_cuted_fields
=
1
;
/* calc cuted fields */
thd
->
cuted_fields
=
0L
;
thd
->
cuted_fields
=
0L
;
thd
->
proc_info
=
"
u
pdating"
;
thd
->
proc_info
=
"
U
pdating"
;
query_id
=
thd
->
query_id
;
query_id
=
thd
->
query_id
;
while
(
!
(
error
=
info
.
read_record
(
&
info
))
&&
!
thd
->
killed
)
while
(
!
(
error
=
info
.
read_record
(
&
info
))
&&
!
thd
->
killed
)
...
...
tests/mail_to_db.pl
View file @
79caca1d
...
@@ -288,8 +288,11 @@ sub process_mail_file
...
@@ -288,8 +288,11 @@ sub process_mail_file
$values
{
$type
}
.=
"
\n
"
.
$_
;
$values
{
$type
}
.=
"
\n
"
.
$_
;
}
}
}
}
if
(
defined
(
$values
{'
message
'}))
{
$values
{'
hash
'}
=
checksum
("
$values
{'message'}
");
$values
{'
hash
'}
=
checksum
("
$values
{'message'}
");
update_table
(
$dbh
,
$file_name
,
\%
values
);
update_table
(
$dbh
,
$file_name
,
\%
values
);
}
}
}
####
####
...
...
tools/mysqlmanager.c
View file @
79caca1d
...
@@ -342,17 +342,17 @@ static void handle_sigterm(int sig __attribute__((unused)))
...
@@ -342,17 +342,17 @@ static void handle_sigterm(int sig __attribute__((unused)))
exit
(
0
);
exit
(
0
);
}
}
#ifdef DO_STACKTRACE
static
void
handle_segfault
(
int
sig
)
static
void
handle_segfault
(
int
sig
)
{
{
if
(
in_segfault
)
if
(
in_segfault
)
exit
(
1
);
exit
(
1
);
in_segfault
=
1
;
in_segfault
=
1
;
fprintf
(
errfp
,
"Got fatal signal %d
\n
"
,
sig
);
fprintf
(
errfp
,
"Got fatal signal %d
\n
"
,
sig
);
#ifdef DO_STACKTRACE
print_stacktrace
();
print_stacktrace
();
#endif
exit
(
1
);
exit
(
1
);
}
}
#endif
static
void
handle_sigpipe
(
int
__attribute__
((
unused
))
sig
)
static
void
handle_sigpipe
(
int
__attribute__
((
unused
))
sig
)
{
{
...
...
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