]> err.no Git - sope/commitdiff
fixed NSData values with MySQL
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Fri, 29 Jul 2005 16:19:10 +0000 (16:19 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Fri, 29 Jul 2005 16:19:10 +0000 (16:19 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@946 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

sope-gdl1/MySQL/ChangeLog
sope-gdl1/MySQL/MySQL4Values.m
sope-gdl1/MySQL/NSData+MySQL4Val.m
sope-gdl1/MySQL/README
sope-gdl1/MySQL/Version

index d4dd5e72c4f6f4cd9396892fc142c345787cad2e..a88466e04c1a3bcc7104df8892c38f344c18cfdf 100644 (file)
@@ -1,3 +1,12 @@
+2005-07-29  Helge Hess  <helge.hess@skyrix.com>
+
+       * v4.5.12
+
+       * NSData+MySQL4Val.m: fixed handling of NSData rows (proper init was
+         missing)
+
+       * MySQL4Values.m: improved logging of unsupported types
+
 2005-07-27  Helge Hess  <helge.hess@skyrix.com>
 
        * fixed gcc 4.0 warnings (char signedness) (v4.5.11)
index f7395c729665e79d1b1358ed69233f1b23ab2ac9..6efd34805da35d76b5d155cf6dec6c046ae33dc2 100644 (file)
       [self release];
       return nil;
     }
-    NSLog(@"WARNING(%s): falling back to NSString for MySQL4 value!",
-          __PRETTY_FUNCTION__);
+    NSLog(@"WARNING(%s): %@ falling back to NSString for MySQL4 value"
+          @" (type %i, 0x%08X, len=%d)",
+          __PRETTY_FUNCTION__, NSStringFromClass([self class]),
+          _type, _v, _len);
     
     [self release];
     return [[NSString alloc] initWithMySQL4Type:_type value:_v length:_len];
index 13d6419bafeb94556507f28bc545e151726be29b..8b62a596b46031fda543d9f6cc7ad3bbcc81c2f1 100644 (file)
 
 @implementation NSData(MySQL4Values)
 
+- (id)initWithMySQL4Type:(int)_type value:(const void *)_v length:(int)_len {
+  // Note: never used on lF (NSTemporaryString!)
+  if (_v == NULL) {
+    [self release];
+    return nil;
+  }
+
+  return [self initWithBytes:_v length:_len];
+}
+
+#if 0 // unused?
 - (id)initWithMySQL4Int:(int)_value {
   return [self initWithBytes:&_value length:sizeof(int)];
 }
@@ -42,6 +53,7 @@
 - (id)initWithMySQL4Data:(const void *)_value length:(int)_length {
   return [self initWithBytes:_value length:_length];
 }
+#endif
 
 - (NSString *)stringValueForMySQL4Type:(NSString *)_type
   attribute:(EOAttribute *)_attribute
index a7f99698c58333aa687d40abdfe243a824439b57..b06664ba59ca30e2ee900236e817f435710ade6e 100644 (file)
@@ -3,6 +3,8 @@
 Note: this is far from being complete! The adaptor is currently a fork of
       the MySQL4 adaptor.
 
+http://sql-info.de/mysql/gotchas.html
+
 TODO
 ====
 - implement
index 6f0aa7829c88bd09724d4e1ece6c718b2532e219..cda34ac9d72a5b695708435677454b874f6e337d 100644 (file)
@@ -1,3 +1,3 @@
 # Version file
 
-SUBMINOR_VERSION:=11
+SUBMINOR_VERSION:=12