List:Commits« Previous MessageNext Message »
From:magnus.blaudd Date:May 28 2012 10:51am
Subject:bzr push into mysql-trunk branch (magnus.blaudd:3908 to 3910) Bug#14058643
View as plain text  
 3910 magnus.blaudd@stripped	2012-05-28 [merge]
      Merge bug#14058643 into trunk

    modified:
      libmysqld/examples/CMakeLists.txt
 3909 magnus.blaudd@stripped	2012-05-28
      WL#5960 Start memcached from mysql-test-run.pl
       - Follow up patch to fix problem with binary INCR/DECR issues in
       My::Memcache.pm client lib.

    modified:
      mysql-test/lib/My/Memcache.pm
 3908 Georgi Kodinov	2012-05-28 [merge]
      merge trunk->wl2392

    added:
      include/mysql/plugin_validate_password.h
      include/mysql/service_mysql_string.h
      libservices/mysql_string_service.c
      mysql-test/include/have_validate_password_plugin.inc
      mysql-test/r/validate_password_plugin.result
      mysql-test/t/validate_password_plugin-master.opt
      mysql-test/t/validate_password_plugin.test
      plugin/password_validation/
      plugin/password_validation/CMakeLists.txt
      plugin/password_validation/validate_password.cc
      sql/share/dictionary.txt
      sql/string_service.cc
      sql/string_service.h
    modified:
      include/CMakeLists.txt
      include/mysql/plugin.h
      include/mysql/plugin_audit.h.pp
      include/mysql/plugin_auth.h.pp
      include/mysql/plugin_ftparser.h.pp
      include/mysql/services.h
      include/service_versions.h
      libservices/CMakeLists.txt
      mysql-test/include/plugin.defs
      sql/CMakeLists.txt
      sql/handler.cc
      sql/item_create.cc
      sql/item_func.cc
      sql/item_func.h
      sql/item_strfunc.cc
      sql/share/CMakeLists.txt
      sql/share/errmsg-utf8.txt
      sql/sql_acl.cc
      sql/sql_acl.h
      sql/sql_plugin.cc
      sql/sql_plugin_services.h
      sql/sql_yacc.yy
      support-files/CMakeLists.txt
      support-files/my-huge.cnf.sh
      support-files/my-large.cnf.sh
      support-files/my-medium.cnf.sh
      support-files/my-small.cnf.sh
=== modified file 'libmysqld/examples/CMakeLists.txt'
--- a/libmysqld/examples/CMakeLists.txt	2012-03-06 14:29:42 +0000
+++ b/libmysqld/examples/CMakeLists.txt	2012-05-23 13:17:01 +0000
@@ -29,8 +29,20 @@ TARGET_LINK_LIBRARIES(mysql_embedded mys
 IF(UNIX)
   ADD_DEFINITIONS(${READLINE_DEFINES})
   TARGET_LINK_LIBRARIES(mysql_embedded ${READLINE_LIBRARY})
+  SET_TARGET_PROPERTIES(mysql_embedded PROPERTIES ENABLE_EXPORTS TRUE)
 ENDIF(UNIX)
 
+IF(VERSION MATCHES "-ndb-" AND INSTALL_LAYOUT MATCHES "SVR4")
+  # The mysqltest_embedded and mysql_client_test_embedded are big, and at
+  # present may cause the Solaris SVR4 packages for MySQL Cluster to be
+  # too big (>2GB) for the packaging tools to handle.
+  # Since these binaries are only used for testing the embedded server 
+  # they can safely be excluded from the build.
+  RETURN()
+ENDIF()
+
+
+
 MYSQL_ADD_EXECUTABLE(mysqltest_embedded ../../client/mysqltest.cc)
 TARGET_LINK_LIBRARIES(mysqltest_embedded mysqlserver)
 
@@ -54,7 +66,6 @@ ENDIF()
 TARGET_LINK_LIBRARIES(mysql_client_test_embedded mysqlserver)
 
 IF(UNIX)
-SET_TARGET_PROPERTIES(mysql_embedded PROPERTIES ENABLE_EXPORTS TRUE)
 SET_TARGET_PROPERTIES(mysqltest_embedded PROPERTIES ENABLE_EXPORTS TRUE)
 SET_TARGET_PROPERTIES(mysql_client_test_embedded PROPERTIES ENABLE_EXPORTS TRUE)
 ENDIF()

=== modified file 'mysql-test/lib/My/Memcache.pm'
--- a/mysql-test/lib/My/Memcache.pm	2012-04-18 14:41:57 +0000
+++ b/mysql-test/lib/My/Memcache.pm	2012-05-28 10:20:54 +0000
@@ -34,7 +34,9 @@
 ###  $mc->delete(key)                   returns 1 on success, 0 on failure
 ###  $mc->stats(stat_key)               get stats; returns a hash
 ###  $mc->incr(key, amount)             returns the new value or undef
-###  $mc->decr(key, amount)             like incr
+###  $mc->decr(key, amount)             like incr. (Note: In the Binary protocol
+###                                     only, incr and decr can take a 3rd 
+###                                     argument, the initial value). 
 ###  $mc->flush()                       flush_all
 ###
 ###  $mc->set_expires(sec)              Set TTL for all store operations
@@ -461,7 +463,11 @@ sub get_binary_response {
 
 sub bin_math {
   my $self = shift;
-  my ($cmd, $key, $delta, $initial, $expires) = @_;
+  my ($cmd, $key, $delta, $initial) = @_;
+  my $expires = 0xffffffff;  # 0xffffffff means the create flag is NOT set
+  if(defined($initial))  { $expires = $self->{exptime};   }
+  else                   { $initial = 0;                  }
+  my $value = undef;
   
   my $extra_header = pack "NNNNN", 
   ($delta   / (2 ** 32)),   # delta hi
@@ -469,9 +475,14 @@ sub bin_math {
   ($initial / (2 ** 32)),   # initial hi
   ($initial % (2 ** 32)),   # initial lo
   $expires;
-  $self->send_binary_request($cmd, $key, '', $extra_header);  
-  my ($status, $value) = $self->get_binary_response();
-  return ($status == 0) ? $value : undef;
+  $self->send_binary_request($cmd, $key, '', $extra_header);
+
+  my ($status, $packed_val) = $self->get_binary_response();
+  if($status == 0) {
+    my ($val_hi, $val_lo) = unpack("NN", $packed_val);
+    $value = ($val_hi * (2 ** 32)) + $val_lo;
+  }
+  return $value;
 }
 
 
@@ -558,13 +569,13 @@ sub delete { 
 }
   
 sub incr {
-  my ($self, $key, $delta) = @_;
-  return $self->bin_math(BIN_CMD_INCR, $key, $delta, 0, 0xffffffff);
+  my ($self, $key, $delta, $initial) = @_;
+  return $self->bin_math(BIN_CMD_INCR, $key, $delta, $initial);
 }
 
 sub decr {
-  my ($self, $key, $delta) = @_;
-  return $self->bin_math(BIN_CMD_DECR, $key, $delta, 0, 0xffffffff);
+  my ($self, $key, $delta, $initial) = @_;
+  return $self->bin_math(BIN_CMD_DECR, $key, $delta, $initial);
 }
 
 

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (magnus.blaudd:3908 to 3910) Bug#14058643magnus.blaudd28 May