Commit 210bdd43 authored by unknown's avatar unknown

Merge mysql.com:/home/mydev/mysql-5.0

into  mysql.com:/home/mydev/mysql-5.0-bug14980
parents 95408957 f7191367
...@@ -1342,7 +1342,7 @@ static uint dump_routines_for_db(char *db) ...@@ -1342,7 +1342,7 @@ static uint dump_routines_for_db(char *db)
query_str_tail= strnmov(query_str, row[2], query_str_tail= strnmov(query_str, row[2],
definer_begin - row[2]); definer_begin - row[2]);
query_str_tail= strmov(query_str_tail, "*/ /*!50019"); query_str_tail= strmov(query_str_tail, "*/ /*!50020");
query_str_tail= strnmov(query_str_tail, definer_begin, query_str_tail= strnmov(query_str_tail, definer_begin,
definer_end - definer_begin); definer_end - definer_begin);
query_str_tail= strxmov(query_str_tail, "*/ /*!50003", query_str_tail= strxmov(query_str_tail, "*/ /*!50003",
......
...@@ -14,15 +14,34 @@ ...@@ -14,15 +14,34 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#if !defined(_my_no_pthread_h) && !defined(THREAD)
#define _my_no_pthread_h
/*
This block is to access some thread-related type definitions
even in builds which do not need thread functions,
as some variables (based on these types) are declared
even in non-threaded builds.
Case in point: 'mf_keycache.c'
*/
#if defined(__WIN__) || defined(OS2)
#elif defined(HAVE_UNIXWARE7_THREADS)
/* #include <thread.h> Currently, not relevant. Enable if needed. */
#else /* Normal threads */
#include <pthread.h>
#endif /* defined(__WIN__) */
/* /*
This undefs some pthread mutex locks when one isn't using threads This undefs some pthread mutex locks when one isn't using threads
to make thread safe code, that should also work in single thread to make thread safe code, that should also work in single thread
environment, easier to use. environment, easier to use.
*/ */
#if !defined(_my_no_pthread_h) && !defined(THREAD)
#define _my_no_pthread_h
#define pthread_mutex_init(A,B) #define pthread_mutex_init(A,B)
#define pthread_mutex_lock(A) #define pthread_mutex_lock(A)
#define pthread_mutex_unlock(A) #define pthread_mutex_unlock(A)
...@@ -32,4 +51,5 @@ ...@@ -32,4 +51,5 @@
#define rw_wrlock(A) #define rw_wrlock(A)
#define rw_unlock(A) #define rw_unlock(A)
#define rwlock_destroy(A) #define rwlock_destroy(A)
#endif #endif
...@@ -2822,7 +2822,7 @@ my_bool STDCALL mysql_stmt_attr_get(MYSQL_STMT *stmt, ...@@ -2822,7 +2822,7 @@ my_bool STDCALL mysql_stmt_attr_get(MYSQL_STMT *stmt,
{ {
switch (attr_type) { switch (attr_type) {
case STMT_ATTR_UPDATE_MAX_LENGTH: case STMT_ATTR_UPDATE_MAX_LENGTH:
*(my_bool*) value= stmt->update_max_length; *(unsigned long *) value= stmt->update_max_length;
break; break;
case STMT_ATTR_CURSOR_TYPE: case STMT_ATTR_CURSOR_TYPE:
*(ulong*) value= stmt->flags; *(ulong*) value= stmt->flags;
......
...@@ -2210,12 +2210,12 @@ UNLOCK TABLES; ...@@ -2210,12 +2210,12 @@ UNLOCK TABLES;
DELIMITER ;; DELIMITER ;;
/*!50003 DROP FUNCTION IF EXISTS `bug9056_func1` */;; /*!50003 DROP FUNCTION IF EXISTS `bug9056_func1` */;;
/*!50003 SET SESSION SQL_MODE=""*/;; /*!50003 SET SESSION SQL_MODE=""*/;;
/*!50003 CREATE*/ /*!50019 DEFINER=`root`@`localhost`*/ /*!50003 FUNCTION `bug9056_func1`(a INT, b INT) RETURNS int(11) /*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 FUNCTION `bug9056_func1`(a INT, b INT) RETURNS int(11)
RETURN a+b */;; RETURN a+b */;;
/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;; /*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;;
/*!50003 DROP FUNCTION IF EXISTS `bug9056_func2` */;; /*!50003 DROP FUNCTION IF EXISTS `bug9056_func2` */;;
/*!50003 SET SESSION SQL_MODE=""*/;; /*!50003 SET SESSION SQL_MODE=""*/;;
/*!50003 CREATE*/ /*!50019 DEFINER=`root`@`localhost`*/ /*!50003 FUNCTION `bug9056_func2`(f1 char binary) RETURNS char(1) /*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 FUNCTION `bug9056_func2`(f1 char binary) RETURNS char(1)
begin begin
set f1= concat( 'hello', f1 ); set f1= concat( 'hello', f1 );
return f1; return f1;
...@@ -2223,17 +2223,17 @@ end */;; ...@@ -2223,17 +2223,17 @@ end */;;
/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;; /*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;;
/*!50003 DROP PROCEDURE IF EXISTS `a'b` */;; /*!50003 DROP PROCEDURE IF EXISTS `a'b` */;;
/*!50003 SET SESSION SQL_MODE="REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI"*/;; /*!50003 SET SESSION SQL_MODE="REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI"*/;;
/*!50003 CREATE*/ /*!50019 DEFINER="root"@"localhost"*/ /*!50003 PROCEDURE "a'b"() /*!50003 CREATE*/ /*!50020 DEFINER="root"@"localhost"*/ /*!50003 PROCEDURE "a'b"()
select 1 */;; select 1 */;;
/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;; /*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;;
/*!50003 DROP PROCEDURE IF EXISTS `bug9056_proc1` */;; /*!50003 DROP PROCEDURE IF EXISTS `bug9056_proc1` */;;
/*!50003 SET SESSION SQL_MODE=""*/;; /*!50003 SET SESSION SQL_MODE=""*/;;
/*!50003 CREATE*/ /*!50019 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `bug9056_proc1`(IN a INT, IN b INT, OUT c INT) /*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `bug9056_proc1`(IN a INT, IN b INT, OUT c INT)
BEGIN SELECT a+b INTO c; end */;; BEGIN SELECT a+b INTO c; end */;;
/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;; /*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;;
/*!50003 DROP PROCEDURE IF EXISTS `bug9056_proc2` */;; /*!50003 DROP PROCEDURE IF EXISTS `bug9056_proc2` */;;
/*!50003 SET SESSION SQL_MODE=""*/;; /*!50003 SET SESSION SQL_MODE=""*/;;
/*!50003 CREATE*/ /*!50019 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `bug9056_proc2`(OUT a INT) /*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `bug9056_proc2`(OUT a INT)
BEGIN BEGIN
select sum(id) from t1 into a; select sum(id) from t1 into a;
END */;; END */;;
......
...@@ -14758,24 +14758,6 @@ static void test_bug16143() ...@@ -14758,24 +14758,6 @@ static void test_bug16143()
} }
/* Bug #16144: mysql_stmt_attr_get type error */
static void test_bug16144()
{
const my_bool flag_orig= (my_bool) 0xde;
my_bool flag= flag_orig;
MYSQL_STMT *stmt;
myheader("test_bug16144");
/* Check that attr_get returns correct data on little and big endian CPUs */
stmt= mysql_stmt_init(mysql);
mysql_stmt_attr_set(stmt, STMT_ATTR_UPDATE_MAX_LENGTH, (const void*) &flag);
mysql_stmt_attr_get(stmt, STMT_ATTR_UPDATE_MAX_LENGTH, (void*) &flag);
DIE_UNLESS(flag == flag_orig);
mysql_stmt_close(stmt);
}
/* /*
Bug #15613: "libmysqlclient API function mysql_stmt_prepare returns wrong Bug #15613: "libmysqlclient API function mysql_stmt_prepare returns wrong
field length" field length"
...@@ -15137,7 +15119,6 @@ static struct my_tests_st my_tests[]= { ...@@ -15137,7 +15119,6 @@ static struct my_tests_st my_tests[]= {
{ "test_opt_reconnect", test_opt_reconnect }, { "test_opt_reconnect", test_opt_reconnect },
{ "test_bug12744", test_bug12744 }, { "test_bug12744", test_bug12744 },
{ "test_bug16143", test_bug16143 }, { "test_bug16143", test_bug16143 },
{ "test_bug16144", test_bug16144 },
{ "test_bug15613", test_bug15613 }, { "test_bug15613", test_bug15613 },
{ "test_bug14169", test_bug14169 }, { "test_bug14169", test_bug14169 },
{ 0, 0 } { 0, 0 }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment