Server IP : 104.21.38.3 / Your IP : 172.71.124.170 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/inc/ |
Upload File : |
################################################################################ # t/partition_blocked_sql_funcs.inc # # # # Purpose: # # Tests around sql functions # # # # # #------------------------------------------------------------------------------# # Original Author: HH # # Original Date: 2006-11-22 # # Change Author: # # Change Date: # # Change: # ################################################################################ --echo ------------------------------------------------------------------------- --echo --- $sqlfunc in partition with coltype $coltype --echo ------------------------------------------------------------------------- --echo must all fail! --disable_warnings drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; drop table if exists t4 ; drop table if exists t5 ; drop table if exists t6 ; --enable_warnings --error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR eval create table t1 (col1 $coltype) engine=$engine partition by range($sqlfunc) (partition p0 values less than (15), partition p1 values less than (31)); --error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR eval create table t2 (col1 $coltype) engine=$engine partition by list($sqlfunc) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); --error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR eval create table t3 (col1 $coltype) engine=$engine partition by hash($sqlfunc); --error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR eval create table t4 (colint int, col1 $coltype) engine=$engine partition by range(colint) subpartition by hash($sqlfunc) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); --error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR eval create table t5 (colint int, col1 $coltype) engine=$engine partition by list(colint) subpartition by hash($sqlfunc) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); --error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR eval create table t6 (colint int, col1 $coltype) engine=$engine partition by range(colint) (partition p0 values less than ($valsqlfunc), partition p1 values less than maxvalue); --disable_abort_on_error --disable_warnings drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; drop table if exists t44 ; drop table if exists t55 ; drop table if exists t66 ; --enable_warnings eval create table t11 (col1 $coltype) engine=$engine ; eval create table t22 (col1 $coltype) engine=$engine ; eval create table t33 (col1 $coltype) engine=$engine ; eval create table t44 (colint int, col1 $coltype) engine=$engine ; eval create table t55 (colint int, col1 $coltype) engine=$engine ; eval create table t66 (colint int, col1 $coltype) engine=$engine ; --error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR eval alter table t11 partition by range($sqlfunc) (partition p0 values less than (15), partition p1 values less than (31)); --error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR eval alter table t22 partition by list($sqlfunc) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); --error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR eval alter table t33 partition by hash($sqlfunc); --enable_abort_on_error --error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR eval alter table t44 partition by range(colint) subpartition by hash($sqlfunc) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); --error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR eval alter table t55 partition by list(colint) subpartition by hash($sqlfunc) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); --error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR eval alter table t66 partition by range(colint) (partition p0 values less than ($valsqlfunc), partition p1 values less than maxvalue); --disable_warnings drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; drop table if exists t4 ; drop table if exists t5 ; drop table if exists t6 ; drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; drop table if exists t44 ; drop table if exists t55 ; drop table if exists t66 ; --enable_warnings