mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-02-02 10:40:38 +01:00
Avoid GBAK's mandatory runtime dependency on ICU, load it only when
really needed (-skip_data switch is specified).
This commit is contained in:
parent
47056cb3b5
commit
faa5d8b003
@ -2401,8 +2401,6 @@ void BurpGlobals::setupSkipData(const Firebird::string& regexp)
|
||||
// msg 356 regular expression to skip tables was already set
|
||||
}
|
||||
|
||||
Jrd::TextType* textType = unicodeCollation.getTextType();
|
||||
|
||||
// Compile skip relation expressions
|
||||
try
|
||||
{
|
||||
@ -2412,6 +2410,11 @@ void BurpGlobals::setupSkipData(const Firebird::string& regexp)
|
||||
if (!uSvc->utf8FileNames())
|
||||
ISC_systemToUtf8(filter);
|
||||
|
||||
if (!unicodeCollation)
|
||||
unicodeCollation = FB_NEW UnicodeCollationHolder(*getDefaultMemoryPool());
|
||||
|
||||
Jrd::TextType* const textType = unicodeCollation->getTextType();
|
||||
|
||||
skipDataMatcher.reset(FB_NEW Firebird::SimilarToMatcher<UCHAR, Jrd::UpcaseConverter<> >(
|
||||
*getDefaultMemoryPool(), textType, (const UCHAR*) filter.c_str(),
|
||||
filter.length(), '\\', true));
|
||||
|
@ -915,8 +915,7 @@ public:
|
||||
verboseInterval(10000),
|
||||
flag_on_line(true),
|
||||
firstMap(true),
|
||||
stdIoMode(false),
|
||||
unicodeCollation(*getDefaultMemoryPool())
|
||||
stdIoMode(false)
|
||||
{
|
||||
// this is VERY dirty hack to keep current behaviour
|
||||
memset (&gbl_database_file_name, 0,
|
||||
@ -1089,7 +1088,7 @@ public:
|
||||
bool flag_on_line; // indicates whether we will bring the database on-line
|
||||
bool firstMap; // this is the first time we entered get_mapping()
|
||||
bool stdIoMode; // stdin or stdout is used as backup file
|
||||
UnicodeCollationHolder unicodeCollation;
|
||||
Firebird::AutoPtr<UnicodeCollationHolder> unicodeCollation;
|
||||
Firebird::AutoPtr<Firebird::SimilarToMatcher<UCHAR, Jrd::UpcaseConverter<> > > skipDataMatcher;
|
||||
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user