[MDEV-3990] engines/* and storage_engine tests and result files went out of sync with current MariaDB code Created: 2012-12-28  Updated: 2013-01-16  Resolved: 2013-01-16

Status: Closed
Project: MariaDB Server
Component/s: None
Fix Version/s: 10.0.2, 5.5.29

Type: Task Priority: Minor
Reporter: Elena Stepanova Assignee: Elena Stepanova
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-3942 FROM_DAYS(<timestamp column>) returns... Closed

 Description   

storage_engine tests and upstream engines/* suites went out of sync with current MariaDB code. Reasons:

  • as of 5.5.27, YEAR(2) is deprecated, hence the new warning;
  • MDEV-533 - different error code/message on out-of-range auto-increment;
  • INSERT IGNORE now produces a warning if a duplicate key was encountered (change pushed along with MDEV-533).

Result files need to be updated. For MDEV-533, also test files which expect a different error code need to be modified.



 Comments   
Comment by Elena Stepanova [ 2012-12-28 ]

Hi Sergei,

Here is the patch: http://bazaar.launchpad.net/~elenst/maria/5.5-engines-tests/revision/3605

No harm is done, it's only tests and results in suites which are not a part of the standard set. Is it okay to push into 5.5?

Comment by Sergei Golubchik [ 2012-12-29 ]

Hi, Elena!

The only questionable change is in the file
mysql-test/suite/storage_engine/autoinc_vars.result

monty, is that change ok?

Regards,
Sergei

Comment by Elena Stepanova [ 2012-12-29 ]

For Monty's reference, I'll put the change and the context here.

=====================================
The change:

=== modified file 'mysql-test/suite/storage_engine/autoinc_vars.result'
— mysql-test/suite/storage_engine/autoinc_vars.result 2012-07-16 02:17:56 +0000
+++ mysql-test/suite/storage_engine/autoinc_vars.result 2012-12-28 13:02:33 +0000
@@ -44,12 +44,10 @@
SET auto_increment_offset = 300;
CREATE TABLE t1 (a TINYINT <CUSTOM_COL_OPTIONS> AUTO_INCREMENT, <CUSTOM_INDEX>(a)) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
INSERT INTO t1 (a) VALUES (NULL);
-Warnings:
-Warning 1264 Out of range value for column 'a' at row 1
+ERROR 22003: Out of range value for column 'a' at row 1
SELECT LAST_INSERT_ID();
LAST_INSERT_ID()
-127
+850
SELECT * FROM t1;
a
-127
DROP TABLE t1;

=====================================
Context:

This part of the test does the following:

SET auto_increment_increment = 500;
SET auto_increment_offset = 300;
CREATE TABLE t1 (a TINYINT AUTO_INCREMENT PRIMARY KEY);
INSERT INTO t1 (a) VALUES (NULL);

Thus, the inserted value should have been 300, but TINYINT doesn't allow for that. So, earlier the value was truncated with the warning and the max possible value was inserted (and hence LAST_INSERT_ID was updated), while now it throws an error instead, nothing is inserted (and LAST_INSERT_ID remains old, 850 is the value from the previous part of the test)

Comment by Michael Widenius [ 2012-12-30 ]

Yes, this is ok. There is also a test case for this behavior change in t/auto_increment.test

Comment by Sergei Golubchik [ 2012-12-30 ]

Elena, please feel free to push

Comment by Elena Stepanova [ 2012-12-30 ]

pushed to maria/5.5.
Not closing because 10.0 might require more changes, still need to check it.

Comment by Elena Stepanova [ 2013-01-13 ]

Hi Sergei,

Here is the 10.0 part (on top of the previous change):
http://bazaar.launchpad.net/~elenst/maria/10.0-base-mdev3990/revision/3468

I listed sources of the differences, as much as I could identify them, in the commit comment.

Comment by Sergei Golubchik [ 2013-01-13 ]

Everything, but the insert_time.result is certainly ok.
changes in the insert_time.result look plausible too, but I didn't track every 00:00:00 change back to its origin, incorrectly formatted time.

Comment by Elena Stepanova [ 2013-01-13 ]

What I did was take this test:

create table t1 (c1 time);
insert into t1 values ('00:00:00');
select * from t1 where c1 >='12colon34colon56';
c1
00:00:00
Warnings:
Warning 1292 Truncated incorrect time value: '12colon34colon56'

And ran it before and after MDEV-457 fix. Before it was returning the value, after it wasn't – so I figured it's related to that change. MySQL doesn't return a value either, so at least it's consistent.

My understanding is this:
'12colon34colon56' is truncated to '12' and considered to be '00:00:12';
so, everything less than that (up to and including '00:00:11' in that test) is filtered out, and the rest is included in the result set.

Comment by Sergei Golubchik [ 2013-01-14 ]

ok to push in 10.0-base

Comment by Elena Stepanova [ 2013-01-16 ]

pushed into 10.0-base

Generated at Thu Feb 08 06:52:52 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.