1
0
mirror of https://github.com/MariaDB/server.git synced 2026-10-23 18:49:29 +03:00

Merge branch '12.2' into 12.3

This commit is contained in:
Sergei Golubchik
2026-02-07 22:10:39 +01:00
484 changed files with 16362 additions and 3731 deletions

View File

@@ -23,7 +23,7 @@ path=`dirname $0`
#
extra_flags="$pentium64_cflags $debug_cflags -lasan -O -g -fsanitize=address -USAFEMALLOC -UFORCE_INIT_OF_VARS -Wno-uninitialized -Wno-maybe-uninitialized -DMYSQL_SERVER_SUFFIX=-asan-max"
extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_configs $disable_asan_plugins"
extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_configs $disable_asan_plugins --with-asan=ON"
export LDFLAGS="-ldl"
. "$path/FINISH.sh"

View File

@@ -5,15 +5,15 @@ MariaDB Server has a vibrant community contributing in a wide range of areas. Th
### Engage online with other community members
---
- [MariaDB on Zulip](https://mariadb.zulipchat.com/)
- [maria-developers mailing list](http://launchpad.net/~maria-developers)
- [maria-discuss mailing list](http://launchpad.net/~maria-discuss)
- [maria-docs mailing list](http://launchpad.net/~maria-docs)
- The MariaDB Foundation and MariaDB Corporation have a presence on Reddit, Twitter and Facebook. See the [social media page](https://mariadb.com/kb/en/mariadb/social-media/).
- [maria-developers mailing list](https://lists.mariadb.org/postorius/lists/developers.lists.mariadb.org/)
- [maria-discuss mailing list](https://lists.mariadb.org/postorius/lists/discuss.lists.mariadb.org/)
- [maria-docs mailing list](https://lists.mariadb.org/postorius/lists/docs.lists.mariadb.org/)
- The MariaDB Foundation and MariaDB Corporation have a presence on Reddit, Twitter and Facebook. See the [social media page](https://mariadb.com/docs/general-resources/community/joining-the-community).
### Help document MariaDB
----
- Contribute towards [documenting MariaDB Server](https://mariadb.com/kb/en/meta/writing-editing-library-articles/) and its ecosystem by adding new content or improving existing content.
- [Translate](https://mariadb.com/kb/en/meta/translating-library-articles/) existing documentation.
- Contribute towards [documenting MariaDB Server](https://mariadb.com/docs/general-resources/about/readme/contributing-documentation) and its ecosystem by adding new content or improving existing content.
- [Translate](https://mariadb.com/docs/general-resources/about/readme/contributing-documentation) existing documentation.
### Help debug and develop MariaDB
-----
@@ -44,4 +44,4 @@ New contributors can ask questions any time, but we will provide immediate feedb
### Additional resources
----
- [MariaDB Foundation ](https://mariadb.org/)
- [Knowledge Base](https://mariadb.com/kb/en/)
- [MariaDB Documentation](https://mariadb.com/docs/)

View File

@@ -66,7 +66,7 @@ following services to the MariaDB community:
- Bug fixing in MariaDB (for bugs that affects a large part of the community)
- Building the official MariaDB binaries
- Maintaining https://mariadb.org
- Documenting MariaDB in the MariaDB Knowledge Base https://mariadb.com/kb
- Documenting MariaDB in the MariaDB Documentation https://mariadb.com/kb
To be able to do the above we need help from corporations and individuals!

View File

@@ -1,11 +0,0 @@
MariaDB is in most aspects identical to MySQL.
Differences between MySQL and MariaDB can be found at:
https://mariadb.com/kb/en/mariadb-vs-mysql-features/
https://mariadb.com/kb/en/mariadb-vs-mysql-compatibility/
The MariaDB manual can be found at:
https://mariadb.com/kb/
The MySQL Reference Manual is available in various formats on
http://dev.mysql.com/doc.

View File

@@ -142,7 +142,7 @@ static my_bool verbose= 0, opt_no_create_info= 0, opt_no_data= 0, opt_no_data_m
#define OPT_SYSTEM_STATS 32
#define OPT_SYSTEM_TIMEZONES 64
static const char *opt_system_type_values[]=
{"all", "users", "plugins", "udfs", "servers", "stats", "timezones"};
{"all", "users", "plugins", "udfs", "servers", "stats", "timezones", NullS};
static TYPELIB opt_system_types=CREATE_TYPELIB_FOR(opt_system_type_values);
static ulonglong opt_system= 0ULL;
static my_bool insert_pat_inited= 0, debug_info_flag= 0, debug_check_flag= 0,
@@ -498,7 +498,7 @@ static struct my_option my_long_options[] =
{"max_allowed_packet", 0,
"The maximum packet length to send to or receive from server.",
&opt_max_allowed_packet, &opt_max_allowed_packet, 0,
GET_ULONG, REQUIRED_ARG, 24*1024*1024, 4096,
GET_ULONG, REQUIRED_ARG, 1024LL*1024*1024, 4096,
(longlong) 2L*1024L*1024L*1024L, 0, 1024, 0},
{"max-statement-time", 0,
"Max statement execution time. If unset, overrides server default with 0.",
@@ -1950,21 +1950,35 @@ static char *cover_definer_clause(const char *stmt_str,
}
static char *format_fs_safe_filename(const char *from, char *to, size_t to_size)
{
if (check_if_legal_tablename(from))
strxnmov(to, to_size - 1, from , "@@@", NULL);
else
{
uint errors, len;
len= my_convert(to, (uint32)(to_size - 1), &my_charset_filename,
from, (uint32) strlen(from), charset_info, &errors);
to[len]= 0;
}
return to;
}
static void format_fs_safe_output_dir(const char *db, char *out_dir, size_t out_size)
{
DBUG_ASSERT(opt_dir);
char fs_safe_db[FN_REFLEN];
format_fs_safe_filename(db, fs_safe_db, sizeof(fs_safe_db));
my_snprintf(out_dir, out_size, "%s/%s", opt_dir, fs_safe_db);
}
static const char* build_path_for_table(char *to, const char *dir,
const char *table, const char *ext)
{
char filename[FN_REFLEN], tmp_path[FN_REFLEN];
convert_dirname(tmp_path, dir, NULL);
my_load_path(tmp_path, tmp_path, NULL);
if (check_if_legal_tablename(table))
strxnmov(filename, sizeof(filename) - 1, table, "@@@", NULL);
else
{
uint errors, len;
len= my_convert(filename, sizeof(filename) - 1, &my_charset_filename,
table, (uint32)strlen(table), charset_info, &errors);
filename[len]= 0;
}
format_fs_safe_filename(table, filename, sizeof(filename));
return fn_format(to, filename, tmp_path, ext, MYF(MY_UNPACK_FILENAME));
}
@@ -1991,7 +2005,7 @@ static FILE* open_sql_file_for_table(const char *db, const char* table, int flag
if (opt_dir)
{
out_dir= out_dir_buf;
my_snprintf(out_dir_buf, sizeof(out_dir_buf), "%s/%s", opt_dir, db);
format_fs_safe_output_dir(db, out_dir_buf, sizeof(out_dir_buf));
}
res= my_fopen(build_path_for_table(filename, out_dir, table, ".sql"),
@@ -4319,7 +4333,7 @@ static void dump_table(const char *table, const char *db, const uchar *hash_key,
char *out_dir= path;
if (!out_dir)
{
my_snprintf(out_dir_buf, sizeof(out_dir_buf), "%s/%s", opt_dir, db);
format_fs_safe_output_dir(db, out_dir_buf, sizeof(out_dir_buf));
out_dir= out_dir_buf;
}
@@ -4480,6 +4494,11 @@ static void dump_table(const char *table, const char *db, const uchar *hash_key,
fprintf(md_result_file,"/*M!101100 SET @old_system_versioning_insert_history=@@session.system_versioning_insert_history, @@session.system_versioning_insert_history=1 */;\n");
check_io(md_result_file);
}
if (no_autocommit)
{
fprintf(md_result_file, "SET @OLD_AUTOCOMMIT=@@AUTOCOMMIT, @@AUTOCOMMIT=0;\n");
check_io(md_result_file);
}
if (opt_lock)
{
fprintf(md_result_file,"LOCK TABLES %s WRITE;\n", opt_quoted_table);
@@ -4500,11 +4519,6 @@ static void dump_table(const char *table, const char *db, const uchar *hash_key,
if (opt_xml)
print_xml_tag(md_result_file, "\t", "\n", "table_data", "name=", table,
NullS);
if (no_autocommit)
{
fprintf(md_result_file, "set autocommit=0;\n");
check_io(md_result_file);
}
while ((row= mysql_fetch_row(res)))
{
@@ -4776,7 +4790,7 @@ static void dump_table(const char *table, const char *db, const uchar *hash_key,
}
if (no_autocommit)
{
fprintf(md_result_file, "commit;\n");
fprintf(md_result_file, "COMMIT;\nSET AUTOCOMMIT=@OLD_AUTOCOMMIT;\n");
check_io(md_result_file);
}
if (versioned && !opt_xml && opt_dump_history)
@@ -7399,7 +7413,7 @@ static void ensure_out_dir_exists(const char *db)
{
DBUG_ASSERT(opt_dir);
char outdir[FN_REFLEN];
my_snprintf(outdir, sizeof(outdir), "%s/%s", opt_dir, db);
format_fs_safe_output_dir(db, outdir, sizeof(outdir));
struct stat st;
if (stat(outdir, &st) == 0)
{

View File

@@ -50,7 +50,7 @@ static std::vector<MYSQL *> all_tp_connections;
std::atomic<bool> aborting{false};
static void kill_tp_connections(MYSQL *mysql);
static void db_error_with_table(MYSQL *mysql, char *table);
static void db_error_with_table(MYSQL *mysql, const char *table);
static void db_error(MYSQL *mysql);
static char *field_escape(char *to,const char *from,uint length);
static char *add_load_option(char *ptr,const char *object,
@@ -82,12 +82,36 @@ static char **argv_to_free;
static void safe_exit(int error, MYSQL *mysql);
static void set_exitcode(int code);
/*
Try to convert from filesystem-safe name escaping to string
in default character set.
@param name Name to unescape
@param buf Buffer to store result
@param sz Size of buffer
@return length of result string, or 0 on error or decodin
not needed
*/
static uint decode_fs_safe_name(const char *name, char *buf, size_t sz)
{
if (!strchr(name, '@'))
return 0;
uint errors, len;
len= my_convert(buf, (uint32)(sz - 1), default_charset_info, name, (uint32) strlen(name),
&my_charset_filename, &errors);
if (errors || !len)
return 0;
buf[len]= 0;
return len;
}
struct table_load_params
{
std::string data_file; /* name of the file to load with LOAD DATA INFILE */
std::string sql_file; /* name of the file that contains CREATE TABLE or
CREATE VIEW */
std::string dbname; /* name of the database */
std::string tablename; /* name of the table */
bool tz_utc= false; /* true if the script sets the timezone to UTC */
bool is_view= false; /* true if the script is for a VIEW */
std::vector<std::string> triggers; /* CREATE TRIGGER statements */
@@ -98,12 +122,21 @@ struct table_load_params
table_load_params(const char* dfile, const char* sqlfile,
const char* db, ulonglong data_size)
: data_file(dfile), sql_file(sqlfile),
dbname(db), triggers(),
triggers(),
size(data_size),
sql_text(parse_sql_script(sqlfile, &tz_utc, &triggers)),
ddl_info(sql_text)
{
is_view= ddl_info.table_name.empty();
/* Convert dbname from FS safe encoding if needed. */
char decoded_name[FN_REFLEN];
uint len= decode_fs_safe_name(db, decoded_name, sizeof(decoded_name));
dbname= len ? std::string(decoded_name, len) : std::string(db);
char raw_tblname[FN_REFLEN];
fn_format(raw_tblname, dfile, "", "", MY_REPLACE_DIR | MY_REPLACE_EXT);
len= decode_fs_safe_name(raw_tblname, decoded_name, sizeof(decoded_name));
tablename= len ? std::string(decoded_name, len) : std::string(raw_tblname);
}
int create_table_or_view(MYSQL *);
int load_data(MYSQL *);
@@ -646,7 +679,7 @@ int table_load_params::create_table_or_view(MYSQL* mysql)
int table_load_params::load_data(MYSQL *mysql)
{
char tablename[FN_REFLEN], hard_path[FN_REFLEN],
char hard_path[FN_REFLEN],
escaped_name[FN_REFLEN * 2 + 1],
sql_statement[FN_REFLEN*16+256], *end;
DBUG_ENTER("table_load_params::load");
@@ -666,23 +699,10 @@ int table_load_params::load_data(MYSQL *mysql)
}
const char *filename= data_file.c_str();
fn_format(tablename, filename, "", "", MYF(MY_REPLACE_DIR | MY_REPLACE_EXT));
if (strchr(tablename, '@'))
{
uint errors, len;
CHARSET_INFO *cs=
get_charset_by_csname(default_charset, MY_CS_PRIMARY, MYF(0));
len= my_convert(escaped_name, sizeof(escaped_name) - 1, cs, tablename,
(uint32)strlen(tablename), &my_charset_filename, &errors);
if (!errors)
strmake(tablename, escaped_name, len);
}
const char *db= current_db ? current_db : dbname.c_str();
std::string full_tablename= quote_identifier(db);
full_tablename+= ".";
full_tablename+= quote_identifier(tablename);
full_tablename+= quote_identifier(tablename.c_str());
if (tz_utc && exec_sql(mysql, "SET TIME_ZONE='+00:00';"))
DBUG_RETURN(1);
@@ -698,7 +718,7 @@ int table_load_params::load_data(MYSQL *mysql)
if (opt_delete)
{
if (verbose)
fprintf(stdout, "Deleting the old data from table %s\n", tablename);
fprintf(stdout, "Deleting the old data from table %s\n", tablename.c_str());
snprintf(sql_statement, FN_REFLEN * 16 + 256, "DELETE FROM %s",
full_tablename.c_str());
if (exec_sql(mysql, sql_statement))
@@ -723,7 +743,7 @@ int table_load_params::load_data(MYSQL *mysql)
if (verbose)
{
fprintf(stdout, "Loading data from %s file: %s into %s\n",
(opt_local_file) ? "LOCAL" : "SERVER", hard_path, tablename);
(opt_local_file) ? "LOCAL" : "SERVER", hard_path, tablename.c_str());
}
mysql_real_escape_string(mysql, escaped_name, hard_path,
(unsigned long) strlen(hard_path));
@@ -758,14 +778,14 @@ int table_load_params::load_data(MYSQL *mysql)
if (mysql_query(mysql, sql_statement))
{
db_error_with_table(mysql, tablename);
db_error_with_table(mysql, tablename.c_str());
DBUG_RETURN(1);
}
if (!silent)
{
const char *info= mysql_info(mysql);
if (info) /* If NULL-pointer, print nothing */
fprintf(stdout, "%s.%s: %s\n", db, tablename, info);
fprintf(stdout, "%s.%s: %s\n", db, tablename.c_str(), info);
}
@@ -880,9 +900,6 @@ static MYSQL *db_connect(char *host, char *database,
if (opt_default_auth && *opt_default_auth)
mysql_options(mysql, MYSQL_DEFAULT_AUTH, opt_default_auth);
if (!strcmp(default_charset,MYSQL_AUTODETECT_CHARSET_NAME))
default_charset= (char *)my_default_csname();
my_set_console_cp(default_charset);
mysql_options(mysql, MYSQL_SET_CHARSET_NAME, default_charset);
mysql_options(mysql, MYSQL_OPT_CONNECT_ATTR_RESET, 0);
mysql_options4(mysql, MYSQL_OPT_CONNECT_ATTR_ADD,
@@ -972,7 +989,7 @@ static void safe_exit(int error, MYSQL *mysql)
static void db_error_with_table(MYSQL *mysql, char *table)
static void db_error_with_table(MYSQL *mysql, const char *table)
{
if (aborting)
return;
@@ -1274,6 +1291,12 @@ int main(int argc, char **argv)
free_defaults(argv_to_free);
return(1);
}
if (!strcmp(default_charset, MYSQL_AUTODETECT_CHARSET_NAME))
default_charset= (char *) my_default_csname();
my_set_console_cp(default_charset);
default_charset_info= get_charset_by_csname(default_charset, MY_CS_PRIMARY, 0);
if (opt_use_threads > MAX_THREADS)
{
fatal_error("Too many connections, max value for --parallel is %d\n",

File diff suppressed because it is too large Load Diff

View File

@@ -32,7 +32,7 @@ IF(RPM)
GET_PROPERTY(T CACHE ${V} PROPERTY TYPE)
IF ((T STREQUAL FILEPATH OR V MATCHES "^CMAKE_COMMAND$") AND ${V} MATCHES "^/")
IF (RPM)
FIND_DEP(${V} rpm -q --qf "%{NAME}" -f ${${V}})
FIND_DEP(${V} rpm -q --qf "%{NAME} " -f ${${V}})
ELSE() # must be DEB
MESSAGE(FATAL_ERROR "Not implemented")
ENDIF ()

View File

@@ -229,6 +229,10 @@ SETA(CPACK_RPM_client_PACKAGE_REQUIRES
SETA(CPACK_RPM_common_PACKAGE_CONFLICTS
"MariaDB-server < 10.6.1")
SETA(CPACK_RPM_common_PACKAGE_OBSOLETES
"mysql-common")
SETA(CPACK_RPM_common_PACKAGE_PROVIDES
"mysql-common")
SETA(CPACK_RPM_devel_PACKAGE_OBSOLETES
"MySQL-devel")

View File

@@ -15,8 +15,8 @@ MACRO(BUNDLE_LIBFMT)
ExternalProject_Add(
libfmt
PREFIX "${dir}"
URL "https://github.com/fmtlib/fmt/releases/download/12.0.0/fmt-12.0.0.zip"
URL_MD5 9bd04e6e8c5b1733e4eefb473604219d
URL "https://github.com/fmtlib/fmt/releases/download/12.1.0/fmt-12.1.0.zip"
URL_MD5 028c6979cad96a4260154f091885171a
INSTALL_COMMAND ""
CONFIGURE_COMMAND ""
BUILD_COMMAND ""

View File

@@ -8,7 +8,6 @@ MACRO(BUNDLE_PCRE2)
"Which pcre to use (possible values are 'bundled', 'system', or 'auto')")
SET(dir "${CMAKE_BINARY_DIR}/extra/pcre2")
SET(PCRE_INCLUDE_DIRS ${dir}/src/pcre2-build ${dir}/src/pcre2/src)
MESSAGE(STATUS "Will download and bundle pcre2")
SET(byproducts)
FOREACH(lib pcre2-posix pcre2-8)
@@ -43,6 +42,8 @@ MACRO(BUNDLE_PCRE2)
ENDIF()
SET(byproducts ${byproducts} BUILD_BYPRODUCTS ${file} ${file_d})
SET_TARGET_PROPERTIES(${lib} PROPERTIES IMPORTED_LOCATION ${file})
MAKE_DIRECTORY(${dir}/src/pcre2-build/interface)
TARGET_INCLUDE_DIRECTORIES(${lib} INTERFACE ${dir}/src/pcre2-build/interface)
ENDFOREACH()
FOREACH(v "" "_DEBUG" "_RELWITHDEBINFO" "_RELEASE" "_MINSIZEREL")
@@ -64,8 +65,8 @@ MACRO(BUNDLE_PCRE2)
ExternalProject_Add(
pcre2
PREFIX "${dir}"
URL "https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.45/pcre2-10.45.zip"
URL_MD5 873da56c6469ec207ca5c5ae9688b83a
URL "https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.47/pcre2-10.47.zip"
URL_MD5 7906aec38f872b74f1b925122dde9069
INSTALL_COMMAND ""
CMAKE_ARGS
"-DCMAKE_WARN_DEPRECATED=FALSE"

View File

@@ -109,7 +109,7 @@ in
remove_uring
fi
;&
"trixie"|"forky"|"sid")
"trixie"|"forky"|"duke"|"sid")
# The default packaging should always target Debian Sid, so in this case
# there is intentionally no customizations whatsoever.
;;
@@ -128,7 +128,7 @@ in
replace_uring_with_aio
fi
;&
"noble"|"oracular"|"plucky"|"questing")
"noble"|"oracular"|"plucky"|"questing"|"resolute")
# mariadb-plugin-rocksdb s390x not supported by us (yet)
# ubuntu doesn't support mips64el yet, so keep this just
# in case something changes.

3
debian/rules vendored
View File

@@ -146,9 +146,6 @@ override_dh_auto_install:
# If mariadb-test package is removed, also remove most of it's files
grep --quiet "Package: mariadb-test" debian/control || rm -rf $(TMP)/usr/share/mariadb/mariadb-test
# Delete private files from libraries so they don't get shipped in the -dev packages
rm -r $(TMP)/usr/include/mariadb/server/private
# Don't ship sql-bench at all, just delete it completely even though it builds
rm -r $(TMP)/usr/sql-bench

View File

@@ -161,7 +161,10 @@ public:
File m_data_file = -1;
MY_STAT m_data_file_stat;
};
Table() = default;
Table()
{
bzero(&m_cap, sizeof(m_cap));
}
Table (Table &&other) = delete;
Table & operator= (Table &&other) = delete;
Table(const Table &) = delete;
@@ -222,6 +225,7 @@ private:
};
Table::~Table() {
aria_free_capabilities(&m_cap);
(void)close();
}
@@ -298,7 +302,8 @@ bool Table::open(MYSQL *con, bool opt_no_lock, unsigned thread_num) {
goto exit;
}
if (!have_capabilities) {
if ((error= aria_get_capabilities(partition.m_index_file, &m_cap))) {
if ((error= aria_get_capabilities(partition.m_index_file,
m_full_name.c_str(), &m_cap))) {
msg(thread_num, "aria_get_capabilities failed: %d", error);
goto exit;
}
@@ -343,6 +348,7 @@ exit:
}
bool Table::close() {
aria_free_capabilities(&m_cap);
for (Partition &partition : m_partitions) {
if (partition.m_index_file >= 0) {
my_close(partition.m_index_file, MYF(MY_WME));
@@ -409,14 +415,17 @@ bool Table::copy(ds_ctxt_t *ds, bool is_index, unsigned thread_num) {
{
if (error == HA_ERR_END_OF_FILE)
break;
msg(thread_num, "error: aria_read %s failed: %d",
is_index ? "index" : "data", error);
msg(thread_num, "error: aria_read %s from %s failed "
"with error %d",
is_index ? "index" : "data", full_name.c_str(),
error);
goto err;
}
xtrabackup_io_throttling();
if ((error = ds_write(dst_file, copy_buffer, length))) {
msg(thread_num, "error: aria_write failed: %d", error);
goto err;
msg(thread_num, "error: aria_write to %s failed "
"with error: %d", dst_path, error);
goto err;
}
}

View File

@@ -557,6 +557,7 @@ bool get_mysql_vars(MYSQL *connection)
free_opt_binlog_directory= true;
out:
free_mysql_variables(mysql_vars);
return (ret);
}
@@ -1524,7 +1525,9 @@ write_galera_info(ds_ctxt *datasink, MYSQL *connection)
domain_id ? domain_id : domain_id55);
cleanup:
free_mysql_variables(vars);
free_mysql_variables(status);
free_mysql_variables(value);
return(result);
}

View File

@@ -29,6 +29,7 @@
extern struct st_maria_plugin *mysql_optional_plugins[];
extern struct st_maria_plugin *mysql_mandatory_plugins[];
static void encryption_plugin_init(int argc, char **argv);
void initialize_default_encryption();
extern char *xb_plugin_load;
extern char *xb_plugin_dir;
@@ -140,7 +141,10 @@ void encryption_plugin_backup_init(MYSQL *mysql)
}
mysql_free_result(result);
if (!plugin_load.length())
{
initialize_default_encryption();
return;
}
oss << "plugin_load=" << plugin_load.c_str() + 1 << std::endl;
@@ -248,3 +252,45 @@ static void encryption_plugin_init(int argc, char **argv)
plugin_init(&argc, argv, PLUGIN_INIT_SKIP_PLUGIN_TABLE);
}
/*
Setup encryption_handler with default encryption to avoid crashes when
calling encryption_get_key
*/
uint no_get_key(uint, uint, uchar*, uint*)
{
return ENCRYPTION_KEY_VERSION_INVALID;
}
uint no_key(uint)
{
return ENCRYPTION_KEY_VERSION_INVALID;
}
static int ctx_init(void *ctx, const unsigned char* key, unsigned int klen,
const unsigned char* iv, unsigned int ivlen, int flags,
unsigned int key_id, unsigned int key_version)
{
return my_aes_crypt_init(ctx, MY_AES_CBC, flags, key, klen, iv, ivlen);
}
static unsigned int get_length(unsigned int slen, unsigned int key_id,
unsigned int key_version)
{
return my_aes_get_size(MY_AES_CBC, slen);
}
uint ctx_size(unsigned int, unsigned int)
{
return MY_AES_CTX_SIZE;
}
void initialize_default_encryption()
{
encryption_handler.encryption_ctx_size_func= ctx_size;
encryption_handler.encryption_ctx_init_func= ctx_init;
encryption_handler.encryption_ctx_update_func= my_aes_crypt_update;
encryption_handler.encryption_ctx_finish_func= my_aes_crypt_finish;
encryption_handler.encryption_encrypted_length_func= get_length;
encryption_handler.encryption_key_get_func= no_get_key;
encryption_handler.encryption_key_get_latest_version_func= no_key;
}

View File

@@ -5570,6 +5570,7 @@ fail:
if (fil_system.is_initialised()) {
innodb_shutdown();
}
backup_datasinks.destroy();
return(false);
}

View File

@@ -353,13 +353,9 @@ int main(int argc,char *argv[])
{
found= 1;
if (verbose)
{
int hundred= code / 100;
printf("MariaDB error code %3d (%s): %s\n"
"Learn more: https://mariadb.com/docs/server/reference/"
"error-codes/mariadb-error-codes-%d00-to-%d99/e%3d\n",
code, name, msg, hundred, hundred, code);
}
"Learn more: https://err.mariadb.com/%3d\n",
code, name, msg, code);
else
puts(msg);
}

View File

@@ -15,11 +15,15 @@
/* Interfaces for doing backups of Aria tables */
#ifndef ARIA_BACKUP_INCLUDED
C_MODE_START
typedef struct st_aria_table_capabilities
{
my_off_t header_size;
MARIA_CRYPT_DATA *crypt_data;
uint crypt_page_header_space;
ulong bitmap_pages_covered;
uint block_size;
uint keypage_header;
@@ -32,11 +36,15 @@ typedef struct st_aria_table_capabilities
/* s3 capabilities */
ulong s3_block_size;
uint8 compression;
char filename[FN_REFLEN];
} ARIA_TABLE_CAPABILITIES;
int aria_get_capabilities(File kfile, ARIA_TABLE_CAPABILITIES *cap);
int aria_get_capabilities(File kfile, const char *table_name, ARIA_TABLE_CAPABILITIES *cap);
void aria_free_capabilities(ARIA_TABLE_CAPABILITIES *cap);
int aria_read_index(File kfile, ARIA_TABLE_CAPABILITIES *cap, ulonglong block,
uchar *buffer);
int aria_read_data(File dfile, ARIA_TABLE_CAPABILITIES *cap, ulonglong block,
uchar *buffer, size_t *bytes_read);
C_MODE_END
#endif /* ARIA_BACKUP_INCLUDED */

View File

@@ -319,6 +319,9 @@ static inline int safe_strcat(char *dst, size_t dst_size, const char *src)
#ifdef __cplusplus
static inline char *safe_str(char *str)
{ return str ? str : const_cast<char*>(""); }
static inline const char *safe_str(const LEX_CSTRING *lcs)
{ return lcs && lcs->str ? lcs->str : ""; }
#endif
static inline const char *safe_str(const char *str)

View File

@@ -444,11 +444,10 @@ extern "C" int madvise(void *addr, size_t len, int behav);
/*
Suppress uninitialized variable warning without generating code.
*/
#if defined(__GNUC__) && !defined(WITH_UBSAN)
#if defined(__GNUC__) && !defined(__clang__)
/*
GCC specific self-initialization which inhibits the warning.
clang and static analysis will complain loudly about this
so compile those under WITH_UBSAN.
clang and static analysis will complain loudly about this.
*/
#define UNINIT_VAR(x) x= x
#elif defined(FORCE_INIT_OF_VARS)

View File

@@ -24,6 +24,7 @@ extern "C" {
typedef struct st_timer {
struct timespec expire_time;
ulonglong period;
ulonglong timeout; /* Timeout value in microseconds */
my_bool expired;
uint index_in_queue;
void (*func)(void*);

View File

@@ -241,4 +241,4 @@ Read this file after the global files are read.
.SH "SEE ALSO"
\fBmyisamchk(1)\fR
.PP
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/

View File

@@ -50,6 +50,6 @@ Only read default options from the given file #.
Read this file after the global files are read.
.PP
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -25,4 +25,4 @@ Be verbose.
.SH "SEE ALSO"
\fBmyisam_ftdump(1)\fR
.PP
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/

View File

@@ -72,4 +72,4 @@ Read this file after the global files are read.
.SH "SEE ALSO"
\fBmyisampack(1)\fR
.PP
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/

View File

@@ -104,4 +104,4 @@ Read this file after the global files are read.
.SH "SEE ALSO"
\fBmyisamlog(1)\fR
.PP
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/

View File

@@ -256,6 +256,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -13,4 +13,4 @@ galera_recovery \- recover from non\-graceful shutdown
.SH DESCRIPTION
Use: Recover from non\-graceful shutdown\.
.PP
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/

View File

@@ -312,6 +312,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -424,6 +424,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -1531,6 +1531,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -13,4 +13,4 @@ mariabackup \- Backup tool
.SH DESCRIPTION
Use \fBmariabackup \-\-help\fR for details on usage\.
.PP
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/

View File

@@ -2143,6 +2143,6 @@ Bug#42941
\%http://bugs.mysql.com/bug.php?id=42941
.RE
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -87,7 +87,7 @@ note : The storage engine for the table doesn't support check
.PP
If
\fBmariadb-check\fR
is unable to repair a table, see the MariaDB Knowledge Base
is unable to repair a table, see the MariaDB Documentation
for manual table repair strategies\&. This will be the case, for example, for
InnoDB
tables, which can be checked with
@@ -1152,6 +1152,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -327,6 +327,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -99,6 +99,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/en/mariadb-conv/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/server/clients-and-utilities/administrative-tools/mariadb-conv
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -217,6 +217,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -2915,6 +2915,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -327,6 +327,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -153,6 +153,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -65,6 +65,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -529,6 +529,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -903,6 +903,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -393,6 +393,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -370,6 +370,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -162,6 +162,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -17,4 +17,4 @@ a user mariadbd-safe settings in the my.cnf files\.
.PP
Redirect output to user directory like /etc/systemd/system/mariadb.service.d/migrated-from-my.cnf-settings.conf
.PP
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/

View File

@@ -163,6 +163,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -714,6 +714,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -1160,6 +1160,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -1078,6 +1078,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -118,6 +118,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -723,6 +723,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -122,6 +122,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -3130,6 +3130,6 @@ Bug#25946
\%http://bugs.mysql.com/bug.php?id=25946
.RE
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -242,6 +242,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -677,6 +677,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -13,4 +13,4 @@ mariadbd-safe-helper \- helper script (mysqld_safe_helper is now a symlink to ma
.SH DESCRIPTION
Use: Helper script\.
.PP
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/

View File

@@ -866,6 +866,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -41,7 +41,7 @@ shell> \fBmariadbd \-\-verbose \-\-help\fR
MariaDB Server also has a set of system variables that affect its operation as it runs\&. System variables can be set at server startup, and many of them can be changed at runtime to effect dynamic server reconfiguration\&. MariaDB Server also has a set of status variables that provide information about its operation\&. You can monitor these status variables to access runtime performance characteristics\&.
.PP
For a full description of MariaDB Server command options, system variables, and status variables, see
the MariaDB Knowledge Base\&.
the MariaDB Documentation\&.
.SH "COPYRIGHT"
.br
.PP
@@ -54,6 +54,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -13,4 +13,4 @@ mbstream \- Serialize/deserialize files in the XBSTREAM format
.SH DESCRIPTION
Use \fBmbstream \-\-help\fR for details on usage\.
.PP
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/

View File

@@ -62,6 +62,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -228,6 +228,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -13,4 +13,4 @@ my_safe_process \- Utility program that encapsulates process creation, monitorin
.SH DESCRIPTION
Use: safe_process [options to safe_process] -- progname arg1 \.\.\. argn\.
.PP
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/

View File

@@ -244,6 +244,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -2514,6 +2514,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -227,6 +227,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -832,6 +832,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -491,6 +491,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -2313,6 +2313,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -175,6 +175,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -2,6 +2,6 @@
.SH NAME
mytop \- display MariaDB server performance info like 'top'
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -152,6 +152,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -162,6 +162,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -119,6 +119,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -101,6 +101,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).

View File

@@ -13,4 +13,4 @@ wsrep_sst_backup \- backup helper script for the MariaDB Galera Cluster
.SH DESCRIPTION
Use: See source code of script\.
.PP
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/

View File

@@ -13,4 +13,4 @@ wsrep_sst_common \- common command line parser to be sourced by other SST script
.SH DESCRIPTION
Use: Common command line parser to be sourced by other SST scripts\.
.PP
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/

View File

@@ -13,4 +13,4 @@ wsrep_sst_mariabackup \- mariabackup\-based state snapshot transfer
.SH DESCRIPTION
Use: mariabackup-based state snapshot transfer\.
.PP
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/

View File

@@ -13,4 +13,4 @@ wsrep_sst_mysqldump \- mysqldump\-based state snapshot transfer
.SH DESCRIPTION
Use: mysqldump-based state snapshot transfer\.
.PP
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/

View File

@@ -13,4 +13,4 @@ wsrep_sst_rsync \- rsync-based state snapshot transfer
.SH DESCRIPTION
Use: rsync-based state snapshot transfer\.
.PP
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/

View File

@@ -13,4 +13,4 @@ wsrep_sst_rsync_wan \- rsync_wan (rsync with delta transfers)\-based state snaps
.SH DESCRIPTION
Use: rsync_wan\-based state snapshot transfer\.
.PP
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/

View File

@@ -3152,12 +3152,36 @@ DROP TABLE t;
# End of 10.7 tests
#
#
# MDEV-37275 Cannot remove default value of NOT NULL column
#
create table t1 (d time default '00:00:00');
alter table t1 alter column d drop default;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`d` time DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
create table t2 (d datetime not null default current_timestamp());
alter table t2 alter column d drop default;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`d` datetime NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
create table t3 (d datetime not null);
alter table t3 alter column d set default current_timestamp();
show create table t3;
Table Create Table
t3 CREATE TABLE `t3` (
`d` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
drop tables t1, t2, t3;
# End of 10.11 tests
#
# MDEV-33655 Remove alter_algorithm
#
CREATE TABLE t1 (a INT) ENGINE=MyISAM;
CREATE TABLE t2 (a INT) ENGINE=MERGE, UNION(t1);
ALTER TABLE t2 COMMENT 'x', LOCK=SHARED;
DROP TABLE t2,t1;
#
# End of 11.5 tests
#

View File

@@ -2441,6 +2441,25 @@ DROP TABLE t;
--echo # End of 10.7 tests
--echo #
--echo #
--echo # MDEV-37275 Cannot remove default value of NOT NULL column
--echo #
create table t1 (d time default '00:00:00');
alter table t1 alter column d drop default;
show create table t1;
create table t2 (d datetime not null default current_timestamp());
alter table t2 alter column d drop default;
show create table t2;
create table t3 (d datetime not null);
alter table t3 alter column d set default current_timestamp();
show create table t3;
drop tables t1, t2, t3;
--echo # End of 10.11 tests
--echo #
--echo # MDEV-33655 Remove alter_algorithm
--echo #
@@ -2450,6 +2469,4 @@ CREATE TABLE t2 (a INT) ENGINE=MERGE, UNION(t1);
ALTER TABLE t2 COMMENT 'x', LOCK=SHARED;
DROP TABLE t2,t1;
--echo #
--echo # End of 11.5 tests
--echo #

View File

@@ -47,9 +47,9 @@ LOCK TABLE t READ;
connection con1;
SET max_statement_time=0.001;
ALTER TABLE t FORCE;
ERROR 70100: Query execution was interrupted (max_statement_time exceeded)
ERROR 70100: Query was interrupted: execution time limit 0.001 sec exceeded
ALTER TABLE IF EXISTS t FORCE;
ERROR 70100: Query execution was interrupted (max_statement_time exceeded)
ERROR 70100: Query was interrupted: execution time limit 0.001 sec exceeded
disconnect con1;
connection default;
UNLOCK TABLES;

View File

@@ -55,7 +55,7 @@ MDL_SHARED_WRITE Table metadata lock test t1
MDL_SHARED_UPGRADABLE Table metadata lock test t1
MDL_INTENTION_EXCLUSIVE Schema metadata lock test
SET STATEMENT max_statement_time=1 FOR backup stage block_ddl;
ERROR 70100: Query execution was interrupted (max_statement_time exceeded)
ERROR 70100: Query was interrupted: execution time limit 1.0 sec exceeded
backup stage block_ddl;
connection default;
commit;

View File

@@ -51,13 +51,13 @@ connection con1;
CREATE OR REPLACE SEQUENCE seq1 START -28;
ERROR HY000: Sequence 'test.seq1' has out of range value for options
SET STATEMENT max_statement_time=10 FOR CREATE OR REPLACE SEQUENCE seq1 START 50;
ERROR 70100: Query execution was interrupted (max_statement_time exceeded)
ERROR 70100: Query was interrupted: execution time limit 10.0 sec exceeded
SET STATEMENT max_statement_time=10 FOR ALTER SEQUENCE IF EXISTS seq1 NOMAXVALUE;
ERROR 70100: Query execution was interrupted (max_statement_time exceeded)
ERROR 70100: Query was interrupted: execution time limit 10.0 sec exceeded
SET STATEMENT max_statement_time=10 FOR ALTER SEQUENCE IF EXISTS seq1 MAXVALUE 1000;
ERROR 70100: Query execution was interrupted (max_statement_time exceeded)
ERROR 70100: Query was interrupted: execution time limit 10.0 sec exceeded
SET STATEMENT max_statement_time=10 for rename table seq2 to seq3, seq3 to seq1;
ERROR 70100: Query execution was interrupted (max_statement_time exceeded)
ERROR 70100: Query was interrupted: execution time limit 10.0 sec exceeded
connection default;
backup unlock;
drop table seq1,seq2;

View File

@@ -0,0 +1,10 @@
#
# MDEV-35288: Assertion `!is_cond()' failed in
# virtual longlong Item_bool_func::val_int()
#
CREATE TABLE t (a INT) ENGINE=INNODB;
SELECT SUM(a), ROWNUM() AS r FROM t HAVING r=1;
SUM(a) r
NULL 1
DROP TABLE t;
# End of 10.5 tests

View File

@@ -0,0 +1,15 @@
--source include/have_innodb.inc
--echo #
--echo # MDEV-35288: Assertion `!is_cond()' failed in
--echo # virtual longlong Item_bool_func::val_int()
--echo #
CREATE TABLE t (a INT) ENGINE=INNODB;
SELECT SUM(a), ROWNUM() AS r FROM t HAVING r=1;
# Cleanup
DROP TABLE t;
--echo # End of 10.5 tests

View File

@@ -38,7 +38,6 @@ DROP TABLE t1;
# Bug#56422 CHECK TABLE run when the table is locked reports corruption
# along with timeout
#
DROP TABLE IF EXISTS t1;
CREATE TABLE t1(a INT);
LOCK TABLE t1 WRITE;
connect con1, localhost, root;
@@ -52,52 +51,24 @@ UNLOCK TABLES;
DROP TABLE t1;
disconnect con1;
#
# MDEV-15338
# Assertion `!table || (!table->read_set ||
# bitmap_is_set(table->read_set, field_index))'
# failed on dropping column with CHECK
# MDEV-37971 CHECK TABLE command can be executed by users with the table-level CREATE but not with global CREATE
#
CREATE TABLE t1 (a INT, b INT, CHECK (a>0)) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1,2),(3,4);
ALTER TABLE t1 DROP COLUMN a;
CREATE OR REPLACE TABLE t1 (a INT, b INT, CHECK (a>0)) ENGINE=MyISAM;
ALTER TABLE t1 DROP COLUMN b;
CREATE OR REPLACE TABLE t1 (a INT, b INT, c INT, CHECK (a+b>0)) ENGINE=MyISAM;
ALTER TABLE t1 DROP COLUMN b;
ERROR 42S22: Unknown column 'b' in 'CHECK'
ALTER TABLE t1 DROP COLUMN a, DROP COLUMN b;
CREATE OR REPLACE TABLE t1 (a INT, b INT, c INT, CHECK (a+b>0)) ENGINE=MyISAM;
ALTER TABLE t1 DROP CONSTRAINT `CONSTRAINT_1`;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
`c` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
CREATE OR REPLACE TABLE t1 (a INT, b INT, c INT, CHECK (a+b>0)) ENGINE=MyISAM;
ALTER TABLE t1 DROP COLUMN b, DROP CONSTRAINT `CONSTRAINT_1`;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`c` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
DROP TABLE t1;
create temporary table t1 (
id int not null auto_increment primary key,
f int not null default 0
);
insert into t1 () values ();
alter ignore table t1 add constraint check (f > 0);
Warnings:
Warning 4025 CONSTRAINT `CONSTRAINT_1` failed for `test`.`t1`
alter table t1;
drop table t1;
create temporary table t1 (a int default 0, check (a > 0));
alter table t1 drop constraint if exists non_existing_constraint;
Warnings:
Note 1091 Can't DROP CONSTRAINT `non_existing_constraint`; check that it exists
insert into t1 () values ();
ERROR 23000: CONSTRAINT `CONSTRAINT_1` failed for `test`.`t1`
create table t1 (a int);
create user table_level_priv;
create user global_level_priv;
grant create on *.* to global_level_priv;
grant create on test.t1 to table_level_priv;
connect g,localhost,global_level_priv;
check table test.t1;
Table Op Msg_type Msg_text
test.t1 check status OK
connect t,localhost,table_level_priv;
check table test.t1;
Table Op Msg_type Msg_text
test.t1 check status OK
disconnect g;
disconnect t;
connection default;
drop table t1;
drop user table_level_priv, global_level_priv;
# End of 10.11 tests

View File

@@ -53,10 +53,6 @@ DROP TABLE t1;
--echo # along with timeout
--echo #
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
CREATE TABLE t1(a INT);
LOCK TABLE t1 WRITE;
@@ -70,46 +66,23 @@ DROP TABLE t1;
disconnect con1;
--echo #
--echo # MDEV-15338
--echo # Assertion `!table || (!table->read_set ||
--echo # bitmap_is_set(table->read_set, field_index))'
--echo # failed on dropping column with CHECK
--echo # MDEV-37971 CHECK TABLE command can be executed by users with the table-level CREATE but not with global CREATE
--echo #
create table t1 (a int);
create user table_level_priv;
create user global_level_priv;
grant create on *.* to global_level_priv;
grant create on test.t1 to table_level_priv;
CREATE TABLE t1 (a INT, b INT, CHECK (a>0)) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1,2),(3,4);
ALTER TABLE t1 DROP COLUMN a;
CREATE OR REPLACE TABLE t1 (a INT, b INT, CHECK (a>0)) ENGINE=MyISAM;
ALTER TABLE t1 DROP COLUMN b;
CREATE OR REPLACE TABLE t1 (a INT, b INT, c INT, CHECK (a+b>0)) ENGINE=MyISAM;
--error ER_BAD_FIELD_ERROR
ALTER TABLE t1 DROP COLUMN b;
ALTER TABLE t1 DROP COLUMN a, DROP COLUMN b;
CREATE OR REPLACE TABLE t1 (a INT, b INT, c INT, CHECK (a+b>0)) ENGINE=MyISAM;
ALTER TABLE t1 DROP CONSTRAINT `CONSTRAINT_1`;
SHOW CREATE TABLE t1;
CREATE OR REPLACE TABLE t1 (a INT, b INT, c INT, CHECK (a+b>0)) ENGINE=MyISAM;
ALTER TABLE t1 DROP COLUMN b, DROP CONSTRAINT `CONSTRAINT_1`;
SHOW CREATE TABLE t1;
DROP TABLE t1;
connect g,localhost,global_level_priv;
check table test.t1;
#
# MDEV-16903 Assertion `!auto_increment_field_not_null' failed in TABLE::init after unsuccessful attempt to add CHECK constraint on temporary table
#
create temporary table t1 (
id int not null auto_increment primary key,
f int not null default 0
);
insert into t1 () values ();
alter ignore table t1 add constraint check (f > 0);
alter table t1;
connect t,localhost,table_level_priv;
check table test.t1;
disconnect g;
disconnect t;
connection default;
drop table t1;
drop user table_level_priv, global_level_priv;
#
# MDEV-16905 ASAN heap-use-after-free in __interceptor_strnlen / ... / TABLE::verify_constraints upon INSERT into temporary table with CHECK constraint
#
create temporary table t1 (a int default 0, check (a > 0));
alter table t1 drop constraint if exists non_existing_constraint;
--error ER_CONSTRAINT_FAILED
insert into t1 () values ();
drop table t1;
--echo # End of 10.11 tests

View File

@@ -131,17 +131,29 @@ t1 CREATE TABLE `t1` (
CONSTRAINT `CONSTRAINT_2` CHECK (`a` > `b`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
drop table t1;
#
# MDEV-10370 Check constraints on virtual columns fails on INSERT when column not specified
#
create table t1(c1 int, c2 int as (c1 + 1), check (c2 > 2));
insert into t1(c1) values(1);
ERROR 23000: CONSTRAINT `CONSTRAINT_1` failed for `test`.`t1`
insert into t1(c1) values(2);
drop table t1;
#
# MDEV-11117 CHECK constraint fails on intermediate step of ALTER
#
create or replace table t1( c1 int auto_increment primary key, check( c1 > 0 or c1 is null ) );
ERROR HY000: Function or expression 'AUTO_INCREMENT' cannot be used in the CHECK clause of `c1`
#
# MDEV-12421 Check constraint with query crashes server and renders DB unusable
#
create table t1 (a int check (@b in (select user from mysql.user)));
ERROR 42000: CHECK does not support subqueries or stored functions
create table t1 (a int check (a > @b));
ERROR HY000: Function or expression '@b' cannot be used in the CHECK clause of `a`
#
# MDEV-13596 CHECK constraints disallow NULL to pass through, violating SQL
#
create table t1 (a int check (a = 1));
insert t1 values (1);
insert t1 values (2);
@@ -152,10 +164,16 @@ a
1
NULL
drop table t1;
#
# MDEV-15141 Check constraint validation on a datetime field crashes the process
#
create table t1 (id int auto_increment primary key, datecol datetime, check (datecol>'0001-01-01 00:00:00'));
insert into t1 (datecol) values (now());
insert into t1 (datecol) values (now());
drop table t1;
#
# MDEV-15461 Check Constraints with binary logging makes insert inconsistent
#
CREATE TABLE t1 (
EmployeeID SMALLINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
FirstName VARCHAR(30) NOT NULL CHECK (CHAR_LENGTH(FirstName > 2))
@@ -198,8 +216,7 @@ EmployeeID FirstName
6 Brian
drop table t1;
#
# MDEV-16630: Ambiguous error message when check constraint
# matches table name
# MDEV-16630: Ambiguous error message when check constraint matches table name
#
use test;
drop table if exists t;
@@ -279,8 +296,59 @@ Warning 1265 Data truncated for column 'v1' at row 1
Warning 1292 Truncated incorrect INTEGER value: 'x'
drop table t1;
#
# End of 10.2 tests
# MDEV-15338 Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))' failed on dropping column with CHECK
#
CREATE TABLE t1 (a INT, b INT, CHECK (a>0)) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1,2),(3,4);
ALTER TABLE t1 DROP COLUMN a;
CREATE OR REPLACE TABLE t1 (a INT, b INT, CHECK (a>0)) ENGINE=MyISAM;
ALTER TABLE t1 DROP COLUMN b;
CREATE OR REPLACE TABLE t1 (a INT, b INT, c INT, CHECK (a+b>0)) ENGINE=MyISAM;
ALTER TABLE t1 DROP COLUMN b;
ERROR 42S22: Unknown column 'b' in 'CHECK'
ALTER TABLE t1 DROP COLUMN a, DROP COLUMN b;
CREATE OR REPLACE TABLE t1 (a INT, b INT, c INT, CHECK (a+b>0)) ENGINE=MyISAM;
ALTER TABLE t1 DROP CONSTRAINT `CONSTRAINT_1`;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
`c` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
CREATE OR REPLACE TABLE t1 (a INT, b INT, c INT, CHECK (a+b>0)) ENGINE=MyISAM;
ALTER TABLE t1 DROP COLUMN b, DROP CONSTRAINT `CONSTRAINT_1`;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`c` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
DROP TABLE t1;
#
# MDEV-16903 Assertion `!auto_increment_field_not_null' failed in TABLE::init after unsuccessful attempt to add CHECK constraint on temporary table
#
create temporary table t1 (
id int not null auto_increment primary key,
f int not null default 0
);
insert into t1 () values ();
alter ignore table t1 add constraint check (f > 0);
Warnings:
Warning 4025 CONSTRAINT `CONSTRAINT_1` failed for `test`.`t1`
alter table t1;
drop table t1;
#
# MDEV-16905 ASAN heap-use-after-free in __interceptor_strnlen / ... / TABLE::verify_constraints upon INSERT into temporary table with CHECK constraint
#
create temporary table t1 (a int default 0, check (a > 0));
alter table t1 drop constraint if exists non_existing_constraint;
Warnings:
Note 1091 Can't DROP CONSTRAINT `non_existing_constraint`; check that it exists
insert into t1 () values ();
ERROR 23000: CONSTRAINT `CONSTRAINT_1` failed for `test`.`t1`
drop table t1;
# End of 10.2 tests
#
# MDEV-26061 MariaDB server crash at Field::set_default
#
@@ -292,10 +360,8 @@ t1 CREATE TABLE `t1` (
`1` int(1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
drop table t1;
#
# End of 10.3 tests
#
#
# MDEV-24274 ALTER TABLE with CHECK CONSTRAINTS gives "Out of Memory" error
#
create table t1 (id varchar(2), constraint id check (id regexp '[a-z]'));

View File

@@ -69,32 +69,32 @@ create or replace table t1 (a int, b int,
show create table t1;
drop table t1;
#
# MDEV-10370 Check constraints on virtual columns fails on INSERT when column not specified
#
--echo #
--echo # MDEV-10370 Check constraints on virtual columns fails on INSERT when column not specified
--echo #
create table t1(c1 int, c2 int as (c1 + 1), check (c2 > 2));
--error ER_CONSTRAINT_FAILED
insert into t1(c1) values(1);
insert into t1(c1) values(2);
drop table t1;
#
# MDEV-11117 CHECK constraint fails on intermediate step of ALTER
#
--echo #
--echo # MDEV-11117 CHECK constraint fails on intermediate step of ALTER
--echo #
-- error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
create or replace table t1( c1 int auto_increment primary key, check( c1 > 0 or c1 is null ) );
#
# MDEV-12421 Check constraint with query crashes server and renders DB unusable
#
--echo #
--echo # MDEV-12421 Check constraint with query crashes server and renders DB unusable
--echo #
--error ER_SUBQUERIES_NOT_SUPPORTED
create table t1 (a int check (@b in (select user from mysql.user)));
--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
create table t1 (a int check (a > @b));
#
# MDEV-13596 CHECK constraints disallow NULL to pass through, violating SQL
#
--echo #
--echo # MDEV-13596 CHECK constraints disallow NULL to pass through, violating SQL
--echo #
create table t1 (a int check (a = 1));
insert t1 values (1);
--error ER_CONSTRAINT_FAILED
@@ -103,17 +103,17 @@ insert t1 values (NULL);
select * from t1;
drop table t1;
#
# MDEV-15141 Check constraint validation on a datetime field crashes the process
#
--echo #
--echo # MDEV-15141 Check constraint validation on a datetime field crashes the process
--echo #
create table t1 (id int auto_increment primary key, datecol datetime, check (datecol>'0001-01-01 00:00:00'));
insert into t1 (datecol) values (now());
insert into t1 (datecol) values (now());
drop table t1;
#
# MDEV-15461 Check Constraints with binary logging makes insert inconsistent
#
--echo #
--echo # MDEV-15461 Check Constraints with binary logging makes insert inconsistent
--echo #
CREATE TABLE t1 (
EmployeeID SMALLINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
@@ -136,8 +136,7 @@ select * from t1;
drop table t1;
--echo #
--echo # MDEV-16630: Ambiguous error message when check constraint
--echo # matches table name
--echo # MDEV-16630: Ambiguous error message when check constraint matches table name
--echo #
use test;
@@ -208,9 +207,49 @@ insert ignore into t1 values ( 'x' , 'x' ) ;
drop table t1;
--echo #
--echo # End of 10.2 tests
--echo # MDEV-15338 Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))' failed on dropping column with CHECK
--echo #
CREATE TABLE t1 (a INT, b INT, CHECK (a>0)) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1,2),(3,4);
ALTER TABLE t1 DROP COLUMN a;
CREATE OR REPLACE TABLE t1 (a INT, b INT, CHECK (a>0)) ENGINE=MyISAM;
ALTER TABLE t1 DROP COLUMN b;
CREATE OR REPLACE TABLE t1 (a INT, b INT, c INT, CHECK (a+b>0)) ENGINE=MyISAM;
--error ER_BAD_FIELD_ERROR
ALTER TABLE t1 DROP COLUMN b;
ALTER TABLE t1 DROP COLUMN a, DROP COLUMN b;
CREATE OR REPLACE TABLE t1 (a INT, b INT, c INT, CHECK (a+b>0)) ENGINE=MyISAM;
ALTER TABLE t1 DROP CONSTRAINT `CONSTRAINT_1`;
SHOW CREATE TABLE t1;
CREATE OR REPLACE TABLE t1 (a INT, b INT, c INT, CHECK (a+b>0)) ENGINE=MyISAM;
ALTER TABLE t1 DROP COLUMN b, DROP CONSTRAINT `CONSTRAINT_1`;
SHOW CREATE TABLE t1;
DROP TABLE t1;
--echo #
--echo # MDEV-16903 Assertion `!auto_increment_field_not_null' failed in TABLE::init after unsuccessful attempt to add CHECK constraint on temporary table
--echo #
create temporary table t1 (
id int not null auto_increment primary key,
f int not null default 0
);
insert into t1 () values ();
alter ignore table t1 add constraint check (f > 0);
alter table t1;
drop table t1;
--echo #
--echo # MDEV-16905 ASAN heap-use-after-free in __interceptor_strnlen / ... / TABLE::verify_constraints upon INSERT into temporary table with CHECK constraint
--echo #
create temporary table t1 (a int default 0, check (a > 0));
alter table t1 drop constraint if exists non_existing_constraint;
--error ER_CONSTRAINT_FAILED
insert into t1 () values ();
drop table t1;
--echo # End of 10.2 tests
--echo #
--echo # MDEV-26061 MariaDB server crash at Field::set_default
--echo #
@@ -219,9 +258,7 @@ create table t1 (d timestamp not null default now() check (default (d) is true))
show create table t1;
drop table t1;
--echo #
--echo # End of 10.3 tests
--echo #
--echo #
--echo # MDEV-24274 ALTER TABLE with CHECK CONSTRAINTS gives "Out of Memory" error

View File

@@ -259,6 +259,9 @@ DROP USER mysqltest_u1@localhost;
--echo # -- Bug#35074: max_used_connections is not correct.
--echo
let $count_sessions=1;
--source include/wait_until_count_sessions.inc
FLUSH GLOBAL STATUS;
--echo

View File

@@ -0,0 +1,27 @@
#
# MDEV-23298 Assertion `table_list->prelocking_placeholder ==
# TABLE_LIST::PRELOCK_NONE' failed in check_lock_and_start_stmt on
# CREATE OR REPLACE TABLE
#
create table t2 (a int);
insert into t2 values(1),(2);
CREATE TABLE t1 (a INT);
CREATE OR REPLACE TABLE t1 AS SELECT sys.format_statement('SELECT 1') AS q;
drop table t1;
CREATE TABLE t1 (a INT);
CREATE OR REPLACE TABLE t1 AS SELECT sys.format_statement('SELECT 1') AS q, t2.a from t2;
SELECT * from t1;
q a
SELECT 1 1
SELECT 1 2
drop table t1;
CREATE TABLE t1 (a INT);
lock table t1 write,t2 read, sys.sys_config read;
CREATE OR REPLACE TABLE t1 AS SELECT sys.format_statement('SELECT 1') AS q, t2.a from t2;
unlock tables;
select * from t1;
q a
SELECT 1 1
SELECT 1 2
drop table t1,t2;
# End of 10.6 tests

View File

@@ -0,0 +1,28 @@
#
# Check CREATE OR REPLACE TABLE
#
--source include/have_perfschema.inc
--echo #
--echo # MDEV-23298 Assertion `table_list->prelocking_placeholder ==
--echo # TABLE_LIST::PRELOCK_NONE' failed in check_lock_and_start_stmt on
--echo # CREATE OR REPLACE TABLE
--echo #
create table t2 (a int);
insert into t2 values(1),(2);
CREATE TABLE t1 (a INT);
CREATE OR REPLACE TABLE t1 AS SELECT sys.format_statement('SELECT 1') AS q;
drop table t1;
CREATE TABLE t1 (a INT);
CREATE OR REPLACE TABLE t1 AS SELECT sys.format_statement('SELECT 1') AS q, t2.a from t2;
SELECT * from t1;
drop table t1;
CREATE TABLE t1 (a INT);
lock table t1 write,t2 read, sys.sys_config read;
CREATE OR REPLACE TABLE t1 AS SELECT sys.format_statement('SELECT 1') AS q, t2.a from t2;
unlock tables;
select * from t1;
drop table t1,t2;
--echo # End of 10.6 tests

View File

@@ -56,6 +56,22 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci WITH SYSTEM VERSIONING
drop table t1;
set sql_mode=default;
#
# End of 10.4 tests
#
# MDEV-37998 (Column) CHECK constraints can cause CREATE TABLE (SELECT) queries to fail
#
create table t1(
i int not null check(i > 0),
j int default (i+1),
primary key(i),
check (2*i>1)
);
create table t2 (select i as a,j from t1);
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` int(11) NOT NULL,
`j` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
drop table t1, t2;
# End of 12.1 tests

Some files were not shown because too many files have changed in this diff Show More