Server IP : 104.21.38.3 / Your IP : 172.70.147.167 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 : |
create table t1 ( th int primary key, un int, de int, rb varchar(1000), al longtext, key(de), unique(rb)) engine=ndb; insert into t1 values (1, 1, 1, repeat('O', 1000), repeat('L', 60000)); insert into t1 values (2, 2, 2, repeat('W', 999), repeat('B', 60001)); insert into t1 values (3, 3, 3, repeat('P', 998), repeat('P', 60002)); insert into t1 values (4, 4, 4, repeat('Q', 997), repeat('E', 60003)); insert into t1 values (5, 5, 5, repeat('E', 996), repeat('A', 60004)); select th, un, de, length(rb), length(al) from t1 where th in (2,4) order by th; th un de length(rb) length(al) 2 2 2 999 60001 4 4 4 997 60003 select th, un, de, length(rb), length(al) from t1 where rb in (repeat('O', 1000), repeat('Q', 997)) order by th; th un de length(rb) length(al) 1 1 1 1000 60000 4 4 4 997 60003 select th, un, de, length(rb), length(al) from t1 where de between 3 and 5 order by th; th un de length(rb) length(al) 3 3 3 998 60002 4 4 4 997 60003 5 5 5 996 60004 select th, un, de, length(rb), length(al) from t1 order by th; th un de length(rb) length(al) 1 1 1 1000 60000 2 2 2 999 60001 3 3 3 998 60002 4 4 4 997 60003 5 5 5 996 60004 update t1 set un=6, de=6, rb= repeat('S', 995), al = repeat('O', 60005) where th = 1; update t1 set un=7, de=7, al = repeat('F', 60006) where rb = repeat('W', 999); update t1 set un= un + 5, rb = repeat('U', 1000 - un), al = repeat('U', 60000 + un) where de >= 3 and de <= 5; select th, un, de, length(rb), length(al) from t1 order by th; th un de length(rb) length(al) 1 6 6 995 60005 2 7 7 999 60006 3 8 3 992 60008 4 9 4 991 60009 5 10 5 990 60010 alter table t1 add column extra varchar(2000); Warnings: Warning 1478 Converted FIXED field 'extra' to DYNAMIC to enable on-line ADD COLUMN update t1 set extra = repeat(rb, 2); select th, un, de, length(rb), length(al), length(extra) from t1 order by th; th un de length(rb) length(al) length(extra) 1 6 6 995 60005 1990 2 7 7 999 60006 1998 3 8 3 992 60008 1984 4 9 4 991 60009 1982 5 10 5 990 60010 1980 select th, un, de, length(rb), length(al), length(extra) from t1 where extra in ( repeat('U', 2000), repeat('U', 1998), repeat('U', 1996), repeat('U', 1994), repeat('U', 1992), repeat('U', 1990), repeat('U', 1988), repeat('U', 1986), repeat('U', 1984), repeat('U', 1982), repeat('U', 1980), repeat('U', 1978), repeat('U', 1976), repeat('U', 1974), repeat('U', 1972), repeat('U', 1970), repeat('U', 1968), repeat('U', 1966), repeat('U', 1964)) order by th; th un de length(rb) length(al) length(extra) 3 8 3 992 60008 1984 4 9 4 991 60009 1982 5 10 5 990 60010 1980 drop table t1;