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/table_options.test
SET @OLD_SQL_MODE=@@SQL_MODE;
SET SQL_MODE='IGNORE_BAD_TABLE_OPTIONS';

create table t1 (a int fkey=vvv, key akey (a) dff=vvv) tkey1='1v1';
show create table t1;
drop table t1;

--echo #reassiginig options in the same line
create table t1 (a int fkey=vvv, key akey (a) dff=vvv) tkey1=1v1 TKEY1=DEFAULT tkey1=1v2 tkey2=2v1;
show create table t1;

-- echo #add option
alter table t1 tkey4=4v1;
show create table t1;

--echo #remove options 
alter table t1 tkey3=DEFAULT tkey4=DEFAULT;
show create table t1;

drop table t1;

create table t1 (a int fkey1=v1, key akey (a) kkey1=v1) tkey1=1v1 tkey1=1v2 TKEY1=DEFAULT tkey2=2v1 tkey3=3v1;
show create table t1;

--echo #change field with option with the same value
alter table t1 change a a int `FKEY1`='v1';
show create table t1;
--echo #change field with option with a different value
alter table t1 change a a int fkey1=v2;
show create table t1;
--echo #new column no options
alter table t1 add column b int;
show create table t1;
--echo #new key with options
alter table t1 add key bkey (b) kkey2=v1;
show create table t1;
--echo #new column with options
alter table t1 add column c int fkey1=v1 fkey2=v2;
show create table t1;
--echo #new key no options
alter table t1 add key ckey (c);
show create table t1;
--echo #drop column
alter table t1 drop b;
show create table t1;
--echo #add column with options after delete
alter table t1 add column b int fkey2=v1;
show create table t1;
--echo #add key 
alter table t1 add key bkey (b) kkey2=v2;
show create table t1;
drop table t1;

#numeric (unquoted) value
create table t1 (a int) tkey1=100;
show create table t1;
drop table t1;

--echo #error on unknown option
SET SQL_MODE='';
--error ER_UNKNOWN_OPTION
create table t1 (a int fkey=vvv, key akey (a) dff=vvv) tkey1=1v1;

SET @@SQL_MODE=@OLD_SQL_MODE;

--echo #
--echo # End of 5.5 tests
--echo #

--echo #
--echo # MDEV-31822 ALTER TABLE ENGINE=x started failing instead of producing warning on unsupported TRANSACTIONAL=1
--echo #
create table t0 (a int) transactional=0 engine=aria;
create table t1 (a int) transactional=1 engine=aria;
create table t2 (a int) transactional=default engine=aria;
show create table t0;
show create table t1;
show create table t2;
alter table t0 engine=myisam;
alter table t1 engine=myisam;
alter table t2 engine=myisam;
show create table t0;
show create table t1;
show create table t2;
--error ER_UNKNOWN_OPTION
alter table t0 engine=myisam transactional=0;
--error ER_UNKNOWN_OPTION
alter table t1 engine=myisam transactional=1;
--error ER_UNKNOWN_OPTION
alter table t2 engine=myisam transactional=default;
set sql_mode=IGNORE_BAD_TABLE_OPTIONS;
alter table t0 engine=myisam transactional=0;
alter table t1 engine=myisam transactional=1;
alter table t2 engine=myisam transactional=default;
show create table t0;
show create table t1;
show create table t2;
drop table t0,t1,t2;

# same behavior for other unknown options:
create table t1 (a int) foo=bar;
show create table t1;
set sql_mode=default;
show create table t1;
--error ER_UNKNOWN_OPTION
alter table t1 engine=aria bar=foo;
alter table t1 engine=aria;
show create table t1;
drop table t1;

--echo #
--echo # End of 10.5 tests
--echo #

Youez - 2016 - github.com/yon3zu
LinuXploit