mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 21:42:35 +01:00
Merge mysql.com:/windows/Linux_space/MySQL/mysql-5.1
into mysql.com:/windows/Linux_space/MySQL/mysql-5.1-new-ndb sql/ha_ndbcluster.cc: Auto merged sql/item_func.cc: Auto merged
This commit is contained in:
commit
21c2e6e11a
510 changed files with 2007079 additions and 0 deletions
14
.bzrignore
14
.bzrignore
|
@ -1255,6 +1255,7 @@ mysql-test/mysql-test-run-shell
|
|||
mysql-test/mysql-test-run.log
|
||||
mysql-test/mysql_test_run_new
|
||||
mysql-test/ndb/ndbcluster
|
||||
mysql-test/partitions.log
|
||||
mysql-test/r/*.err
|
||||
mysql-test/r/*.log
|
||||
mysql-test/r/*.out
|
||||
|
@ -1334,8 +1335,21 @@ mysql-test/r/symlink.log
|
|||
mysql-test/r/system_mysql_db.log
|
||||
mysql-test/r/tmp.result
|
||||
mysql-test/r/udf.log
|
||||
mysql-test/rpl.log
|
||||
mysql-test/share/mysql
|
||||
mysql-test/std_data/*.pem
|
||||
mysql-test/suite/funcs_1/r/innodb_trig_03e.warnings
|
||||
mysql-test/suite/funcs_1/r/innodb_views.warnings
|
||||
mysql-test/suite/funcs_1/r/memory_trig_03e.warnings
|
||||
mysql-test/suite/funcs_1/r/memory_views.warnings
|
||||
mysql-test/suite/funcs_1/r/myisam_trig_03e.warnings
|
||||
mysql-test/suite/funcs_1/r/myisam_views.warnings
|
||||
mysql-test/suite/funcs_1/r/ndb_trig_03e.warnings
|
||||
mysql-test/suite/funcs_1/r/ndb_views.warnings
|
||||
mysql-test/suite/partitions/r/diff
|
||||
mysql-test/suite/partitions/r/partition_bit_ndb.warnings
|
||||
mysql-test/suite/partitions/r/partition_special_innodb.warnings
|
||||
mysql-test/suite/partitions/r/partition_special_myisam.warnings
|
||||
mysql-test/t/index_merge.load
|
||||
mysql-test/t/tmp.test
|
||||
mysql-test/var
|
||||
|
|
112
mysql-test/suite/funcs_1/README.txt
Normal file
112
mysql-test/suite/funcs_1/README.txt
Normal file
|
@ -0,0 +1,112 @@
|
|||
Matthias 17.06.2005
|
||||
-------------------
|
||||
1. I changed the database test1 (dropped + created in SP test)
|
||||
to test4.
|
||||
Please adjust the SP test cases.
|
||||
2. There is a difference between my definition of
|
||||
innodb_tb4 + memory_tb4
|
||||
to the latest table definition used by disha.
|
||||
Please adjust the table definition if needed.
|
||||
3. The data load files are product of the Disha data generation script
|
||||
(downloaded ~20 May ?) + modified by Omer
|
||||
These load data fit fairly to the table definitions.
|
||||
|
||||
4. How to execute the "small" test with 10 rows per table.
|
||||
Do NOT set the environment variable NO_REFRESH to a
|
||||
value <> ''.
|
||||
Start the test for example by
|
||||
./mysql-test-run.pl --vardir=/dev/shm/var \
|
||||
--force --suite=funcs_1 --do-test=myisam
|
||||
The "result" files fit mostly to this variant.
|
||||
|
||||
Any database not in ('mysql','test') and any tables
|
||||
needed within a testcase ( t/<storage engine>_<test filed>.test )
|
||||
will be (re)created at the beginning of the test.
|
||||
|
||||
5. How to execute the "big" test with many rows per table.
|
||||
Replace the directories
|
||||
suite/funcs_1/data and
|
||||
suite/funcs_1/r
|
||||
with the appropriate ones for the "big" test.
|
||||
Set the environment variable NO_REFRESH to a value <> ''.
|
||||
Start the test for example by
|
||||
./mysql-test-run.pl --vardir=/dev/shm/var \
|
||||
--force --suite=funcs_1 --do-test=myisam
|
||||
|
||||
All databases and tables will be (re)created by the script
|
||||
<storage engine>__load.test .
|
||||
|
||||
6. I am not sure of the files
|
||||
./funcs_1/include/create_<whatever>.inc
|
||||
are in the moment needed. I included them, because I
|
||||
guess my VIEW testcase example needs them.
|
||||
|
||||
I guess the pushed files are far away from being perfect.
|
||||
It is a 8 hours hack.
|
||||
Please try them, create missing files and come up with improvements.
|
||||
|
||||
Good luck !
|
||||
|
||||
Matthias 17.06.2005
|
||||
===================================================================
|
||||
Omer 19.06.2005
|
||||
---------------
|
||||
1. Changed the structure of the memory_tb3 table to include two
|
||||
additional column f121, f122. These columns exist for the table in
|
||||
the other storage engines as TEXT. Since memory does not support
|
||||
TEXT, Disha did not include them. How ever I am using them in the
|
||||
Trigger tests so added them to the memory definition as CHAR(50);.
|
||||
Also modifyed the DataGen_modiy.pl file to account for these two
|
||||
column when generating the data.
|
||||
- checked in a new DataGen_modify.pl (create a 'lib' directory
|
||||
under 'funcs_1').
|
||||
- checked in a new memory_tb3.txt
|
||||
2. Added three <storage>_triggers.test files based on Matthias's
|
||||
structure above.
|
||||
3. Added three <storage>__triggers.result files
|
||||
4. Added the Trigger_master.test file in the trigger dierctory
|
||||
Note: This is not complete and is still under work
|
||||
5. Created a 'lib' directory and added the DataGen*.pl scripts to it
|
||||
(exists under the disha suite) but should be here as well).
|
||||
Omer 19.06.2005
|
||||
===================================================================
|
||||
Matthias 12.09.2005
|
||||
-------------------
|
||||
Replace the geometry data types by VARBINARY
|
||||
The removal of the geometry data types was necessary, because the
|
||||
execution of the funcs_1 testsuite should not depend on the
|
||||
availability of the geometry feature.
|
||||
Note: There are servers compiled without the geometry feature.
|
||||
|
||||
The columns are not removed, but their data type was changed
|
||||
VARBINARY. This allows us to omit any changes within the loader
|
||||
input files or data generation scripts.
|
||||
The replacement of geometry by VARCHAR allows us to use our
|
||||
|
||||
Matthias 12.09.2005
|
||||
===================================================================
|
||||
Matthias 14.09.2005
|
||||
-------------------
|
||||
The results of the <storage_engine>_views testcases suffer when
|
||||
executed in "--ps-protocol" mode from the open
|
||||
Bug#11589: mysqltest, --ps-protocol, strange output,
|
||||
float/double/real with zerofill .
|
||||
Implementation of a workaround:
|
||||
At the beginning of views_master.inc is a variable $have_bug_11589 .
|
||||
If this varable is set to 1, the ps-protocol will be switched
|
||||
of for the critical statements.
|
||||
Matthias 14.09.2005
|
||||
===================================================================
|
||||
Carsten 16.09.2005
|
||||
------------------
|
||||
1. The results of the datadict_<engine> testcases have been changed in nearly
|
||||
all occurrencies of --error <n> because now for the INFORMATION_SCHEMA only
|
||||
the --error 1044 (ERROR 42000: Access denied for user '..' to database
|
||||
'information_schema') seems to be used.
|
||||
2. To get identical results when using "--ps-protocol" some SELECTs FROM
|
||||
information_schema has been wrapped to suppress using ps-protocol because
|
||||
there are differences.
|
||||
3. The test using SELECT .. OUTFILE has been disabled due to bug #13202.
|
||||
4. Fixed datadict_<engine>.result files after the change that added 2 columns to
|
||||
the VIEWS table (DEFINER varchar(77), SECURITY_TYPE varchar(7)).
|
||||
===================================================================
|
6
mysql-test/suite/funcs_1/bitdata/bitdata_master.test
Normal file
6
mysql-test/suite/funcs_1/bitdata/bitdata_master.test
Normal file
|
@ -0,0 +1,6 @@
|
|||
#### suite/funcs_1/bitdata/bitdata_master.test
|
||||
|
||||
let $message= NOT YET IMPLEMENTED: bitdata tests;
|
||||
--source include/show_msg80.inc
|
||||
|
||||
exit;
|
3
mysql-test/suite/funcs_1/cursors/cursors_master.test
Normal file
3
mysql-test/suite/funcs_1/cursors/cursors_master.test
Normal file
|
@ -0,0 +1,3 @@
|
|||
#### suite/funcs_1/cursors/cursors_master.test
|
||||
let $message= NOT YET IMPLEMENTED: cursor tests;
|
||||
--source include/show_msg80.inc
|
10
mysql-test/suite/funcs_1/data/innodb_tb1.txt
Normal file
10
mysql-test/suite/funcs_1/data/innodb_tb1.txt
Normal file
|
@ -0,0 +1,10 @@
|
|||
a`0 a`0 0` 0` a`0 a`0 0` 0` ! 6 163 103 238 3058 30243 22056 9444 -5 1 1 1 -5 1 1 1 -5 1 1 1 -5 1 1 1 -5 -5 1 1 1 1 1 1 -5 0.0 1 0.0 1 0.0 1 0.0 -5 1 1 1 -5 -5
|
||||
aa0 aa0 1aa 1aa aa0 aa0 1aa 1aa @ 9 207 1 246 13214 57220 1505 58996 -4 2 2 2 -4 2 2 2 -4 2 2 2 -4 2 2 2 -4 -4 2 2 2 2 2 2 -4 1.1 2 1.1 2 1.1 2 1.1 -4 2 2 2 -4 -4
|
||||
ab0 ab0 2baa 2baa ab0 ab0 2baa 2baa # 3 50 103 193 10965 3038 31585 20149 -3 3 3 3 -3 3 3 3 -3 3 3 3 -3 3 3 3 -3 -3 3 3 3 3 3 3 -3 2.2 3 2.2 3 2.2 3 2.2 -3 3 3 3 -3 -3
|
||||
ac0 ac0 3caaa 3caaa ac0 ac0 3caaa 3caaa $ 62 188 47 176 5103 58378 13178 38317 -2 4 4 4 -2 4 4 4 -2 4 4 4 -2 4 4 4 -2 -2 4 4 4 4 4 4 -2 3.3 4 3.3 4 3.3 4 3.3 -2 4 4 4 -2 -2
|
||||
ad0 ad0 4daaaa 4daaaa ad0 ad0 4daaaa 4daaaa % 59 15 21 80 17942 48443 12646 53903 -1 5 5 5 -1 5 5 5 -1 5 5 5 -1 5 5 5 -1 -1 5 5 5 5 5 5 -1 4.4 5 4.4 5 4.4 5 4.4 -1 5 5 5 -1 -1
|
||||
ae0 ae0 5eaaaaa 5eaaaaa ae0 ae0 5eaaaaa 5eaaaaa ^ 86 223 103 88 3880 31147 5801 28348 0 6 6 6 0 6 6 6 0 6 6 6 0 6 6 6 0 0 6 6 6 6 6 6 0 5.5 6 5.5 6 5.5 6 5.5 0 6 6 6 0 0
|
||||
af0 af0 6faaaaaa 6faaaaaa af0 af0 6faaaaaa 6faaaaaa & 124 125 77 208 2591 29533 18803 21557 1 7 7 7 1 7 7 7 1 7 7 7 1 7 7 7 1 1 7 7 7 7 7 7 1 6.6 7 6.6 7 6.6 7 6.6 1 7 7 7 1 1
|
||||
ag0 ag0 7gaaaaaaa 7gaaaaaaa ag0 ag0 7gaaaaaaa 7gaaaaaaa * 123 103 80 92 10179 60769 25778 58195 2 8 8 8 2 8 8 8 2 8 8 8 2 8 8 8 2 2 8 8 8 8 8 8 2 7.7 8 7.7 8 7.7 8 7.7 2 8 8 8 2 2
|
||||
a^0 a^0 8^aaaaaaaa 8^aaaaaaaa a^0 a^0 8^aaaaaaaa 8^aaaaaaaa ( 111 166 81 66 5159 2177 6774 38396 3 9 9 9 3 9 9 9 3 9 9 9 3 9 9 9 3 3 9 9 9 9 9 9 3 8.8 9 8.8 9 8.8 9 8.8 3 9 9 9 3 3
|
||||
a_0 a_0 9_aaaaaaaaa 9_aaaaaaaaa a_0 a_0 9_aaaaaaaaa 9_aaaaaaaaa ) 37 174 97 34 9183 16470 13064 6297 4 10 10 10 4 10 10 10 4 10 10 10 4 10 10 10 4 4 10 10 10 10 10 10 4 9.9 10 9.9 10 9.9 10 9.9 4 10 10 10 4 4
|
10
mysql-test/suite/funcs_1/data/innodb_tb2.txt
Normal file
10
mysql-test/suite/funcs_1/data/innodb_tb2.txt
Normal file
|
@ -0,0 +1,10 @@
|
|||
1 1 1 1 1 1 -5 0.0 1 0.0 1 0.0 1 0.0 -1.17549435e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 -1.17549435e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 -1.17549435e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 -1.17549435e-38 -1.17549435e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 -1.17549435e-38 -1.17549435e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 19700102000001 1902 1902 1902 2 2
|
||||
2 2 2 2 2 2 -4 1.1 2 1.1 2 1.1 2 1.1 -1.175494349e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 -1.175494349e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 -1.175494349e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 -1.175494349e-38 -1.175494349e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 -1.175494349e-38 -1.175494349e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 19700103000002 1903 1903 1903 1 3
|
||||
3 3 3 3 3 3 -3 2.2 3 2.2 3 2.2 3 2.2 -1.175494348e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 -1.175494348e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 -1.175494348e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 -1.175494348e-38 -1.175494348e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 -1.175494348e-38 -1.175494348e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1000-01-03 838:59:56 1970-01-04 00:00:03 19700104000003 1904 1904 1904 2 1
|
||||
4 4 4 4 4 4 -2 3.3 4 3.3 4 3.3 4 3.3 -1.175494347e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 -1.175494347e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 -1.175494347e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 -1.175494347e-38 -1.175494347e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 -1.175494347e-38 -1.175494347e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 19700105000004 1905 1905 1905 1 2
|
||||
5 5 5 5 5 5 -1 4.4 5 4.4 5 4.4 5 4.4 -1.175494346e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 -1.175494346e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 -1.175494346e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 -1.175494346e-38 -1.175494346e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 -1.175494346e-38 -1.175494346e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1000-01-05 838:59:54 1970-01-06 00:00:05 19700106000005 1906 1906 1906 2 3
|
||||
6 6 6 6 6 6 0 5.5 6 5.5 6 5.5 6 5.5 -1.175494345e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 -1.175494345e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 -1.175494345e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 -1.175494345e-38 -1.175494345e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 -1.175494345e-38 -1.175494345e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1000-01-06 838:59:53 1970-01-07 00:00:06 19700107000006 1907 1907 1907 1 1
|
||||
7 7 7 7 7 7 1 6.6 7 6.6 7 6.6 7 6.6 -1.175494344e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 -1.175494344e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 -1.175494344e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 -1.175494344e-38 -1.175494344e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 -1.175494344e-38 -1.175494344e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1000-01-07 838:59:52 1970-01-08 00:00:07 19700108000007 1908 1908 1908 2 2
|
||||
8 8 8 8 8 8 2 7.7 8 7.7 8 7.7 8 7.7 -1.175494343e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 -1.175494343e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 -1.175494343e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 -1.175494343e-38 -1.175494343e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 -1.175494343e-38 -1.175494343e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1000-01-08 838:59:51 1970-01-09 00:00:08 19700109000008 1909 1909 1909 1 3
|
||||
9 9 9 9 9 9 3 8.8 9 8.8 9 8.8 9 8.8 -1.175494342e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 -1.175494342e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 -1.175494342e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 -1.175494342e-38 -1.175494342e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 -1.175494342e-38 -1.175494342e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1000-01-09 838:59:50 1970-01-10 00:00:09 19700110000009 1910 1910 1910 2 1
|
||||
10 10 10 10 10 10 4 9.9 10 9.9 10 9.9 10 9.9 -1.175494341e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 -1.175494341e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 -1.175494341e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 -1.175494341e-38 -1.175494341e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 -1.175494341e-38 -1.175494341e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1000-01-10 838:59:49 1970-01-11 00:00:10 19700111000010 1911 1911 1911 1 2
|
10
mysql-test/suite/funcs_1/data/innodb_tb3.txt
Normal file
10
mysql-test/suite/funcs_1/data/innodb_tb3.txt
Normal file
|
@ -0,0 +1,10 @@
|
|||
! ! ! a`0 a`0 0` 0` a`0 a`0 0` 0` ! 37 102 115 214 22348 22112 23636 18043 -5 1 1 1 -5 1 1 1 -5 1 1 1 -5 1 1 1 -5 -5 1 1 1 1 1 1 -5 0.0 1 0.0 1 0.0 1 0.0 -5 1 1 1 -5 -5
|
||||
@ @ @ aa0 aa0 1aa 1aa aa0 aa0 1aa 1aa @ 30 114 62 146 22059 6000 19024 8674 -4 2 2 2 -4 2 2 2 -4 2 2 2 -4 2 2 2 -4 -4 2 2 2 2 2 2 -4 1.1 2 1.1 2 1.1 2 1.1 -4 2 2 2 -4 -4
|
||||
# # # ab0 ab0 2baa 2baa ab0 ab0 2baa 2baa # 113 254 52 51 27963 63797 516 63989 -3 3 3 3 -3 3 3 3 -3 3 3 3 -3 3 3 3 -3 -3 3 3 3 3 3 3 -3 2.2 3 2.2 3 2.2 3 2.2 -3 3 3 3 -3 -3
|
||||
$ $ $ ac0 ac0 3caaa 3caaa ac0 ac0 3caaa 3caaa $ 70 78 40 203 28716 18828 14939 30960 -2 4 4 4 -2 4 4 4 -2 4 4 4 -2 4 4 4 -2 -2 4 4 4 4 4 4 -2 3.3 4 3.3 4 3.3 4 3.3 -2 4 4 4 -2 -2
|
||||
% % % ad0 ad0 4daaaa 4daaaa ad0 ad0 4daaaa 4daaaa % 1 228 76 249 16746 12853 8405 35402 -1 5 5 5 -1 5 5 5 -1 5 5 5 -1 5 5 5 -1 -1 5 5 5 5 5 5 -1 4.4 5 4.4 5 4.4 5 4.4 -1 5 5 5 -1 -1
|
||||
^ ^ ^ ae0 ae0 5eaaaaa 5eaaaaa ae0 ae0 5eaaaaa 5eaaaaa ^ 116 52 51 248 26877 15243 20063 65464 0 6 6 6 0 6 6 6 0 6 6 6 0 6 6 6 0 0 6 6 6 6 6 6 0 5.5 6 5.5 6 5.5 6 5.5 0 6 6 6 0 0
|
||||
& & & af0 af0 6faaaaaa 6faaaaaa af0 af0 6faaaaaa 6faaaaaa & 59 163 63 26 24559 55618 27326 12704 1 7 7 7 1 7 7 7 1 7 7 7 1 7 7 7 1 1 7 7 7 7 7 7 1 6.6 7 6.6 7 6.6 7 6.6 1 7 7 7 1 1
|
||||
* * * ag0 ag0 7gaaaaaaa 7gaaaaaaa ag0 ag0 7gaaaaaaa 7gaaaaaaa * 69 229 119 159 11779 48557 14747 42703 2 8 8 8 2 8 8 8 2 8 8 8 2 8 8 8 2 2 8 8 8 8 8 8 2 7.7 8 7.7 8 7.7 8 7.7 2 8 8 8 2 2
|
||||
( ( ( a^0 a^0 8^aaaaaaaa 8^aaaaaaaa a^0 a^0 8^aaaaaaaa 8^aaaaaaaa ( 54 89 113 155 1068 61537 14823 43439 3 9 9 9 3 9 9 9 3 9 9 9 3 9 9 9 3 3 9 9 9 9 9 9 3 8.8 9 8.8 9 8.8 9 8.8 3 9 9 9 3 3
|
||||
) ) ) a_0 a_0 9_aaaaaaaaa 9_aaaaaaaaa a_0 a_0 9_aaaaaaaaa 9_aaaaaaaaa ) 68 34 44 175 32453 44381 506 37695 4 10 10 10 4 10 10 10 4 10 10 10 4 10 10 10 4 4 10 10 10 10 10 10 4 9.9 10 9.9 10 9.9 10 9.9 4 10 10 10 4 4
|
10
mysql-test/suite/funcs_1/data/innodb_tb4.txt
Normal file
10
mysql-test/suite/funcs_1/data/innodb_tb4.txt
Normal file
|
@ -0,0 +1,10 @@
|
|||
1 1 1 1 1 1 -5 0.0 1 0.0 1 0.0 1 0.0 -1.17549435e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 -1.17549435e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 -1.17549435e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 -1.17549435e-38 -1.17549435e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 -1.17549435e-38 -1.17549435e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 19700102000001 1902 1902 1902 2 2 0! 0 0 0 0!
|
||||
2 2 2 2 2 2 -4 1.1 2 1.1 2 1.1 2 1.1 -1.175494349e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 -1.175494349e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 -1.175494349e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 -1.175494349e-38 -1.175494349e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 -1.175494349e-38 -1.175494349e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 19700103000002 1903 1903 1903 1 3 1@# 1@ 1@ 1@ 1@#
|
||||
3 3 3 3 3 3 -3 2.2 3 2.2 3 2.2 3 2.2 -1.175494348e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 -1.175494348e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 -1.175494348e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 -1.175494348e-38 -1.175494348e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 -1.175494348e-38 -1.175494348e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1000-01-03 838:59:56 1970-01-04 00:00:03 19700104000003 1904 1904 1904 2 1 2#$% 2#$ 2#$ 2#$ 2#$%
|
||||
4 4 4 4 4 4 -2 3.3 4 3.3 4 3.3 4 3.3 -1.175494347e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 -1.175494347e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 -1.175494347e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 -1.175494347e-38 -1.175494347e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 -1.175494347e-38 -1.175494347e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 19700105000004 1905 1905 1905 1 2 3$%^& 3$%^ 3$%^ 3$%^ 3$%^&
|
||||
5 5 5 5 5 5 -1 4.4 5 4.4 5 4.4 5 4.4 -1.175494346e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 -1.175494346e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 -1.175494346e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 -1.175494346e-38 -1.175494346e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 -1.175494346e-38 -1.175494346e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1000-01-05 838:59:54 1970-01-06 00:00:05 19700106000005 1906 1906 1906 2 3 4%^&*( 4%^&* 4%^&* 4%^&* 4%^&*(
|
||||
6 6 6 6 6 6 0 5.5 6 5.5 6 5.5 6 5.5 -1.175494345e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 -1.175494345e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 -1.175494345e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 -1.175494345e-38 -1.175494345e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 -1.175494345e-38 -1.175494345e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1000-01-06 838:59:53 1970-01-07 00:00:06 19700107000006 1907 1907 1907 1 1 5^&*()_ 5^&*() 5^&*() 5^&*() 5^&*()_
|
||||
7 7 7 7 7 7 1 6.6 7 6.6 7 6.6 7 6.6 -1.175494344e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 -1.175494344e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 -1.175494344e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 -1.175494344e-38 -1.175494344e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 -1.175494344e-38 -1.175494344e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1000-01-07 838:59:52 1970-01-08 00:00:07 19700108000007 1908 1908 1908 2 2 6&*()_+= 6&*()_+ 6&*()_+ 6&*()_+ 6&*()_+=
|
||||
8 8 8 8 8 8 2 7.7 8 7.7 8 7.7 8 7.7 -1.175494343e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 -1.175494343e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 -1.175494343e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 -1.175494343e-38 -1.175494343e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 -1.175494343e-38 -1.175494343e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1000-01-08 838:59:51 1970-01-09 00:00:08 19700109000008 1909 1909 1909 1 3 7*()_+=-| 7*()_+=- 7*()_+=- 7*()_+=- 7*()_+=-|
|
||||
9 9 9 9 9 9 3 8.8 9 8.8 9 8.8 9 8.8 -1.175494342e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 -1.175494342e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 -1.175494342e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 -1.175494342e-38 -1.175494342e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 -1.175494342e-38 -1.175494342e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1000-01-09 838:59:50 1970-01-10 00:00:09 19700110000009 1910 1910 1910 2 1 8()_+=-|{} 8()_+=-|{ 8()_+=-|{ 8()_+=-|{ 8()_+=-|{}
|
||||
10 10 10 10 10 10 4 9.9 10 9.9 10 9.9 10 9.9 -1.175494341e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 -1.175494341e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 -1.175494341e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 -1.175494341e-38 -1.175494341e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 -1.175494341e-38 -1.175494341e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1000-01-10 838:59:49 1970-01-11 00:00:10 19700111000010 1911 1911 1911 1 2 9)_+=-|{}[] 9)_+=-|{}[ 9)_+=-|{}[ 9)_+=-|{}[ 9)_+=-|{}[]
|
10
mysql-test/suite/funcs_1/data/memory_tb1.txt
Normal file
10
mysql-test/suite/funcs_1/data/memory_tb1.txt
Normal file
|
@ -0,0 +1,10 @@
|
|||
! ! ! ! 125 69 107 223 9324 34526 518 41335 -5 1 1 1 -5 1 1 1 -5 1 1 1 -5 1 1 1 -5 -5 1 1 1 1 1 1 -5 0.0 1 0.0 1 0.0 1 0.0 -5 1 1 1 -5 -5
|
||||
@ @ @ @ 33 206 121 215 9380 15833 14975 52816 -4 2 2 2 -4 2 2 2 -4 2 2 2 -4 2 2 2 -4 -4 2 2 2 2 2 2 -4 1.1 2 1.1 2 1.1 2 1.1 -4 2 2 2 -4 -4
|
||||
# # # # 117 5 25 30 21071 22894 7157 52356 -3 3 3 3 -3 3 3 3 -3 3 3 3 -3 3 3 3 -3 -3 3 3 3 3 3 3 -3 2.2 3 2.2 3 2.2 3 2.2 -3 3 3 3 -3 -3
|
||||
$ $ $ $ 2 19 61 214 1220 9289 14636 719 -2 4 4 4 -2 4 4 4 -2 4 4 4 -2 4 4 4 -2 -2 4 4 4 4 4 4 -2 3.3 4 3.3 4 3.3 4 3.3 -2 4 4 4 -2 -2
|
||||
% % % % 102 185 122 228 21359 20663 7136 60130 -1 5 5 5 -1 5 5 5 -1 5 5 5 -1 5 5 5 -1 -1 5 5 5 5 5 5 -1 4.4 5 4.4 5 4.4 5 4.4 -1 5 5 5 -1 -1
|
||||
^ ^ ^ ^ 24 48 102 248 30907 13155 26008 11892 0 6 6 6 0 6 6 6 0 6 6 6 0 6 6 6 0 0 6 6 6 6 6 6 0 5.5 6 5.5 6 5.5 6 5.5 0 6 6 6 0 0
|
||||
& & & & 68 95 123 253 26999 2063 7957 49062 1 7 7 7 1 7 7 7 1 7 7 7 1 7 7 7 1 1 7 7 7 7 7 7 1 6.6 7 6.6 7 6.6 7 6.6 1 7 7 7 1 1
|
||||
* * * * 114 116 86 237 16008 64728 29018 63686 2 8 8 8 2 8 8 8 2 8 8 8 2 8 8 8 2 2 8 8 8 8 8 8 2 7.7 8 7.7 8 7.7 8 7.7 2 8 8 8 2 2
|
||||
( ( ( ( 102 120 12 166 7011 231 28948 43386 3 9 9 9 3 9 9 9 3 9 9 9 3 9 9 9 3 3 9 9 9 9 9 9 3 8.8 9 8.8 9 8.8 9 8.8 3 9 9 9 3 3
|
||||
) ) ) ) 14 162 113 166 15432 23427 9909 55743 4 10 10 10 4 10 10 10 4 10 10 10 4 10 10 10 4 4 10 10 10 10 10 10 4 9.9 10 9.9 10 9.9 10 9.9 4 10 10 10 4 4
|
10
mysql-test/suite/funcs_1/data/memory_tb2.txt
Normal file
10
mysql-test/suite/funcs_1/data/memory_tb2.txt
Normal file
|
@ -0,0 +1,10 @@
|
|||
1 1 1 1 1 1 -5 0.0 1 0.0 1 0.0 1 0.0 -1.17549435e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 -1.17549435e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 -1.17549435e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 -1.17549435e-38 -1.17549435e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 -1.17549435e-38 -1.17549435e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 19700102000001 1902 1902 1902 2 2
|
||||
2 2 2 2 2 2 -4 1.1 2 1.1 2 1.1 2 1.1 -1.175494349e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 -1.175494349e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 -1.175494349e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 -1.175494349e-38 -1.175494349e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 -1.175494349e-38 -1.175494349e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 19700103000002 1903 1903 1903 1 3
|
||||
3 3 3 3 3 3 -3 2.2 3 2.2 3 2.2 3 2.2 -1.175494348e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 -1.175494348e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 -1.175494348e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 -1.175494348e-38 -1.175494348e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 -1.175494348e-38 -1.175494348e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1000-01-03 838:59:56 1970-01-04 00:00:03 19700104000003 1904 1904 1904 2 1
|
||||
4 4 4 4 4 4 -2 3.3 4 3.3 4 3.3 4 3.3 -1.175494347e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 -1.175494347e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 -1.175494347e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 -1.175494347e-38 -1.175494347e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 -1.175494347e-38 -1.175494347e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 19700105000004 1905 1905 1905 1 2
|
||||
5 5 5 5 5 5 -1 4.4 5 4.4 5 4.4 5 4.4 -1.175494346e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 -1.175494346e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 -1.175494346e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 -1.175494346e-38 -1.175494346e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 -1.175494346e-38 -1.175494346e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1000-01-05 838:59:54 1970-01-06 00:00:05 19700106000005 1906 1906 1906 2 3
|
||||
6 6 6 6 6 6 0 5.5 6 5.5 6 5.5 6 5.5 -1.175494345e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 -1.175494345e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 -1.175494345e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 -1.175494345e-38 -1.175494345e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 -1.175494345e-38 -1.175494345e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1000-01-06 838:59:53 1970-01-07 00:00:06 19700107000006 1907 1907 1907 1 1
|
||||
7 7 7 7 7 7 1 6.6 7 6.6 7 6.6 7 6.6 -1.175494344e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 -1.175494344e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 -1.175494344e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 -1.175494344e-38 -1.175494344e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 -1.175494344e-38 -1.175494344e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1000-01-07 838:59:52 1970-01-08 00:00:07 19700108000007 1908 1908 1908 2 2
|
||||
8 8 8 8 8 8 2 7.7 8 7.7 8 7.7 8 7.7 -1.175494343e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 -1.175494343e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 -1.175494343e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 -1.175494343e-38 -1.175494343e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 -1.175494343e-38 -1.175494343e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1000-01-08 838:59:51 1970-01-09 00:00:08 19700109000008 1909 1909 1909 1 3
|
||||
9 9 9 9 9 9 3 8.8 9 8.8 9 8.8 9 8.8 -1.175494342e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 -1.175494342e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 -1.175494342e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 -1.175494342e-38 -1.175494342e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 -1.175494342e-38 -1.175494342e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1000-01-09 838:59:50 1970-01-10 00:00:09 19700110000009 1910 1910 1910 2 1
|
||||
10 10 10 10 10 10 4 9.9 10 9.9 10 9.9 10 9.9 -1.175494341e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 -1.175494341e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 -1.175494341e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 -1.175494341e-38 -1.175494341e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 -1.175494341e-38 -1.175494341e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1000-01-10 838:59:49 1970-01-11 00:00:10 19700111000010 1911 1911 1911 1 2
|
10
mysql-test/suite/funcs_1/data/memory_tb3.txt
Normal file
10
mysql-test/suite/funcs_1/data/memory_tb3.txt
Normal file
|
@ -0,0 +1,10 @@
|
|||
! ! ! ! ! ! 87 241 57 173 18446 49170 16642 30337 -5 1 1 1 -5 1 1 1 -5 1 1 1 -5 1 1 1 -5 -5 1 1 1 1 1 1 -5 0.0 1 0.0 1 0.0 1 0.0 -5 1 1 1 -5 -5
|
||||
@ @ @ @ @ @ 46 98 15 87 28328 27957 22906 13894 -4 2 2 2 -4 2 2 2 -4 2 2 2 -4 2 2 2 -4 -4 2 2 2 2 2 2 -4 1.1 2 1.1 2 1.1 2 1.1 -4 2 2 2 -4 -4
|
||||
# # # # # # 47 178 99 1 14395 33016 14488 19286 -3 3 3 3 -3 3 3 3 -3 3 3 3 -3 3 3 3 -3 -3 3 3 3 3 3 3 -3 2.2 3 2.2 3 2.2 3 2.2 -3 3 3 3 -3 -3
|
||||
$ $ $ $ $ $ 112 214 125 95 17700 64850 18337 21044 -2 4 4 4 -2 4 4 4 -2 4 4 4 -2 4 4 4 -2 -2 4 4 4 4 4 4 -2 3.3 4 3.3 4 3.3 4 3.3 -2 4 4 4 -2 -2
|
||||
% % % % % % 11 122 24 177 25939 55312 20230 23055 -1 5 5 5 -1 5 5 5 -1 5 5 5 -1 5 5 5 -1 -1 5 5 5 5 5 5 -1 4.4 5 4.4 5 4.4 5 4.4 -1 5 5 5 -1 -1
|
||||
^ ^ ^ ^ ^ ^ 89 228 33 168 29230 35722 26178 18372 0 6 6 6 0 6 6 6 0 6 6 6 0 6 6 6 0 0 6 6 6 6 6 6 0 5.5 6 5.5 6 5.5 6 5.5 0 6 6 6 0 0
|
||||
& & & & & & 71 225 98 132 15603 29021 29242 62542 1 7 7 7 1 7 7 7 1 7 7 7 1 7 7 7 1 1 7 7 7 7 7 7 1 6.6 7 6.6 7 6.6 7 6.6 1 7 7 7 1 1
|
||||
* * * * * * 54 204 86 76 12146 41911 27986 4744 2 8 8 8 2 8 8 8 2 8 8 8 2 8 8 8 2 2 8 8 8 8 8 8 2 7.7 8 7.7 8 7.7 8 7.7 2 8 8 8 2 2
|
||||
( ( ( ( ( ( 7 93 3 194 18817 25083 8657 49740 3 9 9 9 3 9 9 9 3 9 9 9 3 9 9 9 3 3 9 9 9 9 9 9 3 8.8 9 8.8 9 8.8 9 8.8 3 9 9 9 3 3
|
||||
) ) ) ) ) ) 15 241 27 18 9788 64993 245 39300 4 10 10 10 4 10 10 10 4 10 10 10 4 10 10 10 4 4 10 10 10 10 10 10 4 9.9 10 9.9 10 9.9 10 9.9 4 10 10 10 4 4
|
10
mysql-test/suite/funcs_1/data/memory_tb4.txt
Normal file
10
mysql-test/suite/funcs_1/data/memory_tb4.txt
Normal file
|
@ -0,0 +1,10 @@
|
|||
1 1 1 1 1 1 -5 0.0 1 0.0 1 0.0 1 0.0 -1.17549435e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 -1.17549435e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 -1.17549435e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 -1.17549435e-38 -1.17549435e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 -1.17549435e-38 -1.17549435e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 19700102000001 1902 1902 1902 2 2 0! 0 0! 0 0
|
||||
2 2 2 2 2 2 -4 1.1 2 1.1 2 1.1 2 1.1 -1.175494349e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 -1.175494349e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 -1.175494349e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 -1.175494349e-38 -1.175494349e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 -1.175494349e-38 -1.175494349e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 19700103000002 1903 1903 1903 1 3 1@# 1@ 1@# 1@ 1@
|
||||
3 3 3 3 3 3 -3 2.2 3 2.2 3 2.2 3 2.2 -1.175494348e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 -1.175494348e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 -1.175494348e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 -1.175494348e-38 -1.175494348e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 -1.175494348e-38 -1.175494348e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1000-01-03 838:59:56 1970-01-04 00:00:03 19700104000003 1904 1904 1904 2 1 2#$% 2#$ 2#$% 2#$ 2#$
|
||||
4 4 4 4 4 4 -2 3.3 4 3.3 4 3.3 4 3.3 -1.175494347e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 -1.175494347e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 -1.175494347e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 -1.175494347e-38 -1.175494347e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 -1.175494347e-38 -1.175494347e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 19700105000004 1905 1905 1905 1 2 3$%^& 3$%^ 3$%^& 3$%^ 3$%^
|
||||
5 5 5 5 5 5 -1 4.4 5 4.4 5 4.4 5 4.4 -1.175494346e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 -1.175494346e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 -1.175494346e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 -1.175494346e-38 -1.175494346e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 -1.175494346e-38 -1.175494346e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1000-01-05 838:59:54 1970-01-06 00:00:05 19700106000005 1906 1906 1906 2 3 4%^&*( 4%^&* 4%^&*( 4%^&* 4%^&*
|
||||
6 6 6 6 6 6 0 5.5 6 5.5 6 5.5 6 5.5 -1.175494345e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 -1.175494345e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 -1.175494345e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 -1.175494345e-38 -1.175494345e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 -1.175494345e-38 -1.175494345e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1000-01-06 838:59:53 1970-01-07 00:00:06 19700107000006 1907 1907 1907 1 1 5^&*()_ 5^&*() 5^&*()_ 5^&*() 5^&*()
|
||||
7 7 7 7 7 7 1 6.6 7 6.6 7 6.6 7 6.6 -1.175494344e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 -1.175494344e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 -1.175494344e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 -1.175494344e-38 -1.175494344e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 -1.175494344e-38 -1.175494344e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1000-01-07 838:59:52 1970-01-08 00:00:07 19700108000007 1908 1908 1908 2 2 6&*()_+= 6&*()_+ 6&*()_+= 6&*()_+ 6&*()_+
|
||||
8 8 8 8 8 8 2 7.7 8 7.7 8 7.7 8 7.7 -1.175494343e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 -1.175494343e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 -1.175494343e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 -1.175494343e-38 -1.175494343e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 -1.175494343e-38 -1.175494343e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1000-01-08 838:59:51 1970-01-09 00:00:08 19700109000008 1909 1909 1909 1 3 7*()_+=-| 7*()_+=- 7*()_+=-| 7*()_+=- 7*()_+=-
|
||||
9 9 9 9 9 9 3 8.8 9 8.8 9 8.8 9 8.8 -1.175494342e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 -1.175494342e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 -1.175494342e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 -1.175494342e-38 -1.175494342e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 -1.175494342e-38 -1.175494342e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1000-01-09 838:59:50 1970-01-10 00:00:09 19700110000009 1910 1910 1910 2 1 8()_+=-|{} 8()_+=-|{ 8()_+=-|{} 8()_+=-|{ 8()_+=-|{
|
||||
10 10 10 10 10 10 4 9.9 10 9.9 10 9.9 10 9.9 -1.175494341e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 -1.175494341e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 -1.175494341e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 -1.175494341e-38 -1.175494341e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 -1.175494341e-38 -1.175494341e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1000-01-10 838:59:49 1970-01-11 00:00:10 19700111000010 1911 1911 1911 1 2 9)_+=-|{}[] 9)_+=-|{}[ 9)_+=-|{}[] 9)_+=-|{}[ 9)_+=-|{}[
|
10
mysql-test/suite/funcs_1/data/myisam_tb1.txt
Normal file
10
mysql-test/suite/funcs_1/data/myisam_tb1.txt
Normal file
|
@ -0,0 +1,10 @@
|
|||
! ! ! a`0 a`0 0` 0` a`0 a`0 0` 0` ! 20 96 13 158 11496 12640 26882 22184 -5 1 1 1 -5 1 1 1 -5 1 1 1 -5 1 1 1 -5 -5 1 1 1 1 1 1 -5 0.0 1 0.0 1 0.0 1 0.0 -5 1 1 1 -5 -5
|
||||
@ @ @ aa0 aa0 1aa 1aa aa0 aa0 1aa 1aa @ 68 67 107 152 1647 41491 10631 40729 -4 2 2 2 -4 2 2 2 -4 2 2 2 -4 2 2 2 -4 -4 2 2 2 2 2 2 -4 1.1 2 1.1 2 1.1 2 1.1 -4 2 2 2 -4 -4
|
||||
# # # ab0 ab0 2baa 2baa ab0 ab0 2baa 2baa # 0 54 39 182 28122 30607 623 40601 -3 3 3 3 -3 3 3 3 -3 3 3 3 -3 3 3 3 -3 -3 3 3 3 3 3 3 -3 2.2 3 2.2 3 2.2 3 2.2 -3 3 3 3 -3 -3
|
||||
$ $ $ ac0 ac0 3caaa 3caaa ac0 ac0 3caaa 3caaa $ 40 53 33 204 8927 17582 6931 6231 -2 4 4 4 -2 4 4 4 -2 4 4 4 -2 4 4 4 -2 -2 4 4 4 4 4 4 -2 3.3 4 3.3 4 3.3 4 3.3 -2 4 4 4 -2 -2
|
||||
% % % ad0 ad0 4daaaa 4daaaa ad0 ad0 4daaaa 4daaaa % 27 126 101 76 8412 64647 24531 7195 -1 5 5 5 -1 5 5 5 -1 5 5 5 -1 5 5 5 -1 -1 5 5 5 5 5 5 -1 4.4 5 4.4 5 4.4 5 4.4 -1 5 5 5 -1 -1
|
||||
^ ^ ^ ae0 ae0 5eaaaaa 5eaaaaa ae0 ae0 5eaaaaa 5eaaaaa ^ 48 168 35 166 25531 41269 21741 46926 0 6 6 6 0 6 6 6 0 6 6 6 0 6 6 6 0 0 6 6 6 6 6 6 0 5.5 6 5.5 6 5.5 6 5.5 0 6 6 6 0 0
|
||||
& & & af0 af0 6faaaaaa 6faaaaaa af0 af0 6faaaaaa 6faaaaaa & 31 148 93 146 8540 31876 22500 8553 1 7 7 7 1 7 7 7 1 7 7 7 1 7 7 7 1 1 7 7 7 7 7 7 1 6.6 7 6.6 7 6.6 7 6.6 1 7 7 7 1 1
|
||||
* * * ag0 ag0 7gaaaaaaa 7gaaaaaaa ag0 ag0 7gaaaaaaa 7gaaaaaaa * 95 51 63 48 5445 40770 2704 28590 2 8 8 8 2 8 8 8 2 8 8 8 2 8 8 8 2 2 8 8 8 8 8 8 2 7.7 8 7.7 8 7.7 8 7.7 2 8 8 8 2 2
|
||||
( ( ( a^0 a^0 8^aaaaaaaa 8^aaaaaaaa a^0 a^0 8^aaaaaaaa 8^aaaaaaaa ( 17 203 60 176 2330 41952 4228 46680 3 9 9 9 3 9 9 9 3 9 9 9 3 9 9 9 3 3 9 9 9 9 9 9 3 8.8 9 8.8 9 8.8 9 8.8 3 9 9 9 3 3
|
||||
) ) ) a_0 a_0 9_aaaaaaaaa 9_aaaaaaaaa a_0 a_0 9_aaaaaaaaa 9_aaaaaaaaa ) 43 137 116 109 17630 47511 18723 24472 4 10 10 10 4 10 10 10 4 10 10 10 4 10 10 10 4 4 10 10 10 10 10 10 4 9.9 10 9.9 10 9.9 10 9.9 4 10 10 10 4 4
|
10
mysql-test/suite/funcs_1/data/myisam_tb2.txt
Normal file
10
mysql-test/suite/funcs_1/data/myisam_tb2.txt
Normal file
|
@ -0,0 +1,10 @@
|
|||
1 1 1 1 1 1 -5 0.0 1 0.0 1 0.0 1 0.0 -1.17549435e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 -1.17549435e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 -1.17549435e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 -1.17549435e-38 -1.17549435e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 -1.17549435e-38 -1.17549435e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 19700102000001 1902 1902 1902 2 2 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@
|
||||
2 2 2 2 2 2 -4 1.1 2 1.1 2 1.1 2 1.1 -1.175494349e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 -1.175494349e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 -1.175494349e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 -1.175494349e-38 -1.175494349e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 -1.175494349e-38 -1.175494349e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 19700103000002 1903 1903 1903 1 3 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\04@\0\0\0\0\0\04@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\04@\0\0\0\0\0\0<>\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0<>\0\0\0\0\0\04@\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\04@\0\0\0\0\0\0<>\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0<>\0\0\0\0\0\04@\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0<>\0\0\0\0\0\0<> \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\04@\0\0\0\0\0\0<>\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0<>\0\0\0\0\0\04@\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0@
|
||||
3 3 3 3 3 3 -3 2.2 3 2.2 3 2.2 3 2.2 -1.175494348e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 -1.175494348e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 -1.175494348e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 -1.175494348e-38 -1.175494348e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 -1.175494348e-38 -1.175494348e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1000-01-03 838:59:56 1970-01-04 00:00:03 19700104000003 1904 1904 1904 2 1 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0>@\0\0\0\0\0\0>@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\04@\0\0\0\0\0\0\0@\0\0\0\0\0\0>@\0\0\0\0\0\0>@\0\0\0\0\0\0\0@\0\0\0\0\0\0>@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\04@\0\0\0\0\0\0\0@\0\0\0\0\0\0>@\0\0\0\0\0\0>@\0\0\0\0\0\0\0@\0\0\0\0\0\0>@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\04@\0\0\0\0\0\0\0@\0\0\0\0\0\0>@\0\0\0\0\0\0>@\0\0\0\0\0\0\0@\0\0\0\0\0\0>@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0@
|
||||
4 4 4 4 4 4 -2 3.3 4 3.3 4 3.3 4 3.3 -1.175494347e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 -1.175494347e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 -1.175494347e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 -1.175494347e-38 -1.175494347e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 -1.175494347e-38 -1.175494347e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 19700105000004 1905 1905 1905 1 2 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0D@\0\0\0\0\0\0D@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0"@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0"@ \0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0*@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \N
|
||||
5 5 5 5 5 5 -1 4.4 5 4.4 5 4.4 5 4.4 -1.175494346e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 -1.175494346e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 -1.175494346e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 -1.175494346e-38 -1.175494346e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 -1.175494346e-38 -1.175494346e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1000-01-05 838:59:54 1970-01-06 00:00:05 19700106000005 1906 1906 1906 2 3 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0I@\0\0\0\0\0\0I@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0N@\0\0\0\0\0\0@\0\0\0\0\0\0N@\0\0\0\0\0\0N@\0\0\0\0\0\0@\0\0\0\0\0\0N@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0(@\0\0\0\0\0\0$@\0\0\0\0\0\0(@\0\0\0\0\0\0(@\0\0\0\0\0\0$@\0\0\0\0\0\0(@\0\0\0\0\0\0$@\0\0\0\0\0\0$@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0N@\0\0\0\0\0\0@\0\0\0\0\0\0N@\0\0\0\0\0\0N@\0\0\0\0\0\0@\0\0\0\0\0\0N@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0(@\0\0\0\0\0\0$@\0\0\0\0\0\0(@\0\0\0\0\0\0(@\0\0\0\0\0\0$@\0\0\0\0\0\0(@\0\0\0\0\0\0$@\0\0\0\0\0\0$@ \0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0"@
|
||||
6 6 6 6 6 6 0 5.5 6 5.5 6 5.5 6 5.5 -1.175494345e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 -1.175494345e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 -1.175494345e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 -1.175494345e-38 -1.175494345e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 -1.175494345e-38 -1.175494345e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1000-01-06 838:59:53 1970-01-07 00:00:06 19700107000006 1907 1907 1907 1 1 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @ \0\0\0\0\0\0\0\0\0\0\0\0\09@\0\0\0\0\0\0.@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0Q@\0\0\0\0\0\0@\0\0\0\0\0Q@\0\0\0\0\0Q@\0\0\0\0\0\0@\0\0\0\0\0Q@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0&@\0\0\0\0\0\0&@\0\0\0\0\0\0*@\0\0\0\0\0\0&@\0\0\0\0\0\0*@\0\0\0\0\0\0*@\0\0\0\0\0\0&@\0\0\0\0\0\0*@\0\0\0\0\0\0&@\0\0\0\0\0\0&@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0Q@\0\0\0\0\0\0@\0\0\0\0\0Q@\0\0\0\0\0Q@\0\0\0\0\0\0@\0\0\0\0\0Q@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0&@\0\0\0\0\0\0&@\0\0\0\0\0\0*@\0\0\0\0\0\0&@\0\0\0\0\0\0*@\0\0\0\0\0\0*@\0\0\0\0\0\0&@\0\0\0\0\0\0*@\0\0\0\0\0\0&@\0\0\0\0\0\0&@ \0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0N@\0\0\0\0\0\0@\0\0\0\0\0\0N@\0\0\0\0\0\0N@\0\0\0\0\0\0@\0\0\0\0\0\0N@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0(@\0\0\0\0\0\0$@\0\0\0\0\0\0(@\0\0\0\0\0\0(@\0\0\0\0\0\0$@\0\0\0\0\0\0(@\0\0\0\0\0\0$@\0\0\0\0\0\0$@
|
||||
7 7 7 7 7 7 1 6.6 7 6.6 7 6.6 7 6.6 -1.175494344e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 -1.175494344e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 -1.175494344e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 -1.175494344e-38 -1.175494344e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 -1.175494344e-38 -1.175494344e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1000-01-07 838:59:52 1970-01-08 00:00:07 19700108000007 1908 1908 1908 2 2 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@
|
||||
8 8 8 8 8 8 2 7.7 8 7.7 8 7.7 8 7.7 -1.175494343e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 -1.175494343e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 -1.175494343e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 -1.175494343e-38 -1.175494343e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 -1.175494343e-38 -1.175494343e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1000-01-08 838:59:51 1970-01-09 00:00:08 19700109000008 1909 1909 1909 1 3 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\04@\0\0\0\0\0\04@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\04@\0\0\0\0\0\0<>\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0<>\0\0\0\0\0\04@\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\04@\0\0\0\0\0\0<>\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0<>\0\0\0\0\0\04@\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0<>\0\0\0\0\0\0<> \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\04@\0\0\0\0\0\0<>\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0<>\0\0\0\0\0\04@\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0@
|
||||
9 9 9 9 9 9 3 8.8 9 8.8 9 8.8 9 8.8 -1.175494342e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 -1.175494342e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 -1.175494342e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 -1.175494342e-38 -1.175494342e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 -1.175494342e-38 -1.175494342e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1000-01-09 838:59:50 1970-01-10 00:00:09 19700110000009 1910 1910 1910 2 1 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0>@\0\0\0\0\0\0>@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\04@\0\0\0\0\0\0\0@\0\0\0\0\0\0>@\0\0\0\0\0\0>@\0\0\0\0\0\0\0@\0\0\0\0\0\0>@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\04@\0\0\0\0\0\0\0@\0\0\0\0\0\0>@\0\0\0\0\0\0>@\0\0\0\0\0\0\0@\0\0\0\0\0\0>@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\04@\0\0\0\0\0\0\0@\0\0\0\0\0\0>@\0\0\0\0\0\0>@\0\0\0\0\0\0\0@\0\0\0\0\0\0>@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0@
|
||||
10 10 10 10 10 10 4 9.9 10 9.9 10 9.9 10 9.9 -1.175494341e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 -1.175494341e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 -1.175494341e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 -1.175494341e-38 -1.175494341e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 -1.175494341e-38 -1.175494341e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1000-01-10 838:59:49 1970-01-11 00:00:10 19700111000010 1911 1911 1911 1 2 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0D@\0\0\0\0\0\0D@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0"@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0"@ \0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0*@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \N
|
10
mysql-test/suite/funcs_1/data/myisam_tb3.txt
Normal file
10
mysql-test/suite/funcs_1/data/myisam_tb3.txt
Normal file
|
@ -0,0 +1,10 @@
|
|||
! ! ! a`0 a`0 0` 0` a`0 a`0 0` 0` ! 109 139 69 7 18139 13696 27218 8005 -5 1 1 1 -5 1 1 1 -5 1 1 1 -5 1 1 1 -5 -5 1 1 1 1 1 1 -5 0.0 1 0.0 1 0.0 1 0.0 -5 1 1 1 -5 -5
|
||||
@ @ @ aa0 aa0 1aa 1aa aa0 aa0 1aa 1aa @ 84 140 42 19 17074 20551 20585 53745 -4 2 2 2 -4 2 2 2 -4 2 2 2 -4 2 2 2 -4 -4 2 2 2 2 2 2 -4 1.1 2 1.1 2 1.1 2 1.1 -4 2 2 2 -4 -4
|
||||
# # # ab0 ab0 2baa 2baa ab0 ab0 2baa 2baa # 59 235 74 53 11119 50568 6317 28587 -3 3 3 3 -3 3 3 3 -3 3 3 3 -3 3 3 3 -3 -3 3 3 3 3 3 3 -3 2.2 3 2.2 3 2.2 3 2.2 -3 3 3 3 -3 -3
|
||||
$ $ $ ac0 ac0 3caaa 3caaa ac0 ac0 3caaa 3caaa $ 111 15 124 208 1523 44126 32488 35195 -2 4 4 4 -2 4 4 4 -2 4 4 4 -2 4 4 4 -2 -2 4 4 4 4 4 4 -2 3.3 4 3.3 4 3.3 4 3.3 -2 4 4 4 -2 -2
|
||||
% % % ad0 ad0 4daaaa 4daaaa ad0 ad0 4daaaa 4daaaa % 39 74 95 55 9343 13013 30820 52027 -1 5 5 5 -1 5 5 5 -1 5 5 5 -1 5 5 5 -1 -1 5 5 5 5 5 5 -1 4.4 5 4.4 5 4.4 5 4.4 -1 5 5 5 -1 -1
|
||||
^ ^ ^ ae0 ae0 5eaaaaa 5eaaaaa ae0 ae0 5eaaaaa 5eaaaaa ^ 0 189 119 57 27291 29348 7618 17041 0 6 6 6 0 6 6 6 0 6 6 6 0 6 6 6 0 0 6 6 6 6 6 6 0 5.5 6 5.5 6 5.5 6 5.5 0 6 6 6 0 0
|
||||
& & & af0 af0 6faaaaaa 6faaaaaa af0 af0 6faaaaaa 6faaaaaa & 95 202 104 100 25978 36845 25435 57697 1 7 7 7 1 7 7 7 1 7 7 7 1 7 7 7 1 1 7 7 7 7 7 7 1 6.6 7 6.6 7 6.6 7 6.6 1 7 7 7 1 1
|
||||
* * * ag0 ag0 7gaaaaaaa 7gaaaaaaa ag0 ag0 7gaaaaaaa 7gaaaaaaa * 32 31 47 219 22189 56957 23389 18316 2 8 8 8 2 8 8 8 2 8 8 8 2 8 8 8 2 2 8 8 8 8 8 8 2 7.7 8 7.7 8 7.7 8 7.7 2 8 8 8 2 2
|
||||
( ( ( a^0 a^0 8^aaaaaaaa 8^aaaaaaaa a^0 a^0 8^aaaaaaaa 8^aaaaaaaa ( 35 5 13 119 23453 2681 10787 47642 3 9 9 9 3 9 9 9 3 9 9 9 3 9 9 9 3 3 9 9 9 9 9 9 3 8.8 9 8.8 9 8.8 9 8.8 3 9 9 9 3 3
|
||||
) ) ) a_0 a_0 9_aaaaaaaaa 9_aaaaaaaaa a_0 a_0 9_aaaaaaaaa 9_aaaaaaaaa ) 20 177 13 18 23752 18809 22353 4155 4 10 10 10 4 10 10 10 4 10 10 10 4 10 10 10 4 4 10 10 10 10 10 10 4 9.9 10 9.9 10 9.9 10 9.9 4 10 10 10 4 4
|
10
mysql-test/suite/funcs_1/data/myisam_tb4.txt
Normal file
10
mysql-test/suite/funcs_1/data/myisam_tb4.txt
Normal file
|
@ -0,0 +1,10 @@
|
|||
1 1 1 1 1 1 -5 0.0 1 0.0 1 0.0 1 0.0 -1.17549435e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 -1.17549435e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 -1.17549435e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 -1.17549435e-38 -1.17549435e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 -1.17549435e-38 -1.17549435e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 19700102000001 1902 1902 1902 2 2 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ 0 0! 0 0 0! 0! 2
|
||||
2 2 2 2 2 2 -4 1.1 2 1.1 2 1.1 2 1.1 -1.175494349e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 -1.175494349e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 -1.175494349e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 -1.175494349e-38 -1.175494349e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 -1.175494349e-38 -1.175494349e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 19700103000002 1903 1903 1903 1 3 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\04@\0\0\0\0\0\04@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\04@\0\0\0\0\0\0<>\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0<>\0\0\0\0\0\04@\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\04@\0\0\0\0\0\0<>\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0<>\0\0\0\0\0\04@\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0<>\0\0\0\0\0\0<> \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\04@\0\0\0\0\0\0<>\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0<>\0\0\0\0\0\04@\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0@ 1@ 1@# 1@ 1@ 1@# 1@# 3
|
||||
3 3 3 3 3 3 -3 2.2 3 2.2 3 2.2 3 2.2 -1.175494348e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 -1.175494348e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 -1.175494348e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 -1.175494348e-38 -1.175494348e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 -1.175494348e-38 -1.175494348e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1000-01-03 838:59:56 1970-01-04 00:00:03 19700104000003 1904 1904 1904 2 1 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0>@\0\0\0\0\0\0>@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\04@\0\0\0\0\0\0\0@\0\0\0\0\0\0>@\0\0\0\0\0\0>@\0\0\0\0\0\0\0@\0\0\0\0\0\0>@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\04@\0\0\0\0\0\0\0@\0\0\0\0\0\0>@\0\0\0\0\0\0>@\0\0\0\0\0\0\0@\0\0\0\0\0\0>@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\04@\0\0\0\0\0\0\0@\0\0\0\0\0\0>@\0\0\0\0\0\0>@\0\0\0\0\0\0\0@\0\0\0\0\0\0>@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0@ 2#$ 2#$% 2#$ 2#$ 2#$% 2#$% 4
|
||||
4 4 4 4 4 4 -2 3.3 4 3.3 4 3.3 4 3.3 -1.175494347e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 -1.175494347e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 -1.175494347e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 -1.175494347e-38 -1.175494347e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 -1.175494347e-38 -1.175494347e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 19700105000004 1905 1905 1905 1 2 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0D@\0\0\0\0\0\0D@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0"@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0"@ \0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0*@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \N 3$%^ 3$%^& 3$%^ 3$%^ 3$%^& 3$%^& 5
|
||||
5 5 5 5 5 5 -1 4.4 5 4.4 5 4.4 5 4.4 -1.175494346e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 -1.175494346e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 -1.175494346e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 -1.175494346e-38 -1.175494346e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 -1.175494346e-38 -1.175494346e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1000-01-05 838:59:54 1970-01-06 00:00:05 19700106000005 1906 1906 1906 2 3 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0I@\0\0\0\0\0\0I@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0N@\0\0\0\0\0\0@\0\0\0\0\0\0N@\0\0\0\0\0\0N@\0\0\0\0\0\0@\0\0\0\0\0\0N@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0(@\0\0\0\0\0\0$@\0\0\0\0\0\0(@\0\0\0\0\0\0(@\0\0\0\0\0\0$@\0\0\0\0\0\0(@\0\0\0\0\0\0$@\0\0\0\0\0\0$@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0N@\0\0\0\0\0\0@\0\0\0\0\0\0N@\0\0\0\0\0\0N@\0\0\0\0\0\0@\0\0\0\0\0\0N@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0(@\0\0\0\0\0\0$@\0\0\0\0\0\0(@\0\0\0\0\0\0(@\0\0\0\0\0\0$@\0\0\0\0\0\0(@\0\0\0\0\0\0$@\0\0\0\0\0\0$@ \0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0"@ 4%^&* 4%^&*( 4%^&* 4%^&* 4%^&*( 4%^&*( 6
|
||||
6 6 6 6 6 6 0 5.5 6 5.5 6 5.5 6 5.5 -1.175494345e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 -1.175494345e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 -1.175494345e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 -1.175494345e-38 -1.175494345e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 -1.175494345e-38 -1.175494345e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1000-01-06 838:59:53 1970-01-07 00:00:06 19700107000006 1907 1907 1907 1 1 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @ \0\0\0\0\0\0\0\0\0\0\0\0\09@\0\0\0\0\0\0.@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0Q@\0\0\0\0\0\0@\0\0\0\0\0Q@\0\0\0\0\0Q@\0\0\0\0\0\0@\0\0\0\0\0Q@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0&@\0\0\0\0\0\0&@\0\0\0\0\0\0*@\0\0\0\0\0\0&@\0\0\0\0\0\0*@\0\0\0\0\0\0*@\0\0\0\0\0\0&@\0\0\0\0\0\0*@\0\0\0\0\0\0&@\0\0\0\0\0\0&@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0Q@\0\0\0\0\0\0@\0\0\0\0\0Q@\0\0\0\0\0Q@\0\0\0\0\0\0@\0\0\0\0\0Q@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0&@\0\0\0\0\0\0&@\0\0\0\0\0\0*@\0\0\0\0\0\0&@\0\0\0\0\0\0*@\0\0\0\0\0\0*@\0\0\0\0\0\0&@\0\0\0\0\0\0*@\0\0\0\0\0\0&@\0\0\0\0\0\0&@ \0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0N@\0\0\0\0\0\0@\0\0\0\0\0\0N@\0\0\0\0\0\0N@\0\0\0\0\0\0@\0\0\0\0\0\0N@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0(@\0\0\0\0\0\0$@\0\0\0\0\0\0(@\0\0\0\0\0\0(@\0\0\0\0\0\0$@\0\0\0\0\0\0(@\0\0\0\0\0\0$@\0\0\0\0\0\0$@ 5^&*() 5^&*()_ 5^&*() 5^&*() 5^&*()_ 5^&*()_ 7
|
||||
7 7 7 7 7 7 1 6.6 7 6.6 7 6.6 7 6.6 -1.175494344e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 -1.175494344e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 -1.175494344e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 -1.175494344e-38 -1.175494344e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 -1.175494344e-38 -1.175494344e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1000-01-07 838:59:52 1970-01-08 00:00:07 19700108000007 1908 1908 1908 2 2 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0$@\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ 6&*()_+ 6&*()_+= 6&*()_+ 6&*()_+ 6&*()_+= 6&*()_+= 8
|
||||
8 8 8 8 8 8 2 7.7 8 7.7 8 7.7 8 7.7 -1.175494343e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 -1.175494343e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 -1.175494343e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 -1.175494343e-38 -1.175494343e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 -1.175494343e-38 -1.175494343e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1000-01-08 838:59:51 1970-01-09 00:00:08 19700109000008 1909 1909 1909 1 3 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\04@\0\0\0\0\0\04@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\04@\0\0\0\0\0\0<>\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0<>\0\0\0\0\0\04@\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\04@\0\0\0\0\0\0<>\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0<>\0\0\0\0\0\04@\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0<>\0\0\0\0\0\0<> \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\04@\0\0\0\0\0\0<>\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0<>\0\0\0\0\0\04@\0\0\0\0\0\0<>\0\0\0\0\0\0<>\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0@ 7*()_+=- 7*()_+=-| 7*()_+=- 7*()_+=- 7*()_+=-| 7*()_+=-| 9
|
||||
9 9 9 9 9 9 3 8.8 9 8.8 9 8.8 9 8.8 -1.175494342e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 -1.175494342e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 -1.175494342e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 -1.175494342e-38 -1.175494342e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 -1.175494342e-38 -1.175494342e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1000-01-09 838:59:50 1970-01-10 00:00:09 19700110000009 1910 1910 1910 2 1 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0>@\0\0\0\0\0\0>@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\04@\0\0\0\0\0\0\0@\0\0\0\0\0\0>@\0\0\0\0\0\0>@\0\0\0\0\0\0\0@\0\0\0\0\0\0>@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\04@\0\0\0\0\0\0\0@\0\0\0\0\0\0>@\0\0\0\0\0\0>@\0\0\0\0\0\0\0@\0\0\0\0\0\0>@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\04@\0\0\0\0\0\0\0@\0\0\0\0\0\0>@\0\0\0\0\0\0>@\0\0\0\0\0\0\0@\0\0\0\0\0\0>@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0"@\0\0\0\0\0\0@\0\0\0\0\0\0@ 8()_+=-|{ 8()_+=-|{} 8()_+=-|{ 8()_+=-|{ 8()_+=-|{} 8()_+=-|{} 10
|
||||
10 10 10 10 10 10 4 9.9 10 9.9 10 9.9 10 9.9 -1.175494341e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 -1.175494341e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 -1.175494341e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 -1.175494341e-38 -1.175494341e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 -1.175494341e-38 -1.175494341e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1000-01-10 838:59:49 1970-01-11 00:00:10 19700111000010 1911 1911 1911 1 2 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0D@\0\0\0\0\0\0D@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0"@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0I@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0\0\0\0"@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0&@\0\0\0\0\0\0"@\0\0\0\0\0\0"@ \0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0*@ \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@ \N 9)_+=-|{}[ 9)_+=-|{}[] 9)_+=-|{}[ 9)_+=-|{}[ 9)_+=-|{}[] 9)_+=-|{}[] 11
|
10
mysql-test/suite/funcs_1/data/ndb_tb1.txt
Normal file
10
mysql-test/suite/funcs_1/data/ndb_tb1.txt
Normal file
|
@ -0,0 +1,10 @@
|
|||
a`0 a`0 0` 0` a`0 a`0 0` 0` ! 6 163 103 238 3058 30243 22056 9444 -5 1 1 1 -5 1 1 1 -5 1 1 1 -5 1 1 1 -5 -5 1 1 1 1 1 1 -5 0.0 1 0.0 1 0.0 1 0.0 -5 1 1 1 -5 -5
|
||||
aa0 aa0 1aa 1aa aa0 aa0 1aa 1aa @ 9 207 1 246 13214 57220 1505 58996 -4 2 2 2 -4 2 2 2 -4 2 2 2 -4 2 2 2 -4 -4 2 2 2 2 2 2 -4 1.1 2 1.1 2 1.1 2 1.1 -4 2 2 2 -4 -4
|
||||
ab0 ab0 2baa 2baa ab0 ab0 2baa 2baa # 3 50 103 193 10965 3038 31585 20149 -3 3 3 3 -3 3 3 3 -3 3 3 3 -3 3 3 3 -3 -3 3 3 3 3 3 3 -3 2.2 3 2.2 3 2.2 3 2.2 -3 3 3 3 -3 -3
|
||||
ac0 ac0 3caaa 3caaa ac0 ac0 3caaa 3caaa $ 62 188 47 176 5103 58378 13178 38317 -2 4 4 4 -2 4 4 4 -2 4 4 4 -2 4 4 4 -2 -2 4 4 4 4 4 4 -2 3.3 4 3.3 4 3.3 4 3.3 -2 4 4 4 -2 -2
|
||||
ad0 ad0 4daaaa 4daaaa ad0 ad0 4daaaa 4daaaa % 59 15 21 80 17942 48443 12646 53903 -1 5 5 5 -1 5 5 5 -1 5 5 5 -1 5 5 5 -1 -1 5 5 5 5 5 5 -1 4.4 5 4.4 5 4.4 5 4.4 -1 5 5 5 -1 -1
|
||||
ae0 ae0 5eaaaaa 5eaaaaa ae0 ae0 5eaaaaa 5eaaaaa ^ 86 223 103 88 3880 31147 5801 28348 0 6 6 6 0 6 6 6 0 6 6 6 0 6 6 6 0 0 6 6 6 6 6 6 0 5.5 6 5.5 6 5.5 6 5.5 0 6 6 6 0 0
|
||||
af0 af0 6faaaaaa 6faaaaaa af0 af0 6faaaaaa 6faaaaaa & 124 125 77 208 2591 29533 18803 21557 1 7 7 7 1 7 7 7 1 7 7 7 1 7 7 7 1 1 7 7 7 7 7 7 1 6.6 7 6.6 7 6.6 7 6.6 1 7 7 7 1 1
|
||||
ag0 ag0 7gaaaaaaa 7gaaaaaaa ag0 ag0 7gaaaaaaa 7gaaaaaaa * 123 103 80 92 10179 60769 25778 58195 2 8 8 8 2 8 8 8 2 8 8 8 2 8 8 8 2 2 8 8 8 8 8 8 2 7.7 8 7.7 8 7.7 8 7.7 2 8 8 8 2 2
|
||||
a^0 a^0 8^aaaaaaaa 8^aaaaaaaa a^0 a^0 8^aaaaaaaa 8^aaaaaaaa ( 111 166 81 66 5159 2177 6774 38396 3 9 9 9 3 9 9 9 3 9 9 9 3 9 9 9 3 3 9 9 9 9 9 9 3 8.8 9 8.8 9 8.8 9 8.8 3 9 9 9 3 3
|
||||
a_0 a_0 9_aaaaaaaaa 9_aaaaaaaaa a_0 a_0 9_aaaaaaaaa 9_aaaaaaaaa ) 37 174 97 34 9183 16470 13064 6297 4 10 10 10 4 10 10 10 4 10 10 10 4 10 10 10 4 4 10 10 10 10 10 10 4 9.9 10 9.9 10 9.9 10 9.9 4 10 10 10 4 4
|
10
mysql-test/suite/funcs_1/data/ndb_tb2.txt
Normal file
10
mysql-test/suite/funcs_1/data/ndb_tb2.txt
Normal file
|
@ -0,0 +1,10 @@
|
|||
1 1 1 1 1 1 -5 0.0 1 0.0 1 0.0 1 0.0 -1.17549435e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 -1.17549435e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 -1.17549435e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 -1.17549435e-38 -1.17549435e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 -1.17549435e-38 -1.17549435e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 19700102000001 1902 1902 1902 2 2
|
||||
2 2 2 2 2 2 -4 1.1 2 1.1 2 1.1 2 1.1 -1.175494349e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 -1.175494349e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 -1.175494349e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 -1.175494349e-38 -1.175494349e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 -1.175494349e-38 -1.175494349e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 19700103000002 1903 1903 1903 1 3
|
||||
3 3 3 3 3 3 -3 2.2 3 2.2 3 2.2 3 2.2 -1.175494348e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 -1.175494348e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 -1.175494348e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 -1.175494348e-38 -1.175494348e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 -1.175494348e-38 -1.175494348e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1000-01-03 838:59:56 1970-01-04 00:00:03 19700104000003 1904 1904 1904 2 1
|
||||
4 4 4 4 4 4 -2 3.3 4 3.3 4 3.3 4 3.3 -1.175494347e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 -1.175494347e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 -1.175494347e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 -1.175494347e-38 -1.175494347e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 -1.175494347e-38 -1.175494347e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 19700105000004 1905 1905 1905 1 2
|
||||
5 5 5 5 5 5 -1 4.4 5 4.4 5 4.4 5 4.4 -1.175494346e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 -1.175494346e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 -1.175494346e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 -1.175494346e-38 -1.175494346e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 -1.175494346e-38 -1.175494346e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1000-01-05 838:59:54 1970-01-06 00:00:05 19700106000005 1906 1906 1906 2 3
|
||||
6 6 6 6 6 6 0 5.5 6 5.5 6 5.5 6 5.5 -1.175494345e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 -1.175494345e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 -1.175494345e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 -1.175494345e-38 -1.175494345e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 -1.175494345e-38 -1.175494345e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1000-01-06 838:59:53 1970-01-07 00:00:06 19700107000006 1907 1907 1907 1 1
|
||||
7 7 7 7 7 7 1 6.6 7 6.6 7 6.6 7 6.6 -1.175494344e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 -1.175494344e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 -1.175494344e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 -1.175494344e-38 -1.175494344e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 -1.175494344e-38 -1.175494344e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1000-01-07 838:59:52 1970-01-08 00:00:07 19700108000007 1908 1908 1908 2 2
|
||||
8 8 8 8 8 8 2 7.7 8 7.7 8 7.7 8 7.7 -1.175494343e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 -1.175494343e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 -1.175494343e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 -1.175494343e-38 -1.175494343e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 -1.175494343e-38 -1.175494343e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1000-01-08 838:59:51 1970-01-09 00:00:08 19700109000008 1909 1909 1909 1 3
|
||||
9 9 9 9 9 9 3 8.8 9 8.8 9 8.8 9 8.8 -1.175494342e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 -1.175494342e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 -1.175494342e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 -1.175494342e-38 -1.175494342e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 -1.175494342e-38 -1.175494342e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1000-01-09 838:59:50 1970-01-10 00:00:09 19700110000009 1910 1910 1910 2 1
|
||||
10 10 10 10 10 10 4 9.9 10 9.9 10 9.9 10 9.9 -1.175494341e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 -1.175494341e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 -1.175494341e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 -1.175494341e-38 -1.175494341e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 -1.175494341e-38 -1.175494341e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1000-01-10 838:59:49 1970-01-11 00:00:10 19700111000010 1911 1911 1911 1 2
|
10
mysql-test/suite/funcs_1/data/ndb_tb3.txt
Normal file
10
mysql-test/suite/funcs_1/data/ndb_tb3.txt
Normal file
|
@ -0,0 +1,10 @@
|
|||
! ! ! a`0 a`0 0` 0` a`0 a`0 0` 0` ! 37 102 115 214 22348 22112 23636 18043 -5 1 1 1 -5 1 1 1 -5 1 1 1 -5 1 1 1 -5 -5 1 1 1 1 1 1 -5 0.0 1 0.0 1 0.0 1 0.0 -5 1 1 1 -5 -5
|
||||
@ @ @ aa0 aa0 1aa 1aa aa0 aa0 1aa 1aa @ 30 114 62 146 22059 6000 19024 8674 -4 2 2 2 -4 2 2 2 -4 2 2 2 -4 2 2 2 -4 -4 2 2 2 2 2 2 -4 1.1 2 1.1 2 1.1 2 1.1 -4 2 2 2 -4 -4
|
||||
# # # ab0 ab0 2baa 2baa ab0 ab0 2baa 2baa # 113 254 52 51 27963 63797 516 63989 -3 3 3 3 -3 3 3 3 -3 3 3 3 -3 3 3 3 -3 -3 3 3 3 3 3 3 -3 2.2 3 2.2 3 2.2 3 2.2 -3 3 3 3 -3 -3
|
||||
$ $ $ ac0 ac0 3caaa 3caaa ac0 ac0 3caaa 3caaa $ 70 78 40 203 28716 18828 14939 30960 -2 4 4 4 -2 4 4 4 -2 4 4 4 -2 4 4 4 -2 -2 4 4 4 4 4 4 -2 3.3 4 3.3 4 3.3 4 3.3 -2 4 4 4 -2 -2
|
||||
% % % ad0 ad0 4daaaa 4daaaa ad0 ad0 4daaaa 4daaaa % 1 228 76 249 16746 12853 8405 35402 -1 5 5 5 -1 5 5 5 -1 5 5 5 -1 5 5 5 -1 -1 5 5 5 5 5 5 -1 4.4 5 4.4 5 4.4 5 4.4 -1 5 5 5 -1 -1
|
||||
^ ^ ^ ae0 ae0 5eaaaaa 5eaaaaa ae0 ae0 5eaaaaa 5eaaaaa ^ 116 52 51 248 26877 15243 20063 65464 0 6 6 6 0 6 6 6 0 6 6 6 0 6 6 6 0 0 6 6 6 6 6 6 0 5.5 6 5.5 6 5.5 6 5.5 0 6 6 6 0 0
|
||||
& & & af0 af0 6faaaaaa 6faaaaaa af0 af0 6faaaaaa 6faaaaaa & 59 163 63 26 24559 55618 27326 12704 1 7 7 7 1 7 7 7 1 7 7 7 1 7 7 7 1 1 7 7 7 7 7 7 1 6.6 7 6.6 7 6.6 7 6.6 1 7 7 7 1 1
|
||||
* * * ag0 ag0 7gaaaaaaa 7gaaaaaaa ag0 ag0 7gaaaaaaa 7gaaaaaaa * 69 229 119 159 11779 48557 14747 42703 2 8 8 8 2 8 8 8 2 8 8 8 2 8 8 8 2 2 8 8 8 8 8 8 2 7.7 8 7.7 8 7.7 8 7.7 2 8 8 8 2 2
|
||||
( ( ( a^0 a^0 8^aaaaaaaa 8^aaaaaaaa a^0 a^0 8^aaaaaaaa 8^aaaaaaaa ( 54 89 113 155 1068 61537 14823 43439 3 9 9 9 3 9 9 9 3 9 9 9 3 9 9 9 3 3 9 9 9 9 9 9 3 8.8 9 8.8 9 8.8 9 8.8 3 9 9 9 3 3
|
||||
) ) ) a_0 a_0 9_aaaaaaaaa 9_aaaaaaaaa a_0 a_0 9_aaaaaaaaa 9_aaaaaaaaa ) 68 34 44 175 32453 44381 506 37695 4 10 10 10 4 10 10 10 4 10 10 10 4 10 10 10 4 4 10 10 10 10 10 10 4 9.9 10 9.9 10 9.9 10 9.9 4 10 10 10 4 4
|
10
mysql-test/suite/funcs_1/data/ndb_tb4.txt
Normal file
10
mysql-test/suite/funcs_1/data/ndb_tb4.txt
Normal file
|
@ -0,0 +1,10 @@
|
|||
1 1 1 1 1 1 -5 0.0 1 0.0 1 0.0 1 0.0 -1.17549435e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 -1.17549435e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 -1.17549435e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 -1.17549435e-38 -1.17549435e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 -1.17549435e-38 -1.17549435e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 19700102000001 1902 1902 1902 2 2 0! 0 0 0 0!
|
||||
2 2 2 2 2 2 -4 1.1 2 1.1 2 1.1 2 1.1 -1.175494349e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 -1.175494349e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 -1.175494349e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 -1.175494349e-38 -1.175494349e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 -1.175494349e-38 -1.175494349e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 19700103000002 1903 1903 1903 1 3 1@# 1@ 1@ 1@ 1@#
|
||||
3 3 3 3 3 3 -3 2.2 3 2.2 3 2.2 3 2.2 -1.175494348e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 -1.175494348e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 -1.175494348e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 -1.175494348e-38 -1.175494348e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 -1.175494348e-38 -1.175494348e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1.175494354e-38 1000-01-03 838:59:56 1970-01-04 00:00:03 19700104000003 1904 1904 1904 2 1 2#$% 2#$ 2#$ 2#$ 2#$%
|
||||
4 4 4 4 4 4 -2 3.3 4 3.3 4 3.3 4 3.3 -1.175494347e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 -1.175494347e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 -1.175494347e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 -1.175494347e-38 -1.175494347e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 -1.175494347e-38 -1.175494347e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 19700105000004 1905 1905 1905 1 2 3$%^& 3$%^ 3$%^ 3$%^ 3$%^&
|
||||
5 5 5 5 5 5 -1 4.4 5 4.4 5 4.4 5 4.4 -1.175494346e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 -1.175494346e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 -1.175494346e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 -1.175494346e-38 -1.175494346e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 -1.175494346e-38 -1.175494346e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1.175494356e-38 1000-01-05 838:59:54 1970-01-06 00:00:05 19700106000005 1906 1906 1906 2 3 4%^&*( 4%^&* 4%^&* 4%^&* 4%^&*(
|
||||
6 6 6 6 6 6 0 5.5 6 5.5 6 5.5 6 5.5 -1.175494345e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 -1.175494345e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 -1.175494345e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 -1.175494345e-38 -1.175494345e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 -1.175494345e-38 -1.175494345e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1.175494357e-38 1000-01-06 838:59:53 1970-01-07 00:00:06 19700107000006 1907 1907 1907 1 1 5^&*()_ 5^&*() 5^&*() 5^&*() 5^&*()_
|
||||
7 7 7 7 7 7 1 6.6 7 6.6 7 6.6 7 6.6 -1.175494344e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 -1.175494344e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 -1.175494344e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 -1.175494344e-38 -1.175494344e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 -1.175494344e-38 -1.175494344e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1.175494358e-38 1000-01-07 838:59:52 1970-01-08 00:00:07 19700108000007 1908 1908 1908 2 2 6&*()_+= 6&*()_+ 6&*()_+ 6&*()_+ 6&*()_+=
|
||||
8 8 8 8 8 8 2 7.7 8 7.7 8 7.7 8 7.7 -1.175494343e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 -1.175494343e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 -1.175494343e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 -1.175494343e-38 -1.175494343e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 -1.175494343e-38 -1.175494343e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1.175494359e-38 1000-01-08 838:59:51 1970-01-09 00:00:08 19700109000008 1909 1909 1909 1 3 7*()_+=-| 7*()_+=- 7*()_+=- 7*()_+=- 7*()_+=-|
|
||||
9 9 9 9 9 9 3 8.8 9 8.8 9 8.8 9 8.8 -1.175494342e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 -1.175494342e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 -1.175494342e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 -1.175494342e-38 -1.175494342e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 -1.175494342e-38 -1.175494342e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1.17549436e-38 1000-01-09 838:59:50 1970-01-10 00:00:09 19700110000009 1910 1910 1910 2 1 8()_+=-|{} 8()_+=-|{ 8()_+=-|{ 8()_+=-|{ 8()_+=-|{}
|
||||
10 10 10 10 10 10 4 9.9 10 9.9 10 9.9 10 9.9 -1.175494341e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 -1.175494341e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 -1.175494341e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 -1.175494341e-38 -1.175494341e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 -1.175494341e-38 -1.175494341e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1.175494361e-38 1000-01-10 838:59:49 1970-01-11 00:00:10 19700111000010 1911 1911 1911 1 2 9)_+=-|{}[] 9)_+=-|{}[ 9)_+=-|{}[ 9)_+=-|{}[ 9)_+=-|{}[]
|
10
mysql-test/suite/funcs_1/data/t3.txt
Normal file
10
mysql-test/suite/funcs_1/data/t3.txt
Normal file
|
@ -0,0 +1,10 @@
|
|||
a` a` -5000
|
||||
aaa aaa -4999
|
||||
abaa abaa -4998
|
||||
acaaa acaaa -4997
|
||||
adaaaa adaaaa -4996
|
||||
aeaaaaa aeaaaaa -4995
|
||||
afaaaaaa afaaaaaa -4994
|
||||
agaaaaaaa agaaaaaaa -4993
|
||||
a^aaaaaaaa a^aaaaaaaa -4992
|
||||
a_aaaaaaaaa a_aaaaaaaaa -4991
|
10
mysql-test/suite/funcs_1/data/t4.txt
Normal file
10
mysql-test/suite/funcs_1/data/t4.txt
Normal file
|
@ -0,0 +1,10 @@
|
|||
a` a` 1000-01-1 -5000 a` -5000
|
||||
aaa aaa 1000-01-2 -4999 aaa -4999
|
||||
abaa abaa 1000-01-3 -4998 abaa -4998
|
||||
acaaa acaaa 1000-01-4 -4997 acaaa -4997
|
||||
adaaaa adaaaa 1000-01-5 -4996 adaaaa -4996
|
||||
aeaaaaa aeaaaaa 1000-01-6 -4995 aeaaaaa -4995
|
||||
afaaaaaa afaaaaaa 1000-01-7 -4994 afaaaaaa -4994
|
||||
agaaaaaaa agaaaaaaa 1000-01-8 -4993 agaaaaaaa -4993
|
||||
a^aaaaaaaa a^aaaaaaaa 1000-01-9 -4992 a^aaaaaaaa -4992
|
||||
a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
|
10
mysql-test/suite/funcs_1/data/t7.txt
Normal file
10
mysql-test/suite/funcs_1/data/t7.txt
Normal file
|
@ -0,0 +1,10 @@
|
|||
a` a` -5000
|
||||
aaa aaa -4999
|
||||
abaa abaa -4998
|
||||
acaaa acaaa -4997
|
||||
adaaaa adaaaa -4996
|
||||
aeaaaaa aeaaaaa -4995
|
||||
afaaaaaa afaaaaaa -4994
|
||||
agaaaaaaa agaaaaaaa -4993
|
||||
a^aaaaaaaa a^aaaaaaaa -4992
|
||||
a_aaaaaaaaa a_aaaaaaaaa -4991
|
10
mysql-test/suite/funcs_1/data/t9.txt
Normal file
10
mysql-test/suite/funcs_1/data/t9.txt
Normal file
|
@ -0,0 +1,10 @@
|
|||
-5000 a` -5000
|
||||
-4999 aaa -4999
|
||||
-4998 abaa -4998
|
||||
-4997 acaaa -4997
|
||||
-4996 adaaaa -4996
|
||||
-4995 aeaaaaa -4995
|
||||
-4994 afaaaaaa -4994
|
||||
-4993 agaaaaaaa -4993
|
||||
-4992 a^aaaaaaaa -4992
|
||||
-4991 a_aaaaaaaaa -4991
|
60
mysql-test/suite/funcs_1/datadict/datadict_bug_12777.inc
Normal file
60
mysql-test/suite/funcs_1/datadict/datadict_bug_12777.inc
Normal file
|
@ -0,0 +1,60 @@
|
|||
#### --source suite/funcs_1/datadict/datadict_bug_12777.inc
|
||||
#
|
||||
|
||||
# columns in INFORMATION_SCHEMA with VARCHAR(4096) on Linux and Intel or AMD
|
||||
# processor are shown as VARCHAR(512) on Windows, VARCHAR(1023) on AIX and HPUX,
|
||||
# VARCHAR(1024) on Solaris10, ... see below and in bug #12777 for details.
|
||||
# So we need to replace the output for these systems. There may be other still
|
||||
# not tested / detected systems.
|
||||
#
|
||||
# Setting the variables used below has been moved to the beginning of the datadict
|
||||
# tests to "suite/funcs_1/datadict/datadict_load.inc".
|
||||
#
|
||||
# SELECT character_maximum_length INTO @CML
|
||||
# FROM information_schema.columns
|
||||
# WHERE table_schema = 'information_schema'
|
||||
# AND table_name = 'columns'
|
||||
# AND column_name = 'table_catalog';
|
||||
|
||||
# this enables the --replace_result only if needed, using this we never replace
|
||||
# results on 'simple Linux' and so we will see any changes that might be
|
||||
# suppressed by the - only on some systems used - replacements.
|
||||
|
||||
|
||||
# Windows XP 32bit
|
||||
if ($bug_12777_0512)
|
||||
{
|
||||
# switch next 2 lines on for debugging the correct detection of the operating systems
|
||||
# let $message= value 512 detected - 1st replace statement activated!;
|
||||
# --source include/show_msg.inc
|
||||
# nnnn 3*n
|
||||
--replace_result 512 4096 1536 12288
|
||||
}
|
||||
|
||||
# aix52, aix52-64bit, hp3750, hp3750-64bit, hpux11, hpux11-64bit,
|
||||
if ($bug_12777_1023)
|
||||
{
|
||||
# nnnn 3*n
|
||||
--replace_result 1023 4096 3069 12288
|
||||
}
|
||||
|
||||
# Solaris10, 32bit
|
||||
if ($bug_12777_1024)
|
||||
{
|
||||
# nnnn 3*n
|
||||
--replace_result 1024 4096 3072 12288
|
||||
}
|
||||
|
||||
# Linux Suse 9.3 32bit Intel/AMD
|
||||
if ($bug_12777_2048)
|
||||
{
|
||||
# nnnn 3*n
|
||||
--replace_result 2048 4096 6144 12288
|
||||
}
|
||||
|
||||
# build-5.0-standard
|
||||
if ($bug_12777_4095)
|
||||
{
|
||||
# nnnn 3*n
|
||||
--replace_result 4095 4096 12285 12288
|
||||
}
|
121
mysql-test/suite/funcs_1/datadict/datadict_load.inc
Normal file
121
mysql-test/suite/funcs_1/datadict/datadict_load.inc
Normal file
|
@ -0,0 +1,121 @@
|
|||
#### suite/funcs_1/datadict/datadict_load.inc
|
||||
#
|
||||
# The sub testcases are nearly independend. That is the reason why we do not
|
||||
# want to abort after the first error.
|
||||
--disable_abort_on_error
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# prepare variables for --replace_result
|
||||
#
|
||||
################################################################################
|
||||
--disable_query_log
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Get the size of ONE known colum and check the size against some values to
|
||||
# be able to use the correct --replace_result statement. Using this only the
|
||||
# one pair of 'wrong' values is replaced and not all occurrencies of all
|
||||
# possible pairs of values. See bug #12777 for details.
|
||||
SELECT character_maximum_length INTO @CML
|
||||
FROM information_schema.columns
|
||||
WHERE table_schema = 'information_schema'
|
||||
AND table_name = 'columns'
|
||||
AND column_name = 'table_catalog';
|
||||
|
||||
let $bug_12777_0512= `SELECT @CML = 512`;
|
||||
let $bug_12777_1023= `SELECT @CML = 1023`;
|
||||
let $bug_12777_1024= `SELECT @CML = 1024`;
|
||||
let $bug_12777_2048= `SELECT @CML = 2048`;
|
||||
# 4096 is the value used in the .results
|
||||
let $bug_12777_4095= `SELECT @CML = 4095`;
|
||||
|
||||
if (0)
|
||||
{
|
||||
# enable this for debugging only, but NOT in a pushed version, as then the
|
||||
# result changes from OS to OS ...
|
||||
eval SELECT @CML AS 'CML',
|
||||
$bug_12777_0512 AS '512',
|
||||
$bug_12777_1023 AS '1023',
|
||||
$bug_12777_1024 AS '1024',
|
||||
$bug_12777_2048 AS '2048',
|
||||
$bug_12777_4095 AS '4095';
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# prepare a variable to be able to suppress machine dependant diffs
|
||||
# this can be used in: --replace_result $SERVER_NAME <SERVER_NAME>
|
||||
let $SERVER_NAME= `SELECT DISTINCT host FROM mysql.user WHERE host LIKE "%\%" AND host NOT In ("localhost", "127.0.0.1", "%")`;
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# load tables
|
||||
# -----------
|
||||
#
|
||||
# this was part of the 3 files $<engine>_datadict.test, but it has been moved
|
||||
# here to have only one place where all preparation for the test is done.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
eval SET @ENGINE_INNODB = IF( '$engine_type' = 'innodb', 1, 0);
|
||||
eval SET @ENGINE_MEMORY = IF( '$engine_type' = 'memory', 1, 0);
|
||||
eval SET @ENGINE_MYISAM = IF( '$engine_type' = 'myisam', 1, 0);
|
||||
--enable_query_log
|
||||
|
||||
let $engine_myisam= `SELECT @ENGINE_MYISAM = 1`;
|
||||
let $engine_innodb= `SELECT @ENGINE_INNODB = 1`;
|
||||
let $engine_memory= `SELECT @ENGINE_MEMORY = 1`;
|
||||
|
||||
# Decide, if the objects are to be (re)created
|
||||
#
|
||||
# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE)
|
||||
# That means the current script must not (re)create any object.
|
||||
# It can expect, that the objects already exist.
|
||||
#
|
||||
# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE)
|
||||
# That means all objects have to be (re)created within the current script.
|
||||
#
|
||||
eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1);
|
||||
let $run= `SELECT @NO_REFRESH = 0`;
|
||||
if ($run)
|
||||
{
|
||||
--disable_warnings
|
||||
DROP DATABASE IF EXISTS test1;
|
||||
--enable_warnings
|
||||
CREATE DATABASE test1;
|
||||
USE test;
|
||||
|
||||
# until a statement 'eval --source suite/funcs_1/include/$var_tb1.inc
|
||||
# works we need to have similar statements for each $engine
|
||||
if ($engine_innodb)
|
||||
{
|
||||
--source suite/funcs_1/include/innodb_tb1.inc
|
||||
--source suite/funcs_1/include/innodb_tb2.inc
|
||||
--source suite/funcs_1/include/innodb_tb3.inc
|
||||
--source suite/funcs_1/include/innodb_tb4.inc
|
||||
USE test1;
|
||||
--source suite/funcs_1/include/innodb_tb2.inc
|
||||
}
|
||||
|
||||
if ($engine_memory)
|
||||
{
|
||||
--source suite/funcs_1/include/memory_tb1.inc
|
||||
--source suite/funcs_1/include/memory_tb2.inc
|
||||
--source suite/funcs_1/include/memory_tb3.inc
|
||||
--source suite/funcs_1/include/memory_tb4.inc
|
||||
USE test1;
|
||||
--source suite/funcs_1/include/memory_tb2.inc
|
||||
}
|
||||
|
||||
if ($engine_myisam)
|
||||
{
|
||||
--source suite/funcs_1/include/myisam_tb1.inc
|
||||
--source suite/funcs_1/include/myisam_tb2.inc
|
||||
--source suite/funcs_1/include/myisam_tb3.inc
|
||||
--source suite/funcs_1/include/myisam_tb4.inc
|
||||
USE test1;
|
||||
--source suite/funcs_1/include/myisam_tb2.inc
|
||||
}
|
||||
USE test;
|
||||
--source suite/funcs_1/include/sp_tb.inc
|
||||
}
|
3909
mysql-test/suite/funcs_1/datadict/datadict_master.inc
Normal file
3909
mysql-test/suite/funcs_1/datadict/datadict_master.inc
Normal file
File diff suppressed because it is too large
Load diff
56
mysql-test/suite/funcs_1/datadict/datadict_show_schema.inc
Normal file
56
mysql-test/suite/funcs_1/datadict/datadict_show_schema.inc
Normal file
|
@ -0,0 +1,56 @@
|
|||
#### suite/funcs_1/datadict/datadict_show_schema.test
|
||||
|
||||
# shows content of tables from INFORMATION_SCHEMA
|
||||
|
||||
# usage:
|
||||
|
||||
# let $message= <a message for the .result file>;
|
||||
# let $dbname= <prefix_of_a_cb_name>;
|
||||
# --source suite/funcs_1/datadict/datadict_show_schema.test
|
||||
|
||||
--source include/show_msg.inc
|
||||
|
||||
eval select *
|
||||
from information_schema.schemata
|
||||
where schema_name like '$dbname%';
|
||||
|
||||
eval select table_catalog, table_schema, engine
|
||||
from information_schema.tables
|
||||
where table_schema like '$dbname%';
|
||||
|
||||
eval select *
|
||||
from information_schema.columns
|
||||
where table_schema like '$dbname%';
|
||||
|
||||
eval select table_schema, table_name, is_updatable
|
||||
from information_schema.views
|
||||
where table_schema like '$dbname%';
|
||||
|
||||
eval select routine_name, routine_type, security_type, sql_mode
|
||||
from information_schema.routines
|
||||
where routine_schema like '$dbname%';
|
||||
|
||||
eval select table_name, index_schema, index_name, index_type
|
||||
from information_schema.statistics
|
||||
where table_schema like '$dbname%';
|
||||
|
||||
--replace_result $SERVER_NAME <SERVER_NAME>
|
||||
eval select *
|
||||
from information_schema.user_privileges;
|
||||
# where grantee="'u_6_401013'@'%'";
|
||||
|
||||
eval select *
|
||||
from information_schema.column_privileges
|
||||
where table_schema like '$dbname%';
|
||||
|
||||
eval select *
|
||||
from information_schema.table_privileges
|
||||
where table_schema like '$dbname%';
|
||||
|
||||
eval select *
|
||||
from information_schema.key_column_usage
|
||||
where table_schema like '$dbname%';
|
||||
|
||||
eval SELECT *
|
||||
FROM information_schema.triggers
|
||||
WHERE trigger_schema LIKE '$dbname%';
|
|
@ -0,0 +1,28 @@
|
|||
#### suite/funcs_1/datadict/datadict_show_table_design.test
|
||||
#
|
||||
# - shows design of *one* table from INFORMATION_SCHEMA
|
||||
# - used to have identical 'view' on all tested tables
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# let $is_table= <name of one of the tables>;
|
||||
# --source suite/funcs_1/datadict/datadict_show_table_design.test
|
||||
|
||||
USE information_schema;
|
||||
|
||||
--source suite/funcs_1/datadict/datadict_bug_12777.inc
|
||||
eval DESC $is_table;
|
||||
|
||||
--source suite/funcs_1/datadict/datadict_bug_12777.inc
|
||||
eval SHOW CREATE TABLE $is_table;
|
||||
|
||||
eval SELECT COUNT(*) FROM information_schema.columns
|
||||
WHERE table_schema = 'information_schema'
|
||||
AND table_name = '$is_table'
|
||||
ORDER BY ordinal_position;
|
||||
|
||||
--source suite/funcs_1/datadict/datadict_bug_12777.inc
|
||||
eval SELECT * FROM information_schema.columns
|
||||
WHERE table_schema = 'information_schema'
|
||||
AND table_name = '$is_table'
|
||||
ORDER BY ordinal_position;
|
62
mysql-test/suite/funcs_1/datadict/datadict_tables.inc
Normal file
62
mysql-test/suite/funcs_1/datadict/datadict_tables.inc
Normal file
|
@ -0,0 +1,62 @@
|
|||
#### suite/funcs_1/datadict/datadict_tables.inc
|
||||
|
||||
# contains all tables from INFORMATION_SCHEMA
|
||||
|
||||
# usage:
|
||||
|
||||
# --source suite/funcs_1/datadict/datadict_tables.inc
|
||||
|
||||
--source include/show_msg.inc
|
||||
|
||||
eval $dd_part1 schemata $dd_part2;
|
||||
|
||||
#FIXME: splitting the "SELECT * FROM tables" in two parts until
|
||||
#FIXME: Bug #12397: wrong values shown in column CREATE_OPTIONS of INFORMATION_SCHEMA.TABLES
|
||||
#FIXME: is solved, like done in the _master.test, cannot be done here, so we replace here
|
||||
#FIXME: the result for ALL rows.
|
||||
# 9 AVG_ROW_LENGTH
|
||||
# 10 DATA_LENGTH
|
||||
# 11 MAX_DATA_LENGTH
|
||||
## 12 INDEX_LENGTH
|
||||
# 13 DATA_FREE
|
||||
# 15 CREATE_TIME
|
||||
# 16 UPDATE_TIME
|
||||
# 20 CREATE_OPTIONS
|
||||
--replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 20 "#CO#"
|
||||
eval $dd_part1 tables $dd_part2;
|
||||
|
||||
--source suite/funcs_1/datadict/datadict_bug_12777.inc
|
||||
eval $dd_part1 columns $dd_part2;
|
||||
eval $dd_part1 character_sets $dd_part2;
|
||||
eval $dd_part1 collations $dd_part2;
|
||||
eval $dd_part1 collation_character_set_applicability $dd_part2;
|
||||
--replace_column 16 <Created> 17 <Last_Altered>
|
||||
eval $dd_part1 routines $dd_part2;
|
||||
eval $dd_part1 statistics $dd_part2;
|
||||
eval $dd_part1 views $dd_part2;
|
||||
eval $dd_part1 user_privileges $dd_part2;
|
||||
eval $dd_part1 schema_privileges $dd_part2;
|
||||
eval $dd_part1 table_privileges $dd_part2;
|
||||
eval $dd_part1 column_privileges $dd_part2;
|
||||
eval $dd_part1 table_constraints $dd_part2;
|
||||
eval $dd_part1 key_column_usage $dd_part2;
|
||||
eval $dd_part1 triggers $dd_part2;
|
||||
|
||||
# later planned new tables for INFORMATION_SCHEMA (not before version 5.0.11)
|
||||
#
|
||||
# (see Reference Manual: 22.1.16. Other INFORMATION_SCHEMA Tables):
|
||||
#
|
||||
# parameters
|
||||
# referential_constraints
|
||||
#
|
||||
# check them here although they currently does not exist, but using this we
|
||||
# immedeatly get notice when they are implemented
|
||||
|
||||
#### DON'T FORGET TO ADD THE NEW TABLES TO THE CORRESPONDING FILES
|
||||
#### datadict_tables_error_<errno>.test !
|
||||
|
||||
--error 1109
|
||||
eval $dd_part1 parameters $dd_part2;
|
||||
|
||||
--error 0,1109
|
||||
eval $dd_part1 referential_constraints $dd_part2;
|
33
mysql-test/suite/funcs_1/datadict/datadict_tables_error.inc
Normal file
33
mysql-test/suite/funcs_1/datadict/datadict_tables_error.inc
Normal file
|
@ -0,0 +1,33 @@
|
|||
#### suite/funcs_1/datadict/datadict_tables.inc
|
||||
|
||||
# contains all tables from INFORMATION_SCHEMA
|
||||
|
||||
# usage:
|
||||
|
||||
# --source suite/funcs_1/datadict/datadict_tables.inc
|
||||
|
||||
|
||||
#--disable_query_log
|
||||
#eval SET @aux= 'This testcase shows the error number $error_no';
|
||||
#let $message= `SELECT @aux`;
|
||||
#--enable_query_log
|
||||
--source include/show_msg.inc
|
||||
|
||||
--disable_abort_on_error
|
||||
eval $dd_part1 schemata $dd_part2;
|
||||
eval $dd_part1 tables $dd_part2;
|
||||
eval $dd_part1 columns $dd_part2;
|
||||
eval $dd_part1 character_sets $dd_part2;
|
||||
eval $dd_part1 collations $dd_part2;
|
||||
eval $dd_part1 collation_character_set_applicability $dd_part2;
|
||||
eval $dd_part1 routines $dd_part2;
|
||||
eval $dd_part1 statistics $dd_part2;
|
||||
eval $dd_part1 views $dd_part2;
|
||||
eval $dd_part1 user_privileges $dd_part2;
|
||||
eval $dd_part1 schema_privileges $dd_part2;
|
||||
eval $dd_part1 table_privileges $dd_part2;
|
||||
eval $dd_part1 column_privileges $dd_part2;
|
||||
eval $dd_part1 table_constraints $dd_part2;
|
||||
eval $dd_part1 key_column_usage $dd_part2;
|
||||
eval $dd_part1 triggers $dd_part2;
|
||||
--enable_abort_on_error
|
|
@ -0,0 +1,80 @@
|
|||
#### suite/funcs_1/datadict/datadict_tables.inc
|
||||
|
||||
# contains all tables from INFORMATION_SCHEMA
|
||||
|
||||
# usage:
|
||||
|
||||
# --source suite/funcs_1/datadict/datadict_tables_err_<no>.inc
|
||||
#
|
||||
# up to a change of "mysqltest", which makes lines like "eval --error $err_no"
|
||||
# possible we will have some different files with the same content except the
|
||||
# error numbers.
|
||||
|
||||
--source include/show_msg.inc
|
||||
|
||||
let $message= known error 1 (Can_t create/write to file ...):;
|
||||
--source include/show_msg.inc
|
||||
|
||||
--replace_result '\\' '/'
|
||||
--error 1
|
||||
eval $dd_part1 schemata $dd_part2;
|
||||
|
||||
--replace_result '\\' '/'
|
||||
--error 1
|
||||
eval $dd_part1 tables $dd_part2;
|
||||
|
||||
--replace_result '\\' '/'
|
||||
--error 1
|
||||
eval $dd_part1 columns $dd_part2;
|
||||
|
||||
--replace_result '\\' '/'
|
||||
--error 1
|
||||
eval $dd_part1 character_sets $dd_part2;
|
||||
|
||||
--replace_result '\\' '/'
|
||||
--error 1
|
||||
eval $dd_part1 collations $dd_part2;
|
||||
|
||||
--replace_result '\\' '/'
|
||||
--error 1
|
||||
eval $dd_part1 collation_character_set_applicability $dd_part2;
|
||||
|
||||
--replace_result '\\' '/'
|
||||
--error 1
|
||||
eval $dd_part1 routines $dd_part2;
|
||||
|
||||
--replace_result '\\' '/'
|
||||
--error 1
|
||||
eval $dd_part1 statistics $dd_part2;
|
||||
|
||||
--replace_result '\\' '/'
|
||||
--error 1
|
||||
eval $dd_part1 views $dd_part2;
|
||||
|
||||
--replace_result '\\' '/'
|
||||
--error 1
|
||||
eval $dd_part1 user_privileges $dd_part2;
|
||||
|
||||
--replace_result '\\' '/'
|
||||
--error 1
|
||||
eval $dd_part1 schema_privileges $dd_part2;
|
||||
|
||||
--replace_result '\\' '/'
|
||||
--error 1
|
||||
eval $dd_part1 table_privileges $dd_part2;
|
||||
|
||||
--replace_result '\\' '/'
|
||||
--error 1
|
||||
eval $dd_part1 column_privileges $dd_part2;
|
||||
|
||||
--replace_result '\\' '/'
|
||||
--error 1
|
||||
eval $dd_part1 table_constraints $dd_part2;
|
||||
|
||||
--replace_result '\\' '/'
|
||||
--error 1
|
||||
eval $dd_part1 key_column_usage $dd_part2;
|
||||
|
||||
--replace_result '\\' '/'
|
||||
--error 1
|
||||
eval $dd_part1 triggers $dd_part2;
|
|
@ -0,0 +1,51 @@
|
|||
#### suite/funcs_1/datadict/datadict_tables_error_1044.inc
|
||||
|
||||
# contains all tables from INFORMATION_SCHEMA
|
||||
|
||||
# usage:
|
||||
|
||||
# --source suite/funcs_1/datadict/datadict_tables_err_<no>.inc
|
||||
#
|
||||
# up to a change of "mysqltest", which makes lines like "eval --error $err_no"
|
||||
# possible we will have some different files with the same content except the
|
||||
# error numbers.
|
||||
|
||||
--source include/show_msg.inc
|
||||
|
||||
# e.g.: ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
|
||||
|
||||
let $message= known error 1044 (ERROR 42000: Access denied for user ... to database ...):;
|
||||
--source include/show_msg.inc
|
||||
|
||||
--error 1044
|
||||
eval $dd_part1 schemata $dd_part2;
|
||||
--error 1044
|
||||
eval $dd_part1 tables $dd_part2;
|
||||
--error 1044
|
||||
eval $dd_part1 columns $dd_part2;
|
||||
--error 1044
|
||||
eval $dd_part1 character_sets $dd_part2;
|
||||
--error 1044
|
||||
eval $dd_part1 collations $dd_part2;
|
||||
--error 1044
|
||||
eval $dd_part1 collation_character_set_applicability $dd_part2;
|
||||
--error 1044
|
||||
eval $dd_part1 routines $dd_part2;
|
||||
--error 1044
|
||||
eval $dd_part1 statistics $dd_part2;
|
||||
--error 1044
|
||||
eval $dd_part1 views $dd_part2;
|
||||
--error 1044
|
||||
eval $dd_part1 user_privileges $dd_part2;
|
||||
--error 1044
|
||||
eval $dd_part1 schema_privileges $dd_part2;
|
||||
--error 1044
|
||||
eval $dd_part1 table_privileges $dd_part2;
|
||||
--error 1044
|
||||
eval $dd_part1 column_privileges $dd_part2;
|
||||
--error 1044
|
||||
eval $dd_part1 table_constraints $dd_part2;
|
||||
--error 1044
|
||||
eval $dd_part1 key_column_usage $dd_part2;
|
||||
--error 1044
|
||||
eval $dd_part1 triggers $dd_part2;
|
|
@ -0,0 +1,49 @@
|
|||
#### suite/funcs_1/datadict/datadict_tables.inc
|
||||
|
||||
# contains all tables from INFORMATION_SCHEMA
|
||||
|
||||
# usage:
|
||||
|
||||
# --source suite/funcs_1/datadict/datadict_tables_err_<no>.inc
|
||||
#
|
||||
# up to a change of "mysqltest", which makes lines like "eval --error $err_no"
|
||||
# possible we will have some different files with the same content except the
|
||||
# error numbers.
|
||||
|
||||
--source include/show_msg.inc
|
||||
|
||||
let $message= known error 1049 (ERROR 42000: Unknown database ...):;
|
||||
--source include/show_msg.inc
|
||||
|
||||
--error 1049
|
||||
eval $dd_part1 schemata $dd_part2;
|
||||
--error 1049
|
||||
eval $dd_part1 tables $dd_part2;
|
||||
--error 1049
|
||||
eval $dd_part1 columns $dd_part2;
|
||||
--error 1049
|
||||
eval $dd_part1 character_sets $dd_part2;
|
||||
--error 1049
|
||||
eval $dd_part1 collations $dd_part2;
|
||||
--error 1049
|
||||
eval $dd_part1 collation_character_set_applicability $dd_part2;
|
||||
--error 1049
|
||||
eval $dd_part1 routines $dd_part2;
|
||||
--error 1049
|
||||
eval $dd_part1 statistics $dd_part2;
|
||||
--error 1049
|
||||
eval $dd_part1 views $dd_part2;
|
||||
--error 1049
|
||||
eval $dd_part1 user_privileges $dd_part2;
|
||||
--error 1049
|
||||
eval $dd_part1 schema_privileges $dd_part2;
|
||||
--error 1049
|
||||
eval $dd_part1 table_privileges $dd_part2;
|
||||
--error 1049
|
||||
eval $dd_part1 column_privileges $dd_part2;
|
||||
--error 1049
|
||||
eval $dd_part1 table_constraints $dd_part2;
|
||||
--error 1049
|
||||
eval $dd_part1 key_column_usage $dd_part2;
|
||||
--error 1049
|
||||
eval $dd_part1 triggers $dd_part2;
|
|
@ -0,0 +1,49 @@
|
|||
#### suite/funcs_1/datadict/datadict_tables.inc
|
||||
|
||||
# contains all tables from INFORMATION_SCHEMA
|
||||
|
||||
# usage:
|
||||
|
||||
# --source suite/funcs_1/datadict/datadict_tables_err_<no>.inc
|
||||
#
|
||||
# up to a change of "mysqltest", which makes lines like "eval --error $err_no"
|
||||
# possible we will have some different files with the same content except the
|
||||
# error numbers.
|
||||
|
||||
--source include/show_msg.inc
|
||||
|
||||
let $message= known error 1051:;
|
||||
--source include/show_msg.inc
|
||||
|
||||
--error 1051
|
||||
eval $dd_part1 schemata $dd_part2;
|
||||
--error 1051
|
||||
eval $dd_part1 tables $dd_part2;
|
||||
--error 1051
|
||||
eval $dd_part1 columns $dd_part2;
|
||||
--error 1051
|
||||
eval $dd_part1 character_sets $dd_part2;
|
||||
--error 1051
|
||||
eval $dd_part1 collations $dd_part2;
|
||||
--error 1051
|
||||
eval $dd_part1 collation_character_set_applicability $dd_part2;
|
||||
--error 1051
|
||||
eval $dd_part1 routines $dd_part2;
|
||||
--error 1051
|
||||
eval $dd_part1 statistics $dd_part2;
|
||||
--error 1051
|
||||
eval $dd_part1 views $dd_part2;
|
||||
--error 1051
|
||||
eval $dd_part1 user_privileges $dd_part2;
|
||||
--error 1051
|
||||
eval $dd_part1 schema_privileges $dd_part2;
|
||||
--error 1051
|
||||
eval $dd_part1 table_privileges $dd_part2;
|
||||
--error 1051
|
||||
eval $dd_part1 column_privileges $dd_part2;
|
||||
--error 1051
|
||||
eval $dd_part1 table_constraints $dd_part2;
|
||||
--error 1051
|
||||
eval $dd_part1 key_column_usage $dd_part2;
|
||||
--error 1051
|
||||
eval $dd_part1 triggers $dd_part2;
|
|
@ -0,0 +1,49 @@
|
|||
#### suite/funcs_1/datadict/datadict_tables.inc
|
||||
|
||||
# contains all tables from INFORMATION_SCHEMA
|
||||
|
||||
# usage:
|
||||
|
||||
# --source suite/funcs_1/datadict/datadict_tables_err_<no>.inc
|
||||
#
|
||||
# up to a change of "mysqltest", which makes lines like "eval --error $err_no"
|
||||
# possible we will have some different files with the same content except the
|
||||
# error numbers.
|
||||
|
||||
--source include/show_msg.inc
|
||||
|
||||
let $message= known error 1146:;
|
||||
--source include/show_msg.inc
|
||||
|
||||
--error 1146
|
||||
eval $dd_part1 schemata $dd_part2;
|
||||
--error 1146
|
||||
eval $dd_part1 tables $dd_part2;
|
||||
--error 1146
|
||||
eval $dd_part1 columns $dd_part2;
|
||||
--error 1146
|
||||
eval $dd_part1 character_sets $dd_part2;
|
||||
--error 1146
|
||||
eval $dd_part1 collations $dd_part2;
|
||||
--error 1146
|
||||
eval $dd_part1 collation_character_set_applicability $dd_part2;
|
||||
--error 1146
|
||||
eval $dd_part1 routines $dd_part2;
|
||||
--error 1146
|
||||
eval $dd_part1 statistics $dd_part2;
|
||||
--error 1146
|
||||
eval $dd_part1 views $dd_part2;
|
||||
--error 1146
|
||||
eval $dd_part1 user_privileges $dd_part2;
|
||||
--error 1146
|
||||
eval $dd_part1 schema_privileges $dd_part2;
|
||||
--error 1146
|
||||
eval $dd_part1 table_privileges $dd_part2;
|
||||
--error 1146
|
||||
eval $dd_part1 column_privileges $dd_part2;
|
||||
--error 1146
|
||||
eval $dd_part1 table_constraints $dd_part2;
|
||||
--error 1146
|
||||
eval $dd_part1 key_column_usage $dd_part2;
|
||||
--error 1146
|
||||
eval $dd_part1 triggers $dd_part2;
|
|
@ -0,0 +1,49 @@
|
|||
#### suite/funcs_1/datadict/datadict_tables.inc
|
||||
|
||||
# contains all tables from INFORMATION_SCHEMA
|
||||
|
||||
# usage:
|
||||
|
||||
# --source suite/funcs_1/datadict/datadict_tables_err_<no>.inc
|
||||
#
|
||||
# up to a change of "mysqltest", which makes lines like "eval --error $err_no"
|
||||
# possible we will have some different files with the same content except the
|
||||
# error numbers.
|
||||
|
||||
--source include/show_msg.inc
|
||||
|
||||
let $message= known error 1288:;
|
||||
--source include/show_msg.inc
|
||||
|
||||
--error 1288
|
||||
eval $dd_part1 schemata $dd_part2;
|
||||
--error 1288
|
||||
eval $dd_part1 tables $dd_part2;
|
||||
--error 1288
|
||||
eval $dd_part1 columns $dd_part2;
|
||||
--error 1288
|
||||
eval $dd_part1 character_sets $dd_part2;
|
||||
--error 1288
|
||||
eval $dd_part1 collations $dd_part2;
|
||||
--error 1288
|
||||
eval $dd_part1 collation_character_set_applicability $dd_part2;
|
||||
--error 1288
|
||||
eval $dd_part1 routines $dd_part2;
|
||||
--error 1288
|
||||
eval $dd_part1 statistics $dd_part2;
|
||||
--error 1288
|
||||
eval $dd_part1 views $dd_part2;
|
||||
--error 1288
|
||||
eval $dd_part1 user_privileges $dd_part2;
|
||||
--error 1288
|
||||
eval $dd_part1 schema_privileges $dd_part2;
|
||||
--error 1288
|
||||
eval $dd_part1 table_privileges $dd_part2;
|
||||
--error 1288
|
||||
eval $dd_part1 column_privileges $dd_part2;
|
||||
--error 1288
|
||||
eval $dd_part1 table_constraints $dd_part2;
|
||||
--error 1288
|
||||
eval $dd_part1 key_column_usage $dd_part2;
|
||||
--error 1288
|
||||
eval $dd_part1 triggers $dd_part2;
|
6
mysql-test/suite/funcs_1/include/create_database.inc
Normal file
6
mysql-test/suite/funcs_1/include/create_database.inc
Normal file
|
@ -0,0 +1,6 @@
|
|||
##### suite/funcs_1/include/create_database.inc
|
||||
|
||||
--disable_warnings
|
||||
eval DROP DATABASE IF EXISTS $new_database;
|
||||
--enable_warnings
|
||||
eval CREATE DATABASE $new_database;
|
10
mysql-test/suite/funcs_1/include/create_user_lowest_priv.inc
Normal file
10
mysql-test/suite/funcs_1/include/create_user_lowest_priv.inc
Normal file
|
@ -0,0 +1,10 @@
|
|||
##### suite/funcs_1/include/create_user_no_priv.inc
|
||||
#
|
||||
# $new_user must contain the name (with @<host> if necessary)
|
||||
#
|
||||
|
||||
--error 0,1396
|
||||
eval DROP USER $new_user;
|
||||
eval CREATE USER $new_user identified by 'PWD';
|
||||
# Just to be sure
|
||||
eval REVOKE ALL PRIVILEGES, GRANT OPTION FROM $new_user;
|
11
mysql-test/suite/funcs_1/include/create_user_no_super.inc
Normal file
11
mysql-test/suite/funcs_1/include/create_user_no_super.inc
Normal file
|
@ -0,0 +1,11 @@
|
|||
##### suite/funcs_1/include/create_user_no_super.inc
|
||||
#
|
||||
# $new_user must contain the name (with @<host> if necessary)
|
||||
# of the user to be created
|
||||
|
||||
--error 0,1396
|
||||
eval DROP USER $new_user;
|
||||
eval CREATE USER $new_user identified by 'PWD';
|
||||
|
||||
eval GRANT ALL ON *.* TO $new_user WITH GRANT OPTION;
|
||||
eval REVOKE SUPER ON *.* FROM $new_user;
|
69
mysql-test/suite/funcs_1/include/innodb_tb1.inc
Normal file
69
mysql-test/suite/funcs_1/include/innodb_tb1.inc
Normal file
|
@ -0,0 +1,69 @@
|
|||
##### suite/funcs_1/include/innodb_tb1.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists tb1 ;
|
||||
--enable_warnings
|
||||
create table tb1 (
|
||||
f1 char(0),
|
||||
f2 char(0) binary,
|
||||
f3 char(0) ascii,
|
||||
f4 tinytext unicode,
|
||||
f5 text,
|
||||
f6 mediumtext,
|
||||
f7 longtext,
|
||||
f8 tinyblob,
|
||||
f9 blob,
|
||||
f10 mediumblob,
|
||||
f11 longblob,
|
||||
f12 binary,
|
||||
f13 tinyint,
|
||||
f14 tinyint unsigned,
|
||||
f15 tinyint zerofill,
|
||||
f16 tinyint unsigned zerofill,
|
||||
f17 smallint,
|
||||
f18 smallint unsigned,
|
||||
f19 smallint zerofill,
|
||||
f20 smallint unsigned zerofill,
|
||||
f21 mediumint,
|
||||
f22 mediumint unsigned,
|
||||
f23 mediumint zerofill,
|
||||
f24 mediumint unsigned zerofill,
|
||||
f25 int,
|
||||
f26 int unsigned,
|
||||
f27 int zerofill,
|
||||
f28 int unsigned zerofill,
|
||||
f29 bigint,
|
||||
f30 bigint unsigned,
|
||||
f31 bigint zerofill,
|
||||
f32 bigint unsigned zerofill,
|
||||
f33 decimal,
|
||||
f34 decimal unsigned,
|
||||
f35 decimal zerofill,
|
||||
f36 decimal unsigned zerofill not null DEFAULT 9.9,
|
||||
f37 decimal (0) not null DEFAULT 9.9,
|
||||
f38 decimal (64) not null DEFAULT 9.9,
|
||||
f39 decimal (0) unsigned not null DEFAULT 9.9,
|
||||
f40 decimal (64) unsigned not null DEFAULT 9.9,
|
||||
f41 decimal (0) zerofill not null DEFAULT 9.9,
|
||||
f42 decimal (64) zerofill not null DEFAULT 9.9,
|
||||
f43 decimal (0) unsigned zerofill not null DEFAULT 9.9,
|
||||
f44 decimal (64) unsigned zerofill not null DEFAULT 9.9,
|
||||
f45 decimal (0,0) not null DEFAULT 9.9,
|
||||
f46 decimal (63,30) not null DEFAULT 9.9,
|
||||
f47 decimal (0,0) unsigned not null DEFAULT 9.9,
|
||||
f48 decimal (63,30) unsigned not null DEFAULT 9.9,
|
||||
f49 decimal (0,0) zerofill not null DEFAULT 9.9,
|
||||
f50 decimal (63,30) zerofill not null DEFAULT 9.9,
|
||||
f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9,
|
||||
f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9,
|
||||
f53 numeric not null DEFAULT 99,
|
||||
f54 numeric unsigned not null DEFAULT 99,
|
||||
f55 numeric zerofill not null DEFAULT 99,
|
||||
f56 numeric unsigned zerofill not null DEFAULT 99,
|
||||
f57 numeric (0) not null DEFAULT 99,
|
||||
f58 numeric (64) not null DEFAULT 99
|
||||
) engine = innodb;
|
||||
|
||||
|
||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
||||
eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb1.txt' into table tb1 ;
|
61
mysql-test/suite/funcs_1/include/innodb_tb2.inc
Normal file
61
mysql-test/suite/funcs_1/include/innodb_tb2.inc
Normal file
|
@ -0,0 +1,61 @@
|
|||
##### suite/funcs_1/include/innodb_tb2.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists tb2 ;
|
||||
--enable_warnings
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
f61 numeric (0) zerofill,
|
||||
f62 numeric (64) zerofill,
|
||||
f63 numeric (0) unsigned zerofill,
|
||||
f64 numeric (64) unsigned zerofill,
|
||||
f65 numeric (0,0),
|
||||
f66 numeric (63,30),
|
||||
f67 numeric (0,0) unsigned,
|
||||
f68 numeric (63,30) unsigned,
|
||||
f69 numeric (0,0) zerofill,
|
||||
f70 numeric (63,30) zerofill,
|
||||
f71 numeric (0,0) unsigned zerofill,
|
||||
f72 numeric (63,30) unsigned zerofill,
|
||||
f73 real,
|
||||
f74 real unsigned,
|
||||
f75 real zerofill,
|
||||
f76 real unsigned zerofill,
|
||||
f77 double default 7.7,
|
||||
f78 double unsigned default 7.7,
|
||||
f79 double zerofill default 7.7,
|
||||
f80 double unsigned zerofill default 8.8,
|
||||
f81 float not null default 8.8,
|
||||
f82 float unsigned not null default 8.8,
|
||||
f83 float zerofill not null default 8.8,
|
||||
f84 float unsigned zerofill not null default 8.8,
|
||||
f85 float(0) not null default 8.8,
|
||||
f86 float(23) not null default 8.8,
|
||||
f87 float(0) unsigned not null default 8.8,
|
||||
f88 float(23) unsigned not null default 8.8,
|
||||
f89 float(0) zerofill not null default 8.8,
|
||||
f90 float(23) zerofill not null default 8.8,
|
||||
f91 float(0) unsigned zerofill not null default 8.8,
|
||||
f92 float(23) unsigned zerofill not null default 8.8,
|
||||
f93 float(24) not null default 8.8,
|
||||
f94 float(53) not null default 8.8,
|
||||
f95 float(24) unsigned not null default 8.8,
|
||||
f96 float(53) unsigned not null default 8.8,
|
||||
f97 float(24) zerofill not null default 8.8,
|
||||
f98 float(53) zerofill not null default 8.8,
|
||||
f99 float(24) unsigned zerofill not null default 8.8,
|
||||
f100 float(53) unsigned zerofill not null default 8.8,
|
||||
f101 date not null default '2000-01-01',
|
||||
f102 time not null default 20,
|
||||
f103 datetime not null default '2/2/2',
|
||||
f104 timestamp not null default 20001231235959,
|
||||
f105 year not null default 2000,
|
||||
f106 year(3) not null default 2000,
|
||||
f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f109 set("1set","2set") not null default "1set"
|
||||
) engine = innodb;
|
||||
|
||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
||||
eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb2.txt' into table tb2 ;
|
68
mysql-test/suite/funcs_1/include/innodb_tb3.inc
Normal file
68
mysql-test/suite/funcs_1/include/innodb_tb3.inc
Normal file
|
@ -0,0 +1,68 @@
|
|||
##### suite/funcs_1/include/innodb_tb3.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists tb3 ;
|
||||
--enable_warnings
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) engine = innodb;
|
||||
|
||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
||||
eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb3.txt' into table tb3 ;
|
68
mysql-test/suite/funcs_1/include/innodb_tb4.inc
Normal file
68
mysql-test/suite/funcs_1/include/innodb_tb4.inc
Normal file
|
@ -0,0 +1,68 @@
|
|||
##### suite/funcs_1/include/innodb_tb4.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists tb4;
|
||||
--enable_warnings
|
||||
create table tb4 (
|
||||
f176 numeric (0) unsigned not null DEFAULT 9,
|
||||
f177 numeric (64) unsigned not null DEFAULT 9,
|
||||
f178 numeric (0) zerofill not null DEFAULT 9,
|
||||
f179 numeric (64) zerofill not null DEFAULT 9,
|
||||
f180 numeric (0) unsigned zerofill not null DEFAULT 9,
|
||||
f181 numeric (64) unsigned zerofill not null DEFAULT 9,
|
||||
f182 numeric (0,0) not null DEFAULT 9,
|
||||
f183 numeric (63,30) not null DEFAULT 9,
|
||||
f184 numeric (0,0) unsigned not null DEFAULT 9,
|
||||
f185 numeric (63,30) unsigned not null DEFAULT 9,
|
||||
f186 numeric (0,0) zerofill not null DEFAULT 9,
|
||||
f187 numeric (63,30) zerofill not null DEFAULT 9,
|
||||
f188 numeric (0,0) unsigned zerofill not null DEFAULT 9,
|
||||
f189 numeric (63,30) unsigned zerofill not null DEFAULT 9,
|
||||
f190 real not null DEFAULT 88.8,
|
||||
f191 real unsigned not null DEFAULT 88.8,
|
||||
f192 real zerofill not null DEFAULT 88.8,
|
||||
f193 real unsigned zerofill not null DEFAULT 88.8,
|
||||
f194 double not null DEFAULT 55.5,
|
||||
f195 double unsigned not null DEFAULT 55.5,
|
||||
f196 double zerofill not null DEFAULT 55.5,
|
||||
f197 double unsigned zerofill not null DEFAULT 55.5,
|
||||
f198 float,
|
||||
f199 float unsigned,
|
||||
f200 float zerofill,
|
||||
f201 float unsigned zerofill,
|
||||
f202 float(0),
|
||||
f203 float(23),
|
||||
f204 float(0) unsigned,
|
||||
f205 float(23) unsigned,
|
||||
f206 float(0) zerofill,
|
||||
f207 float(23) zerofill,
|
||||
f208 float(0) unsigned zerofill,
|
||||
f209 float(23) unsigned zerofill,
|
||||
f210 float(24),
|
||||
f211 float(53),
|
||||
f212 float(24) unsigned,
|
||||
f213 float(53) unsigned,
|
||||
f214 float(24) zerofill,
|
||||
f215 float(53) zerofill,
|
||||
f216 float(24) unsigned zerofill,
|
||||
f217 float(53) unsigned zerofill,
|
||||
f218 date,
|
||||
f219 time,
|
||||
f220 datetime,
|
||||
f221 timestamp,
|
||||
f222 year,
|
||||
f223 year(3),
|
||||
f224 year(4),
|
||||
f225 enum("1enum","2enum"),
|
||||
f226 set("1set","2set"),
|
||||
f235 char(0) unicode,
|
||||
f236 char(90),
|
||||
f237 char(255) ascii,
|
||||
f238 varchar(0),
|
||||
f239 varchar(20000) binary,
|
||||
f240 varchar(2000) unicode,
|
||||
f241 char(100) unicode
|
||||
) engine = innodb;
|
||||
|
||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
||||
eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb4.txt' into table tb4 ;
|
63
mysql-test/suite/funcs_1/include/memory_tb1.inc
Normal file
63
mysql-test/suite/funcs_1/include/memory_tb1.inc
Normal file
|
@ -0,0 +1,63 @@
|
|||
##### suite/funcs_1/include/memory_tb1.inc
|
||||
|
||||
set @@global.max_heap_table_size = 4294967295;
|
||||
set @@session.max_heap_table_size = 4294967295;
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists tb1 ;
|
||||
--enable_warnings
|
||||
create table tb1 (
|
||||
f1 char,
|
||||
f2 char binary,
|
||||
f3 char ascii,
|
||||
f12 binary,
|
||||
f13 tinyint,
|
||||
f14 tinyint unsigned,
|
||||
f15 tinyint zerofill,
|
||||
f16 tinyint unsigned zerofill,
|
||||
f17 smallint,
|
||||
f18 smallint unsigned,
|
||||
f19 smallint zerofill,
|
||||
f20 smallint unsigned zerofill,
|
||||
f21 mediumint,
|
||||
f22 mediumint unsigned,
|
||||
f23 mediumint zerofill,
|
||||
f24 mediumint unsigned zerofill,
|
||||
f25 int,
|
||||
f26 int unsigned,
|
||||
f27 int zerofill,
|
||||
f28 int unsigned zerofill,
|
||||
f29 bigint,
|
||||
f30 bigint unsigned,
|
||||
f31 bigint zerofill,
|
||||
f32 bigint unsigned zerofill,
|
||||
f33 decimal not null DEFAULT 9.9,
|
||||
f34 decimal unsigned not null DEFAULT 9.9,
|
||||
f35 decimal zerofill not null DEFAULT 9.9,
|
||||
f36 decimal unsigned zerofill not null DEFAULT 9.9,
|
||||
f37 decimal (0) not null DEFAULT 9.9,
|
||||
f38 decimal (64) not null DEFAULT 9.9,
|
||||
f39 decimal (0) unsigned not null DEFAULT 9.9,
|
||||
f40 decimal (64) unsigned not null DEFAULT 9.9,
|
||||
f41 decimal (0) zerofill not null DEFAULT 9.9,
|
||||
f42 decimal (64) zerofill not null DEFAULT 9.9,
|
||||
f43 decimal (0) unsigned zerofill not null DEFAULT 9.9,
|
||||
f44 decimal (64) unsigned zerofill not null DEFAULT 9.9,
|
||||
f45 decimal (0,0) not null DEFAULT 9.9,
|
||||
f46 decimal (63,30) not null DEFAULT 9.9,
|
||||
f47 decimal (0,0) unsigned not null DEFAULT 9.9,
|
||||
f48 decimal (63,30) unsigned not null DEFAULT 9.9,
|
||||
f49 decimal (0,0) zerofill not null DEFAULT 9.9,
|
||||
f50 decimal (63,30) zerofill not null DEFAULT 9.9,
|
||||
f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9,
|
||||
f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9,
|
||||
f53 numeric not null DEFAULT 99,
|
||||
f54 numeric unsigned not null DEFAULT 99,
|
||||
f55 numeric zerofill not null DEFAULT 99,
|
||||
f56 numeric unsigned zerofill not null DEFAULT 99,
|
||||
f57 numeric (0) not null DEFAULT 99,
|
||||
f58 numeric (64) not null DEFAULT 99
|
||||
) engine = memory;
|
||||
|
||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
||||
eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb1.txt' into table tb1 ;
|
64
mysql-test/suite/funcs_1/include/memory_tb2.inc
Normal file
64
mysql-test/suite/funcs_1/include/memory_tb2.inc
Normal file
|
@ -0,0 +1,64 @@
|
|||
##### suite/funcs_1/include/memory_tb2.inc
|
||||
|
||||
set @@global.max_heap_table_size = 4294967295;
|
||||
set @@session.max_heap_table_size = 4294967295;
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists tb2 ;
|
||||
--enable_warnings
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
f61 numeric (0) zerofill,
|
||||
f62 numeric (64) zerofill,
|
||||
f63 numeric (0) unsigned zerofill,
|
||||
f64 numeric (64) unsigned zerofill,
|
||||
f65 numeric (0,0),
|
||||
f66 numeric (63,30),
|
||||
f67 numeric (0,0) unsigned,
|
||||
f68 numeric (63,30) unsigned,
|
||||
f69 numeric (0,0) zerofill,
|
||||
f70 numeric (63,30) zerofill,
|
||||
f71 numeric (0,0) unsigned zerofill,
|
||||
f72 numeric (63,30) unsigned zerofill,
|
||||
f73 real,
|
||||
f74 real unsigned,
|
||||
f75 real zerofill,
|
||||
f76 real unsigned zerofill,
|
||||
f77 double default 7.7,
|
||||
f78 double unsigned default 7.7,
|
||||
f79 double zerofill default 7.7,
|
||||
f80 double unsigned zerofill default 8.8,
|
||||
f81 float not null default 8.8,
|
||||
f82 float unsigned not null default 8.8,
|
||||
f83 float zerofill not null default 8.8,
|
||||
f84 float unsigned zerofill not null default 8.8,
|
||||
f85 float(0) not null default 8.8,
|
||||
f86 float(23) not null default 8.8,
|
||||
f87 float(0) unsigned not null default 8.8,
|
||||
f88 float(23) unsigned not null default 8.8,
|
||||
f89 float(0) zerofill not null default 8.8,
|
||||
f90 float(23) zerofill not null default 8.8,
|
||||
f91 float(0) unsigned zerofill not null default 8.8,
|
||||
f92 float(23) unsigned zerofill not null default 8.8,
|
||||
f93 float(24) not null default 8.8,
|
||||
f94 float(53) not null default 8.8,
|
||||
f95 float(24) unsigned not null default 8.8,
|
||||
f96 float(53) unsigned not null default 8.8,
|
||||
f97 float(24) zerofill not null default 8.8,
|
||||
f98 float(53) zerofill not null default 8.8,
|
||||
f99 float(24) unsigned zerofill not null default 8.8,
|
||||
f100 float(53) unsigned zerofill not null default 8.8,
|
||||
f101 date not null default '2000-01-01',
|
||||
f102 time not null default 20,
|
||||
f103 datetime not null default '2/2/2',
|
||||
f104 timestamp not null default 20001231235959,
|
||||
f105 year not null default 2000,
|
||||
f106 year(3) not null default 2000,
|
||||
f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f109 set("1set","2set") not null default "1set"
|
||||
) engine = memory;
|
||||
|
||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
||||
eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb2.txt' into table tb2 ;
|
66
mysql-test/suite/funcs_1/include/memory_tb3.inc
Normal file
66
mysql-test/suite/funcs_1/include/memory_tb3.inc
Normal file
|
@ -0,0 +1,66 @@
|
|||
##### suite/funcs_1/include/memory_tb3.inc
|
||||
|
||||
set @@global.max_heap_table_size = 4294967295;
|
||||
set @@session.max_heap_table_size = 4294967295;
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists tb3;
|
||||
--enable_warnings
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 char(50),
|
||||
f122 char(50),
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) engine = memory;
|
||||
|
||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
||||
eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb3.txt' into table tb3 ;
|
||||
|
70
mysql-test/suite/funcs_1/include/memory_tb4.inc
Normal file
70
mysql-test/suite/funcs_1/include/memory_tb4.inc
Normal file
|
@ -0,0 +1,70 @@
|
|||
##### suite/funcs_1/include/memory_tb4.inc
|
||||
|
||||
set @@global.max_heap_table_size = 4294967295;
|
||||
set @@session.max_heap_table_size = 4294967295;
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists tb4 ;
|
||||
--enable_warnings
|
||||
create table tb4 (
|
||||
f176 numeric (0) unsigned not null DEFAULT 9,
|
||||
f177 numeric (64) unsigned not null DEFAULT 9,
|
||||
f178 numeric (0) zerofill not null DEFAULT 9,
|
||||
f179 numeric (64) zerofill not null DEFAULT 9,
|
||||
f180 numeric (0) unsigned zerofill not null DEFAULT 9,
|
||||
f181 numeric (64) unsigned zerofill not null DEFAULT 9,
|
||||
f182 numeric (0,0) not null DEFAULT 9,
|
||||
f183 numeric (63,30) not null DEFAULT 9,
|
||||
f184 numeric (0,0) unsigned not null DEFAULT 9,
|
||||
f185 numeric (63,30) unsigned not null DEFAULT 9,
|
||||
f186 numeric (0,0) zerofill not null DEFAULT 9,
|
||||
f187 numeric (63,30) zerofill not null DEFAULT 9,
|
||||
f188 numeric (0,0) unsigned zerofill not null DEFAULT 9,
|
||||
f189 numeric (63,30) unsigned zerofill not null DEFAULT 9,
|
||||
f190 real not null DEFAULT 88.8,
|
||||
f191 real unsigned not null DEFAULT 88.8,
|
||||
f192 real zerofill not null DEFAULT 88.8,
|
||||
f193 real unsigned zerofill not null DEFAULT 88.8,
|
||||
f194 double not null DEFAULT 55.5,
|
||||
f195 double unsigned not null DEFAULT 55.5,
|
||||
f196 double zerofill not null DEFAULT 55.5,
|
||||
f197 double unsigned zerofill not null DEFAULT 55.5,
|
||||
f198 float,
|
||||
f199 float unsigned,
|
||||
f200 float zerofill,
|
||||
f201 float unsigned zerofill,
|
||||
f202 float(0),
|
||||
f203 float(23),
|
||||
f204 float(0) unsigned,
|
||||
f205 float(23) unsigned,
|
||||
f206 float(0) zerofill,
|
||||
f207 float(23) zerofill,
|
||||
f208 float(0) unsigned zerofill,
|
||||
f209 float(23) unsigned zerofill,
|
||||
f210 float(24),
|
||||
f211 float(53),
|
||||
f212 float(24) unsigned,
|
||||
f213 float(53) unsigned,
|
||||
f214 float(24) zerofill,
|
||||
f215 float(53) zerofill,
|
||||
f216 float(24) unsigned zerofill,
|
||||
f217 float(53) unsigned zerofill,
|
||||
f218 date,
|
||||
f219 time,
|
||||
f220 datetime,
|
||||
f221 timestamp,
|
||||
f222 year,
|
||||
f223 year(3),
|
||||
f224 year(4),
|
||||
f225 enum("1enum","2enum"),
|
||||
f226 set("1set","2set"),
|
||||
f236 char(95) unicode,
|
||||
f241 char(255) unicode,
|
||||
f237 char(130) binary,
|
||||
f238 varchar(25000) binary,
|
||||
f239 varbinary(0),
|
||||
f240 varchar(1200) unicode
|
||||
) engine = memory;
|
||||
|
||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
||||
eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb4.txt' into table tb4 ;
|
68
mysql-test/suite/funcs_1/include/myisam_tb1.inc
Normal file
68
mysql-test/suite/funcs_1/include/myisam_tb1.inc
Normal file
|
@ -0,0 +1,68 @@
|
|||
##### suite/funcs_1/include/myisam_tb1.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists tb1 ;
|
||||
--enable_warnings
|
||||
create table tb1 (
|
||||
f1 char,
|
||||
f2 char binary,
|
||||
f3 char ascii,
|
||||
f4 tinytext unicode,
|
||||
f5 text,
|
||||
f6 mediumtext,
|
||||
f7 longtext,
|
||||
f8 tinyblob,
|
||||
f9 blob,
|
||||
f10 mediumblob,
|
||||
f11 longblob,
|
||||
f12 binary,
|
||||
f13 tinyint,
|
||||
f14 tinyint unsigned,
|
||||
f15 tinyint zerofill,
|
||||
f16 tinyint unsigned zerofill,
|
||||
f17 smallint,
|
||||
f18 smallint unsigned,
|
||||
f19 smallint zerofill,
|
||||
f20 smallint unsigned zerofill,
|
||||
f21 mediumint,
|
||||
f22 mediumint unsigned,
|
||||
f23 mediumint zerofill,
|
||||
f24 mediumint unsigned zerofill,
|
||||
f25 int,
|
||||
f26 int unsigned,
|
||||
f27 int zerofill,
|
||||
f28 int unsigned zerofill,
|
||||
f29 bigint,
|
||||
f30 bigint unsigned,
|
||||
f31 bigint zerofill,
|
||||
f32 bigint unsigned zerofill,
|
||||
f33 decimal not null DEFAULT 9.9,
|
||||
f34 decimal unsigned not null DEFAULT 9.9,
|
||||
f35 decimal zerofill not null DEFAULT 9.9,
|
||||
f36 decimal unsigned zerofill not null DEFAULT 9.9,
|
||||
f37 decimal (0) not null DEFAULT 9.9,
|
||||
f38 decimal (64) not null DEFAULT 9.9,
|
||||
f39 decimal (0) unsigned not null DEFAULT 9.9,
|
||||
f40 decimal (64) unsigned not null DEFAULT 9.9,
|
||||
f41 decimal (0) zerofill not null DEFAULT 9.9,
|
||||
f42 decimal (64) zerofill not null DEFAULT 9.9,
|
||||
f43 decimal (0) unsigned zerofill not null DEFAULT 9.9,
|
||||
f44 decimal (64) unsigned zerofill not null DEFAULT 9.9,
|
||||
f45 decimal (0,0) not null DEFAULT 9.9,
|
||||
f46 decimal (63,30) not null DEFAULT 9.9,
|
||||
f47 decimal (0,0) unsigned not null DEFAULT 9.9,
|
||||
f48 decimal (63,30) unsigned not null DEFAULT 9.9,
|
||||
f49 decimal (0,0) zerofill not null DEFAULT 9.9,
|
||||
f50 decimal (63,30) zerofill not null DEFAULT 9.9,
|
||||
f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9,
|
||||
f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9,
|
||||
f53 numeric not null DEFAULT 99,
|
||||
f54 numeric unsigned not null DEFAULT 99,
|
||||
f55 numeric zerofill not null DEFAULT 99,
|
||||
f56 numeric unsigned zerofill not null DEFAULT 99,
|
||||
f57 numeric (0) not null DEFAULT 99,
|
||||
f58 numeric (64) not null DEFAULT 99
|
||||
) engine = myisam;
|
||||
|
||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
||||
eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb1.txt' into table tb1 ;
|
80
mysql-test/suite/funcs_1/include/myisam_tb2.inc
Normal file
80
mysql-test/suite/funcs_1/include/myisam_tb2.inc
Normal file
|
@ -0,0 +1,80 @@
|
|||
###### suite/funcs_1/include/myisam_tb2.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists tb2 ;
|
||||
--enable_warnings
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
f61 numeric (0) zerofill,
|
||||
f62 numeric (64) zerofill,
|
||||
f63 numeric (0) unsigned zerofill,
|
||||
f64 numeric (64) unsigned zerofill,
|
||||
f65 numeric (0,0),
|
||||
f66 numeric (63,30),
|
||||
f67 numeric (0,0) unsigned,
|
||||
f68 numeric (63,30) unsigned,
|
||||
f69 numeric (0,0) zerofill,
|
||||
f70 numeric (63,30) zerofill,
|
||||
f71 numeric (0,0) unsigned zerofill,
|
||||
f72 numeric (63,30) unsigned zerofill,
|
||||
f73 real,
|
||||
f74 real unsigned,
|
||||
f75 real zerofill,
|
||||
f76 real unsigned zerofill,
|
||||
f77 double default 7.7,
|
||||
f78 double unsigned default 7.7,
|
||||
f79 double zerofill default 7.7,
|
||||
f80 double unsigned zerofill default 8.8,
|
||||
f81 float not null default 8.8,
|
||||
f82 float unsigned not null default 8.8,
|
||||
f83 float zerofill not null default 8.8,
|
||||
f84 float unsigned zerofill not null default 8.8,
|
||||
f85 float(0) not null default 8.8,
|
||||
f86 float(23) not null default 8.8,
|
||||
f87 float(0) unsigned not null default 8.8,
|
||||
f88 float(23) unsigned not null default 8.8,
|
||||
f89 float(0) zerofill not null default 8.8,
|
||||
f90 float(23) zerofill not null default 8.8,
|
||||
f91 float(0) unsigned zerofill not null default 8.8,
|
||||
f92 float(23) unsigned zerofill not null default 8.8,
|
||||
f93 float(24) not null default 8.8,
|
||||
f94 float(53) not null default 8.8,
|
||||
f95 float(24) unsigned not null default 8.8,
|
||||
f96 float(53) unsigned not null default 8.8,
|
||||
f97 float(24) zerofill not null default 8.8,
|
||||
f98 float(53) zerofill not null default 8.8,
|
||||
f99 float(24) unsigned zerofill not null default 8.8,
|
||||
f100 float(53) unsigned zerofill not null default 8.8,
|
||||
f101 date not null default '2000-01-01',
|
||||
f102 time not null default 20,
|
||||
f103 datetime not null default '2/2/2',
|
||||
f104 timestamp not null default 20001231235959,
|
||||
f105 year not null default 2000,
|
||||
f106 year(3) not null default 2000,
|
||||
f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f109 set("1set","2set") not null default "1set",
|
||||
f110 VARBINARY(64) null,
|
||||
f111 VARBINARY(27) null ,
|
||||
f112 VARBINARY(64) null ,
|
||||
f113 VARBINARY(192) null ,
|
||||
f114 VARBINARY(192) ,
|
||||
f115 VARBINARY(27) null ,
|
||||
f116 VARBINARY(64) null,
|
||||
f117 VARBINARY(192) null
|
||||
) engine = myisam;
|
||||
|
||||
# The original columns. They are replaced by varbinary, because the funcs_1 tests should
|
||||
# not depend on the optional availability of the geometry feature.
|
||||
# f110 geometry null,
|
||||
# f111 point null ,
|
||||
# f112 linestring null ,
|
||||
# f113 polygon null ,
|
||||
# f114 geometrycollection ,
|
||||
# f115 multipoint null ,
|
||||
# f116 multilinestring null,
|
||||
# f117 multipolygon null
|
||||
|
||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
||||
eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb2.txt' into table tb2 ;
|
68
mysql-test/suite/funcs_1/include/myisam_tb3.inc
Normal file
68
mysql-test/suite/funcs_1/include/myisam_tb3.inc
Normal file
|
@ -0,0 +1,68 @@
|
|||
##### suite/funcs_1/include/myisam_tb3.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists tb3 ;
|
||||
--enable_warnings
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) Engine = myisam;
|
||||
|
||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
||||
eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb3.txt' into table tb3 ;
|
88
mysql-test/suite/funcs_1/include/myisam_tb4.inc
Normal file
88
mysql-test/suite/funcs_1/include/myisam_tb4.inc
Normal file
|
@ -0,0 +1,88 @@
|
|||
##### suite/funcs_1/include/myisam_tb4.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists tb4 ;
|
||||
--enable_warnings
|
||||
create table tb4 (
|
||||
f176 numeric (0) unsigned not null DEFAULT 9,
|
||||
f177 numeric (64) unsigned not null DEFAULT 9,
|
||||
f178 numeric (0) zerofill not null DEFAULT 9,
|
||||
f179 numeric (64) zerofill not null DEFAULT 9,
|
||||
f180 numeric (0) unsigned zerofill not null DEFAULT 9,
|
||||
f181 numeric (64) unsigned zerofill not null DEFAULT 9,
|
||||
f182 numeric (0,0) not null DEFAULT 9,
|
||||
f183 numeric (63,30) not null DEFAULT 9,
|
||||
f184 numeric (0,0) unsigned not null DEFAULT 9,
|
||||
f185 numeric (63,30) unsigned not null DEFAULT 9,
|
||||
f186 numeric (0,0) zerofill not null DEFAULT 9,
|
||||
f187 numeric (63,30) zerofill not null DEFAULT 9,
|
||||
f188 numeric (0,0) unsigned zerofill not null DEFAULT 9,
|
||||
f189 numeric (63,30) unsigned zerofill not null DEFAULT 9,
|
||||
f190 real not null DEFAULT 88.8,
|
||||
f191 real unsigned not null DEFAULT 88.8,
|
||||
f192 real zerofill not null DEFAULT 88.8,
|
||||
f193 real unsigned zerofill not null DEFAULT 88.8,
|
||||
f194 double not null DEFAULT 55.5,
|
||||
f195 double unsigned not null DEFAULT 55.5,
|
||||
f196 double zerofill not null DEFAULT 55.5,
|
||||
f197 double unsigned zerofill not null DEFAULT 55.5,
|
||||
f198 float,
|
||||
f199 float unsigned,
|
||||
f200 float zerofill,
|
||||
f201 float unsigned zerofill,
|
||||
f202 float(0),
|
||||
f203 float(23),
|
||||
f204 float(0) unsigned,
|
||||
f205 float(23) unsigned,
|
||||
f206 float(0) zerofill,
|
||||
f207 float(23) zerofill,
|
||||
f208 float(0) unsigned zerofill,
|
||||
f209 float(23) unsigned zerofill,
|
||||
f210 float(24),
|
||||
f211 float(53),
|
||||
f212 float(24) unsigned,
|
||||
f213 float(53) unsigned,
|
||||
f214 float(24) zerofill,
|
||||
f215 float(53) zerofill,
|
||||
f216 float(24) unsigned zerofill,
|
||||
f217 float(53) unsigned zerofill,
|
||||
f218 date,
|
||||
f219 time,
|
||||
f220 datetime,
|
||||
f221 timestamp,
|
||||
f222 year,
|
||||
f223 year(3),
|
||||
f224 year(4),
|
||||
f225 enum("1enum","2enum"),
|
||||
f226 set("1set","2set"),
|
||||
f227 VARBINARY(64),
|
||||
f228 VARBINARY(27),
|
||||
f229 VARBINARY(64),
|
||||
f230 VARBINARY(192),
|
||||
f231 VARBINARY(192),
|
||||
f232 VARBINARY(27),
|
||||
f233 VARBINARY(64),
|
||||
f234 VARBINARY(192),
|
||||
f235 char(255) unicode,
|
||||
f236 char(60) ascii,
|
||||
f237 char(255) binary,
|
||||
f238 varchar(0) binary,
|
||||
f239 varbinary(1000),
|
||||
f240 varchar(120) unicode,
|
||||
f241 char(100) unicode,
|
||||
f242 bit(30)
|
||||
) engine = myisam;
|
||||
|
||||
# The original columns. They are replaced by varbinary, because the funcs_1 tests should
|
||||
# not depend on the optional availability of the geometry feature.
|
||||
# f227 geometry,
|
||||
# f228 point,
|
||||
# f229 linestring,
|
||||
# f230 polygon,
|
||||
# f231 geometrycollection,
|
||||
# f232 multipoint,
|
||||
# f233 multilinestring,
|
||||
# f234 multipolygon,
|
||||
|
||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
||||
eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb4.txt' into table tb4 ;
|
69
mysql-test/suite/funcs_1/include/ndb_tb1.inc
Normal file
69
mysql-test/suite/funcs_1/include/ndb_tb1.inc
Normal file
|
@ -0,0 +1,69 @@
|
|||
##### suite/funcs_1/include/ndb_tb1.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists tb1 ;
|
||||
--enable_warnings
|
||||
create table tb1 (
|
||||
f1 char(0),
|
||||
f2 char(0) binary,
|
||||
f3 char(0) ascii,
|
||||
f4 tinytext unicode,
|
||||
f5 text,
|
||||
f6 mediumtext,
|
||||
f7 longtext,
|
||||
f8 tinyblob,
|
||||
f9 blob,
|
||||
f10 mediumblob,
|
||||
f11 longblob,
|
||||
f12 binary,
|
||||
f13 tinyint,
|
||||
f14 tinyint unsigned,
|
||||
f15 tinyint zerofill,
|
||||
f16 tinyint unsigned zerofill,
|
||||
f17 smallint,
|
||||
f18 smallint unsigned,
|
||||
f19 smallint zerofill,
|
||||
f20 smallint unsigned zerofill,
|
||||
f21 mediumint,
|
||||
f22 mediumint unsigned,
|
||||
f23 mediumint zerofill,
|
||||
f24 mediumint unsigned zerofill,
|
||||
f25 int,
|
||||
f26 int unsigned,
|
||||
f27 int zerofill,
|
||||
f28 int unsigned zerofill,
|
||||
f29 bigint,
|
||||
f30 bigint unsigned,
|
||||
f31 bigint zerofill,
|
||||
f32 bigint unsigned zerofill,
|
||||
f33 decimal,
|
||||
f34 decimal unsigned,
|
||||
f35 decimal zerofill,
|
||||
f36 decimal unsigned zerofill not null DEFAULT 9.9,
|
||||
f37 decimal (0) not null DEFAULT 9.9,
|
||||
f38 decimal (64) not null DEFAULT 9.9,
|
||||
f39 decimal (0) unsigned not null DEFAULT 9.9,
|
||||
f40 decimal (64) unsigned not null DEFAULT 9.9,
|
||||
f41 decimal (0) zerofill not null DEFAULT 9.9,
|
||||
f42 decimal (64) zerofill not null DEFAULT 9.9,
|
||||
f43 decimal (0) unsigned zerofill not null DEFAULT 9.9,
|
||||
f44 decimal (64) unsigned zerofill not null DEFAULT 9.9,
|
||||
f45 decimal (0,0) not null DEFAULT 9.9,
|
||||
f46 decimal (63,30) not null DEFAULT 9.9,
|
||||
f47 decimal (0,0) unsigned not null DEFAULT 9.9,
|
||||
f48 decimal (63,30) unsigned not null DEFAULT 9.9,
|
||||
f49 decimal (0,0) zerofill not null DEFAULT 9.9,
|
||||
f50 decimal (63,30) zerofill not null DEFAULT 9.9,
|
||||
f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9,
|
||||
f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9,
|
||||
f53 numeric not null DEFAULT 99,
|
||||
f54 numeric unsigned not null DEFAULT 99,
|
||||
f55 numeric zerofill not null DEFAULT 99,
|
||||
f56 numeric unsigned zerofill not null DEFAULT 99,
|
||||
f57 numeric (0) not null DEFAULT 99,
|
||||
f58 numeric (64) not null DEFAULT 99
|
||||
) engine = ndb;
|
||||
|
||||
|
||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
||||
eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb1.txt' into table tb1 ;
|
61
mysql-test/suite/funcs_1/include/ndb_tb2.inc
Normal file
61
mysql-test/suite/funcs_1/include/ndb_tb2.inc
Normal file
|
@ -0,0 +1,61 @@
|
|||
##### suite/funcs_1/include/ndb_tb2.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists tb2 ;
|
||||
--enable_warnings
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
f61 numeric (0) zerofill,
|
||||
f62 numeric (64) zerofill,
|
||||
f63 numeric (0) unsigned zerofill,
|
||||
f64 numeric (64) unsigned zerofill,
|
||||
f65 numeric (0,0),
|
||||
f66 numeric (63,30),
|
||||
f67 numeric (0,0) unsigned,
|
||||
f68 numeric (63,30) unsigned,
|
||||
f69 numeric (0,0) zerofill,
|
||||
f70 numeric (63,30) zerofill,
|
||||
f71 numeric (0,0) unsigned zerofill,
|
||||
f72 numeric (63,30) unsigned zerofill,
|
||||
f73 real,
|
||||
f74 real unsigned,
|
||||
f75 real zerofill,
|
||||
f76 real unsigned zerofill,
|
||||
f77 double default 7.7,
|
||||
f78 double unsigned default 7.7,
|
||||
f79 double zerofill default 7.7,
|
||||
f80 double unsigned zerofill default 8.8,
|
||||
f81 float not null default 8.8,
|
||||
f82 float unsigned not null default 8.8,
|
||||
f83 float zerofill not null default 8.8,
|
||||
f84 float unsigned zerofill not null default 8.8,
|
||||
f85 float(0) not null default 8.8,
|
||||
f86 float(23) not null default 8.8,
|
||||
f87 float(0) unsigned not null default 8.8,
|
||||
f88 float(23) unsigned not null default 8.8,
|
||||
f89 float(0) zerofill not null default 8.8,
|
||||
f90 float(23) zerofill not null default 8.8,
|
||||
f91 float(0) unsigned zerofill not null default 8.8,
|
||||
f92 float(23) unsigned zerofill not null default 8.8,
|
||||
f93 float(24) not null default 8.8,
|
||||
f94 float(53) not null default 8.8,
|
||||
f95 float(24) unsigned not null default 8.8,
|
||||
f96 float(53) unsigned not null default 8.8,
|
||||
f97 float(24) zerofill not null default 8.8,
|
||||
f98 float(53) zerofill not null default 8.8,
|
||||
f99 float(24) unsigned zerofill not null default 8.8,
|
||||
f100 float(53) unsigned zerofill not null default 8.8,
|
||||
f101 date not null default '2000-01-01',
|
||||
f102 time not null default 20,
|
||||
f103 datetime not null default '2/2/2',
|
||||
f104 timestamp not null default 20001231235959,
|
||||
f105 year not null default 2000,
|
||||
f106 year(3) not null default 2000,
|
||||
f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f109 set("1set","2set") not null default "1set"
|
||||
) engine = innodb;
|
||||
|
||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
||||
eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb2.txt' into table tb2 ;
|
68
mysql-test/suite/funcs_1/include/ndb_tb3.inc
Normal file
68
mysql-test/suite/funcs_1/include/ndb_tb3.inc
Normal file
|
@ -0,0 +1,68 @@
|
|||
##### suite/funcs_1/include/ndb_tb3.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists tb3 ;
|
||||
--enable_warnings
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) engine = ndb;
|
||||
|
||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
||||
eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ;
|
68
mysql-test/suite/funcs_1/include/ndb_tb4.inc
Normal file
68
mysql-test/suite/funcs_1/include/ndb_tb4.inc
Normal file
|
@ -0,0 +1,68 @@
|
|||
##### suite/funcs_1/include/ndb_tb4.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists tb4;
|
||||
--enable_warnings
|
||||
create table tb4 (
|
||||
f176 numeric (0) unsigned not null DEFAULT 9,
|
||||
f177 numeric (64) unsigned not null DEFAULT 9,
|
||||
f178 numeric (0) zerofill not null DEFAULT 9,
|
||||
f179 numeric (64) zerofill not null DEFAULT 9,
|
||||
f180 numeric (0) unsigned zerofill not null DEFAULT 9,
|
||||
f181 numeric (64) unsigned zerofill not null DEFAULT 9,
|
||||
f182 numeric (0,0) not null DEFAULT 9,
|
||||
f183 numeric (63,30) not null DEFAULT 9,
|
||||
f184 numeric (0,0) unsigned not null DEFAULT 9,
|
||||
f185 numeric (63,30) unsigned not null DEFAULT 9,
|
||||
f186 numeric (0,0) zerofill not null DEFAULT 9,
|
||||
f187 numeric (63,30) zerofill not null DEFAULT 9,
|
||||
f188 numeric (0,0) unsigned zerofill not null DEFAULT 9,
|
||||
f189 numeric (63,30) unsigned zerofill not null DEFAULT 9,
|
||||
f190 real not null DEFAULT 88.8,
|
||||
f191 real unsigned not null DEFAULT 88.8,
|
||||
f192 real zerofill not null DEFAULT 88.8,
|
||||
f193 real unsigned zerofill not null DEFAULT 88.8,
|
||||
f194 double not null DEFAULT 55.5,
|
||||
f195 double unsigned not null DEFAULT 55.5,
|
||||
f196 double zerofill not null DEFAULT 55.5,
|
||||
f197 double unsigned zerofill not null DEFAULT 55.5,
|
||||
f198 float,
|
||||
f199 float unsigned,
|
||||
f200 float zerofill,
|
||||
f201 float unsigned zerofill,
|
||||
f202 float(0),
|
||||
f203 float(23),
|
||||
f204 float(0) unsigned,
|
||||
f205 float(23) unsigned,
|
||||
f206 float(0) zerofill,
|
||||
f207 float(23) zerofill,
|
||||
f208 float(0) unsigned zerofill,
|
||||
f209 float(23) unsigned zerofill,
|
||||
f210 float(24),
|
||||
f211 float(53),
|
||||
f212 float(24) unsigned,
|
||||
f213 float(53) unsigned,
|
||||
f214 float(24) zerofill,
|
||||
f215 float(53) zerofill,
|
||||
f216 float(24) unsigned zerofill,
|
||||
f217 float(53) unsigned zerofill,
|
||||
f218 date,
|
||||
f219 time,
|
||||
f220 datetime,
|
||||
f221 timestamp,
|
||||
f222 year,
|
||||
f223 year(3),
|
||||
f224 year(4),
|
||||
f225 enum("1enum","2enum"),
|
||||
f226 set("1set","2set"),
|
||||
f235 char(0) unicode,
|
||||
f236 char(90),
|
||||
f237 char(255) ascii,
|
||||
f238 varchar(0),
|
||||
f239 varchar(3000) binary,
|
||||
f240 varchar(2000) unicode,
|
||||
f241 char(100) unicode
|
||||
) engine = ndb;
|
||||
|
||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
||||
eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb4.txt' into table tb4 ;
|
14
mysql-test/suite/funcs_1/include/show_connection.inc
Normal file
14
mysql-test/suite/funcs_1/include/show_connection.inc
Normal file
|
@ -0,0 +1,14 @@
|
|||
#### suite/funcs_1/include/show_connection.inc
|
||||
#
|
||||
# This file shows the current connection information into the result file
|
||||
# By using the '... AS "" ' an empty line will separate this in the result.
|
||||
#
|
||||
# Usage:
|
||||
# Add the following to any *.test file:
|
||||
# :
|
||||
# --source suite/funcs_1/include/show_connection.inc
|
||||
# :
|
||||
|
||||
--disable_query_log
|
||||
SELECT USER() AS "", DATABASE() AS "";
|
||||
--enable_query_log
|
68
mysql-test/suite/funcs_1/include/sp_tb.inc
Normal file
68
mysql-test/suite/funcs_1/include/sp_tb.inc
Normal file
|
@ -0,0 +1,68 @@
|
|||
--disable_abort_on_error
|
||||
|
||||
# ML: Should be set outside when memory
|
||||
# set @@global.max_heap_table_size=4294967295;
|
||||
# set @@session.max_heap_table_size=4294967295;
|
||||
|
||||
USE test;
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1, t2, t4, t10, t11;
|
||||
--enable_warnings
|
||||
eval CREATE TABLE t1 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = $engine_type;
|
||||
eval CREATE TABLE t2 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = $engine_type;
|
||||
eval CREATE TABLE t4 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = $engine_type;
|
||||
eval CREATE TABLE t10 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = $engine_type;
|
||||
eval CREATE TABLE t11 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = $engine_type;
|
||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
||||
eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t1;
|
||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
||||
eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t2;
|
||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
||||
eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t4;
|
||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
||||
eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t10;
|
||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
||||
eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t11;
|
||||
|
||||
|
||||
--disable_warnings
|
||||
drop TABLE if exists t3;
|
||||
--enable_warnings
|
||||
eval CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = $engine_type;
|
||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
||||
eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' INTO TABLE t3;
|
||||
|
||||
#---------------------------
|
||||
|
||||
--disable_warnings
|
||||
drop database if exists test4;
|
||||
--enable_warnings
|
||||
CREATE database test4;
|
||||
use test4;
|
||||
|
||||
eval CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = $engine_type;
|
||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
||||
eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t6;
|
||||
#---------------------------
|
||||
|
||||
use test;
|
||||
|
||||
--disable_warnings
|
||||
drop TABLE if exists t7, t8;
|
||||
--enable_warnings
|
||||
eval CREATE TABLE t7 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = $engine_type;
|
||||
eval CREATE TABLE t8 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = $engine_type;
|
||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
||||
eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t7;
|
||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
||||
eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t8;
|
||||
|
||||
|
||||
--disable_warnings
|
||||
drop TABLE if exists t9;
|
||||
--enable_warnings
|
||||
eval CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = $engine_type;
|
||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
||||
eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' INTO TABLE t9;
|
||||
|
1247
mysql-test/suite/funcs_1/lib/DataGen_local.pl
Executable file
1247
mysql-test/suite/funcs_1/lib/DataGen_local.pl
Executable file
File diff suppressed because it is too large
Load diff
3960
mysql-test/suite/funcs_1/lib/DataGen_modify.pl
Executable file
3960
mysql-test/suite/funcs_1/lib/DataGen_modify.pl
Executable file
File diff suppressed because it is too large
Load diff
11
mysql-test/suite/funcs_1/r/a_version_check.result
Normal file
11
mysql-test/suite/funcs_1/r/a_version_check.result
Normal file
|
@ -0,0 +1,11 @@
|
|||
|
||||
. Just show the version string for which the results in suite
|
||||
. funcs_1 have been checked.
|
||||
.
|
||||
. I know that the .result file of this check needs to
|
||||
. updated with each new version --- THIS IS INTENDED!
|
||||
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
funcs_1 checked with version: 5.1.16
|
||||
Warnings:
|
||||
Warning 1548 Leading spaces are removed from name ' '
|
15230
mysql-test/suite/funcs_1/r/innodb__datadict.result
Normal file
15230
mysql-test/suite/funcs_1/r/innodb__datadict.result
Normal file
File diff suppressed because it is too large
Load diff
1
mysql-test/suite/funcs_1/r/innodb__load.result
Normal file
1
mysql-test/suite/funcs_1/r/innodb__load.result
Normal file
|
@ -0,0 +1 @@
|
|||
SET @NO_REFRESH = IF( '' = '', 0, 1);
|
67
mysql-test/suite/funcs_1/r/innodb_bitdata.result
Normal file
67
mysql-test/suite/funcs_1/r/innodb_bitdata.result
Normal file
|
@ -0,0 +1,67 @@
|
|||
SET @NO_REFRESH = IF( '' = '', 0, 1);
|
||||
USE test;
|
||||
drop table if exists tb4;
|
||||
create table tb4 (
|
||||
f176 numeric (0) unsigned not null DEFAULT 9,
|
||||
f177 numeric (64) unsigned not null DEFAULT 9,
|
||||
f178 numeric (0) zerofill not null DEFAULT 9,
|
||||
f179 numeric (64) zerofill not null DEFAULT 9,
|
||||
f180 numeric (0) unsigned zerofill not null DEFAULT 9,
|
||||
f181 numeric (64) unsigned zerofill not null DEFAULT 9,
|
||||
f182 numeric (0,0) not null DEFAULT 9,
|
||||
f183 numeric (63,30) not null DEFAULT 9,
|
||||
f184 numeric (0,0) unsigned not null DEFAULT 9,
|
||||
f185 numeric (63,30) unsigned not null DEFAULT 9,
|
||||
f186 numeric (0,0) zerofill not null DEFAULT 9,
|
||||
f187 numeric (63,30) zerofill not null DEFAULT 9,
|
||||
f188 numeric (0,0) unsigned zerofill not null DEFAULT 9,
|
||||
f189 numeric (63,30) unsigned zerofill not null DEFAULT 9,
|
||||
f190 real not null DEFAULT 88.8,
|
||||
f191 real unsigned not null DEFAULT 88.8,
|
||||
f192 real zerofill not null DEFAULT 88.8,
|
||||
f193 real unsigned zerofill not null DEFAULT 88.8,
|
||||
f194 double not null DEFAULT 55.5,
|
||||
f195 double unsigned not null DEFAULT 55.5,
|
||||
f196 double zerofill not null DEFAULT 55.5,
|
||||
f197 double unsigned zerofill not null DEFAULT 55.5,
|
||||
f198 float,
|
||||
f199 float unsigned,
|
||||
f200 float zerofill,
|
||||
f201 float unsigned zerofill,
|
||||
f202 float(0),
|
||||
f203 float(23),
|
||||
f204 float(0) unsigned,
|
||||
f205 float(23) unsigned,
|
||||
f206 float(0) zerofill,
|
||||
f207 float(23) zerofill,
|
||||
f208 float(0) unsigned zerofill,
|
||||
f209 float(23) unsigned zerofill,
|
||||
f210 float(24),
|
||||
f211 float(53),
|
||||
f212 float(24) unsigned,
|
||||
f213 float(53) unsigned,
|
||||
f214 float(24) zerofill,
|
||||
f215 float(53) zerofill,
|
||||
f216 float(24) unsigned zerofill,
|
||||
f217 float(53) unsigned zerofill,
|
||||
f218 date,
|
||||
f219 time,
|
||||
f220 datetime,
|
||||
f221 timestamp,
|
||||
f222 year,
|
||||
f223 year(3),
|
||||
f224 year(4),
|
||||
f225 enum("1enum","2enum"),
|
||||
f226 set("1set","2set"),
|
||||
f235 char(0) unicode,
|
||||
f236 char(90),
|
||||
f237 char(255) ascii,
|
||||
f238 varchar(0),
|
||||
f239 varchar(20000) binary,
|
||||
f240 varchar(2000) unicode,
|
||||
f241 char(100) unicode
|
||||
) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb4.txt' into table tb4 ;
|
||||
|
||||
NOT YET IMPLEMENTED: bitdata tests
|
||||
--------------------------------------------------------------------------------
|
81
mysql-test/suite/funcs_1/r/innodb_cursors.result
Normal file
81
mysql-test/suite/funcs_1/r/innodb_cursors.result
Normal file
|
@ -0,0 +1,81 @@
|
|||
SET @NO_REFRESH = IF( '' = '', 0, 1);
|
||||
USE test;
|
||||
drop table if exists tb1 ;
|
||||
create table tb1 (
|
||||
f1 char(0),
|
||||
f2 char(0) binary,
|
||||
f3 char(0) ascii,
|
||||
f4 tinytext unicode,
|
||||
f5 text,
|
||||
f6 mediumtext,
|
||||
f7 longtext,
|
||||
f8 tinyblob,
|
||||
f9 blob,
|
||||
f10 mediumblob,
|
||||
f11 longblob,
|
||||
f12 binary,
|
||||
f13 tinyint,
|
||||
f14 tinyint unsigned,
|
||||
f15 tinyint zerofill,
|
||||
f16 tinyint unsigned zerofill,
|
||||
f17 smallint,
|
||||
f18 smallint unsigned,
|
||||
f19 smallint zerofill,
|
||||
f20 smallint unsigned zerofill,
|
||||
f21 mediumint,
|
||||
f22 mediumint unsigned,
|
||||
f23 mediumint zerofill,
|
||||
f24 mediumint unsigned zerofill,
|
||||
f25 int,
|
||||
f26 int unsigned,
|
||||
f27 int zerofill,
|
||||
f28 int unsigned zerofill,
|
||||
f29 bigint,
|
||||
f30 bigint unsigned,
|
||||
f31 bigint zerofill,
|
||||
f32 bigint unsigned zerofill,
|
||||
f33 decimal,
|
||||
f34 decimal unsigned,
|
||||
f35 decimal zerofill,
|
||||
f36 decimal unsigned zerofill not null DEFAULT 9.9,
|
||||
f37 decimal (0) not null DEFAULT 9.9,
|
||||
f38 decimal (64) not null DEFAULT 9.9,
|
||||
f39 decimal (0) unsigned not null DEFAULT 9.9,
|
||||
f40 decimal (64) unsigned not null DEFAULT 9.9,
|
||||
f41 decimal (0) zerofill not null DEFAULT 9.9,
|
||||
f42 decimal (64) zerofill not null DEFAULT 9.9,
|
||||
f43 decimal (0) unsigned zerofill not null DEFAULT 9.9,
|
||||
f44 decimal (64) unsigned zerofill not null DEFAULT 9.9,
|
||||
f45 decimal (0,0) not null DEFAULT 9.9,
|
||||
f46 decimal (63,30) not null DEFAULT 9.9,
|
||||
f47 decimal (0,0) unsigned not null DEFAULT 9.9,
|
||||
f48 decimal (63,30) unsigned not null DEFAULT 9.9,
|
||||
f49 decimal (0,0) zerofill not null DEFAULT 9.9,
|
||||
f50 decimal (63,30) zerofill not null DEFAULT 9.9,
|
||||
f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9,
|
||||
f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9,
|
||||
f53 numeric not null DEFAULT 99,
|
||||
f54 numeric unsigned not null DEFAULT 99,
|
||||
f55 numeric zerofill not null DEFAULT 99,
|
||||
f56 numeric unsigned zerofill not null DEFAULT 99,
|
||||
f57 numeric (0) not null DEFAULT 99,
|
||||
f58 numeric (64) not null DEFAULT 99
|
||||
) engine = innodb;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f36' at row 1
|
||||
Note 1265 Data truncated for column 'f37' at row 1
|
||||
Note 1265 Data truncated for column 'f38' at row 1
|
||||
Note 1265 Data truncated for column 'f39' at row 1
|
||||
Note 1265 Data truncated for column 'f40' at row 1
|
||||
Note 1265 Data truncated for column 'f41' at row 1
|
||||
Note 1265 Data truncated for column 'f42' at row 1
|
||||
Note 1265 Data truncated for column 'f43' at row 1
|
||||
Note 1265 Data truncated for column 'f44' at row 1
|
||||
Note 1265 Data truncated for column 'f45' at row 1
|
||||
Note 1265 Data truncated for column 'f47' at row 1
|
||||
Note 1265 Data truncated for column 'f49' at row 1
|
||||
Note 1265 Data truncated for column 'f51' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb1.txt' into table tb1 ;
|
||||
|
||||
NOT YET IMPLEMENTED: cursor tests
|
||||
--------------------------------------------------------------------------------
|
5299
mysql-test/suite/funcs_1/r/innodb_func_view.result
Normal file
5299
mysql-test/suite/funcs_1/r/innodb_func_view.result
Normal file
File diff suppressed because it is too large
Load diff
22088
mysql-test/suite/funcs_1/r/innodb_storedproc.result
Normal file
22088
mysql-test/suite/funcs_1/r/innodb_storedproc.result
Normal file
File diff suppressed because it is too large
Load diff
1395
mysql-test/suite/funcs_1/r/innodb_storedproc_02.result
Normal file
1395
mysql-test/suite/funcs_1/r/innodb_storedproc_02.result
Normal file
File diff suppressed because it is too large
Load diff
490
mysql-test/suite/funcs_1/r/innodb_storedproc_03.result
Normal file
490
mysql-test/suite/funcs_1/r/innodb_storedproc_03.result
Normal file
|
@ -0,0 +1,490 @@
|
|||
|
||||
--source suite/funcs_1/storedproc/load_sp_tb.inc
|
||||
--------------------------------------------------------------------------------
|
||||
SET @@global.max_heap_table_size=4294967295;
|
||||
SET @@session.max_heap_table_size=4294967295;
|
||||
|
||||
--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
|
||||
--------------------------------------------------------------------------------
|
||||
DROP DATABASE IF EXISTS db_storedproc;
|
||||
DROP DATABASE IF EXISTS db_storedproc_1;
|
||||
CREATE DATABASE db_storedproc;
|
||||
CREATE DATABASE db_storedproc_1;
|
||||
USE db_storedproc;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4;
|
||||
USE db_storedproc_1;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6;
|
||||
USE db_storedproc;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
Warning 1265 Data truncated for column 'f3' at row 3
|
||||
Warning 1265 Data truncated for column 'f3' at row 4
|
||||
Warning 1265 Data truncated for column 'f3' at row 5
|
||||
Warning 1265 Data truncated for column 'f3' at row 6
|
||||
Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
Warning 1265 Data truncated for column 'f3' at row 3
|
||||
Warning 1265 Data truncated for column 'f3' at row 4
|
||||
Warning 1265 Data truncated for column 'f3' at row 5
|
||||
Warning 1265 Data truncated for column 'f3' at row 6
|
||||
Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11;
|
||||
|
||||
Section 3.1.3 - Syntax checks for the stored procedure-specific flow
|
||||
control statements IF, CASE, LOOP, LEAVE, ITERATE, REPEAT, WHILE:
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Testcase 3.1.3.7:
|
||||
-----------------
|
||||
|
||||
Ensure that the IF statement acts correctly for all variants, including cases
|
||||
where statements are nested.
|
||||
--------------------------------------------------------------------------------
|
||||
DROP TABLE IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
DROP PROCEDURE IF EXISTS sp9;
|
||||
CREATE TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 CHAR(20), f2 VARCHAR(20), f3 SMALLINT);
|
||||
CREATE PROCEDURE sp9( action char(20), subaction char(20) )
|
||||
BEGIN
|
||||
if action = 'action' then
|
||||
if subaction = 'subaction' then
|
||||
insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'action', 'subaction' , 1);
|
||||
else
|
||||
insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'action', 'none' , 2);
|
||||
END if;
|
||||
else
|
||||
if subaction = 'subaction'
|
||||
then
|
||||
insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'none', 'subaction' , 3);
|
||||
elseif subaction = 'subaction1'
|
||||
then
|
||||
BEGIN
|
||||
insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values ('none', 'subaction1', 4);
|
||||
END;
|
||||
else
|
||||
insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'none', 'none' , 5);
|
||||
END if;
|
||||
END if;
|
||||
END//
|
||||
CALL sp9( 'action', 'subaction' );
|
||||
SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 where f3=1;
|
||||
f1 f2 f3
|
||||
action subaction 1
|
||||
CALL sp9( 'temp', 'subaction' );
|
||||
SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 where f3=3;
|
||||
f1 f2 f3
|
||||
none subaction 3
|
||||
CALL sp9( 'temp', 'subaction1' );
|
||||
SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 where f3=4;
|
||||
f1 f2 f3
|
||||
none subaction1 4
|
||||
CALL sp9( 'action', 'temp' );
|
||||
SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 where f3=2;
|
||||
f1 f2 f3
|
||||
action none 2
|
||||
CALL sp9( 'temp', 'temp' );
|
||||
SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 where f3=5;
|
||||
f1 f2 f3
|
||||
none none 5
|
||||
DROP PROCEDURE sp9;
|
||||
DROP TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
|
||||
Testcase 3.1.3.8.:
|
||||
------------------
|
||||
|
||||
Ensure that the CASE statement acts correctly for all variants, including cases
|
||||
where statements are nested.
|
||||
--------------------------------------------------------------------------------
|
||||
drop table IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
DROP PROCEDURE IF EXISTS sp10;
|
||||
create table res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 char(20), f2 varchar(20), f3 smallint);
|
||||
CREATE PROCEDURE sp10( action char(20), subaction char(20) )
|
||||
BEGIN
|
||||
case action
|
||||
when 'action' then
|
||||
case
|
||||
when subaction = 'subaction_1' then
|
||||
insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'action', 'subaction_2' , 1);
|
||||
when subaction = 'subaction_2' then
|
||||
insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'action', 'subaction_2' , 2);
|
||||
else
|
||||
insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'action', 'none' , 3);
|
||||
END case;
|
||||
else
|
||||
case
|
||||
when subaction = 'subaction_1' then
|
||||
insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'none', 'subaction_1' , 4);
|
||||
when subaction = 'subaction_2' then
|
||||
insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'none', 'subaction_2' , 5);
|
||||
else
|
||||
insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'none', 'none' , 6);
|
||||
END case;
|
||||
END case;
|
||||
END//
|
||||
CALL sp10( 'action', 'subaction_1' );
|
||||
SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
f1 f2 f3
|
||||
action subaction_2 1
|
||||
delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
CALL sp10( 'action', 'subaction_2' );
|
||||
SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
f1 f2 f3
|
||||
action subaction_2 2
|
||||
delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
CALL sp10( 'temp', 'subaction_1' );
|
||||
SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
f1 f2 f3
|
||||
none subaction_1 4
|
||||
delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
CALL sp10( 'temp', 'subaction_2' );
|
||||
SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
f1 f2 f3
|
||||
none subaction_2 5
|
||||
delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
CALL sp10( 'action', 'temp' );
|
||||
SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
f1 f2 f3
|
||||
action none 3
|
||||
delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
CALL sp10( 'temp', 'temp' );
|
||||
SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
f1 f2 f3
|
||||
none none 6
|
||||
DROP PROCEDURE sp10;
|
||||
DROP TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
|
||||
Testcase 3.1.3.9 + 3.1.3.15:
|
||||
----------------------------
|
||||
|
||||
09. Ensure that the LOOP statement acts correctly for all variants, including
|
||||
. cases where statements are nested.
|
||||
15. Ensure that the LEAVE statement acts correctly for all variants, including
|
||||
. cases where statements are nested.
|
||||
--------------------------------------------------------------------------------
|
||||
DROP TABLE IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
DROP PROCEDURE IF EXISTS sp11;
|
||||
CREATE TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 CHAR(20), f2 VARCHAR(20), f3 SMALLINT);
|
||||
CREATE PROCEDURE sp11( )
|
||||
BEGIN
|
||||
declare count1 integer default 1;
|
||||
declare count2 integer default 1;
|
||||
label1: loop
|
||||
if count2 > 3 then leave label1;
|
||||
END if;
|
||||
set count1 = 1;
|
||||
label2: loop
|
||||
if count1 > 4 then leave label2;
|
||||
END if;
|
||||
insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
|
||||
set count1 = count1 + 1;
|
||||
iterate label2;
|
||||
END loop label2;
|
||||
set count2 = count2 + 1;
|
||||
iterate label1;
|
||||
END loop label1;
|
||||
END//
|
||||
CALL sp11();
|
||||
SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
f1 f2 f3
|
||||
xyz pqr 1
|
||||
xyz pqr 2
|
||||
xyz pqr 3
|
||||
xyz pqr 4
|
||||
xyz pqr 1
|
||||
xyz pqr 2
|
||||
xyz pqr 3
|
||||
xyz pqr 4
|
||||
xyz pqr 1
|
||||
xyz pqr 2
|
||||
xyz pqr 3
|
||||
xyz pqr 4
|
||||
DROP PROCEDURE sp11;
|
||||
DROP TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
|
||||
Testcase 3.1.3.16:
|
||||
------------------
|
||||
|
||||
Ensure that the ITERATE statement acts correctly for all variants, including
|
||||
cases where statements are nested.
|
||||
(tests for this testcase are also included in other testcases)
|
||||
--------------------------------------------------------------------------------
|
||||
DROP PROCEDURE IF EXISTS sp31316;
|
||||
CREATE PROCEDURE sp31316( )
|
||||
BEGIN
|
||||
declare count1 integer default 1;
|
||||
declare count2 integer default 1;
|
||||
label1: loop
|
||||
if count2 > 3 then leave label1;
|
||||
END if;
|
||||
set count1 = 1;
|
||||
label2: loop
|
||||
if count1 > 4 then leave label2;
|
||||
END if;
|
||||
insert into temp values( count1, count2);
|
||||
set count1 = count1 + 1;
|
||||
iterate label3;
|
||||
END loop label2;
|
||||
set count2 = count2 + 1;
|
||||
iterate label1;
|
||||
END loop label1;
|
||||
END//
|
||||
ERROR 42000: ITERATE with no matching label: label3
|
||||
|
||||
Testcase 3.1.3.18:
|
||||
------------------
|
||||
|
||||
Ensure that the REPEAT statement acts correctly for all variants, including
|
||||
cases where statements are nested.
|
||||
--------------------------------------------------------------------------------
|
||||
DROP PROCEDURE IF EXISTS sp17;
|
||||
DROP TABLE IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
CREATE TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 CHAR(20), f2 VARCHAR(20), f3 SMALLINT);
|
||||
CREATE PROCEDURE sp17( )
|
||||
BEGIN
|
||||
declare count1 integer default 1;
|
||||
declare count2 integer default 1;
|
||||
repeat
|
||||
set count1 = count1 + 1;
|
||||
set count2 = 1;
|
||||
label1: repeat
|
||||
set count2 = count2 + 1;
|
||||
insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
|
||||
until count2 > 3
|
||||
END repeat label1;
|
||||
until count1 > 3
|
||||
END repeat;
|
||||
END//
|
||||
CALL sp17();
|
||||
SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
f1 f2 f3
|
||||
xyz pqr 2
|
||||
xyz pqr 2
|
||||
xyz pqr 2
|
||||
xyz pqr 3
|
||||
xyz pqr 3
|
||||
xyz pqr 3
|
||||
xyz pqr 4
|
||||
xyz pqr 4
|
||||
xyz pqr 4
|
||||
DROP PROCEDURE sp17;
|
||||
DROP TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
|
||||
Testcase 3.1.3.24:
|
||||
------------------
|
||||
|
||||
Ensure that the WHILE statement acts correctly for all variants, including cases
|
||||
where statements are nested.
|
||||
--------------------------------------------------------------------------------
|
||||
drop table IF EXISTS res_t21;
|
||||
DROP PROCEDURE IF EXISTS sp21;
|
||||
create table res_t21(name text(10), surname blob(20), age_averylongfieldname_averylongname_1234569 smallint);
|
||||
insert into res_t21 values('ashwin', 'mokadam', 25);
|
||||
CREATE PROCEDURE sp21( )
|
||||
BEGIN
|
||||
declare count1 integer default 0;
|
||||
declare count2 integer default 0;
|
||||
while count1 < 3 do
|
||||
BEGIN
|
||||
declare ithisissamevariablename int default 100;
|
||||
SELECT ithisissamevariablename;
|
||||
BEGIN
|
||||
declare ithisissamevariablename int default 200;
|
||||
SELECT ithisissamevariablename;
|
||||
END;
|
||||
set count2 = 0;
|
||||
label1: while count2 < 3 do
|
||||
BEGIN
|
||||
declare count1 integer default 7;
|
||||
set count2 = count2 + 1;
|
||||
insert into res_t21 values( 'xyz' , 'pqr', count2);
|
||||
label2: while count1 < 10 do
|
||||
set count1 = count1 + 1;
|
||||
insert into res_t21 values( 'xyz' , 'pqr', count1);
|
||||
END while label2;
|
||||
END;
|
||||
END while label1;
|
||||
set count1 = count1 + 1;
|
||||
END;
|
||||
END while;
|
||||
END//
|
||||
CALL sp21();
|
||||
ithisissamevariablename
|
||||
100
|
||||
ithisissamevariablename
|
||||
200
|
||||
ithisissamevariablename
|
||||
100
|
||||
ithisissamevariablename
|
||||
200
|
||||
ithisissamevariablename
|
||||
100
|
||||
ithisissamevariablename
|
||||
200
|
||||
SELECT * from res_t21;
|
||||
name surname age_averylongfieldname_averylongname_1234569
|
||||
ashwin mokadam 25
|
||||
xyz pqr 1
|
||||
xyz pqr 8
|
||||
xyz pqr 9
|
||||
xyz pqr 10
|
||||
xyz pqr 2
|
||||
xyz pqr 8
|
||||
xyz pqr 9
|
||||
xyz pqr 10
|
||||
xyz pqr 3
|
||||
xyz pqr 8
|
||||
xyz pqr 9
|
||||
xyz pqr 10
|
||||
xyz pqr 1
|
||||
xyz pqr 8
|
||||
xyz pqr 9
|
||||
xyz pqr 10
|
||||
xyz pqr 2
|
||||
xyz pqr 8
|
||||
xyz pqr 9
|
||||
xyz pqr 10
|
||||
xyz pqr 3
|
||||
xyz pqr 8
|
||||
xyz pqr 9
|
||||
xyz pqr 10
|
||||
xyz pqr 1
|
||||
xyz pqr 8
|
||||
xyz pqr 9
|
||||
xyz pqr 10
|
||||
xyz pqr 2
|
||||
xyz pqr 8
|
||||
xyz pqr 9
|
||||
xyz pqr 10
|
||||
xyz pqr 3
|
||||
xyz pqr 8
|
||||
xyz pqr 9
|
||||
xyz pqr 10
|
||||
DROP PROCEDURE sp21;
|
||||
drop table res_t21;
|
||||
|
||||
Testcase 3.1.3.30:
|
||||
------------------
|
||||
|
||||
Ensure that multiple cases of all possible combinations of the control flow
|
||||
statements, nested within multiple compound statements within a stored
|
||||
procedure, always act correctly and return the expected result.
|
||||
--------------------------------------------------------------------------------
|
||||
DROP TABLE IF EXISTS res_tbl;
|
||||
DROP PROCEDURE IF EXISTS sp31330;
|
||||
create table res_tbl (f1 int, f2 text, f3 blob, f4 date,
|
||||
f5 set('one', 'two', 'three', 'four', 'five') default 'one');
|
||||
CREATE PROCEDURE sp31330 (path int)
|
||||
BEGIN
|
||||
declare count int default 1;
|
||||
declare var1 text;
|
||||
declare var2 blob;
|
||||
declare var3 date;
|
||||
declare var4 set('one', 'two', 'three', 'four', 'five') DEFAULT 'five';
|
||||
case
|
||||
when path=1 then
|
||||
set var3 = '2000-11-09';
|
||||
set var1 = 'flowing through case 1';
|
||||
label1: loop
|
||||
if count > 5 then
|
||||
if var4=1000 then
|
||||
set var2 = 'exiting out of case 1 - invalid SET';
|
||||
END if;
|
||||
if var4='two' then
|
||||
set var2 = 'exiting out of case 1';
|
||||
END if;
|
||||
insert into res_tbl values (1, var1, var2, var3, (count-2));
|
||||
leave label1;
|
||||
elseif count = 5 then
|
||||
set count= count + 2;
|
||||
set var4='two';
|
||||
iterate label1;
|
||||
else
|
||||
set count= count + 1;
|
||||
END if;
|
||||
set var4='one';
|
||||
END loop label1;
|
||||
when path=2 then
|
||||
set var3 = '1989-11-09';
|
||||
set var1 = 'flowing through case 2';
|
||||
set @count3=0;
|
||||
label2: repeat
|
||||
set count=count + 1;
|
||||
set @count2=1;
|
||||
while @count2 <= 5 do
|
||||
set @count2 = @count2 + 1;
|
||||
END while;
|
||||
SELECT @count2;
|
||||
set @count3=@count3 + @count2;
|
||||
until count > 5
|
||||
END repeat label2;
|
||||
set var2 = 'exiting out of case 2';
|
||||
set var4 = count-3;
|
||||
SELECT @count3;
|
||||
insert into res_tbl values (2, var1, var2, var3, var4);
|
||||
ELSE BEGIN
|
||||
set @error_opt='undefined path specified';
|
||||
SELECT @error_opt;
|
||||
END;
|
||||
END case;
|
||||
END//
|
||||
CALL sp31330();
|
||||
ERROR 42000: Incorrect number of arguments for PROCEDURE db_storedproc.sp31330; expected 1, got 0
|
||||
CALL sp31330(1);
|
||||
SELECT * from res_tbl;
|
||||
f1 f2 f3 f4 f5
|
||||
1 flowing through case 1 exiting out of case 1 2000-11-09 one,three
|
||||
CALL sp31330(2);
|
||||
@count2
|
||||
6
|
||||
@count2
|
||||
6
|
||||
@count2
|
||||
6
|
||||
@count2
|
||||
6
|
||||
@count2
|
||||
6
|
||||
@count3
|
||||
30
|
||||
SELECT * from res_tbl;
|
||||
f1 f2 f3 f4 f5
|
||||
1 flowing through case 1 exiting out of case 1 2000-11-09 one,three
|
||||
2 flowing through case 2 exiting out of case 2 1989-11-09 one,two
|
||||
CALL sp31330(4);
|
||||
@error_opt
|
||||
undefined path specified
|
||||
DROP PROCEDURE sp31330;
|
||||
drop table res_tbl;
|
||||
|
||||
--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
|
||||
--------------------------------------------------------------------------------
|
||||
DROP DATABASE IF EXISTS db_storedproc;
|
||||
DROP DATABASE IF EXISTS db_storedproc_1;
|
||||
|
||||
. +++ END OF SCRIPT +++
|
||||
--------------------------------------------------------------------------------
|
399
mysql-test/suite/funcs_1/r/innodb_storedproc_06.result
Normal file
399
mysql-test/suite/funcs_1/r/innodb_storedproc_06.result
Normal file
|
@ -0,0 +1,399 @@
|
|||
|
||||
--source suite/funcs_1/storedproc/load_sp_tb.inc
|
||||
--------------------------------------------------------------------------------
|
||||
SET @@global.max_heap_table_size=4294967295;
|
||||
SET @@session.max_heap_table_size=4294967295;
|
||||
|
||||
--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
|
||||
--------------------------------------------------------------------------------
|
||||
DROP DATABASE IF EXISTS db_storedproc;
|
||||
DROP DATABASE IF EXISTS db_storedproc_1;
|
||||
CREATE DATABASE db_storedproc;
|
||||
CREATE DATABASE db_storedproc_1;
|
||||
USE db_storedproc;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4;
|
||||
USE db_storedproc_1;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6;
|
||||
USE db_storedproc;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
Warning 1265 Data truncated for column 'f3' at row 3
|
||||
Warning 1265 Data truncated for column 'f3' at row 4
|
||||
Warning 1265 Data truncated for column 'f3' at row 5
|
||||
Warning 1265 Data truncated for column 'f3' at row 6
|
||||
Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
Warning 1265 Data truncated for column 'f3' at row 3
|
||||
Warning 1265 Data truncated for column 'f3' at row 4
|
||||
Warning 1265 Data truncated for column 'f3' at row 5
|
||||
Warning 1265 Data truncated for column 'f3' at row 6
|
||||
Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11;
|
||||
|
||||
Section 3.1.6 - Privilege Checks:
|
||||
--------------------------------------------------------------------------------
|
||||
USE db_storedproc_1;
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
|
||||
Testcase 3.1.6.1:
|
||||
-----------------
|
||||
Ensure that no user may create a stored procedure without the GRANT CREATE
|
||||
ROUTINE privilege.
|
||||
--------------------------------------------------------------------------------
|
||||
create user 'user_1'@'localhost';
|
||||
grant all on db_storedproc_1.* to 'user_1'@'localhost';
|
||||
revoke create routine on db_storedproc_1.* from 'user_1'@'localhost';
|
||||
flush privileges;
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
|
||||
|
||||
user_1@localhost db_storedproc_1
|
||||
USE db_storedproc_1;
|
||||
CREATE PROCEDURE sp1(v1 char(20))
|
||||
BEGIN
|
||||
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
|
||||
END//
|
||||
ERROR 42000: Access denied for user 'user_1'@'localhost' to database 'db_storedproc_1'
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
|
||||
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
|
||||
|
||||
user_1@localhost db_storedproc_1
|
||||
USE db_storedproc_1;
|
||||
CREATE PROCEDURE sp1(v1 char(20))
|
||||
BEGIN
|
||||
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
|
||||
END//
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
DROP USER 'user_1'@'localhost';
|
||||
DROP PROCEDURE sp1;
|
||||
|
||||
Testcase 3.1.6.2:
|
||||
-----------------
|
||||
Ensure that root always has the GRANT CREATE ROUTINE privilege.
|
||||
(checked by other testscases)
|
||||
--------------------------------------------------------------------------------
|
||||
grant create routine on db_storedproc_1.* to 'user_1'@'localhost';
|
||||
flush privileges;
|
||||
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
|
||||
|
||||
user_1@localhost db_storedproc_1
|
||||
DROP PROCEDURE IF EXISTS sp3;
|
||||
DROP FUNCTION IF EXISTS fn1;
|
||||
CREATE PROCEDURE sp3(v1 char(20))
|
||||
BEGIN
|
||||
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
|
||||
END//
|
||||
CREATE FUNCTION fn1(v1 int) returns int
|
||||
BEGIN
|
||||
return v1;
|
||||
END//
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
drop user 'user_1'@'localhost';
|
||||
DROP PROCEDURE sp3;
|
||||
DROP FUNCTION fn1;
|
||||
Warnings:
|
||||
Error 1133 Can't find any matching row in the user table
|
||||
Error 1269 Can't revoke all privileges for one or more of the requested users
|
||||
Warning 1405 Failed to revoke all privileges to dropped routine
|
||||
|
||||
Testcase 3.1.6.4:
|
||||
-----------------
|
||||
Ensure that the default security provision of a stored procedure is SQL SECURITY
|
||||
DEFINER.
|
||||
--------------------------------------------------------------------------------
|
||||
CREATE USER 'user_1'@'localhost';
|
||||
grant update on db_storedproc_1.t6 to 'user_1'@'localhost';
|
||||
grant execute on db_storedproc_1.* to 'user_1'@'localhost';
|
||||
flush privileges;
|
||||
USE db_storedproc_1;
|
||||
DROP PROCEDURE IF EXISTS sp4;
|
||||
CREATE PROCEDURE sp4(v1 char(20))
|
||||
BEGIN
|
||||
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
|
||||
END//
|
||||
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
|
||||
|
||||
user_1@localhost db_storedproc_1
|
||||
USE db_storedproc_1;
|
||||
CALL sp4('a');
|
||||
f1 f2 f3 f4 f5 f6
|
||||
SELECT SPECIFIC_NAME, ROUTINE_SCHEMA, ROUTINE_NAME, ROUTINE_TYPE,
|
||||
ROUTINE_BODY, ROUTINE_DEFINITION, IS_DETERMINISTIC,
|
||||
SQL_DATA_ACCESS, SECURITY_TYPE, SQL_MODE, ROUTINE_COMMENT
|
||||
FROM information_schema.routines
|
||||
WHERE routine_schema LIKE 'db_sto%';
|
||||
SPECIFIC_NAME sp4
|
||||
ROUTINE_SCHEMA db_storedproc_1
|
||||
ROUTINE_NAME sp4
|
||||
ROUTINE_TYPE PROCEDURE
|
||||
ROUTINE_BODY SQL
|
||||
ROUTINE_DEFINITION NULL
|
||||
IS_DETERMINISTIC NO
|
||||
SQL_DATA_ACCESS CONTAINS SQL
|
||||
SECURITY_TYPE DEFINER
|
||||
SQL_MODE
|
||||
ROUTINE_COMMENT
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
DROP PROCEDURE sp4;
|
||||
DROP USER 'user_1'@'localhost';
|
||||
|
||||
Testcase 3.1.6.5:
|
||||
-----------------
|
||||
Ensure that a stored procedure defined with SQL SECURITY DEFINER can be
|
||||
called/executed by any user, using only the privileges (including database
|
||||
access privileges) associated with the user who created the stored procedure.
|
||||
--------------------------------------------------------------------------------
|
||||
USE db_storedproc_1;
|
||||
CREATE TABLE t3165 ( c1 char(20), c2 char(20), c3 date);
|
||||
INSERT INTO t3165 VALUES ('inserted', 'outside of SP', NULL);
|
||||
create user 'user_1'@'localhost';
|
||||
create user 'user_2'@'localhost';
|
||||
grant create routine on db_storedproc_1.* to 'user_1'@'localhost';
|
||||
grant SELECT on db_storedproc_1.* to 'user_2'@'localhost';
|
||||
grant execute on db_storedproc_1.* to 'user_2'@'localhost';
|
||||
flush privileges;
|
||||
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
|
||||
|
||||
user_1@localhost db_storedproc_1
|
||||
CREATE PROCEDURE sp5_s_i () sql security definer
|
||||
BEGIN
|
||||
SELECT * from db_storedproc_1.t3165;
|
||||
insert into db_storedproc_1.t3165 values ('inserted', 'from sp5_s_i', 1000);
|
||||
END//
|
||||
CREATE PROCEDURE sp5_sel () sql security definer
|
||||
BEGIN
|
||||
SELECT * from db_storedproc_1.t3165;
|
||||
END//
|
||||
CREATE PROCEDURE sp5_ins () sql security definer
|
||||
BEGIN
|
||||
insert into db_storedproc_1.t3165 values ('inserted', 'from sp5_ins', 1000);
|
||||
END//
|
||||
connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
|
||||
|
||||
user_2@localhost db_storedproc_1
|
||||
CALL sp5_s_i();
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
CALL sp5_ins();
|
||||
ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
CALL sp5_sel();
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
CALL sp5_sel();
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
grant insert on db_storedproc_1.* to 'user_1'@'localhost';
|
||||
flush privileges;
|
||||
|
||||
user_2@localhost db_storedproc_1
|
||||
CALL sp5_s_i();
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
CALL sp5_ins();
|
||||
CALL sp5_sel();
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
CALL sp5_sel();
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
grant SELECT on db_storedproc_1.* to 'user_1'@'localhost';
|
||||
flush privileges;
|
||||
|
||||
user_2@localhost db_storedproc_1
|
||||
CALL sp5_s_i();
|
||||
c1 c2 c3
|
||||
inserted outside of SP NULL
|
||||
inserted from sp5_ins 2000-10-00
|
||||
CALL sp5_ins();
|
||||
CALL sp5_sel();
|
||||
c1 c2 c3
|
||||
inserted outside of SP NULL
|
||||
inserted from sp5_ins 2000-10-00
|
||||
inserted from sp5_s_i 2000-10-00
|
||||
inserted from sp5_ins 2000-10-00
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
REVOKE INSERT on db_storedproc_1.* from 'user_1'@'localhost';
|
||||
flush privileges;
|
||||
|
||||
user_2@localhost db_storedproc_1
|
||||
CALL sp5_s_i();
|
||||
c1 c2 c3
|
||||
inserted outside of SP NULL
|
||||
inserted from sp5_ins 2000-10-00
|
||||
inserted from sp5_s_i 2000-10-00
|
||||
inserted from sp5_ins 2000-10-00
|
||||
ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
CALL sp5_ins();
|
||||
ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
CALL sp5_sel();
|
||||
c1 c2 c3
|
||||
inserted outside of SP NULL
|
||||
inserted from sp5_ins 2000-10-00
|
||||
inserted from sp5_s_i 2000-10-00
|
||||
inserted from sp5_ins 2000-10-00
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
REVOKE SELECT on db_storedproc_1.* from 'user_1'@'localhost';
|
||||
flush privileges;
|
||||
|
||||
user_2@localhost db_storedproc_1
|
||||
CALL sp5_s_i();
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
CALL sp5_ins();
|
||||
ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
CALL sp5_sel();
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
DROP PROCEDURE sp5_s_i;
|
||||
DROP PROCEDURE sp5_sel;
|
||||
DROP PROCEDURE sp5_ins;
|
||||
DROP TABLE t3165;
|
||||
DROP USER 'user_1'@'localhost';
|
||||
DROP USER 'user_2'@'localhost';
|
||||
|
||||
Testcase 3.1.6.6:
|
||||
-----------------
|
||||
Ensure that a stored procedure defined with SQL SECURITY INVOKER can be
|
||||
called/executed by any user, using only the privileges (including database
|
||||
access privileges) associated with the user executing the stored procedure.
|
||||
--------------------------------------------------------------------------------
|
||||
USE db_storedproc_1;
|
||||
CREATE TABLE t3166 ( c1 char(30) );
|
||||
INSERT INTO db_storedproc_1.t3166 VALUES ('inserted outside SP');
|
||||
create user 'user_1'@'localhost';
|
||||
create user 'user_2'@'localhost';
|
||||
GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
|
||||
GRANT SELECT ON db_storedproc_1.* TO 'user_2'@'localhost';
|
||||
GRANT EXECUTE ON db_storedproc_1.* TO 'user_2'@'localhost';
|
||||
FLUSH PRIVILEGES;
|
||||
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
|
||||
|
||||
user_1@localhost db_storedproc_1
|
||||
CREATE PROCEDURE sp3166_s_i () SQL SECURITY INVOKER
|
||||
BEGIN
|
||||
SELECT * from db_storedproc_1.t3166;
|
||||
insert into db_storedproc_1.t3166 values ('inserted from sp3166_s_i');
|
||||
END//
|
||||
CREATE PROCEDURE sp3166_sel () SQL SECURITY INVOKER
|
||||
BEGIN
|
||||
SELECT * from db_storedproc_1.t3166;
|
||||
END//
|
||||
CREATE PROCEDURE sp3166_ins () SQL SECURITY INVOKER
|
||||
BEGIN
|
||||
insert into db_storedproc_1.t3166 values ('inserted from sp3166_ins');
|
||||
END//
|
||||
connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
|
||||
|
||||
user_2@localhost db_storedproc_1
|
||||
CALL sp3166_s_i();
|
||||
c1
|
||||
inserted outside SP
|
||||
ERROR 42000: INSERT command denied to user 'user_2'@'localhost' for table 't3166'
|
||||
CALL sp3166_ins();
|
||||
ERROR 42000: INSERT command denied to user 'user_2'@'localhost' for table 't3166'
|
||||
CALL sp3166_sel();
|
||||
c1
|
||||
inserted outside SP
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
CALL sp3166_sel();
|
||||
c1
|
||||
inserted outside SP
|
||||
GRANT INSERT ON db_storedproc_1.* TO 'user_2'@'localhost';
|
||||
FLUSH PRIVILEGES;
|
||||
connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
|
||||
|
||||
user_2@localhost db_storedproc_1
|
||||
CALL sp3166_s_i();
|
||||
c1
|
||||
inserted outside SP
|
||||
CALL sp3166_ins();
|
||||
CALL sp3166_sel();
|
||||
c1
|
||||
inserted outside SP
|
||||
inserted from sp3166_s_i
|
||||
inserted from sp3166_ins
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
CALL sp3166_sel();
|
||||
c1
|
||||
inserted outside SP
|
||||
inserted from sp3166_s_i
|
||||
inserted from sp3166_ins
|
||||
REVOKE SELECT ON db_storedproc_1.* FROM 'user_2'@'localhost';
|
||||
FLUSH PRIVILEGES;
|
||||
connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
|
||||
|
||||
user_2@localhost db_storedproc_1
|
||||
CALL sp3166_s_i();
|
||||
ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table 't3166'
|
||||
CALL sp3166_ins();
|
||||
CALL sp3166_sel();
|
||||
ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table 't3166'
|
||||
CALL sp3166_s_i();
|
||||
c1
|
||||
inserted outside SP
|
||||
inserted from sp3166_s_i
|
||||
inserted from sp3166_ins
|
||||
inserted from sp3166_ins
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
REVOKE EXECUTE on db_storedproc_1.* FROM 'user_2'@'localhost';
|
||||
FLUSH PRIVILEGES;
|
||||
connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
|
||||
|
||||
user_2@localhost db_storedproc_1
|
||||
CALL sp3166_s_i();
|
||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc_1.sp3166_s_i'
|
||||
CALL sp3166_ins();
|
||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc_1.sp3166_ins'
|
||||
CALL sp3166_sel();
|
||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc_1.sp3166_sel'
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
DROP PROCEDURE sp3166_s_i;
|
||||
DROP PROCEDURE sp3166_sel;
|
||||
DROP PROCEDURE sp3166_ins;
|
||||
DROP TABLE t3166;
|
||||
DROP USER 'user_1'@'localhost';
|
||||
DROP USER 'user_2'@'localhost';
|
||||
|
||||
--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
|
||||
--------------------------------------------------------------------------------
|
||||
DROP DATABASE IF EXISTS db_storedproc;
|
||||
DROP DATABASE IF EXISTS db_storedproc_1;
|
||||
|
||||
. +++ END OF SCRIPT +++
|
||||
--------------------------------------------------------------------------------
|
172
mysql-test/suite/funcs_1/r/innodb_storedproc_07.result
Normal file
172
mysql-test/suite/funcs_1/r/innodb_storedproc_07.result
Normal file
|
@ -0,0 +1,172 @@
|
|||
|
||||
--source suite/funcs_1/storedproc/load_sp_tb.inc
|
||||
--------------------------------------------------------------------------------
|
||||
SET @@global.max_heap_table_size=4294967295;
|
||||
SET @@session.max_heap_table_size=4294967295;
|
||||
|
||||
--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
|
||||
--------------------------------------------------------------------------------
|
||||
DROP DATABASE IF EXISTS db_storedproc;
|
||||
DROP DATABASE IF EXISTS db_storedproc_1;
|
||||
CREATE DATABASE db_storedproc;
|
||||
CREATE DATABASE db_storedproc_1;
|
||||
USE db_storedproc;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4;
|
||||
USE db_storedproc_1;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6;
|
||||
USE db_storedproc;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
Warning 1265 Data truncated for column 'f3' at row 3
|
||||
Warning 1265 Data truncated for column 'f3' at row 4
|
||||
Warning 1265 Data truncated for column 'f3' at row 5
|
||||
Warning 1265 Data truncated for column 'f3' at row 6
|
||||
Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
Warning 1265 Data truncated for column 'f3' at row 3
|
||||
Warning 1265 Data truncated for column 'f3' at row 4
|
||||
Warning 1265 Data truncated for column 'f3' at row 5
|
||||
Warning 1265 Data truncated for column 'f3' at row 6
|
||||
Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11;
|
||||
|
||||
Section 3.1.7 - SQL mode checks:
|
||||
--------------------------------------------------------------------------------
|
||||
USE db_storedproc;
|
||||
|
||||
Testcase 3.1.7.1:
|
||||
-----------------
|
||||
Ensure that the sql_mode setting in effect at the time a stored procedure is
|
||||
created is the same setting under which the stored procedure runs when it is
|
||||
called/executed.
|
||||
--------------------------------------------------------------------------------
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
DROP TABLE IF EXISTS temp_tbl;
|
||||
DROP TABLE IF EXISTS result;
|
||||
CREATE TABLE temp_tbl (f1 tinyint);
|
||||
CREATE TABLE result (f1 text(200), f2 char(20));
|
||||
set @@sql_mode='traditional';
|
||||
SHOW VARIABLES LIKE 'sql_mode';
|
||||
Variable_name Value
|
||||
sql_mode STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER
|
||||
CREATE PROCEDURE sp1()
|
||||
BEGIN
|
||||
declare a tinyint;
|
||||
declare count_ int default 1;
|
||||
declare continue handler for sqlstate '22003' set count_=1000;
|
||||
SHOW VARIABLES LIKE 'sql_mode';
|
||||
SELECT @@sql_mode into @cur_val_sql_mode;
|
||||
insert into temp_tbl values (1000);
|
||||
if count_ = 1000 THEN
|
||||
INSERT INTO result VALUES (@cur_val_sql_mode, 'value restored');
|
||||
ELSE
|
||||
INSERT INTO result VALUES (@cur_val_sql_mode, 'value not restored');
|
||||
END if;
|
||||
END//
|
||||
SHOW CREATE PROCEDURE sp1;
|
||||
Procedure sql_mode Create Procedure
|
||||
sp1 STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER CREATE DEFINER=`root`@`localhost` PROCEDURE `sp1`()
|
||||
BEGIN
|
||||
declare a tinyint;
|
||||
declare count_ int default 1;
|
||||
declare continue handler for sqlstate '22003' set count_=1000;
|
||||
SHOW VARIABLES LIKE 'sql_mode';
|
||||
SELECT @@sql_mode into @cur_val_sql_mode;
|
||||
insert into temp_tbl values (1000);
|
||||
if count_ = 1000 THEN
|
||||
INSERT INTO result VALUES (@cur_val_sql_mode, 'value restored');
|
||||
ELSE
|
||||
INSERT INTO result VALUES (@cur_val_sql_mode, 'value not restored');
|
||||
END if;
|
||||
END
|
||||
set @@sql_mode='';
|
||||
SHOW VARIABLES LIKE 'sql_mode';
|
||||
Variable_name Value
|
||||
sql_mode
|
||||
CALL sp1();
|
||||
Variable_name Value
|
||||
sql_mode STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER
|
||||
SELECT * from result;
|
||||
f1 f2
|
||||
STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER value restored
|
||||
SHOW VARIABLES LIKE 'sql_mode';
|
||||
Variable_name Value
|
||||
sql_mode
|
||||
SELECT @@sql_mode;
|
||||
@@sql_mode
|
||||
|
||||
SET @@sql_mode='TRADITIONAL';
|
||||
DROP PROCEDURE sp1;
|
||||
DROP TABLE temp_tbl;
|
||||
DROP TABLE result;
|
||||
|
||||
Testcase 3.1.7.2:
|
||||
-----------------
|
||||
Ensure that if the sql_mode setting is changed when a stored procedure is run,
|
||||
that the original setting is restored as soon as the stored procedure execution
|
||||
is complete.
|
||||
--------------------------------------------------------------------------------
|
||||
DROP PROCEDURE IF EXISTS sp2;
|
||||
... show initial value
|
||||
SHOW VARIABLES LIKE 'sql_mode';
|
||||
Variable_name Value
|
||||
sql_mode STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER
|
||||
CREATE PROCEDURE sp2()
|
||||
BEGIN
|
||||
SET @@sql_mode='MAXDB';
|
||||
SHOW VARIABLES LIKE 'sql_mode';
|
||||
END//
|
||||
SHOW CREATE PROCEDURE sp2;
|
||||
Procedure sql_mode Create Procedure
|
||||
sp2 STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER CREATE DEFINER=`root`@`localhost` PROCEDURE `sp2`()
|
||||
BEGIN
|
||||
SET @@sql_mode='MAXDB';
|
||||
SHOW VARIABLES LIKE 'sql_mode';
|
||||
END
|
||||
... show value prior calling procedure
|
||||
SHOW VARIABLES LIKE 'sql_mode';
|
||||
Variable_name Value
|
||||
sql_mode STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER
|
||||
... call procedure that changes sql_mode
|
||||
CALL sp2();
|
||||
Variable_name Value
|
||||
sql_mode PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,MAXDB,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER
|
||||
... check whether old value is re-set
|
||||
SHOW VARIABLES LIKE 'sql_mode';
|
||||
Variable_name Value
|
||||
sql_mode STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER
|
||||
DROP PROCEDURE sp2;
|
||||
|
||||
--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
|
||||
--------------------------------------------------------------------------------
|
||||
DROP DATABASE IF EXISTS db_storedproc;
|
||||
DROP DATABASE IF EXISTS db_storedproc_1;
|
||||
|
||||
. +++ END OF SCRIPT +++
|
||||
--------------------------------------------------------------------------------
|
637
mysql-test/suite/funcs_1/r/innodb_storedproc_08.result
Normal file
637
mysql-test/suite/funcs_1/r/innodb_storedproc_08.result
Normal file
|
@ -0,0 +1,637 @@
|
|||
|
||||
--source suite/funcs_1/storedproc/load_sp_tb.inc
|
||||
--------------------------------------------------------------------------------
|
||||
SET @@global.max_heap_table_size=4294967295;
|
||||
SET @@session.max_heap_table_size=4294967295;
|
||||
|
||||
--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
|
||||
--------------------------------------------------------------------------------
|
||||
DROP DATABASE IF EXISTS db_storedproc;
|
||||
DROP DATABASE IF EXISTS db_storedproc_1;
|
||||
CREATE DATABASE db_storedproc;
|
||||
CREATE DATABASE db_storedproc_1;
|
||||
USE db_storedproc;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4;
|
||||
USE db_storedproc_1;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6;
|
||||
USE db_storedproc;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
Warning 1265 Data truncated for column 'f3' at row 3
|
||||
Warning 1265 Data truncated for column 'f3' at row 4
|
||||
Warning 1265 Data truncated for column 'f3' at row 5
|
||||
Warning 1265 Data truncated for column 'f3' at row 6
|
||||
Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
Warning 1265 Data truncated for column 'f3' at row 3
|
||||
Warning 1265 Data truncated for column 'f3' at row 4
|
||||
Warning 1265 Data truncated for column 'f3' at row 5
|
||||
Warning 1265 Data truncated for column 'f3' at row 6
|
||||
Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11;
|
||||
|
||||
Section 3.1.8 - SHOW statement checks:
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Testcase 3.1.8.9:
|
||||
-----------------
|
||||
|
||||
Ensure that all stored procedure changes made with ALTER PROCEDURE or ALTER
|
||||
FUNCTION are properly recorded and displayed when a SHOW CREATE PROCEDURE or
|
||||
SHOW CREATE PROCEDURE STATUS statement, or a SHOW CREATE FUNCTION or SHOW CREATE
|
||||
FUNCTION STATUS statement (respectively) is executed.
|
||||
--------------------------------------------------------------------------------
|
||||
DROP FUNCTION IF EXISTS fn_1;
|
||||
DROP FUNCTION IF EXISTS fn_2;
|
||||
DROP PROCEDURE IF EXISTS sp_1;
|
||||
DROP PROCEDURE IF EXISTS sp_2;
|
||||
CREATE PROCEDURE sp_1 (i1 int)
|
||||
BEGIN
|
||||
set @x=i1;
|
||||
END//
|
||||
CREATE PROCEDURE sp_2 (i1 int) SQL SECURITY INVOKER COMMENT 'created with INVOKER'
|
||||
BEGIN
|
||||
set @x=i1;
|
||||
END//
|
||||
CREATE FUNCTION fn_1 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) returns year
|
||||
BEGIN
|
||||
set @x=i1;
|
||||
set @y=@x;
|
||||
return i4;
|
||||
END//
|
||||
CREATE FUNCTION fn_2 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real)
|
||||
RETURNS YEAR
|
||||
SQL SECURITY INVOKER
|
||||
COMMENT 'created with INVOKER'
|
||||
BEGIN
|
||||
set @x=i1;
|
||||
set @y=@x;
|
||||
return i4;
|
||||
END//
|
||||
|
||||
... now check what is stored:
|
||||
-----------------------------
|
||||
SELECT * FROM information_schema.routines;
|
||||
SPECIFIC_NAME fn_1
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
ROUTINE_NAME fn_1
|
||||
ROUTINE_TYPE FUNCTION
|
||||
DTD_IDENTIFIER year(4)
|
||||
ROUTINE_BODY SQL
|
||||
ROUTINE_DEFINITION BEGIN
|
||||
set @x=i1;
|
||||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
EXTERNAL_NAME NULL
|
||||
EXTERNAL_LANGUAGE NULL
|
||||
PARAMETER_STYLE SQL
|
||||
IS_DETERMINISTIC NO
|
||||
SQL_DATA_ACCESS CONTAINS SQL
|
||||
SQL_PATH NULL
|
||||
SECURITY_TYPE DEFINER
|
||||
CREATED <modified>
|
||||
LAST_ALTERED <created>
|
||||
SQL_MODE
|
||||
ROUTINE_COMMENT
|
||||
DEFINER root@localhost
|
||||
SPECIFIC_NAME fn_2
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
ROUTINE_NAME fn_2
|
||||
ROUTINE_TYPE FUNCTION
|
||||
DTD_IDENTIFIER year(4)
|
||||
ROUTINE_BODY SQL
|
||||
ROUTINE_DEFINITION BEGIN
|
||||
set @x=i1;
|
||||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
EXTERNAL_NAME NULL
|
||||
EXTERNAL_LANGUAGE NULL
|
||||
PARAMETER_STYLE SQL
|
||||
IS_DETERMINISTIC NO
|
||||
SQL_DATA_ACCESS CONTAINS SQL
|
||||
SQL_PATH NULL
|
||||
SECURITY_TYPE INVOKER
|
||||
CREATED <modified>
|
||||
LAST_ALTERED <created>
|
||||
SQL_MODE
|
||||
ROUTINE_COMMENT created with INVOKER
|
||||
DEFINER root@localhost
|
||||
SPECIFIC_NAME sp_1
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
ROUTINE_NAME sp_1
|
||||
ROUTINE_TYPE PROCEDURE
|
||||
DTD_IDENTIFIER NULL
|
||||
ROUTINE_BODY SQL
|
||||
ROUTINE_DEFINITION BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
EXTERNAL_NAME NULL
|
||||
EXTERNAL_LANGUAGE NULL
|
||||
PARAMETER_STYLE SQL
|
||||
IS_DETERMINISTIC NO
|
||||
SQL_DATA_ACCESS CONTAINS SQL
|
||||
SQL_PATH NULL
|
||||
SECURITY_TYPE DEFINER
|
||||
CREATED <modified>
|
||||
LAST_ALTERED <created>
|
||||
SQL_MODE
|
||||
ROUTINE_COMMENT
|
||||
DEFINER root@localhost
|
||||
SPECIFIC_NAME sp_2
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
ROUTINE_NAME sp_2
|
||||
ROUTINE_TYPE PROCEDURE
|
||||
DTD_IDENTIFIER NULL
|
||||
ROUTINE_BODY SQL
|
||||
ROUTINE_DEFINITION BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
EXTERNAL_NAME NULL
|
||||
EXTERNAL_LANGUAGE NULL
|
||||
PARAMETER_STYLE SQL
|
||||
IS_DETERMINISTIC NO
|
||||
SQL_DATA_ACCESS CONTAINS SQL
|
||||
SQL_PATH NULL
|
||||
SECURITY_TYPE INVOKER
|
||||
CREATED <modified>
|
||||
LAST_ALTERED <created>
|
||||
SQL_MODE
|
||||
ROUTINE_COMMENT created with INVOKER
|
||||
DEFINER root@localhost
|
||||
SHOW CREATE FUNCTION fn_1;
|
||||
Function fn_1
|
||||
sql_mode
|
||||
Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_1`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4)
|
||||
BEGIN
|
||||
set @x=i1;
|
||||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
SHOW CREATE FUNCTION fn_2;
|
||||
Function fn_2
|
||||
sql_mode
|
||||
Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_2`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4)
|
||||
SQL SECURITY INVOKER
|
||||
COMMENT 'created with INVOKER'
|
||||
BEGIN
|
||||
set @x=i1;
|
||||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
SHOW CREATE PROCEDURE sp_1;
|
||||
Procedure sp_1
|
||||
sql_mode
|
||||
Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
|
||||
BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
SHOW CREATE PROCEDURE sp_2;
|
||||
Procedure sp_2
|
||||
sql_mode
|
||||
Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
|
||||
SQL SECURITY INVOKER
|
||||
COMMENT 'created with INVOKER'
|
||||
BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
SHOW FUNCTION STATUS LIKE 'fn_%';
|
||||
Db db_storedproc
|
||||
Name fn_1
|
||||
Type FUNCTION
|
||||
Definer root@localhost
|
||||
Modified <modified>
|
||||
Created <created>
|
||||
Security_type DEFINER
|
||||
Comment
|
||||
Db db_storedproc
|
||||
Name fn_2
|
||||
Type FUNCTION
|
||||
Definer root@localhost
|
||||
Modified <modified>
|
||||
Created <created>
|
||||
Security_type INVOKER
|
||||
Comment created with INVOKER
|
||||
SHOW PROCEDURE STATUS LIKE 'sp_%';
|
||||
Db db_storedproc
|
||||
Name sp_1
|
||||
Type PROCEDURE
|
||||
Definer root@localhost
|
||||
Modified <modified>
|
||||
Created <created>
|
||||
Security_type DEFINER
|
||||
Comment
|
||||
Db db_storedproc
|
||||
Name sp_2
|
||||
Type PROCEDURE
|
||||
Definer root@localhost
|
||||
Modified <modified>
|
||||
Created <created>
|
||||
Security_type INVOKER
|
||||
Comment created with INVOKER
|
||||
|
||||
... now change some stuff:
|
||||
--------------------------
|
||||
ALTER PROCEDURE sp_1 SQL SECURITY INVOKER;
|
||||
ALTER PROCEDURE sp_1 COMMENT 'new comment, SP changed to INVOKER';
|
||||
ALTER PROCEDURE sp_2 SQL SECURITY DEFINER;
|
||||
ALTER PROCEDURE sp_2 DROP COMMENT;
|
||||
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 'DROP COMMENT' at line 1
|
||||
ALTER PROCEDURE sp_2 COMMENT 'SP changed to DEFINER';
|
||||
ALTER PROCEDURE sp_2 READS SQL DATA;
|
||||
ALTER FUNCTION fn_1 SQL SECURITY INVOKER;
|
||||
ALTER FUNCTION fn_1 COMMENT 'new comment, FN changed to INVOKER';
|
||||
ALTER FUNCTION fn_1 NO SQL;
|
||||
ALTER FUNCTION fn_2 SQL SECURITY DEFINER;
|
||||
ALTER FUNCTION fn_2 COMMENT 'FN changed to DEFINER';
|
||||
ALTER FUNCTION fn_2 MODIFIES SQL DATA;
|
||||
|
||||
... now check what is stored:
|
||||
-----------------------------
|
||||
SELECT * FROM information_schema.routines;
|
||||
SPECIFIC_NAME fn_1
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
ROUTINE_NAME fn_1
|
||||
ROUTINE_TYPE FUNCTION
|
||||
DTD_IDENTIFIER year(4)
|
||||
ROUTINE_BODY SQL
|
||||
ROUTINE_DEFINITION BEGIN
|
||||
set @x=i1;
|
||||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
EXTERNAL_NAME NULL
|
||||
EXTERNAL_LANGUAGE NULL
|
||||
PARAMETER_STYLE SQL
|
||||
IS_DETERMINISTIC NO
|
||||
SQL_DATA_ACCESS NO SQL
|
||||
SQL_PATH NULL
|
||||
SECURITY_TYPE INVOKER
|
||||
CREATED <modified>
|
||||
LAST_ALTERED <created>
|
||||
SQL_MODE
|
||||
ROUTINE_COMMENT new comment, FN changed to INVOKER
|
||||
DEFINER root@localhost
|
||||
SPECIFIC_NAME fn_2
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
ROUTINE_NAME fn_2
|
||||
ROUTINE_TYPE FUNCTION
|
||||
DTD_IDENTIFIER year(4)
|
||||
ROUTINE_BODY SQL
|
||||
ROUTINE_DEFINITION BEGIN
|
||||
set @x=i1;
|
||||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
EXTERNAL_NAME NULL
|
||||
EXTERNAL_LANGUAGE NULL
|
||||
PARAMETER_STYLE SQL
|
||||
IS_DETERMINISTIC NO
|
||||
SQL_DATA_ACCESS MODIFIES SQL DATA
|
||||
SQL_PATH NULL
|
||||
SECURITY_TYPE DEFINER
|
||||
CREATED <modified>
|
||||
LAST_ALTERED <created>
|
||||
SQL_MODE
|
||||
ROUTINE_COMMENT FN changed to DEFINER
|
||||
DEFINER root@localhost
|
||||
SPECIFIC_NAME sp_1
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
ROUTINE_NAME sp_1
|
||||
ROUTINE_TYPE PROCEDURE
|
||||
DTD_IDENTIFIER NULL
|
||||
ROUTINE_BODY SQL
|
||||
ROUTINE_DEFINITION BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
EXTERNAL_NAME NULL
|
||||
EXTERNAL_LANGUAGE NULL
|
||||
PARAMETER_STYLE SQL
|
||||
IS_DETERMINISTIC NO
|
||||
SQL_DATA_ACCESS CONTAINS SQL
|
||||
SQL_PATH NULL
|
||||
SECURITY_TYPE INVOKER
|
||||
CREATED <modified>
|
||||
LAST_ALTERED <created>
|
||||
SQL_MODE
|
||||
ROUTINE_COMMENT new comment, SP changed to INVOKER
|
||||
DEFINER root@localhost
|
||||
SPECIFIC_NAME sp_2
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
ROUTINE_NAME sp_2
|
||||
ROUTINE_TYPE PROCEDURE
|
||||
DTD_IDENTIFIER NULL
|
||||
ROUTINE_BODY SQL
|
||||
ROUTINE_DEFINITION BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
EXTERNAL_NAME NULL
|
||||
EXTERNAL_LANGUAGE NULL
|
||||
PARAMETER_STYLE SQL
|
||||
IS_DETERMINISTIC NO
|
||||
SQL_DATA_ACCESS READS SQL DATA
|
||||
SQL_PATH NULL
|
||||
SECURITY_TYPE DEFINER
|
||||
CREATED <modified>
|
||||
LAST_ALTERED <created>
|
||||
SQL_MODE
|
||||
ROUTINE_COMMENT SP changed to DEFINER
|
||||
DEFINER root@localhost
|
||||
SHOW CREATE FUNCTION fn_1;
|
||||
Function fn_1
|
||||
sql_mode
|
||||
Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_1`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4)
|
||||
NO SQL
|
||||
SQL SECURITY INVOKER
|
||||
COMMENT 'new comment, FN changed to INVOKER'
|
||||
BEGIN
|
||||
set @x=i1;
|
||||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
SHOW CREATE FUNCTION fn_2;
|
||||
Function fn_2
|
||||
sql_mode
|
||||
Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_2`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4)
|
||||
MODIFIES SQL DATA
|
||||
COMMENT 'FN changed to DEFINER'
|
||||
BEGIN
|
||||
set @x=i1;
|
||||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
SHOW CREATE PROCEDURE sp_1;
|
||||
Procedure sp_1
|
||||
sql_mode
|
||||
Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
|
||||
SQL SECURITY INVOKER
|
||||
COMMENT 'new comment, SP changed to INVOKER'
|
||||
BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
SHOW CREATE PROCEDURE sp_2;
|
||||
Procedure sp_2
|
||||
sql_mode
|
||||
Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
|
||||
READS SQL DATA
|
||||
COMMENT 'SP changed to DEFINER'
|
||||
BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
SHOW FUNCTION STATUS LIKE 'fn_%';
|
||||
Db db_storedproc
|
||||
Name fn_1
|
||||
Type FUNCTION
|
||||
Definer root@localhost
|
||||
Modified <modified>
|
||||
Created <created>
|
||||
Security_type INVOKER
|
||||
Comment new comment, FN changed to INVOKER
|
||||
Db db_storedproc
|
||||
Name fn_2
|
||||
Type FUNCTION
|
||||
Definer root@localhost
|
||||
Modified <modified>
|
||||
Created <created>
|
||||
Security_type DEFINER
|
||||
Comment FN changed to DEFINER
|
||||
SHOW PROCEDURE STATUS LIKE 'sp_%';
|
||||
Db db_storedproc
|
||||
Name sp_1
|
||||
Type PROCEDURE
|
||||
Definer root@localhost
|
||||
Modified <modified>
|
||||
Created <created>
|
||||
Security_type INVOKER
|
||||
Comment new comment, SP changed to INVOKER
|
||||
Db db_storedproc
|
||||
Name sp_2
|
||||
Type PROCEDURE
|
||||
Definer root@localhost
|
||||
Modified <modified>
|
||||
Created <created>
|
||||
Security_type DEFINER
|
||||
Comment SP changed to DEFINER
|
||||
|
||||
... change back to default and check result:
|
||||
--------------------------------------------
|
||||
ALTER FUNCTION fn_2 CONTAINS SQL;
|
||||
|
||||
... now check what is stored:
|
||||
-----------------------------
|
||||
SELECT * FROM information_schema.routines;
|
||||
SPECIFIC_NAME fn_1
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
ROUTINE_NAME fn_1
|
||||
ROUTINE_TYPE FUNCTION
|
||||
DTD_IDENTIFIER year(4)
|
||||
ROUTINE_BODY SQL
|
||||
ROUTINE_DEFINITION BEGIN
|
||||
set @x=i1;
|
||||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
EXTERNAL_NAME NULL
|
||||
EXTERNAL_LANGUAGE NULL
|
||||
PARAMETER_STYLE SQL
|
||||
IS_DETERMINISTIC NO
|
||||
SQL_DATA_ACCESS NO SQL
|
||||
SQL_PATH NULL
|
||||
SECURITY_TYPE INVOKER
|
||||
CREATED <modified>
|
||||
LAST_ALTERED <created>
|
||||
SQL_MODE
|
||||
ROUTINE_COMMENT new comment, FN changed to INVOKER
|
||||
DEFINER root@localhost
|
||||
SPECIFIC_NAME fn_2
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
ROUTINE_NAME fn_2
|
||||
ROUTINE_TYPE FUNCTION
|
||||
DTD_IDENTIFIER year(4)
|
||||
ROUTINE_BODY SQL
|
||||
ROUTINE_DEFINITION BEGIN
|
||||
set @x=i1;
|
||||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
EXTERNAL_NAME NULL
|
||||
EXTERNAL_LANGUAGE NULL
|
||||
PARAMETER_STYLE SQL
|
||||
IS_DETERMINISTIC NO
|
||||
SQL_DATA_ACCESS CONTAINS SQL
|
||||
SQL_PATH NULL
|
||||
SECURITY_TYPE DEFINER
|
||||
CREATED <modified>
|
||||
LAST_ALTERED <created>
|
||||
SQL_MODE
|
||||
ROUTINE_COMMENT FN changed to DEFINER
|
||||
DEFINER root@localhost
|
||||
SPECIFIC_NAME sp_1
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
ROUTINE_NAME sp_1
|
||||
ROUTINE_TYPE PROCEDURE
|
||||
DTD_IDENTIFIER NULL
|
||||
ROUTINE_BODY SQL
|
||||
ROUTINE_DEFINITION BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
EXTERNAL_NAME NULL
|
||||
EXTERNAL_LANGUAGE NULL
|
||||
PARAMETER_STYLE SQL
|
||||
IS_DETERMINISTIC NO
|
||||
SQL_DATA_ACCESS CONTAINS SQL
|
||||
SQL_PATH NULL
|
||||
SECURITY_TYPE INVOKER
|
||||
CREATED <modified>
|
||||
LAST_ALTERED <created>
|
||||
SQL_MODE
|
||||
ROUTINE_COMMENT new comment, SP changed to INVOKER
|
||||
DEFINER root@localhost
|
||||
SPECIFIC_NAME sp_2
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
ROUTINE_NAME sp_2
|
||||
ROUTINE_TYPE PROCEDURE
|
||||
DTD_IDENTIFIER NULL
|
||||
ROUTINE_BODY SQL
|
||||
ROUTINE_DEFINITION BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
EXTERNAL_NAME NULL
|
||||
EXTERNAL_LANGUAGE NULL
|
||||
PARAMETER_STYLE SQL
|
||||
IS_DETERMINISTIC NO
|
||||
SQL_DATA_ACCESS READS SQL DATA
|
||||
SQL_PATH NULL
|
||||
SECURITY_TYPE DEFINER
|
||||
CREATED <modified>
|
||||
LAST_ALTERED <created>
|
||||
SQL_MODE
|
||||
ROUTINE_COMMENT SP changed to DEFINER
|
||||
DEFINER root@localhost
|
||||
SHOW CREATE FUNCTION fn_1;
|
||||
Function fn_1
|
||||
sql_mode
|
||||
Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_1`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4)
|
||||
NO SQL
|
||||
SQL SECURITY INVOKER
|
||||
COMMENT 'new comment, FN changed to INVOKER'
|
||||
BEGIN
|
||||
set @x=i1;
|
||||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
SHOW CREATE FUNCTION fn_2;
|
||||
Function fn_2
|
||||
sql_mode
|
||||
Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_2`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4)
|
||||
COMMENT 'FN changed to DEFINER'
|
||||
BEGIN
|
||||
set @x=i1;
|
||||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
SHOW CREATE PROCEDURE sp_1;
|
||||
Procedure sp_1
|
||||
sql_mode
|
||||
Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
|
||||
SQL SECURITY INVOKER
|
||||
COMMENT 'new comment, SP changed to INVOKER'
|
||||
BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
SHOW CREATE PROCEDURE sp_2;
|
||||
Procedure sp_2
|
||||
sql_mode
|
||||
Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
|
||||
READS SQL DATA
|
||||
COMMENT 'SP changed to DEFINER'
|
||||
BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
SHOW FUNCTION STATUS LIKE 'fn_%';
|
||||
Db db_storedproc
|
||||
Name fn_1
|
||||
Type FUNCTION
|
||||
Definer root@localhost
|
||||
Modified <modified>
|
||||
Created <created>
|
||||
Security_type INVOKER
|
||||
Comment new comment, FN changed to INVOKER
|
||||
Db db_storedproc
|
||||
Name fn_2
|
||||
Type FUNCTION
|
||||
Definer root@localhost
|
||||
Modified <modified>
|
||||
Created <created>
|
||||
Security_type DEFINER
|
||||
Comment FN changed to DEFINER
|
||||
SHOW PROCEDURE STATUS LIKE 'sp_%';
|
||||
Db db_storedproc
|
||||
Name sp_1
|
||||
Type PROCEDURE
|
||||
Definer root@localhost
|
||||
Modified <modified>
|
||||
Created <created>
|
||||
Security_type INVOKER
|
||||
Comment new comment, SP changed to INVOKER
|
||||
Db db_storedproc
|
||||
Name sp_2
|
||||
Type PROCEDURE
|
||||
Definer root@localhost
|
||||
Modified <modified>
|
||||
Created <created>
|
||||
Security_type DEFINER
|
||||
Comment SP changed to DEFINER
|
||||
|
||||
... cleanup
|
||||
-----------
|
||||
DROP FUNCTION fn_1;
|
||||
DROP FUNCTION fn_2;
|
||||
DROP PROCEDURE sp_1;
|
||||
|
||||
--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
|
||||
--------------------------------------------------------------------------------
|
||||
DROP DATABASE IF EXISTS db_storedproc;
|
||||
DROP DATABASE IF EXISTS db_storedproc_1;
|
||||
|
||||
. +++ END OF SCRIPT +++
|
||||
--------------------------------------------------------------------------------
|
321
mysql-test/suite/funcs_1/r/innodb_storedproc_10.result
Normal file
321
mysql-test/suite/funcs_1/r/innodb_storedproc_10.result
Normal file
|
@ -0,0 +1,321 @@
|
|||
|
||||
--source suite/funcs_1/storedproc/load_sp_tb.inc
|
||||
--------------------------------------------------------------------------------
|
||||
SET @@global.max_heap_table_size=4294967295;
|
||||
SET @@session.max_heap_table_size=4294967295;
|
||||
|
||||
--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
|
||||
--------------------------------------------------------------------------------
|
||||
DROP DATABASE IF EXISTS db_storedproc;
|
||||
DROP DATABASE IF EXISTS db_storedproc_1;
|
||||
CREATE DATABASE db_storedproc;
|
||||
CREATE DATABASE db_storedproc_1;
|
||||
USE db_storedproc;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4;
|
||||
USE db_storedproc_1;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6;
|
||||
USE db_storedproc;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
Warning 1265 Data truncated for column 'f3' at row 3
|
||||
Warning 1265 Data truncated for column 'f3' at row 4
|
||||
Warning 1265 Data truncated for column 'f3' at row 5
|
||||
Warning 1265 Data truncated for column 'f3' at row 6
|
||||
Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
Warning 1265 Data truncated for column 'f3' at row 3
|
||||
Warning 1265 Data truncated for column 'f3' at row 4
|
||||
Warning 1265 Data truncated for column 'f3' at row 5
|
||||
Warning 1265 Data truncated for column 'f3' at row 6
|
||||
Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11;
|
||||
|
||||
Section 3.1.10 - CALL checks:
|
||||
--------------------------------------------------------------------------------
|
||||
USE db_storedproc;
|
||||
|
||||
Testcase 3.1.10.2 + 3.1.10.5:
|
||||
-----------------------------
|
||||
|
||||
2. Ensure that a procedure cannot be called if the appropriate privileges do not
|
||||
exist.
|
||||
5. Ensure that a function cannot be executed if the appropriate privileges do
|
||||
not exist.
|
||||
--------------------------------------------------------------------------------
|
||||
DROP PROCEDURE IF EXISTS sp31102;
|
||||
DROP FUNCTION IF EXISTS fn31105;
|
||||
create user 'user_1'@'localhost';
|
||||
create user 'user_2'@'localhost';
|
||||
GRANT CREATE ROUTINE ON db_storedproc.* TO 'user_1'@'localhost';
|
||||
GRANT SELECT ON db_storedproc.* TO 'user_2'@'localhost';
|
||||
FLUSH PRIVILEGES;
|
||||
connect(localhost,user_1,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
|
||||
|
||||
user_1@localhost db_storedproc
|
||||
CREATE PROCEDURE sp31102 () SQL SECURITY INVOKER
|
||||
BEGIN
|
||||
SELECT * FROM db_storedproc.t1 WHERE f4=-5000 LIMIT 1;
|
||||
END//
|
||||
CREATE FUNCTION fn31105(n INT) RETURNS INT
|
||||
BEGIN
|
||||
DECLARE res INT;
|
||||
SET res = n * n;
|
||||
RETURN res;
|
||||
END//
|
||||
connect(localhost,user_2,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
|
||||
|
||||
user_2@localhost db_storedproc
|
||||
CALL sp31102();
|
||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.sp31102'
|
||||
SELECT fn31105( 9 );
|
||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105'
|
||||
|
||||
root@localhost db_storedproc
|
||||
CALL sp31102();
|
||||
f1 f2 f3 f4 f5 f6
|
||||
a` a` 1000-01-01 -5000 a` -5000
|
||||
SELECT fn31105( 9 );
|
||||
fn31105( 9 )
|
||||
81
|
||||
GRANT EXECUTE ON db_storedproc.* TO 'user_2'@'localhost';
|
||||
FLUSH PRIVILEGES;
|
||||
connect(localhost,user_2,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
|
||||
|
||||
user_2@localhost db_storedproc
|
||||
CALL sp31102();
|
||||
f1 f2 f3 f4 f5 f6
|
||||
a` a` 1000-01-01 -5000 a` -5000
|
||||
SELECT fn31105( 9 );
|
||||
fn31105( 9 )
|
||||
81
|
||||
|
||||
root@localhost db_storedproc
|
||||
REVOKE EXECUTE ON db_storedproc.* FROM 'user_2'@'localhost';
|
||||
FLUSH PRIVILEGES;
|
||||
CALL sp31102();
|
||||
f1 f2 f3 f4 f5 f6
|
||||
a` a` 1000-01-01 -5000 a` -5000
|
||||
SELECT fn31105( 9 );
|
||||
fn31105( 9 )
|
||||
81
|
||||
connect(localhost,user_2,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
|
||||
|
||||
user_2@localhost db_storedproc
|
||||
CALL sp31102();
|
||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.sp31102'
|
||||
SELECT fn31105( 9 );
|
||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105'
|
||||
|
||||
root@localhost db_storedproc
|
||||
DROP PROCEDURE sp31102;
|
||||
DROP FUNCTION fn31105;
|
||||
DROP USER 'user_1'@'localhost';
|
||||
DROP USER 'user_2'@'localhost';
|
||||
|
||||
Testcase 3.1.10.3:
|
||||
------------------
|
||||
|
||||
Ensure that a function can never be called.
|
||||
--------------------------------------------------------------------------------
|
||||
DROP FUNCTION IF EXISTS fn1;
|
||||
CREATE FUNCTION fn1(a int) returns int
|
||||
BEGIN
|
||||
set @b = 0.9 * a;
|
||||
return @b;
|
||||
END//
|
||||
CALL fn1();
|
||||
ERROR 42000: PROCEDURE db_storedproc.fn1 does not exist
|
||||
DROP FUNCTION fn1;
|
||||
|
||||
Testcase 3.1.10.6:
|
||||
------------------
|
||||
|
||||
Ensure that a procedure can never be executed.
|
||||
--------------------------------------------------------------------------------
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
DROP FUNCTION IF EXISTS sp1;
|
||||
CREATE PROCEDURE sp1()
|
||||
BEGIN
|
||||
SELECT * from t10;
|
||||
END//
|
||||
SELECT sp1();
|
||||
ERROR 42000: FUNCTION db_storedproc.sp1 does not exist
|
||||
DROP PROCEDURE sp1;
|
||||
|
||||
Testcase 3.1.10.7:
|
||||
------------------
|
||||
|
||||
Ensure that the ROW_COUNT() SQL function always returns the correct number of
|
||||
rows affected by the execution of a stored procedure.
|
||||
--------------------------------------------------------------------------------
|
||||
DROP PROCEDURE IF EXISTS sp_ins_1;
|
||||
DROP PROCEDURE IF EXISTS sp_ins_3;
|
||||
DROP PROCEDURE IF EXISTS sp_upd;
|
||||
DROP PROCEDURE IF EXISTS sp_ins_upd;
|
||||
CREATE TABLE temp(f1 CHAR(20),f2 CHAR(25),f3 DATE,f4 INT,f5 CHAR(25),f6 INT);
|
||||
INSERT INTO temp SELECT * FROM t10;
|
||||
CREATE PROCEDURE sp_ins_1()
|
||||
BEGIN
|
||||
INSERT INTO temp VALUES ('abc', 'abc', '20051003', 100, 'uvw', 1000);
|
||||
END//
|
||||
CREATE PROCEDURE sp_ins_3()
|
||||
BEGIN
|
||||
INSERT INTO temp VALUES ('abc', 'xyz', '19490523', 100, 'uvw', 1000);
|
||||
INSERT INTO temp VALUES ('abc', 'xyz', '1989-11-09', 100, 'uvw', 1000);
|
||||
INSERT INTO temp VALUES ('abc', 'xyz', '2005-10-24', 100, 'uvw', 1000);
|
||||
END//
|
||||
CREATE PROCEDURE sp_upd()
|
||||
BEGIN
|
||||
UPDATE temp SET temp.f1 = 'updated' WHERE temp.f1 ='abc';
|
||||
END//
|
||||
CREATE PROCEDURE sp_ins_upd()
|
||||
BEGIN
|
||||
BEGIN
|
||||
INSERT INTO temp VALUES ('qwe', 'abc', '1989-11-09', 100, 'uvw', 1000);
|
||||
INSERT INTO temp VALUES ('qwe', 'xyz', '1998-03-26', 100, 'uvw', 1000);
|
||||
INSERT INTO temp VALUES ('qwe', 'abc', '2000-11-09', 100, 'uvw', 1000);
|
||||
INSERT INTO temp VALUES ('qwe', 'abc', '2005-11-07', 100, 'uvw', 1000);
|
||||
END;
|
||||
SELECT COUNT( f1 ), f1 FROM temp GROUP BY f1;
|
||||
UPDATE temp SET temp.f1 = 'updated_2' WHERE temp.f1 ='qwe' AND temp.f2 = 'abc';
|
||||
END//
|
||||
CALL sp_ins_1();
|
||||
SELECT row_count();
|
||||
row_count()
|
||||
1
|
||||
SELECT * FROM temp ORDER BY f4;
|
||||
f1 f2 f3 f4 f5 f6
|
||||
a` a` 1000-01-01 -5000 a` -5000
|
||||
aaa aaa 1000-01-02 -4999 aaa -4999
|
||||
abaa abaa 1000-01-03 -4998 abaa -4998
|
||||
acaaa acaaa 1000-01-04 -4997 acaaa -4997
|
||||
adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996
|
||||
aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995
|
||||
afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994
|
||||
agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993
|
||||
a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
|
||||
a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
|
||||
abc abc 2005-10-03 100 uvw 1000
|
||||
CALL sp_ins_3();
|
||||
SELECT row_count();
|
||||
row_count()
|
||||
1
|
||||
SELECT * FROM temp ORDER BY f4;
|
||||
f1 f2 f3 f4 f5 f6
|
||||
a` a` 1000-01-01 -5000 a` -5000
|
||||
aaa aaa 1000-01-02 -4999 aaa -4999
|
||||
abaa abaa 1000-01-03 -4998 abaa -4998
|
||||
acaaa acaaa 1000-01-04 -4997 acaaa -4997
|
||||
adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996
|
||||
aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995
|
||||
afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994
|
||||
agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993
|
||||
a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
|
||||
a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
|
||||
abc abc 2005-10-03 100 uvw 1000
|
||||
abc xyz 1949-05-23 100 uvw 1000
|
||||
abc xyz 1989-11-09 100 uvw 1000
|
||||
abc xyz 2005-10-24 100 uvw 1000
|
||||
CALL sp_upd();
|
||||
SELECT row_count();
|
||||
row_count()
|
||||
4
|
||||
SELECT * FROM temp ORDER BY f4;
|
||||
f1 f2 f3 f4 f5 f6
|
||||
a` a` 1000-01-01 -5000 a` -5000
|
||||
aaa aaa 1000-01-02 -4999 aaa -4999
|
||||
abaa abaa 1000-01-03 -4998 abaa -4998
|
||||
acaaa acaaa 1000-01-04 -4997 acaaa -4997
|
||||
adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996
|
||||
aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995
|
||||
afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994
|
||||
agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993
|
||||
a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
|
||||
a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
|
||||
updated abc 2005-10-03 100 uvw 1000
|
||||
updated xyz 1949-05-23 100 uvw 1000
|
||||
updated xyz 1989-11-09 100 uvw 1000
|
||||
updated xyz 2005-10-24 100 uvw 1000
|
||||
CALL sp_ins_upd();
|
||||
COUNT( f1 ) f1
|
||||
1 aaa
|
||||
1 abaa
|
||||
1 acaaa
|
||||
1 adaaaa
|
||||
1 aeaaaaa
|
||||
1 afaaaaaa
|
||||
1 agaaaaaaa
|
||||
1 a^aaaaaaaa
|
||||
1 a_aaaaaaaaa
|
||||
1 a`
|
||||
4 qwe
|
||||
4 updated
|
||||
SELECT row_count();
|
||||
row_count()
|
||||
3
|
||||
SELECT * FROM temp ORDER BY f4;
|
||||
f1 f2 f3 f4 f5 f6
|
||||
a` a` 1000-01-01 -5000 a` -5000
|
||||
aaa aaa 1000-01-02 -4999 aaa -4999
|
||||
abaa abaa 1000-01-03 -4998 abaa -4998
|
||||
acaaa acaaa 1000-01-04 -4997 acaaa -4997
|
||||
adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996
|
||||
aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995
|
||||
afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994
|
||||
agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993
|
||||
a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
|
||||
a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
|
||||
updated abc 2005-10-03 100 uvw 1000
|
||||
updated xyz 1949-05-23 100 uvw 1000
|
||||
updated xyz 1989-11-09 100 uvw 1000
|
||||
updated xyz 2005-10-24 100 uvw 1000
|
||||
updated_2 abc 1989-11-09 100 uvw 1000
|
||||
qwe xyz 1998-03-26 100 uvw 1000
|
||||
updated_2 abc 2000-11-09 100 uvw 1000
|
||||
updated_2 abc 2005-11-07 100 uvw 1000
|
||||
DROP PROCEDURE sp_ins_1;
|
||||
DROP PROCEDURE sp_ins_3;
|
||||
DROP PROCEDURE sp_upd;
|
||||
DROP PROCEDURE sp_ins_upd;
|
||||
DROP TABLE temp;
|
||||
|
||||
Testcase 3.1.10.8:
|
||||
------------------
|
||||
|
||||
Ensure that the mysql_affected_rows() C API function always returns the correct
|
||||
number of rows affected by the execution of a stored procedure.
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
|
||||
--------------------------------------------------------------------------------
|
||||
DROP DATABASE IF EXISTS db_storedproc;
|
||||
DROP DATABASE IF EXISTS db_storedproc_1;
|
||||
|
||||
. +++ END OF SCRIPT +++
|
||||
--------------------------------------------------------------------------------
|
364
mysql-test/suite/funcs_1/r/innodb_trig_0102.result
Normal file
364
mysql-test/suite/funcs_1/r/innodb_trig_0102.result
Normal file
|
@ -0,0 +1,364 @@
|
|||
SET @NO_REFRESH = IF( '' = '', 0, 1);
|
||||
USE test;
|
||||
drop table if exists tb3 ;
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) engine = innodb;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f150' at row 1
|
||||
Note 1265 Data truncated for column 'f151' at row 1
|
||||
Note 1265 Data truncated for column 'f152' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb3.txt' into table tb3 ;
|
||||
|
||||
Testcase: 3.5.1.1:
|
||||
------------------
|
||||
use test;
|
||||
Create trigger trg1_1 BEFORE INSERT
|
||||
on tb3 for each row set @test_before = 2, new.f142 = @test_before;
|
||||
Create trigger trg1_2 AFTER INSERT
|
||||
on tb3 for each row set @test_after = 6;
|
||||
Create trigger trg1_4 BEFORE UPDATE
|
||||
on tb3 for each row set @test_before = 27,
|
||||
new.f142 = @test_before,
|
||||
new.f122 = 'Before Update Trigger';
|
||||
Create trigger trg1_3 AFTER UPDATE
|
||||
on tb3 for each row set @test_after = '15';
|
||||
Create trigger trg1_5 BEFORE DELETE on tb3 for each row
|
||||
select count(*) into @test_before from tb3 as tr_tb3
|
||||
where f121 = 'Test 3.5.1.1';
|
||||
Create trigger trg1_6 AFTER DELETE on tb3 for each row
|
||||
select count(*) into @test_after from tb3 as tr_tb3
|
||||
where f121 = 'Test 3.5.1.1';
|
||||
set @test_before = 1;
|
||||
set @test_after = 5;
|
||||
select @test_before, @test_after;
|
||||
@test_before @test_after
|
||||
1 5
|
||||
Insert into tb3 (f121, f122, f142, f144, f134)
|
||||
values ('Test 3.5.1.1', 'First Row', @test_before, @test_after, 1);
|
||||
select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1';
|
||||
f121 f122 f142 f144 f134
|
||||
Test 3.5.1.1 First Row 2 0000000005 1
|
||||
select @test_before, @test_after;
|
||||
@test_before @test_after
|
||||
2 6
|
||||
set @test_before = 18;
|
||||
set @test_after = 8;
|
||||
select @test_before, @test_after;
|
||||
@test_before @test_after
|
||||
18 8
|
||||
Update tb3 set tb3.f122 = 'Update',
|
||||
tb3.f142 = @test_before,
|
||||
tb3.f144 = @test_after
|
||||
where tb3.f121 = 'Test 3.5.1.1';
|
||||
select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1';
|
||||
f121 f122 f142 f144 f134
|
||||
Test 3.5.1.1 Before Update Trigger 27 0000000008 1
|
||||
select @test_before, @test_after;
|
||||
@test_before @test_after
|
||||
27 15
|
||||
Insert into tb3 (f121, f122, f142, f144, f134)
|
||||
values ('Test 3.5.1.1', 'Second Row', 5, 6, 2);
|
||||
set @test_before = 0;
|
||||
set @test_after = 0;
|
||||
select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1';
|
||||
f121 f122 f142 f144 f134
|
||||
Test 3.5.1.1 Before Update Trigger 27 0000000008 1
|
||||
Test 3.5.1.1 Second Row 2 0000000006 2
|
||||
select @test_before, @test_after;
|
||||
@test_before @test_after
|
||||
0 0
|
||||
Delete from tb3 where f121 = 'Test 3.5.1.1' and f134 = 2;
|
||||
select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1';
|
||||
f121 f122 f142 f144 f134
|
||||
Test 3.5.1.1 Before Update Trigger 27 0000000008 1
|
||||
select @test_before, @test_after;
|
||||
@test_before @test_after
|
||||
2 1
|
||||
drop trigger trg1_1;
|
||||
drop trigger trg1_2;
|
||||
drop trigger trg1_3;
|
||||
drop trigger trg1_4;
|
||||
drop trigger trg1_5;
|
||||
drop trigger trg1_6;
|
||||
delete from tb3 where f121='Test 3.5.1.1';
|
||||
|
||||
Testcase: 3.5.1.2:
|
||||
------------------
|
||||
Create trigger trg_1 after insert
|
||||
on tb3 for each statement set @x= 1;
|
||||
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 'statement set @x= 1' at line 2
|
||||
drop trigger trg_1;
|
||||
|
||||
Testcase 3.5.1.3:
|
||||
-----------------
|
||||
CREATE TRIGGER trg3_1 on tb3 BEFORE INSERT for each row set new.f120 = 't';
|
||||
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 'on tb3 BEFORE INSERT for each row set new.f120 = 't'' at line 1
|
||||
CREATE trg3_2 TRIGGER AFTER INSERT on tb3 for each row set new.f120 = '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 'trg3_2 TRIGGER AFTER INSERT on tb3 for each row set new.f120 = 's'' at line 1
|
||||
CREATE TRIGGER trg3_3 Before DELETE on tb3 set @ret1 = 'test' for each row;
|
||||
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 'set @ret1 = 'test' for each row' at line 1
|
||||
CREATE TRIGGER trg3_4 DELETE AFTER on tb3 set @ret1 = 'test' for each row;
|
||||
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 'DELETE AFTER on tb3 set @ret1 = 'test' for each row' at line 1
|
||||
CREATE for each row TRIGGER trg3_5 AFTER UPDATE on tb3 set @ret1 = 'test';
|
||||
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 'for each row TRIGGER trg3_5 AFTER UPDATE on tb3 set @ret1 = 'test'' at line 1
|
||||
drop trigger trg3_1;
|
||||
drop trigger trg3_2;
|
||||
drop trigger trg3_3;
|
||||
drop trigger trg3_4;
|
||||
drop trigger trg3_5;
|
||||
|
||||
Testcase: 3.5.1.5:
|
||||
------------------
|
||||
CREATE TRIGGER trg4_1 AFTER on tb3 for each row set new.f120 = 'e';
|
||||
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 'on tb3 for each row set new.f120 = 'e'' at line 1
|
||||
CREATE TRIGGER trg4_2 INSERT on tb3 for each set row new.f120 = 'f';
|
||||
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 'INSERT on tb3 for each set row new.f120 = 'f'' at line 1
|
||||
CREATE TRIGGER trg4_3 BEFORE INSERT tb3 for each row set new.f120 = 'g';
|
||||
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 'tb3 for each row set new.f120 = 'g'' at line 1
|
||||
CREATE TRIGGER trg4_4 AFTER UPDATE on tb3 for each set new.f120 = 'g';
|
||||
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 'set new.f120 = 'g'' at line 1
|
||||
CREATE trg4_5 AFTER DELETE on tb3 for each set new.f120 = 'g';
|
||||
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 'trg4_5 AFTER DELETE on tb3 for each set new.f120 = 'g'' at line 1
|
||||
CREATE TRIGGER trg4_6 BEFORE DELETE for each row set new.f120 = 'g';
|
||||
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 'for each row set new.f120 = 'g'' at line 1
|
||||
drop trigger trg4_1;
|
||||
drop trigger trg4_2;
|
||||
drop trigger trg4_3;
|
||||
drop trigger trg4_4;
|
||||
drop trigger trg4_5;
|
||||
drop trigger trg4_6;
|
||||
|
||||
Testcase 3.5.1.6: - Need to fix
|
||||
-------------------------------
|
||||
|
||||
Testcase 3.5.1.7: - need to fix
|
||||
-------------------------------
|
||||
drop table if exists t1;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 't1'
|
||||
create table t1 (f1 int, f2 char(25),f3 int) engine=innodb;
|
||||
CREATE TRIGGER trg5_1 BEFORE INSERT on test.t1
|
||||
for each row set new.f3 = '14';
|
||||
CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
BEFORE UPDATE on test.t1 for each row set new.f3 = '42';
|
||||
insert into t1 (f2) values ('insert 3.5.1.7');
|
||||
select * from t1;
|
||||
f1 f2 f3
|
||||
NULL insert 3.5.1.7 14
|
||||
update t1 set f2='update 3.5.1.7';
|
||||
select * from t1;
|
||||
f1 f2 f3
|
||||
NULL update 3.5.1.7 42
|
||||
select trigger_name from information_schema.triggers order by trigger_name;
|
||||
trigger_name
|
||||
trg5_1
|
||||
trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX
|
||||
drop trigger trg5_1;
|
||||
drop trigger trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ;
|
||||
drop table t1;
|
||||
|
||||
Testcase 3.5.1.8:
|
||||
-----------------
|
||||
CREATE TRIGGER trg12* before insert on tb3 for each row set new.f120 = 't';
|
||||
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 '* before insert on tb3 for each row set new.f120 = 't'' at line 1
|
||||
CREATE TRIGGER trigger before insert on tb3 for each row set new.f120 = 't';
|
||||
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 'trigger before insert on tb3 for each row set new.f120 = 't'' at line 1
|
||||
CREATE TRIGGER 100 before insert on tb3 for each row set new.f120 = 't';
|
||||
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 '100 before insert on tb3 for each row set new.f120 = 't'' at line 1
|
||||
CREATE TRIGGER @@view before insert on tb3 for each row set new.f120 = 't';
|
||||
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 '@@view before insert on tb3 for each row set new.f120 = 't'' at line 1
|
||||
CREATE TRIGGER @name before insert on tb3 for each row set new.f120 = 't';
|
||||
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 '@name before insert on tb3 for each row set new.f120 = 't'' at line 1
|
||||
CREATE TRIGGER tb3.trg6_1 BEFORE INSERT on test.tb3
|
||||
for each row set new.f120 ='X';
|
||||
ERROR HY000: Trigger in wrong schema
|
||||
drop database if exists trig_db;
|
||||
create database trig_db;
|
||||
use trig_db;
|
||||
create table t1 (f1 integer) engine = innodb;
|
||||
use test;
|
||||
CREATE TRIGGER trig_db.trg6_2 AFTER INSERT on tb3
|
||||
for each row set @ret_trg6_2 = 5;
|
||||
ERROR HY000: Trigger in wrong schema
|
||||
use trig_db;
|
||||
CREATE TRIGGER trg6_3 AFTER INSERT on test.tb3
|
||||
for each row set @ret_trg6_3 = 18;
|
||||
ERROR HY000: Trigger in wrong schema
|
||||
use test;
|
||||
drop database trig_db;
|
||||
drop trigger trg6_1;
|
||||
drop trigger trg6_3;
|
||||
|
||||
Testcase 3.5.1.9:(cannot be inplemented at this point)
|
||||
------------------------------------------------------
|
||||
|
||||
Testcase 3.5.1.10:
|
||||
------------------
|
||||
CREATE TRIGGER trg7_1 BEFORE UPDATE on tb3 for each row set new.f120 ='X';
|
||||
CREATE TRIGGER trg7_1 AFTER INSERT on tb3 for each row set @x ='Y';
|
||||
ERROR HY000: Trigger already exists
|
||||
drop trigger trg7_1;
|
||||
|
||||
Testcase 3.5.1.?:
|
||||
-----------------
|
||||
drop table if exists t1;
|
||||
drop table if exists t2;
|
||||
create table t1 (f1 char(50), f2 integer) engine = innodb;
|
||||
create table t2 (f1 char(50), f2 integer) engine = innodb;
|
||||
create trigger trig before insert on t1
|
||||
for each row set new.f1 ='trig t1';
|
||||
create trigger trig before update on t2
|
||||
for each row set new.f1 ='trig t2';
|
||||
ERROR HY000: Trigger already exists
|
||||
insert into t1 value ('insert to t1',1);
|
||||
select * from t1;
|
||||
f1 f2
|
||||
trig t1 1
|
||||
update t1 set f1='update to t1';
|
||||
select * from t1;
|
||||
f1 f2
|
||||
update to t1 1
|
||||
insert into t2 value ('insert to t2',2);
|
||||
update t2 set f1='update to t1';
|
||||
select * from t2;
|
||||
f1 f2
|
||||
update to t1 2
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
drop trigger trig;
|
||||
|
||||
Testcase 3.5.1.11:
|
||||
------------------
|
||||
drop database if exists trig_db1;
|
||||
drop database if exists trig_db2;
|
||||
drop database if exists trig_db3;
|
||||
create database trig_db1;
|
||||
create database trig_db2;
|
||||
create database trig_db3;
|
||||
use trig_db1;
|
||||
create table t1 (f1 char(50), f2 integer) engine = innodb;
|
||||
create trigger trig before insert on t1
|
||||
for each row set new.f1 ='trig1', @test_var1='trig1';
|
||||
use trig_db2;
|
||||
create table t2 (f1 char(50), f2 integer) engine = innodb;
|
||||
create trigger trig before insert on t2
|
||||
for each row set new.f1 ='trig2', @test_var2='trig2';
|
||||
use trig_db3;
|
||||
create table t1 (f1 char(50), f2 integer) engine = innodb;
|
||||
create trigger trig before insert on t1
|
||||
for each row set new.f1 ='trig3', @test_var3='trig3';
|
||||
set @test_var1= '', @test_var2= '', @test_var3= '';
|
||||
use trig_db1;
|
||||
insert into t1 (f1,f2) values ('insert to db1 t1',1);
|
||||
insert into trig_db1.t1 (f1,f2) values ('insert to db1 t1 from db1',2);
|
||||
insert into trig_db2.t2 (f1,f2) values ('insert to db2 t2 from db1',3);
|
||||
insert into trig_db3.t1 (f1,f2) values ('insert to db3 t1 from db1',4);
|
||||
select @test_var1, @test_var2, @test_var3;
|
||||
@test_var1 @test_var2 @test_var3
|
||||
trig1 trig2 trig3
|
||||
select * from t1 order by f2;
|
||||
f1 f2
|
||||
trig1 1
|
||||
trig1 2
|
||||
select * from trig_db2.t2;
|
||||
f1 f2
|
||||
trig2 3
|
||||
select * from trig_db3.t1;
|
||||
f1 f2
|
||||
trig3 4
|
||||
select * from t1 order by f2;
|
||||
f1 f2
|
||||
trig1 1
|
||||
trig1 2
|
||||
use test;
|
||||
drop database trig_db1;
|
||||
drop database trig_db2;
|
||||
drop database trig_db3;
|
||||
|
||||
Testcase 3.5.2.1/2/3:
|
||||
---------------------
|
||||
drop database if exists trig_db1;
|
||||
drop database if exists trig_db2;
|
||||
create database trig_db1;
|
||||
create database trig_db2;
|
||||
use trig_db1;
|
||||
create table t1 (f1 char(50), f2 integer) engine = innodb;
|
||||
create table trig_db2.t1 (f1 char(50), f2 integer) engine = innodb;
|
||||
create trigger trig1_b before insert on t1
|
||||
for each row set @test_var1='trig1_b';
|
||||
create trigger trig_db1.trig1_a after insert on t1
|
||||
for each row set @test_var2='trig1_a';
|
||||
create trigger trig_db2.trig2 before insert on trig_db2.t1
|
||||
for each row set @test_var3='trig2';
|
||||
select trigger_schema, trigger_name, event_object_table
|
||||
from information_schema.triggers order by trigger_name;
|
||||
trigger_schema trigger_name event_object_table
|
||||
trig_db1 trig1_a t1
|
||||
trig_db1 trig1_b t1
|
||||
trig_db2 trig2 t1
|
||||
set @test_var1= '', @test_var2= '', @test_var3= '';
|
||||
insert into t1 (f1,f2) values ('insert to db1 t1 from db1',352);
|
||||
insert into trig_db2.t1 (f1,f2) values ('insert to db2 t1 from db1',352);
|
||||
select @test_var1, @test_var2, @test_var3;
|
||||
@test_var1 @test_var2 @test_var3
|
||||
trig1_b trig1_a trig2
|
||||
drop database trig_db1;
|
||||
drop database trig_db2;
|
716
mysql-test/suite/funcs_1/r/innodb_trig_03.result
Normal file
716
mysql-test/suite/funcs_1/r/innodb_trig_03.result
Normal file
|
@ -0,0 +1,716 @@
|
|||
SET @NO_REFRESH = IF( '' = '', 0, 1);
|
||||
USE test;
|
||||
drop table if exists tb3 ;
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) engine = innodb;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f150' at row 1
|
||||
Note 1265 Data truncated for column 'f151' at row 1
|
||||
Note 1265 Data truncated for column 'f152' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb3.txt' into table tb3 ;
|
||||
|
||||
Testcase 3.5.3:
|
||||
---------------
|
||||
drop database if exists priv_db;
|
||||
create database priv_db;
|
||||
use priv_db;
|
||||
create table t1 (f1 char(20)) engine= innodb;
|
||||
create User test_noprivs@localhost;
|
||||
set password for test_noprivs@localhost = password('PWD');
|
||||
create User test_yesprivs@localhost;
|
||||
set password for test_yesprivs@localhost = password('PWD');
|
||||
|
||||
Testcase 3.5.3.2/6:
|
||||
-------------------
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
|
||||
grant ALL on *.* to test_noprivs@localhost;
|
||||
revoke TRIGGER on *.* from test_noprivs@localhost;
|
||||
show grants for test_noprivs@localhost;
|
||||
Grants for test_noprivs@localhost
|
||||
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
|
||||
grant TRIGGER on *.* to test_yesprivs@localhost;
|
||||
grant SELECT on priv_db.t1 to test_yesprivs@localhost;
|
||||
show grants for test_yesprivs@localhost;
|
||||
Grants for test_yesprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
|
||||
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
|
||||
Testcase 3.5.3.2:
|
||||
-----------------
|
||||
select current_user;
|
||||
current_user
|
||||
test_noprivs@localhost
|
||||
use priv_db;
|
||||
create trigger trg1_1 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.2_1-no';
|
||||
Got one of the listed errors
|
||||
use priv_db;
|
||||
insert into t1 (f1) values ('insert 3.5.3.2-no');
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
select current_user;
|
||||
current_user
|
||||
test_yesprivs@localhost
|
||||
use priv_db;
|
||||
create trigger trg1_2 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.2_2-yes';
|
||||
select current_user;
|
||||
current_user
|
||||
root@localhost
|
||||
use priv_db;
|
||||
insert into t1 (f1) values ('insert 3.5.3.2-yes');
|
||||
ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for column 'f1' in table 't1'
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
grant UPDATE on priv_db.t1 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values ('insert 3.5.3.2-yes');
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
|
||||
Testcase 3.5.3.6:
|
||||
-----------------
|
||||
use priv_db;
|
||||
drop trigger trg1_2;
|
||||
Got one of the listed errors
|
||||
use priv_db;
|
||||
insert into t1 (f1) values ('insert 3.5.3.6-yes');
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
use priv_db;
|
||||
drop trigger trg1_2;
|
||||
use priv_db;
|
||||
insert into t1 (f1) values ('insert 3.5.3.6-no');
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
insert 3.5.3.6-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
drop trigger trg1_2;
|
||||
|
||||
Testcase 3.5.3.7a:
|
||||
------------------
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
|
||||
grant ALL on *.* to test_noprivs@localhost;
|
||||
revoke UPDATE on *.* from test_noprivs@localhost;
|
||||
show grants for test_noprivs@localhost;
|
||||
Grants for test_noprivs@localhost
|
||||
GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
|
||||
grant TRIGGER, UPDATE on *.* to test_yesprivs@localhost;
|
||||
show grants for test_yesprivs@localhost;
|
||||
Grants for test_yesprivs@localhost
|
||||
GRANT UPDATE, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
select current_user;
|
||||
current_user
|
||||
test_noprivs@localhost
|
||||
use priv_db;
|
||||
show grants;
|
||||
Grants for test_noprivs@localhost
|
||||
GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
insert 3.5.3.6-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
|
||||
Trigger create disabled - should fail - Bug 8884
|
||||
------------------------------------------------
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-1a');
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
drop trigger trg4a_1;
|
||||
use priv_db;
|
||||
select current_user;
|
||||
current_user
|
||||
test_yesprivs@localhost
|
||||
show grants;
|
||||
Grants for test_yesprivs@localhost
|
||||
GRANT UPDATE, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
create trigger trg4a_2 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.7-2a';
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-2b');
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
drop trigger trg4a_2;
|
||||
|
||||
Testcase 3.5.3.7b:
|
||||
------------------
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
|
||||
grant TRIGGER on *.* to test_noprivs;
|
||||
grant ALL on priv_db.* to test_noprivs@localhost;
|
||||
revoke UPDATE on priv_db.* from test_noprivs@localhost;
|
||||
show grants for test_noprivs;
|
||||
Grants for test_noprivs@%
|
||||
GRANT TRIGGER ON *.* TO 'test_noprivs'@'%'
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
|
||||
grant TRIGGER on *.* to test_yesprivs@localhost;
|
||||
grant UPDATE on priv_db.* to test_yesprivs@localhost;
|
||||
show grants for test_yesprivs@localhost;
|
||||
Grants for test_yesprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost'
|
||||
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
show grants;
|
||||
Grants for test_noprivs@localhost
|
||||
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `priv_db`.* TO 'test_noprivs'@'localhost'
|
||||
use priv_db;
|
||||
|
||||
Trigger create disabled - should fail - Bug 8884
|
||||
------------------------------------------------
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-1b');
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
insert 3.5.3.7-1b
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
update t1 set f1 = 'update 3.5.3.7-1b' where f1 = 'insert 3.5.3.7-1b';
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
update 3.5.3.7-1b
|
||||
drop trigger trg4b_1;
|
||||
show grants;
|
||||
Grants for test_yesprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost'
|
||||
use priv_db;
|
||||
create trigger trg4b_2 before UPDATE on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.7-2b';
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-2b');
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
insert 3.5.3.7-2b
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
update 3.5.3.7-1b
|
||||
update t1 set f1 = 'update 3.5.3.7-2b' where f1 = 'insert 3.5.3.7-2b';
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
trig 3.5.3.7-2b
|
||||
update 3.5.3.7-1b
|
||||
drop trigger trg4b_2;
|
||||
|
||||
Testcase 3.5.3.7c
|
||||
-----------------
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
|
||||
grant TRIGGER on *.* to test_noprivs@localhost;
|
||||
grant ALL on priv_db.t1 to test_noprivs@localhost;
|
||||
revoke UPDATE on priv_db.t1 from test_noprivs@localhost;
|
||||
show grants for test_noprivs;
|
||||
Grants for test_noprivs@%
|
||||
GRANT TRIGGER ON *.* TO 'test_noprivs'@'%'
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
|
||||
grant TRIGGER on *.* to test_yesprivs@localhost;
|
||||
grant UPDATE on priv_db.t1 to test_yesprivs@localhost;
|
||||
show grants for test_yesprivs@localhost;
|
||||
Grants for test_yesprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
|
||||
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
show grants;
|
||||
Grants for test_noprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
|
||||
use priv_db;
|
||||
|
||||
Trigger create disabled - should fail - Bug 8884
|
||||
------------------------------------------------
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-1c');
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
insert 3.5.3.7-1c
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
trig 3.5.3.7-2b
|
||||
update 3.5.3.7-1b
|
||||
drop trigger trg4c_1;
|
||||
show grants;
|
||||
Grants for test_yesprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
|
||||
use priv_db;
|
||||
create trigger trg4c_2 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.7-2c';
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-2c');
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
insert 3.5.3.7-1c
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
trig 3.5.3.7-2b
|
||||
trig 3.5.3.7-2c
|
||||
update 3.5.3.7-1b
|
||||
drop trigger trg4c_2;
|
||||
|
||||
Testcase 3.5.3.7d:
|
||||
------------------
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
|
||||
grant TRIGGER on *.* to test_noprivs@localhost;
|
||||
grant SELECT (f1), INSERT (f1) on priv_db.t1 to test_noprivs@localhost;
|
||||
show grants for test_noprivs;
|
||||
Grants for test_noprivs@%
|
||||
GRANT TRIGGER ON *.* TO 'test_noprivs'@'%'
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
|
||||
grant TRIGGER on *.* to test_yesprivs@localhost;
|
||||
grant UPDATE (f1) on priv_db.t1 to test_yesprivs@localhost;
|
||||
show grants for test_noprivs;
|
||||
Grants for test_noprivs@%
|
||||
GRANT TRIGGER ON *.* TO 'test_noprivs'@'%'
|
||||
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
show grants;
|
||||
Grants for test_noprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT SELECT (f1), INSERT (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
|
||||
use priv_db;
|
||||
|
||||
Trigger create disabled - should fail - Bug 8884
|
||||
------------------------------------------------
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-1d');
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
insert 3.5.3.7-1c
|
||||
insert 3.5.3.7-1d
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
trig 3.5.3.7-2b
|
||||
trig 3.5.3.7-2c
|
||||
update 3.5.3.7-1b
|
||||
drop trigger trg4d_1;
|
||||
show grants;
|
||||
Grants for test_yesprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT UPDATE (f1) ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
|
||||
use priv_db;
|
||||
create trigger trg4d_2 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.7-2d';
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-2d');
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
insert 3.5.3.7-1c
|
||||
insert 3.5.3.7-1d
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
trig 3.5.3.7-2b
|
||||
trig 3.5.3.7-2c
|
||||
trig 3.5.3.7-2d
|
||||
update 3.5.3.7-1b
|
||||
drop trigger trg4d_2;
|
||||
|
||||
Testcase 3.5.3.8a:
|
||||
------------------
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
|
||||
grant ALL on *.* to test_noprivs@localhost;
|
||||
revoke SELECT on *.* from test_noprivs@localhost;
|
||||
show grants for test_noprivs@localhost;
|
||||
Grants for test_noprivs@localhost
|
||||
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
|
||||
grant TRIGGER, SELECT on *.* to test_yesprivs@localhost;
|
||||
show grants for test_yesprivs@localhost;
|
||||
Grants for test_yesprivs@localhost
|
||||
GRANT SELECT, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
select current_user;
|
||||
current_user
|
||||
test_noprivs@localhost
|
||||
use priv_db;
|
||||
show grants;
|
||||
Grants for test_noprivs@localhost
|
||||
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
|
||||
Trigger create disabled - should fail - Bug 8887
|
||||
------------------------------------------------
|
||||
set @test_var = 'before trig 3.5.3.8-1a';
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-1a
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-1a');
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-1a
|
||||
drop trigger trg5a_1;
|
||||
use priv_db;
|
||||
select current_user;
|
||||
current_user
|
||||
test_yesprivs@localhost
|
||||
show grants;
|
||||
Grants for test_yesprivs@localhost
|
||||
GRANT SELECT, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
create trigger trg5a_2 before INSERT on t1 for each row
|
||||
set @test_var= new.f1;
|
||||
set @test_var= 'before trig 3.5.3.8-2a';
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-2a
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-2a');
|
||||
select @test_var;
|
||||
@test_var
|
||||
insert 3.5.3.8-2a
|
||||
drop trigger trg5a_2;
|
||||
|
||||
Testcase: 3.5.3.8b
|
||||
------------------
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
|
||||
grant TRIGGER on *.* to test_noprivs@localhost;
|
||||
grant ALL on priv_db.* to test_noprivs@localhost;
|
||||
revoke SELECT on priv_db.* from test_noprivs@localhost;
|
||||
show grants for test_noprivs@localhost;
|
||||
Grants for test_noprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `priv_db`.* TO 'test_noprivs'@'localhost'
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
|
||||
grant TRIGGER on *.* to test_yesprivs@localhost;
|
||||
grant SELECT on priv_db.* to test_yesprivs@localhost;
|
||||
show grants for test_yesprivs@localhost;
|
||||
Grants for test_yesprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost'
|
||||
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
show grants;
|
||||
Grants for test_noprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `priv_db`.* TO 'test_noprivs'@'localhost'
|
||||
use priv_db;
|
||||
|
||||
Trigger create disabled - should fail - Bug 8887
|
||||
------------------------------------------------
|
||||
set @test_var= 'before trig 3.5.3.8-1b';
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-1b');
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-1b
|
||||
update t1 set f1= 'update 3.5.3.8-1b' where f1 = 'insert 3.5.3.8-1b';
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-1b
|
||||
drop trigger trg5b_1;
|
||||
show grants;
|
||||
Grants for test_yesprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost'
|
||||
use priv_db;
|
||||
create trigger trg5b_2 before UPDATE on t1 for each row
|
||||
set @test_var= new.f1;
|
||||
set @test_var= 'before trig 3.5.3.8-2b';
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-2b');
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-2b
|
||||
update t1 set f1= 'update 3.5.3.8-2b' where f1 = 'insert 3.5.3.8-2b';
|
||||
select @test_var;
|
||||
@test_var
|
||||
update 3.5.3.8-2b
|
||||
drop trigger trg5b_2;
|
||||
|
||||
Testcase 3.5.3.8c:
|
||||
------------------
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
|
||||
grant TRIGGER on *.* to test_noprivs@localhost;
|
||||
grant ALL on priv_db.t1 to test_noprivs@localhost;
|
||||
revoke SELECT on priv_db.t1 from test_noprivs@localhost;
|
||||
show grants for test_noprivs@localhost;
|
||||
Grants for test_noprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
|
||||
grant TRIGGER on *.* to test_yesprivs@localhost;
|
||||
grant SELECT on priv_db.t1 to test_yesprivs@localhost;
|
||||
show grants for test_yesprivs@localhost;
|
||||
Grants for test_yesprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
|
||||
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
show grants;
|
||||
Grants for test_noprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
|
||||
use priv_db;
|
||||
|
||||
Trigger create disabled - should fail - Bug 8887
|
||||
------------------------------------------------
|
||||
set @test_var= 'before trig 3.5.3.8-1c';
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-1c');
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-1c
|
||||
drop trigger trg5c_1;
|
||||
show grants;
|
||||
Grants for test_yesprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
|
||||
use priv_db;
|
||||
create trigger trg5c_2 before INSERT on t1 for each row
|
||||
set @test_var= new.f1;
|
||||
set @test_var='before trig 3.5.3.8-2c';
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-2c');
|
||||
select @test_var;
|
||||
@test_var
|
||||
insert 3.5.3.8-2c
|
||||
drop trigger trg5c_2;
|
||||
|
||||
Testcase: 3.5.3.8d:
|
||||
-------------------
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
|
||||
grant TRIGGER on *.* to test_noprivs@localhost;
|
||||
grant UPDATE (f1), INSERT (f1) on priv_db.t1 to test_noprivs@localhost;
|
||||
show grants for test_noprivs@localhost;
|
||||
Grants for test_noprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
|
||||
grant TRIGGER on *.* to test_yesprivs@localhost;
|
||||
grant SELECT (f1) on priv_db.t1 to test_yesprivs@localhost;
|
||||
show grants for test_noprivs@localhost;
|
||||
Grants for test_noprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
|
||||
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
show grants;
|
||||
Grants for test_noprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
|
||||
use priv_db;
|
||||
|
||||
Trigger create disabled - should fail - Bug 8887
|
||||
------------------------------------------------
|
||||
set @test_var='before trig 3.5.3.8-1d';
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-1d');
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-1d
|
||||
drop trigger trg5d_1;
|
||||
show grants;
|
||||
Grants for test_yesprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT SELECT (f1) ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
|
||||
use priv_db;
|
||||
create trigger trg5d_2 before INSERT on t1 for each row
|
||||
set @test_var= new.f1;
|
||||
set @test_var='before trig 3.5.3.8-2d';
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-2d');
|
||||
select @test_var;
|
||||
@test_var
|
||||
insert 3.5.3.8-2d
|
||||
drop trigger trg5d_2;
|
||||
|
||||
Testcase: 3.5.3.x:
|
||||
------------------
|
||||
use priv_db;
|
||||
drop table if exists t1;
|
||||
drop table if exists t2;
|
||||
create table t1 (f1 int) engine= innodb;
|
||||
create table t2 (f2 int) engine= innodb;
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
|
||||
grant TRIGGER on *.* to test_yesprivs@localhost;
|
||||
grant SELECT, UPDATE on priv_db.t1 to test_yesprivs@localhost;
|
||||
grant SELECT on priv_db.t2 to test_yesprivs@localhost;
|
||||
show grants for test_yesprivs@localhost;
|
||||
Grants for test_yesprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT SELECT ON `priv_db`.`t2` TO 'test_yesprivs'@'localhost'
|
||||
GRANT SELECT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
|
||||
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
select current_user;
|
||||
current_user
|
||||
test_yesprivs@localhost
|
||||
use priv_db;
|
||||
create trigger trg1 before insert on t1 for each row
|
||||
insert into t2 values (new.f1);
|
||||
use priv_db;
|
||||
insert into t1 (f1) values (4);
|
||||
ERROR 42000: INSERT command denied to user 'test_yesprivs'@'localhost' for table 't2'
|
||||
revoke SELECT on priv_db.t2 from test_yesprivs@localhost;
|
||||
grant INSERT on priv_db.t2 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values (4);
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
4
|
||||
select f2 from t2 order by f2;
|
||||
f2
|
||||
4
|
||||
use priv_db;
|
||||
drop trigger trg1;
|
||||
create trigger trg2 before insert on t1 for each row
|
||||
update t2 set f2=new.f1-1;
|
||||
use priv_db;
|
||||
insert into t1 (f1) values (2);
|
||||
ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for table 't2'
|
||||
revoke INSERT on priv_db.t2 from test_yesprivs@localhost;
|
||||
grant UPDATE on priv_db.t2 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values (2);
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
2
|
||||
4
|
||||
select f2 from t2 order by f2;
|
||||
f2
|
||||
1
|
||||
use priv_db;
|
||||
drop trigger trg2;
|
||||
create trigger trg3 before insert on t1 for each row
|
||||
select f2 into @aaa from t2 where f2=new.f1;
|
||||
use priv_db;
|
||||
insert into t1 (f1) values (1);
|
||||
ERROR 42000: SELECT command denied to user 'test_yesprivs'@'localhost' for table 't2'
|
||||
revoke UPDATE on priv_db.t2 from test_yesprivs@localhost;
|
||||
grant SELECT on priv_db.t2 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values (1);
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
1
|
||||
2
|
||||
4
|
||||
select f2 from t2 order by f2;
|
||||
f2
|
||||
1
|
||||
select @aaa;
|
||||
@aaa
|
||||
1
|
||||
use priv_db;
|
||||
drop trigger trg3;
|
||||
create trigger trg4 before insert on t1 for each row
|
||||
delete from t2;
|
||||
use priv_db;
|
||||
insert into t1 (f1) values (1);
|
||||
ERROR 42000: DELETE command denied to user 'test_yesprivs'@'localhost' for table 't2'
|
||||
revoke SELECT on priv_db.t2 from test_yesprivs@localhost;
|
||||
grant DELETE on priv_db.t2 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values (1);
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
1
|
||||
1
|
||||
2
|
||||
4
|
||||
select f2 from t2 order by f2;
|
||||
f2
|
||||
drop database if exists priv_db;
|
||||
drop user test_yesprivs@localhost;
|
||||
drop user test_noprivs@localhost;
|
||||
drop user test_noprivs;
|
1639
mysql-test/suite/funcs_1/r/innodb_trig_03e.result
Normal file
1639
mysql-test/suite/funcs_1/r/innodb_trig_03e.result
Normal file
File diff suppressed because it is too large
Load diff
480
mysql-test/suite/funcs_1/r/innodb_trig_0407.result
Normal file
480
mysql-test/suite/funcs_1/r/innodb_trig_0407.result
Normal file
|
@ -0,0 +1,480 @@
|
|||
SET @NO_REFRESH = IF( '' = '', 0, 1);
|
||||
USE test;
|
||||
drop table if exists tb3 ;
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) engine = innodb;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f150' at row 1
|
||||
Note 1265 Data truncated for column 'f151' at row 1
|
||||
Note 1265 Data truncated for column 'f152' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb3.txt' into table tb3 ;
|
||||
|
||||
Testcase: 3.5:
|
||||
--------------
|
||||
create User test_general@localhost;
|
||||
set password for test_general@localhost = password('PWD');
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost;
|
||||
create User test_super@localhost;
|
||||
set password for test_super@localhost = password('PWD');
|
||||
grant ALL on *.* to test_super@localhost with grant OPTION;
|
||||
connect(localhost,test_general,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
connect(localhost,test_super,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
|
||||
Testcase 3.5.4:
|
||||
---------------
|
||||
use test;
|
||||
|
||||
Testcase 3.5.4.1:
|
||||
-----------------
|
||||
create database db_drop;
|
||||
Use db_drop;
|
||||
create table t1 (f1 char(30)) engine=innodb;
|
||||
grant INSERT, SELECT on db_drop.t1 to test_general;
|
||||
Use db_drop;
|
||||
Create trigger trg1 BEFORE INSERT on t1
|
||||
for each row set new.f1='Trigger 3.5.4.1';
|
||||
Use db_drop;
|
||||
Insert into t1 values ('Insert error 3.5.4.1');
|
||||
Select * from t1 order by f1;
|
||||
f1
|
||||
Trigger 3.5.4.1
|
||||
drop trigger trg1;
|
||||
select trigger_schema, trigger_name, event_object_table
|
||||
from information_schema.triggers order by trigger_name;
|
||||
trigger_schema trigger_name event_object_table
|
||||
Insert into t1 values ('Insert no trigger 3.5.4.1');
|
||||
Select * from t1 order by f1;
|
||||
f1
|
||||
Insert no trigger 3.5.4.1
|
||||
Trigger 3.5.4.1
|
||||
drop trigger trg1;
|
||||
drop database if exists db_drop;
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost';
|
||||
|
||||
Testcase 3.5.4.2:
|
||||
-----------------
|
||||
create database db_drop2;
|
||||
Use db_drop2;
|
||||
drop table if exists t1_432 ;
|
||||
create table t1_432 (f1 char (30)) engine=innodb;
|
||||
Drop trigger tr_does_not_exit;
|
||||
ERROR HY000: Trigger does not exist
|
||||
drop table if exists t1_432 ;
|
||||
drop database if exists db_drop2;
|
||||
|
||||
Testcase 3.5.4.3:
|
||||
-----------------
|
||||
create database db_drop3;
|
||||
Use db_drop3;
|
||||
drop table if exists t1_433 ;
|
||||
drop table if exists t1_433a ;
|
||||
create table t1_433 (f1 char (30)) engine=innodb;
|
||||
create table t1_433a (f1a char (5)) engine=innodb;
|
||||
CREATE TRIGGER trg3 BEFORE INSERT on t1_433 for each row
|
||||
set new.f1 = 'Trigger 3.5.4.3';
|
||||
Drop trigger t1.433.trg3;
|
||||
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 '.trg3' at line 1
|
||||
Drop trigger db_drop3.t1.433.trg3;
|
||||
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 '.433.trg3' at line 1
|
||||
Drop trigger mysql.trg3;
|
||||
ERROR HY000: Trigger does not exist
|
||||
Drop trigger tbx.trg3;
|
||||
ERROR HY000: Trigger does not exist
|
||||
Drop trigger db_drop3.trg3;
|
||||
drop table if exists t1_433;
|
||||
drop table if exists t1_433a;
|
||||
drop database if exists db_drop3;
|
||||
|
||||
Testcase 3.5.4.4:
|
||||
-----------------
|
||||
create database db_drop4;
|
||||
Use db_drop4;
|
||||
create table t1 (f1 char(30)) engine=innodb;
|
||||
grant INSERT, SELECT on db_drop4.t1 to test_general;
|
||||
Create trigger trg4 BEFORE INSERT on t1
|
||||
for each row set new.f1='Trigger 3.5.4.4';
|
||||
Use db_drop4;
|
||||
Insert into t1 values ('Insert 3.5.4.4');
|
||||
Select * from t1;
|
||||
f1
|
||||
Trigger 3.5.4.4
|
||||
Drop database db_drop4;
|
||||
Show databases;
|
||||
Database
|
||||
information_schema
|
||||
mysql
|
||||
test
|
||||
select trigger_schema, trigger_name, event_object_table
|
||||
from information_schema.triggers
|
||||
where information_schema.triggers.trigger_name='trg4';
|
||||
trigger_schema trigger_name event_object_table
|
||||
create database db_drop4;
|
||||
Use db_drop4;
|
||||
create table t1 (f1 char(30)) engine=innodb;
|
||||
grant INSERT, SELECT on db_drop4.t1 to test_general;
|
||||
Insert into t1 values ('2nd Insert 3.5.4.4');
|
||||
Select * from t1;
|
||||
f1
|
||||
2nd Insert 3.5.4.4
|
||||
drop trigger trg4;
|
||||
ERROR HY000: Trigger does not exist
|
||||
drop database if exists db_drop4;
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost';
|
||||
|
||||
Testcase 3.5.4.5:
|
||||
-----------------
|
||||
create database db_drop5;
|
||||
Use db_drop5;
|
||||
create table t1 (f1 char(50)) engine=innodb;
|
||||
grant INSERT, SELECT on t1 to test_general;
|
||||
Create trigger trg5 BEFORE INSERT on t1
|
||||
for each row set new.f1='Trigger 3.5.4.5';
|
||||
Use db_drop5;
|
||||
Insert into t1 values ('Insert 3.5.4.5');
|
||||
Select * from t1;
|
||||
f1
|
||||
Trigger 3.5.4.5
|
||||
Drop table t1;
|
||||
Show tables;
|
||||
Tables_in_db_drop5
|
||||
select trigger_schema, trigger_name, event_object_table
|
||||
from information_schema.triggers
|
||||
where information_schema.triggers.trigger_name='trg5';
|
||||
trigger_schema trigger_name event_object_table
|
||||
create table t1 (f1 char(50)) engine=innodb;
|
||||
grant INSERT, SELECT on t1 to test_general;
|
||||
Insert into t1 values ('2nd Insert 3.5.4.5');
|
||||
Select * from t1;
|
||||
f1
|
||||
2nd Insert 3.5.4.5
|
||||
drop trigger trg5;
|
||||
ERROR HY000: Trigger does not exist
|
||||
drop database if exists db_drop5;
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost';
|
||||
|
||||
Testcase 3.5.5:
|
||||
---------------
|
||||
use test;
|
||||
|
||||
Testcase 3.5.5.1:
|
||||
-----------------
|
||||
Create trigger trg1 before INSERT on t100 for each row set new.f2=1000;
|
||||
ERROR 42S02: Table 'test.t100' doesn't exist
|
||||
|
||||
Testcase 3.5.5.2:
|
||||
-----------------
|
||||
Create temporary table t1_temp (f1 bigint signed, f2 bigint unsigned);
|
||||
Create trigger trg2 before INSERT
|
||||
on t1_temp for each row set new.f2=9999;
|
||||
ERROR HY000: Trigger's 't1_temp' is view or temporary table
|
||||
drop table t1_temp;
|
||||
|
||||
Testcase 3.5.5.3:
|
||||
-----------------
|
||||
Create view vw3 as select f118 from tb3;
|
||||
Create trigger trg3 before INSERT
|
||||
on vw3 for each row set new.f118='s';
|
||||
ERROR HY000: 'test.vw3' is not BASE TABLE
|
||||
drop view vw3;
|
||||
|
||||
Testcase 3.5.5.4:
|
||||
-----------------
|
||||
create database dbtest_one;
|
||||
create database dbtest_two;
|
||||
use dbtest_two;
|
||||
create table t2 (f1 char(15)) engine=innodb;
|
||||
use dbtest_one;
|
||||
create trigger trg4 before INSERT
|
||||
on dbtest_two.t2 for each row set new.f1='trig 3.5.5.4';
|
||||
ERROR HY000: Trigger in wrong schema
|
||||
grant INSERT, SELECT on dbtest_two.t2 to test_general;
|
||||
grant SELECT on dbtest_one.* to test_general;
|
||||
use dbtest_two;
|
||||
Insert into t2 values ('1st Insert 3.5.5.4');
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f1' at row 1
|
||||
Select * from t2;
|
||||
f1
|
||||
1st Insert 3.5.
|
||||
use dbtest_one;
|
||||
Insert into dbtest_two.t2 values ('2nd Insert 3.5.5.4');
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f1' at row 1
|
||||
Select * from dbtest_two.t2 order by f1;
|
||||
f1
|
||||
1st Insert 3.5.
|
||||
2nd Insert 3.5.
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost';
|
||||
DROP DATABASE if exists dbtest_one;
|
||||
drop database if EXISTS dbtest_two;
|
||||
|
||||
Testcase 3.5.6:
|
||||
---------------
|
||||
use test;
|
||||
|
||||
Testcase 3.5.6.1 (see Testcase 3.5.1.1)
|
||||
---------------------------------------
|
||||
|
||||
Testcase 3.5.6.2 (see Testcase 3.5.1.1)
|
||||
---------------------------------------
|
||||
|
||||
Testcase 3.5.6.3:
|
||||
-----------------
|
||||
Create trigger trg3_1 DURING UPDATE on tb3 for each row set new.f132=25;
|
||||
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 'DURING UPDATE on tb3 for each row set new.f132=25' at line 1
|
||||
Create trigger trg3_2 TIME INSERT on tb3 for each row set new.f132=15;
|
||||
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 'TIME INSERT on tb3 for each row set new.f132=15' at line 1
|
||||
drop trigger tb3.trg3_1;
|
||||
drop trigger tb3.trg3_2;
|
||||
|
||||
Testcase 3.5.6.4 (see Testcase 3.5.1.1)
|
||||
---------------------------------------
|
||||
|
||||
Testcase 3.5.6.5 (see Testcase 3.5.1.1)
|
||||
---------------------------------------
|
||||
|
||||
Testcase 3.5.7.1 (see Testcase 3.5.1.1)
|
||||
---------------------------------------
|
||||
|
||||
Testcase 3.5.7.2 (see Testcase 3.5.1.1)
|
||||
---------------------------------------
|
||||
|
||||
Testcase 3.5.7.3 (see Testcase 3.5.1.1)
|
||||
---------------------------------------
|
||||
|
||||
Testcase 3.5.7.4:
|
||||
-----------------
|
||||
Create trigger trg4_1 BEFORE SELECT on tb3 for each row set new.f132=5;
|
||||
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 'SELECT on tb3 for each row set new.f132=5' at line 1
|
||||
Create trigger trg4_2 AFTER VALUE on tb3 for each row set new.f132=1;
|
||||
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 'VALUE on tb3 for each row set new.f132=1' at line 1
|
||||
drop trigger tb3.trg4_1;
|
||||
drop trigger tb3.trg4_2;
|
||||
|
||||
Testcase 3.5.7.5 / 3.5.7.6:
|
||||
---------------------------
|
||||
Create trigger trg5_1 BEFORE INSERT
|
||||
on tb3 for each row set new.f122='Trigger1 3.5.7.5/6';
|
||||
Create trigger trg5_2 BEFORE INSERT
|
||||
on tb3 for each row set new.f122='Trigger2 3.5.7.5';
|
||||
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
|
||||
Insert into tb3 (f121,f122) values ('Test 3.5.7.5/6','Insert 3.5.7.5');
|
||||
Select f121,f122 from tb3 where f121='Test 3.5.7.5/6';
|
||||
f121 f122
|
||||
Test 3.5.7.5/6 Trigger1 3.5.7.5/6
|
||||
update tb3 set f122='Update 3.5.7.6' where f121= 'Test 3.5.7.5/6';
|
||||
Select f121,f122 from tb3 where f121='Test 3.5.7.5/6';
|
||||
f121 f122
|
||||
Test 3.5.7.5/6 Update 3.5.7.6
|
||||
drop trigger trg5_1;
|
||||
drop trigger trg5_2;
|
||||
delete from tb3 where f121='Test 3.5.7.5/6';
|
||||
|
||||
Testcase 3.5.7.7 / 3.5.7.8:
|
||||
---------------------------
|
||||
set @test_var='Before trig 3.5.7.7';
|
||||
Create trigger trg6_1 AFTER INSERT
|
||||
on tb3 for each row set @test_var='Trigger1 3.5.7.7/8';
|
||||
Create trigger trg6_2 AFTER INSERT
|
||||
on tb3 for each row set @test_var='Trigger2 3.5.7.7';
|
||||
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
|
||||
select @test_var;
|
||||
@test_var
|
||||
Before trig 3.5.7.7
|
||||
Insert into tb3 (f121,f122) values ('Test 3.5.7.7/8','Insert 3.5.7.7');
|
||||
Select f121,f122 from tb3 where f121='Test 3.5.7.7/8';
|
||||
f121 f122
|
||||
Test 3.5.7.7/8 Insert 3.5.7.7
|
||||
select @test_var;
|
||||
@test_var
|
||||
Trigger1 3.5.7.7/8
|
||||
update tb3 set f122='Update 3.5.7.8' where f121= 'Test 3.5.7.7/8';
|
||||
Select f121,f122 from tb3 where f121='Test 3.5.7.7/8';
|
||||
f121 f122
|
||||
Test 3.5.7.7/8 Update 3.5.7.8
|
||||
select @test_var;
|
||||
@test_var
|
||||
Trigger1 3.5.7.7/8
|
||||
drop trigger trg6_1;
|
||||
drop trigger trg6_2;
|
||||
delete from tb3 where f121='Test 3.5.7.7/8';
|
||||
|
||||
Testcase 3.5.7.9/10:
|
||||
--------------------
|
||||
Create trigger trg7_1 BEFORE UPDATE
|
||||
on tb3 for each row set new.f122='Trigger1 3.5.7.9/10';
|
||||
Create trigger trg7_2 BEFORE UPDATE
|
||||
on tb3 for each row set new.f122='Trigger2 3.5.7.9';
|
||||
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
|
||||
Insert into tb3 (f121,f122) values ('Test 3.5.7.9/10','Insert 3.5.7.9');
|
||||
Select f121,f122 from tb3 where f121='Test 3.5.7.9/10';
|
||||
f121 f122
|
||||
Test 3.5.7.9/10 Insert 3.5.7.9
|
||||
update tb3 set f122='update 3.5.7.10' where f121='Test 3.5.7.9/10';
|
||||
Select f121,f122 from tb3 where f121='Test 3.5.7.9/10';
|
||||
f121 f122
|
||||
Test 3.5.7.9/10 Trigger1 3.5.7.9/10
|
||||
drop trigger trg7_1;
|
||||
drop trigger trg7_2;
|
||||
delete from tb3 where f121='Test 3.5.7.9/10';
|
||||
|
||||
Testcase 3.5.7.11/12:
|
||||
---------------------
|
||||
set @test_var='Before trig 3.5.7.11';
|
||||
Create trigger trg8_1 AFTER UPDATE
|
||||
on tb3 for each row set @test_var='Trigger 3.5.7.11/12';
|
||||
Create trigger trg8_2 AFTER UPDATE
|
||||
on tb3 for each row set @test_var='Trigger2 3.5.7.11';
|
||||
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
|
||||
select @test_var;
|
||||
@test_var
|
||||
Before trig 3.5.7.11
|
||||
Insert into tb3 (f121,f122) values ('Test 3.5.7.11/12','Insert 3.5.7.11/12');
|
||||
select @test_var;
|
||||
@test_var
|
||||
Before trig 3.5.7.11
|
||||
Select f121,f122 from tb3 where f121='Test 3.5.7.11/12';
|
||||
f121 f122
|
||||
Test 3.5.7.11/12 Insert 3.5.7.11/12
|
||||
update tb3 set f122='update 3.5.7.12' where f121='Test 3.5.7.11/12';
|
||||
Select f121,f122 from tb3 where f121='Test 3.5.7.11/12';
|
||||
f121 f122
|
||||
Test 3.5.7.11/12 update 3.5.7.12
|
||||
select @test_var;
|
||||
@test_var
|
||||
Trigger 3.5.7.11/12
|
||||
delete from tb3 where f121='Test 3.5.7.11/12';
|
||||
drop trigger trg8_1;
|
||||
drop trigger trg8_2;
|
||||
delete from tb3 where f121='Test 3.5.7.11/12';
|
||||
|
||||
Testcase 3.5.7.13/14:
|
||||
---------------------
|
||||
set @test_var=1;
|
||||
Create trigger trg9_1 BEFORE DELETE
|
||||
on tb3 for each row set @test_var=@test_var+1;
|
||||
Create trigger trg9_2 BEFORE DELETE
|
||||
on tb3 for each row set @test_var=@test_var+10;
|
||||
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
|
||||
select @test_var;
|
||||
@test_var
|
||||
1
|
||||
Insert into tb3 (f121,f122) values ('Test 3.5.7.13/14','Insert 3.5.7.13');
|
||||
Select f121,f122 from tb3 where f121='Test 3.5.7.13/14';
|
||||
f121 f122
|
||||
Test 3.5.7.13/14 Insert 3.5.7.13
|
||||
select @test_var;
|
||||
@test_var
|
||||
1
|
||||
delete from tb3 where f121='Test 3.5.7.13/14';
|
||||
Select f121,f122 from tb3 where f121='Test 3.5.7.13/14';
|
||||
f121 f122
|
||||
select @test_var;
|
||||
@test_var
|
||||
2
|
||||
delete from tb3 where f121='Test 3.5.7.13/14';
|
||||
select @test_var;
|
||||
@test_var
|
||||
2
|
||||
drop trigger trg9_1;
|
||||
drop trigger trg9_2;
|
||||
delete from tb3 where f121='Test 3.5.7.13/14';
|
||||
|
||||
Testcase 3.5.7.15/16:
|
||||
---------------------
|
||||
set @test_var=1;
|
||||
Create trigger trg_3_406010_1 AFTER DELETE
|
||||
on tb3 for each row set @test_var=@test_var+5;
|
||||
Create trigger trg_3_406010_2 AFTER DELETE
|
||||
on tb3 for each row set @test_var=@test_var+50;
|
||||
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
|
||||
Create trigger trg_3_406010_1 AFTER INSERT
|
||||
on tb3 for each row set @test_var=@test_var+1;
|
||||
ERROR HY000: Trigger already exists
|
||||
select @test_var;
|
||||
@test_var
|
||||
1
|
||||
Insert into tb3 (f121,f122) values ('Test 3.5.7.15/16','Insert 3.5.7.15/16');
|
||||
Select f121,f122 from tb3 where f121='Test 3.5.7.15/16';
|
||||
f121 f122
|
||||
Test 3.5.7.15/16 Insert 3.5.7.15/16
|
||||
select @test_var;
|
||||
@test_var
|
||||
1
|
||||
delete from tb3 where f121='Test 3.5.7.15/16';
|
||||
Select f121,f122 from tb3 where f121='Test 3.5.7.15/16';
|
||||
f121 f122
|
||||
select @test_var;
|
||||
@test_var
|
||||
6
|
||||
delete from tb3 where f121='Test 3.5.7.15/16';
|
||||
select @test_var;
|
||||
@test_var
|
||||
6
|
||||
drop trigger trg_3_406010_1;
|
||||
drop trigger trg_3_406010_2;
|
||||
delete from tb3 where f121='Test 3.5.7.15/16';
|
||||
|
||||
Testcase 3.5.7.17 (see Testcase 3.5.1.1)
|
||||
----------------------------------------
|
||||
drop user test_general@localhost;
|
||||
drop user test_general;
|
||||
drop user test_super@localhost;
|
507
mysql-test/suite/funcs_1/r/innodb_trig_08.result
Normal file
507
mysql-test/suite/funcs_1/r/innodb_trig_08.result
Normal file
|
@ -0,0 +1,507 @@
|
|||
SET @NO_REFRESH = IF( '' = '', 0, 1);
|
||||
USE test;
|
||||
drop table if exists tb3 ;
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) engine = innodb;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f150' at row 1
|
||||
Note 1265 Data truncated for column 'f151' at row 1
|
||||
Note 1265 Data truncated for column 'f152' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb3.txt' into table tb3 ;
|
||||
|
||||
Testcase: 3.5:
|
||||
--------------
|
||||
create User test_general@localhost;
|
||||
set password for test_general@localhost = password('PWD');
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost;
|
||||
create User test_super@localhost;
|
||||
set password for test_super@localhost = password('PWD');
|
||||
grant ALL on *.* to test_super@localhost with grant OPTION;
|
||||
connect(localhost,test_general,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
connect(localhost,test_super,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
|
||||
Testcase 3.5.8.1: (implied in previous tests)
|
||||
---------------------------------------------
|
||||
|
||||
Testcase 3.5.8.2: (implied in previous tests)
|
||||
---------------------------------------------
|
||||
|
||||
Testcase 3.5.8.3/4:
|
||||
-------------------
|
||||
create database db_test;
|
||||
grant SELECT, INSERT, UPDATE, DELETE on db_test.* to test_general;
|
||||
grant LOCK TABLES on db_test.* to test_general;
|
||||
Use db_test;
|
||||
create table t1_i (
|
||||
i120 char ascii not null DEFAULT b'101',
|
||||
i136 smallint zerofill not null DEFAULT 999,
|
||||
i144 int zerofill not null DEFAULT 99999,
|
||||
i163 decimal (63,30)) engine=innodb;
|
||||
create table t1_u (
|
||||
u120 char ascii not null DEFAULT b'101',
|
||||
u136 smallint zerofill not null DEFAULT 999,
|
||||
u144 int zerofill not null DEFAULT 99999,
|
||||
u163 decimal (63,30)) engine=innodb;
|
||||
create table t1_d (
|
||||
d120 char ascii not null DEFAULT b'101',
|
||||
d136 smallint zerofill not null DEFAULT 999,
|
||||
d144 int zerofill not null DEFAULT 99999,
|
||||
d163 decimal (63,30)) engine=innodb;
|
||||
Insert into t1_u values ('a',111,99999,999.99);
|
||||
Insert into t1_u values ('b',222,99999,999.99);
|
||||
Insert into t1_u values ('c',333,99999,999.99);
|
||||
Insert into t1_u values ('d',222,99999,999.99);
|
||||
Insert into t1_u values ('e',222,99999,999.99);
|
||||
Insert into t1_u values ('f',333,99999,999.99);
|
||||
Insert into t1_d values ('a',111,99999,999.99);
|
||||
Insert into t1_d values ('b',222,99999,999.99);
|
||||
Insert into t1_d values ('c',333,99999,999.99);
|
||||
Insert into t1_d values ('d',444,99999,999.99);
|
||||
Insert into t1_d values ('e',222,99999,999.99);
|
||||
Insert into t1_d values ('f',222,99999,999.99);
|
||||
|
||||
3.5.8.4 - multiple SQL
|
||||
----------------------
|
||||
use test;
|
||||
Create trigger trg1 AFTER INSERT on tb3 for each row
|
||||
BEGIN
|
||||
insert into db_test.t1_i
|
||||
values (new.f120, new.f136, new.f144, new.f163);
|
||||
update db_test.t1_u
|
||||
set u144=new.f144, u163=new.f163
|
||||
where u136=new.f136;
|
||||
delete from db_test.t1_d where d136= new.f136;
|
||||
select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u
|
||||
where u136= new.f136;
|
||||
END//
|
||||
Use test;
|
||||
set @test_var=0;
|
||||
Insert into tb3 (f120, f122, f136, f144, f163)
|
||||
values ('1', 'Test 3.5.8.4', 222, 23456, 1.05);
|
||||
Select f120, f122, f136, f144, f163 from tb3 where f122= 'Test 3.5.8.4';
|
||||
f120 f122 f136 f144 f163
|
||||
1 Test 3.5.8.4 00222 0000023456 1.050000000000000000000000000000
|
||||
select * from db_test.t1_i order by i120;
|
||||
i120 i136 i144 i163
|
||||
1 00222 0000023456 1.050000000000000000000000000000
|
||||
select * from db_test.t1_u order by u120;
|
||||
u120 u136 u144 u163
|
||||
a 00111 0000099999 999.990000000000000000000000000000
|
||||
b 00222 0000023456 1.050000000000000000000000000000
|
||||
c 00333 0000099999 999.990000000000000000000000000000
|
||||
d 00222 0000023456 1.050000000000000000000000000000
|
||||
e 00222 0000023456 1.050000000000000000000000000000
|
||||
f 00333 0000099999 999.990000000000000000000000000000
|
||||
select * from db_test.t1_d order by d120;
|
||||
d120 d136 d144 d163
|
||||
a 00111 0000099999 999.990000000000000000000000000000
|
||||
c 00333 0000099999 999.990000000000000000000000000000
|
||||
d 00444 0000099999 999.990000000000000000000000000000
|
||||
select @test_var;
|
||||
@test_var
|
||||
3.150000000000000000000000000000
|
||||
|
||||
3.5.8.4 - single SQL - insert
|
||||
-----------------------------
|
||||
Create trigger trg2 BEFORE UPDATE on tb3 for each row
|
||||
BEGIN
|
||||
insert into db_test.t1_i
|
||||
values (new.f120, new.f136, new.f144, new.f163);
|
||||
END//
|
||||
Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
|
||||
f120 f122 f136 f144 f163
|
||||
1 Test 3.5.8.4 00222 0000023456 1.050000000000000000000000000000
|
||||
select * from db_test.t1_i order by i120;
|
||||
i120 i136 i144 i163
|
||||
1 00222 0000023456 1.050000000000000000000000000000
|
||||
update tb3 set f120='I', f122='Test 3.5.8.4-Single Insert'
|
||||
where f122='Test 3.5.8.4';
|
||||
Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
|
||||
f120 f122 f136 f144 f163
|
||||
I Test 3.5.8.4-Single Insert 00222 0000023456 1.050000000000000000000000000000
|
||||
select * from db_test.t1_i order by i120;
|
||||
i120 i136 i144 i163
|
||||
1 00222 0000023456 1.050000000000000000000000000000
|
||||
I 00222 0000023456 1.050000000000000000000000000000
|
||||
|
||||
3.5.8.4 - single SQL - update
|
||||
-----------------------------
|
||||
drop trigger trg2;
|
||||
Create trigger trg3 BEFORE UPDATE on tb3 for each row
|
||||
update db_test.t1_u
|
||||
set u120=new.f120
|
||||
where u136=new.f136;
|
||||
update tb3 set f120='U', f122='Test 3.5.8.4-Single Update'
|
||||
where f122='Test 3.5.8.4-Single Insert';
|
||||
Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
|
||||
f120 f122 f136 f144 f163
|
||||
U Test 3.5.8.4-Single Update 00222 0000023456 1.050000000000000000000000000000
|
||||
select * from db_test.t1_u order by u120;
|
||||
u120 u136 u144 u163
|
||||
a 00111 0000099999 999.990000000000000000000000000000
|
||||
c 00333 0000099999 999.990000000000000000000000000000
|
||||
f 00333 0000099999 999.990000000000000000000000000000
|
||||
U 00222 0000023456 1.050000000000000000000000000000
|
||||
U 00222 0000023456 1.050000000000000000000000000000
|
||||
U 00222 0000023456 1.050000000000000000000000000000
|
||||
|
||||
3.5.8.3/4 - single SQL - delete
|
||||
-------------------------------
|
||||
drop trigger trg3;
|
||||
Create trigger trg4 AFTER UPDATE on tb3 for each row
|
||||
delete from db_test.t1_d where d136= new.f136;
|
||||
update tb3 set f120='D', f136=444,
|
||||
f122='Test 3.5.8.4-Single Delete'
|
||||
where f122='Test 3.5.8.4-Single Update';
|
||||
Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
|
||||
f120 f122 f136 f144 f163
|
||||
D Test 3.5.8.4-Single Delete 00444 0000023456 1.050000000000000000000000000000
|
||||
select * from db_test.t1_d order by d120;
|
||||
d120 d136 d144 d163
|
||||
a 00111 0000099999 999.990000000000000000000000000000
|
||||
c 00333 0000099999 999.990000000000000000000000000000
|
||||
|
||||
3.5.8.3/4 - single SQL - select
|
||||
-------------------------------
|
||||
drop trigger trg4;
|
||||
Create trigger trg5 AFTER UPDATE on tb3 for each row
|
||||
select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u
|
||||
where u136= new.f136;
|
||||
set @test_var=0;
|
||||
update tb3 set f120='S', f136=111,
|
||||
f122='Test 3.5.8.4-Single Select'
|
||||
where f122='Test 3.5.8.4-Single Delete';
|
||||
Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
|
||||
f120 f122 f136 f144 f163
|
||||
S Test 3.5.8.4-Single Select 00111 0000023456 1.050000000000000000000000000000
|
||||
select @test_var;
|
||||
@test_var
|
||||
999.990000000000000000000000000000
|
||||
drop trigger trg1;
|
||||
drop trigger trg5;
|
||||
drop database if exists db_test;
|
||||
delete from tb3 where f122 like 'Test 3.5.8.4%';
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost';
|
||||
|
||||
Testcase 3.5.8.5 (IF):
|
||||
----------------------
|
||||
create trigger trg2 before insert on tb3 for each row
|
||||
BEGIN
|
||||
IF new.f120='1' then
|
||||
set @test_var='one', new.f120='2';
|
||||
ELSEIF new.f120='2' then
|
||||
set @test_var='two', new.f120='3';
|
||||
ELSEIF new.f120='3' then
|
||||
set @test_var='three', new.f120='4';
|
||||
END IF;
|
||||
IF (new.f120='4') and (new.f136=10) then
|
||||
set @test_var2='2nd if', new.f120='d';
|
||||
ELSE
|
||||
set @test_var2='2nd else', new.f120='D';
|
||||
END IF;
|
||||
END//
|
||||
set @test_var='Empty', @test_var2=0;
|
||||
Insert into tb3 (f120, f122, f136) values ('1', 'Test 3.5.8.5-if', 101);
|
||||
select f120, f122, f136, @test_var, @test_var2
|
||||
from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
|
||||
f120 f122 f136 @test_var @test_var2
|
||||
D Test 3.5.8.5-if 00101 one 2nd else
|
||||
Insert into tb3 (f120, f122, f136) values ('2', 'Test 3.5.8.5-if', 102);
|
||||
select f120, f122, f136, @test_var, @test_var2
|
||||
from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
|
||||
f120 f122 f136 @test_var @test_var2
|
||||
D Test 3.5.8.5-if 00101 two 2nd else
|
||||
D Test 3.5.8.5-if 00102 two 2nd else
|
||||
Insert into tb3 (f120, f122, f136) values ('3', 'Test 3.5.8.5-if', 10);
|
||||
select f120, f122, f136, @test_var, @test_var2
|
||||
from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
|
||||
f120 f122 f136 @test_var @test_var2
|
||||
d Test 3.5.8.5-if 00010 three 2nd if
|
||||
D Test 3.5.8.5-if 00101 three 2nd if
|
||||
D Test 3.5.8.5-if 00102 three 2nd if
|
||||
Insert into tb3 (f120, f122, f136) values ('3', 'Test 3.5.8.5-if', 103);
|
||||
select f120, f122, f136, @test_var, @test_var2
|
||||
from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
|
||||
f120 f122 f136 @test_var @test_var2
|
||||
d Test 3.5.8.5-if 00010 three 2nd else
|
||||
D Test 3.5.8.5-if 00101 three 2nd else
|
||||
D Test 3.5.8.5-if 00102 three 2nd else
|
||||
D Test 3.5.8.5-if 00103 three 2nd else
|
||||
create trigger trg3 before update on tb3 for each row
|
||||
BEGIN
|
||||
ELSEIF new.f120='2' then
|
||||
END IF;
|
||||
END//
|
||||
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 'ELSEIF new.f120='2' then
|
||||
END IF;
|
||||
END' at line 3
|
||||
drop trigger trg3//
|
||||
create trigger trg4 before update on tb3 for each row
|
||||
BEGIN
|
||||
IF (new.f120='4') and (new.f136=10) then
|
||||
set @test_var2='2nd if', new.f120='d';
|
||||
ELSE
|
||||
set @test_var2='2nd else', new.f120='D';
|
||||
END//
|
||||
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 '' at line 7
|
||||
drop trigger trg4;
|
||||
drop trigger trg2;
|
||||
delete from tb3 where f121='Test 3.5.8.5-if';
|
||||
|
||||
Testcase 3.5.8.5-case:
|
||||
----------------------
|
||||
create trigger trg3 before insert on tb3 for each row
|
||||
BEGIN
|
||||
SET new.f120=char(ascii(new.f120)-32);
|
||||
CASE
|
||||
when new.f136<100 then set new.f136=new.f136+120;
|
||||
when new.f136<10 then set new.f144=777;
|
||||
when new.f136>100 then set new.f120=new.f136-1;
|
||||
END case;
|
||||
CASE
|
||||
when new.f136=200 then set @test_var=CONCAT(new.f120, '=');
|
||||
ELSE set @test_var=concat(new.f120, '*');
|
||||
END case;
|
||||
CASE new.f144
|
||||
when 1 then set @test_var=concat(@test_var, 'one');
|
||||
when 2 then set @test_var=concat(@test_var, 'two');
|
||||
when 3 then set @test_var=concat(@test_var, 'three');
|
||||
when 4 then set @test_var=concat(@test_var, 'four');
|
||||
when 5 then set @test_var=concat(@test_var, 'five');
|
||||
when 6 then set @test_var=concat(@test_var, 'six');
|
||||
when 7 then set @test_var=concat(@test_var, 'seven');
|
||||
when 8 then set @test_var=concat(@test_var, 'eight');
|
||||
when 9 then set @test_var=concat(@test_var, 'nine');
|
||||
when 10 then set @test_var=concat(@test_var, 'ten');
|
||||
when 11 then set @test_var=concat(@test_var, 'eleven');
|
||||
when 12 then set @test_var=concat(@test_var, 'twelve');
|
||||
when 13 then set @test_var=concat(@test_var, 'thirteen');
|
||||
when 14 then set @test_var=concat(@test_var, 'fourteen');
|
||||
when 15 then set @test_var=concat(@test_var, 'fifteen');
|
||||
ELSE set @test_var=CONCAT(new.f120, '*', new.f144);
|
||||
END case;
|
||||
END//
|
||||
set @test_var='Empty';
|
||||
Insert into tb3 (f120, f122, f136, f144)
|
||||
values ('a', 'Test 3.5.8.5-case', 5, 7);
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120;
|
||||
f120 f122 f136 f144 @test_var
|
||||
A Test 3.5.8.5-case 00125 0000000007 A*seven
|
||||
Insert into tb3 (f120, f122, f136, f144)
|
||||
values ('b', 'Test 3.5.8.5-case', 71,16);
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120;
|
||||
f120 f122 f136 f144 @test_var
|
||||
A Test 3.5.8.5-case 00125 0000000007 B*0000000016
|
||||
B Test 3.5.8.5-case 00191 0000000016 B*0000000016
|
||||
Insert into tb3 (f120, f122, f136, f144)
|
||||
values ('c', 'Test 3.5.8.5-case', 80,1);
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120;
|
||||
f120 f122 f136 f144 @test_var
|
||||
A Test 3.5.8.5-case 00125 0000000007 C=one
|
||||
B Test 3.5.8.5-case 00191 0000000016 C=one
|
||||
C Test 3.5.8.5-case 00200 0000000001 C=one
|
||||
Insert into tb3 (f120, f122, f136)
|
||||
values ('d', 'Test 3.5.8.5-case', 152);
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f120' at row 1
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120;
|
||||
f120 f122 f136 f144 @test_var
|
||||
1 Test 3.5.8.5-case 00152 0000099999 1*0000099999
|
||||
A Test 3.5.8.5-case 00125 0000000007 1*0000099999
|
||||
B Test 3.5.8.5-case 00191 0000000016 1*0000099999
|
||||
C Test 3.5.8.5-case 00200 0000000001 1*0000099999
|
||||
Insert into tb3 (f120, f122, f136, f144)
|
||||
values ('e', 'Test 3.5.8.5-case', 200, 8);
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f120' at row 1
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120;
|
||||
f120 f122 f136 f144 @test_var
|
||||
1 Test 3.5.8.5-case 00152 0000099999 1=eight
|
||||
1 Test 3.5.8.5-case 00200 0000000008 1=eight
|
||||
A Test 3.5.8.5-case 00125 0000000007 1=eight
|
||||
B Test 3.5.8.5-case 00191 0000000016 1=eight
|
||||
C Test 3.5.8.5-case 00200 0000000001 1=eight
|
||||
Insert into tb3 (f120, f122, f136, f144)
|
||||
values ('f', 'Test 3.5.8.5-case', 100, 8);
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120;
|
||||
f120 f122 f136 f144 @test_var
|
||||
1 Test 3.5.8.5-case 00152 0000099999 1=eight
|
||||
1 Test 3.5.8.5-case 00200 0000000008 1=eight
|
||||
A Test 3.5.8.5-case 00125 0000000007 1=eight
|
||||
B Test 3.5.8.5-case 00191 0000000016 1=eight
|
||||
C Test 3.5.8.5-case 00200 0000000001 1=eight
|
||||
create trigger trg3a before update on tb3 for each row
|
||||
BEGIN
|
||||
CASE
|
||||
when new.f136<100 then set new.f120='p';
|
||||
END//
|
||||
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 '' at line 5
|
||||
drop trigger trg3a;
|
||||
drop trigger trg3;
|
||||
delete from tb3 where f121='Test 3.5.8.5-case';
|
||||
|
||||
Testcase 3.5.8.5-loop/leave:
|
||||
----------------------------
|
||||
Create trigger trg4 after insert on tb3 for each row
|
||||
BEGIN
|
||||
set @counter=0, @flag='Initial';
|
||||
Label1: loop
|
||||
if new.f136<new.f144 then
|
||||
set @counter='Nothing to loop';
|
||||
leave Label1;
|
||||
else
|
||||
set @counter=@counter+1;
|
||||
if new.f136=new.f144+@counter then
|
||||
set @counter=concat(@counter, ' loops');
|
||||
leave Label1;
|
||||
end if;
|
||||
end if;
|
||||
iterate label1;
|
||||
set @flag='Final';
|
||||
END loop Label1;
|
||||
END//
|
||||
Insert into tb3 (f122, f136, f144)
|
||||
values ('Test 3.5.8.5-loop', 2, 8);
|
||||
select @counter, @flag;
|
||||
@counter @flag
|
||||
Nothing to loop Initial
|
||||
Insert into tb3 (f122, f136, f144)
|
||||
values ('Test 3.5.8.5-loop', 11, 8);
|
||||
select @counter, @flag;
|
||||
@counter @flag
|
||||
3 loops Initial
|
||||
Create trigger trg4_2 after update on tb3 for each row
|
||||
BEGIN
|
||||
Label1: loop
|
||||
set @counter=@counter+1;
|
||||
END;
|
||||
END//
|
||||
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 ';
|
||||
END' at line 5
|
||||
drop trigger trg4_2;
|
||||
drop trigger trg4;
|
||||
delete from tb3 where f122='Test 3.5.8.5-loop';
|
||||
|
||||
Testcase 3.5.8.5-repeat:
|
||||
------------------------
|
||||
Create trigger trg6 after insert on tb3 for each row
|
||||
BEGIN
|
||||
rp_label: REPEAT
|
||||
SET @counter1 = @counter1 + 1;
|
||||
IF (@counter1 MOD 2 = 0) THEN ITERATE rp_label;
|
||||
END IF;
|
||||
SET @counter2 = @counter2 + 1;
|
||||
UNTIL @counter1> new.f136 END REPEAT rp_label;
|
||||
END//
|
||||
set @counter1= 0, @counter2= 0;
|
||||
Insert into tb3 (f122, f136)
|
||||
values ('Test 3.5.8.5-repeat', 13);
|
||||
select @counter1, @counter2;
|
||||
@counter1 @counter2
|
||||
15 8
|
||||
Create trigger trg6_2 after update on tb3 for each row
|
||||
BEGIN
|
||||
REPEAT
|
||||
SET @counter2 = @counter2 + 1;
|
||||
END//
|
||||
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 'END' at line 5
|
||||
drop trigger trg6;
|
||||
delete from tb3 where f122='Test 3.5.8.5-repeat';
|
||||
|
||||
Testcase 3.5.8.5-while:
|
||||
-----------------------
|
||||
Create trigger trg7 after insert on tb3 for each row
|
||||
wl_label: WHILE @counter1 < new.f136 DO
|
||||
SET @counter1 = @counter1 + 1;
|
||||
IF (@counter1 MOD 2 = 0) THEN ITERATE wl_label;
|
||||
END IF;
|
||||
SET @counter2 = @counter2 + 1;
|
||||
END WHILE wl_label//
|
||||
set @counter1= 0, @counter2= 0;
|
||||
Insert into tb3 (f122, f136)
|
||||
values ('Test 3.5.8.5-while', 7);
|
||||
select @counter1, @counter2;
|
||||
@counter1 @counter2
|
||||
7 4
|
||||
Create trigger trg7_2 after update on tb3 for each row
|
||||
BEGIN
|
||||
WHILE @counter1 < new.f136
|
||||
SET @counter1 = @counter1 + 1;
|
||||
END//
|
||||
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 'SET @counter1 = @counter1 + 1;
|
||||
END' at line 4
|
||||
delete from tb3 where f122='Test 3.5.8.5-while';
|
||||
drop trigger trg7;
|
||||
|
||||
Testcase 3.5.8.6: (requirement void)
|
||||
------------------------------------
|
||||
|
||||
Testcase 3.5.8.7: (Disabled as a result of bug _____)
|
||||
-----------------------------------------------------
|
||||
drop user test_general@localhost;
|
||||
drop user test_general;
|
||||
drop user test_super@localhost;
|
271
mysql-test/suite/funcs_1/r/innodb_trig_09.result
Normal file
271
mysql-test/suite/funcs_1/r/innodb_trig_09.result
Normal file
|
@ -0,0 +1,271 @@
|
|||
SET @NO_REFRESH = IF( '' = '', 0, 1);
|
||||
USE test;
|
||||
drop table if exists tb3 ;
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) engine = innodb;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f150' at row 1
|
||||
Note 1265 Data truncated for column 'f151' at row 1
|
||||
Note 1265 Data truncated for column 'f152' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb3.txt' into table tb3 ;
|
||||
|
||||
Testcase 3.5.9.1/2:
|
||||
-------------------
|
||||
Create trigger trg1 BEFORE UPDATE on tb3 for each row
|
||||
set new.f142 = 94087, @counter=@counter+1;
|
||||
TotalRows
|
||||
10
|
||||
Affected
|
||||
8
|
||||
NotAffected
|
||||
2
|
||||
NewValuew
|
||||
0
|
||||
set @counter=0;
|
||||
Update tb3 Set f142='1' where f130<100;
|
||||
select count(*) as ExpectedChanged, @counter as TrigCounter
|
||||
from tb3 where f142=94087;
|
||||
ExpectedChanged TrigCounter
|
||||
8 8
|
||||
select count(*) as ExpectedNotChange from tb3
|
||||
where f130<100 and f142<>94087;
|
||||
ExpectedNotChange
|
||||
0
|
||||
select count(*) as NonExpectedChanged from tb3
|
||||
where f130>=130 and f142=94087;
|
||||
NonExpectedChanged
|
||||
0
|
||||
drop trigger trg1;
|
||||
|
||||
Testcase 3.5.9.3:
|
||||
-----------------
|
||||
Create trigger trg2_a before update on tb3 for each row
|
||||
set @tr_var_b4_118=old.f118, @tr_var_b4_121=old.f121,
|
||||
@tr_var_b4_122=old.f122, @tr_var_b4_136=old.f136,
|
||||
@tr_var_b4_163=old.f163;
|
||||
Create trigger trg2_b after update on tb3 for each row
|
||||
set @tr_var_af_118=old.f118, @tr_var_af_121=old.f121,
|
||||
@tr_var_af_122=old.f122, @tr_var_af_136=old.f136,
|
||||
@tr_var_af_163=old.f163;
|
||||
Create trigger trg2_c before delete on tb3 for each row
|
||||
set @tr_var_b4_118=old.f118, @tr_var_b4_121=old.f121,
|
||||
@tr_var_b4_122=old.f122, @tr_var_b4_136=old.f136,
|
||||
@tr_var_b4_163=old.f163;
|
||||
Create trigger trg2_d after delete on tb3 for each row
|
||||
set @tr_var_af_118=old.f118, @tr_var_af_121=old.f121,
|
||||
@tr_var_af_122=old.f122, @tr_var_af_136=old.f136,
|
||||
@tr_var_af_163=old.f163;
|
||||
@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163
|
||||
0 0 0 0 0
|
||||
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163
|
||||
0 0 0 0 0
|
||||
Insert into tb3 (f122, f136, f163)
|
||||
values ('Test 3.5.9.3', 7, 123.17);
|
||||
Update tb3 Set f136=8 where f122='Test 3.5.9.3';
|
||||
select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3' order by f136;
|
||||
f118 f121 f122 f136 f163
|
||||
a NULL Test 3.5.9.3 00008 123.170000000000000000000000000000
|
||||
select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
|
||||
@tr_var_b4_136, @tr_var_b4_163;
|
||||
@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163
|
||||
a NULL Test 3.5.9.3 7 123.170000000000000000000000000000
|
||||
select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
|
||||
@tr_var_af_136, @tr_var_af_163;
|
||||
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163
|
||||
a NULL Test 3.5.9.3 7 123.170000000000000000000000000000
|
||||
@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163
|
||||
0 0 0 0 0
|
||||
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163
|
||||
0 0 0 0 0
|
||||
delete from tb3 where f122='Test 3.5.9.3';
|
||||
select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3' order by f136;
|
||||
f118 f121 f122 f136 f163
|
||||
select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
|
||||
@tr_var_b4_136, @tr_var_b4_163;
|
||||
@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163
|
||||
a NULL Test 3.5.9.3 8 123.170000000000000000000000000000
|
||||
select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
|
||||
@tr_var_af_136, @tr_var_af_163;
|
||||
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163
|
||||
a NULL Test 3.5.9.3 8 123.170000000000000000000000000000
|
||||
drop trigger trg2_a;
|
||||
drop trigger trg2_b;
|
||||
drop trigger trg2_c;
|
||||
drop trigger trg2_d;
|
||||
|
||||
Testcase 3.5.9.4:
|
||||
-----------------
|
||||
Create trigger trg3_a before insert on tb3 for each row
|
||||
set @tr_var_b4_118=new.f118, @tr_var_b4_121=new.f121,
|
||||
@tr_var_b4_122=new.f122, @tr_var_b4_136=new.f136,
|
||||
@tr_var_b4_151=new.f151, @tr_var_b4_163=new.f163;
|
||||
Create trigger trg3_b after insert on tb3 for each row
|
||||
set @tr_var_af_118=new.f118, @tr_var_af_121=new.f121,
|
||||
@tr_var_af_122=new.f122, @tr_var_af_136=new.f136,
|
||||
@tr_var_af_151=new.f151, @tr_var_af_163=new.f163;
|
||||
Create trigger trg3_c before update on tb3 for each row
|
||||
set @tr_var_b4_118=new.f118, @tr_var_b4_121=new.f121,
|
||||
@tr_var_b4_122=new.f122, @tr_var_b4_136=new.f136,
|
||||
@tr_var_b4_151=new.f151, @tr_var_b4_163=new.f163;
|
||||
Create trigger trg3_d after update on tb3 for each row
|
||||
set @tr_var_af_118=new.f118, @tr_var_af_121=new.f121,
|
||||
@tr_var_af_122=new.f122, @tr_var_af_136=new.f136,
|
||||
@tr_var_af_151=new.f151, @tr_var_af_163=new.f163;
|
||||
@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163
|
||||
0 0 0 0 0 0
|
||||
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163
|
||||
0 0 0 0 0 0
|
||||
Insert into tb3 (f122, f136, f151, f163)
|
||||
values ('Test 3.5.9.4', 7, DEFAULT, 995.24);
|
||||
select f118, f121, f122, f136, f151, f163 from tb3
|
||||
where f122 like 'Test 3.5.9.4%' order by f163;
|
||||
f118 f121 f122 f136 f151 f163
|
||||
a NULL Test 3.5.9.4 00007 999 995.240000000000000000000000000000
|
||||
select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
|
||||
@tr_var_b4_136, @tr_var_b4_151, @tr_var_b4_163;
|
||||
@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163
|
||||
a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000
|
||||
select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
|
||||
@tr_var_af_136, @tr_var_af_151, @tr_var_af_163;
|
||||
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163
|
||||
a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000
|
||||
@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163
|
||||
0 0 0 0 0 0
|
||||
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163
|
||||
0 0 0 0 0 0
|
||||
Update tb3 Set f122='Test 3.5.9.4-trig', f136=NULL, f151=DEFAULT, f163=NULL
|
||||
where f122='Test 3.5.9.4';
|
||||
Warnings:
|
||||
Warning 1048 Column 'f136' cannot be null
|
||||
select f118, f121, f122, f136, f151, f163 from tb3
|
||||
where f122 like 'Test 3.5.9.4-trig' order by f163;
|
||||
f118 f121 f122 f136 f151 f163
|
||||
a NULL Test 3.5.9.4-trig 00000 999 NULL
|
||||
select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
|
||||
@tr_var_b4_136, @tr_var_b4_151, @tr_var_b4_163;
|
||||
@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163
|
||||
a NULL Test 3.5.9.4-trig 0 999 NULL
|
||||
select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
|
||||
@tr_var_af_136, @tr_var_af_151, @tr_var_af_163;
|
||||
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163
|
||||
a NULL Test 3.5.9.4-trig 0 999 NULL
|
||||
drop trigger trg3_a;
|
||||
drop trigger trg3_b;
|
||||
drop trigger trg3_c;
|
||||
drop trigger trg3_d;
|
||||
delete from tb3 where f122='Test 3.5.9.4-trig';
|
||||
|
||||
Testcase 3.5.9.5: (implied in previous tests)
|
||||
---------------------------------------------
|
||||
|
||||
Testcase 3.5.9.6:
|
||||
-----------------
|
||||
create trigger trg4a before insert on tb3 for each row
|
||||
set @temp1= old.f120;
|
||||
ERROR HY000: There is no OLD row in on INSERT trigger
|
||||
create trigger trg4b after insert on tb3 for each row
|
||||
set old.f120= 'test';
|
||||
ERROR HY000: Updating of OLD row is not allowed in trigger
|
||||
drop trigger trg4a;
|
||||
drop trigger trg4b;
|
||||
|
||||
Testcase 3.5.9.7: (implied in previous tests)
|
||||
---------------------------------------------
|
||||
|
||||
Testcase 3.5.9.8: (implied in previous tests)
|
||||
---------------------------------------------
|
||||
|
||||
Testcase 3.5.9.9:
|
||||
-----------------
|
||||
create trigger trg5a before DELETE on tb3 for each row
|
||||
set @temp1=new.f122;
|
||||
ERROR HY000: There is no NEW row in on DELETE trigger
|
||||
create trigger trg5b after DELETE on tb3 for each row
|
||||
set new.f122='test';
|
||||
ERROR HY000: There is no NEW row in on DELETE trigger
|
||||
drop trigger trg5b;
|
||||
|
||||
Testcase 3.5.9.10: (implied in previous tests)
|
||||
----------------------------------------------
|
||||
|
||||
Testcase 3.5.9.11: covered by 3.5.9.9
|
||||
-------------------------------------
|
||||
|
||||
Testcase 3.5.9.12: covered by 3.5.9.6
|
||||
-------------------------------------
|
||||
|
||||
Testcase 3.5.9.13:
|
||||
------------------
|
||||
create trigger trg6a before UPDATE on tb3 for each row
|
||||
set old.f118='C', new.f118='U';
|
||||
ERROR HY000: Updating of OLD row is not allowed in trigger
|
||||
create trigger trg6b after INSERT on tb3 for each row
|
||||
set old.f136=163, new.f118='U';
|
||||
ERROR HY000: Updating of OLD row is not allowed in trigger
|
||||
create trigger trg6c after UPDATE on tb3 for each row
|
||||
set old.f136=NULL;
|
||||
ERROR HY000: Updating of OLD row is not allowed in trigger
|
||||
drop trigger trg6a;
|
||||
drop trigger trg6b;
|
||||
drop trigger trg6c;
|
||||
|
||||
Testcase 3.5.9.14: (implied in previous tests)
|
||||
----------------------------------------------
|
399
mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result
Normal file
399
mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result
Normal file
|
@ -0,0 +1,399 @@
|
|||
SET @NO_REFRESH = IF( '' = '', 0, 1);
|
||||
USE test;
|
||||
drop table if exists tb3 ;
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) engine = innodb;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f150' at row 1
|
||||
Note 1265 Data truncated for column 'f151' at row 1
|
||||
Note 1265 Data truncated for column 'f152' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb3.txt' into table tb3 ;
|
||||
|
||||
Testcase 3.5.10.1/2/3:
|
||||
----------------------
|
||||
Create view vw11 as select * from tb3
|
||||
where f122 like 'Test 3.5.10.1/2/3%';
|
||||
Create trigger trg1a before insert on tb3
|
||||
for each row set new.f163=111.11;
|
||||
Create trigger trg1b after insert on tb3
|
||||
for each row set @test_var='After Insert';
|
||||
Create trigger trg1c before update on tb3
|
||||
for each row set new.f121='Y', new.f122='Test 3.5.10.1/2/3-Update';
|
||||
Create trigger trg1d after update on tb3
|
||||
for each row set @test_var='After Update';
|
||||
Create trigger trg1e before delete on tb3
|
||||
for each row set @test_var=5;
|
||||
Create trigger trg1f after delete on tb3
|
||||
for each row set @test_var= 2* @test_var+7;
|
||||
Insert into vw11 (f122, f151) values ('Test 3.5.10.1/2/3', 1);
|
||||
Insert into vw11 (f122, f151) values ('Test 3.5.10.1/2/3', 2);
|
||||
Insert into vw11 (f122, f151) values ('Not in View', 3);
|
||||
select f121, f122, f151, f163
|
||||
from tb3 where f122 like 'Test 3.5.10.1/2/3%' order by f151;
|
||||
f121 f122 f151 f163
|
||||
NULL Test 3.5.10.1/2/3 1 111.110000000000000000000000000000
|
||||
NULL Test 3.5.10.1/2/3 2 111.110000000000000000000000000000
|
||||
select f121, f122, f151, f163 from vw11;
|
||||
f121 f122 f151 f163
|
||||
NULL Test 3.5.10.1/2/3 1 111.110000000000000000000000000000
|
||||
NULL Test 3.5.10.1/2/3 2 111.110000000000000000000000000000
|
||||
select f121, f122, f151, f163
|
||||
from tb3 where f122 like 'Not in View';
|
||||
f121 f122 f151 f163
|
||||
NULL Not in View 3 111.110000000000000000000000000000
|
||||
Update vw11 set f163=1;
|
||||
select f121, f122, f151, f163 from tb3
|
||||
where f122 like 'Test 3.5.10.1/2/3%' order by f151;
|
||||
f121 f122 f151 f163
|
||||
Y Test 3.5.10.1/2/3-Update 1 1.000000000000000000000000000000
|
||||
Y Test 3.5.10.1/2/3-Update 2 1.000000000000000000000000000000
|
||||
select f121, f122, f151, f163 from vw11;
|
||||
f121 f122 f151 f163
|
||||
Y Test 3.5.10.1/2/3-Update 1 1.000000000000000000000000000000
|
||||
Y Test 3.5.10.1/2/3-Update 2 1.000000000000000000000000000000
|
||||
set @test_var=0;
|
||||
Select @test_var as 'before delete';
|
||||
before delete
|
||||
0
|
||||
delete from vw11 where f151=1;
|
||||
select f121, f122, f151, f163 from tb3
|
||||
where f122 like 'Test 3.5.10.1/2/3%' order by f151;
|
||||
f121 f122 f151 f163
|
||||
Y Test 3.5.10.1/2/3-Update 2 1.000000000000000000000000000000
|
||||
select f121, f122, f151, f163 from vw11;
|
||||
f121 f122 f151 f163
|
||||
Y Test 3.5.10.1/2/3-Update 2 1.000000000000000000000000000000
|
||||
Select @test_var as 'after delete';
|
||||
after delete
|
||||
17
|
||||
drop view vw11;
|
||||
drop trigger trg1a;
|
||||
drop trigger trg1b;
|
||||
drop trigger trg1c;
|
||||
drop trigger trg1d;
|
||||
drop trigger trg1e;
|
||||
drop trigger trg1f;
|
||||
delete from tb3 where f122 like 'Test 3.5.10.1/2/3%';
|
||||
|
||||
Testcase 3.5.10.4:
|
||||
------------------
|
||||
create table tb_load (f1 int, f2 char(25),f3 int) engine=innodb;
|
||||
Create trigger trg4 before insert on tb_load
|
||||
for each row set new.f3=-(new.f1 div 5), @counter= @counter+1;
|
||||
set @counter= 0;
|
||||
select @counter as 'Rows Loaded Before';
|
||||
Rows Loaded Before
|
||||
0
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table tb_load;
|
||||
select @counter as 'Rows Loaded After';
|
||||
Rows Loaded After
|
||||
10
|
||||
Select * from tb_load order by f1 limit 10;
|
||||
f1 f2 f3
|
||||
-5000 a` 1000
|
||||
-4999 aaa 999
|
||||
-4998 abaa 999
|
||||
-4997 acaaa 999
|
||||
-4996 adaaaa 999
|
||||
-4995 aeaaaaa 999
|
||||
-4994 afaaaaaa 998
|
||||
-4993 agaaaaaaa 998
|
||||
-4992 a^aaaaaaaa 998
|
||||
-4991 a_aaaaaaaaa 998
|
||||
drop trigger trg4;
|
||||
drop table tb_load;
|
||||
|
||||
Testcase 3.5.10.5: (implemented in trig_frkey.test)
|
||||
---------------------------------------------------
|
||||
|
||||
Testcase 3.5.10.6: (implemented in trig_frkey.test)
|
||||
---------------------------------------------------
|
||||
|
||||
Testcase 3.5.10.extra:
|
||||
----------------------
|
||||
create table t1_sp (var136 tinyint, var151 decimal) engine=innodb;
|
||||
create trigger trg before insert on t1_sp
|
||||
for each row set @counter=@counter+1;
|
||||
create procedure trig_sp()
|
||||
begin
|
||||
declare done int default 0;
|
||||
declare var151 decimal;
|
||||
declare var136 tinyint;
|
||||
declare cur1 cursor for select f136, f151 from tb3;
|
||||
declare continue handler for sqlstate '01000' set done = 1;
|
||||
open cur1;
|
||||
fetch cur1 into var136, var151;
|
||||
wl_loop: WHILE NOT done DO
|
||||
insert into t1_sp values (var136, var151);
|
||||
fetch cur1 into var136, var151;
|
||||
END WHILE wl_loop;
|
||||
close cur1;
|
||||
end//
|
||||
set @counter=0;
|
||||
select @counter;
|
||||
@counter
|
||||
0
|
||||
call trig_sp();
|
||||
ERROR 02000: No data - zero rows fetched, selected, or processed
|
||||
select @counter;
|
||||
@counter
|
||||
11
|
||||
select count(*) from tb3;
|
||||
count(*)
|
||||
11
|
||||
select count(*) from t1_sp;
|
||||
count(*)
|
||||
11
|
||||
drop procedure trig_sp;
|
||||
drop trigger trg;
|
||||
drop table t1_sp;
|
||||
|
||||
Testcase 3.5.11.1 (implemented in trig_perf.test)
|
||||
-------------------------------------------------
|
||||
|
||||
Testcase y.y.y.2: Check for triggers starting triggers
|
||||
------------------------------------------------------
|
||||
use test;
|
||||
drop table if exists t1;
|
||||
drop table if exists t2_1;
|
||||
drop table if exists t2_2;
|
||||
drop table if exists t2_3;
|
||||
drop table if exists t2_4;
|
||||
drop table if exists t3;
|
||||
create table t1 (f1 integer) engine=innodb;
|
||||
create table t2_1 (f1 integer) engine=innodb;
|
||||
create table t2_2 (f1 integer) engine=innodb;
|
||||
create table t2_3 (f1 integer) engine=innodb;
|
||||
create table t2_4 (f1 integer) engine=innodb;
|
||||
create table t3 (f1 integer) engine=innodb;
|
||||
insert into t1 values (1);
|
||||
create trigger tr1 after insert on t1 for each row
|
||||
BEGIN
|
||||
insert into t2_1 (f1) values (new.f1+1);
|
||||
insert into t2_2 (f1) values (new.f1+1);
|
||||
insert into t2_3 (f1) values (new.f1+1);
|
||||
insert into t2_4 (f1) values (new.f1+1);
|
||||
END//
|
||||
create trigger tr2_1 after insert on t2_1 for each row
|
||||
insert into t3 (f1) values (new.f1+10);
|
||||
create trigger tr2_2 after insert on t2_2 for each row
|
||||
insert into t3 (f1) values (new.f1+100);
|
||||
create trigger tr2_3 after insert on t2_3 for each row
|
||||
insert into t3 (f1) values (new.f1+1000);
|
||||
create trigger tr2_4 after insert on t2_4 for each row
|
||||
insert into t3 (f1) values (new.f1+10000);
|
||||
insert into t1 values (1);
|
||||
select * from t3 order by f1;
|
||||
f1
|
||||
12
|
||||
102
|
||||
1002
|
||||
10002
|
||||
drop trigger tr1;
|
||||
drop trigger tr2_1;
|
||||
drop trigger tr2_2;
|
||||
drop trigger tr2_3;
|
||||
drop trigger tr2_4;
|
||||
drop table t1, t2_1, t2_2, t2_3, t2_4, t3;
|
||||
|
||||
Testcase y.y.y.3: Circular trigger reference
|
||||
--------------------------------------------
|
||||
use test;
|
||||
drop table if exists t1;
|
||||
drop table if exists t2;
|
||||
drop table if exists t3;
|
||||
drop table if exists t4;
|
||||
create table t1 (f1 integer) engine = innodb;
|
||||
create table t2 (f2 integer) engine = innodb;
|
||||
create table t3 (f3 integer) engine = innodb;
|
||||
create table t4 (f4 integer) engine = innodb;
|
||||
insert into t1 values (0);
|
||||
create trigger tr1 after insert on t1
|
||||
for each row insert into t2 (f2) values (new.f1+1);
|
||||
create trigger tr2 after insert on t2
|
||||
for each row insert into t3 (f3) values (new.f2+1);
|
||||
create trigger tr3 after insert on t3
|
||||
for each row insert into t4 (f4) values (new.f3+1);
|
||||
create trigger tr4 after insert on t4
|
||||
for each row insert into t1 (f1) values (new.f4+1);
|
||||
insert into t1 values (1);
|
||||
ERROR HY000: Can't update table 't1' in stored function/trigger because it is already used by statement which invoked this stored function/trigger.
|
||||
select * from t1 order by f1;
|
||||
f1
|
||||
0
|
||||
select * from t2 order by f2;
|
||||
f2
|
||||
select * from t3 order by f3;
|
||||
f3
|
||||
select * from t4 order by f4;
|
||||
f4
|
||||
drop trigger tr1;
|
||||
drop trigger tr2;
|
||||
drop trigger tr3;
|
||||
drop trigger tr4;
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
drop table t3;
|
||||
drop table t4;
|
||||
|
||||
Testcase y.y.y.4: Recursive trigger/SP references (disabled bug 11889)
|
||||
----------------------------------------------------------------------
|
||||
set @sql_mode='traditional';
|
||||
create table t1_sp (
|
||||
count integer,
|
||||
var136 tinyint,
|
||||
var151 decimal) engine=innodb;
|
||||
create procedure trig_sp()
|
||||
begin
|
||||
declare done int default 0;
|
||||
declare var151 decimal;
|
||||
declare var136 tinyint;
|
||||
declare cur1 cursor for select f136, f151 from tb3;
|
||||
declare continue handler for sqlstate '01000' set done = 1;
|
||||
set @counter= @counter+1;
|
||||
open cur1;
|
||||
fetch cur1 into var136, var151;
|
||||
wl_loop: WHILE NOT done DO
|
||||
insert into t1_sp values (@counter, var136, var151);
|
||||
fetch cur1 into var136, var151;
|
||||
END WHILE wl_loop;
|
||||
close cur1;
|
||||
end//
|
||||
create trigger trg before insert on t1_sp
|
||||
for each row call trig_sp();
|
||||
set @counter=0;
|
||||
select @counter;
|
||||
@counter
|
||||
0
|
||||
call trig_sp();
|
||||
ERROR HY000: Recursive limit 0 (as set by the max_sp_recursion_depth variable) was exceeded for routine trig_sp
|
||||
select @counter;
|
||||
@counter
|
||||
1
|
||||
select count(*) from tb3;
|
||||
count(*)
|
||||
11
|
||||
select count(*) from t1_sp;
|
||||
count(*)
|
||||
0
|
||||
set @@max_sp_recursion_depth= 10;
|
||||
set @counter=0;
|
||||
select @counter;
|
||||
@counter
|
||||
0
|
||||
call trig_sp();
|
||||
ERROR HY000: Can't update table 't1_sp' in stored function/trigger because it is already used by statement which invoked this stored function/trigger.
|
||||
select @counter;
|
||||
@counter
|
||||
2
|
||||
select count(*) from tb3;
|
||||
count(*)
|
||||
11
|
||||
select count(*) from t1_sp;
|
||||
count(*)
|
||||
0
|
||||
drop procedure trig_sp;
|
||||
drop trigger trg;
|
||||
drop table t1_sp;
|
||||
|
||||
Testcase y.y.y.5: Roleback of nested trigger references
|
||||
-------------------------------------------------------
|
||||
set @@sql_mode='traditional';
|
||||
use test;
|
||||
drop table if exists t1;
|
||||
drop table if exists t2;
|
||||
drop table if exists t3;
|
||||
drop table if exists t4;
|
||||
create table t1 (f1 integer) engine = innodb;
|
||||
create table t2 (f2 integer) engine = innodb;
|
||||
create table t3 (f3 integer) engine = innodb;
|
||||
create table t4 (f4 tinyint) engine = innodb;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`f1` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
insert into t1 values (1);
|
||||
create trigger tr1 after insert on t1
|
||||
for each row insert into t2 (f2) values (new.f1+1);
|
||||
create trigger tr2 after insert on t2
|
||||
for each row insert into t3 (f3) values (new.f2+1);
|
||||
create trigger tr3 after insert on t3
|
||||
for each row insert into t4 (f4) values (new.f3+1000);
|
||||
set autocommit=0;
|
||||
start transaction;
|
||||
insert into t1 values (1);
|
||||
ERROR 22003: Out of range value for column 'f4' at row 1
|
||||
commit;
|
||||
select * from t1 order by f1;
|
||||
f1
|
||||
1
|
||||
select * from t2 order by f2;
|
||||
f2
|
||||
select * from t3 order by f3;
|
||||
f3
|
||||
drop trigger tr1;
|
||||
drop trigger tr2;
|
||||
drop trigger tr3;
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
drop table t3;
|
||||
drop table t4;
|
140
mysql-test/suite/funcs_1/r/innodb_trig_frkey.result
Normal file
140
mysql-test/suite/funcs_1/r/innodb_trig_frkey.result
Normal file
|
@ -0,0 +1,140 @@
|
|||
SET @NO_REFRESH = IF( '' = '', 0, 1);
|
||||
USE test;
|
||||
drop table if exists tb3 ;
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) engine = innodb;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f150' at row 1
|
||||
Note 1265 Data truncated for column 'f151' at row 1
|
||||
Note 1265 Data truncated for column 'f152' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb3.txt' into table tb3 ;
|
||||
|
||||
Testcase x.x.x.1:
|
||||
-----------------
|
||||
DROP TABLE IF EXISTS t0, t1, t2;
|
||||
CREATE TABLE t0 (col1 char(50)) ENGINE=innodb;
|
||||
CREATE TABLE t1 (id INT NOT NULL, col1 char(50),
|
||||
PRIMARY KEY (id)) ENGINE=innodb;
|
||||
CREATE TABLE t2 (id INT PRIMARY KEY, f_id INT,
|
||||
INDEX par_ind (f_id), col1 char(50),
|
||||
FOREIGN KEY (f_id) REFERENCES t1(id)
|
||||
ON DELETE SET NULL) ENGINE=innodb;
|
||||
insert into t1 values (1,'Department A');
|
||||
insert into t1 values (2,'Department B');
|
||||
insert into t1 values (3,'Department C');
|
||||
insert into t2 values (1,2,'Emp 1');
|
||||
insert into t2 values (2,2,'Emp 2');
|
||||
insert into t2 values (3,2,'Emp 3');
|
||||
create trigger trig after insert on t0 for each row
|
||||
delete from t1 where col1=new.col1;
|
||||
select * from t2;
|
||||
id f_id col1
|
||||
1 2 Emp 1
|
||||
2 2 Emp 2
|
||||
3 2 Emp 3
|
||||
lock tables t0 write, t1 write;
|
||||
insert into t0 values ('Department B');
|
||||
unlock tables;
|
||||
select * from t2;
|
||||
id f_id col1
|
||||
1 NULL Emp 1
|
||||
2 NULL Emp 2
|
||||
3 NULL Emp 3
|
||||
drop trigger trig;
|
||||
drop table t2, t1;
|
||||
|
||||
Testcase x.x.x.2:
|
||||
-----------------
|
||||
DROP TABLE IF EXISTS t1, t2;
|
||||
CREATE TABLE t1 (id INT NOT NULL, col1 char(50),
|
||||
PRIMARY KEY (id)) ENGINE=innodb;
|
||||
CREATE TABLE t2 (id INT PRIMARY KEY, f_id INT,
|
||||
INDEX par_ind (f_id), col1 char(50),
|
||||
FOREIGN KEY (f_id) REFERENCES t1(id)
|
||||
ON UPDATE CASCADE) ENGINE=innodb;
|
||||
insert into t1 values (1,'Department A');
|
||||
insert into t1 values (2,'Department B');
|
||||
insert into t1 values (3,'Department C');
|
||||
insert into t2 values (1,2,'Emp 1');
|
||||
insert into t2 values (2,3,'Emp 2');
|
||||
insert into t2 values (3,4,'Emp 3');
|
||||
ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`f_id`) REFERENCES `t1` (`id`) ON UPDATE CASCADE)
|
||||
create trigger tr_t2 before insert on t2 for each row
|
||||
insert into t1 values(new.f_id, concat('New Department ', new.f_id));
|
||||
lock tables t1 write, t2 write;
|
||||
insert into t2 values (3,4,'Emp 3');
|
||||
unlock tables;
|
||||
select * from t1;
|
||||
id col1
|
||||
1 Department A
|
||||
2 Department B
|
||||
3 Department C
|
||||
4 New Department 4
|
||||
select * from t2;
|
||||
id f_id col1
|
||||
1 2 Emp 1
|
||||
2 3 Emp 2
|
||||
3 4 Emp 3
|
||||
drop trigger tr_t2;
|
||||
drop table t2, t1, t0;
|
||||
|
||||
Foreign Key tests disabled (bug 11472 - stored in trig_frkey2.test)
|
||||
-------------------------------------------------------------------
|
2331
mysql-test/suite/funcs_1/r/innodb_triggers.result
Normal file
2331
mysql-test/suite/funcs_1/r/innodb_triggers.result
Normal file
File diff suppressed because it is too large
Load diff
11434
mysql-test/suite/funcs_1/r/innodb_views.result
Normal file
11434
mysql-test/suite/funcs_1/r/innodb_views.result
Normal file
File diff suppressed because it is too large
Load diff
15128
mysql-test/suite/funcs_1/r/memory__datadict.result
Normal file
15128
mysql-test/suite/funcs_1/r/memory__datadict.result
Normal file
File diff suppressed because it is too large
Load diff
1
mysql-test/suite/funcs_1/r/memory__load.result
Normal file
1
mysql-test/suite/funcs_1/r/memory__load.result
Normal file
|
@ -0,0 +1 @@
|
|||
SET @NO_REFRESH = IF( '' = '', 0, 1);
|
68
mysql-test/suite/funcs_1/r/memory_bitdata.result
Normal file
68
mysql-test/suite/funcs_1/r/memory_bitdata.result
Normal file
|
@ -0,0 +1,68 @@
|
|||
SET @NO_REFRESH = IF( '' = '', 0, 1);
|
||||
USE test;
|
||||
set @@global.max_heap_table_size = 4294967295;
|
||||
set @@session.max_heap_table_size = 4294967295;
|
||||
drop table if exists tb4 ;
|
||||
create table tb4 (
|
||||
f176 numeric (0) unsigned not null DEFAULT 9,
|
||||
f177 numeric (64) unsigned not null DEFAULT 9,
|
||||
f178 numeric (0) zerofill not null DEFAULT 9,
|
||||
f179 numeric (64) zerofill not null DEFAULT 9,
|
||||
f180 numeric (0) unsigned zerofill not null DEFAULT 9,
|
||||
f181 numeric (64) unsigned zerofill not null DEFAULT 9,
|
||||
f182 numeric (0,0) not null DEFAULT 9,
|
||||
f183 numeric (63,30) not null DEFAULT 9,
|
||||
f184 numeric (0,0) unsigned not null DEFAULT 9,
|
||||
f185 numeric (63,30) unsigned not null DEFAULT 9,
|
||||
f186 numeric (0,0) zerofill not null DEFAULT 9,
|
||||
f187 numeric (63,30) zerofill not null DEFAULT 9,
|
||||
f188 numeric (0,0) unsigned zerofill not null DEFAULT 9,
|
||||
f189 numeric (63,30) unsigned zerofill not null DEFAULT 9,
|
||||
f190 real not null DEFAULT 88.8,
|
||||
f191 real unsigned not null DEFAULT 88.8,
|
||||
f192 real zerofill not null DEFAULT 88.8,
|
||||
f193 real unsigned zerofill not null DEFAULT 88.8,
|
||||
f194 double not null DEFAULT 55.5,
|
||||
f195 double unsigned not null DEFAULT 55.5,
|
||||
f196 double zerofill not null DEFAULT 55.5,
|
||||
f197 double unsigned zerofill not null DEFAULT 55.5,
|
||||
f198 float,
|
||||
f199 float unsigned,
|
||||
f200 float zerofill,
|
||||
f201 float unsigned zerofill,
|
||||
f202 float(0),
|
||||
f203 float(23),
|
||||
f204 float(0) unsigned,
|
||||
f205 float(23) unsigned,
|
||||
f206 float(0) zerofill,
|
||||
f207 float(23) zerofill,
|
||||
f208 float(0) unsigned zerofill,
|
||||
f209 float(23) unsigned zerofill,
|
||||
f210 float(24),
|
||||
f211 float(53),
|
||||
f212 float(24) unsigned,
|
||||
f213 float(53) unsigned,
|
||||
f214 float(24) zerofill,
|
||||
f215 float(53) zerofill,
|
||||
f216 float(24) unsigned zerofill,
|
||||
f217 float(53) unsigned zerofill,
|
||||
f218 date,
|
||||
f219 time,
|
||||
f220 datetime,
|
||||
f221 timestamp,
|
||||
f222 year,
|
||||
f223 year(3),
|
||||
f224 year(4),
|
||||
f225 enum("1enum","2enum"),
|
||||
f226 set("1set","2set"),
|
||||
f236 char(95) unicode,
|
||||
f241 char(255) unicode,
|
||||
f237 char(130) binary,
|
||||
f238 varchar(25000) binary,
|
||||
f239 varbinary(0),
|
||||
f240 varchar(1200) unicode
|
||||
) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb4.txt' into table tb4 ;
|
||||
|
||||
NOT YET IMPLEMENTED: bitdata tests
|
||||
--------------------------------------------------------------------------------
|
78
mysql-test/suite/funcs_1/r/memory_cursors.result
Normal file
78
mysql-test/suite/funcs_1/r/memory_cursors.result
Normal file
|
@ -0,0 +1,78 @@
|
|||
SET @NO_REFRESH = IF( '' = '', 0, 1);
|
||||
USE test;
|
||||
set @@global.max_heap_table_size = 4294967295;
|
||||
set @@session.max_heap_table_size = 4294967295;
|
||||
drop table if exists tb1 ;
|
||||
create table tb1 (
|
||||
f1 char,
|
||||
f2 char binary,
|
||||
f3 char ascii,
|
||||
f12 binary,
|
||||
f13 tinyint,
|
||||
f14 tinyint unsigned,
|
||||
f15 tinyint zerofill,
|
||||
f16 tinyint unsigned zerofill,
|
||||
f17 smallint,
|
||||
f18 smallint unsigned,
|
||||
f19 smallint zerofill,
|
||||
f20 smallint unsigned zerofill,
|
||||
f21 mediumint,
|
||||
f22 mediumint unsigned,
|
||||
f23 mediumint zerofill,
|
||||
f24 mediumint unsigned zerofill,
|
||||
f25 int,
|
||||
f26 int unsigned,
|
||||
f27 int zerofill,
|
||||
f28 int unsigned zerofill,
|
||||
f29 bigint,
|
||||
f30 bigint unsigned,
|
||||
f31 bigint zerofill,
|
||||
f32 bigint unsigned zerofill,
|
||||
f33 decimal not null DEFAULT 9.9,
|
||||
f34 decimal unsigned not null DEFAULT 9.9,
|
||||
f35 decimal zerofill not null DEFAULT 9.9,
|
||||
f36 decimal unsigned zerofill not null DEFAULT 9.9,
|
||||
f37 decimal (0) not null DEFAULT 9.9,
|
||||
f38 decimal (64) not null DEFAULT 9.9,
|
||||
f39 decimal (0) unsigned not null DEFAULT 9.9,
|
||||
f40 decimal (64) unsigned not null DEFAULT 9.9,
|
||||
f41 decimal (0) zerofill not null DEFAULT 9.9,
|
||||
f42 decimal (64) zerofill not null DEFAULT 9.9,
|
||||
f43 decimal (0) unsigned zerofill not null DEFAULT 9.9,
|
||||
f44 decimal (64) unsigned zerofill not null DEFAULT 9.9,
|
||||
f45 decimal (0,0) not null DEFAULT 9.9,
|
||||
f46 decimal (63,30) not null DEFAULT 9.9,
|
||||
f47 decimal (0,0) unsigned not null DEFAULT 9.9,
|
||||
f48 decimal (63,30) unsigned not null DEFAULT 9.9,
|
||||
f49 decimal (0,0) zerofill not null DEFAULT 9.9,
|
||||
f50 decimal (63,30) zerofill not null DEFAULT 9.9,
|
||||
f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9,
|
||||
f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9,
|
||||
f53 numeric not null DEFAULT 99,
|
||||
f54 numeric unsigned not null DEFAULT 99,
|
||||
f55 numeric zerofill not null DEFAULT 99,
|
||||
f56 numeric unsigned zerofill not null DEFAULT 99,
|
||||
f57 numeric (0) not null DEFAULT 99,
|
||||
f58 numeric (64) not null DEFAULT 99
|
||||
) engine = memory;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f33' at row 1
|
||||
Note 1265 Data truncated for column 'f34' at row 1
|
||||
Note 1265 Data truncated for column 'f35' at row 1
|
||||
Note 1265 Data truncated for column 'f36' at row 1
|
||||
Note 1265 Data truncated for column 'f37' at row 1
|
||||
Note 1265 Data truncated for column 'f38' at row 1
|
||||
Note 1265 Data truncated for column 'f39' at row 1
|
||||
Note 1265 Data truncated for column 'f40' at row 1
|
||||
Note 1265 Data truncated for column 'f41' at row 1
|
||||
Note 1265 Data truncated for column 'f42' at row 1
|
||||
Note 1265 Data truncated for column 'f43' at row 1
|
||||
Note 1265 Data truncated for column 'f44' at row 1
|
||||
Note 1265 Data truncated for column 'f45' at row 1
|
||||
Note 1265 Data truncated for column 'f47' at row 1
|
||||
Note 1265 Data truncated for column 'f49' at row 1
|
||||
Note 1265 Data truncated for column 'f51' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb1.txt' into table tb1 ;
|
||||
|
||||
NOT YET IMPLEMENTED: cursor tests
|
||||
--------------------------------------------------------------------------------
|
5299
mysql-test/suite/funcs_1/r/memory_func_view.result
Normal file
5299
mysql-test/suite/funcs_1/r/memory_func_view.result
Normal file
File diff suppressed because it is too large
Load diff
22088
mysql-test/suite/funcs_1/r/memory_storedproc.result
Normal file
22088
mysql-test/suite/funcs_1/r/memory_storedproc.result
Normal file
File diff suppressed because it is too large
Load diff
1395
mysql-test/suite/funcs_1/r/memory_storedproc_02.result
Normal file
1395
mysql-test/suite/funcs_1/r/memory_storedproc_02.result
Normal file
File diff suppressed because it is too large
Load diff
490
mysql-test/suite/funcs_1/r/memory_storedproc_03.result
Normal file
490
mysql-test/suite/funcs_1/r/memory_storedproc_03.result
Normal file
|
@ -0,0 +1,490 @@
|
|||
|
||||
--source suite/funcs_1/storedproc/load_sp_tb.inc
|
||||
--------------------------------------------------------------------------------
|
||||
SET @@global.max_heap_table_size=4294967295;
|
||||
SET @@session.max_heap_table_size=4294967295;
|
||||
|
||||
--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
|
||||
--------------------------------------------------------------------------------
|
||||
DROP DATABASE IF EXISTS db_storedproc;
|
||||
DROP DATABASE IF EXISTS db_storedproc_1;
|
||||
CREATE DATABASE db_storedproc;
|
||||
CREATE DATABASE db_storedproc_1;
|
||||
USE db_storedproc;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4;
|
||||
USE db_storedproc_1;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6;
|
||||
USE db_storedproc;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
Warning 1265 Data truncated for column 'f3' at row 3
|
||||
Warning 1265 Data truncated for column 'f3' at row 4
|
||||
Warning 1265 Data truncated for column 'f3' at row 5
|
||||
Warning 1265 Data truncated for column 'f3' at row 6
|
||||
Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
Warning 1265 Data truncated for column 'f3' at row 3
|
||||
Warning 1265 Data truncated for column 'f3' at row 4
|
||||
Warning 1265 Data truncated for column 'f3' at row 5
|
||||
Warning 1265 Data truncated for column 'f3' at row 6
|
||||
Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11;
|
||||
|
||||
Section 3.1.3 - Syntax checks for the stored procedure-specific flow
|
||||
control statements IF, CASE, LOOP, LEAVE, ITERATE, REPEAT, WHILE:
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Testcase 3.1.3.7:
|
||||
-----------------
|
||||
|
||||
Ensure that the IF statement acts correctly for all variants, including cases
|
||||
where statements are nested.
|
||||
--------------------------------------------------------------------------------
|
||||
DROP TABLE IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
DROP PROCEDURE IF EXISTS sp9;
|
||||
CREATE TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 CHAR(20), f2 VARCHAR(20), f3 SMALLINT);
|
||||
CREATE PROCEDURE sp9( action char(20), subaction char(20) )
|
||||
BEGIN
|
||||
if action = 'action' then
|
||||
if subaction = 'subaction' then
|
||||
insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'action', 'subaction' , 1);
|
||||
else
|
||||
insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'action', 'none' , 2);
|
||||
END if;
|
||||
else
|
||||
if subaction = 'subaction'
|
||||
then
|
||||
insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'none', 'subaction' , 3);
|
||||
elseif subaction = 'subaction1'
|
||||
then
|
||||
BEGIN
|
||||
insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values ('none', 'subaction1', 4);
|
||||
END;
|
||||
else
|
||||
insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'none', 'none' , 5);
|
||||
END if;
|
||||
END if;
|
||||
END//
|
||||
CALL sp9( 'action', 'subaction' );
|
||||
SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 where f3=1;
|
||||
f1 f2 f3
|
||||
action subaction 1
|
||||
CALL sp9( 'temp', 'subaction' );
|
||||
SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 where f3=3;
|
||||
f1 f2 f3
|
||||
none subaction 3
|
||||
CALL sp9( 'temp', 'subaction1' );
|
||||
SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 where f3=4;
|
||||
f1 f2 f3
|
||||
none subaction1 4
|
||||
CALL sp9( 'action', 'temp' );
|
||||
SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 where f3=2;
|
||||
f1 f2 f3
|
||||
action none 2
|
||||
CALL sp9( 'temp', 'temp' );
|
||||
SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 where f3=5;
|
||||
f1 f2 f3
|
||||
none none 5
|
||||
DROP PROCEDURE sp9;
|
||||
DROP TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
|
||||
Testcase 3.1.3.8.:
|
||||
------------------
|
||||
|
||||
Ensure that the CASE statement acts correctly for all variants, including cases
|
||||
where statements are nested.
|
||||
--------------------------------------------------------------------------------
|
||||
drop table IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
DROP PROCEDURE IF EXISTS sp10;
|
||||
create table res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 char(20), f2 varchar(20), f3 smallint);
|
||||
CREATE PROCEDURE sp10( action char(20), subaction char(20) )
|
||||
BEGIN
|
||||
case action
|
||||
when 'action' then
|
||||
case
|
||||
when subaction = 'subaction_1' then
|
||||
insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'action', 'subaction_2' , 1);
|
||||
when subaction = 'subaction_2' then
|
||||
insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'action', 'subaction_2' , 2);
|
||||
else
|
||||
insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'action', 'none' , 3);
|
||||
END case;
|
||||
else
|
||||
case
|
||||
when subaction = 'subaction_1' then
|
||||
insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'none', 'subaction_1' , 4);
|
||||
when subaction = 'subaction_2' then
|
||||
insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'none', 'subaction_2' , 5);
|
||||
else
|
||||
insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'none', 'none' , 6);
|
||||
END case;
|
||||
END case;
|
||||
END//
|
||||
CALL sp10( 'action', 'subaction_1' );
|
||||
SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
f1 f2 f3
|
||||
action subaction_2 1
|
||||
delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
CALL sp10( 'action', 'subaction_2' );
|
||||
SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
f1 f2 f3
|
||||
action subaction_2 2
|
||||
delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
CALL sp10( 'temp', 'subaction_1' );
|
||||
SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
f1 f2 f3
|
||||
none subaction_1 4
|
||||
delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
CALL sp10( 'temp', 'subaction_2' );
|
||||
SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
f1 f2 f3
|
||||
none subaction_2 5
|
||||
delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
CALL sp10( 'action', 'temp' );
|
||||
SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
f1 f2 f3
|
||||
action none 3
|
||||
delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
CALL sp10( 'temp', 'temp' );
|
||||
SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
f1 f2 f3
|
||||
none none 6
|
||||
DROP PROCEDURE sp10;
|
||||
DROP TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
|
||||
Testcase 3.1.3.9 + 3.1.3.15:
|
||||
----------------------------
|
||||
|
||||
09. Ensure that the LOOP statement acts correctly for all variants, including
|
||||
. cases where statements are nested.
|
||||
15. Ensure that the LEAVE statement acts correctly for all variants, including
|
||||
. cases where statements are nested.
|
||||
--------------------------------------------------------------------------------
|
||||
DROP TABLE IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
DROP PROCEDURE IF EXISTS sp11;
|
||||
CREATE TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 CHAR(20), f2 VARCHAR(20), f3 SMALLINT);
|
||||
CREATE PROCEDURE sp11( )
|
||||
BEGIN
|
||||
declare count1 integer default 1;
|
||||
declare count2 integer default 1;
|
||||
label1: loop
|
||||
if count2 > 3 then leave label1;
|
||||
END if;
|
||||
set count1 = 1;
|
||||
label2: loop
|
||||
if count1 > 4 then leave label2;
|
||||
END if;
|
||||
insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
|
||||
set count1 = count1 + 1;
|
||||
iterate label2;
|
||||
END loop label2;
|
||||
set count2 = count2 + 1;
|
||||
iterate label1;
|
||||
END loop label1;
|
||||
END//
|
||||
CALL sp11();
|
||||
SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
f1 f2 f3
|
||||
xyz pqr 1
|
||||
xyz pqr 2
|
||||
xyz pqr 3
|
||||
xyz pqr 4
|
||||
xyz pqr 1
|
||||
xyz pqr 2
|
||||
xyz pqr 3
|
||||
xyz pqr 4
|
||||
xyz pqr 1
|
||||
xyz pqr 2
|
||||
xyz pqr 3
|
||||
xyz pqr 4
|
||||
DROP PROCEDURE sp11;
|
||||
DROP TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
|
||||
Testcase 3.1.3.16:
|
||||
------------------
|
||||
|
||||
Ensure that the ITERATE statement acts correctly for all variants, including
|
||||
cases where statements are nested.
|
||||
(tests for this testcase are also included in other testcases)
|
||||
--------------------------------------------------------------------------------
|
||||
DROP PROCEDURE IF EXISTS sp31316;
|
||||
CREATE PROCEDURE sp31316( )
|
||||
BEGIN
|
||||
declare count1 integer default 1;
|
||||
declare count2 integer default 1;
|
||||
label1: loop
|
||||
if count2 > 3 then leave label1;
|
||||
END if;
|
||||
set count1 = 1;
|
||||
label2: loop
|
||||
if count1 > 4 then leave label2;
|
||||
END if;
|
||||
insert into temp values( count1, count2);
|
||||
set count1 = count1 + 1;
|
||||
iterate label3;
|
||||
END loop label2;
|
||||
set count2 = count2 + 1;
|
||||
iterate label1;
|
||||
END loop label1;
|
||||
END//
|
||||
ERROR 42000: ITERATE with no matching label: label3
|
||||
|
||||
Testcase 3.1.3.18:
|
||||
------------------
|
||||
|
||||
Ensure that the REPEAT statement acts correctly for all variants, including
|
||||
cases where statements are nested.
|
||||
--------------------------------------------------------------------------------
|
||||
DROP PROCEDURE IF EXISTS sp17;
|
||||
DROP TABLE IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
CREATE TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 CHAR(20), f2 VARCHAR(20), f3 SMALLINT);
|
||||
CREATE PROCEDURE sp17( )
|
||||
BEGIN
|
||||
declare count1 integer default 1;
|
||||
declare count2 integer default 1;
|
||||
repeat
|
||||
set count1 = count1 + 1;
|
||||
set count2 = 1;
|
||||
label1: repeat
|
||||
set count2 = count2 + 1;
|
||||
insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
|
||||
until count2 > 3
|
||||
END repeat label1;
|
||||
until count1 > 3
|
||||
END repeat;
|
||||
END//
|
||||
CALL sp17();
|
||||
SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
f1 f2 f3
|
||||
xyz pqr 2
|
||||
xyz pqr 2
|
||||
xyz pqr 2
|
||||
xyz pqr 3
|
||||
xyz pqr 3
|
||||
xyz pqr 3
|
||||
xyz pqr 4
|
||||
xyz pqr 4
|
||||
xyz pqr 4
|
||||
DROP PROCEDURE sp17;
|
||||
DROP TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742;
|
||||
|
||||
Testcase 3.1.3.24:
|
||||
------------------
|
||||
|
||||
Ensure that the WHILE statement acts correctly for all variants, including cases
|
||||
where statements are nested.
|
||||
--------------------------------------------------------------------------------
|
||||
drop table IF EXISTS res_t21;
|
||||
DROP PROCEDURE IF EXISTS sp21;
|
||||
create table res_t21(name text(10), surname blob(20), age_averylongfieldname_averylongname_1234569 smallint);
|
||||
insert into res_t21 values('ashwin', 'mokadam', 25);
|
||||
CREATE PROCEDURE sp21( )
|
||||
BEGIN
|
||||
declare count1 integer default 0;
|
||||
declare count2 integer default 0;
|
||||
while count1 < 3 do
|
||||
BEGIN
|
||||
declare ithisissamevariablename int default 100;
|
||||
SELECT ithisissamevariablename;
|
||||
BEGIN
|
||||
declare ithisissamevariablename int default 200;
|
||||
SELECT ithisissamevariablename;
|
||||
END;
|
||||
set count2 = 0;
|
||||
label1: while count2 < 3 do
|
||||
BEGIN
|
||||
declare count1 integer default 7;
|
||||
set count2 = count2 + 1;
|
||||
insert into res_t21 values( 'xyz' , 'pqr', count2);
|
||||
label2: while count1 < 10 do
|
||||
set count1 = count1 + 1;
|
||||
insert into res_t21 values( 'xyz' , 'pqr', count1);
|
||||
END while label2;
|
||||
END;
|
||||
END while label1;
|
||||
set count1 = count1 + 1;
|
||||
END;
|
||||
END while;
|
||||
END//
|
||||
CALL sp21();
|
||||
ithisissamevariablename
|
||||
100
|
||||
ithisissamevariablename
|
||||
200
|
||||
ithisissamevariablename
|
||||
100
|
||||
ithisissamevariablename
|
||||
200
|
||||
ithisissamevariablename
|
||||
100
|
||||
ithisissamevariablename
|
||||
200
|
||||
SELECT * from res_t21;
|
||||
name surname age_averylongfieldname_averylongname_1234569
|
||||
ashwin mokadam 25
|
||||
xyz pqr 1
|
||||
xyz pqr 8
|
||||
xyz pqr 9
|
||||
xyz pqr 10
|
||||
xyz pqr 2
|
||||
xyz pqr 8
|
||||
xyz pqr 9
|
||||
xyz pqr 10
|
||||
xyz pqr 3
|
||||
xyz pqr 8
|
||||
xyz pqr 9
|
||||
xyz pqr 10
|
||||
xyz pqr 1
|
||||
xyz pqr 8
|
||||
xyz pqr 9
|
||||
xyz pqr 10
|
||||
xyz pqr 2
|
||||
xyz pqr 8
|
||||
xyz pqr 9
|
||||
xyz pqr 10
|
||||
xyz pqr 3
|
||||
xyz pqr 8
|
||||
xyz pqr 9
|
||||
xyz pqr 10
|
||||
xyz pqr 1
|
||||
xyz pqr 8
|
||||
xyz pqr 9
|
||||
xyz pqr 10
|
||||
xyz pqr 2
|
||||
xyz pqr 8
|
||||
xyz pqr 9
|
||||
xyz pqr 10
|
||||
xyz pqr 3
|
||||
xyz pqr 8
|
||||
xyz pqr 9
|
||||
xyz pqr 10
|
||||
DROP PROCEDURE sp21;
|
||||
drop table res_t21;
|
||||
|
||||
Testcase 3.1.3.30:
|
||||
------------------
|
||||
|
||||
Ensure that multiple cases of all possible combinations of the control flow
|
||||
statements, nested within multiple compound statements within a stored
|
||||
procedure, always act correctly and return the expected result.
|
||||
--------------------------------------------------------------------------------
|
||||
DROP TABLE IF EXISTS res_tbl;
|
||||
DROP PROCEDURE IF EXISTS sp31330;
|
||||
create table res_tbl (f1 int, f2 text, f3 blob, f4 date,
|
||||
f5 set('one', 'two', 'three', 'four', 'five') default 'one');
|
||||
CREATE PROCEDURE sp31330 (path int)
|
||||
BEGIN
|
||||
declare count int default 1;
|
||||
declare var1 text;
|
||||
declare var2 blob;
|
||||
declare var3 date;
|
||||
declare var4 set('one', 'two', 'three', 'four', 'five') DEFAULT 'five';
|
||||
case
|
||||
when path=1 then
|
||||
set var3 = '2000-11-09';
|
||||
set var1 = 'flowing through case 1';
|
||||
label1: loop
|
||||
if count > 5 then
|
||||
if var4=1000 then
|
||||
set var2 = 'exiting out of case 1 - invalid SET';
|
||||
END if;
|
||||
if var4='two' then
|
||||
set var2 = 'exiting out of case 1';
|
||||
END if;
|
||||
insert into res_tbl values (1, var1, var2, var3, (count-2));
|
||||
leave label1;
|
||||
elseif count = 5 then
|
||||
set count= count + 2;
|
||||
set var4='two';
|
||||
iterate label1;
|
||||
else
|
||||
set count= count + 1;
|
||||
END if;
|
||||
set var4='one';
|
||||
END loop label1;
|
||||
when path=2 then
|
||||
set var3 = '1989-11-09';
|
||||
set var1 = 'flowing through case 2';
|
||||
set @count3=0;
|
||||
label2: repeat
|
||||
set count=count + 1;
|
||||
set @count2=1;
|
||||
while @count2 <= 5 do
|
||||
set @count2 = @count2 + 1;
|
||||
END while;
|
||||
SELECT @count2;
|
||||
set @count3=@count3 + @count2;
|
||||
until count > 5
|
||||
END repeat label2;
|
||||
set var2 = 'exiting out of case 2';
|
||||
set var4 = count-3;
|
||||
SELECT @count3;
|
||||
insert into res_tbl values (2, var1, var2, var3, var4);
|
||||
ELSE BEGIN
|
||||
set @error_opt='undefined path specified';
|
||||
SELECT @error_opt;
|
||||
END;
|
||||
END case;
|
||||
END//
|
||||
CALL sp31330();
|
||||
ERROR 42000: Incorrect number of arguments for PROCEDURE db_storedproc.sp31330; expected 1, got 0
|
||||
CALL sp31330(1);
|
||||
SELECT * from res_tbl;
|
||||
f1 f2 f3 f4 f5
|
||||
1 flowing through case 1 exiting out of case 1 2000-11-09 one,three
|
||||
CALL sp31330(2);
|
||||
@count2
|
||||
6
|
||||
@count2
|
||||
6
|
||||
@count2
|
||||
6
|
||||
@count2
|
||||
6
|
||||
@count2
|
||||
6
|
||||
@count3
|
||||
30
|
||||
SELECT * from res_tbl;
|
||||
f1 f2 f3 f4 f5
|
||||
1 flowing through case 1 exiting out of case 1 2000-11-09 one,three
|
||||
2 flowing through case 2 exiting out of case 2 1989-11-09 one,two
|
||||
CALL sp31330(4);
|
||||
@error_opt
|
||||
undefined path specified
|
||||
DROP PROCEDURE sp31330;
|
||||
drop table res_tbl;
|
||||
|
||||
--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
|
||||
--------------------------------------------------------------------------------
|
||||
DROP DATABASE IF EXISTS db_storedproc;
|
||||
DROP DATABASE IF EXISTS db_storedproc_1;
|
||||
|
||||
. +++ END OF SCRIPT +++
|
||||
--------------------------------------------------------------------------------
|
399
mysql-test/suite/funcs_1/r/memory_storedproc_06.result
Normal file
399
mysql-test/suite/funcs_1/r/memory_storedproc_06.result
Normal file
|
@ -0,0 +1,399 @@
|
|||
|
||||
--source suite/funcs_1/storedproc/load_sp_tb.inc
|
||||
--------------------------------------------------------------------------------
|
||||
SET @@global.max_heap_table_size=4294967295;
|
||||
SET @@session.max_heap_table_size=4294967295;
|
||||
|
||||
--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
|
||||
--------------------------------------------------------------------------------
|
||||
DROP DATABASE IF EXISTS db_storedproc;
|
||||
DROP DATABASE IF EXISTS db_storedproc_1;
|
||||
CREATE DATABASE db_storedproc;
|
||||
CREATE DATABASE db_storedproc_1;
|
||||
USE db_storedproc;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4;
|
||||
USE db_storedproc_1;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6;
|
||||
USE db_storedproc;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
Warning 1265 Data truncated for column 'f3' at row 3
|
||||
Warning 1265 Data truncated for column 'f3' at row 4
|
||||
Warning 1265 Data truncated for column 'f3' at row 5
|
||||
Warning 1265 Data truncated for column 'f3' at row 6
|
||||
Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
Warning 1265 Data truncated for column 'f3' at row 3
|
||||
Warning 1265 Data truncated for column 'f3' at row 4
|
||||
Warning 1265 Data truncated for column 'f3' at row 5
|
||||
Warning 1265 Data truncated for column 'f3' at row 6
|
||||
Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11;
|
||||
|
||||
Section 3.1.6 - Privilege Checks:
|
||||
--------------------------------------------------------------------------------
|
||||
USE db_storedproc_1;
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
|
||||
Testcase 3.1.6.1:
|
||||
-----------------
|
||||
Ensure that no user may create a stored procedure without the GRANT CREATE
|
||||
ROUTINE privilege.
|
||||
--------------------------------------------------------------------------------
|
||||
create user 'user_1'@'localhost';
|
||||
grant all on db_storedproc_1.* to 'user_1'@'localhost';
|
||||
revoke create routine on db_storedproc_1.* from 'user_1'@'localhost';
|
||||
flush privileges;
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
|
||||
|
||||
user_1@localhost db_storedproc_1
|
||||
USE db_storedproc_1;
|
||||
CREATE PROCEDURE sp1(v1 char(20))
|
||||
BEGIN
|
||||
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
|
||||
END//
|
||||
ERROR 42000: Access denied for user 'user_1'@'localhost' to database 'db_storedproc_1'
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
|
||||
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
|
||||
|
||||
user_1@localhost db_storedproc_1
|
||||
USE db_storedproc_1;
|
||||
CREATE PROCEDURE sp1(v1 char(20))
|
||||
BEGIN
|
||||
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
|
||||
END//
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
DROP USER 'user_1'@'localhost';
|
||||
DROP PROCEDURE sp1;
|
||||
|
||||
Testcase 3.1.6.2:
|
||||
-----------------
|
||||
Ensure that root always has the GRANT CREATE ROUTINE privilege.
|
||||
(checked by other testscases)
|
||||
--------------------------------------------------------------------------------
|
||||
grant create routine on db_storedproc_1.* to 'user_1'@'localhost';
|
||||
flush privileges;
|
||||
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
|
||||
|
||||
user_1@localhost db_storedproc_1
|
||||
DROP PROCEDURE IF EXISTS sp3;
|
||||
DROP FUNCTION IF EXISTS fn1;
|
||||
CREATE PROCEDURE sp3(v1 char(20))
|
||||
BEGIN
|
||||
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
|
||||
END//
|
||||
CREATE FUNCTION fn1(v1 int) returns int
|
||||
BEGIN
|
||||
return v1;
|
||||
END//
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
drop user 'user_1'@'localhost';
|
||||
DROP PROCEDURE sp3;
|
||||
DROP FUNCTION fn1;
|
||||
Warnings:
|
||||
Error 1133 Can't find any matching row in the user table
|
||||
Error 1269 Can't revoke all privileges for one or more of the requested users
|
||||
Warning 1405 Failed to revoke all privileges to dropped routine
|
||||
|
||||
Testcase 3.1.6.4:
|
||||
-----------------
|
||||
Ensure that the default security provision of a stored procedure is SQL SECURITY
|
||||
DEFINER.
|
||||
--------------------------------------------------------------------------------
|
||||
CREATE USER 'user_1'@'localhost';
|
||||
grant update on db_storedproc_1.t6 to 'user_1'@'localhost';
|
||||
grant execute on db_storedproc_1.* to 'user_1'@'localhost';
|
||||
flush privileges;
|
||||
USE db_storedproc_1;
|
||||
DROP PROCEDURE IF EXISTS sp4;
|
||||
CREATE PROCEDURE sp4(v1 char(20))
|
||||
BEGIN
|
||||
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
|
||||
END//
|
||||
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
|
||||
|
||||
user_1@localhost db_storedproc_1
|
||||
USE db_storedproc_1;
|
||||
CALL sp4('a');
|
||||
f1 f2 f3 f4 f5 f6
|
||||
SELECT SPECIFIC_NAME, ROUTINE_SCHEMA, ROUTINE_NAME, ROUTINE_TYPE,
|
||||
ROUTINE_BODY, ROUTINE_DEFINITION, IS_DETERMINISTIC,
|
||||
SQL_DATA_ACCESS, SECURITY_TYPE, SQL_MODE, ROUTINE_COMMENT
|
||||
FROM information_schema.routines
|
||||
WHERE routine_schema LIKE 'db_sto%';
|
||||
SPECIFIC_NAME sp4
|
||||
ROUTINE_SCHEMA db_storedproc_1
|
||||
ROUTINE_NAME sp4
|
||||
ROUTINE_TYPE PROCEDURE
|
||||
ROUTINE_BODY SQL
|
||||
ROUTINE_DEFINITION NULL
|
||||
IS_DETERMINISTIC NO
|
||||
SQL_DATA_ACCESS CONTAINS SQL
|
||||
SECURITY_TYPE DEFINER
|
||||
SQL_MODE
|
||||
ROUTINE_COMMENT
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
DROP PROCEDURE sp4;
|
||||
DROP USER 'user_1'@'localhost';
|
||||
|
||||
Testcase 3.1.6.5:
|
||||
-----------------
|
||||
Ensure that a stored procedure defined with SQL SECURITY DEFINER can be
|
||||
called/executed by any user, using only the privileges (including database
|
||||
access privileges) associated with the user who created the stored procedure.
|
||||
--------------------------------------------------------------------------------
|
||||
USE db_storedproc_1;
|
||||
CREATE TABLE t3165 ( c1 char(20), c2 char(20), c3 date);
|
||||
INSERT INTO t3165 VALUES ('inserted', 'outside of SP', NULL);
|
||||
create user 'user_1'@'localhost';
|
||||
create user 'user_2'@'localhost';
|
||||
grant create routine on db_storedproc_1.* to 'user_1'@'localhost';
|
||||
grant SELECT on db_storedproc_1.* to 'user_2'@'localhost';
|
||||
grant execute on db_storedproc_1.* to 'user_2'@'localhost';
|
||||
flush privileges;
|
||||
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
|
||||
|
||||
user_1@localhost db_storedproc_1
|
||||
CREATE PROCEDURE sp5_s_i () sql security definer
|
||||
BEGIN
|
||||
SELECT * from db_storedproc_1.t3165;
|
||||
insert into db_storedproc_1.t3165 values ('inserted', 'from sp5_s_i', 1000);
|
||||
END//
|
||||
CREATE PROCEDURE sp5_sel () sql security definer
|
||||
BEGIN
|
||||
SELECT * from db_storedproc_1.t3165;
|
||||
END//
|
||||
CREATE PROCEDURE sp5_ins () sql security definer
|
||||
BEGIN
|
||||
insert into db_storedproc_1.t3165 values ('inserted', 'from sp5_ins', 1000);
|
||||
END//
|
||||
connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
|
||||
|
||||
user_2@localhost db_storedproc_1
|
||||
CALL sp5_s_i();
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
CALL sp5_ins();
|
||||
ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
CALL sp5_sel();
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
CALL sp5_sel();
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
grant insert on db_storedproc_1.* to 'user_1'@'localhost';
|
||||
flush privileges;
|
||||
|
||||
user_2@localhost db_storedproc_1
|
||||
CALL sp5_s_i();
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
CALL sp5_ins();
|
||||
CALL sp5_sel();
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
CALL sp5_sel();
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
grant SELECT on db_storedproc_1.* to 'user_1'@'localhost';
|
||||
flush privileges;
|
||||
|
||||
user_2@localhost db_storedproc_1
|
||||
CALL sp5_s_i();
|
||||
c1 c2 c3
|
||||
inserted outside of SP NULL
|
||||
inserted from sp5_ins 2000-10-00
|
||||
CALL sp5_ins();
|
||||
CALL sp5_sel();
|
||||
c1 c2 c3
|
||||
inserted outside of SP NULL
|
||||
inserted from sp5_ins 2000-10-00
|
||||
inserted from sp5_s_i 2000-10-00
|
||||
inserted from sp5_ins 2000-10-00
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
REVOKE INSERT on db_storedproc_1.* from 'user_1'@'localhost';
|
||||
flush privileges;
|
||||
|
||||
user_2@localhost db_storedproc_1
|
||||
CALL sp5_s_i();
|
||||
c1 c2 c3
|
||||
inserted outside of SP NULL
|
||||
inserted from sp5_ins 2000-10-00
|
||||
inserted from sp5_s_i 2000-10-00
|
||||
inserted from sp5_ins 2000-10-00
|
||||
ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
CALL sp5_ins();
|
||||
ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
CALL sp5_sel();
|
||||
c1 c2 c3
|
||||
inserted outside of SP NULL
|
||||
inserted from sp5_ins 2000-10-00
|
||||
inserted from sp5_s_i 2000-10-00
|
||||
inserted from sp5_ins 2000-10-00
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
REVOKE SELECT on db_storedproc_1.* from 'user_1'@'localhost';
|
||||
flush privileges;
|
||||
|
||||
user_2@localhost db_storedproc_1
|
||||
CALL sp5_s_i();
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
CALL sp5_ins();
|
||||
ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
CALL sp5_sel();
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
DROP PROCEDURE sp5_s_i;
|
||||
DROP PROCEDURE sp5_sel;
|
||||
DROP PROCEDURE sp5_ins;
|
||||
DROP TABLE t3165;
|
||||
DROP USER 'user_1'@'localhost';
|
||||
DROP USER 'user_2'@'localhost';
|
||||
|
||||
Testcase 3.1.6.6:
|
||||
-----------------
|
||||
Ensure that a stored procedure defined with SQL SECURITY INVOKER can be
|
||||
called/executed by any user, using only the privileges (including database
|
||||
access privileges) associated with the user executing the stored procedure.
|
||||
--------------------------------------------------------------------------------
|
||||
USE db_storedproc_1;
|
||||
CREATE TABLE t3166 ( c1 char(30) );
|
||||
INSERT INTO db_storedproc_1.t3166 VALUES ('inserted outside SP');
|
||||
create user 'user_1'@'localhost';
|
||||
create user 'user_2'@'localhost';
|
||||
GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
|
||||
GRANT SELECT ON db_storedproc_1.* TO 'user_2'@'localhost';
|
||||
GRANT EXECUTE ON db_storedproc_1.* TO 'user_2'@'localhost';
|
||||
FLUSH PRIVILEGES;
|
||||
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
|
||||
|
||||
user_1@localhost db_storedproc_1
|
||||
CREATE PROCEDURE sp3166_s_i () SQL SECURITY INVOKER
|
||||
BEGIN
|
||||
SELECT * from db_storedproc_1.t3166;
|
||||
insert into db_storedproc_1.t3166 values ('inserted from sp3166_s_i');
|
||||
END//
|
||||
CREATE PROCEDURE sp3166_sel () SQL SECURITY INVOKER
|
||||
BEGIN
|
||||
SELECT * from db_storedproc_1.t3166;
|
||||
END//
|
||||
CREATE PROCEDURE sp3166_ins () SQL SECURITY INVOKER
|
||||
BEGIN
|
||||
insert into db_storedproc_1.t3166 values ('inserted from sp3166_ins');
|
||||
END//
|
||||
connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
|
||||
|
||||
user_2@localhost db_storedproc_1
|
||||
CALL sp3166_s_i();
|
||||
c1
|
||||
inserted outside SP
|
||||
ERROR 42000: INSERT command denied to user 'user_2'@'localhost' for table 't3166'
|
||||
CALL sp3166_ins();
|
||||
ERROR 42000: INSERT command denied to user 'user_2'@'localhost' for table 't3166'
|
||||
CALL sp3166_sel();
|
||||
c1
|
||||
inserted outside SP
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
CALL sp3166_sel();
|
||||
c1
|
||||
inserted outside SP
|
||||
GRANT INSERT ON db_storedproc_1.* TO 'user_2'@'localhost';
|
||||
FLUSH PRIVILEGES;
|
||||
connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
|
||||
|
||||
user_2@localhost db_storedproc_1
|
||||
CALL sp3166_s_i();
|
||||
c1
|
||||
inserted outside SP
|
||||
CALL sp3166_ins();
|
||||
CALL sp3166_sel();
|
||||
c1
|
||||
inserted outside SP
|
||||
inserted from sp3166_s_i
|
||||
inserted from sp3166_ins
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
CALL sp3166_sel();
|
||||
c1
|
||||
inserted outside SP
|
||||
inserted from sp3166_s_i
|
||||
inserted from sp3166_ins
|
||||
REVOKE SELECT ON db_storedproc_1.* FROM 'user_2'@'localhost';
|
||||
FLUSH PRIVILEGES;
|
||||
connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
|
||||
|
||||
user_2@localhost db_storedproc_1
|
||||
CALL sp3166_s_i();
|
||||
ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table 't3166'
|
||||
CALL sp3166_ins();
|
||||
CALL sp3166_sel();
|
||||
ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table 't3166'
|
||||
CALL sp3166_s_i();
|
||||
c1
|
||||
inserted outside SP
|
||||
inserted from sp3166_s_i
|
||||
inserted from sp3166_ins
|
||||
inserted from sp3166_ins
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
REVOKE EXECUTE on db_storedproc_1.* FROM 'user_2'@'localhost';
|
||||
FLUSH PRIVILEGES;
|
||||
connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
|
||||
|
||||
user_2@localhost db_storedproc_1
|
||||
CALL sp3166_s_i();
|
||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc_1.sp3166_s_i'
|
||||
CALL sp3166_ins();
|
||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc_1.sp3166_ins'
|
||||
CALL sp3166_sel();
|
||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc_1.sp3166_sel'
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
DROP PROCEDURE sp3166_s_i;
|
||||
DROP PROCEDURE sp3166_sel;
|
||||
DROP PROCEDURE sp3166_ins;
|
||||
DROP TABLE t3166;
|
||||
DROP USER 'user_1'@'localhost';
|
||||
DROP USER 'user_2'@'localhost';
|
||||
|
||||
--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
|
||||
--------------------------------------------------------------------------------
|
||||
DROP DATABASE IF EXISTS db_storedproc;
|
||||
DROP DATABASE IF EXISTS db_storedproc_1;
|
||||
|
||||
. +++ END OF SCRIPT +++
|
||||
--------------------------------------------------------------------------------
|
172
mysql-test/suite/funcs_1/r/memory_storedproc_07.result
Normal file
172
mysql-test/suite/funcs_1/r/memory_storedproc_07.result
Normal file
|
@ -0,0 +1,172 @@
|
|||
|
||||
--source suite/funcs_1/storedproc/load_sp_tb.inc
|
||||
--------------------------------------------------------------------------------
|
||||
SET @@global.max_heap_table_size=4294967295;
|
||||
SET @@session.max_heap_table_size=4294967295;
|
||||
|
||||
--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
|
||||
--------------------------------------------------------------------------------
|
||||
DROP DATABASE IF EXISTS db_storedproc;
|
||||
DROP DATABASE IF EXISTS db_storedproc_1;
|
||||
CREATE DATABASE db_storedproc;
|
||||
CREATE DATABASE db_storedproc_1;
|
||||
USE db_storedproc;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4;
|
||||
USE db_storedproc_1;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6;
|
||||
USE db_storedproc;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
Warning 1265 Data truncated for column 'f3' at row 3
|
||||
Warning 1265 Data truncated for column 'f3' at row 4
|
||||
Warning 1265 Data truncated for column 'f3' at row 5
|
||||
Warning 1265 Data truncated for column 'f3' at row 6
|
||||
Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
Warning 1265 Data truncated for column 'f3' at row 3
|
||||
Warning 1265 Data truncated for column 'f3' at row 4
|
||||
Warning 1265 Data truncated for column 'f3' at row 5
|
||||
Warning 1265 Data truncated for column 'f3' at row 6
|
||||
Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11;
|
||||
|
||||
Section 3.1.7 - SQL mode checks:
|
||||
--------------------------------------------------------------------------------
|
||||
USE db_storedproc;
|
||||
|
||||
Testcase 3.1.7.1:
|
||||
-----------------
|
||||
Ensure that the sql_mode setting in effect at the time a stored procedure is
|
||||
created is the same setting under which the stored procedure runs when it is
|
||||
called/executed.
|
||||
--------------------------------------------------------------------------------
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
DROP TABLE IF EXISTS temp_tbl;
|
||||
DROP TABLE IF EXISTS result;
|
||||
CREATE TABLE temp_tbl (f1 tinyint);
|
||||
CREATE TABLE result (f1 text(200), f2 char(20));
|
||||
set @@sql_mode='traditional';
|
||||
SHOW VARIABLES LIKE 'sql_mode';
|
||||
Variable_name Value
|
||||
sql_mode STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER
|
||||
CREATE PROCEDURE sp1()
|
||||
BEGIN
|
||||
declare a tinyint;
|
||||
declare count_ int default 1;
|
||||
declare continue handler for sqlstate '22003' set count_=1000;
|
||||
SHOW VARIABLES LIKE 'sql_mode';
|
||||
SELECT @@sql_mode into @cur_val_sql_mode;
|
||||
insert into temp_tbl values (1000);
|
||||
if count_ = 1000 THEN
|
||||
INSERT INTO result VALUES (@cur_val_sql_mode, 'value restored');
|
||||
ELSE
|
||||
INSERT INTO result VALUES (@cur_val_sql_mode, 'value not restored');
|
||||
END if;
|
||||
END//
|
||||
SHOW CREATE PROCEDURE sp1;
|
||||
Procedure sql_mode Create Procedure
|
||||
sp1 STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER CREATE DEFINER=`root`@`localhost` PROCEDURE `sp1`()
|
||||
BEGIN
|
||||
declare a tinyint;
|
||||
declare count_ int default 1;
|
||||
declare continue handler for sqlstate '22003' set count_=1000;
|
||||
SHOW VARIABLES LIKE 'sql_mode';
|
||||
SELECT @@sql_mode into @cur_val_sql_mode;
|
||||
insert into temp_tbl values (1000);
|
||||
if count_ = 1000 THEN
|
||||
INSERT INTO result VALUES (@cur_val_sql_mode, 'value restored');
|
||||
ELSE
|
||||
INSERT INTO result VALUES (@cur_val_sql_mode, 'value not restored');
|
||||
END if;
|
||||
END
|
||||
set @@sql_mode='';
|
||||
SHOW VARIABLES LIKE 'sql_mode';
|
||||
Variable_name Value
|
||||
sql_mode
|
||||
CALL sp1();
|
||||
Variable_name Value
|
||||
sql_mode STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER
|
||||
SELECT * from result;
|
||||
f1 f2
|
||||
STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER value restored
|
||||
SHOW VARIABLES LIKE 'sql_mode';
|
||||
Variable_name Value
|
||||
sql_mode
|
||||
SELECT @@sql_mode;
|
||||
@@sql_mode
|
||||
|
||||
SET @@sql_mode='TRADITIONAL';
|
||||
DROP PROCEDURE sp1;
|
||||
DROP TABLE temp_tbl;
|
||||
DROP TABLE result;
|
||||
|
||||
Testcase 3.1.7.2:
|
||||
-----------------
|
||||
Ensure that if the sql_mode setting is changed when a stored procedure is run,
|
||||
that the original setting is restored as soon as the stored procedure execution
|
||||
is complete.
|
||||
--------------------------------------------------------------------------------
|
||||
DROP PROCEDURE IF EXISTS sp2;
|
||||
... show initial value
|
||||
SHOW VARIABLES LIKE 'sql_mode';
|
||||
Variable_name Value
|
||||
sql_mode STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER
|
||||
CREATE PROCEDURE sp2()
|
||||
BEGIN
|
||||
SET @@sql_mode='MAXDB';
|
||||
SHOW VARIABLES LIKE 'sql_mode';
|
||||
END//
|
||||
SHOW CREATE PROCEDURE sp2;
|
||||
Procedure sql_mode Create Procedure
|
||||
sp2 STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER CREATE DEFINER=`root`@`localhost` PROCEDURE `sp2`()
|
||||
BEGIN
|
||||
SET @@sql_mode='MAXDB';
|
||||
SHOW VARIABLES LIKE 'sql_mode';
|
||||
END
|
||||
... show value prior calling procedure
|
||||
SHOW VARIABLES LIKE 'sql_mode';
|
||||
Variable_name Value
|
||||
sql_mode STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER
|
||||
... call procedure that changes sql_mode
|
||||
CALL sp2();
|
||||
Variable_name Value
|
||||
sql_mode PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,MAXDB,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER
|
||||
... check whether old value is re-set
|
||||
SHOW VARIABLES LIKE 'sql_mode';
|
||||
Variable_name Value
|
||||
sql_mode STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER
|
||||
DROP PROCEDURE sp2;
|
||||
|
||||
--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
|
||||
--------------------------------------------------------------------------------
|
||||
DROP DATABASE IF EXISTS db_storedproc;
|
||||
DROP DATABASE IF EXISTS db_storedproc_1;
|
||||
|
||||
. +++ END OF SCRIPT +++
|
||||
--------------------------------------------------------------------------------
|
637
mysql-test/suite/funcs_1/r/memory_storedproc_08.result
Normal file
637
mysql-test/suite/funcs_1/r/memory_storedproc_08.result
Normal file
|
@ -0,0 +1,637 @@
|
|||
|
||||
--source suite/funcs_1/storedproc/load_sp_tb.inc
|
||||
--------------------------------------------------------------------------------
|
||||
SET @@global.max_heap_table_size=4294967295;
|
||||
SET @@session.max_heap_table_size=4294967295;
|
||||
|
||||
--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
|
||||
--------------------------------------------------------------------------------
|
||||
DROP DATABASE IF EXISTS db_storedproc;
|
||||
DROP DATABASE IF EXISTS db_storedproc_1;
|
||||
CREATE DATABASE db_storedproc;
|
||||
CREATE DATABASE db_storedproc_1;
|
||||
USE db_storedproc;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4;
|
||||
USE db_storedproc_1;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6;
|
||||
USE db_storedproc;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
Warning 1265 Data truncated for column 'f3' at row 3
|
||||
Warning 1265 Data truncated for column 'f3' at row 4
|
||||
Warning 1265 Data truncated for column 'f3' at row 5
|
||||
Warning 1265 Data truncated for column 'f3' at row 6
|
||||
Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
Warning 1265 Data truncated for column 'f3' at row 3
|
||||
Warning 1265 Data truncated for column 'f3' at row 4
|
||||
Warning 1265 Data truncated for column 'f3' at row 5
|
||||
Warning 1265 Data truncated for column 'f3' at row 6
|
||||
Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11;
|
||||
|
||||
Section 3.1.8 - SHOW statement checks:
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Testcase 3.1.8.9:
|
||||
-----------------
|
||||
|
||||
Ensure that all stored procedure changes made with ALTER PROCEDURE or ALTER
|
||||
FUNCTION are properly recorded and displayed when a SHOW CREATE PROCEDURE or
|
||||
SHOW CREATE PROCEDURE STATUS statement, or a SHOW CREATE FUNCTION or SHOW CREATE
|
||||
FUNCTION STATUS statement (respectively) is executed.
|
||||
--------------------------------------------------------------------------------
|
||||
DROP FUNCTION IF EXISTS fn_1;
|
||||
DROP FUNCTION IF EXISTS fn_2;
|
||||
DROP PROCEDURE IF EXISTS sp_1;
|
||||
DROP PROCEDURE IF EXISTS sp_2;
|
||||
CREATE PROCEDURE sp_1 (i1 int)
|
||||
BEGIN
|
||||
set @x=i1;
|
||||
END//
|
||||
CREATE PROCEDURE sp_2 (i1 int) SQL SECURITY INVOKER COMMENT 'created with INVOKER'
|
||||
BEGIN
|
||||
set @x=i1;
|
||||
END//
|
||||
CREATE FUNCTION fn_1 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) returns year
|
||||
BEGIN
|
||||
set @x=i1;
|
||||
set @y=@x;
|
||||
return i4;
|
||||
END//
|
||||
CREATE FUNCTION fn_2 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real)
|
||||
RETURNS YEAR
|
||||
SQL SECURITY INVOKER
|
||||
COMMENT 'created with INVOKER'
|
||||
BEGIN
|
||||
set @x=i1;
|
||||
set @y=@x;
|
||||
return i4;
|
||||
END//
|
||||
|
||||
... now check what is stored:
|
||||
-----------------------------
|
||||
SELECT * FROM information_schema.routines;
|
||||
SPECIFIC_NAME fn_1
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
ROUTINE_NAME fn_1
|
||||
ROUTINE_TYPE FUNCTION
|
||||
DTD_IDENTIFIER year(4)
|
||||
ROUTINE_BODY SQL
|
||||
ROUTINE_DEFINITION BEGIN
|
||||
set @x=i1;
|
||||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
EXTERNAL_NAME NULL
|
||||
EXTERNAL_LANGUAGE NULL
|
||||
PARAMETER_STYLE SQL
|
||||
IS_DETERMINISTIC NO
|
||||
SQL_DATA_ACCESS CONTAINS SQL
|
||||
SQL_PATH NULL
|
||||
SECURITY_TYPE DEFINER
|
||||
CREATED <modified>
|
||||
LAST_ALTERED <created>
|
||||
SQL_MODE
|
||||
ROUTINE_COMMENT
|
||||
DEFINER root@localhost
|
||||
SPECIFIC_NAME fn_2
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
ROUTINE_NAME fn_2
|
||||
ROUTINE_TYPE FUNCTION
|
||||
DTD_IDENTIFIER year(4)
|
||||
ROUTINE_BODY SQL
|
||||
ROUTINE_DEFINITION BEGIN
|
||||
set @x=i1;
|
||||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
EXTERNAL_NAME NULL
|
||||
EXTERNAL_LANGUAGE NULL
|
||||
PARAMETER_STYLE SQL
|
||||
IS_DETERMINISTIC NO
|
||||
SQL_DATA_ACCESS CONTAINS SQL
|
||||
SQL_PATH NULL
|
||||
SECURITY_TYPE INVOKER
|
||||
CREATED <modified>
|
||||
LAST_ALTERED <created>
|
||||
SQL_MODE
|
||||
ROUTINE_COMMENT created with INVOKER
|
||||
DEFINER root@localhost
|
||||
SPECIFIC_NAME sp_1
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
ROUTINE_NAME sp_1
|
||||
ROUTINE_TYPE PROCEDURE
|
||||
DTD_IDENTIFIER NULL
|
||||
ROUTINE_BODY SQL
|
||||
ROUTINE_DEFINITION BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
EXTERNAL_NAME NULL
|
||||
EXTERNAL_LANGUAGE NULL
|
||||
PARAMETER_STYLE SQL
|
||||
IS_DETERMINISTIC NO
|
||||
SQL_DATA_ACCESS CONTAINS SQL
|
||||
SQL_PATH NULL
|
||||
SECURITY_TYPE DEFINER
|
||||
CREATED <modified>
|
||||
LAST_ALTERED <created>
|
||||
SQL_MODE
|
||||
ROUTINE_COMMENT
|
||||
DEFINER root@localhost
|
||||
SPECIFIC_NAME sp_2
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
ROUTINE_NAME sp_2
|
||||
ROUTINE_TYPE PROCEDURE
|
||||
DTD_IDENTIFIER NULL
|
||||
ROUTINE_BODY SQL
|
||||
ROUTINE_DEFINITION BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
EXTERNAL_NAME NULL
|
||||
EXTERNAL_LANGUAGE NULL
|
||||
PARAMETER_STYLE SQL
|
||||
IS_DETERMINISTIC NO
|
||||
SQL_DATA_ACCESS CONTAINS SQL
|
||||
SQL_PATH NULL
|
||||
SECURITY_TYPE INVOKER
|
||||
CREATED <modified>
|
||||
LAST_ALTERED <created>
|
||||
SQL_MODE
|
||||
ROUTINE_COMMENT created with INVOKER
|
||||
DEFINER root@localhost
|
||||
SHOW CREATE FUNCTION fn_1;
|
||||
Function fn_1
|
||||
sql_mode
|
||||
Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_1`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4)
|
||||
BEGIN
|
||||
set @x=i1;
|
||||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
SHOW CREATE FUNCTION fn_2;
|
||||
Function fn_2
|
||||
sql_mode
|
||||
Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_2`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4)
|
||||
SQL SECURITY INVOKER
|
||||
COMMENT 'created with INVOKER'
|
||||
BEGIN
|
||||
set @x=i1;
|
||||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
SHOW CREATE PROCEDURE sp_1;
|
||||
Procedure sp_1
|
||||
sql_mode
|
||||
Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
|
||||
BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
SHOW CREATE PROCEDURE sp_2;
|
||||
Procedure sp_2
|
||||
sql_mode
|
||||
Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
|
||||
SQL SECURITY INVOKER
|
||||
COMMENT 'created with INVOKER'
|
||||
BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
SHOW FUNCTION STATUS LIKE 'fn_%';
|
||||
Db db_storedproc
|
||||
Name fn_1
|
||||
Type FUNCTION
|
||||
Definer root@localhost
|
||||
Modified <modified>
|
||||
Created <created>
|
||||
Security_type DEFINER
|
||||
Comment
|
||||
Db db_storedproc
|
||||
Name fn_2
|
||||
Type FUNCTION
|
||||
Definer root@localhost
|
||||
Modified <modified>
|
||||
Created <created>
|
||||
Security_type INVOKER
|
||||
Comment created with INVOKER
|
||||
SHOW PROCEDURE STATUS LIKE 'sp_%';
|
||||
Db db_storedproc
|
||||
Name sp_1
|
||||
Type PROCEDURE
|
||||
Definer root@localhost
|
||||
Modified <modified>
|
||||
Created <created>
|
||||
Security_type DEFINER
|
||||
Comment
|
||||
Db db_storedproc
|
||||
Name sp_2
|
||||
Type PROCEDURE
|
||||
Definer root@localhost
|
||||
Modified <modified>
|
||||
Created <created>
|
||||
Security_type INVOKER
|
||||
Comment created with INVOKER
|
||||
|
||||
... now change some stuff:
|
||||
--------------------------
|
||||
ALTER PROCEDURE sp_1 SQL SECURITY INVOKER;
|
||||
ALTER PROCEDURE sp_1 COMMENT 'new comment, SP changed to INVOKER';
|
||||
ALTER PROCEDURE sp_2 SQL SECURITY DEFINER;
|
||||
ALTER PROCEDURE sp_2 DROP COMMENT;
|
||||
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 'DROP COMMENT' at line 1
|
||||
ALTER PROCEDURE sp_2 COMMENT 'SP changed to DEFINER';
|
||||
ALTER PROCEDURE sp_2 READS SQL DATA;
|
||||
ALTER FUNCTION fn_1 SQL SECURITY INVOKER;
|
||||
ALTER FUNCTION fn_1 COMMENT 'new comment, FN changed to INVOKER';
|
||||
ALTER FUNCTION fn_1 NO SQL;
|
||||
ALTER FUNCTION fn_2 SQL SECURITY DEFINER;
|
||||
ALTER FUNCTION fn_2 COMMENT 'FN changed to DEFINER';
|
||||
ALTER FUNCTION fn_2 MODIFIES SQL DATA;
|
||||
|
||||
... now check what is stored:
|
||||
-----------------------------
|
||||
SELECT * FROM information_schema.routines;
|
||||
SPECIFIC_NAME fn_1
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
ROUTINE_NAME fn_1
|
||||
ROUTINE_TYPE FUNCTION
|
||||
DTD_IDENTIFIER year(4)
|
||||
ROUTINE_BODY SQL
|
||||
ROUTINE_DEFINITION BEGIN
|
||||
set @x=i1;
|
||||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
EXTERNAL_NAME NULL
|
||||
EXTERNAL_LANGUAGE NULL
|
||||
PARAMETER_STYLE SQL
|
||||
IS_DETERMINISTIC NO
|
||||
SQL_DATA_ACCESS NO SQL
|
||||
SQL_PATH NULL
|
||||
SECURITY_TYPE INVOKER
|
||||
CREATED <modified>
|
||||
LAST_ALTERED <created>
|
||||
SQL_MODE
|
||||
ROUTINE_COMMENT new comment, FN changed to INVOKER
|
||||
DEFINER root@localhost
|
||||
SPECIFIC_NAME fn_2
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
ROUTINE_NAME fn_2
|
||||
ROUTINE_TYPE FUNCTION
|
||||
DTD_IDENTIFIER year(4)
|
||||
ROUTINE_BODY SQL
|
||||
ROUTINE_DEFINITION BEGIN
|
||||
set @x=i1;
|
||||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
EXTERNAL_NAME NULL
|
||||
EXTERNAL_LANGUAGE NULL
|
||||
PARAMETER_STYLE SQL
|
||||
IS_DETERMINISTIC NO
|
||||
SQL_DATA_ACCESS MODIFIES SQL DATA
|
||||
SQL_PATH NULL
|
||||
SECURITY_TYPE DEFINER
|
||||
CREATED <modified>
|
||||
LAST_ALTERED <created>
|
||||
SQL_MODE
|
||||
ROUTINE_COMMENT FN changed to DEFINER
|
||||
DEFINER root@localhost
|
||||
SPECIFIC_NAME sp_1
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
ROUTINE_NAME sp_1
|
||||
ROUTINE_TYPE PROCEDURE
|
||||
DTD_IDENTIFIER NULL
|
||||
ROUTINE_BODY SQL
|
||||
ROUTINE_DEFINITION BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
EXTERNAL_NAME NULL
|
||||
EXTERNAL_LANGUAGE NULL
|
||||
PARAMETER_STYLE SQL
|
||||
IS_DETERMINISTIC NO
|
||||
SQL_DATA_ACCESS CONTAINS SQL
|
||||
SQL_PATH NULL
|
||||
SECURITY_TYPE INVOKER
|
||||
CREATED <modified>
|
||||
LAST_ALTERED <created>
|
||||
SQL_MODE
|
||||
ROUTINE_COMMENT new comment, SP changed to INVOKER
|
||||
DEFINER root@localhost
|
||||
SPECIFIC_NAME sp_2
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
ROUTINE_NAME sp_2
|
||||
ROUTINE_TYPE PROCEDURE
|
||||
DTD_IDENTIFIER NULL
|
||||
ROUTINE_BODY SQL
|
||||
ROUTINE_DEFINITION BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
EXTERNAL_NAME NULL
|
||||
EXTERNAL_LANGUAGE NULL
|
||||
PARAMETER_STYLE SQL
|
||||
IS_DETERMINISTIC NO
|
||||
SQL_DATA_ACCESS READS SQL DATA
|
||||
SQL_PATH NULL
|
||||
SECURITY_TYPE DEFINER
|
||||
CREATED <modified>
|
||||
LAST_ALTERED <created>
|
||||
SQL_MODE
|
||||
ROUTINE_COMMENT SP changed to DEFINER
|
||||
DEFINER root@localhost
|
||||
SHOW CREATE FUNCTION fn_1;
|
||||
Function fn_1
|
||||
sql_mode
|
||||
Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_1`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4)
|
||||
NO SQL
|
||||
SQL SECURITY INVOKER
|
||||
COMMENT 'new comment, FN changed to INVOKER'
|
||||
BEGIN
|
||||
set @x=i1;
|
||||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
SHOW CREATE FUNCTION fn_2;
|
||||
Function fn_2
|
||||
sql_mode
|
||||
Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_2`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4)
|
||||
MODIFIES SQL DATA
|
||||
COMMENT 'FN changed to DEFINER'
|
||||
BEGIN
|
||||
set @x=i1;
|
||||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
SHOW CREATE PROCEDURE sp_1;
|
||||
Procedure sp_1
|
||||
sql_mode
|
||||
Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
|
||||
SQL SECURITY INVOKER
|
||||
COMMENT 'new comment, SP changed to INVOKER'
|
||||
BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
SHOW CREATE PROCEDURE sp_2;
|
||||
Procedure sp_2
|
||||
sql_mode
|
||||
Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
|
||||
READS SQL DATA
|
||||
COMMENT 'SP changed to DEFINER'
|
||||
BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
SHOW FUNCTION STATUS LIKE 'fn_%';
|
||||
Db db_storedproc
|
||||
Name fn_1
|
||||
Type FUNCTION
|
||||
Definer root@localhost
|
||||
Modified <modified>
|
||||
Created <created>
|
||||
Security_type INVOKER
|
||||
Comment new comment, FN changed to INVOKER
|
||||
Db db_storedproc
|
||||
Name fn_2
|
||||
Type FUNCTION
|
||||
Definer root@localhost
|
||||
Modified <modified>
|
||||
Created <created>
|
||||
Security_type DEFINER
|
||||
Comment FN changed to DEFINER
|
||||
SHOW PROCEDURE STATUS LIKE 'sp_%';
|
||||
Db db_storedproc
|
||||
Name sp_1
|
||||
Type PROCEDURE
|
||||
Definer root@localhost
|
||||
Modified <modified>
|
||||
Created <created>
|
||||
Security_type INVOKER
|
||||
Comment new comment, SP changed to INVOKER
|
||||
Db db_storedproc
|
||||
Name sp_2
|
||||
Type PROCEDURE
|
||||
Definer root@localhost
|
||||
Modified <modified>
|
||||
Created <created>
|
||||
Security_type DEFINER
|
||||
Comment SP changed to DEFINER
|
||||
|
||||
... change back to default and check result:
|
||||
--------------------------------------------
|
||||
ALTER FUNCTION fn_2 CONTAINS SQL;
|
||||
|
||||
... now check what is stored:
|
||||
-----------------------------
|
||||
SELECT * FROM information_schema.routines;
|
||||
SPECIFIC_NAME fn_1
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
ROUTINE_NAME fn_1
|
||||
ROUTINE_TYPE FUNCTION
|
||||
DTD_IDENTIFIER year(4)
|
||||
ROUTINE_BODY SQL
|
||||
ROUTINE_DEFINITION BEGIN
|
||||
set @x=i1;
|
||||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
EXTERNAL_NAME NULL
|
||||
EXTERNAL_LANGUAGE NULL
|
||||
PARAMETER_STYLE SQL
|
||||
IS_DETERMINISTIC NO
|
||||
SQL_DATA_ACCESS NO SQL
|
||||
SQL_PATH NULL
|
||||
SECURITY_TYPE INVOKER
|
||||
CREATED <modified>
|
||||
LAST_ALTERED <created>
|
||||
SQL_MODE
|
||||
ROUTINE_COMMENT new comment, FN changed to INVOKER
|
||||
DEFINER root@localhost
|
||||
SPECIFIC_NAME fn_2
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
ROUTINE_NAME fn_2
|
||||
ROUTINE_TYPE FUNCTION
|
||||
DTD_IDENTIFIER year(4)
|
||||
ROUTINE_BODY SQL
|
||||
ROUTINE_DEFINITION BEGIN
|
||||
set @x=i1;
|
||||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
EXTERNAL_NAME NULL
|
||||
EXTERNAL_LANGUAGE NULL
|
||||
PARAMETER_STYLE SQL
|
||||
IS_DETERMINISTIC NO
|
||||
SQL_DATA_ACCESS CONTAINS SQL
|
||||
SQL_PATH NULL
|
||||
SECURITY_TYPE DEFINER
|
||||
CREATED <modified>
|
||||
LAST_ALTERED <created>
|
||||
SQL_MODE
|
||||
ROUTINE_COMMENT FN changed to DEFINER
|
||||
DEFINER root@localhost
|
||||
SPECIFIC_NAME sp_1
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
ROUTINE_NAME sp_1
|
||||
ROUTINE_TYPE PROCEDURE
|
||||
DTD_IDENTIFIER NULL
|
||||
ROUTINE_BODY SQL
|
||||
ROUTINE_DEFINITION BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
EXTERNAL_NAME NULL
|
||||
EXTERNAL_LANGUAGE NULL
|
||||
PARAMETER_STYLE SQL
|
||||
IS_DETERMINISTIC NO
|
||||
SQL_DATA_ACCESS CONTAINS SQL
|
||||
SQL_PATH NULL
|
||||
SECURITY_TYPE INVOKER
|
||||
CREATED <modified>
|
||||
LAST_ALTERED <created>
|
||||
SQL_MODE
|
||||
ROUTINE_COMMENT new comment, SP changed to INVOKER
|
||||
DEFINER root@localhost
|
||||
SPECIFIC_NAME sp_2
|
||||
ROUTINE_CATALOG NULL
|
||||
ROUTINE_SCHEMA db_storedproc
|
||||
ROUTINE_NAME sp_2
|
||||
ROUTINE_TYPE PROCEDURE
|
||||
DTD_IDENTIFIER NULL
|
||||
ROUTINE_BODY SQL
|
||||
ROUTINE_DEFINITION BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
EXTERNAL_NAME NULL
|
||||
EXTERNAL_LANGUAGE NULL
|
||||
PARAMETER_STYLE SQL
|
||||
IS_DETERMINISTIC NO
|
||||
SQL_DATA_ACCESS READS SQL DATA
|
||||
SQL_PATH NULL
|
||||
SECURITY_TYPE DEFINER
|
||||
CREATED <modified>
|
||||
LAST_ALTERED <created>
|
||||
SQL_MODE
|
||||
ROUTINE_COMMENT SP changed to DEFINER
|
||||
DEFINER root@localhost
|
||||
SHOW CREATE FUNCTION fn_1;
|
||||
Function fn_1
|
||||
sql_mode
|
||||
Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_1`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4)
|
||||
NO SQL
|
||||
SQL SECURITY INVOKER
|
||||
COMMENT 'new comment, FN changed to INVOKER'
|
||||
BEGIN
|
||||
set @x=i1;
|
||||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
SHOW CREATE FUNCTION fn_2;
|
||||
Function fn_2
|
||||
sql_mode
|
||||
Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_2`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4)
|
||||
COMMENT 'FN changed to DEFINER'
|
||||
BEGIN
|
||||
set @x=i1;
|
||||
set @y=@x;
|
||||
return i4;
|
||||
END
|
||||
SHOW CREATE PROCEDURE sp_1;
|
||||
Procedure sp_1
|
||||
sql_mode
|
||||
Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
|
||||
SQL SECURITY INVOKER
|
||||
COMMENT 'new comment, SP changed to INVOKER'
|
||||
BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
SHOW CREATE PROCEDURE sp_2;
|
||||
Procedure sp_2
|
||||
sql_mode
|
||||
Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
|
||||
READS SQL DATA
|
||||
COMMENT 'SP changed to DEFINER'
|
||||
BEGIN
|
||||
set @x=i1;
|
||||
END
|
||||
SHOW FUNCTION STATUS LIKE 'fn_%';
|
||||
Db db_storedproc
|
||||
Name fn_1
|
||||
Type FUNCTION
|
||||
Definer root@localhost
|
||||
Modified <modified>
|
||||
Created <created>
|
||||
Security_type INVOKER
|
||||
Comment new comment, FN changed to INVOKER
|
||||
Db db_storedproc
|
||||
Name fn_2
|
||||
Type FUNCTION
|
||||
Definer root@localhost
|
||||
Modified <modified>
|
||||
Created <created>
|
||||
Security_type DEFINER
|
||||
Comment FN changed to DEFINER
|
||||
SHOW PROCEDURE STATUS LIKE 'sp_%';
|
||||
Db db_storedproc
|
||||
Name sp_1
|
||||
Type PROCEDURE
|
||||
Definer root@localhost
|
||||
Modified <modified>
|
||||
Created <created>
|
||||
Security_type INVOKER
|
||||
Comment new comment, SP changed to INVOKER
|
||||
Db db_storedproc
|
||||
Name sp_2
|
||||
Type PROCEDURE
|
||||
Definer root@localhost
|
||||
Modified <modified>
|
||||
Created <created>
|
||||
Security_type DEFINER
|
||||
Comment SP changed to DEFINER
|
||||
|
||||
... cleanup
|
||||
-----------
|
||||
DROP FUNCTION fn_1;
|
||||
DROP FUNCTION fn_2;
|
||||
DROP PROCEDURE sp_1;
|
||||
|
||||
--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
|
||||
--------------------------------------------------------------------------------
|
||||
DROP DATABASE IF EXISTS db_storedproc;
|
||||
DROP DATABASE IF EXISTS db_storedproc_1;
|
||||
|
||||
. +++ END OF SCRIPT +++
|
||||
--------------------------------------------------------------------------------
|
321
mysql-test/suite/funcs_1/r/memory_storedproc_10.result
Normal file
321
mysql-test/suite/funcs_1/r/memory_storedproc_10.result
Normal file
|
@ -0,0 +1,321 @@
|
|||
|
||||
--source suite/funcs_1/storedproc/load_sp_tb.inc
|
||||
--------------------------------------------------------------------------------
|
||||
SET @@global.max_heap_table_size=4294967295;
|
||||
SET @@session.max_heap_table_size=4294967295;
|
||||
|
||||
--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
|
||||
--------------------------------------------------------------------------------
|
||||
DROP DATABASE IF EXISTS db_storedproc;
|
||||
DROP DATABASE IF EXISTS db_storedproc_1;
|
||||
CREATE DATABASE db_storedproc;
|
||||
CREATE DATABASE db_storedproc_1;
|
||||
USE db_storedproc;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4;
|
||||
USE db_storedproc_1;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6;
|
||||
USE db_storedproc;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
Warning 1265 Data truncated for column 'f3' at row 3
|
||||
Warning 1265 Data truncated for column 'f3' at row 4
|
||||
Warning 1265 Data truncated for column 'f3' at row 5
|
||||
Warning 1265 Data truncated for column 'f3' at row 6
|
||||
Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
Warning 1265 Data truncated for column 'f3' at row 3
|
||||
Warning 1265 Data truncated for column 'f3' at row 4
|
||||
Warning 1265 Data truncated for column 'f3' at row 5
|
||||
Warning 1265 Data truncated for column 'f3' at row 6
|
||||
Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11;
|
||||
|
||||
Section 3.1.10 - CALL checks:
|
||||
--------------------------------------------------------------------------------
|
||||
USE db_storedproc;
|
||||
|
||||
Testcase 3.1.10.2 + 3.1.10.5:
|
||||
-----------------------------
|
||||
|
||||
2. Ensure that a procedure cannot be called if the appropriate privileges do not
|
||||
exist.
|
||||
5. Ensure that a function cannot be executed if the appropriate privileges do
|
||||
not exist.
|
||||
--------------------------------------------------------------------------------
|
||||
DROP PROCEDURE IF EXISTS sp31102;
|
||||
DROP FUNCTION IF EXISTS fn31105;
|
||||
create user 'user_1'@'localhost';
|
||||
create user 'user_2'@'localhost';
|
||||
GRANT CREATE ROUTINE ON db_storedproc.* TO 'user_1'@'localhost';
|
||||
GRANT SELECT ON db_storedproc.* TO 'user_2'@'localhost';
|
||||
FLUSH PRIVILEGES;
|
||||
connect(localhost,user_1,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
|
||||
|
||||
user_1@localhost db_storedproc
|
||||
CREATE PROCEDURE sp31102 () SQL SECURITY INVOKER
|
||||
BEGIN
|
||||
SELECT * FROM db_storedproc.t1 WHERE f4=-5000 LIMIT 1;
|
||||
END//
|
||||
CREATE FUNCTION fn31105(n INT) RETURNS INT
|
||||
BEGIN
|
||||
DECLARE res INT;
|
||||
SET res = n * n;
|
||||
RETURN res;
|
||||
END//
|
||||
connect(localhost,user_2,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
|
||||
|
||||
user_2@localhost db_storedproc
|
||||
CALL sp31102();
|
||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.sp31102'
|
||||
SELECT fn31105( 9 );
|
||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105'
|
||||
|
||||
root@localhost db_storedproc
|
||||
CALL sp31102();
|
||||
f1 f2 f3 f4 f5 f6
|
||||
a` a` 1000-01-01 -5000 a` -5000
|
||||
SELECT fn31105( 9 );
|
||||
fn31105( 9 )
|
||||
81
|
||||
GRANT EXECUTE ON db_storedproc.* TO 'user_2'@'localhost';
|
||||
FLUSH PRIVILEGES;
|
||||
connect(localhost,user_2,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
|
||||
|
||||
user_2@localhost db_storedproc
|
||||
CALL sp31102();
|
||||
f1 f2 f3 f4 f5 f6
|
||||
a` a` 1000-01-01 -5000 a` -5000
|
||||
SELECT fn31105( 9 );
|
||||
fn31105( 9 )
|
||||
81
|
||||
|
||||
root@localhost db_storedproc
|
||||
REVOKE EXECUTE ON db_storedproc.* FROM 'user_2'@'localhost';
|
||||
FLUSH PRIVILEGES;
|
||||
CALL sp31102();
|
||||
f1 f2 f3 f4 f5 f6
|
||||
a` a` 1000-01-01 -5000 a` -5000
|
||||
SELECT fn31105( 9 );
|
||||
fn31105( 9 )
|
||||
81
|
||||
connect(localhost,user_2,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
|
||||
|
||||
user_2@localhost db_storedproc
|
||||
CALL sp31102();
|
||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.sp31102'
|
||||
SELECT fn31105( 9 );
|
||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105'
|
||||
|
||||
root@localhost db_storedproc
|
||||
DROP PROCEDURE sp31102;
|
||||
DROP FUNCTION fn31105;
|
||||
DROP USER 'user_1'@'localhost';
|
||||
DROP USER 'user_2'@'localhost';
|
||||
|
||||
Testcase 3.1.10.3:
|
||||
------------------
|
||||
|
||||
Ensure that a function can never be called.
|
||||
--------------------------------------------------------------------------------
|
||||
DROP FUNCTION IF EXISTS fn1;
|
||||
CREATE FUNCTION fn1(a int) returns int
|
||||
BEGIN
|
||||
set @b = 0.9 * a;
|
||||
return @b;
|
||||
END//
|
||||
CALL fn1();
|
||||
ERROR 42000: PROCEDURE db_storedproc.fn1 does not exist
|
||||
DROP FUNCTION fn1;
|
||||
|
||||
Testcase 3.1.10.6:
|
||||
------------------
|
||||
|
||||
Ensure that a procedure can never be executed.
|
||||
--------------------------------------------------------------------------------
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
DROP FUNCTION IF EXISTS sp1;
|
||||
CREATE PROCEDURE sp1()
|
||||
BEGIN
|
||||
SELECT * from t10;
|
||||
END//
|
||||
SELECT sp1();
|
||||
ERROR 42000: FUNCTION db_storedproc.sp1 does not exist
|
||||
DROP PROCEDURE sp1;
|
||||
|
||||
Testcase 3.1.10.7:
|
||||
------------------
|
||||
|
||||
Ensure that the ROW_COUNT() SQL function always returns the correct number of
|
||||
rows affected by the execution of a stored procedure.
|
||||
--------------------------------------------------------------------------------
|
||||
DROP PROCEDURE IF EXISTS sp_ins_1;
|
||||
DROP PROCEDURE IF EXISTS sp_ins_3;
|
||||
DROP PROCEDURE IF EXISTS sp_upd;
|
||||
DROP PROCEDURE IF EXISTS sp_ins_upd;
|
||||
CREATE TABLE temp(f1 CHAR(20),f2 CHAR(25),f3 DATE,f4 INT,f5 CHAR(25),f6 INT);
|
||||
INSERT INTO temp SELECT * FROM t10;
|
||||
CREATE PROCEDURE sp_ins_1()
|
||||
BEGIN
|
||||
INSERT INTO temp VALUES ('abc', 'abc', '20051003', 100, 'uvw', 1000);
|
||||
END//
|
||||
CREATE PROCEDURE sp_ins_3()
|
||||
BEGIN
|
||||
INSERT INTO temp VALUES ('abc', 'xyz', '19490523', 100, 'uvw', 1000);
|
||||
INSERT INTO temp VALUES ('abc', 'xyz', '1989-11-09', 100, 'uvw', 1000);
|
||||
INSERT INTO temp VALUES ('abc', 'xyz', '2005-10-24', 100, 'uvw', 1000);
|
||||
END//
|
||||
CREATE PROCEDURE sp_upd()
|
||||
BEGIN
|
||||
UPDATE temp SET temp.f1 = 'updated' WHERE temp.f1 ='abc';
|
||||
END//
|
||||
CREATE PROCEDURE sp_ins_upd()
|
||||
BEGIN
|
||||
BEGIN
|
||||
INSERT INTO temp VALUES ('qwe', 'abc', '1989-11-09', 100, 'uvw', 1000);
|
||||
INSERT INTO temp VALUES ('qwe', 'xyz', '1998-03-26', 100, 'uvw', 1000);
|
||||
INSERT INTO temp VALUES ('qwe', 'abc', '2000-11-09', 100, 'uvw', 1000);
|
||||
INSERT INTO temp VALUES ('qwe', 'abc', '2005-11-07', 100, 'uvw', 1000);
|
||||
END;
|
||||
SELECT COUNT( f1 ), f1 FROM temp GROUP BY f1;
|
||||
UPDATE temp SET temp.f1 = 'updated_2' WHERE temp.f1 ='qwe' AND temp.f2 = 'abc';
|
||||
END//
|
||||
CALL sp_ins_1();
|
||||
SELECT row_count();
|
||||
row_count()
|
||||
1
|
||||
SELECT * FROM temp ORDER BY f4;
|
||||
f1 f2 f3 f4 f5 f6
|
||||
a` a` 1000-01-01 -5000 a` -5000
|
||||
aaa aaa 1000-01-02 -4999 aaa -4999
|
||||
abaa abaa 1000-01-03 -4998 abaa -4998
|
||||
acaaa acaaa 1000-01-04 -4997 acaaa -4997
|
||||
adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996
|
||||
aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995
|
||||
afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994
|
||||
agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993
|
||||
a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
|
||||
a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
|
||||
abc abc 2005-10-03 100 uvw 1000
|
||||
CALL sp_ins_3();
|
||||
SELECT row_count();
|
||||
row_count()
|
||||
1
|
||||
SELECT * FROM temp ORDER BY f4;
|
||||
f1 f2 f3 f4 f5 f6
|
||||
a` a` 1000-01-01 -5000 a` -5000
|
||||
aaa aaa 1000-01-02 -4999 aaa -4999
|
||||
abaa abaa 1000-01-03 -4998 abaa -4998
|
||||
acaaa acaaa 1000-01-04 -4997 acaaa -4997
|
||||
adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996
|
||||
aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995
|
||||
afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994
|
||||
agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993
|
||||
a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
|
||||
a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
|
||||
abc abc 2005-10-03 100 uvw 1000
|
||||
abc xyz 1949-05-23 100 uvw 1000
|
||||
abc xyz 1989-11-09 100 uvw 1000
|
||||
abc xyz 2005-10-24 100 uvw 1000
|
||||
CALL sp_upd();
|
||||
SELECT row_count();
|
||||
row_count()
|
||||
4
|
||||
SELECT * FROM temp ORDER BY f4;
|
||||
f1 f2 f3 f4 f5 f6
|
||||
a` a` 1000-01-01 -5000 a` -5000
|
||||
aaa aaa 1000-01-02 -4999 aaa -4999
|
||||
abaa abaa 1000-01-03 -4998 abaa -4998
|
||||
acaaa acaaa 1000-01-04 -4997 acaaa -4997
|
||||
adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996
|
||||
aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995
|
||||
afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994
|
||||
agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993
|
||||
a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
|
||||
a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
|
||||
updated abc 2005-10-03 100 uvw 1000
|
||||
updated xyz 1949-05-23 100 uvw 1000
|
||||
updated xyz 1989-11-09 100 uvw 1000
|
||||
updated xyz 2005-10-24 100 uvw 1000
|
||||
CALL sp_ins_upd();
|
||||
COUNT( f1 ) f1
|
||||
1 aaa
|
||||
1 abaa
|
||||
1 acaaa
|
||||
1 adaaaa
|
||||
1 aeaaaaa
|
||||
1 afaaaaaa
|
||||
1 agaaaaaaa
|
||||
1 a^aaaaaaaa
|
||||
1 a_aaaaaaaaa
|
||||
1 a`
|
||||
4 qwe
|
||||
4 updated
|
||||
SELECT row_count();
|
||||
row_count()
|
||||
3
|
||||
SELECT * FROM temp ORDER BY f4;
|
||||
f1 f2 f3 f4 f5 f6
|
||||
a` a` 1000-01-01 -5000 a` -5000
|
||||
aaa aaa 1000-01-02 -4999 aaa -4999
|
||||
abaa abaa 1000-01-03 -4998 abaa -4998
|
||||
acaaa acaaa 1000-01-04 -4997 acaaa -4997
|
||||
adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996
|
||||
aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995
|
||||
afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994
|
||||
agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993
|
||||
a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
|
||||
a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
|
||||
updated abc 2005-10-03 100 uvw 1000
|
||||
updated xyz 1949-05-23 100 uvw 1000
|
||||
updated xyz 1989-11-09 100 uvw 1000
|
||||
updated xyz 2005-10-24 100 uvw 1000
|
||||
updated_2 abc 1989-11-09 100 uvw 1000
|
||||
qwe xyz 1998-03-26 100 uvw 1000
|
||||
updated_2 abc 2000-11-09 100 uvw 1000
|
||||
updated_2 abc 2005-11-07 100 uvw 1000
|
||||
DROP PROCEDURE sp_ins_1;
|
||||
DROP PROCEDURE sp_ins_3;
|
||||
DROP PROCEDURE sp_upd;
|
||||
DROP PROCEDURE sp_ins_upd;
|
||||
DROP TABLE temp;
|
||||
|
||||
Testcase 3.1.10.8:
|
||||
------------------
|
||||
|
||||
Ensure that the mysql_affected_rows() C API function always returns the correct
|
||||
number of rows affected by the execution of a stored procedure.
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
|
||||
--------------------------------------------------------------------------------
|
||||
DROP DATABASE IF EXISTS db_storedproc;
|
||||
DROP DATABASE IF EXISTS db_storedproc_1;
|
||||
|
||||
. +++ END OF SCRIPT +++
|
||||
--------------------------------------------------------------------------------
|
360
mysql-test/suite/funcs_1/r/memory_trig_0102.result
Normal file
360
mysql-test/suite/funcs_1/r/memory_trig_0102.result
Normal file
|
@ -0,0 +1,360 @@
|
|||
SET @NO_REFRESH = IF( '' = '', 0, 1);
|
||||
USE test;
|
||||
set @@global.max_heap_table_size = 4294967295;
|
||||
set @@session.max_heap_table_size = 4294967295;
|
||||
drop table if exists tb3;
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 char(50),
|
||||
f122 char(50),
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) engine = memory;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f150' at row 1
|
||||
Note 1265 Data truncated for column 'f151' at row 1
|
||||
Note 1265 Data truncated for column 'f152' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb3.txt' into table tb3 ;
|
||||
|
||||
Testcase: 3.5.1.1:
|
||||
------------------
|
||||
use test;
|
||||
Create trigger trg1_1 BEFORE INSERT
|
||||
on tb3 for each row set @test_before = 2, new.f142 = @test_before;
|
||||
Create trigger trg1_2 AFTER INSERT
|
||||
on tb3 for each row set @test_after = 6;
|
||||
Create trigger trg1_4 BEFORE UPDATE
|
||||
on tb3 for each row set @test_before = 27,
|
||||
new.f142 = @test_before,
|
||||
new.f122 = 'Before Update Trigger';
|
||||
Create trigger trg1_3 AFTER UPDATE
|
||||
on tb3 for each row set @test_after = '15';
|
||||
Create trigger trg1_5 BEFORE DELETE on tb3 for each row
|
||||
select count(*) into @test_before from tb3 as tr_tb3
|
||||
where f121 = 'Test 3.5.1.1';
|
||||
Create trigger trg1_6 AFTER DELETE on tb3 for each row
|
||||
select count(*) into @test_after from tb3 as tr_tb3
|
||||
where f121 = 'Test 3.5.1.1';
|
||||
set @test_before = 1;
|
||||
set @test_after = 5;
|
||||
select @test_before, @test_after;
|
||||
@test_before @test_after
|
||||
1 5
|
||||
Insert into tb3 (f121, f122, f142, f144, f134)
|
||||
values ('Test 3.5.1.1', 'First Row', @test_before, @test_after, 1);
|
||||
select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1';
|
||||
f121 f122 f142 f144 f134
|
||||
Test 3.5.1.1 First Row 2 0000000005 1
|
||||
select @test_before, @test_after;
|
||||
@test_before @test_after
|
||||
2 6
|
||||
set @test_before = 18;
|
||||
set @test_after = 8;
|
||||
select @test_before, @test_after;
|
||||
@test_before @test_after
|
||||
18 8
|
||||
Update tb3 set tb3.f122 = 'Update',
|
||||
tb3.f142 = @test_before,
|
||||
tb3.f144 = @test_after
|
||||
where tb3.f121 = 'Test 3.5.1.1';
|
||||
select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1';
|
||||
f121 f122 f142 f144 f134
|
||||
Test 3.5.1.1 Before Update Trigger 27 0000000008 1
|
||||
select @test_before, @test_after;
|
||||
@test_before @test_after
|
||||
27 15
|
||||
Insert into tb3 (f121, f122, f142, f144, f134)
|
||||
values ('Test 3.5.1.1', 'Second Row', 5, 6, 2);
|
||||
set @test_before = 0;
|
||||
set @test_after = 0;
|
||||
select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1';
|
||||
f121 f122 f142 f144 f134
|
||||
Test 3.5.1.1 Before Update Trigger 27 0000000008 1
|
||||
Test 3.5.1.1 Second Row 2 0000000006 2
|
||||
select @test_before, @test_after;
|
||||
@test_before @test_after
|
||||
0 0
|
||||
Delete from tb3 where f121 = 'Test 3.5.1.1' and f134 = 2;
|
||||
select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1';
|
||||
f121 f122 f142 f144 f134
|
||||
Test 3.5.1.1 Before Update Trigger 27 0000000008 1
|
||||
select @test_before, @test_after;
|
||||
@test_before @test_after
|
||||
2 1
|
||||
drop trigger trg1_1;
|
||||
drop trigger trg1_2;
|
||||
drop trigger trg1_3;
|
||||
drop trigger trg1_4;
|
||||
drop trigger trg1_5;
|
||||
drop trigger trg1_6;
|
||||
delete from tb3 where f121='Test 3.5.1.1';
|
||||
|
||||
Testcase: 3.5.1.2:
|
||||
------------------
|
||||
Create trigger trg_1 after insert
|
||||
on tb3 for each statement set @x= 1;
|
||||
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 'statement set @x= 1' at line 2
|
||||
drop trigger trg_1;
|
||||
|
||||
Testcase 3.5.1.3:
|
||||
-----------------
|
||||
CREATE TRIGGER trg3_1 on tb3 BEFORE INSERT for each row set new.f120 = 't';
|
||||
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 'on tb3 BEFORE INSERT for each row set new.f120 = 't'' at line 1
|
||||
CREATE trg3_2 TRIGGER AFTER INSERT on tb3 for each row set new.f120 = '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 'trg3_2 TRIGGER AFTER INSERT on tb3 for each row set new.f120 = 's'' at line 1
|
||||
CREATE TRIGGER trg3_3 Before DELETE on tb3 set @ret1 = 'test' for each row;
|
||||
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 'set @ret1 = 'test' for each row' at line 1
|
||||
CREATE TRIGGER trg3_4 DELETE AFTER on tb3 set @ret1 = 'test' for each row;
|
||||
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 'DELETE AFTER on tb3 set @ret1 = 'test' for each row' at line 1
|
||||
CREATE for each row TRIGGER trg3_5 AFTER UPDATE on tb3 set @ret1 = 'test';
|
||||
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 'for each row TRIGGER trg3_5 AFTER UPDATE on tb3 set @ret1 = 'test'' at line 1
|
||||
drop trigger trg3_1;
|
||||
drop trigger trg3_2;
|
||||
drop trigger trg3_3;
|
||||
drop trigger trg3_4;
|
||||
drop trigger trg3_5;
|
||||
|
||||
Testcase: 3.5.1.5:
|
||||
------------------
|
||||
CREATE TRIGGER trg4_1 AFTER on tb3 for each row set new.f120 = 'e';
|
||||
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 'on tb3 for each row set new.f120 = 'e'' at line 1
|
||||
CREATE TRIGGER trg4_2 INSERT on tb3 for each set row new.f120 = 'f';
|
||||
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 'INSERT on tb3 for each set row new.f120 = 'f'' at line 1
|
||||
CREATE TRIGGER trg4_3 BEFORE INSERT tb3 for each row set new.f120 = 'g';
|
||||
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 'tb3 for each row set new.f120 = 'g'' at line 1
|
||||
CREATE TRIGGER trg4_4 AFTER UPDATE on tb3 for each set new.f120 = 'g';
|
||||
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 'set new.f120 = 'g'' at line 1
|
||||
CREATE trg4_5 AFTER DELETE on tb3 for each set new.f120 = 'g';
|
||||
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 'trg4_5 AFTER DELETE on tb3 for each set new.f120 = 'g'' at line 1
|
||||
CREATE TRIGGER trg4_6 BEFORE DELETE for each row set new.f120 = 'g';
|
||||
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 'for each row set new.f120 = 'g'' at line 1
|
||||
drop trigger trg4_1;
|
||||
drop trigger trg4_2;
|
||||
drop trigger trg4_3;
|
||||
drop trigger trg4_4;
|
||||
drop trigger trg4_5;
|
||||
drop trigger trg4_6;
|
||||
|
||||
Testcase 3.5.1.6: - Need to fix
|
||||
-------------------------------
|
||||
|
||||
Testcase 3.5.1.7: - need to fix
|
||||
-------------------------------
|
||||
drop table if exists t1;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 't1'
|
||||
create table t1 (f1 int, f2 char(25),f3 int) engine=memory;
|
||||
CREATE TRIGGER trg5_1 BEFORE INSERT on test.t1
|
||||
for each row set new.f3 = '14';
|
||||
CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
BEFORE UPDATE on test.t1 for each row set new.f3 = '42';
|
||||
insert into t1 (f2) values ('insert 3.5.1.7');
|
||||
select * from t1;
|
||||
f1 f2 f3
|
||||
NULL insert 3.5.1.7 14
|
||||
update t1 set f2='update 3.5.1.7';
|
||||
select * from t1;
|
||||
f1 f2 f3
|
||||
NULL update 3.5.1.7 42
|
||||
select trigger_name from information_schema.triggers order by trigger_name;
|
||||
trigger_name
|
||||
trg5_1
|
||||
trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX
|
||||
drop trigger trg5_1;
|
||||
drop trigger trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ;
|
||||
drop table t1;
|
||||
|
||||
Testcase 3.5.1.8:
|
||||
-----------------
|
||||
CREATE TRIGGER trg12* before insert on tb3 for each row set new.f120 = 't';
|
||||
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 '* before insert on tb3 for each row set new.f120 = 't'' at line 1
|
||||
CREATE TRIGGER trigger before insert on tb3 for each row set new.f120 = 't';
|
||||
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 'trigger before insert on tb3 for each row set new.f120 = 't'' at line 1
|
||||
CREATE TRIGGER 100 before insert on tb3 for each row set new.f120 = 't';
|
||||
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 '100 before insert on tb3 for each row set new.f120 = 't'' at line 1
|
||||
CREATE TRIGGER @@view before insert on tb3 for each row set new.f120 = 't';
|
||||
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 '@@view before insert on tb3 for each row set new.f120 = 't'' at line 1
|
||||
CREATE TRIGGER @name before insert on tb3 for each row set new.f120 = 't';
|
||||
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 '@name before insert on tb3 for each row set new.f120 = 't'' at line 1
|
||||
CREATE TRIGGER tb3.trg6_1 BEFORE INSERT on test.tb3
|
||||
for each row set new.f120 ='X';
|
||||
ERROR HY000: Trigger in wrong schema
|
||||
drop database if exists trig_db;
|
||||
create database trig_db;
|
||||
use trig_db;
|
||||
create table t1 (f1 integer) engine = memory;
|
||||
use test;
|
||||
CREATE TRIGGER trig_db.trg6_2 AFTER INSERT on tb3
|
||||
for each row set @ret_trg6_2 = 5;
|
||||
ERROR HY000: Trigger in wrong schema
|
||||
use trig_db;
|
||||
CREATE TRIGGER trg6_3 AFTER INSERT on test.tb3
|
||||
for each row set @ret_trg6_3 = 18;
|
||||
ERROR HY000: Trigger in wrong schema
|
||||
use test;
|
||||
drop database trig_db;
|
||||
drop trigger trg6_1;
|
||||
drop trigger trg6_3;
|
||||
|
||||
Testcase 3.5.1.9:(cannot be inplemented at this point)
|
||||
------------------------------------------------------
|
||||
|
||||
Testcase 3.5.1.10:
|
||||
------------------
|
||||
CREATE TRIGGER trg7_1 BEFORE UPDATE on tb3 for each row set new.f120 ='X';
|
||||
CREATE TRIGGER trg7_1 AFTER INSERT on tb3 for each row set @x ='Y';
|
||||
ERROR HY000: Trigger already exists
|
||||
drop trigger trg7_1;
|
||||
|
||||
Testcase 3.5.1.?:
|
||||
-----------------
|
||||
drop table if exists t1;
|
||||
drop table if exists t2;
|
||||
create table t1 (f1 char(50), f2 integer) engine = memory;
|
||||
create table t2 (f1 char(50), f2 integer) engine = memory;
|
||||
create trigger trig before insert on t1
|
||||
for each row set new.f1 ='trig t1';
|
||||
create trigger trig before update on t2
|
||||
for each row set new.f1 ='trig t2';
|
||||
ERROR HY000: Trigger already exists
|
||||
insert into t1 value ('insert to t1',1);
|
||||
select * from t1;
|
||||
f1 f2
|
||||
trig t1 1
|
||||
update t1 set f1='update to t1';
|
||||
select * from t1;
|
||||
f1 f2
|
||||
update to t1 1
|
||||
insert into t2 value ('insert to t2',2);
|
||||
update t2 set f1='update to t1';
|
||||
select * from t2;
|
||||
f1 f2
|
||||
update to t1 2
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
drop trigger trig;
|
||||
|
||||
Testcase 3.5.1.11:
|
||||
------------------
|
||||
drop database if exists trig_db1;
|
||||
drop database if exists trig_db2;
|
||||
drop database if exists trig_db3;
|
||||
create database trig_db1;
|
||||
create database trig_db2;
|
||||
create database trig_db3;
|
||||
use trig_db1;
|
||||
create table t1 (f1 char(50), f2 integer) engine = memory;
|
||||
create trigger trig before insert on t1
|
||||
for each row set new.f1 ='trig1', @test_var1='trig1';
|
||||
use trig_db2;
|
||||
create table t2 (f1 char(50), f2 integer) engine = memory;
|
||||
create trigger trig before insert on t2
|
||||
for each row set new.f1 ='trig2', @test_var2='trig2';
|
||||
use trig_db3;
|
||||
create table t1 (f1 char(50), f2 integer) engine = memory;
|
||||
create trigger trig before insert on t1
|
||||
for each row set new.f1 ='trig3', @test_var3='trig3';
|
||||
set @test_var1= '', @test_var2= '', @test_var3= '';
|
||||
use trig_db1;
|
||||
insert into t1 (f1,f2) values ('insert to db1 t1',1);
|
||||
insert into trig_db1.t1 (f1,f2) values ('insert to db1 t1 from db1',2);
|
||||
insert into trig_db2.t2 (f1,f2) values ('insert to db2 t2 from db1',3);
|
||||
insert into trig_db3.t1 (f1,f2) values ('insert to db3 t1 from db1',4);
|
||||
select @test_var1, @test_var2, @test_var3;
|
||||
@test_var1 @test_var2 @test_var3
|
||||
trig1 trig2 trig3
|
||||
select * from t1 order by f2;
|
||||
f1 f2
|
||||
trig1 1
|
||||
trig1 2
|
||||
select * from trig_db2.t2;
|
||||
f1 f2
|
||||
trig2 3
|
||||
select * from trig_db3.t1;
|
||||
f1 f2
|
||||
trig3 4
|
||||
select * from t1 order by f2;
|
||||
f1 f2
|
||||
trig1 1
|
||||
trig1 2
|
||||
use test;
|
||||
drop database trig_db1;
|
||||
drop database trig_db2;
|
||||
drop database trig_db3;
|
||||
|
||||
Testcase 3.5.2.1/2/3:
|
||||
---------------------
|
||||
drop database if exists trig_db1;
|
||||
drop database if exists trig_db2;
|
||||
create database trig_db1;
|
||||
create database trig_db2;
|
||||
use trig_db1;
|
||||
create table t1 (f1 char(50), f2 integer) engine = memory;
|
||||
create table trig_db2.t1 (f1 char(50), f2 integer) engine = memory;
|
||||
create trigger trig1_b before insert on t1
|
||||
for each row set @test_var1='trig1_b';
|
||||
create trigger trig_db1.trig1_a after insert on t1
|
||||
for each row set @test_var2='trig1_a';
|
||||
create trigger trig_db2.trig2 before insert on trig_db2.t1
|
||||
for each row set @test_var3='trig2';
|
||||
select trigger_schema, trigger_name, event_object_table
|
||||
from information_schema.triggers order by trigger_name;
|
||||
trigger_schema trigger_name event_object_table
|
||||
trig_db1 trig1_a t1
|
||||
trig_db1 trig1_b t1
|
||||
trig_db2 trig2 t1
|
||||
set @test_var1= '', @test_var2= '', @test_var3= '';
|
||||
insert into t1 (f1,f2) values ('insert to db1 t1 from db1',352);
|
||||
insert into trig_db2.t1 (f1,f2) values ('insert to db2 t1 from db1',352);
|
||||
select @test_var1, @test_var2, @test_var3;
|
||||
@test_var1 @test_var2 @test_var3
|
||||
trig1_b trig1_a trig2
|
||||
drop database trig_db1;
|
||||
drop database trig_db2;
|
712
mysql-test/suite/funcs_1/r/memory_trig_03.result
Normal file
712
mysql-test/suite/funcs_1/r/memory_trig_03.result
Normal file
|
@ -0,0 +1,712 @@
|
|||
SET @NO_REFRESH = IF( '' = '', 0, 1);
|
||||
USE test;
|
||||
set @@global.max_heap_table_size = 4294967295;
|
||||
set @@session.max_heap_table_size = 4294967295;
|
||||
drop table if exists tb3;
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 char(50),
|
||||
f122 char(50),
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) engine = memory;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f150' at row 1
|
||||
Note 1265 Data truncated for column 'f151' at row 1
|
||||
Note 1265 Data truncated for column 'f152' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb3.txt' into table tb3 ;
|
||||
|
||||
Testcase 3.5.3:
|
||||
---------------
|
||||
drop database if exists priv_db;
|
||||
create database priv_db;
|
||||
use priv_db;
|
||||
create table t1 (f1 char(20)) engine= memory;
|
||||
create User test_noprivs@localhost;
|
||||
set password for test_noprivs@localhost = password('PWD');
|
||||
create User test_yesprivs@localhost;
|
||||
set password for test_yesprivs@localhost = password('PWD');
|
||||
|
||||
Testcase 3.5.3.2/6:
|
||||
-------------------
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
|
||||
grant ALL on *.* to test_noprivs@localhost;
|
||||
revoke TRIGGER on *.* from test_noprivs@localhost;
|
||||
show grants for test_noprivs@localhost;
|
||||
Grants for test_noprivs@localhost
|
||||
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
|
||||
grant TRIGGER on *.* to test_yesprivs@localhost;
|
||||
grant SELECT on priv_db.t1 to test_yesprivs@localhost;
|
||||
show grants for test_yesprivs@localhost;
|
||||
Grants for test_yesprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
|
||||
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
|
||||
Testcase 3.5.3.2:
|
||||
-----------------
|
||||
select current_user;
|
||||
current_user
|
||||
test_noprivs@localhost
|
||||
use priv_db;
|
||||
create trigger trg1_1 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.2_1-no';
|
||||
Got one of the listed errors
|
||||
use priv_db;
|
||||
insert into t1 (f1) values ('insert 3.5.3.2-no');
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
select current_user;
|
||||
current_user
|
||||
test_yesprivs@localhost
|
||||
use priv_db;
|
||||
create trigger trg1_2 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.2_2-yes';
|
||||
select current_user;
|
||||
current_user
|
||||
root@localhost
|
||||
use priv_db;
|
||||
insert into t1 (f1) values ('insert 3.5.3.2-yes');
|
||||
ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for column 'f1' in table 't1'
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
grant UPDATE on priv_db.t1 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values ('insert 3.5.3.2-yes');
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
|
||||
Testcase 3.5.3.6:
|
||||
-----------------
|
||||
use priv_db;
|
||||
drop trigger trg1_2;
|
||||
Got one of the listed errors
|
||||
use priv_db;
|
||||
insert into t1 (f1) values ('insert 3.5.3.6-yes');
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
use priv_db;
|
||||
drop trigger trg1_2;
|
||||
use priv_db;
|
||||
insert into t1 (f1) values ('insert 3.5.3.6-no');
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
insert 3.5.3.6-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
drop trigger trg1_2;
|
||||
|
||||
Testcase 3.5.3.7a:
|
||||
------------------
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
|
||||
grant ALL on *.* to test_noprivs@localhost;
|
||||
revoke UPDATE on *.* from test_noprivs@localhost;
|
||||
show grants for test_noprivs@localhost;
|
||||
Grants for test_noprivs@localhost
|
||||
GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
|
||||
grant TRIGGER, UPDATE on *.* to test_yesprivs@localhost;
|
||||
show grants for test_yesprivs@localhost;
|
||||
Grants for test_yesprivs@localhost
|
||||
GRANT UPDATE, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
select current_user;
|
||||
current_user
|
||||
test_noprivs@localhost
|
||||
use priv_db;
|
||||
show grants;
|
||||
Grants for test_noprivs@localhost
|
||||
GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
insert 3.5.3.6-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
|
||||
Trigger create disabled - should fail - Bug 8884
|
||||
------------------------------------------------
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-1a');
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
drop trigger trg4a_1;
|
||||
use priv_db;
|
||||
select current_user;
|
||||
current_user
|
||||
test_yesprivs@localhost
|
||||
show grants;
|
||||
Grants for test_yesprivs@localhost
|
||||
GRANT UPDATE, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
create trigger trg4a_2 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.7-2a';
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-2b');
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
drop trigger trg4a_2;
|
||||
|
||||
Testcase 3.5.3.7b:
|
||||
------------------
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
|
||||
grant TRIGGER on *.* to test_noprivs;
|
||||
grant ALL on priv_db.* to test_noprivs@localhost;
|
||||
revoke UPDATE on priv_db.* from test_noprivs@localhost;
|
||||
show grants for test_noprivs;
|
||||
Grants for test_noprivs@%
|
||||
GRANT TRIGGER ON *.* TO 'test_noprivs'@'%'
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
|
||||
grant TRIGGER on *.* to test_yesprivs@localhost;
|
||||
grant UPDATE on priv_db.* to test_yesprivs@localhost;
|
||||
show grants for test_yesprivs@localhost;
|
||||
Grants for test_yesprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost'
|
||||
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
show grants;
|
||||
Grants for test_noprivs@localhost
|
||||
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `priv_db`.* TO 'test_noprivs'@'localhost'
|
||||
use priv_db;
|
||||
|
||||
Trigger create disabled - should fail - Bug 8884
|
||||
------------------------------------------------
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-1b');
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
insert 3.5.3.7-1b
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
update t1 set f1 = 'update 3.5.3.7-1b' where f1 = 'insert 3.5.3.7-1b';
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
update 3.5.3.7-1b
|
||||
drop trigger trg4b_1;
|
||||
show grants;
|
||||
Grants for test_yesprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost'
|
||||
use priv_db;
|
||||
create trigger trg4b_2 before UPDATE on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.7-2b';
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-2b');
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
insert 3.5.3.7-2b
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
update 3.5.3.7-1b
|
||||
update t1 set f1 = 'update 3.5.3.7-2b' where f1 = 'insert 3.5.3.7-2b';
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
trig 3.5.3.7-2b
|
||||
update 3.5.3.7-1b
|
||||
drop trigger trg4b_2;
|
||||
|
||||
Testcase 3.5.3.7c
|
||||
-----------------
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
|
||||
grant TRIGGER on *.* to test_noprivs@localhost;
|
||||
grant ALL on priv_db.t1 to test_noprivs@localhost;
|
||||
revoke UPDATE on priv_db.t1 from test_noprivs@localhost;
|
||||
show grants for test_noprivs;
|
||||
Grants for test_noprivs@%
|
||||
GRANT TRIGGER ON *.* TO 'test_noprivs'@'%'
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
|
||||
grant TRIGGER on *.* to test_yesprivs@localhost;
|
||||
grant UPDATE on priv_db.t1 to test_yesprivs@localhost;
|
||||
show grants for test_yesprivs@localhost;
|
||||
Grants for test_yesprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
|
||||
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
show grants;
|
||||
Grants for test_noprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
|
||||
use priv_db;
|
||||
|
||||
Trigger create disabled - should fail - Bug 8884
|
||||
------------------------------------------------
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-1c');
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
insert 3.5.3.7-1c
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
trig 3.5.3.7-2b
|
||||
update 3.5.3.7-1b
|
||||
drop trigger trg4c_1;
|
||||
show grants;
|
||||
Grants for test_yesprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
|
||||
use priv_db;
|
||||
create trigger trg4c_2 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.7-2c';
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-2c');
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
insert 3.5.3.7-1c
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
trig 3.5.3.7-2b
|
||||
trig 3.5.3.7-2c
|
||||
update 3.5.3.7-1b
|
||||
drop trigger trg4c_2;
|
||||
|
||||
Testcase 3.5.3.7d:
|
||||
------------------
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
|
||||
grant TRIGGER on *.* to test_noprivs@localhost;
|
||||
grant SELECT (f1), INSERT (f1) on priv_db.t1 to test_noprivs@localhost;
|
||||
show grants for test_noprivs;
|
||||
Grants for test_noprivs@%
|
||||
GRANT TRIGGER ON *.* TO 'test_noprivs'@'%'
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
|
||||
grant TRIGGER on *.* to test_yesprivs@localhost;
|
||||
grant UPDATE (f1) on priv_db.t1 to test_yesprivs@localhost;
|
||||
show grants for test_noprivs;
|
||||
Grants for test_noprivs@%
|
||||
GRANT TRIGGER ON *.* TO 'test_noprivs'@'%'
|
||||
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
show grants;
|
||||
Grants for test_noprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT SELECT (f1), INSERT (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
|
||||
use priv_db;
|
||||
|
||||
Trigger create disabled - should fail - Bug 8884
|
||||
------------------------------------------------
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-1d');
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
insert 3.5.3.7-1c
|
||||
insert 3.5.3.7-1d
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
trig 3.5.3.7-2b
|
||||
trig 3.5.3.7-2c
|
||||
update 3.5.3.7-1b
|
||||
drop trigger trg4d_1;
|
||||
show grants;
|
||||
Grants for test_yesprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT UPDATE (f1) ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
|
||||
use priv_db;
|
||||
create trigger trg4d_2 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.7-2d';
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-2d');
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
insert 3.5.3.7-1c
|
||||
insert 3.5.3.7-1d
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
trig 3.5.3.7-2b
|
||||
trig 3.5.3.7-2c
|
||||
trig 3.5.3.7-2d
|
||||
update 3.5.3.7-1b
|
||||
drop trigger trg4d_2;
|
||||
|
||||
Testcase 3.5.3.8a:
|
||||
------------------
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
|
||||
grant ALL on *.* to test_noprivs@localhost;
|
||||
revoke SELECT on *.* from test_noprivs@localhost;
|
||||
show grants for test_noprivs@localhost;
|
||||
Grants for test_noprivs@localhost
|
||||
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
|
||||
grant TRIGGER, SELECT on *.* to test_yesprivs@localhost;
|
||||
show grants for test_yesprivs@localhost;
|
||||
Grants for test_yesprivs@localhost
|
||||
GRANT SELECT, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
select current_user;
|
||||
current_user
|
||||
test_noprivs@localhost
|
||||
use priv_db;
|
||||
show grants;
|
||||
Grants for test_noprivs@localhost
|
||||
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
|
||||
Trigger create disabled - should fail - Bug 8887
|
||||
------------------------------------------------
|
||||
set @test_var = 'before trig 3.5.3.8-1a';
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-1a
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-1a');
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-1a
|
||||
drop trigger trg5a_1;
|
||||
use priv_db;
|
||||
select current_user;
|
||||
current_user
|
||||
test_yesprivs@localhost
|
||||
show grants;
|
||||
Grants for test_yesprivs@localhost
|
||||
GRANT SELECT, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
create trigger trg5a_2 before INSERT on t1 for each row
|
||||
set @test_var= new.f1;
|
||||
set @test_var= 'before trig 3.5.3.8-2a';
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-2a
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-2a');
|
||||
select @test_var;
|
||||
@test_var
|
||||
insert 3.5.3.8-2a
|
||||
drop trigger trg5a_2;
|
||||
|
||||
Testcase: 3.5.3.8b
|
||||
------------------
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
|
||||
grant TRIGGER on *.* to test_noprivs@localhost;
|
||||
grant ALL on priv_db.* to test_noprivs@localhost;
|
||||
revoke SELECT on priv_db.* from test_noprivs@localhost;
|
||||
show grants for test_noprivs@localhost;
|
||||
Grants for test_noprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `priv_db`.* TO 'test_noprivs'@'localhost'
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
|
||||
grant TRIGGER on *.* to test_yesprivs@localhost;
|
||||
grant SELECT on priv_db.* to test_yesprivs@localhost;
|
||||
show grants for test_yesprivs@localhost;
|
||||
Grants for test_yesprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost'
|
||||
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
show grants;
|
||||
Grants for test_noprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `priv_db`.* TO 'test_noprivs'@'localhost'
|
||||
use priv_db;
|
||||
|
||||
Trigger create disabled - should fail - Bug 8887
|
||||
------------------------------------------------
|
||||
set @test_var= 'before trig 3.5.3.8-1b';
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-1b');
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-1b
|
||||
update t1 set f1= 'update 3.5.3.8-1b' where f1 = 'insert 3.5.3.8-1b';
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-1b
|
||||
drop trigger trg5b_1;
|
||||
show grants;
|
||||
Grants for test_yesprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost'
|
||||
use priv_db;
|
||||
create trigger trg5b_2 before UPDATE on t1 for each row
|
||||
set @test_var= new.f1;
|
||||
set @test_var= 'before trig 3.5.3.8-2b';
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-2b');
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-2b
|
||||
update t1 set f1= 'update 3.5.3.8-2b' where f1 = 'insert 3.5.3.8-2b';
|
||||
select @test_var;
|
||||
@test_var
|
||||
update 3.5.3.8-2b
|
||||
drop trigger trg5b_2;
|
||||
|
||||
Testcase 3.5.3.8c:
|
||||
------------------
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
|
||||
grant TRIGGER on *.* to test_noprivs@localhost;
|
||||
grant ALL on priv_db.t1 to test_noprivs@localhost;
|
||||
revoke SELECT on priv_db.t1 from test_noprivs@localhost;
|
||||
show grants for test_noprivs@localhost;
|
||||
Grants for test_noprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
|
||||
grant TRIGGER on *.* to test_yesprivs@localhost;
|
||||
grant SELECT on priv_db.t1 to test_yesprivs@localhost;
|
||||
show grants for test_yesprivs@localhost;
|
||||
Grants for test_yesprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
|
||||
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
show grants;
|
||||
Grants for test_noprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
|
||||
use priv_db;
|
||||
|
||||
Trigger create disabled - should fail - Bug 8887
|
||||
------------------------------------------------
|
||||
set @test_var= 'before trig 3.5.3.8-1c';
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-1c');
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-1c
|
||||
drop trigger trg5c_1;
|
||||
show grants;
|
||||
Grants for test_yesprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
|
||||
use priv_db;
|
||||
create trigger trg5c_2 before INSERT on t1 for each row
|
||||
set @test_var= new.f1;
|
||||
set @test_var='before trig 3.5.3.8-2c';
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-2c');
|
||||
select @test_var;
|
||||
@test_var
|
||||
insert 3.5.3.8-2c
|
||||
drop trigger trg5c_2;
|
||||
|
||||
Testcase: 3.5.3.8d:
|
||||
-------------------
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
|
||||
grant TRIGGER on *.* to test_noprivs@localhost;
|
||||
grant UPDATE (f1), INSERT (f1) on priv_db.t1 to test_noprivs@localhost;
|
||||
show grants for test_noprivs@localhost;
|
||||
Grants for test_noprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
|
||||
grant TRIGGER on *.* to test_yesprivs@localhost;
|
||||
grant SELECT (f1) on priv_db.t1 to test_yesprivs@localhost;
|
||||
show grants for test_noprivs@localhost;
|
||||
Grants for test_noprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
|
||||
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
show grants;
|
||||
Grants for test_noprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
|
||||
use priv_db;
|
||||
|
||||
Trigger create disabled - should fail - Bug 8887
|
||||
------------------------------------------------
|
||||
set @test_var='before trig 3.5.3.8-1d';
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-1d');
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-1d
|
||||
drop trigger trg5d_1;
|
||||
show grants;
|
||||
Grants for test_yesprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT SELECT (f1) ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
|
||||
use priv_db;
|
||||
create trigger trg5d_2 before INSERT on t1 for each row
|
||||
set @test_var= new.f1;
|
||||
set @test_var='before trig 3.5.3.8-2d';
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-2d');
|
||||
select @test_var;
|
||||
@test_var
|
||||
insert 3.5.3.8-2d
|
||||
drop trigger trg5d_2;
|
||||
|
||||
Testcase: 3.5.3.x:
|
||||
------------------
|
||||
use priv_db;
|
||||
drop table if exists t1;
|
||||
drop table if exists t2;
|
||||
create table t1 (f1 int) engine= memory;
|
||||
create table t2 (f2 int) engine= memory;
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
|
||||
grant TRIGGER on *.* to test_yesprivs@localhost;
|
||||
grant SELECT, UPDATE on priv_db.t1 to test_yesprivs@localhost;
|
||||
grant SELECT on priv_db.t2 to test_yesprivs@localhost;
|
||||
show grants for test_yesprivs@localhost;
|
||||
Grants for test_yesprivs@localhost
|
||||
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT SELECT ON `priv_db`.`t2` TO 'test_yesprivs'@'localhost'
|
||||
GRANT SELECT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
|
||||
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
select current_user;
|
||||
current_user
|
||||
test_yesprivs@localhost
|
||||
use priv_db;
|
||||
create trigger trg1 before insert on t1 for each row
|
||||
insert into t2 values (new.f1);
|
||||
use priv_db;
|
||||
insert into t1 (f1) values (4);
|
||||
ERROR 42000: INSERT command denied to user 'test_yesprivs'@'localhost' for table 't2'
|
||||
revoke SELECT on priv_db.t2 from test_yesprivs@localhost;
|
||||
grant INSERT on priv_db.t2 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values (4);
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
4
|
||||
select f2 from t2 order by f2;
|
||||
f2
|
||||
4
|
||||
use priv_db;
|
||||
drop trigger trg1;
|
||||
create trigger trg2 before insert on t1 for each row
|
||||
update t2 set f2=new.f1-1;
|
||||
use priv_db;
|
||||
insert into t1 (f1) values (2);
|
||||
ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for table 't2'
|
||||
revoke INSERT on priv_db.t2 from test_yesprivs@localhost;
|
||||
grant UPDATE on priv_db.t2 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values (2);
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
2
|
||||
4
|
||||
select f2 from t2 order by f2;
|
||||
f2
|
||||
1
|
||||
use priv_db;
|
||||
drop trigger trg2;
|
||||
create trigger trg3 before insert on t1 for each row
|
||||
select f2 into @aaa from t2 where f2=new.f1;
|
||||
use priv_db;
|
||||
insert into t1 (f1) values (1);
|
||||
ERROR 42000: SELECT command denied to user 'test_yesprivs'@'localhost' for table 't2'
|
||||
revoke UPDATE on priv_db.t2 from test_yesprivs@localhost;
|
||||
grant SELECT on priv_db.t2 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values (1);
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
1
|
||||
2
|
||||
4
|
||||
select f2 from t2 order by f2;
|
||||
f2
|
||||
1
|
||||
select @aaa;
|
||||
@aaa
|
||||
1
|
||||
use priv_db;
|
||||
drop trigger trg3;
|
||||
create trigger trg4 before insert on t1 for each row
|
||||
delete from t2;
|
||||
use priv_db;
|
||||
insert into t1 (f1) values (1);
|
||||
ERROR 42000: DELETE command denied to user 'test_yesprivs'@'localhost' for table 't2'
|
||||
revoke SELECT on priv_db.t2 from test_yesprivs@localhost;
|
||||
grant DELETE on priv_db.t2 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values (1);
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
1
|
||||
1
|
||||
2
|
||||
4
|
||||
select f2 from t2 order by f2;
|
||||
f2
|
||||
drop database if exists priv_db;
|
||||
drop user test_yesprivs@localhost;
|
||||
drop user test_noprivs@localhost;
|
||||
drop user test_noprivs;
|
1582
mysql-test/suite/funcs_1/r/memory_trig_03e.result
Normal file
1582
mysql-test/suite/funcs_1/r/memory_trig_03e.result
Normal file
File diff suppressed because it is too large
Load diff
476
mysql-test/suite/funcs_1/r/memory_trig_0407.result
Normal file
476
mysql-test/suite/funcs_1/r/memory_trig_0407.result
Normal file
|
@ -0,0 +1,476 @@
|
|||
SET @NO_REFRESH = IF( '' = '', 0, 1);
|
||||
USE test;
|
||||
set @@global.max_heap_table_size = 4294967295;
|
||||
set @@session.max_heap_table_size = 4294967295;
|
||||
drop table if exists tb3;
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 char(50),
|
||||
f122 char(50),
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) engine = memory;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f150' at row 1
|
||||
Note 1265 Data truncated for column 'f151' at row 1
|
||||
Note 1265 Data truncated for column 'f152' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb3.txt' into table tb3 ;
|
||||
|
||||
Testcase: 3.5:
|
||||
--------------
|
||||
create User test_general@localhost;
|
||||
set password for test_general@localhost = password('PWD');
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost;
|
||||
create User test_super@localhost;
|
||||
set password for test_super@localhost = password('PWD');
|
||||
grant ALL on *.* to test_super@localhost with grant OPTION;
|
||||
connect(localhost,test_general,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
connect(localhost,test_super,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
|
||||
Testcase 3.5.4:
|
||||
---------------
|
||||
use test;
|
||||
|
||||
Testcase 3.5.4.1:
|
||||
-----------------
|
||||
create database db_drop;
|
||||
Use db_drop;
|
||||
create table t1 (f1 char(30)) engine=memory;
|
||||
grant INSERT, SELECT on db_drop.t1 to test_general;
|
||||
Use db_drop;
|
||||
Create trigger trg1 BEFORE INSERT on t1
|
||||
for each row set new.f1='Trigger 3.5.4.1';
|
||||
Use db_drop;
|
||||
Insert into t1 values ('Insert error 3.5.4.1');
|
||||
Select * from t1 order by f1;
|
||||
f1
|
||||
Trigger 3.5.4.1
|
||||
drop trigger trg1;
|
||||
select trigger_schema, trigger_name, event_object_table
|
||||
from information_schema.triggers order by trigger_name;
|
||||
trigger_schema trigger_name event_object_table
|
||||
Insert into t1 values ('Insert no trigger 3.5.4.1');
|
||||
Select * from t1 order by f1;
|
||||
f1
|
||||
Insert no trigger 3.5.4.1
|
||||
Trigger 3.5.4.1
|
||||
drop trigger trg1;
|
||||
drop database if exists db_drop;
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost';
|
||||
|
||||
Testcase 3.5.4.2:
|
||||
-----------------
|
||||
create database db_drop2;
|
||||
Use db_drop2;
|
||||
drop table if exists t1_432 ;
|
||||
create table t1_432 (f1 char (30)) engine=memory;
|
||||
Drop trigger tr_does_not_exit;
|
||||
ERROR HY000: Trigger does not exist
|
||||
drop table if exists t1_432 ;
|
||||
drop database if exists db_drop2;
|
||||
|
||||
Testcase 3.5.4.3:
|
||||
-----------------
|
||||
create database db_drop3;
|
||||
Use db_drop3;
|
||||
drop table if exists t1_433 ;
|
||||
drop table if exists t1_433a ;
|
||||
create table t1_433 (f1 char (30)) engine=memory;
|
||||
create table t1_433a (f1a char (5)) engine=memory;
|
||||
CREATE TRIGGER trg3 BEFORE INSERT on t1_433 for each row
|
||||
set new.f1 = 'Trigger 3.5.4.3';
|
||||
Drop trigger t1.433.trg3;
|
||||
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 '.trg3' at line 1
|
||||
Drop trigger db_drop3.t1.433.trg3;
|
||||
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 '.433.trg3' at line 1
|
||||
Drop trigger mysql.trg3;
|
||||
ERROR HY000: Trigger does not exist
|
||||
Drop trigger tbx.trg3;
|
||||
ERROR HY000: Trigger does not exist
|
||||
Drop trigger db_drop3.trg3;
|
||||
drop table if exists t1_433;
|
||||
drop table if exists t1_433a;
|
||||
drop database if exists db_drop3;
|
||||
|
||||
Testcase 3.5.4.4:
|
||||
-----------------
|
||||
create database db_drop4;
|
||||
Use db_drop4;
|
||||
create table t1 (f1 char(30)) engine=memory;
|
||||
grant INSERT, SELECT on db_drop4.t1 to test_general;
|
||||
Create trigger trg4 BEFORE INSERT on t1
|
||||
for each row set new.f1='Trigger 3.5.4.4';
|
||||
Use db_drop4;
|
||||
Insert into t1 values ('Insert 3.5.4.4');
|
||||
Select * from t1;
|
||||
f1
|
||||
Trigger 3.5.4.4
|
||||
Drop database db_drop4;
|
||||
Show databases;
|
||||
Database
|
||||
information_schema
|
||||
mysql
|
||||
test
|
||||
select trigger_schema, trigger_name, event_object_table
|
||||
from information_schema.triggers
|
||||
where information_schema.triggers.trigger_name='trg4';
|
||||
trigger_schema trigger_name event_object_table
|
||||
create database db_drop4;
|
||||
Use db_drop4;
|
||||
create table t1 (f1 char(30)) engine=memory;
|
||||
grant INSERT, SELECT on db_drop4.t1 to test_general;
|
||||
Insert into t1 values ('2nd Insert 3.5.4.4');
|
||||
Select * from t1;
|
||||
f1
|
||||
2nd Insert 3.5.4.4
|
||||
drop trigger trg4;
|
||||
ERROR HY000: Trigger does not exist
|
||||
drop database if exists db_drop4;
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost';
|
||||
|
||||
Testcase 3.5.4.5:
|
||||
-----------------
|
||||
create database db_drop5;
|
||||
Use db_drop5;
|
||||
create table t1 (f1 char(50)) engine=memory;
|
||||
grant INSERT, SELECT on t1 to test_general;
|
||||
Create trigger trg5 BEFORE INSERT on t1
|
||||
for each row set new.f1='Trigger 3.5.4.5';
|
||||
Use db_drop5;
|
||||
Insert into t1 values ('Insert 3.5.4.5');
|
||||
Select * from t1;
|
||||
f1
|
||||
Trigger 3.5.4.5
|
||||
Drop table t1;
|
||||
Show tables;
|
||||
Tables_in_db_drop5
|
||||
select trigger_schema, trigger_name, event_object_table
|
||||
from information_schema.triggers
|
||||
where information_schema.triggers.trigger_name='trg5';
|
||||
trigger_schema trigger_name event_object_table
|
||||
create table t1 (f1 char(50)) engine=memory;
|
||||
grant INSERT, SELECT on t1 to test_general;
|
||||
Insert into t1 values ('2nd Insert 3.5.4.5');
|
||||
Select * from t1;
|
||||
f1
|
||||
2nd Insert 3.5.4.5
|
||||
drop trigger trg5;
|
||||
ERROR HY000: Trigger does not exist
|
||||
drop database if exists db_drop5;
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost';
|
||||
|
||||
Testcase 3.5.5:
|
||||
---------------
|
||||
use test;
|
||||
|
||||
Testcase 3.5.5.1:
|
||||
-----------------
|
||||
Create trigger trg1 before INSERT on t100 for each row set new.f2=1000;
|
||||
ERROR 42S02: Table 'test.t100' doesn't exist
|
||||
|
||||
Testcase 3.5.5.2:
|
||||
-----------------
|
||||
Create temporary table t1_temp (f1 bigint signed, f2 bigint unsigned);
|
||||
Create trigger trg2 before INSERT
|
||||
on t1_temp for each row set new.f2=9999;
|
||||
ERROR HY000: Trigger's 't1_temp' is view or temporary table
|
||||
drop table t1_temp;
|
||||
|
||||
Testcase 3.5.5.3:
|
||||
-----------------
|
||||
Create view vw3 as select f118 from tb3;
|
||||
Create trigger trg3 before INSERT
|
||||
on vw3 for each row set new.f118='s';
|
||||
ERROR HY000: 'test.vw3' is not BASE TABLE
|
||||
drop view vw3;
|
||||
|
||||
Testcase 3.5.5.4:
|
||||
-----------------
|
||||
create database dbtest_one;
|
||||
create database dbtest_two;
|
||||
use dbtest_two;
|
||||
create table t2 (f1 char(15)) engine=memory;
|
||||
use dbtest_one;
|
||||
create trigger trg4 before INSERT
|
||||
on dbtest_two.t2 for each row set new.f1='trig 3.5.5.4';
|
||||
ERROR HY000: Trigger in wrong schema
|
||||
grant INSERT, SELECT on dbtest_two.t2 to test_general;
|
||||
grant SELECT on dbtest_one.* to test_general;
|
||||
use dbtest_two;
|
||||
Insert into t2 values ('1st Insert 3.5.5.4');
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f1' at row 1
|
||||
Select * from t2;
|
||||
f1
|
||||
1st Insert 3.5.
|
||||
use dbtest_one;
|
||||
Insert into dbtest_two.t2 values ('2nd Insert 3.5.5.4');
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f1' at row 1
|
||||
Select * from dbtest_two.t2 order by f1;
|
||||
f1
|
||||
1st Insert 3.5.
|
||||
2nd Insert 3.5.
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost';
|
||||
DROP DATABASE if exists dbtest_one;
|
||||
drop database if EXISTS dbtest_two;
|
||||
|
||||
Testcase 3.5.6:
|
||||
---------------
|
||||
use test;
|
||||
|
||||
Testcase 3.5.6.1 (see Testcase 3.5.1.1)
|
||||
---------------------------------------
|
||||
|
||||
Testcase 3.5.6.2 (see Testcase 3.5.1.1)
|
||||
---------------------------------------
|
||||
|
||||
Testcase 3.5.6.3:
|
||||
-----------------
|
||||
Create trigger trg3_1 DURING UPDATE on tb3 for each row set new.f132=25;
|
||||
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 'DURING UPDATE on tb3 for each row set new.f132=25' at line 1
|
||||
Create trigger trg3_2 TIME INSERT on tb3 for each row set new.f132=15;
|
||||
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 'TIME INSERT on tb3 for each row set new.f132=15' at line 1
|
||||
drop trigger tb3.trg3_1;
|
||||
drop trigger tb3.trg3_2;
|
||||
|
||||
Testcase 3.5.6.4 (see Testcase 3.5.1.1)
|
||||
---------------------------------------
|
||||
|
||||
Testcase 3.5.6.5 (see Testcase 3.5.1.1)
|
||||
---------------------------------------
|
||||
|
||||
Testcase 3.5.7.1 (see Testcase 3.5.1.1)
|
||||
---------------------------------------
|
||||
|
||||
Testcase 3.5.7.2 (see Testcase 3.5.1.1)
|
||||
---------------------------------------
|
||||
|
||||
Testcase 3.5.7.3 (see Testcase 3.5.1.1)
|
||||
---------------------------------------
|
||||
|
||||
Testcase 3.5.7.4:
|
||||
-----------------
|
||||
Create trigger trg4_1 BEFORE SELECT on tb3 for each row set new.f132=5;
|
||||
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 'SELECT on tb3 for each row set new.f132=5' at line 1
|
||||
Create trigger trg4_2 AFTER VALUE on tb3 for each row set new.f132=1;
|
||||
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 'VALUE on tb3 for each row set new.f132=1' at line 1
|
||||
drop trigger tb3.trg4_1;
|
||||
drop trigger tb3.trg4_2;
|
||||
|
||||
Testcase 3.5.7.5 / 3.5.7.6:
|
||||
---------------------------
|
||||
Create trigger trg5_1 BEFORE INSERT
|
||||
on tb3 for each row set new.f122='Trigger1 3.5.7.5/6';
|
||||
Create trigger trg5_2 BEFORE INSERT
|
||||
on tb3 for each row set new.f122='Trigger2 3.5.7.5';
|
||||
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
|
||||
Insert into tb3 (f121,f122) values ('Test 3.5.7.5/6','Insert 3.5.7.5');
|
||||
Select f121,f122 from tb3 where f121='Test 3.5.7.5/6';
|
||||
f121 f122
|
||||
Test 3.5.7.5/6 Trigger1 3.5.7.5/6
|
||||
update tb3 set f122='Update 3.5.7.6' where f121= 'Test 3.5.7.5/6';
|
||||
Select f121,f122 from tb3 where f121='Test 3.5.7.5/6';
|
||||
f121 f122
|
||||
Test 3.5.7.5/6 Update 3.5.7.6
|
||||
drop trigger trg5_1;
|
||||
drop trigger trg5_2;
|
||||
delete from tb3 where f121='Test 3.5.7.5/6';
|
||||
|
||||
Testcase 3.5.7.7 / 3.5.7.8:
|
||||
---------------------------
|
||||
set @test_var='Before trig 3.5.7.7';
|
||||
Create trigger trg6_1 AFTER INSERT
|
||||
on tb3 for each row set @test_var='Trigger1 3.5.7.7/8';
|
||||
Create trigger trg6_2 AFTER INSERT
|
||||
on tb3 for each row set @test_var='Trigger2 3.5.7.7';
|
||||
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
|
||||
select @test_var;
|
||||
@test_var
|
||||
Before trig 3.5.7.7
|
||||
Insert into tb3 (f121,f122) values ('Test 3.5.7.7/8','Insert 3.5.7.7');
|
||||
Select f121,f122 from tb3 where f121='Test 3.5.7.7/8';
|
||||
f121 f122
|
||||
Test 3.5.7.7/8 Insert 3.5.7.7
|
||||
select @test_var;
|
||||
@test_var
|
||||
Trigger1 3.5.7.7/8
|
||||
update tb3 set f122='Update 3.5.7.8' where f121= 'Test 3.5.7.7/8';
|
||||
Select f121,f122 from tb3 where f121='Test 3.5.7.7/8';
|
||||
f121 f122
|
||||
Test 3.5.7.7/8 Update 3.5.7.8
|
||||
select @test_var;
|
||||
@test_var
|
||||
Trigger1 3.5.7.7/8
|
||||
drop trigger trg6_1;
|
||||
drop trigger trg6_2;
|
||||
delete from tb3 where f121='Test 3.5.7.7/8';
|
||||
|
||||
Testcase 3.5.7.9/10:
|
||||
--------------------
|
||||
Create trigger trg7_1 BEFORE UPDATE
|
||||
on tb3 for each row set new.f122='Trigger1 3.5.7.9/10';
|
||||
Create trigger trg7_2 BEFORE UPDATE
|
||||
on tb3 for each row set new.f122='Trigger2 3.5.7.9';
|
||||
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
|
||||
Insert into tb3 (f121,f122) values ('Test 3.5.7.9/10','Insert 3.5.7.9');
|
||||
Select f121,f122 from tb3 where f121='Test 3.5.7.9/10';
|
||||
f121 f122
|
||||
Test 3.5.7.9/10 Insert 3.5.7.9
|
||||
update tb3 set f122='update 3.5.7.10' where f121='Test 3.5.7.9/10';
|
||||
Select f121,f122 from tb3 where f121='Test 3.5.7.9/10';
|
||||
f121 f122
|
||||
Test 3.5.7.9/10 Trigger1 3.5.7.9/10
|
||||
drop trigger trg7_1;
|
||||
drop trigger trg7_2;
|
||||
delete from tb3 where f121='Test 3.5.7.9/10';
|
||||
|
||||
Testcase 3.5.7.11/12:
|
||||
---------------------
|
||||
set @test_var='Before trig 3.5.7.11';
|
||||
Create trigger trg8_1 AFTER UPDATE
|
||||
on tb3 for each row set @test_var='Trigger 3.5.7.11/12';
|
||||
Create trigger trg8_2 AFTER UPDATE
|
||||
on tb3 for each row set @test_var='Trigger2 3.5.7.11';
|
||||
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
|
||||
select @test_var;
|
||||
@test_var
|
||||
Before trig 3.5.7.11
|
||||
Insert into tb3 (f121,f122) values ('Test 3.5.7.11/12','Insert 3.5.7.11/12');
|
||||
select @test_var;
|
||||
@test_var
|
||||
Before trig 3.5.7.11
|
||||
Select f121,f122 from tb3 where f121='Test 3.5.7.11/12';
|
||||
f121 f122
|
||||
Test 3.5.7.11/12 Insert 3.5.7.11/12
|
||||
update tb3 set f122='update 3.5.7.12' where f121='Test 3.5.7.11/12';
|
||||
Select f121,f122 from tb3 where f121='Test 3.5.7.11/12';
|
||||
f121 f122
|
||||
Test 3.5.7.11/12 update 3.5.7.12
|
||||
select @test_var;
|
||||
@test_var
|
||||
Trigger 3.5.7.11/12
|
||||
delete from tb3 where f121='Test 3.5.7.11/12';
|
||||
drop trigger trg8_1;
|
||||
drop trigger trg8_2;
|
||||
delete from tb3 where f121='Test 3.5.7.11/12';
|
||||
|
||||
Testcase 3.5.7.13/14:
|
||||
---------------------
|
||||
set @test_var=1;
|
||||
Create trigger trg9_1 BEFORE DELETE
|
||||
on tb3 for each row set @test_var=@test_var+1;
|
||||
Create trigger trg9_2 BEFORE DELETE
|
||||
on tb3 for each row set @test_var=@test_var+10;
|
||||
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
|
||||
select @test_var;
|
||||
@test_var
|
||||
1
|
||||
Insert into tb3 (f121,f122) values ('Test 3.5.7.13/14','Insert 3.5.7.13');
|
||||
Select f121,f122 from tb3 where f121='Test 3.5.7.13/14';
|
||||
f121 f122
|
||||
Test 3.5.7.13/14 Insert 3.5.7.13
|
||||
select @test_var;
|
||||
@test_var
|
||||
1
|
||||
delete from tb3 where f121='Test 3.5.7.13/14';
|
||||
Select f121,f122 from tb3 where f121='Test 3.5.7.13/14';
|
||||
f121 f122
|
||||
select @test_var;
|
||||
@test_var
|
||||
2
|
||||
delete from tb3 where f121='Test 3.5.7.13/14';
|
||||
select @test_var;
|
||||
@test_var
|
||||
2
|
||||
drop trigger trg9_1;
|
||||
drop trigger trg9_2;
|
||||
delete from tb3 where f121='Test 3.5.7.13/14';
|
||||
|
||||
Testcase 3.5.7.15/16:
|
||||
---------------------
|
||||
set @test_var=1;
|
||||
Create trigger trg_3_406010_1 AFTER DELETE
|
||||
on tb3 for each row set @test_var=@test_var+5;
|
||||
Create trigger trg_3_406010_2 AFTER DELETE
|
||||
on tb3 for each row set @test_var=@test_var+50;
|
||||
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
|
||||
Create trigger trg_3_406010_1 AFTER INSERT
|
||||
on tb3 for each row set @test_var=@test_var+1;
|
||||
ERROR HY000: Trigger already exists
|
||||
select @test_var;
|
||||
@test_var
|
||||
1
|
||||
Insert into tb3 (f121,f122) values ('Test 3.5.7.15/16','Insert 3.5.7.15/16');
|
||||
Select f121,f122 from tb3 where f121='Test 3.5.7.15/16';
|
||||
f121 f122
|
||||
Test 3.5.7.15/16 Insert 3.5.7.15/16
|
||||
select @test_var;
|
||||
@test_var
|
||||
1
|
||||
delete from tb3 where f121='Test 3.5.7.15/16';
|
||||
Select f121,f122 from tb3 where f121='Test 3.5.7.15/16';
|
||||
f121 f122
|
||||
select @test_var;
|
||||
@test_var
|
||||
6
|
||||
delete from tb3 where f121='Test 3.5.7.15/16';
|
||||
select @test_var;
|
||||
@test_var
|
||||
6
|
||||
drop trigger trg_3_406010_1;
|
||||
drop trigger trg_3_406010_2;
|
||||
delete from tb3 where f121='Test 3.5.7.15/16';
|
||||
|
||||
Testcase 3.5.7.17 (see Testcase 3.5.1.1)
|
||||
----------------------------------------
|
||||
drop user test_general@localhost;
|
||||
drop user test_general;
|
||||
drop user test_super@localhost;
|
503
mysql-test/suite/funcs_1/r/memory_trig_08.result
Normal file
503
mysql-test/suite/funcs_1/r/memory_trig_08.result
Normal file
|
@ -0,0 +1,503 @@
|
|||
SET @NO_REFRESH = IF( '' = '', 0, 1);
|
||||
USE test;
|
||||
set @@global.max_heap_table_size = 4294967295;
|
||||
set @@session.max_heap_table_size = 4294967295;
|
||||
drop table if exists tb3;
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 char(50),
|
||||
f122 char(50),
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) engine = memory;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f150' at row 1
|
||||
Note 1265 Data truncated for column 'f151' at row 1
|
||||
Note 1265 Data truncated for column 'f152' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb3.txt' into table tb3 ;
|
||||
|
||||
Testcase: 3.5:
|
||||
--------------
|
||||
create User test_general@localhost;
|
||||
set password for test_general@localhost = password('PWD');
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost;
|
||||
create User test_super@localhost;
|
||||
set password for test_super@localhost = password('PWD');
|
||||
grant ALL on *.* to test_super@localhost with grant OPTION;
|
||||
connect(localhost,test_general,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
connect(localhost,test_super,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
|
||||
Testcase 3.5.8.1: (implied in previous tests)
|
||||
---------------------------------------------
|
||||
|
||||
Testcase 3.5.8.2: (implied in previous tests)
|
||||
---------------------------------------------
|
||||
|
||||
Testcase 3.5.8.3/4:
|
||||
-------------------
|
||||
create database db_test;
|
||||
grant SELECT, INSERT, UPDATE, DELETE on db_test.* to test_general;
|
||||
grant LOCK TABLES on db_test.* to test_general;
|
||||
Use db_test;
|
||||
create table t1_i (
|
||||
i120 char ascii not null DEFAULT b'101',
|
||||
i136 smallint zerofill not null DEFAULT 999,
|
||||
i144 int zerofill not null DEFAULT 99999,
|
||||
i163 decimal (63,30)) engine=memory;
|
||||
create table t1_u (
|
||||
u120 char ascii not null DEFAULT b'101',
|
||||
u136 smallint zerofill not null DEFAULT 999,
|
||||
u144 int zerofill not null DEFAULT 99999,
|
||||
u163 decimal (63,30)) engine=memory;
|
||||
create table t1_d (
|
||||
d120 char ascii not null DEFAULT b'101',
|
||||
d136 smallint zerofill not null DEFAULT 999,
|
||||
d144 int zerofill not null DEFAULT 99999,
|
||||
d163 decimal (63,30)) engine=memory;
|
||||
Insert into t1_u values ('a',111,99999,999.99);
|
||||
Insert into t1_u values ('b',222,99999,999.99);
|
||||
Insert into t1_u values ('c',333,99999,999.99);
|
||||
Insert into t1_u values ('d',222,99999,999.99);
|
||||
Insert into t1_u values ('e',222,99999,999.99);
|
||||
Insert into t1_u values ('f',333,99999,999.99);
|
||||
Insert into t1_d values ('a',111,99999,999.99);
|
||||
Insert into t1_d values ('b',222,99999,999.99);
|
||||
Insert into t1_d values ('c',333,99999,999.99);
|
||||
Insert into t1_d values ('d',444,99999,999.99);
|
||||
Insert into t1_d values ('e',222,99999,999.99);
|
||||
Insert into t1_d values ('f',222,99999,999.99);
|
||||
|
||||
3.5.8.4 - multiple SQL
|
||||
----------------------
|
||||
use test;
|
||||
Create trigger trg1 AFTER INSERT on tb3 for each row
|
||||
BEGIN
|
||||
insert into db_test.t1_i
|
||||
values (new.f120, new.f136, new.f144, new.f163);
|
||||
update db_test.t1_u
|
||||
set u144=new.f144, u163=new.f163
|
||||
where u136=new.f136;
|
||||
delete from db_test.t1_d where d136= new.f136;
|
||||
select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u
|
||||
where u136= new.f136;
|
||||
END//
|
||||
Use test;
|
||||
set @test_var=0;
|
||||
Insert into tb3 (f120, f122, f136, f144, f163)
|
||||
values ('1', 'Test 3.5.8.4', 222, 23456, 1.05);
|
||||
Select f120, f122, f136, f144, f163 from tb3 where f122= 'Test 3.5.8.4';
|
||||
f120 f122 f136 f144 f163
|
||||
1 Test 3.5.8.4 00222 0000023456 1.050000000000000000000000000000
|
||||
select * from db_test.t1_i order by i120;
|
||||
i120 i136 i144 i163
|
||||
1 00222 0000023456 1.050000000000000000000000000000
|
||||
select * from db_test.t1_u order by u120;
|
||||
u120 u136 u144 u163
|
||||
a 00111 0000099999 999.990000000000000000000000000000
|
||||
b 00222 0000023456 1.050000000000000000000000000000
|
||||
c 00333 0000099999 999.990000000000000000000000000000
|
||||
d 00222 0000023456 1.050000000000000000000000000000
|
||||
e 00222 0000023456 1.050000000000000000000000000000
|
||||
f 00333 0000099999 999.990000000000000000000000000000
|
||||
select * from db_test.t1_d order by d120;
|
||||
d120 d136 d144 d163
|
||||
a 00111 0000099999 999.990000000000000000000000000000
|
||||
c 00333 0000099999 999.990000000000000000000000000000
|
||||
d 00444 0000099999 999.990000000000000000000000000000
|
||||
select @test_var;
|
||||
@test_var
|
||||
3.150000000000000000000000000000
|
||||
|
||||
3.5.8.4 - single SQL - insert
|
||||
-----------------------------
|
||||
Create trigger trg2 BEFORE UPDATE on tb3 for each row
|
||||
BEGIN
|
||||
insert into db_test.t1_i
|
||||
values (new.f120, new.f136, new.f144, new.f163);
|
||||
END//
|
||||
Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
|
||||
f120 f122 f136 f144 f163
|
||||
1 Test 3.5.8.4 00222 0000023456 1.050000000000000000000000000000
|
||||
select * from db_test.t1_i order by i120;
|
||||
i120 i136 i144 i163
|
||||
1 00222 0000023456 1.050000000000000000000000000000
|
||||
update tb3 set f120='I', f122='Test 3.5.8.4-Single Insert'
|
||||
where f122='Test 3.5.8.4';
|
||||
Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
|
||||
f120 f122 f136 f144 f163
|
||||
I Test 3.5.8.4-Single Insert 00222 0000023456 1.050000000000000000000000000000
|
||||
select * from db_test.t1_i order by i120;
|
||||
i120 i136 i144 i163
|
||||
1 00222 0000023456 1.050000000000000000000000000000
|
||||
I 00222 0000023456 1.050000000000000000000000000000
|
||||
|
||||
3.5.8.4 - single SQL - update
|
||||
-----------------------------
|
||||
drop trigger trg2;
|
||||
Create trigger trg3 BEFORE UPDATE on tb3 for each row
|
||||
update db_test.t1_u
|
||||
set u120=new.f120
|
||||
where u136=new.f136;
|
||||
update tb3 set f120='U', f122='Test 3.5.8.4-Single Update'
|
||||
where f122='Test 3.5.8.4-Single Insert';
|
||||
Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
|
||||
f120 f122 f136 f144 f163
|
||||
U Test 3.5.8.4-Single Update 00222 0000023456 1.050000000000000000000000000000
|
||||
select * from db_test.t1_u order by u120;
|
||||
u120 u136 u144 u163
|
||||
a 00111 0000099999 999.990000000000000000000000000000
|
||||
c 00333 0000099999 999.990000000000000000000000000000
|
||||
f 00333 0000099999 999.990000000000000000000000000000
|
||||
U 00222 0000023456 1.050000000000000000000000000000
|
||||
U 00222 0000023456 1.050000000000000000000000000000
|
||||
U 00222 0000023456 1.050000000000000000000000000000
|
||||
|
||||
3.5.8.3/4 - single SQL - delete
|
||||
-------------------------------
|
||||
drop trigger trg3;
|
||||
Create trigger trg4 AFTER UPDATE on tb3 for each row
|
||||
delete from db_test.t1_d where d136= new.f136;
|
||||
update tb3 set f120='D', f136=444,
|
||||
f122='Test 3.5.8.4-Single Delete'
|
||||
where f122='Test 3.5.8.4-Single Update';
|
||||
Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
|
||||
f120 f122 f136 f144 f163
|
||||
D Test 3.5.8.4-Single Delete 00444 0000023456 1.050000000000000000000000000000
|
||||
select * from db_test.t1_d order by d120;
|
||||
d120 d136 d144 d163
|
||||
a 00111 0000099999 999.990000000000000000000000000000
|
||||
c 00333 0000099999 999.990000000000000000000000000000
|
||||
|
||||
3.5.8.3/4 - single SQL - select
|
||||
-------------------------------
|
||||
drop trigger trg4;
|
||||
Create trigger trg5 AFTER UPDATE on tb3 for each row
|
||||
select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u
|
||||
where u136= new.f136;
|
||||
set @test_var=0;
|
||||
update tb3 set f120='S', f136=111,
|
||||
f122='Test 3.5.8.4-Single Select'
|
||||
where f122='Test 3.5.8.4-Single Delete';
|
||||
Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
|
||||
f120 f122 f136 f144 f163
|
||||
S Test 3.5.8.4-Single Select 00111 0000023456 1.050000000000000000000000000000
|
||||
select @test_var;
|
||||
@test_var
|
||||
999.990000000000000000000000000000
|
||||
drop trigger trg1;
|
||||
drop trigger trg5;
|
||||
drop database if exists db_test;
|
||||
delete from tb3 where f122 like 'Test 3.5.8.4%';
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost';
|
||||
|
||||
Testcase 3.5.8.5 (IF):
|
||||
----------------------
|
||||
create trigger trg2 before insert on tb3 for each row
|
||||
BEGIN
|
||||
IF new.f120='1' then
|
||||
set @test_var='one', new.f120='2';
|
||||
ELSEIF new.f120='2' then
|
||||
set @test_var='two', new.f120='3';
|
||||
ELSEIF new.f120='3' then
|
||||
set @test_var='three', new.f120='4';
|
||||
END IF;
|
||||
IF (new.f120='4') and (new.f136=10) then
|
||||
set @test_var2='2nd if', new.f120='d';
|
||||
ELSE
|
||||
set @test_var2='2nd else', new.f120='D';
|
||||
END IF;
|
||||
END//
|
||||
set @test_var='Empty', @test_var2=0;
|
||||
Insert into tb3 (f120, f122, f136) values ('1', 'Test 3.5.8.5-if', 101);
|
||||
select f120, f122, f136, @test_var, @test_var2
|
||||
from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
|
||||
f120 f122 f136 @test_var @test_var2
|
||||
D Test 3.5.8.5-if 00101 one 2nd else
|
||||
Insert into tb3 (f120, f122, f136) values ('2', 'Test 3.5.8.5-if', 102);
|
||||
select f120, f122, f136, @test_var, @test_var2
|
||||
from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
|
||||
f120 f122 f136 @test_var @test_var2
|
||||
D Test 3.5.8.5-if 00101 two 2nd else
|
||||
D Test 3.5.8.5-if 00102 two 2nd else
|
||||
Insert into tb3 (f120, f122, f136) values ('3', 'Test 3.5.8.5-if', 10);
|
||||
select f120, f122, f136, @test_var, @test_var2
|
||||
from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
|
||||
f120 f122 f136 @test_var @test_var2
|
||||
d Test 3.5.8.5-if 00010 three 2nd if
|
||||
D Test 3.5.8.5-if 00101 three 2nd if
|
||||
D Test 3.5.8.5-if 00102 three 2nd if
|
||||
Insert into tb3 (f120, f122, f136) values ('3', 'Test 3.5.8.5-if', 103);
|
||||
select f120, f122, f136, @test_var, @test_var2
|
||||
from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
|
||||
f120 f122 f136 @test_var @test_var2
|
||||
d Test 3.5.8.5-if 00010 three 2nd else
|
||||
D Test 3.5.8.5-if 00101 three 2nd else
|
||||
D Test 3.5.8.5-if 00102 three 2nd else
|
||||
D Test 3.5.8.5-if 00103 three 2nd else
|
||||
create trigger trg3 before update on tb3 for each row
|
||||
BEGIN
|
||||
ELSEIF new.f120='2' then
|
||||
END IF;
|
||||
END//
|
||||
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 'ELSEIF new.f120='2' then
|
||||
END IF;
|
||||
END' at line 3
|
||||
drop trigger trg3//
|
||||
create trigger trg4 before update on tb3 for each row
|
||||
BEGIN
|
||||
IF (new.f120='4') and (new.f136=10) then
|
||||
set @test_var2='2nd if', new.f120='d';
|
||||
ELSE
|
||||
set @test_var2='2nd else', new.f120='D';
|
||||
END//
|
||||
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 '' at line 7
|
||||
drop trigger trg4;
|
||||
drop trigger trg2;
|
||||
delete from tb3 where f121='Test 3.5.8.5-if';
|
||||
|
||||
Testcase 3.5.8.5-case:
|
||||
----------------------
|
||||
create trigger trg3 before insert on tb3 for each row
|
||||
BEGIN
|
||||
SET new.f120=char(ascii(new.f120)-32);
|
||||
CASE
|
||||
when new.f136<100 then set new.f136=new.f136+120;
|
||||
when new.f136<10 then set new.f144=777;
|
||||
when new.f136>100 then set new.f120=new.f136-1;
|
||||
END case;
|
||||
CASE
|
||||
when new.f136=200 then set @test_var=CONCAT(new.f120, '=');
|
||||
ELSE set @test_var=concat(new.f120, '*');
|
||||
END case;
|
||||
CASE new.f144
|
||||
when 1 then set @test_var=concat(@test_var, 'one');
|
||||
when 2 then set @test_var=concat(@test_var, 'two');
|
||||
when 3 then set @test_var=concat(@test_var, 'three');
|
||||
when 4 then set @test_var=concat(@test_var, 'four');
|
||||
when 5 then set @test_var=concat(@test_var, 'five');
|
||||
when 6 then set @test_var=concat(@test_var, 'six');
|
||||
when 7 then set @test_var=concat(@test_var, 'seven');
|
||||
when 8 then set @test_var=concat(@test_var, 'eight');
|
||||
when 9 then set @test_var=concat(@test_var, 'nine');
|
||||
when 10 then set @test_var=concat(@test_var, 'ten');
|
||||
when 11 then set @test_var=concat(@test_var, 'eleven');
|
||||
when 12 then set @test_var=concat(@test_var, 'twelve');
|
||||
when 13 then set @test_var=concat(@test_var, 'thirteen');
|
||||
when 14 then set @test_var=concat(@test_var, 'fourteen');
|
||||
when 15 then set @test_var=concat(@test_var, 'fifteen');
|
||||
ELSE set @test_var=CONCAT(new.f120, '*', new.f144);
|
||||
END case;
|
||||
END//
|
||||
set @test_var='Empty';
|
||||
Insert into tb3 (f120, f122, f136, f144)
|
||||
values ('a', 'Test 3.5.8.5-case', 5, 7);
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120;
|
||||
f120 f122 f136 f144 @test_var
|
||||
A Test 3.5.8.5-case 00125 0000000007 A*seven
|
||||
Insert into tb3 (f120, f122, f136, f144)
|
||||
values ('b', 'Test 3.5.8.5-case', 71,16);
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120;
|
||||
f120 f122 f136 f144 @test_var
|
||||
A Test 3.5.8.5-case 00125 0000000007 B*0000000016
|
||||
B Test 3.5.8.5-case 00191 0000000016 B*0000000016
|
||||
Insert into tb3 (f120, f122, f136, f144)
|
||||
values ('c', 'Test 3.5.8.5-case', 80,1);
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120;
|
||||
f120 f122 f136 f144 @test_var
|
||||
A Test 3.5.8.5-case 00125 0000000007 C=one
|
||||
B Test 3.5.8.5-case 00191 0000000016 C=one
|
||||
C Test 3.5.8.5-case 00200 0000000001 C=one
|
||||
Insert into tb3 (f120, f122, f136)
|
||||
values ('d', 'Test 3.5.8.5-case', 152);
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f120' at row 1
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120;
|
||||
f120 f122 f136 f144 @test_var
|
||||
1 Test 3.5.8.5-case 00152 0000099999 1*0000099999
|
||||
A Test 3.5.8.5-case 00125 0000000007 1*0000099999
|
||||
B Test 3.5.8.5-case 00191 0000000016 1*0000099999
|
||||
C Test 3.5.8.5-case 00200 0000000001 1*0000099999
|
||||
Insert into tb3 (f120, f122, f136, f144)
|
||||
values ('e', 'Test 3.5.8.5-case', 200, 8);
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f120' at row 1
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120;
|
||||
f120 f122 f136 f144 @test_var
|
||||
1 Test 3.5.8.5-case 00152 0000099999 1=eight
|
||||
1 Test 3.5.8.5-case 00200 0000000008 1=eight
|
||||
A Test 3.5.8.5-case 00125 0000000007 1=eight
|
||||
B Test 3.5.8.5-case 00191 0000000016 1=eight
|
||||
C Test 3.5.8.5-case 00200 0000000001 1=eight
|
||||
Insert into tb3 (f120, f122, f136, f144)
|
||||
values ('f', 'Test 3.5.8.5-case', 100, 8);
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120;
|
||||
f120 f122 f136 f144 @test_var
|
||||
1 Test 3.5.8.5-case 00152 0000099999 1=eight
|
||||
1 Test 3.5.8.5-case 00200 0000000008 1=eight
|
||||
A Test 3.5.8.5-case 00125 0000000007 1=eight
|
||||
B Test 3.5.8.5-case 00191 0000000016 1=eight
|
||||
C Test 3.5.8.5-case 00200 0000000001 1=eight
|
||||
create trigger trg3a before update on tb3 for each row
|
||||
BEGIN
|
||||
CASE
|
||||
when new.f136<100 then set new.f120='p';
|
||||
END//
|
||||
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 '' at line 5
|
||||
drop trigger trg3a;
|
||||
drop trigger trg3;
|
||||
delete from tb3 where f121='Test 3.5.8.5-case';
|
||||
|
||||
Testcase 3.5.8.5-loop/leave:
|
||||
----------------------------
|
||||
Create trigger trg4 after insert on tb3 for each row
|
||||
BEGIN
|
||||
set @counter=0, @flag='Initial';
|
||||
Label1: loop
|
||||
if new.f136<new.f144 then
|
||||
set @counter='Nothing to loop';
|
||||
leave Label1;
|
||||
else
|
||||
set @counter=@counter+1;
|
||||
if new.f136=new.f144+@counter then
|
||||
set @counter=concat(@counter, ' loops');
|
||||
leave Label1;
|
||||
end if;
|
||||
end if;
|
||||
iterate label1;
|
||||
set @flag='Final';
|
||||
END loop Label1;
|
||||
END//
|
||||
Insert into tb3 (f122, f136, f144)
|
||||
values ('Test 3.5.8.5-loop', 2, 8);
|
||||
select @counter, @flag;
|
||||
@counter @flag
|
||||
Nothing to loop Initial
|
||||
Insert into tb3 (f122, f136, f144)
|
||||
values ('Test 3.5.8.5-loop', 11, 8);
|
||||
select @counter, @flag;
|
||||
@counter @flag
|
||||
3 loops Initial
|
||||
Create trigger trg4_2 after update on tb3 for each row
|
||||
BEGIN
|
||||
Label1: loop
|
||||
set @counter=@counter+1;
|
||||
END;
|
||||
END//
|
||||
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 ';
|
||||
END' at line 5
|
||||
drop trigger trg4_2;
|
||||
drop trigger trg4;
|
||||
delete from tb3 where f122='Test 3.5.8.5-loop';
|
||||
|
||||
Testcase 3.5.8.5-repeat:
|
||||
------------------------
|
||||
Create trigger trg6 after insert on tb3 for each row
|
||||
BEGIN
|
||||
rp_label: REPEAT
|
||||
SET @counter1 = @counter1 + 1;
|
||||
IF (@counter1 MOD 2 = 0) THEN ITERATE rp_label;
|
||||
END IF;
|
||||
SET @counter2 = @counter2 + 1;
|
||||
UNTIL @counter1> new.f136 END REPEAT rp_label;
|
||||
END//
|
||||
set @counter1= 0, @counter2= 0;
|
||||
Insert into tb3 (f122, f136)
|
||||
values ('Test 3.5.8.5-repeat', 13);
|
||||
select @counter1, @counter2;
|
||||
@counter1 @counter2
|
||||
15 8
|
||||
Create trigger trg6_2 after update on tb3 for each row
|
||||
BEGIN
|
||||
REPEAT
|
||||
SET @counter2 = @counter2 + 1;
|
||||
END//
|
||||
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 'END' at line 5
|
||||
drop trigger trg6;
|
||||
delete from tb3 where f122='Test 3.5.8.5-repeat';
|
||||
|
||||
Testcase 3.5.8.5-while:
|
||||
-----------------------
|
||||
Create trigger trg7 after insert on tb3 for each row
|
||||
wl_label: WHILE @counter1 < new.f136 DO
|
||||
SET @counter1 = @counter1 + 1;
|
||||
IF (@counter1 MOD 2 = 0) THEN ITERATE wl_label;
|
||||
END IF;
|
||||
SET @counter2 = @counter2 + 1;
|
||||
END WHILE wl_label//
|
||||
set @counter1= 0, @counter2= 0;
|
||||
Insert into tb3 (f122, f136)
|
||||
values ('Test 3.5.8.5-while', 7);
|
||||
select @counter1, @counter2;
|
||||
@counter1 @counter2
|
||||
7 4
|
||||
Create trigger trg7_2 after update on tb3 for each row
|
||||
BEGIN
|
||||
WHILE @counter1 < new.f136
|
||||
SET @counter1 = @counter1 + 1;
|
||||
END//
|
||||
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 'SET @counter1 = @counter1 + 1;
|
||||
END' at line 4
|
||||
delete from tb3 where f122='Test 3.5.8.5-while';
|
||||
drop trigger trg7;
|
||||
|
||||
Testcase 3.5.8.6: (requirement void)
|
||||
------------------------------------
|
||||
|
||||
Testcase 3.5.8.7: (Disabled as a result of bug _____)
|
||||
-----------------------------------------------------
|
||||
drop user test_general@localhost;
|
||||
drop user test_general;
|
||||
drop user test_super@localhost;
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue