Get rid of @num_rows and @i; you can loop without counting. There are lots of examples floating around.
You must construct the query something like
SET @stmt := CONCAT('SELECT "', col_name, '", ' MIN(', col_name, '), ',
' MAX(', col_name, ')',
' FROM ', tbl_name');
The intent is to ...
If B.field1 has a collation ending with _ci, then the UPPER is not needed; get rid of it.
Then you need INDEX(field1); do you have it?
And what about the ...? So far, I see no use for including C in the query.
As you can see on https://www.w3schools.com/sql/func_mysql_cast.asp
SIGNED Converts value to SIGNED (a signed 64-bit integer)
UNSIGNED Converts value to UNSIGNED (an unsigned 64-bit integer)
And from the official MySQL documentation: https://dev.mysql.com/doc/refman/5.7/en/cast-functions.html
MySQL supports arithmetic with both signed and ...
I think I have seen cases where
buffer_pool is set really low (much less than 128M)
The transaction was complex, not simply "big".
Errors indicated that the buffer_pool was out of space (or something like that). You are checking for errors, yes?
"Big" is not a problem -- InnoDB is designed to handle arbitrarily many rows being held for ROLLBACK, etc. But ...
Mysql (community) Version 8.0.17-1.sles12 - OpenSUSE tumbleweed 2019.10.02
mysql> SET GLOBAL expire_logs_days = 4;
ERROR 3683 (HY000): The option expire_logs_days and binlog_expire_logs_seconds
cannot be used together. Please use binlog_expire_logs_seconds to set the expire
time (expire_logs_days is deprecated)
Before you run this
LOAD DATA local infile '/home/pi/Downloads/load_data_infile.txt'
INTO TABLE test_tbl FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n';
You need to start mysql client program with --local-file
mysql --local-file -uroot -p
If you wish to have this configured permanantly, add this to ~/.my.cnf
I just encountered a question 5 days ago : InnoDB errors and crashes with MyISAM database?
When troubleshooting the issue in a live chat session, I discovered that dirty pages from Temporary InnoDB Tables were occupying the InnoDB Buffer Pool. The file ibtmp was 482MB with 75% of the buffer pool being dirty since innodb_max_dirty_pages_pct was 75. The ...