1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

mysqltest: fix --sorted_results

only sort actual results not warnings or metadata
also work for vertical results
warnings are sorted separately
This commit is contained in:
Sergei Golubchik
2025-01-07 21:38:11 +01:00
parent 9b941dc51f
commit a0e5dd5433
10 changed files with 90 additions and 159 deletions

View File

@@ -871,8 +871,7 @@ LogFile progress_file;
void replace_dynstr_append_mem(DYNAMIC_STRING *ds, const char *val, size_t len);
void replace_dynstr_append(DYNAMIC_STRING *ds, const char *val);
void replace_dynstr_append_uint(DYNAMIC_STRING *ds, uint val);
void dynstr_append_sorted(DYNAMIC_STRING* ds, DYNAMIC_STRING* ds_input,
bool keep_header);
void dynstr_append_sorted(DYNAMIC_STRING* ds, DYNAMIC_STRING* ds_input);
static int match_expected_error(struct st_command *command,
unsigned int err_errno,
@@ -3433,7 +3432,7 @@ void do_exec(struct st_command *command)
if (display_result_sorted)
{
dynstr_append_sorted(&ds_res, &ds_sorted, 0);
dynstr_append_sorted(&ds_res, &ds_sorted);
dynstr_free(&ds_sorted);
}
@@ -7719,16 +7718,29 @@ void append_result(DYNAMIC_STRING *ds, MYSQL_RES *res)
uint num_fields= mysql_num_fields(res);
MYSQL_FIELD *fields= mysql_fetch_fields(res);
ulong *lengths;
DYNAMIC_STRING rs_unsorted, *rs= ds;
if (display_result_sorted)
{
init_dynamic_string(&rs_unsorted, "", 1024, 1024);
rs= &rs_unsorted;
}
while ((row = mysql_fetch_row(res)))
{
uint i;
lengths = mysql_fetch_lengths(res);
for (i = 0; i < num_fields; i++)
append_field(ds, i, &fields[i],
append_field(rs, i, &fields[i],
row[i], lengths[i], !row[i]);
if (!display_result_vertically)
dynstr_append_mem(ds, "\n", 1);
dynstr_append_mem(rs, "\n", 1);
}
if (display_result_sorted)
{
dynstr_append_sorted(ds, &rs_unsorted);
dynstr_free(&rs_unsorted);
}
}
@@ -7746,6 +7758,13 @@ void append_stmt_result(DYNAMIC_STRING *ds, MYSQL_STMT *stmt,
ulong *length;
uint i;
int error;
DYNAMIC_STRING rs_unsorted, *rs= ds;
if (display_result_sorted)
{
init_dynamic_string(&rs_unsorted, "", 1024, 1024);
rs= &rs_unsorted;
}
/* Allocate array with bind structs, lengths and NULL flags */
my_bind= (MYSQL_BIND*) my_malloc(PSI_NOT_INSTRUMENTED, num_fields * sizeof(MYSQL_BIND),
@@ -7777,10 +7796,10 @@ void append_stmt_result(DYNAMIC_STRING *ds, MYSQL_STMT *stmt,
while ((error=mysql_stmt_fetch(stmt)) == 0)
{
for (i= 0; i < num_fields; i++)
append_field(ds, i, &fields[i], (char*)my_bind[i].buffer,
append_field(rs, i, &fields[i], (char*)my_bind[i].buffer,
*my_bind[i].length, *my_bind[i].is_null);
if (!display_result_vertically)
dynstr_append_mem(ds, "\n", 1);
dynstr_append_mem(rs, "\n", 1);
}
if (error != MYSQL_NO_DATA)
@@ -7799,6 +7818,12 @@ void append_stmt_result(DYNAMIC_STRING *ds, MYSQL_STMT *stmt,
my_free(my_bind);
my_free(length);
my_free(is_null);
if (display_result_sorted)
{
dynstr_append_sorted(ds, &rs_unsorted);
dynstr_free(&rs_unsorted);
}
}
@@ -7999,7 +8024,7 @@ static void append_session_track_info(DYNAMIC_STRING *ds, MYSQL *mysql)
if (type == SESSION_TRACK_SYSTEM_VARIABLES)
{
dynstr_append_mem(ds_type, STRING_WITH_LEN("\n"));
dynstr_append_sorted(ds, ds_type, false);
dynstr_append_sorted(ds, ds_type);
dynstr_append_mem(ds, STRING_WITH_LEN("\n"));
dynstr_free(&ds_sort);
}
@@ -8041,7 +8066,6 @@ int append_warnings(DYNAMIC_STRING *ds, MYSQL* mysql)
{
uint count;
MYSQL_RES *warn_res;
DYNAMIC_STRING res;
DBUG_ENTER("append_warnings");
if (!(count= mysql_warning_count(mysql)))
@@ -8062,18 +8086,8 @@ int append_warnings(DYNAMIC_STRING *ds, MYSQL* mysql)
die("Warning count is %u but didn't get any warnings",
count);
init_dynamic_string(&res, "", 1024, 1024);
append_result(&res, warn_res);
append_result(ds, warn_res);
mysql_free_result(warn_res);
DBUG_PRINT("warnings", ("%s", res.str));
if (display_result_sorted)
dynstr_append_sorted(ds, &res, 0);
else
dynstr_append_mem(ds, res.str, res.length);
dynstr_free(&res);
DBUG_RETURN(count);
}
@@ -8588,8 +8602,6 @@ void run_query_stmt(struct st_connection *cn, struct st_command *command,
DYNAMIC_STRING ds_prepare_warnings;
DYNAMIC_STRING ds_execute_warnings;
DYNAMIC_STRING ds_res_1st_execution;
DYNAMIC_STRING ds_res_2_execution_unsorted;
DYNAMIC_STRING *ds_res_2_output;
my_bool ds_res_1st_execution_init = FALSE;
my_bool compare_2nd_execution = TRUE;
int query_match_ps2_re;
@@ -8651,7 +8663,6 @@ void run_query_stmt(struct st_connection *cn, struct st_command *command,
parameter markers.
*/
#if MYSQL_VERSION_ID >= 50000
if (cursor_protocol_enabled)
{
ps2_protocol_enabled = 0;
@@ -8671,7 +8682,6 @@ void run_query_stmt(struct st_connection *cn, struct st_command *command,
mysql_stmt_errno(stmt), mysql_stmt_error(stmt));
}
}
#endif
query_match_ps2_re = match_re(&ps2_re, query);
@@ -8738,29 +8748,8 @@ void run_query_stmt(struct st_connection *cn, struct st_command *command,
!disable_warnings)
append_warnings(&ds_execute_warnings, mysql);
if (!disable_result_log &&
compare_2nd_execution &&
ps2_protocol_enabled &&
query_match_ps2_re &&
display_result_sorted)
{
init_dynamic_string(&ds_res_2_execution_unsorted, "",
RESULT_STRING_INIT_MEM,
RESULT_STRING_INCREMENT_MEM);
ds_res_2_output= &ds_res_2_execution_unsorted;
}
else
ds_res_2_output= ds;
if (read_stmt_results(stmt, ds_res_2_output, command))
{
if (ds_res_2_output != ds)
{
dynstr_append_mem(ds, ds_res_2_output->str, ds_res_2_output->length);
dynstr_free(ds_res_2_output);
}
if (read_stmt_results(stmt, ds, command))
goto end;
}
if (!disable_result_log)
{
@@ -8770,35 +8759,12 @@ void run_query_stmt(struct st_connection *cn, struct st_command *command,
*/
if (compare_2nd_execution && ps2_protocol_enabled && query_match_ps2_re)
{
DYNAMIC_STRING *ds_res_1_execution_compare;
DYNAMIC_STRING ds_res_1_execution_sorted;
if (display_result_sorted)
{
init_dynamic_string(&ds_res_1_execution_sorted, "",
RESULT_STRING_INIT_MEM,
RESULT_STRING_INCREMENT_MEM);
dynstr_append_sorted(&ds_res_1_execution_sorted,
&ds_res_1st_execution, 1);
dynstr_append_sorted(ds, &ds_res_2_execution_unsorted, 1);
ds_res_1_execution_compare= &ds_res_1_execution_sorted;
}
else
{
ds_res_1_execution_compare= &ds_res_1st_execution;
}
if (ds->length != ds_res_1_execution_compare->length ||
!(memcmp(ds_res_1_execution_compare->str, ds->str, ds->length) == 0))
if (ds->length != ds_res_1st_execution.length ||
!(memcmp(ds_res_1st_execution.str, ds->str, ds->length) == 0))
{
die("The result of the 1st execution does not match with \n"
"the result of the 2nd execution of ps-protocol:\n 1st:\n"
"%s\n 2nd:\n %s",
ds_res_1_execution_compare->str,
ds->str);
}
if (display_result_sorted)
{
dynstr_free(&ds_res_1_execution_sorted);
dynstr_free(&ds_res_2_execution_unsorted);
"%s\n 2nd:\n %s", ds_res_1st_execution.str, ds->str);
}
}
@@ -9391,10 +9357,6 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags)
DYNAMIC_STRING *rs_output; /* where to put results */
DYNAMIC_STRING rs_cmp_result; /* here we put results to compare with
pre-recrded file */
DYNAMIC_STRING rs_unsorted; /* if we need sorted results, here we store
results before sorting them */
DYNAMIC_STRING *rs_sorted_save= NULL; /* here we store where to put sorted
result if needed */
DYNAMIC_STRING rs_warnings;
char *query;
size_t query_len;
@@ -9565,18 +9527,6 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags)
dynstr_free(&query_str);
}
if (display_result_sorted)
{
/*
Collect the query output in a separate string
that can be sorted before it's added to the
global result string
*/
init_dynamic_string(&rs_unsorted, "", 1024, 1024);
rs_sorted_save= rs_output; /* Remember original ds */
rs_output= &rs_unsorted;
}
/*
Find out how to run this query
@@ -9603,14 +9553,6 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags)
dynstr_free(&rs_warnings);
ds_warn= 0;
if (display_result_sorted)
{
/* Sort the result set and append it to result */
dynstr_append_sorted(rs_sorted_save, &rs_unsorted, 1);
rs_output= rs_sorted_save;
dynstr_free(&rs_unsorted);
}
if (sp_created)
{
if (util_query(mysql, "DROP PROCEDURE mysqltest_tmp_sp "))
@@ -12169,7 +12111,6 @@ void replace_dynstr_append_uint(DYNAMIC_STRING *ds, uint val)
dynstr_append_sorted()
ds string where the sorted output will be appended
ds_input string to be sorted
keep_header If header should not be sorted
*/
static int comp_lines(const void *a_, const void *b_)
@@ -12179,8 +12120,7 @@ static int comp_lines(const void *a_, const void *b_)
return (strcmp(*a,*b));
}
void dynstr_append_sorted(DYNAMIC_STRING* ds, DYNAMIC_STRING *ds_input,
bool keep_header)
void dynstr_append_sorted(DYNAMIC_STRING* ds, DYNAMIC_STRING *ds_input)
{
unsigned i;
char *start= ds_input->str;
@@ -12192,15 +12132,6 @@ void dynstr_append_sorted(DYNAMIC_STRING* ds, DYNAMIC_STRING *ds_input,
my_init_dynamic_array(PSI_NOT_INSTRUMENTED, &lines, sizeof(const char*), 32, 32, MYF(0));
if (keep_header)
{
/* First line is result header, skip past it */
while (*start && *start != '\n')
start++;
start++; /* Skip past \n */
dynstr_append_mem(ds, ds_input->str, start - ds_input->str);
}
/* Insert line(s) in array */
while (*start)
{

View File

@@ -281,16 +281,16 @@ SELECT COALESCE(d, d), IFNULL(d, d), IF(i, d, d),
CASE i WHEN i THEN d ELSE d END, GREATEST(d, d), LEAST(d, d)
FROM t1 ORDER BY RAND();
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def COALESCE(d, d) COALESCE(d, d) 10 10 10 Y 128 0 63
def IFNULL(d, d) IFNULL(d, d) 10 10 10 Y 128 0 63
def IF(i, d, d) IF(i, d, d) 10 10 10 Y 128 0 63
def CASE i WHEN i THEN d ELSE d END CASE i WHEN i THEN d ELSE d END 10 10 10 Y 128 0 63
def GREATEST(d, d) GREATEST(d, d) 10 10 10 Y 128 0 63
def LEAST(d, d) LEAST(d, d) 10 10 10 Y 128 0 63
COALESCE(d, d) IFNULL(d, d) IF(i, d, d) CASE i WHEN i THEN d ELSE d END GREATEST(d, d) LEAST(d, d)
2008-01-01 2008-01-01 2008-01-01 2008-01-01 2008-01-01 2008-01-01
2008-01-02 2008-01-02 2008-01-02 2008-01-02 2008-01-02 2008-01-02
2008-01-03 2008-01-03 2008-01-03 2008-01-03 2008-01-03 2008-01-03
COALESCE(d, d) IFNULL(d, d) IF(i, d, d) CASE i WHEN i THEN d ELSE d END GREATEST(d, d) LEAST(d, d)
def CASE i WHEN i THEN d ELSE d END CASE i WHEN i THEN d ELSE d END 10 10 10 Y 128 0 63
def COALESCE(d, d) COALESCE(d, d) 10 10 10 Y 128 0 63
def GREATEST(d, d) GREATEST(d, d) 10 10 10 Y 128 0 63
def IF(i, d, d) IF(i, d, d) 10 10 10 Y 128 0 63
def IFNULL(d, d) IFNULL(d, d) 10 10 10 Y 128 0 63
def LEAST(d, d) LEAST(d, d) 10 10 10 Y 128 0 63
DROP TABLE t1;
#
# Bug#41788 mysql_fetch_field returns org_table == table by a view

View File

@@ -52,10 +52,10 @@ affected rows: 1
# Do not display the column value itself, just its length.
#
SELECT LENGTH(c1) FROM t1;
LENGTH(c1) 67108864
LENGTH(c1) 33554432
LENGTH(c1) 4194304
LENGTH(c1) 524288
LENGTH(c1) 67108864
affected rows: 4
#
# Grow the rows by updating.
@@ -68,8 +68,8 @@ info: Rows matched: 4 Changed: 4 Warnings: 0
# Do not display the column value itself, just its length.
#
SELECT LENGTH(c1) FROM t1;
LENGTH(c1) 134217728
LENGTH(c1) 1048576
LENGTH(c1) 134217728
LENGTH(c1) 67108864
LENGTH(c1) 8388608
affected rows: 4

View File

@@ -279,8 +279,8 @@ select * from t1;
a b
-2 NULL
2 0.693147
Warning 1365 Division by 0
Warnings:
Warning 1365 Division by 0
drop table t1;
set sql_warnings = 0;
# LOG()
@@ -303,8 +303,8 @@ a b c
1 100 NULL
10 100 2
2 65536 16
Warning 1365 Division by 0
Warnings:
Warning 1365 Division by 0
drop table t1;
set sql_warnings = 0;
set sql_warnings = 1;
@@ -323,8 +323,8 @@ select * from t1;
a b
-2 NULL
2 0.693147
Warning 1365 Division by 0
Warnings:
Warning 1365 Division by 0
drop table t1;
set sql_warnings = 0;
# LOG2()
@@ -344,8 +344,8 @@ select * from t1;
a b
-100 NULL
65536 16
Warning 1365 Division by 0
Warnings:
Warning 1365 Division by 0
drop table t1;
set sql_warnings = 0;
# LOG10()
@@ -367,8 +367,8 @@ a b
-100 NULL
100 2
2 0.30103
Warning 1365 Division by 0
Warnings:
Warning 1365 Division by 0
drop table t1;
set sql_warnings = 0;
# -
@@ -2722,8 +2722,8 @@ select * from t1;
a b
-1 18446744073709551615
1 1
Note 1105 Cast to unsigned converted negative integer to it's positive complement
Warnings:
Note 1105 Cast to unsigned converted negative integer to it's positive complement
drop table t1;
set sql_warnings = 0;
# Convert()
@@ -2743,8 +2743,8 @@ select * from t1;
a b
-1 18446744073709551615
1 1
Note 1105 Cast to unsigned converted negative integer to it's positive complement
Warnings:
Note 1105 Cast to unsigned converted negative integer to it's positive complement
drop table t1;
set sql_warnings = 0;
#

View File

@@ -279,8 +279,8 @@ select * from t1;
a b
-2 NULL
2 0.693147
Warning 1365 Division by 0
Warnings:
Warning 1365 Division by 0
drop table t1;
set sql_warnings = 0;
# LOG()
@@ -303,8 +303,8 @@ a b c
1 100 NULL
10 100 2
2 65536 16
Warning 1365 Division by 0
Warnings:
Warning 1365 Division by 0
drop table t1;
set sql_warnings = 0;
set sql_warnings = 1;
@@ -323,8 +323,8 @@ select * from t1;
a b
-2 NULL
2 0.693147
Warning 1365 Division by 0
Warnings:
Warning 1365 Division by 0
drop table t1;
set sql_warnings = 0;
# LOG2()
@@ -344,8 +344,8 @@ select * from t1;
a b
-100 NULL
65536 16
Warning 1365 Division by 0
Warnings:
Warning 1365 Division by 0
drop table t1;
set sql_warnings = 0;
# LOG10()
@@ -367,8 +367,8 @@ a b
-100 NULL
100 2
2 0.30103
Warning 1365 Division by 0
Warnings:
Warning 1365 Division by 0
drop table t1;
set sql_warnings = 0;
# -
@@ -2722,8 +2722,8 @@ select * from t1;
a b
-1 18446744073709551615
1 1
Note 1105 Cast to unsigned converted negative integer to it's positive complement
Warnings:
Note 1105 Cast to unsigned converted negative integer to it's positive complement
drop table t1;
set sql_warnings = 0;
# Convert()
@@ -2743,8 +2743,8 @@ select * from t1;
a b
-1 18446744073709551615
1 1
Note 1105 Cast to unsigned converted negative integer to it's positive complement
Warnings:
Note 1105 Cast to unsigned converted negative integer to it's positive complement
drop table t1;
set sql_warnings = 0;
#

View File

@@ -1543,12 +1543,12 @@ d53_10 double(53,10) NO NULL
pk double NO PRI NULL
INSERT INTO t1 (f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10,pk) VALUES (12345.12345,12345.12345,0.9,123456789.123,56789.987,11111111.111,8.0,0.0123456789,1234566789123456789,99999999999999999.99999999,1);
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
f 12345.1
d 11111111.111
d10_10 0.0123456789
d1_0 8
d53 1234566789123456800
d53_10 100000000000000000.0000000000
f 12345.1
f0 12345.1
f20_3 56789.988
f23_0 123457000
@@ -1571,7 +1571,6 @@ Warnings:
Warning 1264 Out of range value for column 'd53' at row 1
Warning 1264 Out of range value for column 'd53_10' at row 1
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
f 12345.1
d 0
d 11111111.111
d 1e81
@@ -1588,6 +1587,7 @@ d53_10 0.0000000000
d53_10 100000000000000000.0000000000
d53_10 10000000000000000000000000000000000000000000.0000000000
f 0
f 12345.1
f 1e38
f0 0
f0 12345.1
@@ -1603,7 +1603,6 @@ r1_1 0.9
r1_1 0.9
INSERT INTO t1 (f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10,pk) VALUES (-999999999999999999999999,-99999999999.999999999999,-0.9,-999.99999999999999999999,-99999999999999999.999,-999999999999999999999999999999999999999999999999999999999999-0.999,-9,-.9999999999,-999999999999999999999999999999.99999999999999999999999,-9999999999999999999999999999999999999999999.9999999999,4);
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
f 12345.1
d -1e60
d 0
d 11111111.111
@@ -1626,6 +1625,7 @@ d53_10 100000000000000000.0000000000
d53_10 10000000000000000000000000000000000000000000.0000000000
f -1e24
f 0
f 12345.1
f 1e38
f0 -100000000000
f0 0
@@ -1654,12 +1654,12 @@ CONCAT('', MAX(d1_0)),
CONCAT('', MAX(d10_10)),
CONCAT('', MAX(d53)),
CONCAT('', MAX(d53_10)) FROM t1;
CONCAT('', MAX(f)) 1e38
CONCAT('', MAX(d)) 1e81
CONCAT('', MAX(d10_10)) 0.9999999999
CONCAT('', MAX(d1_0)) 9
CONCAT('', MAX(d53)) 100000000000000000000000000000000000000000000000000000
CONCAT('', MAX(d53_10)) 10000000000000000000000000000000000000000000.0000000000
CONCAT('', MAX(f)) 1e38
CONCAT('', MAX(f0)) 1e38
CONCAT('', MAX(f20_3)) 99999998430674940.000
CONCAT('', MAX(f23_0)) 1e38
@@ -1688,7 +1688,6 @@ Warning 1264 Out of range value for column 'd10_10' at row 1
Warning 1264 Out of range value for column 'd53' at row 1
Warning 1264 Out of range value for column 'd53_10' at row 1
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
f 12345.1
d -1e60
d 0
d 11111111.111
@@ -1716,6 +1715,7 @@ d53_10 10000000000000000000000000000000000000000000.0000000000
d53_10 10000000000000000000000000000000000000000000.0000000000
f -1e24
f 0
f 12345.1
f 1e38
f 3.40282e38
f0 -100000000000
@@ -1763,7 +1763,6 @@ Warning 1264 Out of range value for column 'd10_10' at row 1
Warning 1264 Out of range value for column 'd53' at row 1
Warning 1264 Out of range value for column 'd53_10' at row 1
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
f 12345.1
d -1e60
d 0
d 11111111.111
@@ -1796,6 +1795,7 @@ d53_10 10000000000000000000000000000000000000000000.0000000000
d53_10 10000000000000000000000000000000000000000000.0000000000
f -1e24
f 0
f 12345.1
f 1e38
f 3.40282e38
f 3.40282e38

View File

@@ -1330,12 +1330,12 @@ d53_10 double(53,10) YES NULL
pk double NO PRI NULL
INSERT INTO t1 (f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10,pk) VALUES (12345.12345,12345.12345,0.9,123456789.123,56789.987,11111111.111,8.0,0.0123456789,1234566789123456789,99999999999999999.99999999,1);
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
f 12345.1
d 11111111.111
d10_10 0.0123456789
d1_0 8
d53 1234566789123456800
d53_10 100000000000000000.0000000000
f 12345.1
f0 12345.1
f20_3 56789.988
f23_0 123457000
@@ -1358,7 +1358,6 @@ Warnings:
Warning 1264 Out of range value for column 'd53' at row 1
Warning 1264 Out of range value for column 'd53_10' at row 1
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
f 12345.1
d 0
d 11111111.111
d 1e81
@@ -1375,6 +1374,7 @@ d53_10 0.0000000000
d53_10 100000000000000000.0000000000
d53_10 10000000000000000000000000000000000000000000.0000000000
f 0
f 12345.1
f 1e38
f0 0
f0 12345.1
@@ -1390,7 +1390,6 @@ r1_1 0.9
r1_1 0.9
INSERT INTO t1 (f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10,pk) VALUES (-999999999999999999999999,-99999999999.999999999999,-0.9,-999.99999999999999999999,-99999999999999999.999,-999999999999999999999999999999999999999999999999999999999999-0.999,-9,-.9999999999,-999999999999999999999999999999.99999999999999999999999,-9999999999999999999999999999999999999999999.9999999999,4);
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
f 12345.1
d -1e60
d 0
d 11111111.111
@@ -1413,6 +1412,7 @@ d53_10 100000000000000000.0000000000
d53_10 10000000000000000000000000000000000000000000.0000000000
f -1e24
f 0
f 12345.1
f 1e38
f0 -100000000000
f0 0
@@ -1441,12 +1441,12 @@ CONCAT('', MAX(d1_0)),
CONCAT('', MAX(d10_10)),
CONCAT('', MAX(d53)),
CONCAT('', MAX(d53_10)) FROM t1;
CONCAT('', MAX(f)) 1e38
CONCAT('', MAX(d)) 1e81
CONCAT('', MAX(d10_10)) 0.9999999999
CONCAT('', MAX(d1_0)) 9
CONCAT('', MAX(d53)) 100000000000000000000000000000000000000000000000000000
CONCAT('', MAX(d53_10)) 10000000000000000000000000000000000000000000.0000000000
CONCAT('', MAX(f)) 1e38
CONCAT('', MAX(f0)) 1e38
CONCAT('', MAX(f20_3)) 99999998430674940.000
CONCAT('', MAX(f23_0)) 1e38
@@ -1475,7 +1475,6 @@ Warning 1264 Out of range value for column 'd10_10' at row 1
Warning 1264 Out of range value for column 'd53' at row 1
Warning 1264 Out of range value for column 'd53_10' at row 1
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
f 12345.1
d -1e60
d 0
d 11111111.111
@@ -1503,6 +1502,7 @@ d53_10 10000000000000000000000000000000000000000000.0000000000
d53_10 10000000000000000000000000000000000000000000.0000000000
f -1e24
f 0
f 12345.1
f 1e38
f 3.40282e38
f0 -100000000000
@@ -1550,7 +1550,6 @@ Warning 1264 Out of range value for column 'd10_10' at row 1
Warning 1264 Out of range value for column 'd53' at row 1
Warning 1264 Out of range value for column 'd53_10' at row 1
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
f 12345.1
d -1e60
d 0
d 11111111.111
@@ -1583,6 +1582,7 @@ d53_10 10000000000000000000000000000000000000000000.0000000000
d53_10 10000000000000000000000000000000000000000000.0000000000
f -1e24
f 0
f 12345.1
f 1e38
f 3.40282e38
f 3.40282e38

View File

@@ -206,12 +206,12 @@ d53_10 double(53,10) unsigned YES NULL
pk double unsigned NO PRI NULL
INSERT INTO t1 (f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10,pk) VALUES (12345.12345,12345.12345,0.9,123456789.123,56789.987,11111111.111,8.0,0.0123456789,1234566789123456789,99999999999999999.99999999,1);
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
f 12345.1
d 11111111.111
d10_10 0.0123456789
d1_0 8
d53 1234566789123456800
d53_10 100000000000000000.0000000000
f 12345.1
f0 12345.1
f20_3 56789.988
f23_0 123457000
@@ -234,7 +234,6 @@ Warnings:
Warning 1264 Out of range value for column 'd53' at row 1
Warning 1264 Out of range value for column 'd53_10' at row 1
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
f 12345.1
d 0
d 11111111.111
d 1e81
@@ -251,6 +250,7 @@ d53_10 0.0000000000
d53_10 100000000000000000.0000000000
d53_10 10000000000000000000000000000000000000000000.0000000000
f 0
f 12345.1
f 1e38
f0 0
f0 12345.1
@@ -277,7 +277,6 @@ Warning 1264 Out of range value for column 'd10_10' at row 1
Warning 1264 Out of range value for column 'd53' at row 1
Warning 1264 Out of range value for column 'd53_10' at row 1
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
f 12345.1
d 0
d 0
d 11111111.111
@@ -300,6 +299,7 @@ d53_10 100000000000000000.0000000000
d53_10 10000000000000000000000000000000000000000000.0000000000
f 0
f 0
f 12345.1
f 1e38
f0 0
f0 0
@@ -328,12 +328,12 @@ CONCAT('', MAX(d1_0)),
CONCAT('', MAX(d10_10)),
CONCAT('', MAX(d53)),
CONCAT('', MAX(d53_10)) FROM t1;
CONCAT('', MAX(f)) 1e38
CONCAT('', MAX(d)) 1e81
CONCAT('', MAX(d10_10)) 0.9999999999
CONCAT('', MAX(d1_0)) 9
CONCAT('', MAX(d53)) 100000000000000000000000000000000000000000000000000000
CONCAT('', MAX(d53_10)) 10000000000000000000000000000000000000000000.0000000000
CONCAT('', MAX(f)) 1e38
CONCAT('', MAX(f0)) 1e38
CONCAT('', MAX(f20_3)) 99999998430674940.000
CONCAT('', MAX(f23_0)) 1e38
@@ -362,7 +362,6 @@ Warning 1264 Out of range value for column 'd10_10' at row 1
Warning 1264 Out of range value for column 'd53' at row 1
Warning 1264 Out of range value for column 'd53_10' at row 1
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
f 12345.1
d 0
d 0
d 11111111.111
@@ -390,6 +389,7 @@ d53_10 10000000000000000000000000000000000000000000.0000000000
d53_10 10000000000000000000000000000000000000000000.0000000000
f 0
f 0
f 12345.1
f 1e38
f 3.40282e38
f0 0
@@ -437,7 +437,6 @@ Warning 1264 Out of range value for column 'd10_10' at row 1
Warning 1264 Out of range value for column 'd53' at row 1
Warning 1264 Out of range value for column 'd53_10' at row 1
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
f 12345.1
d 0
d 0
d 11111111.111
@@ -470,6 +469,7 @@ d53_10 10000000000000000000000000000000000000000000.0000000000
d53_10 10000000000000000000000000000000000000000000.0000000000
f 0
f 0
f 12345.1
f 1e38
f 3.40282e38
f 3.40282e38

View File

@@ -28,10 +28,6 @@ DROP EVENT ev1;
SELECT TABLE_NAME, COLUMN_NAME, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME
FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE ORDER BY TABLE_NAME;
TABLE_NAME COLUMN_NAME REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME
Warning 1286 Unknown storage engine 'InnoDB'
Warning 1286 Unknown storage engine 'InnoDB'
Warning 1286 Unknown storage engine 'InnoDB'
Warnings:
column_stats column_name NULL NULL
column_stats db_name NULL NULL
column_stats table_name NULL NULL
@@ -93,3 +89,7 @@ time_zone_transition Time_zone_id NULL NULL
time_zone_transition Transition_time NULL NULL
time_zone_transition_type Time_zone_id NULL NULL
time_zone_transition_type Transition_type_id NULL NULL
Warnings:
Warning 1286 Unknown storage engine 'InnoDB'
Warning 1286 Unknown storage engine 'InnoDB'
Warning 1286 Unknown storage engine 'InnoDB'

View File

@@ -27,12 +27,12 @@ d53_10 double(53,10) YES NULL
pk double NO PRI NULL
INSERT INTO t1 (f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10,pk) VALUES (12345.12345,12345.12345,0.9,123456789.123,56789.987,11111111.111,8.0,0.0123456789,1234566789123456789,99999999999999999.99999999,1);
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
f 12345.1
d 11111111.111
d10_10 0.0123456789
d1_0 8
d53 1234566789123456800
d53_10 100000000000000000.0000000000
f 12345.1
f0 12345.1
f20_3 56789.988
f23_0 123457000
@@ -55,7 +55,6 @@ Warnings:
Warning 1264 Out of range value for column 'd53' at row 1
Warning 1264 Out of range value for column 'd53_10' at row 1
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
f 12345.1
d 0
d 11111111.111
d 1e81
@@ -72,6 +71,7 @@ d53_10 0.0000000000
d53_10 100000000000000000.0000000000
d53_10 10000000000000000000000000000000000000000000.0000000000
f 0
f 12345.1
f 1e38
f0 0
f0 12345.1
@@ -87,7 +87,6 @@ r1_1 0.9
r1_1 0.9
INSERT INTO t1 (f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10,pk) VALUES (-999999999999999999999999,-99999999999.999999999999,-0.9,-999.99999999999999999999,-99999999999999999.999,-999999999999999999999999999999999999999999999999999999999999-0.999,-9,-.9999999999,-999999999999999999999999999999.99999999999999999999999,-9999999999999999999999999999999999999999999.9999999999,4);
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
f 12345.1
d -1e60
d 0
d 11111111.111
@@ -110,6 +109,7 @@ d53_10 100000000000000000.0000000000
d53_10 10000000000000000000000000000000000000000000.0000000000
f -1e24
f 0
f 12345.1
f 1e38
f0 -100000000000
f0 0
@@ -138,12 +138,12 @@ CONCAT('', MAX(d1_0)),
CONCAT('', MAX(d10_10)),
CONCAT('', MAX(d53)),
CONCAT('', MAX(d53_10)) FROM t1;
CONCAT('', MAX(f)) 1e38
CONCAT('', MAX(d)) 1e81
CONCAT('', MAX(d10_10)) 0.9999999999
CONCAT('', MAX(d1_0)) 9
CONCAT('', MAX(d53)) 100000000000000000000000000000000000000000000000000000
CONCAT('', MAX(d53_10)) 10000000000000000000000000000000000000000000.0000000000
CONCAT('', MAX(f)) 1e38
CONCAT('', MAX(f0)) 1e38
CONCAT('', MAX(f20_3)) 99999998430674940.000
CONCAT('', MAX(f23_0)) 1e38
@@ -172,7 +172,6 @@ Warning 1264 Out of range value for column 'd10_10' at row 1
Warning 1264 Out of range value for column 'd53' at row 1
Warning 1264 Out of range value for column 'd53_10' at row 1
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
f 12345.1
d -1e60
d 0
d 11111111.111
@@ -200,6 +199,7 @@ d53_10 10000000000000000000000000000000000000000000.0000000000
d53_10 10000000000000000000000000000000000000000000.0000000000
f -1e24
f 0
f 12345.1
f 1e38
f 3.40282e38
f0 -100000000000
@@ -247,7 +247,6 @@ Warning 1264 Out of range value for column 'd10_10' at row 1
Warning 1264 Out of range value for column 'd53' at row 1
Warning 1264 Out of range value for column 'd53_10' at row 1
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
f 12345.1
d -1e60
d 0
d 11111111.111
@@ -280,6 +279,7 @@ d53_10 10000000000000000000000000000000000000000000.0000000000
d53_10 10000000000000000000000000000000000000000000.0000000000
f -1e24
f 0
f 12345.1
f 1e38
f 3.40282e38
f 3.40282e38