From 28a467c6faeac2e33637ce9bff9670987257a300 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 2 Jun 2005 21:14:14 +0200 Subject: CommandInterpreter.cpp: Bug #11050 ndb_mgm "show" prints incorrectly after master data node fails ndb/src/mgmclient/CommandInterpreter.cpp: Bug #11050 ndb_mgm "show" prints incorrectly after master data node fails --- ndb/src/mgmclient/CommandInterpreter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ndb/src/mgmclient/CommandInterpreter.cpp b/ndb/src/mgmclient/CommandInterpreter.cpp index c3b0ee7fe97..34fe57d1fca 100644 --- a/ndb/src/mgmclient/CommandInterpreter.cpp +++ b/ndb/src/mgmclient/CommandInterpreter.cpp @@ -1176,7 +1176,8 @@ CommandInterpreter::executeShow(char* parameters) api_nodes++; break; case NDB_MGM_NODE_TYPE_NDB: - if (state->node_states[i].dynamic_id < master_id) + if (state->node_states[i].dynamic_id && + state->node_states[i].dynamic_id < master_id) master_id= state->node_states[i].dynamic_id; ndb_nodes++; break; -- cgit v1.2.1 From bdbace6666f82a12d00297fcb82802f2612899b1 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 3 Jun 2005 00:28:18 +0500 Subject: WL#2286 - Compile MySQL w/YASSL support Compilation errors fixes. config/ac-macros/yassl.m4: Switch to -l/-L instead of passing file name directly. (more portable for ".a" archives) extra/yassl/taocrypt/src/integer.cpp: Instantiate more templates (needed by some 64bit boxes). extra/yassl/taocrypt/src/template_instnt.cpp: Instantiate more templates (needed by some 64bit boxes). Move tcArrayDelete to TaoCrypt namespace (more portable). --- config/ac-macros/yassl.m4 | 4 ++-- extra/yassl/taocrypt/src/integer.cpp | 2 ++ extra/yassl/taocrypt/src/template_instnt.cpp | 14 ++++++++++---- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/config/ac-macros/yassl.m4 b/config/ac-macros/yassl.m4 index ada1a2c0bd1..ddacde51c2a 100644 --- a/config/ac-macros/yassl.m4 +++ b/config/ac-macros/yassl.m4 @@ -19,8 +19,8 @@ AC_DEFUN([MYSQL_CHECK_YASSL], [ AC_MSG_RESULT([using bundled yaSSL]) yassl_dir="extra/yassl" openssl_libs="\ - \$(top_builddir)/extra/yassl/src/libyassl.a\ - \$(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.a" + -L\$(top_builddir)/extra/yassl/src -lyassl\ + -L\$(top_builddir)/extra/yassl/taocrypt/src -ltaocrypt" openssl_includes="-I\$(top_srcdir)/extra/yassl/include" AC_DEFINE([HAVE_OPENSSL], [1], [Defined by configure. Using yaSSL for OpenSSL emulation.]) else diff --git a/extra/yassl/taocrypt/src/integer.cpp b/extra/yassl/taocrypt/src/integer.cpp index 67f3c963cac..3df1df9beab 100644 --- a/extra/yassl/taocrypt/src/integer.cpp +++ b/extra/yassl/taocrypt/src/integer.cpp @@ -3941,6 +3941,8 @@ Integer CRT(const Integer &xp, const Integer &p, const Integer &xq, #ifdef __GNUC__ template unsigned int DivideThreeWordsByTwo(unsigned int*, unsigned int, unsigned int, DWord*); +template unsigned int DivideThreeWordsByTwo(unsigned int*, unsigned int, unsigned int, Word*); +template unsigned long long DivideThreeWordsByTwo(unsigned long long*, unsigned long long, unsigned long long, DWord*); #endif } // namespace diff --git a/extra/yassl/taocrypt/src/template_instnt.cpp b/extra/yassl/taocrypt/src/template_instnt.cpp index 28dbdc5c739..5fed1ee5ae4 100644 --- a/extra/yassl/taocrypt/src/template_instnt.cpp +++ b/extra/yassl/taocrypt/src/template_instnt.cpp @@ -11,6 +11,7 @@ template AlignedAllocator::pointer StdReallocate::pointer StdReallocate >(AllocatorWithCleanup&, unsigned char*, AllocatorWithCleanup::size_type, AllocatorWithCleanup::size_type, bool); template AllocatorWithCleanup::pointer StdReallocate >(AllocatorWithCleanup&, unsigned int*, AllocatorWithCleanup::size_type, AllocatorWithCleanup::size_type, bool); +template AllocatorWithCleanup::pointer StdReallocate >(AllocatorWithCleanup&, unsigned long long*, AllocatorWithCleanup::size_type, AllocatorWithCleanup::size_type, bool); template class RSA_Decryptor; template class RSA_Encryptor; template class RSA_Encryptor; @@ -18,14 +19,19 @@ template class RSA_Encryptor; namespace mySTL { template vector* uninit_fill_n*, unsigned int, vector >(vector*, unsigned int, vector const&); +template vector* uninit_fill_n*, unsigned long, vector >(vector*, unsigned long, vector const&); template void destroy*>(vector*, vector*); template TaoCrypt::Integer* uninit_copy(TaoCrypt::Integer*, TaoCrypt::Integer*, TaoCrypt::Integer*); template TaoCrypt::Integer* uninit_fill_n(TaoCrypt::Integer*, unsigned int, TaoCrypt::Integer const&); +template TaoCrypt::Integer* uninit_fill_n(TaoCrypt::Integer*, unsigned long, TaoCrypt::Integer const&); template void destroy(TaoCrypt::Integer*, TaoCrypt::Integer*); } -template void TaoCrypt::tcDelete(TaoCrypt::HASH*); -template void TaoCrypt::tcArrayDelete(unsigned*); -template void TaoCrypt::tcArrayDelete(unsigned char*); -template void TaoCrypt::tcArrayDelete(char*); +namespace TaoCrypt { +template void tcDelete(HASH*); +template void tcArrayDelete(unsigned*); +template void tcArrayDelete(unsigned long long*); +template void tcArrayDelete(unsigned char*); +template void tcArrayDelete(char*); +} #endif -- cgit v1.2.1 From 892032a2c2db6ecbe983578132f34ce8dc596048 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 3 Jun 2005 00:02:47 +0400 Subject: Give Item_arena::is_stmt_prepare a more descriptive name (it marks the code that is active for SP as well in 5.0) sql/item.cc: Rename of an Item_arena method. sql/item_subselect.cc: Rename of an Item_arena method. sql/sql_class.h: Rename of an Item_arena method. sql/sql_parse.cc: Rename of an Item_arena method. sql/sql_union.cc: Rename of an Item_arena method. --- sql/item.cc | 2 +- sql/item_subselect.cc | 2 +- sql/sql_class.h | 3 ++- sql/sql_parse.cc | 4 ++-- sql/sql_union.cc | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/sql/item.cc b/sql/item.cc index 0db9a56055f..a9c1ef7198e 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -1027,7 +1027,7 @@ Item_field::Item_field(THD *thd, Field *f) structure can go away and pop up again between subsequent executions of a prepared statement). */ - if (thd->current_arena->is_stmt_prepare()) + if (thd->current_arena->is_stmt_prepare_or_first_sp_execute()) { if (db_name) orig_db_name= thd->strdup(db_name); diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index b7aefdd6f2e..4f1e5b9a290 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -362,7 +362,7 @@ Item_singlerow_subselect::select_transformer(JOIN *join) because we do not rollback this changes TODO: make rollback for it, or special name resolving mode in 5.0. */ - !arena->is_stmt_prepare() + !arena->is_stmt_prepare_or_first_sp_execute() ) { diff --git a/sql/sql_class.h b/sql/sql_class.h index 47987f3a0c6..7c8ead7558e 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -695,7 +695,8 @@ public: virtual Type type() const; virtual ~Item_arena() {}; - inline bool is_stmt_prepare() const { return (int)state < (int)PREPARED; } + inline bool is_stmt_prepare_or_first_sp_execute() const + { return (int)state < (int)PREPARED; } inline bool is_first_stmt_execute() const { return state == PREPARED; } inline bool is_stmt_execute() const { return state == PREPARED || state == EXECUTED; } diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 2af9191110c..a9e68de3705 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -5894,7 +5894,7 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd, ptr->db= empty_c_string; ptr->db_length= 0; } - if (thd->current_arena->is_stmt_prepare()) + if (thd->current_arena->is_stmt_prepare_or_first_sp_execute()) ptr->db= thd->strdup(ptr->db); ptr->alias= alias_str; @@ -6972,7 +6972,7 @@ bool create_table_precheck(THD *thd, TABLE_LIST *tables, against the opened tables to ensure we don't use a table that is part of the view (which can only be done after the table has been opened). */ - if (thd->current_arena->is_stmt_prepare()) + if (thd->current_arena->is_stmt_prepare_or_first_sp_execute()) { /* For temporary tables we don't have to check if the created table exists diff --git a/sql/sql_union.cc b/sql/sql_union.cc index 8d36889df76..56401ced67c 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -323,7 +323,7 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result, } if (tmp_arena) thd->restore_backup_item_arena(tmp_arena, &backup); - if (arena->is_stmt_prepare()) + if (arena->is_stmt_prepare_or_first_sp_execute()) { /* prepare fake select to initialize it correctly */ init_prepare_fake_select_lex(thd); -- cgit v1.2.1