Dear Virtuoso,
We might have found a heavy bug on our side.
Since we have introduced new language tag @all
, we have changed this source code, that checks language tags.
create function DB.DBA.rdf_strlang_impl (in str varchar, in lang any)
{
lang := cast (lang as varchar);
if ((lang is null) or (regexp_match ('^(([a-z][a-z](-[A-Z][A-Z])?)|(x-[A-Za-z0-9]+))\044', lang) is null))
signal ('22007', 'Function rdf_strlang_impl needs a valid language ID as its second argument');
return DB.DBA.RDF_MAKE_LONG_OF_TYPEDSQLVAL (str, null, cast (lang as varchar));
}
;
We have removed regular expression checking.
It became:
create function DB.DBA.rdf_strlang_impl (in str varchar, in lang any)
{
lang := cast (lang as varchar);
if (lang is null)
signal ('22007', 'Function rdf_strlang_impl needs a valid language ID as its second argument');
return DB.DBA.RDF_MAKE_LONG_OF_TYPEDSQLVAL (str, null, cast (lang as varchar));
};
We took the initial file from Master branch.
And we made mistake here, because Master Branch contains Virtuoso 6 and not 7.
The 7th version has altogether different DB.DBA.rdf_strlang_impl
procedure.
As follows:
create function DB.DBA.rdf_strlang_impl (in str varchar, in lang any)
{
declare t integer;
lang := cast (lang as varchar);
if ((lang is null) or (regexp_match ('^(([a-z][a-z](-[A-Z][A-Z])?)|(x-[A-Za-z0-9]+))\044', lang) is null))
signal ('22007', 'Function rdf_strlang_impl needs a valid language ID as its second argument');
if (is_rdf_box (str))
str := rdf_box_data (str, 1);
t := __tag (str);
if (__tag of nvarchar = t)
str := charset_recode (str, '_WIDE_', 'UTF-8');
else if (__tag of varchar <> t)
{
if (str is null)
signal ('22007', 'Function rdf_strlang_impl needs a bound value as its first argument, not a NULL');
str := cast (str as varchar);
}
return rdf_box (str, 257, DB.DBA.RDF_TWOBYTE_OF_LANGUAGE (lang), 0, 1);
}
;
So we started to use version 6 procedure with version 7 database.
If this is the cause for our crashes, we are really sorry for spending so much of your time helping us. :(((
Thank you and sorry again,
Stas
P.S.
I will ask further questions on github issue 882.