403Webshell
Server IP : 172.67.216.182  /  Your IP : 104.23.175.30
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/ndb/r/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/src/mysql-test/suite/ndb/r/ndb_update.result
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
DROP TABLE IF EXISTS t3;
CREATE TABLE t1 (
pk1 INT NOT NULL PRIMARY KEY,
b INT NOT NULL,
c INT NOT NULL UNIQUE
) ENGINE=ndbcluster;
INSERT INTO t1 VALUES (0, 1, 0),(1,2,1),(2,3,2);
UPDATE t1 set b = c;
select * from t1 order by pk1;
pk1	b	c
0	0	0
1	1	1
2	2	2
UPDATE t1 set pk1 = 4 where pk1 = 1;
select * from t1 order by pk1;
pk1	b	c
0	0	0
2	2	2
4	1	1
UPDATE t1 set pk1 = 4 where pk1 = 2;
ERROR 23000: Duplicate entry '4' for key 'PRIMARY'
UPDATE IGNORE t1 set pk1 = 4 where pk1 = 2;
Warnings:
Warning	1062	Duplicate entry '4' for key 'PRIMARY'
select * from t1 order by pk1;
pk1	b	c
0	0	0
2	2	2
4	1	1
UPDATE t1 set pk1 = 2 where pk1 = 2;
affected rows: 0
info: Rows matched: 1  Changed: 0  Warnings: 0
UPDATE t1 set c = 1 WHERE b IN(0,1,2,3,4);
ERROR 23000: Duplicate entry '1' for key 'c'
UPDATE IGNORE t1 set c = 1 WHERE b IN(0,1,2,3,4);
Warnings:
Warning	1062	Duplicate entry '1' for key 'c'
Warning	1062	Duplicate entry '1' for key 'c'
UPDATE t1 set pk1 = 1, c = 2 where pk1 = 4;
ERROR 23000: Duplicate entry '2' for key 'c'
UPDATE IGNORE t1 set pk1 = 1, c = 2 where pk1 = 4;
Warnings:
Warning	1062	Duplicate entry '2' for key 'c'
select * from t1 order by pk1;
pk1	b	c
0	0	0
2	2	2
4	1	1
UPDATE t1 set pk1 = pk1 + 10;
select * from t1 order by pk1;
pk1	b	c
10	0	0
12	2	2
14	1	1
create unique index ib on t1(b);
update t1 set c = 4 where pk1 = 12;
update ignore t1 set b = 55 where pk1 = 14;
select * from t1 order by pk1;
pk1	b	c
10	0	0
12	2	4
14	55	1
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a int, b int, KEY (a, b)) ENGINE=ndbcluster;
CREATE TABLE t2 (a int, b int, UNIQUE KEY (a, b)) ENGINE=ndbcluster;
CREATE TABLE t3 (a int, b int, PRIMARY KEY (a, b)) ENGINE=ndbcluster;
INSERT INTO t1 VALUES (1, 2);
INSERT INTO t1 VALUES (2, 2);
INSERT INTO t2 VALUES (1, 2);
INSERT INTO t2 VALUES (2, 2);
INSERT INTO t3 VALUES (1, 2);
INSERT INTO t3 VALUES (2, 2);
UPDATE t1 SET a = 1;
UPDATE t1 SET a = 1 ORDER BY a;
UPDATE t2 SET a = 1;
ERROR 23000: Duplicate entry '1-2' for key 'a'
UPDATE t2 SET a = 1 ORDER BY a;
ERROR 23000: Duplicate entry '1-2' for key 'a'
UPDATE t3 SET a = 1;
ERROR 23000: Duplicate entry '1-2' for key 'PRIMARY'
UPDATE t3 SET a = 1 ORDER BY a;
ERROR 23000: Duplicate entry '1-2' for key 'PRIMARY'
SELECT count(*) FROM t1;
count(*)
2
SELECT count(*) FROM t2;
count(*)
2
SELECT count(*) FROM t3;
count(*)
2
SELECT * FROM t1 ORDER by a;
a	b
1	2
1	2
SELECT * FROM t2 ORDER by a;
a	b
1	2
2	2
SELECT * FROM t3 ORDER by a;
a	b
1	2
2	2
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
DROP TABLE IF EXISTS t3;
CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT,
mytext CHAR(30) DEFAULT NULL,
PRIMARY KEY (`id`) ) ENGINE=ndbcluster;
insert into t1 values(NULL,"hello"),(NULL,"world"),(NULL,"hello"),(NULL,"world");
select * from t1 order by id;
id	mytext
1	hello
2	world
3	hello
4	world
update t1 set mytext = "goodbye" where mytext = "world" order by mytext;
select * from t1 order by id;
id	mytext
1	hello
2	goodbye
3	hello
4	goodbye
DROP TABLE IF EXISTS t1;
End of 5.1 tests

Youez - 2016 - github.com/yon3zu
LinuXploit