summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extra/yassl/taocrypt/include/type_traits.hpp2
-rw-r--r--extra/yassl/taocrypt/include/types.hpp2
-rw-r--r--extra/yassl/taocrypt/src/misc.cpp3
-rw-r--r--include/config-win.h1
-rw-r--r--mysql-test/Makefile.am1
-rw-r--r--mysql-test/r/func_time.result15
-rw-r--r--mysql-test/r/type_bit.result8
-rw-r--r--mysql-test/t/func_time.test8
-rw-r--r--mysql-test/t/type_bit.test9
-rw-r--r--sql/field.cc5
-rw-r--r--sql/ha_federated.cc5
-rw-r--r--sql/ha_federated.h2
-rw-r--r--sql/item_timefunc.cc2
-rw-r--r--sql/sp_cache.cc3
-rw-r--r--sql/sp_head.cc3
-rw-r--r--sql/sp_pcontext.cc2
-rw-r--r--sql/sp_rcontext.cc2
17 files changed, 57 insertions, 16 deletions
diff --git a/extra/yassl/taocrypt/include/type_traits.hpp b/extra/yassl/taocrypt/include/type_traits.hpp
index caf71f90e11..d03ccae64ed 100644
--- a/extra/yassl/taocrypt/include/type_traits.hpp
+++ b/extra/yassl/taocrypt/include/type_traits.hpp
@@ -67,7 +67,7 @@ MK_FUNDAMENTAL_TYPE(float)
MK_FUNDAMENTAL_TYPE( double)
MK_FUNDAMENTAL_TYPE(long double)
-#ifdef WORD64_AVAILABLE
+#if defined(WORD64_AVAILABLE) && defined(WORD64_IS_DISTINCT_TYPE)
MK_FUNDAMENTAL_TYPE(word64)
#endif
diff --git a/extra/yassl/taocrypt/include/types.hpp b/extra/yassl/taocrypt/include/types.hpp
index 0d57022a2d0..85e2f85d3dd 100644
--- a/extra/yassl/taocrypt/include/types.hpp
+++ b/extra/yassl/taocrypt/include/types.hpp
@@ -45,10 +45,12 @@ typedef unsigned int word32;
#if defined(__GNUC__) || defined(__MWERKS__) || defined(_LONGLONG_TYPE)
#define WORD64_AVAILABLE
+ #define WORD64_IS_DISTINCT_TYPE
typedef unsigned long long word64;
#define W64LIT(x) x##LL
#elif defined(_MSC_VER) || defined(__BCPLUSPLUS__)
#define WORD64_AVAILABLE
+ #define WORD64_IS_DISTINCT_TYPE
typedef unsigned __int64 word64;
#define W64LIT(x) x##ui64
#elif defined(__DECCXX)
diff --git a/extra/yassl/taocrypt/src/misc.cpp b/extra/yassl/taocrypt/src/misc.cpp
index 1780b3050e9..8ff5f47cfa4 100644
--- a/extra/yassl/taocrypt/src/misc.cpp
+++ b/extra/yassl/taocrypt/src/misc.cpp
@@ -149,7 +149,8 @@ unsigned long Crop(unsigned long value, unsigned int size)
}
-#if !(defined(_MSC_VER) && (_MSC_VER < 1300))
+#if !(defined(_MSC_VER) && (_MSC_VER < 1300)) && \
+ !(defined(__HP_aCC) && (__HP_aCC <= 35700))
using std::new_handler;
using std::set_new_handler;
#endif
diff --git a/include/config-win.h b/include/config-win.h
index b17e4df4e26..f6c72a85a60 100644
--- a/include/config-win.h
+++ b/include/config-win.h
@@ -392,7 +392,6 @@ inline double ulonglong2double(ulonglong value)
/* #undef HAVE_CHARSET_armscii8 */
/* #undef HAVE_CHARSET_ascii */
#define HAVE_CHARSET_big5 1
-#define HAVE_CHARSET_cp932
#define HAVE_CHARSET_cp1250 1
/* #undef HAVE_CHARSET_cp1251 */
/* #undef HAVE_CHARSET_cp1256 */
diff --git a/mysql-test/Makefile.am b/mysql-test/Makefile.am
index 9963074daf5..a5e3f7977ee 100644
--- a/mysql-test/Makefile.am
+++ b/mysql-test/Makefile.am
@@ -48,6 +48,7 @@ dist-hook:
mkdir -p $(distdir)/t $(distdir)/r $(distdir)/include \
$(distdir)/std_data $(distdir)/lib
$(INSTALL_DATA) $(srcdir)/t/*.test $(distdir)/t
+ $(INSTALL_DATA) $(srcdir)/t/*.sql $(distdir)/t
-$(INSTALL_DATA) $(srcdir)/t/*.disabled $(distdir)/t
$(INSTALL_DATA) $(srcdir)/t/*.opt $(srcdir)/t/*.sh $(srcdir)/t/*.slave-mi $(distdir)/t
$(INSTALL_DATA) $(srcdir)/include/*.inc $(distdir)/include
diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result
index 239fca65b67..cb51da75368 100644
--- a/mysql-test/r/func_time.result
+++ b/mysql-test/r/func_time.result
@@ -688,6 +688,21 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
Note 1003 select timestamp_diff(WEEK,_latin1'2001-02-01',_latin1'2001-05-01') AS `a1`,timestamp_diff(SECOND_FRAC,_latin1'2001-02-01 12:59:59.120000',_latin1'2001-05-01 12:58:58.119999') AS `a2`
+select last_day('2005-00-00');
+last_day('2005-00-00')
+NULL
+Warnings:
+Warning 1292 Truncated incorrect datetime value: '2005-00-00'
+select last_day('2005-00-01');
+last_day('2005-00-01')
+NULL
+Warnings:
+Warning 1292 Truncated incorrect datetime value: '2005-00-01'
+select last_day('2005-01-00');
+last_day('2005-01-00')
+NULL
+Warnings:
+Warning 1292 Truncated incorrect datetime value: '2005-01-00'
select time_format('100:00:00', '%H %k %h %I %l');
time_format('100:00:00', '%H %k %h %I %l')
100 100 04 04 4
diff --git a/mysql-test/r/type_bit.result b/mysql-test/r/type_bit.result
index 64c9a11b3cd..4d9bc0c7fe1 100644
--- a/mysql-test/r/type_bit.result
+++ b/mysql-test/r/type_bit.result
@@ -458,3 +458,11 @@ select h from t1;
h
a
drop table t1;
+create table t1 (a bit(8)) engine=heap;
+insert into t1 values ('1111100000');
+Warnings:
+Warning 1264 Out of range value adjusted for column 'a' at row 1
+select a+0 from t1;
+a+0
+255
+drop table t1;
diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test
index 34da2ae1435..6ca29ccded2 100644
--- a/mysql-test/t/func_time.test
+++ b/mysql-test/t/func_time.test
@@ -338,6 +338,14 @@ explain extended select timestampdiff(SQL_TSI_WEEK, '2001-02-01', '2001-05-01')
timestampdiff(SQL_TSI_FRAC_SECOND, '2001-02-01 12:59:59.120000', '2001-05-01 12:58:58.119999') as a2;
#
+# Bug #10568
+#
+
+select last_day('2005-00-00');
+select last_day('2005-00-01');
+select last_day('2005-01-00');
+
+#
# Bug #10590: %h, %I, and %l format specifies should all return results in
# the 0-11 range
#
diff --git a/mysql-test/t/type_bit.test b/mysql-test/t/type_bit.test
index 19d16f95990..2df5f0ed05d 100644
--- a/mysql-test/t/type_bit.test
+++ b/mysql-test/t/type_bit.test
@@ -162,3 +162,12 @@ create table t1 (a int, b time, c tinyint, d bool, e char(10), f bit(1),
insert into t1 set a=1;
select h from t1;
drop table t1;
+
+#
+# Bug #10539
+#
+
+create table t1 (a bit(8)) engine=heap;
+insert into t1 values ('1111100000');
+select a+0 from t1;
+drop table t1;
diff --git a/sql/field.cc b/sql/field.cc
index 7e2e32083e1..c87b613cb12 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -7835,7 +7835,7 @@ int Field_bit::store(const char *from, uint length, CHARSET_INFO *cs)
int Field_bit::store(double nr)
{
- return (Field_bit::store((longlong) nr));
+ return store((longlong) nr);
}
@@ -8018,7 +8018,8 @@ int Field_bit_as_char::store(const char *from, uint length, CHARSET_INFO *cs)
(delta == 0 && bits && (uint) (uchar) *from >= (uint) (1 << bits)))
{
memset(ptr, 0xff, field_length);
- *ptr&= ((1 << bits) - 1); /* set first byte */
+ if (bits)
+ *ptr&= ((1 << bits) - 1); /* set first byte */
set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1);
return 1;
}
diff --git a/sql/ha_federated.cc b/sql/ha_federated.cc
index c76034c7986..89210a2f3cd 100644
--- a/sql/ha_federated.cc
+++ b/sql/ha_federated.cc
@@ -345,12 +345,11 @@
*/
-#ifdef __GNUC__
+#include "mysql_priv.h"
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
-#include "mysql_priv.h"
-
#ifdef HAVE_FEDERATED_DB
#include "ha_federated.h"
#define MAX_REMOTE_SIZE IO_SIZE
diff --git a/sql/ha_federated.h b/sql/ha_federated.h
index 22fc03e9eec..f084976718c 100644
--- a/sql/ha_federated.h
+++ b/sql/ha_federated.h
@@ -21,7 +21,7 @@
that you can implement.
*/
-#ifdef __GNUC__
+#ifdef USE_PRAGMA_INTERFACE
#pragma interface /* gcc class implementation */
#endif
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index 76b0fa6afcf..b07de7eb21d 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -3014,7 +3014,7 @@ String *Item_func_str_to_date::val_str(String *str)
bool Item_func_last_day::get_date(TIME *ltime, uint fuzzy_date)
{
- if (get_arg0_date(ltime,fuzzy_date))
+ if (get_arg0_date(ltime, fuzzy_date & ~TIME_FUZZY_DATE))
return 1;
uint month_idx= ltime->month-1;
ltime->day= days_in_month[month_idx];
diff --git a/sql/sp_cache.cc b/sql/sp_cache.cc
index 83811e76f9b..c8f0ed6ba2d 100644
--- a/sql/sp_cache.cc
+++ b/sql/sp_cache.cc
@@ -14,11 +14,10 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#include "mysql_priv.h"
#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation
#endif
-
-#include "mysql_priv.h"
#include "sp_cache.h"
#include "sp_head.h"
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index 9b372a4d062..1e5bd5b5b8c 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -14,11 +14,10 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#include "mysql_priv.h"
#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation
#endif
-
-#include "mysql_priv.h"
#include "sp_head.h"
#include "sp.h"
#include "sp_pcontext.h"
diff --git a/sql/sp_pcontext.cc b/sql/sp_pcontext.cc
index f95a43eb903..0de7fe212c0 100644
--- a/sql/sp_pcontext.cc
+++ b/sql/sp_pcontext.cc
@@ -14,6 +14,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#include "mysql_priv.h"
#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation
#endif
@@ -22,7 +23,6 @@
#undef SAFEMALLOC /* Problems with threads */
#endif
-#include "mysql_priv.h"
#include "sp_pcontext.h"
#include "sp_head.h"
diff --git a/sql/sp_rcontext.cc b/sql/sp_rcontext.cc
index 0e8210301c1..6f2165539d7 100644
--- a/sql/sp_rcontext.cc
+++ b/sql/sp_rcontext.cc
@@ -14,6 +14,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#include "mysql_priv.h"
#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation
#endif
@@ -22,7 +23,6 @@
#undef SAFEMALLOC /* Problems with threads */
#endif
-#include "mysql_priv.h"
#include "mysql.h"
#include "sp_head.h"
#include "sp_rcontext.h"