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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
44004501
Commit
44004501
authored
Nov 25, 2003
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/kostja/mysql/mysql-4.1-root
parents
aef0b9a7
8e9d7bc6
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
325 additions
and
23 deletions
+325
-23
Docs/Makefile.am
Docs/Makefile.am
+2
-5
Makefile.am
Makefile.am
+1
-2
innobase/include/os0file.h
innobase/include/os0file.h
+26
-0
innobase/os/os0file.c
innobase/os/os0file.c
+215
-5
mysql-test/install_test_db.sh
mysql-test/install_test_db.sh
+9
-2
mysql-test/mysql-test-run.sh
mysql-test/mysql-test-run.sh
+6
-0
mysql-test/r/rpl_change_master.result
mysql-test/r/rpl_change_master.result
+1
-1
mysql-test/t/rpl_change_master.test
mysql-test/t/rpl_change_master.test
+2
-2
scripts/make_binary_distribution.sh
scripts/make_binary_distribution.sh
+1
-1
scripts/make_win_src_distribution.sh
scripts/make_win_src_distribution.sh
+1
-1
scripts/mysql_prepare_privilege_tables_for_5.sql
scripts/mysql_prepare_privilege_tables_for_5.sql
+53
-0
scripts/mysqlaccess.sh
scripts/mysqlaccess.sh
+1
-1
sql-bench/bench-init.pl.sh
sql-bench/bench-init.pl.sh
+1
-1
support-files/mysql.spec.sh
support-files/mysql.spec.sh
+6
-2
No files found.
Docs/Makefile.am
View file @
44004501
...
...
@@ -26,7 +26,7 @@ EXTRA_DIST = $(noinst_SCRIPTS) $(BUILT_SOURCES) mysqld_error.txt \
all
:
$(targets) txt_files
txt_files
:
../INSTALL-SOURCE ../COPYING
../COPYING.LIB
\
txt_files
:
../INSTALL-SOURCE ../COPYING
\
INSTALL-BINARY ../support-files/MacOSX/ReadMe.txt
CLEAN_FILES
:
$(BUILD_SOURCES)
...
...
@@ -201,10 +201,7 @@ INSTALL-BINARY: mysql.info $(GT)
perl
-w
$(GT)
mysql.info
"Installing binary"
"Installing source"
>
$@
../COPYING
:
mysql.info $(GT)
perl
-w
$(GT)
mysql.info
"GPL license"
"LGPL license"
>
$@
../COPYING.LIB
:
mysql.info $(GT)
perl
-w
$(GT)
mysql.info
"LGPL license"
"Function Index"
>
$@
perl
-w
$(GT)
mysql.info
"GPL license"
"Function Index"
>
$@
../support-files/MacOSX/ReadMe.txt
:
mysql.info $(GT)
perl
-w
$(GT)
mysql.info
"Mac OS X installation"
"NetWare installation"
>
$@
...
...
Makefile.am
View file @
44004501
...
...
@@ -19,8 +19,7 @@
AUTOMAKE_OPTIONS
=
foreign
# These are built from source in the Docs directory
EXTRA_DIST
=
INSTALL-SOURCE README
\
COPYING COPYING.LIB zlib
EXTRA_DIST
=
INSTALL-SOURCE README COPYING zlib
SUBDIRS
=
.
include @docs_dirs@
\
@readline_topdir@ sql-common
\
@thread_dirs@ pstack @sql_client_dirs@
\
...
...
innobase/include/os0file.h
View file @
44004501
...
...
@@ -282,6 +282,15 @@ os_file_delete(
/*===========*/
/* out: TRUE if success */
char
*
name
);
/* in: file path as a null-terminated string */
/***************************************************************************
Deletes a file if it exists. The file has to be closed before calling this. */
ibool
os_file_delete_if_exists
(
/*=====================*/
/* out: TRUE if success */
char
*
name
);
/* in: file path as a null-terminated string */
/***************************************************************************
Renames a file (can also move it to another directory). It is safest that the
file is closed before calling this function. */
...
...
@@ -379,6 +388,23 @@ os_file_read(
offset */
ulint
n
);
/* in: number of bytes to read */
/***********************************************************************
Requests a synchronous positioned read operation. This function does not do
any error handling. In case of error it returns FALSE. */
ibool
os_file_read_no_error_handling
(
/*===========================*/
/* out: TRUE if request was
successful, FALSE if fail */
os_file_t
file
,
/* in: handle to a file */
void
*
buf
,
/* in: buffer where to read */
ulint
offset
,
/* in: least significant 32 bits of file
offset where to read */
ulint
offset_high
,
/* in: most significant 32 bits of
offset */
ulint
n
);
/* in: number of bytes to read */
/***********************************************************************
Requests a synchronous write operation. */
ibool
...
...
innobase/os/os0file.c
View file @
44004501
...
...
@@ -346,6 +346,7 @@ os_file_handle_error(
return
(
FALSE
);
}
else
if
(
err
==
OS_FILE_AIO_RESOURCES_RESERVED
)
{
return
(
TRUE
);
}
else
if
(
err
==
OS_FILE_ALREADY_EXISTS
)
{
...
...
@@ -368,6 +369,68 @@ os_file_handle_error(
return
(
FALSE
);
}
/********************************************************************
Does error handling when a file operation fails. */
static
ibool
os_file_handle_error_no_exit
(
/*=========================*/
/* out: TRUE if we should retry the
operation */
os_file_t
file
,
/* in: file pointer */
char
*
name
,
/* in: name of a file or NULL */
const
char
*
operation
)
/* in: operation */
{
ulint
err
;
UT_NOT_USED
(
file
);
err
=
os_file_get_last_error
(
FALSE
);
if
(
err
==
OS_FILE_DISK_FULL
)
{
/* We only print a warning about disk full once */
if
(
os_has_said_disk_full
)
{
return
(
FALSE
);
}
if
(
name
)
{
ut_print_timestamp
(
stderr
);
fprintf
(
stderr
,
" InnoDB: Encountered a problem with file %s
\n
"
,
name
);
}
ut_print_timestamp
(
stderr
);
fprintf
(
stderr
,
" InnoDB: Disk is full. Try to clean the disk to free space.
\n
"
);
os_has_said_disk_full
=
TRUE
;
fflush
(
stderr
);
return
(
FALSE
);
}
else
if
(
err
==
OS_FILE_AIO_RESOURCES_RESERVED
)
{
return
(
TRUE
);
}
else
if
(
err
==
OS_FILE_ALREADY_EXISTS
)
{
return
(
FALSE
);
}
else
{
if
(
name
)
{
fprintf
(
stderr
,
"InnoDB: File name %s
\n
"
,
name
);
}
fprintf
(
stderr
,
"InnoDB: File operation call: '%s'.
\n
"
,
operation
);
return
(
FALSE
);
}
return
(
FALSE
);
}
/********************************************************************
Creates the seek mutexes used in positioned reads and writes. */
...
...
@@ -457,7 +520,7 @@ os_file_closedir(
ret
=
FindClose
(
dir
);
if
(
!
ret
)
{
os_file_handle_error
(
NULL
,
NULL
,
"closedir"
);
os_file_handle_error
_no_exit
(
NULL
,
NULL
,
"closedir"
);
return
(
-
1
);
}
...
...
@@ -469,7 +532,7 @@ os_file_closedir(
ret
=
closedir
(
dir
);
if
(
ret
)
{
os_file_handle_error
(
0
,
NULL
,
"closedir"
);
os_file_handle_error
_no_exit
(
0
,
NULL
,
"closedir"
);
}
return
(
ret
);
...
...
@@ -538,8 +601,8 @@ dbname.sym can redirect a database directory:
return
(
1
);
}
else
{
os_file_handle_error
(
NULL
,
dirname
,
"readdir_next_file"
);
os_file_handle_error
_no_exit
(
NULL
,
dirname
,
"readdir_next_file"
);
return
(
-
1
);
}
#else
...
...
@@ -570,7 +633,7 @@ dbname.sym can redirect a database directory:
ret
=
stat
(
full_path
,
&
statinfo
);
if
(
ret
)
{
os_file_handle_error
(
0
,
full_path
,
"stat"
);
os_file_handle_error
_no_exit
(
0
,
full_path
,
"stat"
);
ut_free
(
full_path
);
...
...
@@ -1063,6 +1126,67 @@ os_file_create(
#endif
}
/***************************************************************************
Deletes a file if it exists. The file has to be closed before calling this. */
ibool
os_file_delete_if_exists
(
/*=====================*/
/* out: TRUE if success */
char
*
name
)
/* in: file path as a null-terminated string */
{
#ifdef __WIN__
BOOL
ret
;
ulint
count
=
0
;
loop:
/* In Windows, deleting an .ibd file may fail if ibbackup is copying
it */
ret
=
DeleteFile
((
LPCTSTR
)
name
);
if
(
ret
)
{
return
(
TRUE
);
}
if
(
GetLastError
()
==
ERROR_PATH_NOT_FOUND
)
{
/* the file does not exist, this not an error */
return
(
TRUE
);
}
count
++
;
if
(
count
>
100
&&
0
==
(
count
%
10
))
{
fprintf
(
stderr
,
"InnoDB: Warning: cannot delete file %s
\n
"
"InnoDB: Are you running ibbackup to back up the file?
\n
"
,
name
);
os_file_get_last_error
(
TRUE
);
/* print error information */
}
os_thread_sleep
(
1000000
);
/* sleep for a second */
if
(
count
>
2000
)
{
return
(
FALSE
);
}
goto
loop
;
#else
int
ret
;
ret
=
unlink
((
const
char
*
)
name
);
if
(
ret
!=
0
&&
errno
!=
ENOENT
)
{
os_file_handle_error
(
0
,
name
,
"delete"
);
return
(
FALSE
);
}
return
(
TRUE
);
#endif
}
/***************************************************************************
Deletes a file. The file has to be closed before calling this. */
...
...
@@ -1746,6 +1870,92 @@ os_file_read(
return
(
FALSE
);
}
/***********************************************************************
Requests a synchronous positioned read operation. This function does not do
any error handling. In case of error it returns FALSE. */
ibool
os_file_read_no_error_handling
(
/*===========================*/
/* out: TRUE if request was
successful, FALSE if fail */
os_file_t
file
,
/* in: handle to a file */
void
*
buf
,
/* in: buffer where to read */
ulint
offset
,
/* in: least significant 32 bits of file
offset where to read */
ulint
offset_high
,
/* in: most significant 32 bits of
offset */
ulint
n
)
/* in: number of bytes to read */
{
#ifdef __WIN__
BOOL
ret
;
DWORD
len
;
DWORD
ret2
;
DWORD
low
;
DWORD
high
;
ibool
retry
;
ulint
i
;
ut_a
((
offset
&
0xFFFFFFFFUL
)
==
offset
);
os_n_file_reads
++
;
os_bytes_read_since_printout
+=
n
;
try_again:
ut_ad
(
file
);
ut_ad
(
buf
);
ut_ad
(
n
>
0
);
low
=
offset
;
high
=
offset_high
;
/* Protect the seek / read operation with a mutex */
i
=
((
ulint
)
file
)
%
OS_FILE_N_SEEK_MUTEXES
;
os_mutex_enter
(
os_file_seek_mutexes
[
i
]);
ret2
=
SetFilePointer
(
file
,
low
,
&
high
,
FILE_BEGIN
);
if
(
ret2
==
0xFFFFFFFF
&&
GetLastError
()
!=
NO_ERROR
)
{
os_mutex_exit
(
os_file_seek_mutexes
[
i
]);
goto
error_handling
;
}
ret
=
ReadFile
(
file
,
buf
,
n
,
&
len
,
NULL
);
os_mutex_exit
(
os_file_seek_mutexes
[
i
]);
if
(
ret
&&
len
==
n
)
{
return
(
TRUE
);
}
#else
ibool
retry
;
ssize_t
ret
;
os_bytes_read_since_printout
+=
n
;
try_again:
ret
=
os_file_pread
(
file
,
buf
,
n
,
offset
,
offset_high
);
if
((
ulint
)
ret
==
n
)
{
return
(
TRUE
);
}
#endif
#ifdef __WIN__
error_handling:
#endif
retry
=
os_file_handle_error_no_exit
(
file
,
NULL
,
"read"
);
if
(
retry
)
{
goto
try_again
;
}
return
(
FALSE
);
}
/***********************************************************************
Requests a synchronous write operation. */
...
...
mysql-test/install_test_db.sh
View file @
44004501
...
...
@@ -12,11 +12,13 @@ if [ x$1 = x"-bin" ]; then
BINARY_DIST
=
1
fix_bin
=
mysql-test
scriptdir
=
../bin
libexecdir
=
../libexec
else
execdir
=
../sql
bindir
=
../client
fix_bin
=
.
scriptdir
=
../scripts
libexecdir
=
../libexec
fi
vardir
=
var
...
...
@@ -36,8 +38,13 @@ EXTRA_ARG=""
if
test
!
-x
$execdir
/mysqld
then
echo
"mysqld is missing - looked in
$execdir
"
exit
1
if
test
!
-x
$libexecdir
/mysqld
then
echo
"mysqld is missing - looked in
$execdir
and in
$libexecdir
"
exit
1
else
execdir
=
$libexecdir
fi
fi
# On IRIX hostname is in /usr/bsd so add this to the path
...
...
mysql-test/mysql-test-run.sh
View file @
44004501
...
...
@@ -229,6 +229,7 @@ while test $# -gt 0; do
--local
)
USE_RUNNING_SERVER
=
""
;;
--extern
)
USE_RUNNING_SERVER
=
"1"
;;
--tmpdir
=
*
)
MYSQL_TMP_DIR
=
`
$ECHO
"
$1
"
|
$SED
-e
"s;--tmpdir=;;"
`
;;
--start-from
=
*
)
START_FROM
=
`
$ECHO
"
$1
"
|
$SED
-e
"s;--start-from=;;"
`
;;
--local-master
)
MASTER_MYPORT
=
3306
;
EXTRA_MYSQL_TEST_OPT
=
"
$EXTRA_MYSQL_TEST_OPT
--host=127.0.0.1
\
...
...
@@ -1185,6 +1186,11 @@ run_testcase ()
fi
fi
if
[
"
$tname
"
'<'
"
$START_FROM
"
]
;
then
# skip_test $tname;
return
;
fi
if
[
-n
"
$DO_TEST
"
]
;
then
DO_THIS_TEST
=
`
$EXPR
\(
$tname
:
"
$DO_TEST
"
\)
!=
0
`
if
[
x
$DO_THIS_TEST
=
x0
]
;
...
...
mysql-test/r/rpl_change_master.result
View file @
44004501
...
...
@@ -8,7 +8,7 @@ select get_lock("a",5);
get_lock("a",5)
1
create table t1(n int);
insert into t1 values(1+get_lock("a",1
0
)*0);
insert into t1 values(1+get_lock("a",1
5
)*0);
insert into t1 values(2);
stop slave;
select * from t1;
...
...
mysql-test/t/rpl_change_master.test
View file @
44004501
...
...
@@ -4,11 +4,11 @@ connection slave;
select
get_lock
(
"a"
,
5
);
connection
master
;
create
table
t1
(
n
int
);
insert
into
t1
values
(
1
+
get_lock
(
"a"
,
1
0
)
*
0
);
insert
into
t1
values
(
1
+
get_lock
(
"a"
,
1
5
)
*
0
);
insert
into
t1
values
(
2
);
save_master_pos
;
connection
slave
;
sleep
3
;
# can't sync_with_master as we should be blocked
--
real_
sleep
3
;
# can't sync_with_master as we should be blocked
stop
slave
;
select
*
from
t1
;
--
replace_result
$MASTER_MYPORT
MASTER_MYPORT
...
...
scripts/make_binary_distribution.sh
View file @
44004501
...
...
@@ -85,7 +85,7 @@ do
fi
done
for
i
in
COPYING
COPYING.LIB
README Docs/INSTALL-BINARY
\
for
i
in
COPYING README Docs/INSTALL-BINARY
\
MySQLEULA.txt LICENSE.doc README.NW
do
if
[
-f
$i
]
...
...
scripts/make_win_src_distribution.sh
View file @
44004501
...
...
@@ -282,7 +282,7 @@ touch $BASE/innobase/ib_config.h
#
cd
$SOURCE
for
i
in
COPYING C
OPYING.LIB C
hangeLog README
\
for
i
in
COPYING ChangeLog README
\
INSTALL-SOURCE INSTALL-WIN
\
INSTALL-WIN-SOURCE
\
Docs/manual_toc.html Docs/manual.html
\
...
...
scripts/mysql_prepare_privilege_tables_for_5.sql
0 → 100644
View file @
44004501
use
mysql
;
--
-- merging `host` table and `db`
--
UPDATE
IGNORE
host
SET
Host
=
'%'
WHERE
Host
=
''
;
DELETE
FROM
host
WHERE
Host
=
''
;
INSERT
IGNORE
INTO
db
(
User
,
Host
,
Select_priv
,
Insert_priv
,
Update_priv
,
Delete_priv
,
Create_priv
,
Drop_priv
,
Grant_priv
,
References_priv
,
Index_priv
,
Alter_priv
,
Create_tmp_table_priv
,
Lock_tables_priv
)
SELECT
d
.
User
,
h
.
Host
,
(
d
.
Select_priv
=
'Y'
||
h
.
Select_priv
=
'Y'
)
+
1
,
(
d
.
Insert_priv
=
'Y'
||
h
.
Select_priv
=
'Y'
)
+
1
,
(
d
.
Update_priv
=
'Y'
||
h
.
Update_priv
=
'Y'
)
+
1
,
(
d
.
Delete_priv
=
'Y'
||
h
.
Delete_priv
=
'Y'
)
+
1
,
(
d
.
Create_priv
=
'Y'
||
h
.
Create_priv
=
'Y'
)
+
1
,
(
d
.
Drop_priv
=
'Y'
||
h
.
Drop_priv
=
'Y'
)
+
1
,
(
d
.
Grant_priv
=
'Y'
||
h
.
Grant_priv
=
'Y'
)
+
1
,
(
d
.
References_priv
=
'Y'
||
h
.
References_priv
=
'Y'
)
+
1
,
(
d
.
Index_priv
=
'Y'
||
h
.
Index_priv
=
'Y'
)
+
1
,
(
d
.
Alter_priv
=
'Y'
||
h
.
Alter_priv
=
'Y'
)
+
1
,
(
d
.
Create_tmp_table_priv
=
'Y'
||
h
.
Create_tmp_table_priv
=
'Y'
)
+
1
,
(
d
.
Lock_tables_priv
=
'Y'
||
h
.
Lock_tables_priv
=
'Y'
)
+
1
FROM
db
d
,
host
h
WHERE
d
.
Host
=
''
;
UPDATE
IGNORE
db
SET
Host
=
'%'
WHERE
Host
=
''
;
DELETE
FROM
db
WHERE
Host
=
''
;
TRUNCATE
TABLE
host
;
--
-- Adding missing users to `user` table
--
-- note that invalid password causes the user to be skipped during the
-- load of grand tables (at mysqld startup) thus three following inserts
-- do not affect anything
INSERT
IGNORE
user
(
User
,
Host
,
Password
)
SELECT
User
,
Host
,
"*"
FROM
db
;
INSERT
IGNORE
user
(
User
,
Host
,
Password
)
SELECT
User
,
Host
,
"*"
FROM
tables_priv
;
INSERT
IGNORE
user
(
User
,
Host
,
Password
)
SELECT
User
,
Host
,
"*"
FROM
columns_priv
;
SELECT
DISTINCT
"There are user accounts with the username 'PUBLIC'. In the SQL-1999
(or later) standard this name is reserved for PUBLIC role and can
not be used as a valid user name. Consider renaming these accounts before
upgrading to MySQL-5.0.
These accounts are:"
x
FROM
user
WHERE
user
=
'PUBLIC'
;
SELECT
CONCAT
(
user
,
'@'
,
host
)
FROM
user
WHERE
user
=
'PUBLIC'
;
scripts/mysqlaccess.sh
View file @
44004501
...
...
@@ -286,7 +286,7 @@ Release Notes:
* --old_server: mysqlaccess will now use a full where clause when
retrieving information from the MySQL-server. If
you are connecting to an old server (before v3.21)
use the option --old_server.
then
use the option --old_server.
2.03 : (1998-02-27)
- bugfix:
* in Host::MatchTemplate: incorrect match if host-field was left empty.
...
...
sql-bench/bench-init.pl.sh
View file @
44004501
...
...
@@ -509,7 +509,7 @@ All benchmarks takes the following options:
--socket='socket'
If the database supports connecting through a Unix socket,
use this socket to connect
then
use this socket to connect
--regions
This is a test specific option that is only used when debugging a test.
...
...
support-files/mysql.spec.sh
View file @
44004501
...
...
@@ -120,7 +120,6 @@ Este pacote cont
%package devel
Release: %
{
release
}
Requires: %
{
name
}
-client
Summary: MySQL - Development header files and libraries
Group: Applications/Databases
Summary
(
pt_BR
)
: MySQL - Medies de desempenho
...
...
@@ -446,7 +445,7 @@ fi
%files server
%defattr
(
755 root, root
)
%doc %attr
(
644, root, root
)
COPYING
COPYING.LIB
README
%doc %attr
(
644, root, root
)
COPYING README
%doc %attr
(
644, root, root
)
Docs/manual.
{
html,ps,texi,txt
}
Docs/manual_toc.html
%doc %attr
(
644, root, root
)
support-files/my-
*
.cnf
...
...
@@ -569,6 +568,11 @@ fi
# The spec file changelog only includes changes made to the spec file
# itself
%changelog
*
Fri Nov 21 2003 Lenz Grimmer <lenz@mysql.com>
- removed dependency on MySQL-client from the MySQL-devel subpackage
as it is not really required.
(
BUG 1610
)
*
Fri Aug 29 2003 Lenz Grimmer <lenz@mysql.com>
- Fixed BUG 1162
(
removed macro names from the changelog
)
...
...
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