mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge with 3.23 to get fixes for --user and BACKUP TABLE
BitKeeper/etc/ignore: auto-union BitKeeper/deleted/.del-delete.result: Delete: mysql-test/r/delete.result BitKeeper/deleted/.del-stamp-h.in~4a5d6676232516c5: Auto merged client/mysqlbinlog.cc: Auto merged include/my_sys.h: Auto merged libmysql/libmysql.c: Auto merged mysql-test/t/delete.test: Auto merged mysql-test/t/join.test: Auto merged mysql-test/t/type_datetime.test: Auto merged mysys/my_copy.c: Auto merged sql/field.h: Auto merged sql/opt_range.cc: Auto merged sql/share/polish/errmsg.txt: Auto merged sql/sql_rename.cc: Auto merged sql/sql_select.cc: Auto merged mysql-test/mysql-test-run.sh: merge with 3.23.56 mysql-test/r/backup.result: merge (needs to be updated) mysql-test/r/join.result: merge (needs to be updated) mysql-test/r/type_datetime.result: merge (needs to be updated) mysql-test/t/backup.test: merge with 3.23 scripts/mysqld_safe.sh: Only use first --user option sql/ha_myisam.cc: Don't let BACKUP TABLE overwrite old files sql/log_event.h: merge sql/mysql_priv.h: merge sql/mysqld.cc: Use first --user option sql/slave.cc: use local version sql/sql_repl.h: use local version
This commit is contained in:
@ -1340,7 +1340,8 @@ key_and(SEL_ARG *key1,SEL_ARG *key2,uint clone_flag)
|
||||
}
|
||||
|
||||
if (((clone_flag & CLONE_KEY2_MAYBE) &&
|
||||
!(clone_flag & CLONE_KEY1_MAYBE)) ||
|
||||
!(clone_flag & CLONE_KEY1_MAYBE) &&
|
||||
key2->type != SEL_ARG::MAYBE_KEY) ||
|
||||
key1->type == SEL_ARG::MAYBE_KEY)
|
||||
{ // Put simple key in key2
|
||||
swap(SEL_ARG *,key1,key2);
|
||||
@ -1368,7 +1369,10 @@ key_and(SEL_ARG *key1,SEL_ARG *key2,uint clone_flag)
|
||||
{
|
||||
key1->maybe_smaller();
|
||||
if (key2->next_key_part)
|
||||
{
|
||||
key1->use_count--; // Incremented in and_all_keys
|
||||
return and_all_keys(key1,key2,clone_flag);
|
||||
}
|
||||
key2->use_count--; // Key2 doesn't have a tree
|
||||
}
|
||||
return key1;
|
||||
@ -2067,7 +2071,7 @@ void SEL_ARG::test_use_count(SEL_ARG *root)
|
||||
{
|
||||
if (this == root && use_count != 1)
|
||||
{
|
||||
sql_print_error("Use_count: Wrong count %lu for root",use_count);
|
||||
sql_print_error("Note: Use_count: Wrong count %lu for root",use_count);
|
||||
return;
|
||||
}
|
||||
if (this->type != SEL_ARG::KEY_RANGE)
|
||||
@ -2081,7 +2085,7 @@ void SEL_ARG::test_use_count(SEL_ARG *root)
|
||||
ulong count=count_key_part_usage(root,pos->next_key_part);
|
||||
if (count > pos->next_key_part->use_count)
|
||||
{
|
||||
sql_print_error("Use_count: Wrong count for key at %lx, %lu should be %lu",
|
||||
sql_print_error("Note: Use_count: Wrong count for key at %lx, %lu should be %lu",
|
||||
pos,pos->next_key_part->use_count,count);
|
||||
return;
|
||||
}
|
||||
@ -2089,7 +2093,7 @@ void SEL_ARG::test_use_count(SEL_ARG *root)
|
||||
}
|
||||
}
|
||||
if (e_count != elements)
|
||||
sql_print_error("Wrong use count: %u for tree at %lx", e_count,
|
||||
sql_print_error("Warning: Wrong use count: %u for tree at %lx", e_count,
|
||||
(gptr) this);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user