← Back to team overview

maria-developers team mailing list archive

Re: a507f126b03: MDEV-29159 Patch for MDEV-28918 introduces more inconsistency than it solves, breaks usability

 

  Hello Sergei,


Please find a new patch here:

https://github.com/MariaDB/server/commit/3ebbfd88a0360938e3a5a480265beb2a71b1268a


See comments below:

On 8/5/22 5:27 PM, Sergei Golubchik wrote:
Hi, Alexander,

a thought about the error message text and a couple of questions
about changes in results, please, see below:

<cut>
2. Changing the error/warning test as follows:

-ERROR HY000: Illegal parameter data types inet6 and int for operation 'SET'
+ERROR HY000: Unknown CAST(int AS inet6) in assignment of 'target'

Better not to write 'CAST(int AS inet6)' if there's no explicit CAST()
function, I think it might be confusing. I'd say

   Cannot cast int as inet6 in assignment of 'target'


Done. Also added db/table names, as you suggested in the next email.



so in case of a big table it's easier to see which column has the problem.
The new error text is aslo applied to SP variables.

s/aslo/also/

Fixed.


diff --git a/mysql-test/main/sp-vars.result b/mysql-test/main/sp-vars.result
index 127a0993e2b..feef67ccb1d 100644
--- a/mysql-test/main/sp-vars.result
+++ b/mysql-test/main/sp-vars.result
@@ -1026,11 +1026,11 @@ BEGIN
  SELECT arg;
  END|
  CALL p1((1, 2));
-ERROR HY000: Illegal parameter data types tinyint and row for operation 'SET'
+ERROR 21000: Operand should contain 1 column(s)

Why not "Unknown CAST" like elsewhere?

This test uses non-strict sql_mode.

The data type compatibility test now issues a warning instead of an error in non-strict modes.

So the warning about data types gets later overridden by the
"... 1 column(s)" error.



diff --git a/mysql-test/main/type_geometry_mix_int.result b/mysql-test/main/type_geometry_mix_int.result
index e5d00c63727..0d0a21a8d29 100644
--- a/mysql-test/main/type_geometry_mix_int.result
+++ b/mysql-test/main/type_geometry_mix_int.result
@@ -6,6 +6,7 @@
  #
  CREATE TABLE t1 (target GEOMETRY DEFAULT POINT(1,1), source INT DEFAULT 0);
  # Start of type_store_assignment_incompatible.inc
+SET @sql_mode_save= (SELECT @@sql_mode);

strange, why not `SET @sql_mode_save= @@sql_mode` ?

Fixed.


  SET @source_type= (SELECT COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS
  WHERE COLUMN_NAME='source'
                     AND TABLE_NAME='t1'
@@ -47,6 +52,7 @@ INSERT INTO t3 VALUES
  (2,
  (SELECT source FROM t2 ORDER BY id LIMIT 1),
  (SELECT source FROM t2 ORDER BY id LIMIT 1));
+ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field

What's that? It wasn't an error, and now it is?

The error was there, but it was not displayed.

In the patch I removed
--error 0,ER_CANT_CREATE_GEOMETRY_OBJECT

and added this command instead:

--disable_abort_on_error



Looks like a bug in mysqltest, it displays nothing in case of this
command:

-- 0, ER_XXX1, ER_XXX2

even if an error happened.



  SELECT * FROM v3;
  id	target	source
  1	POINT(1 1)	0

Regards,
Sergei
VP of MariaDB Server Engineering
and security@xxxxxxxxxxx



References