mariadb/ndb/tools/select_all.cpp

378 lines
9.9 KiB
C++
Raw Normal View History

/* Copyright (C) 2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <ndb_global.h>
aligned ndb versioning with mysql changed define SNPRINTF_RETURN_ZERO to SNPRINTF_RETURN_TRUNC added define NDB_INIT removed getarg, strlcat, strlcpy aligned ndb version with mysql version cpcd: removed old way of reading config file and replaced with mysql load_defaults changed from using getarg to my_getopts use mysql my_progname moved getarg to test BitKeeper/deleted/.del-strlcat.c~250851f8f1ac1c2c: Delete: ndb/src/common/util/strlcat.c BitKeeper/deleted/.del-strlcpy.c~43266e312d11c47b: Delete: ndb/src/common/util/strlcpy.c ndb/test/include/getarg.h: Rename: ndb/include/util/getarg.h -> ndb/test/include/getarg.h configure.in: aligned ndb versioning with mysql changed define SNPRINTF_RETURN_ZERO to SNPRINTF_RETURN_TRUNC ndb/include/ndb_global.h: added define NDB_INIT removed strlcpy, strlcat ndb/src/common/editline/sysunix.c: removed usage of strlcat ndb/src/common/util/Makefile.am: removed getarg, strlcat, strlcpy ndb/src/common/util/basestring_vsnprintf.c: changed define from SNPRINTF_RETURN_ZERO to SNPRINTF_RETURN_TRUNC ndb/src/common/util/socket_io.cpp: removed usage of strlcat ndb/src/common/util/version.c: aligned ndb version with mysql version ndb/src/cw/cpcd/common.cpp: removed old way of reading config file and replaced with mysql load_defaults ndb/src/cw/cpcd/common.hpp: removed old way of reading config file and replaced with mysql load_defaults ndb/src/cw/cpcd/main.cpp: changed from usin getarg to my_opts ndb/src/kernel/blocks/backup/restore/main.cpp: changed from usin getarg to my_opts ndb/src/kernel/error/ErrorReporter.cpp: use mysql my_progname ndb/src/kernel/main.cpp: removed const in main declaration ndb/src/kernel/vm/Configuration.cpp: changed from usin getarg to my_opts ndb/src/kernel/vm/Configuration.hpp: removed const in main declaration ndb/src/mgmclient/main.cpp: changed from usin getarg to my_opts ndb/src/mgmsrv/main.cpp: changed from usin getarg to my_opts ndb/src/ndbapi/Ndb.cpp: fixed compiler warnings ndb/test/run-test/Makefile.am: moved getarg to test ndb/test/src/Makefile.am: moved getarg to test ndb/test/src/getarg.c: moved strlcat and strlcpy into getarg.c ndb/tools/delete_all.cpp: changed from usin getarg to my_opts ndb/tools/desc.cpp: changed from usin getarg to my_opts ndb/tools/drop_index.cpp: changed from usin getarg to my_opts ndb/tools/drop_tab.cpp: changed from usin getarg to my_opts ndb/tools/listTables.cpp: changed from usin getarg to my_opts ndb/tools/select_all.cpp: changed from usin getarg to my_opts ndb/tools/select_count.cpp: changed from usin getarg to my_opts ndb/tools/waiter.cpp: changed from usin getarg to my_opts
2004-11-01 13:55:43 +00:00
#include <ndb_opts.h>
#include <NdbOut.hpp>
#include <NdbApi.hpp>
#include <NdbMain.h>
#include <NDBT.hpp>
#include <NdbSleep.h>
#include <NdbScanFilter.hpp>
int scanReadRecords(Ndb*,
const NdbDictionary::Table*,
2004-05-26 13:24:14 +02:00
const NdbDictionary::Index*,
int parallel,
int lockType,
bool headers,
bool useHexFormat,
2004-05-26 13:24:14 +02:00
char delim,
ndb: wl-1893: range scanning backwards, ndb kernel ndb/include/kernel/signaldata/AccScan.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/kernel/signaldata/ScanFrag.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/kernel/signaldata/ScanTab.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/ndbapi/NdbIndexScanOperation.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/ndbapi/NdbScanOperation.hpp: wl-1893: range scanning backwards, ndb kernel ndb/src/common/debugger/signaldata/ScanTab.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dblqh/Dblqh.hpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dblqh/DblqhMain.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtc/DbtcMain.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/Dbtux.hpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxCmp.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxNode.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxTree.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/ndbapi/NdbScanOperation.cpp: wl-1893: range scanning backwards, ndb kernel ndb/tools/select_all.cpp: wl-1893: range scanning backwards, ndb kernel sql/ha_ndbcluster.cc: wl-1893: range scanning backwards, ndb kernel
2004-12-17 10:20:18 +01:00
bool orderby,
bool descending);
added config parameter Group on connection moved NdbWaiter, m_ndb_cluster_connection, to impl class moved node selection things to cluster connection moved all private things to impl class added opts for shared memory and node selection changed opts handling somewhat; introduced enum for options and common handling of option variables added checks for transporter support automatic addition of shared mem transporters moved wait_until_ready code to cluster connection added control of usage of new node selection method ndb/include/mgmapi/mgmapi_config_parameters.h: added config parameter Group on connection ndb/include/ndbapi/Ndb.hpp: moved NdbWaiter, m_ndb_cluster_connection, to impl class moved node selection things to cluster connection ndb/include/ndbapi/ndb_cluster_connection.hpp: moved all private things to impl class ndb/include/util/ndb_opts.h: added opts for shared memory and node selection ndb/src/kernel/vm/Configuration.cpp: changed opts handling somewhat; introduced enum for options and common handling of option variables ndb/src/mgmclient/main.cpp: changed opts handling somewhat; introduced enum for options and common handling of option variables ndb/src/mgmsrv/ConfigInfo.cpp: added checks for transporter support automatic addition of shared mem transporters ndb/src/mgmsrv/MgmtSrvr.cpp: in alloc node id first choose connection with specified hostname ndb/src/mgmsrv/main.cpp: changed opts handling somewhat; introduced enum for options and common handling of option variables ndb/src/ndbapi/DictCache.hpp: added include file ndb/src/ndbapi/Ndb.cpp: enabled using new node selection method moved wait_until_ready code to cluster connection moved node selection (hint) to cluster connection removed start transaction dgroup ndb/src/ndbapi/NdbDictionaryImpl.hpp: removed and added inclusde files ndb/src/ndbapi/NdbImpl.hpp: moved things from Ndb into Impl class moved waiter things to new file NdbWaiter.hpp ndb/src/ndbapi/NdbScanOperation.cpp: ndbwaiter is no in impl class ndb/src/ndbapi/Ndbif.cpp: ndbwaiter is no in impl class ndb/src/ndbapi/Ndbinit.cpp: moved some Ndb things into impl class ndb/src/ndbapi/TransporterFacade.hpp: changed friend declaration ndb/src/ndbapi/ndb_cluster_connection.cpp: moved node selection things to cluster connection moved things from cluster connection to cluster connection impl class ndb/test/ndbapi/testNdbApi.cpp: removed start transaction dgroup ndb/tools/delete_all.cpp: changed opts handling somewhat; introduced enum for options and common handling of option variables ndb/tools/desc.cpp: changed opts handling somewhat; introduced enum for options and common handling of option variables ndb/tools/drop_index.cpp: changed opts handling somewhat; introduced enum for options and common handling of option variables ndb/tools/drop_tab.cpp: changed opts handling somewhat; introduced enum for options and common handling of option variables ndb/tools/listTables.cpp: changed opts handling somewhat; introduced enum for options and common handling of option variables ndb/tools/restore/restore_main.cpp: changed opts handling somewhat; introduced enum for options and common handling of option variables ndb/tools/select_all.cpp: changed opts handling somewhat; introduced enum for options and common handling of option variables ndb/tools/select_count.cpp: changed opts handling somewhat; introduced enum for options and common handling of option variables ndb/tools/waiter.cpp: changed opts handling somewhat; introduced enum for options and common handling of option variables sql/ha_ndbcluster.cc: added control of usage of new node selection method sql/mysqld.cc: added control of usage of new node selection method
2004-12-20 12:36:14 +01:00
enum ndb_select_all_options {
NDB_STD_OPTS_OPTIONS
};
NDB_STD_OPTS_VARS;
aligned ndb versioning with mysql changed define SNPRINTF_RETURN_ZERO to SNPRINTF_RETURN_TRUNC added define NDB_INIT removed getarg, strlcat, strlcpy aligned ndb version with mysql version cpcd: removed old way of reading config file and replaced with mysql load_defaults changed from using getarg to my_getopts use mysql my_progname moved getarg to test BitKeeper/deleted/.del-strlcat.c~250851f8f1ac1c2c: Delete: ndb/src/common/util/strlcat.c BitKeeper/deleted/.del-strlcpy.c~43266e312d11c47b: Delete: ndb/src/common/util/strlcpy.c ndb/test/include/getarg.h: Rename: ndb/include/util/getarg.h -> ndb/test/include/getarg.h configure.in: aligned ndb versioning with mysql changed define SNPRINTF_RETURN_ZERO to SNPRINTF_RETURN_TRUNC ndb/include/ndb_global.h: added define NDB_INIT removed strlcpy, strlcat ndb/src/common/editline/sysunix.c: removed usage of strlcat ndb/src/common/util/Makefile.am: removed getarg, strlcat, strlcpy ndb/src/common/util/basestring_vsnprintf.c: changed define from SNPRINTF_RETURN_ZERO to SNPRINTF_RETURN_TRUNC ndb/src/common/util/socket_io.cpp: removed usage of strlcat ndb/src/common/util/version.c: aligned ndb version with mysql version ndb/src/cw/cpcd/common.cpp: removed old way of reading config file and replaced with mysql load_defaults ndb/src/cw/cpcd/common.hpp: removed old way of reading config file and replaced with mysql load_defaults ndb/src/cw/cpcd/main.cpp: changed from usin getarg to my_opts ndb/src/kernel/blocks/backup/restore/main.cpp: changed from usin getarg to my_opts ndb/src/kernel/error/ErrorReporter.cpp: use mysql my_progname ndb/src/kernel/main.cpp: removed const in main declaration ndb/src/kernel/vm/Configuration.cpp: changed from usin getarg to my_opts ndb/src/kernel/vm/Configuration.hpp: removed const in main declaration ndb/src/mgmclient/main.cpp: changed from usin getarg to my_opts ndb/src/mgmsrv/main.cpp: changed from usin getarg to my_opts ndb/src/ndbapi/Ndb.cpp: fixed compiler warnings ndb/test/run-test/Makefile.am: moved getarg to test ndb/test/src/Makefile.am: moved getarg to test ndb/test/src/getarg.c: moved strlcat and strlcpy into getarg.c ndb/tools/delete_all.cpp: changed from usin getarg to my_opts ndb/tools/desc.cpp: changed from usin getarg to my_opts ndb/tools/drop_index.cpp: changed from usin getarg to my_opts ndb/tools/drop_tab.cpp: changed from usin getarg to my_opts ndb/tools/listTables.cpp: changed from usin getarg to my_opts ndb/tools/select_all.cpp: changed from usin getarg to my_opts ndb/tools/select_count.cpp: changed from usin getarg to my_opts ndb/tools/waiter.cpp: changed from usin getarg to my_opts
2004-11-01 13:55:43 +00:00
static const char* _dbname = "TEST_DB";
static const char* _delimiter = "\t";
static int _unqualified, _header, _parallelism, _useHexFormat, _lock,
ndb: wl-1893: range scanning backwards, ndb kernel ndb/include/kernel/signaldata/AccScan.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/kernel/signaldata/ScanFrag.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/kernel/signaldata/ScanTab.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/ndbapi/NdbIndexScanOperation.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/ndbapi/NdbScanOperation.hpp: wl-1893: range scanning backwards, ndb kernel ndb/src/common/debugger/signaldata/ScanTab.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dblqh/Dblqh.hpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dblqh/DblqhMain.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtc/DbtcMain.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/Dbtux.hpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxCmp.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxNode.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxTree.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/ndbapi/NdbScanOperation.cpp: wl-1893: range scanning backwards, ndb kernel ndb/tools/select_all.cpp: wl-1893: range scanning backwards, ndb kernel sql/ha_ndbcluster.cc: wl-1893: range scanning backwards, ndb kernel
2004-12-17 10:20:18 +01:00
_order, _descending;
aligned ndb versioning with mysql changed define SNPRINTF_RETURN_ZERO to SNPRINTF_RETURN_TRUNC added define NDB_INIT removed getarg, strlcat, strlcpy aligned ndb version with mysql version cpcd: removed old way of reading config file and replaced with mysql load_defaults changed from using getarg to my_getopts use mysql my_progname moved getarg to test BitKeeper/deleted/.del-strlcat.c~250851f8f1ac1c2c: Delete: ndb/src/common/util/strlcat.c BitKeeper/deleted/.del-strlcpy.c~43266e312d11c47b: Delete: ndb/src/common/util/strlcpy.c ndb/test/include/getarg.h: Rename: ndb/include/util/getarg.h -> ndb/test/include/getarg.h configure.in: aligned ndb versioning with mysql changed define SNPRINTF_RETURN_ZERO to SNPRINTF_RETURN_TRUNC ndb/include/ndb_global.h: added define NDB_INIT removed strlcpy, strlcat ndb/src/common/editline/sysunix.c: removed usage of strlcat ndb/src/common/util/Makefile.am: removed getarg, strlcat, strlcpy ndb/src/common/util/basestring_vsnprintf.c: changed define from SNPRINTF_RETURN_ZERO to SNPRINTF_RETURN_TRUNC ndb/src/common/util/socket_io.cpp: removed usage of strlcat ndb/src/common/util/version.c: aligned ndb version with mysql version ndb/src/cw/cpcd/common.cpp: removed old way of reading config file and replaced with mysql load_defaults ndb/src/cw/cpcd/common.hpp: removed old way of reading config file and replaced with mysql load_defaults ndb/src/cw/cpcd/main.cpp: changed from usin getarg to my_opts ndb/src/kernel/blocks/backup/restore/main.cpp: changed from usin getarg to my_opts ndb/src/kernel/error/ErrorReporter.cpp: use mysql my_progname ndb/src/kernel/main.cpp: removed const in main declaration ndb/src/kernel/vm/Configuration.cpp: changed from usin getarg to my_opts ndb/src/kernel/vm/Configuration.hpp: removed const in main declaration ndb/src/mgmclient/main.cpp: changed from usin getarg to my_opts ndb/src/mgmsrv/main.cpp: changed from usin getarg to my_opts ndb/src/ndbapi/Ndb.cpp: fixed compiler warnings ndb/test/run-test/Makefile.am: moved getarg to test ndb/test/src/Makefile.am: moved getarg to test ndb/test/src/getarg.c: moved strlcat and strlcpy into getarg.c ndb/tools/delete_all.cpp: changed from usin getarg to my_opts ndb/tools/desc.cpp: changed from usin getarg to my_opts ndb/tools/drop_index.cpp: changed from usin getarg to my_opts ndb/tools/drop_tab.cpp: changed from usin getarg to my_opts ndb/tools/listTables.cpp: changed from usin getarg to my_opts ndb/tools/select_all.cpp: changed from usin getarg to my_opts ndb/tools/select_count.cpp: changed from usin getarg to my_opts ndb/tools/waiter.cpp: changed from usin getarg to my_opts
2004-11-01 13:55:43 +00:00
static struct my_option my_long_options[] =
{
NDB_STD_OPTS("ndb_desc"),
{ "database", 'd', "Name of database table is in",
(gptr*) &_dbname, (gptr*) &_dbname, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "parallelism", 'p', "parallelism",
(gptr*) &_parallelism, (gptr*) &_parallelism, 0,
GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
aligned ndb versioning with mysql changed define SNPRINTF_RETURN_ZERO to SNPRINTF_RETURN_TRUNC added define NDB_INIT removed getarg, strlcat, strlcpy aligned ndb version with mysql version cpcd: removed old way of reading config file and replaced with mysql load_defaults changed from using getarg to my_getopts use mysql my_progname moved getarg to test BitKeeper/deleted/.del-strlcat.c~250851f8f1ac1c2c: Delete: ndb/src/common/util/strlcat.c BitKeeper/deleted/.del-strlcpy.c~43266e312d11c47b: Delete: ndb/src/common/util/strlcpy.c ndb/test/include/getarg.h: Rename: ndb/include/util/getarg.h -> ndb/test/include/getarg.h configure.in: aligned ndb versioning with mysql changed define SNPRINTF_RETURN_ZERO to SNPRINTF_RETURN_TRUNC ndb/include/ndb_global.h: added define NDB_INIT removed strlcpy, strlcat ndb/src/common/editline/sysunix.c: removed usage of strlcat ndb/src/common/util/Makefile.am: removed getarg, strlcat, strlcpy ndb/src/common/util/basestring_vsnprintf.c: changed define from SNPRINTF_RETURN_ZERO to SNPRINTF_RETURN_TRUNC ndb/src/common/util/socket_io.cpp: removed usage of strlcat ndb/src/common/util/version.c: aligned ndb version with mysql version ndb/src/cw/cpcd/common.cpp: removed old way of reading config file and replaced with mysql load_defaults ndb/src/cw/cpcd/common.hpp: removed old way of reading config file and replaced with mysql load_defaults ndb/src/cw/cpcd/main.cpp: changed from usin getarg to my_opts ndb/src/kernel/blocks/backup/restore/main.cpp: changed from usin getarg to my_opts ndb/src/kernel/error/ErrorReporter.cpp: use mysql my_progname ndb/src/kernel/main.cpp: removed const in main declaration ndb/src/kernel/vm/Configuration.cpp: changed from usin getarg to my_opts ndb/src/kernel/vm/Configuration.hpp: removed const in main declaration ndb/src/mgmclient/main.cpp: changed from usin getarg to my_opts ndb/src/mgmsrv/main.cpp: changed from usin getarg to my_opts ndb/src/ndbapi/Ndb.cpp: fixed compiler warnings ndb/test/run-test/Makefile.am: moved getarg to test ndb/test/src/Makefile.am: moved getarg to test ndb/test/src/getarg.c: moved strlcat and strlcpy into getarg.c ndb/tools/delete_all.cpp: changed from usin getarg to my_opts ndb/tools/desc.cpp: changed from usin getarg to my_opts ndb/tools/drop_index.cpp: changed from usin getarg to my_opts ndb/tools/drop_tab.cpp: changed from usin getarg to my_opts ndb/tools/listTables.cpp: changed from usin getarg to my_opts ndb/tools/select_all.cpp: changed from usin getarg to my_opts ndb/tools/select_count.cpp: changed from usin getarg to my_opts ndb/tools/waiter.cpp: changed from usin getarg to my_opts
2004-11-01 13:55:43 +00:00
{ "lock", 'l', "Read(0), Read-hold(1), Exclusive(2)",
(gptr*) &_lock, (gptr*) &_lock, 0,
GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "order", 'o', "Sort resultset according to index",
(gptr*) &_order, (gptr*) &_order, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
ndb: wl-1893: range scanning backwards, ndb kernel ndb/include/kernel/signaldata/AccScan.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/kernel/signaldata/ScanFrag.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/kernel/signaldata/ScanTab.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/ndbapi/NdbIndexScanOperation.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/ndbapi/NdbScanOperation.hpp: wl-1893: range scanning backwards, ndb kernel ndb/src/common/debugger/signaldata/ScanTab.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dblqh/Dblqh.hpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dblqh/DblqhMain.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtc/DbtcMain.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/Dbtux.hpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxCmp.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxNode.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxTree.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/ndbapi/NdbScanOperation.cpp: wl-1893: range scanning backwards, ndb kernel ndb/tools/select_all.cpp: wl-1893: range scanning backwards, ndb kernel sql/ha_ndbcluster.cc: wl-1893: range scanning backwards, ndb kernel
2004-12-17 10:20:18 +01:00
{ "descending", 'z', "Sort descending (requires order flag)",
(gptr*) &_descending, (gptr*) &_descending, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
aligned ndb versioning with mysql changed define SNPRINTF_RETURN_ZERO to SNPRINTF_RETURN_TRUNC added define NDB_INIT removed getarg, strlcat, strlcpy aligned ndb version with mysql version cpcd: removed old way of reading config file and replaced with mysql load_defaults changed from using getarg to my_getopts use mysql my_progname moved getarg to test BitKeeper/deleted/.del-strlcat.c~250851f8f1ac1c2c: Delete: ndb/src/common/util/strlcat.c BitKeeper/deleted/.del-strlcpy.c~43266e312d11c47b: Delete: ndb/src/common/util/strlcpy.c ndb/test/include/getarg.h: Rename: ndb/include/util/getarg.h -> ndb/test/include/getarg.h configure.in: aligned ndb versioning with mysql changed define SNPRINTF_RETURN_ZERO to SNPRINTF_RETURN_TRUNC ndb/include/ndb_global.h: added define NDB_INIT removed strlcpy, strlcat ndb/src/common/editline/sysunix.c: removed usage of strlcat ndb/src/common/util/Makefile.am: removed getarg, strlcat, strlcpy ndb/src/common/util/basestring_vsnprintf.c: changed define from SNPRINTF_RETURN_ZERO to SNPRINTF_RETURN_TRUNC ndb/src/common/util/socket_io.cpp: removed usage of strlcat ndb/src/common/util/version.c: aligned ndb version with mysql version ndb/src/cw/cpcd/common.cpp: removed old way of reading config file and replaced with mysql load_defaults ndb/src/cw/cpcd/common.hpp: removed old way of reading config file and replaced with mysql load_defaults ndb/src/cw/cpcd/main.cpp: changed from usin getarg to my_opts ndb/src/kernel/blocks/backup/restore/main.cpp: changed from usin getarg to my_opts ndb/src/kernel/error/ErrorReporter.cpp: use mysql my_progname ndb/src/kernel/main.cpp: removed const in main declaration ndb/src/kernel/vm/Configuration.cpp: changed from usin getarg to my_opts ndb/src/kernel/vm/Configuration.hpp: removed const in main declaration ndb/src/mgmclient/main.cpp: changed from usin getarg to my_opts ndb/src/mgmsrv/main.cpp: changed from usin getarg to my_opts ndb/src/ndbapi/Ndb.cpp: fixed compiler warnings ndb/test/run-test/Makefile.am: moved getarg to test ndb/test/src/Makefile.am: moved getarg to test ndb/test/src/getarg.c: moved strlcat and strlcpy into getarg.c ndb/tools/delete_all.cpp: changed from usin getarg to my_opts ndb/tools/desc.cpp: changed from usin getarg to my_opts ndb/tools/drop_index.cpp: changed from usin getarg to my_opts ndb/tools/drop_tab.cpp: changed from usin getarg to my_opts ndb/tools/listTables.cpp: changed from usin getarg to my_opts ndb/tools/select_all.cpp: changed from usin getarg to my_opts ndb/tools/select_count.cpp: changed from usin getarg to my_opts ndb/tools/waiter.cpp: changed from usin getarg to my_opts
2004-11-01 13:55:43 +00:00
{ "header", 'h', "Print header",
(gptr*) &_header, (gptr*) &_header, 0,
GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0 },
{ "useHexFormat", 'x', "Output numbers in hexadecimal format",
(gptr*) &_useHexFormat, (gptr*) &_useHexFormat, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "delimiter", 'D', "Column delimiter",
(gptr*) &_delimiter, (gptr*) &_delimiter, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
};
static void print_version()
{
printf("MySQL distrib %s, for %s (%s)\n",MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE);
}
static void usage()
{
char desc[] =
"tabname\n"\
"This program reads all records from one table in NDB Cluster\n"\
"and print them to stdout. This is performed using a scan read.\n"\
"(It only print error messages if it encounters a permanent error.)\n"\
"It can also be used to dump the content of a table to file \n"\
" ex: select_all --no-header --delimiter=';' T4 > T4.data\n";
aligned ndb versioning with mysql changed define SNPRINTF_RETURN_ZERO to SNPRINTF_RETURN_TRUNC added define NDB_INIT removed getarg, strlcat, strlcpy aligned ndb version with mysql version cpcd: removed old way of reading config file and replaced with mysql load_defaults changed from using getarg to my_getopts use mysql my_progname moved getarg to test BitKeeper/deleted/.del-strlcat.c~250851f8f1ac1c2c: Delete: ndb/src/common/util/strlcat.c BitKeeper/deleted/.del-strlcpy.c~43266e312d11c47b: Delete: ndb/src/common/util/strlcpy.c ndb/test/include/getarg.h: Rename: ndb/include/util/getarg.h -> ndb/test/include/getarg.h configure.in: aligned ndb versioning with mysql changed define SNPRINTF_RETURN_ZERO to SNPRINTF_RETURN_TRUNC ndb/include/ndb_global.h: added define NDB_INIT removed strlcpy, strlcat ndb/src/common/editline/sysunix.c: removed usage of strlcat ndb/src/common/util/Makefile.am: removed getarg, strlcat, strlcpy ndb/src/common/util/basestring_vsnprintf.c: changed define from SNPRINTF_RETURN_ZERO to SNPRINTF_RETURN_TRUNC ndb/src/common/util/socket_io.cpp: removed usage of strlcat ndb/src/common/util/version.c: aligned ndb version with mysql version ndb/src/cw/cpcd/common.cpp: removed old way of reading config file and replaced with mysql load_defaults ndb/src/cw/cpcd/common.hpp: removed old way of reading config file and replaced with mysql load_defaults ndb/src/cw/cpcd/main.cpp: changed from usin getarg to my_opts ndb/src/kernel/blocks/backup/restore/main.cpp: changed from usin getarg to my_opts ndb/src/kernel/error/ErrorReporter.cpp: use mysql my_progname ndb/src/kernel/main.cpp: removed const in main declaration ndb/src/kernel/vm/Configuration.cpp: changed from usin getarg to my_opts ndb/src/kernel/vm/Configuration.hpp: removed const in main declaration ndb/src/mgmclient/main.cpp: changed from usin getarg to my_opts ndb/src/mgmsrv/main.cpp: changed from usin getarg to my_opts ndb/src/ndbapi/Ndb.cpp: fixed compiler warnings ndb/test/run-test/Makefile.am: moved getarg to test ndb/test/src/Makefile.am: moved getarg to test ndb/test/src/getarg.c: moved strlcat and strlcpy into getarg.c ndb/tools/delete_all.cpp: changed from usin getarg to my_opts ndb/tools/desc.cpp: changed from usin getarg to my_opts ndb/tools/drop_index.cpp: changed from usin getarg to my_opts ndb/tools/drop_tab.cpp: changed from usin getarg to my_opts ndb/tools/listTables.cpp: changed from usin getarg to my_opts ndb/tools/select_all.cpp: changed from usin getarg to my_opts ndb/tools/select_count.cpp: changed from usin getarg to my_opts ndb/tools/waiter.cpp: changed from usin getarg to my_opts
2004-11-01 13:55:43 +00:00
print_version();
my_print_help(my_long_options);
my_print_variables(my_long_options);
}
static my_bool
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
char *argument)
{
switch (optid) {
case '#':
DBUG_PUSH(argument ? argument : "d:t:O,/tmp/ndb_select_all.trace");
break;
case 'V':
print_version();
exit(0);
case '?':
usage();
exit(0);
}
aligned ndb versioning with mysql changed define SNPRINTF_RETURN_ZERO to SNPRINTF_RETURN_TRUNC added define NDB_INIT removed getarg, strlcat, strlcpy aligned ndb version with mysql version cpcd: removed old way of reading config file and replaced with mysql load_defaults changed from using getarg to my_getopts use mysql my_progname moved getarg to test BitKeeper/deleted/.del-strlcat.c~250851f8f1ac1c2c: Delete: ndb/src/common/util/strlcat.c BitKeeper/deleted/.del-strlcpy.c~43266e312d11c47b: Delete: ndb/src/common/util/strlcpy.c ndb/test/include/getarg.h: Rename: ndb/include/util/getarg.h -> ndb/test/include/getarg.h configure.in: aligned ndb versioning with mysql changed define SNPRINTF_RETURN_ZERO to SNPRINTF_RETURN_TRUNC ndb/include/ndb_global.h: added define NDB_INIT removed strlcpy, strlcat ndb/src/common/editline/sysunix.c: removed usage of strlcat ndb/src/common/util/Makefile.am: removed getarg, strlcat, strlcpy ndb/src/common/util/basestring_vsnprintf.c: changed define from SNPRINTF_RETURN_ZERO to SNPRINTF_RETURN_TRUNC ndb/src/common/util/socket_io.cpp: removed usage of strlcat ndb/src/common/util/version.c: aligned ndb version with mysql version ndb/src/cw/cpcd/common.cpp: removed old way of reading config file and replaced with mysql load_defaults ndb/src/cw/cpcd/common.hpp: removed old way of reading config file and replaced with mysql load_defaults ndb/src/cw/cpcd/main.cpp: changed from usin getarg to my_opts ndb/src/kernel/blocks/backup/restore/main.cpp: changed from usin getarg to my_opts ndb/src/kernel/error/ErrorReporter.cpp: use mysql my_progname ndb/src/kernel/main.cpp: removed const in main declaration ndb/src/kernel/vm/Configuration.cpp: changed from usin getarg to my_opts ndb/src/kernel/vm/Configuration.hpp: removed const in main declaration ndb/src/mgmclient/main.cpp: changed from usin getarg to my_opts ndb/src/mgmsrv/main.cpp: changed from usin getarg to my_opts ndb/src/ndbapi/Ndb.cpp: fixed compiler warnings ndb/test/run-test/Makefile.am: moved getarg to test ndb/test/src/Makefile.am: moved getarg to test ndb/test/src/getarg.c: moved strlcat and strlcpy into getarg.c ndb/tools/delete_all.cpp: changed from usin getarg to my_opts ndb/tools/desc.cpp: changed from usin getarg to my_opts ndb/tools/drop_index.cpp: changed from usin getarg to my_opts ndb/tools/drop_tab.cpp: changed from usin getarg to my_opts ndb/tools/listTables.cpp: changed from usin getarg to my_opts ndb/tools/select_all.cpp: changed from usin getarg to my_opts ndb/tools/select_count.cpp: changed from usin getarg to my_opts ndb/tools/waiter.cpp: changed from usin getarg to my_opts
2004-11-01 13:55:43 +00:00
return 0;
}
aligned ndb versioning with mysql changed define SNPRINTF_RETURN_ZERO to SNPRINTF_RETURN_TRUNC added define NDB_INIT removed getarg, strlcat, strlcpy aligned ndb version with mysql version cpcd: removed old way of reading config file and replaced with mysql load_defaults changed from using getarg to my_getopts use mysql my_progname moved getarg to test BitKeeper/deleted/.del-strlcat.c~250851f8f1ac1c2c: Delete: ndb/src/common/util/strlcat.c BitKeeper/deleted/.del-strlcpy.c~43266e312d11c47b: Delete: ndb/src/common/util/strlcpy.c ndb/test/include/getarg.h: Rename: ndb/include/util/getarg.h -> ndb/test/include/getarg.h configure.in: aligned ndb versioning with mysql changed define SNPRINTF_RETURN_ZERO to SNPRINTF_RETURN_TRUNC ndb/include/ndb_global.h: added define NDB_INIT removed strlcpy, strlcat ndb/src/common/editline/sysunix.c: removed usage of strlcat ndb/src/common/util/Makefile.am: removed getarg, strlcat, strlcpy ndb/src/common/util/basestring_vsnprintf.c: changed define from SNPRINTF_RETURN_ZERO to SNPRINTF_RETURN_TRUNC ndb/src/common/util/socket_io.cpp: removed usage of strlcat ndb/src/common/util/version.c: aligned ndb version with mysql version ndb/src/cw/cpcd/common.cpp: removed old way of reading config file and replaced with mysql load_defaults ndb/src/cw/cpcd/common.hpp: removed old way of reading config file and replaced with mysql load_defaults ndb/src/cw/cpcd/main.cpp: changed from usin getarg to my_opts ndb/src/kernel/blocks/backup/restore/main.cpp: changed from usin getarg to my_opts ndb/src/kernel/error/ErrorReporter.cpp: use mysql my_progname ndb/src/kernel/main.cpp: removed const in main declaration ndb/src/kernel/vm/Configuration.cpp: changed from usin getarg to my_opts ndb/src/kernel/vm/Configuration.hpp: removed const in main declaration ndb/src/mgmclient/main.cpp: changed from usin getarg to my_opts ndb/src/mgmsrv/main.cpp: changed from usin getarg to my_opts ndb/src/ndbapi/Ndb.cpp: fixed compiler warnings ndb/test/run-test/Makefile.am: moved getarg to test ndb/test/src/Makefile.am: moved getarg to test ndb/test/src/getarg.c: moved strlcat and strlcpy into getarg.c ndb/tools/delete_all.cpp: changed from usin getarg to my_opts ndb/tools/desc.cpp: changed from usin getarg to my_opts ndb/tools/drop_index.cpp: changed from usin getarg to my_opts ndb/tools/drop_tab.cpp: changed from usin getarg to my_opts ndb/tools/listTables.cpp: changed from usin getarg to my_opts ndb/tools/select_all.cpp: changed from usin getarg to my_opts ndb/tools/select_count.cpp: changed from usin getarg to my_opts ndb/tools/waiter.cpp: changed from usin getarg to my_opts
2004-11-01 13:55:43 +00:00
int main(int argc, char** argv){
NDB_INIT(argv[0]);
const char *load_default_groups[]= { "mysql_cluster",0 };
aligned ndb versioning with mysql changed define SNPRINTF_RETURN_ZERO to SNPRINTF_RETURN_TRUNC added define NDB_INIT removed getarg, strlcat, strlcpy aligned ndb version with mysql version cpcd: removed old way of reading config file and replaced with mysql load_defaults changed from using getarg to my_getopts use mysql my_progname moved getarg to test BitKeeper/deleted/.del-strlcat.c~250851f8f1ac1c2c: Delete: ndb/src/common/util/strlcat.c BitKeeper/deleted/.del-strlcpy.c~43266e312d11c47b: Delete: ndb/src/common/util/strlcpy.c ndb/test/include/getarg.h: Rename: ndb/include/util/getarg.h -> ndb/test/include/getarg.h configure.in: aligned ndb versioning with mysql changed define SNPRINTF_RETURN_ZERO to SNPRINTF_RETURN_TRUNC ndb/include/ndb_global.h: added define NDB_INIT removed strlcpy, strlcat ndb/src/common/editline/sysunix.c: removed usage of strlcat ndb/src/common/util/Makefile.am: removed getarg, strlcat, strlcpy ndb/src/common/util/basestring_vsnprintf.c: changed define from SNPRINTF_RETURN_ZERO to SNPRINTF_RETURN_TRUNC ndb/src/common/util/socket_io.cpp: removed usage of strlcat ndb/src/common/util/version.c: aligned ndb version with mysql version ndb/src/cw/cpcd/common.cpp: removed old way of reading config file and replaced with mysql load_defaults ndb/src/cw/cpcd/common.hpp: removed old way of reading config file and replaced with mysql load_defaults ndb/src/cw/cpcd/main.cpp: changed from usin getarg to my_opts ndb/src/kernel/blocks/backup/restore/main.cpp: changed from usin getarg to my_opts ndb/src/kernel/error/ErrorReporter.cpp: use mysql my_progname ndb/src/kernel/main.cpp: removed const in main declaration ndb/src/kernel/vm/Configuration.cpp: changed from usin getarg to my_opts ndb/src/kernel/vm/Configuration.hpp: removed const in main declaration ndb/src/mgmclient/main.cpp: changed from usin getarg to my_opts ndb/src/mgmsrv/main.cpp: changed from usin getarg to my_opts ndb/src/ndbapi/Ndb.cpp: fixed compiler warnings ndb/test/run-test/Makefile.am: moved getarg to test ndb/test/src/Makefile.am: moved getarg to test ndb/test/src/getarg.c: moved strlcat and strlcpy into getarg.c ndb/tools/delete_all.cpp: changed from usin getarg to my_opts ndb/tools/desc.cpp: changed from usin getarg to my_opts ndb/tools/drop_index.cpp: changed from usin getarg to my_opts ndb/tools/drop_tab.cpp: changed from usin getarg to my_opts ndb/tools/listTables.cpp: changed from usin getarg to my_opts ndb/tools/select_all.cpp: changed from usin getarg to my_opts ndb/tools/select_count.cpp: changed from usin getarg to my_opts ndb/tools/waiter.cpp: changed from usin getarg to my_opts
2004-11-01 13:55:43 +00:00
load_defaults("my",load_default_groups,&argc,&argv);
const char* _tabname;
int ho_error;
if ((ho_error=handle_options(&argc, &argv, my_long_options, get_one_option)))
return NDBT_ProgramExit(NDBT_WRONGARGS);
if ((_tabname = argv[0]) == 0) {
usage();
return NDBT_ProgramExit(NDBT_WRONGARGS);
}
Ndb_cluster_connection con(opt_connect_str);
if(con.connect(12, 5, 1) != 0)
{
return NDBT_ProgramExit(NDBT_FAILED);
}
Ndb MyNdb(&con, _dbname );
if(MyNdb.init() != 0){
ERR(MyNdb.getNdbError());
return NDBT_ProgramExit(NDBT_FAILED);
}
// Connect to Ndb and wait for it to become ready
while(MyNdb.waitUntilReady() != 0)
ndbout << "Waiting for ndb to become ready..." << endl;
// Check if table exists in db
const NdbDictionary::Table* pTab = NDBT_Table::discoverTableFromDb(&MyNdb, _tabname);
2004-05-26 13:24:14 +02:00
const NdbDictionary::Index * pIdx = 0;
aligned ndb versioning with mysql changed define SNPRINTF_RETURN_ZERO to SNPRINTF_RETURN_TRUNC added define NDB_INIT removed getarg, strlcat, strlcpy aligned ndb version with mysql version cpcd: removed old way of reading config file and replaced with mysql load_defaults changed from using getarg to my_getopts use mysql my_progname moved getarg to test BitKeeper/deleted/.del-strlcat.c~250851f8f1ac1c2c: Delete: ndb/src/common/util/strlcat.c BitKeeper/deleted/.del-strlcpy.c~43266e312d11c47b: Delete: ndb/src/common/util/strlcpy.c ndb/test/include/getarg.h: Rename: ndb/include/util/getarg.h -> ndb/test/include/getarg.h configure.in: aligned ndb versioning with mysql changed define SNPRINTF_RETURN_ZERO to SNPRINTF_RETURN_TRUNC ndb/include/ndb_global.h: added define NDB_INIT removed strlcpy, strlcat ndb/src/common/editline/sysunix.c: removed usage of strlcat ndb/src/common/util/Makefile.am: removed getarg, strlcat, strlcpy ndb/src/common/util/basestring_vsnprintf.c: changed define from SNPRINTF_RETURN_ZERO to SNPRINTF_RETURN_TRUNC ndb/src/common/util/socket_io.cpp: removed usage of strlcat ndb/src/common/util/version.c: aligned ndb version with mysql version ndb/src/cw/cpcd/common.cpp: removed old way of reading config file and replaced with mysql load_defaults ndb/src/cw/cpcd/common.hpp: removed old way of reading config file and replaced with mysql load_defaults ndb/src/cw/cpcd/main.cpp: changed from usin getarg to my_opts ndb/src/kernel/blocks/backup/restore/main.cpp: changed from usin getarg to my_opts ndb/src/kernel/error/ErrorReporter.cpp: use mysql my_progname ndb/src/kernel/main.cpp: removed const in main declaration ndb/src/kernel/vm/Configuration.cpp: changed from usin getarg to my_opts ndb/src/kernel/vm/Configuration.hpp: removed const in main declaration ndb/src/mgmclient/main.cpp: changed from usin getarg to my_opts ndb/src/mgmsrv/main.cpp: changed from usin getarg to my_opts ndb/src/ndbapi/Ndb.cpp: fixed compiler warnings ndb/test/run-test/Makefile.am: moved getarg to test ndb/test/src/Makefile.am: moved getarg to test ndb/test/src/getarg.c: moved strlcat and strlcpy into getarg.c ndb/tools/delete_all.cpp: changed from usin getarg to my_opts ndb/tools/desc.cpp: changed from usin getarg to my_opts ndb/tools/drop_index.cpp: changed from usin getarg to my_opts ndb/tools/drop_tab.cpp: changed from usin getarg to my_opts ndb/tools/listTables.cpp: changed from usin getarg to my_opts ndb/tools/select_all.cpp: changed from usin getarg to my_opts ndb/tools/select_count.cpp: changed from usin getarg to my_opts ndb/tools/waiter.cpp: changed from usin getarg to my_opts
2004-11-01 13:55:43 +00:00
if(argc > 1){
2004-11-18 20:54:35 +01:00
pIdx = MyNdb.getDictionary()->getIndex(argv[1], _tabname);
2004-05-26 13:24:14 +02:00
}
if(pTab == NULL){
ndbout << " Table " << _tabname << " does not exist!" << endl;
return NDBT_ProgramExit(NDBT_WRONGARGS);
}
2004-11-18 20:54:35 +01:00
if(argc > 1 && pIdx == 0)
{
ndbout << " Index " << argv[1] << " does not exists" << endl;
}
if(_order && pIdx == NULL){
ndbout << " Order flag given without an index" << endl;
return NDBT_ProgramExit(NDBT_WRONGARGS);
}
ndb: wl-1893: range scanning backwards, ndb kernel ndb/include/kernel/signaldata/AccScan.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/kernel/signaldata/ScanFrag.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/kernel/signaldata/ScanTab.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/ndbapi/NdbIndexScanOperation.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/ndbapi/NdbScanOperation.hpp: wl-1893: range scanning backwards, ndb kernel ndb/src/common/debugger/signaldata/ScanTab.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dblqh/Dblqh.hpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dblqh/DblqhMain.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtc/DbtcMain.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/Dbtux.hpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxCmp.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxNode.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxTree.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/ndbapi/NdbScanOperation.cpp: wl-1893: range scanning backwards, ndb kernel ndb/tools/select_all.cpp: wl-1893: range scanning backwards, ndb kernel sql/ha_ndbcluster.cc: wl-1893: range scanning backwards, ndb kernel
2004-12-17 10:20:18 +01:00
if (_descending && ! _order) {
ndbout << " Descending flag given without order flag" << endl;
return NDBT_ProgramExit(NDBT_WRONGARGS);
}
if (scanReadRecords(&MyNdb,
pTab,
2004-05-26 13:24:14 +02:00
pIdx,
_parallelism,
_lock,
_header,
_useHexFormat,
ndb: wl-1893: range scanning backwards, ndb kernel ndb/include/kernel/signaldata/AccScan.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/kernel/signaldata/ScanFrag.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/kernel/signaldata/ScanTab.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/ndbapi/NdbIndexScanOperation.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/ndbapi/NdbScanOperation.hpp: wl-1893: range scanning backwards, ndb kernel ndb/src/common/debugger/signaldata/ScanTab.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dblqh/Dblqh.hpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dblqh/DblqhMain.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtc/DbtcMain.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/Dbtux.hpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxCmp.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxNode.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxTree.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/ndbapi/NdbScanOperation.cpp: wl-1893: range scanning backwards, ndb kernel ndb/tools/select_all.cpp: wl-1893: range scanning backwards, ndb kernel sql/ha_ndbcluster.cc: wl-1893: range scanning backwards, ndb kernel
2004-12-17 10:20:18 +01:00
(char)*_delimiter, _order, _descending) != 0){
return NDBT_ProgramExit(NDBT_FAILED);
}
return NDBT_ProgramExit(NDBT_OK);
}
int scanReadRecords(Ndb* pNdb,
const NdbDictionary::Table* pTab,
2004-05-26 13:24:14 +02:00
const NdbDictionary::Index* pIdx,
int parallel,
int _lock,
bool headers,
bool useHexFormat,
ndb: wl-1893: range scanning backwards, ndb kernel ndb/include/kernel/signaldata/AccScan.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/kernel/signaldata/ScanFrag.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/kernel/signaldata/ScanTab.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/ndbapi/NdbIndexScanOperation.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/ndbapi/NdbScanOperation.hpp: wl-1893: range scanning backwards, ndb kernel ndb/src/common/debugger/signaldata/ScanTab.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dblqh/Dblqh.hpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dblqh/DblqhMain.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtc/DbtcMain.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/Dbtux.hpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxCmp.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxNode.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxTree.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/ndbapi/NdbScanOperation.cpp: wl-1893: range scanning backwards, ndb kernel ndb/tools/select_all.cpp: wl-1893: range scanning backwards, ndb kernel sql/ha_ndbcluster.cc: wl-1893: range scanning backwards, ndb kernel
2004-12-17 10:20:18 +01:00
char delimiter, bool order, bool descending){
int retryAttempt = 0;
const int retryMax = 100;
int check;
NdbTransaction *pTrans;
2004-05-26 13:24:14 +02:00
NdbScanOperation *pOp;
NdbIndexScanOperation * pIOp= 0;
NDBT_ResultRow * row = new NDBT_ResultRow(*pTab, delimiter);
while (true){
if (retryAttempt >= retryMax){
ndbout << "ERROR: has retried this operation " << retryAttempt
<< " times, failing!" << endl;
return -1;
}
pTrans = pNdb->startTransaction();
if (pTrans == NULL) {
const NdbError err = pNdb->getNdbError();
if (err.status == NdbError::TemporaryError){
NdbSleep_MilliSleep(50);
retryAttempt++;
continue;
}
ERR(err);
return -1;
}
2004-05-26 13:24:14 +02:00
pOp = (!pIdx) ? pTrans->getNdbScanOperation(pTab->getName()) :
pIOp=pTrans->getNdbIndexScanOperation(pIdx->getName(), pTab->getName());
if (pOp == NULL) {
ERR(pTrans->getNdbError());
pNdb->closeTransaction(pTrans);
return -1;
}
wl2126 - ndb - fix last unhandled part of read_multi_range reading sorted multi_range with several range-scans BitKeeper/deleted/.del-NdbResultSet.hpp~e0042f4c18088ff6: Delete: ndb/include/ndbapi/NdbResultSet.hpp BitKeeper/deleted/.del-NdbResultSet.cpp~84d192cf3f42600d: Delete: ndb/src/ndbapi/NdbResultSet.cpp ndb/include/ndbapi/NdbApi.hpp: Remove NdbResultSet ndb/include/ndbapi/NdbIndexScanOperation.hpp: Remove NdbResultSet ndb/include/ndbapi/NdbScanOperation.hpp: Remove NdbResultSet ndb/src/ndbapi/Makefile.am: Remove NdbResultSet ndb/src/ndbapi/NdbConnection.cpp: Remove NdbResultSet ndb/src/ndbapi/NdbIndexOperation.cpp: Remove NdbResultSet ndb/src/ndbapi/NdbScanOperation.cpp: Remove NdbResultSet ndb/test/include/HugoOperations.hpp: Remove NdbResultSet ndb/test/ndbapi/ScanFunctions.hpp: Remove NdbResultSet ndb/test/ndbapi/ScanInterpretTest.hpp: Remove NdbResultSet ndb/test/ndbapi/bank/Bank.cpp: Remove NdbResultSet ndb/test/ndbapi/bank/BankLoad.cpp: Remove NdbResultSet ndb/test/ndbapi/slow_select.cpp: Remove NdbResultSet ndb/test/ndbapi/testBlobs.cpp: Remove NdbResultSet ndb/test/ndbapi/testDataBuffers.cpp: Remove NdbResultSet ndb/test/ndbapi/testDeadlock.cpp: Remove NdbResultSet ndb/test/ndbapi/testIndex.cpp: Remove NdbResultSet ndb/test/ndbapi/testOIBasic.cpp: Remove NdbResultSet ndb/test/ndbapi/testReadPerf.cpp: Remove NdbResultSet ndb/test/ndbapi/testScan.cpp: Remove NdbResultSet ndb/test/ndbapi/testScanPerf.cpp: Remove NdbResultSet ndb/test/src/HugoOperations.cpp: Remove NdbResultSet ndb/test/src/HugoTransactions.cpp: Remove NdbResultSet ndb/test/src/UtilTransactions.cpp: Remove NdbResultSet ndb/tools/delete_all.cpp: Remove NdbResultSet ndb/tools/select_all.cpp: Remove NdbResultSet ndb/tools/select_count.cpp: Remove NdbResultSet sql/ha_ndbcluster.cc: 1) Fix a = 3 -> a= 3 2) Impl. last part of wl2126 ordered "multi ordered scan"
2004-12-07 15:15:49 +01:00
int rs;
2004-05-26 13:24:14 +02:00
switch(_lock + (3 * order)){
case 1:
2004-05-26 13:24:14 +02:00
rs = pOp->readTuples(NdbScanOperation::LM_Read, 0, parallel);
break;
case 2:
2004-05-26 13:24:14 +02:00
rs = pOp->readTuples(NdbScanOperation::LM_Exclusive, 0, parallel);
break;
case 3:
rs = pIOp->readTuples(NdbScanOperation::LM_CommittedRead, 0, parallel,
ndb: wl-1893: range scanning backwards, ndb kernel ndb/include/kernel/signaldata/AccScan.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/kernel/signaldata/ScanFrag.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/kernel/signaldata/ScanTab.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/ndbapi/NdbIndexScanOperation.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/ndbapi/NdbScanOperation.hpp: wl-1893: range scanning backwards, ndb kernel ndb/src/common/debugger/signaldata/ScanTab.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dblqh/Dblqh.hpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dblqh/DblqhMain.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtc/DbtcMain.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/Dbtux.hpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxCmp.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxNode.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxTree.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/ndbapi/NdbScanOperation.cpp: wl-1893: range scanning backwards, ndb kernel ndb/tools/select_all.cpp: wl-1893: range scanning backwards, ndb kernel sql/ha_ndbcluster.cc: wl-1893: range scanning backwards, ndb kernel
2004-12-17 10:20:18 +01:00
true, descending);
break;
2004-05-26 13:24:14 +02:00
case 4:
ndb: wl-1893: range scanning backwards, ndb kernel ndb/include/kernel/signaldata/AccScan.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/kernel/signaldata/ScanFrag.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/kernel/signaldata/ScanTab.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/ndbapi/NdbIndexScanOperation.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/ndbapi/NdbScanOperation.hpp: wl-1893: range scanning backwards, ndb kernel ndb/src/common/debugger/signaldata/ScanTab.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dblqh/Dblqh.hpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dblqh/DblqhMain.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtc/DbtcMain.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/Dbtux.hpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxCmp.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxNode.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxTree.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/ndbapi/NdbScanOperation.cpp: wl-1893: range scanning backwards, ndb kernel ndb/tools/select_all.cpp: wl-1893: range scanning backwards, ndb kernel sql/ha_ndbcluster.cc: wl-1893: range scanning backwards, ndb kernel
2004-12-17 10:20:18 +01:00
rs = pIOp->readTuples(NdbScanOperation::LM_Read, 0, parallel, true, descending);
2004-05-26 13:24:14 +02:00
break;
case 5:
ndb: wl-1893: range scanning backwards, ndb kernel ndb/include/kernel/signaldata/AccScan.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/kernel/signaldata/ScanFrag.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/kernel/signaldata/ScanTab.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/ndbapi/NdbIndexScanOperation.hpp: wl-1893: range scanning backwards, ndb kernel ndb/include/ndbapi/NdbScanOperation.hpp: wl-1893: range scanning backwards, ndb kernel ndb/src/common/debugger/signaldata/ScanTab.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dblqh/Dblqh.hpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dblqh/DblqhMain.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtc/DbtcMain.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/Dbtux.hpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxCmp.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxNode.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/kernel/blocks/dbtux/DbtuxTree.cpp: wl-1893: range scanning backwards, ndb kernel ndb/src/ndbapi/NdbScanOperation.cpp: wl-1893: range scanning backwards, ndb kernel ndb/tools/select_all.cpp: wl-1893: range scanning backwards, ndb kernel sql/ha_ndbcluster.cc: wl-1893: range scanning backwards, ndb kernel
2004-12-17 10:20:18 +01:00
rs = pIOp->readTuples(NdbScanOperation::LM_Exclusive, 0, parallel, true, descending);
2004-05-26 13:24:14 +02:00
break;
case 0:
default:
2004-05-26 13:24:14 +02:00
rs = pOp->readTuples(NdbScanOperation::LM_CommittedRead, 0, parallel);
break;
}
wl2126 - ndb - fix last unhandled part of read_multi_range reading sorted multi_range with several range-scans BitKeeper/deleted/.del-NdbResultSet.hpp~e0042f4c18088ff6: Delete: ndb/include/ndbapi/NdbResultSet.hpp BitKeeper/deleted/.del-NdbResultSet.cpp~84d192cf3f42600d: Delete: ndb/src/ndbapi/NdbResultSet.cpp ndb/include/ndbapi/NdbApi.hpp: Remove NdbResultSet ndb/include/ndbapi/NdbIndexScanOperation.hpp: Remove NdbResultSet ndb/include/ndbapi/NdbScanOperation.hpp: Remove NdbResultSet ndb/src/ndbapi/Makefile.am: Remove NdbResultSet ndb/src/ndbapi/NdbConnection.cpp: Remove NdbResultSet ndb/src/ndbapi/NdbIndexOperation.cpp: Remove NdbResultSet ndb/src/ndbapi/NdbScanOperation.cpp: Remove NdbResultSet ndb/test/include/HugoOperations.hpp: Remove NdbResultSet ndb/test/ndbapi/ScanFunctions.hpp: Remove NdbResultSet ndb/test/ndbapi/ScanInterpretTest.hpp: Remove NdbResultSet ndb/test/ndbapi/bank/Bank.cpp: Remove NdbResultSet ndb/test/ndbapi/bank/BankLoad.cpp: Remove NdbResultSet ndb/test/ndbapi/slow_select.cpp: Remove NdbResultSet ndb/test/ndbapi/testBlobs.cpp: Remove NdbResultSet ndb/test/ndbapi/testDataBuffers.cpp: Remove NdbResultSet ndb/test/ndbapi/testDeadlock.cpp: Remove NdbResultSet ndb/test/ndbapi/testIndex.cpp: Remove NdbResultSet ndb/test/ndbapi/testOIBasic.cpp: Remove NdbResultSet ndb/test/ndbapi/testReadPerf.cpp: Remove NdbResultSet ndb/test/ndbapi/testScan.cpp: Remove NdbResultSet ndb/test/ndbapi/testScanPerf.cpp: Remove NdbResultSet ndb/test/src/HugoOperations.cpp: Remove NdbResultSet ndb/test/src/HugoTransactions.cpp: Remove NdbResultSet ndb/test/src/UtilTransactions.cpp: Remove NdbResultSet ndb/tools/delete_all.cpp: Remove NdbResultSet ndb/tools/select_all.cpp: Remove NdbResultSet ndb/tools/select_count.cpp: Remove NdbResultSet sql/ha_ndbcluster.cc: 1) Fix a = 3 -> a= 3 2) Impl. last part of wl2126 ordered "multi ordered scan"
2004-12-07 15:15:49 +01:00
if( rs != 0 ){
ERR(pTrans->getNdbError());
pNdb->closeTransaction(pTrans);
return -1;
}
2004-05-26 13:24:14 +02:00
if(0){
NdbScanFilter sf(pOp);
#if 0
sf.begin(NdbScanFilter::AND);
sf.le(0, (Uint32)10);
sf.end();
#elif 0
sf.begin(NdbScanFilter::OR);
sf.begin(NdbScanFilter::AND);
sf.ge(0, (Uint32)10);
sf.lt(0, (Uint32)20);
sf.end();
sf.begin(NdbScanFilter::AND);
sf.ge(0, (Uint32)30);
sf.lt(0, (Uint32)40);
sf.end();
sf.end();
#elif 1
sf.begin(NdbScanFilter::AND);
sf.begin(NdbScanFilter::OR);
sf.begin(NdbScanFilter::AND);
sf.ge(0, (Uint32)10);
sf.lt(0, (Uint32)20);
sf.end();
sf.begin(NdbScanFilter::AND);
sf.ge(0, (Uint32)30);
sf.lt(0, (Uint32)40);
sf.end();
sf.end();
sf.begin(NdbScanFilter::OR);
sf.begin(NdbScanFilter::AND);
sf.ge(0, (Uint32)0);
sf.lt(0, (Uint32)50);
sf.end();
sf.begin(NdbScanFilter::AND);
sf.ge(0, (Uint32)100);
sf.lt(0, (Uint32)200);
sf.end();
sf.end();
sf.end();
#endif
} else {
check = pOp->interpret_exit_ok();
if( check == -1 ) {
ERR(pTrans->getNdbError());
pNdb->closeTransaction(pTrans);
return -1;
}
}
for(int a = 0; a<pTab->getNoOfColumns(); a++){
if((row->attributeStore(a) =
pOp->getValue(pTab->getColumn(a)->getName())) == 0) {
ERR(pTrans->getNdbError());
pNdb->closeTransaction(pTrans);
return -1;
}
}
2004-05-26 13:24:14 +02:00
check = pTrans->execute(NoCommit);
if( check == -1 ) {
const NdbError err = pTrans->getNdbError();
2004-05-26 13:24:14 +02:00
if (err.status == NdbError::TemporaryError){
pNdb->closeTransaction(pTrans);
NdbSleep_MilliSleep(50);
retryAttempt++;
continue;
}
ERR(err);
pNdb->closeTransaction(pTrans);
return -1;
}
if (headers)
row->header(ndbout) << endl;
2004-05-26 13:24:14 +02:00
int eof;
int rows = 0;
wl2126 - ndb - fix last unhandled part of read_multi_range reading sorted multi_range with several range-scans BitKeeper/deleted/.del-NdbResultSet.hpp~e0042f4c18088ff6: Delete: ndb/include/ndbapi/NdbResultSet.hpp BitKeeper/deleted/.del-NdbResultSet.cpp~84d192cf3f42600d: Delete: ndb/src/ndbapi/NdbResultSet.cpp ndb/include/ndbapi/NdbApi.hpp: Remove NdbResultSet ndb/include/ndbapi/NdbIndexScanOperation.hpp: Remove NdbResultSet ndb/include/ndbapi/NdbScanOperation.hpp: Remove NdbResultSet ndb/src/ndbapi/Makefile.am: Remove NdbResultSet ndb/src/ndbapi/NdbConnection.cpp: Remove NdbResultSet ndb/src/ndbapi/NdbIndexOperation.cpp: Remove NdbResultSet ndb/src/ndbapi/NdbScanOperation.cpp: Remove NdbResultSet ndb/test/include/HugoOperations.hpp: Remove NdbResultSet ndb/test/ndbapi/ScanFunctions.hpp: Remove NdbResultSet ndb/test/ndbapi/ScanInterpretTest.hpp: Remove NdbResultSet ndb/test/ndbapi/bank/Bank.cpp: Remove NdbResultSet ndb/test/ndbapi/bank/BankLoad.cpp: Remove NdbResultSet ndb/test/ndbapi/slow_select.cpp: Remove NdbResultSet ndb/test/ndbapi/testBlobs.cpp: Remove NdbResultSet ndb/test/ndbapi/testDataBuffers.cpp: Remove NdbResultSet ndb/test/ndbapi/testDeadlock.cpp: Remove NdbResultSet ndb/test/ndbapi/testIndex.cpp: Remove NdbResultSet ndb/test/ndbapi/testOIBasic.cpp: Remove NdbResultSet ndb/test/ndbapi/testReadPerf.cpp: Remove NdbResultSet ndb/test/ndbapi/testScan.cpp: Remove NdbResultSet ndb/test/ndbapi/testScanPerf.cpp: Remove NdbResultSet ndb/test/src/HugoOperations.cpp: Remove NdbResultSet ndb/test/src/HugoTransactions.cpp: Remove NdbResultSet ndb/test/src/UtilTransactions.cpp: Remove NdbResultSet ndb/tools/delete_all.cpp: Remove NdbResultSet ndb/tools/select_all.cpp: Remove NdbResultSet ndb/tools/select_count.cpp: Remove NdbResultSet sql/ha_ndbcluster.cc: 1) Fix a = 3 -> a= 3 2) Impl. last part of wl2126 ordered "multi ordered scan"
2004-12-07 15:15:49 +01:00
eof = pOp->nextResult();
2004-05-26 13:24:14 +02:00
while(eof == 0){
rows++;
if (useHexFormat) {
ndbout.setHexFormat(1) << (*row) << endl;
} else {
ndbout << (*row) << endl;
}
wl2126 - ndb - fix last unhandled part of read_multi_range reading sorted multi_range with several range-scans BitKeeper/deleted/.del-NdbResultSet.hpp~e0042f4c18088ff6: Delete: ndb/include/ndbapi/NdbResultSet.hpp BitKeeper/deleted/.del-NdbResultSet.cpp~84d192cf3f42600d: Delete: ndb/src/ndbapi/NdbResultSet.cpp ndb/include/ndbapi/NdbApi.hpp: Remove NdbResultSet ndb/include/ndbapi/NdbIndexScanOperation.hpp: Remove NdbResultSet ndb/include/ndbapi/NdbScanOperation.hpp: Remove NdbResultSet ndb/src/ndbapi/Makefile.am: Remove NdbResultSet ndb/src/ndbapi/NdbConnection.cpp: Remove NdbResultSet ndb/src/ndbapi/NdbIndexOperation.cpp: Remove NdbResultSet ndb/src/ndbapi/NdbScanOperation.cpp: Remove NdbResultSet ndb/test/include/HugoOperations.hpp: Remove NdbResultSet ndb/test/ndbapi/ScanFunctions.hpp: Remove NdbResultSet ndb/test/ndbapi/ScanInterpretTest.hpp: Remove NdbResultSet ndb/test/ndbapi/bank/Bank.cpp: Remove NdbResultSet ndb/test/ndbapi/bank/BankLoad.cpp: Remove NdbResultSet ndb/test/ndbapi/slow_select.cpp: Remove NdbResultSet ndb/test/ndbapi/testBlobs.cpp: Remove NdbResultSet ndb/test/ndbapi/testDataBuffers.cpp: Remove NdbResultSet ndb/test/ndbapi/testDeadlock.cpp: Remove NdbResultSet ndb/test/ndbapi/testIndex.cpp: Remove NdbResultSet ndb/test/ndbapi/testOIBasic.cpp: Remove NdbResultSet ndb/test/ndbapi/testReadPerf.cpp: Remove NdbResultSet ndb/test/ndbapi/testScan.cpp: Remove NdbResultSet ndb/test/ndbapi/testScanPerf.cpp: Remove NdbResultSet ndb/test/src/HugoOperations.cpp: Remove NdbResultSet ndb/test/src/HugoTransactions.cpp: Remove NdbResultSet ndb/test/src/UtilTransactions.cpp: Remove NdbResultSet ndb/tools/delete_all.cpp: Remove NdbResultSet ndb/tools/select_all.cpp: Remove NdbResultSet ndb/tools/select_count.cpp: Remove NdbResultSet sql/ha_ndbcluster.cc: 1) Fix a = 3 -> a= 3 2) Impl. last part of wl2126 ordered "multi ordered scan"
2004-12-07 15:15:49 +01:00
eof = pOp->nextResult();
}
if (eof == -1) {
const NdbError err = pTrans->getNdbError();
if (err.status == NdbError::TemporaryError){
pNdb->closeTransaction(pTrans);
NdbSleep_MilliSleep(50);
retryAttempt++;
continue;
}
ERR(err);
pNdb->closeTransaction(pTrans);
return -1;
}
pNdb->closeTransaction(pTrans);
ndbout << rows << " rows returned" << endl;
return 0;
}
return -1;
}