AnonSec Shell
Server IP : 185.86.78.101  /  Your IP : 216.73.216.124
Web Server : Apache
System : Linux 675867-vds-valikoshka1996.gmhost.pp.ua 5.4.0-150-generic #167-Ubuntu SMP Mon May 15 17:35:05 UTC 2023 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 : OFF
Directory :  /www/server/mysql/mysql-test/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /www/server/mysql/mysql-test/t/tablespace.test
--source include/have_debug.inc
#
# BUG#60111 storage type for table not saved in .frm
#

#
# Check that the table options for TABLESPACE and STORAGE
# are printed in SHOW CREATE TABLE
#

# TABLESPACE only
CREATE TABLE t1(a int) TABLESPACE ts ENGINE=MyISAM;
SHOW CREATE TABLE t1;
DROP TABLE t1;

# TABLESPACE + STORAGE DISK
CREATE TABLE t1(a int) TABLESPACE ts STORAGE DISK ENGINE=MyISAM;
SHOW CREATE TABLE t1;
DROP TABLE t1;

# TABLESPACE + STORAGE MEMORY
CREATE TABLE t1(a int) TABLESPACE ts STORAGE MEMORY ENGINE=MyISAM;
SHOW CREATE TABLE t1;
DROP TABLE t1;

# STORAGE MEMORY only
CREATE TABLE t1(a int) STORAGE MEMORY ENGINE=MyISAM;
SHOW CREATE TABLE t1;
DROP TABLE t1;

# STORAGE DISK only
CREATE TABLE t1(a int) STORAGE DISK ENGINE=MyISAM;
SHOW CREATE TABLE t1;
DROP TABLE t1;

#
# Check that the table options for TABLESPACE and STORAGE
# are kept in an ALTER
#

# TABLESPACE only
CREATE TABLE t1(a int) TABLESPACE ts ENGINE=MyISAM;
ALTER TABLE t1 ADD COLUMN b int;
SHOW CREATE TABLE t1;
DROP TABLE t1;

# TABLESPACE and STORAGE DISK
CREATE TABLE t1(a int) TABLESPACE ts STORAGE DISK ENGINE=MyISAM;
ALTER TABLE t1 ADD COLUMN b int;
SHOW CREATE TABLE t1;
DROP TABLE t1;

#
# Check that the table options for TABLESPACE and STORAGE
# can be changed with an ALTER
#

# TABLESPACE only
CREATE TABLE t1(a int) ENGINE=MyISAM;

ALTER TABLE t1 TABLESPACE ts;
SHOW CREATE TABLE t1;

ALTER TABLE t1 TABLESPACE ts2;
SHOW CREATE TABLE t1;

DROP TABLE t1;

# STORAGE only
CREATE TABLE t1(a int) ENGINE=MyISAM;

ALTER TABLE t1 STORAGE MEMORY;
SHOW CREATE TABLE t1;

ALTER TABLE t1 STORAGE DISK;
SHOW CREATE TABLE t1;

DROP TABLE t1;

# TABLESPACE and STORAGE
CREATE TABLE t1(a int) ENGINE=MyISAM;

ALTER TABLE t1 STORAGE MEMORY TABLESPACE ts;
SHOW CREATE TABLE t1;

ALTER TABLE t1 STORAGE DISK TABLESPACE ts2;
SHOW CREATE TABLE t1;

DROP TABLE t1;

#
# Check that it's possible to read a .frm fle created
# by MySQL Cluster 7.0(which introduced the new "format
# section) with this statement:
#
# CREATE TABLE cluster_7022_table
# (
#   a int primary key,
#   b int,
#   c int STORAGE DISK,
#   d int STORAGE MEMORY NOT NULL,
#   e int COLUMN_FORMAT DYNAMIC,
#   f int COLUMN_FORMAT FIXED,
#   g int COLUMN_FORMAT DEFAULT,
#   h int STORAGE DISK COLUMN_FORMAT DYNAMIC NOT NULL,
#   i int STORAGE MEMORY COLUMN_FORMAT DYNAMIC,
#   j int STORAGE DISK COLUMN_FORMAT FIXED,
#   k int STORAGE MEMORY COLUMN_FORMAT FIXED
# ) STORAGE DISK TABLESPACE the_tablespacename ENGINE=MyISAM;
#

let $MYSQLD_DATADIR= `SELECT @@datadir`;
copy_file std_data/cluster_7022_table.frm $MYSQLD_DATADIR/test/t1.frm;
copy_file std_data/cluster_7022_table.MYD $MYSQLD_DATADIR/test/t1.MYD;
copy_file std_data/cluster_7022_table.MYI $MYSQLD_DATADIR/test/t1.MYI;

SHOW CREATE TABLE t1;

DROP TABLE t1;

--echo #
--echo # WL#3627 Add COLUMN_FORMAT and STORAGE for fields
--echo #

--let $DEFAULT_ENGINE = `select @@global.default_storage_engine`

CREATE TABLE t1 (
 a int STORAGE DISK,
 b int STORAGE MEMORY NOT NULL,
 c int COLUMN_FORMAT DYNAMIC,
 d int COLUMN_FORMAT FIXED,
 e int COLUMN_FORMAT DEFAULT,
 f int STORAGE DISK COLUMN_FORMAT DYNAMIC NOT NULL,
 g int STORAGE MEMORY COLUMN_FORMAT DYNAMIC,
 h int STORAGE DISK COLUMN_FORMAT FIXED,
 i int STORAGE MEMORY COLUMN_FORMAT FIXED
);
--replace_result $DEFAULT_ENGINE ENGINE
SHOW CREATE TABLE t1;

# Add new columns with all variations of the new column
# level attributes
ALTER TABLE t1
  ADD COLUMN j int STORAGE DISK,
  ADD COLUMN k int STORAGE MEMORY NOT NULL,
  ADD COLUMN l int COLUMN_FORMAT DYNAMIC,
  ADD COLUMN m int COLUMN_FORMAT FIXED,
  ADD COLUMN n int COLUMN_FORMAT DEFAULT,
  ADD COLUMN o int STORAGE DISK COLUMN_FORMAT DYNAMIC NOT NULL,
  ADD COLUMN p int STORAGE MEMORY COLUMN_FORMAT DYNAMIC,
  ADD COLUMN q int STORAGE DISK COLUMN_FORMAT FIXED,
  ADD COLUMN r int STORAGE MEMORY COLUMN_FORMAT FIXED;
--replace_result $DEFAULT_ENGINE ENGINE
SHOW CREATE TABLE t1;

# Use MODIFY COLUMN to "shift" all new attributes to the next column
ALTER TABLE t1
  MODIFY COLUMN j int STORAGE MEMORY NOT NULL,
  MODIFY COLUMN k int COLUMN_FORMAT DYNAMIC,
  MODIFY COLUMN l int COLUMN_FORMAT FIXED,
  MODIFY COLUMN m int COLUMN_FORMAT DEFAULT,
  MODIFY COLUMN n int STORAGE DISK COLUMN_FORMAT DYNAMIC NOT NULL,
  MODIFY COLUMN o int STORAGE MEMORY COLUMN_FORMAT DYNAMIC,
  MODIFY COLUMN p int STORAGE DISK COLUMN_FORMAT FIXED,
  MODIFY COLUMN q int STORAGE MEMORY COLUMN_FORMAT FIXED,
  MODIFY COLUMN r int STORAGE DISK;
--replace_result $DEFAULT_ENGINE ENGINE
SHOW CREATE TABLE t1;

# Check behaviour of multiple COLUMN_FORMAT and/or STORAGE definitions
ALTER TABLE t1
  MODIFY COLUMN h int COLUMN_FORMAT DYNAMIC COLUMN_FORMAT FIXED,
  MODIFY COLUMN i int COLUMN_FORMAT DYNAMIC COLUMN_FORMAT DEFAULT,
  MODIFY COLUMN j int COLUMN_FORMAT FIXED COLUMN_FORMAT DYNAMIC,
  MODIFY COLUMN k int COLUMN_FORMAT FIXED COLUMN_FORMAT DEFAULT,
  MODIFY COLUMN l int STORAGE DISK STORAGE MEMORY,
  MODIFY COLUMN m int STORAGE DISK STORAGE DEFAULT,
  MODIFY COLUMN n int STORAGE MEMORY STORAGE DISK,
  MODIFY COLUMN o int STORAGE MEMORY STORAGE DEFAULT,
  MODIFY COLUMN p int STORAGE DISK STORAGE MEMORY
                      COLUMN_FORMAT FIXED COLUMN_FORMAT DYNAMIC,
  MODIFY COLUMN q int STORAGE DISK STORAGE MEMORY STORAGE DEFAULT
                      COLUMN_FORMAT FIXED COLUMN_FORMAT DYNAMIC COLUMN_FORMAT DEFAULT,
  MODIFY COLUMN r int STORAGE DEFAULT STORAGE DEFAULT STORAGE MEMORY
                      STORAGE DISK STORAGE MEMORY STORAGE DISK STORAGE DISK;
--replace_result $DEFAULT_ENGINE ENGINE
SHOW CREATE TABLE t1;



DROP TABLE t1;


--echo #
--echo # Bug#21347001   SEGMENTATION FAULT WHILE CREATING GENERAL
--echo #                  TABLESPACE IN DISK FULL LINUX
--echo #
SET SESSION debug="+d,out_of_tablespace_disk";
--error ER_CREATE_FILEGROUP_FAILED
CREATE TABLESPACE `ts6` ADD DATAFILE 'ts6.ibd' ENGINE=INNODB;
SHOW WARNINGS;
SET SESSION debug="-d,out_of_tablespace_disk";

Anon7 - 2022
AnonSec Team