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
d5165650
Commit
d5165650
authored
May 06, 2004
by
monty@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1
parents
f39c4012
28673669
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
35 additions
and
9 deletions
+35
-9
innobase/include/os0file.h
innobase/include/os0file.h
+8
-0
innobase/os/os0file.c
innobase/os/os0file.c
+17
-0
innobase/srv/srv0srv.c
innobase/srv/srv0srv.c
+1
-5
mysql-test/r/rpl_server_id2.result
mysql-test/r/rpl_server_id2.result
+1
-0
mysql-test/t/rpl_server_id2.test
mysql-test/t/rpl_server_id2.test
+4
-0
sql/ha_innodb.cc
sql/ha_innodb.cc
+1
-1
sql/sql_acl.cc
sql/sql_acl.cc
+3
-3
No files found.
innobase/include/os0file.h
View file @
d5165650
...
@@ -358,6 +358,14 @@ os_file_set_size(
...
@@ -358,6 +358,14 @@ os_file_set_size(
size */
size */
ulint
size_high
);
/* in: most significant 32 bits of size */
ulint
size_high
);
/* in: most significant 32 bits of size */
/***************************************************************************
/***************************************************************************
Truncates a file at its current position. */
ibool
os_file_set_eof
(
/*============*/
/* out: TRUE if success */
FILE
*
file
);
/* in: file to be truncated */
/***************************************************************************
Flushes the write buffers of a given file to the disk. */
Flushes the write buffers of a given file to the disk. */
ibool
ibool
...
...
innobase/os/os0file.c
View file @
d5165650
...
@@ -1582,6 +1582,23 @@ error_handling:
...
@@ -1582,6 +1582,23 @@ error_handling:
return
(
FALSE
);
return
(
FALSE
);
}
}
/***************************************************************************
Truncates a file at its current position. */
ibool
os_file_set_eof
(
/*============*/
/* out: TRUE if success */
FILE
*
file
)
/* in: file to be truncated */
{
#ifdef __WIN__
HANDLE
h
=
(
HANDLE
)
_get_osfhandle
(
fileno
(
file
));
return
(
SetEndOfFile
(
h
));
#else
/* __WIN__ */
return
(
!
ftruncate
(
fileno
(
file
),
ftell
(
file
)));
#endif
/* __WIN__ */
}
/***************************************************************************
/***************************************************************************
Flushes the write buffers of a given file to the disk. */
Flushes the write buffers of a given file to the disk. */
...
...
innobase/srv/srv0srv.c
View file @
d5165650
...
@@ -1655,11 +1655,7 @@ loop:
...
@@ -1655,11 +1655,7 @@ loop:
mutex_enter
(
&
srv_monitor_file_mutex
);
mutex_enter
(
&
srv_monitor_file_mutex
);
rewind
(
srv_monitor_file
);
rewind
(
srv_monitor_file
);
srv_printf_innodb_monitor
(
srv_monitor_file
);
srv_printf_innodb_monitor
(
srv_monitor_file
);
#ifdef __WIN__
os_file_set_eof
(
srv_monitor_file
);
chsize
(
fileno
(
srv_monitor_file
),
ftell
(
srv_monitor_file
));
#else
/* __WIN__ */
ftruncate
(
fileno
(
srv_monitor_file
),
ftell
(
srv_monitor_file
));
#endif
/* __WIN__ */
mutex_exit
(
&
srv_monitor_file_mutex
);
mutex_exit
(
&
srv_monitor_file_mutex
);
if
(
srv_print_innodb_tablespace_monitor
if
(
srv_print_innodb_tablespace_monitor
...
...
mysql-test/r/rpl_server_id2.result
View file @
d5165650
...
@@ -20,4 +20,5 @@ select * from t1;
...
@@ -20,4 +20,5 @@ select * from t1;
n
n
1
1
1
1
stop slave;
drop table t1;
drop table t1;
mysql-test/t/rpl_server_id2.test
View file @
d5165650
...
@@ -18,4 +18,8 @@ insert into t1 values (1);
...
@@ -18,4 +18,8 @@ insert into t1 values (1);
save_master_pos
;
save_master_pos
;
sync_with_master
;
sync_with_master
;
select
*
from
t1
;
# check that indeed 2 were inserted
select
*
from
t1
;
# check that indeed 2 were inserted
# We stop the slave before cleaning up otherwise we'll get
# 'drop table t1' executed twice, so an error in the slave.err
# (not critical).
stop
slave
;
drop
table
t1
;
drop
table
t1
;
sql/ha_innodb.cc
View file @
d5165650
...
@@ -4817,7 +4817,7 @@ innodb_show_status(
...
@@ -4817,7 +4817,7 @@ innodb_show_status(
rewind
(
srv_monitor_file
);
rewind
(
srv_monitor_file
);
srv_printf_innodb_monitor
(
srv_monitor_file
);
srv_printf_innodb_monitor
(
srv_monitor_file
);
flen
=
ftell
(
srv_monitor_file
);
flen
=
ftell
(
srv_monitor_file
);
my_chsize
(
fileno
(
srv_monitor_file
),
flen
,
0
,
MYF
(
0
)
);
os_file_set_eof
(
srv_monitor_file
);
if
(
flen
>
64000
-
1
)
{
if
(
flen
>
64000
-
1
)
{
flen
=
64000
-
1
;
flen
=
64000
-
1
;
}
}
...
...
sql/sql_acl.cc
View file @
d5165650
...
@@ -2764,9 +2764,9 @@ bool check_grant_column(THD *thd,TABLE *table, const char *name,
...
@@ -2764,9 +2764,9 @@ bool check_grant_column(THD *thd,TABLE *table, const char *name,
if
(
table
->
grant
.
version
!=
grant_version
)
if
(
table
->
grant
.
version
!=
grant_version
)
{
{
table
->
grant
.
grant_table
=
table
->
grant
.
grant_table
=
table_hash_search
(
thd
->
host
,
thd
->
ip
,
thd
->
db
,
table_hash_search
(
thd
->
host
,
thd
->
ip
,
table
->
table_cache_key
,
thd
->
priv_user
,
thd
->
priv_user
,
table
->
real_name
,
0
);
/* purecov: inspected */
table
->
real_name
,
0
);
/* purecov: inspected */
table
->
grant
.
version
=
grant_version
;
/* purecov: inspected */
table
->
grant
.
version
=
grant_version
;
/* purecov: inspected */
}
}
if
(
!
(
grant_table
=
table
->
grant
.
grant_table
))
if
(
!
(
grant_table
=
table
->
grant
.
grant_table
))
...
@@ -3161,7 +3161,7 @@ int mysql_show_grants(THD *thd,LEX_USER *lex_user)
...
@@ -3161,7 +3161,7 @@ int mysql_show_grants(THD *thd,LEX_USER *lex_user)
/* Add database access */
/* Add database access */
for
(
counter
=
0
;
counter
<
acl_dbs
.
elements
;
counter
++
)
for
(
counter
=
0
;
counter
<
acl_dbs
.
elements
;
counter
++
)
{
{
const
char
*
user
,
*
host
;
const
char
*
user
,
*
host
;
acl_db
=
dynamic_element
(
&
acl_dbs
,
counter
,
ACL_DB
*
);
acl_db
=
dynamic_element
(
&
acl_dbs
,
counter
,
ACL_DB
*
);
if
(
!
(
user
=
acl_db
->
user
))
if
(
!
(
user
=
acl_db
->
user
))
...
...
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