Charset specified for XMLTYPE constructor.
Error returned if XML is in UTF16/UTF32 as we can't parse it yet.
XML check added so only well-formed allowed.
Field_xmltype::store has to do the my_error when it gets invalid XML,
just the warning with the -1 return results in the DBUG_ASSERT.
Also the UpdateXML function result reverted back to the STRING as
it can legally produce invalid XML, so we can't have columns built
from the UpdateXML to be XMLTYPE.
New optimizations were introduced that substitute virtual column
expressions (abbr. vcol expr) with index virtual columns (abbr. vcol
field) in ORDER BY and GROUP BY.
In this patch we introduce checks that the type of a vcol field is the
supertype to its vcol expr, and if not, do not proceed the
optimization. This ensures that the substitution is safe and does not
for example lose information due to truncation.
For simplicity, the version of the check implemented is strict with
100% precision, meaning that there are instances where vcol field is a
supertype to vcol expr, but the check returns false.
Type not covered in tests: Type_handler_null
Thanks to Jarir Khan <kjarir23@gmail.com> for initial patches
addressing this issue.
This reverts the effect of MDEV-21654 and includes
pam_mariadb_mtr in the mariadb-test-data Deb package.
This allows our CI systems to run tests on the
pam implementation on Debian systems.
As the pam configuration can include a full path,
we've change the installation of the pam module
pam_mariadb_mtr.so to under the /usr/lib*/plugins/test_pam_modules
directory and configured the pam configuration file,
suite/plugins/pam/mariadb_mtr, to include the
full path to pam_mariadb_mtr.so.
fix alloc_root() and my_malloc() to return 16-aligned pointers
(type_assoc_array.sp-assoc-array-64bit prints changes in memory_used,
and my_malloc() uses more memory now)
make sure P_S.{global|session}_status and I_S.feedback plugin table
have a column of the same width as I_S.global_status.
Otherwise long status strings (e.g. Ssl_cipher_list) won't fit
and trigger a data truncation warning (an error in the strict mode)
Update prepare_linux_info() to use /etc/os-release
(PRETTY_NAME) as the primary source for OS detection.
Retain fallback support for /etc/lsb-release and
/etc/*-release for older systems.
Add MTR regression test feedback_os_release.
Signed-off-by: Anway Durge <124391429+itzanway@users.noreply.github.com>
Remove the unscoped #pragma GCC diagnostic ignored
"-Wdeprecated-declarations" from include/violite.h and replace all
sprintf/vsprintf calls with snprintf/vsnprintf across the codebase.
Where possible, pass actual buffer sizes as function parameters
instead of using hardcoded constants or recomputing strlen().
Notable API changes:
- get_date(): added to_len parameter for buffer size
- nice_time(), end_timer() in client/mysql.cc: added buff_size
- generate_new_name(): added name_size parameter
- calc_md5(): added buffer_size parameter (fixes off-by-one)
- MD5_HASH_TO_STRING macro: added _size parameter
- Added MYSQL_UDF_MAX_RESULT_LENGTH constant in mysql_com.h
Also fixed a pre-existing bug in sql/rpl_mi.cc where the ellipsis
"..." was written to the wrong buffer (dbuff instead of buff).
Vendored code is excluded: extra/readline, extra/wolfssl,
wsrep-lib, libmariadb, storage/mroonga/vendor, zlib.
Following the previous commit, we apply the same
to RPM.
Add new package Mariadb-server-galera to RPM build
recude mariadb-server package dependencies.
Galera cluster scripts and libraries are currently
in package mariadb-server. Move Galera cluster
scripts and libraries to new package mariadb-server-galera
as most of the people does not need them and
it allows to slim down mariadb-server package
The MariaDB-test package unlike its Debian
equal, didn't depend on the MariaDB-server
(and now it does), except if WITH_WSREP is
specified in which case it depends on the
MariaDB-server-galera package
Also from a865a7c23b
lsof, socat and pv are RECOMMENDS.
* lsof/socat - when selinux is enabled, these aren't used
* pv - the galera sst scripts will silently ignore its absence
Updated/Edited by: Daniel Black <daniel@mariadb.org>
- Fixed detection of "vault" utility
- Removed include/not_windows.inc from common include
- On Windows, skip 2 tests that rely on "grep"
- in mtr, set PATH to include mtr plugin directory (this is necessary
to load vcpkg dependencies)
Problem:
When parsing `a.b()`, LEX::make_item_func_or_method_call() could not find
a package body variable 'a'.
Fix:
When searching for a variable, search not only in the current parse context,
but also in the parent package body context (if exists).
Update STR_TO_DATE() to accept an optional third argument for the locale.
DATE_FORMAT() and STR_TO_DATE() return NULL when the locale argument is NULL;
issue a warning and fall back to the session @@lc_time_names for invalid locale names.
STR_TO_DATE() can now be used in indexed virtual columns while having all 3 arguments,
but not allowed when 2 as it depends then on the session @@lc_time_names
remove conditional compilation for old MariaDB versions.
Some were as old as MYSQL_VERSION_ID > 32300
Didn't touch engines hosted externally, like connect, mroonga,
and columnstore
Rename cloning methods of class Item and its descendants
in the following way:
(from) (to)
do_build_clone -> deep_copy
build_clone -> deep_copy_with_checks
do_get_copy -> shallow_copy
get_copy -> shallow_copy_with_checks
to better reflect their functionality.
Also make Item::deep_copy() and shallow_copy() protected.
Outside users should call deep_copy_with_checks()
and shallow_copy_with_checks().
Build with vcpkg and WITH_ZLIB=bundled throws error
"Broken installation of vcpkg port zlib" in FIND_PACKAGE(CURL)
Set CMAKE_DISABLE_FIND_PACKAGE_ZLIB to workaround.
Previously, this workaround was hashicorp specific, now we need this also
for videx. Thus setting CMAKE_DISABLE_FIND_PACKAGE_ZLIB was moved to
correct place, inside MYSQL_USE_BUNDLED_ZLIB macro.
Build with vcpkg and WITH_ZLIB=bundled throws error
"Broken installation of vcpkg port zlib" in FIND_PACKAGE(CURL)
Set CMAKE_DISABLE_FIND_PACKAGE_ZLIB to workaround.
Previously, this workaround was hashicorp specific, now we need this also
for videx. Thus setting CMAKE_DISABLE_FIND_PACKAGE_ZLIB was moved to
correct place, inside MYSQL_USE_BUNDLED_ZLIB macro.
compiling mariadb from a git tree
Fixed sprintf deprecation warnings compiling on MacOSX.
Replaced some sprintf calls with equivalent snprintf calls,
enough so that "normal" compile on MacOSX (as documented
in the docs) completes without warnings.
* let use_cache_on_timeout apply to other errors
* enable use_cache_on_timeout by default and deprecate it
* increase cache_timeout to max and deprecate it
* change it from long to portable longlong
* delete both in 13.3
Replace if-else chain with a single bitwise AND check when filtering query
events by type (DDL, DML, DCL, etc.).
The removes the need for the goto statements.
Additionally, we remove the orig_query variable as it served no purpose.
All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the
BSD-new license