diff --git a/storage/ndb/ndbapi-examples/mgmapi_logevent/Makefile b/storage/ndb/ndbapi-examples/mgmapi_logevent/Makefile index c9b4507c4a775612935fb6fe431c5dfc5f31ad8b..b67150b71fa4a4a86cb19e182db273775a803807 100644 --- a/storage/ndb/ndbapi-examples/mgmapi_logevent/Makefile +++ b/storage/ndb/ndbapi-examples/mgmapi_logevent/Makefile @@ -1,6 +1,6 @@ TARGET = mgmapi_logevent -SRCS = $(TARGET).cpp -OBJS = $(TARGET).o +SRCS = main.cpp +OBJS = main.o CXX = g++ CFLAGS = -c -Wall -fno-rtti -fno-exceptions CXXFLAGS = @@ -17,7 +17,7 @@ SYS_LIB = $(TARGET): $(OBJS) $(CXX) $(CXXFLAGS) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lmysqlclient_r -lmysys -lmystrings -lz $(SYS_LIB) -o $(TARGET) -$(TARGET).o: $(SRCS) +$(OBJS): $(SRCS) $(CXX) $(CFLAGS) -I$(TOP_SRCDIR)/include -I$(INCLUDE_DIR) -I$(INCLUDE_DIR)/mgmapi -I$(INCLUDE_DIR)/ndbapi $(SRCS) clean: diff --git a/storage/ndb/ndbapi-examples/mgmapi_logevent/mgmapi_logevent.cpp b/storage/ndb/ndbapi-examples/mgmapi_logevent/main.cpp similarity index 100% rename from storage/ndb/ndbapi-examples/mgmapi_logevent/mgmapi_logevent.cpp rename to storage/ndb/ndbapi-examples/mgmapi_logevent/main.cpp diff --git a/storage/ndb/ndbapi-examples/mgmapi_logevent2/Makefile b/storage/ndb/ndbapi-examples/mgmapi_logevent2/Makefile index 95b43b11f6b781f606a9fd781792584eb5886a02..fd9499c7a6826b228de9fa7f1b50621315a7c1f3 100644 --- a/storage/ndb/ndbapi-examples/mgmapi_logevent2/Makefile +++ b/storage/ndb/ndbapi-examples/mgmapi_logevent2/Makefile @@ -1,6 +1,6 @@ TARGET = mgmapi_logevent2 -SRCS = $(TARGET).cpp -OBJS = $(TARGET).o +SRCS = main.cpp +OBJS = main.o CXX = g++ CFLAGS = -c -Wall -fno-rtti -fno-exceptions CXXFLAGS = @@ -17,7 +17,7 @@ SYS_LIB = $(TARGET): $(OBJS) $(CXX) $(CXXFLAGS) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lmysqlclient_r -lmysys -lmystrings -lz $(SYS_LIB) -o $(TARGET) -$(TARGET).o: $(SRCS) +$(OBJS): $(SRCS) $(CXX) $(CFLAGS) -I$(TOP_SRCDIR)/include -I$(INCLUDE_DIR) -I$(INCLUDE_DIR)/mgmapi -I$(INCLUDE_DIR)/ndbapi $(SRCS) clean: diff --git a/storage/ndb/ndbapi-examples/mgmapi_logevent2/mgmapi_logevent2.cpp b/storage/ndb/ndbapi-examples/mgmapi_logevent2/main.cpp similarity index 100% rename from storage/ndb/ndbapi-examples/mgmapi_logevent2/mgmapi_logevent2.cpp rename to storage/ndb/ndbapi-examples/mgmapi_logevent2/main.cpp diff --git a/storage/ndb/ndbapi-examples/ndbapi_simple_dual/Makefile b/storage/ndb/ndbapi-examples/ndbapi_simple_dual/Makefile index 7f0ca52fcc3d76cbf3b468049d09adb6059cd628..9757df3ceabd31b17d831d8687e82cd3e598225a 100644 --- a/storage/ndb/ndbapi-examples/ndbapi_simple_dual/Makefile +++ b/storage/ndb/ndbapi-examples/ndbapi_simple_dual/Makefile @@ -1,6 +1,6 @@ TARGET = ndbapi_simple_dual -SRCS = $(TARGET).cpp -OBJS = $(TARGET).o +SRCS = main.cpp +OBJS = main.o CXX = g++ CFLAGS = -c -Wall -fno-rtti -fno-exceptions CXXFLAGS = @@ -17,7 +17,7 @@ SYS_LIB = $(TARGET): $(OBJS) $(CXX) $(CXXFLAGS) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lmysqlclient_r -lmysys -lmystrings -lz $(SYS_LIB) -o $(TARGET) -$(TARGET).o: $(SRCS) +$(OBJS): $(SRCS) $(CXX) $(CFLAGS) -I$(TOP_SRCDIR)/include -I$(INCLUDE_DIR) -I$(INCLUDE_DIR)/ndbapi $(SRCS) clean: diff --git a/storage/ndb/ndbapi-examples/ndbapi_simple_dual/ndbapi_simple_dual.cpp b/storage/ndb/ndbapi-examples/ndbapi_simple_dual/main.cpp similarity index 100% rename from storage/ndb/ndbapi-examples/ndbapi_simple_dual/ndbapi_simple_dual.cpp rename to storage/ndb/ndbapi-examples/ndbapi_simple_dual/main.cpp diff --git a/storage/ndb/ndbapi-examples/ndbapi_simple_index/Makefile b/storage/ndb/ndbapi-examples/ndbapi_simple_index/Makefile index c38975381f5e8940321e47ef3f8971d92943bf45..975563b950869b001e9cd9066d943d6ca671efa1 100644 --- a/storage/ndb/ndbapi-examples/ndbapi_simple_index/Makefile +++ b/storage/ndb/ndbapi-examples/ndbapi_simple_index/Makefile @@ -1,6 +1,6 @@ TARGET = ndbapi_simple_index -SRCS = $(TARGET).cpp -OBJS = $(TARGET).o +SRCS = main.cpp +OBJS = main.o CXX = g++ CFLAGS = -c -Wall -fno-rtti -fno-exceptions CXXFLAGS = @@ -17,7 +17,7 @@ SYS_LIB = $(TARGET): $(OBJS) $(CXX) $(CXXFLAGS) $(LFLAGS) $(LIB_DIR) $(OBJS) -lndbclient -lmysqlclient_r -lmysys -lmystrings -lz $(SYS_LIB) -o $(TARGET) -$(TARGET).o: $(SRCS) +$(OBJS): $(SRCS) $(CXX) $(CFLAGS) -I$(INCLUDE_DIR)/include -I$(INCLUDE_DIR)/storage/ndb/include -I$(INCLUDE_DIR)/storage/ndb/include/ndbapi $(SRCS) clean: diff --git a/storage/ndb/ndbapi-examples/ndbapi_simple_index/ndbapi_simple_index.cpp b/storage/ndb/ndbapi-examples/ndbapi_simple_index/main.cpp similarity index 100% rename from storage/ndb/ndbapi-examples/ndbapi_simple_index/ndbapi_simple_index.cpp rename to storage/ndb/ndbapi-examples/ndbapi_simple_index/main.cpp diff --git a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp index ac3acdc6778a0f4851ffbdac66a64d009574bd29..edc8c0131dbfc05b465a0a101ef10e52c67776a2 100644 --- a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp +++ b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp @@ -698,6 +698,9 @@ void Dbdict::execFSCLOSECONF(Signal* signal) case FsConnectRecord::OPEN_READ_SCHEMA2: openSchemaFile(signal, 1, fsPtr.i, false, false); break; + case FsConnectRecord::OPEN_READ_TAB_FILE2: + openTableFile(signal, 1, fsPtr.i, c_readTableRecord.tableId, false); + break; default: jamLine((fsPtr.p->fsState & 0xFFF)); ndbrequire(false); @@ -1073,8 +1076,11 @@ void Dbdict::readTableConf(Signal* signal, void Dbdict::readTableRef(Signal* signal, FsConnectRecordPtr fsPtr) { + /** + * First close corrupt file + */ fsPtr.p->fsState = FsConnectRecord::OPEN_READ_TAB_FILE2; - openTableFile(signal, 1, fsPtr.i, c_readTableRecord.tableId, false); + closeFile(signal, fsPtr.p->filePtr, fsPtr.i); return; }//Dbdict::readTableRef() diff --git a/storage/ndb/src/kernel/blocks/dblqh/Makefile.am b/storage/ndb/src/kernel/blocks/dblqh/Makefile.am index c7c477a512c494ab6753d107a1f3713a2dc82cf6..b545096dc8323badea511f3c208d6871fa990986 100644 --- a/storage/ndb/src/kernel/blocks/dblqh/Makefile.am +++ b/storage/ndb/src/kernel/blocks/dblqh/Makefile.am @@ -16,7 +16,7 @@ EXTRA_PROGRAMS = ndbd_redo_log_reader ndbd_redo_log_reader_SOURCES = redoLogReader/records.cpp \ - redoLogReader/redoLogFileReader.cpp + redoLogReader/reader.cpp include $(top_srcdir)/storage/ndb/config/common.mk.am include $(top_srcdir)/storage/ndb/config/type_kernel.mk.am diff --git a/storage/ndb/src/kernel/blocks/dblqh/redoLogReader/redoLogFileReader.cpp b/storage/ndb/src/kernel/blocks/dblqh/redoLogReader/reader.cpp similarity index 100% rename from storage/ndb/src/kernel/blocks/dblqh/redoLogReader/redoLogFileReader.cpp rename to storage/ndb/src/kernel/blocks/dblqh/redoLogReader/reader.cpp