diff --git a/storage/ndb/include/kernel/signaldata/CreateFilegroup.hpp b/storage/ndb/include/kernel/signaldata/CreateFilegroup.hpp index 78216249a72..59e4a33b89d 100644 --- a/storage/ndb/include/kernel/signaldata/CreateFilegroup.hpp +++ b/storage/ndb/include/kernel/signaldata/CreateFilegroup.hpp @@ -159,7 +159,8 @@ struct CreateFileRef { InvalidFilegroupVersion = 754, FilenameAlreadyExists = 760, OutOfFileRecords = 751, - InvalidFileType = 750 + InvalidFileType = 750, + NotSupportedWhenDiskless = 775 }; Uint32 senderData; diff --git a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp index 908c116988d..20132be1261 100644 --- a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp +++ b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp @@ -15153,6 +15153,17 @@ Dbdict::create_file_prepare_start(Signal* signal, SchemaOp* op){ break; } + { + Uint32 dl; + const ndb_mgm_configuration_iterator * p = + m_ctx.m_config.getOwnConfigIterator(); + if(!ndb_mgm_get_int_parameter(p, CFG_DB_DISCLESS, &dl) && dl) + { + op->m_errorCode = CreateFileRef::NotSupportedWhenDiskless; + break; + } + } + // Loop through all filenames... if(!c_obj_pool.seize(obj_ptr)){ op->m_errorCode = CreateTableRef::NoMoreTableRecords; diff --git a/storage/ndb/src/ndbapi/ndberror.c b/storage/ndb/src/ndbapi/ndberror.c index 22252960e21..71291aa39cc 100644 --- a/storage/ndb/src/ndbapi/ndberror.c +++ b/storage/ndb/src/ndbapi/ndberror.c @@ -417,6 +417,7 @@ ErrorBundle ErrorCodes[] = { { 1514, DMEC, SE, "Currently there is a limit of one logfile group" }, { 773, DMEC, SE, "Out of string memory, please modify StringMemory config parameter" }, + { 775, DMEC, SE, "Create file is not supported when Diskless=1" }, /** * FunctionNotImplemented