Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
c6150949
Commit
c6150949
authored
Aug 20, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added switch to mysqld to specify connectstring
parent
80d924d9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
6 deletions
+24
-6
mysql-test/mysql-test-run.sh
mysql-test/mysql-test-run.sh
+3
-5
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+8
-0
sql/ha_ndbcluster.h
sql/ha_ndbcluster.h
+2
-0
sql/mysqld.cc
sql/mysqld.cc
+11
-1
No files found.
mysql-test/mysql-test-run.sh
View file @
c6150949
...
...
@@ -1451,12 +1451,10 @@ then
then
echo
"Starting ndbcluster"
./ndb/ndbcluster
--port-base
=
$NDBCLUSTER_PORT
--small
--diskless
--initial
--data-dir
=
$MYSQL_TEST_DIR
/var
||
exit
1
NDB_CONNECTSTRING
=
"host=localhost:
$NDBCLUSTER_PORT
"
export
NDB_CONNECTSTRING
USE_NDBCLUSTER
=
"--ndb-connectstring=
\"
host=localhost:
$NDBCLUSTER_PORT
\"
"
else
NDB_CONNECTSTRING
=
"
$USE_RUNNING_NDBCLUSTER
"
export
NDB_CONNECTSTRING
echo
"Using ndbcluster at
$NDB_CONNECTSTRING
"
USE_NDBCLUSTER
=
"--ndb-connectstring=
\"
$USE_RUNNING_NDBCLUSTER
\"
"
echo
"Using ndbcluster at
$USE_NDBCLUSTER
"
fi
fi
...
...
sql/ha_ndbcluster.cc
View file @
c6150949
...
...
@@ -46,6 +46,9 @@ static const int max_transactions= 256;
// Default value for prefetch of autoincrement values
static
const
ha_rows
autoincrement_prefetch
=
32
;
// connectstring to cluster if given by mysqld
const
char
*
ndbcluster_connectstring
=
0
;
#define NDB_HIDDEN_PRIMARY_KEY_LENGTH 8
...
...
@@ -3375,6 +3378,11 @@ int ndb_discover_tables()
bool
ndbcluster_init
()
{
DBUG_ENTER
(
"ndbcluster_init"
);
// Set connectstring if specified
if
(
ndbcluster_connectstring
!=
0
)
{
DBUG_PRINT
(
"connectstring"
,
(
"%s"
,
ndbcluster_connectstring
));
Ndb
::
setConnectString
(
ndbcluster_connectstring
);
}
// Create a Ndb object to open the connection to NDB
g_ndb
=
new
Ndb
(
"sys"
);
if
(
g_ndb
->
init
()
!=
0
)
...
...
sql/ha_ndbcluster.h
View file @
c6150949
...
...
@@ -37,6 +37,8 @@ class NdbScanOperation;
class
NdbIndexScanOperation
;
class
NdbBlob
;
// connectstring to cluster if given by mysqld
extern
const
char
*
ndbcluster_connectstring
;
typedef
enum
ndb_index_type
{
UNDEFINED_INDEX
=
0
,
...
...
sql/mysqld.cc
View file @
c6150949
...
...
@@ -3893,7 +3893,7 @@ enum options_mysqld
OPT_INNODB_FILE_PER_TABLE
,
OPT_CRASH_BINLOG_INNODB
,
OPT_INNODB_LOCKS_UNSAFE_FOR_BINLOG
,
OPT_SAFE_SHOW_DB
,
OPT_INNODB_SAFE_BINLOG
,
OPT_INNODB
,
OPT_ISAM
,
OPT_NDBCLUSTER
,
OPT_SKIP_SAFEMALLOC
,
OPT_INNODB
,
OPT_ISAM
,
OPT_NDBCLUSTER
,
OPT_
NDB_CONNECTSTRING
,
OPT_
SKIP_SAFEMALLOC
,
OPT_TEMP_POOL
,
OPT_TX_ISOLATION
,
OPT_SKIP_STACK_TRACE
,
OPT_SKIP_SYMLINKS
,
OPT_MAX_BINLOG_DUMP_EVENTS
,
OPT_SPORADIC_BINLOG_DUMP_FAIL
,
...
...
@@ -4318,6 +4318,11 @@ master-ssl",
Disable with --skip-ndbcluster (will save memory)."
,
(
gptr
*
)
&
opt_ndbcluster
,
(
gptr
*
)
&
opt_ndbcluster
,
0
,
GET_BOOL
,
NO_ARG
,
1
,
0
,
0
,
0
,
0
,
0
},
#ifdef HAVE_NDBCLUSTER_DB
{
"ndb-connectstring"
,
OPT_NDB_CONNECTSTRING
,
"Connect string for ndbcluster."
,
(
gptr
*
)
&
ndbcluster_connectstring
,
(
gptr
*
)
&
ndbcluster_connectstring
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
#endif
{
"new"
,
'n'
,
"Use very new possible 'unsafe' functions."
,
(
gptr
*
)
&
global_system_variables
.
new_mode
,
(
gptr
*
)
&
max_system_variables
.
new_mode
,
...
...
@@ -5997,6 +6002,11 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
have_ndbcluster
=
SHOW_OPTION_YES
;
else
have_ndbcluster
=
SHOW_OPTION_DISABLED
;
#endif
break
;
case
OPT_NDB_CONNECTSTRING
:
#ifdef HAVE_NDBCLUSTER_DB
have_ndbcluster
=
SHOW_OPTION_YES
;
#endif
break
;
case
OPT_INNODB
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment