mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 11:57:38 +02:00
Fixed that packed transid can be compared byte per byte and we get them in increasing order
The old way to store the length prefix was (256 - length); This is now changed to (length -249) Fixed also that some defines to have a MARIA_ prefix storage/maria/ma_control_file.c: Added comment storage/maria/ma_key.c: Added MARIA_ prefix to some defines Changed how packed transid length was stored storage/maria/ma_open.c: Added MARIA_ prefix to some defines storage/maria/maria_def.h: Added MARIA_ prefix to some defines Changed how packed transid length was stored
This commit is contained in:
parent
cc684c3475
commit
e4febda89e
4 changed files with 42 additions and 16 deletions
|
|
@ -185,8 +185,12 @@ static CONTROL_FILE_ERROR create_control_file(const char *name,
|
|||
files around (indeed it could be that the control file alone was deleted
|
||||
or not restored, and we should not go on with life at this point).
|
||||
|
||||
TODO: For now we trust (this is alpha version), but for beta if would
|
||||
be great to verify.
|
||||
Things should still be relatively safe as if someone tries to use
|
||||
an old table with a new control file the different uuid:s between
|
||||
the files will cause ma_open() to generate an HA_ERR_OLD_FILE
|
||||
error. When used from mysqld this will cause the table to be open
|
||||
in repair mode which will remove all dependencies between the
|
||||
table and the old control file.
|
||||
|
||||
We could have a tool which can rebuild the control file, by reading the
|
||||
directory of logs, finding the newest log, reading it to find last
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue