From f2b24d02caaab07b9ef4b9c8c11e1a4f271ca48d Mon Sep 17 00:00:00 2001 From: asfernandes Date: Sun, 21 Apr 2013 02:09:45 +0000 Subject: [PATCH] Misc. --- builds/install/misc/firebird.conf.in | 2 +- doc/README.build.mingw.html | 6 +-- doc/README.build.msvc.html | 6 +-- doc/README.plugins.html | 56 ++++++++++++++-------------- doc/sql.extensions/README.data_types | 2 +- src/common/cvt.cpp | 2 + src/jrd/ExtEngineManager.cpp | 2 +- src/jrd/jrd.h | 4 +- 8 files changed, 41 insertions(+), 39 deletions(-) diff --git a/builds/install/misc/firebird.conf.in b/builds/install/misc/firebird.conf.in index d19ab7700d..90b6b2ce95 100644 --- a/builds/install/misc/firebird.conf.in +++ b/builds/install/misc/firebird.conf.in @@ -79,7 +79,7 @@ # I.e. when # include some_file.conf # is used in /opt/config/master.conf, we include /opt/config/some_file.conf. -# Traditional wildcards * and ? may be used in icnlude operator. In this case +# Traditional wildcards * and ? may be used in include operator. In this case # all matching files will be included in undefined order. Example: # include $(dir_plugins)/config/*.conf # diff --git a/doc/README.build.mingw.html b/doc/README.build.mingw.html index 374d119595..69094a73bf 100644 --- a/doc/README.build.mingw.html +++ b/doc/README.build.mingw.html @@ -58,7 +58,7 @@ Authors: Blas Rodriguez Somoza (blas at puertareal dot com), Dmitry Sibiryakov (
  1. Start msys with the icon.
  2. -
  3. Go to the firebird2 root directory. For instance, if your root is d:\svn\firebird you must do cd /d/svn/firebird2.
  4. +
  5. Go to the firebird root directory. For instance, if your root is d:\svn\firebird you must do cd /d/svn/firebird.
  6. Start configure with the switches to get super/classic and production/development build, for instance:
    autogen.sh --enable-superserver
    The valid switches for autogen are
    @@ -81,11 +81,11 @@ warning: too many arguments for format

    4.- INSTALL.

    To create an installable build you need to execute the InnoSetup script.

      -
    1. Open firebird2/builds/install/arch-specific/mingw/super/FirebirdInstall_15.iss with InnoSetup.
    2. +
    3. Open firebird/builds/install/arch-specific/mingw/super/FirebirdInstall_15.iss with InnoSetup.
    4. Run the script with F9 or Run->Run
    5. Close InnoSetup
    -

    A executable installer will be in firebird2/builds/install/arch-specific/mingw/super/

    +

    A executable installer will be in firebird/builds/install/arch-specific/mingw/super/

    To install the build, simply run the resulting exe.

    5.- TROUBLESHOOTING

    diff --git a/doc/README.build.msvc.html b/doc/README.build.msvc.html index 5c695d1540..99f383efd9 100644 --- a/doc/README.build.msvc.html +++ b/doc/README.build.msvc.html @@ -104,7 +104,7 @@ with the default options (next, next, next)
  7. 4.1.-Standard build

      -
    1. Eliminate the fb2control from firebird2 solution if you are using Visual Studio Express (doesn't support MFC) and it's only the control pannel applet and try to build it, it should give you no errors when you build the solution.
    2. +
    3. Eliminate the fb2control from firebird3 solution if you are using Visual Studio Express (doesn't support MFC) and it's only the control pannel applet and try to build it, it should give you no errors when you build the solution.
    4. Open a command line window.
    5. Go to the builds\win32 directory.
    6. Run the following batches in order (your version of VisualStudio is detected automatically)
    7. @@ -115,7 +115,7 @@ with the default options (next, next, next)

4.2.-Parser rebuild

@@ -137,7 +137,7 @@ Where DEBUG means if the build is a debug one or not and CS means classic server

4.5.-Building samples

After the standard build is finished, an output directory with the same structure as the installed FB directory is created.

-

If you want to build the examples just cd to firebird2\output\examples\build_win32 and run run_all.bat

+

If you want to build the examples just cd to firebird3\output\examples\build_win32 and run run_all.bat

Run_all.bat calls four other bats to make the example sets. Any example set can be build independently with its make_XXX script.

The example sets are:

@@ -49,12 +49,12 @@ clarified explicitly.


One should not expect that -firebird plugin architecture will make it possible to create any kind +Firebird plugin architecture will make it possible to create any kind of plugin you want. To be able to have plugin (for example) -encrypting database on the disk firebird code should be prepared for +encrypting database on the disk, Firebird code should be prepared for it – must have a point from which plugin is called. I.e. each version has a fixed set of plugins which are supported. To add one -more type first of all firebird code should be modified. What DOES +more type, first of all Firebird code should be modified. What DOES our plugin architecture – it helps to make both adding new types of plugins and writing plugin code simple and as universal between plugins as possible.

@@ -71,7 +71,7 @@ set of plugin types:

  • ExternalEngine controls use of various engines, see README.external_routines;

  • Trace plugin is known - from firebird 2.5, but a way how it interacts with engine was + from Firebird 2.5, but a way how it interacts with engine was changed to match new generic rules;

  • encrypting plugins @@ -87,8 +87,8 @@ set of plugin types:


    Plugins are using a set of -special firebird interfaces (see README.interfaces about interfaces -in firebird). All plugin-specific interfaces are reference counted, +special Firebird interfaces (see README.interfaces about interfaces +in Firebird). All plugin-specific interfaces are reference counted, i.e. have explicitly controlled lifetime. Interfaces are declared in Plugin.h include file. There is a simple example of writing plugin module – DbCrypt_example. It does not perform any actual encryption @@ -105,14 +105,14 @@ short list of plugin features:

    attention to word “reasonable” - asking a question from plugin at server's console is hardly good idea;

  • it's OK to use - firebird API calls in your plugin if needed (for example, default - authentication server and user manager are using firebird database + Firebird API calls in your plugin if needed (for example, default + authentication server and user manager are using Firebird database to store accounts);

    -
  • additionally firebird +

  • additionally Firebird provides a set of interfaces, helping you to configure your plugins (certainly, you are not forced to use them – plugin is generic code, which may use any way of providing configuration information, - but with standard tools you get common for the rest of firebird + but with standard tools you get common for the rest of Firebird configuration style and sooner of all save you efforts).


    @@ -142,7 +142,7 @@ complicated.


    As it was already -mentioned single plugin module may implement more than single plugin. +mentioned, single plugin module may implement more than single plugin. Moreover, single plugin may have at the same time more than one configuration – and for each configuration separate plugin's factory is created. Each of this 3 objects (module – implementation @@ -151,7 +151,7 @@ dynamic library. Plugin implementation's name is one given to it by plugin developer and hard-coded inside module. Factory's name by default equals to plugin implementation's name (and it's factory name which is actually used in firebird.conf). Certainly in typical -trivial case module contains one plugin, and that plugin works with +trivial case, module contains one plugin, and that plugin works with only one configuration, and all 3 names are equal, and no more configuration is needed – for example libEngine12.so or Engine12.dll contains implementation of provider Engine12, and @@ -159,7 +159,7 @@ nothing else except record

    Providers = Engine12

    in firebird.conf is needed -to load it. But if you have something complex – file hwill help +to load it. But if you have something complex – file will help you to have such plugin factories which you really want.


    @@ -180,14 +180,14 @@ name of config record to be used

    ## name of a file, containing plugin's configuration

    }

    i.e. when plugin PlugName -is needed firebird loads library LibName, finds in it plugin +is needed Firebird loads library LibName, finds in it plugin registered with name RegName and passes it configuration from config record ConfName or config file ConfFile (config record is used if -bith are given). Each parameter in this record may be missing, in +both are given). Each parameter in this record may be missing, in that case the default PlugName is used. The only exception is -ConfigFile – by default file with same name as module's dynamic +ConfigFile – by default, file with same name as module's dynamic library but .conf extension is used. ConfigFile is expected to have -format Key=Value (like other firebird configuration files), same +format Key=Value (like other Firebird configuration files), same format is used for plugin record:

    Config = ConfName

    {

    @@ -203,8 +203,8 @@ vendor and others – from another one (and have different licenses for appropriate client parts), but each vendor calls his plugin BestCrypt. Certainly, first of all you have to rename libraries to something like WC1 and WC2 – one can't have 2 files with same name -in one directory. But after it modules stop to load automatically – -they are not named BestCrypt any more. To fix it plugins.conf should +in one directory. But after it, modules stop to load automatically – +they are not named BestCrypt any more. To fix it, plugins.conf should contain something like this:

    Plugin = WC1

    {

    @@ -227,7 +227,7 @@ automatically select appropriate plugin to talk to client.


    Another sample may be -found in distributed with firebird plugins.conf. One of standard +found in distributed with Firebird plugins.conf. One of standard plugins, UDR, is written to use non-default configuration. Therefore module name and one configuration parameter are given explicitly.


    @@ -241,7 +241,7 @@ with such names. How do they work?

    A. That are so-called 'built-in' plugins. They are built into fbclient library, and therefore are always present. Arrival of such plugins is due to old -ability to distribute windows firebird client as single dll. It was +ability to distribute windows Firebird client as single dll. It was decided to keep such feature at least for a case when standard set of plugins is used.


    @@ -250,7 +250,7 @@ plugins is used.

    and Arc4 plugins mean?

    A. Srp implements Secure Remote Passwords protocol which is default way of authenticating -users in firebird 3. It has efficient password’s length equal to 20 +users in Firebird 3. It has efficient password’s length equal to 20 bytes, resistant to most of attacks (including man in the middle) and does not require exchanging any keys between client and server to work. Arc4 means Alleged RC4 - an implementation of RC4 cypher. The diff --git a/doc/sql.extensions/README.data_types b/doc/sql.extensions/README.data_types index 65320dc829..f4b25dee93 100644 --- a/doc/sql.extensions/README.data_types +++ b/doc/sql.extensions/README.data_types @@ -55,7 +55,7 @@ BOOLEAN (FB 3.0) 2. CREATE TABLE TABLE1 (FIELD1 BOOLEAN); Note(s): - 1. Quote from the SQL-99 specification: + 1. Quote from the SQL-2008 specification: The data type boolean comprises the distinct truth values TRUE and FALSE. Unless prohibited by a NOT NULL constraint, the boolean data type also supports the truth value UNKNOWN as the diff --git a/src/common/cvt.cpp b/src/common/cvt.cpp index 8f39127138..ea4f22eee0 100644 --- a/src/common/cvt.cpp +++ b/src/common/cvt.cpp @@ -1449,8 +1449,10 @@ void CVT_move_common(const dsc* from, dsc* to, Callbacks* cb) ptr += sizeof(USHORT); if (l < from->dsc_length) + { cb->err(Arg::Gds(isc_arith_except) << Arg::Gds(isc_string_truncation) << Arg::Gds(isc_trunc_limits) << Arg::Num(l) << Arg::Num(from->dsc_length)); + } Jrd::CharSet* charSet = cb->getToCharset(to->getCharSet()); cb->validateData(charSet, from->dsc_length, from->dsc_address); diff --git a/src/jrd/ExtEngineManager.cpp b/src/jrd/ExtEngineManager.cpp index 8c0f4c1de2..a002c13e5b 100644 --- a/src/jrd/ExtEngineManager.cpp +++ b/src/jrd/ExtEngineManager.cpp @@ -449,7 +449,7 @@ namespace return request->req_rpb.getCount() > n && request->req_rpb[n].rpb_number.isValid() ? &request->req_rpb[n] : NULL; } - + private: const ExtEngineManager::Trigger* trigger; diff --git a/src/jrd/jrd.h b/src/jrd/jrd.h index 1155626e65..7d6de40eef 100644 --- a/src/jrd/jrd.h +++ b/src/jrd/jrd.h @@ -831,7 +831,7 @@ inline Jrd::Database* GET_DBB() /*-------------------------------------------------------------------------* * macros used to set thread_db and Database pointers when there are not set already * *-------------------------------------------------------------------------*/ -inline void SET_TDBB(Jrd::thread_db* &tdbb) +inline void SET_TDBB(Jrd::thread_db*& tdbb) { if (tdbb == NULL) { tdbb = JRD_get_thread_data(); @@ -839,7 +839,7 @@ inline void SET_TDBB(Jrd::thread_db* &tdbb) CHECK_TDBB(tdbb); } -inline void SET_DBB(Jrd::Database* &dbb) +inline void SET_DBB(Jrd::Database*& dbb) { if (dbb == NULL) { dbb = GET_DBB();