Commit 53e526fd authored by unknown's avatar unknown

Merge kahlann.erinye.com:/home/df/mysql/build/mysql-5.1.15-release

into  kahlann.erinye.com:/home/df/mysql/build/mysql-5.1-build-work-5.1.15-and-opt-merge


sql/item_func.cc:
  Auto merged
parents 6db6be5a 5af0cbc7
...@@ -2375,4 +2375,18 @@ va_list ap; ...@@ -2375,4 +2375,18 @@ va_list ap;
#endif /* NO_VARARGS */ #endif /* NO_VARARGS */
#else
/*
* Dummy function, workaround for MySQL bug#14420 related
* build failure on a platform where linking with an empty
* archive fails.
*
* This block can be removed as soon as a fix for bug#14420
* is implemented.
*/
int i_am_a_dummy_function() {
return 0;
}
#endif #endif
#ifdef DBUG_OFF /* We are testing dbug */ #ifdef DBUG_OFF /* We are testing dbug */
#undef DBUG_OFF
#endif int factorial(register int value) {
if(value > 1) {
value *= factorial(value-1);
}
return value;
}
#else
#include <my_global.h> #include <my_global.h>
...@@ -15,3 +22,6 @@ register int value) ...@@ -15,3 +22,6 @@ register int value)
DBUG_PRINT ("result", ("result is %d", value)); DBUG_PRINT ("result", ("result is %d", value));
DBUG_RETURN (value); DBUG_RETURN (value);
} }
#endif
...@@ -538,6 +538,11 @@ int init_embedded_server(int argc, char **argv, char **groups) ...@@ -538,6 +538,11 @@ int init_embedded_server(int argc, char **argv, char **groups)
sql_print_error("Warning: Can't create thread to manage maintenance"); sql_print_error("Warning: Can't create thread to manage maintenance");
} }
// FIXME initialize binlog_filter and rpl_filter if not already done
// corresponding delete is in clean_up()
if(!binlog_filter) binlog_filter = new Rpl_filter;
if(!rpl_filter) rpl_filter = new Rpl_filter;
if (opt_init_file) if (opt_init_file)
{ {
if (read_init_file(opt_init_file)) if (read_init_file(opt_init_file))
...@@ -593,7 +598,7 @@ void *create_embedded_thd(int client_flag) ...@@ -593,7 +598,7 @@ void *create_embedded_thd(int client_flag)
thd->set_time(); thd->set_time();
thd->init_for_queries(); thd->init_for_queries();
thd->client_capabilities= client_flag; thd->client_capabilities= client_flag;
thd->real_id= (pthread_t) thd; thd->real_id= pthread_self();
thd->db= NULL; thd->db= NULL;
thd->db_length= 0; thd->db_length= 0;
......
...@@ -3085,7 +3085,13 @@ public: ...@@ -3085,7 +3085,13 @@ public:
int count; int count;
bool locked; bool locked;
pthread_cond_t cond; pthread_cond_t cond;
#ifndef EMBEDDED_LIBRARY
pthread_t thread; pthread_t thread;
void set_thread(THD *thd) { thread= thd->real_id; }
#else
THD *thread;
void set_thread(THD *thd) { thread= thd; }
#endif /*EMBEDDED_LIBRARY*/
ulong thread_id; ulong thread_id;
User_level_lock(const char *key_arg,uint length, ulong id) User_level_lock(const char *key_arg,uint length, ulong id)
...@@ -3239,7 +3245,7 @@ void debug_sync_point(const char* lock_name, uint lock_timeout) ...@@ -3239,7 +3245,7 @@ void debug_sync_point(const char* lock_name, uint lock_timeout)
else else
{ {
ull->locked=1; ull->locked=1;
ull->thread=thd->real_id; ull->set_thread(thd);
thd->ull=ull; thd->ull=ull;
} }
pthread_mutex_unlock(&LOCK_user_locks); pthread_mutex_unlock(&LOCK_user_locks);
...@@ -3314,7 +3320,7 @@ longlong Item_func_get_lock::val_int() ...@@ -3314,7 +3320,7 @@ longlong Item_func_get_lock::val_int()
null_value=1; // Probably out of memory null_value=1; // Probably out of memory
return 0; return 0;
} }
ull->thread=thd->real_id; ull->set_thread(thd);
thd->ull=ull; thd->ull=ull;
pthread_mutex_unlock(&LOCK_user_locks); pthread_mutex_unlock(&LOCK_user_locks);
return 1; // Got new lock return 1; // Got new lock
...@@ -3355,7 +3361,7 @@ longlong Item_func_get_lock::val_int() ...@@ -3355,7 +3361,7 @@ longlong Item_func_get_lock::val_int()
else // We got the lock else // We got the lock
{ {
ull->locked=1; ull->locked=1;
ull->thread=thd->real_id; ull->set_thread(thd);
ull->thread_id= thd->thread_id; ull->thread_id= thd->thread_id;
thd->ull=ull; thd->ull=ull;
error=0; error=0;
...@@ -3404,7 +3410,7 @@ longlong Item_func_release_lock::val_int() ...@@ -3404,7 +3410,7 @@ longlong Item_func_release_lock::val_int()
else else
{ {
#ifdef EMBEDDED_LIBRARY #ifdef EMBEDDED_LIBRARY
if (ull->locked && pthread_equal(current_thd->real_id,ull->thread)) if (ull->locked && (current_thd == ull->thread))
#else #else
if (ull->locked && pthread_equal(pthread_self(),ull->thread)) if (ull->locked && pthread_equal(pthread_self(),ull->thread))
#endif #endif
......
...@@ -722,17 +722,17 @@ fi ...@@ -722,17 +722,17 @@ fi
in the server RPM. in the server RPM.
- The "mysqlmanager" man page got moved from section 1 to 8. - The "mysqlmanager" man page got moved from section 1 to 8.
* Thu Nov 30 2006 Joerg Bruehe <joerg@mysql.com>
- Call "make install" using "benchdir_root=%{_datadir}",
because that is affecting the regression test suite as well.
* Thu Nov 16 2006 Joerg Bruehe <joerg@mysql.com> * Thu Nov 16 2006 Joerg Bruehe <joerg@mysql.com>
- Explicitly note that the "MySQL-shared" RPMs (as built by MySQL AB) - Explicitly note that the "MySQL-shared" RPMs (as built by MySQL AB)
replace "mysql-shared" (as distributed by SuSE) to allow easy upgrading replace "mysql-shared" (as distributed by SuSE) to allow easy upgrading
(bug#22081). (bug#22081).
* Thu Nov 30 2006 Joerg Bruehe <joerg@mysql.com>
- Call "make install" using "benchdir_root=%{_datadir}",
because that is affecting the regression test suite as well.
* Mon Nov 13 2006 Joerg Bruehe <joerg@mysql.com> * Mon Nov 13 2006 Joerg Bruehe <joerg@mysql.com>
- Add "--with-partition" to all server builds. - Add "--with-partition" to all server builds.
......
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