403Webshell
Server IP : 172.67.216.182  /  Your IP : 162.158.108.7
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/gcol/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/src/mysql-test/suite/gcol/t/gcol_keys_innodb.test
################################################################################
# t/gcol_keys_innodb.test                                                      #
#                                                                              #
# Purpose:                                                                     #
#  Testing keys, indexes defined upon generated columns.                         # 
#                                                                              #
#        InnoDB branch                                                         #
#                                                                              #
#------------------------------------------------------------------------------#
# Original Author: Andrey Zhakov                                               #
# Original Date: 2008-09-04                                                    #
# Change Author:                                                               #
# Change Date:                                                                 #
# Change:                                                                      #
################################################################################

#
# NOTE: PLEASE DO NOT ADD NOT MYISAM SPECIFIC TESTCASES HERE !
#       TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
#       THE SOURCED FILES ONLY.
#

#------------------------------------------------------------------------------#
# General not engine specific settings and requirements
--source suite/gcol/inc/gcol_init_vars.pre

#------------------------------------------------------------------------------#
# Engine specific settings and requirements

##### Storage engine to be tested
# Set the session storage engine
--source include/have_innodb.inc
eval SET @@session.default_storage_engine = 'InnoDB';

##### Workarounds for known open engine specific bugs
#     none

#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
let $skip_spatial_index_check = 1;
let $support_virtual_index= 1;
--source suite/gcol/inc/gcol_keys.inc

#------------------------------------------------------------------------------#
# Execute storage engine specific tests
--echo #
--echo # BUG#21365158 WL8149:ASSERTION `!TABLE || (!TABLE->WRITE_SET 
--echo #
CREATE TABLE t1 (
  pk INTEGER AUTO_INCREMENT,
  col_int_nokey INTEGER NOT NULL,

  col_varchar_nokey VARCHAR(1) NOT NULL,
  col_varchar_key VARCHAR(2) GENERATED ALWAYS AS
    (CONCAT(col_varchar_nokey, col_varchar_nokey)) VIRTUAL not null,

  PRIMARY KEY (pk)
  
);

INSERT INTO t1 ( col_int_nokey, col_varchar_nokey)
VALUES (4, 'b'),(9, 'o'),(4, 'k'),(5, 'a'),(5, 'f'),
(9, 't'),(3, 'c'),(8, 'c'),(0, 'r'),(98, 'k');

CREATE TABLE t2 (
  pk INTEGER AUTO_INCREMENT,
  col_int_nokey INTEGER NOT NULL,

  col_varchar_nokey VARCHAR(1) NOT NULL,
  col_varchar_key VARCHAR(2) GENERATED ALWAYS AS
    (CONCAT(col_varchar_nokey, col_varchar_nokey)) VIRTUAL not null,

  PRIMARY KEY (pk),
  UNIQUE KEY (col_varchar_key)
  
);

INSERT INTO t2 ( col_int_nokey, col_varchar_nokey)
VALUES (1, 'c'),(8, 'm'),(9, 'd'), (6, 'y'),(1, 't'),
(2, 's'),(4, 'r');

SELECT
  CONCAT( t2.col_varchar_nokey , t2.col_varchar_nokey ) AS f2,
  t1.col_varchar_key AS f5
FROM
  t2 LEFT JOIN t1 ON t2.col_int_nokey > t1.col_int_nokey
ORDER BY f2, f5;
DROP TABLE t1,t2;

--echo #

#------------------------------------------------------------------------------#
# Cleanup
--source suite/gcol/inc/gcol_cleanup.inc

Youez - 2016 - github.com/yon3zu
LinuXploit