Skip to content

Commit

Permalink
fix: experimental LOB support Unicode character decoding
Browse files Browse the repository at this point in the history
  • Loading branch information
bersler committed Mar 18, 2023
1 parent e9abff5 commit d2adff7
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 56 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
1.0.2
1.1
- debug: trace formatting changes
- enhancement: add handling of OP 26.2 for experimental LOB support
- fix: experimental LOB support
- enhancement: code style corrections
- fix: error handling of incorrect config file
- fix: experimental LOB support Unicode character decoding
- new feature: basicfile LOB (removed being experimental)

1.0.1 - released on 2023.02.20
- fix: incorrect checkpoint file when non-ascii characters are used in schema files
Expand Down
28 changes: 14 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
#Copyright (C) 2018-2023 Adam Leszczynski ([email protected])
# Copyright (C) 2018-2023 Adam Leszczynski ([email protected])
#
#This file is part of OpenLogReplicator.
# This file is part of OpenLogReplicator.
#
#OpenLogReplicator 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 3, or (at your option)
#any later version.
# OpenLogReplicator 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 3, or (at your option)
# any later version.
#
#OpenLogReplicator 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.
# OpenLogReplicator 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 OpenLogReplicator; see the file LICENSE; If not see
#<http://www.gnu.org/licenses/>.
# You should have received a copy of the GNU General Public License
# along with OpenLogReplicator; see the file LICENSE; If not see
# <http://www.gnu.org/licenses/>.

cmake_minimum_required(VERSION 3.16)
project(OpenLogReplicator VERSION 1.0.2)
project(OpenLogReplicator VERSION 1.1.0)

set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
set(CMAKE_CXX_STANDARD 17)
Expand Down
26 changes: 13 additions & 13 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
#Copyright (C) 2018-2023 Adam Leszczynski ([email protected])
# Copyright (C) 2018-2023 Adam Leszczynski ([email protected])
#
#This file is part of OpenLogReplicator.
# This file is part of OpenLogReplicator.
#
#OpenLogReplicator 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 3, or (at your option)
#any later version.
# OpenLogReplicator 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 3, or (at your option)
# any later version.
#
#OpenLogReplicator 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.
# OpenLogReplicator 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 OpenLogReplicator; see the file LICENSE; If not see
#<http://www.gnu.org/licenses/>.
# You should have received a copy of the GNU General Public License
# along with OpenLogReplicator; see the file LICENSE; If not see
# <http://www.gnu.org/licenses/>.

list(APPEND ListCommon
common/ConfigurationException.cpp
Expand Down
6 changes: 0 additions & 6 deletions src/OpenLogReplicator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,6 @@ namespace OpenLogReplicator {
ctx->redoVerifyDelayUs = 500000;
}

if (sourceJson.HasMember("experimental-lobs")) {
uint64_t experimentalLobs = Ctx::getJsonFieldU64(fileName, sourceJson, "experimental-lobs");
if (experimentalLobs > 0)
ctx->experimentalLobs = true;
}

if (readerJson.HasMember("disable-checks")) {
ctx->disableChecks = Ctx::getJsonFieldU64(fileName, readerJson, "disable-checks");
if (ctx->disableChecks > 7)
Expand Down
20 changes: 6 additions & 14 deletions src/builder/Builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,24 +159,16 @@ namespace OpenLogReplicator {
break;

case SYS_COL_TYPE_BLOB:
if (ctx->experimentalLobs) {
if (after && table != nullptr) {
if (parseLob(lobCtx, data, length, 0, table->obj, false))
columnRaw(column->name, reinterpret_cast<uint8_t*>(valueBuffer), valueLength);
}
} else {
columnUnknown(column->name, data, length);
if (after && table != nullptr) {
if (parseLob(lobCtx, data, length, 0, table->obj, false))
columnRaw(column->name, reinterpret_cast<uint8_t*>(valueBuffer), valueLength);
}
break;

case SYS_COL_TYPE_CLOB:
if (ctx->experimentalLobs) {
if (after && table != nullptr) {
if (parseLob(lobCtx, data, length, column->charsetId, table->obj, true))
columnString(column->name);
}
} else {
columnUnknown(column->name, data, length);
if (after && table != nullptr) {
if (parseLob(lobCtx, data, length, column->charsetId, table->obj, true))
columnString(column->name);
}
break;

Expand Down
1 change: 0 additions & 1 deletion src/common/Ctx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ namespace OpenLogReplicator {
trace2(0),
flags(0),
disableChecks(0),
experimentalLobs(false),
hardShutdown(false),
softShutdown(false),
replicatorFinished(false),
Expand Down
1 change: 0 additions & 1 deletion src/common/Ctx.h
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,6 @@ namespace OpenLogReplicator {
std::atomic<uint64_t> trace2;
std::atomic<uint64_t> flags;
std::atomic<uint64_t> disableChecks;
std::atomic<bool> experimentalLobs;
std::atomic<bool> hardShutdown;
std::atomic<bool> softShutdown;
std::atomic<bool> replicatorFinished;
Expand Down
6 changes: 0 additions & 6 deletions src/parser/Parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -577,9 +577,6 @@ namespace OpenLogReplicator {
}

void Parser::appendToTransactionLob(RedoLogRecord* redoLogRecord1) {
if (!ctx->experimentalLobs)
return;

OracleLob* lob = metadata->schema->checkLobDict(redoLogRecord1->dataObj);
if (lob == nullptr) {
TRACE(TRACE2_LOB, "LOB" <<
Expand Down Expand Up @@ -947,9 +944,6 @@ namespace OpenLogReplicator {
}

void Parser::appendToTransactionIndex(RedoLogRecord* redoLogRecord1, RedoLogRecord* redoLogRecord2) {
if (!ctx->experimentalLobs)
return;

// Skip other PDB vectors
if (metadata->conId > 0 && redoLogRecord2->conId != metadata->conId)
return;
Expand Down

0 comments on commit d2adff7

Please sign in to comment.