From: <ale...@us...> - 2013-02-17 12:08:59
|
Revision: 57663 http://sourceforge.net/p/firebird/code/57663 Author: alexpeshkoff Date: 2013-02-17 12:08:53 +0000 (Sun, 17 Feb 2013) Log Message: ----------- Modified IStatement interface in our API: 1. Never allocate empty statement - always use att->prepare() to create statement interface 2. Separated IStatement into 2 parts - statement itself and resultset. 3. Added stmt->openCursor() (and att->openCursor() for unprepared statements) to create IResultSet. 4. Always use IMessageMetadata (former IParametersMetadata) to pass message fromat info from client, therefore avoiding need in BLR generation in client applications. Modified Paths: -------------- firebird/trunk/builds/posix/Makefile.in.plugins_examples firebird/trunk/lang_helpers/gds_codes.ftn firebird/trunk/lang_helpers/gds_codes.pas firebird/trunk/src/auth/SecureRemotePassword/Message.h firebird/trunk/src/auth/SecureRemotePassword/manage/SrpManagement.cpp firebird/trunk/src/auth/SecureRemotePassword/server/SrpServer.cpp firebird/trunk/src/common/StatementMetadata.cpp firebird/trunk/src/common/StatementMetadata.h firebird/trunk/src/common/classes/ImplementHelper.cpp firebird/trunk/src/common/classes/ImplementHelper.h firebird/trunk/src/common/classes/RefMutex.h firebird/trunk/src/common/classes/objects_array.h firebird/trunk/src/common/utils.cpp firebird/trunk/src/common/utils_proto.h firebird/trunk/src/dsql/DdlNodes.epp firebird/trunk/src/dsql/DdlNodes.h firebird/trunk/src/dsql/DsqlCompilerScratch.h firebird/trunk/src/dsql/Nodes.h firebird/trunk/src/dsql/StmtNodes.cpp firebird/trunk/src/dsql/dsql.cpp firebird/trunk/src/dsql/dsql.h firebird/trunk/src/dsql/dsql_proto.h firebird/trunk/src/include/firebird/ExternalEngine.h firebird/trunk/src/include/firebird/Provider.h firebird/trunk/src/include/gen/codetext.h firebird/trunk/src/include/gen/iberror.h firebird/trunk/src/include/gen/msgs.h firebird/trunk/src/include/gen/sql_code.h firebird/trunk/src/include/gen/sql_state.h firebird/trunk/src/include/types_pub.h firebird/trunk/src/jrd/Database.h firebird/trunk/src/jrd/EngineInterface.h firebird/trunk/src/jrd/ExtEngineManager.cpp firebird/trunk/src/jrd/ExtEngineManager.h firebird/trunk/src/jrd/PreparedStatement.cpp firebird/trunk/src/jrd/PreparedStatement.h firebird/trunk/src/jrd/ResultSet.cpp firebird/trunk/src/jrd/cch.cpp firebird/trunk/src/jrd/constants.h firebird/trunk/src/jrd/exe.h firebird/trunk/src/jrd/extds/InternalDS.cpp firebird/trunk/src/jrd/extds/InternalDS.h firebird/trunk/src/jrd/jrd.cpp firebird/trunk/src/jrd/met.epp firebird/trunk/src/jrd/par.cpp firebird/trunk/src/jrd/par_proto.h firebird/trunk/src/jrd/val.h firebird/trunk/src/msgs/facilities2.sql firebird/trunk/src/msgs/messages2.sql firebird/trunk/src/msgs/system_errors2.sql firebird/trunk/src/remote/client/interface.cpp firebird/trunk/src/remote/protocol.h firebird/trunk/src/remote/remote.h firebird/trunk/src/remote/server/server.cpp firebird/trunk/src/yvalve/YObjects.h firebird/trunk/src/yvalve/gds.cpp firebird/trunk/src/yvalve/why.cpp Added Paths: ----------- firebird/trunk/src/common/MsgMetadata.cpp firebird/trunk/src/common/MsgMetadata.h firebird/trunk/src/common/classes/BlrReader.h firebird/trunk/src/common/classes/BlrWriter.cpp firebird/trunk/src/common/classes/BlrWriter.h firebird/trunk/src/common/classes/InternalMessageBuffer.cpp firebird/trunk/src/common/classes/InternalMessageBuffer.h firebird/trunk/src/dsql/BlrDebugWriter.cpp firebird/trunk/src/dsql/BlrDebugWriter.h firebird/trunk/src/remote/client/BlrFromMessage.cpp firebird/trunk/src/remote/client/BlrFromMessage.h Removed Paths: ------------- firebird/trunk/src/dsql/BlrWriter.cpp firebird/trunk/src/dsql/BlrWriter.h firebird/trunk/src/jrd/BlrReader.h Modified: firebird/trunk/builds/posix/Makefile.in.plugins_examples =================================================================== --- firebird/trunk/builds/posix/Makefile.in.plugins_examples 2013-02-16 02:34:05 UTC (rev 57662) +++ firebird/trunk/builds/posix/Makefile.in.plugins_examples 2013-02-17 12:08:53 UTC (rev 57663) @@ -52,7 +52,8 @@ .PHONY: all udrcpp_example dc_example kh_example -all: udrcpp_example dc_example kh_example +#all: udrcpp_example dc_example kh_example +all: dc_example kh_example UDR_Objects = $(call makeObjects,../examples/udr,UdrCppExample.cpp) Modified: firebird/trunk/lang_helpers/gds_codes.ftn =================================================================== --- firebird/trunk/lang_helpers/gds_codes.ftn 2013-02-16 02:34:05 UTC (rev 57662) +++ firebird/trunk/lang_helpers/gds_codes.ftn 2013-02-17 12:08:53 UTC (rev 57663) @@ -1508,6 +1508,12 @@ PARAMETER (GDS__ee_blr_mismatch_names_count = 335545047) INTEGER*4 GDS__ee_blr_mismatch_name_not_found PARAMETER (GDS__ee_blr_mismatch_name_not_found = 335545048) + INTEGER*4 GDS__bad_result_set + PARAMETER (GDS__bad_result_set = 335545049) + INTEGER*4 GDS__wrong_message_length + PARAMETER (GDS__wrong_message_length = 335545050) + INTEGER*4 GDS__no_output_format + PARAMETER (GDS__no_output_format = 335545051) INTEGER*4 GDS__gfix_db_name PARAMETER (GDS__gfix_db_name = 335740929) INTEGER*4 GDS__gfix_invalid_sw Modified: firebird/trunk/lang_helpers/gds_codes.pas =================================================================== --- firebird/trunk/lang_helpers/gds_codes.pas 2013-02-16 02:34:05 UTC (rev 57662) +++ firebird/trunk/lang_helpers/gds_codes.pas 2013-02-17 12:08:53 UTC (rev 57663) @@ -761,6 +761,9 @@ gds_max_args_exceeded = 335545046; gds_ee_blr_mismatch_names_count = 335545047; gds_ee_blr_mismatch_name_not_found = 335545048; + gds_bad_result_set = 335545049; + gds_wrong_message_length = 335545050; + gds_no_output_format = 335545051; gds_gfix_db_name = 335740929; gds_gfix_invalid_sw = 335740930; gds_gfix_incmp_sw = 335740932; Modified: firebird/trunk/src/auth/SecureRemotePassword/Message.h =================================================================== --- firebird/trunk/src/auth/SecureRemotePassword/Message.h 2013-02-16 02:34:05 UTC (rev 57662) +++ firebird/trunk/src/auth/SecureRemotePassword/Message.h 2013-02-17 12:08:53 UTC (rev 57663) @@ -1,157 +1,265 @@ -#include "../jrd/align.h" #include "../common/classes/alloc.h" +#include "../common/classes/auto.h" +#include "../common/StatusHolder.h" +#include "../common/MsgMetadata.h" + +// This class helps to work with metadata iface +class Meta : public Firebird::RefPtr<Firebird::IMessageMetadata> +{ +public: + explicit Meta(Firebird::IStatement* stmt, bool out) + { + Firebird::LocalStatus s; + Firebird::IMessageMetadata* m = out ? stmt->getOutputMetadata(&s) : stmt->getInputMetadata(&s); + if (!s.isSuccess()) + { + Firebird::status_exception::raise(s.get()); + } + *((Firebird::RefPtr<Firebird::IMessageMetadata>*)this) = m; + m->release(); // reference added by function returning iface + } +}; + + // This class helps to fill FbMessage with correct values class Message : public Firebird::FbMessage, public Firebird::GlobalStorage { public: - Message() - : blrBuf(getPool()), dataBuf(getPool()) + Message(Firebird::IMessageMetadata* aMeta) + : dataBuf(getPool()), fieldCount(0) { - blrLength = 0; - blr = NULL; - bufferLength = 0; - buffer = NULL; + Firebird::LocalStatus st; + metadata = aMeta; + buffer = dataBuf.getBuffer(metadata->getMessageLength(&st)); + check(&st); + metadata->addRef(); + } - // start message BLR - blrBuf.add(blr_version5); - blrBuf.add(blr_begin); - blrBuf.add(blr_message); - blrBuf.add(0); - countOffset = blrBuf.getCount(); - blrBuf.add(0); - blrBuf.add(0); - - varCount = 0; + ~Message() + { + metadata->release(); } template <typename T> - unsigned genBlr() + static bool checkType(unsigned t, unsigned sz) { - // for special types call type-specific BLR generator - // for generic types use specialization of whole call - return T::genBlr(blrBuf); + return T::unknownDataType(); } template <typename T> - void add(unsigned& pos, unsigned& null) + unsigned add(unsigned& t, unsigned& sz) { - if (blr) - { - (Firebird::Arg::Gds(isc_random) << "This is already constructed message").raise(); - } + Firebird::LocalStatus st; - // generate code for variable - unsigned align = genBlr<T>(); - if (align) + unsigned l = metadata->getCount(&st); + check(&st); + if (fieldCount >= metadata->getMessageLength(&st)) { - bufferLength = FB_ALIGN(bufferLength, align); + (Firebird::Arg::Gds(isc_random) << + "Attempt to add to the message more variables then possible").raise(); } - pos = bufferLength; - bufferLength += sizeof(T); - // generate code for null flag - blrBuf.add(blr_short); - blrBuf.add(0); - align = type_alignments[dtype_short]; - if (align) + t = metadata->getType(&st, fieldCount); + check(&st); + sz = metadata->getLength(&st, fieldCount); + check(&st); + if (!checkType<T>(t, sz)) { - bufferLength = FB_ALIGN(bufferLength, align); + (Firebird::Arg::Gds(isc_random) << "Incompatible data type").raise(); } - null = bufferLength; - bufferLength += sizeof(short); - ++varCount; + return fieldCount++; } - void ready() + static void check(Firebird::IStatus* status) { - if (blr) - return; - - // Adjust number of variables - blrBuf[countOffset] = (varCount * 2) & 0xFF; - blrBuf[countOffset + 1] = ((varCount * 2) >> 8) & 0xFF; - - // Complete blr - blrBuf.add(blr_end); - blrBuf.add(blr_eoc); - blrLength = blrBuf.getCount(); - blr = blrBuf.begin(); - - // Allocate buffer - buffer = dataBuf.getBuffer(bufferLength); + if (!status->isSuccess()) + { + Firebird::status_exception::raise(status->get()); + } } - Firebird::UCharBuffer blrBuf, dataBuf; - unsigned countOffset, varCount; +private: + Firebird::UCharBuffer dataBuf; + unsigned fieldCount; }; template <> -unsigned Message::genBlr<SLONG>() +bool Message::checkType<SLONG>(unsigned t, unsigned sz) { - blrBuf.add(blr_long); - blrBuf.add(0); // scale - return type_alignments[dtype_long]; + return t == SQL_LONG && sz == sizeof(SLONG); } + // With template magic, we make the fields strongly-typed. -template <class T> +template <typename T> class Field { public: + class Null + { + public: + Null() + : ptr(NULL) + { } + + void linkMessage(short* p) + { + ptr = p; + *ptr = -1; // mark as null initially + } + + operator FB_BOOLEAN() const + { + return (*ptr) ? FB_TRUE : FB_FALSE; + } + + FB_BOOLEAN operator=(FB_BOOLEAN val) + { + *ptr = val ? -1 : 0; + return val; + } + + private: + short* ptr; + }; + explicit Field(Message& m) - : msg(m), pos(~0), nullPos(~0) + : ptr(NULL), type(0), size(0) { - msg.add<T>(pos, nullPos); + unsigned ind = m.add<T>(type, size); + + Firebird::LocalStatus st; + unsigned tmp = m.metadata->getOffset(&st, ind); + Message::check(&st); + ptr = (T*)(m.buffer + tmp); + + tmp = m.metadata->getNullOffset(&st, ind); + Message::check(&st); + null.linkMessage((short*)(m.buffer + tmp)); } - T& operator()() + operator T() { - msg.ready(); - return *(T*) (msg.buffer + pos); + return *ptr; } - short& null() + T operator= (T newVal) { - msg.ready(); - return *(short*) (msg.buffer + nullPos); + *ptr = newVal; + null = FB_FALSE; + return newVal; } -private: - Message& msg; - unsigned pos, nullPos; -}; + operator const char*() + { + if (!charBuffer) + { + charBuffer.reset(FB_NEW(*getDefaultMemoryPool()) char[size + 1]); + } -template <short N> -class VarChar -{ -public: - short len; - char data[N]; // This guarantees N > 0 + getStrValue(charBuffer); + return charBuffer; + } - static unsigned genBlr(Firebird::UCharBuffer& blr) + const char* operator= (const char* newVal) { - blr.add(blr_varying); - blr.add(N & 0xFF); - blr.add((N >> 8) & 0xFF); - return type_alignments[dtype_varying]; + setStrValue(newVal, strlen(newVal)); + null = FB_FALSE; + return newVal; } - const VarChar& operator=(const char* str) + void set(unsigned length, const void* newVal) { - strncpy(data, str, N); - len = strlen(str); - if (len > N) - len = N; - return *this; + setStrValue(newVal, length); + null = FB_FALSE; } - void set(unsigned short l, void* bytes) +private: + void getStrValue(char* to) { - if (l > (unsigned short) N) - l = N; - memcpy(data, bytes, l); - len = l; + T::incompatibleDataType(); + //(Firebird::Arg::Gds(isc_random) << "Incompatible data type").raise(); } + + void setStrValue(const void* from, unsigned len) + { + T::incompatibleDataType(); + //(Firebird::Arg::Gds(isc_random) << "Incompatible data type").raise(); + } + + T* ptr; + Firebird::AutoPtr<char, Firebird::ArrayDelete<char> > charBuffer; + +public: + Null null; + unsigned type, size; }; + +struct Varying +{ + short len; + char data[1]; +}; + +template <> +bool Message::checkType<Varying>(unsigned t, unsigned /*sz*/) +{ + return t == SQL_VARYING; +} + +template<> +void Field<Varying>::getStrValue(char* to) +{ + unsigned len = ptr->len; + if (len > size) + len = size; + memcpy(to, ptr->data, len); + to[len] = 0; +} + +template<> +void Field<Varying>::setStrValue(const void* from, unsigned len) +{ + if (len > size) + len = size; + memcpy(ptr->data, from, len); + ptr->len = len; +} + +struct Text +{ + char data[1]; +}; + +template <> +bool Message::checkType<Text>(unsigned t, unsigned /*sz*/) +{ + return t == SQL_TEXT; +} + +template<> +void Field<Text>::getStrValue(char* to) +{ + memcpy(to, ptr->data, size); + to[size] = 0; + unsigned len = size; + while(len--) + { + if (to[len] == ' ') + to[len] = 0; + else + break; + } +} + +template<> +void Field<Text>::setStrValue(const void* from, unsigned len) +{ + if (len > size) + len = size; + memcpy(ptr->data, from, len); + if (len < size) + memset(&ptr->data[len], ' ', size - len); +} Modified: firebird/trunk/src/auth/SecureRemotePassword/manage/SrpManagement.cpp =================================================================== --- firebird/trunk/src/auth/SecureRemotePassword/manage/SrpManagement.cpp 2013-02-16 02:34:05 UTC (rev 57662) +++ firebird/trunk/src/auth/SecureRemotePassword/manage/SrpManagement.cpp 2013-02-17 12:08:53 UTC (rev 57663) @@ -44,60 +44,64 @@ const unsigned int SZ_LOGIN = 31; const unsigned int SZ_NAME = 31; +typedef Field<Varying> Varfield; +typedef Field<Text> Name; -template <short N> -void setField(Field<VarChar<N> >& to, Auth::ICharUserField* from) +void setField(Name& to, Auth::ICharUserField* from) { if (from->entered()) { - to() = from->get(); - to.null() = 0; + to = from->get(); } else { - to.null() = -1; + to.null = FB_TRUE; } } -// Domains -typedef Field<VarChar<SZ_LOGIN> > Login; -typedef Field<VarChar<Auth::RemotePassword::SRP_VERIFIER_SIZE> > Verifier; -typedef Field<VarChar<Auth::RemotePassword::SRP_SALT_SIZE> > Salt; -typedef Field<VarChar<SZ_NAME> > Name; -void allocField(Firebird::AutoPtr<Name>& field, Message& up, Auth::ICharUserField* value, Firebird::string& update, const char* name) +void allocField(Auth::ICharUserField* value, Firebird::string& update, const char* name) { if (value->entered() || value->specified()) { - field = new Name(up); update += ' '; update += name; update += "=?,"; } } +void allocField(Firebird::AutoPtr<Name>& field, Message& up, Auth::ICharUserField* value, const char* name) +{ + if (value->entered() || value->specified()) + { + field = new Name(up); + } +} + void assignField(Firebird::AutoPtr<Name>& field, Auth::ICharUserField* name) { if (field.hasData()) { if (name->entered()) { - (*field)() = name->get(); - field->null() = 0; + *field = name->get(); + field->null = FB_FALSE; } else { fb_assert(name->specified()); - field->null() = -1; + field->null = FB_TRUE; } } } -template <short N> -void listField(Auth::ICharUserField* to, Field<VarChar<N> >& from) +void listField(Auth::ICharUserField* to, Name& from) { - to->set(from().data); - to->setEntered(from.null() == 0 ? 1 : 0); + to->setEntered(from.null ? 0 : 1); + if (!from.null) + { + to->set(from); + } } } @@ -137,27 +141,18 @@ Firebird::LocalStatus s; Firebird::RefPtr<Firebird::ITransaction> ddlTran(att->startTransaction(&s, 0, NULL)); - if (!s.isSuccess()) - { - Firebird::status_exception::raise(s.get()); - } + try { for (const char** sql = script; *sql; ++sql) { - att->execute(&s, ddlTran, 0, *sql, 3, 0, NULL, NULL); - if (!s.isSuccess()) - { - Firebird::status_exception::raise(s.get()); - } + att->execute(&s, ddlTran, 0, *sql, 3, NULL, NULL); + check(&s); } ddlTran->commit(&s); - if (!s.isSuccess()) - { - Firebird::status_exception::raise(s.get()); - } + check(&s); } catch (const Firebird::Exception&) { @@ -218,16 +213,10 @@ Firebird::DispatcherPtr p; att = p->attachDatabase(status, secDbName, dpb.getBufferLength(), dpb.getBuffer()); - if (!status->isSuccess()) - { - Firebird::status_exception::raise(status->get()); - } + check(status); tra = att->startTransaction(status, 0, NULL); - if (!status->isSuccess()) - { - Firebird::status_exception::raise(status->get()); - } + check(status); } catch (const Firebird::Exception& ex) { @@ -266,11 +255,8 @@ Firebird::string sql; sql.printf("ALTER ROLE RDB$ADMIN %s AUTO ADMIN MAPPING", user->operation() == MAP_SET_OPER ? "SET" : "DROP"); - att->execute(status, tra, sql.length(), sql.c_str(), 3, 0, NULL, NULL); - if (!status->isSuccess()) - { - Firebird::status_exception::raise(status->get()); - } + att->execute(status, tra, sql.length(), sql.c_str(), 3, NULL, NULL); + check(status); } break; @@ -280,166 +266,211 @@ "INSERT INTO plg$srp_view(PLG$USER_NAME, PLG$VERIFIER, PLG$SALT, PLG$FIRST, PLG$MIDDLE, PLG$LAST) " "VALUES(?, ?, ?, ?, ?, ?)"; - Message add; - Login login(add); - Verifier verifier(add); - Salt slt(add); - Name first(add), middle(add), last(add); + Firebird::IStatement* stmt = NULL; + try + { + for (unsigned repeat = 0; ; ++repeat) + { + stmt = att->prepare(status, tra, 0, insert, 3, Firebird::IStatement::PREPARE_PREFETCH_METADATA); + if (status->isSuccess()) + { + break; + } + else if (repeat > 0) + { + Firebird::status_exception::raise(status->get()); + } - setField(login, user->userName()); - setField(first, user->firstName()); - setField(middle, user->middleName()); - setField(last, user->lastName()); + const ISC_STATUS* v = status->get(); + while (v[0] == isc_arg_gds) + { + if (v[1] == isc_dsql_relation_err) + { + prepareDataStructures(); + tra->commit(status); + check(status); + tra = att->startTransaction(status, 0, NULL); + check(status); + break; + } + do + { + v += 2; + } while (v[0] != isc_arg_warning && v[0] != isc_arg_gds && v[0] != isc_arg_end); + } + } + fb_assert(stmt); + + Meta im(stmt, false); + Message add(im); + Name login(add); + Varfield verifier(add), slt(add); + Name first(add), middle(add), last(add); + + setField(login, user->userName()); + setField(first, user->firstName()); + setField(middle, user->middleName()); + setField(last, user->lastName()); + #if SRP_DEBUG > 1 - Firebird::BigInteger salt("02E268803000000079A478A700000002D1A6979000000026E1601C000000054F"); + Firebird::BigInteger salt("02E268803000000079A478A700000002D1A6979000000026E1601C000000054F"); #else - Firebird::BigInteger salt; - salt.random(RemotePassword::SRP_SALT_SIZE); + Firebird::BigInteger salt; + salt.random(RemotePassword::SRP_SALT_SIZE); #endif - Firebird::UCharBuffer s; - salt.getBytes(s); - slt().set(s.getCount(), s.begin()); - slt.null() = 0; + Firebird::UCharBuffer s; + salt.getBytes(s); + slt.set(s.getCount(), s.begin()); - dumpIt("salt", s); + dumpIt("salt", s); #if SRP_DEBUG > 0 - fprintf(stderr, ">%s< >%s<\n", user->userName()->get(), user->password()->get()); + fprintf(stderr, ">%s< >%s<\n", user->userName()->get(), user->password()->get()); #endif - Firebird::string s1; - salt.getText(s1); - server.computeVerifier(user->userName()->get(), s1, user->password()->get()).getBytes(s); - dumpIt("verifier", s); - verifier().set(s.getCount(), s.begin()); - verifier.null() = 0; + Firebird::string s1; + salt.getText(s1); + server.computeVerifier(user->userName()->get(), s1, user->password()->get()).getBytes(s); + dumpIt("verifier", s); + verifier.set(s.getCount(), s.begin()); - for (unsigned repeat = 0; ; ++repeat) + stmt->execute(status, tra, &add, NULL); + check(status); + + stmt->free(status); + check(status); + } + catch (const Firebird::Exception&) { - att->execute(status, tra, 0, insert, 3, 0, &add, NULL); - if (status->isSuccess() || repeat > 0) + if (stmt) { - break; + stmt->release(); } - - const ISC_STATUS* v = status->get(); - while (v[0] == isc_arg_gds) - { - if (v[1] == isc_dsql_relation_err) - { - prepareDataStructures(); - tra->commit(status); - if (!status->isSuccess()) - { - Firebird::status_exception::raise(status->get()); - } - tra = att->startTransaction(status, 0, NULL); - if (!status->isSuccess()) - { - Firebird::status_exception::raise(status->get()); - } - break; - } - do - { - v += 2; - } while (v[0] != isc_arg_warning && v[0] != isc_arg_gds && v[0] != isc_arg_end); - } + throw; } - if (!status->isSuccess()) - { - Firebird::status_exception::raise(status->get()); - } } break; case MOD_OPER: { - Message up; - Firebird::string update = "UPDATE plg$srp_view SET "; - Firebird::AutoPtr<Verifier> verifier; - Firebird::AutoPtr<Salt> slt; + Firebird::AutoPtr<Varfield> verifier, slt; if (user->password()->entered()) { - verifier = new Verifier(up); - slt = new Salt(up); update += "PLG$VERIFIER=?,PLG$SALT=?,"; } Firebird::AutoPtr<Name> first, middle, last; - allocField(first, up, user->firstName(), update, "PLG$FIRST"); - allocField(middle, up, user->middleName(), update, "PLG$MIDDLE"); - allocField(last, up, user->lastName(), update, "PLG$LAST"); + allocField(user->firstName(), update, "PLG$FIRST"); + allocField(user->middleName(), update, "PLG$MIDDLE"); + allocField(user->lastName(), update, "PLG$LAST"); if (update[update.length() - 1] != ',') { return 0; } update.rtrim(","); - update += " WHERE PLG$USER_NAME=?"; - Login login(up); - if (verifier.hasData()) + Firebird::IStatement* stmt = NULL; + try { + stmt = att->prepare(status, tra, 0, update.c_str(), 3, Firebird::IStatement::PREPARE_PREFETCH_METADATA); + check(status); + + Meta im(stmt, false); + Message up(im); + + if (user->password()->entered()) + { + verifier = new Varfield(up); + slt = new Varfield(up); #if SRP_DEBUG > 1 - Firebird::BigInteger salt("02E268803000000079A478A700000002D1A6979000000026E1601C000000054F"); + Firebird::BigInteger salt("02E268803000000079A478A700000002D1A6979000000026E1601C000000054F"); #else - Firebird::BigInteger salt; - salt.random(RemotePassword::SRP_SALT_SIZE); + Firebird::BigInteger salt; + salt.random(RemotePassword::SRP_SALT_SIZE); #endif - Firebird::UCharBuffer s; - salt.getBytes(s); - (*slt)().set(s.getCount(), s.begin()); - slt->null() = 0; + Firebird::UCharBuffer s; + salt.getBytes(s); + slt->set(s.getCount(), s.begin()); - dumpIt("salt", s); + dumpIt("salt", s); #if SRP_DEBUG > 0 - fprintf(stderr, ">%s< >%s<\n", user->userName()->get(), user->password()->get()); + fprintf(stderr, ">%s< >%s<\n", user->userName()->get(), user->password()->get()); #endif - Firebird::string s1; - salt.getText(s1); - server.computeVerifier(user->userName()->get(), s1, user->password()->get()).getBytes(s); - dumpIt("verifier", s); - (*verifier)().set(s.getCount(), s.begin()); - verifier->null() = 0; - } + Firebird::string s1; + salt.getText(s1); + server.computeVerifier(user->userName()->get(), s1, user->password()->get()).getBytes(s); + dumpIt("verifier", s); + verifier->set(s.getCount(), s.begin()); + } - assignField(first, user->firstName()); - assignField(middle, user->middleName()); - assignField(last, user->lastName()); - setField(login, user->userName()); + allocField(first, up, user->firstName(), "PLG$FIRST"); + allocField(middle, up, user->middleName(), "PLG$MIDDLE"); + allocField(last, up, user->lastName(), "PLG$LAST"); - att->execute(status, tra, 0, update.c_str(), 3, 0, &up, NULL); - if (!status->isSuccess()) - { - Firebird::status_exception::raise(status->get()); + Name login(up); + + assignField(first, user->firstName()); + assignField(middle, user->middleName()); + assignField(last, user->lastName()); + setField(login, user->userName()); + + stmt->execute(status, tra, &up, NULL); + check(status); + + if (!checkCount(status, &upCount, isc_info_update_count)) + { + return -1; + } + + stmt->free(status); + check(status); } - - if (!checkCount(status, &upCount, isc_info_update_count)) + catch (const Firebird::Exception&) { - return -1; + if (stmt) + { + stmt->release(); + } + throw; } } break; case DEL_OPER: { - Message dl; const char* del = "DELETE FROM plg$srp_view WHERE PLG$USER_NAME=?"; - Login login(dl); - setField(login, user->userName()); + Firebird::IStatement* stmt = NULL; + try + { + stmt = att->prepare(status, tra, 0, del, 3, Firebird::IStatement::PREPARE_PREFETCH_METADATA); + check(status); - att->execute(status, tra, 0, del, 3, 0, &dl, NULL); - if (!status->isSuccess()) - { - Firebird::status_exception::raise(status->get()); + Meta im(stmt, false); + Message dl(im); + Name login(dl); + setField(login, user->userName()); + + stmt->execute(status, tra, &dl, NULL); + check(status); + + if (!checkCount(status, &delCount, isc_info_delete_count)) + { + return -1; + } + + stmt->free(status); + check(status); } - - if (!checkCount(status, &delCount, isc_info_delete_count)) + catch (const Firebird::Exception&) { - return -1; + if (stmt) + { + stmt->release(); + } + throw; } } break; @@ -452,75 +483,62 @@ user->groupName()->setEntered(0); user->password()->setEntered(0); - Message di; Firebird::string disp = "SELECT PLG$USER_NAME, PLG$FIRST, PLG$MIDDLE, PLG$LAST, " " CASE WHEN RDB$RELATION_NAME IS NULL THEN 0 ELSE 1 END " "FROM PLG$SRP_VIEW LEFT JOIN RDB$USER_PRIVILEGES " " ON PLG$SRP_VIEW.PLG$USER_NAME = RDB$USER_PRIVILEGES.RDB$USER " " AND RDB$RELATION_NAME = 'RDB$ADMIN' " " AND RDB$PRIVILEGE = 'M' "; - Firebird::AutoPtr<Message> par; if (user->userName()->entered()) { - par = new Message; - Login login(*par); - setField(login, user->userName()); disp += " WHERE PLG$USER_NAME = ?"; } - Login login(di); - Name first(di), middle(di), last(di); - Field<SLONG> admin(di); - di.ready(); - - Firebird::RefPtr<Firebird::IStatement> stmt; + Firebird::IStatement* stmt = NULL; + Firebird::IResultSet* rs = NULL; try { - stmt = att->allocateStatement(status); - if (!status->isSuccess()) + stmt = att->prepare(status, tra, 0, disp.c_str(), 3, Firebird::IStatement::PREPARE_PREFETCH_METADATA); + check(status); + + Meta om(stmt, true); + Message di(om); + Name login(di); + Name first(di), middle(di), last(di); + Field<SLONG> admin(di); + + Firebird::AutoPtr<Message> par; + if (user->userName()->entered()) { - Firebird::status_exception::raise(status->get()); + Meta im(stmt, false); + par = new Message(im); + Name login(*par); + setField(login, user->userName()); } - stmt->prepare(status, tra, disp.length(), disp.c_str(), 3, - Firebird::IStatement::PREPARE_PREFETCH_NONE); - if (!status->isSuccess()) + + rs = stmt->openCursor(status, tra, par, om); + check(status); + + while (rs->fetch(status, di.buffer)) { - Firebird::status_exception::raise(status->get()); - } - stmt->execute(status, tra, 0, par, NULL); - if (!status->isSuccess()) - { - Firebird::status_exception::raise(status->get()); - } - while (stmt->fetch(status, &di) == 0) - { - if (!status->isSuccess()) - { - Firebird::status_exception::raise(status->get()); - } + check(status); listField(user->userName(), login); listField(user->firstName(), first); listField(user->middleName(), middle); listField(user->lastName(), last); - user->admin()->set(admin()); + user->admin()->set(admin); callback->list(user); } - if (!status->isSuccess()) - { - Firebird::status_exception::raise(status->get()); - } + check(status); - stmt->free(status, DSQL_drop); - if (!status->isSuccess()) - { - Firebird::status_exception::raise(status->get()); - } + stmt->free(status); + check(status); } catch (const Firebird::Exception&) { - if (stmt.hasData()) + if (stmt) { stmt->release(); } @@ -609,10 +627,7 @@ { unsigned char buffer[100]; att->getInfo(status, 1, &item, sizeof(buffer), buffer); - if (!status->isSuccess()) - { - Firebird::status_exception::raise(status->get()); - } + check(status); if (gds__vax_integer(buffer + 1, 2) != 6) { @@ -624,6 +639,14 @@ *count = newCount; return newCount == oldCount + 1; } + + void check(Firebird::IStatus* status) + { + if (!status->isSuccess()) + { + Firebird::status_exception::raise(status->get()); + } + } }; // register plugin Modified: firebird/trunk/src/auth/SecureRemotePassword/server/SrpServer.cpp =================================================================== --- firebird/trunk/src/auth/SecureRemotePassword/server/SrpServer.cpp 2013-02-16 02:34:05 UTC (rev 57662) +++ firebird/trunk/src/auth/SecureRemotePassword/server/SrpServer.cpp 2013-02-17 12:08:53 UTC (rev 57663) @@ -147,15 +147,8 @@ } HANDSHAKE_DEBUG(fprintf(stderr, "Srv SRP1: started transaction\n")); - stmt = att->allocateStatement(status); - if (!status->isSuccess()) - { - status_exception::raise(status->get()); - } - const char* sql = "SELECT PLG$VERIFIER, PLG$SALT FROM PLG$SRP WHERE PLG$USER_NAME = ?"; - stmt->prepare(status, tra, 0, sql, 3, 0); - + stmt = att->prepare(status, tra, 0, sql, 3, IStatement::PREPARE_PREFETCH_METADATA); if (!status->isSuccess()) { const ISC_STATUS* v = status->get(); @@ -176,25 +169,29 @@ status_exception::raise(status->get()); } - Message par; - Field<VarChar<SZ_LOGIN> > login(par); - login() = account.c_str(); - login.null() = 0; + Meta im(stmt, false); + Message par(im); + Field<Text> login(par); + login = account.c_str(); + + Meta om(stmt, true); + Message dat(om); + if (!status->isSuccess()) + { + status_exception::raise(status->get()); + } + Field<Varying> verify(dat); + Field<Varying> slt(dat); HANDSHAKE_DEBUG(fprintf(stderr, "Srv SRP1: Ready to run statement with login '%s'\n", account.c_str())); - Message dat; - Field <VarChar<RemotePassword::SRP_VERIFIER_SIZE> > verify(dat); - Field <VarChar<RemotePassword::SRP_SALT_SIZE> > slt(dat); - dat.ready(); - - stmt->execute(status, tra, 0, &par, &dat); + stmt->execute(status, tra, &par, &dat); if (!status->isSuccess()) { status_exception::raise(status->get()); } HANDSHAKE_DEBUG(fprintf(stderr, "Srv SRP1: Executed statement\n")); - stmt->free(status, DSQL_drop); + stmt->free(status); if (!status->isSuccess()) { status_exception::raise(status->get()); @@ -208,7 +205,7 @@ } tra = NULL; - att->detach(status); // It will close statement + att->detach(status); if (!status->isSuccess()) { status_exception::raise(status->get()); @@ -217,10 +214,10 @@ server = new RemotePassword; - verifier.assign(reinterpret_cast<UCHAR*>(verify().data), RemotePassword::SRP_VERIFIER_SIZE); + verifier.assign(reinterpret_cast<const UCHAR*>((const char*)verify), RemotePassword::SRP_VERIFIER_SIZE); dumpIt("Srv: verifier", verifier); UCharBuffer s; - s.assign(reinterpret_cast<UCHAR*>(slt().data), RemotePassword::SRP_SALT_SIZE); + s.assign(reinterpret_cast<const UCHAR*>((const char*)slt), RemotePassword::SRP_SALT_SIZE); BigInteger(s).getText(salt); dumpIt("Srv: salt", salt); server->genServerKey(serverPubKey, verifier); @@ -277,7 +274,7 @@ { if (stmt) { - stmt->free(status, DSQL_drop); + stmt->free(status); } if (tra) { Added: firebird/trunk/src/common/MsgMetadata.cpp =================================================================== --- firebird/trunk/src/common/MsgMetadata.cpp (rev 0) +++ firebird/trunk/src/common/MsgMetadata.cpp 2013-02-17 12:08:53 UTC (rev 57663) @@ -0,0 +1,153 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl. + * + * Software distributed under the License is distributed AS IS, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. + * See the License for the specific language governing rights + * and limitations under the License. + * + * The Original Code was created by Adriano dos Santos Fernandes + * for the Firebird Open Source RDBMS project. + * + * Copyright (c) 2011 Adriano dos Santos Fernandes <adrianosf at gmail.com> + * and all contributors signed below. + * + * All Rights Reserved. + * Contributor(s): ______________________________________. + * Alex Peshkoff + * + */ + +#include "firebird.h" +#include "../common/MsgMetadata.h" +#include "../common/utils_proto.h" + +using namespace Firebird; + +namespace { + +class CoerceMetadata : public RefCntIface<ICoerceMetadata, FB_COERCE_METADATA_VERSION> +{ +public: + CoerceMetadata(const MsgMetadata* from) + : msgMetadata(new MsgMetadata) + { + msgMetadata->items = from->items; + } + + virtual int FB_CARG release() + { + if (--refCounter != 0) + { + return 1; + } + + delete this; + return 0; + } + + // ICoerceMetadata implementation + virtual void FB_CARG setType(IStatus* status, unsigned index, unsigned type) + { + MutexLockGuard g(mtx, FB_FUNCTION); + + if (!indexError(status, index, "setType")) + msgMetadata->items[index].type = type; + } + + virtual void FB_CARG setSubType(IStatus* status, unsigned index, unsigned subType) + { + MutexLockGuard g(mtx, FB_FUNCTION); + + if (!indexError(status, index, "setSubType")) + msgMetadata->items[index].subType = subType; + } + + virtual void FB_CARG setLength(IStatus* status, unsigned index, unsigned length) + { + MutexLockGuard g(mtx, FB_FUNCTION); + + if (!indexError(status, index, "setLength")) + msgMetadata->items[index].length = length; + } + + virtual void FB_CARG setScale(IStatus* status, unsigned index, unsigned scale) + { + MutexLockGuard g(mtx, FB_FUNCTION); + + if (!indexError(status, index, "setScale")) + msgMetadata->items[index].scale = scale; + } + + virtual IMessageMetadata* FB_CARG getMetadata(IStatus* status) + { + MutexLockGuard g(mtx, FB_FUNCTION); + + msgMetadata->makeOffsets(); + IMessageMetadata* rc = msgMetadata; + rc->addRef(); + msgMetadata = NULL; + return rc; + } + +private: + RefPtr<MsgMetadata> msgMetadata; + Mutex mtx; + + bool indexError(IStatus* status, unsigned index, const char* functionName) + { + if (!msgMetadata) + { + status->set((Arg::Gds(isc_random) << + (string("Coerce interface is already inactive: ICoerceMetadata::") + functionName)).value()); + return true; + } + + if (index < msgMetadata->items.getCount()) + { + status->set((Arg::Gds(isc_invalid_index_val) << + Arg::Num(index) << (string("ICoerceMetadata::") + functionName)).value()); + return true; + } + + return false; + } +}; + +} // namespace anonymous + + +namespace Firebird { + + +void MsgMetadata::makeOffsets() +{ + length = 0; + + for (unsigned n = 0; n < items.getCount(); ++n) + { + Item* param = &items[n]; + if (!param->finished) + { + length = 0; + return; + } + length = fb_utils::sqlTypeToDsc(length, param->type, param->length, + NULL /*dtype*/, NULL /*length*/, ¶m->offset, ¶m->nullInd); + } +} + + +ICoerceMetadata* MsgMetadata::coerce(IStatus* status) const +{ + ICoerceMetadata* rc = new CoerceMetadata(this); + rc->addRef(); + return rc; +} + + +} // namespace Firebird Property changes on: firebird/trunk/src/common/MsgMetadata.cpp ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/x-c++src \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: firebird/trunk/src/common/MsgMetadata.h =================================================================== --- firebird/trunk/src/common/MsgMetadata.h (rev 0) +++ firebird/trunk/src/common/MsgMetadata.h 2013-02-17 12:08:53 UTC (rev 57663) @@ -0,0 +1,247 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl. + * + * Software distributed under the License is distributed AS IS, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. + * See the License for the specific language governing rights + * and limitations under the License. + * + * The Original Code was created by Adriano dos Santos Fernandes + * for the Firebird Open Source RDBMS project. + * + * Copyright (c) 2011 Adriano dos Santos Fernandes <adrianosf at gmail.com> + * and all contributors signed below. + * + * All Rights Reserved. + * Contributor(s): ______________________________________. + * Alex Peshkov + * + */ + +#ifndef COMMON_MSG_METADATA_H +#define COMMON_MSG_METADATA_H + +#include "firebird/Provider.h" +#include "iberror.h" +#include "../common/classes/fb_string.h" +#include "../common/classes/objects_array.h" +#include "../common/classes/ImplementHelper.h" + +namespace Firebird { + + +class MsgMetadata : public RefCntIface<IMessageMetadata, FB_MESSAGE_METADATA_VERSION> +{ +public: + struct Item + { + explicit Item(MemoryPool& pool) + : field(pool), + relation(pool), + owner(pool), + alias(pool), + type(0), + subType(0), + length(0), + scale(0), + charset(0), + offset(0), + nullInd(0), + nullable(false), + finished(false) + { + } + + Item(MemoryPool& pool, const Item& v) + : field(pool, v.field), + relation(pool, v.relation), + owner(pool, v.owner), + alias(pool, v.alias), + type(v.type), + subType(v.subType), + length(v.length), + scale(v.scale), + charset(v.charset), + offset(v.offset), + nullInd(v.nullInd), + nullable(v.nullable), + finished(v.finished) + { + } + + string field; + string relation; + string owner; + string alias; + unsigned type; + unsigned subType; + unsigned length; + unsigned scale; + unsigned charset; + unsigned offset; + unsigned nullInd; + bool nullable; + bool finished; + }; + +public: + MsgMetadata() + : items(getPool()), + length(0) + { + } + + virtual int FB_CARG release() + { + if (--refCounter != 0) + { + return 1; + } + + delete this; + return 0; + } + + virtual unsigned FB_CARG getCount(IStatus* /*status*/) const + { + return (unsigned) items.getCount(); + } + + virtual const char* FB_CARG getField(IStatus* status, unsigned index) const + { + if (index < items.getCount()) + return items[index].field.c_str(); + + raiseIndexError(status, index, "getField"); + return NULL; + } + + virtual const char* FB_CARG getRelation(IStatus* status, unsigned index) const + { + if (index < items.getCount()) + return items[index].relation.c_str(); + + raiseIndexError(status, index, "getRelation"); + return NULL; + } + + virtual const char* FB_CARG getOwner(IStatus* status, unsigned index) const + { + if (index < items.getCount()) + return items[index].owner.c_str(); + + raiseIndexError(status, index, "getOwner"); + return NULL; + } + + virtual const char* FB_CARG getAlias(IStatus* status, unsigned index) const + { + if (index < items.getCount()) + return items[index].alias.c_str(); + + raiseIndexError(status, index, "getAlias"); + return NULL; + } + + virtual unsigned FB_CARG getType(IStatus* status, unsigned index) const + { + if (index < items.getCount()) + return items[index].type; + + raiseIndexError(status, index, "getType"); + return 0; + } + + virtual FB_BOOLEAN FB_CARG isNullable(IStatus* status, unsigned index) const + { + if (index < items.getCount()) + return items[index].nullable; + + raiseIndexError(status, index, "isNullable"); + return false; + } + + virtual unsigned FB_CARG getSubType(IStatus* status, unsigned index) const + { + if (index < items.getCount()) + return items[index].subType; + + raiseIndexError(status, index, "getSubType"); + return 0; + } + + virtual unsigned FB_CARG getLength(IStatus* status, unsigned index) const + { + if (index < items.getCount()) + return items[index].length; + + raiseIndexError(status, index, "getLength"); + return 0; + } + + virtual unsigned FB_CARG getScale(IStatus* status, unsigned index) const + { + if (index < items.getCount()) + return items[index].scale; + + raiseIndexError(status, index, "getScale"); + return 0; + } + + virtual unsigned FB_CARG getCharset(IStatus* status, unsigned index) const + { + if (index < items.getCount()) + return items[index].charset; + + raiseIndexError(status, index, "getCharset"); + return 0; + } + + virtual unsigned FB_CARG getOffset(IStatus* status, unsigned index) const + { + if (index < items.getCount()) + return items[index].offset; + + raiseIndexError(status, index, "getOffset"); + return 0; + } + + virtual unsigned FB_CARG getNullOffset(IStatus* status, unsigned index) const + { + if (index < items.getCount()) + return items[index].nullInd; + + raiseIndexError(status, index, "getOffset"); + return 0; + } + + virtual ICoerceMetadata* FB_CARG coerce(IStatus* status) const; + + virtual unsigned FB_CARG getMessageLength(IStatus* /*status*/) const + { + return length; + } + +public: + void makeOffsets(); + +private: + void raiseIndexError(IStatus* status, unsigned index, const char* method) const + { + status->set((Arg::Gds(isc_invalid_index_val) << + Arg::Num(index) << (string("IMessageMetadata::") + method)).value()); + } + +public: + ObjectsArray<Item> items; + unsigned length; +}; + + +} // namespace Firebird + +#endif // COMMON_MSG_METADATA_H Property changes on: firebird/trunk/src/common/MsgMetadata.h ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/x-chdr \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Modified: firebird/trunk/src/common/StatementMetadata.cpp =================================================================== --- firebird/trunk/src/common/StatementMetadata.cpp 2013-02-16 02:34:05 UTC (rev 57662) +++ firebird/trunk/src/common/StatementMetadata.cpp 2013-02-17 12:08:53 UTC (rev 57663) @@ -18,14 +18,18 @@ * * All Rights Reserved. * Contributor(s): ______________________________________. + * Alex Peshkoff * */ + +#include "firebird.h" #include "../common/StatementMetadata.h" #include "memory_routines.h" #include "../common/StatusHolder.h" #include "../jrd/inf_pub.h" #include "../yvalve/gds_proto.h" +#include "../common/utils_proto.h" namespace Firebird { @@ -151,21 +155,23 @@ } // Get statement input parameters. -const IParametersMetadata* StatementMetadata::getInputParameters() +IMessageMetadata* StatementMetadata::getInputMetadata() { - if (!inputParameters.fetched) - fetchParameters(isc_info_sql_bind, &inputParameters); + if (!inputParameters->fetched) + fetchParameters(isc_info_sql_bind, inputParameters); - return &inputParameters; + inputParameters->addRef(); + return inputParameters; } // Get statement output parameters. -const IParametersMetadata* StatementMetadata::getOutputParameters() +IMessageMetadata* StatementMetadata::getOutputMetadata() { - if (!outputParameters.fetched) - fetchParameters(isc_info_sql_select, &outputParameters); + if (!outputParameters->fetched) + fetchParameters(isc_info_sql_select, outputParameters); - return &outputParameters; + outputParameters->addRef(); + return outputParameters; } // Get number of records affected by the statement execution. @@ -201,9 +207,9 @@ { type.specified = false; legacyPlan = detailedPlan = ""; - inputParameters.items.clear(); - outputParameters.items.clear(); - inputParameters.fetched = outputParameters.fetched = false; + inputParameters->items.clear(); + outputParameters->items.clear(); + inputParameters->fetched = outputParameters->fetched = false; } // Parse an info response buffer. @@ -231,11 +237,11 @@ } case isc_info_sql_select: - parameters = &outputParameters; + parameters = outputParameters; break; case isc_info_sql_bind: - parameters = &inputParameters; + parameters = inputParameters; break; case isc_info_sql_num_variables: @@ -323,6 +329,26 @@ } } + if (parameters->fetched) + { + unsigned off = 0; + for (unsigned n = 0; n < parameters->items.getCount(); ++n) + { + Parameters::Item* param = ¶meters->items[n]; + if (!param->finished) + { + parameters->fetched = false; + break; + } + off = fb_utils::sqlTypeToDsc(off, param->type, param->length, + NULL /*dtype*/, NULL /*length*/, ¶m->offset, ¶m->nullInd); + } + if (parameters->fetched) + { + parameters->length = off; + } + } + break; } @@ -340,18 +366,18 @@ // or we'll need extra info calls (done by methods of this class) to parse only the info we // can understand. - for (ObjectsArray<Parameters::Item>::iterator i = inputParameters.items.begin(); - i != inputParameters.items.end() && inputParameters.fetched; + for (ObjectsArray<Parameters::Item>::iterator i = inputParameters->items.begin(); + i != inputParameters->items.end() && inputParameters->fetched; ++i) { - inputParameters.fetched = i->finished; + inputParameters->fetched = i->finished; } - for (ObjectsArray<Parameters::Item>::iterator i = outputParameters.items.begin(); - i != outputParameters.items.end() && outputParameters.fetched; + for (ObjectsArray<Parameters::Item>::iterator i = outputParameters->items.begin(); + i != outputParameters->items.end() && outputParameters->fetched; ++i) { - outputParameters.fetched = i->finished; + outputParameters->fetched = i->finished; } } Modified: firebird/trunk/src/common/StatementMetadata.h =================================================================== --- firebird/trunk/src/common/StatementMetadata.h 2013-02-16 02:34:05 UTC (rev 57662) +++ firebird/trunk/src/common/StatementMetadata.h 2013-02-17 12:08:53 UTC (rev 57663) @@ -18,6 +18,7 @@ * * All Rights Reserved. * Contributor(s): ______________________________________. + * Alex Peshkov * */ @@ -30,7 +31,7 @@ #include "../common/classes/array.h" #include "../common/classes/fb_string.h" #include "../common/classes/objects_array.h" -#include "../common/classes/ImplementHelper.h" +#include "../common/MsgMetadata.h" namespace Firebird { @@ -39,153 +40,23 @@ class StatementMetadata : public PermanentStorage { public: - class Parameters : public VersionedIface<IParametersMetadata, FB_PARAMETERS_METADATA_VERSION>, - public PermanentStorage + class Parameters : public MsgMetadata { public: - struct Item : public PermanentStorage - { - explicit Item(MemoryPool& pool) - : PermanentStorage(pool), - field(pool), - relation(pool), - owner(pool), - alias(pool), - type(0), - subType(0), - length(0), - scale(0), - nullable(false), - finished(false) - { - } + Parameters() + : MsgMetadata(), fetched(false) + { } - string field; - string relation; - string owner; - string alias; - unsigned type; - unsigned subType; - unsigned length; - unsigned scale; - bool nullable; - bool finished; - }; - - public: - explicit Parameters(MemoryPool& pool) - : PermanentStorage(pool), - items(pool), - fetched(false) - { - } - - virtual unsigned FB_CARG getCount(IStatus* /*status*/) const - { - return (unsigned) items.getCount(); - } - - virtual const char* FB_CARG getField(IStatus* status, unsigned index) const - { - if (index < items.getCount()) - return items[index].field.c_str(); - - raiseIndexError(status, index, "getField"); - return NULL; - } - - virtual const char* FB_CARG getRelation(IStatus* status, unsigned index) const - { - if (index < items.getCount()) - return items[index].relation.c_str(); - - raiseIndexError(status, index, "getRelation"); - return NULL; - } - - virtual const char* FB_CARG getOwner(IStatus* status, unsigned index) const - { - if (index < items.getCount()) - return items[index].owner.c_str(); - - raiseIndexError(status, index, "getOwner"); - return NULL; - } - - virtual const char* FB_CARG getAlias(IStatus* status, unsigned index) const - { - if (index < items.getCount()) - return items[index].alias.c_str(); - - raiseIndexError(status, index, "getAlias"); - return NULL; - } - - virtual unsigned FB_CARG getType(IStatus* status, unsigned index) const - { - if (index < items.getCount()) - return items[index].type; - - raiseIndexError(status, index, "getType"); - return 0; - } - - virtual bool FB_CARG isNullable(IStatus* status, unsigned index) const - { - if (index < items.getCount()) - return items[index].nullable; - - raiseIndexError(status, index, "isNullable"); - return false; - } - - virtual unsigned FB_CARG getSubType(IStatus* status, unsigned index) const - { - if (index < items.getCount()) - return items[index].subType; - - raiseIndexError(status, index, "getSubType"); - return 0; - } - - virtual unsigned FB_CARG getLength(IStatus* status, unsigned index) const - { - if (index < items.getCount()) - return items[index].length; - - raiseIndexError(status, index, "getLength"); - return 0; - } - - virtual unsigned FB_CARG getScale(IStatus* status, unsigned index) const - { - if (index < items.getCount()) - return items[index].scale; - - raiseIndexError(status, index, "getScale"); - return 0; - } - - private: - void raiseIndexError(IStatus* status, unsigned index, const char* method) const - { - status->set((Arg::Gds(isc_invalid_index_val) << - Arg::Num(index) << (string("IParametersMetadata::") + method)).value()); - } - - public: - ObjectsArray<Item> items; bool fetched; }; -public: StatementMetadata(MemoryPool& pool, IStatement* aStatement) : PermanentStorage(pool), statement(aStatement), legacyPlan(pool), detailedPlan(pool), - inputParameters(pool), - outputParameters(pool) + inputParameters(new Parameters), + outputParameters(new Parameters) { } @@ -194,8 +65,8 @@ unsigned getType(); const char* getPlan(bool detailed); - const IParametersMetadata* getInputParameters(); - const IParametersMetadata* getOutputParameters(); + IMessageMetadata* getInputMetadata(); + IMessageMetadata* getOutputMetadata(); ISC_UINT64 getAffectedRecords(); void clear(); @@ -210,7 +81,7 @@ IStatement* statement; Nullable<unsigned> type; string legacyPlan, detailedPlan; - Parameters inputParameters, outputParameters; + RefPtr<Parameters> inputParameters, outputParameters; }; Copied: firebird/trunk/src/common/classes/BlrReader.h (from rev 57662, firebird/trunk/src/jrd/BlrReader.h) =================================================================== --- firebird/trunk/src/common/classes/BlrReader.h (rev 0) +++ firebird/trunk/src/common/classes/BlrReader.h 2013-02-17 12:08:53 UTC (rev 57663) @@ -0,0 +1,159 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl. + * + * Software distributed under the License is distributed AS IS, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. + * See the License for the specific language governing rights + * and limitations under the License. + * + * The Original Code was created by Adriano dos Santos Fernandes + * for the Firebird Open Source RDBMS project. + * + * Copyright (c) 2009 Adriano dos Santos Fernandes <adr...@uo...> + * and all contributors signed below. + * + * All Rights Reserved. + * Contributor(s): ______________________________________. + */ + +#ifndef COMMON_CLASSES_BLR_READER_H +#define COMMON_CLASSES_BLR_READER_H + +#include "iberror.h" + +namespace Firebird { + + +class BlrReader +{ +public: + BlrReader(const UCHAR* buffer, unsigned maxLen) + : start(buffer), + end(buffer + maxLen), + pos(buffer) + { + // ASF: A big maxLen like MAX_ULONG could overflow the pointer size and + // points to something before start. In this case, we set the end to the + // max possible address. + if (end < start) + end = (UCHAR*) ~U_IPTR(0); + } + + BlrReader() + : start(NULL), + end(NULL), + pos(NULL) + { + } + +public: + const UCHAR* getPos() const + { + fb_assert(pos); + return pos; + } + + void setPos(const UCHAR* newPos) + { + fb_assert(newPos >= start && newPos < end); + pos = newPos; + } + + void seekBackward(unsigned n) + { + setPos(getPos() - n); + } + + void seekForward(unsigned n) + { + setPos(getPos() + n); + } + + unsigned getOffset() const + { + return getPos() - start; + } + + UCHAR peekByte() const + { + fb_assert(pos); + + if (pos >= end) + (Firebird::Arg::Gds(isc_invalid_blr) << Firebird::Arg::Num(getOffset())).raise(); + + return *pos; + } + + UCHAR getByte() + { + UCHAR byte = peekByte(); + ++pos; + return byte; + } + + USHORT getWord() + { + const UCHAR low = getByte(); + const UCHAR high = getByte(); + + return high * 256 + low; + } + + ULONG getLong() + { + const UCHAR b1 = getByte(); + const UCHAR b2 = getByte(); + const UCHAR b3 = getByte(); + const UCHAR b4 = getByte(); + + return (b4 << 24) | (b3 << 16) | (b2 << 8) | b1; + } + + UCHAR checkByte(UCHAR expected) + { + using namespace Firebird; + + UCHAR byte = getByte(); + + if (byte != expected) + { + status_exception::raise(Arg::Gds(isc_syntaxerr) << + Arg::Num(expected) << + Arg::Num(getOffset() - 1) << + Arg::Num(byte)); + } + + return byte; + } + + USHORT checkWord(USHORT expected) + { + using namespace Firebird; + + USHORT word = getWord(); + + if (word != expected) + { + status_exception::raise(Arg::Gds(isc_syntaxerr) << + Arg::Num(expected) << + Arg::Num(getOffset() - 2) << + Arg::Num(word)); + } + + return word; + } + +private: + const UCHAR* start; + const UCHAR* end; + const UCHAR* pos; +}; + + +} // namespace + +#endif // COMMON_CLASSES_BLR_READER_H Property changes on: firebird/trunk/src/common/classes/BlrReader.h ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Copied: firebird/trunk/src/common/classes/BlrWriter.cpp (from rev 57597, firebird/trunk/src/dsql/BlrWriter.cpp) =================================================================== --- firebird/trunk/src/common/classes/BlrWriter.cpp (rev 0) +++ firebird/trunk/src/common/classes/BlrWriter.cpp 2013-02-17 12:08:53 UTC (rev 57663) @@ -0,0 +1,120 @@ +/* + * The contents of this file are subject to the Interbase Public + * License Version 1.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy + * of the License at http://www.Inprise.com/IPL.html + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code was created by Inprise Corporation + * and its predecessors. Portions created by Inprise Corporation are + * Copyright (C) Inprise Corporation. + * + * All Rights Reserved. + * Contributor(s): ______________________________________. + * Adriano dos Santos Fernandes - refactored from others modules. + */ + +#include "firebird.h" +#include "consts_pub.h" +#include "dyn_consts.h" +#include "gen/iberror.h" +#include "../common/classes/BlrWriter.h" +#include "../jrd/blr.h" + + +namespace Firebird { + + +// Write out a string valued attribute. +void BlrWriter::appendString(UCHAR verb, const char* string, USHORT length) +{ + // TMN: Doesn't this look pretty awkward? If we are given + // a verb, the length is a ushort, else it's uchar. + if (verb) + { + appendUChar(verb); + appendUShort(length); + } + else + { + fb_assert(length <= MAX_UCHAR); + appendUChar(length); + } + + if (string) + appendBytes(reinterpret_cast<const UCHAR*>(string), length); +} + +// Input +// blr_ptr: current position of blr being generated +// verb: blr byte of which number is an argument +// number: value to be written to blr +// Function +// Write out a numeric valued attribute. +void BlrWriter::appendNumber(UCHAR verb, SSHORT number) +{ + if (verb) + appendUChar(verb); + + appendUShortWithLength(number); +} + +void BlrWriter::appendUShortWithLength(USHORT val) +{ + // append an USHORT value, prepended with the USHORT length of an USHORT + appendUShort(2); + appendUShort(val); +} + +void BlrWriter::appendULongWithLength(ULONG val) +{ + // append an ULONG value, prepended with the USHORT length of an ULONG + appendUShort(4); + appendULong(val); +} + +void BlrWriter::appendVersion() +{ + appendUChar(isVersion4() ? blr_version4 : blr_version5); +} + +// Write out a string of blr as part of a ddl string, as in a view or computed field definition. +void BlrWriter::beginBlr(UCHAR verb) +{ + if (verb) + appendUChar(verb); + + baseOffset = blrData.getCount(); + + // put in a place marker for the size of the blr, since it is unknown + appendUShort(0); + appendVersion()... [truncated message content] |
From: <fir...@us...> - 2013-02-18 00:46:11
|
Revision: 57665 http://sourceforge.net/p/firebird/code/57665 Author: firebirds Date: 2013-02-18 00:46:08 +0000 (Mon, 18 Feb 2013) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2013-02-17 23:06:40 UTC (rev 57664) +++ firebird/trunk/ChangeLog 2013-02-18 00:46:08 UTC (rev 57665) @@ -1,3 +1,99 @@ + 2013-02-17 23:06 asfernandes + M src/auth/SecureRemotePassword/Message.h + M src/auth/SecureRemotePassword/manage/SrpManagement.cpp + M src/auth/SecureRemotePassword/server/SrpServer.cpp + M src/common/StatementMetadata.cpp + M src/common/StatementMetadata.h + M src/common/classes/InternalMessageBuffer.cpp + M src/common/utils.cpp + M src/dsql/BlrDebugWriter.h + M src/dsql/dsql.cpp + M src/include/firebird/Provider.h + M src/jrd/EngineInterface.h + M src/jrd/PreparedStatement.cpp + M src/jrd/jrd.cpp + M src/jrd/met.epp +Misc. + + 2013-02-17 12:08 alexpeshkoff + M builds/posix/Makefile.in.plugins_examples + M lang_helpers/gds_codes.ftn + M lang_helpers/gds_codes.pas + M src/auth/SecureRemotePassword/Message.h + M src/auth/SecureRemotePassword/manage/SrpManagement.cpp + M src/auth/SecureRemotePassword/server/SrpServer.cpp + A src/common/MsgMetadata.cpp + A src/common/MsgMetadata.h + M src/common/StatementMetadata.cpp + M src/common/StatementMetadata.h + A src/common/classes/BlrReader.h (from /firebird/trunk/src/jrd/BlrReader.h:57662) + A src/common/classes/BlrWriter.cpp (from /firebird/trunk/src/dsql/BlrWriter.cpp:57597) + A src/common/classes/BlrWriter.h (from /firebird/trunk/src/dsql/BlrWriter.h:57597) + M src/common/classes/ImplementHelper.cpp + M src/common/classes/ImplementHelper.h + A src/common/classes/InternalMessageBuffer.cpp + A src/common/classes/InternalMessageBuffer.h + M src/common/classes/RefMutex.h + M src/common/classes/objects_array.h + M src/common/utils.cpp + M src/common/utils_proto.h + A src/dsql/BlrDebugWriter.cpp + A src/dsql/BlrDebugWriter.h + D src/dsql/BlrWriter.cpp + D src/dsql/BlrWriter.h + M src/dsql/DdlNodes.epp + M src/dsql/DdlNodes.h + M src/dsql/DsqlCompilerScratch.h + M src/dsql/Nodes.h + M src/dsql/StmtNodes.cpp + M src/dsql/dsql.cpp + M src/dsql/dsql.h + M src/dsql/dsql_proto.h + M src/include/firebird/ExternalEngine.h + M src/include/firebird/Provider.h + M src/include/gen/codetext.h + M src/include/gen/iberror.h + M src/include/gen/msgs.h + M src/include/gen/sql_code.h + M src/include/gen/sql_state.h + M src/include/types_pub.h + D src/jrd/BlrReader.h + M src/jrd/Database.h + M src/jrd/EngineInterface.h + M src/jrd/ExtEngineManager.cpp + M src/jrd/ExtEngineManager.h + M src/jrd/PreparedStatement.cpp + M src/jrd/PreparedStatement.h + M src/jrd/ResultSet.cpp + M src/jrd/cch.cpp + M src/jrd/constants.h + M src/jrd/exe.h + M src/jrd/extds/InternalDS.cpp + M src/jrd/extds/InternalDS.h + M src/jrd/jrd.cpp + M src/jrd/met.epp + M src/jrd/par.cpp + M src/jrd/par_proto.h + M src/jrd/val.h + M src/msgs/facilities2.sql + M src/msgs/messages2.sql + M src/msgs/system_errors2.sql + A src/remote/client/BlrFromMessage.cpp + A src/remote/client/BlrFromMessage.h + M src/remote/client/interface.cpp + M src/remote/protocol.h + M src/remote/remote.h + M src/remote/server/server.cpp + M src/yvalve/YObjects.h + M src/yvalve/gds.cpp + M src/yvalve/why.cpp +Modified IStatement interface in our API: +1. Never allocate empty statement - always use att->prepare() to create statement interface +2. Separated IStatement into 2 parts - statement itself and resultset. +3. Added stmt->openCursor() (and att->openCursor() for unprepared statements) to create IResultSet. +4. Always use IMessageMetadata (former IParametersMetadata) to pass message fromat info from client, + therefore avoiding need in BLR generation in client applications. + 2013-02-15 02:48 asfernandes M examples/udr/UdrCppExample.cpp M src/include/FirebirdApi.h Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2013-02-17 23:06:40 UTC (rev 57664) +++ firebird/trunk/src/jrd/build_no.h 2013-02-18 00:46:08 UTC (rev 57665) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:30213 + FORMAL BUILD NUMBER:30215 */ -#define PRODUCT_VER_STRING "3.0.0.30213" -#define FILE_VER_STRING "WI-T3.0.0.30213" -#define LICENSE_VER_STRING "WI-T3.0.0.30213" -#define FILE_VER_NUMBER 3, 0, 0, 30213 +#define PRODUCT_VER_STRING "3.0.0.30215" +#define FILE_VER_STRING "WI-T3.0.0.30215" +#define LICENSE_VER_STRING "WI-T3.0.0.30215" +#define FILE_VER_NUMBER 3, 0, 0, 30215 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "30213" +#define FB_BUILD_NO "30215" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2013-02-17 23:06:40 UTC (rev 57664) +++ firebird/trunk/src/misc/writeBuildNum.sh 2013-02-18 00:46:08 UTC (rev 57665) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=30213 +BuildNum=30215 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2013-02-19 01:09:59
|
Revision: 57675 http://sourceforge.net/p/firebird/code/57675 Author: firebirds Date: 2013-02-19 01:09:55 +0000 (Tue, 19 Feb 2013) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2013-02-18 15:28:50 UTC (rev 57674) +++ firebird/trunk/ChangeLog 2013-02-19 01:09:55 UTC (rev 57675) @@ -1,3 +1,48 @@ + 2013-02-18 15:28 asfernandes + M src/remote/server/server.cpp + M src/yvalve/YObjects.h + M src/yvalve/why.cpp +Misc. + + 2013-02-18 13:53 alexpeshkoff + M src/jrd/jrd.cpp + M src/remote/client/interface.cpp +Make openCursor() use default output format when none is given explicitly + + 2013-02-18 11:42 alexpeshkoff + M examples/interfaces/select.cpp +misc + + 2013-02-18 11:07 alexpeshkoff + A examples/interfaces + A examples/interfaces/select.cpp +A sample of using OO API + + 2013-02-18 11:06 alexpeshkoff + M src/common/MsgMetadata.cpp + M src/include/firebird/Provider.h +A number of fixes related with ICoerceMetadata interface - thanks to Adriano + + 2013-02-18 08:27 hvlad + M builds/win32/msvc9/common.vcproj + M builds/win32/msvc9/engine.vcproj + M builds/win32/msvc9/yvalve.vcproj +Update MSVC9 build + + 2013-02-18 08:23 hvlad + M builds/win32/msvc8/common.vcproj + M builds/win32/msvc8/engine.vcproj + M builds/win32/msvc8/yvalve.vcproj +Update MSVC8 build + + 2013-02-18 07:54 alexpeshkoff + M src/jrd/EngineInterface.h +Cleanup - thanks to Adriano + + 2013-02-18 02:14 asfernandes + M src/remote/client/interface.cpp +Misc. + 2013-02-17 23:06 asfernandes M src/auth/SecureRemotePassword/Message.h M src/auth/SecureRemotePassword/manage/SrpManagement.cpp Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2013-02-18 15:28:50 UTC (rev 57674) +++ firebird/trunk/src/jrd/build_no.h 2013-02-19 01:09:55 UTC (rev 57675) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:30215 + FORMAL BUILD NUMBER:30224 */ -#define PRODUCT_VER_STRING "3.0.0.30215" -#define FILE_VER_STRING "WI-T3.0.0.30215" -#define LICENSE_VER_STRING "WI-T3.0.0.30215" -#define FILE_VER_NUMBER 3, 0, 0, 30215 +#define PRODUCT_VER_STRING "3.0.0.30224" +#define FILE_VER_STRING "WI-T3.0.0.30224" +#define LICENSE_VER_STRING "WI-T3.0.0.30224" +#define FILE_VER_NUMBER 3, 0, 0, 30224 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "30215" +#define FB_BUILD_NO "30224" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2013-02-18 15:28:50 UTC (rev 57674) +++ firebird/trunk/src/misc/writeBuildNum.sh 2013-02-19 01:09:55 UTC (rev 57675) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=30215 +BuildNum=30224 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2013-02-20 00:52:48
|
Revision: 57679 http://sourceforge.net/p/firebird/code/57679 Author: firebirds Date: 2013-02-20 00:52:46 +0000 (Wed, 20 Feb 2013) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2013-02-19 12:03:07 UTC (rev 57678) +++ firebird/trunk/ChangeLog 2013-02-20 00:52:46 UTC (rev 57679) @@ -1,3 +1,31 @@ + 2013-02-19 12:03 alexpeshkoff + M src/jrd/jrd.cpp + M src/remote/client/interface.cpp +Do not prefetch unneeded information in IAttachment::openCursor() + + 2013-02-19 11:50 hvlad + M builds/win32/msvc10/common.vcxproj + M builds/win32/msvc10/common.vcxproj.filters + M builds/win32/msvc10/engine.vcxproj + M builds/win32/msvc10/engine.vcxproj.filters + M builds/win32/msvc10/yvalve.vcxproj + M builds/win32/msvc10/yvalve.vcxproj.filters +Update MSVC10 build + + 2013-02-19 11:20 alexpeshkoff + M src/common/StatementMetadata.cpp + M src/common/StatementMetadata.h + M src/dsql/dsql.cpp + M src/include/firebird/Provider.h + M src/jrd/EngineInterface.h + M src/jrd/inf_pub.h + M src/jrd/jrd.cpp + M src/remote/client/interface.cpp + M src/remote/server/server.cpp + M src/yvalve/YObjects.h + M src/yvalve/why.cpp +Add IStatement::getFlags() to help user make a solution what to do with SQL statement + 2013-02-18 15:28 asfernandes M src/remote/server/server.cpp M src/yvalve/YObjects.h Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2013-02-19 12:03:07 UTC (rev 57678) +++ firebird/trunk/src/jrd/build_no.h 2013-02-20 00:52:46 UTC (rev 57679) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:30224 + FORMAL BUILD NUMBER:30227 */ -#define PRODUCT_VER_STRING "3.0.0.30224" -#define FILE_VER_STRING "WI-T3.0.0.30224" -#define LICENSE_VER_STRING "WI-T3.0.0.30224" -#define FILE_VER_NUMBER 3, 0, 0, 30224 +#define PRODUCT_VER_STRING "3.0.0.30227" +#define FILE_VER_STRING "WI-T3.0.0.30227" +#define LICENSE_VER_STRING "WI-T3.0.0.30227" +#define FILE_VER_NUMBER 3, 0, 0, 30227 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "30224" +#define FB_BUILD_NO "30227" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2013-02-19 12:03:07 UTC (rev 57678) +++ firebird/trunk/src/misc/writeBuildNum.sh 2013-02-20 00:52:46 UTC (rev 57679) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=30224 +BuildNum=30227 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2013-02-21 00:48:28
|
Revision: 57683 http://sourceforge.net/p/firebird/code/57683 Author: firebirds Date: 2013-02-21 00:48:25 +0000 (Thu, 21 Feb 2013) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2013-02-20 19:41:01 UTC (rev 57682) +++ firebird/trunk/ChangeLog 2013-02-21 00:48:25 UTC (rev 57683) @@ -1,3 +1,22 @@ + 2013-02-20 19:41 asfernandes + M src/common/MsgMetadata.cpp + M src/common/MsgMetadata.h + M src/gpre/boot/gpre_meta_boot.cpp + M src/include/firebird/Interface.h + M src/include/firebird/Provider.h + M src/yvalve/MasterImplementation.cpp + M src/yvalve/MasterImplementation.h +Replaced ICoerceMetadata with IMetadataBuilder and add a builder creator method in IMaster. +This change is to make applications who define they own message format (without metadata inspection and coercion) to easily create its IMessageMetadata. + + 2013-02-20 19:40 asfernandes + M src/include/firebird/Provider.h +Misc. + + 2013-02-20 13:17 alexpeshkoff + M src/common/classes/Aligner.h +Assertion suggested by Dmitry Kovaalenko + 2013-02-19 12:03 alexpeshkoff M src/jrd/jrd.cpp M src/remote/client/interface.cpp Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2013-02-20 19:41:01 UTC (rev 57682) +++ firebird/trunk/src/jrd/build_no.h 2013-02-21 00:48:25 UTC (rev 57683) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:30227 + FORMAL BUILD NUMBER:30230 */ -#define PRODUCT_VER_STRING "3.0.0.30227" -#define FILE_VER_STRING "WI-T3.0.0.30227" -#define LICENSE_VER_STRING "WI-T3.0.0.30227" -#define FILE_VER_NUMBER 3, 0, 0, 30227 +#define PRODUCT_VER_STRING "3.0.0.30230" +#define FILE_VER_STRING "WI-T3.0.0.30230" +#define LICENSE_VER_STRING "WI-T3.0.0.30230" +#define FILE_VER_NUMBER 3, 0, 0, 30230 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "30227" +#define FB_BUILD_NO "30230" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2013-02-20 19:41:01 UTC (rev 57682) +++ firebird/trunk/src/misc/writeBuildNum.sh 2013-02-21 00:48:25 UTC (rev 57683) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=30227 +BuildNum=30230 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ale...@us...> - 2013-02-21 14:59:28
|
Revision: 57684 http://sourceforge.net/p/firebird/code/57684 Author: alexpeshkoff Date: 2013-02-21 14:59:24 +0000 (Thu, 21 Feb 2013) Log Message: ----------- Enhancements of IMetadataBuilder Modified Paths: -------------- firebird/trunk/examples/interfaces/select.cpp firebird/trunk/lang_helpers/gds_codes.ftn firebird/trunk/lang_helpers/gds_codes.pas firebird/trunk/src/common/MsgMetadata.cpp firebird/trunk/src/common/MsgMetadata.h firebird/trunk/src/include/gen/codetext.h firebird/trunk/src/include/gen/iberror.h firebird/trunk/src/include/gen/msgs.h firebird/trunk/src/include/gen/sql_code.h firebird/trunk/src/include/gen/sql_state.h firebird/trunk/src/msgs/facilities2.sql firebird/trunk/src/msgs/messages2.sql firebird/trunk/src/msgs/system_errors2.sql Modified: firebird/trunk/examples/interfaces/select.cpp =================================================================== --- firebird/trunk/examples/interfaces/select.cpp 2013-02-21 00:48:25 UTC (rev 57683) +++ firebird/trunk/examples/interfaces/select.cpp 2013-02-21 14:59:24 UTC (rev 57684) @@ -59,7 +59,7 @@ IStatement* stmt = NULL; IResultSet* curs = NULL; IMessageMetadata* meta = NULL; - ICoerceMetadata* coerce = NULL; + IMetadataBuilder* builder = NULL; try { @@ -83,8 +83,8 @@ // get list of columns meta = stmt->getOutputMetadata(st); check(st, "getOutputMetadata"); - coerce = meta->coerce(st); - check(st, "coerce"); + builder = meta->getBuilder(st); + check(st, "getBuilder"); unsigned cols = meta->getCount(st); check(st, "getCount"); @@ -105,7 +105,7 @@ if (t == SQL_VARYING || t == SQL_TEXT) { - coerce->setType(st, j, SQL_TEXT); + builder->setType(st, j, SQL_TEXT); check(st, "setType"); fields[j].name = meta->getField(st, j); check(st, "getField"); @@ -113,7 +113,7 @@ } meta->release(); - meta = coerce->getMetadata(st); + meta = builder->getMetadata(st); check(st, "getMetadata"); // now we may also get offsets info @@ -128,8 +128,8 @@ } } - coerce->release(); - coerce = NULL; + builder->release(); + builder = NULL; // open cursor curs = stmt->openCursor(st, tra, NULL, meta); @@ -187,8 +187,8 @@ // release interfaces after error caught if (meta) meta->release(); - if (coerce) - coerce->release(); + if (builder) + builder->release(); if (curs) curs->release(); if (stmt) Modified: firebird/trunk/lang_helpers/gds_codes.ftn =================================================================== --- firebird/trunk/lang_helpers/gds_codes.ftn 2013-02-21 00:48:25 UTC (rev 57683) +++ firebird/trunk/lang_helpers/gds_codes.ftn 2013-02-21 14:59:24 UTC (rev 57684) @@ -1514,6 +1514,8 @@ PARAMETER (GDS__wrong_message_length = 335545050) INTEGER*4 GDS__no_output_format PARAMETER (GDS__no_output_format = 335545051) + INTEGER*4 GDS__item_finish + PARAMETER (GDS__item_finish = 335545052) INTEGER*4 GDS__gfix_db_name PARAMETER (GDS__gfix_db_name = 335740929) INTEGER*4 GDS__gfix_invalid_sw Modified: firebird/trunk/lang_helpers/gds_codes.pas =================================================================== --- firebird/trunk/lang_helpers/gds_codes.pas 2013-02-21 00:48:25 UTC (rev 57683) +++ firebird/trunk/lang_helpers/gds_codes.pas 2013-02-21 14:59:24 UTC (rev 57684) @@ -764,6 +764,7 @@ gds_bad_result_set = 335545049; gds_wrong_message_length = 335545050; gds_no_output_format = 335545051; + gds_item_finish = 335545052; gds_gfix_db_name = 335740929; gds_gfix_invalid_sw = 335740930; gds_gfix_incmp_sw = 335740932; Modified: firebird/trunk/src/common/MsgMetadata.cpp =================================================================== --- firebird/trunk/src/common/MsgMetadata.cpp 2013-02-21 00:48:25 UTC (rev 57683) +++ firebird/trunk/src/common/MsgMetadata.cpp 2013-02-21 14:59:24 UTC (rev 57684) @@ -25,6 +25,7 @@ #include "firebird.h" #include "../common/MsgMetadata.h" #include "../common/utils_proto.h" +#include "../jrd/align.h" using namespace Firebird; @@ -53,83 +54,127 @@ // IMetadataBuilder implementation virtual void FB_CARG setType(IStatus* status, unsigned index, unsigned type) { - MutexLockGuard g(mtx, FB_FUNCTION); + try + { + MutexLockGuard g(mtx, FB_FUNCTION); - if (!indexError(status, index, "setType")) + indexError(index, "setType"); msgMetadata->items[index].type = type; + if (!msgMetadata->items[index].length) + { + unsigned dtype; + fb_utils::sqlTypeToDsc(0, type, 0, &dtype, NULL, NULL, NULL); + if (dtype < DTYPE_TYPE_MAX) + msgMetadata->items[index].length = type_lengths[dtype]; + } + + // Setting type & length is enough for an item to be ready for use + if (msgMetadata->items[index].length) + msgMetadata->items[index].finished = true; + } + catch (const Exception& ex) + { + ex.stuffException(status); + } } virtual void FB_CARG setSubType(IStatus* status, unsigned index, unsigned subType) { - MutexLockGuard g(mtx, FB_FUNCTION); + try + { + MutexLockGuard g(mtx, FB_FUNCTION); - if (!indexError(status, index, "setSubType")) + indexError(index, "setSubType"); msgMetadata->items[index].subType = subType; + } + catch (const Exception& ex) + { + ex.stuffException(status); + } } virtual void FB_CARG setLength(IStatus* status, unsigned index, unsigned length) { - MutexLockGuard g(mtx, FB_FUNCTION); + try + { + MutexLockGuard g(mtx, FB_FUNCTION); - if (!indexError(status, index, "setLength")) + indexError(index, "setLength"); msgMetadata->items[index].length = length; + + // Setting type & length is enough for an item to be ready for use + if (msgMetadata->items[index].type) + msgMetadata->items[index].finished = true; + } + catch (const Exception& ex) + { + ex.stuffException(status); + } } virtual void FB_CARG setScale(IStatus* status, unsigned index, unsigned scale) { - MutexLockGuard g(mtx, FB_FUNCTION); + try + { + MutexLockGuard g(mtx, FB_FUNCTION); - if (!indexError(status, index, "setScale")) + indexError(index, "setScale"); msgMetadata->items[index].scale = scale; + } + catch (const Exception& ex) + { + ex.stuffException(status); + } } virtual IMessageMetadata* FB_CARG getMetadata(IStatus* status) { - MutexLockGuard g(mtx, FB_FUNCTION); + try + { + MutexLockGuard g(mtx, FB_FUNCTION); - if (metadataError(status, "getMetadata")) + metadataError("getMetadata"); + + unsigned i = msgMetadata->makeOffsets(); + if (i != ~0u) + { + (Arg::Gds(isc_item_finish) << Arg::Num(i)).raise(); + } + + IMessageMetadata* rc = msgMetadata; + rc->addRef(); + msgMetadata = NULL; + return rc; + } + catch (const Exception& ex) { - return NULL; + ex.stuffException(status); } - - msgMetadata->makeOffsets(); - IMessageMetadata* rc = msgMetadata; - rc->addRef(); - msgMetadata = NULL; - return rc; + return NULL; } private: RefPtr<MsgMetadata> msgMetadata; Mutex mtx; - bool metadataError(IStatus* status, const char* functionName) + void metadataError(const char* functionName) { if (!msgMetadata) { - status->set((Arg::Gds(isc_random) << - (string("MetadataBuilder interface is already inactive: IMetadataBuilder::") + functionName)).value()); - return true; + (Arg::Gds(isc_random) << (string("MetadataBuilder interface is already inactive: " + "IMetadataBuilder::") + functionName)).raise(); } - - return false; } - bool indexError(IStatus* status, unsigned index, const char* functionName) + void indexError(unsigned index, const char* functionName) { - if (metadataError(status, functionName)) - { - return true; - } + metadataError(functionName); if (index >= msgMetadata->items.getCount()) { - status->set((Arg::Gds(isc_invalid_index_val) << - Arg::Num(index) << (string("IMetadataBuilder::") + functionName)).value()); - return true; + (Arg::Gds(isc_invalid_index_val) << Arg::Num(index) << (string("IMetadataBuilder::") + + functionName)).raise(); } - - return false; } }; @@ -139,7 +184,8 @@ namespace Firebird { -void MsgMetadata::makeOffsets() +// returns ~0 on success or index of not finished item +unsigned MsgMetadata::makeOffsets() { length = 0; @@ -149,11 +195,13 @@ if (!param->finished) { length = 0; - return; + return n; } length = fb_utils::sqlTypeToDsc(length, param->type, param->length, NULL /*dtype*/, NULL /*length*/, ¶m->offset, ¶m->nullInd); } + + return ~0; } Modified: firebird/trunk/src/common/MsgMetadata.h =================================================================== --- firebird/trunk/src/common/MsgMetadata.h 2013-02-21 00:48:25 UTC (rev 57683) +++ firebird/trunk/src/common/MsgMetadata.h 2013-02-21 14:59:24 UTC (rev 57684) @@ -227,7 +227,7 @@ } public: - void makeOffsets(); + unsigned makeOffsets(); private: void raiseIndexError(IStatus* status, unsigned index, const char* method) const Modified: firebird/trunk/src/include/gen/codetext.h =================================================================== --- firebird/trunk/src/include/gen/codetext.h 2013-02-21 00:48:25 UTC (rev 57683) +++ firebird/trunk/src/include/gen/codetext.h 2013-02-21 14:59:24 UTC (rev 57684) @@ -753,6 +753,7 @@ {"bad_result_set", 335545049}, {"wrong_message_length", 335545050}, {"no_output_format", 335545051}, + {"item_finish", 335545052}, {"gfix_db_name", 335740929}, {"gfix_invalid_sw", 335740930}, {"gfix_incmp_sw", 335740932}, Modified: firebird/trunk/src/include/gen/iberror.h =================================================================== --- firebird/trunk/src/include/gen/iberror.h 2013-02-21 00:48:25 UTC (rev 57683) +++ firebird/trunk/src/include/gen/iberror.h 2013-02-21 14:59:24 UTC (rev 57684) @@ -787,6 +787,7 @@ const ISC_STATUS isc_bad_result_set = 335545049L; const ISC_STATUS isc_wrong_message_length = 335545050L; const ISC_STATUS isc_no_output_format = 335545051L; +const ISC_STATUS isc_item_finish = 335545052L; const ISC_STATUS isc_gfix_db_name = 335740929L; const ISC_STATUS isc_gfix_invalid_sw = 335740930L; const ISC_STATUS isc_gfix_incmp_sw = 335740932L; @@ -1231,7 +1232,7 @@ const ISC_STATUS isc_trace_switch_param_miss = 337182758L; const ISC_STATUS isc_trace_param_act_notcompat = 337182759L; const ISC_STATUS isc_trace_mandatory_switch_miss = 337182760L; -const ISC_STATUS isc_err_max = 1175; +const ISC_STATUS isc_err_max = 1176; #else /* c definitions */ @@ -1988,6 +1989,7 @@ #define isc_bad_result_set 335545049L #define isc_wrong_message_length 335545050L #define isc_no_output_format 335545051L +#define isc_item_finish 335545052L #define isc_gfix_db_name 335740929L #define isc_gfix_invalid_sw 335740930L #define isc_gfix_incmp_sw 335740932L @@ -2432,7 +2434,7 @@ #define isc_trace_switch_param_miss 337182758L #define isc_trace_param_act_notcompat 337182759L #define isc_trace_mandatory_switch_miss 337182760L -#define isc_err_max 1175 +#define isc_err_max 1176 #endif Modified: firebird/trunk/src/include/gen/msgs.h =================================================================== --- firebird/trunk/src/include/gen/msgs.h 2013-02-21 00:48:25 UTC (rev 57683) +++ firebird/trunk/src/include/gen/msgs.h 2013-02-21 14:59:24 UTC (rev 57684) @@ -756,6 +756,7 @@ {335545049, "Invalid resultset interface"}, /* bad_result_set */ {335545050, "Message length passed from user application does not match set of columns"}, /* wrong_message_length */ {335545051, "Resultset is missing output format information"}, /* no_output_format */ + {335545052, "Message metadata not ready - item @1 is not finished"}, /* item_finish */ {335740929, "data base file name (@1) already given"}, /* gfix_db_name */ {335740930, "invalid switch @1"}, /* gfix_invalid_sw */ {335740932, "incompatible switch combination"}, /* gfix_incmp_sw */ Modified: firebird/trunk/src/include/gen/sql_code.h =================================================================== --- firebird/trunk/src/include/gen/sql_code.h 2013-02-21 00:48:25 UTC (rev 57683) +++ firebird/trunk/src/include/gen/sql_code.h 2013-02-21 14:59:24 UTC (rev 57684) @@ -752,6 +752,7 @@ {335545049, -901}, /* 729 bad_result_set */ {335545050, -804}, /* 730 wrong_message_length */ {335545051, -804}, /* 731 no_output_format */ + {335545052, -804}, /* 732 item_finish */ {335740929, -901}, /* 1 gfix_db_name */ {335740930, -901}, /* 2 gfix_invalid_sw */ {335740932, -901}, /* 4 gfix_incmp_sw */ Modified: firebird/trunk/src/include/gen/sql_state.h =================================================================== --- firebird/trunk/src/include/gen/sql_state.h 2013-02-21 00:48:25 UTC (rev 57683) +++ firebird/trunk/src/include/gen/sql_state.h 2013-02-21 14:59:24 UTC (rev 57684) @@ -752,6 +752,7 @@ {335545049, "26000"}, // 729 bad_result_set {335545050, "07000"}, // 730 wrong_message_length {335545051, "07000"}, // 731 no_output_format + {335545052, "HY021"}, // 732 item_finish {335740929, "00000"}, // 1 gfix_db_name {335740930, "00000"}, // 2 gfix_invalid_sw {335740932, "00000"}, // 4 gfix_incmp_sw Modified: firebird/trunk/src/msgs/facilities2.sql =================================================================== --- firebird/trunk/src/msgs/facilities2.sql 2013-02-21 00:48:25 UTC (rev 57683) +++ firebird/trunk/src/msgs/facilities2.sql 2013-02-21 14:59:24 UTC (rev 57684) @@ -1,7 +1,7 @@ /* MAX_NUMBER is the next number to be used, always one more than the highest message number. */ set bulk_insert INSERT INTO FACILITIES (LAST_CHANGE, FACILITY, FAC_CODE, MAX_NUMBER) VALUES (?, ?, ?, ?); -- -('2013-02-17 15:32:05', 'JRD', 0, 732) +('2013-02-21 18:12:38', 'JRD', 0, 733) ('2012-01-23 20:10:30', 'QLI', 1, 532) ('2009-07-16 05:26:11', 'GFIX', 3, 121) ('1996-11-07 13:39:40', 'GPRE', 4, 1) Modified: firebird/trunk/src/msgs/messages2.sql =================================================================== --- firebird/trunk/src/msgs/messages2.sql 2013-02-21 00:48:25 UTC (rev 57683) +++ firebird/trunk/src/msgs/messages2.sql 2013-02-21 14:59:24 UTC (rev 57684) @@ -839,6 +839,7 @@ ('bad_result_set', NULL, 'why.cpp', NULL, 0, 729, NULL, 'Invalid resultset interface', NULL, NULL); ('wrong_message_length', NULL, 'why.cpp', NULL, 0, 730, NULL, 'Message length passed from user application does not match set of columns', NULL, NULL); ('no_output_format', NULL, 'why.cpp', NULL, 0, 731, NULL, 'Resultset is missing output format information', NULL, NULL); +('item_finish', NULL, 'MsgMetadata.cpp', NULL, 0, 732, NULL, 'Message metadata not ready - item @1 is not finished', NULL, NULL); -- QLI (NULL, NULL, NULL, NULL, 1, 0, NULL, 'expected type', NULL, NULL); (NULL, NULL, NULL, NULL, 1, 1, NULL, 'bad block type', NULL, NULL); Modified: firebird/trunk/src/msgs/system_errors2.sql =================================================================== --- firebird/trunk/src/msgs/system_errors2.sql 2013-02-21 00:48:25 UTC (rev 57683) +++ firebird/trunk/src/msgs/system_errors2.sql 2013-02-21 14:59:24 UTC (rev 57684) @@ -738,6 +738,7 @@ (-901, '26', '000', 0, 729, 'bad_result_set', NULL, NULL) (-804, '07', '000', 0, 730, 'wrong_message_length', NULL, NULL) (-804, '07', '000', 0, 731, 'no_output_format', NULL, NULL) +(-804, 'HY', '021', 0, 732, 'item_finish', NULL, NULL) -- GFIX (-901, '00', '000', 3, 1, 'gfix_db_name', NULL, NULL) (-901, '00', '000', 3, 2, 'gfix_invalid_sw', NULL, NULL) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2013-02-22 00:32:56
|
Revision: 57689 http://sourceforge.net/p/firebird/code/57689 Author: firebirds Date: 2013-02-22 00:32:54 +0000 (Fri, 22 Feb 2013) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2013-02-21 23:25:10 UTC (rev 57688) +++ firebird/trunk/ChangeLog 2013-02-22 00:32:54 UTC (rev 57689) @@ -1,3 +1,25 @@ + 2013-02-21 23:25 asfernandes + M src/common/MsgMetadata.cpp + M src/jrd/jrd.cpp + M src/remote/client/interface.cpp +Misc. + + 2013-02-21 14:59 alexpeshkoff + M examples/interfaces/select.cpp + M lang_helpers/gds_codes.ftn + M lang_helpers/gds_codes.pas + M src/common/MsgMetadata.cpp + M src/common/MsgMetadata.h + M src/include/gen/codetext.h + M src/include/gen/iberror.h + M src/include/gen/msgs.h + M src/include/gen/sql_code.h + M src/include/gen/sql_state.h + M src/msgs/facilities2.sql + M src/msgs/messages2.sql + M src/msgs/system_errors2.sql +Enhancements of IMetadataBuilder + 2013-02-20 19:41 asfernandes M src/common/MsgMetadata.cpp M src/common/MsgMetadata.h Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2013-02-21 23:25:10 UTC (rev 57688) +++ firebird/trunk/src/jrd/build_no.h 2013-02-22 00:32:54 UTC (rev 57689) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:30230 + FORMAL BUILD NUMBER:30232 */ -#define PRODUCT_VER_STRING "3.0.0.30230" -#define FILE_VER_STRING "WI-T3.0.0.30230" -#define LICENSE_VER_STRING "WI-T3.0.0.30230" -#define FILE_VER_NUMBER 3, 0, 0, 30230 +#define PRODUCT_VER_STRING "3.0.0.30232" +#define FILE_VER_STRING "WI-T3.0.0.30232" +#define LICENSE_VER_STRING "WI-T3.0.0.30232" +#define FILE_VER_NUMBER 3, 0, 0, 30232 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "30230" +#define FB_BUILD_NO "30232" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2013-02-21 23:25:10 UTC (rev 57688) +++ firebird/trunk/src/misc/writeBuildNum.sh 2013-02-22 00:32:54 UTC (rev 57689) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=30230 +BuildNum=30232 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2013-02-23 01:04:02
|
Revision: 57692 http://sourceforge.net/p/firebird/code/57692 Author: firebirds Date: 2013-02-23 01:03:58 +0000 (Sat, 23 Feb 2013) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2013-02-22 07:24:46 UTC (rev 57691) +++ firebird/trunk/ChangeLog 2013-02-23 01:03:58 UTC (rev 57692) @@ -1,3 +1,14 @@ + 2013-02-22 07:24 alexpeshkoff + M src/dsql/dsql.cpp + M src/include/firebird/Provider.h + M src/remote/server/server.cpp + M src/yvalve/why.cpp +Better names for statement's flags + + 2013-02-22 07:01 alexpeshkoff + M src/yvalve/MasterImplementation.cpp +More on IMetadataBuilder + 2013-02-21 23:25 asfernandes M src/common/MsgMetadata.cpp M src/jrd/jrd.cpp Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2013-02-22 07:24:46 UTC (rev 57691) +++ firebird/trunk/src/jrd/build_no.h 2013-02-23 01:03:58 UTC (rev 57692) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:30232 + FORMAL BUILD NUMBER:30234 */ -#define PRODUCT_VER_STRING "3.0.0.30232" -#define FILE_VER_STRING "WI-T3.0.0.30232" -#define LICENSE_VER_STRING "WI-T3.0.0.30232" -#define FILE_VER_NUMBER 3, 0, 0, 30232 +#define PRODUCT_VER_STRING "3.0.0.30234" +#define FILE_VER_STRING "WI-T3.0.0.30234" +#define LICENSE_VER_STRING "WI-T3.0.0.30234" +#define FILE_VER_NUMBER 3, 0, 0, 30234 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "30232" +#define FB_BUILD_NO "30234" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2013-02-22 07:24:46 UTC (rev 57691) +++ firebird/trunk/src/misc/writeBuildNum.sh 2013-02-23 01:03:58 UTC (rev 57692) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=30232 +BuildNum=30234 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2013-02-24 00:46:04
|
Revision: 57694 http://sourceforge.net/p/firebird/code/57694 Author: firebirds Date: 2013-02-24 00:45:59 +0000 (Sun, 24 Feb 2013) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2013-02-23 03:09:17 UTC (rev 57693) +++ firebird/trunk/ChangeLog 2013-02-24 00:45:59 UTC (rev 57694) @@ -1,3 +1,17 @@ + 2013-02-23 03:09 asfernandes + M src/auth/SecureRemotePassword/Message.h + M src/dsql/dsql.cpp + M src/dsql/dsql.h + M src/dsql/dsql_proto.h + M src/include/firebird/Provider.h + M src/jrd/EngineInterface.h + M src/jrd/jrd.cpp + M src/remote/client/interface.cpp + M src/remote/server/server.cpp + M src/yvalve/YObjects.h + M src/yvalve/why.cpp +Change message buffers type to void*. It adds some casts, but avoid them in users' code. + 2013-02-22 07:24 alexpeshkoff M src/dsql/dsql.cpp M src/include/firebird/Provider.h Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2013-02-23 03:09:17 UTC (rev 57693) +++ firebird/trunk/src/jrd/build_no.h 2013-02-24 00:45:59 UTC (rev 57694) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:30234 + FORMAL BUILD NUMBER:30235 */ -#define PRODUCT_VER_STRING "3.0.0.30234" -#define FILE_VER_STRING "WI-T3.0.0.30234" -#define LICENSE_VER_STRING "WI-T3.0.0.30234" -#define FILE_VER_NUMBER 3, 0, 0, 30234 +#define PRODUCT_VER_STRING "3.0.0.30235" +#define FILE_VER_STRING "WI-T3.0.0.30235" +#define LICENSE_VER_STRING "WI-T3.0.0.30235" +#define FILE_VER_NUMBER 3, 0, 0, 30235 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "30234" +#define FB_BUILD_NO "30235" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2013-02-23 03:09:17 UTC (rev 57693) +++ firebird/trunk/src/misc/writeBuildNum.sh 2013-02-24 00:45:59 UTC (rev 57694) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=30234 +BuildNum=30235 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2013-02-25 00:43:59
|
Revision: 57696 http://sourceforge.net/p/firebird/code/57696 Author: firebirds Date: 2013-02-25 00:43:57 +0000 (Mon, 25 Feb 2013) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2013-02-24 16:26:00 UTC (rev 57695) +++ firebird/trunk/ChangeLog 2013-02-25 00:43:57 UTC (rev 57696) @@ -1,3 +1,10 @@ + 2013-02-24 16:26 asfernandes + M src/dsql/dsql.cpp + M src/dsql/dsql.h + M src/dsql/dsql_proto.h + M src/jrd/jrd.cpp +Revert change of messages to void* in DSQL internals. + 2013-02-23 03:09 asfernandes M src/auth/SecureRemotePassword/Message.h M src/dsql/dsql.cpp Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2013-02-24 16:26:00 UTC (rev 57695) +++ firebird/trunk/src/jrd/build_no.h 2013-02-25 00:43:57 UTC (rev 57696) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:30235 + FORMAL BUILD NUMBER:30236 */ -#define PRODUCT_VER_STRING "3.0.0.30235" -#define FILE_VER_STRING "WI-T3.0.0.30235" -#define LICENSE_VER_STRING "WI-T3.0.0.30235" -#define FILE_VER_NUMBER 3, 0, 0, 30235 +#define PRODUCT_VER_STRING "3.0.0.30236" +#define FILE_VER_STRING "WI-T3.0.0.30236" +#define LICENSE_VER_STRING "WI-T3.0.0.30236" +#define FILE_VER_NUMBER 3, 0, 0, 30236 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "30235" +#define FB_BUILD_NO "30236" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2013-02-24 16:26:00 UTC (rev 57695) +++ firebird/trunk/src/misc/writeBuildNum.sh 2013-02-25 00:43:57 UTC (rev 57696) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=30235 +BuildNum=30236 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2013-02-26 00:56:17
|
Revision: 57700 http://sourceforge.net/p/firebird/code/57700 Author: firebirds Date: 2013-02-26 00:56:11 +0000 (Tue, 26 Feb 2013) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2013-02-25 10:14:15 UTC (rev 57699) +++ firebird/trunk/ChangeLog 2013-02-26 00:56:11 UTC (rev 57700) @@ -1,3 +1,12 @@ + 2013-02-25 10:14 hvlad + M src/jrd/sort.cpp +Ported fix for bug CORE-4051 : Memory leak when sorting big records + + 2013-02-25 02:54 asfernandes + M src/jrd/constants.h + M src/jrd/fun.epp +Improvement CORE-4047 - Increase number of input parameters for External Functions (UDFs) to 15. + 2013-02-24 16:26 asfernandes M src/dsql/dsql.cpp M src/dsql/dsql.h Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2013-02-25 10:14:15 UTC (rev 57699) +++ firebird/trunk/src/jrd/build_no.h 2013-02-26 00:56:11 UTC (rev 57700) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:30236 + FORMAL BUILD NUMBER:30238 */ -#define PRODUCT_VER_STRING "3.0.0.30236" -#define FILE_VER_STRING "WI-T3.0.0.30236" -#define LICENSE_VER_STRING "WI-T3.0.0.30236" -#define FILE_VER_NUMBER 3, 0, 0, 30236 +#define PRODUCT_VER_STRING "3.0.0.30238" +#define FILE_VER_STRING "WI-T3.0.0.30238" +#define LICENSE_VER_STRING "WI-T3.0.0.30238" +#define FILE_VER_NUMBER 3, 0, 0, 30238 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "30236" +#define FB_BUILD_NO "30238" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2013-02-25 10:14:15 UTC (rev 57699) +++ firebird/trunk/src/misc/writeBuildNum.sh 2013-02-26 00:56:11 UTC (rev 57700) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=30236 +BuildNum=30238 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2013-03-01 01:44:43
|
Revision: 57711 http://sourceforge.net/p/firebird/code/57711 Author: firebirds Date: 2013-03-01 01:44:39 +0000 (Fri, 01 Mar 2013) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2013-02-28 16:24:31 UTC (rev 57710) +++ firebird/trunk/ChangeLog 2013-03-01 01:44:39 UTC (rev 57711) @@ -1,3 +1,34 @@ + 2013-02-28 16:23 alexpeshkoff + M src/jrd/blb.cpp + M src/jrd/exe.cpp + M src/jrd/tra.cpp + M src/jrd/tra.h +Postfix for CORE-3908: Engine leaks memory and crashes when lot of autonomous transactions have been started and finished + + 2013-02-27 14:49 alexpeshkoff + M src/jrd/tra.cpp + M src/jrd/tra.h +Fixed CORE-3908: Engine leaks memory and crashes when lot of autonomous transactions have been started and finished + + 2013-02-26 03:42 asfernandes + M src/auth/SecureRemotePassword/Message.h + M src/auth/SecureRemotePassword/manage/SrpManagement.cpp + M src/auth/SecureRemotePassword/server/SrpServer.cpp + M src/common/classes/InternalMessageBuffer.h + M src/include/firebird/Provider.h + M src/jrd/EngineInterface.h + M src/jrd/extds/InternalDS.cpp + M src/jrd/jrd.cpp + M src/remote/client/BlrFromMessage.cpp + M src/remote/client/BlrFromMessage.h + M src/remote/client/interface.cpp + M src/remote/server/server.cpp + M src/yvalve/YObjects.h + M src/yvalve/why.cpp +Remove FbMessage struct from the API. +This struct lost its main value (group various blr-related properties in a single parameter). +And since openCursor/fetch already split the message/buffer, it does not make sense anymore to have it. + 2013-02-25 10:14 hvlad M src/jrd/sort.cpp Ported fix for bug CORE-4051 : Memory leak when sorting big records Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2013-02-28 16:24:31 UTC (rev 57710) +++ firebird/trunk/src/jrd/build_no.h 2013-03-01 01:44:39 UTC (rev 57711) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:30238 + FORMAL BUILD NUMBER:30241 */ -#define PRODUCT_VER_STRING "3.0.0.30238" -#define FILE_VER_STRING "WI-T3.0.0.30238" -#define LICENSE_VER_STRING "WI-T3.0.0.30238" -#define FILE_VER_NUMBER 3, 0, 0, 30238 +#define PRODUCT_VER_STRING "3.0.0.30241" +#define FILE_VER_STRING "WI-T3.0.0.30241" +#define LICENSE_VER_STRING "WI-T3.0.0.30241" +#define FILE_VER_NUMBER 3, 0, 0, 30241 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "30238" +#define FB_BUILD_NO "30241" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2013-02-28 16:24:31 UTC (rev 57710) +++ firebird/trunk/src/misc/writeBuildNum.sh 2013-03-01 01:44:39 UTC (rev 57711) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=30238 +BuildNum=30241 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2013-03-02 01:03:54
|
Revision: 57717 http://sourceforge.net/p/firebird/code/57717 Author: firebirds Date: 2013-03-02 01:03:49 +0000 (Sat, 02 Mar 2013) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2013-03-01 13:50:59 UTC (rev 57716) +++ firebird/trunk/ChangeLog 2013-03-02 01:03:49 UTC (rev 57717) @@ -1,3 +1,13 @@ + 2013-03-01 13:50 alexpeshkoff + M src/isql/InputDevices.cpp + M src/isql/InputDevices.h + M src/isql/isql.epp +Postfix for CORE-3990 + + 2013-03-01 11:55 alexpeshkoff + M src/isql/isql.epp +Fixed CORE-3990: Fix broken EDIT in isql + 2013-02-28 16:23 alexpeshkoff M src/jrd/blb.cpp M src/jrd/exe.cpp Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2013-03-01 13:50:59 UTC (rev 57716) +++ firebird/trunk/src/jrd/build_no.h 2013-03-02 01:03:49 UTC (rev 57717) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:30241 + FORMAL BUILD NUMBER:30243 */ -#define PRODUCT_VER_STRING "3.0.0.30241" -#define FILE_VER_STRING "WI-T3.0.0.30241" -#define LICENSE_VER_STRING "WI-T3.0.0.30241" -#define FILE_VER_NUMBER 3, 0, 0, 30241 +#define PRODUCT_VER_STRING "3.0.0.30243" +#define FILE_VER_STRING "WI-T3.0.0.30243" +#define LICENSE_VER_STRING "WI-T3.0.0.30243" +#define FILE_VER_NUMBER 3, 0, 0, 30243 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "30241" +#define FB_BUILD_NO "30243" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2013-03-01 13:50:59 UTC (rev 57716) +++ firebird/trunk/src/misc/writeBuildNum.sh 2013-03-02 01:03:49 UTC (rev 57717) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=30241 +BuildNum=30243 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <asf...@us...> - 2013-03-04 01:43:01
|
Revision: 57719 http://sourceforge.net/p/firebird/code/57719 Author: asfernandes Date: 2013-03-04 01:42:58 +0000 (Mon, 04 Mar 2013) Log Message: ----------- Fixing FB_MESSAGE macro and external functions and procedures. Isolate external routines them from request-based ones. Modified Paths: -------------- firebird/trunk/examples/udr/UdrCppExample.cpp firebird/trunk/src/dsql/ExprNodes.cpp firebird/trunk/src/dsql/StmtNodes.cpp firebird/trunk/src/include/firebird/ExternalEngine.h firebird/trunk/src/include/firebird/Message.h firebird/trunk/src/include/firebird/UdrCppEngine.h firebird/trunk/src/include/firebird/UdrEngine.h firebird/trunk/src/jrd/ExtEngineManager.cpp firebird/trunk/src/jrd/ExtEngineManager.h firebird/trunk/src/jrd/Function.epp firebird/trunk/src/jrd/cmp.cpp firebird/trunk/src/jrd/dfw.epp firebird/trunk/src/jrd/exe.cpp firebird/trunk/src/jrd/exe.h firebird/trunk/src/jrd/jrd.h firebird/trunk/src/jrd/met.epp firebird/trunk/src/jrd/met_proto.h firebird/trunk/src/jrd/recsrc/ProcedureScan.cpp firebird/trunk/src/jrd/recsrc/RecordSource.h firebird/trunk/src/plugins/udr_engine/UdrEngine.cpp Modified: firebird/trunk/examples/udr/UdrCppExample.cpp =================================================================== --- firebird/trunk/examples/udr/UdrCppExample.cpp 2013-03-02 02:02:11 UTC (rev 57718) +++ firebird/trunk/examples/udr/UdrCppExample.cpp 2013-03-04 01:42:58 UTC (rev 57719) @@ -117,451 +117,6 @@ //------------------------------------------------------------------------------ -class MessageImpl; - -class ParamDescBase -{ -public: - ParamDescBase() - : pos(0), - nullPos(0) - { - } - - unsigned pos; - unsigned nullPos; -}; - -template <class T> -class ParamDesc : public ParamDescBase -{ -}; - -template <> -class ParamDesc<void*> : public ParamDescBase -{ -public: - ParamDesc(MessageImpl& message, const Firebird::IParametersMetadata* aParams); - - unsigned align(unsigned size, unsigned aIndex) - { - index = aIndex; - - AutoDispose<IStatus> status(master->getStatus()); - - switch ((type = params->getType(status, index))) - { - case SQL_SHORT: - size = FB_ALIGN(size, sizeof(ISC_SHORT)); - break; - - case SQL_LONG: - size = FB_ALIGN(size, sizeof(ISC_LONG)); - break; - - case SQL_INT64: - size = FB_ALIGN(size, sizeof(ISC_INT64)); - break; - - case SQL_FLOAT: - size = FB_ALIGN(size, sizeof(float)); - break; - - case SQL_DOUBLE: - size = FB_ALIGN(size, sizeof(double)); - break; - - case SQL_BLOB: - size = FB_ALIGN(size, sizeof(ISC_QUAD)); - break; - - case SQL_TEXT: - case SQL_VARYING: - size = FB_ALIGN(size, sizeof(ISC_USHORT)); - break; - - default: - assert(false); - break; - } - - return size; - } - - unsigned addBlr(ISC_UCHAR*& blr) - { - AutoDispose<IStatus> status(master->getStatus()); - unsigned ret; - - switch (type) - { - case SQL_SHORT: - { - unsigned scale = params->getScale(status, index); - *blr++ = blr_short; - *blr++ = scale; - ret = sizeof(ISC_SHORT); - break; - } - - case SQL_LONG: - { - unsigned scale = params->getScale(status, index); - *blr++ = blr_long; - *blr++ = scale; - ret = sizeof(ISC_LONG); - break; - } - - case SQL_INT64: - { - unsigned scale = params->getScale(status, index); - *blr++ = blr_int64; - *blr++ = scale; - ret = sizeof(ISC_INT64); - break; - } - - case SQL_FLOAT: - *blr++ = blr_float; - ret = sizeof(float); - break; - - case SQL_DOUBLE: - *blr++ = blr_double; - ret = sizeof(double); - break; - - case SQL_BLOB: - *blr++ = blr_blob2; - *blr++ = 0; - *blr++ = 0; - *blr++ = 0; - *blr++ = 0; - ret = sizeof(ISC_QUAD); - break; - - case SQL_TEXT: - case SQL_VARYING: - { - unsigned length = params->getLength(status, index); - *blr++ = blr_varying; - *blr++ = length & 0xFF; - *blr++ = (length >> 8) & 0xFF; - ret = sizeof(ISC_USHORT) + length; - break; - } - - default: - assert(false); - ret = 0; - break; - } - - return ret; - } - - unsigned getType() const - { - return type; - } - -private: - const Firebird::IParametersMetadata* params; - unsigned type; - unsigned index; -}; - -class MessageImpl : public Firebird::FbMessage -{ -public: - MessageImpl(unsigned aItemCount, void* aBuffer = NULL) - : itemCount(aItemCount * 2), - freeBuffer(!aBuffer), - items(0) - { - static const ISC_UCHAR HEADER[] = { - blr_version5, - blr_begin, - blr_message, 0, 0, 0 - }; - - blrLength = 0; - blr = blrPos = new ISC_UCHAR[sizeof(HEADER) + 10 * itemCount + 2]; - bufferLength = 0; - buffer = static_cast<ISC_UCHAR*>(aBuffer); - - memcpy(blrPos, HEADER, sizeof(HEADER)); - blrPos += sizeof(HEADER); - } - - ~MessageImpl() - { - if (freeBuffer && buffer) - delete [] buffer; - - if (blr) - delete [] blr; - } - - template <typename T> - void add(ParamDesc<T>& paramDesc) - { - if (items >= itemCount) - return; // return an error, this is already constructed message - - bufferLength = paramDesc.align(bufferLength, items / 2); - paramDesc.pos = bufferLength; - bufferLength += paramDesc.addBlr(blrPos); - - bufferLength = FB_ALIGN(bufferLength, sizeof(ISC_SHORT)); - paramDesc.nullPos = bufferLength; - bufferLength += sizeof(ISC_SHORT); - - *blrPos++ = blr_short; - *blrPos++ = 0; - - items += 2; - - if (items == itemCount) - { - *blrPos++ = blr_end; - *blrPos++ = blr_eoc; - - blrLength = blrPos - blr; - - ISC_UCHAR* blrStart = blrPos - blrLength; - blrStart[4] = items & 0xFF; - blrStart[5] = (items >> 8) & 0xFF; - - if (!buffer) - { - buffer = new ISC_UCHAR[bufferLength]; - memset(buffer, 0, bufferLength); - } - } - } - - bool isNull(const ParamDescBase& index) - { - return *(ISC_SHORT*) (buffer + index.nullPos); - } - - void setNull(const ParamDescBase& index, bool null) - { - *(ISC_SHORT*) (buffer + index.nullPos) = (ISC_SHORT) null; - } - - template <typename T> T& operator [](const ParamDesc<T>& index) - { - return *(T*) (buffer + index.pos); - } - - void* operator [](const ParamDesc<void*>& index) - { - return buffer + index.pos; - } - -public: - unsigned itemCount; - bool freeBuffer; - unsigned items; - ISC_UCHAR* blrPos; -}; - -template <> -class ParamDesc<ISC_SHORT> : public ParamDescBase -{ -public: - ParamDesc(MessageImpl& message, ISC_UCHAR aScale = 0) - : scale(aScale) - { - message.add(*this); - } - - unsigned align(unsigned size, unsigned /*index*/) - { - return FB_ALIGN(size, sizeof(ISC_SHORT)); - } - - unsigned addBlr(ISC_UCHAR*& blr) - { - *blr++ = blr_short; - *blr++ = scale; - return sizeof(ISC_SHORT); - } - -private: - ISC_UCHAR scale; -}; - -template <> -class ParamDesc<ISC_LONG> : public ParamDescBase -{ -public: - ParamDesc(MessageImpl& message, ISC_UCHAR aScale = 0) - : scale(aScale) - { - message.add(*this); - } - - unsigned align(unsigned size, unsigned /*index*/) - { - return FB_ALIGN(size, sizeof(ISC_LONG)); - } - - unsigned addBlr(ISC_UCHAR*& blr) - { - *blr++ = blr_long; - *blr++ = scale; - return sizeof(ISC_LONG); - } - -private: - ISC_UCHAR scale; -}; - -template <> -class ParamDesc<ISC_INT64> : public ParamDescBase -{ -public: - ParamDesc(MessageImpl& message, ISC_UCHAR aScale = 0) - : scale(aScale) - { - message.add(*this); - } - - unsigned align(unsigned size, unsigned /*index*/) - { - return FB_ALIGN(size, sizeof(ISC_INT64)); - } - - unsigned addBlr(ISC_UCHAR*& blr) - { - *blr++ = blr_int64; - *blr++ = scale; - return sizeof(ISC_INT64); - } - -private: - ISC_UCHAR scale; -}; - -template <> -class ParamDesc<float> : public ParamDescBase -{ -public: - ParamDesc(MessageImpl& message) - { - message.add(*this); - } - - unsigned align(unsigned size, unsigned /*index*/) - { - return FB_ALIGN(size, sizeof(float)); - } - - unsigned addBlr(ISC_UCHAR*& blr) - { - *blr++ = blr_float; - return sizeof(float); - } -}; - -template <> -class ParamDesc<double> : public ParamDescBase -{ -public: - ParamDesc(MessageImpl& message) - { - message.add(*this); - } - - unsigned align(unsigned size, unsigned /*index*/) - { - return FB_ALIGN(size, sizeof(double)); - } - - unsigned addBlr(ISC_UCHAR*& blr) - { - *blr++ = blr_double; - return sizeof(double); - } -}; - -template <> -class ParamDesc<ISC_QUAD> : public ParamDescBase -{ -public: - ParamDesc(MessageImpl& message) - { - message.add(*this); - } - - unsigned align(unsigned size, unsigned /*index*/) - { - return FB_ALIGN(size, sizeof(ISC_QUAD)); - } - - unsigned addBlr(ISC_UCHAR*& blr) - { - *blr++ = blr_blob2; - *blr++ = 0; - *blr++ = 0; - *blr++ = 0; - *blr++ = 0; - return sizeof(ISC_QUAD); - } -}; - -struct FbString -{ - ISC_USHORT length; - char str[1]; -}; - -template <> -class ParamDesc<FbString> : public ParamDescBase -{ -public: - ParamDesc(MessageImpl& message, ISC_USHORT aLength) - : length(aLength) - { - message.add(*this); - } - - unsigned align(unsigned size, unsigned /*index*/) - { - return FB_ALIGN(size, sizeof(ISC_USHORT)); - } - - unsigned addBlr(ISC_UCHAR*& blr) - { - *blr++ = blr_varying; - *blr++ = length & 0xFF; - *blr++ = (length >> 8) & 0xFF; - return sizeof(ISC_USHORT) + length; - } - -private: - ISC_USHORT length; -}; - -//// TODO: boolean, date, time, timestamp - -//-------------------------------------- - -inline ParamDesc<void*>::ParamDesc(MessageImpl& message, const Firebird::IParametersMetadata* aParams) - : params(aParams), - type(0) -{ - message.add(*this); -} - - -//------------------------------------------------------------------------------ - - /*** create function wait_event ( event_name varchar(31) character set utf8 not null @@ -614,37 +169,65 @@ engine udr; ***/ FB_UDR_BEGIN_FUNCTION(sum_args) + // This function requires the INTEGER parameters and return value, otherwise it will crash. + // Metadata is inspected dynamically (in execute). This is not the fastest method. FB_UDR_EXECUTE_DYNAMIC_FUNCTION { - ///AutoDispose<IStatus> status(master->getStatus()); + // Get input and output metadata. - const IParametersMetadata* params = metadata->getInputParameters(status); + IMessageMetadata* inMetadata = metadata->getInputMetadata(status); StatusException::check(status->get()); - unsigned count = params->getCount(status); + IMessageMetadata* outMetadata = metadata->getOutputMetadata(status); StatusException::check(status->get()); - MessageImpl inMessage(count, in); + // Get count of input parameters. + unsigned inCount = inMetadata->getCount(status); + StatusException::check(status->get()); - MessageImpl outMessage(1, out); - ParamDesc<ISC_LONG> retDesc(outMessage); + // Get null offset of the return value. - int ret = 0; + unsigned outNullOffset = outMetadata->getNullOffset(status, 0); + StatusException::check(status->get()); - for (unsigned i = 0; i < count; ++i) + // By default, the return value is NOT NULL. + ///*(ISC_SHORT*) (out + outNullOffset) = FB_FALSE; + + // Get offset of the return value. + unsigned outOffset = outMetadata->getOffset(status, 0); + StatusException::check(status->get()); + + // Get a reference to the return value. + ISC_LONG& ret = *(ISC_LONG*) (out + outOffset); + + // By default, the return value is 0. + ///ret = 0; + + for (unsigned i = 0; i < inCount; ++i) { - ParamDesc<ISC_LONG> numDesc(inMessage); + // Get null offset of the i-th input parameter. + unsigned nullOffset = inMetadata->getNullOffset(status, i); + StatusException::check(status->get()); - if (inMessage.isNull(numDesc)) + // If the i-th input parameter is NULL, set the output to NULL and finish. + if (*(ISC_SHORT*) (in + nullOffset)) { - outMessage.setNull(retDesc, true); - return; + *(ISC_SHORT*) (out + outNullOffset) = FB_TRUE; + // Important: we should not return without release the metadata objects. + break; } - else - ret += inMessage[numDesc]; + + // Get the offset of the i-th input parameter. + unsigned offset = inMetadata->getOffset(status, i); + StatusException::check(status->get()); + + // Read the i-th input parameter value and sum it in the referenced return value. + ret += *(ISC_LONG*) (in + offset); } - outMessage[retDesc] = ret; + // Release refcounted objects. + inMetadata->release(); + outMetadata->release(); } FB_UDR_END_FUNCTION @@ -660,29 +243,61 @@ engine udr; ***/ FB_UDR_BEGIN_PROCEDURE(gen_rows) - FB_UDR_EXECUTE_DYNAMIC_PROCEDURE + // Procedure variables. + unsigned inOffsetStart, inOffsetEnd, outOffset; + + /*** Procedure destructor. + ~FB_UDR_PROCEDURE(gen_rows)() { - MessageImpl inMessage(2, in); - ParamDesc<ISC_LONG> startDesc(inMessage); - ParamDesc<ISC_LONG> endDesc(inMessage); + } + ***/ - counter = inMessage[startDesc]; - end = inMessage[endDesc]; + // Get offsets once per procedure. + FB_UDR_INITIALIZE + { + IMessageMetadata* inMetadata = metadata->getInputMetadata(status); + StatusException::check(status->get()); + + inOffsetStart = inMetadata->getOffset(status, 0); + StatusException::check(status->get()); + + inOffsetEnd = inMetadata->getOffset(status, 1); + StatusException::check(status->get()); + + inMetadata->release(); + + IMessageMetadata* outMetadata = metadata->getOutputMetadata(status); + StatusException::check(status->get()); + + outOffset = outMetadata->getOffset(status, 0); + StatusException::check(status->get()); + + outMetadata->release(); } + FB_UDR_EXECUTE_DYNAMIC_PROCEDURE + { + counter = *(ISC_LONG*) (in + procedure->inOffsetStart); + end = *(ISC_LONG*) (in + procedure->inOffsetEnd); + } + FB_UDR_FETCH_PROCEDURE { if (counter > end) return false; - MessageImpl outMessage(1, out); - ParamDesc<ISC_LONG> retDesc(outMessage); + *(ISC_LONG*) (out + procedure->outOffset) = counter++; - outMessage[retDesc] = counter++; - return true; } + /*** ResultSet destructor. + ~ResultSet() + { + } + ***/ + + // ResultSet variables. ISC_LONG counter; ISC_LONG end; FB_UDR_END_PROCEDURE @@ -795,6 +410,7 @@ FB_UDR_END_PROCEDURE +#if 0 //// FIXME: /*** Sample usage: @@ -1234,3 +850,4 @@ XSQLDA* inSqlDa; isc_stmt_handle stmtHandle; FB_UDR_END_TRIGGER +#endif Modified: firebird/trunk/src/dsql/ExprNodes.cpp =================================================================== --- firebird/trunk/src/dsql/ExprNodes.cpp 2013-03-02 02:02:11 UTC (rev 57718) +++ firebird/trunk/src/dsql/ExprNodes.cpp 2013-03-04 01:42:58 UTC (rev 57719) @@ -10657,7 +10657,11 @@ CMP_impure(csb, function->getInputFormat()->fmt_length); } - fb_assert(function->getOutputFormat()->fmt_count == 3); + if (function->fun_external) + fb_assert(function->getOutputFormat()->fmt_count == 2); + else + fb_assert(function->getOutputFormat()->fmt_count == 3); + fb_assert(function->getOutputFormat()->fmt_length); CMP_impure(csb, function->getOutputFormat()->fmt_length); } @@ -10745,6 +10749,13 @@ UCHAR* const inMsg = (UCHAR*) FB_ALIGN((IPTR) impure + sizeof(impure_value), FB_ALIGNMENT); UCHAR* const outMsg = (UCHAR*) FB_ALIGN((IPTR) inMsg + inMsgLength, FB_ALIGNMENT); + if (function->fun_external) + { + // We must clear messages of external functions. + memset(inMsg, 0, inMsgLength); + memset(outMsg, 0, outMsgLength); + } + if (function->fun_inputs != 0) { const NestConst<ValueExprNode>* const sourceEnd = args->items.end(); @@ -10772,32 +10783,14 @@ } } - jrd_req* funcRequest = function->getStatement()->findRequest(tdbb); + jrd_tra* transaction = request->req_transaction; + const SLONG savePointNumber = transaction->tra_save_point ? + transaction->tra_save_point->sav_number : 0; - // trace function execution start - //// TODO: TraceProcExecute trace(tdbb, funcRequest, request, inputTargets); - - // Catch errors so we can unwind cleanly. - - try + if (function->fun_external) { - Jrd::ContextPoolHolder context(tdbb, funcRequest->req_pool); // Save the old pool. + function->fun_external->execute(tdbb, inMsg, outMsg); - jrd_tra* transaction = request->req_transaction; - const SLONG savePointNumber = transaction->tra_save_point ? - transaction->tra_save_point->sav_number : 0; - - funcRequest->req_timestamp = request->req_timestamp; - - EXE_start(tdbb, funcRequest, transaction); - - if (inMsgLength != 0) - EXE_send(tdbb, funcRequest, 0, inMsgLength, inMsg); - - EXE_receive(tdbb, funcRequest, 1, outMsgLength, outMsg); - - // Clean up all savepoints started during execution of the procedure. - if (transaction != attachment->getSysTransaction()) { for (const Savepoint* savePoint = transaction->tra_save_point; @@ -10808,30 +10801,65 @@ } } } - catch (const Exception& ex) + else { - /*** TODO: - const bool noPriv = (ex.stuff_exception(tdbb->tdbb_status_vector) == isc_no_priv); - trace.finish(false, noPriv ? res_unauthorized : res_failed); - ***/ + jrd_req* funcRequest = function->getStatement()->findRequest(tdbb); + // trace function execution start + //// TODO: TraceProcExecute trace(tdbb, funcRequest, request, inputTargets); + + // Catch errors so we can unwind cleanly. + + try + { + Jrd::ContextPoolHolder context(tdbb, funcRequest->req_pool); // Save the old pool. + + funcRequest->req_timestamp = request->req_timestamp; + + EXE_start(tdbb, funcRequest, transaction); + + if (inMsgLength != 0) + EXE_send(tdbb, funcRequest, 0, inMsgLength, inMsg); + + EXE_receive(tdbb, funcRequest, 1, outMsgLength, outMsg); + + // Clean up all savepoints started during execution of the procedure. + + if (transaction != attachment->getSysTransaction()) + { + for (const Savepoint* savePoint = transaction->tra_save_point; + savePoint && savePointNumber < savePoint->sav_number; + savePoint = transaction->tra_save_point) + { + VIO_verb_cleanup(tdbb, transaction); + } + } + } + catch (const Exception& ex) + { + /*** TODO: + const bool noPriv = (ex.stuff_exception(tdbb->tdbb_status_vector) == isc_no_priv); + trace.finish(false, noPriv ? res_unauthorized : res_failed); + ***/ + + tdbb->setRequest(request); + EXE_unwind(tdbb, funcRequest); + funcRequest->req_attachment = NULL; + funcRequest->req_flags &= ~(req_in_use | req_proc_fetch); + funcRequest->req_timestamp.invalidate(); + throw; + } + + //// TODO: trace.finish(false, res_successful); + + EXE_unwind(tdbb, funcRequest); tdbb->setRequest(request); - EXE_unwind(tdbb, funcRequest); + funcRequest->req_attachment = NULL; funcRequest->req_flags &= ~(req_in_use | req_proc_fetch); funcRequest->req_timestamp.invalidate(); - throw; } - //// TODO: trace.finish(false, res_successful); - - EXE_unwind(tdbb, funcRequest); - tdbb->setRequest(request); - - funcRequest->req_attachment = NULL; - funcRequest->req_flags &= ~(req_in_use | req_proc_fetch); - funcRequest->req_timestamp.invalidate(); - const dsc* fmtDesc = function->getOutputFormat()->fmt_desc.begin(); const ULONG nullOffset = (IPTR) fmtDesc[1].dsc_address; SSHORT* const nullPtr = reinterpret_cast<SSHORT*>(outMsg + nullOffset); Modified: firebird/trunk/src/dsql/StmtNodes.cpp =================================================================== --- firebird/trunk/src/dsql/StmtNodes.cpp 2013-03-02 02:02:11 UTC (rev 57718) +++ firebird/trunk/src/dsql/StmtNodes.cpp 2013-03-04 01:42:58 UTC (rev 57719) @@ -1564,7 +1564,7 @@ PAR_error(csb, Arg::Gds(isc_prc_out_param_mismatch) << name); Format* format = Format::newFormat(pool, paramArray.getCount()); - subProc->prc_format = format; + subProc->prc_record_format = format; format->fmt_length = FLAG_BYTES(format->fmt_count); for (USHORT i = 0; i < count - 1u; i += 2u) @@ -1754,7 +1754,7 @@ } fb_assert(subCsb->csb_rpt.getCount() >= 2); - routine->prc_output_msg = subCsb->csb_rpt[1].csb_message; + ///routine->prc_output_msg = subCsb->csb_rpt[1].csb_message; return this; } @@ -2717,16 +2717,6 @@ { Jrd::Attachment* attachment = tdbb->getAttachment(); - if (inputSources) - { - const NestConst<ValueExprNode>* const sourceEnd = inputSources->items.end(); - const NestConst<ValueExprNode>* sourcePtr = inputSources->items.begin(); - const NestConst<ValueExprNode>* targetPtr = inputTargets->items.begin(); - - for (; sourcePtr != sourceEnd; ++sourcePtr, ++targetPtr) - EXE_assignment(tdbb, *sourcePtr, *targetPtr); - } - ULONG inMsgLength = 0; UCHAR* inMsg = NULL; @@ -2739,6 +2729,7 @@ const Format* format = NULL; ULONG outMsgLength = 0; UCHAR* outMsg = NULL; + Array<UCHAR> tempBuffer; if (outputMessage) { @@ -2746,41 +2737,44 @@ outMsgLength = format->fmt_length; outMsg = request->getImpure<UCHAR>(outputMessage->impureOffset); } - - jrd_req* procRequest = procedure->getStatement()->findRequest(tdbb); - - // trace procedure execution start - TraceProcExecute trace(tdbb, procRequest, request, inputTargets); - - Array<UCHAR> tempBuffer; - - if (!outputMessage) + else { - format = procedure->prc_output_msg->format; + ///format = procedure->prc_output_msg->format; + format = procedure->getOutputFormat(); outMsgLength = format->fmt_length; outMsg = tempBuffer.getBuffer(outMsgLength + FB_DOUBLE_ALIGN - 1); outMsg = (UCHAR*) FB_ALIGN((U_IPTR) outMsg, FB_DOUBLE_ALIGN); } - // Catch errors so we can unwind cleanly. + if (procedure->getExternal()) + { + // We must clear messages of external procedures. + memset(inMsg, 0, inMsgLength); + memset(outMsg, 0, outMsgLength); + } - try + if (inputSources) { - Jrd::ContextPoolHolder context(tdbb, procRequest->req_pool); // Save the old pool. + const NestConst<ValueExprNode>* const sourceEnd = inputSources->items.end(); + const NestConst<ValueExprNode>* sourcePtr = inputSources->items.begin(); + const NestConst<ValueExprNode>* targetPtr = inputTargets->items.begin(); - jrd_tra* transaction = request->req_transaction; - const SLONG savePointNumber = transaction->tra_save_point ? - transaction->tra_save_point->sav_number : 0; + for (; sourcePtr != sourceEnd; ++sourcePtr, ++targetPtr) + EXE_assignment(tdbb, *sourcePtr, *targetPtr); + } - procRequest->req_timestamp = request->req_timestamp; + jrd_tra* transaction = request->req_transaction; + const SLONG savePointNumber = transaction->tra_save_point ? + transaction->tra_save_point->sav_number : 0; - EXE_start(tdbb, procRequest, transaction); + if (procedure->getExternal()) + { + { // scope + AutoPtr<ExtEngineManager::ResultSet> resultSet(procedure->getExternal()->open( + tdbb, inMsg, outMsg)); + resultSet->fetch(tdbb); + } - if (inputMessage) - EXE_send(tdbb, procRequest, 0, inMsgLength, inMsg); - - EXE_receive(tdbb, procRequest, 1, outMsgLength, outMsg); - // Clean up all savepoints started during execution of the procedure. if (transaction != attachment->getSysTransaction()) @@ -2793,25 +2787,64 @@ } } } - catch (const Exception& ex) + else { - const bool noPriv = (ex.stuff_exception(tdbb->tdbb_status_vector) == isc_no_priv); - trace.finish(false, noPriv ? res_unauthorized : res_failed); + jrd_req* procRequest = procedure->getStatement()->findRequest(tdbb); + // trace procedure execution start + TraceProcExecute trace(tdbb, procRequest, request, inputTargets); + + // Catch errors so we can unwind cleanly. + + try + { + Jrd::ContextPoolHolder context(tdbb, procRequest->req_pool); // Save the old pool. + + procRequest->req_timestamp = request->req_timestamp; + + EXE_start(tdbb, procRequest, transaction); + + if (inputMessage) + EXE_send(tdbb, procRequest, 0, inMsgLength, inMsg); + + EXE_receive(tdbb, procRequest, 1, outMsgLength, outMsg); + + // Clean up all savepoints started during execution of the procedure. + + if (transaction != attachment->getSysTransaction()) + { + for (const Savepoint* savePoint = transaction->tra_save_point; + savePoint && savePointNumber < savePoint->sav_number; + savePoint = transaction->tra_save_point) + { + VIO_verb_cleanup(tdbb, transaction); + } + } + } + catch (const Exception& ex) + { + const bool noPriv = (ex.stuff_exception(tdbb->tdbb_status_vector) == isc_no_priv); + trace.finish(false, noPriv ? res_unauthorized : res_failed); + + tdbb->setRequest(request); + EXE_unwind(tdbb, procRequest); + procRequest->req_attachment = NULL; + procRequest->req_flags &= ~(req_in_use | req_proc_fetch); + procRequest->req_timestamp.invalidate(); + throw; + } + + // trace procedure execution finish + trace.finish(false, res_successful); + + EXE_unwind(tdbb, procRequest); tdbb->setRequest(request); - EXE_unwind(tdbb, procRequest); + procRequest->req_attachment = NULL; procRequest->req_flags &= ~(req_in_use | req_proc_fetch); procRequest->req_timestamp.invalidate(); - throw; } - // trace procedure execution finish - trace.finish(false, res_successful); - - EXE_unwind(tdbb, procRequest); - tdbb->setRequest(request); - if (outputSources) { const NestConst<ValueExprNode>* const sourceEnd = outputSources->items.end(); @@ -2821,10 +2854,6 @@ for (; sourcePtr != sourceEnd; ++sourcePtr, ++targetPtr) EXE_assignment(tdbb, *sourcePtr, *targetPtr); } - - procRequest->req_attachment = NULL; - procRequest->req_flags &= ~(req_in_use | req_proc_fetch); - procRequest->req_timestamp.invalidate(); } Modified: firebird/trunk/src/include/firebird/ExternalEngine.h =================================================================== --- firebird/trunk/src/include/firebird/ExternalEngine.h 2013-03-02 02:02:11 UTC (rev 57718) +++ firebird/trunk/src/include/firebird/ExternalEngine.h 2013-03-04 01:42:58 UTC (rev 57719) @@ -38,14 +38,6 @@ class ExternalEngine; -class IRoutineMessage : public IVersioned -{ -public: - virtual void FB_CARG set(const unsigned char* blr, unsigned blrLength, unsigned bufferLength) = 0; -}; -#define FB_ROUTINE_MESSAGE_VERSION (FB_VERSIONED_VERSION + 1) - - class ITriggerMessage : public IVersioned { public: @@ -205,9 +197,11 @@ // Called when engine wants to load object in the cache. Objects are disposed when // going out of the cache. virtual ExternalFunction* FB_CALL makeFunction(IStatus* status, ExternalContext* context, - const IRoutineMetadata* metadata, IRoutineMessage* inMsg, IRoutineMessage* outMsg) = 0; + const IRoutineMetadata* metadata, + IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) = 0; virtual ExternalProcedure* FB_CALL makeProcedure(IStatus* status, ExternalContext* context, - const IRoutineMetadata* metadata, IRoutineMessage* inMsg, IRoutineMessage* outMsg) = 0; + const IRoutineMetadata* metadata, + IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) = 0; virtual ExternalTrigger* FB_CALL makeTrigger(IStatus* status, ExternalContext* context, const IRoutineMetadata* metadata, ITriggerMessage* triggerMsg) = 0; }; Modified: firebird/trunk/src/include/firebird/Message.h =================================================================== --- firebird/trunk/src/include/firebird/Message.h 2013-03-02 02:02:11 UTC (rev 57718) +++ firebird/trunk/src/include/firebird/Message.h 2013-03-04 01:42:58 UTC (rev 57719) @@ -24,16 +24,14 @@ #define FIREBIRD_MESSAGE_H #include "ibase.h" -#include "firebird/impl/boost/preprocessor/seq/for_each_i.hpp" +#include "./Provider.h" +#include "./impl/boost/preprocessor/seq/for_each_i.hpp" #include <assert.h> #include <time.h> #include <string.h> #define FB_MESSAGE(name, fields) \ - struct name \ - { \ - FB_MESSAGE_I(name, 2, FB_BOOST_PP_CAT(FB_MESSAGE_X fields, 0)) \ - } + FB_MESSAGE_I(name, 2, FB_BOOST_PP_CAT(FB_MESSAGE_X fields, 0)) #define FB_MESSAGE_X(x, y) ((x, y)) FB_MESSAGE_Y #define FB_MESSAGE_Y(x, y) ((x, y)) FB_MESSAGE_X @@ -53,61 +51,136 @@ #define FB_TRIGGER_MESSAGE_Y0 #define FB_MESSAGE_I(name, size, fields) \ - static const unsigned char* getBlr(unsigned* length) \ + struct name \ { \ - static const unsigned char blr[] = { \ - blr_version5, \ - blr_begin, \ - blr_message, 0, \ - (2 * (FB_BOOST_PP_SEQ_SIZE(fields))) & 0xFF, \ - (2 * (FB_BOOST_PP_SEQ_SIZE(fields))) >> 8, \ - FB_BOOST_PP_SEQ_FOR_EACH_I(FB_MESSAGE_BLR, size, fields) \ - blr_end, \ - blr_eoc \ + struct Type \ + { \ + FB_BOOST_PP_SEQ_FOR_EACH_I(FB_MESSAGE_FIELD, size, fields) \ }; \ - *length = sizeof(blr); \ - return blr; \ - } \ - \ - static unsigned getSize() \ - { \ - return (unsigned)(size_t) (&((name*) 0)->FB_BOOST_PP_CAT( \ - FB_BOOST_PP_TUPLE_ELEM(size, 1, \ - FB_BOOST_PP_SEQ_ELEM(FB_BOOST_PP_DEC(FB_BOOST_PP_SEQ_SIZE(fields)), fields)), \ - Null) - 0) + sizeof(ISC_SHORT); \ - } \ - \ - void clear() \ - { \ - memset(this, 0, sizeof(*this)); \ - } \ - \ - FB_BOOST_PP_SEQ_FOR_EACH_I(FB_MESSAGE_FIELD, size, fields) + \ + static void setup(IStatus* status, ::Firebird::IMetadataBuilder* builder) \ + { \ + unsigned index = 0; \ + FB_BOOST_PP_SEQ_FOR_EACH_I(FB_MESSAGE_META, size, fields) \ + } \ + \ + name(::Firebird::IMaster* master) \ + : desc(master, FB_BOOST_PP_SEQ_SIZE(fields), &setup) \ + { \ + } \ + \ + ::Firebird::IMessageMetadata* getMetadata() const \ + { \ + return desc.getMetadata(); \ + } \ + \ + void clear() \ + { \ + memset(&data, 0, sizeof(data)); \ + } \ + \ + Type* getData() \ + { \ + return &data; \ + } \ + \ + const Type* getData() const \ + { \ + return &data; \ + } \ + \ + Type* operator ->() \ + { \ + return getData(); \ + } \ + \ + const Type* operator ->() const \ + { \ + return getData(); \ + } \ + \ + Type data; \ + ::Firebird::MessageDesc desc; \ + } #define FB_MESSAGE_FIELD(r, _, i, xy) \ FB_BOOST_PP_CAT(FB_TYPE_, FB_BOOST_PP_TUPLE_ELEM(_, 0, xy)) FB_BOOST_PP_TUPLE_ELEM(_, 1, xy); \ ISC_SHORT FB_BOOST_PP_CAT(FB_BOOST_PP_TUPLE_ELEM(_, 1, xy), Null); -#define FB_MESSAGE_BLR(r, _, i, xy) \ - FB_BOOST_PP_CAT(FB_BLR_, FB_BOOST_PP_TUPLE_ELEM(_, 0, xy)), \ - FB_BLR_FB_SMALLINT, +#define FB_MESSAGE_META(r, _, i, xy) \ + FB_BOOST_PP_CAT(FB_META_, FB_BOOST_PP_TUPLE_ELEM(_, 0, xy)) -#define FB_BLR_FB_SCALED_SMALLINT(scale) blr_short, (scale) -#define FB_BLR_FB_SCALED_INTEGER(scale) blr_long, (scale) -#define FB_BLR_FB_SCALED_BIGINT(scale) blr_int64, (scale) -#define FB_BLR_FB_SMALLINT FB_BLR_FB_SCALED_SMALLINT(0) -#define FB_BLR_FB_INTEGER FB_BLR_FB_SCALED_INTEGER(0) -#define FB_BLR_FB_BIGINT FB_BLR_FB_SCALED_BIGINT(0) -#define FB_BLR_FB_FLOAT blr_float -#define FB_BLR_FB_DOUBLE blr_double -#define FB_BLR_FB_BLOB blr_blob2, 0, 0, 0, 0 -#define FB_BLR_FB_BOOLEAN blr_bool -#define FB_BLR_FB_DATE blr_sql_date -#define FB_BLR_FB_TIME blr_sql_time -#define FB_BLR_FB_TIMESTAMP blr_timestamp -#define FB_BLR_FB_CHAR(len) blr_text2, 0, 0, (len) & 0xFF, (len) >> 8 -#define FB_BLR_FB_VARCHAR(len) blr_varying2, 0, 0, (len) & 0xFF, (len) >> 8 +// Types - metadata +#define FB_META_FB_SCALED_SMALLINT(scale) \ + builder->setType(status, index, SQL_SHORT); \ + builder->setLength(status, index, sizeof(ISC_SHORT)); \ + builder->setScale(status, index, scale); \ + ++index; + +#define FB_META_FB_SCALED_INTEGER(scale) \ + builder->setType(status, index, SQL_LONG); \ + builder->setLength(status, index, sizeof(ISC_LONG)); \ + builder->setScale(status, index, scale); \ + ++index; + +#define FB_META_FB_SCALED_BIGINT(scale) \ + builder->setType(status, index, SQL_INT64); \ + builder->setLength(status, index, sizeof(ISC_INT64)); \ + builder->setScale(status, index, scale); \ + ++index; + +#define FB_META_FB_FLOAT \ + builder->setType(status, index, SQL_FLOAT); \ + builder->setLength(status, index, sizeof(float)); \ + ++index; + +#define FB_META_FB_DOUBLE \ + builder->setType(status, index, SQL_DOUBLE); \ + builder->setLength(status, index, sizeof(double)); \ + ++index; + +#define FB_META_FB_BLOB \ + builder->setType(status, index, SQL_BLOB); \ + builder->setLength(status, index, sizeof(ISC_QUAD)); \ + ++index; + +#define FB_META_FB_BOOLEAN \ + builder->setType(status, index, SQL_BOOLEAN); \ + builder->setLength(status, index, sizeof(ISC_BOOLEAN)); \ + ++index; + +#define FB_META_FB_DATE \ + builder->setType(status, index, SQL_DATE); \ + builder->setLength(status, index, sizeof(FbDate)); \ + ++index; + +#define FB_META_FB_TIME \ + builder->setType(status, index, SQL_TIME); \ + builder->setLength(status, index, sizeof(FbTime)); \ + ++index; + +#define FB_META_FB_TIMESTAMP \ + builder->setType(status, index, SQL_TIMESTAMP); \ + builder->setLength(status, index, sizeof(FbTimestamp)); \ + ++index; + +#define FB_META_FB_CHAR(len) \ + builder->setType(status, index, SQL_TEXT); \ + builder->setLength(status, index, len); \ + ++index; + +#define FB_META_FB_VARCHAR(len) \ + builder->setType(status, index, SQL_VARYING); \ + builder->setLength(status, index, len); \ + ++index; + +#define FB_META_FB_SMALLINT FB_META_FB_SCALED_SMALLINT(0) +#define FB_META_FB_INTEGER FB_META_FB_SCALED_INTEGER(0) +#define FB_META_FB_BIGINT FB_META_FB_SCALED_BIGINT(0) + +// Types - struct + #define FB_TYPE_FB_SCALED_SMALLINT(x) ISC_SHORT #define FB_TYPE_FB_SCALED_INTEGER(x) ISC_LONG #define FB_TYPE_FB_SCALED_BIGINT(x) ISC_INT64 @@ -322,7 +395,37 @@ FbTime time; }; +class MessageDesc +{ +public: + MessageDesc(IMaster* master, unsigned count, void (*setup)(IStatus*, IMetadataBuilder*)) + { + IStatus* status = master->getStatus(); + IMetadataBuilder* builder = master->getMetadataBuilder(status, count); + setup(status, builder); + + metadata = builder->getMetadata(status); + + builder->release(); + status->dispose(); + } + + ~MessageDesc() + { + metadata->release(); + } + + IMessageMetadata* getMetadata() const + { + return metadata; + } + +private: + IMessageMetadata* metadata; +}; + + } // namespace Firebird #endif // FIREBIRD_MESSAGE_H Modified: firebird/trunk/src/include/firebird/UdrCppEngine.h =================================================================== --- firebird/trunk/src/include/firebird/UdrCppEngine.h 2013-03-02 02:02:11 UTC (rev 57718) +++ firebird/trunk/src/include/firebird/UdrCppEngine.h 2013-03-04 01:42:58 UTC (rev 57719) @@ -61,10 +61,10 @@ }; #define FB_UDR_EXECUTE_DYNAMIC_FUNCTION \ - typedef void* InMessage; \ - typedef void* OutMessage; \ + FB_UDR__DYNAMIC_TYPE(InMessage); \ + FB_UDR__DYNAMIC_TYPE(OutMessage); \ \ - FB_UDR_EXECUTE__FUNCTION + FB_UDR__EXECUTE_FUNCTION #define FB_UDR_EXECUTE_MESSAGE_FUNCTION(inputs, output) \ FB_MESSAGE(InMessage, \ @@ -74,29 +74,29 @@ output \ ); \ \ - FB_UDR_EXECUTE__FUNCTION + FB_UDR__EXECUTE_FUNCTION #define FB_UDR_EXECUTE_MESSAGE_FUNCTION_OUT(outputs) \ - typedef void* InMessage; \ + FB_UDR__DYNAMIC_TYPE(InMessage); \ FB_MESSAGE(OutMessage, \ outputs \ ); \ \ - FB_UDR_EXECUTE__FUNCTION + FB_UDR__EXECUTE_FUNCTION -#define FB_UDR_EXECUTE__FUNCTION \ +#define FB_UDR__EXECUTE_FUNCTION \ virtual void FB_CALL execute(::Firebird::IStatus* status, ::Firebird::ExternalContext* context, \ void* in, void* out) \ { \ try \ { \ - internalExecute(status, context, (InMessage*) in, (OutMessage*) out); \ + internalExecute(status, context, (InMessage::Type*) in, (OutMessage::Type*) out); \ } \ FB_UDR__CATCH \ } \ \ void internalExecute(::Firebird::IStatus* status, ::Firebird::ExternalContext* context, \ - InMessage* in, OutMessage* out) + InMessage::Type* in, OutMessage::Type* out) #define FB_UDR_BEGIN_PROCEDURE(name) \ @@ -118,10 +118,10 @@ }; #define FB_UDR_EXECUTE_DYNAMIC_PROCEDURE \ - typedef void* InMessage; \ - typedef void* OutMessage; \ + FB_UDR__DYNAMIC_TYPE(InMessage); \ + FB_UDR__DYNAMIC_TYPE(OutMessage); \ \ - FB_UDR_EXECUTE__PROCEDURE + FB_UDR__EXECUTE_PROCEDURE #define FB_UDR_EXECUTE_MESSAGE_PROCEDURE(inputs, outputs) \ FB_MESSAGE(InMessage, \ @@ -131,31 +131,31 @@ outputs \ ); \ \ - FB_UDR_EXECUTE__PROCEDURE + FB_UDR__EXECUTE_PROCEDURE #define FB_UDR_EXECUTE_MESSAGE_PROCEDURE_IN(inputs) \ FB_MESSAGE(InMessage, \ inputs \ ); \ - typedef void* OutMessage; \ + FB_UDR__DYNAMIC_TYPE(OutMessage); \ \ - FB_UDR_EXECUTE__PROCEDURE + FB_UDR__EXECUTE_PROCEDURE #define FB_UDR_EXECUTE_MESSAGE_PROCEDURE_OUT(outputs) \ - typedef void* InMessage; \ + FB_UDR__DYNAMIC_TYPE(InMessage); \ FB_MESSAGE(OutMessage, \ outputs \ ); \ \ - FB_UDR_EXECUTE__PROCEDURE + FB_UDR__EXECUTE_PROCEDURE -#define FB_UDR_EXECUTE__PROCEDURE \ +#define FB_UDR__EXECUTE_PROCEDURE \ virtual ::Firebird::ExternalResultSet* FB_CALL open(::Firebird::IStatus* status, \ ::Firebird::ExternalContext* context, void* in, void* out) \ { \ try \ { \ - return new ResultSet(status, context, this, (InMessage*) in, (OutMessage*) out); \ + return new ResultSet(status, context, this, (InMessage::Type*) in, (OutMessage::Type*) out); \ } \ FB_UDR__CATCH \ \ @@ -166,7 +166,7 @@ { \ public: \ ResultSet(::Firebird::IStatus* status, ::Firebird::ExternalContext* context, \ - This* const procedure, InMessage* const in, OutMessage* const out) \ + This* const procedure, InMessage::Type* const in, OutMessage::Type* const out) \ : ::Firebird::Udr::ResultSet<ResultSet, This, InMessage, OutMessage>( \ context, procedure, in, out) @@ -204,16 +204,16 @@ #define FB_UDR_EXECUTE_DYNAMIC_TRIGGER \ typedef void* FieldsMessage; \ \ - FB_UDR_EXECUTE__TRIGGER + FB_UDR__EXECUTE_TRIGGER #define FB_UDR_EXECUTE_MESSAGE_TRIGGER(fields) \ FB_TRIGGER_MESSAGE(FieldsMessage, \ fields \ ); \ \ - FB_UDR_EXECUTE__TRIGGER + FB_UDR__EXECUTE_TRIGGER -#define FB_UDR_EXECUTE__TRIGGER \ +#define FB_UDR__EXECUTE_TRIGGER \ virtual void FB_CALL execute(::Firebird::IStatus* status, ::Firebird::ExternalContext* context, \ ::Firebird::ExternalTrigger::Action action, void* oldFields, void* newFields) \ { \ @@ -241,6 +241,14 @@ void internalInitialize(::Firebird::IStatus* status, ::Firebird::ExternalContext* context) +#define FB_UDR__DYNAMIC_TYPE(name) \ + struct name \ + { \ + typedef unsigned char Type; \ + static void setup(::Firebird::IStatus*, ::Firebird::IMetadataBuilder*) {} \ + } + + #define FB_UDR__CATCH \ catch (const ::Firebird::Udr::StatusException& e) \ { \ @@ -437,7 +445,7 @@ { public: ResultSet(ExternalContext* aContext, Procedure* aProcedure, - InMessage* aIn, OutMessage* aOut) + typename InMessage::Type* aIn, typename OutMessage::Type* aOut) : context(aContext), procedure(aProcedure), in(aIn), @@ -454,8 +462,8 @@ protected: ExternalContext* const context; Procedure* const procedure; - InMessage* const in; - OutMessage* const out; + typename InMessage::Type* const in; + typename OutMessage::Type* const out; }; @@ -572,11 +580,11 @@ fbUdrRegFunction(name, this); } - virtual void setup(IStatus* /*status*/, ExternalContext* /*context*/, - const IRoutineMetadata* /*metadata*/, IRoutineMessage* in, IRoutineMessage* out) + virtual void setup(IStatus* status, ExternalContext* /*context*/, + const IRoutineMetadata* /*metadata*/, IMetadataBuilder* in, IMetadataBuilder* out) { - setBlr(in, (typename T::InMessage*) 0); - setBlr(out, (typename T::OutMessage*) 0); + T::InMessage::setup(status, in); + T::OutMessage::setup(status, out); } virtual ExternalFunction* FB_CALL newItem(IStatus* status, ExternalContext* context, @@ -586,18 +594,6 @@ obj->initialize(status, context); return obj; } - -private: - template <typename MessageType> void setBlr(IRoutineMessage* blrMessage, MessageType*) - { - unsigned blrLength; - const unsigned char* blr = MessageType::getBlr(&blrLength); - blrMessage->set(blr, blrLength, MessageType::getSize()); - } - - void setBlr(IRoutineMessage* /*blrMessage*/, void**) - { - } }; @@ -609,11 +605,11 @@ fbUdrRegProcedure(name, this); } - virtual void setup(IStatus* /*status*/, ExternalContext* /*context*/, - const IRoutineMetadata* /*metadata*/, IRoutineMessage* in, IRoutineMessage* out) + virtual void setup(IStatus* status, ExternalContext* /*context*/, + const IRoutineMetadata* /*metadata*/, IMetadataBuilder* in, IMetadataBuilder* out) { - setBlr(in, (typename T::InMessage*) 0); - setBlr(out, (typename T::OutMessage*) 0); + T::InMessage::setup(status, in); + T::OutMessage::setup(status, out); } virtual ExternalProcedure* FB_CALL newItem(IStatus* status, ExternalContext* context, @@ -623,18 +619,6 @@ obj->initialize(status, context); return obj; } - -private: - template <typename MessageType> void setBlr(IRoutineMessage* blrMessage, MessageType*) - { - unsigned blrLength; - const unsigned char* blr = MessageType::getBlr(&blrLength); - blrMessage->set(blr, blrLength, MessageType::getSize()); - } - - void setBlr(IRoutineMessage* /*blrMessage*/, void**) - { - } }; @@ -646,10 +630,10 @@ fbUdrRegTrigger(name, this); } - virtual void setup(IStatus* /*status*/, ExternalContext* /*context*/, + virtual void setup(IStatus* status, ExternalContext* /*context*/, const IRoutineMetadata* /*metadata*/, ITriggerMessage* fields) { - setBlr(fields, (typename T::FieldsMessage*) 0); + T::FieldsMessage::setup(status, fields); } virtual ExternalTrigger* FB_CALL newItem(IStatus* status, ExternalContext* context, @@ -659,20 +643,6 @@ obj->initialize(status, context); return obj; } - -private: - template <typename MessageType> void setBlr(ITriggerMessage* blrMessage, MessageType*) - { - unsigned blrLength, namesCount; - const unsigned char* blr = MessageType::getBlr(&blrLength); - const char** names = MessageType::getNames(&namesCount); - - blrMessage->set(blr, blrLength, MessageType::getSize(), names, namesCount); - } - - void setBlr(ITriggerMessage* /*blrMessage*/, void**) - { - } }; Modified: firebird/trunk/src/include/firebird/UdrEngine.h =================================================================== --- firebird/trunk/src/include/firebird/UdrEngine.h 2013-03-02 02:02:11 UTC (rev 57718) +++ firebird/trunk/src/include/firebird/UdrEngine.h 2013-03-04 01:42:58 UTC (rev 57719) @@ -40,7 +40,7 @@ { public: virtual void setup(IStatus* status, ExternalContext* context, const IRoutineMetadata* metadata, - IRoutineMessage* in, IRoutineMessage* out) = 0; + IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) = 0; virtual ExternalFunction* FB_CALL newItem(IStatus* status, ExternalContext* context, const IRoutineMetadata* metadata) = 0; }; @@ -49,7 +49,7 @@ { public: virtual void setup(IStatus* status, ExternalContext* context, const IRoutineMetadata* metadata, - IRoutineMessage* in, IRoutineMessage* out) = 0; + IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) = 0; virtual ExternalProcedure* FB_CALL newItem(IStatus* status, ExternalContext* context, const IRoutineMetadata* metadata) = 0; }; Modified: firebird/trunk/src/jrd/ExtEngineManager.cpp =================================================================== --- firebird/trunk/src/jrd/ExtEngineManager.cpp 2013-03-02 02:02:11 UTC (rev 57718) +++ firebird/trunk/src/jrd/ExtEngineManager.cpp 2013-03-04 01:42:58 UTC (rev 57719) @@ -58,8 +58,52 @@ namespace Jrd { -MakeUpgradeInfo<> upInfo; +static MakeUpgradeInfo<> upInfo; + +static Format* createFormat(MemoryPool& pool, IMessageMetadata* params) +{ + LocalStatus status; + + unsigned count = params->getCount(&status); + status.check(); + + Format* format = Format::newFormat(pool, count * 2); + unsigned runOffset = 0; + + dsc* desc = format->fmt_desc.begin(); + + for (unsigned i = 0; i < count; ++i) + { + unsigned descOffset, nullOffset, descDtype, descLength; + + runOffset = fb_utils::sqlTypeToDsc(runOffset, params->getType(&status, i), + params->getLength(&status, i), &descDtype, &descLength, + &descOffset, &nullOffset); + status.check(); + + desc->clear(); + desc->dsc_dtype = descDtype; + desc->dsc_length = descLength; + desc->dsc_scale = params->getScale(&status, i); + desc->dsc_sub_type = params->getSubType(&status, i); + desc->setTextType(params->getCharset(&status, i)); + desc->dsc_address = (UCHAR*)(IPTR) descOffset; + desc->dsc_flags = (params->isNullable(&status, i) ? DSC_nullable : 0); + + ++desc; + desc->makeShort(0, (SSHORT*)(IPTR) nullOffset); + status.check(); + + ++desc; + } + + format->fmt_length = runOffset; + + return format; +} + + template <typename T> class ExtEngineManager::ContextManager { public: @@ -728,9 +772,8 @@ } -ExtEngineManager::Function* ExtEngineManager::makeFunction(thread_db* tdbb, const Jrd::Function* udf, - const MetaName& engine, const string& entryPoint, const string& body, - RoutineMessage* inMsg, RoutineMessage* outMsg) +void ExtEngineManager::makeFunction(thread_db* tdbb, Jrd::Function* udf, + const MetaName& engine, const string& entryPoint, const string& body) { string entryPointTrimmed = entryPoint; entryPointTrimmed.trim(); @@ -749,9 +792,13 @@ metadata->name = udf->getName().identifier; metadata->entryPoint = entryPointTrimmed; metadata->body = body; - metadata->inputParameters = new MsgMetadata; - metadata->outputParameters = new MsgMetadata; + MsgMetadata* inMsg = new MsgMetadata; + metadata->inputParameters = inMsg; + + MsgMetadata* outMsg = new MsgMetadata; + metadata->outputParameters = outMsg; + for (Array<NestConst<Parameter> >::const_iterator i = udf->getInputFields().begin(); i != udf->getInputFields().end(); ++i) @@ -759,13 +806,14 @@ SLONG sqlLen, sqlSubType, sqlScale, sqlType; (*i)->prm_desc.getSqlInfo(&sqlLen, &sqlSubType, &sqlScale, &sqlType); - StatementMetadata::Parameters::Item& item = metadata->inputParameters->items.add(); + StatementMetadata::Parameters::Item& item = inMsg->items.add(); item.field = (*i)->prm_name.c_str(); item.type = sqlType; item.subType = sqlSubType; item.length = sqlLen; item.scale = sqlScale; item.nullable = (*i)->prm_nullable; + item.finished = true; } { // scope @@ -774,23 +822,33 @@ SLONG sqlLen, sqlSubType, sqlScale, sqlType; i->prm_desc.getSqlInfo(&sqlLen, &sqlSubType, &sqlScale, &sqlType); - StatementMetadata::Parameters::Item& item = metadata->outputParameters->items.add(); + StatementMetadata::Parameters::Item& item = outMsg->items.add(); item.field = i->prm_name.c_str(); item.type = sqlType; item.subType = sqlSubType; item.length = sqlLen; item.scale = sqlScale; item.nullable = i->prm_nullable; + item.finished = true; } + LocalStatus status; + + RefPtr<IMetadataBuilder> inBuilder(metadata->inputParameters->getBuilder(&status)); + inBuilder->release(); + status.check(); + + RefPtr<IMetadataBuilder> outBuilder(metadata->outputParameters->getBuilder(&status)); + outBuilder->release(); + status.check(); + ExternalFunction* externalFunction; { // scope Attachment::Checkout attCout(tdbb->getAttachment(), FB_FUNCTION); - LocalStatus status; externalFunction = attInfo->engine->makeFunction(&status, attInfo->context, metadata, - inMsg, outMsg); + inBuilder, outBuilder); status.check(); if (!externalFunction) @@ -798,12 +856,21 @@ status_exception::raise( Arg::Gds(isc_eem_func_not_returned) << udf->getName().toString() << engine); } + + metadata->inputParameters = inBuilder->getMetadata(&status); + status.check(); + + metadata->outputParameters = outBuilder->getMetadata(&status); + status.check(); } try { - return FB_NEW(getPool()) Function(tdbb, this, attInfo->engine, metadata.release(), - externalFunction, udf); + udf->setInputFormat(createFormat(pool, metadata->inputParameters)); + udf->setOutputFormat(createFormat(pool, metadata->outputParameters)); + + udf->fun_external = FB_NEW(getPool()) Function(tdbb, this, attInfo->engine, + metadata.release(), externalFunction, udf); } catch (...) { @@ -814,9 +881,8 @@ } -ExtEngineManager::Procedure* ExtEngineManager::makeProcedure(thread_db* tdbb, const jrd_prc* prc, - const MetaName& engine, const string& entryPoint, const string& body, - RoutineMessage* inMsg, RoutineMessage* outMsg) +void ExtEngineManager::makeProcedure(thread_db* tdbb, jrd_prc* prc, + const MetaName& engine, const string& entryPoint, const string& body) { string entryPointTrimmed = entryPoint; entryPointTrimmed.trim(); @@ -835,9 +901,13 @@ metadata->name = prc->getName().identifier; metadata->entryPoint = entryPointTrimmed; metadata->body = body; - metadata->inputParameters = new MsgMetadata; - metadata->outputParameters = new MsgMetadata; + MsgMetadata* inMsg = new MsgMetadata; + metadata->inputParameters = inMsg; + + MsgMetadata* outMsg = new MsgMetadata; + metadata->outputParameters = outMsg; + const Array<NestConst<Parameter> >* parameters[] = { &prc->getInputFields(), &prc->getOutputFields()}; @@ -851,8 +921,7 @@ (*j)->prm_desc.getSqlInfo(&sqlLen, &sqlSubType, &sqlScale, &sqlType); StatementMetadata::Parameters::Item& item = i == 1 ? - metadata->outputParameters->items.add() : - metadata->inputParameters->items.add(); + outMsg->items.add() : inMsg->items.add(); item.field = (*j)->prm_name.c_str(); item.type = sqlType; @@ -860,17 +929,27 @@ item.length = sqlLen; item.scale = sqlScale; item.nullable = (*j)->prm_nullable; + item.finished = true; } } + LocalStatus status; + + RefPtr<IMetadataBuilder> inBuilder(metadata->inputParameters->getBuilder(&status)); + inBuilder->release(); + status.check(); + + RefPtr<IMetadataBuilder> outBuilder(metadata->outputParameters->getBuilder(&status)); + outBuilder->release(); + status.check(); + ExternalProcedure* externalProcedure; { // scope Attachment::Checkout attCout(tdbb->getAttachment(), FB_FUNCTION); - LocalStatus status; externalProcedure = attInfo->engine->makeProcedure(&status, attInfo->context, metadata, - inMsg, outMsg); + inBuilder, outBuilder); status.check(); if (!externalProcedure) @@ -879,12 +958,21 @@ Arg::Gds(isc_eem_proc_not_returned) << prc->getName().toString() << engine); } + + metadata->inputParameters = inBuilder->getMetadata(&status); + status.check(); + + metadata->outputParameters = outBuilder->getMetadata(&status); + status.check(); } try { - return FB_NEW(getPool()) Procedure(tdbb, this, attInfo->engine, metadata.release(), - externalProcedure, prc); + prc->setInputFormat(createFormat(pool, metadata->inputParameters)); + prc->setOutputFormat(createFormat(pool, metadata->outputParameters)); + + prc->setExternal(FB_NEW(getPool()) Procedure(tdbb, this, attInfo->engine, + metadata.release(), externalProcedure, prc)); } catch (...) { @@ -920,8 +1008,10 @@ if (relation) { metadata->triggerTable = relation->rel_name; - metadata->triggerFields = new MsgMetadata; + MsgMetadata* fieldsMsg = new MsgMetadata; + metadata->triggerFields = fieldsMsg; + Format* relFormat = relation->rel_current_format; for (size_t i = 0; i < relation->rel_fields->count(); ++i) @@ -933,7 +1023,7 @@ SLONG sqlLen, sqlSubType, sqlScale, sqlType; relFormat->fmt_desc[i].getSqlInfo(&sqlLen, &sqlSubType, &sqlScale, &sqlType); - StatementMetadata::Parameters::Item& item = metadata->triggerFields->items.add(); + StatementMetadata::Parameters::Item& item = fieldsMsg->items.add(); item.field = field->fld_name.c_str(); item.type = sqlType; item.subType = sqlSubType; Modified: firebird/trunk/src/jrd/ExtEngineManager.h =================================================================== --- firebird/trunk/src/jrd/ExtEngineManager.h 2013-03-02 02:02:11 UTC (rev 57718) +++ firebird/trunk/src/jrd/ExtEngineManager.h 2013-03-04 01:42:58 UTC (rev 57719) @@ -52,29 +52,6 @@ struct record_param; -class RoutineMessage : - public Firebird::VersionedIface<Firebird::IRoutineMessage, FB_ROUTINE_MESSAGE_VERSION>, - public Firebird::PermanentStorage -{ -public: - explicit RoutineMessage(MemoryPool& pool) - : PermanentStorage(pool), - blr(pool), - bufferLength(0) - { - } - - virtual void FB_CARG set(const unsigned char* aBlr, unsigned aBlrLength, unsigned aBufferLength) - { - blr.assign(aBlr, aBlrLength); - bufferLength = aBufferLength; - } - -public: - Firebird::Array<UCHAR> blr; - unsigned bufferLength; -}; - class TriggerMessage : public Firebird::VersionedIface<Firebird::ITriggerMessage, FB_TRIGGER_MESSAGE_VERSION>, public Firebird::PermanentStorage @@ -180,9 +157,9 @@ Firebird::MetaName name; Firebird::string entryPoint; Firebird::string body; - Firebird::RefPtr<Firebird::MsgMetadata> inputParameters; - Firebird::RefPtr<Firebird::MsgMetadata> outputParameters; - Firebird::RefPtr<Firebird::MsgMetadata> triggerFields; + Firebird::RefPtr<Firebird::IMessageMetadata> inputParameters; + Firebird::RefPtr<Firebird::IMessageMetadata> outputParameters; + Firebird::RefPtr<Firebird::IMessageMetadata> triggerFields; Firebird::MetaName triggerTable; Firebird::ExternalTrigger::Type triggerType; @@ -363,12 +340,12 @@ public: void closeAttachment(thread_db* tdbb, Attachment* attachment); - Function* makeFunction(thread_db* tdbb, const Jrd::Function* udf, + void makeFunction(thread_db* tdbb, Jrd::Function* udf, const Firebird::MetaName& engine, const Firebird::string& entryPoint, - const Firebird::string& body, RoutineMessage* inMsg, RoutineMessage* outMsg); - Procedure* makeProcedure(thread_db* tdbb, const jrd_prc* prc, + const Firebird::string& body); + void makeProcedure(thread_db* tdbb, jrd_prc* prc, const Firebird::MetaName& engine, const Firebird::string& entryPoint, - const Firebird::string& body, RoutineMessage* inMsg, RoutineMessage* outMsg); + const Firebird::string& body); Trigger* makeTrigger(thread_db* tdbb, const Jrd::Trigger* trg, const Firebird::MetaName& engine, const Firebird::string& entryPoint, const Firebird::string& body, Firebird::ExternalTrigger::Type type); Modified: firebird/trunk/src/jrd/Function.epp =================================================================== --- firebird/trunk/src/jrd/Function.epp 2013-03-02 02:02:11 UTC (rev 57718) +++ firebird/trunk/src/jrd/Function.epp 2013-03-04 01:42:58 UTC (rev 57719) @@ -374,9 +374,6 @@ function->fun_external = NULL; function->setStatement(NULL); - RoutineMessage inMsg(*attachment->att_pool); - RoutineMessage outMsg(*attachment->att_pool); - if (!X.RDB$ENGINE_NAME.NULL || !X.RDB$FUNCTION_BLR.NULL) { if (!X.RDB$ENGINE_NAME.NULL) @@ -393,46 +390,42 @@ else body.getBuffer(1)[0] = 0; - function->fun_external = - dbb->dbb_extManager.makeFunction(tdbb, function, X.RDB$ENGINE_NAME, - (X.RDB$ENTRYPOINT.NULL ? "" : X.RDB$ENTRYPOINT), (char*) body.begin(), - &inMsg, &outMsg); + dbb->dbb_extManager.makeFunction(tdbb, function, X.RDB$ENGINE_NAME, + (X.RDB$ENTRYPOINT.NULL ? "" : X.RDB$ENTRYPOINT), (char*) body.begin()); if (!function->fun_external) function->setDefined(false); } - - MemoryPool* const csb_pool = attachment->createPool(); - Jrd::ContextPoolHolder context(tdbb, csb_pool); - - try + else { - AutoPtr<CompilerScratch> csb(CompilerScratch::newCsb(*csb_pool, 5)); + MemoryPool* const csb_pool = attachment->createPool(); + Jrd::ContextPoolHolder context(tdbb, csb_pool); - if (X.RDB$ENGINE_NAME.NULL && !X.RDB$DEBUG_INFO.NULL) - DBG_parse_debug_info(tdbb, &X.RDB$DEBUG_INFO, *csb->csb_dbg_info); - try { - MET_parse_routine_blr(tdbb, function, &X.RDB$FUNCTION_BLR, csb, - !X.RDB$ENGINE_NAME.NULL, inMsg, outMsg); + AutoPtr<CompilerScratch> csb(CompilerScratch::newCsb(*csb_pool, 5)); + + if (!X.RDB$DEBUG_INFO.NULL) + DBG_parse_debug_info(tdbb, &X.RDB$DEBUG_INFO, *csb->csb_dbg_info); + + try + { + MET_parse_routine_blr(tdbb, function, &X.RDB$FUNCTION_BLR, csb); + } + catch (const Exception&) + { + const string name = function->getName().toString(); + status_exception::raise(Arg::Gds(isc_bad_fun_BLR) << Arg::Str(name)); + } } catch (const Exception&) { - if (!X.RDB$ENGINE_NAME.NULL) - throw; + attachment->deletePool(csb_pool); + throw; + } - const string name = function->getName().toString(); - status_exception::raise(Arg::Gds(isc_bad_fun_BLR) << Arg::Str(name)); - } + function->getStatement()->function = function; } - catch (const Exception&) - { - attachment->deletePool(csb_pool); - throw; - } - - function->getStatement()->function = function; } else if (!X.RDB$MODULE_NAME.NULL && !X.RDB$ENTRYPOINT.NULL) { Modified: firebird/trunk/src/jrd/cmp.cpp =================================================================== --- firebird/trunk/src/jrd/cmp.cpp 2013-03-02 02:02:11 UTC (rev 57718) +++ firebird/trunk/src/jrd/cmp.cpp 2013-03-04 01:42:58 UTC (rev 57719) @@ -262,7 +262,7 @@ } else if (tail->csb_procedure) { - tail->csb_format = tail->csb_procedure->prc_format; + tail->csb_format = tail->csb_procedure->prc_record_format; } else { Modified: firebird/trunk/src/jrd/dfw.epp =================================================================== --- firebird/trunk/src/jrd/dfw.epp 2013-03-02 02:02:11 UTC (rev 57718) +++ firebird/trunk/src/jrd/dfw.epp 2013-03-04 01:42:58 UTC (rev 57719) @@ -5651,10 +5651,7 @@ try { - RoutineMessage dummy(*csb_pool); - MET_parse_routine_blr(tdbb, function, &FUN.RDB$FUNCTION_BLR, csb, false, - dummy, dummy); - + MET_parse_routine_blr(tdbb, function, &FUN.RDB$FUNCTION_BLR, csb); valid_blr = true; } catch (const Firebird::Exception&) Modified: firebird/trunk/src/jrd/exe.cpp =================================================================== --- firebird/trunk/src/jrd/exe.cpp 2013-03-02 02:02:11 UTC (rev 57718) +++ firebird/trunk/src/jrd/exe.cpp 2013-03-04 01:42:58 UTC (rev 57719) @@ -191,7 +191,6 @@ fb_sqlstate(sqlstate, status); } -static void execute_ext_procedure(thread_db* tdbb, jrd_req* request); static void execute_looper(thread_db*, jrd_req*, jrd_tra*, const StmtNode*, jrd_req::req_s); static void looper_seh(thread_db*, jrd_req*, const StmtNode*); static void release_blobs(thread_db*, jrd_req*); @@ -626,20 +625,12 @@ { const JrdStatement* statement = request->getStatement(); - const bool external = - (statement->procedure && statement->procedure->getExternal()) || - (statement->function && statement->function->fun_external); - if (external) + if (StmtNode::is<StallNode>(request->req_message)) execute_looper(tdbb, request, transaction, request->req_next, jrd_req::req_sync); - else - { - if (StmtNode::is<StallNode>(request->req_message)) - execute_looper(tdbb, request, transaction, request->req_next, jrd_req::req_sync); - if (!(request->req_flags & req_active) || request->req_operation != jrd_req::req_send) - ERR_post(Arg::Gds(isc_req_sync)); - } + if (!(request->req_flags & req_active) || request->req_operation != jrd_req::req_send) + ERR_post(Arg::Gds(isc_req_sync)); const MessageNode* message = StmtNode::as<MessageNode>(request->req_message); const Format* format = message->format; @@ -679,8 +670,7 @@ } } - if (!external) - execute_looper(tdbb, request, transaction, request->req_next, jrd_req::req_proceed); + execute_looper(tdbb, request, transaction, request->req_next, jrd_req::req_proceed); } //try catch (const Firebird::Exception&) @@ -762,43 +752,28 @@ jrd_tra* transaction = request->req_transaction; const JrdStatement* statement = request->getStatement(); - const bool external = - (statement->procedure && statement->procedure->getExternal()) || - (statement->function && statement->function->fun_external); + const SelectNode* selectNode; - if (external) + if (StmtNode::is<MessageNode>(node)) + message = node; + else if ((selectNode = StmtNode::as<SelectNode>(node))) { - const CompoundStmtNode* list = StmtNode::as<CompoundStmtNode>(statement->topNode); - fb_assert(list); + const NestConst<StmtNode>* ptr = selectNode->statements.begin(); - message = list->statements[e_extrout_input_message]->as<MessageNode>(); - fb_assert(message); - } - else - { - const SelectNode* selectNode; - - if (StmtNode::is<MessageNode>(node)) - message = node; - else if ((selectNode = StmtNode::as<SelectNode>(node))) + for (const NestConst<StmtNode>* end = selectNode->statements.end(); ptr != end; ++ptr) { - const NestConst<StmtNode>* ptr = selectNode->statements.begin(); + const ReceiveNode* receiveNode = (*ptr)->as<ReceiveNode>(); + message = receiveNode->message; - for (const NestConst<St... [truncated message content] |
From: <ale...@us...> - 2013-03-04 15:29:10
|
Revision: 57722 http://sourceforge.net/p/firebird/code/57722 Author: alexpeshkoff Date: 2013-03-04 15:29:05 +0000 (Mon, 04 Mar 2013) Log Message: ----------- Fixed CORE-4031: make install wrong under Debian Ubuntu 64 (and fixed some unrelated bugs in linux install) Modified Paths: -------------- firebird/trunk/builds/install/arch-specific/linux/Makefile.in firebird/trunk/builds/install/arch-specific/linux/misc/linuxLibrary.sh.in firebird/trunk/builds/install/arch-specific/linux/misc/makeInstallImage.sh.in firebird/trunk/builds/install/arch-specific/linux/misc/postinstall.sh.in firebird/trunk/builds/install/arch-specific/linux/misc/tarMainInstall.sh.in firebird/trunk/builds/install/misc/posixLibrary.sh.in firebird/trunk/configure.in Modified: firebird/trunk/builds/install/arch-specific/linux/Makefile.in =================================================================== --- firebird/trunk/builds/install/arch-specific/linux/Makefile.in 2013-03-04 15:18:26 UTC (rev 57721) +++ firebird/trunk/builds/install/arch-specific/linux/Makefile.in 2013-03-04 15:29:05 UTC (rev 57722) @@ -118,11 +118,6 @@ objcopy --strip-debug --strip-unneeded $${FIL}; \ fi; \ done -# Work around GDB 6.0 bug -# mkdir -p $(GEN_ROOT)/$(DebugDir)@libdir@/.debug -# for x in `ls $(GEN_ROOT)/$(DebugDir)@prefix@/lib/.debug`; do \ -# ln -f -s @prefix@/lib/.debug/`basename $$x` $(GEN_ROOT)/$(DebugDir)@libdir@/.debug; \ -# done # Use this line if you don't want to use separate debug info #buildImageDir: buildRoot Modified: firebird/trunk/builds/install/arch-specific/linux/misc/linuxLibrary.sh.in =================================================================== --- firebird/trunk/builds/install/arch-specific/linux/misc/linuxLibrary.sh.in 2013-03-04 15:18:26 UTC (rev 57721) +++ firebird/trunk/builds/install/arch-specific/linux/misc/linuxLibrary.sh.in 2013-03-04 15:29:05 UTC (rev 57722) @@ -432,3 +432,25 @@ fi return 1 } + +#------------------------------------------------------------------------ +# Corrects build-time "libdir" value + +CorrectLibDir() { + ld=${1} + l=/usr/lib + l64=/usr/lib64 + + if [ "$ld" = "$l64" ] + then + if [ -d "$l" ] + then + if [ ! -d "$l64" ] + then + ld="$l" + fi + fi + fi + + echo "$ld" +} Modified: firebird/trunk/builds/install/arch-specific/linux/misc/makeInstallImage.sh.in =================================================================== --- firebird/trunk/builds/install/arch-specific/linux/misc/makeInstallImage.sh.in 2013-03-04 15:18:26 UTC (rev 57721) +++ firebird/trunk/builds/install/arch-specific/linux/misc/makeInstallImage.sh.in 2013-03-04 15:29:05 UTC (rev 57722) @@ -143,7 +143,6 @@ makeDirs @FB_MISCDIR@/upgrade/$i done - makeDirs @libdir@ makeDirs /usr/include #bin @@ -318,13 +317,6 @@ chown root:root ${TargetDir}@FB_CONFDIR@/*License.txt chmod 0444 ${TargetDir}@FB_CONFDIR@/*License.txt -# Create links from @libdir@ to install area. - origDir=`pwd` - cd $BuiltFBDir/lib - Libraries=`echo libfb*.so* libib_util.so` - cd $origDir - linkFiles "@FB_LIBDIR@" "$Libraries" "${TargetDir}@libdir@" "${TargetDir}@FB_LIBDIR@" - # link include files to /usr/include linkFiles "@FB_INCDIR@" "iberror.h ibase.h ib_util.h" "${TargetDir}/usr/include" "${TargetDir}@FB_INCDIR@" Modified: firebird/trunk/builds/install/arch-specific/linux/misc/postinstall.sh.in =================================================================== --- firebird/trunk/builds/install/arch-specific/linux/misc/postinstall.sh.in 2013-03-04 15:18:26 UTC (rev 57721) +++ firebird/trunk/builds/install/arch-specific/linux/misc/postinstall.sh.in 2013-03-04 15:29:05 UTC (rev 57722) @@ -46,16 +46,19 @@ # Install script in /etc/init.d (exact location is distro dependent) installInitdScript +# Prepare for uninstall +buildUninstallFile + +# Create links to libraries in system lib directory +createLinksInSystemLib + # Create libgds.so links createLinksForBackCompatibility -# Prepare for uninstall -buildUninstallFile - # Update the /etc/inetd.conf or xinetd entry updateInetdServiceEntry -# Change sysdba password (use embedded access) +# Add sysdba and set password (use embedded access) setDBAPassword # Get inetd to reread new init files. Modified: firebird/trunk/builds/install/arch-specific/linux/misc/tarMainInstall.sh.in =================================================================== --- firebird/trunk/builds/install/arch-specific/linux/misc/tarMainInstall.sh.in 2013-03-04 15:18:26 UTC (rev 57721) +++ firebird/trunk/builds/install/arch-specific/linux/misc/tarMainInstall.sh.in 2013-03-04 15:29:05 UTC (rev 57722) @@ -39,7 +39,7 @@ then cat <<EOF -Firebird classic $Version Installation +Firebird $Version Installation EOF @@ -49,6 +49,7 @@ # Here we are installing from a install tar.gz file if [ -e scripts ]; then + MANIFEXT_TXT=`pwd`/manifest.txt displayMessage "Extracting install data" runAndCheckExit "./scripts/preinstall.sh" runAndCheckExit "./scripts/tarinstall.sh" Modified: firebird/trunk/builds/install/misc/posixLibrary.sh.in =================================================================== --- firebird/trunk/builds/install/misc/posixLibrary.sh.in 2013-03-04 15:18:26 UTC (rev 57721) +++ firebird/trunk/builds/install/misc/posixLibrary.sh.in 2013-03-04 15:29:05 UTC (rev 57722) @@ -42,6 +42,7 @@ Answer="" OrigPasswd="" TmpFile="" +MANIFEST_TXT="" SecurityDatabase=security3.fdb DefaultLibrary=libfbclient UninstallScript=FirebirdUninstall.sh @@ -71,7 +72,7 @@ AskQuestion() { Test=$1 DefaultAns=$2 - echo -n "${1}" + echo -n "$Test" Answer="$DefaultAns" read Answer @@ -203,7 +204,7 @@ checkIfServerRunning() { - checkString=`ps -ef$psOptions | egrep "\b(fbserver|fbguard|fb_smp_server|firebird)\b" |grep -v grep` + checkString=`ps -ef$psOptions | egrep "[[:space:]]\b(fbserver|fbguard|fb_smp_server|firebird)\b[[:space:]]" |grep -v grep` if [ ! -z "$checkString" ] then serverMode=super @@ -218,7 +219,7 @@ # Check is server is being actively used. - checkString=`ps -ef$psOptions | egrep "\b(firebird)\b" |grep -v grep` + checkString=`ps -ef$psOptions | egrep "[[:space:]]\b(firebird)\b[[:space:]]" |grep -v grep` if [ ! -z "$checkString" ] then echo "An instance of the Firebird server seems to be running." @@ -226,7 +227,7 @@ exit 1 fi - checkString=`ps -ef$psOptions | egrep "\b(fb_smp_server)\b" |grep -v grep` + checkString=`ps -ef$psOptions | egrep "[[:space:]]\b(fb_smp_server)\b[[:space:]]" |grep -v grep` if [ ! -z "$checkString" ] then echo "An instance of the Firebird SuperClassic server seems to be running." @@ -234,7 +235,7 @@ exit 1 fi - checkString=`ps -ef$psOptions | egrep "\b(fbserver|fbguard)\b" |grep -v grep` + checkString=`ps -ef$psOptions | egrep "[[:space:]]\b(fbserver|fbguard)\b[[:space:]]" |grep -v grep` if [ ! -z "$checkString" ] then echo "An instance of the Firebird Super server seems to be running." @@ -242,7 +243,7 @@ exit 1 fi - checkString=`ps -ef$psOptions | egrep "\b(fb_inet_server|gds_pipe)\b" |grep -v grep` + checkString=`ps -ef$psOptions | egrep "[[:space:]]\b(fb_inet_server|gds_pipe)\b[[:space:]]" |grep -v grep` if [ ! -z "$checkString" ] then echo "An instance of the Firebird Classic server seems to be running." @@ -303,7 +304,7 @@ getNewDBAPasswordFromUser() { AskQuestion "Please enter new password for SYSDBA user: " - echo $Answer + NewPasswd=$Answer } @@ -324,7 +325,7 @@ NewPasswd="" while [ -z "$NewPasswd" ] do - NewPasswd=`getNewDBAPasswordFromUser` + getNewDBAPasswordFromUser if [ ! -z "$NewPasswd" ] then if ! runSilent "@FB_BINDIR@/gsec -user sysdba -password $OrigPasswd -modify sysdba -pw $NewPasswd" @@ -452,10 +453,12 @@ setDBAPassword() { if [ -z "$InteractiveInstall" ] - then + then passwd=`createNewPassword` - else - passwd=`getNewDBAPasswordFromUser` + else + NewPasswd="" + getNewDBAPasswordFromUser + passwd=$NewPasswd fi if [ ! -z "$passwd" ] @@ -481,6 +484,7 @@ fi cp manifest.txt @FB_MISCDIR@ + MANIFEST_TXT=@FB_MISCDIR@/manifest.txt cp -r scripts @FB_MISCDIR@ [ -f scripts/tarMainUninstall.sh ] && cp scripts/tarMainUninstall.sh @FB_SBINDIR@/$UninstallScript @@ -508,18 +512,26 @@ safeLink() { Source=$1 Target=$2 - - removeIfOnlyAlink $Target - if [ ! -e $Target ] - then - ln -s $Source $Target + Manifest=$3 + + if [ $Source != $Target ] + then + removeIfOnlyAlink $Target + if [ ! -e $Target ] + then + ln -s $Source $Target + if [ -f "$Manifest" ] + then + echo $Target >>$Manifest + fi + fi fi } #------------------------------------------------------------------------ # createLinksForBackCompatibility -# Create links for back compatibility to InterBase and Firebird1.0 +# Create links for back compatibility to InterBase and Firebird1.0 # linked systems. createLinksForBackCompatibility() { @@ -529,19 +541,42 @@ # to ensure it loads the fb equivalent. MOD 7-Nov-2002. newLibrary=@FB_LIBDIR@/$DefaultLibrary.@SHRLIB_EXT@ - safeLink $newLibrary @libdir@/libgds.@SHRLIB_EXT@ - safeLink $newLibrary @libdir@/libgds.@SHRLIB_EXT@.0 + LibDir=`CorrectLibDir @libdir@` + safeLink $newLibrary $LibDir/libgds.@SHRLIB_EXT@ + safeLink $newLibrary $LibDir/libgds.@SHRLIB_EXT@.0 } #------------------------------------------------------------------------ +# createLinksInSystemLib +# Create links to firebird client library in system directory. + +createLinksInSystemLib() { + LibDir=`CorrectLibDir @libdir@` + + origDirLinksInSystemLib=`pwd` + cd @FB_LIBDIR@ + Libraries=`echo libfbclient.@SHRLIB_EXT@* libib_util.@SHRLIB_EXT@` + + cd / + for l in $Libraries + do + safeLink @FB_LIBDIR@/$l .$LibDir/$l ${MANIFEST_TXT} + done + + cd $origDirLinksInSystemLib +} + +#------------------------------------------------------------------------ # removeLinksForBackCompatibility -# Remove links for back compatibility to InterBase and Firebird1.0 +# Remove links for back compatibility to InterBase and Firebird1.0 # linked systems. removeLinksForBackCompatibility() { - removeIfOnlyAlink @libdir@/libgds.@SHRLIB_EXT@ - removeIfOnlyAlink @libdir@/libgds.@SHRLIB_EXT@.0 + LibDir=`CorrectLibDir @libdir@` + + removeIfOnlyAlink $LibDir/libgds.@SHRLIB_EXT@ + removeIfOnlyAlink $LibDir/libgds.@SHRLIB_EXT@.0 } @@ -692,7 +727,7 @@ fi origDir=`pwd` - + cd / for i in `cat $manifestFile` Modified: firebird/trunk/configure.in =================================================================== --- firebird/trunk/configure.in 2013-03-04 15:18:26 UTC (rev 57721) +++ firebird/trunk/configure.in 2013-03-04 15:29:05 UTC (rev 57722) @@ -213,11 +213,7 @@ AC_DEFINE(LINUX, 1, [Define this if OS is Linux]) EDITLINE_FLG=Y SHRLIB_EXT=so - if test -L /usr/lib64; then - libdir=/usr/lib - else - libdir=/usr/lib64 - fi + libdir=/usr/lib64 CPU_TYPE=amd64 ;; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2013-03-05 01:55:33
|
Revision: 57723 http://sourceforge.net/p/firebird/code/57723 Author: firebirds Date: 2013-03-05 01:55:31 +0000 (Tue, 05 Mar 2013) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2013-03-04 15:29:05 UTC (rev 57722) +++ firebird/trunk/ChangeLog 2013-03-05 01:55:31 UTC (rev 57723) @@ -1,3 +1,41 @@ + 2013-03-04 15:29 alexpeshkoff + M builds/install/arch-specific/linux/Makefile.in + M builds/install/arch-specific/linux/misc/linuxLibrary.sh.in + M builds/install/arch-specific/linux/misc/makeInstallImage.sh.in + M builds/install/arch-specific/linux/misc/postinstall.sh.in + M builds/install/arch-specific/linux/misc/tarMainInstall.sh.in + M builds/install/misc/posixLibrary.sh.in + M configure.in +Fixed CORE-4031: make install wrong under Debian Ubuntu 64 (and fixed some unrelated bugs in linux install) + + 2013-03-04 12:13 alexpeshkoff + M src/auth/SecureRemotePassword/manage/SrpManagement.cpp +Fixed segfault in user manager + + 2013-03-04 01:42 asfernandes + M examples/udr/UdrCppExample.cpp + M src/dsql/ExprNodes.cpp + M src/dsql/StmtNodes.cpp + M src/include/firebird/ExternalEngine.h + M src/include/firebird/Message.h + M src/include/firebird/UdrCppEngine.h + M src/include/firebird/UdrEngine.h + M src/jrd/ExtEngineManager.cpp + M src/jrd/ExtEngineManager.h + M src/jrd/Function.epp + M src/jrd/cmp.cpp + M src/jrd/dfw.epp + M src/jrd/exe.cpp + M src/jrd/exe.h + M src/jrd/jrd.h + M src/jrd/met.epp + M src/jrd/met_proto.h + M src/jrd/recsrc/ProcedureScan.cpp + M src/jrd/recsrc/RecordSource.h + M src/plugins/udr_engine/UdrEngine.cpp +Fixing FB_MESSAGE macro and external functions and procedures. +Isolate external routines them from request-based ones. + 2013-03-01 13:50 alexpeshkoff M src/isql/InputDevices.cpp M src/isql/InputDevices.h Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2013-03-04 15:29:05 UTC (rev 57722) +++ firebird/trunk/src/jrd/build_no.h 2013-03-05 01:55:31 UTC (rev 57723) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:30243 + FORMAL BUILD NUMBER:30246 */ -#define PRODUCT_VER_STRING "3.0.0.30243" -#define FILE_VER_STRING "WI-T3.0.0.30243" -#define LICENSE_VER_STRING "WI-T3.0.0.30243" -#define FILE_VER_NUMBER 3, 0, 0, 30243 +#define PRODUCT_VER_STRING "3.0.0.30246" +#define FILE_VER_STRING "WI-T3.0.0.30246" +#define LICENSE_VER_STRING "WI-T3.0.0.30246" +#define FILE_VER_NUMBER 3, 0, 0, 30246 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "30243" +#define FB_BUILD_NO "30246" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2013-03-04 15:29:05 UTC (rev 57722) +++ firebird/trunk/src/misc/writeBuildNum.sh 2013-03-05 01:55:31 UTC (rev 57723) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=30243 +BuildNum=30246 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2013-03-06 00:49:18
|
Revision: 57727 http://sourceforge.net/p/firebird/code/57727 Author: firebirds Date: 2013-03-06 00:49:14 +0000 (Wed, 06 Mar 2013) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2013-03-05 18:38:42 UTC (rev 57726) +++ firebird/trunk/ChangeLog 2013-03-06 00:49:14 UTC (rev 57727) @@ -1,3 +1,10 @@ + 2013-03-05 12:53 alexpeshkoff + M src/burp/burp.cpp + M src/burp/burp.h + M src/burp/mvol.cpp + M src/burp/restore.epp +Fixed CORE-3575:Support of backup volumes with size more than 4Gb + 2013-03-04 15:29 alexpeshkoff M builds/install/arch-specific/linux/Makefile.in M builds/install/arch-specific/linux/misc/linuxLibrary.sh.in Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2013-03-05 18:38:42 UTC (rev 57726) +++ firebird/trunk/src/jrd/build_no.h 2013-03-06 00:49:14 UTC (rev 57727) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:30246 + FORMAL BUILD NUMBER:30247 */ -#define PRODUCT_VER_STRING "3.0.0.30246" -#define FILE_VER_STRING "WI-T3.0.0.30246" -#define LICENSE_VER_STRING "WI-T3.0.0.30246" -#define FILE_VER_NUMBER 3, 0, 0, 30246 +#define PRODUCT_VER_STRING "3.0.0.30247" +#define FILE_VER_STRING "WI-T3.0.0.30247" +#define LICENSE_VER_STRING "WI-T3.0.0.30247" +#define FILE_VER_NUMBER 3, 0, 0, 30247 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "30246" +#define FB_BUILD_NO "30247" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2013-03-05 18:38:42 UTC (rev 57726) +++ firebird/trunk/src/misc/writeBuildNum.sh 2013-03-06 00:49:14 UTC (rev 57727) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=30246 +BuildNum=30247 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <di...@us...> - 2013-03-06 14:30:08
|
Revision: 57729 http://sourceforge.net/p/firebird/code/57729 Author: dimitr Date: 2013-03-06 14:30:05 +0000 (Wed, 06 Mar 2013) Log Message: ----------- An ultimate solution for the CRT warnings targeted at both native and external (ICU, BTYACC) modules. Inspired by the ICU-only patch contributed by Dmitry Kovalenko. Modified Paths: -------------- firebird/trunk/builds/win32/msvc10/btyacc.vcxproj firebird/trunk/builds/win32/msvc10/firebird2.props firebird/trunk/builds/win32/msvc8/empbuild.vcproj firebird/trunk/builds/win32/msvc8/firebird2.vsprops firebird/trunk/builds/win32/msvc9/empbuild.vcproj firebird/trunk/builds/win32/msvc9/firebird2.vsprops firebird/trunk/extern/icu/source/allinone/firebird2intl.props firebird/trunk/extern/icu/source/allinone/firebird2intl.vsprops Modified: firebird/trunk/builds/win32/msvc10/btyacc.vcxproj =================================================================== --- firebird/trunk/builds/win32/msvc10/btyacc.vcxproj 2013-03-06 11:33:08 UTC (rev 57728) +++ firebird/trunk/builds/win32/msvc10/btyacc.vcxproj 2013-03-06 14:30:05 UTC (rev 57729) @@ -94,7 +94,7 @@ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ClCompile> <Optimization>Disabled</Optimization> - <PreprocessorDefinitions>WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <PrecompiledHeader> @@ -109,7 +109,7 @@ </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ClCompile> - <PreprocessorDefinitions>WIN32;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <PrecompiledHeader> </PrecompiledHeader> Modified: firebird/trunk/builds/win32/msvc10/firebird2.props =================================================================== --- firebird/trunk/builds/win32/msvc10/firebird2.props 2013-03-06 11:33:08 UTC (rev 57728) +++ firebird/trunk/builds/win32/msvc10/firebird2.props 2013-03-06 14:30:05 UTC (rev 57729) @@ -26,6 +26,7 @@ <CompileAs>Default</CompileAs> <UseFullPaths>false</UseFullPaths> <MultiProcessorCompilation>true</MultiProcessorCompilation> + <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> <Link> <SuppressStartupBanner>true</SuppressStartupBanner> Modified: firebird/trunk/builds/win32/msvc8/empbuild.vcproj =================================================================== --- firebird/trunk/builds/win32/msvc8/empbuild.vcproj 2013-03-06 11:33:08 UTC (rev 57728) +++ firebird/trunk/builds/win32/msvc8/empbuild.vcproj 2013-03-06 14:30:05 UTC (rev 57729) @@ -48,7 +48,7 @@ EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" AdditionalIncludeDirectories="../../../src/include,../../../src/include/gen,../../../src/jrd" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS;NDEBUG;_CONSOLE;WIN32" + PreprocessorDefinitions="NDEBUG;_CONSOLE;WIN32" /> <Tool Name="VCManagedResourceCompilerTool" @@ -125,7 +125,7 @@ EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" AdditionalIncludeDirectories="../../../src/include,../../../src/include/gen,../../../src/jrd" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS;NDEBUG;_CONSOLE;WIN32" + PreprocessorDefinitions="NDEBUG;_CONSOLE;WIN32" /> <Tool Name="VCManagedResourceCompilerTool" @@ -196,7 +196,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="../../../src/include,../../../src/include/gen,../../../src/jrd" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;WIN32;DEV_BUILD" + PreprocessorDefinitions="_DEBUG;_CONSOLE;WIN32;DEV_BUILD" /> <Tool Name="VCManagedResourceCompilerTool" @@ -269,7 +269,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="../../../src/include,../../../src/include/gen,../../../src/jrd" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;WIN32;DEV_BUILD" + PreprocessorDefinitions="_DEBUG;_CONSOLE;WIN32;DEV_BUILD" Detect64BitPortabilityProblems="true" /> <Tool Modified: firebird/trunk/builds/win32/msvc8/firebird2.vsprops =================================================================== --- firebird/trunk/builds/win32/msvc8/firebird2.vsprops 2013-03-06 11:33:08 UTC (rev 57728) +++ firebird/trunk/builds/win32/msvc8/firebird2.vsprops 2013-03-06 14:30:05 UTC (rev 57729) @@ -25,6 +25,7 @@ WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" + PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" CompileAs="0" UseFullPaths="false" /> Modified: firebird/trunk/builds/win32/msvc9/empbuild.vcproj =================================================================== --- firebird/trunk/builds/win32/msvc9/empbuild.vcproj 2013-03-06 11:33:08 UTC (rev 57728) +++ firebird/trunk/builds/win32/msvc9/empbuild.vcproj 2013-03-06 14:30:05 UTC (rev 57729) @@ -48,7 +48,7 @@ EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" AdditionalIncludeDirectories="../../../src/include,../../../src/include/gen,../../../src/jrd" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS;NDEBUG;_CONSOLE;WIN32" + PreprocessorDefinitions="NDEBUG;_CONSOLE;WIN32" /> <Tool Name="VCManagedResourceCompilerTool" @@ -125,7 +125,7 @@ EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" AdditionalIncludeDirectories="../../../src/include,../../../src/include/gen,../../../src/jrd" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS;NDEBUG;_CONSOLE;WIN32" + PreprocessorDefinitions="NDEBUG;_CONSOLE;WIN32" /> <Tool Name="VCManagedResourceCompilerTool" @@ -196,7 +196,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="../../../src/include,../../../src/include/gen,../../../src/jrd" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;WIN32;DEV_BUILD" + PreprocessorDefinitions="_DEBUG;_CONSOLE;WIN32;DEV_BUILD" /> <Tool Name="VCManagedResourceCompilerTool" @@ -269,7 +269,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="../../../src/include,../../../src/include/gen,../../../src/jrd" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;WIN32;DEV_BUILD" + PreprocessorDefinitions="_DEBUG;_CONSOLE;WIN32;DEV_BUILD" Detect64BitPortabilityProblems="true" /> <Tool Modified: firebird/trunk/builds/win32/msvc9/firebird2.vsprops =================================================================== --- firebird/trunk/builds/win32/msvc9/firebird2.vsprops 2013-03-06 11:33:08 UTC (rev 57728) +++ firebird/trunk/builds/win32/msvc9/firebird2.vsprops 2013-03-06 14:30:05 UTC (rev 57729) @@ -25,6 +25,7 @@ WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" + PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" CompileAs="0" UseFullPaths="false" /> Modified: firebird/trunk/extern/icu/source/allinone/firebird2intl.props =================================================================== --- firebird/trunk/extern/icu/source/allinone/firebird2intl.props 2013-03-06 11:33:08 UTC (rev 57728) +++ firebird/trunk/extern/icu/source/allinone/firebird2intl.props 2013-03-06 14:30:05 UTC (rev 57729) @@ -11,6 +11,7 @@ <DisableLanguageExtensions>true</DisableLanguageExtensions> <WarningLevel>Level3</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> </ItemDefinitionGroup> </Project> \ No newline at end of file Modified: firebird/trunk/extern/icu/source/allinone/firebird2intl.vsprops =================================================================== --- firebird/trunk/extern/icu/source/allinone/firebird2intl.vsprops 2013-03-06 11:33:08 UTC (rev 57728) +++ firebird/trunk/extern/icu/source/allinone/firebird2intl.vsprops 2013-03-06 14:30:05 UTC (rev 57729) @@ -12,5 +12,6 @@ DisableLanguageExtensions="true" WarningLevel="3" DebugInformationFormat="3" + PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" /> </VisualStudioPropertySheet> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2013-03-07 00:49:11
|
Revision: 57736 http://sourceforge.net/p/firebird/code/57736 Author: firebirds Date: 2013-03-07 00:49:09 +0000 (Thu, 07 Mar 2013) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2013-03-06 18:35:37 UTC (rev 57735) +++ firebird/trunk/ChangeLog 2013-03-07 00:49:09 UTC (rev 57736) @@ -1,3 +1,14 @@ + 2013-03-06 14:30 dimitr + M builds/win32/msvc10/btyacc.vcxproj + M builds/win32/msvc10/firebird2.props + M builds/win32/msvc8/empbuild.vcproj + M builds/win32/msvc8/firebird2.vsprops + M builds/win32/msvc9/empbuild.vcproj + M builds/win32/msvc9/firebird2.vsprops + M extern/icu/source/allinone/firebird2intl.props + M extern/icu/source/allinone/firebird2intl.vsprops +An ultimate solution for the CRT warnings targeted at both native and external (ICU, BTYACC) modules. Inspired by the ICU-only patch contributed by Dmitry Kovalenko. + 2013-03-05 12:53 alexpeshkoff M src/burp/burp.cpp M src/burp/burp.h Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2013-03-06 18:35:37 UTC (rev 57735) +++ firebird/trunk/src/jrd/build_no.h 2013-03-07 00:49:09 UTC (rev 57736) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:30247 + FORMAL BUILD NUMBER:30248 */ -#define PRODUCT_VER_STRING "3.0.0.30247" -#define FILE_VER_STRING "WI-T3.0.0.30247" -#define LICENSE_VER_STRING "WI-T3.0.0.30247" -#define FILE_VER_NUMBER 3, 0, 0, 30247 +#define PRODUCT_VER_STRING "3.0.0.30248" +#define FILE_VER_STRING "WI-T3.0.0.30248" +#define LICENSE_VER_STRING "WI-T3.0.0.30248" +#define FILE_VER_NUMBER 3, 0, 0, 30248 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "30247" +#define FB_BUILD_NO "30248" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2013-03-06 18:35:37 UTC (rev 57735) +++ firebird/trunk/src/misc/writeBuildNum.sh 2013-03-07 00:49:09 UTC (rev 57736) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=30247 +BuildNum=30248 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <asf...@us...> - 2013-03-07 15:29:47
|
Revision: 57747 http://sourceforge.net/p/firebird/code/57747 Author: asfernandes Date: 2013-03-07 15:29:44 +0000 (Thu, 07 Mar 2013) Log Message: ----------- Make line numbers of processed y-file matches parser.y lines. Modified Paths: -------------- firebird/trunk/builds/posix/make.shared.targets firebird/trunk/builds/win32/parse.bat firebird/trunk/src/dsql/parse.y Modified: firebird/trunk/builds/posix/make.shared.targets =================================================================== --- firebird/trunk/builds/posix/make.shared.targets 2013-03-07 15:29:22 UTC (rev 57746) +++ firebird/trunk/builds/posix/make.shared.targets 2013-03-07 15:29:44 UTC (rev 57747) @@ -42,9 +42,8 @@ # This rule creates parse.cpp from parse.y $(OBJ)/dsql/parse.cpp $(SRC_ROOT)/include/gen/parse.h: $(SRC_ROOT)/dsql/parse.y $(SRC_ROOT)/dsql/btyacc_fb.ske - sed -n '/%type .*/p' < $< > $(GEN_ROOT)/y.types + sed -n '/%type .*/p' < $< > $(GEN_ROOT)/types.y sed 's/%type .*//' < $< > $(GEN_ROOT)/y.y - sed $(INLINE_EDIT_SED) '/\/*\*\* TYPES \*\*\*\//r $(GEN_ROOT)/y.types' $(GEN_ROOT)/y.y $(BTYACC) -l -d -S $(SRC_ROOT)/dsql/btyacc_fb.ske $(GEN_ROOT)/y.y $(MV) $(GEN_ROOT)/y_tab.c $(OBJ)/dsql/parse.cpp $(MV) $(GEN_ROOT)/y_tab.h $(SRC_ROOT)/include/gen/parse.h Modified: firebird/trunk/builds/win32/parse.bat =================================================================== --- firebird/trunk/builds/win32/parse.bat 2013-03-07 15:29:22 UTC (rev 57746) +++ firebird/trunk/builds/win32/parse.bat 2013-03-07 15:29:44 UTC (rev 57747) @@ -9,16 +9,15 @@ @echo Generating parse.cpp and dsql.tab.h -@sed -n "/%%type .*/p" < %FB_ROOT_PATH%\src\dsql\parse.y > y.types +@sed -n "/%%type .*/p" < %FB_ROOT_PATH%\src\dsql\parse.y > types.y @sed "s/%%type .*//" < %FB_ROOT_PATH%\src\dsql\parse.y > y.y -@sed -i "/\/*\*\* TYPES \*\*\*\//r y.types" y.y %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\btyacc\btyacc -l -d -S %FB_ROOT_PATH%\src\dsql\btyacc_fb.ske y.y @if errorlevel 1 (exit /B 1) @copy y_tab.h %FB_ROOT_PATH%\src\include\gen\parse.h > nul @copy y_tab.c %FB_ROOT_PATH%\src\dsql\parse.cpp > nul @del y.y -@del y.types +@del types.y @del y_tab.h @del y_tab.c @del sed* Modified: firebird/trunk/src/dsql/parse.y =================================================================== --- firebird/trunk/src/dsql/parse.y 2013-03-07 15:29:22 UTC (rev 57746) +++ firebird/trunk/src/dsql/parse.y 2013-03-07 15:29:44 UTC (rev 57747) @@ -683,7 +683,7 @@ Jrd::dsql_req* dsqlReq; } -/*** TYPES ***/ +%include types.y %% This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2013-03-08 01:42:22
|
Revision: 57749 http://sourceforge.net/p/firebird/code/57749 Author: firebirds Date: 2013-03-08 01:42:18 +0000 (Fri, 08 Mar 2013) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2013-03-07 15:41:52 UTC (rev 57748) +++ firebird/trunk/ChangeLog 2013-03-08 01:42:18 UTC (rev 57749) @@ -1,3 +1,59 @@ + 2013-03-07 15:41 asfernandes + M src/dsql/parse.y +Correction. + + 2013-03-07 15:29 asfernandes + M builds/posix/make.shared.targets + M builds/win32/parse.bat + M src/dsql/parse.y +Make line numbers of processed y-file matches parser.y lines. + + 2013-03-07 15:29 asfernandes + M src/include/gen/msgs.h +Update generated file. + + 2013-03-07 13:59 dimitr + M src/dsql/DdlNodes.epp + M src/dsql/DdlNodes.h + M src/dsql/ExprNodes.cpp + M src/dsql/ExprNodes.h + M src/dsql/Nodes.h + M src/dsql/StmtNodes.cpp + M src/dsql/StmtNodes.h + M src/dsql/parse.y + M src/jrd/RecordSourceNodes.cpp + M src/jrd/acl.h + M src/jrd/dfw.epp + M src/jrd/dyn.h + M src/jrd/filters.cpp + M src/jrd/grant.epp + M src/jrd/idx.cpp + M src/jrd/ini.epp + M src/jrd/irq.h + M src/jrd/met.epp + M src/jrd/met_proto.h + M src/jrd/opt.cpp + M src/jrd/scl.epp + M src/jrd/scl.h + M src/jrd/tra.h + M src/jrd/vio.cpp + M src/yvalve/keywords.cpp +1) Cleanup and renaming in the SCL code. +2) Reimplemented the USAGE privilege as a separate one. +3) Added USAGE permission checks for generators/sequences and exceptions. +4) Supported USAGE in GRANT/REVOKE for all object types. +5) Refactored SET GENERATOR and ALTER SEQUENCE as true DDL. blr_set_generator is supported only for backward compatibility, it's not generated by DSQL anymore. +6) Added START WITH clause for [RE]CREATE SEQUENCE and CREATE OR ALTER SEQUENCE. +7) Fixed a number of related errors. + + 2013-03-07 12:23 dimitr + M src/msgs/messages2.sql +Misc. + + 2013-03-07 05:34 dimitr + M src/isql/isql.epp +Fixed Windows build. Thanks to Dmitry Kovalenko. + 2013-03-06 14:30 dimitr M builds/win32/msvc10/btyacc.vcxproj M builds/win32/msvc10/firebird2.props Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2013-03-07 15:41:52 UTC (rev 57748) +++ firebird/trunk/src/jrd/build_no.h 2013-03-08 01:42:18 UTC (rev 57749) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:30248 + FORMAL BUILD NUMBER:30254 */ -#define PRODUCT_VER_STRING "3.0.0.30248" -#define FILE_VER_STRING "WI-T3.0.0.30248" -#define LICENSE_VER_STRING "WI-T3.0.0.30248" -#define FILE_VER_NUMBER 3, 0, 0, 30248 +#define PRODUCT_VER_STRING "3.0.0.30254" +#define FILE_VER_STRING "WI-T3.0.0.30254" +#define LICENSE_VER_STRING "WI-T3.0.0.30254" +#define FILE_VER_NUMBER 3, 0, 0, 30254 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "30248" +#define FB_BUILD_NO "30254" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2013-03-07 15:41:52 UTC (rev 57748) +++ firebird/trunk/src/misc/writeBuildNum.sh 2013-03-08 01:42:18 UTC (rev 57749) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=30248 +BuildNum=30254 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2013-03-09 01:32:59
|
Revision: 57753 http://sourceforge.net/p/firebird/code/57753 Author: firebirds Date: 2013-03-09 01:32:56 +0000 (Sat, 09 Mar 2013) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2013-03-08 15:31:25 UTC (rev 57752) +++ firebird/trunk/ChangeLog 2013-03-09 01:32:56 UTC (rev 57753) @@ -1,3 +1,17 @@ + 2013-03-08 15:31 asfernandes + M src/dsql/StmtNodes.cpp + M src/dsql/StmtNodes.h +Cleanup. + + 2013-03-08 02:37 asfernandes + M src/auth/SecureRemotePassword/manage/SrpManagement.cpp + M src/dsql/DdlNodes.epp + M src/dsql/ExprNodes.cpp + M src/dsql/ExprNodes.h + M src/dsql/parse.y + M src/jrd/grant.epp +Misc. + 2013-03-07 15:41 asfernandes M src/dsql/parse.y Correction. Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2013-03-08 15:31:25 UTC (rev 57752) +++ firebird/trunk/src/jrd/build_no.h 2013-03-09 01:32:56 UTC (rev 57753) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:30254 + FORMAL BUILD NUMBER:30256 */ -#define PRODUCT_VER_STRING "3.0.0.30254" -#define FILE_VER_STRING "WI-T3.0.0.30254" -#define LICENSE_VER_STRING "WI-T3.0.0.30254" -#define FILE_VER_NUMBER 3, 0, 0, 30254 +#define PRODUCT_VER_STRING "3.0.0.30256" +#define FILE_VER_STRING "WI-T3.0.0.30256" +#define LICENSE_VER_STRING "WI-T3.0.0.30256" +#define FILE_VER_NUMBER 3, 0, 0, 30256 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "30254" +#define FB_BUILD_NO "30256" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2013-03-08 15:31:25 UTC (rev 57752) +++ firebird/trunk/src/misc/writeBuildNum.sh 2013-03-09 01:32:56 UTC (rev 57753) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=30254 +BuildNum=30256 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2013-03-10 01:30:54
|
Revision: 57756 http://sourceforge.net/p/firebird/code/57756 Author: firebirds Date: 2013-03-10 01:30:50 +0000 (Sun, 10 Mar 2013) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2013-03-10 00:55:43 UTC (rev 57755) +++ firebird/trunk/ChangeLog 2013-03-10 01:30:50 UTC (rev 57756) @@ -1,3 +1,7 @@ + 2013-03-09 22:00 asfernandes + M src/jrd/filters.cpp +Add missing entries. + 2013-03-08 15:31 asfernandes M src/dsql/StmtNodes.cpp M src/dsql/StmtNodes.h Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2013-03-10 00:55:43 UTC (rev 57755) +++ firebird/trunk/src/jrd/build_no.h 2013-03-10 01:30:50 UTC (rev 57756) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:30256 + FORMAL BUILD NUMBER:30257 */ -#define PRODUCT_VER_STRING "3.0.0.30256" -#define FILE_VER_STRING "WI-T3.0.0.30256" -#define LICENSE_VER_STRING "WI-T3.0.0.30256" -#define FILE_VER_NUMBER 3, 0, 0, 30256 +#define PRODUCT_VER_STRING "3.0.0.30257" +#define FILE_VER_STRING "WI-T3.0.0.30257" +#define LICENSE_VER_STRING "WI-T3.0.0.30257" +#define FILE_VER_NUMBER 3, 0, 0, 30257 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "30256" +#define FB_BUILD_NO "30257" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2013-03-10 00:55:43 UTC (rev 57755) +++ firebird/trunk/src/misc/writeBuildNum.sh 2013-03-10 01:30:50 UTC (rev 57756) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=30256 +BuildNum=30257 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2013-03-11 01:25:06
|
Revision: 57762 http://sourceforge.net/p/firebird/code/57762 Author: firebirds Date: 2013-03-11 01:25:03 +0000 (Mon, 11 Mar 2013) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2013-03-10 20:38:44 UTC (rev 57761) +++ firebird/trunk/ChangeLog 2013-03-11 01:25:03 UTC (rev 57762) @@ -1,3 +1,31 @@ + 2013-03-10 20:38 asfernandes + M src/jrd/exe.cpp + M src/jrd/req.h +Cleanup. + + 2013-03-10 15:39 asfernandes + M src/jrd/dpm.epp +Misc. + + 2013-03-10 14:48 hvlad + M src/jrd/Relation.cpp + M src/jrd/dpm.epp + M src/jrd/jrd.h + M src/jrd/pag.cpp + M src/jrd/vio.cpp + M src/jrd/vio_debug.h +Make tracing VIO works and more easy to use: +- log into file instead of console +- rebuild only small set of affected modules when VIO_DEBUG is changed + + 2013-03-10 07:03 dimitr + M src/dsql/parse.y +Misc syntax adjustments suggested by Adriano. + + 2013-03-10 00:55 asfernandes + M src/isql/isql.epp +Misc. + 2013-03-09 22:00 asfernandes M src/jrd/filters.cpp Add missing entries. Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2013-03-10 20:38:44 UTC (rev 57761) +++ firebird/trunk/src/jrd/build_no.h 2013-03-11 01:25:03 UTC (rev 57762) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:30257 + FORMAL BUILD NUMBER:30262 */ -#define PRODUCT_VER_STRING "3.0.0.30257" -#define FILE_VER_STRING "WI-T3.0.0.30257" -#define LICENSE_VER_STRING "WI-T3.0.0.30257" -#define FILE_VER_NUMBER 3, 0, 0, 30257 +#define PRODUCT_VER_STRING "3.0.0.30262" +#define FILE_VER_STRING "WI-T3.0.0.30262" +#define LICENSE_VER_STRING "WI-T3.0.0.30262" +#define FILE_VER_NUMBER 3, 0, 0, 30262 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "30257" +#define FB_BUILD_NO "30262" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2013-03-10 20:38:44 UTC (rev 57761) +++ firebird/trunk/src/misc/writeBuildNum.sh 2013-03-11 01:25:03 UTC (rev 57762) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=30257 +BuildNum=30262 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fir...@us...> - 2013-03-12 01:08:40
|
Revision: 57766 http://sourceforge.net/p/firebird/code/57766 Author: firebirds Date: 2013-03-12 01:08:36 +0000 (Tue, 12 Mar 2013) Log Message: ----------- nightly update Modified Paths: -------------- firebird/trunk/ChangeLog firebird/trunk/src/jrd/build_no.h firebird/trunk/src/misc/writeBuildNum.sh Modified: firebird/trunk/ChangeLog =================================================================== --- firebird/trunk/ChangeLog 2013-03-11 15:44:58 UTC (rev 57765) +++ firebird/trunk/ChangeLog 2013-03-12 01:08:36 UTC (rev 57766) @@ -1,3 +1,9 @@ + 2013-03-11 15:43 alexpeshkoff + M src/dsql/ExprNodes.cpp + M src/dsql/StmtNodes.cpp + M src/jrd/exe.h +Fixed CORE-3360: update ... returning ... raises -551 (no perm to update) for a column present only in the returning clause + 2013-03-10 20:38 asfernandes M src/jrd/exe.cpp M src/jrd/req.h Modified: firebird/trunk/src/jrd/build_no.h =================================================================== --- firebird/trunk/src/jrd/build_no.h 2013-03-11 15:44:58 UTC (rev 57765) +++ firebird/trunk/src/jrd/build_no.h 2013-03-12 01:08:36 UTC (rev 57766) @@ -3,16 +3,16 @@ *** DO NOT EDIT *** TO CHANGE ANY INFORMATION IN HERE PLEASE EDIT src/misc/writeBuildNum.sh - FORMAL BUILD NUMBER:30262 + FORMAL BUILD NUMBER:30263 */ -#define PRODUCT_VER_STRING "3.0.0.30262" -#define FILE_VER_STRING "WI-T3.0.0.30262" -#define LICENSE_VER_STRING "WI-T3.0.0.30262" -#define FILE_VER_NUMBER 3, 0, 0, 30262 +#define PRODUCT_VER_STRING "3.0.0.30263" +#define FILE_VER_STRING "WI-T3.0.0.30263" +#define LICENSE_VER_STRING "WI-T3.0.0.30263" +#define FILE_VER_NUMBER 3, 0, 0, 30263 #define FB_MAJOR_VER "3" #define FB_MINOR_VER "0" #define FB_REV_NO "0" -#define FB_BUILD_NO "30262" +#define FB_BUILD_NO "30263" #define FB_BUILD_TYPE "T" #define FB_BUILD_SUFFIX "Firebird 3.0 Unstable" Modified: firebird/trunk/src/misc/writeBuildNum.sh =================================================================== --- firebird/trunk/src/misc/writeBuildNum.sh 2013-03-11 15:44:58 UTC (rev 57765) +++ firebird/trunk/src/misc/writeBuildNum.sh 2013-03-12 01:08:36 UTC (rev 57766) @@ -9,7 +9,7 @@ MajorVer=3 MinorVer=0 RevNo=0 -BuildNum=30262 +BuildNum=30263 NowAt=`pwd` cd `dirname $0` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |