Server IP : 104.21.38.3 / Your IP : 172.70.188.81 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /www/server/mysql/src/mysql-test/suite/innodb/t/ |
Upload File : |
# Exercise the code path for INFORMATION_SCHEMA.INNODB_BUFFER_POOL_STATS # and INFORMATION_SCHEMA.INNODB_BUFFER_PAGE -- source include/have_innodb.inc -- disable_result_log SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_POOL_STATS; # How many buffer pools we have SELECT count(*) FROM INFORMATION_SCHEMA.INNODB_BUFFER_POOL_STATS; SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE; # This gives the over all buffer pool size SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE; -- enable_result_log # Create a table and check its page info behave correctly in the pool CREATE TABLE infoschema_buffer_test (col1 INT) ENGINE = INNODB; INSERT INTO infoschema_buffer_test VALUES(9); # We should be able to see this table in the buffer pool if we check # right away SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE WHERE TABLE_NAME like "%infoschema_buffer_test%" and PAGE_STATE="file_page" and PAGE_TYPE="index"; # The NUMBER_RECORDS and DATA_SIZE should check with each insertion INSERT INTO infoschema_buffer_test VALUES(19); SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE WHERE TABLE_NAME like "%infoschema_buffer_test%" and PAGE_STATE="file_page" and PAGE_TYPE="index"; CREATE INDEX idx ON infoschema_buffer_test(col1); SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE WHERE TABLE_NAME like "%infoschema_buffer_test%" and PAGE_STATE="file_page" and INDEX_NAME = "idx" and PAGE_TYPE="index"; # Check the buffer after dropping the table DROP TABLE infoschema_buffer_test; SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE WHERE TABLE_NAME like "%infoschema_buffer_test%"; # Do one more test #--replace_regex /'*[0-9]*'/'NUM'/ CREATE TABLE infoschema_parent (id INT NOT NULL, PRIMARY KEY (id)) ENGINE=INNODB; CREATE TABLE infoschema_child (id INT, parent_id INT, INDEX par_ind (parent_id), FOREIGN KEY (parent_id) REFERENCES infoschema_parent(id) ON DELETE CASCADE) ENGINE=INNODB; SELECT count(*) FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE WHERE TABLE_NAME like "%infoschema_child%" and PAGE_STATE="file_page" and PAGE_TYPE="index"; DROP TABLE infoschema_child; DROP TABLE infoschema_parent;