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
4e2766ff
Commit
4e2766ff
authored
May 23, 2005
by
lars@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/bkroot/mysql-4.1 into mysql.com:/home/bk/c4944-4.1
parents
d158d2e7
2536b593
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
102 additions
and
6 deletions
+102
-6
VC++Files/mysys/mysys.dsp
VC++Files/mysys/mysys.dsp
+5
-0
VC++Files/mysys/mysys_ia64.dsp
VC++Files/mysys/mysys_ia64.dsp
+7
-0
include/my_sys.h
include/my_sys.h
+5
-0
myisam/sp_key.c
myisam/sp_key.c
+7
-3
mysql-test/r/reserved_win_names.require
mysql-test/r/reserved_win_names.require
+2
-0
mysql-test/r/reserved_win_names.result
mysql-test/r/reserved_win_names.result
+7
-0
mysql-test/t/reserved_win_names-master.opt
mysql-test/t/reserved_win_names-master.opt
+1
-0
mysql-test/t/reserved_win_names.test
mysql-test/t/reserved_win_names.test
+12
-0
mysys/Makefile.am
mysys/Makefile.am
+1
-1
mysys/mf_pack.c
mysys/mf_pack.c
+1
-1
mysys/my_access.c
mysys/my_access.c
+53
-0
sql/sql_db.cc
sql/sql_db.cc
+1
-1
No files found.
VC++Files/mysys/mysys.dsp
View file @
4e2766ff
...
...
@@ -186,6 +186,11 @@ SOURCE=.\array.c
!ENDIF
# End Source File
# Begin Source File
SOURCE=".\my_access.c"
# End Source File
# Begin Source File
SOURCE=".\charset-def.c"
...
...
VC++Files/mysys/mysys_ia64.dsp
View file @
4e2766ff
...
...
@@ -163,6 +163,13 @@ LIB32=link.exe -lib
# Name "mysys - WinIA64 Max"
# Name "mysys - WinIA64 TLS_DEBUG"
# Name "mysys - WinIA64 TLS"
# Begin Source File
SOURCE=.\my_access.c
# End Source File
# Begin Source File
SOURCE=.\array.c
...
...
include/my_sys.h
View file @
4e2766ff
...
...
@@ -573,6 +573,11 @@ extern char *_my_strdup_with_length(const byte *from, uint length,
const
char
*
sFile
,
uint
uLine
,
myf
MyFlag
);
#ifdef __WIN__
extern
int
my_access
(
const
char
*
path
,
int
amode
);
#else
#define my_access access
#endif
#ifndef TERMINATE
extern
void
TERMINATE
(
FILE
*
file
);
...
...
myisam/sp_key.c
View file @
4e2766ff
...
...
@@ -32,6 +32,10 @@ static int sp_get_geometry_mbr(uchar *(*wkb), uchar *end, uint n_dims,
double
*
mbr
,
int
top
);
static
int
sp_mbr_from_wkb
(
uchar
(
*
wkb
),
uint
size
,
uint
n_dims
,
double
*
mbr
);
static
void
get_double
(
double
*
d
,
const
byte
*
pos
)
{
float8get
(
*
d
,
pos
);
}
uint
sp_make_key
(
register
MI_INFO
*
info
,
uint
keynr
,
uchar
*
key
,
const
byte
*
record
,
my_off_t
filepos
)
...
...
@@ -80,7 +84,7 @@ uint sp_make_key(register MI_INFO *info, uint keynr, uchar *key,
else
if
(
keyseg
->
type
==
HA_KEYTYPE_DOUBLE
)
{
double
nr
;
float8get
(
nr
,
pos
);
get_double
(
&
nr
,
pos
);
if
(
isnan
(
nr
))
{
bzero
(
key
,
length
);
...
...
@@ -138,7 +142,7 @@ static int sp_add_point_to_mbr(uchar *(*wkb), uchar *end, uint n_dims,
{
if
((
*
wkb
)
>
end
-
8
)
return
-
1
;
float8get
(
ord
,
(
*
wkb
)
);
get_double
(
&
ord
,
*
wkb
);
(
*
wkb
)
+=
8
;
if
(
ord
<
*
mbr
)
float8store
((
char
*
)
mbr
,
ord
);
...
...
mysql-test/r/reserved_win_names.require
0 → 100644
View file @
4e2766ff
Variable_name Value
lower_case_table_names 1
mysql-test/r/reserved_win_names.result
0 → 100644
View file @
4e2766ff
use COM1;
ERROR 42000: Unknown database 'com1'
use LPT1;
ERROR 42000: Unknown database 'lpt1'
use PRN;
ERROR 42000: Unknown database 'prn'
mysql-test/t/reserved_win_names-master.opt
0 → 100644
View file @
4e2766ff
--lower_case_table_names=1
mysql-test/t/reserved_win_names.test
0 → 100644
View file @
4e2766ff
#
# Test of reserved Windows names
#
--
require
r
/
reserved_win_names
.
require
--
error
1049
use
COM1
;
--
error
1049
use
LPT1
;
--
error
1049
use
PRN
;
mysys/Makefile.am
View file @
4e2766ff
...
...
@@ -53,7 +53,7 @@ libmysys_a_SOURCES = my_init.c my_getwd.c mf_getdate.c \
my_net.c my_semaphore.c my_port.c my_sleep.c
\
charset.c charset-def.c my_bitmap.c my_bit.c md5.c
\
my_gethostbyname.c rijndael.c my_aes.c sha1.c
\
my_handler.c my_netware.c my_windac.c
my_handler.c my_netware.c my_windac.c
my_access.c
EXTRA_DIST
=
thr_alarm.c thr_lock.c my_pthread.c my_thr_init.c
\
thr_mutex.c thr_rwlock.c
libmysys_a_LIBADD
=
@THREAD_LOBJECTS@
...
...
mysys/mf_pack.c
View file @
4e2766ff
...
...
@@ -226,7 +226,7 @@ void symdirget(char *dir)
{
char
buff
[
FN_REFLEN
];
char
*
pos
=
strend
(
dir
);
if
(
dir
[
0
]
&&
pos
[
-
1
]
!=
FN_DEVCHAR
&&
access
(
dir
,
F_OK
))
if
(
dir
[
0
]
&&
pos
[
-
1
]
!=
FN_DEVCHAR
&&
my_
access
(
dir
,
F_OK
))
{
File
file
;
uint
length
;
...
...
mysys/my_access.c
0 → 100644
View file @
4e2766ff
/* Copyright (C) 2000 MySQL AB
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include "mysys_priv.h"
#ifdef __WIN__
/*
* Check a file or path for accessability.
*
* SYNOPSIS
* file_access()
* pathpath to check
* amodemode to check
*
* DESCRIPTION
* This function wraps the normal access method because the access
* available in MSVCRT> +reports that filenames such as LPT1 and
* COM1 are valid (they are but should not be so for us).
*
* RETURN VALUES
* 0 ok
* -1 error
*/
int
my_access
(
const
char
*
path
,
int
amode
)
{
WIN32_FILE_ATTRIBUTE_DATA
fileinfo
;
BOOL
result
;
result
=
GetFileAttributesEx
(
path
,
GetFileExInfoStandard
,
&
fileinfo
);
if
(
!
result
)
return
-
1
;
if
((
fileinfo
.
dwFileAttributes
&
FILE_ATTRIBUTE_READONLY
)
&&
(
amode
&
2
))
return
-
1
;
return
0
;
}
#endif
sql/sql_db.cc
View file @
4e2766ff
...
...
@@ -946,7 +946,7 @@ bool mysql_change_db(THD *thd, const char *name)
length
=
unpack_dirname
(
path
,
path
);
// Convert if not unix
if
(
length
&&
path
[
length
-
1
]
==
FN_LIBCHAR
)
path
[
length
-
1
]
=
0
;
// remove ending '\'
if
(
access
(
path
,
F_OK
))
if
(
my_
access
(
path
,
F_OK
))
{
net_printf
(
thd
,
ER_BAD_DB_ERROR
,
dbname
);
my_free
(
dbname
,
MYF
(
0
));
...
...
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