MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Horst Hunger Date:December 4 2008 9:50am
Subject:bzr commit into mysql-6.0-bugteam branch (horst:2750)
View as plain text  
#At file:///work/bzr/mysql-6.0-bug/

 2750 Horst Hunger	2008-12-04 [merge]
      due to merge
added:
  mysql-test/r/ctype_filesystem.result
  mysql-test/suite/falcon/t/falcon_bug_22184-master.opt
  mysql-test/suite/sys_vars/t/disabled.def
  mysql-test/t/ctype_filesystem-master.opt
  mysql-test/t/ctype_filesystem.test
modified:
  client/mysqltest.c
  extra/yassl/src/yassl_imp.cpp
  include/m_ctype.h
  include/m_string.h
  include/my_global.h
  include/my_sys.h
  include/mysql.h
  libmysql/libmysql.def
  libmysqld/examples/CMakeLists.txt
  libmysqld/libmysqld.c
  libmysqld/libmysqld.def
  mysql-test/r/func_sapdb.result
  mysql-test/r/perror-win.result
  mysql-test/r/read_buffer_size_basic.result
  mysql-test/r/subselect.result
  mysql-test/r/timezone2.result
  mysql-test/r/timezone3.result
  mysql-test/r/update.result
  mysql-test/r/variables.result
  mysql-test/r/view.result
  mysql-test/std_data/Moscow_leap
  mysql-test/suite/falcon/r/falcon_bug_22184.result
  mysql-test/suite/falcon/t/falcon_bug_22184.test
  mysql-test/t/disabled.def
  mysql-test/t/func_sapdb.test
  mysql-test/t/perror-win.test
  mysql-test/t/perror.test
  mysql-test/t/subselect.test
  mysql-test/t/timezone3.test
  mysql-test/t/update.test
  mysql-test/t/variables.test
  mysql-test/t/view.test
  mysys/my_fopen.c
  mysys/my_getopt.c
  sql/item_cmpfunc.cc
  sql/item_cmpfunc.h
  sql/item_func.cc
  sql/item_timefunc.h
  sql/my_decimal.cc
  sql/mysql_priv.h
  sql/mysqld.cc
  sql/set_var.cc
  sql/set_var.h
  sql/slave.cc
  sql/sql_show.cc
  sql/sql_update.cc
  sql/sql_view.cc
  sql/tztime.cc
  sql/tztime.h
  storage/innobase/handler/ha_innodb.cc

=== modified file 'client/mysqltest.c'
--- a/client/mysqltest.c	2008-11-03 17:51:36 +0000
+++ b/client/mysqltest.c	2008-12-03 14:05:31 +0000
@@ -147,7 +147,7 @@ static struct st_test_file* cur_file;
 static struct st_test_file* file_stack_end;
 
 
-static CHARSET_INFO *charset_info= &my_charset_latin1; /* Default charset */
+static CHARSET_INFO *charset_info; /* Default charset */
 
 static const char *embedded_server_groups[]=
 {
@@ -7255,6 +7255,7 @@ int main(int argc, char **argv)
   MY_STAT res_info;
   MY_INIT(argv[0]);
 
+  charset_info= &my_charset_latin1;
   save_file[0]= 0;
   TMPDIR[0]= 0;
 

=== modified file 'extra/yassl/src/yassl_imp.cpp'
--- a/extra/yassl/src/yassl_imp.cpp	2008-11-18 21:17:04 +0000
+++ b/extra/yassl/src/yassl_imp.cpp	2008-12-02 11:25:43 +0000
@@ -1560,6 +1560,7 @@ void ClientHello::Process(input_buffer&,
         return;
     }
     ssl.matchSuite(cipher_suites_, suite_len_);
+    if (ssl.GetError()) return;
     ssl.set_pending(ssl.getSecurity().get_parms().suite_[1]);
 
     if (compression_methods_ == zlib)

=== modified file 'include/m_ctype.h'
--- a/include/m_ctype.h	2008-07-23 09:43:50 +0000
+++ b/include/m_ctype.h	2008-12-03 14:05:31 +0000
@@ -321,7 +321,7 @@ typedef struct charset_info_st
 #define ILLEGAL_CHARSET_INFO_NUMBER (~0U)
 
 
-extern CHARSET_INFO my_charset_bin;
+MY_DLLEXPORT CHARSET_INFO my_charset_bin;
 extern CHARSET_INFO my_charset_big5_chinese_ci;
 extern CHARSET_INFO my_charset_big5_bin;
 extern CHARSET_INFO my_charset_cp932_japanese_ci;
@@ -336,7 +336,7 @@ extern CHARSET_INFO my_charset_gb2312_ch
 extern CHARSET_INFO my_charset_gb2312_bin;
 extern CHARSET_INFO my_charset_gbk_chinese_ci;
 extern CHARSET_INFO my_charset_gbk_bin;
-extern CHARSET_INFO my_charset_latin1;
+MY_DLLEXPORT CHARSET_INFO my_charset_latin1;
 extern CHARSET_INFO my_charset_latin1_german2_ci;
 extern CHARSET_INFO my_charset_latin1_bin;
 extern CHARSET_INFO my_charset_latin2_czech_ci;

=== modified file 'include/m_string.h'
--- a/include/m_string.h	2008-06-26 18:29:30 +0000
+++ b/include/m_string.h	2008-12-03 14:05:31 +0000
@@ -89,8 +89,8 @@ extern char *stpcpy(char *, const char *
 #endif
 
 /* Declared in int2str() */
-extern char NEAR _dig_vec_upper[];
-extern char NEAR _dig_vec_lower[];
+MY_DLLEXPORT char NEAR _dig_vec_upper[];
+MY_DLLEXPORT char NEAR _dig_vec_lower[];
 
 #ifdef BAD_STRING_COMPILER
 #define strmov(A,B)  (memccpy(A,B,0,INT_MAX)-1)

=== modified file 'include/my_global.h'
--- a/include/my_global.h	2008-11-19 10:04:44 +0000
+++ b/include/my_global.h	2008-12-03 14:05:31 +0000
@@ -1615,4 +1615,10 @@ inline void  operator delete[](void*, vo
 #  define __func__ "<unknown>"
 #endif
 
+#ifdef MY_USE_CLIENT_DLL
+#define MY_DLLEXPORT __declspec(dllimport)
+#else
+#define MY_DLLEXPORT extern
+#endif /*MY_USE_CLIENT_DLL*/
+
 #endif /* my_global_h */

=== modified file 'include/my_sys.h'
--- a/include/my_sys.h	2008-10-20 19:13:22 +0000
+++ b/include/my_sys.h	2008-12-03 14:05:31 +0000
@@ -218,7 +218,7 @@ extern int errno;			/* declare errno */
 #endif					/* #ifndef errno */
 extern char NEAR errbuff[NRERRBUFFS][ERRMSGSIZE];
 extern char *home_dir;			/* Home directory for user */
-extern const char *my_progname;		/* program-name (printed in errors) */
+MY_DLLEXPORT const char *my_progname;		/* program-name (printed in errors) */
 extern const char *my_progname_short;	/* like above but without directory */
 extern char NEAR curr_dir[];		/* Current directory for user */
 extern void (*error_handler_hook)(uint my_err, const char *str,myf MyFlags);
@@ -682,6 +682,7 @@ extern void     my_osmaperr(unsigned lon
 extern void TERMINATE(FILE *file, uint flag);
 #endif
 extern void init_glob_errs(void);
+extern void make_ftype(char * to,int flag);
 extern FILE *my_fopen(const char *FileName,int Flags,myf MyFlags);
 extern FILE *my_fdopen(File Filedes,const char *name, int Flags,myf MyFlags);
 extern int my_fclose(FILE *fd,myf MyFlags);

=== modified file 'include/mysql.h'
--- a/include/mysql.h	2008-08-07 17:52:43 +0000
+++ b/include/mysql.h	2008-12-03 14:05:31 +0000
@@ -748,6 +748,12 @@ int		STDCALL mysql_drop_db(MYSQL *mysql,
 #pragma pack(pop)		/* restore alignment */
 #endif
 
+#ifdef MY_USE_CLIENT_DLL
+char *emb_make_ftype(int type);
+#define my_fopen(name, mode, flags) fopen(name, emb_make_ftype(mode))
+#define my_fclose(file, flags) fclose(file)
+#endif /*MY_USE_CLIENT_DLL*/
+
 #ifdef	__cplusplus
 }
 #endif

=== modified file 'libmysql/libmysql.def'
--- a/libmysql/libmysql.def	2008-08-11 10:03:45 +0000
+++ b/libmysql/libmysql.def	2008-12-03 14:05:31 +0000
@@ -1,8 +1,9 @@
 LIBRARY		LIBMYSQL
 VERSION		6.0
 EXPORTS
-	_dig_vec_lower
-	_dig_vec_upper
+	_dig_vec_lower DATA
+	_dig_vec_upper DATA
+        my_progname DATA
 	bmove_upp
 	delete_dynamic
 	free_defaults

=== modified file 'libmysqld/examples/CMakeLists.txt'
--- a/libmysqld/examples/CMakeLists.txt	2008-11-19 12:11:30 +0000
+++ b/libmysqld/examples/CMakeLists.txt	2008-12-03 14:05:31 +0000
@@ -24,18 +24,18 @@ IF(WIN32)
   ADD_DEFINITIONS(-DUSE_TLS)
 ENDIF(WIN32)
 
-ADD_DEFINITIONS(-DEMBEDDED_LIBRARY)
+ADD_DEFINITIONS(-DEMBEDDED_LIBRARY -DMY_USE_CLIENT_DLL)
 
 ADD_EXECUTABLE(mysql_embedded ../../client/completion_hash.cc
                ../../client/mysql.cc ../../client/readline.cc
                ../../client/sql_string.cc)
-TARGET_LINK_LIBRARIES(mysql_embedded ws2_32)
+TARGET_LINK_LIBRARIES(mysql_embedded)
 ADD_DEPENDENCIES(mysql_embedded libmysqld)
 
 ADD_EXECUTABLE(mysqltest_embedded ../../client/mysqltest.c)
-TARGET_LINK_LIBRARIES(mysqltest_embedded ws2_32)
+TARGET_LINK_LIBRARIES(mysqltest_embedded)
 ADD_DEPENDENCIES(mysqltest_embedded libmysqld)
 
 ADD_EXECUTABLE(mysql_client_test_embedded ../../tests/mysql_client_test.c)
-TARGET_LINK_LIBRARIES(mysql_client_test_embedded ws2_32)
+TARGET_LINK_LIBRARIES(mysql_client_test_embedded)
 ADD_DEPENDENCIES(mysql_client_test_embedded libmysqld)

=== modified file 'libmysqld/libmysqld.c'
--- a/libmysqld/libmysqld.c	2008-10-17 15:11:28 +0000
+++ b/libmysqld/libmysqld.c	2008-12-03 14:05:31 +0000
@@ -223,3 +223,14 @@ error:
   DBUG_RETURN(0);
 }
 
+
+#ifdef __WIN__
+static char emb_makeftype_buffer[10];
+
+char *emb_make_ftype(int type)
+{
+  make_ftype(emb_makeftype_buffer, type);
+  return emb_makeftype_buffer;
+}
+#endif /*__WIN__*/
+

=== modified file 'libmysqld/libmysqld.def'
--- a/libmysqld/libmysqld.def	2008-11-26 11:54:39 +0000
+++ b/libmysqld/libmysqld.def	2008-12-03 14:05:31 +0000
@@ -44,7 +44,7 @@ EXPORTS
 	pthread_create
 	pthread_cond_init
 	ll2str
-	my_fileno
+        my_fileno
 	my_gcvt
 	my_regcomp
 	my_regexec
@@ -63,8 +63,8 @@ EXPORTS
 	my_dir
 	my_micro_time
 	find_type_or_exit
-	_dig_vec_upper
-	_dig_vec_lower
+	_dig_vec_upper DATA
+	_dig_vec_lower DATA
 	bmove_upp
 	delete_dynamic
 	free_defaults
@@ -177,17 +177,18 @@ EXPORTS
 	mysql_sqlstate
 	charsets_dir
 	disabled_my_option
-	my_charset_latin1
+	my_charset_latin1 DATA
+	my_charset_bin DATA
+	my_charset_same
 	init_alloc_root
-	my_progname
+	my_progname DATA
 	get_charset_name
 	get_charset_by_csname
 	print_defaults
 	find_type
 	strxnmov
 	strend
-	my_fopen
-	my_fclose
+        emb_make_ftype
 	unpack_filename
 	str2int
 	int10_to_str
@@ -228,7 +229,5 @@ EXPORTS
 	mysql_stmt_attr_set
 	mysql_stmt_field_count
 	get_defaults_options
-	my_charset_bin
-	my_charset_same
 	modify_defaults_file
         mysql_stmt_next_result

=== added file 'mysql-test/r/ctype_filesystem.result'
--- a/mysql-test/r/ctype_filesystem.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/ctype_filesystem.result	2008-12-01 11:34:53 +0000
@@ -0,0 +1,11 @@
+SET CHARACTER SET utf8;
+SHOW VARIABLES like 'character_sets_dir';
+Variable_name	Value
+character_sets_dir	MYSQL_TEST_DIR/ß/
+SHOW VARIABLES like 'character_set_filesystem';
+Variable_name	Value
+character_set_filesystem	latin1
+SHOW VARIABLES like 'character_set_client';
+Variable_name	Value
+character_set_client	utf8
+SET CHARACTER SET default;

=== modified file 'mysql-test/r/func_sapdb.result'
--- a/mysql-test/r/func_sapdb.result	2007-10-23 15:15:12 +0000
+++ b/mysql-test/r/func_sapdb.result	2008-11-27 16:44:19 +0000
@@ -256,3 +256,15 @@ a
 select str_to_date("2003-01-02 10:11:12.0012", "%Y-%m-%d %H:%i:%S.%f");
 str_to_date("2003-01-02 10:11:12.0012", "%Y-%m-%d %H:%i:%S.%f")
 2003-01-02 10:11:12.001200
+select timediff('2008-09-29 20:10:10','2008-09-30 20:10:10'),time('00:00:00');
+timediff('2008-09-29 20:10:10','2008-09-30 20:10:10')	time('00:00:00')
+-24:00:00	00:00:00
+select timediff('2008-09-29 20:10:10','2008-09-30 20:10:10')>time('00:00:00');
+timediff('2008-09-29 20:10:10','2008-09-30 20:10:10')>time('00:00:00')
+0
+select timediff('2008-09-29 20:10:10','2008-09-30 20:10:10')<time('00:00:00');
+timediff('2008-09-29 20:10:10','2008-09-30 20:10:10')<time('00:00:00')
+1
+SELECT CAST(time('-73:42:12') AS DECIMAL);
+CAST(time('-73:42:12') AS DECIMAL)
+-734212

=== modified file 'mysql-test/r/perror-win.result'
--- a/mysql-test/r/perror-win.result	2008-11-27 12:33:40 +0000
+++ b/mysql-test/r/perror-win.result	2008-12-01 19:51:01 +0000
@@ -1,5 +1,7 @@
 MySQL error code 150: Foreign key constraint is incorrectly formed
-Win32 error code 150: System trace information was not specified in your CONFIG.SYS file, or tracing is disallowed.
+Win32 error code 150: System trace information was not specified in your CONFIG.SYS file, or tracing is disallowed.
 OS error code  23:  Too many open files in system
-Win32 error code 23: Data error (cyclic redundancy check).
-Win32 error code 15000: The specified channel path is invalid.
+Win32 error code 23: Data error (cyclic redundancy check).
+MySQL error code 1062 (ER_DUP_ENTRY): Duplicate entry '%-.192s' for key %d
+Win32 error code 1062: The service has not been started.
+Illegal error code: 30000

=== modified file 'mysql-test/r/read_buffer_size_basic.result'
--- a/mysql-test/r/read_buffer_size_basic.result	2008-04-10 13:14:28 +0000
+++ b/mysql-test/r/read_buffer_size_basic.result	2008-11-10 17:30:13 +0000
@@ -86,6 +86,8 @@ SELECT @@global.read_buffer_size= 8200 O
 @@global.read_buffer_size= 8200 OR @@global.read_buffer_size= 8228
 1
 SET @@global.read_buffer_size = 2147479553;
+Warnings:
+Warning	1292	Truncated incorrect read_buffer_size value: '2147479553'
 SELECT @@global.read_buffer_size;
 @@global.read_buffer_size
 2147479552
@@ -114,6 +116,8 @@ SELECT @@session.read_buffer_size= 8200 
 SET @@session.read_buffer_size = 65530.34.;
 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1
 SET @@session.read_buffer_size = 2147479553;
+Warnings:
+Warning	1292	Truncated incorrect read_buffer_size value: '2147479553'
 SELECT @@session.read_buffer_size;
 @@session.read_buffer_size
 2147479552

=== modified file 'mysql-test/r/subselect.result'
--- a/mysql-test/r/subselect.result	2008-11-27 14:25:02 +0000
+++ b/mysql-test/r/subselect.result	2008-11-28 11:40:40 +0000
@@ -4659,36 +4659,6 @@ SELECT t1.a, (SELECT 1 FROM t2 WHERE t2.
 a	incorrect
 1	1
 DROP TABLE t1,t2,t3;
-CREATE TABLE t1 (id int);
-CREATE TABLE t2 (id int, c int);
-INSERT INTO t1 (id) VALUES (1);
-INSERT INTO t2 (id) VALUES (1);
-INSERT INTO t1 (id) VALUES (1);
-INSERT INTO t2 (id) VALUES (1);
-CREATE VIEW v1 AS
-SELECT t2.c AS c FROM t1, t2
-WHERE t1.id=t2.id AND 1 IN (SELECT id FROM t1) WITH CHECK OPTION;
-UPDATE v1 SET c=1;
-CREATE VIEW v2 (a,b) AS
-SELECT t2.id, t2.c AS c FROM t1, t2
-WHERE t1.id=t2.id AND 1 IN (SELECT id FROM t1) WITH CHECK OPTION;
-INSERT INTO v2(a,b) VALUES (2,2);
-ERROR HY000: CHECK OPTION failed 'test.v2'
-INSERT INTO v2(a,b) VALUES (1,2);
-SELECT * FROM v1;
-c
-1
-1
-1
-1
-2
-2
-CREATE VIEW v3 AS
-SELECT t2.c AS c FROM t2
-WHERE 1 IN (SELECT id FROM t1) WITH CHECK OPTION;
-DELETE FROM v3;
-DROP VIEW v1,v2,v3;
-DROP TABLE t1,t2;
 End of 5.1 tests.
 CREATE TABLE t1( a INT );
 INSERT INTO t1 VALUES (1),(2);

=== modified file 'mysql-test/r/timezone2.result'
--- a/mysql-test/r/timezone2.result	2007-03-09 10:12:31 +0000
+++ b/mysql-test/r/timezone2.result	2008-12-01 15:43:51 +0000
@@ -110,7 +110,7 @@ i	ts
 362793610	1981-07-01 04:00:00
 select from_unixtime(362793609);
 from_unixtime(362793609)
-1981-07-01 03:59:60
+1981-07-01 03:59:59
 drop table t1;
 create table t1 (ts timestamp);
 set time_zone='UTC';

=== modified file 'mysql-test/r/timezone3.result'
--- a/mysql-test/r/timezone3.result	2004-11-12 15:44:17 +0000
+++ b/mysql-test/r/timezone3.result	2008-12-01 14:18:35 +0000
@@ -17,6 +17,9 @@ insert into t1 values
 insert into t1 values
 (unix_timestamp('1981-07-01 03:59:59'),'1981-07-01 03:59:59'),
 (unix_timestamp('1981-07-01 04:00:00'),'1981-07-01 04:00:00');
+insert into t1 values
+(unix_timestamp('2009-01-01 02:59:59'),'2009-01-01 02:59:59'),
+(unix_timestamp('2009-01-01 03:00:00'),'2009-01-01 03:00:00');
 select i, from_unixtime(i), c from t1;
 i	from_unixtime(i)	c
 1072904422	2004-01-01 00:00:00	2004-01-01 00:00:00
@@ -31,6 +34,8 @@ i	from_unixtime(i)	c
 1099180821	2004-10-31 02:59:59	2004-10-31 02:59:59
 362793608	1981-07-01 03:59:59	1981-07-01 03:59:59
 362793610	1981-07-01 04:00:00	1981-07-01 04:00:00
+1230768022	2009-01-01 02:59:59	2009-01-01 02:59:59
+1230768024	2009-01-01 03:00:00	2009-01-01 03:00:00
 drop table t1;
 create table t1 (ts timestamp);
 insert into t1 values (19730101235900), (20040101235900);
@@ -39,3 +44,6 @@ ts
 1973-01-01 23:59:00
 2004-01-01 23:59:00
 drop table t1;
+SELECT FROM_UNIXTIME(1230768022), FROM_UNIXTIME(1230768023), FROM_UNIXTIME(1230768024);
+FROM_UNIXTIME(1230768022)	FROM_UNIXTIME(1230768023)	FROM_UNIXTIME(1230768024)
+2009-01-01 02:59:59	2009-01-01 02:59:59	2009-01-01 03:00:00

=== modified file 'mysql-test/r/update.result'
--- a/mysql-test/r/update.result	2007-04-27 08:42:15 +0000
+++ b/mysql-test/r/update.result	2008-11-28 16:36:07 +0000
@@ -491,4 +491,15 @@ update t1 join t2 on (t1.a=t2.a) set t1.
 affected rows: 127
 info: Rows matched: 128  Changed: 127  Warnings: 0
 drop table t1,t2;
+DROP TABLE IF EXISTS t1;
+DROP FUNCTION IF EXISTS f1;
+CREATE FUNCTION f1() RETURNS INT RETURN f1();
+CREATE TABLE t1 (i INT);
+INSERT INTO t1 VALUES (1);
+UPDATE t1 SET i = 3 WHERE f1();
+ERROR HY000: Recursive stored functions and triggers are not allowed.
+UPDATE t1 SET i = f1();
+ERROR HY000: Recursive stored functions and triggers are not allowed.
+DROP TABLE t1;
+DROP FUNCTION f1;
 End of 5.0 tests

=== modified file 'mysql-test/r/variables.result'
--- a/mysql-test/r/variables.result	2008-11-24 20:46:11 +0000
+++ b/mysql-test/r/variables.result	2008-11-27 11:01:59 +0000
@@ -1325,19 +1325,6 @@ ERROR HY000: Variable 'skip_show_databas
 SET @@global.skip_show_database= true;
 ERROR HY000: Variable 'skip_show_database' is a read only variable
 #
-SHOW VARIABLES like 'socket';
-Variable_name	Value
-socket	#
-SELECT @@session.socket;
-ERROR HY000: Variable 'socket' is a GLOBAL variable
-SELECT @@global.socket;
-@@global.socket
-#
-SET @@session.socket= 'x';
-ERROR HY000: Variable 'socket' is a read only variable
-SET @@global.socket= 'x';
-ERROR HY000: Variable 'socket' is a read only variable
-#
 SHOW VARIABLES like 'thread_stack';
 Variable_name	Value
 thread_stack	#

=== modified file 'mysql-test/r/view.result'
--- a/mysql-test/r/view.result	2008-10-29 13:55:04 +0000
+++ b/mysql-test/r/view.result	2008-11-28 17:51:47 +0000
@@ -625,7 +625,7 @@ drop table t1;
 create table t1 (a int, b int);
 create view v1 as select a, sum(b) from t1 group by a;
 select b from v1 use index (some_index) where b=1;
-ERROR HY000: Incorrect usage of index hints and VIEW
+ERROR 42000: Key 'some_index' doesn't exist in table 'v1'
 drop view v1;
 drop table t1;
 create table t1 (col1 char(5),col2 char(5));
@@ -3563,11 +3563,11 @@ CREATE TABLE t1 (a INT);
 INSERT INTO t1 VALUES (1),(2);
 CREATE VIEW v1 AS SELECT * FROM t1;
 SELECT * FROM v1 USE KEY(non_existant);
-ERROR HY000: Incorrect usage of index hints and VIEW
+ERROR 42000: Key 'non_existant' doesn't exist in table 'v1'
 SELECT * FROM v1 FORCE KEY(non_existant);
-ERROR HY000: Incorrect usage of index hints and VIEW
+ERROR 42000: Key 'non_existant' doesn't exist in table 'v1'
 SELECT * FROM v1 IGNORE KEY(non_existant);
-ERROR HY000: Incorrect usage of index hints and VIEW
+ERROR 42000: Key 'non_existant' doesn't exist in table 'v1'
 DROP VIEW v1;
 DROP TABLE t1;
 CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b INT NOT NULL DEFAULT 0,
@@ -3675,6 +3675,31 @@ DROP VIEW v1;
 
 CREATE VIEW v1 AS SELECT 1;
 DROP VIEW v1;
+CREATE TABLE t1 (c1 INT PRIMARY KEY, c2 INT, INDEX (c2));
+INSERT INTO t1 VALUES (1,1), (2,2), (3,3);
+SELECT * FROM t1 USE INDEX (PRIMARY) WHERE c1=2;
+c1	c2
+2	2
+SELECT * FROM t1 USE INDEX (c2) WHERE c2=2;
+c1	c2
+2	2
+CREATE VIEW v1 AS SELECT c1, c2 FROM t1;
+SHOW INDEX FROM v1;
+Table	Non_unique	Key_name	Seq_in_index	Column_name	Collation	Cardinality	Sub_part	Packed	Null	Index_type	Comment	Index_Comment
+SELECT * FROM v1 USE INDEX (PRIMARY) WHERE c1=2;
+ERROR 42000: Key 'PRIMARY' doesn't exist in table 'v1'
+SELECT * FROM v1 FORCE INDEX (PRIMARY) WHERE c1=2;
+ERROR 42000: Key 'PRIMARY' doesn't exist in table 'v1'
+SELECT * FROM v1 IGNORE INDEX (PRIMARY) WHERE c1=2;
+ERROR 42000: Key 'PRIMARY' doesn't exist in table 'v1'
+SELECT * FROM v1 USE INDEX (c2) WHERE c2=2;
+ERROR 42000: Key 'c2' doesn't exist in table 'v1'
+SELECT * FROM v1 FORCE INDEX (c2) WHERE c2=2;
+ERROR 42000: Key 'c2' doesn't exist in table 'v1'
+SELECT * FROM v1 IGNORE INDEX (c2) WHERE c2=2;
+ERROR 42000: Key 'c2' doesn't exist in table 'v1'
+DROP VIEW v1;
+DROP TABLE t1;
 # -----------------------------------------------------------------
 # -- End of 5.0 tests.
 # -----------------------------------------------------------------
@@ -3809,3 +3834,33 @@ create view v_9801 as
 select sum(s1) from t_9801 group by s1 with rollup with check option;
 ERROR HY000: CHECK OPTION on non-updatable view 'test.v_9801'
 drop table t_9801;
+CREATE TABLE t1 (id int);
+CREATE TABLE t2 (id int, c int);
+INSERT INTO t1 (id) VALUES (1);
+INSERT INTO t2 (id) VALUES (1);
+INSERT INTO t1 (id) VALUES (1);
+INSERT INTO t2 (id) VALUES (1);
+CREATE VIEW v1 AS
+SELECT t2.c AS c FROM t1, t2
+WHERE t1.id=t2.id AND 1 IN (SELECT id FROM t1) WITH CHECK OPTION;
+UPDATE v1 SET c=1;
+CREATE VIEW v2 (a,b) AS
+SELECT t2.id, t2.c AS c FROM t1, t2
+WHERE t1.id=t2.id AND 1 IN (SELECT id FROM t1) WITH CHECK OPTION;
+INSERT INTO v2(a,b) VALUES (2,2);
+ERROR HY000: CHECK OPTION failed 'test.v2'
+INSERT INTO v2(a,b) VALUES (1,2);
+SELECT * FROM v1;
+c
+1
+1
+1
+1
+2
+2
+CREATE VIEW v3 AS
+SELECT t2.c AS c FROM t2
+WHERE 1 IN (SELECT id FROM t1) WITH CHECK OPTION;
+DELETE FROM v3;
+DROP VIEW v1,v2,v3;
+DROP TABLE t1,t2;

=== modified file 'mysql-test/std_data/Moscow_leap'
Dateien a/mysql-test/std_data/Moscow_leap	2004-11-03 17:59:03 +0000 und b/mysql-test/std_data/Moscow_leap	2008-12-01 14:18:35 +0000 sind verschieden.

=== modified file 'mysql-test/suite/falcon/r/falcon_bug_22184.result'
--- a/mysql-test/suite/falcon/r/falcon_bug_22184.result	2007-09-20 15:44:25 +0000
+++ b/mysql-test/suite/falcon/r/falcon_bug_22184.result	2008-12-01 14:29:45 +0000
@@ -1,7 +1,6 @@
 SET STORAGE_ENGINE = Falcon;
 *** Bug #22184 ***
 DROP TABLE IF EXISTS t6;
-SET @@max_allowed_packet = 20000000;
 CREATE TABLE t6 (s1 longblob);
 INSERT INTO t6 VALUES (repeat('a',2100000));
 INSERT INTO t6 VALUES (repeat('a',2200000));

=== added file 'mysql-test/suite/falcon/t/falcon_bug_22184-master.opt'
--- a/mysql-test/suite/falcon/t/falcon_bug_22184-master.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/falcon/t/falcon_bug_22184-master.opt	2008-12-01 14:29:45 +0000
@@ -0,0 +1 @@
+--max_allowed_packet=20000000

=== modified file 'mysql-test/suite/falcon/t/falcon_bug_22184.test'
--- a/mysql-test/suite/falcon/t/falcon_bug_22184.test	2007-09-29 04:30:42 +0000
+++ b/mysql-test/suite/falcon/t/falcon_bug_22184.test	2008-12-01 14:29:45 +0000
@@ -8,7 +8,6 @@ SET STORAGE_ENGINE = Falcon;
 DROP TABLE IF EXISTS t6;
 --enable_warnings
 
-SET @@max_allowed_packet = 20000000;
 CREATE TABLE t6 (s1 longblob);
 INSERT INTO t6 VALUES (repeat('a',2100000));
 INSERT INTO t6 VALUES (repeat('a',2200000));

=== added file 'mysql-test/suite/sys_vars/t/disabled.def'
--- a/mysql-test/suite/sys_vars/t/disabled.def	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/t/disabled.def	2008-11-26 15:16:58 +0000
@@ -0,0 +1,21 @@
+##############################################################################
+#
+#  List the test cases that are to be disabled temporarily.
+#
+#  Separate the test case name and the comment with ':'.
+#
+#    <testcasename> : BUG#<xxxx> <date disabled> <disabler> <comment>
+#
+#  Do not use any TAB characters for whitespace.
+#
+##############################################################################
+key_buffer_size_basic_64    : Bug #36522: Some tests of system variables have diffs on 64bit platorms
+rpl_recovery_rank_basic_64  : Bug #36522: Some tests of system variables have diffs on 64bit platorms
+sort_buffer_size_basic_64   : Bug #36522: Some tests of system variables have diffs on 64bit platorms
+query_cache_size_basic_32   : Bug#36747: Allocating a large query cache is not deterministic
+query_cache_size_basic_64   : Bug#36747: Allocating a large query cache is not deterministic
+query_alloc_block_size_basic_64:  Bug #37708 query_alloc_block_size_basic_64 fails in pushbuild
+sort_buffer_size_basic_32   : Bug#36875 main.sort_buffer_size_basic_32 fails on some systems
+key_buffer_size_basic_32    : Bug#36876 main.key_buffer_size_basic_32 fails on some systems
+max_heap_table_size_basic_32 : Bug#36877 main.max_heap_table_size_basic_32 fails on some systems
+tmp_table_size_basic_32     : Bug#36878 main.tmp_table_size_basic_32 fails on some systems

=== added file 'mysql-test/t/ctype_filesystem-master.opt'
--- a/mysql-test/t/ctype_filesystem-master.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/ctype_filesystem-master.opt	2008-12-01 11:34:53 +0000
@@ -0,0 +1,2 @@
+--character-sets-dir=$MYSQL_TEST_DIR/�+--character-set-filesystem=latin1

=== added file 'mysql-test/t/ctype_filesystem.test'
--- a/mysql-test/t/ctype_filesystem.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/ctype_filesystem.test	2008-12-01 11:34:53 +0000
@@ -0,0 +1,6 @@
+SET CHARACTER SET utf8;
+--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
+SHOW VARIABLES like 'character_sets_dir';
+SHOW VARIABLES like 'character_set_filesystem';
+SHOW VARIABLES like 'character_set_client';
+SET CHARACTER SET default;

=== modified file 'mysql-test/t/disabled.def'
--- a/mysql-test/t/disabled.def	2008-11-27 16:45:25 +0000
+++ b/mysql-test/t/disabled.def	2008-12-04 09:49:59 +0000
@@ -12,11 +12,11 @@
 innodb          : WL#1213: Waiting for InnoDB team to add support for 4-byte character sets.
 federated_transactions   : Bug#29523 Transactions do not work
 lowercase_table3         : Bug#32667 lowercase_table3.test reports to error log
-rpl_log_pos          : Bug#8693 Test 'rpl_log_pos' fails sometimes
 ctype_create         : Bug#32965 main.ctype_create fails
 backup_no_engine     : Bug#36021 2008-04-13 rsomla server crashes when openning table with unknown storage engine
 csv_alter_table      : Bug#33696 2008-01-21 pcrews no .result file - bug allows NULL columns in CSV tables
 query_cache_wlock_invalidate_func: Bug#35390 causes not deterministic results.
+csv_alter_table      : Bug#33696 2008-01-21 pcrews no .result file - bug allows NULL columns in CSV tables
 cast                 : Bug#35594 2008-03-27 main.cast fails on Windows2003-64
 maria-preload        : Bug#35107 crashes
 key_buffer_size_basic_64    : Bug #36522: Some tests of system variables have diffs on 64bit platorms

=== modified file 'mysql-test/t/func_sapdb.test'
--- a/mysql-test/t/func_sapdb.test	2007-10-12 09:47:28 +0000
+++ b/mysql-test/t/func_sapdb.test	2008-11-27 11:33:04 +0000
@@ -135,3 +135,20 @@ select str_to_date("2003-01-02 10:11:12.
 --enable_ps_protocol
 
 # End of 4.1 tests
+
+
+
+#
+# Bug#37553: MySql Error Compare TimeDiff & Time
+#
+
+# calculations involving negative time values ignored sign
+select timediff('2008-09-29 20:10:10','2008-09-30 20:10:10'),time('00:00:00');
+select timediff('2008-09-29 20:10:10','2008-09-30 20:10:10')>time('00:00:00');
+select timediff('2008-09-29 20:10:10','2008-09-30 20:10:10')<time('00:00:00');
+
+# show that conversion to DECIMAL no longer drops sign
+SELECT CAST(time('-73:42:12') AS DECIMAL);
+
+
+# End of 5.0 tests

=== modified file 'mysql-test/t/perror-win.test'
--- a/mysql-test/t/perror-win.test	2008-11-27 12:33:40 +0000
+++ b/mysql-test/t/perror-win.test	2008-11-28 13:12:43 +0000
@@ -6,6 +6,9 @@ eval select LENGTH("$MY_PERROR") > 0 as 
 enable_query_log;
 
 
---exec $MY_PERROR 150
---exec $MY_PERROR 23
---exec $MY_PERROR 15000
+--exec $MY_PERROR 150 2>&1
+--exec $MY_PERROR 23 2>&1
+--exec $MY_PERROR 1062 2>&1
+--error 1
+--exec $MY_PERROR 30000 2>&1
+

=== modified file 'mysql-test/t/perror.test'
--- a/mysql-test/t/perror.test	2008-08-05 23:26:18 +0000
+++ b/mysql-test/t/perror.test	2008-11-28 11:40:40 +0000
@@ -1,3 +1,4 @@
+--source include/not_windows.inc
 #
 # Check if the variable MY_PERROR is set
 #

=== modified file 'mysql-test/t/subselect.test'
--- a/mysql-test/t/subselect.test	2008-11-27 14:25:02 +0000
+++ b/mysql-test/t/subselect.test	2008-11-28 11:40:40 +0000
@@ -3495,41 +3495,6 @@ SELECT t1.a, (SELECT 1 FROM t2 WHERE t2.
 
 DROP TABLE t1,t2,t3;
 
-#
-# Bug#37460 Assertion failed:
-# !table->file || table->file->inited == handler::NONE
-#
-CREATE TABLE t1 (id int);
-CREATE TABLE t2 (id int, c int);
-
-INSERT INTO t1 (id) VALUES (1);
-INSERT INTO t2 (id) VALUES (1);
-INSERT INTO t1 (id) VALUES (1);
-INSERT INTO t2 (id) VALUES (1);
-
-CREATE VIEW v1 AS
-  SELECT t2.c AS c FROM t1, t2
-    WHERE t1.id=t2.id AND 1 IN (SELECT id FROM t1) WITH CHECK OPTION;
-UPDATE v1 SET c=1;
-
-CREATE VIEW v2 (a,b) AS
-  SELECT t2.id, t2.c AS c FROM t1, t2
-    WHERE t1.id=t2.id AND 1 IN (SELECT id FROM t1) WITH CHECK OPTION;
-
---error 1369
-INSERT INTO v2(a,b) VALUES (2,2);
-INSERT INTO v2(a,b) VALUES (1,2);
-SELECT * FROM v1;
-
-CREATE VIEW v3 AS
-  SELECT t2.c AS c FROM t2
-    WHERE 1 IN (SELECT id FROM t1) WITH CHECK OPTION;
-
-DELETE FROM v3;
-
-DROP VIEW v1,v2,v3;
-DROP TABLE t1,t2;
-
 --echo End of 5.1 tests.
 
 

=== modified file 'mysql-test/t/timezone3.test'
--- a/mysql-test/t/timezone3.test	2005-07-28 00:22:47 +0000
+++ b/mysql-test/t/timezone3.test	2008-12-01 14:18:35 +0000
@@ -45,6 +45,10 @@ insert into t1 values
   (unix_timestamp('1981-07-01 03:59:59'),'1981-07-01 03:59:59'),
   (unix_timestamp('1981-07-01 04:00:00'),'1981-07-01 04:00:00');
 
+insert into t1 values
+  (unix_timestamp('2009-01-01 02:59:59'),'2009-01-01 02:59:59'),
+  (unix_timestamp('2009-01-01 03:00:00'),'2009-01-01 03:00:00');
+
 select i, from_unixtime(i), c from t1;
 drop table t1;
 
@@ -58,4 +62,12 @@ insert into t1 values (19730101235900), 
 select * from t1;
 drop table t1;
 
+#
+# Test Bug #39920: MySQL cannot deal with Leap Second expression in string
+# literal
+#
+
+# 2009-01-01 02:59:59, 2009-01-01 02:59:60 and 2009-01-01 03:00:00
+SELECT FROM_UNIXTIME(1230768022), FROM_UNIXTIME(1230768023), FROM_UNIXTIME(1230768024);
+
 # End of 4.1 tests

=== modified file 'mysql-test/t/update.test'
--- a/mysql-test/t/update.test	2007-04-23 14:22:33 +0000
+++ b/mysql-test/t/update.test	2008-11-28 16:36:07 +0000
@@ -430,4 +430,25 @@ drop table t1,t2;
 connection default;
 disconnect con1;
 
+#
+# Bug #40745: Error during WHERE clause calculation in UPDATE
+#             leads to an assertion failure
+#
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP FUNCTION IF EXISTS f1;
+--enable_warnings
+
+CREATE FUNCTION f1() RETURNS INT RETURN f1();
+CREATE TABLE t1 (i INT);
+INSERT INTO t1 VALUES (1);
+
+--error ER_SP_NO_RECURSION
+UPDATE t1 SET i = 3 WHERE f1();
+--error ER_SP_NO_RECURSION
+UPDATE t1 SET i = f1();
+
+DROP TABLE t1;
+DROP FUNCTION f1;
+
 --echo End of 5.0 tests

=== modified file 'mysql-test/t/variables.test'
--- a/mysql-test/t/variables.test	2008-11-24 20:46:11 +0000
+++ b/mysql-test/t/variables.test	2008-11-27 11:01:59 +0000
@@ -1071,18 +1071,6 @@ SET @@global.skip_show_database= true;
 #
 --echo #
 --replace_column 2 #
-SHOW VARIABLES like 'socket';
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-SELECT @@session.socket;
---replace_column 1 #
-SELECT @@global.socket;
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-SET @@session.socket= 'x';
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-SET @@global.socket= 'x';
-#
---echo #
---replace_column 2 #
 SHOW VARIABLES like 'thread_stack';
 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
 SELECT @@session.thread_stack;

=== modified file 'mysql-test/t/view.test'
--- a/mysql-test/t/view.test	2008-10-29 13:55:04 +0000
+++ b/mysql-test/t/view.test	2008-11-28 17:51:47 +0000
@@ -510,7 +510,7 @@ drop table t1;
 #
 create table t1 (a int, b int);
 create view v1 as select a, sum(b) from t1 group by a;
---error ER_WRONG_USAGE
+--error ER_KEY_DOES_NOT_EXITS
 select b from v1 use index (some_index) where b=1;
 drop view v1;
 drop table t1;
@@ -3422,11 +3422,11 @@ drop table t1;
 CREATE TABLE t1 (a INT);
 INSERT INTO t1 VALUES (1),(2);
 CREATE VIEW v1 AS SELECT * FROM t1;
---error ER_WRONG_USAGE
+--error ER_KEY_DOES_NOT_EXITS
 SELECT * FROM v1 USE KEY(non_existant);
---error ER_WRONG_USAGE
+--error ER_KEY_DOES_NOT_EXITS
 SELECT * FROM v1 FORCE KEY(non_existant);
---error ER_WRONG_USAGE
+--error ER_KEY_DOES_NOT_EXITS
 SELECT * FROM v1 IGNORE KEY(non_existant);
 
 DROP VIEW v1;
@@ -3565,6 +3565,32 @@ DROP VIEW v1;
 CREATE VIEW v1 AS SELECT 1;
 DROP VIEW v1;
 
+#
+# Bug #33461: SELECT ... FROM <view> USE INDEX (...) throws an error
+#
+
+CREATE TABLE t1 (c1 INT PRIMARY KEY, c2 INT, INDEX (c2));
+INSERT INTO t1 VALUES (1,1), (2,2), (3,3);
+SELECT * FROM t1 USE INDEX (PRIMARY) WHERE c1=2;
+SELECT * FROM t1 USE INDEX (c2) WHERE c2=2;
+
+CREATE VIEW v1 AS SELECT c1, c2 FROM t1;
+SHOW INDEX FROM v1;
+--error ER_KEY_DOES_NOT_EXITS
+SELECT * FROM v1 USE INDEX (PRIMARY) WHERE c1=2;
+--error ER_KEY_DOES_NOT_EXITS
+SELECT * FROM v1 FORCE INDEX (PRIMARY) WHERE c1=2;
+--error ER_KEY_DOES_NOT_EXITS
+SELECT * FROM v1 IGNORE INDEX (PRIMARY) WHERE c1=2;
+--error ER_KEY_DOES_NOT_EXITS
+SELECT * FROM v1 USE INDEX (c2) WHERE c2=2;
+--error ER_KEY_DOES_NOT_EXITS
+SELECT * FROM v1 FORCE INDEX (c2) WHERE c2=2;
+--error ER_KEY_DOES_NOT_EXITS
+SELECT * FROM v1 IGNORE INDEX (c2) WHERE c2=2;
+
+DROP VIEW v1;
+DROP TABLE t1;
 
 --echo # -----------------------------------------------------------------
 --echo # -- End of 5.0 tests.
@@ -3751,3 +3777,37 @@ create view v_9801 as
 
 drop table t_9801;
 
+#
+# Bug#37460 Assertion failed:
+# !table->file || table->file->inited == handler::NONE
+#
+CREATE TABLE t1 (id int);
+CREATE TABLE t2 (id int, c int);
+
+INSERT INTO t1 (id) VALUES (1);
+INSERT INTO t2 (id) VALUES (1);
+INSERT INTO t1 (id) VALUES (1);
+INSERT INTO t2 (id) VALUES (1);
+
+CREATE VIEW v1 AS
+  SELECT t2.c AS c FROM t1, t2
+    WHERE t1.id=t2.id AND 1 IN (SELECT id FROM t1) WITH CHECK OPTION;
+UPDATE v1 SET c=1;
+
+CREATE VIEW v2 (a,b) AS
+  SELECT t2.id, t2.c AS c FROM t1, t2
+    WHERE t1.id=t2.id AND 1 IN (SELECT id FROM t1) WITH CHECK OPTION;
+  
+--error 1369
+INSERT INTO v2(a,b) VALUES (2,2);
+INSERT INTO v2(a,b) VALUES (1,2);
+SELECT * FROM v1;
+
+CREATE VIEW v3 AS
+  SELECT t2.c AS c FROM t2
+    WHERE 1 IN (SELECT id FROM t1) WITH CHECK OPTION;
+
+DELETE FROM v3;
+
+DROP VIEW v1,v2,v3;
+DROP TABLE t1,t2;

=== modified file 'mysys/my_fopen.c'
--- a/mysys/my_fopen.c	2008-07-23 08:52:08 +0000
+++ b/mysys/my_fopen.c	2008-12-03 14:05:31 +0000
@@ -18,7 +18,6 @@
 #include <errno.h>
 #include "mysys_err.h"
 
-static void make_ftype(char * to,int flag);
 
 /*
   Open a file as stream
@@ -196,7 +195,7 @@ FILE *my_fdopen(File Filedes, const char
     a+ == O_RDWR|O_APPEND|O_CREAT
 */
 
-static void make_ftype(register char * to, register int flag)
+void make_ftype(register char * to, register int flag)
 {
   /* check some possible invalid combinations */  
   DBUG_ASSERT((flag & (O_TRUNC | O_APPEND)) != (O_TRUNC | O_APPEND));

=== modified file 'mysys/my_getopt.c'
--- a/mysys/my_getopt.c	2008-11-19 10:13:17 +0000
+++ b/mysys/my_getopt.c	2008-11-28 00:26:35 +0000
@@ -975,24 +975,26 @@ static void init_one_value(const struct 
     *((my_bool*) variable)= (my_bool) value;
     break;
   case GET_INT:
-    *((int*) variable)= (int) value;
+    *((int*) variable)= (int) getopt_ll_limit_value((int) value, option, NULL);
     break;
-  case GET_UINT: /* Fall through */
   case GET_ENUM:
     *((uint*) variable)= (uint) value;
     break;
+  case GET_UINT:
+    *((uint*) variable)= (uint) getopt_ull_limit_value((uint) value, option, NULL);
+    break;
   case GET_LONG:
-    *((long*) variable)= (long) value;
+    *((long*) variable)= (long) getopt_ll_limit_value((long) value, option, NULL);
     break;
   case GET_ULONG:
-    *((ulong*) variable)= (ulong) value;
+    *((ulong*) variable)= (ulong) getopt_ull_limit_value((ulong) value, option, NULL);
     break;
   case GET_LL:
-    *((longlong*) variable)= (longlong) value;
+    *((longlong*) variable)= (longlong) getopt_ll_limit_value((longlong) value, option, NULL);
     break;
   case GET_ULL: /* Fall through */
   case GET_SET:
-    *((ulonglong*) variable)=  (ulonglong) value;
+    *((ulonglong*) variable)= (ulonglong) getopt_ull_limit_value((ulonglong) value, option, NULL);
     break;
   case GET_DOUBLE:
     *((double*) variable)=  (double) value;

=== modified file 'sql/item_cmpfunc.cc'
--- a/sql/item_cmpfunc.cc	2008-11-21 12:45:53 +0000
+++ b/sql/item_cmpfunc.cc	2008-11-27 16:44:19 +0000
@@ -810,11 +810,11 @@ Arg_comparator::can_compare_as_dates(Ite
     obtained value
 */
 
-ulonglong
+longlong
 get_time_value(THD *thd, Item ***item_arg, Item **cache_arg,
                Item *warn_item, bool *is_null)
 {
-  ulonglong value;
+  longlong value;
   Item *item= **item_arg;
   MYSQL_TIME ltime;
 
@@ -826,7 +826,7 @@ get_time_value(THD *thd, Item ***item_ar
   else
   {
     *is_null= item->get_time(&ltime);
-    value= !*is_null ? TIME_to_ulonglong_datetime(&ltime) : 0;
+    value= !*is_null ? (longlong) TIME_to_ulonglong_datetime(&ltime) : 0;
   }
   /*
     Do not cache GET_USER_VAR() function as its const_item() may return TRUE
@@ -950,11 +950,11 @@ void Arg_comparator::set_datetime_cmp_fu
     obtained value
 */
 
-ulonglong
+longlong
 get_datetime_value(THD *thd, Item ***item_arg, Item **cache_arg,
                    Item *warn_item, bool *is_null)
 {
-  ulonglong value= 0;
+  longlong value= 0;
   String buf, *str= 0;
   Item *item= **item_arg;
 
@@ -992,7 +992,7 @@ get_datetime_value(THD *thd, Item ***ite
     enum_field_types f_type= warn_item->field_type();
     timestamp_type t_type= f_type ==
       MYSQL_TYPE_DATE ? MYSQL_TIMESTAMP_DATE : MYSQL_TIMESTAMP_DATETIME;
-    value= get_date_from_str(thd, str, t_type, warn_item->name, &error);
+    value= (longlong) get_date_from_str(thd, str, t_type, warn_item->name, &error);
     /*
       If str did not contain a valid date according to the current
       SQL_MODE, get_date_from_str() has already thrown a warning,
@@ -1046,7 +1046,7 @@ get_datetime_value(THD *thd, Item ***ite
 int Arg_comparator::compare_datetime()
 {
   bool a_is_null, b_is_null;
-  ulonglong a_value, b_value;
+  longlong a_value, b_value;
 
   /* Get DATE/DATETIME/TIME value of the 'a' item. */
   a_value= (*get_value_func)(thd, &a, &a_cache, *b, &a_is_null);

=== modified file 'sql/item_cmpfunc.h'
--- a/sql/item_cmpfunc.h	2008-10-20 19:13:22 +0000
+++ b/sql/item_cmpfunc.h	2008-11-27 16:44:19 +0000
@@ -42,8 +42,8 @@ class Arg_comparator: public Sql_alloc
   bool is_nulls_eq;                // TRUE <=> compare for the EQUAL_FUNC
   enum enum_date_cmp_type { CMP_DATE_DFLT= 0, CMP_DATE_WITH_DATE,
                             CMP_DATE_WITH_STR, CMP_STR_WITH_DATE };
-  ulonglong (*get_value_func)(THD *thd, Item ***item_arg, Item **cache_arg,
-                              Item *warn_item, bool *is_null);
+  longlong (*get_value_func)(THD *thd, Item ***item_arg, Item **cache_arg,
+                             Item *warn_item, bool *is_null);
 public:
   DTCollation cmp_collation;
 
@@ -1015,7 +1015,7 @@ public:
 */
 class cmp_item_datetime :public cmp_item
 {
-  ulonglong value;
+  longlong value;
 public:
   THD *thd;
   /* Item used for issuing warnings. */

=== modified file 'sql/item_func.cc'
--- a/sql/item_func.cc	2008-11-24 20:46:11 +0000
+++ b/sql/item_func.cc	2008-11-28 11:40:40 +0000
@@ -2278,7 +2278,7 @@ void Item_func_min_max::fix_length_and_d
 
 uint Item_func_min_max::cmp_datetimes(ulonglong *value)
 {
-  ulonglong min_max;
+  longlong min_max;
   uint min_max_idx= 0;
   LINT_INIT(min_max);
 
@@ -2286,7 +2286,7 @@ uint Item_func_min_max::cmp_datetimes(ul
   {
     Item **arg= args + i;
     bool is_null;
-    ulonglong res= get_datetime_value(thd, &arg, 0, datetime_item, &is_null);
+    longlong res= get_datetime_value(thd, &arg, 0, datetime_item, &is_null);
     if ((null_value= args[i]->null_value))
       return 0;
     if (i == 0 || (res < min_max ? cmp_sign : -cmp_sign) > 0)

=== modified file 'sql/item_timefunc.h'
--- a/sql/item_timefunc.h	2008-02-22 11:11:25 +0000
+++ b/sql/item_timefunc.h	2008-11-27 16:44:19 +0000
@@ -429,6 +429,7 @@ public:
   {
     return save_time_in_field(field);
   }
+  bool result_as_longlong() { return TRUE; }
 };
 
 

=== modified file 'sql/my_decimal.cc'
--- a/sql/my_decimal.cc	2008-07-14 12:49:19 +0000
+++ b/sql/my_decimal.cc	2008-11-27 16:44:19 +0000
@@ -214,7 +214,7 @@ my_decimal *date2my_decimal(MYSQL_TIME *
   date = (ltime->year*100L + ltime->month)*100L + ltime->day;
   if (ltime->time_type > MYSQL_TIMESTAMP_DATE)
     date= ((date*100L + ltime->hour)*100L+ ltime->minute)*100L + ltime->second;
-  if (int2my_decimal(E_DEC_FATAL_ERROR, date, FALSE, dec))
+  if (int2my_decimal(E_DEC_FATAL_ERROR, ltime->neg ? -date : date, FALSE, dec))
     return dec;
   if (ltime->second_part)
   {

=== modified file 'sql/mysql_priv.h'
--- a/sql/mysql_priv.h	2008-11-27 14:25:02 +0000
+++ b/sql/mysql_priv.h	2008-11-27 17:31:54 +0000
@@ -594,6 +594,7 @@ enum open_table_mode
 #define UNCACHEABLE_PREPARE    16
 /* For uncorrelated SELECT in an UNION with some correlated SELECTs */
 #define UNCACHEABLE_UNITED     32
+#define UNCACHEABLE_CHECKOPTION   64
 
 /* Used to check GROUP BY list in the MODE_ONLY_FULL_GROUP_BY mode */
 #define UNDEF_POS (-1)
@@ -2280,8 +2281,8 @@ void make_date(const DATE_TIME_FORMAT *f
 void make_time(const DATE_TIME_FORMAT *format, const MYSQL_TIME *l_time,
                String *str);
 int my_time_compare(MYSQL_TIME *a, MYSQL_TIME *b);
-ulonglong get_datetime_value(THD *thd, Item ***item_arg, Item **cache_arg,
-                             Item *warn_item, bool *is_null);
+longlong get_datetime_value(THD *thd, Item ***item_arg, Item **cache_arg,
+                            Item *warn_item, bool *is_null);
 
 int test_if_number(char *str,int *res,bool allow_wildcards);
 void change_byte(uchar *,uint,char,char);

=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc	2008-11-24 20:53:47 +0000
+++ b/sql/mysqld.cc	2008-11-28 16:30:27 +0000
@@ -3584,12 +3584,14 @@ static int init_common_variables(const c
     sys_init_connect.value_length= strlen(opt_init_connect);
   else
     sys_init_connect.value=my_strdup("",MYF(0));
+  sys_init_connect.is_os_charset= TRUE;
 
   sys_init_slave.value_length= 0;
   if ((sys_init_slave.value= opt_init_slave))
     sys_init_slave.value_length= strlen(opt_init_slave);
   else
     sys_init_slave.value=my_strdup("",MYF(0));
+  sys_init_slave.is_os_charset= TRUE;
 
   /* check log options and issue warnings if needed */
   if (opt_log && opt_logname && !(log_output_options & LOG_FILE) &&

=== modified file 'sql/set_var.cc'
--- a/sql/set_var.cc	2008-11-24 20:46:11 +0000
+++ b/sql/set_var.cc	2008-11-28 16:30:27 +0000
@@ -189,14 +189,14 @@ static sys_var_bool_ptr	sys_automatic_sp
 static sys_var_const            sys_back_log(&vars, "back_log",
                                              OPT_GLOBAL, SHOW_LONG,
                                              (uchar*) &back_log);
-static sys_var_const_str       sys_basedir(&vars, "basedir", mysql_home);
+static sys_var_const_os_str       sys_basedir(&vars, "basedir", mysql_home);
 static sys_var_long_ptr	sys_binlog_cache_size(&vars, "binlog_cache_size",
 					      &binlog_cache_size);
 static sys_var_thd_binlog_format sys_binlog_format(&vars, "binlog_format",
                                             &SV::binlog_format);
 static sys_var_thd_ulong	sys_bulk_insert_buff_size(&vars, "bulk_insert_buffer_size",
 						  &SV::bulk_insert_buff_size);
-static sys_var_const            sys_character_sets_dir(&vars,
+static sys_var_const_os         sys_character_sets_dir(&vars,
                                                        "character_sets_dir",
                                                        OPT_GLOBAL, SHOW_CHAR,
                                                        (uchar*)
@@ -246,7 +246,7 @@ static sys_var_long_ptr	sys_concurrent_i
                                               &myisam_concurrent_insert);
 static sys_var_long_ptr	sys_connect_timeout(&vars, "connect_timeout",
 					    &connect_timeout);
-static sys_var_const_str       sys_datadir(&vars, "datadir", mysql_real_data_home);
+static sys_var_const_os_str       sys_datadir(&vars, "datadir", mysql_real_data_home);
 static sys_var_backup_wait_timeout sys_backup_wait_timeout(&vars, "backup_wait_timeout");
 static sys_var_thd_ulong sys_deadlock_search_depth_short(&vars,
                                 "deadlock_search_depth_short",
@@ -499,7 +499,7 @@ static sys_var_thd_enum        sys_optim
 static sys_var_const            sys_pid_file(&vars, "pid_file",
                                              OPT_GLOBAL, SHOW_CHAR,
                                              (uchar*) pidfile_name);
-static sys_var_const            sys_plugin_dir(&vars, "plugin_dir",
+static sys_var_const_os         sys_plugin_dir(&vars, "plugin_dir",
                                                OPT_GLOBAL, SHOW_CHAR,
                                                (uchar*) opt_plugin_dir);
 static sys_var_const            sys_port(&vars, "port",
@@ -567,7 +567,7 @@ static sys_var_const    sys_thread_concu
 static sys_var_const    sys_thread_stack(&vars, "thread_stack",
                                          OPT_GLOBAL, SHOW_LONG,
                                          (uchar*) &my_thread_stack_size);
-static sys_var_readonly        sys_tmpdir(&vars, "tmpdir", OPT_GLOBAL, SHOW_CHAR, get_tmpdir);
+static sys_var_readonly_os      sys_tmpdir(&vars, "tmpdir", OPT_GLOBAL, SHOW_CHAR, get_tmpdir);
 static sys_var_thd_ulong	sys_trans_alloc_block_size(&vars, "transaction_alloc_block_size",
 						   &SV::trans_alloc_block_size,
 						   0, fix_trans_mem_root);
@@ -628,17 +628,17 @@ static sys_var_thd_optimizer_switch   sy
 #if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
 extern char *opt_ssl_ca, *opt_ssl_capath, *opt_ssl_cert, *opt_ssl_cipher,
             *opt_ssl_key;
-static sys_var_const_str_ptr	sys_ssl_ca(&vars, "ssl_ca", &opt_ssl_ca);
-static sys_var_const_str_ptr	sys_ssl_capath(&vars, "ssl_capath", &opt_ssl_capath);
-static sys_var_const_str_ptr	sys_ssl_cert(&vars, "ssl_cert", &opt_ssl_cert);
-static sys_var_const_str_ptr	sys_ssl_cipher(&vars, "ssl_cipher", &opt_ssl_cipher);
-static sys_var_const_str_ptr	sys_ssl_key(&vars, "ssl_key", &opt_ssl_key);
+static sys_var_const_os_str_ptr	sys_ssl_ca(&vars, "ssl_ca", &opt_ssl_ca);
+static sys_var_const_os_str_ptr	sys_ssl_capath(&vars, "ssl_capath", &opt_ssl_capath);
+static sys_var_const_os_str_ptr	sys_ssl_cert(&vars, "ssl_cert", &opt_ssl_cert);
+static sys_var_const_os_str_ptr	sys_ssl_cipher(&vars, "ssl_cipher", &opt_ssl_cipher);
+static sys_var_const_os_str_ptr	sys_ssl_key(&vars, "ssl_key", &opt_ssl_key);
 #else
-static sys_var_const_str	sys_ssl_ca(&vars, "ssl_ca", NULL);
-static sys_var_const_str	sys_ssl_capath(&vars, "ssl_capath", NULL);
-static sys_var_const_str	sys_ssl_cert(&vars, "ssl_cert", NULL);
-static sys_var_const_str	sys_ssl_cipher(&vars, "ssl_cipher", NULL);
-static sys_var_const_str	sys_ssl_key(&vars, "ssl_key", NULL);
+static sys_var_const_os_str	sys_ssl_ca(&vars, "ssl_ca", NULL);
+static sys_var_const_os_str	sys_ssl_capath(&vars, "ssl_capath", NULL);
+static sys_var_const_os_str	sys_ssl_cert(&vars, "ssl_cert", NULL);
+static sys_var_const_os_str	sys_ssl_cipher(&vars, "ssl_cipher", NULL);
+static sys_var_const_os_str	sys_ssl_key(&vars, "ssl_key", NULL);
 #endif
 static sys_var_thd_enum
 sys_updatable_views_with_limit(&vars, "updatable_views_with_limit",
@@ -1014,6 +1014,7 @@ bool update_sys_var_str(sys_var_str *var
   old_value= var_str->value;
   var_str->value= res;
   var_str->value_length= new_length;
+  var_str->is_os_charset= FALSE;
   rw_unlock(var_mutex);
   my_free(old_value, MYF(MY_ALLOW_ZERO_PTR));
   return 0;
@@ -1903,6 +1904,13 @@ err:
 }
 
 
+CHARSET_INFO *sys_var::charset(THD *thd)
+{
+  return is_os_charset ? thd->variables.character_set_filesystem : 
+    system_charset_info;
+}
+
+
 bool sys_var_thd_enum::update(THD *thd, set_var *var)
 {
   if (var->type == OPT_GLOBAL)

=== modified file 'sql/set_var.h'
--- a/sql/set_var.h	2008-11-24 20:46:11 +0000
+++ b/sql/set_var.h	2008-12-02 11:25:43 +0000
@@ -71,9 +71,18 @@ public:
 
   sys_after_update_func after_update;
   bool no_support_one_shot;
+  /*
+    true if the value is in character_set_filesystem, 
+    false otherwise.
+    Note that we can't use a pointer to the charset as the system var is 
+    instantiated in global scope and the charset pointers are initialized
+    later.
+  */  
+  bool is_os_charset;
   sys_var(const char *name_arg, sys_after_update_func func= NULL,
           Binlog_status_enum binlog_status_arg= NOT_IN_BINLOG)
     :name(name_arg), after_update(func), no_support_one_shot(1),
+    is_os_charset (FALSE),
     binlog_status(binlog_status_arg),
     m_allow_empty_value(TRUE)
   {}
@@ -107,6 +116,7 @@ public:
   { return option_limits == 0; }
   virtual bool is_struct() { return 0; }
   virtual bool is_readonly() const { return 0; }
+  CHARSET_INFO *charset(THD *thd);
   virtual sys_var_pluginvar *cast_pluginvar() { return 0; }
 
 protected:
@@ -291,6 +301,18 @@ public:
 };
 
 
+class sys_var_const_os_str: public sys_var_const_str
+{
+public:
+  sys_var_const_os_str(sys_var_chain *chain, const char *name_arg, 
+                       const char *value_arg)
+    :sys_var_const_str(chain, name_arg, value_arg)
+  { 
+    is_os_charset= TRUE; 
+  }
+};
+
+
 class sys_var_const_str_ptr :public sys_var
 {
 public:
@@ -320,6 +342,18 @@ public:
 };
 
 
+class sys_var_const_os_str_ptr :public sys_var_const_str_ptr
+{
+public:
+  sys_var_const_os_str_ptr(sys_var_chain *chain, const char *name_arg, 
+                           char **value_arg)
+    :sys_var_const_str_ptr(chain, name_arg, value_arg)
+  {
+    is_os_charset= TRUE; 
+  }
+};
+
+
 class sys_var_enum :public sys_var
 {
   uint *value;
@@ -1019,6 +1053,19 @@ public:
 };
 
 
+class sys_var_readonly_os: public sys_var_readonly
+{
+public:
+  sys_var_readonly_os(sys_var_chain *chain, const char *name_arg, enum_var_type type,
+		   SHOW_TYPE show_type_arg,
+		   sys_value_ptr_func value_ptr_func_arg)
+    :sys_var_readonly(chain, name_arg, type, show_type_arg, value_ptr_func_arg)
+  {
+    is_os_charset= TRUE;
+  }
+};
+
+
 /**
   Global-only, read-only variable. E.g. command line option.
 */
@@ -1047,6 +1094,22 @@ public:
 };
 
 
+class sys_var_const_os: public sys_var_const
+{
+public:
+  enum_var_type var_type;
+  SHOW_TYPE show_type_value;
+  uchar *ptr;
+  sys_var_const_os(sys_var_chain *chain, const char *name_arg, 
+                   enum_var_type type,
+                SHOW_TYPE show_type_arg, uchar *ptr_arg)
+    :sys_var_const(chain, name_arg, type, show_type_arg, ptr_arg)
+  {
+    is_os_charset= TRUE;
+  }
+};
+
+
 class sys_var_have_option: public sys_var
 {
 protected:

=== modified file 'sql/slave.cc'
--- a/sql/slave.cc	2008-11-24 20:46:11 +0000
+++ b/sql/slave.cc	2008-11-28 16:05:44 +0000
@@ -290,7 +290,7 @@ static void print_slave_skip_errors(void
     10 characters must be sufficient for a number plus {',' | '...'}
     plus a NUL terminator. That is a max 6 digit number.
   */
-  const int MIN_ROOM= 10;
+  const size_t MIN_ROOM= 10;
   DBUG_ENTER("print_slave_skip_errors");
   DBUG_ASSERT(sizeof(slave_skip_error_names) > MIN_ROOM);
   DBUG_ASSERT(MAX_SLAVE_ERROR <= 999999); // 6 digits

=== modified file 'sql/sql_show.cc'
--- a/sql/sql_show.cc	2008-11-13 12:53:16 +0000
+++ b/sql/sql_show.cc	2008-11-28 16:30:27 +0000
@@ -2088,6 +2088,7 @@ static bool show_status_array(THD *thd, 
   COND *partial_cond= 0;
   enum_check_fields save_count_cuted_fields= thd->count_cuted_fields;
   bool res= FALSE;
+  CHARSET_INFO *charset= system_charset_info;
   DBUG_ENTER("show_status_array");
 
   thd->count_cuted_fields= CHECK_FIELD_WARN;  
@@ -2136,9 +2137,10 @@ static bool show_status_array(THD *thd, 
 
         if (show_type == SHOW_SYS)
         {
-          show_type= ((sys_var*) value)->show_type();
-          value=     (char*) ((sys_var*) value)->value_ptr(thd, value_type,
-                                                           &null_lex_str);
+          sys_var *var= ((sys_var *) value);
+          show_type= var->show_type();
+          value= (char*) var->value_ptr(thd, value_type, &null_lex_str);
+          charset= var->charset(thd);
         }
 
         pos= end= buff;
@@ -2215,7 +2217,7 @@ static bool show_status_array(THD *thd, 
           DBUG_ASSERT(0);
           break;
         }
-        table->field[1]->store(pos, (uint32) (end - pos), system_charset_info);
+        table->field[1]->store(pos, (uint32) (end - pos), charset);
         thd->count_cuted_fields= CHECK_FIELD_IGNORE;
         table->field[1]->set_notnull();
 

=== modified file 'sql/sql_update.cc'
--- a/sql/sql_update.cc	2008-11-27 14:25:02 +0000
+++ b/sql/sql_update.cc	2008-11-28 17:51:47 +0000
@@ -728,6 +728,11 @@ int mysql_update(THD *thd,
     else
       table->file->unlock_row();
     thd->row_count++;
+    if (thd->is_error())
+    {
+      error= 1;
+      break;
+    }
   }
   dup_key_found= 0;
   /*

=== modified file 'sql/sql_view.cc'
--- a/sql/sql_view.cc	2008-11-14 17:41:51 +0000
+++ b/sql/sql_view.cc	2008-12-01 08:18:06 +0000
@@ -1056,8 +1056,9 @@ bool mysql_make_view(THD *thd, File_pars
 
   if (table->index_hints && table->index_hints->elements)
   {
-      my_error(ER_WRONG_USAGE, MYF(0), "index hints", "VIEW");
-      DBUG_RETURN(TRUE);
+    my_error(ER_KEY_DOES_NOT_EXITS, MYF(0),
+             table->index_hints->head()->key_name.str, table->table_name);
+    DBUG_RETURN(TRUE);
   }
 
   /* check loop via view definition */

=== modified file 'sql/tztime.cc'
--- a/sql/tztime.cc	2008-05-08 20:43:28 +0000
+++ b/sql/tztime.cc	2008-12-01 16:00:03 +0000
@@ -1072,6 +1072,7 @@ Time_zone_system::gmt_sec_to_TIME(MYSQL_
   localtime_r(&tmp_t, &tmp_tm);
   localtime_to_TIME(tmp, &tmp_tm);
   tmp->time_type= MYSQL_TIMESTAMP_DATETIME;
+  adjust_leap_second(tmp);
 }
 
 
@@ -1156,6 +1157,7 @@ Time_zone_utc::gmt_sec_to_TIME(MYSQL_TIM
   gmtime_r(&tmp_t, &tmp_tm);
   localtime_to_TIME(tmp, &tmp_tm);
   tmp->time_type= MYSQL_TIMESTAMP_DATETIME;
+  adjust_leap_second(tmp);
 }
 
 
@@ -1259,6 +1261,7 @@ void
 Time_zone_db::gmt_sec_to_TIME(MYSQL_TIME *tmp, my_time_t t) const
 {
   ::gmt_sec_to_TIME(tmp, t, tz_info);
+  adjust_leap_second(tmp);
 }
 
 
@@ -2279,6 +2282,24 @@ my_tz_find(THD *thd, const String *name)
 }
 
 
+/**
+  Convert leap seconds into non-leap
+
+  This function will convert the leap seconds added by the OS to 
+  non-leap seconds, e.g. 23:59:59, 23:59:60 -> 23:59:59, 00:00:01 ...
+  This check is not checking for years on purpose : although it's not a
+  complete check this way it doesn't require looking (and having installed)
+  the leap seconds table.
+
+  @param[in,out] broken down time structure as filled in by the OS
+*/
+
+void Time_zone::adjust_leap_second(MYSQL_TIME *t)
+{
+  if (t->second == 60 || t->second == 61)
+    t->second= 59;
+}
+
 #endif /* !defined(TESTTIME) && !defined(TZINFO2SQL) */
 
 

=== modified file 'sql/tztime.h'
--- a/sql/tztime.h	2007-10-16 20:11:50 +0000
+++ b/sql/tztime.h	2008-12-01 15:22:16 +0000
@@ -55,6 +55,9 @@ public:
     allocated on MEM_ROOT and should not require destruction.
   */
   virtual ~Time_zone() {};
+
+protected:
+  static inline void adjust_leap_second(MYSQL_TIME *t);
 };
 
 extern Time_zone * my_tz_UTC;

=== modified file 'storage/innobase/handler/ha_innodb.cc'
--- a/storage/innobase/handler/ha_innodb.cc	2008-11-06 18:39:27 +0000
+++ b/storage/innobase/handler/ha_innodb.cc	2008-11-28 00:26:35 +0000
@@ -8188,7 +8188,7 @@ static MYSQL_SYSVAR_BOOL(adaptive_hash_i
 static MYSQL_SYSVAR_LONG(additional_mem_pool_size, innobase_additional_mem_pool_size,
   PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
   "Size of a memory pool InnoDB uses to store data dictionary information and other internal data structures.",
-  NULL, NULL, 1*1024*1024L, 512*1024L, ~0L, 1024);
+  NULL, NULL, 1*1024*1024L, 512*1024L, LONG_MAX, 1024);
 
 static MYSQL_SYSVAR_ULONG(autoextend_increment, srv_auto_extend_increment,
   PLUGIN_VAR_RQCMDARG,
@@ -8228,7 +8228,7 @@ static MYSQL_SYSVAR_LONG(lock_wait_timeo
 static MYSQL_SYSVAR_LONG(log_buffer_size, innobase_log_buffer_size,
   PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
   "The size of the buffer which InnoDB uses to write log to the log files on disk.",
-  NULL, NULL, 1024*1024L, 256*1024L, ~0L, 1024);
+  NULL, NULL, 1024*1024L, 256*1024L, LONG_MAX, 1024);
 
 static MYSQL_SYSVAR_LONGLONG(log_file_size, innobase_log_file_size,
   PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
@@ -8248,7 +8248,7 @@ static MYSQL_SYSVAR_LONG(mirrored_log_gr
 static MYSQL_SYSVAR_LONG(open_files, innobase_open_files,
   PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
   "How many files at the maximum InnoDB keeps open at the same time.",
-  NULL, NULL, 300L, 10L, ~0L, 0);
+  NULL, NULL, 300L, 10L, LONG_MAX, 0);
 
 static MYSQL_SYSVAR_ULONG(sync_spin_loops, srv_n_spin_wait_rounds,
   PLUGIN_VAR_RQCMDARG,

Thread
bzr commit into mysql-6.0-bugteam branch (horst:2750) Horst Hunger4 Dec