mirror of
https://github.com/MariaDB/server.git
synced 2025-08-05 13:16:09 +03:00
Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into mysql.com:/home/jimw/my/mysql-5.0-clean
This commit is contained in:
@@ -1957,6 +1957,13 @@ AC_CACHE_CHECK([style of gethost* routines], mysql_cv_gethost_style,
|
|||||||
AC_LANG_SAVE
|
AC_LANG_SAVE
|
||||||
AC_LANG_CPLUSPLUS
|
AC_LANG_CPLUSPLUS
|
||||||
|
|
||||||
|
# Test whether madvise() is declared in C++ code -- it is not on some
|
||||||
|
# systems, such as Solaris
|
||||||
|
AC_CHECK_DECLS(madvise, [], [], [#if HAVE_SYS_MMAN_H
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/mman.h>
|
||||||
|
#endif])
|
||||||
|
|
||||||
# Do not treat warnings as errors if we are linking against other libc
|
# Do not treat warnings as errors if we are linking against other libc
|
||||||
# this is to work around gcc not being permissive on non-system includes
|
# this is to work around gcc not being permissive on non-system includes
|
||||||
# with respect to ANSI C++
|
# with respect to ANSI C++
|
||||||
|
@@ -331,6 +331,10 @@ C_MODE_END
|
|||||||
#undef setrlimit
|
#undef setrlimit
|
||||||
#define setrlimit cma_setrlimit64
|
#define setrlimit cma_setrlimit64
|
||||||
#endif
|
#endif
|
||||||
|
/* Declare madvise where it is not declared for C++, like Solaris */
|
||||||
|
#if HAVE_MADVISE && !HAVE_DECL_MADVISE && defined(__cplusplus)
|
||||||
|
extern "C" int madvise(void *addr, size_t len, int behav);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __QNXNTO__
|
#ifdef __QNXNTO__
|
||||||
/* This has to be after include limits.h */
|
/* This has to be after include limits.h */
|
||||||
|
@@ -62,7 +62,7 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg)
|
|||||||
}
|
}
|
||||||
if (share->base.blobs)
|
if (share->base.blobs)
|
||||||
mi_alloc_rec_buff(info, -1, &info->rec_buff);
|
mi_alloc_rec_buff(info, -1, &info->rec_buff);
|
||||||
#if defined(HAVE_MMAP) && defined(HAVE_MADVICE)
|
#if defined(HAVE_MMAP) && defined(HAVE_MADVISE)
|
||||||
if (info->opt_flag & MEMMAP_USED)
|
if (info->opt_flag & MEMMAP_USED)
|
||||||
madvise(share->file_map,share->state.state.data_file_length,MADV_RANDOM);
|
madvise(share->file_map,share->state.state.data_file_length,MADV_RANDOM);
|
||||||
#endif
|
#endif
|
||||||
@@ -93,7 +93,7 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg)
|
|||||||
my_errno=EACCES;
|
my_errno=EACCES;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#if defined(HAVE_MMAP) && defined(HAVE_MADVICE)
|
#if defined(HAVE_MMAP) && defined(HAVE_MADVISE)
|
||||||
if ((share->options & HA_OPTION_COMPRESS_RECORD))
|
if ((share->options & HA_OPTION_COMPRESS_RECORD))
|
||||||
{
|
{
|
||||||
pthread_mutex_lock(&share->intern_lock);
|
pthread_mutex_lock(&share->intern_lock);
|
||||||
@@ -177,7 +177,7 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg)
|
|||||||
error=end_io_cache(&info->rec_cache);
|
error=end_io_cache(&info->rec_cache);
|
||||||
/* Sergei will insert full text index caching here */
|
/* Sergei will insert full text index caching here */
|
||||||
}
|
}
|
||||||
#if defined(HAVE_MMAP) && defined(HAVE_MADVICE)
|
#if defined(HAVE_MMAP) && defined(HAVE_MADVISE)
|
||||||
if (info->opt_flag & MEMMAP_USED)
|
if (info->opt_flag & MEMMAP_USED)
|
||||||
madvise(share->file_map,share->state.state.data_file_length,MADV_RANDOM);
|
madvise(share->file_map,share->state.state.data_file_length,MADV_RANDOM);
|
||||||
#endif
|
#endif
|
||||||
|
4
mysql-test/include/windows.inc
Normal file
4
mysql-test/include/windows.inc
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
--require r/true.require
|
||||||
|
disable_query_log;
|
||||||
|
select convert(@@version_compile_os using latin1) IN ("Win32","Win64","Windows") as "TRUE";
|
||||||
|
enable_query_log;
|
@@ -84,9 +84,3 @@ create table t2 like T1;
|
|||||||
drop table t1, t2;
|
drop table t1, t2;
|
||||||
show tables;
|
show tables;
|
||||||
Tables_in_test
|
Tables_in_test
|
||||||
use lpt1;
|
|
||||||
ERROR 42000: Unknown database 'lpt1'
|
|
||||||
use com1;
|
|
||||||
ERROR 42000: Unknown database 'com1'
|
|
||||||
use prn;
|
|
||||||
ERROR 42000: Unknown database 'prn'
|
|
||||||
|
8
mysql-test/r/windows.result
Normal file
8
mysql-test/r/windows.result
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
use lpt1;
|
||||||
|
ERROR 42000: Unknown database 'lpt1'
|
||||||
|
use com1;
|
||||||
|
ERROR 42000: Unknown database 'com1'
|
||||||
|
use prn;
|
||||||
|
ERROR 42000: Unknown database 'prn'
|
||||||
|
create table nu (a int);
|
||||||
|
drop table nu;
|
@@ -84,14 +84,4 @@ drop table t1, t2;
|
|||||||
|
|
||||||
show tables;
|
show tables;
|
||||||
|
|
||||||
#
|
|
||||||
#Bug 9148: Denial of service
|
|
||||||
#
|
|
||||||
--error 1049
|
|
||||||
use lpt1;
|
|
||||||
--error 1049
|
|
||||||
use com1;
|
|
||||||
--error 1049
|
|
||||||
use prn;
|
|
||||||
|
|
||||||
# End of 4.1 tests
|
# End of 4.1 tests
|
||||||
|
20
mysql-test/t/windows.test
Normal file
20
mysql-test/t/windows.test
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# Windows-specific tests
|
||||||
|
--source include/windows.inc
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug 9148: Denial of service
|
||||||
|
#
|
||||||
|
--error 1049
|
||||||
|
use lpt1;
|
||||||
|
--error 1049
|
||||||
|
use com1;
|
||||||
|
--error 1049
|
||||||
|
use prn;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug #12325: Can't create table named 'nu'
|
||||||
|
#
|
||||||
|
create table nu (a int);
|
||||||
|
drop table nu;
|
||||||
|
|
||||||
|
# End of 4.1 tests
|
@@ -105,7 +105,7 @@ int check_if_legal_filename(const char *path)
|
|||||||
{
|
{
|
||||||
if (*reserved != my_toupper(&my_charset_latin1, *name))
|
if (*reserved != my_toupper(&my_charset_latin1, *name))
|
||||||
break;
|
break;
|
||||||
if (++name == end)
|
if (++name == end && !reserved[1])
|
||||||
DBUG_RETURN(1); /* Found wrong path */
|
DBUG_RETURN(1); /* Found wrong path */
|
||||||
} while (*++reserved);
|
} while (*++reserved);
|
||||||
}
|
}
|
||||||
|
@@ -650,7 +650,7 @@ int ha_tina::rnd_init(bool scan)
|
|||||||
current_position= next_position= 0;
|
current_position= next_position= 0;
|
||||||
records= 0;
|
records= 0;
|
||||||
chain_ptr= chain;
|
chain_ptr= chain;
|
||||||
#ifdef MADV_SEQUENTIAL
|
#ifdef HAVE_MADVISE
|
||||||
(void)madvise(share->mapped_file,share->file_stat.st_size,MADV_SEQUENTIAL);
|
(void)madvise(share->mapped_file,share->file_stat.st_size,MADV_SEQUENTIAL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user