Quantcast
Channel: MySQL Forums - NDB clusters
Viewing all articles
Browse latest Browse all 1562

using init-file to create tables (no replies)

$
0
0
I'm trying to run ndb in diskless=1 mode, but keep the table definitions intact across restarts. With diskless=0, it all works fine, but consumes a lot of space in ndb_data/ndb_1_fs/. None of the actual data needs to survive a reboot, and I'd like the speed of not writing anything to disk at all.

So I thought using init-file=filename.sql that has a bunch of create table statements would work. That way, the empty tables exist upon start, and the app can simply populate it as needed.

However, no tables are created. Various other statements (eg: "SET GLOBAL ndb_table_no_logging = 1;") seems to work (apparently a variable I cannot set in my.cnf??)

I was wondering if it's a problem with the order in which mysqld uses these commands? Does it execute the init-file before mysqld is ready for create table commands?

The init-file is:
SET GLOBAL ndb_table_no_logging = 1;
CREATE TABLE aa ( id smallint(6) NOT NULL DEFAULT '0', runtime int(11) NOT NULL DEFAULT '0', PRIMARY KEY idx1 (id) USING HASH) ENGINE=NDB;

The documentation says one command per line and no comments, so that create table is one long line up to the semicolon

Thank you,
PH

Viewing all articles
Browse latest Browse all 1562

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>