Commit graph

180972 commits

Author SHA1 Message Date
Vladislav Vaintroub
6c5d364956 MDEV-14953 - rename libmysqld.so to libmariadbd.so 2018-02-08 12:02:49 +00:00
Marko Mäkelä
bbdb47ffe4 Revert an accidental change
trx_undo_rec_copy(): Use a debug assertion. In a non-debug build,
with len<0 (which this assertion is really testing for)
we should still typically crash due to running out of memory.
2018-02-08 12:28:07 +02:00
Marko Mäkelä
7660d8c94e Remove dict_table_t::is_clust()
Replace all occurrences of the is_clust() method with is_primary(),
because that is what is actually meant. (Also the change buffer
tree would count as a clustered index.)
2018-02-08 12:18:07 +02:00
Marko Mäkelä
609d0a9194 MDEV-14407 Assertion failure during rollback
Rollback attempted to dereference DB_ROLL_PTR=0, which cannot possibly
be a valid undo log pointer. A safer canonical value would be
roll_ptr_t(1) << ROLL_PTR_INSERT_FLAG_POS
which is what was chosen in MDEV-12288, corresponding to reset_trx_id.

No deterministic test case for the bug was found. The simplest test
cases may be related to MDEV-11415, which suppresses undo logging for
ALGORITHM=COPY operations. In those operations, in the spirit of
MDEV-12288, we should actually have written reset_trx_id instead of
using the transaction identifier of the current transaction
(and a bogus value of DB_ROLL_PTR=0). However, thanks to MySQL Bug#28432
which I had fixed in MySQL 5.6.8 as part of WL#6255, access to the
rebuilt table by earlier-started transactions should actually have been
refused with ER_TABLE_DEF_CHANGED.

reset_trx_id: Move the definition to data0type.cc and the declaration
to data0type.h.

btr_cur_ins_lock_and_undo(): When undo logging is disabled, use the
safe value that corresponds to reset_trx_id.

btr_cur_optimistic_insert(): Validate the DB_TRX_ID,DB_ROLL_PTR before
inserting into a clustered index leaf page.

ins_node_t::sys_buf[]: Replaces row_id_buf and trx_id_buf and some
heap usage.

row_ins_alloc_sys_fields(): Init ins_node_t::sys_buf[] to reset_trx_id.

row_ins_buf(): Only if undo logging is enabled, copy trx->id
to node->sys_buf. Otherwise, rely on the initialization in
row_ins_alloc_sys_fields().

row_purge_reset_trx_id(): Invoke mlog_write_string() with reset_trx_id
directly. (No functional change.)

trx_undo_page_report_modify(): Assert that the DB_ROLL_PTR is not 0.

trx_undo_get_undo_rec_low(): Assert that the roll_ptr is valid before
trying to dereference it.

dict_index_t::is_primary(): Check if the index is the primary key.

PageConverter::adjust_cluster_record(): Fix
MDEV-15249 Crash in MVCC read after IMPORT TABLESPACE
by resetting the system fields to reset_trx_id instead of writing
the current transaction ID (which will be committed at the
end of the IMPORT TABLESPACE) and DB_ROLL_PTR=0.
This can partially be viewed as a follow-up fix of MDEV-12288,
because IMPORT should already then have written
DB_TRX_ID=0 and DB_ROLL_PTR=1<<55 to prevent unnecessary
DB_TRX_ID lookups in subsequent accesses to the table.
2018-02-08 12:14:34 +02:00
Vladislav Vaintroub
e2387835ef Cleanup - removed warning suppression - no longer needed. 2018-02-07 20:23:10 +00:00
Vladislav Vaintroub
53476abce8 Windows, compiling : use /permissive- switch to improve conformance
fix a couple "initialization skipped by goto" and other new errors.
2018-02-07 20:22:30 +00:00
Vladislav Vaintroub
8fe04a3df3 Windows, compile : reenable previously disabled warning C4291
no matching operator delete found; memory will not be freed if initialization throws an exception

Added a no-op delete() for MEM_ROOT based placement-new()
2018-02-07 20:19:40 +00:00
Vladislav Vaintroub
282b652028 Windows, compiling : reenable warning C4996 (deprecated functions)
But set _CRT_NONSTDC_NO_WARNINGS to silence silly warnings about
ANSI C function being non-standard

Remove now deprecated GetVersion()/GetVersionEx(),except single case
where where it is really needed, in feedback plugin. Remove checks for
Windows NT.

Avoid old IPv4-only inet_aton, which generated the warning.
2018-02-07 20:17:38 +00:00
Vladislav Vaintroub
d995dd2865 Windows : reenable warning C4805 (unsafe mix of types in bool operations) 2018-02-07 20:12:12 +00:00
Andrei Elkin
7bcf5e2907 MDEV-15238 rpl.perf_buildin_semisync_issue40 sporadically fails on BB
The test was used to result in mismatch due to unaccounted specifics
of the master-slave handshake protocol that sets the Slave_IO_Running
status to true while the semisync master status is set to active a bit later.

The test is refined to expect that.
2018-02-07 19:59:20 +02:00
Monty
029ab11cc8 Update wrong result test found by fix to mysql_upgrade 2018-02-07 13:29:08 +02:00
Monty
6ba06cf763 On upgrade Truncate_versioning_privilege was not correct set
Fixed that Truncate_versioning_privilege works as any other privilege
during upgrade:

- If the privilege field does not exists, add it to the user and db tables.
  If the user had super_privilege then the user will also get the new
  Truncate_versioning_privilege.

This is done to ensure that if one has GRANT ALL PRIVILEGE before, one
will continue to have it after running mysql_upgrade.

This also fixes a bug where the Truncate_versioning_privilege
2018-02-07 02:39:40 +02:00
Monty
a0417ccc3a Added error message for index file full 2018-02-06 20:38:36 +02:00
Marko Mäkelä
883496782f Merge bb-10.2-ext into 10.3 2018-02-06 17:12:17 +02:00
Marko Mäkelä
560b9895d4 MDEV-15115 Assertion failure in CREATE SEQUENCE...ROW_FORMAT=REDUNDANT
dict_tf_is_valid(): Allow no-rollback tables in ROW_FORMAT=REDUNDANT.
2018-02-06 17:09:26 +02:00
Marko Mäkelä
eda142590f Improve the documentation of some TRX_RSEG fields 2018-02-06 15:44:21 +02:00
Vladislav Vaintroub
502e2445e6 Fix warnings 2018-02-06 14:22:15 +01:00
Vladislav Vaintroub
6c279ad6a7 MDEV-15091 : Windows, 64bit: reenable and fix warning C4267 (conversion from 'size_t' to 'type', possible loss of data)
Handle string length as size_t, consistently (almost always:))
Change function prototypes to accept size_t, where in the past
ulong or uint were used. change local/member variables to size_t
when appropriate.

This fix excludes rocksdb, spider,spider, sphinx and connect for now.
2018-02-06 12:55:58 +00:00
Igor Babaev
f271100836 Fixed mdev-15162 Query with CTE hangs if assignment operator (:=) is used
If setting user variable was used in the specification of a recursive CTE
then Item_func_set_user_var::fix_fields() went into an infinite loop.
2018-02-05 18:07:31 -08:00
Igor Babaev
465979eabf Fixed mdev-15119 CTE, referencing another CTE, that is declared after,
does not return error

Corrected the code of st_select_lex::find_table_def_in_with_clauses() for
a proper identification of CTE references used in embedded CTEs.
2018-02-05 10:48:28 -08:00
Alexander Barkov
b4db96da58 MDEV-15176: comment fix "1 00:10:10" -> "24:10:10"
Applying https://github.com/MariaDB/server/pull/594
to bb-10.2-ext
2018-02-05 13:22:58 +04:00
Alexander Barkov
d67dcb7bb5 MDEV-15205 Remove mysql_type_to_time_type() 2018-02-04 22:55:54 +04:00
Alexander Barkov
217fc122c8 Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3 2018-02-04 18:40:06 +04:00
Alexander Barkov
28d4cf0c1b MDEV-15176 Storing DATETIME-alike VARCHAR data into TIME produces wrong results
When storing '0001-01-01 10:20:30x', execution went throw the last code
branch in Field_time::store_TIME_with_warning(), around the test
for (ltime->year || ltime->month). This then resulted into wrong results
because:

1. Field_time::store_TIME() does not check YYYYMM against zero.
  It assumes that ltime->days and ltime->hours are already properly set.
  So it mixed days to hours, even when YYYYMM was not zero.

2. Field_time_hires::store_TIME() does not check YYYYMM against zero.
  It assumes that ltime->year, ltime->month, ltime->days and ltime->hours
  are already properly set. So it always mixed days and even months(!) and years(!)
  to hours, using pack_time(). This gave even worse results comparing to #2.

3. Field_timef::store_TIME() did not check the entire YYYYMM for being zero.
  It only checked MM, but did not check YYYY. In case of a zero MM,
  it mixed days to hours, even if YYYY was not zero.
  The wrong code was in TIME_to_longlong_time_packed().

In the new reduction Field_time::store_TIME_with_warning() is responsible
to prepare the YYYYYMMDD part properly in all code branches
(with trailing garbage like 'x' and without trailing garbage).
It was reorganized into a more straightforward style.

Field_time:store_TIME(), Field_time_hires::store_TIME() and
TIME_to_longlong_time_packed() were fixed to do a DBUG_ASSERT
on non-zero ltime->year or ltime->month. The code testing ltime->month
was removed from TIME_to_longlong_time_packed(), as it's now
properly done on the caller level.

Truncation was moved from Field_timef::store_TIME() to
Field_time::store_TIME_with_warning().

So now all thee methods Field_time*::store_TIME() assume a properly
set input value:
- Only zero ltime->year and ltime->month are allowed.
- The value must be already properly truncated according to decimals()
  (this will help to add rounding soon, see MDEV-8894)

A "const" qualifier was added to the argument of Field_time*::store_TIME().
2018-02-04 16:43:02 +04:00
Marko Mäkelä
d6ed077fc8 Clarify a comment after MDEV-15061 2018-02-04 13:11:49 +02:00
Alexander Barkov
2ecf2f9b2a Adding "const" qualifier to the MYSQL_TIME* argument of Field::store_time_dec() 2018-02-03 17:27:43 +04:00
Alexander Barkov
705283f7e3 Setting Field::field_index for Virtual_tmp_table fields
Virtial_tmp_table did not set the "field_index" member for its Fields.
Fixing Virtual_tmp_table::add() to set "field_index" to the Field's ordinal position
inside the table, like a normal TABLE does, for consistency.

Although, this flaw did not seem to cause any bugs, having field_index properly
set is helpful for debugging purposes.
2018-02-02 15:38:15 +04:00
Sachin Setiya
c8299e6278 This commit solves a couple of issues
1st. Create_field does not have function vers_sys_field() kind of handy
function, second I think Create_field and Field should not divert much , and
Field does have this function.

2nd. Versioning column does not have NOT_NULL_FLAG, since they can never be
null. So I have added NOT_NULL_FLAG.

3rd. Since I added NOT_NULL_FLAG this created one issue , versioning column
of datatype bigint unsigned were getting NO_DEFAULT_VALUE_FLAG. This makes
test like versioning.insert to fail, Reason being If a column gets this
flag if we insert 'default' value it will generate error(that is why ) test
was failing. So now versioning column wont get NO_DEFAULT_VALUE_FLAG flag.
2018-02-02 14:45:44 +05:30
Sachin Setiya
16be7469ac MDEV-14849 CREATE + ALTER with user-invisible columns produce ...
Problem:-
  create or replace table t1 (pk int auto_increment primary key invisible, i int);
  alter table t1 modify pk int invisible;
 This last alter makes a invisible column which is not null and does not
 have default value.

Analysis:-
 This is caused because our error check for NOT_NULL_FLAG and
 NO_DEFAULT_VALUE_FLAG flag misses this sql_field , but this is not the fault
 of error check :).Actually this field come via mysql_prepare_alter_table
 and it does not have NO_DEFAULT_VALUE_FLAG flag turned on. (If it was create
 table NO_DEFAULT_VALUE_FLAG would have turned on Column_definition::check)
 and this would have generated error.

Solution:-
 I have moved the error check to kind last of mysql_prepare_create_table
 because upto this point we have applied NO_DEFAULT_VALUE_FLAG to required
 column.
2018-02-02 14:45:44 +05:30
Sachin Setiya
2d73b58101 Mdev-15085 Invisible Column Non-constant Default value results...
Problem:- If we create table field with dynamic default value then that
 field always gets NULL value.

Analyze:- This is because in fill_record we simple continue at Invisible
 column because we though that share->default_values(default value is
 always copied into table->record[0] before insert) will have a default
 value for them(which is true for constant defaults , but not for dynamic
 defaults).

Solution:- We simple set all_fields_have_value to null , and this will
make call to update_default_fields (in the case of dynamic default), And
default expr will be evaluted and value will be set in field.
2018-02-02 14:45:44 +05:30
Monty
d69642dedd Added name to MEM_ROOT for esier debugging
This will make it easier to how memory allocation is done when debugging
with either DBUG or gdb.

Will especially help when debugging stored procedures

Main change is a name argument as second argument to init_alloc_root()
init_sql_alloc()

Other things:
- Added DBUG_ENTER/EXIT to some Virtual_tmp_table functions
2018-02-02 11:08:36 +02:00
Monty
782f8e743b Removed 'thd' from THD::reset_for_next_command()
This is to make it a proper class function.
2018-02-01 19:46:42 +02:00
Igor Babaev
1951e7f05a Fixed mdev-15120 CTE table should not belong to database, that is in use
When identifying a table name the following should be taken into account:
a CTE name cannot be qualified with a database name, otherwise the table
name is considered as the name of a non-CTE table.
2018-01-31 10:15:55 -08:00
Sergey Vojtovich
bc7a1dc1fb MDEV-15104 - Optimise MVCC snapshot
With trx_sys_t::rw_trx_ids removal, MVCC snapshot overhead became
slightly higher. That is instead of copying an array we now have to
iterate LF_HASH. All this done under trx_sys.mutex protection.

This patch moves MVCC snapshot out of trx_sys.mutex.

Clean-ups:

Removed MVCC: doesn't make too much sense to keep it in a separate class
anymore.

Refactored ReadView so that it now calls register()/deregister() routines
(it was vice versa before).

ReadView doesn't have friends anymore. :(

Even less trx_sys.mutex references.
2018-01-31 20:13:34 +04:00
Alexander Barkov
1e5e3d562b A cleanup in sp_rcontext, as requested by Monty
- Changing sp_rcontext::m_var_items from list of Item to list of Item_field
- Renaming sp_rcontext::get_item() to get_variable() and changing
  its return type from Item* to Item_field *
- Adding sp_rcontext::get_parameter() and sp_rcontext::set_parameter(),
  wrappers for get_variable() and set_variable() with extra DBUG_ASSERT.
  Using new methods instead of get_variable()/set_variable() in
  relevant places.
2018-01-31 19:49:48 +04:00
Sergey Vojtovich
c0d5d7c0ef MDEV-15104 - Remove trx_sys_t::serialisation_list
serialisation_list was supposed to instantly give minimum registered
transaction serialisation number. However maintaining and accessing
this list requires global mutex protection.

Since we already take MVCC snapshot by iterating trx_sys_t::rw_trx_hash,
it is cheap to integrate minimum registered transaction lookup into this
iteration.
2018-01-31 16:23:56 +04:00
Oleksandr Byelkin
df2d678248 MDEV-15133: array bound (bulk) parameters of NULL propagate on next rows
Setting non_null value drops null_value flag.
Part 2 of 3.
Part 1 was 10.2 fix.
Part 3 is test for Connector C.
2018-01-31 12:49:42 +01:00
Sergey Vojtovich
53cc9aa5be MDEV-15104 - Remove trx_sys_t::rw_trx_ids
Take snapshot of registered read-write transaction identifiers directly
from rw_trx_hash. It immediately saves one trx_sys.mutex lock, reduces
size of another critical section protected by this mutex, and makes
further optimisations like removing trx_sys_t::serialisation_list
possible.

Downside of this approach is bigger overhead for view opening, because
iterating LF_HASH is more expensive compared to taking snapshot of an
array. However for low concurrency overhead difference is negligible,
while for high concurrency mutex is much bigger evil.

Currently we still take trx_sys.mutex to serialise ReadView creation.
This is required to keep serialisation_list ordered by trx->no as well
as not to let purge thread to create more recent snapshot while another
thread gets suspended during creation of older snapshot. This will
become completely mutex free along with serialisation_list removal.

Compared to previous implementation removing element from rw_trx_hash
and serialisation_list is not atomic. We disregard all possible bad
consequences (if there're any) since it will be solved along with
serialisation_list removal.
2018-01-31 15:18:21 +04:00
Sergey Vojtovich
af566d8a63 Reduce number of trx_sys.mutex references
trx->state change must be guarded by trx->mutex.
Moved mutex locking to MVCC::view_close().
2018-01-31 15:18:21 +04:00
Marko Mäkelä
dcc09afa63 Follow-up fix to MDEV-15132 Avoid accessing the TRX_SYS page
trx_undo_mem_create_at_db_start(): Do not read TRX_UNDO_TRX_NO
unless the field is known to be valid, that is, the transaction
has been serialized and trx_purge_add_undo_to_history() has been
invoked.

Normally InnoDB pages would be zero-initialized on allocation
(since MySQL 5.5 or so), but the undo log pages skip that
mechanism. So, reused undo log pages can contain garbage.
Undo log headers can start at any offset (there can be
multiple undo log headers in the same undo log page).
Therefore, because the TRX_UNDO_TRX_NO is never explicitly
initialized on undo log header creation, its contents may
be garbage.
2018-01-31 13:16:35 +02:00
Daniel Black
7eb084fe2c MariaBackup: gcc7 - snprintf output overflow warning
extra/mariabackup/xtrabackup.cc: In function ‘ulint xb_process_datadir(const char*, const char*, handle_datadir_entry_func_t)’:
extra/mariabackup/xtrabackup.cc:4534:1: warning: ‘snprintf’ output may be truncated before the last format character [-Wformat-truncation=]
 xb_process_datadir(
 ^~~~~~~~~~~~~~~~~~
mariabackup/xtrabackup.cc:4607:11: note: ‘snprintf’ output 2 or more bytes (assuming 4001) into a destination of size 4000
   snprintf(dbpath, sizeof(dbpath), "%s/%s", path, dbinfo.name);
   ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2018-01-31 11:43:59 +01:00
Daniel Black
464ba0e97f versioning: add explict fallthough to prevent gcc warning
gcc7 warning:

sql/table.cc: In member function ‘int TABLE_SHARE::init_from_binary_frm_image(THD*, bool, const uchar*, size_t)’:
sql/table.cc:2032:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
           if (vers_can_native)
           ^~
sql/table.cc:2037:9: note: here
         default:
         ^~~~~~~
2018-01-31 12:55:43 +04:00
Marko Mäkelä
5db9c6e490 MDEV-15132 Avoid accessing the TRX_SYS page
trx_write_serialisation_history(): Only invoke trx_sysf_get()
to exclusively lock the TRX_SYS page if some change really
has to be written to the page.

On transaction commit, we will still write some binlog and
Galera WSREP XID information.

FIXME: If this information has to be written, it should be
partitioned into the rollback segment pages.
2018-01-31 10:41:33 +02:00
Marko Mäkelä
c7d0448797 MDEV-15132 Avoid accessing the TRX_SYS page
InnoDB maintains an internal persistent sequence of transaction
identifiers. This sequence is used for assigning both transaction
start identifiers (DB_TRX_ID=trx->id) and end identifiers (trx->no)
as well as end identifiers for the mysql.transaction_registry table
that was introduced in MDEV-12894.

TRX_SYS_TRX_ID_WRITE_MARGIN: Remove. After this many updates of
the sequence we used to update the TRX_SYS page. We can avoid accessing
the TRX_SYS page if we modify the InnoDB startup so that resurrecting
the sequence from other pages of the transaction system.

TRX_SYS_TRX_ID_STORE: Deprecate. The field only exists for the purpose
of upgrading from an earlier version of MySQL or MariaDB.

Starting with this fix, MariaDB will rely on the fields
TRX_UNDO_TRX_ID, TRX_UNDO_TRX_NO in the undo log header page of
each non-committed transaction, and on the new field
TRX_RSEG_MAX_TRX_ID in rollback segment header pages.

Because of this change, setting innodb_force_recovery=5 or 6 may cause
the system to recover with trx_sys.get_max_trx_id()==0. We must adjust
checks for invalid DB_TRX_ID and PAGE_MAX_TRX_ID accordingly.

We will change the startup and shutdown messages to display the
trx_sys.get_max_trx_id() in addition to the log sequence number.

trx_sys_t::flush_max_trx_id(): Remove.

trx_undo_mem_create_at_db_start(), trx_undo_lists_init():
Add an output parameter max_trx_id, to be updated from
TRX_UNDO_TRX_ID, TRX_UNDO_TRX_NO.

TRX_RSEG_MAX_TRX_ID: New field, for persisting
trx_sys.get_max_trx_id() at the time of the latest transaction commit.
Startup is not reading the undo log pages of committed transactions.
We want to avoid additional page accesses on startup, as well as
trouble when all undo logs have been emptied.
On startup, we will simply determine the maximum value from all pages
that are being read anyway.

TRX_RSEG_FORMAT: Redefined from TRX_RSEG_MAX_SIZE.

Old versions of InnoDB wrote uninitialized garbage to unused data fields.
Because of this, we cannot simply introduce a new field in the
rollback segment pages and expect it to be always zero, like it would
if the database was created by a recent enough InnoDB version.

Luckily, it looks like the field TRX_RSEG_MAX_SIZE was always written
as 0xfffffffe. We will indicate a new subformat of the page by writing
0 to this field. This has the nice side effect that after a downgrade
to older versions of InnoDB, transactions should fail to allocate any
undo log, that is, writes will be blocked. So, there is no problem of
getting corrupted transaction identifiers after downgrading.

trx_rseg_t::max_size: Remove.

trx_rseg_header_create(): Remove the parameter max_size=ULINT_MAX.

trx_purge_add_undo_to_history(): Update TRX_RSEG_MAX_SIZE
(and TRX_RSEG_FORMAT if needed). This is invoked on transaction commit.

trx_rseg_mem_restore(): If TRX_RSEG_FORMAT contains 0,
read TRX_RSEG_MAX_SIZE.

trx_rseg_array_init(): Invoke trx_sys.init_max_trx_id(max_trx_id + 1)
where max_trx_id was the maximum that was encountered in the rollback
segment pages and the undo log pages of recovered active, XA PREPARE,
or some committed transactions. (See trx_purge_add_undo_to_history()
which invokes trx_rsegf_set_nth_undo(..., FIL_NULL, ...);
not all committed transactions will be immediately detached from the
rollback segment header.)
2018-01-31 10:24:19 +02:00
Marko Mäkelä
bb441ca4ad Clean up trx_undo_page_get_end() 2018-01-31 08:52:16 +02:00
Marko Mäkelä
6058f92f5c Simplify undo log access during InnoDB startup
trx_rseg_mem_restore(): Update the max_trx_id from the undo log pages.

trx_sys_init_at_db_start(): Remove; merge with trx_lists_init_at_db_start().

trx_undo_lists_init(): Move to the only calling module, trx0rseg.cc.

trx_undo_mem_create_at_db_start(): Declare globally. Return the number
of pages.
2018-01-31 08:52:16 +02:00
Marko Mäkelä
d24229baa2 Do not call trx_rseg_mem_restore() when creating rollback segment
trx_rseg_mem_create(): Initialize rseg->curr_size and rseg->max_size.

trx_rseg_create(), trx_temp_rseg_create():
Do not call trx_rseg_mem_restore().
2018-01-31 08:52:16 +02:00
Marko Mäkelä
0ead8d9520 Clean up some undo page accessor functions
trx_undo_page_get_prev_rec(), trx_undo_page_get_last_rec(),
trx_undo_page_get_first_rec(), trx_undo_page_get_start():
Move to the only caller, trx0undo.cc.

Add some const qualifiers.
2018-01-31 08:52:16 +02:00
Marko Mäkelä
648e8c12e5 Remove unnecessary function parameters
trx_rseg_get_nth_undo(), trx_rsegf_undo_find_free():
Add a const qualifier, and remove the unused parameter mtr_t*.
2018-01-31 08:52:16 +02:00
Marko Mäkelä
8d1d38f953 Simplify access to the TRX_SYS page
trx_sysf_t: Remove.

trx_sysf_get(): Return the TRX_SYS page, not a pointer within it.

trx_sysf_rseg_get_space(), trx_sysf_rseg_get_page_no():
Remove a parameter, and merge the declaration and definition.
Take the TRX_SYS page as a parameter.

TRX_SYS_N_RSEGS: Correct the comment.

trx_sysf_rseg_find_free(), trx_sys_update_mysql_binlog_offset(),
trx_sys_update_wsrep_checkpoint(): Take the TRX_SYS page as a parameter.

trx_rseg_header_create(): Add a parameter for the TRX_SYS page.

trx_sysf_rseg_set_space(), trx_sysf_rseg_set_page_no(): Remove;
merge to the only caller, trx_rseg_header_create().
2018-01-31 08:52:16 +02:00