From: Martin Zaun Date: January 19 2012 6:21pm Subject: bzr push into mysql-5.1-telco-7.1 branch (martin.zaun:4421 to 4422) List-Archive: http://lists.mysql.com/commits/142452 Message-Id: <201201191821.q0JILmn7011984@acsmt357.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 4422 Martin Zaun 2012-01-19 [merge] merge from ndb-7.1-ndbjtie-sizeof to ndb-7.1 modified: storage/ndb/include/ndbapi/Ndb.hpp storage/ndb/include/ndbapi/NdbDictionary.hpp storage/ndb/include/ndbapi/NdbOperation.hpp storage/ndb/include/ndbapi/NdbScanOperation.hpp storage/ndb/src/ndbjtie/NdbApiWrapper.hpp storage/ndb/src/ndbjtie/com/mysql/ndbjtie/ndbapi/Ndb.java storage/ndb/src/ndbjtie/com/mysql/ndbjtie/ndbapi/NdbDictionary.java storage/ndb/src/ndbjtie/com/mysql/ndbjtie/ndbapi/NdbOperation.java storage/ndb/src/ndbjtie/com/mysql/ndbjtie/ndbapi/NdbOperationConst.java storage/ndb/src/ndbjtie/com/mysql/ndbjtie/ndbapi/NdbScanOperation.java storage/ndb/src/ndbjtie/com/mysql/ndbjtie/ndbapi/issues.txt storage/ndb/src/ndbjtie/ndbapi_jtie.hpp 4421 Jonas Oreland 2012-01-19 [merge] ndb - merge 70 to 71 modified: storage/ndb/include/transporter/TransporterRegistry.hpp storage/ndb/src/common/transporter/TransporterRegistry.cpp === modified file 'storage/ndb/include/ndbapi/Ndb.hpp' --- a/storage/ndb/include/ndbapi/Ndb.hpp 2012-01-19 02:35:53 +0000 +++ b/storage/ndb/include/ndbapi/Ndb.hpp 2012-01-19 18:13:07 +0000 @@ -1,5 +1,5 @@ /* - Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by === modified file 'storage/ndb/include/ndbapi/NdbDictionary.hpp' --- a/storage/ndb/include/ndbapi/NdbDictionary.hpp 2012-01-19 02:35:53 +0000 +++ b/storage/ndb/include/ndbapi/NdbDictionary.hpp 2012-01-19 18:13:07 +0000 @@ -1,5 +1,5 @@ /* - Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by === modified file 'storage/ndb/include/ndbapi/NdbOperation.hpp' --- a/storage/ndb/include/ndbapi/NdbOperation.hpp 2012-01-19 02:35:53 +0000 +++ b/storage/ndb/include/ndbapi/NdbOperation.hpp 2012-01-19 18:13:07 +0000 @@ -1,5 +1,5 @@ /* - Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by === modified file 'storage/ndb/include/ndbapi/NdbScanOperation.hpp' --- a/storage/ndb/include/ndbapi/NdbScanOperation.hpp 2012-01-19 02:35:53 +0000 +++ b/storage/ndb/include/ndbapi/NdbScanOperation.hpp 2012-01-19 18:13:07 +0000 @@ -1,5 +1,5 @@ /* - Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by === modified file 'storage/ndb/src/ndbjtie/NdbApiWrapper.hpp' --- a/storage/ndb/src/ndbjtie/NdbApiWrapper.hpp 2011-02-02 09:52:33 +0000 +++ b/storage/ndb/src/ndbjtie/NdbApiWrapper.hpp 2012-01-19 18:16:31 +0000 @@ -1,5 +1,5 @@ /* - Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1415,6 +1415,13 @@ struct NdbApiWrapper { // mapped by "com_mysql_ndbjtie_ndbapi_NdbDictionary_RecordSpecification.h" + static Uint32 + NdbDictionary__RecordSpecification__size + ( ) + { + return NdbDictionary::RecordSpecification::size(); + } + // --------------------------------------------------------------------------- // mapped by "com_mysql_ndbjtie_ndbapi_NdbDictionary_Table.h" @@ -2847,6 +2854,13 @@ struct NdbApiWrapper { // mapped by "com_mysql_ndbjtie_ndbapi_NdbOperation_OperationOptions.h" + static Uint32 + NdbOperation__OperationOptions__size + ( ) + { + return NdbOperation::OperationOptions::size(); + } + // --------------------------------------------------------------------------- // mapped by "com_mysql_ndbjtie_ndbapi_NdbOperation_SetValueSpec.h" @@ -3252,6 +3266,13 @@ struct NdbApiWrapper { // mapped by "com_mysql_ndbjtie_ndbapi_NdbScanOperation_ScanOptions.h" + static Uint32 + NdbScanOperation__ScanOptions__size + ( ) + { + return NdbScanOperation::ScanOptions::size(); + } + // --------------------------------------------------------------------------- // mapped by "com_mysql_ndbjtie_ndbapi_NdbTransaction.h" @@ -3430,6 +3451,17 @@ struct NdbApiWrapper { // --------------------------------------------------------------------------- +// mapped by "com_mysql_ndbjtie_ndbapi_Ndb_PartitionSpec.h" + + static Uint32 + Ndb__PartitionSpec__size + ( ) + { + return Ndb::PartitionSpec::size(); + } + +// --------------------------------------------------------------------------- + // mapped by "com_mysql_ndbjtie_ndbapi_Ndb_cluster_connection.h" static int === modified file 'storage/ndb/src/ndbjtie/com/mysql/ndbjtie/ndbapi/Ndb.java' --- a/storage/ndb/src/ndbjtie/com/mysql/ndbjtie/ndbapi/Ndb.java 2011-02-02 09:52:33 +0000 +++ b/storage/ndb/src/ndbjtie/com/mysql/ndbjtie/ndbapi/Ndb.java 2012-01-19 18:16:31 +0000 @@ -1,5 +1,5 @@ /* - Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -48,7 +48,7 @@ public class Ndb extends Wrapper impleme static public interface Key_part_ptrConstArray extends ArrayWrapper< Key_part_ptrConst > { } - static public class Key_part_ptrArray extends Wrapper implements Key_part_ptrConstArray + static public class Key_part_ptrArray extends Wrapper implements Key_part_ptrConstArray { static public native Key_part_ptrArray create(int length); static public native void delete(Key_part_ptrArray e); @@ -68,6 +68,39 @@ public class Ndb extends Wrapper impleme static public final native Key_part_ptr create(); static public final native void delete(Key_part_ptr p0); } + public interface /*_struct_*/ PartitionSpecConst + { + public interface /*_enum_*/ SpecType + { + int PS_NONE = 0, + PS_USER_DEFINED = 1, + PS_DISTR_KEY_PART_PTR = 2, + PS_DISTR_KEY_RECORD = 3; + } + int/*_SpecType_*/ type() /*_const_*/; + } + static public class /*_struct_*/ PartitionSpec extends Wrapper implements PartitionSpecConst + { + static public final native int/*_Uint32_*/ size(); + public final native int/*_SpecType_*/ type() /*_const_*/; + // MMM! support mapping or check if needed + //union { + // struct { + // Uint32 partitionId; + // } UserDefined; + // struct { + // const Key_part_ptr* tableKeyParts; + // void* xfrmbuf; + // Uint32 xfrmbuflen; + // } KeyPartPtr; + // struct { + // const NdbRecord* keyRecord; + // const char* keyRow; + // void* xfrmbuf; + // Uint32 xfrmbuflen; + // } KeyRecord; + //}; + } public final native NdbTransaction/*_NdbTransaction *_*/ startTransaction(NdbDictionary.TableConst/*_const NdbDictionary.Table *_*/ table, Key_part_ptrConstArray/*_const Key_part_ptr *_*/ keyData, ByteBuffer/*_void *_*/ xfrmbuf /*_= 0_*/, int/*_Uint32_*/ xfrmbuflen /*_= 0_*/); public final native NdbTransaction/*_NdbTransaction *_*/ startTransaction(NdbDictionary.TableConst/*_const NdbDictionary.Table *_*/ table, int/*_Uint32_*/ partitionId); static public final native int computeHash(int[]/*_Uint32 *_*/ hashvalueptr, NdbDictionary.TableConst/*_const NdbDictionary.Table *_*/ p0, Key_part_ptrConstArray/*_const Key_part_ptr *_*/ keyData, ByteBuffer/*_void *_*/ xfrmbuf /*_= 0_*/, int/*_Uint32_*/ xfrmbuflen /*_= 0_*/); === modified file 'storage/ndb/src/ndbjtie/com/mysql/ndbjtie/ndbapi/NdbDictionary.java' --- a/storage/ndb/src/ndbjtie/com/mysql/ndbjtie/ndbapi/NdbDictionary.java 2011-02-02 09:52:33 +0000 +++ b/storage/ndb/src/ndbjtie/com/mysql/ndbjtie/ndbapi/NdbDictionary.java 2012-01-19 18:16:31 +0000 @@ -1,5 +1,5 @@ /* - Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -462,7 +462,7 @@ public class NdbDictionary extends Wrapp static public interface RecordSpecificationConstArray extends ArrayWrapper< RecordSpecificationConst > { } - static public class RecordSpecificationArray extends Wrapper implements RecordSpecificationConstArray + static public class RecordSpecificationArray extends Wrapper implements RecordSpecificationConstArray { static public native RecordSpecificationArray create(int length); static public native void delete(RecordSpecificationArray e); @@ -477,6 +477,7 @@ public class NdbDictionary extends Wrapp } static public class /*_struct_*/ RecordSpecification extends Wrapper implements RecordSpecificationConst { + static public final native int/*_Uint32_*/ size(); public final native ColumnConst/*_const Column *_*/ column(); public final native int/*_Uint32_*/ offset(); public final native int/*_Uint32_*/ nullbit_byte_offset(); @@ -655,7 +656,7 @@ public class NdbDictionary extends Wrapp static public interface ElementConstArray extends ArrayWrapper< ElementConst > { } - static public class ElementArray extends Wrapper implements ElementConstArray + static public class ElementArray extends Wrapper implements ElementConstArray { static public native ElementArray create(int length); static public native void delete(ElementArray e); === modified file 'storage/ndb/src/ndbjtie/com/mysql/ndbjtie/ndbapi/NdbOperation.java' --- a/storage/ndb/src/ndbjtie/com/mysql/ndbjtie/ndbapi/NdbOperation.java 2011-02-02 09:52:33 +0000 +++ b/storage/ndb/src/ndbjtie/com/mysql/ndbjtie/ndbapi/NdbOperation.java 2012-01-19 18:16:31 +0000 @@ -1,5 +1,5 @@ /* - Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -75,7 +75,7 @@ public class NdbOperation extends Wrappe static public interface GetValueSpecConstArray extends ArrayWrapper< GetValueSpecConst > { } - static public class GetValueSpecArray extends Wrapper implements GetValueSpecConstArray + static public class GetValueSpecArray extends Wrapper implements GetValueSpecConstArray { static public native GetValueSpecArray create(int length); static public native void delete(GetValueSpecArray e); @@ -95,7 +95,7 @@ public class NdbOperation extends Wrappe static public interface SetValueSpecConstArray extends ArrayWrapper< SetValueSpecConst > { } - static public class SetValueSpecArray extends Wrapper implements SetValueSpecConstArray + static public class SetValueSpecArray extends Wrapper implements SetValueSpecConstArray { static public native SetValueSpecArray create(int length); static public native void delete(SetValueSpecArray e); @@ -140,6 +140,7 @@ public class NdbOperation extends Wrappe } static public class /*_struct_*/ OperationOptions extends Wrapper implements OperationOptionsConst { + static public final native int/*_Uint32_*/ size(); public final native long/*_Uint64_*/ optionsPresent(); public final native int/*_AbortOption_*/ abortOption(); public final native GetValueSpecArray/*_GetValueSpec *_*/ extraGetValues(); === modified file 'storage/ndb/src/ndbjtie/com/mysql/ndbjtie/ndbapi/NdbOperationConst.java' --- a/storage/ndb/src/ndbjtie/com/mysql/ndbjtie/ndbapi/NdbOperationConst.java 2011-06-30 16:04:23 +0000 +++ b/storage/ndb/src/ndbjtie/com/mysql/ndbjtie/ndbapi/NdbOperationConst.java 2012-01-19 18:16:31 +0000 @@ -1,6 +1,5 @@ /* - Copyright (c) 2010 Sun Microsystems, Inc. - Use is subject to license terms. + Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -54,7 +53,7 @@ public interface NdbOperationConst int getNdbErrorLine() /*_const_*/; String/*_const char *_*/ getTableName() /*_const_*/; NdbDictionary.TableConst/*_const NdbDictionary.Table *_*/ getTable() /*_const_*/; - int/*_const Type_*/ getType() /*_const_*/; + int/*_Type_*/ getType() /*_const_*/; int/*_LockMode_*/ getLockMode() /*_const_*/; int/*_AbortOption_*/ getAbortOption() /*_const_*/; /*_virtual_*/ NdbTransaction/*_NdbTransaction *_*/ getNdbTransaction() /*_const_*/; === modified file 'storage/ndb/src/ndbjtie/com/mysql/ndbjtie/ndbapi/NdbScanOperation.java' --- a/storage/ndb/src/ndbjtie/com/mysql/ndbjtie/ndbapi/NdbScanOperation.java 2011-02-02 09:52:33 +0000 +++ b/storage/ndb/src/ndbjtie/com/mysql/ndbjtie/ndbapi/NdbScanOperation.java 2012-01-19 18:16:31 +0000 @@ -1,5 +1,5 @@ /* - Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -62,6 +62,7 @@ public class NdbScanOperation extends Nd } static public class /*_struct_*/ ScanOptions extends Wrapper implements ScanOptionsConst { + static public final native int/*_Uint32_*/ size(); public final native long/*_Uint64_*/ optionsPresent(); public final native int/*_Uint32_*/ scan_flags(); public final native int/*_Uint32_*/ parallel(); === modified file 'storage/ndb/src/ndbjtie/com/mysql/ndbjtie/ndbapi/issues.txt' --- a/storage/ndb/src/ndbjtie/com/mysql/ndbjtie/ndbapi/issues.txt 2010-04-18 17:41:22 +0000 +++ b/storage/ndb/src/ndbjtie/com/mysql/ndbjtie/ndbapi/issues.txt 2012-01-19 18:16:31 +0000 @@ -14,6 +14,7 @@ NdbDictionary.java: // MMM! suppo Ndb.java: // MMM! support or check if needed: ByteBuffer/*_const void *_*/ ptr(); Ndb.java: // MMM! support or check if needed: public final native ByteBuffer/*_const void *_*/ ptr(); +// MMM! support mapping or check if needed NdbDictionary.java: // MMM! support or check if needed: static public final native char * getValuePtr(NdbRecordConst/*_const NdbRecord *_*/ record, char * row, int/*_Uint32_*/ attrId); === modified file 'storage/ndb/src/ndbjtie/ndbapi_jtie.hpp' --- a/storage/ndb/src/ndbjtie/ndbapi_jtie.hpp 2012-01-05 03:32:58 +0000 +++ b/storage/ndb/src/ndbjtie/ndbapi_jtie.hpp 2012-01-19 18:16:31 +0000 @@ -1,5 +1,5 @@ /* - Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -121,6 +121,8 @@ JTIE_DEFINE_PEER_CLASS_MAPPING(Ndb::Key_ c_m_n_n_Ndb_Key_part_ptr) JTIE_DEFINE_PEER_CLASS_MAPPING(Ndb::Key_part_ptr, c_m_n_n_Ndb_Key_part_ptrArray) +JTIE_DEFINE_PEER_CLASS_MAPPING(Ndb::PartitionSpec, + c_m_n_n_Ndb_PartitionSpec) JTIE_DEFINE_PEER_CLASS_MAPPING(Ndb_cluster_connection, c_m_n_n_Ndb_cluster_connection) @@ -4053,6 +4055,22 @@ Java_com_mysql_ndbjtie_ndbapi_NdbDiction /* * Class: com_mysql_ndbjtie_ndbapi_NdbDictionary_RecordSpecification + * Method: size + * Signature: ()I + */ +JNIEXPORT jint JNICALL +Java_com_mysql_ndbjtie_ndbapi_NdbDictionary_00024RecordSpecification_size(JNIEnv * env, jclass cls) +{ + TRACE("jint Java_com_mysql_ndbjtie_ndbapi_NdbDictionary_00024RecordSpecification_size(JNIEnv *, jclass)"); +#ifndef NDBJTIE_USE_WRAPPED_VARIANT_FOR_FUNCTION + return gcall_fr< ttrait_Uint32, &NdbDictionary::RecordSpecification::size >(env, cls); +#else + return gcall_fr< ttrait_Uint32, &NdbApiWrapper::NdbDictionary__RecordSpecification__size >(env, cls); +#endif // NDBJTIE_USE_WRAPPED_VARIANT_FOR_FUNCTION +} + +/* + * Class: com_mysql_ndbjtie_ndbapi_NdbDictionary_RecordSpecification * Method: column * Signature: ()Lcom/mysql/ndbjtie/ndbapi/NdbDictionary/ColumnConst; */ @@ -7984,6 +8002,22 @@ Java_com_mysql_ndbjtie_ndbapi_NdbOperati /* * Class: com_mysql_ndbjtie_ndbapi_NdbOperation_OperationOptions + * Method: size + * Signature: ()I + */ +JNIEXPORT jint JNICALL +Java_com_mysql_ndbjtie_ndbapi_NdbOperation_00024OperationOptions_size(JNIEnv * env, jclass cls) +{ + TRACE("jint Java_com_mysql_ndbjtie_ndbapi_NdbOperation_00024OperationOptions_size(JNIEnv *, jclass)"); +#ifndef NDBJTIE_USE_WRAPPED_VARIANT_FOR_FUNCTION + return gcall_fr< ttrait_Uint32, &NdbOperation::OperationOptions::size >(env, cls); +#else + return gcall_fr< ttrait_Uint32, &NdbApiWrapper::NdbOperation__OperationOptions__size >(env, cls); +#endif // NDBJTIE_USE_WRAPPED_VARIANT_FOR_FUNCTION +} + +/* + * Class: com_mysql_ndbjtie_ndbapi_NdbOperation_OperationOptions * Method: optionsPresent * Signature: ()J */ @@ -9244,6 +9278,22 @@ Java_com_mysql_ndbjtie_ndbapi_NdbScanOpe /* * Class: com_mysql_ndbjtie_ndbapi_NdbScanOperation_ScanOptions + * Method: size + * Signature: ()I + */ +JNIEXPORT jint JNICALL +Java_com_mysql_ndbjtie_ndbapi_NdbScanOperation_00024ScanOptions_size(JNIEnv * env, jclass cls) +{ + TRACE("jint Java_com_mysql_ndbjtie_ndbapi_NdbScanOperation_00024ScanOptions_size(JNIEnv *, jclass)"); +#ifndef NDBJTIE_USE_WRAPPED_VARIANT_FOR_FUNCTION + return gcall_fr< ttrait_Uint32, &NdbScanOperation::ScanOptions::size >(env, cls); +#else + return gcall_fr< ttrait_Uint32, &NdbApiWrapper::NdbScanOperation__ScanOptions__size >(env, cls); +#endif // NDBJTIE_USE_WRAPPED_VARIANT_FOR_FUNCTION +} + +/* + * Class: com_mysql_ndbjtie_ndbapi_NdbScanOperation_ScanOptions * Method: optionsPresent * Signature: ()J */ @@ -9952,6 +10002,38 @@ Java_com_mysql_ndbjtie_ndbapi_Ndb_00024K // --------------------------------------------------------------------------- +//#include "com_mysql_ndbjtie_ndbapi_Ndb_PartitionSpec.h" + +/* + * Class: com_mysql_ndbjtie_ndbapi_Ndb_PartitionSpec + * Method: size + * Signature: ()I + */ +JNIEXPORT jint JNICALL +Java_com_mysql_ndbjtie_ndbapi_Ndb_00024PartitionSpec_size(JNIEnv * env, jclass cls) +{ + TRACE("jint Java_com_mysql_ndbjtie_ndbapi_Ndb_00024PartitionSpec_size(JNIEnv *, jclass)"); +#ifndef NDBJTIE_USE_WRAPPED_VARIANT_FOR_FUNCTION + return gcall_fr< ttrait_Uint32, &Ndb::PartitionSpec::size >(env, cls); +#else + return gcall_fr< ttrait_Uint32, &NdbApiWrapper::Ndb__PartitionSpec__size >(env, cls); +#endif // NDBJTIE_USE_WRAPPED_VARIANT_FOR_FUNCTION +} + +/* + * Class: com_mysql_ndbjtie_ndbapi_Ndb_PartitionSpec + * Method: type + * Signature: ()I + */ +JNIEXPORT jint JNICALL +Java_com_mysql_ndbjtie_ndbapi_Ndb_00024PartitionSpec_type(JNIEnv * env, jobject obj) +{ + TRACE("jint Java_com_mysql_ndbjtie_ndbapi_Ndb_00024PartitionSpec_type(JNIEnv *, jobject)"); + return gget< ttrait_c_m_n_n_Ndb_PartitionSpec_t, ttrait_Uint32, &Ndb::PartitionSpec::type >(env, obj); +} + +// --------------------------------------------------------------------------- + //#include "com_mysql_ndbjtie_ndbapi_Ndb_cluster_connection.h" /* @@ -10002,8 +10084,8 @@ Java_com_mysql_ndbjtie_ndbapi_Ndb_1clust * Class: com_mysql_ndbjtie_ndbapi_Ndb_cluster_connection * Method: create * Signature: (Ljava/lang/String;I)Lcom/mysql/ndbjtie/ndbapi/Ndb_cluster_connection; - */ -JNIEXPORT jobject JNICALL + */ +JNIEXPORT jobject JNICALL Java_com_mysql_ndbjtie_ndbapi_Ndb_1cluster_1connection_create__Ljava_lang_String_2I (JNIEnv * env, jclass cls, jstring p0, jint p1) { No bundle (reason: useless for push emails).