mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fix for BUG#42980 "Client doesn't set NUM_FLAG for DECIMAL and TIMESTAMP":
DECIMAL and TIMESTAMP used to have NUM_FLAG, but NEWDECIMAL was forgotten. It's correct that TIMESTAMP does not have the flag nowadays (manual will be updated, connectors developers will be notified). client/mysqldump.c: IS_NUM_FIELD(f) removed and replaced by its definition (f>flags & NUM_FLAG). include/mysql.h: - IS_NUM_FIELD() is removed because name is too close to IS_NUM() and it is not used a lot - INTERNAL_NUM_FIELD() is removed: * it forgets to test NEWDECIMAL (when IS_NUM() was updated for NEWDECIMAL we forgot to update INTERNAL_NUM_FIELD()), that's why client didn't mark NEWDECIMAL with NUM_FLAG (a bug). * it has an obsolete test for length of the TIMESTAMP field: test became accidentally wrong when length of TIMESTAMP was changed to always be 19 (when the format was changed from YYYYMMDDhhmmss to YYYY-MM-DD hh:mm:ss), never 8 or 14 anymore. That obsolete test caused TIMESTAMP to lose NUM_FLAG, which was an accidental but good change (see below). * IS_NUM() should be used instead - IS_NUM(f) is changed: TIMESTAMP used to be parsable as a number without quotes (when it was formatted as "YYYYMMDDhhmmss"); but it is not anymore (now that it is "YYYY-MM-DD hh:mm:ss"), so it should not have NUM_FLAG (mysqldump needs to quote TIMESTAMP values), so IS_NUM() should return false for it. libmysqld/lib_sql.cc: use IS_NUM() instead of INTERNAL_NUM_FIELD() mysql-test/r/bigint.result: result change: NEWDECIMAL fields now have NUM_FLAG (32768) mysql-test/r/metadata.result: result change: NEWDECIMAL fields now have NUM_FLAG (32768) mysql-test/r/mysqldump.result: DECIMAL columns are not quoted anymore by mysqldump. Which is ok, the parser does not need '' for them mysql-test/r/ps_2myisam.result: result change: NEWDECIMAL fields now have NUM_FLAG (32768) mysql-test/r/ps_3innodb.result: result change: NEWDECIMAL fields now have NUM_FLAG (32768) mysql-test/r/ps_4heap.result: result change: NEWDECIMAL fields now have NUM_FLAG (32768) mysql-test/r/ps_5merge.result: result change: NEWDECIMAL fields now have NUM_FLAG (32768) mysql-test/suite/ndb/r/ps_7ndb.result: result change: NEWDECIMAL fields now have NUM_FLAG (32768) mysql-test/t/metadata.test: test for BUG#42980 sql-common/client.c: use IS_NUM() instead of INTERNAL_NUM_FIELD()
This commit is contained in:
@ -59,8 +59,8 @@ def test t9 t9 c7 c7 4 12 1 Y 32768 31 63
|
||||
def test t9 t9 c8 c8 5 22 1 Y 32768 31 63
|
||||
def test t9 t9 c9 c9 5 22 1 Y 32768 31 63
|
||||
def test t9 t9 c10 c10 5 22 1 Y 32768 31 63
|
||||
def test t9 t9 c11 c11 246 9 6 Y 0 4 63
|
||||
def test t9 t9 c12 c12 246 10 6 Y 0 4 63
|
||||
def test t9 t9 c11 c11 246 9 6 Y 32768 4 63
|
||||
def test t9 t9 c12 c12 246 10 6 Y 32768 4 63
|
||||
def test t9 t9 c13 c13 10 10 10 Y 128 0 63
|
||||
def test t9 t9 c14 c14 12 19 19 Y 128 0 63
|
||||
def test t9 t9 c15 c15 7 19 19 N 9441 0 63
|
||||
@ -1790,8 +1790,8 @@ select * from t5 ;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def test t5 t5 const01 const01 3 1 1 N 32769 0 63
|
||||
def test t5 t5 param01 param01 8 20 1 Y 32768 0 63
|
||||
def test t5 t5 const02 const02 246 4 3 N 1 1 63
|
||||
def test t5 t5 param02 param02 246 67 32 Y 0 30 63
|
||||
def test t5 t5 const02 const02 246 4 3 N 32769 1 63
|
||||
def test t5 t5 param02 param02 246 67 32 Y 32768 30 63
|
||||
def test t5 t5 const03 const03 5 17 1 N 32769 31 63
|
||||
def test t5 t5 param03 param03 5 23 1 Y 32768 31 63
|
||||
def test t5 t5 const04 const04 253 3 3 N 1 0 8
|
||||
@ -1812,7 +1812,7 @@ def test t5 t5 const11 const11 3 4 4 Y 32768 0 63
|
||||
def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
|
||||
def test t5 t5 const12 const12 254 0 0 Y 128 0 63
|
||||
def test t5 t5 param12 param12 8 20 0 Y 32768 0 63
|
||||
def test t5 t5 param13 param13 246 67 0 Y 0 30 63
|
||||
def test t5 t5 param13 param13 246 67 0 Y 32768 30 63
|
||||
def test t5 t5 param14 param14 252 4294967295 0 Y 16 0 8
|
||||
def test t5 t5 param15 param15 252 4294967295 0 Y 144 0 63
|
||||
const01 8
|
||||
@ -1910,8 +1910,8 @@ def @arg07 5 23 1 Y 32896 31 63
|
||||
def @arg08 5 23 1 Y 32896 31 63
|
||||
def @arg09 5 23 1 Y 32896 31 63
|
||||
def @arg10 5 23 1 Y 32896 31 63
|
||||
def @arg11 246 83 6 Y 128 30 63
|
||||
def @arg12 246 83 6 Y 128 30 63
|
||||
def @arg11 246 83 6 Y 32896 30 63
|
||||
def @arg12 246 83 6 Y 32896 30 63
|
||||
def @arg13 251 16777216 10 Y 128 31 63
|
||||
def @arg14 251 16777216 19 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -1957,8 +1957,8 @@ def @arg07 5 23 0 Y 32896 31 63
|
||||
def @arg08 5 23 0 Y 32896 31 63
|
||||
def @arg09 5 23 0 Y 32896 31 63
|
||||
def @arg10 5 23 0 Y 32896 31 63
|
||||
def @arg11 246 83 0 Y 128 30 63
|
||||
def @arg12 246 83 0 Y 128 30 63
|
||||
def @arg11 246 83 0 Y 32896 30 63
|
||||
def @arg12 246 83 0 Y 32896 30 63
|
||||
def @arg13 251 16777216 0 Y 128 31 63
|
||||
def @arg14 251 16777216 0 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -2007,8 +2007,8 @@ def @arg07 5 23 1 Y 32896 31 63
|
||||
def @arg08 5 23 1 Y 32896 31 63
|
||||
def @arg09 5 23 1 Y 32896 31 63
|
||||
def @arg10 5 23 1 Y 32896 31 63
|
||||
def @arg11 246 83 6 Y 128 30 63
|
||||
def @arg12 246 83 6 Y 128 30 63
|
||||
def @arg11 246 83 6 Y 32896 30 63
|
||||
def @arg12 246 83 6 Y 32896 30 63
|
||||
def @arg13 251 16777216 10 Y 128 31 63
|
||||
def @arg14 251 16777216 19 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -2047,8 +2047,8 @@ def @arg07 5 23 0 Y 32896 31 63
|
||||
def @arg08 5 23 0 Y 32896 31 63
|
||||
def @arg09 5 23 0 Y 32896 31 63
|
||||
def @arg10 5 23 0 Y 32896 31 63
|
||||
def @arg11 246 83 0 Y 128 30 63
|
||||
def @arg12 246 83 0 Y 128 30 63
|
||||
def @arg11 246 83 0 Y 32896 30 63
|
||||
def @arg12 246 83 0 Y 32896 30 63
|
||||
def @arg13 251 16777216 0 Y 128 31 63
|
||||
def @arg14 251 16777216 0 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -2095,8 +2095,8 @@ def @arg07 5 23 1 Y 32896 31 63
|
||||
def @arg08 5 23 1 Y 32896 31 63
|
||||
def @arg09 5 23 1 Y 32896 31 63
|
||||
def @arg10 5 23 1 Y 32896 31 63
|
||||
def @arg11 246 83 6 Y 128 30 63
|
||||
def @arg12 246 83 6 Y 128 30 63
|
||||
def @arg11 246 83 6 Y 32896 30 63
|
||||
def @arg12 246 83 6 Y 32896 30 63
|
||||
def @arg13 251 16777216 10 Y 128 31 63
|
||||
def @arg14 251 16777216 19 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -2139,8 +2139,8 @@ def @arg07 5 23 0 Y 32896 31 63
|
||||
def @arg08 5 23 0 Y 32896 31 63
|
||||
def @arg09 5 23 0 Y 32896 31 63
|
||||
def @arg10 5 23 0 Y 32896 31 63
|
||||
def @arg11 246 83 0 Y 128 30 63
|
||||
def @arg12 246 83 0 Y 128 30 63
|
||||
def @arg11 246 83 0 Y 32896 30 63
|
||||
def @arg12 246 83 0 Y 32896 30 63
|
||||
def @arg13 251 16777216 0 Y 128 31 63
|
||||
def @arg14 251 16777216 0 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -2185,8 +2185,8 @@ def @arg07 5 23 1 Y 32896 31 63
|
||||
def @arg08 5 23 1 Y 32896 31 63
|
||||
def @arg09 5 23 1 Y 32896 31 63
|
||||
def @arg10 5 23 1 Y 32896 31 63
|
||||
def @arg11 246 83 6 Y 128 30 63
|
||||
def @arg12 246 83 6 Y 128 30 63
|
||||
def @arg11 246 83 6 Y 32896 30 63
|
||||
def @arg12 246 83 6 Y 32896 30 63
|
||||
def @arg13 251 16777216 10 Y 128 31 63
|
||||
def @arg14 251 16777216 19 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
@ -2223,8 +2223,8 @@ def @arg07 5 23 0 Y 32896 31 63
|
||||
def @arg08 5 23 0 Y 32896 31 63
|
||||
def @arg09 5 23 0 Y 32896 31 63
|
||||
def @arg10 5 23 0 Y 32896 31 63
|
||||
def @arg11 246 83 0 Y 128 30 63
|
||||
def @arg12 246 83 0 Y 128 30 63
|
||||
def @arg11 246 83 0 Y 32896 30 63
|
||||
def @arg12 246 83 0 Y 32896 30 63
|
||||
def @arg13 251 16777216 0 Y 128 31 63
|
||||
def @arg14 251 16777216 0 Y 128 31 63
|
||||
def @arg15 251 16777216 19 Y 128 31 63
|
||||
|
Reference in New Issue
Block a user