diff options
Diffstat (limited to 'plugin/feedback')
-rw-r--r-- | plugin/feedback/CMakeLists.txt | 12 | ||||
-rw-r--r-- | plugin/feedback/feedback.cc | 17 | ||||
-rw-r--r-- | plugin/feedback/feedback.h | 2 | ||||
-rw-r--r-- | plugin/feedback/sender_thread.cc | 5 | ||||
-rw-r--r-- | plugin/feedback/url_base.cc | 2 | ||||
-rw-r--r-- | plugin/feedback/url_http.cc | 2 | ||||
-rw-r--r-- | plugin/feedback/utils.cc | 9 |
7 files changed, 25 insertions, 24 deletions
diff --git a/plugin/feedback/CMakeLists.txt b/plugin/feedback/CMakeLists.txt index 9807eadbe34..2103250e5a6 100644 --- a/plugin/feedback/CMakeLists.txt +++ b/plugin/feedback/CMakeLists.txt @@ -14,10 +14,10 @@ IF(HAVE_NETDB_H) ENDIF(HAVE_NETDB_H) IF(WIN32) - MYSQL_ADD_PLUGIN(FEEDBACK ${FEEDBACK_SOURCES} - LINK_LIBRARIES ${SSL_LIBRARIES} - STATIC_ONLY DEFAULT) -ELSE(WIN32) - MYSQL_ADD_PLUGIN(FEEDBACK ${FEEDBACK_SOURCES} - LINK_LIBRARIES ${SSL_LIBRARIES}) + SET(MAYBE_STATIC_ONLY STATIC_ONLY) ENDIF(WIN32) + +MYSQL_ADD_PLUGIN(FEEDBACK ${FEEDBACK_SOURCES} + LINK_LIBRARIES ${SSL_LIBRARIES} + ${MAYBE_STATIC_ONLY} RECOMPILE_FOR_EMBEDDED DEFAULT) + diff --git a/plugin/feedback/feedback.cc b/plugin/feedback/feedback.cc index b9ab3563125..bd433efa4d3 100644 --- a/plugin/feedback/feedback.cc +++ b/plugin/feedback/feedback.cc @@ -11,7 +11,7 @@ You should have received a copy of the GNU General Public License 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., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ #include "feedback.h" @@ -103,25 +103,28 @@ static COND* make_cond(THD *thd, TABLE_LIST *tables, LEX_STRING *filter) nrc.init(); nrc.resolve_in_table_list_only(tables); - res= new Item_cond_or(); + res= new (thd->mem_root) Item_cond_or(thd); if (!res) return OOM; for (; filter->str; filter++) { - Item_field *fld= new Item_field(&nrc, db, table, field); - Item_string *pattern= new Item_string(filter->str, filter->length, cs); - Item_string *escape= new Item_string("\\", 1, cs); + Item_field *fld= new (thd->mem_root) Item_field(thd, &nrc, db, table, + field); + Item_string *pattern= new (thd->mem_root) Item_string(thd, filter->str, + filter->length, cs); + Item_string *escape= new (thd->mem_root) Item_string(thd, "\\", 1, cs); if (!fld || !pattern || !escape) return OOM; - Item_func_like *like= new Item_func_like(fld, pattern, escape, 0); + Item_func_like *like= new (thd->mem_root) Item_func_like(thd, fld, pattern, + escape, 0); if (!like) return OOM; - res->add(like); + res->add(like, thd->mem_root); } if (res->fix_fields(thd, (Item**)&res)) diff --git a/plugin/feedback/feedback.h b/plugin/feedback/feedback.h index bb3f896288d..5e7e7b1516e 100644 --- a/plugin/feedback/feedback.h +++ b/plugin/feedback/feedback.h @@ -11,7 +11,7 @@ You should have received a copy of the GNU General Public License 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., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ #define MYSQL_SERVER 1 #include <sql_class.h> diff --git a/plugin/feedback/sender_thread.cc b/plugin/feedback/sender_thread.cc index 4a7da3000ca..d61e303e8b3 100644 --- a/plugin/feedback/sender_thread.cc +++ b/plugin/feedback/sender_thread.cc @@ -11,11 +11,12 @@ You should have received a copy of the GNU General Public License 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., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ #include "feedback.h" #include <sql_acl.h> #include <sql_parse.h> +#include <sql_show.h> #include <time.h> namespace feedback { @@ -120,7 +121,7 @@ static int prepare_for_fill(TABLE_LIST *tables) strlen(i_s_feedback->table_name), 0, TL_READ); tables->schema_table= i_s_feedback; - tables->table= i_s_feedback->create_table(thd, tables); + tables->table= create_schema_table(thd, tables); if (!tables->table) return 1; diff --git a/plugin/feedback/url_base.cc b/plugin/feedback/url_base.cc index 6afbcd7c8f4..44cb0b00c95 100644 --- a/plugin/feedback/url_base.cc +++ b/plugin/feedback/url_base.cc @@ -11,7 +11,7 @@ You should have received a copy of the GNU General Public License 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., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ #include "feedback.h" diff --git a/plugin/feedback/url_http.cc b/plugin/feedback/url_http.cc index cec3f60505c..4851097e63f 100644 --- a/plugin/feedback/url_http.cc +++ b/plugin/feedback/url_http.cc @@ -11,7 +11,7 @@ You should have received a copy of the GNU General Public License 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., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ #include "feedback.h" diff --git a/plugin/feedback/utils.cc b/plugin/feedback/utils.cc index dad3d59e76d..6da1b591652 100644 --- a/plugin/feedback/utils.cc +++ b/plugin/feedback/utils.cc @@ -11,7 +11,7 @@ You should have received a copy of the GNU General Public License 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., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ #include "feedback.h" @@ -19,9 +19,6 @@ #include <unistd.h> #endif -#include <base64.h> -#include <sha1.h> - #if defined (_WIN32) #define HAVE_SYS_UTSNAME_H @@ -420,7 +417,7 @@ int fill_collation_statistics(THD *thd, TABLE_LIST *tables) int calculate_server_uid(char *dest) { uchar rawbuf[2 + 6]; - uchar shabuf[SHA1_HASH_SIZE]; + uchar shabuf[MY_SHA1_HASH_SIZE]; int2store(rawbuf, mysqld_port); if (my_gethwaddr(rawbuf + 2)) @@ -429,7 +426,7 @@ int calculate_server_uid(char *dest) return 1; } - compute_sha1_hash((uint8*) shabuf, (char*) rawbuf, sizeof(rawbuf)); + my_sha1((uint8*) shabuf, (char*) rawbuf, sizeof(rawbuf)); assert(base64_needed_encoded_length(sizeof(shabuf)) <= SERVER_UID_SIZE); base64_encode(shabuf, sizeof(shabuf), dest); |