mirror of
https://github.com/MariaDB/server.git
synced 2025-01-28 17:54:16 +01:00
MDEV-17909 Problem by MariaDB Update 10.1.32 -> 10.2.19 (Incorrect information in file: .frm)
use frm_version, not mysql_version when parsing frm In particular, virtual columns are stored according to frm_version. And CHECK TABLE will overwrite mysql_version to the current server version, so it cannot correctly describe frm format.
This commit is contained in:
parent
e765b47e41
commit
fca44b7c1f
9 changed files with 32 additions and 1 deletions
0
mysql-test/std_data/mdev17909#P#p20181029.MYD
Normal file
0
mysql-test/std_data/mdev17909#P#p20181029.MYD
Normal file
BIN
mysql-test/std_data/mdev17909#P#p20181029.MYI
Normal file
BIN
mysql-test/std_data/mdev17909#P#p20181029.MYI
Normal file
Binary file not shown.
0
mysql-test/std_data/mdev17909#P#p20181128.MYD
Normal file
0
mysql-test/std_data/mdev17909#P#p20181128.MYD
Normal file
BIN
mysql-test/std_data/mdev17909#P#p20181128.MYI
Normal file
BIN
mysql-test/std_data/mdev17909#P#p20181128.MYI
Normal file
Binary file not shown.
BIN
mysql-test/std_data/mdev17909.frm
Normal file
BIN
mysql-test/std_data/mdev17909.frm
Normal file
Binary file not shown.
BIN
mysql-test/std_data/mdev17909.par
Normal file
BIN
mysql-test/std_data/mdev17909.par
Normal file
Binary file not shown.
|
@ -16,3 +16,19 @@ select * from vcol_autoinc;
|
|||
pk v3
|
||||
1 1
|
||||
drop table vcol_autoinc;
|
||||
check table t1 for upgrade;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
flush tables;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`Date` datetime(6) NOT NULL,
|
||||
`Data` varbinary(2000) NOT NULL,
|
||||
`a` varchar(100) GENERATED ALWAYS AS (column_get(`Data`,1 as char(100) charset latin1)) VIRTUAL,
|
||||
PRIMARY KEY (`Date`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
PARTITION BY RANGE (to_days(`Date`))
|
||||
(PARTITION `p20181029` VALUES LESS THAN (737361) ENGINE = MyISAM,
|
||||
PARTITION `p20181128` VALUES LESS THAN (737391) ENGINE = MyISAM)
|
||||
drop table t1;
|
||||
|
|
|
@ -11,3 +11,18 @@ select * from vcol_autoinc;
|
|||
insert vcol_autoinc (pk) values (1);
|
||||
select * from vcol_autoinc;
|
||||
drop table vcol_autoinc;
|
||||
|
||||
#
|
||||
# MDEV-17909 Problem by MariaDB Update 10.1.32 -> 10.2.19 (Incorrect information in file: .frm)
|
||||
#
|
||||
source include/have_partition.inc;
|
||||
copy_file std_data/mdev17909#P#p20181029.MYD $datadir/test/t1#P#p20181029.MYD;
|
||||
copy_file std_data/mdev17909#P#p20181029.MYI $datadir/test/t1#P#p20181029.MYI;
|
||||
copy_file std_data/mdev17909#P#p20181128.MYD $datadir/test/t1#P#p20181128.MYD;
|
||||
copy_file std_data/mdev17909#P#p20181128.MYI $datadir/test/t1#P#p20181128.MYI;
|
||||
copy_file std_data/mdev17909.frm $datadir/test/t1.frm;
|
||||
copy_file std_data/mdev17909.par $datadir/test/t1.par;
|
||||
check table t1 for upgrade;
|
||||
flush tables;
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
|
|
@ -1027,7 +1027,7 @@ bool parse_vcol_defs(THD *thd, MEM_ROOT *mem_root, TABLE *table,
|
|||
while (pos < end)
|
||||
{
|
||||
uint type, expr_length;
|
||||
if (table->s->mysql_version >= 100202)
|
||||
if (table->s->frm_version >= FRM_VER_EXPRESSSIONS)
|
||||
{
|
||||
uint field_nr, name_length;
|
||||
/* see pack_expression() for how data is stored */
|
||||
|
|
Loading…
Add table
Reference in a new issue