AnonSec Shell
Server IP : 185.86.78.101  /  Your IP : 216.73.216.213
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/include/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /www/server/mysql/mysql-test/include/parser_bug21114.inc
#
# Bug#21114 (Foreign key creation fails to table with name format)
#
# Trying to trick the parser into thinking $FCT(...) is a function call,
# which is not in the CREATE TABLE and FOREIGN KEY ... REFERENCES syntax
#
# Usage :
#
# let $engine_type=InnoDb;
# let $verbose=1;
# let $FCT= <value_1>;
# -- source parser_stress_func.inc
# let $FCT= <value_2>;
# -- source parser_stress_func.inc
# let $verbose=0;
# let $FCT= <value_3>;
# -- source parser_stress_func.inc
# let $FCT= <value_4>;
# -- source parser_stress_func.inc

-- disable_warnings
eval drop table if exists $FCT;
drop table if exists bug21114_child;
-- enable_warnings

--disable_query_log
--disable_result_log

eval CREATE TABLE $FCT(
  col1 int not null,
  col2 int not null,
  col3 varchar(10),
  CONSTRAINT pk PRIMARY KEY (col1, col2)
) ENGINE $engine_type;

eval CREATE TABLE bug21114_child(
  pk int not null,
  fk_col1 int not null,
  fk_col2 int not null,
  fk_col3 int not null,
  fk_col4 int not null,
  CONSTRAINT fk_fct FOREIGN KEY (fk_col1, fk_col2)
    REFERENCES $FCT(col1, col2),
  CONSTRAINT fk_fct_space FOREIGN KEY (fk_col3, fk_col4)
    REFERENCES $FCT (col1, col2)
) ENGINE $engine_type;

--enable_query_log
--enable_result_log

if ($verbose)
{
  eval SHOW CREATE TABLE $FCT;
  SHOW CREATE TABLE bug21114_child;
}

DROP TABLE bug21114_child;
eval DROP TABLE $FCT;


Anon7 - 2022
AnonSec Team