1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-12854 Synchronize CREATE..SELECT data type and result set metadata data type for INT functions

This commit is contained in:
Alexander Barkov
2017-05-20 16:29:11 +04:00
parent d2fec340d2
commit a8caa8e04a
33 changed files with 810 additions and 237 deletions

View File

@ -412,3 +412,16 @@ next value for t1
select next value for t1, min_value;
ERROR 42S22: Unknown column 'min_value' in 'field list'
drop sequence t1;
#
# MDEV-12854 Synchronize CREATE..SELECT data type and result set metadata data type for INT functions
#
CREATE SEQUENCE s1;
SELECT
NEXT VALUE FOR s1,
PREVIOUS VALUE FOR s1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def NEXT VALUE FOR s1 8 20 1 Y 32896 0 63
def PREVIOUS VALUE FOR s1 8 20 1 Y 32896 0 63
NEXT VALUE FOR s1 PREVIOUS VALUE FOR s1
1 1
DROP SEQUENCE s1;

View File

@ -200,3 +200,17 @@ select next value for t1;
--error ER_BAD_FIELD_ERROR
select next value for t1, min_value;
drop sequence t1;
--echo #
--echo # MDEV-12854 Synchronize CREATE..SELECT data type and result set metadata data type for INT functions
--echo #
--enable_metadata
--disable_ps_protocol
CREATE SEQUENCE s1;
SELECT
NEXT VALUE FOR s1,
PREVIOUS VALUE FOR s1;
DROP SEQUENCE s1;
--enable_ps_protocol
--disable_metadata

View File

@ -244,3 +244,13 @@ create table t1 (a int);
select setval(t1,10);
ERROR 42S02: 'test.t1' is not a SEQUENCE
drop table t1;
#
# MDEV-12854 Synchronize CREATE..SELECT data type and result set metadata data type for INT functions
#
CREATE SEQUENCE s1;
SELECT SETVAL(s1,10);
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def SETVAL(s1,10) 8 20 2 Y 32896 0 63
SETVAL(s1,10)
10
DROP SEQUENCE s1;

View File

@ -124,3 +124,16 @@ create table t1 (a int);
--error ER_NOT_SEQUENCE
select setval(t1,10);
drop table t1;
--echo #
--echo # MDEV-12854 Synchronize CREATE..SELECT data type and result set metadata data type for INT functions
--echo #
--enable_metadata
--disable_ps_protocol
CREATE SEQUENCE s1;
SELECT SETVAL(s1,10);
DROP SEQUENCE s1;
--enable_ps_protocol
--disable_metadata