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
d24f3b5e
Commit
d24f3b5e
authored
Aug 17, 2001
by
jcole@tetra.spaceapes.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge jcole@work.mysql.com:/home/bk/mysql
into tetra.spaceapes.com:/home/jcole/bk/mysql
parents
485cf3dc
13703bbb
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
65 additions
and
28 deletions
+65
-28
Docs/manual.texi
Docs/manual.texi
+7
-12
mysql-test/r/func_time.result
mysql-test/r/func_time.result
+2
-2
mysql-test/t/func_time.test
mysql-test/t/func_time.test
+2
-1
sql/ha_innobase.cc
sql/ha_innobase.cc
+10
-4
sql/item_func.cc
sql/item_func.cc
+8
-5
sql/mini_client.cc
sql/mini_client.cc
+15
-1
sql/mysqld.cc
sql/mysqld.cc
+1
-1
sql/sql_repl.cc
sql/sql_repl.cc
+20
-2
No files found.
Docs/manual.texi
View file @
d24f3b5e
...
...
@@ -6590,13 +6590,12 @@ Please report bad or out-of-date mirrors to @email{webmaster@@mysql.com}.
@c @image{Flags/spain} Spain [MasterD]
@c @uref{http://mysql.masterd.es, WWW}
@c @item
@c Not ok 20000919; Old site (Matt)
@item
@c EMAIL: Patrik.Karen@sdi.slu.se (Patrik Karen)
@c ftp -> remove old files
@
c @
image{Flags/sweden} Sweden [Sunet] @
@
c @
uref{http://ftp.sunet.se/pub/unix/databases/relational/mysql/, WWW}
@
c @
uref{ftp://ftp.sunet.se/pub/unix/databases/relational/mysql/, FTP}
@image{Flags/sweden} Sweden [Sunet] @
@uref{http://ftp.sunet.se/pub/unix/databases/relational/mysql/, WWW}
@uref{ftp://ftp.sunet.se/pub/unix/databases/relational/mysql/, FTP}
@item
@c EMAIL: archive@sunsite.cnlab-switch.ch (Thomas Lenggenhager)
...
...
@@ -6610,12 +6609,6 @@ Please report bad or out-of-date mirrors to @email{webmaster@@mysql.com}.
@c @image{Flags/great-britain} UK [Oyster/UK] @
@c @uref{ftp://ftp.oyster.co.uk/pub/mysql, FTP}
@item
@c EMAIL: gareth@omnipotent.net (Gareth Watts)
@image{Flags/great-britain} UK [Omnipotent/UK] @
@uref{http://mysql.omnipotent.net/, WWW}
@uref{ftp://mysql.omnipotent.net/, FTP}
@item
@c EMAIL: keet@mordor.plig.net (Christiaan Keet)
@image{Flags/great-britain} UK [PLiG/UK] @
...
...
@@ -36076,7 +36069,9 @@ set-variable = innodb_lock_wait_timeout=50
@end example
Note that data files must be < 4G, and < 2G on
some file systems! InnoDB does not create directories:
some file systems! The total size of data files has
to be >= 10 MB.
InnoDB does not create directories:
you have to create them yourself.
Suppose you have a Linux machine with 512 MB RAM and
mysql-test/r/func_time.result
View file @
d24f3b5e
...
...
@@ -6,8 +6,8 @@ now()-now() weekday(curdate())-weekday(now()) unix_timestamp()-unix_timestamp(no
0 0 0
from_unixtime(unix_timestamp("1994-03-02 10:11:12")) from_unixtime(unix_timestamp("1994-03-02 10:11:12"),"%Y-%m-%d %h:%i:%s") from_unixtime(unix_timestamp("1994-03-02 10:11:12"))+0
1994-03-02 10:11:12 1994-03-02 10:11:12 19940302101112
sec_to_time(9001) sec_to_time(9001)+0 time_to_sec("15:12:22")
02:30:01 23001 54742
sec_to_time(9001) sec_to_time(9001)+0 time_to_sec("15:12:22")
sec_to_time(time_to_sec("0:30:47")/6.21)
02:30:01 23001 54742
00:04:57
now()-curdate()*1000000-curtime()
0
strcmp(current_timestamp(),concat(current_date()," ",current_time()))
...
...
mysql-test/t/func_time.test
View file @
d24f3b5e
...
...
@@ -7,7 +7,8 @@ select from_days(to_days("960101")),to_days(960201)-to_days("19960101"),to_days(
select
period_add
(
"9602"
,
-
12
),
period_diff
(
199505
,
"9404"
)
;
select
now
()
-
now
(),
weekday
(
curdate
())
-
weekday
(
now
()),
unix_timestamp
()
-
unix_timestamp
(
now
());
select
from_unixtime
(
unix_timestamp
(
"1994-03-02 10:11:12"
)),
from_unixtime
(
unix_timestamp
(
"1994-03-02 10:11:12"
),
"%Y-%m-%d %h:%i:%s"
),
from_unixtime
(
unix_timestamp
(
"1994-03-02 10:11:12"
))
+
0
;
select
sec_to_time
(
9001
),
sec_to_time
(
9001
)
+
0
,
time_to_sec
(
"15:12:22"
);
select
sec_to_time
(
9001
),
sec_to_time
(
9001
)
+
0
,
time_to_sec
(
"15:12:22"
),
sec_to_time
(
time_to_sec
(
"0:30:47"
)
/
6.21
);
select
now
()
-
curdate
()
*
1000000
-
curtime
();
select
strcmp
(
current_timestamp
(),
concat
(
current_date
(),
" "
,
current_time
()));
select
date_format
(
"1997-01-02 03:04:05"
,
"%M %W %D %Y %y %m %d %h %i %s %w"
);
...
...
sql/ha_innobase.cc
View file @
d24f3b5e
...
...
@@ -821,10 +821,6 @@ ha_innobase::open(
DBUG_RETURN
(
1
);
}
/* MySQL allocates the buffer for ref */
ref_length
=
buff_len
;
/* Get pointer to a table object in InnoDB dictionary cache */
if
(
NULL
==
(
ib_table
=
dict_table_get
(
norm_name
,
NULL
)))
{
...
...
@@ -861,10 +857,20 @@ ha_innobase::open(
primary_key
=
0
;
key_used_on_scan
=
0
;
/* MySQL allocates the buffer for ref */
ref_length
=
table
->
key_info
->
key_length
+
table
->
key_info
->
key_parts
+
10
;
/* One byte per key field is consumed to the SQL NULL
info of the field; we add also 10 bytes of safety margin */
}
else
{
((
row_prebuilt_t
*
)
innobase_prebuilt
)
->
clust_index_was_generated
=
TRUE
;
ref_length
=
DATA_ROW_ID_LEN
+
10
;
dbug_assert
(
key_used_on_scan
==
MAX_KEY
);
}
...
...
sql/item_func.cc
View file @
d24f3b5e
...
...
@@ -309,11 +309,14 @@ double Item_func_div::val()
longlong
Item_func_div
::
val_int
()
{
longlong
value
=
args
[
0
]
->
val_int
();
longlong
val2
=
args
[
1
]
->
val_int
();
if
((
null_value
=
val2
==
0
||
args
[
0
]
->
null_value
||
args
[
1
]
->
null_value
))
return
0
;
return
value
/
val2
;
// the integer result of division of two arguments needs to be computed
// as a type-cast division of val(), not as diviion of val_int() of each
// argument. For example, val_int(41.5/3.4) = val_int(12.206) = 12, but
// if you do val_int(41.5)/val_int(3.4), as in the old code, we get 42/3=
// 14, which is wrong. This would break sec_to_time(a/b),
// from_unixtime(a/b), and
// all functions that do val_int() on their arguments
return
(
longlong
)
val
();
}
void
Item_func_div
::
fix_length_and_dec
()
...
...
sql/mini_client.cc
View file @
d24f3b5e
...
...
@@ -39,6 +39,8 @@
#include "errmsg.h"
#include <violite.h>
extern
ulong
net_read_timeout
;
extern
"C"
{
// Because of SCO 3.2V4.2
#include <sys/stat.h>
#include <signal.h>
...
...
@@ -62,6 +64,7 @@ extern "C" { // Because of SCO 3.2V4.2
#endif
#if defined(THREAD) && !defined(__WIN__)
#include <my_pthread.h>
/* because of signal() */
#include <thr_alarm.h>
#endif
#ifndef INADDR_NONE
#define INADDR_NONE -1
...
...
@@ -479,18 +482,25 @@ mc_mysql_connect(MYSQL *mysql,const char *host, const char *user,
struct
sockaddr_in
sock_addr
;
uint
pkt_length
;
NET
*
net
=
&
mysql
->
net
;
thr_alarm_t
alarmed
;
#if !defined(__WIN__)
ALARM
alarm_buff
;
#endif
#ifdef __WIN__
HANDLE
hPipe
=
INVALID_HANDLE_VALUE
;
#endif
#ifdef HAVE_SYS_UN_H
struct
sockaddr_un
UNIXaddr
;
#endif
DBUG_ENTER
(
"m
ysql_rea
l_connect"
);
DBUG_ENTER
(
"m
c_mysq
l_connect"
);
DBUG_PRINT
(
"enter"
,(
"host: %s db: %s user: %s"
,
host
?
host
:
"(Null)"
,
db
?
db
:
"(Null)"
,
user
?
user
:
"(Null)"
));
thr_alarm_init
(
&
alarmed
);
thr_alarm
(
&
alarmed
,(
uint
)
net_read_timeout
,
&
alarm_buff
);
bzero
((
char
*
)
&
mysql
->
options
,
sizeof
(
mysql
->
options
));
net
->
vio
=
0
;
/* If something goes wrong */
...
...
@@ -625,8 +635,12 @@ mc_mysql_connect(MYSQL *mysql,const char *host, const char *user,
DBUG_PRINT
(
"error"
,(
"Got error %d on connect to '%s'"
,
ERRNO
,
host
));
net
->
last_errno
=
CR_CONN_HOST_ERROR
;
sprintf
(
net
->
last_error
,
ER
(
CR_CONN_HOST_ERROR
),
host
,
ERRNO
);
if
(
thr_alarm_in_use
(
&
alarmed
))
thr_end_alarm
(
&
alarmed
);
goto
error
;
}
if
(
thr_alarm_in_use
(
&
alarmed
))
thr_end_alarm
(
&
alarmed
);
}
if
(
!
net
->
vio
||
my_net_init
(
net
,
net
->
vio
))
...
...
sql/mysqld.cc
View file @
d24f3b5e
...
...
@@ -487,6 +487,7 @@ static void close_connections(void)
}
#endif
end_thr_alarm
();
// Don't allow alarms
end_slave
();
/* First signal all threads that it's time to die */
...
...
@@ -694,7 +695,6 @@ void clean_up(bool print_message)
x_free
(
opt_bin_logname
);
bitmap_free
(
&
temp_pool
);
free_max_user_conn
();
end_slave
();
#ifndef __WIN__
if
(
!
opt_bootstrap
)
(
void
)
my_delete
(
pidfile_name
,
MYF
(
0
));
// This may not always exist
...
...
sql/sql_repl.cc
View file @
d24f3b5e
...
...
@@ -610,8 +610,26 @@ int stop_slave(THD* thd, bool net_report )
// do not abort the slave in the middle of a query, so we do not set
// thd->killed for the slave thread
thd
->
proc_info
=
"waiting for slave to die"
;
while
(
slave_running
)
pthread_cond_wait
(
&
COND_slave_stopped
,
&
LOCK_slave
);
while
(
slave_running
)
{
/* there is a small change that slave thread might miss the first
alarm. To protect againts it, resend the signal until it reacts
*/
struct
timespec
abstime
;
#ifdef HAVE_TIMESPEC_TS_SEC
abstime
.
ts_sec
=
time
(
NULL
)
+
2
;
abstime
.
ts_nsec
=
0
;
#else
struct
timeval
tv
;
gettimeofday
(
&
tv
,
0
);
abstime
.
tv_sec
=
tv
.
tv_sec
+
2
;
abstime
.
tv_nsec
=
tv
.
tv_usec
*
1000
;
#endif
pthread_cond_timedwait
(
&
COND_slave_stopped
,
&
LOCK_slave
,
&
abstime
);
if
(
slave_running
)
thr_alarm_kill
(
slave_real_id
);
}
}
else
slave_errno
=
ER_SLAVE_NOT_RUNNING
;
...
...
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