Skip to content

Commit

Permalink
Merge branch '10.8' into 10.9
Browse files Browse the repository at this point in the history
  • Loading branch information
sanja-byelkin committed Oct 4, 2022
2 parents 0333ddd + 2f70784 commit 55e07d9
Show file tree
Hide file tree
Showing 347 changed files with 13,405 additions and 5,522 deletions.
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,11 @@ ENDIF()

INCLUDE(wsrep)

OPTION(WITH_DBUG_TRACE "Enable DBUG_ENTER()/DBUG_EXIT()" ON)
OPTION(WITH_DBUG_TRACE "Enable DBUG_ENTER()/DBUG_RETURN()/DBUG_PRINT()" ON)
IF(WITH_DBUG_TRACE)
ADD_DEFINITIONS(-DDBUG_TRACE)
FOREACH(LANG C CXX)
SET(CMAKE_${LANG}_FLAGS_DEBUG "${CMAKE_${LANG}_FLAGS_DEBUG} -DDBUG_TRACE")
ENDFOREACH()
ENDIF()

# Always enable debug sync for debug builds.
Expand Down
6 changes: 3 additions & 3 deletions Docs/README-wsrep
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ wsrep_forced_binlog_format=none
special value NONE, meaning that there is no forced binlog format in effect.
This variable was introduced to support STATEMENT format replication during
rolling schema upgrade processing. However, in most cases ROW replication
is valid for asymmetrict schema replication.
is valid for asymmetric schema replication.

State snapshot transfer options.

Expand Down Expand Up @@ -416,7 +416,7 @@ wsrep_sst_donor=

6. ONLINE SCHEMA UPGRADE

Schema upgrades mean any data definition statements (DDL statemnents) run
Schema upgrades mean any data definition statements (DDL statements) run
for the database. They change the database structure and are non-
transactional.

Expand All @@ -429,7 +429,7 @@ wsrep_sst_donor=

With earlier releases, DDL processing happened always by Total Order
Isolation (TOI) method. With TOI, the DDL was scheduled to be processed in
same transaction seqeuncing 'slot' in each cluster node.
same transaction sequencing 'slot' in each cluster node.
The processing is secured by locking the affected table from any other use.
With TOI method, the whole cluster has part of the database locked for the
duration of the DDL processing.
Expand Down
2 changes: 1 addition & 1 deletion Docs/myisam.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ HA_EXTRA_NO_KEYREAD=8 Normal read of records (def)
HA_EXTRA_NO_USER_CHANGE=9 No user is allowed to write
HA_EXTRA_KEY_CACHE=10
HA_EXTRA_NO_KEY_CACHE=11
HA_EXTRA_WAIT_LOCK=12 Wait until file is avalably (def)
HA_EXTRA_WAIT_LOCK=12 Wait until file is available (def)
HA_EXTRA_NO_WAIT_LOCK=13 If file is locked, return quickly
HA_EXTRA_WRITE_CACHE=14 Use write cache in ha_write()
HA_EXTRA_FLUSH_CACHE=15 flush write_record_cache
Expand Down
6 changes: 3 additions & 3 deletions client/mysql_upgrade.c
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ static int run_mysqlcheck_upgrade(my_bool mysql_db_only)
return 0;
}
verbose("Phase %d/%d: Checking and upgrading %s", ++phase, phases_total, what);
print_conn_args("mysqlcheck");
print_conn_args("mariadb-check");
retch= run_tool(mysqlcheck_path,
NULL, /* Send output from mysqlcheck directly to screen */
defaults_file,
Expand Down Expand Up @@ -1451,15 +1451,15 @@ int main(int argc, char **argv)
}

/* Find mysql */
find_tool(mysql_path, IF_WIN("mysql.exe", "mysql"), self_name);
find_tool(mysql_path, IF_WIN("mariadb.exe", "mariadb"), self_name);

open_mysql_upgrade_file();

if (opt_check_upgrade)
exit(upgrade_already_done(0) == 0);

/* Find mysqlcheck */
find_tool(mysqlcheck_path, IF_WIN("mysqlcheck.exe", "mysqlcheck"), self_name);
find_tool(mysqlcheck_path, IF_WIN("mariadb-check.exe", "mariadb-check"), self_name);

if (opt_systables_only && !opt_silent)
printf("The --upgrade-system-tables option was used, user tables won't be touched.\n");
Expand Down
14 changes: 7 additions & 7 deletions client/mysqlshow.c
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ list_dbs(MYSQL *mysql,const char *wild)
MYSQL_RES *tresult = mysql_list_tables(mysql,(char*)NULL);
if (mysql_affected_rows(mysql) > 0)
{
sprintf(tables,"%6lu",(ulong) mysql_affected_rows(mysql));
snprintf(tables, sizeof(tables), "%6lu",(ulong) mysql_affected_rows(mysql));
rowcount = 0;
if (opt_verbose > 1)
{
Expand All @@ -528,13 +528,13 @@ list_dbs(MYSQL *mysql,const char *wild)
}
}
}
sprintf(rows,"%12lu",rowcount);
snprintf(rows, sizeof(rows), "%12lu", rowcount);
}
}
else
{
sprintf(tables,"%6d",0);
sprintf(rows,"%12d",0);
snprintf(tables, sizeof(tables), "%6d" ,0);
snprintf(rows, sizeof(rows), "%12d", 0);
}
mysql_free_result(tresult);
}
Expand Down Expand Up @@ -652,7 +652,7 @@ list_tables(MYSQL *mysql,const char *db,const char *table)
}
else
{
sprintf(fields,"%8u",(uint) mysql_num_fields(rresult));
snprintf(fields, sizeof(fields), "%8u", (uint) mysql_num_fields(rresult));
mysql_free_result(rresult);

if (opt_verbose > 1)
Expand All @@ -668,10 +668,10 @@ list_tables(MYSQL *mysql,const char *db,const char *table)
rowcount += (unsigned long) strtoull(rrow[0], (char**) 0, 10);
mysql_free_result(rresult);
}
sprintf(rows,"%10lu",rowcount);
snprintf(rows, sizeof(rows), "%10lu", rowcount);
}
else
sprintf(rows,"%10d",0);
snprintf(rows, sizeof(rows), "%10d", 0);
}
}
}
Expand Down
8 changes: 6 additions & 2 deletions include/my_dbug.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ extern int (*dbug_sanity)(void);
_db_stack_frame_.line= 0; \
} while(0)

#define DBUG_PRINT(keyword,arglist) \
do if (_db_pargs_(__LINE__,keyword)) _db_doprnt_ arglist; while(0)

#ifdef HAVE_ATTRIBUTE_CLEANUP
#define DBUG_ENTER(a) struct _db_stack_frame_ _db_stack_frame_ __attribute__((cleanup(_db_return_))); \
_db_enter_ (a,__FILE__,__LINE__,&_db_stack_frame_)
Expand All @@ -94,15 +97,15 @@ extern int (*dbug_sanity)(void);
#define DBUG_ENTER(a)
#define DBUG_RETURN(a1) return(a1)
#define DBUG_VOID_RETURN return
#define DBUG_PRINT(keyword,arglist) do{} while(0)
#endif

#define DBUG_EXECUTE(keyword,a1) \
do {if (_db_keyword_(0, (keyword), 0)) { a1 }} while(0)
#define DBUG_EXECUTE_IF(keyword,a1) \
do {if (_db_keyword_(0, (keyword), 1)) { a1 }} while(0)

#define DBUG_IF(keyword) _db_keyword_(0, (keyword), 1)
#define DBUG_PRINT(keyword,arglist) \
do if (_db_pargs_(__LINE__,keyword)) _db_doprnt_ arglist; while(0)

#define DBUG_PUSH_EMPTY if (_dbug_on_) { DBUG_PUSH(""); }
#define DBUG_POP_EMPTY if (_dbug_on_) { DBUG_POP(); }
Expand Down Expand Up @@ -167,6 +170,7 @@ extern void _db_suicide_(void);
#define DBUG_LEAVE
#define DBUG_RETURN(a1) do { return(a1); } while(0)
#define DBUG_VOID_RETURN do { return; } while(0)
#define DBUG_PRINT(keyword, arglist) do { } while(0)
#define DBUG_EXECUTE(keyword,a1) do { } while(0)
#define DBUG_EXECUTE_IF(keyword,a1) do { } while(0)
#define DBUG_IF(keyword) 0
Expand Down
1 change: 1 addition & 0 deletions include/my_pthread.h
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,7 @@ void safe_mutex_free_deadlock_data(safe_mutex_t *mp);
#define my_cond_wait(A,B) safe_cond_wait((A), (B), __FILE__, __LINE__)
#else

#define safe_mutex_is_owner(mp) (1)
#define safe_mutex_assert_owner(mp) do {} while (0)
#define safe_mutex_assert_not_owner(mp) do {} while (0)
#define safe_mutex_setflags(mp, F) do {} while (0)
Expand Down
11 changes: 11 additions & 0 deletions include/my_sys.h
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,17 @@ extern ulonglong my_getcputime(void);
#define hrtime_sec_part(X) ((ulong)((X).val % HRTIME_RESOLUTION))
#define my_time(X) hrtime_to_time(my_hrtime_coarse())

/**
Make high resolution time from two parts.
*/

static inline my_hrtime_t make_hr_time(my_time_t time, ulong time_sec_part)
{
my_hrtime_t res= {((ulonglong) time)*1000000 + time_sec_part};
return res;
}


#if STACK_DIRECTION < 0
#define available_stack_size(CUR,END) (long) ((char*)(CUR) - (char*)(END))
#else
Expand Down
2 changes: 1 addition & 1 deletion libmariadb
1 change: 1 addition & 0 deletions mysql-test/main/alter_table-big.test
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
--source include/big_test.inc
# We are using some debug-only features in this test
--source include/have_debug.inc
--source include/have_debug_sync.inc
# Also we are using SBR to check that statements are executed
# in proper order.
--source include/have_binlog_format_mixed_or_statement.inc
Expand Down
6 changes: 3 additions & 3 deletions mysql-test/main/analyze_stmt_privileges.result
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ CREATE USER u1@localhost;
grant ALL on db.v1 to u1@localhost;
connect con1,localhost,u1,,;
select * from db.t1;
ERROR 42000: SELECT command denied to user 'u1'@'localhost' for table 't1'
ERROR 42000: SELECT command denied to user 'u1'@'localhost' for table `db`.`t1`
explain select * from db.t1;
ERROR 42000: SELECT command denied to user 'u1'@'localhost' for table 't1'
ERROR 42000: SELECT command denied to user 'u1'@'localhost' for table `db`.`t1`
analyze select * from db.t1;
ERROR 42000: SELECT command denied to user 'u1'@'localhost' for table 't1'
ERROR 42000: SELECT command denied to user 'u1'@'localhost' for table `db`.`t1`
select * from db.v1;
i c
2 bar
Expand Down
Loading

0 comments on commit 55e07d9

Please sign in to comment.