List:Commits« Previous MessageNext Message »
From:John David Duncan Date:September 22 2011 2:11am
Subject:bzr push into mysql-5.5-cluster branch (john.duncan:3511 to 3514)
View as plain text  
 3514 John David Duncan	2011-09-21
      Reimplement strsep() as it is not available on Solaris.

    modified:
      storage/ndb/memcache/src/QueryPlan.cc
      storage/ndb/memcache/src/TableSpec.cc
 3513 John David Duncan	2011-09-21
      Avoid redefinition that produces a long list of warnings on Solaris

    modified:
      config.h.cmake
 3512 John David Duncan	2011-09-21
      Trying to use __builtin_ffs() with Sun Pro compiler fails at link-time (not compile-time)

    modified:
      storage/ndb/ndb_configure.cmake
 3511 Frazer Clement	2011-09-21
      Fix Win testcase

    modified:
      mysql-test/r/mysqld--help-win.result
=== modified file 'config.h.cmake'
--- a/config.h.cmake	2011-04-30 05:24:38 +0000
+++ b/config.h.cmake	2011-09-22 00:51:13 +0000
@@ -466,7 +466,9 @@
 #cmakedefine _LARGE_FILES 1
 #cmakedefine _LARGEFILE_SOURCE 1
 #cmakedefine _LARGEFILE64_SOURCE 1
+#ifndef _FILE_OFFSET_BITS
 #cmakedefine _FILE_OFFSET_BITS @_FILE_OFFSET_BITS@
+#endif
 
 #cmakedefine TIME_WITH_SYS_TIME 1
 

=== modified file 'storage/ndb/memcache/src/QueryPlan.cc'
--- a/storage/ndb/memcache/src/QueryPlan.cc	2011-09-12 10:05:07 +0000
+++ b/storage/ndb/memcache/src/QueryPlan.cc	2011-09-22 02:10:17 +0000
@@ -20,6 +20,7 @@
 #include <stdio.h>
 #include <assert.h>
 #include <stddef.h>
+#include <strings.h>
 
 #include "NdbApi.hpp"
 #include <memcached/extension_loggers.h>

=== modified file 'storage/ndb/memcache/src/TableSpec.cc'
--- a/storage/ndb/memcache/src/TableSpec.cc	2011-09-12 10:05:07 +0000
+++ b/storage/ndb/memcache/src/TableSpec.cc	2011-09-22 02:10:17 +0000
@@ -26,10 +26,37 @@
 #include "debug.h"
 #include "Record.h" 
 
-/* MAX_KEY_COLUMNS and MAX_VAL_COLUMNS are defined in Record.h */
+/* Reimplmentation of strsep() which is not always available */
+char * tokenize_list(char **stringloc, const char *delim) {
+  char *token_start = *stringloc;
+  char *s = *stringloc;
+
+  if (s == 0) return 0;
+
+  while(1) {
+    char c = *s++;
+    char sepc;
+    const char * sep_char = delim;
+    do { /* iterate over the possible delimiter characters */
+      sepc = *sep_char++;
+      if (sepc == c) {  /* found a delim.  modify the string in-place: */
+        if(c) {
+          s[-1] = 0;  /* place a null before the delim. */
+          *stringloc = s;  /* advance pointer to next span */
+        }
+        else { 
+          *stringloc = 0;  /* signal end of tokenizing */
+        }
+        return token_start;
+      }
+    } while (sepc != 0);
+  }
+}
+
 
 /* Parse a comma-separated string like "column1, column2".
-   Makes a copy of "list".
+   Makes a copy of "list".  
+   MAX_KEY_COLUMNS and MAX_VAL_COLUMNS are defined in Record.h 
 */
 int TableSpec::build_column_list(const char ** const &col_array, 
                                  const char *list) {
@@ -37,7 +64,7 @@ int TableSpec::build_column_list(const c
   if(list == 0) return 0;
   char *next = strdup(list);  
   while(next && n < (MAX_KEY_COLUMNS + MAX_VAL_COLUMNS)) {
-    char *item = strsep(& next, ", ");
+    char *item = tokenize_list(& next, ", ");
     if(*item != '\0')
     {
       col_array[n++] = item;

=== modified file 'storage/ndb/ndb_configure.cmake'
--- a/storage/ndb/ndb_configure.cmake	2011-09-06 07:46:41 +0000
+++ b/storage/ndb/ndb_configure.cmake	2011-09-22 00:48:32 +0000
@@ -67,7 +67,7 @@ cHECK_FUNCTION_EXISTS(pthread_setschedpa
 
 CHECK_INCLUDE_FILES(sun_prefetch.h HAVE_SUN_PREFETCH_H)
 
-CHECK_CXX_SOURCE_COMPILES("
+CHECK_CXX_SOURCE_RUNS("
 unsigned A = 7;
 int main()
 {

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.5-cluster branch (john.duncan:3511 to 3514) John David Duncan22 Sep