Server IP : 172.67.216.182 / Your IP : 172.68.164.61 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/parts/r/ |
Upload File : |
use test; SET @part= 'p0'; SET @part_tab= 'tp'; SET @table= 't_10'; SET @s= CONCAT('ALTER TABLE ',@part_tab,' EXCHANGE PARTITION ',@part,' WITH TABLE ',@table); PREPARE test_stmt1 FROM @s; EXECUTE test_stmt1; SELECT * FROM t_10; a b 2 Two 4 Four 6 Six 8 Eight SELECT * FROM tp; a b 1 One 112 Hundred twelve 114 Hundred fourteen 116 Hundred sixteen 118 Hundred eightteen 12 twelve 122 Hundred twenty-two 124 Hundred twenty-four 126 Hundred twenty-six 128 Hundred twenty-eight 14 Fourteen 16 Sixteen 162 Hundred sixty-two 164 Hundred sixty-four 166 Hundred sixty-six 168 Hundred sixty-eight 18 Eightteen 182 Hundred eighty-two 184 Hundred eighty-four 186 Hundred eighty-six 188 Hundred eighty-eight 3 Three 5 Five 9 Nine Warning 1287 The partition engine, used by table 'test.tp', is deprecated and will be removed in a future release. Please use native partitioning instead. Warnings: DEALLOCATE PREPARE test_stmt1; SET @part_tab= 'tp'; SET @s= CONCAT('ALTER TABLE ',@part_tab,' EXCHANGE PARTITION ? WITH TABLE ?'); PREPARE test_stmt2 FROM @s; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? WITH TABLE ?' at line 1 DROP TABLE IF EXISTS t_10; DROP TABLE IF EXISTS t_100; DROP TABLE IF EXISTS t_1000; DROP TABLE IF EXISTS tp; DROP TABLE IF EXISTS tsp; DROP TABLE IF EXISTS tsp_00; DROP TABLE IF EXISTS tsp_01; DROP TABLE IF EXISTS tsp_02; DROP TABLE IF EXISTS tsp_03; DROP TABLE IF EXISTS tsp_04; DROP TABLE IF EXISTS t_empty; DROP TABLE IF EXISTS t_null;