diff options
author | unknown <mleich@five.local.lan> | 2008-03-31 19:48:02 +0200 |
---|---|---|
committer | unknown <mleich@five.local.lan> | 2008-03-31 19:48:02 +0200 |
commit | 004123892d33e2942d64d7dce404b3c5ef35db63 (patch) | |
tree | eead86c743ef094b068a0715efcfe238aec7593b /mysql-test/suite | |
parent | 0db1f520c629455b4766c3d8f57a9767d7f6a98f (diff) | |
download | mariadb-git-004123892d33e2942d64d7dce404b3c5ef35db63.tar.gz |
Fix for
Bug#35335 funcs_1: Some tests fail within load_file during
pushbuild runs
Solution: 1. Move files with input data used in load_file,
load data etc.
from suite/funcs_1/<whatever>
to std_data
2. Use for testsuite funcs_1 the server option
--secure-file-priv=<MYSQLTEST_VARDIR>
3. Outfiles have to be stored under MYSQLTEST_VARDIR
+ changes according to WL#4304 Cleanup in funcs_1 tests
- backport of fixes/improvements made in 5.1 to 5.0
The differences between scripts in 5.0 and 5.1 cause
much additional and annoying work during any upmerge.
- replace error numbers with names
- improved comments
- improved formatting
- Unify storage engine names so that result files for
storage engine variants do not differ (some tests)
- remove a script no more used (tests are done in other scripts)
BitKeeper/deleted/.del-triggers_master.test:
Delete: mysql-test/suite/funcs_1/triggers/triggers_master.test
mysql-test/std_data/funcs_1/innodb_tb1.txt:
Rename: mysql-test/suite/funcs_1/data/innodb_tb1.txt -> mysql-test/std_data/funcs_1/innodb_tb1.txt
mysql-test/std_data/funcs_1/innodb_tb2.txt:
Rename: mysql-test/suite/funcs_1/data/innodb_tb2.txt -> mysql-test/std_data/funcs_1/innodb_tb2.txt
mysql-test/std_data/funcs_1/innodb_tb3.txt:
Rename: mysql-test/suite/funcs_1/data/innodb_tb3.txt -> mysql-test/std_data/funcs_1/innodb_tb3.txt
mysql-test/std_data/funcs_1/innodb_tb4.txt:
Rename: mysql-test/suite/funcs_1/data/innodb_tb4.txt -> mysql-test/std_data/funcs_1/innodb_tb4.txt
mysql-test/std_data/funcs_1/memory_tb1.txt:
Rename: mysql-test/suite/funcs_1/data/memory_tb1.txt -> mysql-test/std_data/funcs_1/memory_tb1.txt
mysql-test/std_data/funcs_1/memory_tb2.txt:
Rename: mysql-test/suite/funcs_1/data/memory_tb2.txt -> mysql-test/std_data/funcs_1/memory_tb2.txt
mysql-test/std_data/funcs_1/memory_tb3.txt:
Rename: mysql-test/suite/funcs_1/data/memory_tb3.txt -> mysql-test/std_data/funcs_1/memory_tb3.txt
mysql-test/std_data/funcs_1/memory_tb4.txt:
Rename: mysql-test/suite/funcs_1/data/memory_tb4.txt -> mysql-test/std_data/funcs_1/memory_tb4.txt
mysql-test/std_data/funcs_1/myisam_tb1.txt:
Rename: mysql-test/suite/funcs_1/data/myisam_tb1.txt -> mysql-test/std_data/funcs_1/myisam_tb1.txt
mysql-test/std_data/funcs_1/myisam_tb2.txt:
Rename: mysql-test/suite/funcs_1/data/myisam_tb2.txt -> mysql-test/std_data/funcs_1/myisam_tb2.txt
mysql-test/std_data/funcs_1/myisam_tb3.txt:
Rename: mysql-test/suite/funcs_1/data/myisam_tb3.txt -> mysql-test/std_data/funcs_1/myisam_tb3.txt
mysql-test/std_data/funcs_1/myisam_tb4.txt:
Rename: mysql-test/suite/funcs_1/data/myisam_tb4.txt -> mysql-test/std_data/funcs_1/myisam_tb4.txt
mysql-test/std_data/funcs_1/t3.txt:
Rename: mysql-test/suite/funcs_1/data/t3.txt -> mysql-test/std_data/funcs_1/t3.txt
mysql-test/std_data/funcs_1/t4.txt:
Rename: mysql-test/suite/funcs_1/data/t4.txt -> mysql-test/std_data/funcs_1/t4.txt
mysql-test/std_data/funcs_1/t7.txt:
Rename: mysql-test/suite/funcs_1/data/t7.txt -> mysql-test/std_data/funcs_1/t7.txt
mysql-test/std_data/funcs_1/t9.txt:
Rename: mysql-test/suite/funcs_1/data/t9.txt -> mysql-test/std_data/funcs_1/t9.txt
mysql-test/Makefile.am:
Introduce installation of funcs_1 files in std_data.
mysql-test/mysql-test-run.pl:
The tests within funcs_1 need a server started with
--secure-file-priv=<MYSQLTEST_VARDIR>
like the main regression tests.
mysql-test/suite/funcs_1/README.txt:
Extended description
mysql-test/suite/funcs_1/datadict/datadict_bug_12777.inc:
Cleanup
mysql-test/suite/funcs_1/datadict/datadict_load.inc:
Cleanup
mysql-test/suite/funcs_1/include/innodb_tb1.inc:
Adjustment to new storage place of infile.
mysql-test/suite/funcs_1/include/innodb_tb2.inc:
Adjustment to new storage place of infile.
mysql-test/suite/funcs_1/include/innodb_tb3.inc:
Adjustment to new storage place of infile.
mysql-test/suite/funcs_1/include/innodb_tb4.inc:
Adjustment to new storage place of infile.
mysql-test/suite/funcs_1/include/memory_tb1.inc:
Adjustment to new storage place of infile.
mysql-test/suite/funcs_1/include/memory_tb2.inc:
Adjustment to new storage place of infile.
mysql-test/suite/funcs_1/include/memory_tb3.inc:
Adjustment to new storage place of infile.
mysql-test/suite/funcs_1/include/memory_tb4.inc:
Adjustment to new storage place of infile.
mysql-test/suite/funcs_1/include/myisam_tb1.inc:
Adjustment to new storage place of infile.
mysql-test/suite/funcs_1/include/myisam_tb2.inc:
Adjustment to new storage place of infile.
mysql-test/suite/funcs_1/include/myisam_tb3.inc:
Adjustment to new storage place of infile.
mysql-test/suite/funcs_1/include/myisam_tb4.inc:
Adjustment to new storage place of infile.
mysql-test/suite/funcs_1/include/sp_tb.inc:
Adjustment to new storage place of infile.
mysql-test/suite/funcs_1/r/innodb_func_view.result:
Updated results
mysql-test/suite/funcs_1/r/innodb_storedproc_02.result:
Updated results
mysql-test/suite/funcs_1/r/innodb_storedproc_03.result:
Updated results
mysql-test/suite/funcs_1/r/innodb_storedproc_06.result:
Updated results
mysql-test/suite/funcs_1/r/innodb_storedproc_07.result:
Updated results
mysql-test/suite/funcs_1/r/innodb_storedproc_08.result:
Updated results
mysql-test/suite/funcs_1/r/innodb_storedproc_10.result:
Updated results
mysql-test/suite/funcs_1/r/innodb_trig_0102.result:
Updated results
mysql-test/suite/funcs_1/r/innodb_trig_03.result:
Updated results
mysql-test/suite/funcs_1/r/innodb_trig_0407.result:
Updated results
mysql-test/suite/funcs_1/r/innodb_trig_08.result:
Updated results
mysql-test/suite/funcs_1/r/innodb_trig_09.result:
Updated results
mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result:
Updated results
mysql-test/suite/funcs_1/r/innodb_trig_frkey.result:
Updated results
mysql-test/suite/funcs_1/r/innodb_views.result:
Updated results
mysql-test/suite/funcs_1/r/is_columns_innodb.result:
Updated results
mysql-test/suite/funcs_1/r/is_columns_memory.result:
Updated results
mysql-test/suite/funcs_1/r/is_columns_myisam.result:
Updated results
mysql-test/suite/funcs_1/r/is_columns_ndb.result:
Updated results
mysql-test/suite/funcs_1/r/is_tables_innodb.result:
Updated results
mysql-test/suite/funcs_1/r/is_tables_memory.result:
Updated results
mysql-test/suite/funcs_1/r/is_tables_myisam.result:
Updated results
mysql-test/suite/funcs_1/r/is_tables_ndb.result:
Updated results
mysql-test/suite/funcs_1/r/memory_func_view.result:
Updated results
mysql-test/suite/funcs_1/r/memory_storedproc_02.result:
Updated results
mysql-test/suite/funcs_1/r/memory_storedproc_03.result:
Updated results
mysql-test/suite/funcs_1/r/memory_storedproc_06.result:
Updated results
mysql-test/suite/funcs_1/r/memory_storedproc_07.result:
Updated results
mysql-test/suite/funcs_1/r/memory_storedproc_08.result:
Updated results
mysql-test/suite/funcs_1/r/memory_storedproc_10.result:
Updated results
mysql-test/suite/funcs_1/r/memory_trig_0102.result:
Updated results
mysql-test/suite/funcs_1/r/memory_trig_03.result:
Updated results
mysql-test/suite/funcs_1/r/memory_trig_0407.result:
Updated results
mysql-test/suite/funcs_1/r/memory_trig_08.result:
Updated results
mysql-test/suite/funcs_1/r/memory_trig_09.result:
Updated results
mysql-test/suite/funcs_1/r/memory_trig_1011ext.result:
Updated results
mysql-test/suite/funcs_1/r/memory_views.result:
Updated results
mysql-test/suite/funcs_1/r/myisam_func_view.result:
Updated results
mysql-test/suite/funcs_1/r/myisam_storedproc_02.result:
Updated results
mysql-test/suite/funcs_1/r/myisam_storedproc_03.result:
Updated results
mysql-test/suite/funcs_1/r/myisam_storedproc_06.result:
Updated results
mysql-test/suite/funcs_1/r/myisam_storedproc_07.result:
Updated results
mysql-test/suite/funcs_1/r/myisam_storedproc_08.result:
Updated results
mysql-test/suite/funcs_1/r/myisam_storedproc_10.result:
Updated results
mysql-test/suite/funcs_1/r/myisam_trig_0102.result:
Updated results
mysql-test/suite/funcs_1/r/myisam_trig_03.result:
Updated results
mysql-test/suite/funcs_1/r/myisam_trig_0407.result:
Updated results
mysql-test/suite/funcs_1/r/myisam_trig_08.result:
Updated results
mysql-test/suite/funcs_1/r/myisam_trig_09.result:
Updated results
mysql-test/suite/funcs_1/r/myisam_trig_1011ext.result:
Updated results
mysql-test/suite/funcs_1/r/myisam_views.result:
Updated results
mysql-test/suite/funcs_1/storedproc/cleanup_sp_tb.inc:
"--echo" instead of SQL command.
mysql-test/suite/funcs_1/storedproc/load_sp_tb.inc:
Adjustment to new storage place of infile
+ correct formatting.
mysql-test/suite/funcs_1/storedproc/storedproc_02.inc:
Backport from 5.1 + correct formatting.
mysql-test/suite/funcs_1/storedproc/storedproc_03.inc:
Minor improvements + correct formatting.
mysql-test/suite/funcs_1/storedproc/storedproc_06.inc:
Backport from 5.1 + correct formatting
mysql-test/suite/funcs_1/storedproc/storedproc_10.inc:
Backport from 5.1. + correct formatting
mysql-test/suite/funcs_1/t/innodb_trig_0407.test:
Cleanup
mysql-test/suite/funcs_1/t/is_basics_mixed.test:
Adjustment to new storage place of outfile.
mysql-test/suite/funcs_1/t/memory_storedproc_02.test:
Cleanup
mysql-test/suite/funcs_1/t/memory_storedproc_03.test:
Cleanup
mysql-test/suite/funcs_1/t/memory_storedproc_06.test:
Cleanup
mysql-test/suite/funcs_1/t/memory_storedproc_07.test:
Cleanup
mysql-test/suite/funcs_1/t/memory_storedproc_08.test:
Cleanup
mysql-test/suite/funcs_1/t/memory_storedproc_10.test:
Cleanup
mysql-test/suite/funcs_1/t/myisam_storedproc_02.test:
Cleanup
mysql-test/suite/funcs_1/t/myisam_storedproc_03.test:
Cleanup
mysql-test/suite/funcs_1/t/myisam_storedproc_06.test:
Cleanup
mysql-test/suite/funcs_1/t/myisam_storedproc_07.test:
Cleanup
mysql-test/suite/funcs_1/t/myisam_storedproc_08.test:
Cleanup
mysql-test/suite/funcs_1/t/myisam_storedproc_10.test:
Cleanup
mysql-test/suite/funcs_1/triggers/trig_frkey2.inc:
Cleanup
mysql-test/suite/funcs_1/triggers/triggers_0102.inc:
Cleanup
mysql-test/suite/funcs_1/triggers/triggers_03.inc:
Backport from 5.1
mysql-test/suite/funcs_1/triggers/triggers_0407.inc:
Backport from 5.1
mysql-test/suite/funcs_1/triggers/triggers_08.inc:
Backport from 5.1
mysql-test/suite/funcs_1/triggers/triggers_09.inc:
Backport from 5.1
mysql-test/suite/funcs_1/triggers/triggers_1011ext.inc:
Backport from 5.1
mysql-test/suite/funcs_1/views/func_view.inc:
Backport from 5.1
mysql-test/suite/funcs_1/views/views_master.inc:
Cleanup
mysql-test/std_data/funcs_1/load_file.txt:
New BitKeeper file ``mysql-test/std_data/funcs_1/load_file.txt''
Diffstat (limited to 'mysql-test/suite')
113 files changed, 9087 insertions, 10856 deletions
diff --git a/mysql-test/suite/funcs_1/README.txt b/mysql-test/suite/funcs_1/README.txt index 7e98d1bc117..65f6226d0f2 100644 --- a/mysql-test/suite/funcs_1/README.txt +++ b/mysql-test/suite/funcs_1/README.txt @@ -25,7 +25,7 @@ SESSION_STATUS SESSION_VARIABLES -3. Some hints: +3. Some hints for maintainers of this suite: - SHOW TABLES ... LIKE '<pattern>' does a case sensitive comparison between the tablename and the pattern. @@ -43,4 +43,12 @@ ERROR 42000: Access denied for user ... to database 'information_schema' DROP DATABASE INFORMATION_SCHEMA; ERROR 42000: Access denied for user ... to database 'INFORMATION_SCHEMA' + - Try to unify results by + --replace_result $engine_type <engine_to_be_tested> + if we could expect that the results for storage engine variants of a + test differ only in the engine names. + This makes future maintenance easier. + - Avoid the use of include/show_msg*.inc. + They produce "SQL" noise which annoys during server debugging and can be + easy replaced by "--echo ...". diff --git a/mysql-test/suite/funcs_1/data/innodb_tb1.txt b/mysql-test/suite/funcs_1/data/innodb_tb1.txt deleted file mode 100644 index 4c20ed1661b..00000000000 --- a/mysql-test/suite/funcs_1/data/innodb_tb1.txt +++ /dev/null @@ -1,10 +0,0 @@ - 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 diff --git a/mysql-test/suite/funcs_1/data/innodb_tb2.txt b/mysql-test/suite/funcs_1/data/innodb_tb2.txt deleted file mode 100644 index 8ae7dea6df4..00000000000 --- a/mysql-test/suite/funcs_1/data/innodb_tb2.txt +++ /dev/null @@ -1,10 +0,0 @@ -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 diff --git a/mysql-test/suite/funcs_1/data/innodb_tb3.txt b/mysql-test/suite/funcs_1/data/innodb_tb3.txt deleted file mode 100644 index a01cc36da54..00000000000 --- a/mysql-test/suite/funcs_1/data/innodb_tb3.txt +++ /dev/null @@ -1,10 +0,0 @@ -! ! ! 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 diff --git a/mysql-test/suite/funcs_1/data/innodb_tb4.txt b/mysql-test/suite/funcs_1/data/innodb_tb4.txt deleted file mode 100644 index 5092371d093..00000000000 --- a/mysql-test/suite/funcs_1/data/innodb_tb4.txt +++ /dev/null @@ -1,10 +0,0 @@ -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)_+=-|{}[] diff --git a/mysql-test/suite/funcs_1/data/memory_tb1.txt b/mysql-test/suite/funcs_1/data/memory_tb1.txt deleted file mode 100644 index e266c70f9b8..00000000000 --- a/mysql-test/suite/funcs_1/data/memory_tb1.txt +++ /dev/null @@ -1,10 +0,0 @@ -! ! ! ! 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 diff --git a/mysql-test/suite/funcs_1/data/memory_tb2.txt b/mysql-test/suite/funcs_1/data/memory_tb2.txt deleted file mode 100644 index 8ae7dea6df4..00000000000 --- a/mysql-test/suite/funcs_1/data/memory_tb2.txt +++ /dev/null @@ -1,10 +0,0 @@ -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 diff --git a/mysql-test/suite/funcs_1/data/memory_tb3.txt b/mysql-test/suite/funcs_1/data/memory_tb3.txt deleted file mode 100644 index 2c0433304a8..00000000000 --- a/mysql-test/suite/funcs_1/data/memory_tb3.txt +++ /dev/null @@ -1,10 +0,0 @@ -! ! ! ! ! ! 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 diff --git a/mysql-test/suite/funcs_1/data/memory_tb4.txt b/mysql-test/suite/funcs_1/data/memory_tb4.txt deleted file mode 100644 index 5a0f0da3415..00000000000 --- a/mysql-test/suite/funcs_1/data/memory_tb4.txt +++ /dev/null @@ -1,10 +0,0 @@ -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)_+=-|{}[ diff --git a/mysql-test/suite/funcs_1/data/myisam_tb1.txt b/mysql-test/suite/funcs_1/data/myisam_tb1.txt deleted file mode 100644 index da21f6c71d0..00000000000 --- a/mysql-test/suite/funcs_1/data/myisam_tb1.txt +++ /dev/null @@ -1,10 +0,0 @@ -! ! ! 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 diff --git a/mysql-test/suite/funcs_1/data/myisam_tb2.txt b/mysql-test/suite/funcs_1/data/myisam_tb2.txt deleted file mode 100644 index 4fb43f72a1c..00000000000 --- a/mysql-test/suite/funcs_1/data/myisam_tb2.txt +++ /dev/null @@ -1,10 +0,0 @@ -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 diff --git a/mysql-test/suite/funcs_1/data/myisam_tb3.txt b/mysql-test/suite/funcs_1/data/myisam_tb3.txt deleted file mode 100644 index 785e51e6b95..00000000000 --- a/mysql-test/suite/funcs_1/data/myisam_tb3.txt +++ /dev/null @@ -1,10 +0,0 @@ -! ! ! 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 diff --git a/mysql-test/suite/funcs_1/data/myisam_tb4.txt b/mysql-test/suite/funcs_1/data/myisam_tb4.txt deleted file mode 100644 index 510c6bd3cf9..00000000000 --- a/mysql-test/suite/funcs_1/data/myisam_tb4.txt +++ /dev/null @@ -1,10 +0,0 @@ -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 diff --git a/mysql-test/suite/funcs_1/data/t3.txt b/mysql-test/suite/funcs_1/data/t3.txt deleted file mode 100644 index a2287c20d43..00000000000 --- a/mysql-test/suite/funcs_1/data/t3.txt +++ /dev/null @@ -1,10 +0,0 @@ -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 diff --git a/mysql-test/suite/funcs_1/data/t4.txt b/mysql-test/suite/funcs_1/data/t4.txt deleted file mode 100644 index 4e2ab19b47c..00000000000 --- a/mysql-test/suite/funcs_1/data/t4.txt +++ /dev/null @@ -1,10 +0,0 @@ -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 diff --git a/mysql-test/suite/funcs_1/data/t7.txt b/mysql-test/suite/funcs_1/data/t7.txt deleted file mode 100644 index e3c9aa4c58f..00000000000 --- a/mysql-test/suite/funcs_1/data/t7.txt +++ /dev/null @@ -1,10 +0,0 @@ -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 diff --git a/mysql-test/suite/funcs_1/data/t9.txt b/mysql-test/suite/funcs_1/data/t9.txt deleted file mode 100644 index bac7a54fee5..00000000000 --- a/mysql-test/suite/funcs_1/data/t9.txt +++ /dev/null @@ -1,10 +0,0 @@ --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 diff --git a/mysql-test/suite/funcs_1/datadict/datadict_bug_12777.inc b/mysql-test/suite/funcs_1/datadict/datadict_bug_12777.inc index 0bca30b1dc3..5ba969fe4cb 100644 --- a/mysql-test/suite/funcs_1/datadict/datadict_bug_12777.inc +++ b/mysql-test/suite/funcs_1/datadict/datadict_bug_12777.inc @@ -2,7 +2,7 @@ # # 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, +# 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. @@ -10,10 +10,10 @@ # 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' +# 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 @@ -31,7 +31,7 @@ if ($bug_12777_0512) --replace_result 512 4096 1536 12288 } -# aix52, aix52-64bit, hp3750, hp3750-64bit, hpux11, hpux11-64bit, +# aix52, aix52-64bit, hp3750, hp3750-64bit, hpux11, hpux11-64bit, if ($bug_12777_1023) { # nnnn 3*n diff --git a/mysql-test/suite/funcs_1/datadict/datadict_load.inc b/mysql-test/suite/funcs_1/datadict/datadict_load.inc index 542f3bb8eb6..67b25b555ed 100644 --- a/mysql-test/suite/funcs_1/datadict/datadict_load.inc +++ b/mysql-test/suite/funcs_1/datadict/datadict_load.inc @@ -12,14 +12,14 @@ --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 +# 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' +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`; @@ -53,7 +53,7 @@ let $SERVER_NAME= `SELECT DISTINCT host FROM mysql.user WHERE host NOT In ("loca # load tables # ----------- # -# this was part of the 3 files $<engine>_datadict.test, but it has been moved +# 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. # ################################################################################ diff --git a/mysql-test/suite/funcs_1/include/innodb_tb1.inc b/mysql-test/suite/funcs_1/include/innodb_tb1.inc index 115d8b6318d..4fede496478 100644 --- a/mysql-test/suite/funcs_1/include/innodb_tb1.inc +++ b/mysql-test/suite/funcs_1/include/innodb_tb1.inc @@ -4,66 +4,67 @@ 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, +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, +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 ; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/innodb_tb1.txt' +into table tb1; diff --git a/mysql-test/suite/funcs_1/include/innodb_tb2.inc b/mysql-test/suite/funcs_1/include/innodb_tb2.inc index 99c09c1d963..b9a0910a0af 100644 --- a/mysql-test/suite/funcs_1/include/innodb_tb2.inc +++ b/mysql-test/suite/funcs_1/include/innodb_tb2.inc @@ -4,58 +4,60 @@ 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", +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 ; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/innodb_tb2.txt' +into table tb2; diff --git a/mysql-test/suite/funcs_1/include/innodb_tb3.inc b/mysql-test/suite/funcs_1/include/innodb_tb3.inc index d8397b2b581..b8562d7acf2 100644 --- a/mysql-test/suite/funcs_1/include/innodb_tb3.inc +++ b/mysql-test/suite/funcs_1/include/innodb_tb3.inc @@ -4,65 +4,67 @@ 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) +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 ; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/innodb_tb3.txt' +into table tb3; diff --git a/mysql-test/suite/funcs_1/include/innodb_tb4.inc b/mysql-test/suite/funcs_1/include/innodb_tb4.inc index 2cff9e57075..ef8fc240eca 100644 --- a/mysql-test/suite/funcs_1/include/innodb_tb4.inc +++ b/mysql-test/suite/funcs_1/include/innodb_tb4.inc @@ -4,56 +4,56 @@ 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"), +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), @@ -64,5 +64,7 @@ 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 ; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/innodb_tb4.txt' +into table tb4; diff --git a/mysql-test/suite/funcs_1/include/memory_tb1.inc b/mysql-test/suite/funcs_1/include/memory_tb1.inc index 7d66443c62f..3a4ebb0c484 100644 --- a/mysql-test/suite/funcs_1/include/memory_tb1.inc +++ b/mysql-test/suite/funcs_1/include/memory_tb1.inc @@ -4,57 +4,59 @@ 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, +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 ; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/memory_tb1.txt' +into table tb1; diff --git a/mysql-test/suite/funcs_1/include/memory_tb2.inc b/mysql-test/suite/funcs_1/include/memory_tb2.inc index 869a4904ce0..c059e565c64 100644 --- a/mysql-test/suite/funcs_1/include/memory_tb2.inc +++ b/mysql-test/suite/funcs_1/include/memory_tb2.inc @@ -4,58 +4,60 @@ 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", +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 ; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/memory_tb2.txt' +into table tb2 ; diff --git a/mysql-test/suite/funcs_1/include/memory_tb3.inc b/mysql-test/suite/funcs_1/include/memory_tb3.inc index 5aa56d06ede..b5d4bb93f12 100644 --- a/mysql-test/suite/funcs_1/include/memory_tb3.inc +++ b/mysql-test/suite/funcs_1/include/memory_tb3.inc @@ -4,60 +4,61 @@ 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) +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 ; - +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/memory_tb3.txt' +into table tb3; diff --git a/mysql-test/suite/funcs_1/include/memory_tb4.inc b/mysql-test/suite/funcs_1/include/memory_tb4.inc index 97bc04118bd..f9cc1d53c52 100644 --- a/mysql-test/suite/funcs_1/include/memory_tb4.inc +++ b/mysql-test/suite/funcs_1/include/memory_tb4.inc @@ -4,56 +4,56 @@ 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"), +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, @@ -63,5 +63,7 @@ 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 ; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/memory_tb4.txt' +into table tb4; diff --git a/mysql-test/suite/funcs_1/include/myisam_tb1.inc b/mysql-test/suite/funcs_1/include/myisam_tb1.inc index f2a8be4f5d6..da740cffaf3 100644 --- a/mysql-test/suite/funcs_1/include/myisam_tb1.inc +++ b/mysql-test/suite/funcs_1/include/myisam_tb1.inc @@ -4,65 +4,67 @@ 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, +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, +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 ; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/myisam_tb1.txt' +into table tb1; diff --git a/mysql-test/suite/funcs_1/include/myisam_tb2.inc b/mysql-test/suite/funcs_1/include/myisam_tb2.inc index 528031700cb..c878b1853f0 100644 --- a/mysql-test/suite/funcs_1/include/myisam_tb2.inc +++ b/mysql-test/suite/funcs_1/include/myisam_tb2.inc @@ -4,77 +4,79 @@ 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", +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 +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 +# 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 ; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/myisam_tb2.txt' +into table tb2; diff --git a/mysql-test/suite/funcs_1/include/myisam_tb3.inc b/mysql-test/suite/funcs_1/include/myisam_tb3.inc index aca35c0e11b..4ee6388f3bc 100644 --- a/mysql-test/suite/funcs_1/include/myisam_tb3.inc +++ b/mysql-test/suite/funcs_1/include/myisam_tb3.inc @@ -4,65 +4,67 @@ 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) +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 ; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/myisam_tb3.txt' +into table tb3; diff --git a/mysql-test/suite/funcs_1/include/myisam_tb4.inc b/mysql-test/suite/funcs_1/include/myisam_tb4.inc index d9051847c45..1f7d19fd061 100644 --- a/mysql-test/suite/funcs_1/include/myisam_tb4.inc +++ b/mysql-test/suite/funcs_1/include/myisam_tb4.inc @@ -4,64 +4,64 @@ 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), +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, @@ -75,14 +75,16 @@ f242 bit(30) # 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, +# 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 ; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/myisam_tb4.txt' +into table tb4; diff --git a/mysql-test/suite/funcs_1/include/sp_tb.inc b/mysql-test/suite/funcs_1/include/sp_tb.inc index b37f2cc7ffe..ae1114fb5f1 100644 --- a/mysql-test/suite/funcs_1/include/sp_tb.inc +++ b/mysql-test/suite/funcs_1/include/sp_tb.inc @@ -5,29 +5,46 @@ 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; +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 $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/t4.txt' INTO TABLE t1; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/t4.txt' INTO TABLE t2; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/t4.txt' INTO TABLE t4; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/t4.txt' INTO TABLE t10; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/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; +eval +CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = $engine_type; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/t3.txt' INTO TABLE t3; #--------------------------- @@ -37,9 +54,12 @@ drop database if exists test4; 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; +eval +CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) +ENGINE = $engine_type; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/t4.txt' INTO TABLE t6; #--------------------------- use test; @@ -47,18 +67,23 @@ 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; +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 $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/t7.txt' INTO TABLE t7; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/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; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/t9.txt' INTO TABLE t9; diff --git a/mysql-test/suite/funcs_1/r/innodb_func_view.result b/mysql-test/suite/funcs_1/r/innodb_func_view.result index f901bcf8246..c2689a36801 100644 --- a/mysql-test/suite/funcs_1/r/innodb_func_view.result +++ b/mysql-test/suite/funcs_1/r/innodb_func_view.result @@ -1,7 +1,3 @@ - -! Attention: The file with the expected results suffers from -Bug#10713: mysqldump includes database in create view and referenced tables --------------------------------------------------------------------------------- DROP TABLE IF EXISTS t1_selects, t1_modes, t1_values; DROP VIEW IF EXISTS v1; CREATE TABLE t1_values @@ -9,7 +5,7 @@ CREATE TABLE t1_values id BIGINT AUTO_INCREMENT, select_id BIGINT, PRIMARY KEY(id) -) ENGINE = 'InnoDB' ; +) ENGINE = <engine_to_be_tested>; ALTER TABLE t1_values ADD my_char_30 CHAR(30); ALTER TABLE t1_values ADD my_varchar_1000 VARCHAR(1000); ALTER TABLE t1_values ADD my_binary_30 BINARY(30); @@ -39,10 +35,10 @@ my_bigint = -9223372036854775808, my_decimal = -9999999999999999999999999999999999.999999999999999999999999999999 , my_double = -1.7976931348623E+308; INSERT INTO t1_values SET -my_char_30 = '<--------30 characters------->', +my_char_30 = '<--------30 characters------->', my_varchar_1000 = CONCAT('<---------1000 characters', RPAD('',965,'-'),'--------->'), -my_binary_30 = '<--------30 characters------->', +my_binary_30 = '<--------30 characters------->', my_varbinary_1000 = CONCAT('<---------1000 characters', RPAD('',965,'-'),'--------->'), my_datetime = '9999-12-31 23:59:59', @@ -54,23 +50,23 @@ my_bigint = 9223372036854775807, my_decimal = +9999999999999999999999999999999999.999999999999999999999999999999 , my_double = 1.7976931348623E+308; INSERT INTO t1_values SET -my_char_30 = ' ---äÖüß@µ*$-- ', -my_varchar_1000 = ' ---äÖüß@µ*$-- ', -my_binary_30 = ' ---äÖüß@µ*$-- ', -my_varbinary_1000 = ' ---äÖüß@µ*$-- ', +my_char_30 = ' ---äÖüß@µ*$-- ', +my_varchar_1000 = ' ---äÖüß@µ*$-- ', +my_binary_30 = ' ---äÖüß@µ*$-- ', +my_varbinary_1000 = ' ---äÖüß@µ*$-- ', my_datetime = '2004-02-29 23:59:59', my_date = '2004-02-29', my_timestamp = '2004-02-29 23:59:59', my_time = '13:00:00', my_year = 2000, -my_bigint = 0, +my_bigint = 0, my_decimal = 0.0, my_double = 0; INSERT INTO t1_values SET -my_char_30 = '-1', -my_varchar_1000 = '-1', -my_binary_30 = '-1', -my_varbinary_1000 = '-1', +my_char_30 = '-1', +my_varchar_1000 = '-1', +my_binary_30 = '-1', +my_varbinary_1000 = '-1', my_datetime = '2005-06-28 10:00:00', my_date = '2005-06-28', my_timestamp = '2005-06-28 10:00:00', @@ -89,6 +85,9 @@ INSERT INTO t1_values SET select_id = @select_id, my_bigint = 4; INSERT INTO t1_values SET select_id = @select_id, my_bigint = -25; +##### 1.1.1. CAST --> BINARY +##### 1.1.2. CAST --> CHAR +##### 1.1.3. CAST --> DATE INSERT INTO t1_values SET select_id = @select_id, my_char_30 = '2005-06-27'; INSERT INTO t1_values SET select_id = @select_id, @@ -101,6 +100,7 @@ INSERT INTO t1_values SET select_id = @select_id, my_bigint = 20050627; INSERT INTO t1_values SET select_id = @select_id, my_double = +20.050627E+6; +##### 1.1.4. CAST --> DATETIME INSERT INTO t1_values SET select_id = @select_id, my_char_30 = '2005-06-27 17:58'; INSERT INTO t1_values SET select_id = @select_id, @@ -113,6 +113,7 @@ INSERT INTO t1_values SET select_id = @select_id, my_bigint = 200506271758; INSERT INTO t1_values SET select_id = @select_id, my_double = +0.0200506271758E+13; +##### 1.1.5. CAST --> TIME INSERT INTO t1_values SET select_id = @select_id, my_char_30 = '1 17:58'; INSERT INTO t1_values SET select_id = @select_id, @@ -123,10 +124,9 @@ INSERT INTO t1_values SET select_id = @select_id, my_varbinary_1000 = '1 17:58'; INSERT INTO t1_values SET select_id = @select_id, my_bigint = 1758; - -some statements disabled because of -Bug#12440: CAST(data type DOUBLE AS TIME) strange results --------------------------------------------------------------------------------- +INSERT INTO t1_values SET select_id = @select_id, +my_double = +1.758E+3; +##### 1.1.6. CAST --> DECIMAL INSERT INTO t1_values SET select_id = @select_id, my_char_30 = '-3333.3333'; INSERT INTO t1_values SET select_id = @select_id, @@ -135,51 +135,39 @@ INSERT INTO t1_values SET select_id = @select_id, my_binary_30 = '-3333.3333'; INSERT INTO t1_values SET select_id = @select_id, my_varbinary_1000 = '-3333.3333'; - -some statements disabled because of -Bug#13349: CAST(1.0E+300 TO DECIMAL) returns wrong result + diff little/big endian --------------------------------------------------------------------------------- +INSERT INTO t1_values SET select_id = @select_id, +my_double = -0.33333333E+4; +##### 1.1.7. CAST --> SIGNED INTEGER "Attention: CAST --> SIGNED INTEGER - The file with expected results suffers from - Bug#5083 Big integer values are inserted as negative into - decimal/string columns Bug#5913 Traditional mode: BIGINT range not correctly delimited - Both have the status: To be fixed later" --------------------------------------------------------------------------------- - -some statements disabled because of -Bug #13344: CAST(1E+300 TO signed int) on little endian CPU, wrong result + Status: To be fixed later" -------------------------------------------------------------------------------- +##### 1.1.8. CAST --> UNSIGNED INTEGER "Attention: CAST --> UNSIGNED INTEGER - The file with expected results suffers from Bug 5083 5913 9809" + The file with expected results suffers from Bug 5913" -------------------------------------------------------------------------------- some statements disabled because of -Bugs#8663: cant use bgint unsigned as input to cast +Bug#5913 Traditional mode: BIGINT range not correctly delimited -------------------------------------------------------------------------------- -SET @my_select = 'SELECT CONVERT(my_char_30 USING utf8), +SET @my_select = 'SELECT CONVERT(my_char_30 USING utf8), my_char_30, id FROM t1_values'; -SET @my_select = 'SELECT CONVERT(my_varchar_1000 USING utf8), +SET @my_select = 'SELECT CONVERT(my_varchar_1000 USING utf8), my_varchar_1000, id FROM t1_values'; -SET @my_select = 'SELECT CONVERT(my_binary_30 USING utf8), +SET @my_select = 'SELECT CONVERT(my_binary_30 USING utf8), my_binary_30, id FROM t1_values'; -SET @my_select = 'SELECT CONVERT(my_varbinary_1000 USING utf8), +SET @my_select = 'SELECT CONVERT(my_varbinary_1000 USING utf8), my_varbinary_1000, id FROM t1_values'; -SET @my_select = 'SELECT CONVERT(my_char_30 USING koi8r), +SET @my_select = 'SELECT CONVERT(my_char_30 USING koi8r), my_char_30, id FROM t1_values'; -SET @my_select = 'SELECT CONVERT(my_varchar_1000 USING koi8r), +SET @my_select = 'SELECT CONVERT(my_varchar_1000 USING koi8r), my_varchar_1000, id FROM t1_values'; -SET @my_select = 'SELECT CONVERT(my_binary_30 USING koi8r), +SET @my_select = 'SELECT CONVERT(my_binary_30 USING koi8r), my_binary_30, id FROM t1_values'; -SET @my_select = 'SELECT CONVERT(my_varbinary_1000 USING koi8r), +SET @my_select = 'SELECT CONVERT(my_varbinary_1000 USING koi8r), my_varbinary_1000, id FROM t1_values'; - -"Attention: IF(my_year IS NULL, ... - The file with expected results suffers from - Bug#11689. successful CREATE VIEW but SELECT on view fails." --------------------------------------------------------------------------------- SET @my_select = 'SELECT BIT_LENGTH(my_char_30), my_char_30, id FROM t1_values'; SET @my_select = 'SELECT BIT_LENGTH(my_varchar_1000), @@ -192,22 +180,20 @@ SET @my_select = 'SELECT INSTR(my_char_30, ''char''), my_char_30, id FROM t1_values'; SET @my_select = 'SELECT LCASE(my_varchar_1000), my_varchar_1000, id FROM t1_values'; -SET @my_select = +SET @my_select = 'SELECT LEFT(my_char_30, 2), my_char_30, id FROM t1_values'; -SET @my_select = +SET @my_select = 'SELECT LEFT(my_varchar_1000, 2), my_varchar_1000, id FROM t1_values'; -SET @my_select = +SET @my_select = 'SELECT LEFT(my_binary_30, 2), my_binary_30, id FROM t1_values'; -SET @my_select = +SET @my_select = 'SELECT LEFT(my_varbinary_1000, 2), my_varbinary_1000, id FROM t1_values'; - -"Attention: LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', <numeric column>) - The file with expected results suffers from Bug 10963 11728" - and the testcases with length = BIGINT or DOUBLE column are deactivated, -because there are 32/64 Bit differences --------------------------------------------------------------------------------- +SET @my_select = +'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_bigint), my_bigint, id FROM t1_values'; SET @my_select = 'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_decimal), my_decimal, id FROM t1_values'; +SET @my_select = +'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_double), my_double, id FROM t1_values'; SET @my_select = 'SELECT LENGTH(my_char_30), my_char_30, id FROM t1_values'; SET @my_select = 'SELECT LENGTH(my_varchar_1000), @@ -216,8 +202,10 @@ SET @my_select = 'SELECT LENGTH(my_binary_30), my_binary_30, id FROM t1_values'; SET @my_select = 'SELECT LENGTH(my_varbinary_1000), my_varbinary_1000, id FROM t1_values'; -SET @my_select = -'SELECT LOAD_FILE(''../log/current_test''), id FROM t1_values'; +SET @my_select = +'SELECT LOAD_FILE(''<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/load_file.txt'') + AS my_col, + id FROM t1_values'; SET @my_select = 'SELECT LOCATE(''char'', my_char_30), my_char_30, id FROM t1_values'; SET @my_select = 'SELECT LOCATE(''char'', my_varchar_1000), @@ -299,19 +287,19 @@ SET sql_mode = ''; -------------------------------------------------------------------------------- CREATE VIEW v1 AS SELECT my_char_30, id FROM t1_values; SELECT my_char_30, id FROM t1_values -WHERE select_id = 187 OR select_id IS NULL; +WHERE select_id = 193 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 187 OR select_id IS NULL); +WHERE select_id = 193 OR select_id IS NULL) order by id; DROP VIEW v1; CREATE VIEW v1 AS SELECT CONCAT('A',my_char_30), my_char_30, id FROM t1_values; SELECT CONCAT('A',my_char_30), my_char_30, id FROM t1_values -WHERE select_id = 186 OR select_id IS NULL; +WHERE select_id = 192 OR select_id IS NULL order by id; CONCAT('A',my_char_30) my_char_30 id NULL NULL 1 A 2 @@ -323,7 +311,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select concat(_latin1'A',`t1_values`.`my_char_30`) AS `CONCAT('A',my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 186 OR select_id IS NULL); +WHERE select_id = 192 OR select_id IS NULL) order by id; CONCAT('A',my_char_30) my_char_30 id NULL NULL 1 A 2 @@ -337,13 +325,13 @@ CREATE VIEW v1 AS SELECT LTRIM(my_varbinary_1000), my_varbinary_1000, id FROM t1_values; SELECT LTRIM(my_varbinary_1000), my_varbinary_1000, id FROM t1_values -WHERE select_id = 185 OR select_id IS NULL; +WHERE select_id = 191 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_varbinary_1000`) AS `LTRIM(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 185 OR select_id IS NULL); +WHERE select_id = 191 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -351,13 +339,13 @@ CREATE VIEW v1 AS SELECT LTRIM(my_binary_30), my_binary_30, id FROM t1_values; SELECT LTRIM(my_binary_30), my_binary_30, id FROM t1_values -WHERE select_id = 184 OR select_id IS NULL; +WHERE select_id = 190 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_binary_30`) AS `LTRIM(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 184 OR select_id IS NULL); +WHERE select_id = 190 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -365,13 +353,13 @@ CREATE VIEW v1 AS SELECT LTRIM(my_varchar_1000), my_varchar_1000, id FROM t1_values; SELECT LTRIM(my_varchar_1000), my_varchar_1000, id FROM t1_values -WHERE select_id = 183 OR select_id IS NULL; +WHERE select_id = 189 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_varchar_1000`) AS `LTRIM(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 183 OR select_id IS NULL); +WHERE select_id = 189 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -379,13 +367,13 @@ CREATE VIEW v1 AS SELECT LTRIM(my_char_30), my_char_30, id FROM t1_values; SELECT LTRIM(my_char_30), my_char_30, id FROM t1_values -WHERE select_id = 182 OR select_id IS NULL; +WHERE select_id = 188 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_char_30`) AS `LTRIM(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 182 OR select_id IS NULL); +WHERE select_id = 188 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -393,13 +381,13 @@ CREATE VIEW v1 AS SELECT LOWER(my_varbinary_1000), my_varbinary_1000, id FROM t1_values; SELECT LOWER(my_varbinary_1000), my_varbinary_1000, id FROM t1_values -WHERE select_id = 181 OR select_id IS NULL; +WHERE select_id = 187 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varbinary_1000`) AS `LOWER(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 181 OR select_id IS NULL); +WHERE select_id = 187 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -407,13 +395,13 @@ CREATE VIEW v1 AS SELECT LOWER(my_binary_30), my_binary_30, id FROM t1_values; SELECT LOWER(my_binary_30), my_binary_30, id FROM t1_values -WHERE select_id = 180 OR select_id IS NULL; +WHERE select_id = 186 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_binary_30`) AS `LOWER(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 180 OR select_id IS NULL); +WHERE select_id = 186 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -421,13 +409,13 @@ CREATE VIEW v1 AS SELECT LOWER(my_varchar_1000), my_varchar_1000, id FROM t1_values; SELECT LOWER(my_varchar_1000), my_varchar_1000, id FROM t1_values -WHERE select_id = 179 OR select_id IS NULL; +WHERE select_id = 185 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varchar_1000`) AS `LOWER(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 179 OR select_id IS NULL); +WHERE select_id = 185 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -435,13 +423,13 @@ CREATE VIEW v1 AS SELECT LOWER(my_char_30), my_char_30, id FROM t1_values; SELECT LOWER(my_char_30), my_char_30, id FROM t1_values -WHERE select_id = 178 OR select_id IS NULL; +WHERE select_id = 184 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_char_30`) AS `LOWER(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 178 OR select_id IS NULL); +WHERE select_id = 184 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -449,13 +437,13 @@ CREATE VIEW v1 AS SELECT LOCATE('-', ' - -ABC', my_decimal), my_decimal, id FROM t1_values; SELECT LOCATE('-', ' - -ABC', my_decimal), my_decimal, id FROM t1_values -WHERE select_id = 177 OR select_id IS NULL; +WHERE select_id = 183 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',_latin1' - -ABC',`t1_values`.`my_decimal`) AS `LOCATE('-', ' - -ABC', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 177 OR select_id IS NULL); +WHERE select_id = 183 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -463,13 +451,13 @@ CREATE VIEW v1 AS SELECT LOCATE('-', ' - -ABC', my_double), my_double, id FROM t1_values; SELECT LOCATE('-', ' - -ABC', my_double), my_double, id FROM t1_values -WHERE select_id = 176 OR select_id IS NULL; +WHERE select_id = 182 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',_latin1' - -ABC',`t1_values`.`my_double`) AS `LOCATE('-', ' - -ABC', my_double)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 176 OR select_id IS NULL); +WHERE select_id = 182 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -477,13 +465,13 @@ CREATE VIEW v1 AS SELECT LOCATE('-', ' - -ABC', my_bigint), my_bigint, id FROM t1_values; SELECT LOCATE('-', ' - -ABC', my_bigint), my_bigint, id FROM t1_values -WHERE select_id = 175 OR select_id IS NULL; +WHERE select_id = 181 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',_latin1' - -ABC',`t1_values`.`my_bigint`) AS `LOCATE('-', ' - -ABC', my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 175 OR select_id IS NULL); +WHERE select_id = 181 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -491,13 +479,13 @@ CREATE VIEW v1 AS SELECT LOCATE('-', my_varbinary_1000, 3), my_varbinary_1000, id FROM t1_values; SELECT LOCATE('-', my_varbinary_1000, 3), my_varbinary_1000, id FROM t1_values -WHERE select_id = 174 OR select_id IS NULL; +WHERE select_id = 180 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',`t1_values`.`my_varbinary_1000`,3) AS `LOCATE('-', my_varbinary_1000, 3)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 174 OR select_id IS NULL); +WHERE select_id = 180 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -505,13 +493,13 @@ CREATE VIEW v1 AS SELECT LOCATE('-', my_binary_30, 3), my_binary_30, id FROM t1_values; SELECT LOCATE('-', my_binary_30, 3), my_binary_30, id FROM t1_values -WHERE select_id = 173 OR select_id IS NULL; +WHERE select_id = 179 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',`t1_values`.`my_binary_30`,3) AS `LOCATE('-', my_binary_30, 3)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 173 OR select_id IS NULL); +WHERE select_id = 179 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -519,13 +507,13 @@ CREATE VIEW v1 AS SELECT LOCATE('-', my_varchar_1000, 3), my_varchar_1000, id FROM t1_values; SELECT LOCATE('-', my_varchar_1000, 3), my_varchar_1000, id FROM t1_values -WHERE select_id = 172 OR select_id IS NULL; +WHERE select_id = 178 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',`t1_values`.`my_varchar_1000`,3) AS `LOCATE('-', my_varchar_1000, 3)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 172 OR select_id IS NULL); +WHERE select_id = 178 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -533,13 +521,13 @@ CREATE VIEW v1 AS SELECT LOCATE('-', my_char_30, 3), my_char_30, id FROM t1_values; SELECT LOCATE('-', my_char_30, 3), my_char_30, id FROM t1_values -WHERE select_id = 171 OR select_id IS NULL; +WHERE select_id = 177 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',`t1_values`.`my_char_30`,3) AS `LOCATE('-', my_char_30, 3)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 171 OR select_id IS NULL); +WHERE select_id = 177 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -547,13 +535,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_varbinary_1000, my_binary_30 ), my_varbinary_1000, my_binary_30 id FROM t1_values; SELECT LOCATE(my_varbinary_1000, my_binary_30 ), my_varbinary_1000, my_binary_30 id FROM t1_values -WHERE select_id = 170 OR select_id IS NULL; +WHERE select_id = 176 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_binary_30`) AS `LOCATE(my_varbinary_1000, my_binary_30 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_binary_30` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 170 OR select_id IS NULL); +WHERE select_id = 176 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -561,13 +549,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_varbinary_1000, my_varchar_1000 ), my_varbinary_1000, my_varchar_1000 id FROM t1_values; SELECT LOCATE(my_varbinary_1000, my_varchar_1000 ), my_varbinary_1000, my_varchar_1000 id FROM t1_values -WHERE select_id = 169 OR select_id IS NULL; +WHERE select_id = 175 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_varbinary_1000, my_varchar_1000 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 169 OR select_id IS NULL); +WHERE select_id = 175 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -575,13 +563,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_varbinary_1000, my_char_30 ), my_varbinary_1000, my_char_30 id FROM t1_values; SELECT LOCATE(my_varbinary_1000, my_char_30 ), my_varbinary_1000, my_char_30 id FROM t1_values -WHERE select_id = 168 OR select_id IS NULL; +WHERE select_id = 174 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_char_30`) AS `LOCATE(my_varbinary_1000, my_char_30 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_char_30` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 168 OR select_id IS NULL); +WHERE select_id = 174 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -589,13 +577,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_varbinary_1000, my_varbinary_1000 ), my_varbinary_1000, id FROM t1_values; SELECT LOCATE(my_varbinary_1000, my_varbinary_1000 ), my_varbinary_1000, id FROM t1_values -WHERE select_id = 167 OR select_id IS NULL; +WHERE select_id = 173 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_varbinary_1000, my_varbinary_1000 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 167 OR select_id IS NULL); +WHERE select_id = 173 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -603,13 +591,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_binary_30, my_varbinary_1000 ), my_binary_30, my_varbinary_1000 id FROM t1_values; SELECT LOCATE(my_binary_30, my_varbinary_1000 ), my_binary_30, my_varbinary_1000 id FROM t1_values -WHERE select_id = 166 OR select_id IS NULL; +WHERE select_id = 172 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_binary_30, my_varbinary_1000 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 166 OR select_id IS NULL); +WHERE select_id = 172 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -617,13 +605,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_binary_30, my_varchar_1000 ), my_binary_30, my_varchar_1000 id FROM t1_values; SELECT LOCATE(my_binary_30, my_varchar_1000 ), my_binary_30, my_varchar_1000 id FROM t1_values -WHERE select_id = 165 OR select_id IS NULL; +WHERE select_id = 171 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_binary_30, my_varchar_1000 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 165 OR select_id IS NULL); +WHERE select_id = 171 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -631,13 +619,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_binary_30, my_char_30 ), my_binary_30, my_char_30 id FROM t1_values; SELECT LOCATE(my_binary_30, my_char_30 ), my_binary_30, my_char_30 id FROM t1_values -WHERE select_id = 164 OR select_id IS NULL; +WHERE select_id = 170 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_char_30`) AS `LOCATE(my_binary_30, my_char_30 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_char_30` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 164 OR select_id IS NULL); +WHERE select_id = 170 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -645,13 +633,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_binary_30, my_binary_30 ), my_binary_30, id FROM t1_values; SELECT LOCATE(my_binary_30, my_binary_30 ), my_binary_30, id FROM t1_values -WHERE select_id = 163 OR select_id IS NULL; +WHERE select_id = 169 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_binary_30`) AS `LOCATE(my_binary_30, my_binary_30 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 163 OR select_id IS NULL); +WHERE select_id = 169 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -659,13 +647,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_varchar_1000, my_varbinary_1000 ), my_varchar_1000, my_varbinary_1000 id FROM t1_values; SELECT LOCATE(my_varchar_1000, my_varbinary_1000 ), my_varchar_1000, my_varbinary_1000 id FROM t1_values -WHERE select_id = 162 OR select_id IS NULL; +WHERE select_id = 168 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_varchar_1000, my_varbinary_1000 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 162 OR select_id IS NULL); +WHERE select_id = 168 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -673,13 +661,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_varchar_1000, my_binary_30 ), my_varchar_1000, my_binary_30 id FROM t1_values; SELECT LOCATE(my_varchar_1000, my_binary_30 ), my_varchar_1000, my_binary_30 id FROM t1_values -WHERE select_id = 161 OR select_id IS NULL; +WHERE select_id = 167 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_binary_30`) AS `LOCATE(my_varchar_1000, my_binary_30 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_binary_30` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 161 OR select_id IS NULL); +WHERE select_id = 167 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -687,13 +675,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_varchar_1000, my_char_30 ), my_varchar_1000, my_char_30 id FROM t1_values; SELECT LOCATE(my_varchar_1000, my_char_30 ), my_varchar_1000, my_char_30 id FROM t1_values -WHERE select_id = 160 OR select_id IS NULL; +WHERE select_id = 166 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_char_30`) AS `LOCATE(my_varchar_1000, my_char_30 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_char_30` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 160 OR select_id IS NULL); +WHERE select_id = 166 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -701,13 +689,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_varchar_1000, my_varchar_1000 ), my_varchar_1000, id FROM t1_values; SELECT LOCATE(my_varchar_1000, my_varchar_1000 ), my_varchar_1000, id FROM t1_values -WHERE select_id = 159 OR select_id IS NULL; +WHERE select_id = 165 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_varchar_1000, my_varchar_1000 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 159 OR select_id IS NULL); +WHERE select_id = 165 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -715,13 +703,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_char_30, my_varbinary_1000 ), my_char_30, my_varbinary_1000 id FROM t1_values; SELECT LOCATE(my_char_30, my_varbinary_1000 ), my_char_30, my_varbinary_1000 id FROM t1_values -WHERE select_id = 158 OR select_id IS NULL; +WHERE select_id = 164 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_char_30, my_varbinary_1000 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 158 OR select_id IS NULL); +WHERE select_id = 164 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -729,13 +717,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_char_30, my_binary_30 ), my_char_30, my_binary_30 id FROM t1_values; SELECT LOCATE(my_char_30, my_binary_30 ), my_char_30, my_binary_30 id FROM t1_values -WHERE select_id = 157 OR select_id IS NULL; +WHERE select_id = 163 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_binary_30`) AS `LOCATE(my_char_30, my_binary_30 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_binary_30` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 157 OR select_id IS NULL); +WHERE select_id = 163 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -743,13 +731,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_char_30, my_varchar_1000 ), my_char_30, my_varchar_1000 id FROM t1_values; SELECT LOCATE(my_char_30, my_varchar_1000 ), my_char_30, my_varchar_1000 id FROM t1_values -WHERE select_id = 156 OR select_id IS NULL; +WHERE select_id = 162 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_char_30, my_varchar_1000 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 156 OR select_id IS NULL); +WHERE select_id = 162 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -757,13 +745,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_char_30, my_char_30 ), my_char_30, id FROM t1_values; SELECT LOCATE(my_char_30, my_char_30 ), my_char_30, id FROM t1_values -WHERE select_id = 155 OR select_id IS NULL; +WHERE select_id = 161 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_char_30`) AS `LOCATE(my_char_30, my_char_30 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 155 OR select_id IS NULL); +WHERE select_id = 161 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -771,13 +759,13 @@ CREATE VIEW v1 AS SELECT LOCATE('char', my_varbinary_1000), my_varbinary_1000, id FROM t1_values; SELECT LOCATE('char', my_varbinary_1000), my_varbinary_1000, id FROM t1_values -WHERE select_id = 154 OR select_id IS NULL; +WHERE select_id = 160 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'char',`t1_values`.`my_varbinary_1000`) AS `LOCATE('char', my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 154 OR select_id IS NULL); +WHERE select_id = 160 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -785,13 +773,13 @@ CREATE VIEW v1 AS SELECT LOCATE('char', my_binary_30), my_binary_30, id FROM t1_values; SELECT LOCATE('char', my_binary_30), my_binary_30, id FROM t1_values -WHERE select_id = 153 OR select_id IS NULL; +WHERE select_id = 159 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'char',`t1_values`.`my_binary_30`) AS `LOCATE('char', my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 153 OR select_id IS NULL); +WHERE select_id = 159 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -799,13 +787,13 @@ CREATE VIEW v1 AS SELECT LOCATE('char', my_varchar_1000), my_varchar_1000, id FROM t1_values; SELECT LOCATE('char', my_varchar_1000), my_varchar_1000, id FROM t1_values -WHERE select_id = 152 OR select_id IS NULL; +WHERE select_id = 158 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'char',`t1_values`.`my_varchar_1000`) AS `LOCATE('char', my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 152 OR select_id IS NULL); +WHERE select_id = 158 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -813,46 +801,50 @@ CREATE VIEW v1 AS SELECT LOCATE('char', my_char_30), my_char_30, id FROM t1_values; SELECT LOCATE('char', my_char_30), my_char_30, id FROM t1_values -WHERE select_id = 151 OR select_id IS NULL; +WHERE select_id = 157 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'char',`t1_values`.`my_char_30`) AS `LOCATE('char', my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 151 OR select_id IS NULL); +WHERE select_id = 157 OR select_id IS NULL) order by id; DROP VIEW v1; -CREATE VIEW v1 AS SELECT LOAD_FILE('../log/current_test'), id FROM t1_values; -SELECT LOAD_FILE('../log/current_test'), id FROM t1_values -WHERE select_id = 150 OR select_id IS NULL; -LOAD_FILE('../log/current_test') id -CURRENT_TEST: innodb_func_view +CREATE VIEW v1 AS SELECT LOAD_FILE('<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/load_file.txt') + AS my_col, + id FROM t1_values; +SELECT LOAD_FILE('<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/load_file.txt') + AS my_col, + id FROM t1_values +WHERE select_id = 156 OR select_id IS NULL order by id; +my_col id +Here is content from load_file 1 -CURRENT_TEST: innodb_func_view +Here is content from load_file 2 -CURRENT_TEST: innodb_func_view +Here is content from load_file 3 -CURRENT_TEST: innodb_func_view +Here is content from load_file 4 -CURRENT_TEST: innodb_func_view +Here is content from load_file 5 SHOW CREATE VIEW v1; View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select load_file(_latin1'../log/current_test') AS `LOAD_FILE('../log/current_test')`,`t1_values`.`id` AS `id` from `t1_values` +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select load_file(_latin1'<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/load_file.txt') AS `my_col`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 150 OR select_id IS NULL); -LOAD_FILE('../log/current_test') id -CURRENT_TEST: innodb_func_view +WHERE select_id = 156 OR select_id IS NULL) order by id; +my_col id +Here is content from load_file 1 -CURRENT_TEST: innodb_func_view +Here is content from load_file 2 -CURRENT_TEST: innodb_func_view +Here is content from load_file 3 -CURRENT_TEST: innodb_func_view +Here is content from load_file 4 -CURRENT_TEST: innodb_func_view +Here is content from load_file 5 DROP VIEW v1; @@ -861,13 +853,13 @@ CREATE VIEW v1 AS SELECT LENGTH(my_varbinary_1000), my_varbinary_1000, id FROM t1_values; SELECT LENGTH(my_varbinary_1000), my_varbinary_1000, id FROM t1_values -WHERE select_id = 149 OR select_id IS NULL; +WHERE select_id = 155 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_varbinary_1000`) AS `LENGTH(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 149 OR select_id IS NULL); +WHERE select_id = 155 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -875,13 +867,13 @@ CREATE VIEW v1 AS SELECT LENGTH(my_binary_30), my_binary_30, id FROM t1_values; SELECT LENGTH(my_binary_30), my_binary_30, id FROM t1_values -WHERE select_id = 148 OR select_id IS NULL; +WHERE select_id = 154 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_binary_30`) AS `LENGTH(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 148 OR select_id IS NULL); +WHERE select_id = 154 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -889,13 +881,13 @@ CREATE VIEW v1 AS SELECT LENGTH(my_varchar_1000), my_varchar_1000, id FROM t1_values; SELECT LENGTH(my_varchar_1000), my_varchar_1000, id FROM t1_values -WHERE select_id = 147 OR select_id IS NULL; +WHERE select_id = 153 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_varchar_1000`) AS `LENGTH(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 147 OR select_id IS NULL); +WHERE select_id = 153 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -903,19 +895,49 @@ CREATE VIEW v1 AS SELECT LENGTH(my_char_30), my_char_30, id FROM t1_values; SELECT LENGTH(my_char_30), my_char_30, id FROM t1_values -WHERE select_id = 146 OR select_id IS NULL; +WHERE select_id = 152 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_char_30`) AS `LENGTH(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 146 OR select_id IS NULL); +WHERE select_id = 152 OR select_id IS NULL) order by id; +DROP VIEW v1; + + +CREATE VIEW v1 AS SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double), my_double, id FROM t1_values; +SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double), my_double, id FROM t1_values +WHERE select_id = 151 OR select_id IS NULL order by id; +LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double) my_double id +NULL NULL 1 + -1.7976931348623e+308 2 +AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 1.7976931348623e+308 3 + 0 4 + -1 5 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' +Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' +SHOW CREATE VIEW v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(_latin1'AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_double`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +SELECT v1.* FROM v1 +WHERE v1.id IN (SELECT id FROM t1_values +WHERE select_id = 151 OR select_id IS NULL) order by id; +LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double) my_double id +NULL NULL 1 + -1.7976931348623e+308 2 +AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 1.7976931348623e+308 3 + 0 4 + -1 5 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' +Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' DROP VIEW v1; CREATE VIEW v1 AS SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal), my_decimal, id FROM t1_values; SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal), my_decimal, id FROM t1_values -WHERE select_id = 145 OR select_id IS NULL; +WHERE select_id = 150 OR select_id IS NULL order by id; LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal) my_decimal id NULL NULL 1 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -930,7 +952,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(_latin1'AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_decimal`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 145 OR select_id IS NULL); +WHERE select_id = 150 OR select_id IS NULL) order by id; LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal) my_decimal id NULL NULL 1 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -943,9 +965,33 @@ Error 1292 Truncated incorrect DECIMAL value: '' DROP VIEW v1; +CREATE VIEW v1 AS SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint), my_bigint, id FROM t1_values; +SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint), my_bigint, id FROM t1_values +WHERE select_id = 149 OR select_id IS NULL order by id; +LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint) my_bigint id +NULL NULL 1 + -9223372036854775808 2 +AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9223372036854775807 3 + 0 4 + -1 5 +SHOW CREATE VIEW v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(_latin1'AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_bigint`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +SELECT v1.* FROM v1 +WHERE v1.id IN (SELECT id FROM t1_values +WHERE select_id = 149 OR select_id IS NULL) order by id; +LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint) my_bigint id +NULL NULL 1 + -9223372036854775808 2 +AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9223372036854775807 3 + 0 4 + -1 5 +DROP VIEW v1; + + CREATE VIEW v1 AS SELECT LEFT(my_varbinary_1000, 2), my_varbinary_1000, id FROM t1_values; SELECT LEFT(my_varbinary_1000, 2), my_varbinary_1000, id FROM t1_values -WHERE select_id = 144 OR select_id IS NULL; +WHERE select_id = 148 OR select_id IS NULL order by id; LEFT(my_varbinary_1000, 2) my_varbinary_1000 id NULL NULL 1 2 @@ -957,7 +1003,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_varbinary_1000`,2) AS `LEFT(my_varbinary_1000, 2)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 144 OR select_id IS NULL); +WHERE select_id = 148 OR select_id IS NULL) order by id; LEFT(my_varbinary_1000, 2) my_varbinary_1000 id NULL NULL 1 2 @@ -969,19 +1015,19 @@ DROP VIEW v1; CREATE VIEW v1 AS SELECT LEFT(my_binary_30, 2), my_binary_30, id FROM t1_values; SELECT LEFT(my_binary_30, 2), my_binary_30, id FROM t1_values -WHERE select_id = 143 OR select_id IS NULL; +WHERE select_id = 147 OR select_id IS NULL order by id; LEFT(my_binary_30, 2) my_binary_30 id NULL NULL 1 - + 2 <- <--------30 characters-------> 3 - - ---äÖüß@µ*$-- --1 -1 + - ---äÖüß@µ*$-- 4 +-1 -1 5 SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_binary_30`,2) AS `LEFT(my_binary_30, 2)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 143 OR select_id IS NULL); +WHERE select_id = 147 OR select_id IS NULL) order by id; LEFT(my_binary_30, 2) my_binary_30 id NULL NULL 1 @@ -993,7 +1039,7 @@ DROP VIEW v1; CREATE VIEW v1 AS SELECT LEFT(my_varchar_1000, 2), my_varchar_1000, id FROM t1_values; SELECT LEFT(my_varchar_1000, 2), my_varchar_1000, id FROM t1_values -WHERE select_id = 142 OR select_id IS NULL; +WHERE select_id = 146 OR select_id IS NULL order by id; LEFT(my_varchar_1000, 2) my_varchar_1000 id NULL NULL 1 2 @@ -1005,7 +1051,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_varchar_1000`,2) AS `LEFT(my_varchar_1000, 2)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 142 OR select_id IS NULL); +WHERE select_id = 146 OR select_id IS NULL) order by id; LEFT(my_varchar_1000, 2) my_varchar_1000 id NULL NULL 1 2 @@ -1017,7 +1063,7 @@ DROP VIEW v1; CREATE VIEW v1 AS SELECT LEFT(my_char_30, 2), my_char_30, id FROM t1_values; SELECT LEFT(my_char_30, 2), my_char_30, id FROM t1_values -WHERE select_id = 141 OR select_id IS NULL; +WHERE select_id = 145 OR select_id IS NULL order by id; LEFT(my_char_30, 2) my_char_30 id NULL NULL 1 2 @@ -1029,7 +1075,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_char_30`,2) AS `LEFT(my_char_30, 2)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 141 OR select_id IS NULL); +WHERE select_id = 145 OR select_id IS NULL) order by id; LEFT(my_char_30, 2) my_char_30 id NULL NULL 1 2 @@ -1043,13 +1089,13 @@ CREATE VIEW v1 AS SELECT LCASE(my_varchar_1000), my_varchar_1000, id FROM t1_values; SELECT LCASE(my_varchar_1000), my_varchar_1000, id FROM t1_values -WHERE select_id = 140 OR select_id IS NULL; +WHERE select_id = 144 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varchar_1000`) AS `LCASE(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 140 OR select_id IS NULL); +WHERE select_id = 144 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -1057,13 +1103,13 @@ CREATE VIEW v1 AS SELECT INSTR(my_char_30, 'char'), my_char_30, id FROM t1_values; SELECT INSTR(my_char_30, 'char'), my_char_30, id FROM t1_values -WHERE select_id = 139 OR select_id IS NULL; +WHERE select_id = 143 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'char',`t1_values`.`my_char_30`) AS `INSTR(my_char_30, 'char')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 139 OR select_id IS NULL); +WHERE select_id = 143 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -1071,7 +1117,7 @@ CREATE VIEW v1 AS SELECT BIT_LENGTH(my_varbinary_1000), my_varbinary_1000, id FROM t1_values; SELECT BIT_LENGTH(my_varbinary_1000), my_varbinary_1000, id FROM t1_values -WHERE select_id = 138 OR select_id IS NULL; +WHERE select_id = 142 OR select_id IS NULL order by id; BIT_LENGTH(my_varbinary_1000) my_varbinary_1000 id NULL NULL 1 0 2 @@ -1083,7 +1129,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_varbinary_1000`) AS `BIT_LENGTH(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 138 OR select_id IS NULL); +WHERE select_id = 142 OR select_id IS NULL) order by id; BIT_LENGTH(my_varbinary_1000) my_varbinary_1000 id NULL NULL 1 0 2 @@ -1097,19 +1143,19 @@ CREATE VIEW v1 AS SELECT BIT_LENGTH(my_binary_30), my_binary_30, id FROM t1_values; SELECT BIT_LENGTH(my_binary_30), my_binary_30, id FROM t1_values -WHERE select_id = 137 OR select_id IS NULL; +WHERE select_id = 141 OR select_id IS NULL order by id; BIT_LENGTH(my_binary_30) my_binary_30 id NULL NULL 1 -240 +240 2 240 <--------30 characters-------> 3 -240 ---äÖüß@µ*$-- -240 -1 +240 ---äÖüß@µ*$-- 4 +240 -1 5 SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_binary_30`) AS `BIT_LENGTH(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 137 OR select_id IS NULL); +WHERE select_id = 141 OR select_id IS NULL) order by id; BIT_LENGTH(my_binary_30) my_binary_30 id NULL NULL 1 240 @@ -1123,7 +1169,7 @@ CREATE VIEW v1 AS SELECT BIT_LENGTH(my_varchar_1000), my_varchar_1000, id FROM t1_values; SELECT BIT_LENGTH(my_varchar_1000), my_varchar_1000, id FROM t1_values -WHERE select_id = 136 OR select_id IS NULL; +WHERE select_id = 140 OR select_id IS NULL order by id; BIT_LENGTH(my_varchar_1000) my_varchar_1000 id NULL NULL 1 0 2 @@ -1135,7 +1181,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_varchar_1000`) AS `BIT_LENGTH(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 136 OR select_id IS NULL); +WHERE select_id = 140 OR select_id IS NULL) order by id; BIT_LENGTH(my_varchar_1000) my_varchar_1000 id NULL NULL 1 0 2 @@ -1149,7 +1195,7 @@ CREATE VIEW v1 AS SELECT BIT_LENGTH(my_char_30), my_char_30, id FROM t1_values; SELECT BIT_LENGTH(my_char_30), my_char_30, id FROM t1_values -WHERE select_id = 135 OR select_id IS NULL; +WHERE select_id = 139 OR select_id IS NULL order by id; BIT_LENGTH(my_char_30) my_char_30 id NULL NULL 1 0 2 @@ -1161,7 +1207,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_char_30`) AS `BIT_LENGTH(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 135 OR select_id IS NULL); +WHERE select_id = 139 OR select_id IS NULL) order by id; BIT_LENGTH(my_char_30) my_char_30 id NULL NULL 1 0 2 @@ -1175,7 +1221,7 @@ CREATE VIEW v1 AS SELECT IFNULL(my_year,'IS_NULL'), my_year, id FROM t1_values; SELECT IFNULL(my_year,'IS_NULL'), my_year, id FROM t1_values -WHERE select_id = 134 OR select_id IS NULL; +WHERE select_id = 138 OR select_id IS NULL order by id; IFNULL(my_year,'IS_NULL') my_year id IS_NULL NULL 1 1901 1901 2 @@ -1187,7 +1233,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_year`,_latin1'IS_NULL') AS `IFNULL(my_year,'IS_NULL')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 134 OR select_id IS NULL); +WHERE select_id = 138 OR select_id IS NULL) order by id; IFNULL(my_year,'IS_NULL') my_year id IS_NULL NULL 1 1901 1901 2 @@ -1201,7 +1247,7 @@ CREATE VIEW v1 AS SELECT IFNULL(my_time,'IS_NULL'), my_time, id FROM t1_values; SELECT IFNULL(my_time,'IS_NULL'), my_time, id FROM t1_values -WHERE select_id = 133 OR select_id IS NULL; +WHERE select_id = 137 OR select_id IS NULL order by id; IFNULL(my_time,'IS_NULL') my_time id IS_NULL NULL 1 -838:59:59 -838:59:59 2 @@ -1213,7 +1259,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_time`,_latin1'IS_NULL') AS `IFNULL(my_time,'IS_NULL')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 133 OR select_id IS NULL); +WHERE select_id = 137 OR select_id IS NULL) order by id; IFNULL(my_time,'IS_NULL') my_time id IS_NULL NULL 1 -838:59:59 -838:59:59 2 @@ -1227,7 +1273,7 @@ CREATE VIEW v1 AS SELECT IFNULL(my_timestamp,'IS_NULL'), my_timestamp, id FROM t1_values; SELECT IFNULL(my_timestamp,'IS_NULL'), my_timestamp, id FROM t1_values -WHERE select_id = 132 OR select_id IS NULL; +WHERE select_id = 136 OR select_id IS NULL order by id; IFNULL(my_timestamp,'IS_NULL') my_timestamp id 0000-00-00 00:00:00 0000-00-00 00:00:00 1 1970-01-01 03:00:01 1970-01-01 03:00:01 2 @@ -1239,7 +1285,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_timestamp`,_latin1'IS_NULL') AS `IFNULL(my_timestamp,'IS_NULL')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 132 OR select_id IS NULL); +WHERE select_id = 136 OR select_id IS NULL) order by id; IFNULL(my_timestamp,'IS_NULL') my_timestamp id 0000-00-00 00:00:00 0000-00-00 00:00:00 1 1970-01-01 03:00:01 1970-01-01 03:00:01 2 @@ -1253,7 +1299,7 @@ CREATE VIEW v1 AS SELECT IFNULL(my_date,'IS_NULL'), my_date, id FROM t1_values; SELECT IFNULL(my_date,'IS_NULL'), my_date, id FROM t1_values -WHERE select_id = 131 OR select_id IS NULL; +WHERE select_id = 135 OR select_id IS NULL order by id; IFNULL(my_date,'IS_NULL') my_date id IS_NULL NULL 1 0001-01-01 0001-01-01 2 @@ -1265,7 +1311,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_date`,_latin1'IS_NULL') AS `IFNULL(my_date,'IS_NULL')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 131 OR select_id IS NULL); +WHERE select_id = 135 OR select_id IS NULL) order by id; IFNULL(my_date,'IS_NULL') my_date id IS_NULL NULL 1 0001-01-01 0001-01-01 2 @@ -1279,7 +1325,7 @@ CREATE VIEW v1 AS SELECT IFNULL(my_datetime,'IS_NULL'), my_datetime, id FROM t1_values; SELECT IFNULL(my_datetime,'IS_NULL'), my_datetime, id FROM t1_values -WHERE select_id = 130 OR select_id IS NULL; +WHERE select_id = 134 OR select_id IS NULL order by id; IFNULL(my_datetime,'IS_NULL') my_datetime id IS_NULL NULL 1 0001-01-01 00:00:00 0001-01-01 00:00:00 2 @@ -1291,7 +1337,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_datetime`,_latin1'IS_NULL') AS `IFNULL(my_datetime,'IS_NULL')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 130 OR select_id IS NULL); +WHERE select_id = 134 OR select_id IS NULL) order by id; IFNULL(my_datetime,'IS_NULL') my_datetime id IS_NULL NULL 1 0001-01-01 00:00:00 0001-01-01 00:00:00 2 @@ -1305,7 +1351,7 @@ CREATE VIEW v1 AS SELECT IFNULL(my_double,'IS_NULL'), my_double, id FROM t1_values; SELECT IFNULL(my_double,'IS_NULL'), my_double, id FROM t1_values -WHERE select_id = 129 OR select_id IS NULL; +WHERE select_id = 133 OR select_id IS NULL order by id; IFNULL(my_double,'IS_NULL') my_double id IS_NULL NULL 1 -1.7976931348623e+308 -1.7976931348623e+308 2 @@ -1317,7 +1363,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_double`,_latin1'IS_NULL') AS `IFNULL(my_double,'IS_NULL')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 129 OR select_id IS NULL); +WHERE select_id = 133 OR select_id IS NULL) order by id; IFNULL(my_double,'IS_NULL') my_double id IS_NULL NULL 1 -1.7976931348623e+308 -1.7976931348623e+308 2 @@ -1331,7 +1377,7 @@ CREATE VIEW v1 AS SELECT IFNULL(my_decimal,'IS_NULL'), my_decimal, id FROM t1_values; SELECT IFNULL(my_decimal,'IS_NULL'), my_decimal, id FROM t1_values -WHERE select_id = 128 OR select_id IS NULL; +WHERE select_id = 132 OR select_id IS NULL order by id; IFNULL(my_decimal,'IS_NULL') my_decimal id IS_NULL NULL 1 -9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -1343,7 +1389,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_decimal`,_latin1'IS_NULL') AS `IFNULL(my_decimal,'IS_NULL')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 128 OR select_id IS NULL); +WHERE select_id = 132 OR select_id IS NULL) order by id; IFNULL(my_decimal,'IS_NULL') my_decimal id IS_NULL NULL 1 -9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -1357,7 +1403,7 @@ CREATE VIEW v1 AS SELECT IFNULL(my_bigint,'IS_NULL'), my_bigint, id FROM t1_values; SELECT IFNULL(my_bigint,'IS_NULL'), my_bigint, id FROM t1_values -WHERE select_id = 127 OR select_id IS NULL; +WHERE select_id = 131 OR select_id IS NULL order by id; IFNULL(my_bigint,'IS_NULL') my_bigint id IS_NULL NULL 1 -9223372036854775808 -9223372036854775808 2 @@ -1369,7 +1415,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_bigint`,_latin1'IS_NULL') AS `IFNULL(my_bigint,'IS_NULL')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 127 OR select_id IS NULL); +WHERE select_id = 131 OR select_id IS NULL) order by id; IFNULL(my_bigint,'IS_NULL') my_bigint id IS_NULL NULL 1 -9223372036854775808 -9223372036854775808 2 @@ -1383,7 +1429,7 @@ CREATE VIEW v1 AS SELECT IFNULL(my_varbinary_1000,'IS_NULL'), my_varbinary_1000, id FROM t1_values; SELECT IFNULL(my_varbinary_1000,'IS_NULL'), my_varbinary_1000, id FROM t1_values -WHERE select_id = 126 OR select_id IS NULL; +WHERE select_id = 130 OR select_id IS NULL order by id; IFNULL(my_varbinary_1000,'IS_NULL') my_varbinary_1000 id IS_NULL NULL 1 2 @@ -1395,7 +1441,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_varbinary_1000`,_latin1'IS_NULL') AS `IFNULL(my_varbinary_1000,'IS_NULL')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 126 OR select_id IS NULL); +WHERE select_id = 130 OR select_id IS NULL) order by id; IFNULL(my_varbinary_1000,'IS_NULL') my_varbinary_1000 id IS_NULL NULL 1 2 @@ -1409,19 +1455,19 @@ CREATE VIEW v1 AS SELECT IFNULL(my_binary_30,'IS_NULL'), my_binary_30, id FROM t1_values; SELECT IFNULL(my_binary_30,'IS_NULL'), my_binary_30, id FROM t1_values -WHERE select_id = 125 OR select_id IS NULL; +WHERE select_id = 129 OR select_id IS NULL order by id; IFNULL(my_binary_30,'IS_NULL') my_binary_30 id IS_NULL NULL 1 - + 2 <--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- --1 + ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 +-1 -1 5 SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_binary_30`,_latin1'IS_NULL') AS `IFNULL(my_binary_30,'IS_NULL')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 125 OR select_id IS NULL); +WHERE select_id = 129 OR select_id IS NULL) order by id; IFNULL(my_binary_30,'IS_NULL') my_binary_30 id IS_NULL NULL 1 @@ -1435,7 +1481,7 @@ CREATE VIEW v1 AS SELECT IFNULL(my_varchar_1000,'IS_NULL'), my_varchar_1000, id FROM t1_values; SELECT IFNULL(my_varchar_1000,'IS_NULL'), my_varchar_1000, id FROM t1_values -WHERE select_id = 124 OR select_id IS NULL; +WHERE select_id = 128 OR select_id IS NULL order by id; IFNULL(my_varchar_1000,'IS_NULL') my_varchar_1000 id IS_NULL NULL 1 2 @@ -1447,7 +1493,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_varchar_1000`,_latin1'IS_NULL') AS `IFNULL(my_varchar_1000,'IS_NULL')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 124 OR select_id IS NULL); +WHERE select_id = 128 OR select_id IS NULL) order by id; IFNULL(my_varchar_1000,'IS_NULL') my_varchar_1000 id IS_NULL NULL 1 2 @@ -1461,7 +1507,7 @@ CREATE VIEW v1 AS SELECT IFNULL(my_char_30,'IS_NULL'), my_char_30, id FROM t1_values; SELECT IFNULL(my_char_30,'IS_NULL'), my_char_30, id FROM t1_values -WHERE select_id = 123 OR select_id IS NULL; +WHERE select_id = 127 OR select_id IS NULL order by id; IFNULL(my_char_30,'IS_NULL') my_char_30 id IS_NULL NULL 1 2 @@ -1473,7 +1519,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_char_30`,_latin1'IS_NULL') AS `IFNULL(my_char_30,'IS_NULL')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 123 OR select_id IS NULL); +WHERE select_id = 127 OR select_id IS NULL) order by id; IFNULL(my_char_30,'IS_NULL') my_char_30 id IS_NULL NULL 1 2 @@ -1487,7 +1533,7 @@ CREATE VIEW v1 AS SELECT IF(my_year IS NULL, 'IS NULL', 'IS NOT NULL'), my_year, id FROM t1_values; SELECT IF(my_year IS NULL, 'IS NULL', 'IS NOT NULL'), my_year, id FROM t1_values -WHERE select_id = 122 OR select_id IS NULL; +WHERE select_id = 126 OR select_id IS NULL order by id; IF(my_year IS NULL, 'IS NULL', 'IS NOT NULL') my_year id IS NULL NULL 1 @@ -1501,7 +1547,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI 'IS NOT NULL')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 122 OR select_id IS NULL); +WHERE select_id = 126 OR select_id IS NULL) order by id; IF(my_year IS NULL, 'IS NULL', 'IS NOT NULL') my_year id IS NULL NULL 1 @@ -1516,7 +1562,7 @@ CREATE VIEW v1 AS SELECT IF(my_time IS NULL, 'IS NULL', 'IS NOT NULL'), my_time, id FROM t1_values; SELECT IF(my_time IS NULL, 'IS NULL', 'IS NOT NULL'), my_time, id FROM t1_values -WHERE select_id = 121 OR select_id IS NULL; +WHERE select_id = 125 OR select_id IS NULL order by id; IF(my_time IS NULL, 'IS NULL', 'IS NOT NULL') my_time id IS NULL NULL 1 @@ -1530,7 +1576,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI 'IS NOT NULL')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 121 OR select_id IS NULL); +WHERE select_id = 125 OR select_id IS NULL) order by id; IF(my_time IS NULL, 'IS NULL', 'IS NOT NULL') my_time id IS NULL NULL 1 @@ -1545,7 +1591,7 @@ CREATE VIEW v1 AS SELECT IF(my_timestamp IS NULL, 'IS NULL', 'IS NOT NULL'), my_timestamp, id FROM t1_values; SELECT IF(my_timestamp IS NULL, 'IS NULL', 'IS NOT NULL'), my_timestamp, id FROM t1_values -WHERE select_id = 120 OR select_id IS NULL; +WHERE select_id = 124 OR select_id IS NULL order by id; IF(my_timestamp IS NULL, 'IS NULL', 'IS NOT NULL') my_timestamp id IS NOT NULL 0000-00-00 00:00:00 1 @@ -1559,7 +1605,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI 'IS NOT NULL')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 120 OR select_id IS NULL); +WHERE select_id = 124 OR select_id IS NULL) order by id; IF(my_timestamp IS NULL, 'IS NULL', 'IS NOT NULL') my_timestamp id IS NOT NULL 0000-00-00 00:00:00 1 @@ -1574,7 +1620,7 @@ CREATE VIEW v1 AS SELECT IF(my_date IS NULL, 'IS NULL', 'IS NOT NULL'), my_date, id FROM t1_values; SELECT IF(my_date IS NULL, 'IS NULL', 'IS NOT NULL'), my_date, id FROM t1_values -WHERE select_id = 119 OR select_id IS NULL; +WHERE select_id = 123 OR select_id IS NULL order by id; IF(my_date IS NULL, 'IS NULL', 'IS NOT NULL') my_date id IS NULL NULL 1 @@ -1588,7 +1634,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI 'IS NOT NULL')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 119 OR select_id IS NULL); +WHERE select_id = 123 OR select_id IS NULL) order by id; IF(my_date IS NULL, 'IS NULL', 'IS NOT NULL') my_date id IS NULL NULL 1 @@ -1603,7 +1649,7 @@ CREATE VIEW v1 AS SELECT IF(my_datetime IS NULL, 'IS NULL', 'IS NOT NULL'), my_datetime, id FROM t1_values; SELECT IF(my_datetime IS NULL, 'IS NULL', 'IS NOT NULL'), my_datetime, id FROM t1_values -WHERE select_id = 118 OR select_id IS NULL; +WHERE select_id = 122 OR select_id IS NULL order by id; IF(my_datetime IS NULL, 'IS NULL', 'IS NOT NULL') my_datetime id IS NULL NULL 1 @@ -1617,7 +1663,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI 'IS NOT NULL')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 118 OR select_id IS NULL); +WHERE select_id = 122 OR select_id IS NULL) order by id; IF(my_datetime IS NULL, 'IS NULL', 'IS NOT NULL') my_datetime id IS NULL NULL 1 @@ -1632,7 +1678,7 @@ CREATE VIEW v1 AS SELECT IF(my_double IS NULL, 'IS NULL', 'IS NOT NULL'), my_double, id FROM t1_values; SELECT IF(my_double IS NULL, 'IS NULL', 'IS NOT NULL'), my_double, id FROM t1_values -WHERE select_id = 117 OR select_id IS NULL; +WHERE select_id = 121 OR select_id IS NULL order by id; IF(my_double IS NULL, 'IS NULL', 'IS NOT NULL') my_double id IS NULL NULL 1 @@ -1646,7 +1692,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI 'IS NOT NULL')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 117 OR select_id IS NULL); +WHERE select_id = 121 OR select_id IS NULL) order by id; IF(my_double IS NULL, 'IS NULL', 'IS NOT NULL') my_double id IS NULL NULL 1 @@ -1661,7 +1707,7 @@ CREATE VIEW v1 AS SELECT IF(my_decimal IS NULL, 'IS NULL', 'IS NOT NULL'), my_decimal, id FROM t1_values; SELECT IF(my_decimal IS NULL, 'IS NULL', 'IS NOT NULL'), my_decimal, id FROM t1_values -WHERE select_id = 116 OR select_id IS NULL; +WHERE select_id = 120 OR select_id IS NULL order by id; IF(my_decimal IS NULL, 'IS NULL', 'IS NOT NULL') my_decimal id IS NULL NULL 1 @@ -1675,7 +1721,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI 'IS NOT NULL')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 116 OR select_id IS NULL); +WHERE select_id = 120 OR select_id IS NULL) order by id; IF(my_decimal IS NULL, 'IS NULL', 'IS NOT NULL') my_decimal id IS NULL NULL 1 @@ -1690,7 +1736,7 @@ CREATE VIEW v1 AS SELECT IF(my_bigint IS NULL, 'IS NULL', 'IS NOT NULL'), my_bigint, id FROM t1_values; SELECT IF(my_bigint IS NULL, 'IS NULL', 'IS NOT NULL'), my_bigint, id FROM t1_values -WHERE select_id = 115 OR select_id IS NULL; +WHERE select_id = 119 OR select_id IS NULL order by id; IF(my_bigint IS NULL, 'IS NULL', 'IS NOT NULL') my_bigint id IS NULL NULL 1 @@ -1704,7 +1750,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI 'IS NOT NULL')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 115 OR select_id IS NULL); +WHERE select_id = 119 OR select_id IS NULL) order by id; IF(my_bigint IS NULL, 'IS NULL', 'IS NOT NULL') my_bigint id IS NULL NULL 1 @@ -1719,7 +1765,7 @@ CREATE VIEW v1 AS SELECT IF(my_varbinary_1000 IS NULL, 'IS NULL', 'IS NOT NULL'), my_varbinary_1000, id FROM t1_values; SELECT IF(my_varbinary_1000 IS NULL, 'IS NULL', 'IS NOT NULL'), my_varbinary_1000, id FROM t1_values -WHERE select_id = 114 OR select_id IS NULL; +WHERE select_id = 118 OR select_id IS NULL order by id; IF(my_varbinary_1000 IS NULL, 'IS NULL', 'IS NOT NULL') my_varbinary_1000 id IS NULL NULL 1 @@ -1733,7 +1779,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI 'IS NOT NULL')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 114 OR select_id IS NULL); +WHERE select_id = 118 OR select_id IS NULL) order by id; IF(my_varbinary_1000 IS NULL, 'IS NULL', 'IS NOT NULL') my_varbinary_1000 id IS NULL NULL 1 @@ -1748,21 +1794,21 @@ CREATE VIEW v1 AS SELECT IF(my_binary_30 IS NULL, 'IS NULL', 'IS NOT NULL'), my_binary_30, id FROM t1_values; SELECT IF(my_binary_30 IS NULL, 'IS NULL', 'IS NOT NULL'), my_binary_30, id FROM t1_values -WHERE select_id = 113 OR select_id IS NULL; +WHERE select_id = 117 OR select_id IS NULL order by id; IF(my_binary_30 IS NULL, 'IS NULL', 'IS NOT NULL') my_binary_30 id IS NULL NULL 1 -IS NOT NULL +IS NOT NULL 2 IS NOT NULL <--------30 characters-------> 3 -IS NOT NULL ---äÖüß@µ*$-- -IS NOT NULL -1 +IS NOT NULL ---äÖüß@µ*$-- 4 +IS NOT NULL -1 5 SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_binary_30`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_binary_30 IS NULL, 'IS NULL', 'IS NOT NULL')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 113 OR select_id IS NULL); +WHERE select_id = 117 OR select_id IS NULL) order by id; IF(my_binary_30 IS NULL, 'IS NULL', 'IS NOT NULL') my_binary_30 id IS NULL NULL 1 @@ -1777,7 +1823,7 @@ CREATE VIEW v1 AS SELECT IF(my_varchar_1000 IS NULL, 'IS NULL', 'IS NOT NULL'), my_varchar_1000, id FROM t1_values; SELECT IF(my_varchar_1000 IS NULL, 'IS NULL', 'IS NOT NULL'), my_varchar_1000, id FROM t1_values -WHERE select_id = 112 OR select_id IS NULL; +WHERE select_id = 116 OR select_id IS NULL order by id; IF(my_varchar_1000 IS NULL, 'IS NULL', 'IS NOT NULL') my_varchar_1000 id IS NULL NULL 1 @@ -1791,7 +1837,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI 'IS NOT NULL')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 112 OR select_id IS NULL); +WHERE select_id = 116 OR select_id IS NULL) order by id; IF(my_varchar_1000 IS NULL, 'IS NULL', 'IS NOT NULL') my_varchar_1000 id IS NULL NULL 1 @@ -1806,7 +1852,7 @@ CREATE VIEW v1 AS SELECT IF(my_char_30 IS NULL, 'IS NULL', 'IS NOT NULL'), my_char_30, id FROM t1_values; SELECT IF(my_char_30 IS NULL, 'IS NULL', 'IS NOT NULL'), my_char_30, id FROM t1_values -WHERE select_id = 111 OR select_id IS NULL; +WHERE select_id = 115 OR select_id IS NULL order by id; IF(my_char_30 IS NULL, 'IS NULL', 'IS NOT NULL') my_char_30 id IS NULL NULL 1 @@ -1820,7 +1866,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI 'IS NOT NULL')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 111 OR select_id IS NULL); +WHERE select_id = 115 OR select_id IS NULL) order by id; IF(my_char_30 IS NULL, 'IS NULL', 'IS NOT NULL') my_char_30 id IS NULL NULL 1 @@ -1835,7 +1881,7 @@ CREATE VIEW v1 AS SELECT IF(my_year, 'IS TRUE', 'IS NOT TRUE'), my_year, id FROM t1_values; SELECT IF(my_year, 'IS TRUE', 'IS NOT TRUE'), my_year, id FROM t1_values -WHERE select_id = 110 OR select_id IS NULL; +WHERE select_id = 114 OR select_id IS NULL order by id; IF(my_year, 'IS TRUE', 'IS NOT TRUE') my_year id IS NOT TRUE NULL 1 IS TRUE 1901 2 @@ -1847,7 +1893,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_year`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_year, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 110 OR select_id IS NULL); +WHERE select_id = 114 OR select_id IS NULL) order by id; IF(my_year, 'IS TRUE', 'IS NOT TRUE') my_year id IS NOT TRUE NULL 1 IS TRUE 1901 2 @@ -1861,7 +1907,7 @@ CREATE VIEW v1 AS SELECT IF(my_time, 'IS TRUE', 'IS NOT TRUE'), my_time, id FROM t1_values; SELECT IF(my_time, 'IS TRUE', 'IS NOT TRUE'), my_time, id FROM t1_values -WHERE select_id = 109 OR select_id IS NULL; +WHERE select_id = 113 OR select_id IS NULL order by id; IF(my_time, 'IS TRUE', 'IS NOT TRUE') my_time id IS NOT TRUE NULL 1 IS TRUE -838:59:59 2 @@ -1873,7 +1919,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_time`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_time, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 109 OR select_id IS NULL); +WHERE select_id = 113 OR select_id IS NULL) order by id; IF(my_time, 'IS TRUE', 'IS NOT TRUE') my_time id IS NOT TRUE NULL 1 IS TRUE -838:59:59 2 @@ -1887,7 +1933,7 @@ CREATE VIEW v1 AS SELECT IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE'), my_timestamp, id FROM t1_values; SELECT IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE'), my_timestamp, id FROM t1_values -WHERE select_id = 108 OR select_id IS NULL; +WHERE select_id = 112 OR select_id IS NULL order by id; IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE') my_timestamp id IS NOT TRUE 0000-00-00 00:00:00 1 IS TRUE 1970-01-01 03:00:01 2 @@ -1899,7 +1945,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_timestamp`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 108 OR select_id IS NULL); +WHERE select_id = 112 OR select_id IS NULL) order by id; IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE') my_timestamp id IS NOT TRUE 0000-00-00 00:00:00 1 IS TRUE 1970-01-01 03:00:01 2 @@ -1913,7 +1959,7 @@ CREATE VIEW v1 AS SELECT IF(my_date, 'IS TRUE', 'IS NOT TRUE'), my_date, id FROM t1_values; SELECT IF(my_date, 'IS TRUE', 'IS NOT TRUE'), my_date, id FROM t1_values -WHERE select_id = 107 OR select_id IS NULL; +WHERE select_id = 111 OR select_id IS NULL order by id; IF(my_date, 'IS TRUE', 'IS NOT TRUE') my_date id IS NOT TRUE NULL 1 IS TRUE 0001-01-01 2 @@ -1925,7 +1971,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_date`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_date, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 107 OR select_id IS NULL); +WHERE select_id = 111 OR select_id IS NULL) order by id; IF(my_date, 'IS TRUE', 'IS NOT TRUE') my_date id IS NOT TRUE NULL 1 IS TRUE 0001-01-01 2 @@ -1939,7 +1985,7 @@ CREATE VIEW v1 AS SELECT IF(my_datetime, 'IS TRUE', 'IS NOT TRUE'), my_datetime, id FROM t1_values; SELECT IF(my_datetime, 'IS TRUE', 'IS NOT TRUE'), my_datetime, id FROM t1_values -WHERE select_id = 106 OR select_id IS NULL; +WHERE select_id = 110 OR select_id IS NULL order by id; IF(my_datetime, 'IS TRUE', 'IS NOT TRUE') my_datetime id IS NOT TRUE NULL 1 IS TRUE 0001-01-01 00:00:00 2 @@ -1951,7 +1997,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_datetime`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_datetime, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 106 OR select_id IS NULL); +WHERE select_id = 110 OR select_id IS NULL) order by id; IF(my_datetime, 'IS TRUE', 'IS NOT TRUE') my_datetime id IS NOT TRUE NULL 1 IS TRUE 0001-01-01 00:00:00 2 @@ -1965,7 +2011,7 @@ CREATE VIEW v1 AS SELECT IF(my_double, 'IS TRUE', 'IS NOT TRUE'), my_double, id FROM t1_values; SELECT IF(my_double, 'IS TRUE', 'IS NOT TRUE'), my_double, id FROM t1_values -WHERE select_id = 105 OR select_id IS NULL; +WHERE select_id = 109 OR select_id IS NULL order by id; IF(my_double, 'IS TRUE', 'IS NOT TRUE') my_double id IS NOT TRUE NULL 1 IS TRUE -1.7976931348623e+308 2 @@ -1977,7 +2023,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_double`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_double, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 105 OR select_id IS NULL); +WHERE select_id = 109 OR select_id IS NULL) order by id; IF(my_double, 'IS TRUE', 'IS NOT TRUE') my_double id IS NOT TRUE NULL 1 IS TRUE -1.7976931348623e+308 2 @@ -1991,7 +2037,7 @@ CREATE VIEW v1 AS SELECT IF(my_decimal, 'IS TRUE', 'IS NOT TRUE'), my_decimal, id FROM t1_values; SELECT IF(my_decimal, 'IS TRUE', 'IS NOT TRUE'), my_decimal, id FROM t1_values -WHERE select_id = 104 OR select_id IS NULL; +WHERE select_id = 108 OR select_id IS NULL order by id; IF(my_decimal, 'IS TRUE', 'IS NOT TRUE') my_decimal id IS NOT TRUE NULL 1 IS TRUE -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -2003,7 +2049,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_decimal`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_decimal, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 104 OR select_id IS NULL); +WHERE select_id = 108 OR select_id IS NULL) order by id; IF(my_decimal, 'IS TRUE', 'IS NOT TRUE') my_decimal id IS NOT TRUE NULL 1 IS TRUE -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -2017,7 +2063,7 @@ CREATE VIEW v1 AS SELECT IF(my_bigint, 'IS TRUE', 'IS NOT TRUE'), my_bigint, id FROM t1_values; SELECT IF(my_bigint, 'IS TRUE', 'IS NOT TRUE'), my_bigint, id FROM t1_values -WHERE select_id = 103 OR select_id IS NULL; +WHERE select_id = 107 OR select_id IS NULL order by id; IF(my_bigint, 'IS TRUE', 'IS NOT TRUE') my_bigint id IS NOT TRUE NULL 1 IS TRUE -9223372036854775808 2 @@ -2029,7 +2075,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_bigint`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_bigint, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 103 OR select_id IS NULL); +WHERE select_id = 107 OR select_id IS NULL) order by id; IF(my_bigint, 'IS TRUE', 'IS NOT TRUE') my_bigint id IS NOT TRUE NULL 1 IS TRUE -9223372036854775808 2 @@ -2043,7 +2089,7 @@ CREATE VIEW v1 AS SELECT IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE'), my_varbinary_1000, id FROM t1_values; SELECT IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE'), my_varbinary_1000, id FROM t1_values -WHERE select_id = 102 OR select_id IS NULL; +WHERE select_id = 106 OR select_id IS NULL order by id; IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE') my_varbinary_1000 id IS NOT TRUE NULL 1 IS NOT TRUE 2 @@ -2055,7 +2101,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_varbinary_1000`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 102 OR select_id IS NULL); +WHERE select_id = 106 OR select_id IS NULL) order by id; IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE') my_varbinary_1000 id IS NOT TRUE NULL 1 IS NOT TRUE 2 @@ -2069,13 +2115,13 @@ CREATE VIEW v1 AS SELECT IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE'), my_binary_30, id FROM t1_values; SELECT IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE'), my_binary_30, id FROM t1_values -WHERE select_id = 101 OR select_id IS NULL; +WHERE select_id = 105 OR select_id IS NULL order by id; IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE') my_binary_30 id IS NOT TRUE NULL 1 -IS NOT TRUE +IS NOT TRUE 2 IS NOT TRUE <--------30 characters-------> 3 -IS NOT TRUE ---äÖüß@µ*$-- -IS TRUE -1 +IS NOT TRUE ---äÖüß@µ*$-- 4 +IS TRUE -1 5 Warnings: Warning 1292 Truncated incorrect DOUBLE value: '' Warning 1292 Truncated incorrect DOUBLE value: '<--------30 characters------->' @@ -2086,7 +2132,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_binary_30`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 101 OR select_id IS NULL); +WHERE select_id = 105 OR select_id IS NULL) order by id; IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE') my_binary_30 id IS NOT TRUE NULL 1 IS NOT TRUE @@ -2105,7 +2151,7 @@ CREATE VIEW v1 AS SELECT IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE'), my_varchar_1000, id FROM t1_values; SELECT IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE'), my_varchar_1000, id FROM t1_values -WHERE select_id = 100 OR select_id IS NULL; +WHERE select_id = 104 OR select_id IS NULL order by id; IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE') my_varchar_1000 id IS NOT TRUE NULL 1 IS NOT TRUE 2 @@ -2117,7 +2163,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_varchar_1000`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 100 OR select_id IS NULL); +WHERE select_id = 104 OR select_id IS NULL) order by id; IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE') my_varchar_1000 id IS NOT TRUE NULL 1 IS NOT TRUE 2 @@ -2131,7 +2177,7 @@ CREATE VIEW v1 AS SELECT IF(my_char_30, 'IS TRUE', 'IS NOT TRUE'), my_char_30, id FROM t1_values; SELECT IF(my_char_30, 'IS TRUE', 'IS NOT TRUE'), my_char_30, id FROM t1_values -WHERE select_id = 99 OR select_id IS NULL; +WHERE select_id = 103 OR select_id IS NULL order by id; IF(my_char_30, 'IS TRUE', 'IS NOT TRUE') my_char_30 id IS NOT TRUE NULL 1 IS NOT TRUE 2 @@ -2146,7 +2192,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_char_30`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_char_30, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 99 OR select_id IS NULL); +WHERE select_id = 103 OR select_id IS NULL) order by id; IF(my_char_30, 'IS TRUE', 'IS NOT TRUE') my_char_30 id IS NOT TRUE NULL 1 IS NOT TRUE 2 @@ -2159,11 +2205,11 @@ Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- ' DROP VIEW v1; -CREATE VIEW v1 AS SELECT CONVERT(my_varbinary_1000 USING koi8r), +CREATE VIEW v1 AS SELECT CONVERT(my_varbinary_1000 USING koi8r), my_varbinary_1000, id FROM t1_values; -SELECT CONVERT(my_varbinary_1000 USING koi8r), +SELECT CONVERT(my_varbinary_1000 USING koi8r), my_varbinary_1000, id FROM t1_values -WHERE select_id = 98 OR select_id IS NULL; +WHERE select_id = 102 OR select_id IS NULL order by id; CONVERT(my_varbinary_1000 USING koi8r) my_varbinary_1000 id NULL NULL 1 2 @@ -2175,7 +2221,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varbinary_1000` using koi8r) AS `CONVERT(my_varbinary_1000 USING koi8r)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 98 OR select_id IS NULL); +WHERE select_id = 102 OR select_id IS NULL) order by id; CONVERT(my_varbinary_1000 USING koi8r) my_varbinary_1000 id NULL NULL 1 2 @@ -2185,23 +2231,23 @@ NULL NULL 1 DROP VIEW v1; -CREATE VIEW v1 AS SELECT CONVERT(my_binary_30 USING koi8r), +CREATE VIEW v1 AS SELECT CONVERT(my_binary_30 USING koi8r), my_binary_30, id FROM t1_values; -SELECT CONVERT(my_binary_30 USING koi8r), +SELECT CONVERT(my_binary_30 USING koi8r), my_binary_30, id FROM t1_values -WHERE select_id = 97 OR select_id IS NULL; +WHERE select_id = 101 OR select_id IS NULL order by id; CONVERT(my_binary_30 USING koi8r) my_binary_30 id NULL NULL 1 - + 2 <--------30 characters-------> <--------30 characters-------> 3 - ---???????÷@??*$-- --1 + ---???????÷@??*$-- ---äÖüß@µ*$-- 4 +-1 -1 5 SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_binary_30` using koi8r) AS `CONVERT(my_binary_30 USING koi8r)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 97 OR select_id IS NULL); +WHERE select_id = 101 OR select_id IS NULL) order by id; CONVERT(my_binary_30 USING koi8r) my_binary_30 id NULL NULL 1 @@ -2211,11 +2257,11 @@ NULL NULL 1 DROP VIEW v1; -CREATE VIEW v1 AS SELECT CONVERT(my_varchar_1000 USING koi8r), +CREATE VIEW v1 AS SELECT CONVERT(my_varchar_1000 USING koi8r), my_varchar_1000, id FROM t1_values; -SELECT CONVERT(my_varchar_1000 USING koi8r), +SELECT CONVERT(my_varchar_1000 USING koi8r), my_varchar_1000, id FROM t1_values -WHERE select_id = 96 OR select_id IS NULL; +WHERE select_id = 100 OR select_id IS NULL order by id; CONVERT(my_varchar_1000 USING koi8r) my_varchar_1000 id NULL NULL 1 2 @@ -2227,7 +2273,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varchar_1000` using koi8r) AS `CONVERT(my_varchar_1000 USING koi8r)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 96 OR select_id IS NULL); +WHERE select_id = 100 OR select_id IS NULL) order by id; CONVERT(my_varchar_1000 USING koi8r) my_varchar_1000 id NULL NULL 1 2 @@ -2237,11 +2283,11 @@ NULL NULL 1 DROP VIEW v1; -CREATE VIEW v1 AS SELECT CONVERT(my_char_30 USING koi8r), +CREATE VIEW v1 AS SELECT CONVERT(my_char_30 USING koi8r), my_char_30, id FROM t1_values; -SELECT CONVERT(my_char_30 USING koi8r), +SELECT CONVERT(my_char_30 USING koi8r), my_char_30, id FROM t1_values -WHERE select_id = 95 OR select_id IS NULL; +WHERE select_id = 99 OR select_id IS NULL order by id; CONVERT(my_char_30 USING koi8r) my_char_30 id NULL NULL 1 2 @@ -2253,7 +2299,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_char_30` using koi8r) AS `CONVERT(my_char_30 USING koi8r)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 95 OR select_id IS NULL); +WHERE select_id = 99 OR select_id IS NULL) order by id; CONVERT(my_char_30 USING koi8r) my_char_30 id NULL NULL 1 2 @@ -2263,11 +2309,11 @@ NULL NULL 1 DROP VIEW v1; -CREATE VIEW v1 AS SELECT CONVERT(my_varbinary_1000 USING utf8), +CREATE VIEW v1 AS SELECT CONVERT(my_varbinary_1000 USING utf8), my_varbinary_1000, id FROM t1_values; -SELECT CONVERT(my_varbinary_1000 USING utf8), +SELECT CONVERT(my_varbinary_1000 USING utf8), my_varbinary_1000, id FROM t1_values -WHERE select_id = 94 OR select_id IS NULL; +WHERE select_id = 98 OR select_id IS NULL order by id; CONVERT(my_varbinary_1000 USING utf8) my_varbinary_1000 id NULL NULL 1 2 @@ -2279,7 +2325,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varbinary_1000` using utf8) AS `CONVERT(my_varbinary_1000 USING utf8)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 94 OR select_id IS NULL); +WHERE select_id = 98 OR select_id IS NULL) order by id; CONVERT(my_varbinary_1000 USING utf8) my_varbinary_1000 id NULL NULL 1 2 @@ -2289,23 +2335,23 @@ NULL NULL 1 DROP VIEW v1; -CREATE VIEW v1 AS SELECT CONVERT(my_binary_30 USING utf8), +CREATE VIEW v1 AS SELECT CONVERT(my_binary_30 USING utf8), my_binary_30, id FROM t1_values; -SELECT CONVERT(my_binary_30 USING utf8), +SELECT CONVERT(my_binary_30 USING utf8), my_binary_30, id FROM t1_values -WHERE select_id = 93 OR select_id IS NULL; +WHERE select_id = 97 OR select_id IS NULL order by id; CONVERT(my_binary_30 USING utf8) my_binary_30 id NULL NULL 1 - + 2 <--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- --1 + ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 +-1 -1 5 SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_binary_30` using utf8) AS `CONVERT(my_binary_30 USING utf8)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 93 OR select_id IS NULL); +WHERE select_id = 97 OR select_id IS NULL) order by id; CONVERT(my_binary_30 USING utf8) my_binary_30 id NULL NULL 1 @@ -2315,11 +2361,11 @@ NULL NULL 1 DROP VIEW v1; -CREATE VIEW v1 AS SELECT CONVERT(my_varchar_1000 USING utf8), +CREATE VIEW v1 AS SELECT CONVERT(my_varchar_1000 USING utf8), my_varchar_1000, id FROM t1_values; -SELECT CONVERT(my_varchar_1000 USING utf8), +SELECT CONVERT(my_varchar_1000 USING utf8), my_varchar_1000, id FROM t1_values -WHERE select_id = 92 OR select_id IS NULL; +WHERE select_id = 96 OR select_id IS NULL order by id; CONVERT(my_varchar_1000 USING utf8) my_varchar_1000 id NULL NULL 1 2 @@ -2331,7 +2377,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varchar_1000` using utf8) AS `CONVERT(my_varchar_1000 USING utf8)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 92 OR select_id IS NULL); +WHERE select_id = 96 OR select_id IS NULL) order by id; CONVERT(my_varchar_1000 USING utf8) my_varchar_1000 id NULL NULL 1 2 @@ -2341,11 +2387,11 @@ NULL NULL 1 DROP VIEW v1; -CREATE VIEW v1 AS SELECT CONVERT(my_char_30 USING utf8), +CREATE VIEW v1 AS SELECT CONVERT(my_char_30 USING utf8), my_char_30, id FROM t1_values; -SELECT CONVERT(my_char_30 USING utf8), +SELECT CONVERT(my_char_30 USING utf8), my_char_30, id FROM t1_values -WHERE select_id = 91 OR select_id IS NULL; +WHERE select_id = 95 OR select_id IS NULL order by id; CONVERT(my_char_30 USING utf8) my_char_30 id NULL NULL 1 2 @@ -2357,7 +2403,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_char_30` using utf8) AS `CONVERT(my_char_30 USING utf8)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 91 OR select_id IS NULL); +WHERE select_id = 95 OR select_id IS NULL) order by id; CONVERT(my_char_30 USING utf8) my_char_30 id NULL NULL 1 2 @@ -2371,7 +2417,7 @@ CREATE VIEW v1 AS SELECT CAST(my_year AS UNSIGNED INTEGER), my_year, id FROM t1_values; SELECT CAST(my_year AS UNSIGNED INTEGER), my_year, id FROM t1_values -WHERE select_id = 90 OR select_id IS NULL; +WHERE select_id = 94 OR select_id IS NULL order by id; CAST(my_year AS UNSIGNED INTEGER) my_year id NULL NULL 1 1901 1901 2 @@ -2383,7 +2429,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as unsigned) AS `CAST(my_year AS UNSIGNED INTEGER)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 90 OR select_id IS NULL); +WHERE select_id = 94 OR select_id IS NULL) order by id; CAST(my_year AS UNSIGNED INTEGER) my_year id NULL NULL 1 1901 1901 2 @@ -2397,7 +2443,7 @@ CREATE VIEW v1 AS SELECT CAST(my_time AS UNSIGNED INTEGER), my_time, id FROM t1_values; SELECT CAST(my_time AS UNSIGNED INTEGER), my_time, id FROM t1_values -WHERE select_id = 89 OR select_id IS NULL; +WHERE select_id = 93 OR select_id IS NULL order by id; CAST(my_time AS UNSIGNED INTEGER) my_time id NULL NULL 1 18446744073701165657 -838:59:59 2 @@ -2409,7 +2455,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as unsigned) AS `CAST(my_time AS UNSIGNED INTEGER)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 89 OR select_id IS NULL); +WHERE select_id = 93 OR select_id IS NULL) order by id; CAST(my_time AS UNSIGNED INTEGER) my_time id NULL NULL 1 18446744073701165657 -838:59:59 2 @@ -2423,7 +2469,7 @@ CREATE VIEW v1 AS SELECT CAST(my_timestamp AS UNSIGNED INTEGER), my_timestamp, id FROM t1_values; SELECT CAST(my_timestamp AS UNSIGNED INTEGER), my_timestamp, id FROM t1_values -WHERE select_id = 88 OR select_id IS NULL; +WHERE select_id = 92 OR select_id IS NULL order by id; CAST(my_timestamp AS UNSIGNED INTEGER) my_timestamp id 0 0000-00-00 00:00:00 1 19700101030001 1970-01-01 03:00:01 2 @@ -2435,7 +2481,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as unsigned) AS `CAST(my_timestamp AS UNSIGNED INTEGER)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 88 OR select_id IS NULL); +WHERE select_id = 92 OR select_id IS NULL) order by id; CAST(my_timestamp AS UNSIGNED INTEGER) my_timestamp id 0 0000-00-00 00:00:00 1 19700101030001 1970-01-01 03:00:01 2 @@ -2449,7 +2495,7 @@ CREATE VIEW v1 AS SELECT CAST(my_date AS UNSIGNED INTEGER), my_date, id FROM t1_values; SELECT CAST(my_date AS UNSIGNED INTEGER), my_date, id FROM t1_values -WHERE select_id = 87 OR select_id IS NULL; +WHERE select_id = 91 OR select_id IS NULL order by id; CAST(my_date AS UNSIGNED INTEGER) my_date id NULL NULL 1 10101 0001-01-01 2 @@ -2461,7 +2507,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as unsigned) AS `CAST(my_date AS UNSIGNED INTEGER)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 87 OR select_id IS NULL); +WHERE select_id = 91 OR select_id IS NULL) order by id; CAST(my_date AS UNSIGNED INTEGER) my_date id NULL NULL 1 10101 0001-01-01 2 @@ -2475,7 +2521,7 @@ CREATE VIEW v1 AS SELECT CAST(my_datetime AS UNSIGNED INTEGER), my_datetime, id FROM t1_values; SELECT CAST(my_datetime AS UNSIGNED INTEGER), my_datetime, id FROM t1_values -WHERE select_id = 86 OR select_id IS NULL; +WHERE select_id = 90 OR select_id IS NULL order by id; CAST(my_datetime AS UNSIGNED INTEGER) my_datetime id NULL NULL 1 10101000000 0001-01-01 00:00:00 2 @@ -2487,7 +2533,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as unsigned) AS `CAST(my_datetime AS UNSIGNED INTEGER)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 86 OR select_id IS NULL); +WHERE select_id = 90 OR select_id IS NULL) order by id; CAST(my_datetime AS UNSIGNED INTEGER) my_datetime id NULL NULL 1 10101000000 0001-01-01 00:00:00 2 @@ -2497,11 +2543,43 @@ NULL NULL 1 DROP VIEW v1; +CREATE VIEW v1 AS SELECT CAST(my_double AS UNSIGNED INTEGER), +my_double, id FROM t1_values; +SELECT CAST(my_double AS UNSIGNED INTEGER), +my_double, id FROM t1_values +WHERE select_id = 89 OR select_id IS NULL order by id; +CAST(my_double AS UNSIGNED INTEGER) my_double id +NULL NULL 1 +9223372036854775808 -1.7976931348623e+308 2 +9223372036854775807 1.7976931348623e+308 3 +0 0 4 +18446744073709551615 -1 5 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' +Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' +SHOW CREATE VIEW v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as unsigned) AS `CAST(my_double AS UNSIGNED INTEGER)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +SELECT v1.* FROM v1 +WHERE v1.id IN (SELECT id FROM t1_values +WHERE select_id = 89 OR select_id IS NULL) order by id; +CAST(my_double AS UNSIGNED INTEGER) my_double id +NULL NULL 1 +9223372036854775808 -1.7976931348623e+308 2 +9223372036854775807 1.7976931348623e+308 3 +0 0 4 +18446744073709551615 -1 5 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' +Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' +DROP VIEW v1; + + CREATE VIEW v1 AS SELECT CAST(my_decimal AS UNSIGNED INTEGER), my_decimal, id FROM t1_values; SELECT CAST(my_decimal AS UNSIGNED INTEGER), my_decimal, id FROM t1_values -WHERE select_id = 85 OR select_id IS NULL; +WHERE select_id = 88 OR select_id IS NULL order by id; CAST(my_decimal AS UNSIGNED INTEGER) my_decimal id NULL NULL 1 0 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -2517,7 +2595,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as unsigned) AS `CAST(my_decimal AS UNSIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 85 OR select_id IS NULL); +WHERE select_id = 88 OR select_id IS NULL) order by id; CAST(my_decimal AS UNSIGNED INTEGER) my_decimal id NULL NULL 1 0 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -2535,7 +2613,7 @@ CREATE VIEW v1 AS SELECT CAST(my_bigint AS UNSIGNED INTEGER), my_bigint, id FROM t1_values; SELECT CAST(my_bigint AS UNSIGNED INTEGER), my_bigint, id FROM t1_values -WHERE select_id = 84 OR select_id IS NULL; +WHERE select_id = 87 OR select_id IS NULL order by id; CAST(my_bigint AS UNSIGNED INTEGER) my_bigint id NULL NULL 1 9223372036854775808 -9223372036854775808 2 @@ -2547,7 +2625,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as unsigned) AS `CAST(my_bigint AS UNSIGNED INTEGER)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 84 OR select_id IS NULL); +WHERE select_id = 87 OR select_id IS NULL) order by id; CAST(my_bigint AS UNSIGNED INTEGER) my_bigint id NULL NULL 1 9223372036854775808 -9223372036854775808 2 @@ -2561,7 +2639,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS UNSIGNED INTEGER), my_varbinary_1000, id FROM t1_values; SELECT CAST(my_varbinary_1000 AS UNSIGNED INTEGER), my_varbinary_1000, id FROM t1_values -WHERE select_id = 83 OR select_id IS NULL; +WHERE select_id = 86 OR select_id IS NULL order by id; CAST(my_varbinary_1000 AS UNSIGNED INTEGER) my_varbinary_1000 id NULL NULL 1 0 2 @@ -2578,7 +2656,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as unsigned) AS `CAST(my_varbinary_1000 AS UNSIGNED INTEGER)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 83 OR select_id IS NULL); +WHERE select_id = 86 OR select_id IS NULL) order by id; CAST(my_varbinary_1000 AS UNSIGNED INTEGER) my_varbinary_1000 id NULL NULL 1 0 2 @@ -2597,13 +2675,13 @@ CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS UNSIGNED INTEGER), my_binary_30, id FROM t1_values; SELECT CAST(my_binary_30 AS UNSIGNED INTEGER), my_binary_30, id FROM t1_values -WHERE select_id = 82 OR select_id IS NULL; +WHERE select_id = 85 OR select_id IS NULL order by id; CAST(my_binary_30 AS UNSIGNED INTEGER) my_binary_30 id NULL NULL 1 -0 +0 2 0 <--------30 characters-------> 3 -0 ---äÖüß@µ*$-- -18446744073709551615 -1 +0 ---äÖüß@µ*$-- 4 +18446744073709551615 -1 5 Warnings: Warning 1292 Truncated incorrect INTEGER value: '' Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->' @@ -2615,7 +2693,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as unsigned) AS `CAST(my_binary_30 AS UNSIGNED INTEGER)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 82 OR select_id IS NULL); +WHERE select_id = 85 OR select_id IS NULL) order by id; CAST(my_binary_30 AS UNSIGNED INTEGER) my_binary_30 id NULL NULL 1 0 @@ -2635,7 +2713,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS UNSIGNED INTEGER), my_varchar_1000, id FROM t1_values; SELECT CAST(my_varchar_1000 AS UNSIGNED INTEGER), my_varchar_1000, id FROM t1_values -WHERE select_id = 81 OR select_id IS NULL; +WHERE select_id = 84 OR select_id IS NULL order by id; CAST(my_varchar_1000 AS UNSIGNED INTEGER) my_varchar_1000 id NULL NULL 1 0 2 @@ -2652,7 +2730,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as unsigned) AS `CAST(my_varchar_1000 AS UNSIGNED INTEGER)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 81 OR select_id IS NULL); +WHERE select_id = 84 OR select_id IS NULL) order by id; CAST(my_varchar_1000 AS UNSIGNED INTEGER) my_varchar_1000 id NULL NULL 1 0 2 @@ -2671,7 +2749,7 @@ CREATE VIEW v1 AS SELECT CAST(my_char_30 AS UNSIGNED INTEGER), my_char_30, id FROM t1_values; SELECT CAST(my_char_30 AS UNSIGNED INTEGER), my_char_30, id FROM t1_values -WHERE select_id = 80 OR select_id IS NULL; +WHERE select_id = 83 OR select_id IS NULL order by id; CAST(my_char_30 AS UNSIGNED INTEGER) my_char_30 id NULL NULL 1 0 2 @@ -2688,7 +2766,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as unsigned) AS `CAST(my_char_30 AS UNSIGNED INTEGER)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 80 OR select_id IS NULL); +WHERE select_id = 83 OR select_id IS NULL) order by id; CAST(my_char_30 AS UNSIGNED INTEGER) my_char_30 id NULL NULL 1 0 2 @@ -2707,7 +2785,7 @@ CREATE VIEW v1 AS SELECT CAST(my_year AS SIGNED INTEGER), my_year, id FROM t1_values; SELECT CAST(my_year AS SIGNED INTEGER), my_year, id FROM t1_values -WHERE select_id = 79 OR select_id IS NULL; +WHERE select_id = 82 OR select_id IS NULL order by id; CAST(my_year AS SIGNED INTEGER) my_year id NULL NULL 1 1901 1901 2 @@ -2719,7 +2797,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as signed) AS `CAST(my_year AS SIGNED INTEGER)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 79 OR select_id IS NULL); +WHERE select_id = 82 OR select_id IS NULL) order by id; CAST(my_year AS SIGNED INTEGER) my_year id NULL NULL 1 1901 1901 2 @@ -2733,7 +2811,7 @@ CREATE VIEW v1 AS SELECT CAST(my_time AS SIGNED INTEGER), my_time, id FROM t1_values; SELECT CAST(my_time AS SIGNED INTEGER), my_time, id FROM t1_values -WHERE select_id = 78 OR select_id IS NULL; +WHERE select_id = 81 OR select_id IS NULL order by id; CAST(my_time AS SIGNED INTEGER) my_time id NULL NULL 1 -8385959 -838:59:59 2 @@ -2745,7 +2823,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as signed) AS `CAST(my_time AS SIGNED INTEGER)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 78 OR select_id IS NULL); +WHERE select_id = 81 OR select_id IS NULL) order by id; CAST(my_time AS SIGNED INTEGER) my_time id NULL NULL 1 -8385959 -838:59:59 2 @@ -2759,7 +2837,7 @@ CREATE VIEW v1 AS SELECT CAST(my_timestamp AS SIGNED INTEGER), my_timestamp, id FROM t1_values; SELECT CAST(my_timestamp AS SIGNED INTEGER), my_timestamp, id FROM t1_values -WHERE select_id = 77 OR select_id IS NULL; +WHERE select_id = 80 OR select_id IS NULL order by id; CAST(my_timestamp AS SIGNED INTEGER) my_timestamp id 0 0000-00-00 00:00:00 1 19700101030001 1970-01-01 03:00:01 2 @@ -2771,7 +2849,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as signed) AS `CAST(my_timestamp AS SIGNED INTEGER)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 77 OR select_id IS NULL); +WHERE select_id = 80 OR select_id IS NULL) order by id; CAST(my_timestamp AS SIGNED INTEGER) my_timestamp id 0 0000-00-00 00:00:00 1 19700101030001 1970-01-01 03:00:01 2 @@ -2785,7 +2863,7 @@ CREATE VIEW v1 AS SELECT CAST(my_date AS SIGNED INTEGER), my_date, id FROM t1_values; SELECT CAST(my_date AS SIGNED INTEGER), my_date, id FROM t1_values -WHERE select_id = 76 OR select_id IS NULL; +WHERE select_id = 79 OR select_id IS NULL order by id; CAST(my_date AS SIGNED INTEGER) my_date id NULL NULL 1 10101 0001-01-01 2 @@ -2797,7 +2875,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as signed) AS `CAST(my_date AS SIGNED INTEGER)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 76 OR select_id IS NULL); +WHERE select_id = 79 OR select_id IS NULL) order by id; CAST(my_date AS SIGNED INTEGER) my_date id NULL NULL 1 10101 0001-01-01 2 @@ -2811,7 +2889,7 @@ CREATE VIEW v1 AS SELECT CAST(my_datetime AS SIGNED INTEGER), my_datetime, id FROM t1_values; SELECT CAST(my_datetime AS SIGNED INTEGER), my_datetime, id FROM t1_values -WHERE select_id = 75 OR select_id IS NULL; +WHERE select_id = 78 OR select_id IS NULL order by id; CAST(my_datetime AS SIGNED INTEGER) my_datetime id NULL NULL 1 10101000000 0001-01-01 00:00:00 2 @@ -2823,7 +2901,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as signed) AS `CAST(my_datetime AS SIGNED INTEGER)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 75 OR select_id IS NULL); +WHERE select_id = 78 OR select_id IS NULL) order by id; CAST(my_datetime AS SIGNED INTEGER) my_datetime id NULL NULL 1 10101000000 0001-01-01 00:00:00 2 @@ -2833,11 +2911,43 @@ NULL NULL 1 DROP VIEW v1; +CREATE VIEW v1 AS SELECT CAST(my_double AS SIGNED INTEGER), +my_double, id FROM t1_values; +SELECT CAST(my_double AS SIGNED INTEGER), +my_double, id FROM t1_values +WHERE select_id = 77 OR select_id IS NULL order by id; +CAST(my_double AS SIGNED INTEGER) my_double id +NULL NULL 1 +-9223372036854775808 -1.7976931348623e+308 2 +9223372036854775807 1.7976931348623e+308 3 +0 0 4 +-1 -1 5 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' +Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' +SHOW CREATE VIEW v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as signed) AS `CAST(my_double AS SIGNED INTEGER)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +SELECT v1.* FROM v1 +WHERE v1.id IN (SELECT id FROM t1_values +WHERE select_id = 77 OR select_id IS NULL) order by id; +CAST(my_double AS SIGNED INTEGER) my_double id +NULL NULL 1 +-9223372036854775808 -1.7976931348623e+308 2 +9223372036854775807 1.7976931348623e+308 3 +0 0 4 +-1 -1 5 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' +Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' +DROP VIEW v1; + + CREATE VIEW v1 AS SELECT CAST(my_decimal AS SIGNED INTEGER), my_decimal, id FROM t1_values; SELECT CAST(my_decimal AS SIGNED INTEGER), my_decimal, id FROM t1_values -WHERE select_id = 74 OR select_id IS NULL; +WHERE select_id = 76 OR select_id IS NULL order by id; CAST(my_decimal AS SIGNED INTEGER) my_decimal id NULL NULL 1 -9223372036854775808 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -2852,7 +2962,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as signed) AS `CAST(my_decimal AS SIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 74 OR select_id IS NULL); +WHERE select_id = 76 OR select_id IS NULL) order by id; CAST(my_decimal AS SIGNED INTEGER) my_decimal id NULL NULL 1 -9223372036854775808 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -2869,7 +2979,7 @@ CREATE VIEW v1 AS SELECT CAST(my_bigint AS SIGNED INTEGER), my_bigint, id FROM t1_values; SELECT CAST(my_bigint AS SIGNED INTEGER), my_bigint, id FROM t1_values -WHERE select_id = 73 OR select_id IS NULL; +WHERE select_id = 75 OR select_id IS NULL order by id; CAST(my_bigint AS SIGNED INTEGER) my_bigint id NULL NULL 1 -9223372036854775808 -9223372036854775808 2 @@ -2881,7 +2991,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as signed) AS `CAST(my_bigint AS SIGNED INTEGER)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 73 OR select_id IS NULL); +WHERE select_id = 75 OR select_id IS NULL) order by id; CAST(my_bigint AS SIGNED INTEGER) my_bigint id NULL NULL 1 -9223372036854775808 -9223372036854775808 2 @@ -2895,7 +3005,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS SIGNED INTEGER), my_varbinary_1000, id FROM t1_values; SELECT CAST(my_varbinary_1000 AS SIGNED INTEGER), my_varbinary_1000, id FROM t1_values -WHERE select_id = 72 OR select_id IS NULL; +WHERE select_id = 74 OR select_id IS NULL order by id; CAST(my_varbinary_1000 AS SIGNED INTEGER) my_varbinary_1000 id NULL NULL 1 0 2 @@ -2911,7 +3021,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as signed) AS `CAST(my_varbinary_1000 AS SIGNED INTEGER)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 72 OR select_id IS NULL); +WHERE select_id = 74 OR select_id IS NULL) order by id; CAST(my_varbinary_1000 AS SIGNED INTEGER) my_varbinary_1000 id NULL NULL 1 0 2 @@ -2929,13 +3039,13 @@ CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS SIGNED INTEGER), my_binary_30, id FROM t1_values; SELECT CAST(my_binary_30 AS SIGNED INTEGER), my_binary_30, id FROM t1_values -WHERE select_id = 71 OR select_id IS NULL; +WHERE select_id = 73 OR select_id IS NULL order by id; CAST(my_binary_30 AS SIGNED INTEGER) my_binary_30 id NULL NULL 1 -0 +0 2 0 <--------30 characters-------> 3 -0 ---äÖüß@µ*$-- --1 -1 +0 ---äÖüß@µ*$-- 4 +-1 -1 5 Warnings: Warning 1292 Truncated incorrect INTEGER value: '' Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->' @@ -2946,7 +3056,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as signed) AS `CAST(my_binary_30 AS SIGNED INTEGER)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 71 OR select_id IS NULL); +WHERE select_id = 73 OR select_id IS NULL) order by id; CAST(my_binary_30 AS SIGNED INTEGER) my_binary_30 id NULL NULL 1 0 @@ -2965,7 +3075,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS SIGNED INTEGER), my_varchar_1000, id FROM t1_values; SELECT CAST(my_varchar_1000 AS SIGNED INTEGER), my_varchar_1000, id FROM t1_values -WHERE select_id = 70 OR select_id IS NULL; +WHERE select_id = 72 OR select_id IS NULL order by id; CAST(my_varchar_1000 AS SIGNED INTEGER) my_varchar_1000 id NULL NULL 1 0 2 @@ -2981,7 +3091,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as signed) AS `CAST(my_varchar_1000 AS SIGNED INTEGER)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 70 OR select_id IS NULL); +WHERE select_id = 72 OR select_id IS NULL) order by id; CAST(my_varchar_1000 AS SIGNED INTEGER) my_varchar_1000 id NULL NULL 1 0 2 @@ -2999,7 +3109,7 @@ CREATE VIEW v1 AS SELECT CAST(my_char_30 AS SIGNED INTEGER), my_char_30, id FROM t1_values; SELECT CAST(my_char_30 AS SIGNED INTEGER), my_char_30, id FROM t1_values -WHERE select_id = 69 OR select_id IS NULL; +WHERE select_id = 71 OR select_id IS NULL order by id; CAST(my_char_30 AS SIGNED INTEGER) my_char_30 id NULL NULL 1 0 2 @@ -3015,7 +3125,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as signed) AS `CAST(my_char_30 AS SIGNED INTEGER)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 69 OR select_id IS NULL); +WHERE select_id = 71 OR select_id IS NULL) order by id; CAST(my_char_30 AS SIGNED INTEGER) my_char_30 id NULL NULL 1 0 2 @@ -3033,7 +3143,7 @@ CREATE VIEW v1 AS SELECT CAST(my_year AS DECIMAL(37,2)), my_year, id FROM t1_values; SELECT CAST(my_year AS DECIMAL(37,2)), my_year, id FROM t1_values -WHERE select_id = 68 OR select_id IS NULL; +WHERE select_id = 70 OR select_id IS NULL order by id; CAST(my_year AS DECIMAL(37,2)) my_year id NULL NULL 1 1901.00 1901 2 @@ -3045,7 +3155,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as decimal(37,2)) AS `CAST(my_year AS DECIMAL(37,2))`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 68 OR select_id IS NULL); +WHERE select_id = 70 OR select_id IS NULL) order by id; CAST(my_year AS DECIMAL(37,2)) my_year id NULL NULL 1 1901.00 1901 2 @@ -3059,7 +3169,7 @@ CREATE VIEW v1 AS SELECT CAST(my_time AS DECIMAL(37,2)), my_time, id FROM t1_values; SELECT CAST(my_time AS DECIMAL(37,2)), my_time, id FROM t1_values -WHERE select_id = 67 OR select_id IS NULL; +WHERE select_id = 69 OR select_id IS NULL order by id; CAST(my_time AS DECIMAL(37,2)) my_time id NULL NULL 1 -8385959.00 -838:59:59 2 @@ -3071,7 +3181,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as decimal(37,2)) AS `CAST(my_time AS DECIMAL(37,2))`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 67 OR select_id IS NULL); +WHERE select_id = 69 OR select_id IS NULL) order by id; CAST(my_time AS DECIMAL(37,2)) my_time id NULL NULL 1 -8385959.00 -838:59:59 2 @@ -3085,7 +3195,7 @@ CREATE VIEW v1 AS SELECT CAST(my_timestamp AS DECIMAL(37,2)), my_timestamp, id FROM t1_values; SELECT CAST(my_timestamp AS DECIMAL(37,2)), my_timestamp, id FROM t1_values -WHERE select_id = 66 OR select_id IS NULL; +WHERE select_id = 68 OR select_id IS NULL order by id; CAST(my_timestamp AS DECIMAL(37,2)) my_timestamp id 0.00 0000-00-00 00:00:00 1 19700101030001.00 1970-01-01 03:00:01 2 @@ -3097,7 +3207,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as decimal(37,2)) AS `CAST(my_timestamp AS DECIMAL(37,2))`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 66 OR select_id IS NULL); +WHERE select_id = 68 OR select_id IS NULL) order by id; CAST(my_timestamp AS DECIMAL(37,2)) my_timestamp id 0.00 0000-00-00 00:00:00 1 19700101030001.00 1970-01-01 03:00:01 2 @@ -3111,7 +3221,7 @@ CREATE VIEW v1 AS SELECT CAST(my_date AS DECIMAL(37,2)), my_date, id FROM t1_values; SELECT CAST(my_date AS DECIMAL(37,2)), my_date, id FROM t1_values -WHERE select_id = 65 OR select_id IS NULL; +WHERE select_id = 67 OR select_id IS NULL order by id; CAST(my_date AS DECIMAL(37,2)) my_date id NULL NULL 1 10101.00 0001-01-01 2 @@ -3123,7 +3233,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as decimal(37,2)) AS `CAST(my_date AS DECIMAL(37,2))`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 65 OR select_id IS NULL); +WHERE select_id = 67 OR select_id IS NULL) order by id; CAST(my_date AS DECIMAL(37,2)) my_date id NULL NULL 1 10101.00 0001-01-01 2 @@ -3137,7 +3247,7 @@ CREATE VIEW v1 AS SELECT CAST(my_datetime AS DECIMAL(37,2)), my_datetime, id FROM t1_values; SELECT CAST(my_datetime AS DECIMAL(37,2)), my_datetime, id FROM t1_values -WHERE select_id = 64 OR select_id IS NULL; +WHERE select_id = 66 OR select_id IS NULL order by id; CAST(my_datetime AS DECIMAL(37,2)) my_datetime id NULL NULL 1 10101000000.00 0001-01-01 00:00:00 2 @@ -3149,7 +3259,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as decimal(37,2)) AS `CAST(my_datetime AS DECIMAL(37,2))`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 64 OR select_id IS NULL); +WHERE select_id = 66 OR select_id IS NULL) order by id; CAST(my_datetime AS DECIMAL(37,2)) my_datetime id NULL NULL 1 10101000000.00 0001-01-01 00:00:00 2 @@ -3159,11 +3269,49 @@ NULL NULL 1 DROP VIEW v1; +CREATE VIEW v1 AS SELECT CAST(my_double AS DECIMAL(37,2)), +my_double, id FROM t1_values; +SELECT CAST(my_double AS DECIMAL(37,2)), +my_double, id FROM t1_values +WHERE select_id = 65 OR select_id IS NULL order by id; +CAST(my_double AS DECIMAL(37,2)) my_double id +NULL NULL 1 +-99999999999999999999999999999999999.99 -1.7976931348623e+308 2 +99999999999999999999999999999999999.99 1.7976931348623e+308 3 +0.00 0 4 +-1.00 -1 5 +-3333.33 -3333.3333 30 +Warnings: +Error 1292 Truncated incorrect DECIMAL value: '' +Error 1264 Out of range value adjusted for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Error 1292 Truncated incorrect DECIMAL value: '' +Error 1264 Out of range value adjusted for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +SHOW CREATE VIEW v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as decimal(37,2)) AS `CAST(my_double AS DECIMAL(37,2))`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +SELECT v1.* FROM v1 +WHERE v1.id IN (SELECT id FROM t1_values +WHERE select_id = 65 OR select_id IS NULL) order by id; +CAST(my_double AS DECIMAL(37,2)) my_double id +NULL NULL 1 +-99999999999999999999999999999999999.99 -1.7976931348623e+308 2 +99999999999999999999999999999999999.99 1.7976931348623e+308 3 +0.00 0 4 +-1.00 -1 5 +-3333.33 -3333.3333 30 +Warnings: +Error 1292 Truncated incorrect DECIMAL value: '' +Error 1264 Out of range value adjusted for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Error 1292 Truncated incorrect DECIMAL value: '' +Error 1264 Out of range value adjusted for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +DROP VIEW v1; + + CREATE VIEW v1 AS SELECT CAST(my_decimal AS DECIMAL(37,2)), my_decimal, id FROM t1_values; SELECT CAST(my_decimal AS DECIMAL(37,2)), my_decimal, id FROM t1_values -WHERE select_id = 63 OR select_id IS NULL; +WHERE select_id = 64 OR select_id IS NULL order by id; CAST(my_decimal AS DECIMAL(37,2)) my_decimal id NULL NULL 1 -10000000000000000000000000000000000.00 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -3175,7 +3323,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as decimal(37,2)) AS `CAST(my_decimal AS DECIMAL(37,2))`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 63 OR select_id IS NULL); +WHERE select_id = 64 OR select_id IS NULL) order by id; CAST(my_decimal AS DECIMAL(37,2)) my_decimal id NULL NULL 1 -10000000000000000000000000000000000.00 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -3189,7 +3337,7 @@ CREATE VIEW v1 AS SELECT CAST(my_bigint AS DECIMAL(37,2)), my_bigint, id FROM t1_values; SELECT CAST(my_bigint AS DECIMAL(37,2)), my_bigint, id FROM t1_values -WHERE select_id = 62 OR select_id IS NULL; +WHERE select_id = 63 OR select_id IS NULL order by id; CAST(my_bigint AS DECIMAL(37,2)) my_bigint id NULL NULL 1 -9223372036854775808.00 -9223372036854775808 2 @@ -3201,7 +3349,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as decimal(37,2)) AS `CAST(my_bigint AS DECIMAL(37,2))`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 62 OR select_id IS NULL); +WHERE select_id = 63 OR select_id IS NULL) order by id; CAST(my_bigint AS DECIMAL(37,2)) my_bigint id NULL NULL 1 -9223372036854775808.00 -9223372036854775808 2 @@ -3215,14 +3363,14 @@ CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS DECIMAL(37,2)), my_varbinary_1000, id FROM t1_values; SELECT CAST(my_varbinary_1000 AS DECIMAL(37,2)), my_varbinary_1000, id FROM t1_values -WHERE select_id = 61 OR select_id IS NULL; +WHERE select_id = 62 OR select_id IS NULL order by id; CAST(my_varbinary_1000 AS DECIMAL(37,2)) my_varbinary_1000 id NULL NULL 1 0.00 2 0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 0.00 ---äÖüß@µ*$-- 4 -1.00 -1 5 --3333.33 -3333.3333 28 +-3333.33 -3333.3333 29 Warnings: Error 1366 Incorrect decimal value: '' for column '' at row -1 Error 1366 Incorrect decimal value: '' for column '' at row -1 @@ -3232,14 +3380,14 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as decimal(37,2)) AS `CAST(my_varbinary_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 61 OR select_id IS NULL); +WHERE select_id = 62 OR select_id IS NULL) order by id; CAST(my_varbinary_1000 AS DECIMAL(37,2)) my_varbinary_1000 id NULL NULL 1 0.00 2 0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 0.00 ---äÖüß@µ*$-- 4 -1.00 -1 5 --3333.33 -3333.3333 28 +-3333.33 -3333.3333 29 Warnings: Error 1366 Incorrect decimal value: '' for column '' at row -1 Error 1366 Incorrect decimal value: '' for column '' at row -1 @@ -3251,14 +3399,14 @@ CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS DECIMAL(37,2)), my_binary_30, id FROM t1_values; SELECT CAST(my_binary_30 AS DECIMAL(37,2)), my_binary_30, id FROM t1_values -WHERE select_id = 60 OR select_id IS NULL; +WHERE select_id = 61 OR select_id IS NULL order by id; CAST(my_binary_30 AS DECIMAL(37,2)) my_binary_30 id NULL NULL 1 -0.00 +0.00 2 0.00 <--------30 characters-------> 3 -0.00 ---äÖüß@µ*$-- --1.00 -1 --3333.33 -3333.3333 +0.00 ---äÖüß@µ*$-- 4 +-1.00 -1 5 +-3333.33 -3333.3333 28 Warnings: Error 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '' @@ -3273,14 +3421,14 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as decimal(37,2)) AS `CAST(my_binary_30 AS DECIMAL(37,2))`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 60 OR select_id IS NULL); +WHERE select_id = 61 OR select_id IS NULL) order by id; CAST(my_binary_30 AS DECIMAL(37,2)) my_binary_30 id NULL NULL 1 0.00 0.00 <--------30 characters-------> 3 0.00 ---äÖüß@µ*$-- -1.00 -1 --3333.33 -3333.3333 +-3333.33 -3333.3333 Warnings: Error 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '' @@ -3297,14 +3445,14 @@ CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS DECIMAL(37,2)), my_varchar_1000, id FROM t1_values; SELECT CAST(my_varchar_1000 AS DECIMAL(37,2)), my_varchar_1000, id FROM t1_values -WHERE select_id = 59 OR select_id IS NULL; +WHERE select_id = 60 OR select_id IS NULL order by id; CAST(my_varchar_1000 AS DECIMAL(37,2)) my_varchar_1000 id NULL NULL 1 0.00 2 0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 0.00 ---äÖüß@µ*$-- 4 -1.00 -1 5 --3333.33 -3333.3333 26 +-3333.33 -3333.3333 27 Warnings: Error 1366 Incorrect decimal value: '' for column '' at row -1 Error 1366 Incorrect decimal value: '' for column '' at row -1 @@ -3314,14 +3462,14 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as decimal(37,2)) AS `CAST(my_varchar_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 59 OR select_id IS NULL); +WHERE select_id = 60 OR select_id IS NULL) order by id; CAST(my_varchar_1000 AS DECIMAL(37,2)) my_varchar_1000 id NULL NULL 1 0.00 2 0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 0.00 ---äÖüß@µ*$-- 4 -1.00 -1 5 --3333.33 -3333.3333 26 +-3333.33 -3333.3333 27 Warnings: Error 1366 Incorrect decimal value: '' for column '' at row -1 Error 1366 Incorrect decimal value: '' for column '' at row -1 @@ -3333,14 +3481,14 @@ CREATE VIEW v1 AS SELECT CAST(my_char_30 AS DECIMAL(37,2)), my_char_30, id FROM t1_values; SELECT CAST(my_char_30 AS DECIMAL(37,2)), my_char_30, id FROM t1_values -WHERE select_id = 58 OR select_id IS NULL; +WHERE select_id = 59 OR select_id IS NULL order by id; CAST(my_char_30 AS DECIMAL(37,2)) my_char_30 id NULL NULL 1 0.00 2 0.00 <--------30 characters-------> 3 0.00 ---äÖüß@µ*$-- 4 -1.00 -1 5 --3333.33 -3333.3333 25 +-3333.33 -3333.3333 26 Warnings: Error 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ' @@ -3353,14 +3501,14 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as decimal(37,2)) AS `CAST(my_char_30 AS DECIMAL(37,2))`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 58 OR select_id IS NULL); +WHERE select_id = 59 OR select_id IS NULL) order by id; CAST(my_char_30 AS DECIMAL(37,2)) my_char_30 id NULL NULL 1 0.00 2 0.00 <--------30 characters-------> 3 0.00 ---äÖüß@µ*$-- 4 -1.00 -1 5 --3333.33 -3333.3333 25 +-3333.33 -3333.3333 26 Warnings: Error 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ' @@ -3375,7 +3523,7 @@ CREATE VIEW v1 AS SELECT CAST(my_year AS TIME), my_year, id FROM t1_values; SELECT CAST(my_year AS TIME), my_year, id FROM t1_values -WHERE select_id = 57 OR select_id IS NULL; +WHERE select_id = 58 OR select_id IS NULL order by id; CAST(my_year AS TIME) my_year id NULL NULL 1 00:19:01 1901 2 @@ -3387,7 +3535,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as time) AS `CAST(my_year AS TIME)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 57 OR select_id IS NULL); +WHERE select_id = 58 OR select_id IS NULL) order by id; CAST(my_year AS TIME) my_year id NULL NULL 1 00:19:01 1901 2 @@ -3401,7 +3549,7 @@ CREATE VIEW v1 AS SELECT CAST(my_time AS TIME), my_time, id FROM t1_values; SELECT CAST(my_time AS TIME), my_time, id FROM t1_values -WHERE select_id = 56 OR select_id IS NULL; +WHERE select_id = 57 OR select_id IS NULL order by id; CAST(my_time AS TIME) my_time id NULL NULL 1 -838:59:59 -838:59:59 2 @@ -3413,7 +3561,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as time) AS `CAST(my_time AS TIME)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 56 OR select_id IS NULL); +WHERE select_id = 57 OR select_id IS NULL) order by id; CAST(my_time AS TIME) my_time id NULL NULL 1 -838:59:59 -838:59:59 2 @@ -3427,7 +3575,7 @@ CREATE VIEW v1 AS SELECT CAST(my_timestamp AS TIME), my_timestamp, id FROM t1_values; SELECT CAST(my_timestamp AS TIME), my_timestamp, id FROM t1_values -WHERE select_id = 55 OR select_id IS NULL; +WHERE select_id = 56 OR select_id IS NULL order by id; CAST(my_timestamp AS TIME) my_timestamp id 00:00:00 0000-00-00 00:00:00 1 03:00:01 1970-01-01 03:00:01 2 @@ -3439,7 +3587,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as time) AS `CAST(my_timestamp AS TIME)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 55 OR select_id IS NULL); +WHERE select_id = 56 OR select_id IS NULL) order by id; CAST(my_timestamp AS TIME) my_timestamp id 00:00:00 0000-00-00 00:00:00 1 03:00:01 1970-01-01 03:00:01 2 @@ -3453,7 +3601,7 @@ CREATE VIEW v1 AS SELECT CAST(my_date AS TIME), my_date, id FROM t1_values; SELECT CAST(my_date AS TIME), my_date, id FROM t1_values -WHERE select_id = 54 OR select_id IS NULL; +WHERE select_id = 55 OR select_id IS NULL order by id; CAST(my_date AS TIME) my_date id NULL NULL 1 00:00:00 0001-01-01 2 @@ -3465,7 +3613,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as time) AS `CAST(my_date AS TIME)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 54 OR select_id IS NULL); +WHERE select_id = 55 OR select_id IS NULL) order by id; CAST(my_date AS TIME) my_date id NULL NULL 1 00:00:00 0001-01-01 2 @@ -3479,7 +3627,7 @@ CREATE VIEW v1 AS SELECT CAST(my_datetime AS TIME), my_datetime, id FROM t1_values; SELECT CAST(my_datetime AS TIME), my_datetime, id FROM t1_values -WHERE select_id = 53 OR select_id IS NULL; +WHERE select_id = 54 OR select_id IS NULL order by id; CAST(my_datetime AS TIME) my_datetime id NULL NULL 1 00:00:00 0001-01-01 00:00:00 2 @@ -3491,7 +3639,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as time) AS `CAST(my_datetime AS TIME)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 53 OR select_id IS NULL); +WHERE select_id = 54 OR select_id IS NULL) order by id; CAST(my_datetime AS TIME) my_datetime id NULL NULL 1 00:00:00 0001-01-01 00:00:00 2 @@ -3501,11 +3649,45 @@ NULL NULL 1 DROP VIEW v1; +CREATE VIEW v1 AS SELECT CAST(my_double AS TIME), +my_double, id FROM t1_values; +SELECT CAST(my_double AS TIME), +my_double, id FROM t1_values +WHERE select_id = 53 OR select_id IS NULL order by id; +CAST(my_double AS TIME) my_double id +NULL NULL 1 +NULL -1.7976931348623e+308 2 +NULL 1.7976931348623e+308 3 +00:00:00 0 4 +-00:00:01 -1 5 +00:17:58 1758 25 +Warnings: +Warning 1292 Truncated incorrect time value: '-1.7976931348623e+308' +Warning 1292 Truncated incorrect time value: '1.7976931348623e+308' +SHOW CREATE VIEW v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as time) AS `CAST(my_double AS TIME)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +SELECT v1.* FROM v1 +WHERE v1.id IN (SELECT id FROM t1_values +WHERE select_id = 53 OR select_id IS NULL) order by id; +CAST(my_double AS TIME) my_double id +NULL NULL 1 +NULL -1.7976931348623e+308 2 +NULL 1.7976931348623e+308 3 +00:00:00 0 4 +-00:00:01 -1 5 +00:17:58 1758 25 +Warnings: +Warning 1292 Truncated incorrect time value: '-1.7976931348623e+308' +Warning 1292 Truncated incorrect time value: '1.7976931348623e+308' +DROP VIEW v1; + + CREATE VIEW v1 AS SELECT CAST(my_bigint AS TIME), my_bigint, id FROM t1_values; SELECT CAST(my_bigint AS TIME), my_bigint, id FROM t1_values -WHERE select_id = 52 OR select_id IS NULL; +WHERE select_id = 52 OR select_id IS NULL order by id; CAST(my_bigint AS TIME) my_bigint id NULL NULL 1 NULL -9223372036854775808 2 @@ -3521,7 +3703,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as time) AS `CAST(my_bigint AS TIME)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 52 OR select_id IS NULL); +WHERE select_id = 52 OR select_id IS NULL) order by id; CAST(my_bigint AS TIME) my_bigint id NULL NULL 1 NULL -9223372036854775808 2 @@ -3539,7 +3721,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS TIME), my_varbinary_1000, id FROM t1_values; SELECT CAST(my_varbinary_1000 AS TIME), my_varbinary_1000, id FROM t1_values -WHERE select_id = 51 OR select_id IS NULL; +WHERE select_id = 51 OR select_id IS NULL order by id; CAST(my_varbinary_1000 AS TIME) my_varbinary_1000 id NULL NULL 1 NULL 2 @@ -3556,7 +3738,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as time) AS `CAST(my_varbinary_1000 AS TIME)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 51 OR select_id IS NULL); +WHERE select_id = 51 OR select_id IS NULL) order by id; CAST(my_varbinary_1000 AS TIME) my_varbinary_1000 id NULL NULL 1 NULL 2 @@ -3575,14 +3757,14 @@ CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS TIME), my_binary_30, id FROM t1_values; SELECT CAST(my_binary_30 AS TIME), my_binary_30, id FROM t1_values -WHERE select_id = 50 OR select_id IS NULL; +WHERE select_id = 50 OR select_id IS NULL order by id; CAST(my_binary_30 AS TIME) my_binary_30 id NULL NULL 1 -00:00:00 +00:00:00 2 00:00:00 <--------30 characters-------> 3 --00:00:00 ---äÖüß@µ*$-- -NULL -1 -41:58:00 1 17:58 +-00:00:00 ---äÖüß@µ*$-- 4 +NULL -1 5 +41:58:00 1 17:58 22 Warnings: Warning 1292 Truncated incorrect time value: '' Warning 1292 Truncated incorrect time value: '<--------30 characters------->' @@ -3594,7 +3776,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as time) AS `CAST(my_binary_30 AS TIME)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 50 OR select_id IS NULL); +WHERE select_id = 50 OR select_id IS NULL) order by id; CAST(my_binary_30 AS TIME) my_binary_30 id NULL NULL 1 00:00:00 @@ -3615,7 +3797,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS TIME), my_varchar_1000, id FROM t1_values; SELECT CAST(my_varchar_1000 AS TIME), my_varchar_1000, id FROM t1_values -WHERE select_id = 49 OR select_id IS NULL; +WHERE select_id = 49 OR select_id IS NULL order by id; CAST(my_varchar_1000 AS TIME) my_varchar_1000 id NULL NULL 1 NULL 2 @@ -3632,7 +3814,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as time) AS `CAST(my_varchar_1000 AS TIME)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 49 OR select_id IS NULL); +WHERE select_id = 49 OR select_id IS NULL) order by id; CAST(my_varchar_1000 AS TIME) my_varchar_1000 id NULL NULL 1 NULL 2 @@ -3651,7 +3833,7 @@ CREATE VIEW v1 AS SELECT CAST(my_char_30 AS TIME), my_char_30, id FROM t1_values; SELECT CAST(my_char_30 AS TIME), my_char_30, id FROM t1_values -WHERE select_id = 48 OR select_id IS NULL; +WHERE select_id = 48 OR select_id IS NULL order by id; CAST(my_char_30 AS TIME) my_char_30 id NULL NULL 1 NULL 2 @@ -3668,7 +3850,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as time) AS `CAST(my_char_30 AS TIME)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 48 OR select_id IS NULL); +WHERE select_id = 48 OR select_id IS NULL) order by id; CAST(my_char_30 AS TIME) my_char_30 id NULL NULL 1 NULL 2 @@ -3687,7 +3869,7 @@ CREATE VIEW v1 AS SELECT CAST(my_year AS DATETIME), my_year, id FROM t1_values; SELECT CAST(my_year AS DATETIME), my_year, id FROM t1_values -WHERE select_id = 47 OR select_id IS NULL; +WHERE select_id = 47 OR select_id IS NULL order by id; CAST(my_year AS DATETIME) my_year id NULL NULL 1 NULL 1901 2 @@ -3704,7 +3886,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as datetime) AS `CAST(my_year AS DATETIME)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 47 OR select_id IS NULL); +WHERE select_id = 47 OR select_id IS NULL) order by id; CAST(my_year AS DATETIME) my_year id NULL NULL 1 NULL 1901 2 @@ -3723,7 +3905,7 @@ CREATE VIEW v1 AS SELECT CAST(my_time AS DATETIME), my_time, id FROM t1_values; SELECT CAST(my_time AS DATETIME), my_time, id FROM t1_values -WHERE select_id = 46 OR select_id IS NULL; +WHERE select_id = 46 OR select_id IS NULL order by id; CAST(my_time AS DATETIME) my_time id NULL NULL 1 0000-00-00 00:00:00 -838:59:59 2 @@ -3738,7 +3920,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as datetime) AS `CAST(my_time AS DATETIME)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 46 OR select_id IS NULL); +WHERE select_id = 46 OR select_id IS NULL) order by id; CAST(my_time AS DATETIME) my_time id NULL NULL 1 0000-00-00 00:00:00 -838:59:59 2 @@ -3755,7 +3937,7 @@ CREATE VIEW v1 AS SELECT CAST(my_timestamp AS DATETIME), my_timestamp, id FROM t1_values; SELECT CAST(my_timestamp AS DATETIME), my_timestamp, id FROM t1_values -WHERE select_id = 45 OR select_id IS NULL; +WHERE select_id = 45 OR select_id IS NULL order by id; CAST(my_timestamp AS DATETIME) my_timestamp id 0000-00-00 00:00:00 0000-00-00 00:00:00 1 1970-01-01 03:00:01 1970-01-01 03:00:01 2 @@ -3767,7 +3949,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as datetime) AS `CAST(my_timestamp AS DATETIME)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 45 OR select_id IS NULL); +WHERE select_id = 45 OR select_id IS NULL) order by id; CAST(my_timestamp AS DATETIME) my_timestamp id 0000-00-00 00:00:00 0000-00-00 00:00:00 1 1970-01-01 03:00:01 1970-01-01 03:00:01 2 @@ -3781,7 +3963,7 @@ CREATE VIEW v1 AS SELECT CAST(my_date AS DATETIME), my_date, id FROM t1_values; SELECT CAST(my_date AS DATETIME), my_date, id FROM t1_values -WHERE select_id = 44 OR select_id IS NULL; +WHERE select_id = 44 OR select_id IS NULL order by id; CAST(my_date AS DATETIME) my_date id NULL NULL 1 0001-01-01 00:00:00 0001-01-01 2 @@ -3793,7 +3975,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as datetime) AS `CAST(my_date AS DATETIME)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 44 OR select_id IS NULL); +WHERE select_id = 44 OR select_id IS NULL) order by id; CAST(my_date AS DATETIME) my_date id NULL NULL 1 0001-01-01 00:00:00 0001-01-01 2 @@ -3807,7 +3989,7 @@ CREATE VIEW v1 AS SELECT CAST(my_datetime AS DATETIME), my_datetime, id FROM t1_values; SELECT CAST(my_datetime AS DATETIME), my_datetime, id FROM t1_values -WHERE select_id = 43 OR select_id IS NULL; +WHERE select_id = 43 OR select_id IS NULL order by id; CAST(my_datetime AS DATETIME) my_datetime id NULL NULL 1 0001-01-01 00:00:00 0001-01-01 00:00:00 2 @@ -3819,7 +4001,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as datetime) AS `CAST(my_datetime AS DATETIME)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 43 OR select_id IS NULL); +WHERE select_id = 43 OR select_id IS NULL) order by id; CAST(my_datetime AS DATETIME) my_datetime id NULL NULL 1 0001-01-01 00:00:00 0001-01-01 00:00:00 2 @@ -3833,7 +4015,7 @@ CREATE VIEW v1 AS SELECT CAST(my_double AS DATETIME), my_double, id FROM t1_values; SELECT CAST(my_double AS DATETIME), my_double, id FROM t1_values -WHERE select_id = 42 OR select_id IS NULL; +WHERE select_id = 42 OR select_id IS NULL order by id; CAST(my_double AS DATETIME) my_double id NULL NULL 1 NULL -1.7976931348623e+308 2 @@ -3852,7 +4034,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as datetime) AS `CAST(my_double AS DATETIME)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 42 OR select_id IS NULL); +WHERE select_id = 42 OR select_id IS NULL) order by id; CAST(my_double AS DATETIME) my_double id NULL NULL 1 NULL -1.7976931348623e+308 2 @@ -3873,7 +4055,7 @@ CREATE VIEW v1 AS SELECT CAST(my_bigint AS DATETIME), my_bigint, id FROM t1_values; SELECT CAST(my_bigint AS DATETIME), my_bigint, id FROM t1_values -WHERE select_id = 41 OR select_id IS NULL; +WHERE select_id = 41 OR select_id IS NULL order by id; CAST(my_bigint AS DATETIME) my_bigint id NULL NULL 1 NULL -9223372036854775808 2 @@ -3892,7 +4074,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as datetime) AS `CAST(my_bigint AS DATETIME)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 41 OR select_id IS NULL); +WHERE select_id = 41 OR select_id IS NULL) order by id; CAST(my_bigint AS DATETIME) my_bigint id NULL NULL 1 NULL -9223372036854775808 2 @@ -3913,7 +4095,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS DATETIME), my_varbinary_1000, id FROM t1_values; SELECT CAST(my_varbinary_1000 AS DATETIME), my_varbinary_1000, id FROM t1_values -WHERE select_id = 40 OR select_id IS NULL; +WHERE select_id = 40 OR select_id IS NULL order by id; CAST(my_varbinary_1000 AS DATETIME) my_varbinary_1000 id NULL NULL 1 NULL 2 @@ -3931,7 +4113,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as datetime) AS `CAST(my_varbinary_1000 AS DATETIME)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 40 OR select_id IS NULL); +WHERE select_id = 40 OR select_id IS NULL) order by id; CAST(my_varbinary_1000 AS DATETIME) my_varbinary_1000 id NULL NULL 1 NULL 2 @@ -3951,14 +4133,14 @@ CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS DATETIME), my_binary_30, id FROM t1_values; SELECT CAST(my_binary_30 AS DATETIME), my_binary_30, id FROM t1_values -WHERE select_id = 39 OR select_id IS NULL; +WHERE select_id = 39 OR select_id IS NULL order by id; CAST(my_binary_30 AS DATETIME) my_binary_30 id NULL NULL 1 -NULL +NULL 2 NULL <--------30 characters-------> 3 -NULL ---äÖüß@µ*$-- -NULL -1 -2005-06-27 17:58:00 2005-06-27 17:58 +NULL ---äÖüß@µ*$-- 4 +NULL -1 5 +2005-06-27 17:58:00 2005-06-27 17:58 16 Warnings: Warning 1292 Truncated incorrect datetime value: '' Warning 1292 Truncated incorrect datetime value: '<--------30 characters------->' @@ -3970,7 +4152,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as datetime) AS `CAST(my_binary_30 AS DATETIME)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 39 OR select_id IS NULL); +WHERE select_id = 39 OR select_id IS NULL) order by id; CAST(my_binary_30 AS DATETIME) my_binary_30 id NULL NULL 1 NULL @@ -3991,7 +4173,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS DATETIME), my_varchar_1000, id FROM t1_values; SELECT CAST(my_varchar_1000 AS DATETIME), my_varchar_1000, id FROM t1_values -WHERE select_id = 38 OR select_id IS NULL; +WHERE select_id = 38 OR select_id IS NULL order by id; CAST(my_varchar_1000 AS DATETIME) my_varchar_1000 id NULL NULL 1 NULL 2 @@ -4009,7 +4191,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as datetime) AS `CAST(my_varchar_1000 AS DATETIME)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 38 OR select_id IS NULL); +WHERE select_id = 38 OR select_id IS NULL) order by id; CAST(my_varchar_1000 AS DATETIME) my_varchar_1000 id NULL NULL 1 NULL 2 @@ -4029,7 +4211,7 @@ CREATE VIEW v1 AS SELECT CAST(my_char_30 AS DATETIME), my_char_30, id FROM t1_values; SELECT CAST(my_char_30 AS DATETIME), my_char_30, id FROM t1_values -WHERE select_id = 37 OR select_id IS NULL; +WHERE select_id = 37 OR select_id IS NULL order by id; CAST(my_char_30 AS DATETIME) my_char_30 id NULL NULL 1 NULL 2 @@ -4047,7 +4229,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as datetime) AS `CAST(my_char_30 AS DATETIME)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 37 OR select_id IS NULL); +WHERE select_id = 37 OR select_id IS NULL) order by id; CAST(my_char_30 AS DATETIME) my_char_30 id NULL NULL 1 NULL 2 @@ -4067,7 +4249,7 @@ CREATE VIEW v1 AS SELECT CAST(my_year AS DATE), my_year, id FROM t1_values; SELECT CAST(my_year AS DATE), my_year, id FROM t1_values -WHERE select_id = 36 OR select_id IS NULL; +WHERE select_id = 36 OR select_id IS NULL order by id; CAST(my_year AS DATE) my_year id NULL NULL 1 NULL 1901 2 @@ -4084,7 +4266,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as date) AS `CAST(my_year AS DATE)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 36 OR select_id IS NULL); +WHERE select_id = 36 OR select_id IS NULL) order by id; CAST(my_year AS DATE) my_year id NULL NULL 1 NULL 1901 2 @@ -4103,7 +4285,7 @@ CREATE VIEW v1 AS SELECT CAST(my_time AS DATE), my_time, id FROM t1_values; SELECT CAST(my_time AS DATE), my_time, id FROM t1_values -WHERE select_id = 35 OR select_id IS NULL; +WHERE select_id = 35 OR select_id IS NULL order by id; CAST(my_time AS DATE) my_time id NULL NULL 1 0000-00-00 -838:59:59 2 @@ -4115,7 +4297,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as date) AS `CAST(my_time AS DATE)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 35 OR select_id IS NULL); +WHERE select_id = 35 OR select_id IS NULL) order by id; CAST(my_time AS DATE) my_time id NULL NULL 1 0000-00-00 -838:59:59 2 @@ -4129,7 +4311,7 @@ CREATE VIEW v1 AS SELECT CAST(my_timestamp AS DATE), my_timestamp, id FROM t1_values; SELECT CAST(my_timestamp AS DATE), my_timestamp, id FROM t1_values -WHERE select_id = 34 OR select_id IS NULL; +WHERE select_id = 34 OR select_id IS NULL order by id; CAST(my_timestamp AS DATE) my_timestamp id 0000-00-00 0000-00-00 00:00:00 1 1970-01-01 1970-01-01 03:00:01 2 @@ -4141,7 +4323,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as date) AS `CAST(my_timestamp AS DATE)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 34 OR select_id IS NULL); +WHERE select_id = 34 OR select_id IS NULL) order by id; CAST(my_timestamp AS DATE) my_timestamp id 0000-00-00 0000-00-00 00:00:00 1 1970-01-01 1970-01-01 03:00:01 2 @@ -4155,7 +4337,7 @@ CREATE VIEW v1 AS SELECT CAST(my_date AS DATE), my_date, id FROM t1_values; SELECT CAST(my_date AS DATE), my_date, id FROM t1_values -WHERE select_id = 33 OR select_id IS NULL; +WHERE select_id = 33 OR select_id IS NULL order by id; CAST(my_date AS DATE) my_date id NULL NULL 1 0001-01-01 0001-01-01 2 @@ -4167,7 +4349,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as date) AS `CAST(my_date AS DATE)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 33 OR select_id IS NULL); +WHERE select_id = 33 OR select_id IS NULL) order by id; CAST(my_date AS DATE) my_date id NULL NULL 1 0001-01-01 0001-01-01 2 @@ -4181,7 +4363,7 @@ CREATE VIEW v1 AS SELECT CAST(my_datetime AS DATE), my_datetime, id FROM t1_values; SELECT CAST(my_datetime AS DATE), my_datetime, id FROM t1_values -WHERE select_id = 32 OR select_id IS NULL; +WHERE select_id = 32 OR select_id IS NULL order by id; CAST(my_datetime AS DATE) my_datetime id NULL NULL 1 0001-01-01 0001-01-01 00:00:00 2 @@ -4193,7 +4375,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as date) AS `CAST(my_datetime AS DATE)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 32 OR select_id IS NULL); +WHERE select_id = 32 OR select_id IS NULL) order by id; CAST(my_datetime AS DATE) my_datetime id NULL NULL 1 0001-01-01 0001-01-01 00:00:00 2 @@ -4207,7 +4389,7 @@ CREATE VIEW v1 AS SELECT CAST(my_double AS DATE), my_double, id FROM t1_values; SELECT CAST(my_double AS DATE), my_double, id FROM t1_values -WHERE select_id = 31 OR select_id IS NULL; +WHERE select_id = 31 OR select_id IS NULL order by id; CAST(my_double AS DATE) my_double id NULL NULL 1 NULL -1.7976931348623e+308 2 @@ -4225,7 +4407,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as date) AS `CAST(my_double AS DATE)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 31 OR select_id IS NULL); +WHERE select_id = 31 OR select_id IS NULL) order by id; CAST(my_double AS DATE) my_double id NULL NULL 1 NULL -1.7976931348623e+308 2 @@ -4245,7 +4427,7 @@ CREATE VIEW v1 AS SELECT CAST(my_bigint AS DATE), my_bigint, id FROM t1_values; SELECT CAST(my_bigint AS DATE), my_bigint, id FROM t1_values -WHERE select_id = 30 OR select_id IS NULL; +WHERE select_id = 30 OR select_id IS NULL order by id; CAST(my_bigint AS DATE) my_bigint id NULL NULL 1 NULL -9223372036854775808 2 @@ -4263,7 +4445,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as date) AS `CAST(my_bigint AS DATE)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 30 OR select_id IS NULL); +WHERE select_id = 30 OR select_id IS NULL) order by id; CAST(my_bigint AS DATE) my_bigint id NULL NULL 1 NULL -9223372036854775808 2 @@ -4283,7 +4465,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS DATE), my_varbinary_1000, id FROM t1_values; SELECT CAST(my_varbinary_1000 AS DATE), my_varbinary_1000, id FROM t1_values -WHERE select_id = 29 OR select_id IS NULL; +WHERE select_id = 29 OR select_id IS NULL order by id; CAST(my_varbinary_1000 AS DATE) my_varbinary_1000 id NULL NULL 1 NULL 2 @@ -4301,7 +4483,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as date) AS `CAST(my_varbinary_1000 AS DATE)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 29 OR select_id IS NULL); +WHERE select_id = 29 OR select_id IS NULL) order by id; CAST(my_varbinary_1000 AS DATE) my_varbinary_1000 id NULL NULL 1 NULL 2 @@ -4321,14 +4503,14 @@ CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS DATE), my_binary_30, id FROM t1_values; SELECT CAST(my_binary_30 AS DATE), my_binary_30, id FROM t1_values -WHERE select_id = 28 OR select_id IS NULL; +WHERE select_id = 28 OR select_id IS NULL order by id; CAST(my_binary_30 AS DATE) my_binary_30 id NULL NULL 1 -NULL +NULL 2 NULL <--------30 characters-------> 3 -NULL ---äÖüß@µ*$-- -NULL -1 -2005-06-27 2005-06-27 +NULL ---äÖüß@µ*$-- 4 +NULL -1 5 +2005-06-27 2005-06-27 10 Warnings: Warning 1292 Truncated incorrect datetime value: '' Warning 1292 Truncated incorrect datetime value: '<--------30 characters------->' @@ -4340,7 +4522,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as date) AS `CAST(my_binary_30 AS DATE)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 28 OR select_id IS NULL); +WHERE select_id = 28 OR select_id IS NULL) order by id; CAST(my_binary_30 AS DATE) my_binary_30 id NULL NULL 1 NULL @@ -4361,7 +4543,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS DATE), my_varchar_1000, id FROM t1_values; SELECT CAST(my_varchar_1000 AS DATE), my_varchar_1000, id FROM t1_values -WHERE select_id = 27 OR select_id IS NULL; +WHERE select_id = 27 OR select_id IS NULL order by id; CAST(my_varchar_1000 AS DATE) my_varchar_1000 id NULL NULL 1 NULL 2 @@ -4379,7 +4561,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as date) AS `CAST(my_varchar_1000 AS DATE)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 27 OR select_id IS NULL); +WHERE select_id = 27 OR select_id IS NULL) order by id; CAST(my_varchar_1000 AS DATE) my_varchar_1000 id NULL NULL 1 NULL 2 @@ -4399,7 +4581,7 @@ CREATE VIEW v1 AS SELECT CAST(my_char_30 AS DATE), my_char_30, id FROM t1_values; SELECT CAST(my_char_30 AS DATE), my_char_30, id FROM t1_values -WHERE select_id = 26 OR select_id IS NULL; +WHERE select_id = 26 OR select_id IS NULL order by id; CAST(my_char_30 AS DATE) my_char_30 id NULL NULL 1 NULL 2 @@ -4417,7 +4599,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as date) AS `CAST(my_char_30 AS DATE)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 26 OR select_id IS NULL); +WHERE select_id = 26 OR select_id IS NULL) order by id; CAST(my_char_30 AS DATE) my_char_30 id NULL NULL 1 NULL 2 @@ -4437,7 +4619,7 @@ CREATE VIEW v1 AS SELECT CAST(my_year AS CHAR), my_year, id FROM t1_values; SELECT CAST(my_year AS CHAR), my_year, id FROM t1_values -WHERE select_id = 25 OR select_id IS NULL; +WHERE select_id = 25 OR select_id IS NULL order by id; CAST(my_year AS CHAR) my_year id NULL NULL 1 1901 1901 2 @@ -4449,7 +4631,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as char charset latin1) AS `CAST(my_year AS CHAR)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 25 OR select_id IS NULL); +WHERE select_id = 25 OR select_id IS NULL) order by id; CAST(my_year AS CHAR) my_year id NULL NULL 1 1901 1901 2 @@ -4463,7 +4645,7 @@ CREATE VIEW v1 AS SELECT CAST(my_time AS CHAR), my_time, id FROM t1_values; SELECT CAST(my_time AS CHAR), my_time, id FROM t1_values -WHERE select_id = 24 OR select_id IS NULL; +WHERE select_id = 24 OR select_id IS NULL order by id; CAST(my_time AS CHAR) my_time id NULL NULL 1 -838:59:59 -838:59:59 2 @@ -4475,7 +4657,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as char charset latin1) AS `CAST(my_time AS CHAR)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 24 OR select_id IS NULL); +WHERE select_id = 24 OR select_id IS NULL) order by id; CAST(my_time AS CHAR) my_time id NULL NULL 1 -838:59:59 -838:59:59 2 @@ -4489,7 +4671,7 @@ CREATE VIEW v1 AS SELECT CAST(my_timestamp AS CHAR), my_timestamp, id FROM t1_values; SELECT CAST(my_timestamp AS CHAR), my_timestamp, id FROM t1_values -WHERE select_id = 23 OR select_id IS NULL; +WHERE select_id = 23 OR select_id IS NULL order by id; CAST(my_timestamp AS CHAR) my_timestamp id 0000-00-00 00:00:00 0000-00-00 00:00:00 1 1970-01-01 03:00:01 1970-01-01 03:00:01 2 @@ -4501,7 +4683,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as char charset latin1) AS `CAST(my_timestamp AS CHAR)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 23 OR select_id IS NULL); +WHERE select_id = 23 OR select_id IS NULL) order by id; CAST(my_timestamp AS CHAR) my_timestamp id 0000-00-00 00:00:00 0000-00-00 00:00:00 1 1970-01-01 03:00:01 1970-01-01 03:00:01 2 @@ -4515,7 +4697,7 @@ CREATE VIEW v1 AS SELECT CAST(my_date AS CHAR), my_date, id FROM t1_values; SELECT CAST(my_date AS CHAR), my_date, id FROM t1_values -WHERE select_id = 22 OR select_id IS NULL; +WHERE select_id = 22 OR select_id IS NULL order by id; CAST(my_date AS CHAR) my_date id NULL NULL 1 0001-01-01 0001-01-01 2 @@ -4527,7 +4709,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as char charset latin1) AS `CAST(my_date AS CHAR)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 22 OR select_id IS NULL); +WHERE select_id = 22 OR select_id IS NULL) order by id; CAST(my_date AS CHAR) my_date id NULL NULL 1 0001-01-01 0001-01-01 2 @@ -4541,7 +4723,7 @@ CREATE VIEW v1 AS SELECT CAST(my_datetime AS CHAR), my_datetime, id FROM t1_values; SELECT CAST(my_datetime AS CHAR), my_datetime, id FROM t1_values -WHERE select_id = 21 OR select_id IS NULL; +WHERE select_id = 21 OR select_id IS NULL order by id; CAST(my_datetime AS CHAR) my_datetime id NULL NULL 1 0001-01-01 00:00:00 0001-01-01 00:00:00 2 @@ -4553,7 +4735,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as char charset latin1) AS `CAST(my_datetime AS CHAR)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 21 OR select_id IS NULL); +WHERE select_id = 21 OR select_id IS NULL) order by id; CAST(my_datetime AS CHAR) my_datetime id NULL NULL 1 0001-01-01 00:00:00 0001-01-01 00:00:00 2 @@ -4567,7 +4749,7 @@ CREATE VIEW v1 AS SELECT CAST(my_double AS CHAR), my_double, id FROM t1_values; SELECT CAST(my_double AS CHAR), my_double, id FROM t1_values -WHERE select_id = 20 OR select_id IS NULL; +WHERE select_id = 20 OR select_id IS NULL order by id; CAST(my_double AS CHAR) my_double id NULL NULL 1 -1.7976931348623e+308 -1.7976931348623e+308 2 @@ -4579,7 +4761,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as char charset latin1) AS `CAST(my_double AS CHAR)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 20 OR select_id IS NULL); +WHERE select_id = 20 OR select_id IS NULL) order by id; CAST(my_double AS CHAR) my_double id NULL NULL 1 -1.7976931348623e+308 -1.7976931348623e+308 2 @@ -4593,7 +4775,7 @@ CREATE VIEW v1 AS SELECT CAST(my_decimal AS CHAR), my_decimal, id FROM t1_values; SELECT CAST(my_decimal AS CHAR), my_decimal, id FROM t1_values -WHERE select_id = 19 OR select_id IS NULL; +WHERE select_id = 19 OR select_id IS NULL order by id; CAST(my_decimal AS CHAR) my_decimal id NULL NULL 1 -9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -4605,7 +4787,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as char charset latin1) AS `CAST(my_decimal AS CHAR)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 19 OR select_id IS NULL); +WHERE select_id = 19 OR select_id IS NULL) order by id; CAST(my_decimal AS CHAR) my_decimal id NULL NULL 1 -9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -4619,7 +4801,7 @@ CREATE VIEW v1 AS SELECT CAST(my_bigint AS CHAR), my_bigint, id FROM t1_values; SELECT CAST(my_bigint AS CHAR), my_bigint, id FROM t1_values -WHERE select_id = 18 OR select_id IS NULL; +WHERE select_id = 18 OR select_id IS NULL order by id; CAST(my_bigint AS CHAR) my_bigint id NULL NULL 1 -9223372036854775808 -9223372036854775808 2 @@ -4631,7 +4813,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as char charset latin1) AS `CAST(my_bigint AS CHAR)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 18 OR select_id IS NULL); +WHERE select_id = 18 OR select_id IS NULL) order by id; CAST(my_bigint AS CHAR) my_bigint id NULL NULL 1 -9223372036854775808 -9223372036854775808 2 @@ -4645,7 +4827,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS CHAR), my_varbinary_1000, id FROM t1_values; SELECT CAST(my_varbinary_1000 AS CHAR), my_varbinary_1000, id FROM t1_values -WHERE select_id = 17 OR select_id IS NULL; +WHERE select_id = 17 OR select_id IS NULL order by id; CAST(my_varbinary_1000 AS CHAR) my_varbinary_1000 id NULL NULL 1 2 @@ -4657,7 +4839,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as char charset latin1) AS `CAST(my_varbinary_1000 AS CHAR)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 17 OR select_id IS NULL); +WHERE select_id = 17 OR select_id IS NULL) order by id; CAST(my_varbinary_1000 AS CHAR) my_varbinary_1000 id NULL NULL 1 2 @@ -4671,19 +4853,19 @@ CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS CHAR), my_binary_30, id FROM t1_values; SELECT CAST(my_binary_30 AS CHAR), my_binary_30, id FROM t1_values -WHERE select_id = 16 OR select_id IS NULL; +WHERE select_id = 16 OR select_id IS NULL order by id; CAST(my_binary_30 AS CHAR) my_binary_30 id NULL NULL 1 - + 2 <--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- --1 + ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 +-1 -1 5 SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as char charset latin1) AS `CAST(my_binary_30 AS CHAR)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 16 OR select_id IS NULL); +WHERE select_id = 16 OR select_id IS NULL) order by id; CAST(my_binary_30 AS CHAR) my_binary_30 id NULL NULL 1 @@ -4697,7 +4879,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS CHAR), my_varchar_1000, id FROM t1_values; SELECT CAST(my_varchar_1000 AS CHAR), my_varchar_1000, id FROM t1_values -WHERE select_id = 15 OR select_id IS NULL; +WHERE select_id = 15 OR select_id IS NULL order by id; CAST(my_varchar_1000 AS CHAR) my_varchar_1000 id NULL NULL 1 2 @@ -4709,7 +4891,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as char charset latin1) AS `CAST(my_varchar_1000 AS CHAR)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 15 OR select_id IS NULL); +WHERE select_id = 15 OR select_id IS NULL) order by id; CAST(my_varchar_1000 AS CHAR) my_varchar_1000 id NULL NULL 1 2 @@ -4723,7 +4905,7 @@ CREATE VIEW v1 AS SELECT CAST(my_char_30 AS CHAR), my_char_30, id FROM t1_values; SELECT CAST(my_char_30 AS CHAR), my_char_30, id FROM t1_values -WHERE select_id = 14 OR select_id IS NULL; +WHERE select_id = 14 OR select_id IS NULL order by id; CAST(my_char_30 AS CHAR) my_char_30 id NULL NULL 1 2 @@ -4735,7 +4917,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as char charset latin1) AS `CAST(my_char_30 AS CHAR)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 14 OR select_id IS NULL); +WHERE select_id = 14 OR select_id IS NULL) order by id; CAST(my_char_30 AS CHAR) my_char_30 id NULL NULL 1 2 @@ -4749,7 +4931,7 @@ CREATE VIEW v1 AS SELECT CAST(my_year AS BINARY), my_year, id FROM t1_values; SELECT CAST(my_year AS BINARY), my_year, id FROM t1_values -WHERE select_id = 13 OR select_id IS NULL; +WHERE select_id = 13 OR select_id IS NULL order by id; CAST(my_year AS BINARY) my_year id NULL NULL 1 1901 1901 2 @@ -4761,7 +4943,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as char charset binary) AS `CAST(my_year AS BINARY)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 13 OR select_id IS NULL); +WHERE select_id = 13 OR select_id IS NULL) order by id; CAST(my_year AS BINARY) my_year id NULL NULL 1 1901 1901 2 @@ -4775,7 +4957,7 @@ CREATE VIEW v1 AS SELECT CAST(my_time AS BINARY), my_time, id FROM t1_values; SELECT CAST(my_time AS BINARY), my_time, id FROM t1_values -WHERE select_id = 12 OR select_id IS NULL; +WHERE select_id = 12 OR select_id IS NULL order by id; CAST(my_time AS BINARY) my_time id NULL NULL 1 -838:59:59 -838:59:59 2 @@ -4787,7 +4969,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as char charset binary) AS `CAST(my_time AS BINARY)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 12 OR select_id IS NULL); +WHERE select_id = 12 OR select_id IS NULL) order by id; CAST(my_time AS BINARY) my_time id NULL NULL 1 -838:59:59 -838:59:59 2 @@ -4801,7 +4983,7 @@ CREATE VIEW v1 AS SELECT CAST(my_timestamp AS BINARY), my_timestamp, id FROM t1_values; SELECT CAST(my_timestamp AS BINARY), my_timestamp, id FROM t1_values -WHERE select_id = 11 OR select_id IS NULL; +WHERE select_id = 11 OR select_id IS NULL order by id; CAST(my_timestamp AS BINARY) my_timestamp id 0000-00-00 00:00:00 0000-00-00 00:00:00 1 1970-01-01 03:00:01 1970-01-01 03:00:01 2 @@ -4813,7 +4995,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as char charset binary) AS `CAST(my_timestamp AS BINARY)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 11 OR select_id IS NULL); +WHERE select_id = 11 OR select_id IS NULL) order by id; CAST(my_timestamp AS BINARY) my_timestamp id 0000-00-00 00:00:00 0000-00-00 00:00:00 1 1970-01-01 03:00:01 1970-01-01 03:00:01 2 @@ -4827,7 +5009,7 @@ CREATE VIEW v1 AS SELECT CAST(my_date AS BINARY), my_date, id FROM t1_values; SELECT CAST(my_date AS BINARY), my_date, id FROM t1_values -WHERE select_id = 10 OR select_id IS NULL; +WHERE select_id = 10 OR select_id IS NULL order by id; CAST(my_date AS BINARY) my_date id NULL NULL 1 0001-01-01 0001-01-01 2 @@ -4839,7 +5021,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as char charset binary) AS `CAST(my_date AS BINARY)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 10 OR select_id IS NULL); +WHERE select_id = 10 OR select_id IS NULL) order by id; CAST(my_date AS BINARY) my_date id NULL NULL 1 0001-01-01 0001-01-01 2 @@ -4853,7 +5035,7 @@ CREATE VIEW v1 AS SELECT CAST(my_datetime AS BINARY), my_datetime, id FROM t1_values; SELECT CAST(my_datetime AS BINARY), my_datetime, id FROM t1_values -WHERE select_id = 9 OR select_id IS NULL; +WHERE select_id = 9 OR select_id IS NULL order by id; CAST(my_datetime AS BINARY) my_datetime id NULL NULL 1 0001-01-01 00:00:00 0001-01-01 00:00:00 2 @@ -4865,7 +5047,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as char charset binary) AS `CAST(my_datetime AS BINARY)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 9 OR select_id IS NULL); +WHERE select_id = 9 OR select_id IS NULL) order by id; CAST(my_datetime AS BINARY) my_datetime id NULL NULL 1 0001-01-01 00:00:00 0001-01-01 00:00:00 2 @@ -4879,7 +5061,7 @@ CREATE VIEW v1 AS SELECT CAST(my_double AS BINARY), my_double, id FROM t1_values; SELECT CAST(my_double AS BINARY), my_double, id FROM t1_values -WHERE select_id = 8 OR select_id IS NULL; +WHERE select_id = 8 OR select_id IS NULL order by id; CAST(my_double AS BINARY) my_double id NULL NULL 1 -1.7976931348623e+308 -1.7976931348623e+308 2 @@ -4891,7 +5073,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as char charset binary) AS `CAST(my_double AS BINARY)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 8 OR select_id IS NULL); +WHERE select_id = 8 OR select_id IS NULL) order by id; CAST(my_double AS BINARY) my_double id NULL NULL 1 -1.7976931348623e+308 -1.7976931348623e+308 2 @@ -4905,7 +5087,7 @@ CREATE VIEW v1 AS SELECT CAST(my_decimal AS BINARY), my_decimal, id FROM t1_values; SELECT CAST(my_decimal AS BINARY), my_decimal, id FROM t1_values -WHERE select_id = 7 OR select_id IS NULL; +WHERE select_id = 7 OR select_id IS NULL order by id; CAST(my_decimal AS BINARY) my_decimal id NULL NULL 1 -9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -4917,7 +5099,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as char charset binary) AS `CAST(my_decimal AS BINARY)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 7 OR select_id IS NULL); +WHERE select_id = 7 OR select_id IS NULL) order by id; CAST(my_decimal AS BINARY) my_decimal id NULL NULL 1 -9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -4931,7 +5113,7 @@ CREATE VIEW v1 AS SELECT CAST(my_bigint AS BINARY), my_bigint, id FROM t1_values; SELECT CAST(my_bigint AS BINARY), my_bigint, id FROM t1_values -WHERE select_id = 6 OR select_id IS NULL; +WHERE select_id = 6 OR select_id IS NULL order by id; CAST(my_bigint AS BINARY) my_bigint id NULL NULL 1 -9223372036854775808 -9223372036854775808 2 @@ -4943,7 +5125,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as char charset binary) AS `CAST(my_bigint AS BINARY)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 6 OR select_id IS NULL); +WHERE select_id = 6 OR select_id IS NULL) order by id; CAST(my_bigint AS BINARY) my_bigint id NULL NULL 1 -9223372036854775808 -9223372036854775808 2 @@ -4957,7 +5139,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS BINARY), my_varbinary_1000, id FROM t1_values; SELECT CAST(my_varbinary_1000 AS BINARY), my_varbinary_1000, id FROM t1_values -WHERE select_id = 5 OR select_id IS NULL; +WHERE select_id = 5 OR select_id IS NULL order by id; CAST(my_varbinary_1000 AS BINARY) my_varbinary_1000 id NULL NULL 1 2 @@ -4969,7 +5151,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as char charset binary) AS `CAST(my_varbinary_1000 AS BINARY)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 5 OR select_id IS NULL); +WHERE select_id = 5 OR select_id IS NULL) order by id; CAST(my_varbinary_1000 AS BINARY) my_varbinary_1000 id NULL NULL 1 2 @@ -4983,19 +5165,19 @@ CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS BINARY), my_binary_30, id FROM t1_values; SELECT CAST(my_binary_30 AS BINARY), my_binary_30, id FROM t1_values -WHERE select_id = 4 OR select_id IS NULL; +WHERE select_id = 4 OR select_id IS NULL order by id; CAST(my_binary_30 AS BINARY) my_binary_30 id NULL NULL 1 - + 2 <--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- --1 + ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 +-1 -1 5 SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as char charset binary) AS `CAST(my_binary_30 AS BINARY)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 4 OR select_id IS NULL); +WHERE select_id = 4 OR select_id IS NULL) order by id; CAST(my_binary_30 AS BINARY) my_binary_30 id NULL NULL 1 @@ -5009,7 +5191,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS BINARY), my_varchar_1000, id FROM t1_values; SELECT CAST(my_varchar_1000 AS BINARY), my_varchar_1000, id FROM t1_values -WHERE select_id = 3 OR select_id IS NULL; +WHERE select_id = 3 OR select_id IS NULL order by id; CAST(my_varchar_1000 AS BINARY) my_varchar_1000 id NULL NULL 1 2 @@ -5021,7 +5203,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as char charset binary) AS `CAST(my_varchar_1000 AS BINARY)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 3 OR select_id IS NULL); +WHERE select_id = 3 OR select_id IS NULL) order by id; CAST(my_varchar_1000 AS BINARY) my_varchar_1000 id NULL NULL 1 2 @@ -5035,7 +5217,7 @@ CREATE VIEW v1 AS SELECT CAST(my_char_30 AS BINARY), my_char_30, id FROM t1_values; SELECT CAST(my_char_30 AS BINARY), my_char_30, id FROM t1_values -WHERE select_id = 2 OR select_id IS NULL; +WHERE select_id = 2 OR select_id IS NULL order by id; CAST(my_char_30 AS BINARY) my_char_30 id NULL NULL 1 2 @@ -5047,7 +5229,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as char charset binary) AS `CAST(my_char_30 AS BINARY)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 2 OR select_id IS NULL); +WHERE select_id = 2 OR select_id IS NULL) order by id; CAST(my_char_30 AS BINARY) my_char_30 id NULL NULL 1 2 @@ -5059,7 +5241,7 @@ DROP VIEW v1; CREATE VIEW v1 AS SELECT sqrt(my_bigint), my_bigint, id FROM t1_values; SELECT sqrt(my_bigint), my_bigint, id FROM t1_values -WHERE select_id = 1 OR select_id IS NULL; +WHERE select_id = 1 OR select_id IS NULL order by id; sqrt(my_bigint) my_bigint id NULL NULL 1 NULL -9223372036854775808 2 @@ -5073,7 +5255,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select sqrt(`t1_values`.`my_bigint`) AS `sqrt(my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 1 OR select_id IS NULL); +WHERE select_id = 1 OR select_id IS NULL) order by id; sqrt(my_bigint) my_bigint id NULL NULL 1 NULL -9223372036854775808 2 diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result index 9081c6da3f7..6ba95c9fa63 100644 --- a/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result +++ b/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result @@ -9,20 +9,25 @@ 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; +create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1; +create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2; +create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3; +create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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; +create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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; +create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -34,8 +39,9 @@ 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; +create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -47,12 +53,14 @@ 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; +create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9; +create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10; +create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t11; Section 3.1.2 - Syntax checks for the stored procedure-specific programming statements BEGIN/END, DECLARE, SET, SELECT/INTO, OPEN, FETCH, CLOSE: @@ -164,7 +172,7 @@ declare y integer default 1; set @x = x; set @y = y; set @z = 234; -SELECT f1, f2 into @x, @y from t2 limit 1; +SELECT f1, f2 into @x, @y from t2 where f1='a`' and f2='a`' limit 1; SELECT @x, @y, @z, invar; BEGIN set @x = 2; @@ -207,7 +215,7 @@ BEGIN declare x integer; declare y integer; set @x=x; set @y=y; -SELECT f4, f3 into @x, @y from t2 limit 1; +SELECT f4, f3 into @x, @y from t2 where f4=-5000 and f3='1000-01-01' limit 1; SELECT @x, @y; END// CALL sp1(); @@ -695,7 +703,7 @@ Testcase 3.1.2.54: ------------------ Ensure that a handler with a condition defined with an SQLSTATE that begins with -“01“ is always exactly equivalent in action to a handler with an SQLWARNING +“01“ is always exactly equivalent in action to a handler with an SQLWARNING condition. -------------------------------------------------------------------------------- DROP PROCEDURE IF EXISTS sp0; @@ -794,7 +802,7 @@ Testcase 3.1.2.56: ------------------ Ensure that a handler with a condition defined with an SQLSTATE that begins with -“02“ is always exactly equivalent in action to a handler with a NOT FOUND +“02“ is always exactly equivalent in action to a handler with a NOT FOUND condition. -------------------------------------------------------------------------------- DROP PROCEDURE IF EXISTS sp0; @@ -902,7 +910,7 @@ Testcase 3.1.2.58: ------------------ Ensure that a handler with a condition defined with an SQLSTATE that begins with -anything other that “01“ or “02“ is always exactly equivalent in action to a +anything other that “01“ or “02“ is always exactly equivalent in action to a handler with an SQLEXCEPTION condition. -------------------------------------------------------------------------------- DROP PROCEDURE IF EXISTS sp0; @@ -1082,7 +1090,8 @@ declare f2_value char(20); declare f5_value char(20); declare f4_value integer; declare f6_value integer; -declare cur1 cursor for SELECT f1, f2, f4, f5, f6 from t2 limit 3; +declare cur1 cursor for SELECT f1, f2, f4, f5, f6 from t2 +where f4 >=-5000 order by f4 limit 3; open cur1; while proceed do SELECT count AS 'loop'; @@ -1165,7 +1174,7 @@ of a compound statement ends. DROP TABLE IF EXISTS temp1; DROP PROCEDURE IF EXISTS sp1; create table temp1( f0 char(20), f1 char(20), f2 char(20), f3 int, f4 char(20) ); -SELECT f1, f2, f4, f5 from t2; +SELECT f1, f2, f4, f5 from t2 order by f4; f1 f2 f4 f5 a` a` -5000 a` aaa aaa -4999 aaa @@ -1185,8 +1194,8 @@ declare newf1 char(20); declare newf2 char(20); declare newf5 char(20); declare newf4 integer; -declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 limit 5; -declare cur2 cursor for SELECT f1, f2, f4, f5 from t2 limit 5; +declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 where f4 >= -5000 order by f4 limit 5; +declare cur2 cursor for SELECT f1, f2, f4, f5 from t2 where f4 >= -5000 order by f4 limit 5; open cur1; open cur2; BEGIN @@ -1268,8 +1277,10 @@ declare i_newf11 char(20); declare i_newf12 char(20); declare i_newf13 date; declare i_newf14 integer; -declare cur1 cursor for SELECT f1, f2, f3, f4 from t2 limit 4; -declare cur2 cursor for SELECT f1, f2, f3, f4 from t2 limit 3; +declare cur1 cursor for SELECT f1, f2, f3, f4 from t2 +where f4>=-5000 order by f4 limit 4; +declare cur2 cursor for SELECT f1, f2, f3, f4 from t2 +where f4>=-5000 order by f4 limit 3; declare continue handler for sqlstate '02000' set proceed=0; open cur1; open cur2; @@ -1300,8 +1311,10 @@ DECLARE o_newf11 CHAR(20); DECLARE o_newf12 CHAR(20); DECLARE o_newf13 DATE; DECLARE o_newf14 INTEGER; -DECLARE cur1 CURSOR FOR SELECT f1, f2, f3, f4 FROM t2 LIMIT 5; -DECLARE cur2 CURSOR FOR SELECT f1, f2, f3, f4 FROM t2 LIMIT 5; +DECLARE cur1 CURSOR FOR SELECT f1, f2, f3, f4 FROM t2 +WHERE f4>=-5000 ORDER BY f4 LIMIT 5; +DECLARE cur2 CURSOR FOR SELECT f1, f2, f3, f4 FROM t2 +WHERE f4>=-5000 ORDER BY f4 LIMIT 5; DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET proceed=0; OPEN cur1; OPEN cur2; diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_03.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_03.result index faf598b090b..53e25441e2e 100644 --- a/mysql-test/suite/funcs_1/r/innodb_storedproc_03.result +++ b/mysql-test/suite/funcs_1/r/innodb_storedproc_03.result @@ -9,20 +9,25 @@ 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; +create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1; +create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2; +create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3; +create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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; +create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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; +create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -34,8 +39,9 @@ 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; +create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -47,12 +53,14 @@ 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; +create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9; +create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10; +create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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: diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_06.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_06.result index 639e8cdb48b..88bddf68e24 100644 --- a/mysql-test/suite/funcs_1/r/innodb_storedproc_06.result +++ b/mysql-test/suite/funcs_1/r/innodb_storedproc_06.result @@ -9,20 +9,25 @@ 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; +create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1; +create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2; +create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3; +create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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; +create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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; +create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -34,8 +39,9 @@ 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; +create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -47,12 +53,14 @@ 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; +create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9; +create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10; +create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t11; Section 3.1.6 - Privilege Checks: -------------------------------------------------------------------------------- @@ -79,6 +87,7 @@ 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' +USE db_storedproc_1; root@localhost db_storedproc_1 GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost'; @@ -90,6 +99,7 @@ CREATE PROCEDURE sp1(v1 char(20)) BEGIN SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz'; END// +USE db_storedproc_1; root@localhost db_storedproc_1 DROP USER 'user_1'@'localhost'; @@ -115,6 +125,7 @@ CREATE FUNCTION fn1(v1 int) returns int BEGIN return v1; END// +USE db_storedproc_1; root@localhost db_storedproc_1 drop user 'user_1'@'localhost'; diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_07.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_07.result index d0b9d8ae806..cbe0a18435a 100644 --- a/mysql-test/suite/funcs_1/r/innodb_storedproc_07.result +++ b/mysql-test/suite/funcs_1/r/innodb_storedproc_07.result @@ -9,20 +9,25 @@ 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; +create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1; +create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2; +create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3; +create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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; +create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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; +create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -34,8 +39,9 @@ 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; +create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -47,12 +53,14 @@ 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; +create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9; +create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10; +create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t11; Section 3.1.7 - SQL mode checks: -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_08.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_08.result index 68e32626425..40ebc1e51e4 100644 --- a/mysql-test/suite/funcs_1/r/innodb_storedproc_08.result +++ b/mysql-test/suite/funcs_1/r/innodb_storedproc_08.result @@ -9,20 +9,25 @@ 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; +create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1; +create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2; +create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3; +create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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; +create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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; +create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -34,8 +39,9 @@ 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; +create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -47,12 +53,14 @@ 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; +create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9; +create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10; +create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t11; Section 3.1.8 - SHOW statement checks: -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_10.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_10.result index f2c47342019..163bae36bed 100644 --- a/mysql-test/suite/funcs_1/r/innodb_storedproc_10.result +++ b/mysql-test/suite/funcs_1/r/innodb_storedproc_10.result @@ -9,20 +9,25 @@ 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; +create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1; +create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2; +create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3; +create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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; +create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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; +create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -34,8 +39,9 @@ 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; +create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -47,12 +53,14 @@ 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; +create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9; +create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10; +create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t11; Section 3.1.10 - CALL checks: -------------------------------------------------------------------------------- @@ -78,7 +86,7 @@ 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 LIMIT 1; +SELECT * FROM db_storedproc.t1 WHERE f4=-5000 LIMIT 1; END// CREATE FUNCTION fn31105(n INT) RETURNS INT BEGIN @@ -93,6 +101,8 @@ 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' +connection default; +USE db_storedproc; root@localhost db_storedproc CALL sp31102(); @@ -112,6 +122,8 @@ a` a` 1000-01-01 -5000 a` -5000 SELECT fn31105( 9 ); fn31105( 9 ) 81 +connection default; +USE db_storedproc; root@localhost db_storedproc REVOKE EXECUTE ON db_storedproc.* FROM 'user_2'@'localhost'; @@ -129,6 +141,7 @@ 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' +USE db_storedproc; root@localhost db_storedproc DROP PROCEDURE sp31102; @@ -176,6 +189,8 @@ 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; +DROP PROCEDURE IF EXISTS sp_del; +DROP PROCEDURE IF EXISTS sp_with_rowcount; 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() @@ -203,49 +218,72 @@ 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// +CREATE PROCEDURE sp_del() +BEGIN +DELETE FROM temp WHERE temp.f1 ='qwe' OR temp.f1 = 'updated_2'; +END// +CREATE PROCEDURE sp_with_rowcount() +BEGIN +BEGIN +INSERT INTO temp VALUES ('qwe', 'abc', '1989-11-09', 100, 'uvw', 1000), +('qwe', 'xyz', '1998-03-26', 100, 'uvw', 1000), +('qwe', 'abc', '2000-11-09', 100, 'uvw', 1000), +('qwe', 'xyz', '2005-11-07', 100, 'uvw', 1000); +END; +SELECT row_count() AS 'row_count() after insert'; +SELECT row_count() AS 'row_count() after select row_count()'; +SELECT f1,f2,f3 FROM temp ORDER BY f1,f2,f3; +UPDATE temp SET temp.f1 = 'updated_2' WHERE temp.f2 = 'abc'; +SELECT row_count() AS 'row_count() after update'; +SELECT f1,f2,f3 FROM temp ORDER BY f1,f2,f3; +DELETE FROM temp WHERE temp.f1 = 'updated_2'; +SELECT row_count() AS 'row_count() after delete'; +END// CALL sp_ins_1(); SELECT row_count(); row_count() 1 SELECT * FROM temp; f1 f2 f3 f4 f5 f6 +a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992 +a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991 a` a` 1000-01-01 -5000 a` -5000 aaa aaa 1000-01-02 -4999 aaa -4999 abaa abaa 1000-01-03 -4998 abaa -4998 +abc abc 2005-10-03 100 uvw 1000 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; f1 f2 f3 f4 f5 f6 +a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992 +a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991 a` a` 1000-01-01 -5000 a` -5000 aaa aaa 1000-01-02 -4999 aaa -4999 abaa abaa 1000-01-03 -4998 abaa -4998 +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 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; f1 f2 f3 f4 f5 f6 +a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992 +a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991 a` a` 1000-01-01 -5000 a` -5000 aaa aaa 1000-01-02 -4999 aaa -4999 abaa abaa 1000-01-03 -4998 abaa -4998 @@ -254,8 +292,6 @@ 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 @@ -279,6 +315,8 @@ row_count() 3 SELECT * FROM temp; f1 f2 f3 f4 f5 f6 +a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992 +a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991 a` a` 1000-01-01 -5000 a` -5000 aaa aaa 1000-01-02 -4999 aaa -4999 abaa abaa 1000-01-03 -4998 abaa -4998 @@ -287,26 +325,73 @@ 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 +qwe xyz 1998-03-26 100 uvw 1000 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 +CALL sp_del(); +SELECT row_count(); +row_count() +4 +SELECT * FROM temp; +f1 f2 f3 f4 f5 f6 +a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992 +a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991 +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 +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 +DELETE FROM temp; +CALL sp_with_rowcount(); +row_count() after insert +4 +row_count() after select row_count() +-1 +f1 f2 f3 +qwe abc 1989-11-09 +qwe abc 2000-11-09 +qwe xyz 1998-03-26 +qwe xyz 2005-11-07 +row_count() after update +2 +f1 f2 f3 +qwe xyz 1998-03-26 +qwe xyz 2005-11-07 +updated_2 abc 1989-11-09 +updated_2 abc 2000-11-09 +row_count() after delete +2 +SELECT row_count(); +row_count() +-1 +SELECT * FROM temp; +f1 f2 f3 f4 f5 f6 +qwe xyz 1998-03-26 100 uvw 1000 +qwe xyz 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 PROCEDURE sp_del; +DROP PROCEDURE sp_with_rowcount; DROP TABLE temp; Testcase 3.1.10.8: ------------------ -Ensure that the mysql_affected_rows() C API function always returns the correct +Ensure that the mysql_affected_rows() C API function always returns the correct number of rows affected by the execution of a stored procedure. -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_0102.result b/mysql-test/suite/funcs_1/r/innodb_trig_0102.result index 9c2c2a38a4d..ff1836f1313 100644 --- a/mysql-test/suite/funcs_1/r/innodb_trig_0102.result +++ b/mysql-test/suite/funcs_1/r/innodb_trig_0102.result @@ -1,96 +1,97 @@ 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) +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 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb3.txt' +into table tb3; Testcase: 3.5.1.1: ------------------ use test; -Create trigger trg1_1 BEFORE INSERT +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 +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, +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 +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 +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 +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) +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 @@ -103,9 +104,9 @@ 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 +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 @@ -113,7 +114,7 @@ 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) +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; @@ -141,7 +142,7 @@ delete from tb3 where f121='Test 3.5.1.1'; Testcase: 3.5.1.2: ------------------ -Create trigger trg_1 after insert +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; @@ -194,7 +195,7 @@ 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 +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'; @@ -206,7 +207,7 @@ 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; +select trigger_name from information_schema.triggers order by trigger_name; trigger_name trg5_1 trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX @@ -226,7 +227,7 @@ 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 +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; @@ -234,11 +235,11 @@ 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 +CREATE TRIGGER trig_db.trg6_2 AFTER INSERT on tb3 for each row set @ret_trg6_2 = 5; ERROR 42S02: Table 'trig_db.tb3' doesn't exist use trig_db; -CREATE TRIGGER trg6_3 AFTER INSERT on test.tb3 +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; @@ -262,9 +263,9 @@ 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 +create trigger trig before insert on t1 for each row set new.f1 ='trig t1'; -create trigger trig before update on t2 +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); @@ -294,15 +295,15 @@ 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 +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 +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 +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; @@ -313,7 +314,7 @@ 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; +select * from t1 order by f2; f1 f2 trig1 1 trig1 2 @@ -323,7 +324,7 @@ trig2 3 select * from trig_db3.t1; f1 f2 trig3 4 -select * from t1; +select * from t1 order by f2; f1 f2 trig1 1 trig1 2 @@ -341,17 +342,17 @@ 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 +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 +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 +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; +from information_schema.triggers order by trigger_name; trigger_schema trigger_name event_object_table -trig_db1 trig1_b t1 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); diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_03.result b/mysql-test/suite/funcs_1/r/innodb_trig_03.result index 4e6b4523f1d..e45115cdfab 100644 --- a/mysql-test/suite/funcs_1/r/innodb_trig_03.result +++ b/mysql-test/suite/funcs_1/r/innodb_trig_03.result @@ -1,70 +1,71 @@ 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) +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 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb3.txt' +into table tb3; Testcase 3.5.3: --------------- @@ -106,7 +107,7 @@ set new.f1 = 'trig 3.5.3.2_1-no'; ERROR 42000: Access denied; you need the SUPER privilege for this operation use priv_db; insert into t1 (f1) values ('insert 3.5.3.2-no'); -select f1 from t1; +select f1 from t1 order by f1; f1 insert 3.5.3.2-no select current_user; @@ -121,15 +122,12 @@ 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; +select f1 from t1 order by f1; f1 insert 3.5.3.2-no grant UPDATE on priv_db.t1 to test_yesprivs@localhost; - -note: once 15166 is fixed a similar case for SELECT needs to be added ---------------------------------------------------------------------- insert into t1 (f1) values ('insert 3.5.3.2-yes'); -select f1 from t1; +select f1 from t1 order by f1; f1 insert 3.5.3.2-no trig 3.5.3.2_2-yes @@ -141,7 +139,7 @@ drop trigger trg1_2; ERROR 42000: Access denied; you need the SUPER privilege for this operation use priv_db; insert into t1 (f1) values ('insert 3.5.3.6-yes'); -select f1 from t1; +select f1 from t1 order by f1; f1 insert 3.5.3.2-no trig 3.5.3.2_2-yes @@ -150,12 +148,12 @@ 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; +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 -insert 3.5.3.6-no drop trigger trg1_2; Testcase 3.5.3.7a: @@ -180,23 +178,22 @@ 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 ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -select f1 from t1; +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 -insert 3.5.3.6-no - -Trigger create disabled - should fail - Bug 8884 ------------------------------------------------- +create trigger trg4a_1 before INSERT on t1 for each row +set new.f1 = 'trig 3.5.3.7-1a'; insert into t1 (f1) values ('insert 3.5.3.7-1a'); -select f1 from t1; +ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' +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 -insert 3.5.3.6-no -insert 3.5.3.7-1a drop trigger trg4a_1; use priv_db; select current_user; @@ -207,18 +204,13 @@ Grants for test_yesprivs@localhost GRANT UPDATE, SUPER 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'; - -SELECT priv added to bypass bug 15166 -------------------------------------- -grant SELECT on *.* to test_yesprivs@localhost; insert into t1 (f1) values ('insert 3.5.3.7-2b'); -select f1 from t1; +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 -insert 3.5.3.6-no -insert 3.5.3.7-1a trig 3.5.3.7-2a drop trigger trg4a_2; @@ -245,30 +237,29 @@ 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 ON `priv_db`.* TO 'test_noprivs'@'localhost' use priv_db; - -Trigger create disabled - should fail - Bug 8884 ------------------------------------------------- +create trigger trg4b_1 before UPDATE on t1 for each row +set new.f1 = 'trig 3.5.3.7-1b'; +ERROR 42000: Access denied; you need the SUPER privilege for this operation insert into t1 (f1) values ('insert 3.5.3.7-1b'); -select f1 from t1; +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-1b trig 3.5.3.2_2-yes trig 3.5.3.2_2-yes -insert 3.5.3.6-no -insert 3.5.3.7-1a trig 3.5.3.7-2a -insert 3.5.3.7-1b update t1 set f1 = 'update 3.5.3.7-1b' where f1 = 'insert 3.5.3.7-1b'; -select f1 from t1; +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 -insert 3.5.3.6-no -insert 3.5.3.7-1a trig 3.5.3.7-2a update 3.5.3.7-1b drop trigger trg4b_1; +ERROR HY000: Trigger does not exist show grants; Grants for test_yesprivs@localhost GRANT SUPER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' @@ -276,32 +267,26 @@ 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'; - -SELECT priv added to bypass bug 15166 -------------------------------------- -grant SELECT on priv_db.* to test_yesprivs@localhost; insert into t1 (f1) values ('insert 3.5.3.7-2b'); -select f1 from t1; +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-2b trig 3.5.3.2_2-yes trig 3.5.3.2_2-yes -insert 3.5.3.6-no -insert 3.5.3.7-1a trig 3.5.3.7-2a update 3.5.3.7-1b -insert 3.5.3.7-2b update t1 set f1 = 'update 3.5.3.7-2b' where f1 = 'insert 3.5.3.7-2b'; -select f1 from t1; +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 -insert 3.5.3.6-no -insert 3.5.3.7-1a trig 3.5.3.7-2a -update 3.5.3.7-1b trig 3.5.3.7-2b +update 3.5.3.7-1b drop trigger trg4b_2; Testcase 3.5.3.7c @@ -327,21 +312,19 @@ Grants for test_noprivs@localhost GRANT SUPER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' use priv_db; - -Trigger create disabled - should fail - Bug 8884 ------------------------------------------------- +create trigger trg4c_1 before INSERT on t1 for each row +set new.f1 = 'trig 3.5.3.7-1c'; insert into t1 (f1) values ('insert 3.5.3.7-1c'); -select f1 from t1; +ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' +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 -insert 3.5.3.6-no -insert 3.5.3.7-1a trig 3.5.3.7-2a -update 3.5.3.7-1b trig 3.5.3.7-2b -insert 3.5.3.7-1c +update 3.5.3.7-1b drop trigger trg4c_1; show grants; Grants for test_yesprivs@localhost @@ -350,23 +333,17 @@ 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'; - -SELECT priv added to bypass bug 15166 -------------------------------------- -grant SELECT on priv_db.t1 to test_yesprivs@localhost; insert into t1 (f1) values ('insert 3.5.3.7-2c'); -select f1 from t1; +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 -insert 3.5.3.6-no -insert 3.5.3.7-1a trig 3.5.3.7-2a -update 3.5.3.7-1b trig 3.5.3.7-2b -insert 3.5.3.7-1c trig 3.5.3.7-2c +update 3.5.3.7-1b drop trigger trg4c_2; Testcase 3.5.3.7d: @@ -390,23 +367,20 @@ Grants for test_noprivs@localhost GRANT SUPER 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 ------------------------------------------------- +create trigger trg4d_1 before INSERT on t1 for each row +set new.f1 = 'trig 3.5.3.7-1d'; insert into t1 (f1) values ('insert 3.5.3.7-1d'); -select f1 from t1; +ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' +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 -insert 3.5.3.6-no -insert 3.5.3.7-1a trig 3.5.3.7-2a -update 3.5.3.7-1b trig 3.5.3.7-2b -insert 3.5.3.7-1c trig 3.5.3.7-2c -insert 3.5.3.7-1d +update 3.5.3.7-1b drop trigger trg4d_1; show grants; Grants for test_yesprivs@localhost @@ -415,25 +389,18 @@ 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'; - -SELECT priv added to bypass bug 15166 -------------------------------------- -grant SELECT (f1) on priv_db.t1 to test_yesprivs@localhost; insert into t1 (f1) values ('insert 3.5.3.7-2d'); -select f1 from t1; +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 -insert 3.5.3.6-no -insert 3.5.3.7-1a trig 3.5.3.7-2a -update 3.5.3.7-1b trig 3.5.3.7-2b -insert 3.5.3.7-1c trig 3.5.3.7-2c -insert 3.5.3.7-1d trig 3.5.3.7-2d +update 3.5.3.7-1b drop trigger trg4d_2; Testcase 3.5.3.8a: @@ -458,14 +425,14 @@ 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 ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' - -Trigger create disabled - should fail - Bug 8887 ------------------------------------------------- +create trigger trg5a_1 before INSERT on t1 for each row +set @test_var = new.f1; 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'); +ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' select @test_var; @test_var before trig 3.5.3.8-1a @@ -483,10 +450,6 @@ set @test_var= 'before trig 3.5.3.8-2a'; select @test_var; @test_var before trig 3.5.3.8-2a - -UPDATE priv added to bypass bug 15166 -------------------------------------- -grant UPDATE on *.* to test_yesprivs@localhost; insert into t1 (f1) values ('insert 3.5.3.8-2a'); select @test_var; @test_var @@ -517,15 +480,15 @@ Grants for test_noprivs@localhost GRANT SUPER 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 ON `priv_db`.* TO 'test_noprivs'@'localhost' use priv_db; - -Trigger create disabled - should fail - Bug 8887 ------------------------------------------------- +create trigger trg5b_1 before UPDATE on t1 for each row +set @test_var= new.f1; 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'; +ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' select @test_var; @test_var before trig 3.5.3.8-1b @@ -542,10 +505,6 @@ insert into t1 (f1) values ('insert 3.5.3.8-2b'); select @test_var; @test_var before trig 3.5.3.8-2b - -UPDATE priv added to bypass bug 15166 -------------------------------------- -grant UPDATE on priv_db.* to test_yesprivs@localhost; update t1 set f1= 'update 3.5.3.8-2b' where f1 = 'insert 3.5.3.8-2b'; select @test_var; @test_var @@ -576,11 +535,11 @@ Grants for test_noprivs@localhost GRANT SUPER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' use priv_db; - -Trigger create disabled - should fail - Bug 8887 ------------------------------------------------- +create trigger trg5c_1 before INSERT on t1 for each row +set @test_var= new.f1; set @test_var= 'before trig 3.5.3.8-1c'; insert into t1 (f1) values ('insert 3.5.3.8-1c'); +ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' select @test_var; @test_var before trig 3.5.3.8-1c @@ -593,10 +552,6 @@ 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'; - -UPDATE priv added to bypass bug 15166 -------------------------------------- -grant UPDATE on priv_db.t1 to test_yesprivs@localhost; insert into t1 (f1) values ('insert 3.5.3.8-2c'); select @test_var; @test_var @@ -626,11 +581,11 @@ Grants for test_noprivs@localhost GRANT SUPER 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 ------------------------------------------------- +create trigger trg5d_1 before INSERT on t1 for each row +set @test_var= new.f1; set @test_var='before trig 3.5.3.8-1d'; insert into t1 (f1) values ('insert 3.5.3.8-1d'); +ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' select @test_var; @test_var before trig 3.5.3.8-1d @@ -643,10 +598,6 @@ 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'; - -UPDATE priv added to bypass bug 15166 -------------------------------------- -grant UPDATE (f1) on priv_db.t1 to test_yesprivs@localhost; insert into t1 (f1) values ('insert 3.5.3.8-2d'); select @test_var; @test_var @@ -682,10 +633,10 @@ ERROR 42000: INSERT command denied to user 'test_yesprivs'@'localhost' for table 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; +select f1 from t1 order by f1; f1 4 -select f2 from t2; +select f2 from t2 order by f2; f2 4 use priv_db; @@ -698,11 +649,11 @@ ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for table 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; +select f1 from t1 order by f1; f1 -4 2 -select f2 from t2; +4 +select f2 from t2 order by f2; f2 1 use priv_db; @@ -715,12 +666,12 @@ ERROR 42000: SELECT command denied to user 'test_yesprivs'@'localhost' for table 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; +select f1 from t1 order by f1; f1 -4 -2 1 -select f2 from t2; +2 +4 +select f2 from t2 order by f2; f2 1 select @aaa; @@ -736,13 +687,13 @@ ERROR 42000: DELETE command denied to user 'test_yesprivs'@'localhost' for table 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; +select f1 from t1 order by f1; f1 -4 -2 1 1 -select f2 from t2; +2 +4 +select f2 from t2 order by f2; f2 drop database if exists priv_db; drop user test_yesprivs@localhost; diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_0407.result b/mysql-test/suite/funcs_1/r/innodb_trig_0407.result index e7f2b374845..bd190c7ed2f 100644 --- a/mysql-test/suite/funcs_1/r/innodb_trig_0407.result +++ b/mysql-test/suite/funcs_1/r/innodb_trig_0407.result @@ -1,70 +1,71 @@ 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) +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 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb3.txt' +into table tb3; Testcase: 3.5: -------------- @@ -88,22 +89,22 @@ 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 +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; +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; +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; +Select * from t1 order by f1; f1 -Trigger 3.5.4.1 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'; @@ -127,7 +128,7 @@ 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 +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 @@ -148,7 +149,7 @@ 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 +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'); @@ -184,7 +185,7 @@ 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 +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'); @@ -221,7 +222,7 @@ 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 +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; @@ -229,7 +230,7 @@ drop table t1_temp; Testcase 3.5.5.3: ----------------- Create view vw3 as select f118 from tb3; -Create trigger trg3 before INSERT +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; @@ -257,7 +258,7 @@ 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; +Select * from dbtest_two.t2 order by f1; f1 1st Insert 3.5. 2nd Insert 3.5. @@ -310,9 +311,9 @@ drop trigger tb3.trg4_2; Testcase 3.5.7.5 / 3.5.7.6: --------------------------- -Create trigger trg5_1 BEFORE INSERT +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 +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'); @@ -330,9 +331,9 @@ 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 +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 +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; @@ -358,9 +359,9 @@ delete from tb3 where f121='Test 3.5.7.7/8'; Testcase 3.5.7.9/10: -------------------- -Create trigger trg7_1 BEFORE UPDATE +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 +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'); @@ -378,9 +379,9 @@ 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 +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 +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; @@ -408,9 +409,9 @@ 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 +Create trigger trg9_1 BEFORE DELETE on tb3 for each row set @test_var=@test_var+1; -Create trigger trg9_2 BEFORE DELETE +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; @@ -440,12 +441,12 @@ 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 +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 +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 +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; diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_08.result b/mysql-test/suite/funcs_1/r/innodb_trig_08.result index a13116df9b4..19e42143a5d 100644 --- a/mysql-test/suite/funcs_1/r/innodb_trig_08.result +++ b/mysql-test/suite/funcs_1/r/innodb_trig_08.result @@ -1,70 +1,71 @@ 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) +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 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb3.txt' +into table tb3; Testcase: 3.5: -------------- @@ -89,17 +90,17 @@ 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 ( +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 ( +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 ( +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, @@ -122,18 +123,18 @@ Insert into t1_d values ('f',222,99999,999.99); use test; Create trigger trg1 AFTER INSERT on tb3 for each row BEGIN -insert into db_test.t1_i +insert into db_test.t1_i values (new.f120, new.f136, new.f144, new.f163); -update db_test.t1_u +update db_test.t1_u set u144=new.f144, u163=new.f163 -where u136=new.f136; +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; +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) +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 @@ -161,14 +162,22 @@ select @test_var; 3.5.8.4 - single SQL - insert ----------------------------- Create trigger trg2 BEFORE UPDATE on tb3 for each row -insert into db_test.t1_i +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; +select * from db_test.t1_i order by i120; i120 i136 i144 i163 1 00222 0000023456 1.050000000000000000000000000000 I 00222 0000023456 1.050000000000000000000000000000 @@ -177,7 +186,7 @@ I 00222 0000023456 1.050000000000000000000000000000 ----------------------------- drop trigger trg2; Create trigger trg3 BEFORE UPDATE on tb3 for each row -update db_test.t1_u +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' @@ -185,27 +194,27 @@ update tb3 set f120='U', 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 U Test 3.5.8.4-Single Update 00222 0000023456 1.050000000000000000000000000000 -select * from db_test.t1_u; +select * from db_test.t1_u order by u120; u120 u136 u144 u163 a 00111 0000099999 999.990000000000000000000000000000 -U 00222 0000023456 1.050000000000000000000000000000 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 -f 00333 0000099999 999.990000000000000000000000000000 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, +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; +select * from db_test.t1_d order by d120; d120 d136 d144 d163 a 00111 0000099999 999.990000000000000000000000000000 c 00333 0000099999 999.990000000000000000000000000000 @@ -214,10 +223,10 @@ c 00333 0000099999 999.990000000000000000000000000000 ------------------------------- 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 +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, +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%'; @@ -245,36 +254,36 @@ 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 +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'; +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'; +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'; +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 -d Test 3.5.8.5-if 00010 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'; +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 00010 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 @@ -289,7 +298,7 @@ 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 +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 @@ -331,60 +340,60 @@ ELSE set @test_var=CONCAT(new.f120, '*', new.f144); END case; END// set @test_var='Empty'; -Insert into tb3 (f120, f122, f136, f144) +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'; +select f120, f122, f136, f144, @test_var +from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; f120 f122 f136 f144 @test_var A Test 3.5.8.5-case 00125 0000000007 A*seven -Insert into tb3 (f120, f122, f136, f144) +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'; +select f120, f122, f136, f144, @test_var +from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; 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) +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'; +select f120, f122, f136, f144, @test_var +from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; 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) +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'; +select f120, f122, f136, f144, @test_var +from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; 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 -1 Test 3.5.8.5-case 00152 0000099999 1*0000099999 -Insert into tb3 (f120, f122, f136, f144) +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'; +select f120, f122, f136, f144, @test_var +from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; 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 -1 Test 3.5.8.5-case 00152 0000099999 1=eight -1 Test 3.5.8.5-case 00200 0000000008 1=eight -Insert into tb3 (f120, f122, f136, f144) +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'; +select f120, f122, f136, f144, @test_var +from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; 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 -1 Test 3.5.8.5-case 00152 0000099999 1=eight -1 Test 3.5.8.5-case 00200 0000000008 1=eight create trigger trg3a before update on tb3 for each row BEGIN CASE @@ -398,40 +407,40 @@ 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 +BEGIN set @counter=0, @flag='Initial'; -Label1: loop +Label1: loop if new.f136<new.f144 then set @counter='Nothing to loop'; -leave Label1; +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; +end if; +end if; +iterate label1; set @flag='Final'; -END loop Label1; +END loop Label1; END// -Insert into tb3 (f122, f136, f144) +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) +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 +BEGIN +Label1: loop set @counter=@counter+1; -END; +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 '; +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; @@ -441,23 +450,23 @@ Testcase 3.5.8.5-repeat: ------------------------ Create trigger trg6 after insert on tb3 for each row BEGIN -rp_label: REPEAT -SET @counter1 = @counter1 + 1; +rp_label: REPEAT +SET @counter1 = @counter1 + 1; IF (@counter1 MOD 2 = 0) THEN ITERATE rp_label; END IF; -SET @counter2 = @counter2 + 1; +SET @counter2 = @counter2 + 1; UNTIL @counter1> new.f136 END REPEAT rp_label; END// set @counter1= 0, @counter2= 0; -Insert into tb3 (f122, f136) +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; +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; @@ -466,33 +475,62 @@ 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; +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; +SET @counter2 = @counter2 + 1; END WHILE wl_label// set @counter1= 0, @counter2= 0; -Insert into tb3 (f122, f136) +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; +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; +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) ------------------------------------ +CREATE PROCEDURE sp_01 () BEGIN set @v1=1; END// +CREATE TRIGGER trg8_1 BEFORE UPDATE ON tb3 FOR EACH ROW +BEGIN +CALL sp_01 (); +END// +Insert into tb3 (f120, f122, f136) values ('6', 'Test 3.5.8.6-insert', 101); +update tb3 set f120='S', f136=111, +f122='Test 3.5.8.6-tr8_1' + where f122='Test 3.5.8.6-insert'; +select f120, f122 +from tb3 where f122 like 'Test 3.5.8.6%' order by f120; +f120 f122 +S Test 3.5.8.6-tr8_1 +DROP TRIGGER trg8_1; +DROP PROCEDURE sp_01; -Testcase 3.5.8.7: (Disabled as a result of bug _____) ------------------------------------------------------ +Testcase 3.5.8.7 +---------------- +Create trigger trg9_1 before update on tb3 for each row +BEGIN +Start transaction; +Set new.f120='U'; +Commit; +END// +ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger. +Create trigger trg9_2 before delete on tb3 for each row +BEGIN +Start transaction; +Set @var2=old.f120; +Rollback; +END// +ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger. drop user test_general@localhost; drop user test_general; drop user test_super@localhost; diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_09.result b/mysql-test/suite/funcs_1/r/innodb_trig_09.result index 34a430ba052..321b988587e 100644 --- a/mysql-test/suite/funcs_1/r/innodb_trig_09.result +++ b/mysql-test/suite/funcs_1/r/innodb_trig_09.result @@ -1,74 +1,75 @@ 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) +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 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb3.txt' +into table tb3; Testcase 3.5.9.1/2: ------------------- -Create trigger trg1 BEFORE UPDATE on tb3 for each row +Create trigger trg1 BEFORE UPDATE on tb3 for each row set new.f142 = 94087, @counter=@counter+1; TotalRows 10 @@ -80,15 +81,15 @@ NewValuew 0 set @counter=0; Update tb3 Set f142='1' where f130<100; -select count(*) as ExpectedChanged, @counter as TrigCounter +select count(*) as ExpectedChanged, @counter as TrigCounter from tb3 where f142=94087; ExpectedChanged TrigCounter 8 8 -select count(*) as ExpectedNotChange from tb3 +select count(*) as ExpectedNotChange from tb3 where f130<100 and f142<>94087; ExpectedNotChange 0 -select count(*) as NonExpectedChanged from tb3 +select count(*) as NonExpectedChanged from tb3 where f130>=130 and f142=94087; NonExpectedChanged 0 @@ -116,17 +117,17 @@ set @tr_var_af_118=old.f118, @tr_var_af_121=old.f121, 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) +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'; +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, +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, +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 @@ -135,13 +136,13 @@ a NULL Test 3.5.9.3 7 123.170000000000000000000000000000 @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'; +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, +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, +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 @@ -172,17 +173,17 @@ set @tr_var_af_118=new.f118, @tr_var_af_121=new.f121, 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) +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%'; +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, +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, +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 @@ -194,15 +195,15 @@ 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'; +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, +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, +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 @@ -240,6 +241,7 @@ 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 trg5a; drop trigger trg5b; Testcase 3.5.9.10: (implied in previous tests) diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result b/mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result index 8976787420d..7412b8c8eff 100644 --- a/mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result +++ b/mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result @@ -1,70 +1,71 @@ 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) +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 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb3.txt' +into table tb3; Testcase 3.5.10.1/2/3: ---------------------- @@ -86,7 +87,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%'; +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 @@ -100,7 +101,7 @@ 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%'; +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 @@ -114,7 +115,7 @@ 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%'; +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; @@ -141,11 +142,11 @@ 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; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table tb_load; select @counter as 'Rows Loaded After'; Rows Loaded After 10 -Select * from tb_load limit 10; +Select * from tb_load order by f1 limit 10; f1 f2 f3 -5000 a` 1000 -4999 aaa 999 @@ -240,7 +241,7 @@ 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; +select * from t3 order by f1; f1 12 102 @@ -275,14 +276,14 @@ 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; +select * from t1 order by f1; f1 0 -select * from t2; +select * from t2 order by f2; f2 -select * from t3; +select * from t3 order by f3; f3 -select * from t4; +select * from t4 order by f4; f4 drop trigger tr1; drop trigger tr2; @@ -293,8 +294,8 @@ drop table t2; drop table t3; drop table t4; -Testcase y.y.y.4: Recursive trigger/SP references (disabled bug 11889) ----------------------------------------------------------------------- +Testcase y.y.y.4: Recursive trigger/SP references +------------------------------------------------- set @sql_mode='traditional'; create table t1_sp ( count integer, @@ -382,12 +383,12 @@ start transaction; insert into t1 values (1); ERROR 22003: Out of range value adjusted for column 'f4' at row 1 commit; -select * from t1; +select * from t1 order by f1; f1 1 -select * from t2; +select * from t2 order by f2; f2 -select * from t3; +select * from t3 order by f3; f3 drop trigger tr1; drop trigger tr2; diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_frkey.result b/mysql-test/suite/funcs_1/r/innodb_trig_frkey.result index debbec1dde3..fe341762047 100644 --- a/mysql-test/suite/funcs_1/r/innodb_trig_frkey.result +++ b/mysql-test/suite/funcs_1/r/innodb_trig_frkey.result @@ -1,70 +1,71 @@ 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) +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 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb3.txt' +into table tb3; Testcase x.x.x.1: ----------------- diff --git a/mysql-test/suite/funcs_1/r/innodb_views.result b/mysql-test/suite/funcs_1/r/innodb_views.result index 20d8c0ba2f3..d29e38925f6 100644 --- a/mysql-test/suite/funcs_1/r/innodb_views.result +++ b/mysql-test/suite/funcs_1/r/innodb_views.result @@ -1,117 +1,119 @@ USE test; drop table if exists tb2 ; 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", +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; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb2.txt' into table tb2 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb2.txt' +into table tb2; DROP DATABASE IF EXISTS test1; CREATE DATABASE test1; USE test1; drop table if exists tb2 ; 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", +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; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb2.txt' into table tb2 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb2.txt' +into table tb2; USE test; ! Attention: The file with the expected results is not diff --git a/mysql-test/suite/funcs_1/r/is_columns_innodb.result b/mysql-test/suite/funcs_1/r/is_columns_innodb.result index 101e7140645..d80ab62a987 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_innodb.result +++ b/mysql-test/suite/funcs_1/r/is_columns_innodb.result @@ -3,63 +3,63 @@ CREATE DATABASE test1; 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, +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, +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: @@ -76,180 +76,183 @@ 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 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb1.txt' +into table tb1; drop table if exists tb2 ; 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", +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; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb2.txt' into table tb2 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb2.txt' +into table tb2; 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) +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 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb3.txt' +into table tb3; 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"), +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), @@ -259,89 +262,97 @@ 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 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb4.txt' +into table tb4; USE test1; drop table if exists tb2 ; 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", +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; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb2.txt' into table tb2 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb2.txt' +into table tb2; USE test; USE test; DROP TABLE IF EXISTS t1, t2, t4, t10, t11; -CREATE TABLE t1 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = InnoDB; -CREATE TABLE t2 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = InnoDB; -CREATE TABLE t4 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = InnoDB; -CREATE TABLE t10 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = InnoDB; -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 t1; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t2; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t4; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t10; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t11; +CREATE TABLE t1 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = InnoDB; +CREATE TABLE t2 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = InnoDB; +CREATE TABLE t4 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = InnoDB; +CREATE TABLE t10 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = InnoDB; +CREATE TABLE t11 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = InnoDB; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t1; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t2; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t4; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t10; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t11; drop TABLE if exists t3; 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; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' INTO TABLE t3; drop database if exists test4; CREATE database test4; use test4; -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; +CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) +ENGINE = InnoDB; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t6; use test; drop TABLE if exists t7, t8; -CREATE TABLE t7 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = InnoDB; -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 t7; +CREATE TABLE t7 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = InnoDB; +CREATE TABLE t8 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = InnoDB; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -353,7 +364,7 @@ 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 -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t8; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -367,7 +378,7 @@ Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 10 drop TABLE if exists t9; 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; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' INTO TABLE t9; SELECT * FROM information_schema.columns WHERE table_schema LIKE 'test%' ORDER BY table_schema, table_name, column_name; diff --git a/mysql-test/suite/funcs_1/r/is_columns_memory.result b/mysql-test/suite/funcs_1/r/is_columns_memory.result index 7f49fcb97d0..ae7c5919447 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_memory.result +++ b/mysql-test/suite/funcs_1/r/is_columns_memory.result @@ -4,55 +4,55 @@ CREATE DATABASE test1; USE test; 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, +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: @@ -72,174 +72,177 @@ 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 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb1.txt' +into table tb1; drop table if exists tb2 ; 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", +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; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb2.txt' into table tb2 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb2.txt' +into table tb2 ; 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) +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 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb3.txt' +into table tb3; 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"), +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, @@ -248,89 +251,97 @@ 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 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb4.txt' +into table tb4; USE test1; drop table if exists tb2 ; 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", +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; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb2.txt' into table tb2 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb2.txt' +into table tb2 ; USE test; USE test; DROP TABLE IF EXISTS t1, t2, t4, t10, t11; -CREATE TABLE t1 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MEMORY; -CREATE TABLE t2 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MEMORY; -CREATE TABLE t4 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MEMORY; -CREATE TABLE t10 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MEMORY; -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 t1; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t2; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t4; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t10; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t11; +CREATE TABLE t1 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = MEMORY; +CREATE TABLE t2 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = MEMORY; +CREATE TABLE t4 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = MEMORY; +CREATE TABLE t10 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = MEMORY; +CREATE TABLE t11 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = MEMORY; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t1; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t2; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t4; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t10; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t11; drop TABLE if exists t3; 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; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' INTO TABLE t3; drop database if exists test4; CREATE database test4; use test4; -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; +CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) +ENGINE = MEMORY; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t6; use test; drop TABLE if exists t7, t8; -CREATE TABLE t7 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = MEMORY; -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 t7; +CREATE TABLE t7 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = MEMORY; +CREATE TABLE t8 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = MEMORY; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -342,7 +353,7 @@ 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 -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t8; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -356,7 +367,7 @@ Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 10 drop TABLE if exists t9; 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; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' INTO TABLE t9; SELECT * FROM information_schema.columns WHERE table_schema LIKE 'test%' ORDER BY table_schema, table_name, column_name; diff --git a/mysql-test/suite/funcs_1/r/is_columns_myisam.result b/mysql-test/suite/funcs_1/r/is_columns_myisam.result index a30acc64a8d..94574c33d74 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_myisam.result +++ b/mysql-test/suite/funcs_1/r/is_columns_myisam.result @@ -4,63 +4,63 @@ CREATE DATABASE test1; USE test; drop table if exists tb1 ; create table tb1 ( -f1 char, -f2 char binary, -f3 char ascii, -f4 tinytext unicode, -f5 text, -f6 mediumtext, -f7 longtext, -f8 tinyblob, +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, +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; Warnings: @@ -80,196 +80,199 @@ 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/myisam_tb1.txt' into table tb1 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb1.txt' +into table tb1; drop table if exists tb2 ; 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", +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 +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; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb2.txt' into table tb2 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb2.txt' +into table tb2; 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) +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; 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/myisam_tb3.txt' into table tb3 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb3.txt' +into table tb3; 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"), -f227 VARBINARY(64), -f228 VARBINARY(27), -f229 VARBINARY(64), -f230 VARBINARY(192), -f231 VARBINARY(192), -f232 VARBINARY(27), -f233 VARBINARY(64), +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, @@ -280,97 +283,105 @@ f240 varchar(120) unicode, f241 char(100) unicode, f242 bit(30) ) engine = myisam; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb4.txt' into table tb4 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb4.txt' +into table tb4; USE test1; drop table if exists tb2 ; 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", +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 +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; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb2.txt' into table tb2 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb2.txt' +into table tb2; USE test; USE test; DROP TABLE IF EXISTS t1, t2, t4, t10, t11; -CREATE TABLE t1 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM; -CREATE TABLE t2 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM; -CREATE TABLE t4 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM; -CREATE TABLE t10 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM; -CREATE TABLE t11 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t1; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t2; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t4; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t10; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t11; +CREATE TABLE t1 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = MyISAM; +CREATE TABLE t2 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = MyISAM; +CREATE TABLE t4 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = MyISAM; +CREATE TABLE t10 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = MyISAM; +CREATE TABLE t11 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = MyISAM; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t1; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t2; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t4; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t10; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t11; drop TABLE if exists t3; CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = MyISAM; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' INTO TABLE t3; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' INTO TABLE t3; drop database if exists test4; CREATE database test4; use test4; -CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t6; +CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) +ENGINE = MyISAM; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t6; use test; drop TABLE if exists t7, t8; -CREATE TABLE t7 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = MyISAM; -CREATE TABLE t8 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = MyISAM; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t7; +CREATE TABLE t7 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = MyISAM; +CREATE TABLE t8 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = MyISAM; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -382,7 +393,7 @@ 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 -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t8; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -396,7 +407,7 @@ Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 10 drop TABLE if exists t9; CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = MyISAM; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' INTO TABLE t9; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' INTO TABLE t9; SELECT * FROM information_schema.columns WHERE table_schema LIKE 'test%' ORDER BY table_schema, table_name, column_name; diff --git a/mysql-test/suite/funcs_1/r/is_columns_ndb.result b/mysql-test/suite/funcs_1/r/is_columns_ndb.result index 4ae1723140e..444c62eb010 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_ndb.result +++ b/mysql-test/suite/funcs_1/r/is_columns_ndb.result @@ -4,29 +4,35 @@ USE test; USE test; USE test; DROP TABLE IF EXISTS t1, t2, t4, t10, t11; -CREATE TABLE t1 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = ndb; -CREATE TABLE t2 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = ndb; -CREATE TABLE t4 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = ndb; -CREATE TABLE t10 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = ndb; -CREATE TABLE t11 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = ndb; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t1; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t2; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t4; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t10; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t11; +CREATE TABLE t1 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = ndb; +CREATE TABLE t2 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = ndb; +CREATE TABLE t4 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = ndb; +CREATE TABLE t10 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = ndb; +CREATE TABLE t11 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = ndb; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t1; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t2; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t4; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t10; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t11; drop TABLE if exists t3; CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = ndb; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' INTO TABLE t3; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' INTO TABLE t3; drop database if exists test4; CREATE database test4; use test4; -CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = ndb; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t6; +CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) +ENGINE = ndb; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t6; use test; drop TABLE if exists t7, t8; -CREATE TABLE t7 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = ndb; -CREATE TABLE t8 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = ndb; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t7; +CREATE TABLE t7 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = ndb; +CREATE TABLE t8 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = ndb; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -38,7 +44,7 @@ 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 -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t8; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -52,7 +58,7 @@ Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 10 drop TABLE if exists t9; CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = ndb; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' INTO TABLE t9; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' INTO TABLE t9; SELECT * FROM information_schema.columns WHERE table_schema LIKE 'test%' ORDER BY table_schema, table_name, column_name; diff --git a/mysql-test/suite/funcs_1/r/is_tables_innodb.result b/mysql-test/suite/funcs_1/r/is_tables_innodb.result index c160ac7f749..215e2c86654 100644 --- a/mysql-test/suite/funcs_1/r/is_tables_innodb.result +++ b/mysql-test/suite/funcs_1/r/is_tables_innodb.result @@ -3,63 +3,63 @@ CREATE DATABASE test1; 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, +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, +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: @@ -76,180 +76,183 @@ 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 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb1.txt' +into table tb1; drop table if exists tb2 ; 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", +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; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb2.txt' into table tb2 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb2.txt' +into table tb2; 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) +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 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb3.txt' +into table tb3; 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"), +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), @@ -259,89 +262,97 @@ 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 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb4.txt' +into table tb4; USE test1; drop table if exists tb2 ; 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", +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; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb2.txt' into table tb2 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb2.txt' +into table tb2; USE test; USE test; DROP TABLE IF EXISTS t1, t2, t4, t10, t11; -CREATE TABLE t1 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = InnoDB; -CREATE TABLE t2 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = InnoDB; -CREATE TABLE t4 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = InnoDB; -CREATE TABLE t10 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = InnoDB; -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 t1; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t2; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t4; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t10; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t11; +CREATE TABLE t1 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = InnoDB; +CREATE TABLE t2 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = InnoDB; +CREATE TABLE t4 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = InnoDB; +CREATE TABLE t10 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = InnoDB; +CREATE TABLE t11 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = InnoDB; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t1; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t2; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t4; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t10; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t11; drop TABLE if exists t3; 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; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' INTO TABLE t3; drop database if exists test4; CREATE database test4; use test4; -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; +CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) +ENGINE = InnoDB; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t6; use test; drop TABLE if exists t7, t8; -CREATE TABLE t7 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = InnoDB; -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 t7; +CREATE TABLE t7 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = InnoDB; +CREATE TABLE t8 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = InnoDB; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -353,7 +364,7 @@ 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 -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t8; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -367,7 +378,7 @@ Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 10 drop TABLE if exists t9; 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; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' INTO TABLE t9; DROP DATABASE IF EXISTS db_datadict; CREATE DATABASE db_datadict; SELECT *, diff --git a/mysql-test/suite/funcs_1/r/is_tables_memory.result b/mysql-test/suite/funcs_1/r/is_tables_memory.result index c1dfc42e1db..bfc83fa1f92 100644 --- a/mysql-test/suite/funcs_1/r/is_tables_memory.result +++ b/mysql-test/suite/funcs_1/r/is_tables_memory.result @@ -4,55 +4,55 @@ CREATE DATABASE test1; USE test; 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, +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: @@ -72,174 +72,177 @@ 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 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb1.txt' +into table tb1; drop table if exists tb2 ; 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", +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; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb2.txt' into table tb2 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb2.txt' +into table tb2 ; 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) +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 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb3.txt' +into table tb3; 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"), +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, @@ -248,89 +251,97 @@ 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 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb4.txt' +into table tb4; USE test1; drop table if exists tb2 ; 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", +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; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb2.txt' into table tb2 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb2.txt' +into table tb2 ; USE test; USE test; DROP TABLE IF EXISTS t1, t2, t4, t10, t11; -CREATE TABLE t1 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MEMORY; -CREATE TABLE t2 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MEMORY; -CREATE TABLE t4 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MEMORY; -CREATE TABLE t10 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MEMORY; -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 t1; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t2; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t4; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t10; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t11; +CREATE TABLE t1 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = MEMORY; +CREATE TABLE t2 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = MEMORY; +CREATE TABLE t4 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = MEMORY; +CREATE TABLE t10 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = MEMORY; +CREATE TABLE t11 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = MEMORY; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t1; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t2; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t4; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t10; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t11; drop TABLE if exists t3; 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; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' INTO TABLE t3; drop database if exists test4; CREATE database test4; use test4; -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; +CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) +ENGINE = MEMORY; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t6; use test; drop TABLE if exists t7, t8; -CREATE TABLE t7 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = MEMORY; -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 t7; +CREATE TABLE t7 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = MEMORY; +CREATE TABLE t8 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = MEMORY; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -342,7 +353,7 @@ 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 -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t8; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -356,7 +367,7 @@ Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 10 drop TABLE if exists t9; 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; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' INTO TABLE t9; DROP DATABASE IF EXISTS db_datadict; CREATE DATABASE db_datadict; SELECT *, diff --git a/mysql-test/suite/funcs_1/r/is_tables_myisam.result b/mysql-test/suite/funcs_1/r/is_tables_myisam.result index f48128f6794..99d34818d98 100644 --- a/mysql-test/suite/funcs_1/r/is_tables_myisam.result +++ b/mysql-test/suite/funcs_1/r/is_tables_myisam.result @@ -4,63 +4,63 @@ CREATE DATABASE test1; USE test; drop table if exists tb1 ; create table tb1 ( -f1 char, -f2 char binary, -f3 char ascii, -f4 tinytext unicode, -f5 text, -f6 mediumtext, -f7 longtext, -f8 tinyblob, +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, +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; Warnings: @@ -80,196 +80,199 @@ 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/myisam_tb1.txt' into table tb1 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb1.txt' +into table tb1; drop table if exists tb2 ; 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", +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 +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; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb2.txt' into table tb2 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb2.txt' +into table tb2; 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) +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; 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/myisam_tb3.txt' into table tb3 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb3.txt' +into table tb3; 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"), -f227 VARBINARY(64), -f228 VARBINARY(27), -f229 VARBINARY(64), -f230 VARBINARY(192), -f231 VARBINARY(192), -f232 VARBINARY(27), -f233 VARBINARY(64), +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, @@ -280,97 +283,105 @@ f240 varchar(120) unicode, f241 char(100) unicode, f242 bit(30) ) engine = myisam; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb4.txt' into table tb4 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb4.txt' +into table tb4; USE test1; drop table if exists tb2 ; 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", +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 +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; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb2.txt' into table tb2 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb2.txt' +into table tb2; USE test; USE test; DROP TABLE IF EXISTS t1, t2, t4, t10, t11; -CREATE TABLE t1 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM; -CREATE TABLE t2 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM; -CREATE TABLE t4 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM; -CREATE TABLE t10 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM; -CREATE TABLE t11 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t1; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t2; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t4; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t10; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t11; +CREATE TABLE t1 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = MyISAM; +CREATE TABLE t2 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = MyISAM; +CREATE TABLE t4 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = MyISAM; +CREATE TABLE t10 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = MyISAM; +CREATE TABLE t11 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = MyISAM; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t1; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t2; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t4; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t10; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t11; drop TABLE if exists t3; CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = MyISAM; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' INTO TABLE t3; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' INTO TABLE t3; drop database if exists test4; CREATE database test4; use test4; -CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t6; +CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) +ENGINE = MyISAM; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t6; use test; drop TABLE if exists t7, t8; -CREATE TABLE t7 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = MyISAM; -CREATE TABLE t8 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = MyISAM; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t7; +CREATE TABLE t7 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = MyISAM; +CREATE TABLE t8 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = MyISAM; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -382,7 +393,7 @@ 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 -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t8; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -396,7 +407,7 @@ Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 10 drop TABLE if exists t9; CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = MyISAM; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' INTO TABLE t9; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' INTO TABLE t9; DROP DATABASE IF EXISTS db_datadict; CREATE DATABASE db_datadict; SELECT *, diff --git a/mysql-test/suite/funcs_1/r/is_tables_ndb.result b/mysql-test/suite/funcs_1/r/is_tables_ndb.result index 189f7f3464a..467f4566912 100644 --- a/mysql-test/suite/funcs_1/r/is_tables_ndb.result +++ b/mysql-test/suite/funcs_1/r/is_tables_ndb.result @@ -4,29 +4,35 @@ USE test; USE test; USE test; DROP TABLE IF EXISTS t1, t2, t4, t10, t11; -CREATE TABLE t1 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = NDB; -CREATE TABLE t2 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = NDB; -CREATE TABLE t4 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = NDB; -CREATE TABLE t10 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = NDB; -CREATE TABLE t11 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = NDB; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t1; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t2; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t4; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t10; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t11; +CREATE TABLE t1 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = NDB; +CREATE TABLE t2 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = NDB; +CREATE TABLE t4 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = NDB; +CREATE TABLE t10 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = NDB; +CREATE TABLE t11 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = NDB; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t1; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t2; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t4; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t10; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t11; drop TABLE if exists t3; CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = NDB; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' INTO TABLE t3; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' INTO TABLE t3; drop database if exists test4; CREATE database test4; use test4; -CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = NDB; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t6; +CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) +ENGINE = NDB; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t6; use test; drop TABLE if exists t7, t8; -CREATE TABLE t7 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = NDB; -CREATE TABLE t8 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = NDB; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t7; +CREATE TABLE t7 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = NDB; +CREATE TABLE t8 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = NDB; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -38,7 +44,7 @@ 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 -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t8; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -52,7 +58,7 @@ Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 10 drop TABLE if exists t9; CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = NDB; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' INTO TABLE t9; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' INTO TABLE t9; DROP DATABASE IF EXISTS db_datadict; CREATE DATABASE db_datadict; SELECT *, diff --git a/mysql-test/suite/funcs_1/r/memory_func_view.result b/mysql-test/suite/funcs_1/r/memory_func_view.result index 552b549a1a0..c2689a36801 100644 --- a/mysql-test/suite/funcs_1/r/memory_func_view.result +++ b/mysql-test/suite/funcs_1/r/memory_func_view.result @@ -1,7 +1,3 @@ - -! Attention: The file with the expected results suffers from -Bug#10713: mysqldump includes database in create view and referenced tables --------------------------------------------------------------------------------- DROP TABLE IF EXISTS t1_selects, t1_modes, t1_values; DROP VIEW IF EXISTS v1; CREATE TABLE t1_values @@ -9,7 +5,7 @@ CREATE TABLE t1_values id BIGINT AUTO_INCREMENT, select_id BIGINT, PRIMARY KEY(id) -) ENGINE = 'MEMORY' ; +) ENGINE = <engine_to_be_tested>; ALTER TABLE t1_values ADD my_char_30 CHAR(30); ALTER TABLE t1_values ADD my_varchar_1000 VARCHAR(1000); ALTER TABLE t1_values ADD my_binary_30 BINARY(30); @@ -39,10 +35,10 @@ my_bigint = -9223372036854775808, my_decimal = -9999999999999999999999999999999999.999999999999999999999999999999 , my_double = -1.7976931348623E+308; INSERT INTO t1_values SET -my_char_30 = '<--------30 characters------->', +my_char_30 = '<--------30 characters------->', my_varchar_1000 = CONCAT('<---------1000 characters', RPAD('',965,'-'),'--------->'), -my_binary_30 = '<--------30 characters------->', +my_binary_30 = '<--------30 characters------->', my_varbinary_1000 = CONCAT('<---------1000 characters', RPAD('',965,'-'),'--------->'), my_datetime = '9999-12-31 23:59:59', @@ -54,23 +50,23 @@ my_bigint = 9223372036854775807, my_decimal = +9999999999999999999999999999999999.999999999999999999999999999999 , my_double = 1.7976931348623E+308; INSERT INTO t1_values SET -my_char_30 = ' ---äÖüß@µ*$-- ', -my_varchar_1000 = ' ---äÖüß@µ*$-- ', -my_binary_30 = ' ---äÖüß@µ*$-- ', -my_varbinary_1000 = ' ---äÖüß@µ*$-- ', +my_char_30 = ' ---äÖüß@µ*$-- ', +my_varchar_1000 = ' ---äÖüß@µ*$-- ', +my_binary_30 = ' ---äÖüß@µ*$-- ', +my_varbinary_1000 = ' ---äÖüß@µ*$-- ', my_datetime = '2004-02-29 23:59:59', my_date = '2004-02-29', my_timestamp = '2004-02-29 23:59:59', my_time = '13:00:00', my_year = 2000, -my_bigint = 0, +my_bigint = 0, my_decimal = 0.0, my_double = 0; INSERT INTO t1_values SET -my_char_30 = '-1', -my_varchar_1000 = '-1', -my_binary_30 = '-1', -my_varbinary_1000 = '-1', +my_char_30 = '-1', +my_varchar_1000 = '-1', +my_binary_30 = '-1', +my_varbinary_1000 = '-1', my_datetime = '2005-06-28 10:00:00', my_date = '2005-06-28', my_timestamp = '2005-06-28 10:00:00', @@ -89,6 +85,9 @@ INSERT INTO t1_values SET select_id = @select_id, my_bigint = 4; INSERT INTO t1_values SET select_id = @select_id, my_bigint = -25; +##### 1.1.1. CAST --> BINARY +##### 1.1.2. CAST --> CHAR +##### 1.1.3. CAST --> DATE INSERT INTO t1_values SET select_id = @select_id, my_char_30 = '2005-06-27'; INSERT INTO t1_values SET select_id = @select_id, @@ -101,6 +100,7 @@ INSERT INTO t1_values SET select_id = @select_id, my_bigint = 20050627; INSERT INTO t1_values SET select_id = @select_id, my_double = +20.050627E+6; +##### 1.1.4. CAST --> DATETIME INSERT INTO t1_values SET select_id = @select_id, my_char_30 = '2005-06-27 17:58'; INSERT INTO t1_values SET select_id = @select_id, @@ -113,6 +113,7 @@ INSERT INTO t1_values SET select_id = @select_id, my_bigint = 200506271758; INSERT INTO t1_values SET select_id = @select_id, my_double = +0.0200506271758E+13; +##### 1.1.5. CAST --> TIME INSERT INTO t1_values SET select_id = @select_id, my_char_30 = '1 17:58'; INSERT INTO t1_values SET select_id = @select_id, @@ -123,10 +124,9 @@ INSERT INTO t1_values SET select_id = @select_id, my_varbinary_1000 = '1 17:58'; INSERT INTO t1_values SET select_id = @select_id, my_bigint = 1758; - -some statements disabled because of -Bug#12440: CAST(data type DOUBLE AS TIME) strange results --------------------------------------------------------------------------------- +INSERT INTO t1_values SET select_id = @select_id, +my_double = +1.758E+3; +##### 1.1.6. CAST --> DECIMAL INSERT INTO t1_values SET select_id = @select_id, my_char_30 = '-3333.3333'; INSERT INTO t1_values SET select_id = @select_id, @@ -135,51 +135,39 @@ INSERT INTO t1_values SET select_id = @select_id, my_binary_30 = '-3333.3333'; INSERT INTO t1_values SET select_id = @select_id, my_varbinary_1000 = '-3333.3333'; - -some statements disabled because of -Bug#13349: CAST(1.0E+300 TO DECIMAL) returns wrong result + diff little/big endian --------------------------------------------------------------------------------- +INSERT INTO t1_values SET select_id = @select_id, +my_double = -0.33333333E+4; +##### 1.1.7. CAST --> SIGNED INTEGER "Attention: CAST --> SIGNED INTEGER - The file with expected results suffers from - Bug#5083 Big integer values are inserted as negative into - decimal/string columns Bug#5913 Traditional mode: BIGINT range not correctly delimited - Both have the status: To be fixed later" --------------------------------------------------------------------------------- - -some statements disabled because of -Bug #13344: CAST(1E+300 TO signed int) on little endian CPU, wrong result + Status: To be fixed later" -------------------------------------------------------------------------------- +##### 1.1.8. CAST --> UNSIGNED INTEGER "Attention: CAST --> UNSIGNED INTEGER - The file with expected results suffers from Bug 5083 5913 9809" + The file with expected results suffers from Bug 5913" -------------------------------------------------------------------------------- some statements disabled because of -Bugs#8663: cant use bgint unsigned as input to cast +Bug#5913 Traditional mode: BIGINT range not correctly delimited -------------------------------------------------------------------------------- -SET @my_select = 'SELECT CONVERT(my_char_30 USING utf8), +SET @my_select = 'SELECT CONVERT(my_char_30 USING utf8), my_char_30, id FROM t1_values'; -SET @my_select = 'SELECT CONVERT(my_varchar_1000 USING utf8), +SET @my_select = 'SELECT CONVERT(my_varchar_1000 USING utf8), my_varchar_1000, id FROM t1_values'; -SET @my_select = 'SELECT CONVERT(my_binary_30 USING utf8), +SET @my_select = 'SELECT CONVERT(my_binary_30 USING utf8), my_binary_30, id FROM t1_values'; -SET @my_select = 'SELECT CONVERT(my_varbinary_1000 USING utf8), +SET @my_select = 'SELECT CONVERT(my_varbinary_1000 USING utf8), my_varbinary_1000, id FROM t1_values'; -SET @my_select = 'SELECT CONVERT(my_char_30 USING koi8r), +SET @my_select = 'SELECT CONVERT(my_char_30 USING koi8r), my_char_30, id FROM t1_values'; -SET @my_select = 'SELECT CONVERT(my_varchar_1000 USING koi8r), +SET @my_select = 'SELECT CONVERT(my_varchar_1000 USING koi8r), my_varchar_1000, id FROM t1_values'; -SET @my_select = 'SELECT CONVERT(my_binary_30 USING koi8r), +SET @my_select = 'SELECT CONVERT(my_binary_30 USING koi8r), my_binary_30, id FROM t1_values'; -SET @my_select = 'SELECT CONVERT(my_varbinary_1000 USING koi8r), +SET @my_select = 'SELECT CONVERT(my_varbinary_1000 USING koi8r), my_varbinary_1000, id FROM t1_values'; - -"Attention: IF(my_year IS NULL, ... - The file with expected results suffers from - Bug#11689. successful CREATE VIEW but SELECT on view fails." --------------------------------------------------------------------------------- SET @my_select = 'SELECT BIT_LENGTH(my_char_30), my_char_30, id FROM t1_values'; SET @my_select = 'SELECT BIT_LENGTH(my_varchar_1000), @@ -192,22 +180,20 @@ SET @my_select = 'SELECT INSTR(my_char_30, ''char''), my_char_30, id FROM t1_values'; SET @my_select = 'SELECT LCASE(my_varchar_1000), my_varchar_1000, id FROM t1_values'; -SET @my_select = +SET @my_select = 'SELECT LEFT(my_char_30, 2), my_char_30, id FROM t1_values'; -SET @my_select = +SET @my_select = 'SELECT LEFT(my_varchar_1000, 2), my_varchar_1000, id FROM t1_values'; -SET @my_select = +SET @my_select = 'SELECT LEFT(my_binary_30, 2), my_binary_30, id FROM t1_values'; -SET @my_select = +SET @my_select = 'SELECT LEFT(my_varbinary_1000, 2), my_varbinary_1000, id FROM t1_values'; - -"Attention: LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', <numeric column>) - The file with expected results suffers from Bug 10963 11728" - and the testcases with length = BIGINT or DOUBLE column are deactivated, -because there are 32/64 Bit differences --------------------------------------------------------------------------------- +SET @my_select = +'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_bigint), my_bigint, id FROM t1_values'; SET @my_select = 'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_decimal), my_decimal, id FROM t1_values'; +SET @my_select = +'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_double), my_double, id FROM t1_values'; SET @my_select = 'SELECT LENGTH(my_char_30), my_char_30, id FROM t1_values'; SET @my_select = 'SELECT LENGTH(my_varchar_1000), @@ -216,8 +202,10 @@ SET @my_select = 'SELECT LENGTH(my_binary_30), my_binary_30, id FROM t1_values'; SET @my_select = 'SELECT LENGTH(my_varbinary_1000), my_varbinary_1000, id FROM t1_values'; -SET @my_select = -'SELECT LOAD_FILE(''../log/current_test''), id FROM t1_values'; +SET @my_select = +'SELECT LOAD_FILE(''<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/load_file.txt'') + AS my_col, + id FROM t1_values'; SET @my_select = 'SELECT LOCATE(''char'', my_char_30), my_char_30, id FROM t1_values'; SET @my_select = 'SELECT LOCATE(''char'', my_varchar_1000), @@ -299,19 +287,19 @@ SET sql_mode = ''; -------------------------------------------------------------------------------- CREATE VIEW v1 AS SELECT my_char_30, id FROM t1_values; SELECT my_char_30, id FROM t1_values -WHERE select_id = 187 OR select_id IS NULL; +WHERE select_id = 193 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 187 OR select_id IS NULL); +WHERE select_id = 193 OR select_id IS NULL) order by id; DROP VIEW v1; CREATE VIEW v1 AS SELECT CONCAT('A',my_char_30), my_char_30, id FROM t1_values; SELECT CONCAT('A',my_char_30), my_char_30, id FROM t1_values -WHERE select_id = 186 OR select_id IS NULL; +WHERE select_id = 192 OR select_id IS NULL order by id; CONCAT('A',my_char_30) my_char_30 id NULL NULL 1 A 2 @@ -323,7 +311,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select concat(_latin1'A',`t1_values`.`my_char_30`) AS `CONCAT('A',my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 186 OR select_id IS NULL); +WHERE select_id = 192 OR select_id IS NULL) order by id; CONCAT('A',my_char_30) my_char_30 id NULL NULL 1 A 2 @@ -337,13 +325,13 @@ CREATE VIEW v1 AS SELECT LTRIM(my_varbinary_1000), my_varbinary_1000, id FROM t1_values; SELECT LTRIM(my_varbinary_1000), my_varbinary_1000, id FROM t1_values -WHERE select_id = 185 OR select_id IS NULL; +WHERE select_id = 191 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_varbinary_1000`) AS `LTRIM(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 185 OR select_id IS NULL); +WHERE select_id = 191 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -351,13 +339,13 @@ CREATE VIEW v1 AS SELECT LTRIM(my_binary_30), my_binary_30, id FROM t1_values; SELECT LTRIM(my_binary_30), my_binary_30, id FROM t1_values -WHERE select_id = 184 OR select_id IS NULL; +WHERE select_id = 190 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_binary_30`) AS `LTRIM(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 184 OR select_id IS NULL); +WHERE select_id = 190 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -365,13 +353,13 @@ CREATE VIEW v1 AS SELECT LTRIM(my_varchar_1000), my_varchar_1000, id FROM t1_values; SELECT LTRIM(my_varchar_1000), my_varchar_1000, id FROM t1_values -WHERE select_id = 183 OR select_id IS NULL; +WHERE select_id = 189 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_varchar_1000`) AS `LTRIM(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 183 OR select_id IS NULL); +WHERE select_id = 189 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -379,13 +367,13 @@ CREATE VIEW v1 AS SELECT LTRIM(my_char_30), my_char_30, id FROM t1_values; SELECT LTRIM(my_char_30), my_char_30, id FROM t1_values -WHERE select_id = 182 OR select_id IS NULL; +WHERE select_id = 188 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_char_30`) AS `LTRIM(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 182 OR select_id IS NULL); +WHERE select_id = 188 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -393,13 +381,13 @@ CREATE VIEW v1 AS SELECT LOWER(my_varbinary_1000), my_varbinary_1000, id FROM t1_values; SELECT LOWER(my_varbinary_1000), my_varbinary_1000, id FROM t1_values -WHERE select_id = 181 OR select_id IS NULL; +WHERE select_id = 187 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varbinary_1000`) AS `LOWER(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 181 OR select_id IS NULL); +WHERE select_id = 187 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -407,13 +395,13 @@ CREATE VIEW v1 AS SELECT LOWER(my_binary_30), my_binary_30, id FROM t1_values; SELECT LOWER(my_binary_30), my_binary_30, id FROM t1_values -WHERE select_id = 180 OR select_id IS NULL; +WHERE select_id = 186 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_binary_30`) AS `LOWER(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 180 OR select_id IS NULL); +WHERE select_id = 186 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -421,13 +409,13 @@ CREATE VIEW v1 AS SELECT LOWER(my_varchar_1000), my_varchar_1000, id FROM t1_values; SELECT LOWER(my_varchar_1000), my_varchar_1000, id FROM t1_values -WHERE select_id = 179 OR select_id IS NULL; +WHERE select_id = 185 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varchar_1000`) AS `LOWER(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 179 OR select_id IS NULL); +WHERE select_id = 185 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -435,13 +423,13 @@ CREATE VIEW v1 AS SELECT LOWER(my_char_30), my_char_30, id FROM t1_values; SELECT LOWER(my_char_30), my_char_30, id FROM t1_values -WHERE select_id = 178 OR select_id IS NULL; +WHERE select_id = 184 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_char_30`) AS `LOWER(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 178 OR select_id IS NULL); +WHERE select_id = 184 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -449,13 +437,13 @@ CREATE VIEW v1 AS SELECT LOCATE('-', ' - -ABC', my_decimal), my_decimal, id FROM t1_values; SELECT LOCATE('-', ' - -ABC', my_decimal), my_decimal, id FROM t1_values -WHERE select_id = 177 OR select_id IS NULL; +WHERE select_id = 183 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',_latin1' - -ABC',`t1_values`.`my_decimal`) AS `LOCATE('-', ' - -ABC', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 177 OR select_id IS NULL); +WHERE select_id = 183 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -463,13 +451,13 @@ CREATE VIEW v1 AS SELECT LOCATE('-', ' - -ABC', my_double), my_double, id FROM t1_values; SELECT LOCATE('-', ' - -ABC', my_double), my_double, id FROM t1_values -WHERE select_id = 176 OR select_id IS NULL; +WHERE select_id = 182 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',_latin1' - -ABC',`t1_values`.`my_double`) AS `LOCATE('-', ' - -ABC', my_double)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 176 OR select_id IS NULL); +WHERE select_id = 182 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -477,13 +465,13 @@ CREATE VIEW v1 AS SELECT LOCATE('-', ' - -ABC', my_bigint), my_bigint, id FROM t1_values; SELECT LOCATE('-', ' - -ABC', my_bigint), my_bigint, id FROM t1_values -WHERE select_id = 175 OR select_id IS NULL; +WHERE select_id = 181 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',_latin1' - -ABC',`t1_values`.`my_bigint`) AS `LOCATE('-', ' - -ABC', my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 175 OR select_id IS NULL); +WHERE select_id = 181 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -491,13 +479,13 @@ CREATE VIEW v1 AS SELECT LOCATE('-', my_varbinary_1000, 3), my_varbinary_1000, id FROM t1_values; SELECT LOCATE('-', my_varbinary_1000, 3), my_varbinary_1000, id FROM t1_values -WHERE select_id = 174 OR select_id IS NULL; +WHERE select_id = 180 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',`t1_values`.`my_varbinary_1000`,3) AS `LOCATE('-', my_varbinary_1000, 3)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 174 OR select_id IS NULL); +WHERE select_id = 180 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -505,13 +493,13 @@ CREATE VIEW v1 AS SELECT LOCATE('-', my_binary_30, 3), my_binary_30, id FROM t1_values; SELECT LOCATE('-', my_binary_30, 3), my_binary_30, id FROM t1_values -WHERE select_id = 173 OR select_id IS NULL; +WHERE select_id = 179 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',`t1_values`.`my_binary_30`,3) AS `LOCATE('-', my_binary_30, 3)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 173 OR select_id IS NULL); +WHERE select_id = 179 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -519,13 +507,13 @@ CREATE VIEW v1 AS SELECT LOCATE('-', my_varchar_1000, 3), my_varchar_1000, id FROM t1_values; SELECT LOCATE('-', my_varchar_1000, 3), my_varchar_1000, id FROM t1_values -WHERE select_id = 172 OR select_id IS NULL; +WHERE select_id = 178 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',`t1_values`.`my_varchar_1000`,3) AS `LOCATE('-', my_varchar_1000, 3)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 172 OR select_id IS NULL); +WHERE select_id = 178 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -533,13 +521,13 @@ CREATE VIEW v1 AS SELECT LOCATE('-', my_char_30, 3), my_char_30, id FROM t1_values; SELECT LOCATE('-', my_char_30, 3), my_char_30, id FROM t1_values -WHERE select_id = 171 OR select_id IS NULL; +WHERE select_id = 177 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',`t1_values`.`my_char_30`,3) AS `LOCATE('-', my_char_30, 3)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 171 OR select_id IS NULL); +WHERE select_id = 177 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -547,13 +535,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_varbinary_1000, my_binary_30 ), my_varbinary_1000, my_binary_30 id FROM t1_values; SELECT LOCATE(my_varbinary_1000, my_binary_30 ), my_varbinary_1000, my_binary_30 id FROM t1_values -WHERE select_id = 170 OR select_id IS NULL; +WHERE select_id = 176 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_binary_30`) AS `LOCATE(my_varbinary_1000, my_binary_30 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_binary_30` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 170 OR select_id IS NULL); +WHERE select_id = 176 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -561,13 +549,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_varbinary_1000, my_varchar_1000 ), my_varbinary_1000, my_varchar_1000 id FROM t1_values; SELECT LOCATE(my_varbinary_1000, my_varchar_1000 ), my_varbinary_1000, my_varchar_1000 id FROM t1_values -WHERE select_id = 169 OR select_id IS NULL; +WHERE select_id = 175 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_varbinary_1000, my_varchar_1000 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 169 OR select_id IS NULL); +WHERE select_id = 175 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -575,13 +563,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_varbinary_1000, my_char_30 ), my_varbinary_1000, my_char_30 id FROM t1_values; SELECT LOCATE(my_varbinary_1000, my_char_30 ), my_varbinary_1000, my_char_30 id FROM t1_values -WHERE select_id = 168 OR select_id IS NULL; +WHERE select_id = 174 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_char_30`) AS `LOCATE(my_varbinary_1000, my_char_30 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_char_30` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 168 OR select_id IS NULL); +WHERE select_id = 174 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -589,13 +577,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_varbinary_1000, my_varbinary_1000 ), my_varbinary_1000, id FROM t1_values; SELECT LOCATE(my_varbinary_1000, my_varbinary_1000 ), my_varbinary_1000, id FROM t1_values -WHERE select_id = 167 OR select_id IS NULL; +WHERE select_id = 173 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_varbinary_1000, my_varbinary_1000 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 167 OR select_id IS NULL); +WHERE select_id = 173 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -603,13 +591,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_binary_30, my_varbinary_1000 ), my_binary_30, my_varbinary_1000 id FROM t1_values; SELECT LOCATE(my_binary_30, my_varbinary_1000 ), my_binary_30, my_varbinary_1000 id FROM t1_values -WHERE select_id = 166 OR select_id IS NULL; +WHERE select_id = 172 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_binary_30, my_varbinary_1000 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 166 OR select_id IS NULL); +WHERE select_id = 172 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -617,13 +605,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_binary_30, my_varchar_1000 ), my_binary_30, my_varchar_1000 id FROM t1_values; SELECT LOCATE(my_binary_30, my_varchar_1000 ), my_binary_30, my_varchar_1000 id FROM t1_values -WHERE select_id = 165 OR select_id IS NULL; +WHERE select_id = 171 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_binary_30, my_varchar_1000 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 165 OR select_id IS NULL); +WHERE select_id = 171 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -631,13 +619,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_binary_30, my_char_30 ), my_binary_30, my_char_30 id FROM t1_values; SELECT LOCATE(my_binary_30, my_char_30 ), my_binary_30, my_char_30 id FROM t1_values -WHERE select_id = 164 OR select_id IS NULL; +WHERE select_id = 170 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_char_30`) AS `LOCATE(my_binary_30, my_char_30 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_char_30` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 164 OR select_id IS NULL); +WHERE select_id = 170 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -645,13 +633,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_binary_30, my_binary_30 ), my_binary_30, id FROM t1_values; SELECT LOCATE(my_binary_30, my_binary_30 ), my_binary_30, id FROM t1_values -WHERE select_id = 163 OR select_id IS NULL; +WHERE select_id = 169 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_binary_30`) AS `LOCATE(my_binary_30, my_binary_30 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 163 OR select_id IS NULL); +WHERE select_id = 169 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -659,13 +647,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_varchar_1000, my_varbinary_1000 ), my_varchar_1000, my_varbinary_1000 id FROM t1_values; SELECT LOCATE(my_varchar_1000, my_varbinary_1000 ), my_varchar_1000, my_varbinary_1000 id FROM t1_values -WHERE select_id = 162 OR select_id IS NULL; +WHERE select_id = 168 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_varchar_1000, my_varbinary_1000 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 162 OR select_id IS NULL); +WHERE select_id = 168 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -673,13 +661,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_varchar_1000, my_binary_30 ), my_varchar_1000, my_binary_30 id FROM t1_values; SELECT LOCATE(my_varchar_1000, my_binary_30 ), my_varchar_1000, my_binary_30 id FROM t1_values -WHERE select_id = 161 OR select_id IS NULL; +WHERE select_id = 167 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_binary_30`) AS `LOCATE(my_varchar_1000, my_binary_30 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_binary_30` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 161 OR select_id IS NULL); +WHERE select_id = 167 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -687,13 +675,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_varchar_1000, my_char_30 ), my_varchar_1000, my_char_30 id FROM t1_values; SELECT LOCATE(my_varchar_1000, my_char_30 ), my_varchar_1000, my_char_30 id FROM t1_values -WHERE select_id = 160 OR select_id IS NULL; +WHERE select_id = 166 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_char_30`) AS `LOCATE(my_varchar_1000, my_char_30 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_char_30` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 160 OR select_id IS NULL); +WHERE select_id = 166 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -701,13 +689,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_varchar_1000, my_varchar_1000 ), my_varchar_1000, id FROM t1_values; SELECT LOCATE(my_varchar_1000, my_varchar_1000 ), my_varchar_1000, id FROM t1_values -WHERE select_id = 159 OR select_id IS NULL; +WHERE select_id = 165 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_varchar_1000, my_varchar_1000 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 159 OR select_id IS NULL); +WHERE select_id = 165 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -715,13 +703,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_char_30, my_varbinary_1000 ), my_char_30, my_varbinary_1000 id FROM t1_values; SELECT LOCATE(my_char_30, my_varbinary_1000 ), my_char_30, my_varbinary_1000 id FROM t1_values -WHERE select_id = 158 OR select_id IS NULL; +WHERE select_id = 164 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_char_30, my_varbinary_1000 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 158 OR select_id IS NULL); +WHERE select_id = 164 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -729,13 +717,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_char_30, my_binary_30 ), my_char_30, my_binary_30 id FROM t1_values; SELECT LOCATE(my_char_30, my_binary_30 ), my_char_30, my_binary_30 id FROM t1_values -WHERE select_id = 157 OR select_id IS NULL; +WHERE select_id = 163 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_binary_30`) AS `LOCATE(my_char_30, my_binary_30 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_binary_30` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 157 OR select_id IS NULL); +WHERE select_id = 163 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -743,13 +731,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_char_30, my_varchar_1000 ), my_char_30, my_varchar_1000 id FROM t1_values; SELECT LOCATE(my_char_30, my_varchar_1000 ), my_char_30, my_varchar_1000 id FROM t1_values -WHERE select_id = 156 OR select_id IS NULL; +WHERE select_id = 162 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_char_30, my_varchar_1000 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 156 OR select_id IS NULL); +WHERE select_id = 162 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -757,13 +745,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_char_30, my_char_30 ), my_char_30, id FROM t1_values; SELECT LOCATE(my_char_30, my_char_30 ), my_char_30, id FROM t1_values -WHERE select_id = 155 OR select_id IS NULL; +WHERE select_id = 161 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_char_30`) AS `LOCATE(my_char_30, my_char_30 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 155 OR select_id IS NULL); +WHERE select_id = 161 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -771,13 +759,13 @@ CREATE VIEW v1 AS SELECT LOCATE('char', my_varbinary_1000), my_varbinary_1000, id FROM t1_values; SELECT LOCATE('char', my_varbinary_1000), my_varbinary_1000, id FROM t1_values -WHERE select_id = 154 OR select_id IS NULL; +WHERE select_id = 160 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'char',`t1_values`.`my_varbinary_1000`) AS `LOCATE('char', my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 154 OR select_id IS NULL); +WHERE select_id = 160 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -785,13 +773,13 @@ CREATE VIEW v1 AS SELECT LOCATE('char', my_binary_30), my_binary_30, id FROM t1_values; SELECT LOCATE('char', my_binary_30), my_binary_30, id FROM t1_values -WHERE select_id = 153 OR select_id IS NULL; +WHERE select_id = 159 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'char',`t1_values`.`my_binary_30`) AS `LOCATE('char', my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 153 OR select_id IS NULL); +WHERE select_id = 159 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -799,13 +787,13 @@ CREATE VIEW v1 AS SELECT LOCATE('char', my_varchar_1000), my_varchar_1000, id FROM t1_values; SELECT LOCATE('char', my_varchar_1000), my_varchar_1000, id FROM t1_values -WHERE select_id = 152 OR select_id IS NULL; +WHERE select_id = 158 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'char',`t1_values`.`my_varchar_1000`) AS `LOCATE('char', my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 152 OR select_id IS NULL); +WHERE select_id = 158 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -813,46 +801,50 @@ CREATE VIEW v1 AS SELECT LOCATE('char', my_char_30), my_char_30, id FROM t1_values; SELECT LOCATE('char', my_char_30), my_char_30, id FROM t1_values -WHERE select_id = 151 OR select_id IS NULL; +WHERE select_id = 157 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'char',`t1_values`.`my_char_30`) AS `LOCATE('char', my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 151 OR select_id IS NULL); +WHERE select_id = 157 OR select_id IS NULL) order by id; DROP VIEW v1; -CREATE VIEW v1 AS SELECT LOAD_FILE('../log/current_test'), id FROM t1_values; -SELECT LOAD_FILE('../log/current_test'), id FROM t1_values -WHERE select_id = 150 OR select_id IS NULL; -LOAD_FILE('../log/current_test') id -CURRENT_TEST: memory_func_view +CREATE VIEW v1 AS SELECT LOAD_FILE('<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/load_file.txt') + AS my_col, + id FROM t1_values; +SELECT LOAD_FILE('<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/load_file.txt') + AS my_col, + id FROM t1_values +WHERE select_id = 156 OR select_id IS NULL order by id; +my_col id +Here is content from load_file 1 -CURRENT_TEST: memory_func_view +Here is content from load_file 2 -CURRENT_TEST: memory_func_view +Here is content from load_file 3 -CURRENT_TEST: memory_func_view +Here is content from load_file 4 -CURRENT_TEST: memory_func_view +Here is content from load_file 5 SHOW CREATE VIEW v1; View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select load_file(_latin1'../log/current_test') AS `LOAD_FILE('../log/current_test')`,`t1_values`.`id` AS `id` from `t1_values` +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select load_file(_latin1'<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/load_file.txt') AS `my_col`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 150 OR select_id IS NULL); -LOAD_FILE('../log/current_test') id -CURRENT_TEST: memory_func_view +WHERE select_id = 156 OR select_id IS NULL) order by id; +my_col id +Here is content from load_file 1 -CURRENT_TEST: memory_func_view +Here is content from load_file 2 -CURRENT_TEST: memory_func_view +Here is content from load_file 3 -CURRENT_TEST: memory_func_view +Here is content from load_file 4 -CURRENT_TEST: memory_func_view +Here is content from load_file 5 DROP VIEW v1; @@ -861,13 +853,13 @@ CREATE VIEW v1 AS SELECT LENGTH(my_varbinary_1000), my_varbinary_1000, id FROM t1_values; SELECT LENGTH(my_varbinary_1000), my_varbinary_1000, id FROM t1_values -WHERE select_id = 149 OR select_id IS NULL; +WHERE select_id = 155 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_varbinary_1000`) AS `LENGTH(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 149 OR select_id IS NULL); +WHERE select_id = 155 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -875,13 +867,13 @@ CREATE VIEW v1 AS SELECT LENGTH(my_binary_30), my_binary_30, id FROM t1_values; SELECT LENGTH(my_binary_30), my_binary_30, id FROM t1_values -WHERE select_id = 148 OR select_id IS NULL; +WHERE select_id = 154 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_binary_30`) AS `LENGTH(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 148 OR select_id IS NULL); +WHERE select_id = 154 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -889,13 +881,13 @@ CREATE VIEW v1 AS SELECT LENGTH(my_varchar_1000), my_varchar_1000, id FROM t1_values; SELECT LENGTH(my_varchar_1000), my_varchar_1000, id FROM t1_values -WHERE select_id = 147 OR select_id IS NULL; +WHERE select_id = 153 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_varchar_1000`) AS `LENGTH(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 147 OR select_id IS NULL); +WHERE select_id = 153 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -903,19 +895,49 @@ CREATE VIEW v1 AS SELECT LENGTH(my_char_30), my_char_30, id FROM t1_values; SELECT LENGTH(my_char_30), my_char_30, id FROM t1_values -WHERE select_id = 146 OR select_id IS NULL; +WHERE select_id = 152 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_char_30`) AS `LENGTH(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 146 OR select_id IS NULL); +WHERE select_id = 152 OR select_id IS NULL) order by id; +DROP VIEW v1; + + +CREATE VIEW v1 AS SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double), my_double, id FROM t1_values; +SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double), my_double, id FROM t1_values +WHERE select_id = 151 OR select_id IS NULL order by id; +LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double) my_double id +NULL NULL 1 + -1.7976931348623e+308 2 +AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 1.7976931348623e+308 3 + 0 4 + -1 5 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' +Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' +SHOW CREATE VIEW v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(_latin1'AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_double`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +SELECT v1.* FROM v1 +WHERE v1.id IN (SELECT id FROM t1_values +WHERE select_id = 151 OR select_id IS NULL) order by id; +LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double) my_double id +NULL NULL 1 + -1.7976931348623e+308 2 +AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 1.7976931348623e+308 3 + 0 4 + -1 5 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' +Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' DROP VIEW v1; CREATE VIEW v1 AS SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal), my_decimal, id FROM t1_values; SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal), my_decimal, id FROM t1_values -WHERE select_id = 145 OR select_id IS NULL; +WHERE select_id = 150 OR select_id IS NULL order by id; LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal) my_decimal id NULL NULL 1 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -930,7 +952,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(_latin1'AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_decimal`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 145 OR select_id IS NULL); +WHERE select_id = 150 OR select_id IS NULL) order by id; LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal) my_decimal id NULL NULL 1 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -943,9 +965,33 @@ Error 1292 Truncated incorrect DECIMAL value: '' DROP VIEW v1; +CREATE VIEW v1 AS SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint), my_bigint, id FROM t1_values; +SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint), my_bigint, id FROM t1_values +WHERE select_id = 149 OR select_id IS NULL order by id; +LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint) my_bigint id +NULL NULL 1 + -9223372036854775808 2 +AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9223372036854775807 3 + 0 4 + -1 5 +SHOW CREATE VIEW v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(_latin1'AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_bigint`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +SELECT v1.* FROM v1 +WHERE v1.id IN (SELECT id FROM t1_values +WHERE select_id = 149 OR select_id IS NULL) order by id; +LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint) my_bigint id +NULL NULL 1 + -9223372036854775808 2 +AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9223372036854775807 3 + 0 4 + -1 5 +DROP VIEW v1; + + CREATE VIEW v1 AS SELECT LEFT(my_varbinary_1000, 2), my_varbinary_1000, id FROM t1_values; SELECT LEFT(my_varbinary_1000, 2), my_varbinary_1000, id FROM t1_values -WHERE select_id = 144 OR select_id IS NULL; +WHERE select_id = 148 OR select_id IS NULL order by id; LEFT(my_varbinary_1000, 2) my_varbinary_1000 id NULL NULL 1 2 @@ -957,7 +1003,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_varbinary_1000`,2) AS `LEFT(my_varbinary_1000, 2)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 144 OR select_id IS NULL); +WHERE select_id = 148 OR select_id IS NULL) order by id; LEFT(my_varbinary_1000, 2) my_varbinary_1000 id NULL NULL 1 2 @@ -969,19 +1015,19 @@ DROP VIEW v1; CREATE VIEW v1 AS SELECT LEFT(my_binary_30, 2), my_binary_30, id FROM t1_values; SELECT LEFT(my_binary_30, 2), my_binary_30, id FROM t1_values -WHERE select_id = 143 OR select_id IS NULL; +WHERE select_id = 147 OR select_id IS NULL order by id; LEFT(my_binary_30, 2) my_binary_30 id NULL NULL 1 - + 2 <- <--------30 characters-------> 3 - - ---äÖüß@µ*$-- --1 -1 + - ---äÖüß@µ*$-- 4 +-1 -1 5 SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_binary_30`,2) AS `LEFT(my_binary_30, 2)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 143 OR select_id IS NULL); +WHERE select_id = 147 OR select_id IS NULL) order by id; LEFT(my_binary_30, 2) my_binary_30 id NULL NULL 1 @@ -993,7 +1039,7 @@ DROP VIEW v1; CREATE VIEW v1 AS SELECT LEFT(my_varchar_1000, 2), my_varchar_1000, id FROM t1_values; SELECT LEFT(my_varchar_1000, 2), my_varchar_1000, id FROM t1_values -WHERE select_id = 142 OR select_id IS NULL; +WHERE select_id = 146 OR select_id IS NULL order by id; LEFT(my_varchar_1000, 2) my_varchar_1000 id NULL NULL 1 2 @@ -1005,7 +1051,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_varchar_1000`,2) AS `LEFT(my_varchar_1000, 2)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 142 OR select_id IS NULL); +WHERE select_id = 146 OR select_id IS NULL) order by id; LEFT(my_varchar_1000, 2) my_varchar_1000 id NULL NULL 1 2 @@ -1017,7 +1063,7 @@ DROP VIEW v1; CREATE VIEW v1 AS SELECT LEFT(my_char_30, 2), my_char_30, id FROM t1_values; SELECT LEFT(my_char_30, 2), my_char_30, id FROM t1_values -WHERE select_id = 141 OR select_id IS NULL; +WHERE select_id = 145 OR select_id IS NULL order by id; LEFT(my_char_30, 2) my_char_30 id NULL NULL 1 2 @@ -1029,7 +1075,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_char_30`,2) AS `LEFT(my_char_30, 2)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 141 OR select_id IS NULL); +WHERE select_id = 145 OR select_id IS NULL) order by id; LEFT(my_char_30, 2) my_char_30 id NULL NULL 1 2 @@ -1043,13 +1089,13 @@ CREATE VIEW v1 AS SELECT LCASE(my_varchar_1000), my_varchar_1000, id FROM t1_values; SELECT LCASE(my_varchar_1000), my_varchar_1000, id FROM t1_values -WHERE select_id = 140 OR select_id IS NULL; +WHERE select_id = 144 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varchar_1000`) AS `LCASE(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 140 OR select_id IS NULL); +WHERE select_id = 144 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -1057,13 +1103,13 @@ CREATE VIEW v1 AS SELECT INSTR(my_char_30, 'char'), my_char_30, id FROM t1_values; SELECT INSTR(my_char_30, 'char'), my_char_30, id FROM t1_values -WHERE select_id = 139 OR select_id IS NULL; +WHERE select_id = 143 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'char',`t1_values`.`my_char_30`) AS `INSTR(my_char_30, 'char')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 139 OR select_id IS NULL); +WHERE select_id = 143 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -1071,7 +1117,7 @@ CREATE VIEW v1 AS SELECT BIT_LENGTH(my_varbinary_1000), my_varbinary_1000, id FROM t1_values; SELECT BIT_LENGTH(my_varbinary_1000), my_varbinary_1000, id FROM t1_values -WHERE select_id = 138 OR select_id IS NULL; +WHERE select_id = 142 OR select_id IS NULL order by id; BIT_LENGTH(my_varbinary_1000) my_varbinary_1000 id NULL NULL 1 0 2 @@ -1083,7 +1129,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_varbinary_1000`) AS `BIT_LENGTH(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 138 OR select_id IS NULL); +WHERE select_id = 142 OR select_id IS NULL) order by id; BIT_LENGTH(my_varbinary_1000) my_varbinary_1000 id NULL NULL 1 0 2 @@ -1097,19 +1143,19 @@ CREATE VIEW v1 AS SELECT BIT_LENGTH(my_binary_30), my_binary_30, id FROM t1_values; SELECT BIT_LENGTH(my_binary_30), my_binary_30, id FROM t1_values -WHERE select_id = 137 OR select_id IS NULL; +WHERE select_id = 141 OR select_id IS NULL order by id; BIT_LENGTH(my_binary_30) my_binary_30 id NULL NULL 1 -240 +240 2 240 <--------30 characters-------> 3 -240 ---äÖüß@µ*$-- -240 -1 +240 ---äÖüß@µ*$-- 4 +240 -1 5 SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_binary_30`) AS `BIT_LENGTH(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 137 OR select_id IS NULL); +WHERE select_id = 141 OR select_id IS NULL) order by id; BIT_LENGTH(my_binary_30) my_binary_30 id NULL NULL 1 240 @@ -1123,7 +1169,7 @@ CREATE VIEW v1 AS SELECT BIT_LENGTH(my_varchar_1000), my_varchar_1000, id FROM t1_values; SELECT BIT_LENGTH(my_varchar_1000), my_varchar_1000, id FROM t1_values -WHERE select_id = 136 OR select_id IS NULL; +WHERE select_id = 140 OR select_id IS NULL order by id; BIT_LENGTH(my_varchar_1000) my_varchar_1000 id NULL NULL 1 0 2 @@ -1135,7 +1181,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_varchar_1000`) AS `BIT_LENGTH(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 136 OR select_id IS NULL); +WHERE select_id = 140 OR select_id IS NULL) order by id; BIT_LENGTH(my_varchar_1000) my_varchar_1000 id NULL NULL 1 0 2 @@ -1149,7 +1195,7 @@ CREATE VIEW v1 AS SELECT BIT_LENGTH(my_char_30), my_char_30, id FROM t1_values; SELECT BIT_LENGTH(my_char_30), my_char_30, id FROM t1_values -WHERE select_id = 135 OR select_id IS NULL; +WHERE select_id = 139 OR select_id IS NULL order by id; BIT_LENGTH(my_char_30) my_char_30 id NULL NULL 1 0 2 @@ -1161,7 +1207,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_char_30`) AS `BIT_LENGTH(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 135 OR select_id IS NULL); +WHERE select_id = 139 OR select_id IS NULL) order by id; BIT_LENGTH(my_char_30) my_char_30 id NULL NULL 1 0 2 @@ -1175,7 +1221,7 @@ CREATE VIEW v1 AS SELECT IFNULL(my_year,'IS_NULL'), my_year, id FROM t1_values; SELECT IFNULL(my_year,'IS_NULL'), my_year, id FROM t1_values -WHERE select_id = 134 OR select_id IS NULL; +WHERE select_id = 138 OR select_id IS NULL order by id; IFNULL(my_year,'IS_NULL') my_year id IS_NULL NULL 1 1901 1901 2 @@ -1187,7 +1233,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_year`,_latin1'IS_NULL') AS `IFNULL(my_year,'IS_NULL')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 134 OR select_id IS NULL); +WHERE select_id = 138 OR select_id IS NULL) order by id; IFNULL(my_year,'IS_NULL') my_year id IS_NULL NULL 1 1901 1901 2 @@ -1201,7 +1247,7 @@ CREATE VIEW v1 AS SELECT IFNULL(my_time,'IS_NULL'), my_time, id FROM t1_values; SELECT IFNULL(my_time,'IS_NULL'), my_time, id FROM t1_values -WHERE select_id = 133 OR select_id IS NULL; +WHERE select_id = 137 OR select_id IS NULL order by id; IFNULL(my_time,'IS_NULL') my_time id IS_NULL NULL 1 -838:59:59 -838:59:59 2 @@ -1213,7 +1259,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_time`,_latin1'IS_NULL') AS `IFNULL(my_time,'IS_NULL')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 133 OR select_id IS NULL); +WHERE select_id = 137 OR select_id IS NULL) order by id; IFNULL(my_time,'IS_NULL') my_time id IS_NULL NULL 1 -838:59:59 -838:59:59 2 @@ -1227,7 +1273,7 @@ CREATE VIEW v1 AS SELECT IFNULL(my_timestamp,'IS_NULL'), my_timestamp, id FROM t1_values; SELECT IFNULL(my_timestamp,'IS_NULL'), my_timestamp, id FROM t1_values -WHERE select_id = 132 OR select_id IS NULL; +WHERE select_id = 136 OR select_id IS NULL order by id; IFNULL(my_timestamp,'IS_NULL') my_timestamp id 0000-00-00 00:00:00 0000-00-00 00:00:00 1 1970-01-01 03:00:01 1970-01-01 03:00:01 2 @@ -1239,7 +1285,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_timestamp`,_latin1'IS_NULL') AS `IFNULL(my_timestamp,'IS_NULL')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 132 OR select_id IS NULL); +WHERE select_id = 136 OR select_id IS NULL) order by id; IFNULL(my_timestamp,'IS_NULL') my_timestamp id 0000-00-00 00:00:00 0000-00-00 00:00:00 1 1970-01-01 03:00:01 1970-01-01 03:00:01 2 @@ -1253,7 +1299,7 @@ CREATE VIEW v1 AS SELECT IFNULL(my_date,'IS_NULL'), my_date, id FROM t1_values; SELECT IFNULL(my_date,'IS_NULL'), my_date, id FROM t1_values -WHERE select_id = 131 OR select_id IS NULL; +WHERE select_id = 135 OR select_id IS NULL order by id; IFNULL(my_date,'IS_NULL') my_date id IS_NULL NULL 1 0001-01-01 0001-01-01 2 @@ -1265,7 +1311,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_date`,_latin1'IS_NULL') AS `IFNULL(my_date,'IS_NULL')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 131 OR select_id IS NULL); +WHERE select_id = 135 OR select_id IS NULL) order by id; IFNULL(my_date,'IS_NULL') my_date id IS_NULL NULL 1 0001-01-01 0001-01-01 2 @@ -1279,7 +1325,7 @@ CREATE VIEW v1 AS SELECT IFNULL(my_datetime,'IS_NULL'), my_datetime, id FROM t1_values; SELECT IFNULL(my_datetime,'IS_NULL'), my_datetime, id FROM t1_values -WHERE select_id = 130 OR select_id IS NULL; +WHERE select_id = 134 OR select_id IS NULL order by id; IFNULL(my_datetime,'IS_NULL') my_datetime id IS_NULL NULL 1 0001-01-01 00:00:00 0001-01-01 00:00:00 2 @@ -1291,7 +1337,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_datetime`,_latin1'IS_NULL') AS `IFNULL(my_datetime,'IS_NULL')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 130 OR select_id IS NULL); +WHERE select_id = 134 OR select_id IS NULL) order by id; IFNULL(my_datetime,'IS_NULL') my_datetime id IS_NULL NULL 1 0001-01-01 00:00:00 0001-01-01 00:00:00 2 @@ -1305,7 +1351,7 @@ CREATE VIEW v1 AS SELECT IFNULL(my_double,'IS_NULL'), my_double, id FROM t1_values; SELECT IFNULL(my_double,'IS_NULL'), my_double, id FROM t1_values -WHERE select_id = 129 OR select_id IS NULL; +WHERE select_id = 133 OR select_id IS NULL order by id; IFNULL(my_double,'IS_NULL') my_double id IS_NULL NULL 1 -1.7976931348623e+308 -1.7976931348623e+308 2 @@ -1317,7 +1363,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_double`,_latin1'IS_NULL') AS `IFNULL(my_double,'IS_NULL')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 129 OR select_id IS NULL); +WHERE select_id = 133 OR select_id IS NULL) order by id; IFNULL(my_double,'IS_NULL') my_double id IS_NULL NULL 1 -1.7976931348623e+308 -1.7976931348623e+308 2 @@ -1331,7 +1377,7 @@ CREATE VIEW v1 AS SELECT IFNULL(my_decimal,'IS_NULL'), my_decimal, id FROM t1_values; SELECT IFNULL(my_decimal,'IS_NULL'), my_decimal, id FROM t1_values -WHERE select_id = 128 OR select_id IS NULL; +WHERE select_id = 132 OR select_id IS NULL order by id; IFNULL(my_decimal,'IS_NULL') my_decimal id IS_NULL NULL 1 -9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -1343,7 +1389,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_decimal`,_latin1'IS_NULL') AS `IFNULL(my_decimal,'IS_NULL')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 128 OR select_id IS NULL); +WHERE select_id = 132 OR select_id IS NULL) order by id; IFNULL(my_decimal,'IS_NULL') my_decimal id IS_NULL NULL 1 -9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -1357,7 +1403,7 @@ CREATE VIEW v1 AS SELECT IFNULL(my_bigint,'IS_NULL'), my_bigint, id FROM t1_values; SELECT IFNULL(my_bigint,'IS_NULL'), my_bigint, id FROM t1_values -WHERE select_id = 127 OR select_id IS NULL; +WHERE select_id = 131 OR select_id IS NULL order by id; IFNULL(my_bigint,'IS_NULL') my_bigint id IS_NULL NULL 1 -9223372036854775808 -9223372036854775808 2 @@ -1369,7 +1415,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_bigint`,_latin1'IS_NULL') AS `IFNULL(my_bigint,'IS_NULL')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 127 OR select_id IS NULL); +WHERE select_id = 131 OR select_id IS NULL) order by id; IFNULL(my_bigint,'IS_NULL') my_bigint id IS_NULL NULL 1 -9223372036854775808 -9223372036854775808 2 @@ -1383,7 +1429,7 @@ CREATE VIEW v1 AS SELECT IFNULL(my_varbinary_1000,'IS_NULL'), my_varbinary_1000, id FROM t1_values; SELECT IFNULL(my_varbinary_1000,'IS_NULL'), my_varbinary_1000, id FROM t1_values -WHERE select_id = 126 OR select_id IS NULL; +WHERE select_id = 130 OR select_id IS NULL order by id; IFNULL(my_varbinary_1000,'IS_NULL') my_varbinary_1000 id IS_NULL NULL 1 2 @@ -1395,7 +1441,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_varbinary_1000`,_latin1'IS_NULL') AS `IFNULL(my_varbinary_1000,'IS_NULL')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 126 OR select_id IS NULL); +WHERE select_id = 130 OR select_id IS NULL) order by id; IFNULL(my_varbinary_1000,'IS_NULL') my_varbinary_1000 id IS_NULL NULL 1 2 @@ -1409,19 +1455,19 @@ CREATE VIEW v1 AS SELECT IFNULL(my_binary_30,'IS_NULL'), my_binary_30, id FROM t1_values; SELECT IFNULL(my_binary_30,'IS_NULL'), my_binary_30, id FROM t1_values -WHERE select_id = 125 OR select_id IS NULL; +WHERE select_id = 129 OR select_id IS NULL order by id; IFNULL(my_binary_30,'IS_NULL') my_binary_30 id IS_NULL NULL 1 - + 2 <--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- --1 + ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 +-1 -1 5 SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_binary_30`,_latin1'IS_NULL') AS `IFNULL(my_binary_30,'IS_NULL')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 125 OR select_id IS NULL); +WHERE select_id = 129 OR select_id IS NULL) order by id; IFNULL(my_binary_30,'IS_NULL') my_binary_30 id IS_NULL NULL 1 @@ -1435,7 +1481,7 @@ CREATE VIEW v1 AS SELECT IFNULL(my_varchar_1000,'IS_NULL'), my_varchar_1000, id FROM t1_values; SELECT IFNULL(my_varchar_1000,'IS_NULL'), my_varchar_1000, id FROM t1_values -WHERE select_id = 124 OR select_id IS NULL; +WHERE select_id = 128 OR select_id IS NULL order by id; IFNULL(my_varchar_1000,'IS_NULL') my_varchar_1000 id IS_NULL NULL 1 2 @@ -1447,7 +1493,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_varchar_1000`,_latin1'IS_NULL') AS `IFNULL(my_varchar_1000,'IS_NULL')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 124 OR select_id IS NULL); +WHERE select_id = 128 OR select_id IS NULL) order by id; IFNULL(my_varchar_1000,'IS_NULL') my_varchar_1000 id IS_NULL NULL 1 2 @@ -1461,7 +1507,7 @@ CREATE VIEW v1 AS SELECT IFNULL(my_char_30,'IS_NULL'), my_char_30, id FROM t1_values; SELECT IFNULL(my_char_30,'IS_NULL'), my_char_30, id FROM t1_values -WHERE select_id = 123 OR select_id IS NULL; +WHERE select_id = 127 OR select_id IS NULL order by id; IFNULL(my_char_30,'IS_NULL') my_char_30 id IS_NULL NULL 1 2 @@ -1473,7 +1519,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_char_30`,_latin1'IS_NULL') AS `IFNULL(my_char_30,'IS_NULL')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 123 OR select_id IS NULL); +WHERE select_id = 127 OR select_id IS NULL) order by id; IFNULL(my_char_30,'IS_NULL') my_char_30 id IS_NULL NULL 1 2 @@ -1487,7 +1533,7 @@ CREATE VIEW v1 AS SELECT IF(my_year IS NULL, 'IS NULL', 'IS NOT NULL'), my_year, id FROM t1_values; SELECT IF(my_year IS NULL, 'IS NULL', 'IS NOT NULL'), my_year, id FROM t1_values -WHERE select_id = 122 OR select_id IS NULL; +WHERE select_id = 126 OR select_id IS NULL order by id; IF(my_year IS NULL, 'IS NULL', 'IS NOT NULL') my_year id IS NULL NULL 1 @@ -1501,7 +1547,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI 'IS NOT NULL')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 122 OR select_id IS NULL); +WHERE select_id = 126 OR select_id IS NULL) order by id; IF(my_year IS NULL, 'IS NULL', 'IS NOT NULL') my_year id IS NULL NULL 1 @@ -1516,7 +1562,7 @@ CREATE VIEW v1 AS SELECT IF(my_time IS NULL, 'IS NULL', 'IS NOT NULL'), my_time, id FROM t1_values; SELECT IF(my_time IS NULL, 'IS NULL', 'IS NOT NULL'), my_time, id FROM t1_values -WHERE select_id = 121 OR select_id IS NULL; +WHERE select_id = 125 OR select_id IS NULL order by id; IF(my_time IS NULL, 'IS NULL', 'IS NOT NULL') my_time id IS NULL NULL 1 @@ -1530,7 +1576,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI 'IS NOT NULL')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 121 OR select_id IS NULL); +WHERE select_id = 125 OR select_id IS NULL) order by id; IF(my_time IS NULL, 'IS NULL', 'IS NOT NULL') my_time id IS NULL NULL 1 @@ -1545,7 +1591,7 @@ CREATE VIEW v1 AS SELECT IF(my_timestamp IS NULL, 'IS NULL', 'IS NOT NULL'), my_timestamp, id FROM t1_values; SELECT IF(my_timestamp IS NULL, 'IS NULL', 'IS NOT NULL'), my_timestamp, id FROM t1_values -WHERE select_id = 120 OR select_id IS NULL; +WHERE select_id = 124 OR select_id IS NULL order by id; IF(my_timestamp IS NULL, 'IS NULL', 'IS NOT NULL') my_timestamp id IS NOT NULL 0000-00-00 00:00:00 1 @@ -1559,7 +1605,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI 'IS NOT NULL')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 120 OR select_id IS NULL); +WHERE select_id = 124 OR select_id IS NULL) order by id; IF(my_timestamp IS NULL, 'IS NULL', 'IS NOT NULL') my_timestamp id IS NOT NULL 0000-00-00 00:00:00 1 @@ -1574,7 +1620,7 @@ CREATE VIEW v1 AS SELECT IF(my_date IS NULL, 'IS NULL', 'IS NOT NULL'), my_date, id FROM t1_values; SELECT IF(my_date IS NULL, 'IS NULL', 'IS NOT NULL'), my_date, id FROM t1_values -WHERE select_id = 119 OR select_id IS NULL; +WHERE select_id = 123 OR select_id IS NULL order by id; IF(my_date IS NULL, 'IS NULL', 'IS NOT NULL') my_date id IS NULL NULL 1 @@ -1588,7 +1634,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI 'IS NOT NULL')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 119 OR select_id IS NULL); +WHERE select_id = 123 OR select_id IS NULL) order by id; IF(my_date IS NULL, 'IS NULL', 'IS NOT NULL') my_date id IS NULL NULL 1 @@ -1603,7 +1649,7 @@ CREATE VIEW v1 AS SELECT IF(my_datetime IS NULL, 'IS NULL', 'IS NOT NULL'), my_datetime, id FROM t1_values; SELECT IF(my_datetime IS NULL, 'IS NULL', 'IS NOT NULL'), my_datetime, id FROM t1_values -WHERE select_id = 118 OR select_id IS NULL; +WHERE select_id = 122 OR select_id IS NULL order by id; IF(my_datetime IS NULL, 'IS NULL', 'IS NOT NULL') my_datetime id IS NULL NULL 1 @@ -1617,7 +1663,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI 'IS NOT NULL')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 118 OR select_id IS NULL); +WHERE select_id = 122 OR select_id IS NULL) order by id; IF(my_datetime IS NULL, 'IS NULL', 'IS NOT NULL') my_datetime id IS NULL NULL 1 @@ -1632,7 +1678,7 @@ CREATE VIEW v1 AS SELECT IF(my_double IS NULL, 'IS NULL', 'IS NOT NULL'), my_double, id FROM t1_values; SELECT IF(my_double IS NULL, 'IS NULL', 'IS NOT NULL'), my_double, id FROM t1_values -WHERE select_id = 117 OR select_id IS NULL; +WHERE select_id = 121 OR select_id IS NULL order by id; IF(my_double IS NULL, 'IS NULL', 'IS NOT NULL') my_double id IS NULL NULL 1 @@ -1646,7 +1692,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI 'IS NOT NULL')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 117 OR select_id IS NULL); +WHERE select_id = 121 OR select_id IS NULL) order by id; IF(my_double IS NULL, 'IS NULL', 'IS NOT NULL') my_double id IS NULL NULL 1 @@ -1661,7 +1707,7 @@ CREATE VIEW v1 AS SELECT IF(my_decimal IS NULL, 'IS NULL', 'IS NOT NULL'), my_decimal, id FROM t1_values; SELECT IF(my_decimal IS NULL, 'IS NULL', 'IS NOT NULL'), my_decimal, id FROM t1_values -WHERE select_id = 116 OR select_id IS NULL; +WHERE select_id = 120 OR select_id IS NULL order by id; IF(my_decimal IS NULL, 'IS NULL', 'IS NOT NULL') my_decimal id IS NULL NULL 1 @@ -1675,7 +1721,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI 'IS NOT NULL')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 116 OR select_id IS NULL); +WHERE select_id = 120 OR select_id IS NULL) order by id; IF(my_decimal IS NULL, 'IS NULL', 'IS NOT NULL') my_decimal id IS NULL NULL 1 @@ -1690,7 +1736,7 @@ CREATE VIEW v1 AS SELECT IF(my_bigint IS NULL, 'IS NULL', 'IS NOT NULL'), my_bigint, id FROM t1_values; SELECT IF(my_bigint IS NULL, 'IS NULL', 'IS NOT NULL'), my_bigint, id FROM t1_values -WHERE select_id = 115 OR select_id IS NULL; +WHERE select_id = 119 OR select_id IS NULL order by id; IF(my_bigint IS NULL, 'IS NULL', 'IS NOT NULL') my_bigint id IS NULL NULL 1 @@ -1704,7 +1750,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI 'IS NOT NULL')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 115 OR select_id IS NULL); +WHERE select_id = 119 OR select_id IS NULL) order by id; IF(my_bigint IS NULL, 'IS NULL', 'IS NOT NULL') my_bigint id IS NULL NULL 1 @@ -1719,7 +1765,7 @@ CREATE VIEW v1 AS SELECT IF(my_varbinary_1000 IS NULL, 'IS NULL', 'IS NOT NULL'), my_varbinary_1000, id FROM t1_values; SELECT IF(my_varbinary_1000 IS NULL, 'IS NULL', 'IS NOT NULL'), my_varbinary_1000, id FROM t1_values -WHERE select_id = 114 OR select_id IS NULL; +WHERE select_id = 118 OR select_id IS NULL order by id; IF(my_varbinary_1000 IS NULL, 'IS NULL', 'IS NOT NULL') my_varbinary_1000 id IS NULL NULL 1 @@ -1733,7 +1779,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI 'IS NOT NULL')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 114 OR select_id IS NULL); +WHERE select_id = 118 OR select_id IS NULL) order by id; IF(my_varbinary_1000 IS NULL, 'IS NULL', 'IS NOT NULL') my_varbinary_1000 id IS NULL NULL 1 @@ -1748,21 +1794,21 @@ CREATE VIEW v1 AS SELECT IF(my_binary_30 IS NULL, 'IS NULL', 'IS NOT NULL'), my_binary_30, id FROM t1_values; SELECT IF(my_binary_30 IS NULL, 'IS NULL', 'IS NOT NULL'), my_binary_30, id FROM t1_values -WHERE select_id = 113 OR select_id IS NULL; +WHERE select_id = 117 OR select_id IS NULL order by id; IF(my_binary_30 IS NULL, 'IS NULL', 'IS NOT NULL') my_binary_30 id IS NULL NULL 1 -IS NOT NULL +IS NOT NULL 2 IS NOT NULL <--------30 characters-------> 3 -IS NOT NULL ---äÖüß@µ*$-- -IS NOT NULL -1 +IS NOT NULL ---äÖüß@µ*$-- 4 +IS NOT NULL -1 5 SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_binary_30`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_binary_30 IS NULL, 'IS NULL', 'IS NOT NULL')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 113 OR select_id IS NULL); +WHERE select_id = 117 OR select_id IS NULL) order by id; IF(my_binary_30 IS NULL, 'IS NULL', 'IS NOT NULL') my_binary_30 id IS NULL NULL 1 @@ -1777,7 +1823,7 @@ CREATE VIEW v1 AS SELECT IF(my_varchar_1000 IS NULL, 'IS NULL', 'IS NOT NULL'), my_varchar_1000, id FROM t1_values; SELECT IF(my_varchar_1000 IS NULL, 'IS NULL', 'IS NOT NULL'), my_varchar_1000, id FROM t1_values -WHERE select_id = 112 OR select_id IS NULL; +WHERE select_id = 116 OR select_id IS NULL order by id; IF(my_varchar_1000 IS NULL, 'IS NULL', 'IS NOT NULL') my_varchar_1000 id IS NULL NULL 1 @@ -1791,7 +1837,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI 'IS NOT NULL')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 112 OR select_id IS NULL); +WHERE select_id = 116 OR select_id IS NULL) order by id; IF(my_varchar_1000 IS NULL, 'IS NULL', 'IS NOT NULL') my_varchar_1000 id IS NULL NULL 1 @@ -1806,7 +1852,7 @@ CREATE VIEW v1 AS SELECT IF(my_char_30 IS NULL, 'IS NULL', 'IS NOT NULL'), my_char_30, id FROM t1_values; SELECT IF(my_char_30 IS NULL, 'IS NULL', 'IS NOT NULL'), my_char_30, id FROM t1_values -WHERE select_id = 111 OR select_id IS NULL; +WHERE select_id = 115 OR select_id IS NULL order by id; IF(my_char_30 IS NULL, 'IS NULL', 'IS NOT NULL') my_char_30 id IS NULL NULL 1 @@ -1820,7 +1866,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI 'IS NOT NULL')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 111 OR select_id IS NULL); +WHERE select_id = 115 OR select_id IS NULL) order by id; IF(my_char_30 IS NULL, 'IS NULL', 'IS NOT NULL') my_char_30 id IS NULL NULL 1 @@ -1835,7 +1881,7 @@ CREATE VIEW v1 AS SELECT IF(my_year, 'IS TRUE', 'IS NOT TRUE'), my_year, id FROM t1_values; SELECT IF(my_year, 'IS TRUE', 'IS NOT TRUE'), my_year, id FROM t1_values -WHERE select_id = 110 OR select_id IS NULL; +WHERE select_id = 114 OR select_id IS NULL order by id; IF(my_year, 'IS TRUE', 'IS NOT TRUE') my_year id IS NOT TRUE NULL 1 IS TRUE 1901 2 @@ -1847,7 +1893,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_year`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_year, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 110 OR select_id IS NULL); +WHERE select_id = 114 OR select_id IS NULL) order by id; IF(my_year, 'IS TRUE', 'IS NOT TRUE') my_year id IS NOT TRUE NULL 1 IS TRUE 1901 2 @@ -1861,7 +1907,7 @@ CREATE VIEW v1 AS SELECT IF(my_time, 'IS TRUE', 'IS NOT TRUE'), my_time, id FROM t1_values; SELECT IF(my_time, 'IS TRUE', 'IS NOT TRUE'), my_time, id FROM t1_values -WHERE select_id = 109 OR select_id IS NULL; +WHERE select_id = 113 OR select_id IS NULL order by id; IF(my_time, 'IS TRUE', 'IS NOT TRUE') my_time id IS NOT TRUE NULL 1 IS TRUE -838:59:59 2 @@ -1873,7 +1919,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_time`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_time, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 109 OR select_id IS NULL); +WHERE select_id = 113 OR select_id IS NULL) order by id; IF(my_time, 'IS TRUE', 'IS NOT TRUE') my_time id IS NOT TRUE NULL 1 IS TRUE -838:59:59 2 @@ -1887,7 +1933,7 @@ CREATE VIEW v1 AS SELECT IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE'), my_timestamp, id FROM t1_values; SELECT IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE'), my_timestamp, id FROM t1_values -WHERE select_id = 108 OR select_id IS NULL; +WHERE select_id = 112 OR select_id IS NULL order by id; IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE') my_timestamp id IS NOT TRUE 0000-00-00 00:00:00 1 IS TRUE 1970-01-01 03:00:01 2 @@ -1899,7 +1945,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_timestamp`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 108 OR select_id IS NULL); +WHERE select_id = 112 OR select_id IS NULL) order by id; IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE') my_timestamp id IS NOT TRUE 0000-00-00 00:00:00 1 IS TRUE 1970-01-01 03:00:01 2 @@ -1913,7 +1959,7 @@ CREATE VIEW v1 AS SELECT IF(my_date, 'IS TRUE', 'IS NOT TRUE'), my_date, id FROM t1_values; SELECT IF(my_date, 'IS TRUE', 'IS NOT TRUE'), my_date, id FROM t1_values -WHERE select_id = 107 OR select_id IS NULL; +WHERE select_id = 111 OR select_id IS NULL order by id; IF(my_date, 'IS TRUE', 'IS NOT TRUE') my_date id IS NOT TRUE NULL 1 IS TRUE 0001-01-01 2 @@ -1925,7 +1971,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_date`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_date, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 107 OR select_id IS NULL); +WHERE select_id = 111 OR select_id IS NULL) order by id; IF(my_date, 'IS TRUE', 'IS NOT TRUE') my_date id IS NOT TRUE NULL 1 IS TRUE 0001-01-01 2 @@ -1939,7 +1985,7 @@ CREATE VIEW v1 AS SELECT IF(my_datetime, 'IS TRUE', 'IS NOT TRUE'), my_datetime, id FROM t1_values; SELECT IF(my_datetime, 'IS TRUE', 'IS NOT TRUE'), my_datetime, id FROM t1_values -WHERE select_id = 106 OR select_id IS NULL; +WHERE select_id = 110 OR select_id IS NULL order by id; IF(my_datetime, 'IS TRUE', 'IS NOT TRUE') my_datetime id IS NOT TRUE NULL 1 IS TRUE 0001-01-01 00:00:00 2 @@ -1951,7 +1997,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_datetime`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_datetime, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 106 OR select_id IS NULL); +WHERE select_id = 110 OR select_id IS NULL) order by id; IF(my_datetime, 'IS TRUE', 'IS NOT TRUE') my_datetime id IS NOT TRUE NULL 1 IS TRUE 0001-01-01 00:00:00 2 @@ -1965,7 +2011,7 @@ CREATE VIEW v1 AS SELECT IF(my_double, 'IS TRUE', 'IS NOT TRUE'), my_double, id FROM t1_values; SELECT IF(my_double, 'IS TRUE', 'IS NOT TRUE'), my_double, id FROM t1_values -WHERE select_id = 105 OR select_id IS NULL; +WHERE select_id = 109 OR select_id IS NULL order by id; IF(my_double, 'IS TRUE', 'IS NOT TRUE') my_double id IS NOT TRUE NULL 1 IS TRUE -1.7976931348623e+308 2 @@ -1977,7 +2023,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_double`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_double, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 105 OR select_id IS NULL); +WHERE select_id = 109 OR select_id IS NULL) order by id; IF(my_double, 'IS TRUE', 'IS NOT TRUE') my_double id IS NOT TRUE NULL 1 IS TRUE -1.7976931348623e+308 2 @@ -1991,7 +2037,7 @@ CREATE VIEW v1 AS SELECT IF(my_decimal, 'IS TRUE', 'IS NOT TRUE'), my_decimal, id FROM t1_values; SELECT IF(my_decimal, 'IS TRUE', 'IS NOT TRUE'), my_decimal, id FROM t1_values -WHERE select_id = 104 OR select_id IS NULL; +WHERE select_id = 108 OR select_id IS NULL order by id; IF(my_decimal, 'IS TRUE', 'IS NOT TRUE') my_decimal id IS NOT TRUE NULL 1 IS TRUE -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -2003,7 +2049,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_decimal`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_decimal, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 104 OR select_id IS NULL); +WHERE select_id = 108 OR select_id IS NULL) order by id; IF(my_decimal, 'IS TRUE', 'IS NOT TRUE') my_decimal id IS NOT TRUE NULL 1 IS TRUE -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -2017,7 +2063,7 @@ CREATE VIEW v1 AS SELECT IF(my_bigint, 'IS TRUE', 'IS NOT TRUE'), my_bigint, id FROM t1_values; SELECT IF(my_bigint, 'IS TRUE', 'IS NOT TRUE'), my_bigint, id FROM t1_values -WHERE select_id = 103 OR select_id IS NULL; +WHERE select_id = 107 OR select_id IS NULL order by id; IF(my_bigint, 'IS TRUE', 'IS NOT TRUE') my_bigint id IS NOT TRUE NULL 1 IS TRUE -9223372036854775808 2 @@ -2029,7 +2075,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_bigint`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_bigint, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 103 OR select_id IS NULL); +WHERE select_id = 107 OR select_id IS NULL) order by id; IF(my_bigint, 'IS TRUE', 'IS NOT TRUE') my_bigint id IS NOT TRUE NULL 1 IS TRUE -9223372036854775808 2 @@ -2043,7 +2089,7 @@ CREATE VIEW v1 AS SELECT IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE'), my_varbinary_1000, id FROM t1_values; SELECT IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE'), my_varbinary_1000, id FROM t1_values -WHERE select_id = 102 OR select_id IS NULL; +WHERE select_id = 106 OR select_id IS NULL order by id; IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE') my_varbinary_1000 id IS NOT TRUE NULL 1 IS NOT TRUE 2 @@ -2055,7 +2101,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_varbinary_1000`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 102 OR select_id IS NULL); +WHERE select_id = 106 OR select_id IS NULL) order by id; IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE') my_varbinary_1000 id IS NOT TRUE NULL 1 IS NOT TRUE 2 @@ -2069,13 +2115,13 @@ CREATE VIEW v1 AS SELECT IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE'), my_binary_30, id FROM t1_values; SELECT IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE'), my_binary_30, id FROM t1_values -WHERE select_id = 101 OR select_id IS NULL; +WHERE select_id = 105 OR select_id IS NULL order by id; IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE') my_binary_30 id IS NOT TRUE NULL 1 -IS NOT TRUE +IS NOT TRUE 2 IS NOT TRUE <--------30 characters-------> 3 -IS NOT TRUE ---äÖüß@µ*$-- -IS TRUE -1 +IS NOT TRUE ---äÖüß@µ*$-- 4 +IS TRUE -1 5 Warnings: Warning 1292 Truncated incorrect DOUBLE value: '' Warning 1292 Truncated incorrect DOUBLE value: '<--------30 characters------->' @@ -2086,7 +2132,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_binary_30`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 101 OR select_id IS NULL); +WHERE select_id = 105 OR select_id IS NULL) order by id; IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE') my_binary_30 id IS NOT TRUE NULL 1 IS NOT TRUE @@ -2105,7 +2151,7 @@ CREATE VIEW v1 AS SELECT IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE'), my_varchar_1000, id FROM t1_values; SELECT IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE'), my_varchar_1000, id FROM t1_values -WHERE select_id = 100 OR select_id IS NULL; +WHERE select_id = 104 OR select_id IS NULL order by id; IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE') my_varchar_1000 id IS NOT TRUE NULL 1 IS NOT TRUE 2 @@ -2117,7 +2163,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_varchar_1000`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 100 OR select_id IS NULL); +WHERE select_id = 104 OR select_id IS NULL) order by id; IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE') my_varchar_1000 id IS NOT TRUE NULL 1 IS NOT TRUE 2 @@ -2131,7 +2177,7 @@ CREATE VIEW v1 AS SELECT IF(my_char_30, 'IS TRUE', 'IS NOT TRUE'), my_char_30, id FROM t1_values; SELECT IF(my_char_30, 'IS TRUE', 'IS NOT TRUE'), my_char_30, id FROM t1_values -WHERE select_id = 99 OR select_id IS NULL; +WHERE select_id = 103 OR select_id IS NULL order by id; IF(my_char_30, 'IS TRUE', 'IS NOT TRUE') my_char_30 id IS NOT TRUE NULL 1 IS NOT TRUE 2 @@ -2146,7 +2192,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_char_30`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_char_30, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 99 OR select_id IS NULL); +WHERE select_id = 103 OR select_id IS NULL) order by id; IF(my_char_30, 'IS TRUE', 'IS NOT TRUE') my_char_30 id IS NOT TRUE NULL 1 IS NOT TRUE 2 @@ -2159,11 +2205,11 @@ Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- ' DROP VIEW v1; -CREATE VIEW v1 AS SELECT CONVERT(my_varbinary_1000 USING koi8r), +CREATE VIEW v1 AS SELECT CONVERT(my_varbinary_1000 USING koi8r), my_varbinary_1000, id FROM t1_values; -SELECT CONVERT(my_varbinary_1000 USING koi8r), +SELECT CONVERT(my_varbinary_1000 USING koi8r), my_varbinary_1000, id FROM t1_values -WHERE select_id = 98 OR select_id IS NULL; +WHERE select_id = 102 OR select_id IS NULL order by id; CONVERT(my_varbinary_1000 USING koi8r) my_varbinary_1000 id NULL NULL 1 2 @@ -2175,7 +2221,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varbinary_1000` using koi8r) AS `CONVERT(my_varbinary_1000 USING koi8r)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 98 OR select_id IS NULL); +WHERE select_id = 102 OR select_id IS NULL) order by id; CONVERT(my_varbinary_1000 USING koi8r) my_varbinary_1000 id NULL NULL 1 2 @@ -2185,23 +2231,23 @@ NULL NULL 1 DROP VIEW v1; -CREATE VIEW v1 AS SELECT CONVERT(my_binary_30 USING koi8r), +CREATE VIEW v1 AS SELECT CONVERT(my_binary_30 USING koi8r), my_binary_30, id FROM t1_values; -SELECT CONVERT(my_binary_30 USING koi8r), +SELECT CONVERT(my_binary_30 USING koi8r), my_binary_30, id FROM t1_values -WHERE select_id = 97 OR select_id IS NULL; +WHERE select_id = 101 OR select_id IS NULL order by id; CONVERT(my_binary_30 USING koi8r) my_binary_30 id NULL NULL 1 - + 2 <--------30 characters-------> <--------30 characters-------> 3 - ---???????÷@??*$-- --1 + ---???????÷@??*$-- ---äÖüß@µ*$-- 4 +-1 -1 5 SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_binary_30` using koi8r) AS `CONVERT(my_binary_30 USING koi8r)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 97 OR select_id IS NULL); +WHERE select_id = 101 OR select_id IS NULL) order by id; CONVERT(my_binary_30 USING koi8r) my_binary_30 id NULL NULL 1 @@ -2211,11 +2257,11 @@ NULL NULL 1 DROP VIEW v1; -CREATE VIEW v1 AS SELECT CONVERT(my_varchar_1000 USING koi8r), +CREATE VIEW v1 AS SELECT CONVERT(my_varchar_1000 USING koi8r), my_varchar_1000, id FROM t1_values; -SELECT CONVERT(my_varchar_1000 USING koi8r), +SELECT CONVERT(my_varchar_1000 USING koi8r), my_varchar_1000, id FROM t1_values -WHERE select_id = 96 OR select_id IS NULL; +WHERE select_id = 100 OR select_id IS NULL order by id; CONVERT(my_varchar_1000 USING koi8r) my_varchar_1000 id NULL NULL 1 2 @@ -2227,7 +2273,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varchar_1000` using koi8r) AS `CONVERT(my_varchar_1000 USING koi8r)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 96 OR select_id IS NULL); +WHERE select_id = 100 OR select_id IS NULL) order by id; CONVERT(my_varchar_1000 USING koi8r) my_varchar_1000 id NULL NULL 1 2 @@ -2237,11 +2283,11 @@ NULL NULL 1 DROP VIEW v1; -CREATE VIEW v1 AS SELECT CONVERT(my_char_30 USING koi8r), +CREATE VIEW v1 AS SELECT CONVERT(my_char_30 USING koi8r), my_char_30, id FROM t1_values; -SELECT CONVERT(my_char_30 USING koi8r), +SELECT CONVERT(my_char_30 USING koi8r), my_char_30, id FROM t1_values -WHERE select_id = 95 OR select_id IS NULL; +WHERE select_id = 99 OR select_id IS NULL order by id; CONVERT(my_char_30 USING koi8r) my_char_30 id NULL NULL 1 2 @@ -2253,7 +2299,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_char_30` using koi8r) AS `CONVERT(my_char_30 USING koi8r)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 95 OR select_id IS NULL); +WHERE select_id = 99 OR select_id IS NULL) order by id; CONVERT(my_char_30 USING koi8r) my_char_30 id NULL NULL 1 2 @@ -2263,11 +2309,11 @@ NULL NULL 1 DROP VIEW v1; -CREATE VIEW v1 AS SELECT CONVERT(my_varbinary_1000 USING utf8), +CREATE VIEW v1 AS SELECT CONVERT(my_varbinary_1000 USING utf8), my_varbinary_1000, id FROM t1_values; -SELECT CONVERT(my_varbinary_1000 USING utf8), +SELECT CONVERT(my_varbinary_1000 USING utf8), my_varbinary_1000, id FROM t1_values -WHERE select_id = 94 OR select_id IS NULL; +WHERE select_id = 98 OR select_id IS NULL order by id; CONVERT(my_varbinary_1000 USING utf8) my_varbinary_1000 id NULL NULL 1 2 @@ -2279,7 +2325,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varbinary_1000` using utf8) AS `CONVERT(my_varbinary_1000 USING utf8)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 94 OR select_id IS NULL); +WHERE select_id = 98 OR select_id IS NULL) order by id; CONVERT(my_varbinary_1000 USING utf8) my_varbinary_1000 id NULL NULL 1 2 @@ -2289,23 +2335,23 @@ NULL NULL 1 DROP VIEW v1; -CREATE VIEW v1 AS SELECT CONVERT(my_binary_30 USING utf8), +CREATE VIEW v1 AS SELECT CONVERT(my_binary_30 USING utf8), my_binary_30, id FROM t1_values; -SELECT CONVERT(my_binary_30 USING utf8), +SELECT CONVERT(my_binary_30 USING utf8), my_binary_30, id FROM t1_values -WHERE select_id = 93 OR select_id IS NULL; +WHERE select_id = 97 OR select_id IS NULL order by id; CONVERT(my_binary_30 USING utf8) my_binary_30 id NULL NULL 1 - + 2 <--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- --1 + ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 +-1 -1 5 SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_binary_30` using utf8) AS `CONVERT(my_binary_30 USING utf8)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 93 OR select_id IS NULL); +WHERE select_id = 97 OR select_id IS NULL) order by id; CONVERT(my_binary_30 USING utf8) my_binary_30 id NULL NULL 1 @@ -2315,11 +2361,11 @@ NULL NULL 1 DROP VIEW v1; -CREATE VIEW v1 AS SELECT CONVERT(my_varchar_1000 USING utf8), +CREATE VIEW v1 AS SELECT CONVERT(my_varchar_1000 USING utf8), my_varchar_1000, id FROM t1_values; -SELECT CONVERT(my_varchar_1000 USING utf8), +SELECT CONVERT(my_varchar_1000 USING utf8), my_varchar_1000, id FROM t1_values -WHERE select_id = 92 OR select_id IS NULL; +WHERE select_id = 96 OR select_id IS NULL order by id; CONVERT(my_varchar_1000 USING utf8) my_varchar_1000 id NULL NULL 1 2 @@ -2331,7 +2377,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varchar_1000` using utf8) AS `CONVERT(my_varchar_1000 USING utf8)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 92 OR select_id IS NULL); +WHERE select_id = 96 OR select_id IS NULL) order by id; CONVERT(my_varchar_1000 USING utf8) my_varchar_1000 id NULL NULL 1 2 @@ -2341,11 +2387,11 @@ NULL NULL 1 DROP VIEW v1; -CREATE VIEW v1 AS SELECT CONVERT(my_char_30 USING utf8), +CREATE VIEW v1 AS SELECT CONVERT(my_char_30 USING utf8), my_char_30, id FROM t1_values; -SELECT CONVERT(my_char_30 USING utf8), +SELECT CONVERT(my_char_30 USING utf8), my_char_30, id FROM t1_values -WHERE select_id = 91 OR select_id IS NULL; +WHERE select_id = 95 OR select_id IS NULL order by id; CONVERT(my_char_30 USING utf8) my_char_30 id NULL NULL 1 2 @@ -2357,7 +2403,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_char_30` using utf8) AS `CONVERT(my_char_30 USING utf8)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 91 OR select_id IS NULL); +WHERE select_id = 95 OR select_id IS NULL) order by id; CONVERT(my_char_30 USING utf8) my_char_30 id NULL NULL 1 2 @@ -2371,7 +2417,7 @@ CREATE VIEW v1 AS SELECT CAST(my_year AS UNSIGNED INTEGER), my_year, id FROM t1_values; SELECT CAST(my_year AS UNSIGNED INTEGER), my_year, id FROM t1_values -WHERE select_id = 90 OR select_id IS NULL; +WHERE select_id = 94 OR select_id IS NULL order by id; CAST(my_year AS UNSIGNED INTEGER) my_year id NULL NULL 1 1901 1901 2 @@ -2383,7 +2429,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as unsigned) AS `CAST(my_year AS UNSIGNED INTEGER)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 90 OR select_id IS NULL); +WHERE select_id = 94 OR select_id IS NULL) order by id; CAST(my_year AS UNSIGNED INTEGER) my_year id NULL NULL 1 1901 1901 2 @@ -2397,7 +2443,7 @@ CREATE VIEW v1 AS SELECT CAST(my_time AS UNSIGNED INTEGER), my_time, id FROM t1_values; SELECT CAST(my_time AS UNSIGNED INTEGER), my_time, id FROM t1_values -WHERE select_id = 89 OR select_id IS NULL; +WHERE select_id = 93 OR select_id IS NULL order by id; CAST(my_time AS UNSIGNED INTEGER) my_time id NULL NULL 1 18446744073701165657 -838:59:59 2 @@ -2409,7 +2455,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as unsigned) AS `CAST(my_time AS UNSIGNED INTEGER)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 89 OR select_id IS NULL); +WHERE select_id = 93 OR select_id IS NULL) order by id; CAST(my_time AS UNSIGNED INTEGER) my_time id NULL NULL 1 18446744073701165657 -838:59:59 2 @@ -2423,7 +2469,7 @@ CREATE VIEW v1 AS SELECT CAST(my_timestamp AS UNSIGNED INTEGER), my_timestamp, id FROM t1_values; SELECT CAST(my_timestamp AS UNSIGNED INTEGER), my_timestamp, id FROM t1_values -WHERE select_id = 88 OR select_id IS NULL; +WHERE select_id = 92 OR select_id IS NULL order by id; CAST(my_timestamp AS UNSIGNED INTEGER) my_timestamp id 0 0000-00-00 00:00:00 1 19700101030001 1970-01-01 03:00:01 2 @@ -2435,7 +2481,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as unsigned) AS `CAST(my_timestamp AS UNSIGNED INTEGER)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 88 OR select_id IS NULL); +WHERE select_id = 92 OR select_id IS NULL) order by id; CAST(my_timestamp AS UNSIGNED INTEGER) my_timestamp id 0 0000-00-00 00:00:00 1 19700101030001 1970-01-01 03:00:01 2 @@ -2449,7 +2495,7 @@ CREATE VIEW v1 AS SELECT CAST(my_date AS UNSIGNED INTEGER), my_date, id FROM t1_values; SELECT CAST(my_date AS UNSIGNED INTEGER), my_date, id FROM t1_values -WHERE select_id = 87 OR select_id IS NULL; +WHERE select_id = 91 OR select_id IS NULL order by id; CAST(my_date AS UNSIGNED INTEGER) my_date id NULL NULL 1 10101 0001-01-01 2 @@ -2461,7 +2507,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as unsigned) AS `CAST(my_date AS UNSIGNED INTEGER)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 87 OR select_id IS NULL); +WHERE select_id = 91 OR select_id IS NULL) order by id; CAST(my_date AS UNSIGNED INTEGER) my_date id NULL NULL 1 10101 0001-01-01 2 @@ -2475,7 +2521,7 @@ CREATE VIEW v1 AS SELECT CAST(my_datetime AS UNSIGNED INTEGER), my_datetime, id FROM t1_values; SELECT CAST(my_datetime AS UNSIGNED INTEGER), my_datetime, id FROM t1_values -WHERE select_id = 86 OR select_id IS NULL; +WHERE select_id = 90 OR select_id IS NULL order by id; CAST(my_datetime AS UNSIGNED INTEGER) my_datetime id NULL NULL 1 10101000000 0001-01-01 00:00:00 2 @@ -2487,7 +2533,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as unsigned) AS `CAST(my_datetime AS UNSIGNED INTEGER)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 86 OR select_id IS NULL); +WHERE select_id = 90 OR select_id IS NULL) order by id; CAST(my_datetime AS UNSIGNED INTEGER) my_datetime id NULL NULL 1 10101000000 0001-01-01 00:00:00 2 @@ -2497,11 +2543,43 @@ NULL NULL 1 DROP VIEW v1; +CREATE VIEW v1 AS SELECT CAST(my_double AS UNSIGNED INTEGER), +my_double, id FROM t1_values; +SELECT CAST(my_double AS UNSIGNED INTEGER), +my_double, id FROM t1_values +WHERE select_id = 89 OR select_id IS NULL order by id; +CAST(my_double AS UNSIGNED INTEGER) my_double id +NULL NULL 1 +9223372036854775808 -1.7976931348623e+308 2 +9223372036854775807 1.7976931348623e+308 3 +0 0 4 +18446744073709551615 -1 5 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' +Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' +SHOW CREATE VIEW v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as unsigned) AS `CAST(my_double AS UNSIGNED INTEGER)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +SELECT v1.* FROM v1 +WHERE v1.id IN (SELECT id FROM t1_values +WHERE select_id = 89 OR select_id IS NULL) order by id; +CAST(my_double AS UNSIGNED INTEGER) my_double id +NULL NULL 1 +9223372036854775808 -1.7976931348623e+308 2 +9223372036854775807 1.7976931348623e+308 3 +0 0 4 +18446744073709551615 -1 5 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' +Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' +DROP VIEW v1; + + CREATE VIEW v1 AS SELECT CAST(my_decimal AS UNSIGNED INTEGER), my_decimal, id FROM t1_values; SELECT CAST(my_decimal AS UNSIGNED INTEGER), my_decimal, id FROM t1_values -WHERE select_id = 85 OR select_id IS NULL; +WHERE select_id = 88 OR select_id IS NULL order by id; CAST(my_decimal AS UNSIGNED INTEGER) my_decimal id NULL NULL 1 0 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -2517,7 +2595,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as unsigned) AS `CAST(my_decimal AS UNSIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 85 OR select_id IS NULL); +WHERE select_id = 88 OR select_id IS NULL) order by id; CAST(my_decimal AS UNSIGNED INTEGER) my_decimal id NULL NULL 1 0 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -2535,7 +2613,7 @@ CREATE VIEW v1 AS SELECT CAST(my_bigint AS UNSIGNED INTEGER), my_bigint, id FROM t1_values; SELECT CAST(my_bigint AS UNSIGNED INTEGER), my_bigint, id FROM t1_values -WHERE select_id = 84 OR select_id IS NULL; +WHERE select_id = 87 OR select_id IS NULL order by id; CAST(my_bigint AS UNSIGNED INTEGER) my_bigint id NULL NULL 1 9223372036854775808 -9223372036854775808 2 @@ -2547,7 +2625,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as unsigned) AS `CAST(my_bigint AS UNSIGNED INTEGER)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 84 OR select_id IS NULL); +WHERE select_id = 87 OR select_id IS NULL) order by id; CAST(my_bigint AS UNSIGNED INTEGER) my_bigint id NULL NULL 1 9223372036854775808 -9223372036854775808 2 @@ -2561,7 +2639,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS UNSIGNED INTEGER), my_varbinary_1000, id FROM t1_values; SELECT CAST(my_varbinary_1000 AS UNSIGNED INTEGER), my_varbinary_1000, id FROM t1_values -WHERE select_id = 83 OR select_id IS NULL; +WHERE select_id = 86 OR select_id IS NULL order by id; CAST(my_varbinary_1000 AS UNSIGNED INTEGER) my_varbinary_1000 id NULL NULL 1 0 2 @@ -2578,7 +2656,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as unsigned) AS `CAST(my_varbinary_1000 AS UNSIGNED INTEGER)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 83 OR select_id IS NULL); +WHERE select_id = 86 OR select_id IS NULL) order by id; CAST(my_varbinary_1000 AS UNSIGNED INTEGER) my_varbinary_1000 id NULL NULL 1 0 2 @@ -2597,13 +2675,13 @@ CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS UNSIGNED INTEGER), my_binary_30, id FROM t1_values; SELECT CAST(my_binary_30 AS UNSIGNED INTEGER), my_binary_30, id FROM t1_values -WHERE select_id = 82 OR select_id IS NULL; +WHERE select_id = 85 OR select_id IS NULL order by id; CAST(my_binary_30 AS UNSIGNED INTEGER) my_binary_30 id NULL NULL 1 -0 +0 2 0 <--------30 characters-------> 3 -0 ---äÖüß@µ*$-- -18446744073709551615 -1 +0 ---äÖüß@µ*$-- 4 +18446744073709551615 -1 5 Warnings: Warning 1292 Truncated incorrect INTEGER value: '' Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->' @@ -2615,7 +2693,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as unsigned) AS `CAST(my_binary_30 AS UNSIGNED INTEGER)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 82 OR select_id IS NULL); +WHERE select_id = 85 OR select_id IS NULL) order by id; CAST(my_binary_30 AS UNSIGNED INTEGER) my_binary_30 id NULL NULL 1 0 @@ -2635,7 +2713,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS UNSIGNED INTEGER), my_varchar_1000, id FROM t1_values; SELECT CAST(my_varchar_1000 AS UNSIGNED INTEGER), my_varchar_1000, id FROM t1_values -WHERE select_id = 81 OR select_id IS NULL; +WHERE select_id = 84 OR select_id IS NULL order by id; CAST(my_varchar_1000 AS UNSIGNED INTEGER) my_varchar_1000 id NULL NULL 1 0 2 @@ -2652,7 +2730,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as unsigned) AS `CAST(my_varchar_1000 AS UNSIGNED INTEGER)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 81 OR select_id IS NULL); +WHERE select_id = 84 OR select_id IS NULL) order by id; CAST(my_varchar_1000 AS UNSIGNED INTEGER) my_varchar_1000 id NULL NULL 1 0 2 @@ -2671,7 +2749,7 @@ CREATE VIEW v1 AS SELECT CAST(my_char_30 AS UNSIGNED INTEGER), my_char_30, id FROM t1_values; SELECT CAST(my_char_30 AS UNSIGNED INTEGER), my_char_30, id FROM t1_values -WHERE select_id = 80 OR select_id IS NULL; +WHERE select_id = 83 OR select_id IS NULL order by id; CAST(my_char_30 AS UNSIGNED INTEGER) my_char_30 id NULL NULL 1 0 2 @@ -2688,7 +2766,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as unsigned) AS `CAST(my_char_30 AS UNSIGNED INTEGER)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 80 OR select_id IS NULL); +WHERE select_id = 83 OR select_id IS NULL) order by id; CAST(my_char_30 AS UNSIGNED INTEGER) my_char_30 id NULL NULL 1 0 2 @@ -2707,7 +2785,7 @@ CREATE VIEW v1 AS SELECT CAST(my_year AS SIGNED INTEGER), my_year, id FROM t1_values; SELECT CAST(my_year AS SIGNED INTEGER), my_year, id FROM t1_values -WHERE select_id = 79 OR select_id IS NULL; +WHERE select_id = 82 OR select_id IS NULL order by id; CAST(my_year AS SIGNED INTEGER) my_year id NULL NULL 1 1901 1901 2 @@ -2719,7 +2797,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as signed) AS `CAST(my_year AS SIGNED INTEGER)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 79 OR select_id IS NULL); +WHERE select_id = 82 OR select_id IS NULL) order by id; CAST(my_year AS SIGNED INTEGER) my_year id NULL NULL 1 1901 1901 2 @@ -2733,7 +2811,7 @@ CREATE VIEW v1 AS SELECT CAST(my_time AS SIGNED INTEGER), my_time, id FROM t1_values; SELECT CAST(my_time AS SIGNED INTEGER), my_time, id FROM t1_values -WHERE select_id = 78 OR select_id IS NULL; +WHERE select_id = 81 OR select_id IS NULL order by id; CAST(my_time AS SIGNED INTEGER) my_time id NULL NULL 1 -8385959 -838:59:59 2 @@ -2745,7 +2823,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as signed) AS `CAST(my_time AS SIGNED INTEGER)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 78 OR select_id IS NULL); +WHERE select_id = 81 OR select_id IS NULL) order by id; CAST(my_time AS SIGNED INTEGER) my_time id NULL NULL 1 -8385959 -838:59:59 2 @@ -2759,7 +2837,7 @@ CREATE VIEW v1 AS SELECT CAST(my_timestamp AS SIGNED INTEGER), my_timestamp, id FROM t1_values; SELECT CAST(my_timestamp AS SIGNED INTEGER), my_timestamp, id FROM t1_values -WHERE select_id = 77 OR select_id IS NULL; +WHERE select_id = 80 OR select_id IS NULL order by id; CAST(my_timestamp AS SIGNED INTEGER) my_timestamp id 0 0000-00-00 00:00:00 1 19700101030001 1970-01-01 03:00:01 2 @@ -2771,7 +2849,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as signed) AS `CAST(my_timestamp AS SIGNED INTEGER)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 77 OR select_id IS NULL); +WHERE select_id = 80 OR select_id IS NULL) order by id; CAST(my_timestamp AS SIGNED INTEGER) my_timestamp id 0 0000-00-00 00:00:00 1 19700101030001 1970-01-01 03:00:01 2 @@ -2785,7 +2863,7 @@ CREATE VIEW v1 AS SELECT CAST(my_date AS SIGNED INTEGER), my_date, id FROM t1_values; SELECT CAST(my_date AS SIGNED INTEGER), my_date, id FROM t1_values -WHERE select_id = 76 OR select_id IS NULL; +WHERE select_id = 79 OR select_id IS NULL order by id; CAST(my_date AS SIGNED INTEGER) my_date id NULL NULL 1 10101 0001-01-01 2 @@ -2797,7 +2875,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as signed) AS `CAST(my_date AS SIGNED INTEGER)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 76 OR select_id IS NULL); +WHERE select_id = 79 OR select_id IS NULL) order by id; CAST(my_date AS SIGNED INTEGER) my_date id NULL NULL 1 10101 0001-01-01 2 @@ -2811,7 +2889,7 @@ CREATE VIEW v1 AS SELECT CAST(my_datetime AS SIGNED INTEGER), my_datetime, id FROM t1_values; SELECT CAST(my_datetime AS SIGNED INTEGER), my_datetime, id FROM t1_values -WHERE select_id = 75 OR select_id IS NULL; +WHERE select_id = 78 OR select_id IS NULL order by id; CAST(my_datetime AS SIGNED INTEGER) my_datetime id NULL NULL 1 10101000000 0001-01-01 00:00:00 2 @@ -2823,7 +2901,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as signed) AS `CAST(my_datetime AS SIGNED INTEGER)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 75 OR select_id IS NULL); +WHERE select_id = 78 OR select_id IS NULL) order by id; CAST(my_datetime AS SIGNED INTEGER) my_datetime id NULL NULL 1 10101000000 0001-01-01 00:00:00 2 @@ -2833,11 +2911,43 @@ NULL NULL 1 DROP VIEW v1; +CREATE VIEW v1 AS SELECT CAST(my_double AS SIGNED INTEGER), +my_double, id FROM t1_values; +SELECT CAST(my_double AS SIGNED INTEGER), +my_double, id FROM t1_values +WHERE select_id = 77 OR select_id IS NULL order by id; +CAST(my_double AS SIGNED INTEGER) my_double id +NULL NULL 1 +-9223372036854775808 -1.7976931348623e+308 2 +9223372036854775807 1.7976931348623e+308 3 +0 0 4 +-1 -1 5 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' +Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' +SHOW CREATE VIEW v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as signed) AS `CAST(my_double AS SIGNED INTEGER)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +SELECT v1.* FROM v1 +WHERE v1.id IN (SELECT id FROM t1_values +WHERE select_id = 77 OR select_id IS NULL) order by id; +CAST(my_double AS SIGNED INTEGER) my_double id +NULL NULL 1 +-9223372036854775808 -1.7976931348623e+308 2 +9223372036854775807 1.7976931348623e+308 3 +0 0 4 +-1 -1 5 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' +Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' +DROP VIEW v1; + + CREATE VIEW v1 AS SELECT CAST(my_decimal AS SIGNED INTEGER), my_decimal, id FROM t1_values; SELECT CAST(my_decimal AS SIGNED INTEGER), my_decimal, id FROM t1_values -WHERE select_id = 74 OR select_id IS NULL; +WHERE select_id = 76 OR select_id IS NULL order by id; CAST(my_decimal AS SIGNED INTEGER) my_decimal id NULL NULL 1 -9223372036854775808 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -2852,7 +2962,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as signed) AS `CAST(my_decimal AS SIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 74 OR select_id IS NULL); +WHERE select_id = 76 OR select_id IS NULL) order by id; CAST(my_decimal AS SIGNED INTEGER) my_decimal id NULL NULL 1 -9223372036854775808 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -2869,7 +2979,7 @@ CREATE VIEW v1 AS SELECT CAST(my_bigint AS SIGNED INTEGER), my_bigint, id FROM t1_values; SELECT CAST(my_bigint AS SIGNED INTEGER), my_bigint, id FROM t1_values -WHERE select_id = 73 OR select_id IS NULL; +WHERE select_id = 75 OR select_id IS NULL order by id; CAST(my_bigint AS SIGNED INTEGER) my_bigint id NULL NULL 1 -9223372036854775808 -9223372036854775808 2 @@ -2881,7 +2991,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as signed) AS `CAST(my_bigint AS SIGNED INTEGER)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 73 OR select_id IS NULL); +WHERE select_id = 75 OR select_id IS NULL) order by id; CAST(my_bigint AS SIGNED INTEGER) my_bigint id NULL NULL 1 -9223372036854775808 -9223372036854775808 2 @@ -2895,7 +3005,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS SIGNED INTEGER), my_varbinary_1000, id FROM t1_values; SELECT CAST(my_varbinary_1000 AS SIGNED INTEGER), my_varbinary_1000, id FROM t1_values -WHERE select_id = 72 OR select_id IS NULL; +WHERE select_id = 74 OR select_id IS NULL order by id; CAST(my_varbinary_1000 AS SIGNED INTEGER) my_varbinary_1000 id NULL NULL 1 0 2 @@ -2911,7 +3021,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as signed) AS `CAST(my_varbinary_1000 AS SIGNED INTEGER)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 72 OR select_id IS NULL); +WHERE select_id = 74 OR select_id IS NULL) order by id; CAST(my_varbinary_1000 AS SIGNED INTEGER) my_varbinary_1000 id NULL NULL 1 0 2 @@ -2929,13 +3039,13 @@ CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS SIGNED INTEGER), my_binary_30, id FROM t1_values; SELECT CAST(my_binary_30 AS SIGNED INTEGER), my_binary_30, id FROM t1_values -WHERE select_id = 71 OR select_id IS NULL; +WHERE select_id = 73 OR select_id IS NULL order by id; CAST(my_binary_30 AS SIGNED INTEGER) my_binary_30 id NULL NULL 1 -0 +0 2 0 <--------30 characters-------> 3 -0 ---äÖüß@µ*$-- --1 -1 +0 ---äÖüß@µ*$-- 4 +-1 -1 5 Warnings: Warning 1292 Truncated incorrect INTEGER value: '' Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->' @@ -2946,7 +3056,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as signed) AS `CAST(my_binary_30 AS SIGNED INTEGER)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 71 OR select_id IS NULL); +WHERE select_id = 73 OR select_id IS NULL) order by id; CAST(my_binary_30 AS SIGNED INTEGER) my_binary_30 id NULL NULL 1 0 @@ -2965,7 +3075,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS SIGNED INTEGER), my_varchar_1000, id FROM t1_values; SELECT CAST(my_varchar_1000 AS SIGNED INTEGER), my_varchar_1000, id FROM t1_values -WHERE select_id = 70 OR select_id IS NULL; +WHERE select_id = 72 OR select_id IS NULL order by id; CAST(my_varchar_1000 AS SIGNED INTEGER) my_varchar_1000 id NULL NULL 1 0 2 @@ -2981,7 +3091,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as signed) AS `CAST(my_varchar_1000 AS SIGNED INTEGER)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 70 OR select_id IS NULL); +WHERE select_id = 72 OR select_id IS NULL) order by id; CAST(my_varchar_1000 AS SIGNED INTEGER) my_varchar_1000 id NULL NULL 1 0 2 @@ -2999,7 +3109,7 @@ CREATE VIEW v1 AS SELECT CAST(my_char_30 AS SIGNED INTEGER), my_char_30, id FROM t1_values; SELECT CAST(my_char_30 AS SIGNED INTEGER), my_char_30, id FROM t1_values -WHERE select_id = 69 OR select_id IS NULL; +WHERE select_id = 71 OR select_id IS NULL order by id; CAST(my_char_30 AS SIGNED INTEGER) my_char_30 id NULL NULL 1 0 2 @@ -3015,7 +3125,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as signed) AS `CAST(my_char_30 AS SIGNED INTEGER)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 69 OR select_id IS NULL); +WHERE select_id = 71 OR select_id IS NULL) order by id; CAST(my_char_30 AS SIGNED INTEGER) my_char_30 id NULL NULL 1 0 2 @@ -3033,7 +3143,7 @@ CREATE VIEW v1 AS SELECT CAST(my_year AS DECIMAL(37,2)), my_year, id FROM t1_values; SELECT CAST(my_year AS DECIMAL(37,2)), my_year, id FROM t1_values -WHERE select_id = 68 OR select_id IS NULL; +WHERE select_id = 70 OR select_id IS NULL order by id; CAST(my_year AS DECIMAL(37,2)) my_year id NULL NULL 1 1901.00 1901 2 @@ -3045,7 +3155,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as decimal(37,2)) AS `CAST(my_year AS DECIMAL(37,2))`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 68 OR select_id IS NULL); +WHERE select_id = 70 OR select_id IS NULL) order by id; CAST(my_year AS DECIMAL(37,2)) my_year id NULL NULL 1 1901.00 1901 2 @@ -3059,7 +3169,7 @@ CREATE VIEW v1 AS SELECT CAST(my_time AS DECIMAL(37,2)), my_time, id FROM t1_values; SELECT CAST(my_time AS DECIMAL(37,2)), my_time, id FROM t1_values -WHERE select_id = 67 OR select_id IS NULL; +WHERE select_id = 69 OR select_id IS NULL order by id; CAST(my_time AS DECIMAL(37,2)) my_time id NULL NULL 1 -8385959.00 -838:59:59 2 @@ -3071,7 +3181,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as decimal(37,2)) AS `CAST(my_time AS DECIMAL(37,2))`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 67 OR select_id IS NULL); +WHERE select_id = 69 OR select_id IS NULL) order by id; CAST(my_time AS DECIMAL(37,2)) my_time id NULL NULL 1 -8385959.00 -838:59:59 2 @@ -3085,7 +3195,7 @@ CREATE VIEW v1 AS SELECT CAST(my_timestamp AS DECIMAL(37,2)), my_timestamp, id FROM t1_values; SELECT CAST(my_timestamp AS DECIMAL(37,2)), my_timestamp, id FROM t1_values -WHERE select_id = 66 OR select_id IS NULL; +WHERE select_id = 68 OR select_id IS NULL order by id; CAST(my_timestamp AS DECIMAL(37,2)) my_timestamp id 0.00 0000-00-00 00:00:00 1 19700101030001.00 1970-01-01 03:00:01 2 @@ -3097,7 +3207,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as decimal(37,2)) AS `CAST(my_timestamp AS DECIMAL(37,2))`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 66 OR select_id IS NULL); +WHERE select_id = 68 OR select_id IS NULL) order by id; CAST(my_timestamp AS DECIMAL(37,2)) my_timestamp id 0.00 0000-00-00 00:00:00 1 19700101030001.00 1970-01-01 03:00:01 2 @@ -3111,7 +3221,7 @@ CREATE VIEW v1 AS SELECT CAST(my_date AS DECIMAL(37,2)), my_date, id FROM t1_values; SELECT CAST(my_date AS DECIMAL(37,2)), my_date, id FROM t1_values -WHERE select_id = 65 OR select_id IS NULL; +WHERE select_id = 67 OR select_id IS NULL order by id; CAST(my_date AS DECIMAL(37,2)) my_date id NULL NULL 1 10101.00 0001-01-01 2 @@ -3123,7 +3233,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as decimal(37,2)) AS `CAST(my_date AS DECIMAL(37,2))`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 65 OR select_id IS NULL); +WHERE select_id = 67 OR select_id IS NULL) order by id; CAST(my_date AS DECIMAL(37,2)) my_date id NULL NULL 1 10101.00 0001-01-01 2 @@ -3137,7 +3247,7 @@ CREATE VIEW v1 AS SELECT CAST(my_datetime AS DECIMAL(37,2)), my_datetime, id FROM t1_values; SELECT CAST(my_datetime AS DECIMAL(37,2)), my_datetime, id FROM t1_values -WHERE select_id = 64 OR select_id IS NULL; +WHERE select_id = 66 OR select_id IS NULL order by id; CAST(my_datetime AS DECIMAL(37,2)) my_datetime id NULL NULL 1 10101000000.00 0001-01-01 00:00:00 2 @@ -3149,7 +3259,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as decimal(37,2)) AS `CAST(my_datetime AS DECIMAL(37,2))`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 64 OR select_id IS NULL); +WHERE select_id = 66 OR select_id IS NULL) order by id; CAST(my_datetime AS DECIMAL(37,2)) my_datetime id NULL NULL 1 10101000000.00 0001-01-01 00:00:00 2 @@ -3159,11 +3269,49 @@ NULL NULL 1 DROP VIEW v1; +CREATE VIEW v1 AS SELECT CAST(my_double AS DECIMAL(37,2)), +my_double, id FROM t1_values; +SELECT CAST(my_double AS DECIMAL(37,2)), +my_double, id FROM t1_values +WHERE select_id = 65 OR select_id IS NULL order by id; +CAST(my_double AS DECIMAL(37,2)) my_double id +NULL NULL 1 +-99999999999999999999999999999999999.99 -1.7976931348623e+308 2 +99999999999999999999999999999999999.99 1.7976931348623e+308 3 +0.00 0 4 +-1.00 -1 5 +-3333.33 -3333.3333 30 +Warnings: +Error 1292 Truncated incorrect DECIMAL value: '' +Error 1264 Out of range value adjusted for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Error 1292 Truncated incorrect DECIMAL value: '' +Error 1264 Out of range value adjusted for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +SHOW CREATE VIEW v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as decimal(37,2)) AS `CAST(my_double AS DECIMAL(37,2))`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +SELECT v1.* FROM v1 +WHERE v1.id IN (SELECT id FROM t1_values +WHERE select_id = 65 OR select_id IS NULL) order by id; +CAST(my_double AS DECIMAL(37,2)) my_double id +NULL NULL 1 +-99999999999999999999999999999999999.99 -1.7976931348623e+308 2 +99999999999999999999999999999999999.99 1.7976931348623e+308 3 +0.00 0 4 +-1.00 -1 5 +-3333.33 -3333.3333 30 +Warnings: +Error 1292 Truncated incorrect DECIMAL value: '' +Error 1264 Out of range value adjusted for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Error 1292 Truncated incorrect DECIMAL value: '' +Error 1264 Out of range value adjusted for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +DROP VIEW v1; + + CREATE VIEW v1 AS SELECT CAST(my_decimal AS DECIMAL(37,2)), my_decimal, id FROM t1_values; SELECT CAST(my_decimal AS DECIMAL(37,2)), my_decimal, id FROM t1_values -WHERE select_id = 63 OR select_id IS NULL; +WHERE select_id = 64 OR select_id IS NULL order by id; CAST(my_decimal AS DECIMAL(37,2)) my_decimal id NULL NULL 1 -10000000000000000000000000000000000.00 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -3175,7 +3323,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as decimal(37,2)) AS `CAST(my_decimal AS DECIMAL(37,2))`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 63 OR select_id IS NULL); +WHERE select_id = 64 OR select_id IS NULL) order by id; CAST(my_decimal AS DECIMAL(37,2)) my_decimal id NULL NULL 1 -10000000000000000000000000000000000.00 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -3189,7 +3337,7 @@ CREATE VIEW v1 AS SELECT CAST(my_bigint AS DECIMAL(37,2)), my_bigint, id FROM t1_values; SELECT CAST(my_bigint AS DECIMAL(37,2)), my_bigint, id FROM t1_values -WHERE select_id = 62 OR select_id IS NULL; +WHERE select_id = 63 OR select_id IS NULL order by id; CAST(my_bigint AS DECIMAL(37,2)) my_bigint id NULL NULL 1 -9223372036854775808.00 -9223372036854775808 2 @@ -3201,7 +3349,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as decimal(37,2)) AS `CAST(my_bigint AS DECIMAL(37,2))`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 62 OR select_id IS NULL); +WHERE select_id = 63 OR select_id IS NULL) order by id; CAST(my_bigint AS DECIMAL(37,2)) my_bigint id NULL NULL 1 -9223372036854775808.00 -9223372036854775808 2 @@ -3215,14 +3363,14 @@ CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS DECIMAL(37,2)), my_varbinary_1000, id FROM t1_values; SELECT CAST(my_varbinary_1000 AS DECIMAL(37,2)), my_varbinary_1000, id FROM t1_values -WHERE select_id = 61 OR select_id IS NULL; +WHERE select_id = 62 OR select_id IS NULL order by id; CAST(my_varbinary_1000 AS DECIMAL(37,2)) my_varbinary_1000 id NULL NULL 1 0.00 2 0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 0.00 ---äÖüß@µ*$-- 4 -1.00 -1 5 --3333.33 -3333.3333 28 +-3333.33 -3333.3333 29 Warnings: Error 1366 Incorrect decimal value: '' for column '' at row -1 Error 1366 Incorrect decimal value: '' for column '' at row -1 @@ -3232,14 +3380,14 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as decimal(37,2)) AS `CAST(my_varbinary_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 61 OR select_id IS NULL); +WHERE select_id = 62 OR select_id IS NULL) order by id; CAST(my_varbinary_1000 AS DECIMAL(37,2)) my_varbinary_1000 id NULL NULL 1 0.00 2 0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 0.00 ---äÖüß@µ*$-- 4 -1.00 -1 5 --3333.33 -3333.3333 28 +-3333.33 -3333.3333 29 Warnings: Error 1366 Incorrect decimal value: '' for column '' at row -1 Error 1366 Incorrect decimal value: '' for column '' at row -1 @@ -3251,14 +3399,14 @@ CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS DECIMAL(37,2)), my_binary_30, id FROM t1_values; SELECT CAST(my_binary_30 AS DECIMAL(37,2)), my_binary_30, id FROM t1_values -WHERE select_id = 60 OR select_id IS NULL; +WHERE select_id = 61 OR select_id IS NULL order by id; CAST(my_binary_30 AS DECIMAL(37,2)) my_binary_30 id NULL NULL 1 -0.00 +0.00 2 0.00 <--------30 characters-------> 3 -0.00 ---äÖüß@µ*$-- --1.00 -1 --3333.33 -3333.3333 +0.00 ---äÖüß@µ*$-- 4 +-1.00 -1 5 +-3333.33 -3333.3333 28 Warnings: Error 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '' @@ -3273,14 +3421,14 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as decimal(37,2)) AS `CAST(my_binary_30 AS DECIMAL(37,2))`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 60 OR select_id IS NULL); +WHERE select_id = 61 OR select_id IS NULL) order by id; CAST(my_binary_30 AS DECIMAL(37,2)) my_binary_30 id NULL NULL 1 0.00 0.00 <--------30 characters-------> 3 0.00 ---äÖüß@µ*$-- -1.00 -1 --3333.33 -3333.3333 +-3333.33 -3333.3333 Warnings: Error 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '' @@ -3297,14 +3445,14 @@ CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS DECIMAL(37,2)), my_varchar_1000, id FROM t1_values; SELECT CAST(my_varchar_1000 AS DECIMAL(37,2)), my_varchar_1000, id FROM t1_values -WHERE select_id = 59 OR select_id IS NULL; +WHERE select_id = 60 OR select_id IS NULL order by id; CAST(my_varchar_1000 AS DECIMAL(37,2)) my_varchar_1000 id NULL NULL 1 0.00 2 0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 0.00 ---äÖüß@µ*$-- 4 -1.00 -1 5 --3333.33 -3333.3333 26 +-3333.33 -3333.3333 27 Warnings: Error 1366 Incorrect decimal value: '' for column '' at row -1 Error 1366 Incorrect decimal value: '' for column '' at row -1 @@ -3314,14 +3462,14 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as decimal(37,2)) AS `CAST(my_varchar_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 59 OR select_id IS NULL); +WHERE select_id = 60 OR select_id IS NULL) order by id; CAST(my_varchar_1000 AS DECIMAL(37,2)) my_varchar_1000 id NULL NULL 1 0.00 2 0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 0.00 ---äÖüß@µ*$-- 4 -1.00 -1 5 --3333.33 -3333.3333 26 +-3333.33 -3333.3333 27 Warnings: Error 1366 Incorrect decimal value: '' for column '' at row -1 Error 1366 Incorrect decimal value: '' for column '' at row -1 @@ -3333,14 +3481,14 @@ CREATE VIEW v1 AS SELECT CAST(my_char_30 AS DECIMAL(37,2)), my_char_30, id FROM t1_values; SELECT CAST(my_char_30 AS DECIMAL(37,2)), my_char_30, id FROM t1_values -WHERE select_id = 58 OR select_id IS NULL; +WHERE select_id = 59 OR select_id IS NULL order by id; CAST(my_char_30 AS DECIMAL(37,2)) my_char_30 id NULL NULL 1 0.00 2 0.00 <--------30 characters-------> 3 0.00 ---äÖüß@µ*$-- 4 -1.00 -1 5 --3333.33 -3333.3333 25 +-3333.33 -3333.3333 26 Warnings: Error 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ' @@ -3353,14 +3501,14 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as decimal(37,2)) AS `CAST(my_char_30 AS DECIMAL(37,2))`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 58 OR select_id IS NULL); +WHERE select_id = 59 OR select_id IS NULL) order by id; CAST(my_char_30 AS DECIMAL(37,2)) my_char_30 id NULL NULL 1 0.00 2 0.00 <--------30 characters-------> 3 0.00 ---äÖüß@µ*$-- 4 -1.00 -1 5 --3333.33 -3333.3333 25 +-3333.33 -3333.3333 26 Warnings: Error 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ' @@ -3375,7 +3523,7 @@ CREATE VIEW v1 AS SELECT CAST(my_year AS TIME), my_year, id FROM t1_values; SELECT CAST(my_year AS TIME), my_year, id FROM t1_values -WHERE select_id = 57 OR select_id IS NULL; +WHERE select_id = 58 OR select_id IS NULL order by id; CAST(my_year AS TIME) my_year id NULL NULL 1 00:19:01 1901 2 @@ -3387,7 +3535,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as time) AS `CAST(my_year AS TIME)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 57 OR select_id IS NULL); +WHERE select_id = 58 OR select_id IS NULL) order by id; CAST(my_year AS TIME) my_year id NULL NULL 1 00:19:01 1901 2 @@ -3401,7 +3549,7 @@ CREATE VIEW v1 AS SELECT CAST(my_time AS TIME), my_time, id FROM t1_values; SELECT CAST(my_time AS TIME), my_time, id FROM t1_values -WHERE select_id = 56 OR select_id IS NULL; +WHERE select_id = 57 OR select_id IS NULL order by id; CAST(my_time AS TIME) my_time id NULL NULL 1 -838:59:59 -838:59:59 2 @@ -3413,7 +3561,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as time) AS `CAST(my_time AS TIME)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 56 OR select_id IS NULL); +WHERE select_id = 57 OR select_id IS NULL) order by id; CAST(my_time AS TIME) my_time id NULL NULL 1 -838:59:59 -838:59:59 2 @@ -3427,7 +3575,7 @@ CREATE VIEW v1 AS SELECT CAST(my_timestamp AS TIME), my_timestamp, id FROM t1_values; SELECT CAST(my_timestamp AS TIME), my_timestamp, id FROM t1_values -WHERE select_id = 55 OR select_id IS NULL; +WHERE select_id = 56 OR select_id IS NULL order by id; CAST(my_timestamp AS TIME) my_timestamp id 00:00:00 0000-00-00 00:00:00 1 03:00:01 1970-01-01 03:00:01 2 @@ -3439,7 +3587,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as time) AS `CAST(my_timestamp AS TIME)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 55 OR select_id IS NULL); +WHERE select_id = 56 OR select_id IS NULL) order by id; CAST(my_timestamp AS TIME) my_timestamp id 00:00:00 0000-00-00 00:00:00 1 03:00:01 1970-01-01 03:00:01 2 @@ -3453,7 +3601,7 @@ CREATE VIEW v1 AS SELECT CAST(my_date AS TIME), my_date, id FROM t1_values; SELECT CAST(my_date AS TIME), my_date, id FROM t1_values -WHERE select_id = 54 OR select_id IS NULL; +WHERE select_id = 55 OR select_id IS NULL order by id; CAST(my_date AS TIME) my_date id NULL NULL 1 00:00:00 0001-01-01 2 @@ -3465,7 +3613,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as time) AS `CAST(my_date AS TIME)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 54 OR select_id IS NULL); +WHERE select_id = 55 OR select_id IS NULL) order by id; CAST(my_date AS TIME) my_date id NULL NULL 1 00:00:00 0001-01-01 2 @@ -3479,7 +3627,7 @@ CREATE VIEW v1 AS SELECT CAST(my_datetime AS TIME), my_datetime, id FROM t1_values; SELECT CAST(my_datetime AS TIME), my_datetime, id FROM t1_values -WHERE select_id = 53 OR select_id IS NULL; +WHERE select_id = 54 OR select_id IS NULL order by id; CAST(my_datetime AS TIME) my_datetime id NULL NULL 1 00:00:00 0001-01-01 00:00:00 2 @@ -3491,7 +3639,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as time) AS `CAST(my_datetime AS TIME)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 53 OR select_id IS NULL); +WHERE select_id = 54 OR select_id IS NULL) order by id; CAST(my_datetime AS TIME) my_datetime id NULL NULL 1 00:00:00 0001-01-01 00:00:00 2 @@ -3501,11 +3649,45 @@ NULL NULL 1 DROP VIEW v1; +CREATE VIEW v1 AS SELECT CAST(my_double AS TIME), +my_double, id FROM t1_values; +SELECT CAST(my_double AS TIME), +my_double, id FROM t1_values +WHERE select_id = 53 OR select_id IS NULL order by id; +CAST(my_double AS TIME) my_double id +NULL NULL 1 +NULL -1.7976931348623e+308 2 +NULL 1.7976931348623e+308 3 +00:00:00 0 4 +-00:00:01 -1 5 +00:17:58 1758 25 +Warnings: +Warning 1292 Truncated incorrect time value: '-1.7976931348623e+308' +Warning 1292 Truncated incorrect time value: '1.7976931348623e+308' +SHOW CREATE VIEW v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as time) AS `CAST(my_double AS TIME)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +SELECT v1.* FROM v1 +WHERE v1.id IN (SELECT id FROM t1_values +WHERE select_id = 53 OR select_id IS NULL) order by id; +CAST(my_double AS TIME) my_double id +NULL NULL 1 +NULL -1.7976931348623e+308 2 +NULL 1.7976931348623e+308 3 +00:00:00 0 4 +-00:00:01 -1 5 +00:17:58 1758 25 +Warnings: +Warning 1292 Truncated incorrect time value: '-1.7976931348623e+308' +Warning 1292 Truncated incorrect time value: '1.7976931348623e+308' +DROP VIEW v1; + + CREATE VIEW v1 AS SELECT CAST(my_bigint AS TIME), my_bigint, id FROM t1_values; SELECT CAST(my_bigint AS TIME), my_bigint, id FROM t1_values -WHERE select_id = 52 OR select_id IS NULL; +WHERE select_id = 52 OR select_id IS NULL order by id; CAST(my_bigint AS TIME) my_bigint id NULL NULL 1 NULL -9223372036854775808 2 @@ -3521,7 +3703,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as time) AS `CAST(my_bigint AS TIME)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 52 OR select_id IS NULL); +WHERE select_id = 52 OR select_id IS NULL) order by id; CAST(my_bigint AS TIME) my_bigint id NULL NULL 1 NULL -9223372036854775808 2 @@ -3539,7 +3721,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS TIME), my_varbinary_1000, id FROM t1_values; SELECT CAST(my_varbinary_1000 AS TIME), my_varbinary_1000, id FROM t1_values -WHERE select_id = 51 OR select_id IS NULL; +WHERE select_id = 51 OR select_id IS NULL order by id; CAST(my_varbinary_1000 AS TIME) my_varbinary_1000 id NULL NULL 1 NULL 2 @@ -3556,7 +3738,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as time) AS `CAST(my_varbinary_1000 AS TIME)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 51 OR select_id IS NULL); +WHERE select_id = 51 OR select_id IS NULL) order by id; CAST(my_varbinary_1000 AS TIME) my_varbinary_1000 id NULL NULL 1 NULL 2 @@ -3575,14 +3757,14 @@ CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS TIME), my_binary_30, id FROM t1_values; SELECT CAST(my_binary_30 AS TIME), my_binary_30, id FROM t1_values -WHERE select_id = 50 OR select_id IS NULL; +WHERE select_id = 50 OR select_id IS NULL order by id; CAST(my_binary_30 AS TIME) my_binary_30 id NULL NULL 1 -00:00:00 +00:00:00 2 00:00:00 <--------30 characters-------> 3 --00:00:00 ---äÖüß@µ*$-- -NULL -1 -41:58:00 1 17:58 +-00:00:00 ---äÖüß@µ*$-- 4 +NULL -1 5 +41:58:00 1 17:58 22 Warnings: Warning 1292 Truncated incorrect time value: '' Warning 1292 Truncated incorrect time value: '<--------30 characters------->' @@ -3594,7 +3776,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as time) AS `CAST(my_binary_30 AS TIME)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 50 OR select_id IS NULL); +WHERE select_id = 50 OR select_id IS NULL) order by id; CAST(my_binary_30 AS TIME) my_binary_30 id NULL NULL 1 00:00:00 @@ -3615,7 +3797,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS TIME), my_varchar_1000, id FROM t1_values; SELECT CAST(my_varchar_1000 AS TIME), my_varchar_1000, id FROM t1_values -WHERE select_id = 49 OR select_id IS NULL; +WHERE select_id = 49 OR select_id IS NULL order by id; CAST(my_varchar_1000 AS TIME) my_varchar_1000 id NULL NULL 1 NULL 2 @@ -3632,7 +3814,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as time) AS `CAST(my_varchar_1000 AS TIME)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 49 OR select_id IS NULL); +WHERE select_id = 49 OR select_id IS NULL) order by id; CAST(my_varchar_1000 AS TIME) my_varchar_1000 id NULL NULL 1 NULL 2 @@ -3651,7 +3833,7 @@ CREATE VIEW v1 AS SELECT CAST(my_char_30 AS TIME), my_char_30, id FROM t1_values; SELECT CAST(my_char_30 AS TIME), my_char_30, id FROM t1_values -WHERE select_id = 48 OR select_id IS NULL; +WHERE select_id = 48 OR select_id IS NULL order by id; CAST(my_char_30 AS TIME) my_char_30 id NULL NULL 1 NULL 2 @@ -3668,7 +3850,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as time) AS `CAST(my_char_30 AS TIME)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 48 OR select_id IS NULL); +WHERE select_id = 48 OR select_id IS NULL) order by id; CAST(my_char_30 AS TIME) my_char_30 id NULL NULL 1 NULL 2 @@ -3687,7 +3869,7 @@ CREATE VIEW v1 AS SELECT CAST(my_year AS DATETIME), my_year, id FROM t1_values; SELECT CAST(my_year AS DATETIME), my_year, id FROM t1_values -WHERE select_id = 47 OR select_id IS NULL; +WHERE select_id = 47 OR select_id IS NULL order by id; CAST(my_year AS DATETIME) my_year id NULL NULL 1 NULL 1901 2 @@ -3704,7 +3886,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as datetime) AS `CAST(my_year AS DATETIME)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 47 OR select_id IS NULL); +WHERE select_id = 47 OR select_id IS NULL) order by id; CAST(my_year AS DATETIME) my_year id NULL NULL 1 NULL 1901 2 @@ -3723,7 +3905,7 @@ CREATE VIEW v1 AS SELECT CAST(my_time AS DATETIME), my_time, id FROM t1_values; SELECT CAST(my_time AS DATETIME), my_time, id FROM t1_values -WHERE select_id = 46 OR select_id IS NULL; +WHERE select_id = 46 OR select_id IS NULL order by id; CAST(my_time AS DATETIME) my_time id NULL NULL 1 0000-00-00 00:00:00 -838:59:59 2 @@ -3738,7 +3920,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as datetime) AS `CAST(my_time AS DATETIME)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 46 OR select_id IS NULL); +WHERE select_id = 46 OR select_id IS NULL) order by id; CAST(my_time AS DATETIME) my_time id NULL NULL 1 0000-00-00 00:00:00 -838:59:59 2 @@ -3755,7 +3937,7 @@ CREATE VIEW v1 AS SELECT CAST(my_timestamp AS DATETIME), my_timestamp, id FROM t1_values; SELECT CAST(my_timestamp AS DATETIME), my_timestamp, id FROM t1_values -WHERE select_id = 45 OR select_id IS NULL; +WHERE select_id = 45 OR select_id IS NULL order by id; CAST(my_timestamp AS DATETIME) my_timestamp id 0000-00-00 00:00:00 0000-00-00 00:00:00 1 1970-01-01 03:00:01 1970-01-01 03:00:01 2 @@ -3767,7 +3949,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as datetime) AS `CAST(my_timestamp AS DATETIME)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 45 OR select_id IS NULL); +WHERE select_id = 45 OR select_id IS NULL) order by id; CAST(my_timestamp AS DATETIME) my_timestamp id 0000-00-00 00:00:00 0000-00-00 00:00:00 1 1970-01-01 03:00:01 1970-01-01 03:00:01 2 @@ -3781,7 +3963,7 @@ CREATE VIEW v1 AS SELECT CAST(my_date AS DATETIME), my_date, id FROM t1_values; SELECT CAST(my_date AS DATETIME), my_date, id FROM t1_values -WHERE select_id = 44 OR select_id IS NULL; +WHERE select_id = 44 OR select_id IS NULL order by id; CAST(my_date AS DATETIME) my_date id NULL NULL 1 0001-01-01 00:00:00 0001-01-01 2 @@ -3793,7 +3975,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as datetime) AS `CAST(my_date AS DATETIME)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 44 OR select_id IS NULL); +WHERE select_id = 44 OR select_id IS NULL) order by id; CAST(my_date AS DATETIME) my_date id NULL NULL 1 0001-01-01 00:00:00 0001-01-01 2 @@ -3807,7 +3989,7 @@ CREATE VIEW v1 AS SELECT CAST(my_datetime AS DATETIME), my_datetime, id FROM t1_values; SELECT CAST(my_datetime AS DATETIME), my_datetime, id FROM t1_values -WHERE select_id = 43 OR select_id IS NULL; +WHERE select_id = 43 OR select_id IS NULL order by id; CAST(my_datetime AS DATETIME) my_datetime id NULL NULL 1 0001-01-01 00:00:00 0001-01-01 00:00:00 2 @@ -3819,7 +4001,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as datetime) AS `CAST(my_datetime AS DATETIME)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 43 OR select_id IS NULL); +WHERE select_id = 43 OR select_id IS NULL) order by id; CAST(my_datetime AS DATETIME) my_datetime id NULL NULL 1 0001-01-01 00:00:00 0001-01-01 00:00:00 2 @@ -3833,7 +4015,7 @@ CREATE VIEW v1 AS SELECT CAST(my_double AS DATETIME), my_double, id FROM t1_values; SELECT CAST(my_double AS DATETIME), my_double, id FROM t1_values -WHERE select_id = 42 OR select_id IS NULL; +WHERE select_id = 42 OR select_id IS NULL order by id; CAST(my_double AS DATETIME) my_double id NULL NULL 1 NULL -1.7976931348623e+308 2 @@ -3852,7 +4034,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as datetime) AS `CAST(my_double AS DATETIME)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 42 OR select_id IS NULL); +WHERE select_id = 42 OR select_id IS NULL) order by id; CAST(my_double AS DATETIME) my_double id NULL NULL 1 NULL -1.7976931348623e+308 2 @@ -3873,7 +4055,7 @@ CREATE VIEW v1 AS SELECT CAST(my_bigint AS DATETIME), my_bigint, id FROM t1_values; SELECT CAST(my_bigint AS DATETIME), my_bigint, id FROM t1_values -WHERE select_id = 41 OR select_id IS NULL; +WHERE select_id = 41 OR select_id IS NULL order by id; CAST(my_bigint AS DATETIME) my_bigint id NULL NULL 1 NULL -9223372036854775808 2 @@ -3892,7 +4074,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as datetime) AS `CAST(my_bigint AS DATETIME)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 41 OR select_id IS NULL); +WHERE select_id = 41 OR select_id IS NULL) order by id; CAST(my_bigint AS DATETIME) my_bigint id NULL NULL 1 NULL -9223372036854775808 2 @@ -3913,7 +4095,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS DATETIME), my_varbinary_1000, id FROM t1_values; SELECT CAST(my_varbinary_1000 AS DATETIME), my_varbinary_1000, id FROM t1_values -WHERE select_id = 40 OR select_id IS NULL; +WHERE select_id = 40 OR select_id IS NULL order by id; CAST(my_varbinary_1000 AS DATETIME) my_varbinary_1000 id NULL NULL 1 NULL 2 @@ -3931,7 +4113,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as datetime) AS `CAST(my_varbinary_1000 AS DATETIME)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 40 OR select_id IS NULL); +WHERE select_id = 40 OR select_id IS NULL) order by id; CAST(my_varbinary_1000 AS DATETIME) my_varbinary_1000 id NULL NULL 1 NULL 2 @@ -3951,14 +4133,14 @@ CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS DATETIME), my_binary_30, id FROM t1_values; SELECT CAST(my_binary_30 AS DATETIME), my_binary_30, id FROM t1_values -WHERE select_id = 39 OR select_id IS NULL; +WHERE select_id = 39 OR select_id IS NULL order by id; CAST(my_binary_30 AS DATETIME) my_binary_30 id NULL NULL 1 -NULL +NULL 2 NULL <--------30 characters-------> 3 -NULL ---äÖüß@µ*$-- -NULL -1 -2005-06-27 17:58:00 2005-06-27 17:58 +NULL ---äÖüß@µ*$-- 4 +NULL -1 5 +2005-06-27 17:58:00 2005-06-27 17:58 16 Warnings: Warning 1292 Truncated incorrect datetime value: '' Warning 1292 Truncated incorrect datetime value: '<--------30 characters------->' @@ -3970,7 +4152,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as datetime) AS `CAST(my_binary_30 AS DATETIME)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 39 OR select_id IS NULL); +WHERE select_id = 39 OR select_id IS NULL) order by id; CAST(my_binary_30 AS DATETIME) my_binary_30 id NULL NULL 1 NULL @@ -3991,7 +4173,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS DATETIME), my_varchar_1000, id FROM t1_values; SELECT CAST(my_varchar_1000 AS DATETIME), my_varchar_1000, id FROM t1_values -WHERE select_id = 38 OR select_id IS NULL; +WHERE select_id = 38 OR select_id IS NULL order by id; CAST(my_varchar_1000 AS DATETIME) my_varchar_1000 id NULL NULL 1 NULL 2 @@ -4009,7 +4191,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as datetime) AS `CAST(my_varchar_1000 AS DATETIME)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 38 OR select_id IS NULL); +WHERE select_id = 38 OR select_id IS NULL) order by id; CAST(my_varchar_1000 AS DATETIME) my_varchar_1000 id NULL NULL 1 NULL 2 @@ -4029,7 +4211,7 @@ CREATE VIEW v1 AS SELECT CAST(my_char_30 AS DATETIME), my_char_30, id FROM t1_values; SELECT CAST(my_char_30 AS DATETIME), my_char_30, id FROM t1_values -WHERE select_id = 37 OR select_id IS NULL; +WHERE select_id = 37 OR select_id IS NULL order by id; CAST(my_char_30 AS DATETIME) my_char_30 id NULL NULL 1 NULL 2 @@ -4047,7 +4229,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as datetime) AS `CAST(my_char_30 AS DATETIME)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 37 OR select_id IS NULL); +WHERE select_id = 37 OR select_id IS NULL) order by id; CAST(my_char_30 AS DATETIME) my_char_30 id NULL NULL 1 NULL 2 @@ -4067,7 +4249,7 @@ CREATE VIEW v1 AS SELECT CAST(my_year AS DATE), my_year, id FROM t1_values; SELECT CAST(my_year AS DATE), my_year, id FROM t1_values -WHERE select_id = 36 OR select_id IS NULL; +WHERE select_id = 36 OR select_id IS NULL order by id; CAST(my_year AS DATE) my_year id NULL NULL 1 NULL 1901 2 @@ -4084,7 +4266,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as date) AS `CAST(my_year AS DATE)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 36 OR select_id IS NULL); +WHERE select_id = 36 OR select_id IS NULL) order by id; CAST(my_year AS DATE) my_year id NULL NULL 1 NULL 1901 2 @@ -4103,7 +4285,7 @@ CREATE VIEW v1 AS SELECT CAST(my_time AS DATE), my_time, id FROM t1_values; SELECT CAST(my_time AS DATE), my_time, id FROM t1_values -WHERE select_id = 35 OR select_id IS NULL; +WHERE select_id = 35 OR select_id IS NULL order by id; CAST(my_time AS DATE) my_time id NULL NULL 1 0000-00-00 -838:59:59 2 @@ -4115,7 +4297,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as date) AS `CAST(my_time AS DATE)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 35 OR select_id IS NULL); +WHERE select_id = 35 OR select_id IS NULL) order by id; CAST(my_time AS DATE) my_time id NULL NULL 1 0000-00-00 -838:59:59 2 @@ -4129,7 +4311,7 @@ CREATE VIEW v1 AS SELECT CAST(my_timestamp AS DATE), my_timestamp, id FROM t1_values; SELECT CAST(my_timestamp AS DATE), my_timestamp, id FROM t1_values -WHERE select_id = 34 OR select_id IS NULL; +WHERE select_id = 34 OR select_id IS NULL order by id; CAST(my_timestamp AS DATE) my_timestamp id 0000-00-00 0000-00-00 00:00:00 1 1970-01-01 1970-01-01 03:00:01 2 @@ -4141,7 +4323,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as date) AS `CAST(my_timestamp AS DATE)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 34 OR select_id IS NULL); +WHERE select_id = 34 OR select_id IS NULL) order by id; CAST(my_timestamp AS DATE) my_timestamp id 0000-00-00 0000-00-00 00:00:00 1 1970-01-01 1970-01-01 03:00:01 2 @@ -4155,7 +4337,7 @@ CREATE VIEW v1 AS SELECT CAST(my_date AS DATE), my_date, id FROM t1_values; SELECT CAST(my_date AS DATE), my_date, id FROM t1_values -WHERE select_id = 33 OR select_id IS NULL; +WHERE select_id = 33 OR select_id IS NULL order by id; CAST(my_date AS DATE) my_date id NULL NULL 1 0001-01-01 0001-01-01 2 @@ -4167,7 +4349,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as date) AS `CAST(my_date AS DATE)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 33 OR select_id IS NULL); +WHERE select_id = 33 OR select_id IS NULL) order by id; CAST(my_date AS DATE) my_date id NULL NULL 1 0001-01-01 0001-01-01 2 @@ -4181,7 +4363,7 @@ CREATE VIEW v1 AS SELECT CAST(my_datetime AS DATE), my_datetime, id FROM t1_values; SELECT CAST(my_datetime AS DATE), my_datetime, id FROM t1_values -WHERE select_id = 32 OR select_id IS NULL; +WHERE select_id = 32 OR select_id IS NULL order by id; CAST(my_datetime AS DATE) my_datetime id NULL NULL 1 0001-01-01 0001-01-01 00:00:00 2 @@ -4193,7 +4375,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as date) AS `CAST(my_datetime AS DATE)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 32 OR select_id IS NULL); +WHERE select_id = 32 OR select_id IS NULL) order by id; CAST(my_datetime AS DATE) my_datetime id NULL NULL 1 0001-01-01 0001-01-01 00:00:00 2 @@ -4207,7 +4389,7 @@ CREATE VIEW v1 AS SELECT CAST(my_double AS DATE), my_double, id FROM t1_values; SELECT CAST(my_double AS DATE), my_double, id FROM t1_values -WHERE select_id = 31 OR select_id IS NULL; +WHERE select_id = 31 OR select_id IS NULL order by id; CAST(my_double AS DATE) my_double id NULL NULL 1 NULL -1.7976931348623e+308 2 @@ -4225,7 +4407,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as date) AS `CAST(my_double AS DATE)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 31 OR select_id IS NULL); +WHERE select_id = 31 OR select_id IS NULL) order by id; CAST(my_double AS DATE) my_double id NULL NULL 1 NULL -1.7976931348623e+308 2 @@ -4245,7 +4427,7 @@ CREATE VIEW v1 AS SELECT CAST(my_bigint AS DATE), my_bigint, id FROM t1_values; SELECT CAST(my_bigint AS DATE), my_bigint, id FROM t1_values -WHERE select_id = 30 OR select_id IS NULL; +WHERE select_id = 30 OR select_id IS NULL order by id; CAST(my_bigint AS DATE) my_bigint id NULL NULL 1 NULL -9223372036854775808 2 @@ -4263,7 +4445,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as date) AS `CAST(my_bigint AS DATE)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 30 OR select_id IS NULL); +WHERE select_id = 30 OR select_id IS NULL) order by id; CAST(my_bigint AS DATE) my_bigint id NULL NULL 1 NULL -9223372036854775808 2 @@ -4283,7 +4465,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS DATE), my_varbinary_1000, id FROM t1_values; SELECT CAST(my_varbinary_1000 AS DATE), my_varbinary_1000, id FROM t1_values -WHERE select_id = 29 OR select_id IS NULL; +WHERE select_id = 29 OR select_id IS NULL order by id; CAST(my_varbinary_1000 AS DATE) my_varbinary_1000 id NULL NULL 1 NULL 2 @@ -4301,7 +4483,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as date) AS `CAST(my_varbinary_1000 AS DATE)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 29 OR select_id IS NULL); +WHERE select_id = 29 OR select_id IS NULL) order by id; CAST(my_varbinary_1000 AS DATE) my_varbinary_1000 id NULL NULL 1 NULL 2 @@ -4321,14 +4503,14 @@ CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS DATE), my_binary_30, id FROM t1_values; SELECT CAST(my_binary_30 AS DATE), my_binary_30, id FROM t1_values -WHERE select_id = 28 OR select_id IS NULL; +WHERE select_id = 28 OR select_id IS NULL order by id; CAST(my_binary_30 AS DATE) my_binary_30 id NULL NULL 1 -NULL +NULL 2 NULL <--------30 characters-------> 3 -NULL ---äÖüß@µ*$-- -NULL -1 -2005-06-27 2005-06-27 +NULL ---äÖüß@µ*$-- 4 +NULL -1 5 +2005-06-27 2005-06-27 10 Warnings: Warning 1292 Truncated incorrect datetime value: '' Warning 1292 Truncated incorrect datetime value: '<--------30 characters------->' @@ -4340,7 +4522,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as date) AS `CAST(my_binary_30 AS DATE)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 28 OR select_id IS NULL); +WHERE select_id = 28 OR select_id IS NULL) order by id; CAST(my_binary_30 AS DATE) my_binary_30 id NULL NULL 1 NULL @@ -4361,7 +4543,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS DATE), my_varchar_1000, id FROM t1_values; SELECT CAST(my_varchar_1000 AS DATE), my_varchar_1000, id FROM t1_values -WHERE select_id = 27 OR select_id IS NULL; +WHERE select_id = 27 OR select_id IS NULL order by id; CAST(my_varchar_1000 AS DATE) my_varchar_1000 id NULL NULL 1 NULL 2 @@ -4379,7 +4561,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as date) AS `CAST(my_varchar_1000 AS DATE)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 27 OR select_id IS NULL); +WHERE select_id = 27 OR select_id IS NULL) order by id; CAST(my_varchar_1000 AS DATE) my_varchar_1000 id NULL NULL 1 NULL 2 @@ -4399,7 +4581,7 @@ CREATE VIEW v1 AS SELECT CAST(my_char_30 AS DATE), my_char_30, id FROM t1_values; SELECT CAST(my_char_30 AS DATE), my_char_30, id FROM t1_values -WHERE select_id = 26 OR select_id IS NULL; +WHERE select_id = 26 OR select_id IS NULL order by id; CAST(my_char_30 AS DATE) my_char_30 id NULL NULL 1 NULL 2 @@ -4417,7 +4599,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as date) AS `CAST(my_char_30 AS DATE)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 26 OR select_id IS NULL); +WHERE select_id = 26 OR select_id IS NULL) order by id; CAST(my_char_30 AS DATE) my_char_30 id NULL NULL 1 NULL 2 @@ -4437,7 +4619,7 @@ CREATE VIEW v1 AS SELECT CAST(my_year AS CHAR), my_year, id FROM t1_values; SELECT CAST(my_year AS CHAR), my_year, id FROM t1_values -WHERE select_id = 25 OR select_id IS NULL; +WHERE select_id = 25 OR select_id IS NULL order by id; CAST(my_year AS CHAR) my_year id NULL NULL 1 1901 1901 2 @@ -4449,7 +4631,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as char charset latin1) AS `CAST(my_year AS CHAR)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 25 OR select_id IS NULL); +WHERE select_id = 25 OR select_id IS NULL) order by id; CAST(my_year AS CHAR) my_year id NULL NULL 1 1901 1901 2 @@ -4463,7 +4645,7 @@ CREATE VIEW v1 AS SELECT CAST(my_time AS CHAR), my_time, id FROM t1_values; SELECT CAST(my_time AS CHAR), my_time, id FROM t1_values -WHERE select_id = 24 OR select_id IS NULL; +WHERE select_id = 24 OR select_id IS NULL order by id; CAST(my_time AS CHAR) my_time id NULL NULL 1 -838:59:59 -838:59:59 2 @@ -4475,7 +4657,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as char charset latin1) AS `CAST(my_time AS CHAR)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 24 OR select_id IS NULL); +WHERE select_id = 24 OR select_id IS NULL) order by id; CAST(my_time AS CHAR) my_time id NULL NULL 1 -838:59:59 -838:59:59 2 @@ -4489,7 +4671,7 @@ CREATE VIEW v1 AS SELECT CAST(my_timestamp AS CHAR), my_timestamp, id FROM t1_values; SELECT CAST(my_timestamp AS CHAR), my_timestamp, id FROM t1_values -WHERE select_id = 23 OR select_id IS NULL; +WHERE select_id = 23 OR select_id IS NULL order by id; CAST(my_timestamp AS CHAR) my_timestamp id 0000-00-00 00:00:00 0000-00-00 00:00:00 1 1970-01-01 03:00:01 1970-01-01 03:00:01 2 @@ -4501,7 +4683,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as char charset latin1) AS `CAST(my_timestamp AS CHAR)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 23 OR select_id IS NULL); +WHERE select_id = 23 OR select_id IS NULL) order by id; CAST(my_timestamp AS CHAR) my_timestamp id 0000-00-00 00:00:00 0000-00-00 00:00:00 1 1970-01-01 03:00:01 1970-01-01 03:00:01 2 @@ -4515,7 +4697,7 @@ CREATE VIEW v1 AS SELECT CAST(my_date AS CHAR), my_date, id FROM t1_values; SELECT CAST(my_date AS CHAR), my_date, id FROM t1_values -WHERE select_id = 22 OR select_id IS NULL; +WHERE select_id = 22 OR select_id IS NULL order by id; CAST(my_date AS CHAR) my_date id NULL NULL 1 0001-01-01 0001-01-01 2 @@ -4527,7 +4709,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as char charset latin1) AS `CAST(my_date AS CHAR)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 22 OR select_id IS NULL); +WHERE select_id = 22 OR select_id IS NULL) order by id; CAST(my_date AS CHAR) my_date id NULL NULL 1 0001-01-01 0001-01-01 2 @@ -4541,7 +4723,7 @@ CREATE VIEW v1 AS SELECT CAST(my_datetime AS CHAR), my_datetime, id FROM t1_values; SELECT CAST(my_datetime AS CHAR), my_datetime, id FROM t1_values -WHERE select_id = 21 OR select_id IS NULL; +WHERE select_id = 21 OR select_id IS NULL order by id; CAST(my_datetime AS CHAR) my_datetime id NULL NULL 1 0001-01-01 00:00:00 0001-01-01 00:00:00 2 @@ -4553,7 +4735,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as char charset latin1) AS `CAST(my_datetime AS CHAR)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 21 OR select_id IS NULL); +WHERE select_id = 21 OR select_id IS NULL) order by id; CAST(my_datetime AS CHAR) my_datetime id NULL NULL 1 0001-01-01 00:00:00 0001-01-01 00:00:00 2 @@ -4567,7 +4749,7 @@ CREATE VIEW v1 AS SELECT CAST(my_double AS CHAR), my_double, id FROM t1_values; SELECT CAST(my_double AS CHAR), my_double, id FROM t1_values -WHERE select_id = 20 OR select_id IS NULL; +WHERE select_id = 20 OR select_id IS NULL order by id; CAST(my_double AS CHAR) my_double id NULL NULL 1 -1.7976931348623e+308 -1.7976931348623e+308 2 @@ -4579,7 +4761,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as char charset latin1) AS `CAST(my_double AS CHAR)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 20 OR select_id IS NULL); +WHERE select_id = 20 OR select_id IS NULL) order by id; CAST(my_double AS CHAR) my_double id NULL NULL 1 -1.7976931348623e+308 -1.7976931348623e+308 2 @@ -4593,7 +4775,7 @@ CREATE VIEW v1 AS SELECT CAST(my_decimal AS CHAR), my_decimal, id FROM t1_values; SELECT CAST(my_decimal AS CHAR), my_decimal, id FROM t1_values -WHERE select_id = 19 OR select_id IS NULL; +WHERE select_id = 19 OR select_id IS NULL order by id; CAST(my_decimal AS CHAR) my_decimal id NULL NULL 1 -9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -4605,7 +4787,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as char charset latin1) AS `CAST(my_decimal AS CHAR)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 19 OR select_id IS NULL); +WHERE select_id = 19 OR select_id IS NULL) order by id; CAST(my_decimal AS CHAR) my_decimal id NULL NULL 1 -9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -4619,7 +4801,7 @@ CREATE VIEW v1 AS SELECT CAST(my_bigint AS CHAR), my_bigint, id FROM t1_values; SELECT CAST(my_bigint AS CHAR), my_bigint, id FROM t1_values -WHERE select_id = 18 OR select_id IS NULL; +WHERE select_id = 18 OR select_id IS NULL order by id; CAST(my_bigint AS CHAR) my_bigint id NULL NULL 1 -9223372036854775808 -9223372036854775808 2 @@ -4631,7 +4813,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as char charset latin1) AS `CAST(my_bigint AS CHAR)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 18 OR select_id IS NULL); +WHERE select_id = 18 OR select_id IS NULL) order by id; CAST(my_bigint AS CHAR) my_bigint id NULL NULL 1 -9223372036854775808 -9223372036854775808 2 @@ -4645,7 +4827,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS CHAR), my_varbinary_1000, id FROM t1_values; SELECT CAST(my_varbinary_1000 AS CHAR), my_varbinary_1000, id FROM t1_values -WHERE select_id = 17 OR select_id IS NULL; +WHERE select_id = 17 OR select_id IS NULL order by id; CAST(my_varbinary_1000 AS CHAR) my_varbinary_1000 id NULL NULL 1 2 @@ -4657,7 +4839,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as char charset latin1) AS `CAST(my_varbinary_1000 AS CHAR)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 17 OR select_id IS NULL); +WHERE select_id = 17 OR select_id IS NULL) order by id; CAST(my_varbinary_1000 AS CHAR) my_varbinary_1000 id NULL NULL 1 2 @@ -4671,19 +4853,19 @@ CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS CHAR), my_binary_30, id FROM t1_values; SELECT CAST(my_binary_30 AS CHAR), my_binary_30, id FROM t1_values -WHERE select_id = 16 OR select_id IS NULL; +WHERE select_id = 16 OR select_id IS NULL order by id; CAST(my_binary_30 AS CHAR) my_binary_30 id NULL NULL 1 - + 2 <--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- --1 + ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 +-1 -1 5 SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as char charset latin1) AS `CAST(my_binary_30 AS CHAR)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 16 OR select_id IS NULL); +WHERE select_id = 16 OR select_id IS NULL) order by id; CAST(my_binary_30 AS CHAR) my_binary_30 id NULL NULL 1 @@ -4697,7 +4879,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS CHAR), my_varchar_1000, id FROM t1_values; SELECT CAST(my_varchar_1000 AS CHAR), my_varchar_1000, id FROM t1_values -WHERE select_id = 15 OR select_id IS NULL; +WHERE select_id = 15 OR select_id IS NULL order by id; CAST(my_varchar_1000 AS CHAR) my_varchar_1000 id NULL NULL 1 2 @@ -4709,7 +4891,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as char charset latin1) AS `CAST(my_varchar_1000 AS CHAR)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 15 OR select_id IS NULL); +WHERE select_id = 15 OR select_id IS NULL) order by id; CAST(my_varchar_1000 AS CHAR) my_varchar_1000 id NULL NULL 1 2 @@ -4723,7 +4905,7 @@ CREATE VIEW v1 AS SELECT CAST(my_char_30 AS CHAR), my_char_30, id FROM t1_values; SELECT CAST(my_char_30 AS CHAR), my_char_30, id FROM t1_values -WHERE select_id = 14 OR select_id IS NULL; +WHERE select_id = 14 OR select_id IS NULL order by id; CAST(my_char_30 AS CHAR) my_char_30 id NULL NULL 1 2 @@ -4735,7 +4917,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as char charset latin1) AS `CAST(my_char_30 AS CHAR)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 14 OR select_id IS NULL); +WHERE select_id = 14 OR select_id IS NULL) order by id; CAST(my_char_30 AS CHAR) my_char_30 id NULL NULL 1 2 @@ -4749,7 +4931,7 @@ CREATE VIEW v1 AS SELECT CAST(my_year AS BINARY), my_year, id FROM t1_values; SELECT CAST(my_year AS BINARY), my_year, id FROM t1_values -WHERE select_id = 13 OR select_id IS NULL; +WHERE select_id = 13 OR select_id IS NULL order by id; CAST(my_year AS BINARY) my_year id NULL NULL 1 1901 1901 2 @@ -4761,7 +4943,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as char charset binary) AS `CAST(my_year AS BINARY)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 13 OR select_id IS NULL); +WHERE select_id = 13 OR select_id IS NULL) order by id; CAST(my_year AS BINARY) my_year id NULL NULL 1 1901 1901 2 @@ -4775,7 +4957,7 @@ CREATE VIEW v1 AS SELECT CAST(my_time AS BINARY), my_time, id FROM t1_values; SELECT CAST(my_time AS BINARY), my_time, id FROM t1_values -WHERE select_id = 12 OR select_id IS NULL; +WHERE select_id = 12 OR select_id IS NULL order by id; CAST(my_time AS BINARY) my_time id NULL NULL 1 -838:59:59 -838:59:59 2 @@ -4787,7 +4969,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as char charset binary) AS `CAST(my_time AS BINARY)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 12 OR select_id IS NULL); +WHERE select_id = 12 OR select_id IS NULL) order by id; CAST(my_time AS BINARY) my_time id NULL NULL 1 -838:59:59 -838:59:59 2 @@ -4801,7 +4983,7 @@ CREATE VIEW v1 AS SELECT CAST(my_timestamp AS BINARY), my_timestamp, id FROM t1_values; SELECT CAST(my_timestamp AS BINARY), my_timestamp, id FROM t1_values -WHERE select_id = 11 OR select_id IS NULL; +WHERE select_id = 11 OR select_id IS NULL order by id; CAST(my_timestamp AS BINARY) my_timestamp id 0000-00-00 00:00:00 0000-00-00 00:00:00 1 1970-01-01 03:00:01 1970-01-01 03:00:01 2 @@ -4813,7 +4995,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as char charset binary) AS `CAST(my_timestamp AS BINARY)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 11 OR select_id IS NULL); +WHERE select_id = 11 OR select_id IS NULL) order by id; CAST(my_timestamp AS BINARY) my_timestamp id 0000-00-00 00:00:00 0000-00-00 00:00:00 1 1970-01-01 03:00:01 1970-01-01 03:00:01 2 @@ -4827,7 +5009,7 @@ CREATE VIEW v1 AS SELECT CAST(my_date AS BINARY), my_date, id FROM t1_values; SELECT CAST(my_date AS BINARY), my_date, id FROM t1_values -WHERE select_id = 10 OR select_id IS NULL; +WHERE select_id = 10 OR select_id IS NULL order by id; CAST(my_date AS BINARY) my_date id NULL NULL 1 0001-01-01 0001-01-01 2 @@ -4839,7 +5021,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as char charset binary) AS `CAST(my_date AS BINARY)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 10 OR select_id IS NULL); +WHERE select_id = 10 OR select_id IS NULL) order by id; CAST(my_date AS BINARY) my_date id NULL NULL 1 0001-01-01 0001-01-01 2 @@ -4853,7 +5035,7 @@ CREATE VIEW v1 AS SELECT CAST(my_datetime AS BINARY), my_datetime, id FROM t1_values; SELECT CAST(my_datetime AS BINARY), my_datetime, id FROM t1_values -WHERE select_id = 9 OR select_id IS NULL; +WHERE select_id = 9 OR select_id IS NULL order by id; CAST(my_datetime AS BINARY) my_datetime id NULL NULL 1 0001-01-01 00:00:00 0001-01-01 00:00:00 2 @@ -4865,7 +5047,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as char charset binary) AS `CAST(my_datetime AS BINARY)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 9 OR select_id IS NULL); +WHERE select_id = 9 OR select_id IS NULL) order by id; CAST(my_datetime AS BINARY) my_datetime id NULL NULL 1 0001-01-01 00:00:00 0001-01-01 00:00:00 2 @@ -4879,7 +5061,7 @@ CREATE VIEW v1 AS SELECT CAST(my_double AS BINARY), my_double, id FROM t1_values; SELECT CAST(my_double AS BINARY), my_double, id FROM t1_values -WHERE select_id = 8 OR select_id IS NULL; +WHERE select_id = 8 OR select_id IS NULL order by id; CAST(my_double AS BINARY) my_double id NULL NULL 1 -1.7976931348623e+308 -1.7976931348623e+308 2 @@ -4891,7 +5073,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as char charset binary) AS `CAST(my_double AS BINARY)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 8 OR select_id IS NULL); +WHERE select_id = 8 OR select_id IS NULL) order by id; CAST(my_double AS BINARY) my_double id NULL NULL 1 -1.7976931348623e+308 -1.7976931348623e+308 2 @@ -4905,7 +5087,7 @@ CREATE VIEW v1 AS SELECT CAST(my_decimal AS BINARY), my_decimal, id FROM t1_values; SELECT CAST(my_decimal AS BINARY), my_decimal, id FROM t1_values -WHERE select_id = 7 OR select_id IS NULL; +WHERE select_id = 7 OR select_id IS NULL order by id; CAST(my_decimal AS BINARY) my_decimal id NULL NULL 1 -9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -4917,7 +5099,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as char charset binary) AS `CAST(my_decimal AS BINARY)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 7 OR select_id IS NULL); +WHERE select_id = 7 OR select_id IS NULL) order by id; CAST(my_decimal AS BINARY) my_decimal id NULL NULL 1 -9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -4931,7 +5113,7 @@ CREATE VIEW v1 AS SELECT CAST(my_bigint AS BINARY), my_bigint, id FROM t1_values; SELECT CAST(my_bigint AS BINARY), my_bigint, id FROM t1_values -WHERE select_id = 6 OR select_id IS NULL; +WHERE select_id = 6 OR select_id IS NULL order by id; CAST(my_bigint AS BINARY) my_bigint id NULL NULL 1 -9223372036854775808 -9223372036854775808 2 @@ -4943,7 +5125,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as char charset binary) AS `CAST(my_bigint AS BINARY)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 6 OR select_id IS NULL); +WHERE select_id = 6 OR select_id IS NULL) order by id; CAST(my_bigint AS BINARY) my_bigint id NULL NULL 1 -9223372036854775808 -9223372036854775808 2 @@ -4957,7 +5139,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS BINARY), my_varbinary_1000, id FROM t1_values; SELECT CAST(my_varbinary_1000 AS BINARY), my_varbinary_1000, id FROM t1_values -WHERE select_id = 5 OR select_id IS NULL; +WHERE select_id = 5 OR select_id IS NULL order by id; CAST(my_varbinary_1000 AS BINARY) my_varbinary_1000 id NULL NULL 1 2 @@ -4969,7 +5151,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as char charset binary) AS `CAST(my_varbinary_1000 AS BINARY)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 5 OR select_id IS NULL); +WHERE select_id = 5 OR select_id IS NULL) order by id; CAST(my_varbinary_1000 AS BINARY) my_varbinary_1000 id NULL NULL 1 2 @@ -4983,19 +5165,19 @@ CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS BINARY), my_binary_30, id FROM t1_values; SELECT CAST(my_binary_30 AS BINARY), my_binary_30, id FROM t1_values -WHERE select_id = 4 OR select_id IS NULL; +WHERE select_id = 4 OR select_id IS NULL order by id; CAST(my_binary_30 AS BINARY) my_binary_30 id NULL NULL 1 - + 2 <--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- --1 + ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 +-1 -1 5 SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as char charset binary) AS `CAST(my_binary_30 AS BINARY)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 4 OR select_id IS NULL); +WHERE select_id = 4 OR select_id IS NULL) order by id; CAST(my_binary_30 AS BINARY) my_binary_30 id NULL NULL 1 @@ -5009,7 +5191,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS BINARY), my_varchar_1000, id FROM t1_values; SELECT CAST(my_varchar_1000 AS BINARY), my_varchar_1000, id FROM t1_values -WHERE select_id = 3 OR select_id IS NULL; +WHERE select_id = 3 OR select_id IS NULL order by id; CAST(my_varchar_1000 AS BINARY) my_varchar_1000 id NULL NULL 1 2 @@ -5021,7 +5203,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as char charset binary) AS `CAST(my_varchar_1000 AS BINARY)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 3 OR select_id IS NULL); +WHERE select_id = 3 OR select_id IS NULL) order by id; CAST(my_varchar_1000 AS BINARY) my_varchar_1000 id NULL NULL 1 2 @@ -5035,7 +5217,7 @@ CREATE VIEW v1 AS SELECT CAST(my_char_30 AS BINARY), my_char_30, id FROM t1_values; SELECT CAST(my_char_30 AS BINARY), my_char_30, id FROM t1_values -WHERE select_id = 2 OR select_id IS NULL; +WHERE select_id = 2 OR select_id IS NULL order by id; CAST(my_char_30 AS BINARY) my_char_30 id NULL NULL 1 2 @@ -5047,7 +5229,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as char charset binary) AS `CAST(my_char_30 AS BINARY)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 2 OR select_id IS NULL); +WHERE select_id = 2 OR select_id IS NULL) order by id; CAST(my_char_30 AS BINARY) my_char_30 id NULL NULL 1 2 @@ -5059,7 +5241,7 @@ DROP VIEW v1; CREATE VIEW v1 AS SELECT sqrt(my_bigint), my_bigint, id FROM t1_values; SELECT sqrt(my_bigint), my_bigint, id FROM t1_values -WHERE select_id = 1 OR select_id IS NULL; +WHERE select_id = 1 OR select_id IS NULL order by id; sqrt(my_bigint) my_bigint id NULL NULL 1 NULL -9223372036854775808 2 @@ -5073,7 +5255,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select sqrt(`t1_values`.`my_bigint`) AS `sqrt(my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 1 OR select_id IS NULL); +WHERE select_id = 1 OR select_id IS NULL) order by id; sqrt(my_bigint) my_bigint id NULL NULL 1 NULL -9223372036854775808 2 diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc_02.result b/mysql-test/suite/funcs_1/r/memory_storedproc_02.result index fd31aa76ab9..6ba95c9fa63 100644 --- a/mysql-test/suite/funcs_1/r/memory_storedproc_02.result +++ b/mysql-test/suite/funcs_1/r/memory_storedproc_02.result @@ -9,20 +9,25 @@ 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; +create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1; +create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2; +create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3; +create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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; +create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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; +create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -34,8 +39,9 @@ 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; +create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -47,12 +53,14 @@ 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; +create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9; +create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10; +create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t11; Section 3.1.2 - Syntax checks for the stored procedure-specific programming statements BEGIN/END, DECLARE, SET, SELECT/INTO, OPEN, FETCH, CLOSE: @@ -164,7 +172,7 @@ declare y integer default 1; set @x = x; set @y = y; set @z = 234; -SELECT f1, f2 into @x, @y from t2 limit 1; +SELECT f1, f2 into @x, @y from t2 where f1='a`' and f2='a`' limit 1; SELECT @x, @y, @z, invar; BEGIN set @x = 2; @@ -207,7 +215,7 @@ BEGIN declare x integer; declare y integer; set @x=x; set @y=y; -SELECT f4, f3 into @x, @y from t2 limit 1; +SELECT f4, f3 into @x, @y from t2 where f4=-5000 and f3='1000-01-01' limit 1; SELECT @x, @y; END// CALL sp1(); @@ -695,7 +703,7 @@ Testcase 3.1.2.54: ------------------ Ensure that a handler with a condition defined with an SQLSTATE that begins with -“01“ is always exactly equivalent in action to a handler with an SQLWARNING +“01“ is always exactly equivalent in action to a handler with an SQLWARNING condition. -------------------------------------------------------------------------------- DROP PROCEDURE IF EXISTS sp0; @@ -794,7 +802,7 @@ Testcase 3.1.2.56: ------------------ Ensure that a handler with a condition defined with an SQLSTATE that begins with -“02“ is always exactly equivalent in action to a handler with a NOT FOUND +“02“ is always exactly equivalent in action to a handler with a NOT FOUND condition. -------------------------------------------------------------------------------- DROP PROCEDURE IF EXISTS sp0; @@ -902,7 +910,7 @@ Testcase 3.1.2.58: ------------------ Ensure that a handler with a condition defined with an SQLSTATE that begins with -anything other that “01“ or “02“ is always exactly equivalent in action to a +anything other that “01“ or “02“ is always exactly equivalent in action to a handler with an SQLEXCEPTION condition. -------------------------------------------------------------------------------- DROP PROCEDURE IF EXISTS sp0; @@ -1082,7 +1090,8 @@ declare f2_value char(20); declare f5_value char(20); declare f4_value integer; declare f6_value integer; -declare cur1 cursor for SELECT f1, f2, f4, f5, f6 from t2 limit 3; +declare cur1 cursor for SELECT f1, f2, f4, f5, f6 from t2 +where f4 >=-5000 order by f4 limit 3; open cur1; while proceed do SELECT count AS 'loop'; @@ -1165,7 +1174,7 @@ of a compound statement ends. DROP TABLE IF EXISTS temp1; DROP PROCEDURE IF EXISTS sp1; create table temp1( f0 char(20), f1 char(20), f2 char(20), f3 int, f4 char(20) ); -SELECT f1, f2, f4, f5 from t2; +SELECT f1, f2, f4, f5 from t2 order by f4; f1 f2 f4 f5 a` a` -5000 a` aaa aaa -4999 aaa @@ -1185,8 +1194,8 @@ declare newf1 char(20); declare newf2 char(20); declare newf5 char(20); declare newf4 integer; -declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 limit 5; -declare cur2 cursor for SELECT f1, f2, f4, f5 from t2 limit 5; +declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 where f4 >= -5000 order by f4 limit 5; +declare cur2 cursor for SELECT f1, f2, f4, f5 from t2 where f4 >= -5000 order by f4 limit 5; open cur1; open cur2; BEGIN @@ -1268,8 +1277,10 @@ declare i_newf11 char(20); declare i_newf12 char(20); declare i_newf13 date; declare i_newf14 integer; -declare cur1 cursor for SELECT f1, f2, f3, f4 from t2 limit 4; -declare cur2 cursor for SELECT f1, f2, f3, f4 from t2 limit 3; +declare cur1 cursor for SELECT f1, f2, f3, f4 from t2 +where f4>=-5000 order by f4 limit 4; +declare cur2 cursor for SELECT f1, f2, f3, f4 from t2 +where f4>=-5000 order by f4 limit 3; declare continue handler for sqlstate '02000' set proceed=0; open cur1; open cur2; @@ -1300,8 +1311,10 @@ DECLARE o_newf11 CHAR(20); DECLARE o_newf12 CHAR(20); DECLARE o_newf13 DATE; DECLARE o_newf14 INTEGER; -DECLARE cur1 CURSOR FOR SELECT f1, f2, f3, f4 FROM t2 LIMIT 5; -DECLARE cur2 CURSOR FOR SELECT f1, f2, f3, f4 FROM t2 LIMIT 5; +DECLARE cur1 CURSOR FOR SELECT f1, f2, f3, f4 FROM t2 +WHERE f4>=-5000 ORDER BY f4 LIMIT 5; +DECLARE cur2 CURSOR FOR SELECT f1, f2, f3, f4 FROM t2 +WHERE f4>=-5000 ORDER BY f4 LIMIT 5; DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET proceed=0; OPEN cur1; OPEN cur2; diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc_03.result b/mysql-test/suite/funcs_1/r/memory_storedproc_03.result index c982691daad..53e25441e2e 100644 --- a/mysql-test/suite/funcs_1/r/memory_storedproc_03.result +++ b/mysql-test/suite/funcs_1/r/memory_storedproc_03.result @@ -9,20 +9,25 @@ 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; +create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1; +create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2; +create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3; +create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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; +create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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; +create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -34,8 +39,9 @@ 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; +create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -47,12 +53,14 @@ 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; +create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9; +create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10; +create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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: diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc_06.result b/mysql-test/suite/funcs_1/r/memory_storedproc_06.result index 890498e1966..88bddf68e24 100644 --- a/mysql-test/suite/funcs_1/r/memory_storedproc_06.result +++ b/mysql-test/suite/funcs_1/r/memory_storedproc_06.result @@ -9,20 +9,25 @@ 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; +create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1; +create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2; +create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3; +create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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; +create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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; +create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -34,8 +39,9 @@ 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; +create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -47,12 +53,14 @@ 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; +create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9; +create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10; +create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t11; Section 3.1.6 - Privilege Checks: -------------------------------------------------------------------------------- @@ -79,6 +87,7 @@ 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' +USE db_storedproc_1; root@localhost db_storedproc_1 GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost'; @@ -90,6 +99,7 @@ CREATE PROCEDURE sp1(v1 char(20)) BEGIN SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz'; END// +USE db_storedproc_1; root@localhost db_storedproc_1 DROP USER 'user_1'@'localhost'; @@ -115,6 +125,7 @@ CREATE FUNCTION fn1(v1 int) returns int BEGIN return v1; END// +USE db_storedproc_1; root@localhost db_storedproc_1 drop user 'user_1'@'localhost'; diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc_07.result b/mysql-test/suite/funcs_1/r/memory_storedproc_07.result index 0980ca84a8c..cbe0a18435a 100644 --- a/mysql-test/suite/funcs_1/r/memory_storedproc_07.result +++ b/mysql-test/suite/funcs_1/r/memory_storedproc_07.result @@ -9,20 +9,25 @@ 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; +create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1; +create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2; +create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3; +create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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; +create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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; +create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -34,8 +39,9 @@ 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; +create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -47,12 +53,14 @@ 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; +create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9; +create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10; +create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t11; Section 3.1.7 - SQL mode checks: -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc_08.result b/mysql-test/suite/funcs_1/r/memory_storedproc_08.result index e3f9556a082..40ebc1e51e4 100644 --- a/mysql-test/suite/funcs_1/r/memory_storedproc_08.result +++ b/mysql-test/suite/funcs_1/r/memory_storedproc_08.result @@ -9,20 +9,25 @@ 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; +create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1; +create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2; +create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3; +create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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; +create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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; +create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -34,8 +39,9 @@ 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; +create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -47,12 +53,14 @@ 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; +create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9; +create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10; +create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t11; Section 3.1.8 - SHOW statement checks: -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc_10.result b/mysql-test/suite/funcs_1/r/memory_storedproc_10.result index 7f9946218e9..163bae36bed 100644 --- a/mysql-test/suite/funcs_1/r/memory_storedproc_10.result +++ b/mysql-test/suite/funcs_1/r/memory_storedproc_10.result @@ -9,20 +9,25 @@ 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; +create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1; +create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2; +create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3; +create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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; +create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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; +create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -34,8 +39,9 @@ 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; +create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -47,12 +53,14 @@ 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; +create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9; +create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10; +create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t11; Section 3.1.10 - CALL checks: -------------------------------------------------------------------------------- @@ -78,7 +86,7 @@ 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 LIMIT 1; +SELECT * FROM db_storedproc.t1 WHERE f4=-5000 LIMIT 1; END// CREATE FUNCTION fn31105(n INT) RETURNS INT BEGIN @@ -93,6 +101,8 @@ 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' +connection default; +USE db_storedproc; root@localhost db_storedproc CALL sp31102(); @@ -112,6 +122,8 @@ a` a` 1000-01-01 -5000 a` -5000 SELECT fn31105( 9 ); fn31105( 9 ) 81 +connection default; +USE db_storedproc; root@localhost db_storedproc REVOKE EXECUTE ON db_storedproc.* FROM 'user_2'@'localhost'; @@ -129,6 +141,7 @@ 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' +USE db_storedproc; root@localhost db_storedproc DROP PROCEDURE sp31102; @@ -176,6 +189,8 @@ 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; +DROP PROCEDURE IF EXISTS sp_del; +DROP PROCEDURE IF EXISTS sp_with_rowcount; 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() @@ -203,49 +218,72 @@ 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// +CREATE PROCEDURE sp_del() +BEGIN +DELETE FROM temp WHERE temp.f1 ='qwe' OR temp.f1 = 'updated_2'; +END// +CREATE PROCEDURE sp_with_rowcount() +BEGIN +BEGIN +INSERT INTO temp VALUES ('qwe', 'abc', '1989-11-09', 100, 'uvw', 1000), +('qwe', 'xyz', '1998-03-26', 100, 'uvw', 1000), +('qwe', 'abc', '2000-11-09', 100, 'uvw', 1000), +('qwe', 'xyz', '2005-11-07', 100, 'uvw', 1000); +END; +SELECT row_count() AS 'row_count() after insert'; +SELECT row_count() AS 'row_count() after select row_count()'; +SELECT f1,f2,f3 FROM temp ORDER BY f1,f2,f3; +UPDATE temp SET temp.f1 = 'updated_2' WHERE temp.f2 = 'abc'; +SELECT row_count() AS 'row_count() after update'; +SELECT f1,f2,f3 FROM temp ORDER BY f1,f2,f3; +DELETE FROM temp WHERE temp.f1 = 'updated_2'; +SELECT row_count() AS 'row_count() after delete'; +END// CALL sp_ins_1(); SELECT row_count(); row_count() 1 SELECT * FROM temp; f1 f2 f3 f4 f5 f6 +a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992 +a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991 a` a` 1000-01-01 -5000 a` -5000 aaa aaa 1000-01-02 -4999 aaa -4999 abaa abaa 1000-01-03 -4998 abaa -4998 +abc abc 2005-10-03 100 uvw 1000 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; f1 f2 f3 f4 f5 f6 +a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992 +a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991 a` a` 1000-01-01 -5000 a` -5000 aaa aaa 1000-01-02 -4999 aaa -4999 abaa abaa 1000-01-03 -4998 abaa -4998 +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 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; f1 f2 f3 f4 f5 f6 +a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992 +a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991 a` a` 1000-01-01 -5000 a` -5000 aaa aaa 1000-01-02 -4999 aaa -4999 abaa abaa 1000-01-03 -4998 abaa -4998 @@ -254,8 +292,6 @@ 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 @@ -279,6 +315,8 @@ row_count() 3 SELECT * FROM temp; f1 f2 f3 f4 f5 f6 +a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992 +a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991 a` a` 1000-01-01 -5000 a` -5000 aaa aaa 1000-01-02 -4999 aaa -4999 abaa abaa 1000-01-03 -4998 abaa -4998 @@ -287,26 +325,73 @@ 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 +qwe xyz 1998-03-26 100 uvw 1000 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 +CALL sp_del(); +SELECT row_count(); +row_count() +4 +SELECT * FROM temp; +f1 f2 f3 f4 f5 f6 +a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992 +a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991 +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 +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 +DELETE FROM temp; +CALL sp_with_rowcount(); +row_count() after insert +4 +row_count() after select row_count() +-1 +f1 f2 f3 +qwe abc 1989-11-09 +qwe abc 2000-11-09 +qwe xyz 1998-03-26 +qwe xyz 2005-11-07 +row_count() after update +2 +f1 f2 f3 +qwe xyz 1998-03-26 +qwe xyz 2005-11-07 +updated_2 abc 1989-11-09 +updated_2 abc 2000-11-09 +row_count() after delete +2 +SELECT row_count(); +row_count() +-1 +SELECT * FROM temp; +f1 f2 f3 f4 f5 f6 +qwe xyz 1998-03-26 100 uvw 1000 +qwe xyz 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 PROCEDURE sp_del; +DROP PROCEDURE sp_with_rowcount; DROP TABLE temp; Testcase 3.1.10.8: ------------------ -Ensure that the mysql_affected_rows() C API function always returns the correct +Ensure that the mysql_affected_rows() C API function always returns the correct number of rows affected by the execution of a stored procedure. -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/memory_trig_0102.result b/mysql-test/suite/funcs_1/r/memory_trig_0102.result index a9477604425..d926d682d13 100644 --- a/mysql-test/suite/funcs_1/r/memory_trig_0102.result +++ b/mysql-test/suite/funcs_1/r/memory_trig_0102.result @@ -1,90 +1,91 @@ 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 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) +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 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb3.txt' +into table tb3; Testcase: 3.5.1.1: ------------------ use test; -Create trigger trg1_1 BEFORE INSERT +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 +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, +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 +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 +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 +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) +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 @@ -97,9 +98,9 @@ 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 +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 @@ -107,7 +108,7 @@ 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) +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; @@ -135,7 +136,7 @@ delete from tb3 where f121='Test 3.5.1.1'; Testcase: 3.5.1.2: ------------------ -Create trigger trg_1 after insert +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; @@ -188,7 +189,7 @@ 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 +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'; @@ -200,7 +201,7 @@ 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; +select trigger_name from information_schema.triggers order by trigger_name; trigger_name trg5_1 trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX @@ -220,7 +221,7 @@ 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 +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; @@ -228,11 +229,11 @@ 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 +CREATE TRIGGER trig_db.trg6_2 AFTER INSERT on tb3 for each row set @ret_trg6_2 = 5; ERROR 42S02: Table 'trig_db.tb3' doesn't exist use trig_db; -CREATE TRIGGER trg6_3 AFTER INSERT on test.tb3 +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; @@ -256,9 +257,9 @@ 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 +create trigger trig before insert on t1 for each row set new.f1 ='trig t1'; -create trigger trig before update on t2 +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); @@ -288,15 +289,15 @@ 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 +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 +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 +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; @@ -307,7 +308,7 @@ 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; +select * from t1 order by f2; f1 f2 trig1 1 trig1 2 @@ -317,7 +318,7 @@ trig2 3 select * from trig_db3.t1; f1 f2 trig3 4 -select * from t1; +select * from t1 order by f2; f1 f2 trig1 1 trig1 2 @@ -335,17 +336,17 @@ 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 +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 +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 +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; +from information_schema.triggers order by trigger_name; trigger_schema trigger_name event_object_table -trig_db1 trig1_b t1 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); diff --git a/mysql-test/suite/funcs_1/r/memory_trig_03.result b/mysql-test/suite/funcs_1/r/memory_trig_03.result index e5813236213..4fa5a72afd5 100644 --- a/mysql-test/suite/funcs_1/r/memory_trig_03.result +++ b/mysql-test/suite/funcs_1/r/memory_trig_03.result @@ -1,64 +1,65 @@ 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 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) +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 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb3.txt' +into table tb3; Testcase 3.5.3: --------------- @@ -100,7 +101,7 @@ set new.f1 = 'trig 3.5.3.2_1-no'; ERROR 42000: Access denied; you need the SUPER privilege for this operation use priv_db; insert into t1 (f1) values ('insert 3.5.3.2-no'); -select f1 from t1; +select f1 from t1 order by f1; f1 insert 3.5.3.2-no select current_user; @@ -115,15 +116,12 @@ 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; +select f1 from t1 order by f1; f1 insert 3.5.3.2-no grant UPDATE on priv_db.t1 to test_yesprivs@localhost; - -note: once 15166 is fixed a similar case for SELECT needs to be added ---------------------------------------------------------------------- insert into t1 (f1) values ('insert 3.5.3.2-yes'); -select f1 from t1; +select f1 from t1 order by f1; f1 insert 3.5.3.2-no trig 3.5.3.2_2-yes @@ -135,7 +133,7 @@ drop trigger trg1_2; ERROR 42000: Access denied; you need the SUPER privilege for this operation use priv_db; insert into t1 (f1) values ('insert 3.5.3.6-yes'); -select f1 from t1; +select f1 from t1 order by f1; f1 insert 3.5.3.2-no trig 3.5.3.2_2-yes @@ -144,12 +142,12 @@ 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; +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 -insert 3.5.3.6-no drop trigger trg1_2; Testcase 3.5.3.7a: @@ -174,23 +172,22 @@ 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 ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -select f1 from t1; +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 -insert 3.5.3.6-no - -Trigger create disabled - should fail - Bug 8884 ------------------------------------------------- +create trigger trg4a_1 before INSERT on t1 for each row +set new.f1 = 'trig 3.5.3.7-1a'; insert into t1 (f1) values ('insert 3.5.3.7-1a'); -select f1 from t1; +ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' +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 -insert 3.5.3.6-no -insert 3.5.3.7-1a drop trigger trg4a_1; use priv_db; select current_user; @@ -201,18 +198,13 @@ Grants for test_yesprivs@localhost GRANT UPDATE, SUPER 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'; - -SELECT priv added to bypass bug 15166 -------------------------------------- -grant SELECT on *.* to test_yesprivs@localhost; insert into t1 (f1) values ('insert 3.5.3.7-2b'); -select f1 from t1; +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 -insert 3.5.3.6-no -insert 3.5.3.7-1a trig 3.5.3.7-2a drop trigger trg4a_2; @@ -239,30 +231,29 @@ 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 ON `priv_db`.* TO 'test_noprivs'@'localhost' use priv_db; - -Trigger create disabled - should fail - Bug 8884 ------------------------------------------------- +create trigger trg4b_1 before UPDATE on t1 for each row +set new.f1 = 'trig 3.5.3.7-1b'; +ERROR 42000: Access denied; you need the SUPER privilege for this operation insert into t1 (f1) values ('insert 3.5.3.7-1b'); -select f1 from t1; +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-1b trig 3.5.3.2_2-yes trig 3.5.3.2_2-yes -insert 3.5.3.6-no -insert 3.5.3.7-1a trig 3.5.3.7-2a -insert 3.5.3.7-1b update t1 set f1 = 'update 3.5.3.7-1b' where f1 = 'insert 3.5.3.7-1b'; -select f1 from t1; +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 -insert 3.5.3.6-no -insert 3.5.3.7-1a trig 3.5.3.7-2a update 3.5.3.7-1b drop trigger trg4b_1; +ERROR HY000: Trigger does not exist show grants; Grants for test_yesprivs@localhost GRANT SUPER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' @@ -270,32 +261,26 @@ 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'; - -SELECT priv added to bypass bug 15166 -------------------------------------- -grant SELECT on priv_db.* to test_yesprivs@localhost; insert into t1 (f1) values ('insert 3.5.3.7-2b'); -select f1 from t1; +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-2b trig 3.5.3.2_2-yes trig 3.5.3.2_2-yes -insert 3.5.3.6-no -insert 3.5.3.7-1a trig 3.5.3.7-2a update 3.5.3.7-1b -insert 3.5.3.7-2b update t1 set f1 = 'update 3.5.3.7-2b' where f1 = 'insert 3.5.3.7-2b'; -select f1 from t1; +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 -insert 3.5.3.6-no -insert 3.5.3.7-1a trig 3.5.3.7-2a -update 3.5.3.7-1b trig 3.5.3.7-2b +update 3.5.3.7-1b drop trigger trg4b_2; Testcase 3.5.3.7c @@ -321,21 +306,19 @@ Grants for test_noprivs@localhost GRANT SUPER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' use priv_db; - -Trigger create disabled - should fail - Bug 8884 ------------------------------------------------- +create trigger trg4c_1 before INSERT on t1 for each row +set new.f1 = 'trig 3.5.3.7-1c'; insert into t1 (f1) values ('insert 3.5.3.7-1c'); -select f1 from t1; +ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' +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 -insert 3.5.3.6-no -insert 3.5.3.7-1a trig 3.5.3.7-2a -update 3.5.3.7-1b trig 3.5.3.7-2b -insert 3.5.3.7-1c +update 3.5.3.7-1b drop trigger trg4c_1; show grants; Grants for test_yesprivs@localhost @@ -344,23 +327,17 @@ 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'; - -SELECT priv added to bypass bug 15166 -------------------------------------- -grant SELECT on priv_db.t1 to test_yesprivs@localhost; insert into t1 (f1) values ('insert 3.5.3.7-2c'); -select f1 from t1; +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 -insert 3.5.3.6-no -insert 3.5.3.7-1a trig 3.5.3.7-2a -update 3.5.3.7-1b trig 3.5.3.7-2b -insert 3.5.3.7-1c trig 3.5.3.7-2c +update 3.5.3.7-1b drop trigger trg4c_2; Testcase 3.5.3.7d: @@ -384,23 +361,20 @@ Grants for test_noprivs@localhost GRANT SUPER 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 ------------------------------------------------- +create trigger trg4d_1 before INSERT on t1 for each row +set new.f1 = 'trig 3.5.3.7-1d'; insert into t1 (f1) values ('insert 3.5.3.7-1d'); -select f1 from t1; +ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' +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 -insert 3.5.3.6-no -insert 3.5.3.7-1a trig 3.5.3.7-2a -update 3.5.3.7-1b trig 3.5.3.7-2b -insert 3.5.3.7-1c trig 3.5.3.7-2c -insert 3.5.3.7-1d +update 3.5.3.7-1b drop trigger trg4d_1; show grants; Grants for test_yesprivs@localhost @@ -409,25 +383,18 @@ 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'; - -SELECT priv added to bypass bug 15166 -------------------------------------- -grant SELECT (f1) on priv_db.t1 to test_yesprivs@localhost; insert into t1 (f1) values ('insert 3.5.3.7-2d'); -select f1 from t1; +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 -insert 3.5.3.6-no -insert 3.5.3.7-1a trig 3.5.3.7-2a -update 3.5.3.7-1b trig 3.5.3.7-2b -insert 3.5.3.7-1c trig 3.5.3.7-2c -insert 3.5.3.7-1d trig 3.5.3.7-2d +update 3.5.3.7-1b drop trigger trg4d_2; Testcase 3.5.3.8a: @@ -452,14 +419,14 @@ 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 ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' - -Trigger create disabled - should fail - Bug 8887 ------------------------------------------------- +create trigger trg5a_1 before INSERT on t1 for each row +set @test_var = new.f1; 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'); +ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' select @test_var; @test_var before trig 3.5.3.8-1a @@ -477,10 +444,6 @@ set @test_var= 'before trig 3.5.3.8-2a'; select @test_var; @test_var before trig 3.5.3.8-2a - -UPDATE priv added to bypass bug 15166 -------------------------------------- -grant UPDATE on *.* to test_yesprivs@localhost; insert into t1 (f1) values ('insert 3.5.3.8-2a'); select @test_var; @test_var @@ -511,15 +474,15 @@ Grants for test_noprivs@localhost GRANT SUPER 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 ON `priv_db`.* TO 'test_noprivs'@'localhost' use priv_db; - -Trigger create disabled - should fail - Bug 8887 ------------------------------------------------- +create trigger trg5b_1 before UPDATE on t1 for each row +set @test_var= new.f1; 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'; +ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' select @test_var; @test_var before trig 3.5.3.8-1b @@ -536,10 +499,6 @@ insert into t1 (f1) values ('insert 3.5.3.8-2b'); select @test_var; @test_var before trig 3.5.3.8-2b - -UPDATE priv added to bypass bug 15166 -------------------------------------- -grant UPDATE on priv_db.* to test_yesprivs@localhost; update t1 set f1= 'update 3.5.3.8-2b' where f1 = 'insert 3.5.3.8-2b'; select @test_var; @test_var @@ -570,11 +529,11 @@ Grants for test_noprivs@localhost GRANT SUPER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' use priv_db; - -Trigger create disabled - should fail - Bug 8887 ------------------------------------------------- +create trigger trg5c_1 before INSERT on t1 for each row +set @test_var= new.f1; set @test_var= 'before trig 3.5.3.8-1c'; insert into t1 (f1) values ('insert 3.5.3.8-1c'); +ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' select @test_var; @test_var before trig 3.5.3.8-1c @@ -587,10 +546,6 @@ 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'; - -UPDATE priv added to bypass bug 15166 -------------------------------------- -grant UPDATE on priv_db.t1 to test_yesprivs@localhost; insert into t1 (f1) values ('insert 3.5.3.8-2c'); select @test_var; @test_var @@ -620,11 +575,11 @@ Grants for test_noprivs@localhost GRANT SUPER 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 ------------------------------------------------- +create trigger trg5d_1 before INSERT on t1 for each row +set @test_var= new.f1; set @test_var='before trig 3.5.3.8-1d'; insert into t1 (f1) values ('insert 3.5.3.8-1d'); +ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' select @test_var; @test_var before trig 3.5.3.8-1d @@ -637,10 +592,6 @@ 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'; - -UPDATE priv added to bypass bug 15166 -------------------------------------- -grant UPDATE (f1) on priv_db.t1 to test_yesprivs@localhost; insert into t1 (f1) values ('insert 3.5.3.8-2d'); select @test_var; @test_var @@ -676,10 +627,10 @@ ERROR 42000: INSERT command denied to user 'test_yesprivs'@'localhost' for table 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; +select f1 from t1 order by f1; f1 4 -select f2 from t2; +select f2 from t2 order by f2; f2 4 use priv_db; @@ -692,11 +643,11 @@ ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for table 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; +select f1 from t1 order by f1; f1 -4 2 -select f2 from t2; +4 +select f2 from t2 order by f2; f2 1 use priv_db; @@ -709,12 +660,12 @@ ERROR 42000: SELECT command denied to user 'test_yesprivs'@'localhost' for table 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; +select f1 from t1 order by f1; f1 -4 -2 1 -select f2 from t2; +2 +4 +select f2 from t2 order by f2; f2 1 select @aaa; @@ -730,13 +681,13 @@ ERROR 42000: DELETE command denied to user 'test_yesprivs'@'localhost' for table 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; +select f1 from t1 order by f1; f1 -4 -2 1 1 -select f2 from t2; +2 +4 +select f2 from t2 order by f2; f2 drop database if exists priv_db; drop user test_yesprivs@localhost; diff --git a/mysql-test/suite/funcs_1/r/memory_trig_0407.result b/mysql-test/suite/funcs_1/r/memory_trig_0407.result index 14974428ecf..65bb3b91c9e 100644 --- a/mysql-test/suite/funcs_1/r/memory_trig_0407.result +++ b/mysql-test/suite/funcs_1/r/memory_trig_0407.result @@ -1,64 +1,65 @@ 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 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) +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 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb3.txt' +into table tb3; Testcase: 3.5: -------------- @@ -82,22 +83,22 @@ 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 +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; +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; +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; +Select * from t1 order by f1; f1 -Trigger 3.5.4.1 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'; @@ -121,7 +122,7 @@ 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 +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 @@ -142,7 +143,7 @@ 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 +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'); @@ -178,7 +179,7 @@ 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 +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'); @@ -215,7 +216,7 @@ 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 +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; @@ -223,7 +224,7 @@ drop table t1_temp; Testcase 3.5.5.3: ----------------- Create view vw3 as select f118 from tb3; -Create trigger trg3 before INSERT +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; @@ -251,7 +252,7 @@ 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; +Select * from dbtest_two.t2 order by f1; f1 1st Insert 3.5. 2nd Insert 3.5. @@ -304,9 +305,9 @@ drop trigger tb3.trg4_2; Testcase 3.5.7.5 / 3.5.7.6: --------------------------- -Create trigger trg5_1 BEFORE INSERT +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 +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'); @@ -324,9 +325,9 @@ 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 +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 +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; @@ -352,9 +353,9 @@ delete from tb3 where f121='Test 3.5.7.7/8'; Testcase 3.5.7.9/10: -------------------- -Create trigger trg7_1 BEFORE UPDATE +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 +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'); @@ -372,9 +373,9 @@ 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 +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 +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; @@ -402,9 +403,9 @@ 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 +Create trigger trg9_1 BEFORE DELETE on tb3 for each row set @test_var=@test_var+1; -Create trigger trg9_2 BEFORE DELETE +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; @@ -434,12 +435,12 @@ 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 +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 +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 +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; diff --git a/mysql-test/suite/funcs_1/r/memory_trig_08.result b/mysql-test/suite/funcs_1/r/memory_trig_08.result index a703de751c2..3224df54f4d 100644 --- a/mysql-test/suite/funcs_1/r/memory_trig_08.result +++ b/mysql-test/suite/funcs_1/r/memory_trig_08.result @@ -1,64 +1,65 @@ 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 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) +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 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb3.txt' +into table tb3; Testcase: 3.5: -------------- @@ -83,17 +84,17 @@ 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 ( +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 ( +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 ( +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, @@ -116,18 +117,18 @@ Insert into t1_d values ('f',222,99999,999.99); use test; Create trigger trg1 AFTER INSERT on tb3 for each row BEGIN -insert into db_test.t1_i +insert into db_test.t1_i values (new.f120, new.f136, new.f144, new.f163); -update db_test.t1_u +update db_test.t1_u set u144=new.f144, u163=new.f163 -where u136=new.f136; +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; +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) +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 @@ -155,14 +156,22 @@ select @test_var; 3.5.8.4 - single SQL - insert ----------------------------- Create trigger trg2 BEFORE UPDATE on tb3 for each row -insert into db_test.t1_i +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; +select * from db_test.t1_i order by i120; i120 i136 i144 i163 1 00222 0000023456 1.050000000000000000000000000000 I 00222 0000023456 1.050000000000000000000000000000 @@ -171,7 +180,7 @@ I 00222 0000023456 1.050000000000000000000000000000 ----------------------------- drop trigger trg2; Create trigger trg3 BEFORE UPDATE on tb3 for each row -update db_test.t1_u +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' @@ -179,27 +188,27 @@ update tb3 set f120='U', 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 U Test 3.5.8.4-Single Update 00222 0000023456 1.050000000000000000000000000000 -select * from db_test.t1_u; +select * from db_test.t1_u order by u120; u120 u136 u144 u163 a 00111 0000099999 999.990000000000000000000000000000 -U 00222 0000023456 1.050000000000000000000000000000 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 -f 00333 0000099999 999.990000000000000000000000000000 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, +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; +select * from db_test.t1_d order by d120; d120 d136 d144 d163 a 00111 0000099999 999.990000000000000000000000000000 c 00333 0000099999 999.990000000000000000000000000000 @@ -208,10 +217,10 @@ c 00333 0000099999 999.990000000000000000000000000000 ------------------------------- 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 +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, +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%'; @@ -239,36 +248,36 @@ 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 +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'; +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'; +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'; +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 -d Test 3.5.8.5-if 00010 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'; +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 00010 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 @@ -283,7 +292,7 @@ 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 +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 @@ -325,60 +334,60 @@ ELSE set @test_var=CONCAT(new.f120, '*', new.f144); END case; END// set @test_var='Empty'; -Insert into tb3 (f120, f122, f136, f144) +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'; +select f120, f122, f136, f144, @test_var +from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; f120 f122 f136 f144 @test_var A Test 3.5.8.5-case 00125 0000000007 A*seven -Insert into tb3 (f120, f122, f136, f144) +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'; +select f120, f122, f136, f144, @test_var +from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; 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) +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'; +select f120, f122, f136, f144, @test_var +from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; 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) +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'; +select f120, f122, f136, f144, @test_var +from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; 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 -1 Test 3.5.8.5-case 00152 0000099999 1*0000099999 -Insert into tb3 (f120, f122, f136, f144) +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'; +select f120, f122, f136, f144, @test_var +from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; 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 -1 Test 3.5.8.5-case 00152 0000099999 1=eight -1 Test 3.5.8.5-case 00200 0000000008 1=eight -Insert into tb3 (f120, f122, f136, f144) +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'; +select f120, f122, f136, f144, @test_var +from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; 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 -1 Test 3.5.8.5-case 00152 0000099999 1=eight -1 Test 3.5.8.5-case 00200 0000000008 1=eight create trigger trg3a before update on tb3 for each row BEGIN CASE @@ -392,40 +401,40 @@ 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 +BEGIN set @counter=0, @flag='Initial'; -Label1: loop +Label1: loop if new.f136<new.f144 then set @counter='Nothing to loop'; -leave Label1; +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; +end if; +end if; +iterate label1; set @flag='Final'; -END loop Label1; +END loop Label1; END// -Insert into tb3 (f122, f136, f144) +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) +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 +BEGIN +Label1: loop set @counter=@counter+1; -END; +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 '; +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; @@ -435,23 +444,23 @@ Testcase 3.5.8.5-repeat: ------------------------ Create trigger trg6 after insert on tb3 for each row BEGIN -rp_label: REPEAT -SET @counter1 = @counter1 + 1; +rp_label: REPEAT +SET @counter1 = @counter1 + 1; IF (@counter1 MOD 2 = 0) THEN ITERATE rp_label; END IF; -SET @counter2 = @counter2 + 1; +SET @counter2 = @counter2 + 1; UNTIL @counter1> new.f136 END REPEAT rp_label; END// set @counter1= 0, @counter2= 0; -Insert into tb3 (f122, f136) +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; +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; @@ -460,33 +469,62 @@ 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; +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; +SET @counter2 = @counter2 + 1; END WHILE wl_label// set @counter1= 0, @counter2= 0; -Insert into tb3 (f122, f136) +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; +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; +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) ------------------------------------ +CREATE PROCEDURE sp_01 () BEGIN set @v1=1; END// +CREATE TRIGGER trg8_1 BEFORE UPDATE ON tb3 FOR EACH ROW +BEGIN +CALL sp_01 (); +END// +Insert into tb3 (f120, f122, f136) values ('6', 'Test 3.5.8.6-insert', 101); +update tb3 set f120='S', f136=111, +f122='Test 3.5.8.6-tr8_1' + where f122='Test 3.5.8.6-insert'; +select f120, f122 +from tb3 where f122 like 'Test 3.5.8.6%' order by f120; +f120 f122 +S Test 3.5.8.6-tr8_1 +DROP TRIGGER trg8_1; +DROP PROCEDURE sp_01; -Testcase 3.5.8.7: (Disabled as a result of bug _____) ------------------------------------------------------ +Testcase 3.5.8.7 +---------------- +Create trigger trg9_1 before update on tb3 for each row +BEGIN +Start transaction; +Set new.f120='U'; +Commit; +END// +ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger. +Create trigger trg9_2 before delete on tb3 for each row +BEGIN +Start transaction; +Set @var2=old.f120; +Rollback; +END// +ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger. drop user test_general@localhost; drop user test_general; drop user test_super@localhost; diff --git a/mysql-test/suite/funcs_1/r/memory_trig_09.result b/mysql-test/suite/funcs_1/r/memory_trig_09.result index da8b15901d9..b14e0a02aa2 100644 --- a/mysql-test/suite/funcs_1/r/memory_trig_09.result +++ b/mysql-test/suite/funcs_1/r/memory_trig_09.result @@ -1,68 +1,69 @@ 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 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) +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 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb3.txt' +into table tb3; Testcase 3.5.9.1/2: ------------------- -Create trigger trg1 BEFORE UPDATE on tb3 for each row +Create trigger trg1 BEFORE UPDATE on tb3 for each row set new.f142 = 94087, @counter=@counter+1; TotalRows 10 @@ -74,15 +75,15 @@ NewValuew 0 set @counter=0; Update tb3 Set f142='1' where f130<100; -select count(*) as ExpectedChanged, @counter as TrigCounter +select count(*) as ExpectedChanged, @counter as TrigCounter from tb3 where f142=94087; ExpectedChanged TrigCounter 9 9 -select count(*) as ExpectedNotChange from tb3 +select count(*) as ExpectedNotChange from tb3 where f130<100 and f142<>94087; ExpectedNotChange 0 -select count(*) as NonExpectedChanged from tb3 +select count(*) as NonExpectedChanged from tb3 where f130>=130 and f142=94087; NonExpectedChanged 0 @@ -110,17 +111,17 @@ set @tr_var_af_118=old.f118, @tr_var_af_121=old.f121, 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) +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'; +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, +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, +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 @@ -129,13 +130,13 @@ a NULL Test 3.5.9.3 7 123.170000000000000000000000000000 @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'; +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, +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, +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 @@ -166,17 +167,17 @@ set @tr_var_af_118=new.f118, @tr_var_af_121=new.f121, 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) +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%'; +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, +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, +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 @@ -188,15 +189,15 @@ 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'; +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, +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, +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 @@ -234,6 +235,7 @@ 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 trg5a; drop trigger trg5b; Testcase 3.5.9.10: (implied in previous tests) diff --git a/mysql-test/suite/funcs_1/r/memory_trig_1011ext.result b/mysql-test/suite/funcs_1/r/memory_trig_1011ext.result index 8fc9178f494..5f7859189aa 100644 --- a/mysql-test/suite/funcs_1/r/memory_trig_1011ext.result +++ b/mysql-test/suite/funcs_1/r/memory_trig_1011ext.result @@ -1,64 +1,65 @@ 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 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) +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 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb3.txt' +into table tb3; Testcase 3.5.10.1/2/3: ---------------------- @@ -80,7 +81,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%'; +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 @@ -94,7 +95,7 @@ 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%'; +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 @@ -108,7 +109,7 @@ 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%'; +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; @@ -135,11 +136,11 @@ 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; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table tb_load; select @counter as 'Rows Loaded After'; Rows Loaded After 10 -Select * from tb_load limit 10; +Select * from tb_load order by f1 limit 10; f1 f2 f3 -5000 a` 1000 -4999 aaa 999 @@ -234,7 +235,7 @@ 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; +select * from t3 order by f1; f1 12 102 @@ -269,17 +270,17 @@ 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; +select * from t1 order by f1; f1 0 1 -select * from t2; +select * from t2 order by f2; f2 2 -select * from t3; +select * from t3 order by f3; f3 3 -select * from t4; +select * from t4 order by f4; f4 4 drop trigger tr1; @@ -291,8 +292,8 @@ drop table t2; drop table t3; drop table t4; -Testcase y.y.y.4: Recursive trigger/SP references (disabled bug 11889) ----------------------------------------------------------------------- +Testcase y.y.y.4: Recursive trigger/SP references +------------------------------------------------- set @sql_mode='traditional'; create table t1_sp ( count integer, @@ -380,14 +381,14 @@ start transaction; insert into t1 values (1); ERROR 22003: Out of range value adjusted for column 'f4' at row 1 commit; -select * from t1; +select * from t1 order by f1; f1 1 1 -select * from t2; +select * from t2 order by f2; f2 2 -select * from t3; +select * from t3 order by f3; f3 3 drop trigger tr1; diff --git a/mysql-test/suite/funcs_1/r/memory_views.result b/mysql-test/suite/funcs_1/r/memory_views.result index cc50c8219f0..7bd674b8d76 100644 --- a/mysql-test/suite/funcs_1/r/memory_views.result +++ b/mysql-test/suite/funcs_1/r/memory_views.result @@ -1,117 +1,119 @@ USE test; drop table if exists tb2 ; 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", +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; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb2.txt' into table tb2 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb2.txt' +into table tb2 ; DROP DATABASE IF EXISTS test1; CREATE DATABASE test1; USE test1; drop table if exists tb2 ; 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", +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; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb2.txt' into table tb2 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb2.txt' +into table tb2 ; USE test; ! Attention: The file with the expected results is not diff --git a/mysql-test/suite/funcs_1/r/myisam_func_view.result b/mysql-test/suite/funcs_1/r/myisam_func_view.result index 94cba9796a2..c2689a36801 100644 --- a/mysql-test/suite/funcs_1/r/myisam_func_view.result +++ b/mysql-test/suite/funcs_1/r/myisam_func_view.result @@ -1,7 +1,3 @@ - -! Attention: The file with the expected results suffers from -Bug#10713: mysqldump includes database in create view and referenced tables --------------------------------------------------------------------------------- DROP TABLE IF EXISTS t1_selects, t1_modes, t1_values; DROP VIEW IF EXISTS v1; CREATE TABLE t1_values @@ -9,7 +5,7 @@ CREATE TABLE t1_values id BIGINT AUTO_INCREMENT, select_id BIGINT, PRIMARY KEY(id) -) ENGINE = 'MYISAM' ; +) ENGINE = <engine_to_be_tested>; ALTER TABLE t1_values ADD my_char_30 CHAR(30); ALTER TABLE t1_values ADD my_varchar_1000 VARCHAR(1000); ALTER TABLE t1_values ADD my_binary_30 BINARY(30); @@ -39,10 +35,10 @@ my_bigint = -9223372036854775808, my_decimal = -9999999999999999999999999999999999.999999999999999999999999999999 , my_double = -1.7976931348623E+308; INSERT INTO t1_values SET -my_char_30 = '<--------30 characters------->', +my_char_30 = '<--------30 characters------->', my_varchar_1000 = CONCAT('<---------1000 characters', RPAD('',965,'-'),'--------->'), -my_binary_30 = '<--------30 characters------->', +my_binary_30 = '<--------30 characters------->', my_varbinary_1000 = CONCAT('<---------1000 characters', RPAD('',965,'-'),'--------->'), my_datetime = '9999-12-31 23:59:59', @@ -54,23 +50,23 @@ my_bigint = 9223372036854775807, my_decimal = +9999999999999999999999999999999999.999999999999999999999999999999 , my_double = 1.7976931348623E+308; INSERT INTO t1_values SET -my_char_30 = ' ---äÖüß@µ*$-- ', -my_varchar_1000 = ' ---äÖüß@µ*$-- ', -my_binary_30 = ' ---äÖüß@µ*$-- ', -my_varbinary_1000 = ' ---äÖüß@µ*$-- ', +my_char_30 = ' ---äÖüß@µ*$-- ', +my_varchar_1000 = ' ---äÖüß@µ*$-- ', +my_binary_30 = ' ---äÖüß@µ*$-- ', +my_varbinary_1000 = ' ---äÖüß@µ*$-- ', my_datetime = '2004-02-29 23:59:59', my_date = '2004-02-29', my_timestamp = '2004-02-29 23:59:59', my_time = '13:00:00', my_year = 2000, -my_bigint = 0, +my_bigint = 0, my_decimal = 0.0, my_double = 0; INSERT INTO t1_values SET -my_char_30 = '-1', -my_varchar_1000 = '-1', -my_binary_30 = '-1', -my_varbinary_1000 = '-1', +my_char_30 = '-1', +my_varchar_1000 = '-1', +my_binary_30 = '-1', +my_varbinary_1000 = '-1', my_datetime = '2005-06-28 10:00:00', my_date = '2005-06-28', my_timestamp = '2005-06-28 10:00:00', @@ -89,6 +85,9 @@ INSERT INTO t1_values SET select_id = @select_id, my_bigint = 4; INSERT INTO t1_values SET select_id = @select_id, my_bigint = -25; +##### 1.1.1. CAST --> BINARY +##### 1.1.2. CAST --> CHAR +##### 1.1.3. CAST --> DATE INSERT INTO t1_values SET select_id = @select_id, my_char_30 = '2005-06-27'; INSERT INTO t1_values SET select_id = @select_id, @@ -101,6 +100,7 @@ INSERT INTO t1_values SET select_id = @select_id, my_bigint = 20050627; INSERT INTO t1_values SET select_id = @select_id, my_double = +20.050627E+6; +##### 1.1.4. CAST --> DATETIME INSERT INTO t1_values SET select_id = @select_id, my_char_30 = '2005-06-27 17:58'; INSERT INTO t1_values SET select_id = @select_id, @@ -113,6 +113,7 @@ INSERT INTO t1_values SET select_id = @select_id, my_bigint = 200506271758; INSERT INTO t1_values SET select_id = @select_id, my_double = +0.0200506271758E+13; +##### 1.1.5. CAST --> TIME INSERT INTO t1_values SET select_id = @select_id, my_char_30 = '1 17:58'; INSERT INTO t1_values SET select_id = @select_id, @@ -123,10 +124,9 @@ INSERT INTO t1_values SET select_id = @select_id, my_varbinary_1000 = '1 17:58'; INSERT INTO t1_values SET select_id = @select_id, my_bigint = 1758; - -some statements disabled because of -Bug#12440: CAST(data type DOUBLE AS TIME) strange results --------------------------------------------------------------------------------- +INSERT INTO t1_values SET select_id = @select_id, +my_double = +1.758E+3; +##### 1.1.6. CAST --> DECIMAL INSERT INTO t1_values SET select_id = @select_id, my_char_30 = '-3333.3333'; INSERT INTO t1_values SET select_id = @select_id, @@ -135,51 +135,39 @@ INSERT INTO t1_values SET select_id = @select_id, my_binary_30 = '-3333.3333'; INSERT INTO t1_values SET select_id = @select_id, my_varbinary_1000 = '-3333.3333'; - -some statements disabled because of -Bug#13349: CAST(1.0E+300 TO DECIMAL) returns wrong result + diff little/big endian --------------------------------------------------------------------------------- +INSERT INTO t1_values SET select_id = @select_id, +my_double = -0.33333333E+4; +##### 1.1.7. CAST --> SIGNED INTEGER "Attention: CAST --> SIGNED INTEGER - The file with expected results suffers from - Bug#5083 Big integer values are inserted as negative into - decimal/string columns Bug#5913 Traditional mode: BIGINT range not correctly delimited - Both have the status: To be fixed later" --------------------------------------------------------------------------------- - -some statements disabled because of -Bug #13344: CAST(1E+300 TO signed int) on little endian CPU, wrong result + Status: To be fixed later" -------------------------------------------------------------------------------- +##### 1.1.8. CAST --> UNSIGNED INTEGER "Attention: CAST --> UNSIGNED INTEGER - The file with expected results suffers from Bug 5083 5913 9809" + The file with expected results suffers from Bug 5913" -------------------------------------------------------------------------------- some statements disabled because of -Bugs#8663: cant use bgint unsigned as input to cast +Bug#5913 Traditional mode: BIGINT range not correctly delimited -------------------------------------------------------------------------------- -SET @my_select = 'SELECT CONVERT(my_char_30 USING utf8), +SET @my_select = 'SELECT CONVERT(my_char_30 USING utf8), my_char_30, id FROM t1_values'; -SET @my_select = 'SELECT CONVERT(my_varchar_1000 USING utf8), +SET @my_select = 'SELECT CONVERT(my_varchar_1000 USING utf8), my_varchar_1000, id FROM t1_values'; -SET @my_select = 'SELECT CONVERT(my_binary_30 USING utf8), +SET @my_select = 'SELECT CONVERT(my_binary_30 USING utf8), my_binary_30, id FROM t1_values'; -SET @my_select = 'SELECT CONVERT(my_varbinary_1000 USING utf8), +SET @my_select = 'SELECT CONVERT(my_varbinary_1000 USING utf8), my_varbinary_1000, id FROM t1_values'; -SET @my_select = 'SELECT CONVERT(my_char_30 USING koi8r), +SET @my_select = 'SELECT CONVERT(my_char_30 USING koi8r), my_char_30, id FROM t1_values'; -SET @my_select = 'SELECT CONVERT(my_varchar_1000 USING koi8r), +SET @my_select = 'SELECT CONVERT(my_varchar_1000 USING koi8r), my_varchar_1000, id FROM t1_values'; -SET @my_select = 'SELECT CONVERT(my_binary_30 USING koi8r), +SET @my_select = 'SELECT CONVERT(my_binary_30 USING koi8r), my_binary_30, id FROM t1_values'; -SET @my_select = 'SELECT CONVERT(my_varbinary_1000 USING koi8r), +SET @my_select = 'SELECT CONVERT(my_varbinary_1000 USING koi8r), my_varbinary_1000, id FROM t1_values'; - -"Attention: IF(my_year IS NULL, ... - The file with expected results suffers from - Bug#11689. successful CREATE VIEW but SELECT on view fails." --------------------------------------------------------------------------------- SET @my_select = 'SELECT BIT_LENGTH(my_char_30), my_char_30, id FROM t1_values'; SET @my_select = 'SELECT BIT_LENGTH(my_varchar_1000), @@ -192,22 +180,20 @@ SET @my_select = 'SELECT INSTR(my_char_30, ''char''), my_char_30, id FROM t1_values'; SET @my_select = 'SELECT LCASE(my_varchar_1000), my_varchar_1000, id FROM t1_values'; -SET @my_select = +SET @my_select = 'SELECT LEFT(my_char_30, 2), my_char_30, id FROM t1_values'; -SET @my_select = +SET @my_select = 'SELECT LEFT(my_varchar_1000, 2), my_varchar_1000, id FROM t1_values'; -SET @my_select = +SET @my_select = 'SELECT LEFT(my_binary_30, 2), my_binary_30, id FROM t1_values'; -SET @my_select = +SET @my_select = 'SELECT LEFT(my_varbinary_1000, 2), my_varbinary_1000, id FROM t1_values'; - -"Attention: LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', <numeric column>) - The file with expected results suffers from Bug 10963 11728" - and the testcases with length = BIGINT or DOUBLE column are deactivated, -because there are 32/64 Bit differences --------------------------------------------------------------------------------- +SET @my_select = +'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_bigint), my_bigint, id FROM t1_values'; SET @my_select = 'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_decimal), my_decimal, id FROM t1_values'; +SET @my_select = +'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_double), my_double, id FROM t1_values'; SET @my_select = 'SELECT LENGTH(my_char_30), my_char_30, id FROM t1_values'; SET @my_select = 'SELECT LENGTH(my_varchar_1000), @@ -216,8 +202,10 @@ SET @my_select = 'SELECT LENGTH(my_binary_30), my_binary_30, id FROM t1_values'; SET @my_select = 'SELECT LENGTH(my_varbinary_1000), my_varbinary_1000, id FROM t1_values'; -SET @my_select = -'SELECT LOAD_FILE(''../log/current_test''), id FROM t1_values'; +SET @my_select = +'SELECT LOAD_FILE(''<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/load_file.txt'') + AS my_col, + id FROM t1_values'; SET @my_select = 'SELECT LOCATE(''char'', my_char_30), my_char_30, id FROM t1_values'; SET @my_select = 'SELECT LOCATE(''char'', my_varchar_1000), @@ -299,19 +287,19 @@ SET sql_mode = ''; -------------------------------------------------------------------------------- CREATE VIEW v1 AS SELECT my_char_30, id FROM t1_values; SELECT my_char_30, id FROM t1_values -WHERE select_id = 187 OR select_id IS NULL; +WHERE select_id = 193 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 187 OR select_id IS NULL); +WHERE select_id = 193 OR select_id IS NULL) order by id; DROP VIEW v1; CREATE VIEW v1 AS SELECT CONCAT('A',my_char_30), my_char_30, id FROM t1_values; SELECT CONCAT('A',my_char_30), my_char_30, id FROM t1_values -WHERE select_id = 186 OR select_id IS NULL; +WHERE select_id = 192 OR select_id IS NULL order by id; CONCAT('A',my_char_30) my_char_30 id NULL NULL 1 A 2 @@ -323,7 +311,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select concat(_latin1'A',`t1_values`.`my_char_30`) AS `CONCAT('A',my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 186 OR select_id IS NULL); +WHERE select_id = 192 OR select_id IS NULL) order by id; CONCAT('A',my_char_30) my_char_30 id NULL NULL 1 A 2 @@ -337,13 +325,13 @@ CREATE VIEW v1 AS SELECT LTRIM(my_varbinary_1000), my_varbinary_1000, id FROM t1_values; SELECT LTRIM(my_varbinary_1000), my_varbinary_1000, id FROM t1_values -WHERE select_id = 185 OR select_id IS NULL; +WHERE select_id = 191 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_varbinary_1000`) AS `LTRIM(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 185 OR select_id IS NULL); +WHERE select_id = 191 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -351,13 +339,13 @@ CREATE VIEW v1 AS SELECT LTRIM(my_binary_30), my_binary_30, id FROM t1_values; SELECT LTRIM(my_binary_30), my_binary_30, id FROM t1_values -WHERE select_id = 184 OR select_id IS NULL; +WHERE select_id = 190 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_binary_30`) AS `LTRIM(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 184 OR select_id IS NULL); +WHERE select_id = 190 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -365,13 +353,13 @@ CREATE VIEW v1 AS SELECT LTRIM(my_varchar_1000), my_varchar_1000, id FROM t1_values; SELECT LTRIM(my_varchar_1000), my_varchar_1000, id FROM t1_values -WHERE select_id = 183 OR select_id IS NULL; +WHERE select_id = 189 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_varchar_1000`) AS `LTRIM(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 183 OR select_id IS NULL); +WHERE select_id = 189 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -379,13 +367,13 @@ CREATE VIEW v1 AS SELECT LTRIM(my_char_30), my_char_30, id FROM t1_values; SELECT LTRIM(my_char_30), my_char_30, id FROM t1_values -WHERE select_id = 182 OR select_id IS NULL; +WHERE select_id = 188 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_char_30`) AS `LTRIM(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 182 OR select_id IS NULL); +WHERE select_id = 188 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -393,13 +381,13 @@ CREATE VIEW v1 AS SELECT LOWER(my_varbinary_1000), my_varbinary_1000, id FROM t1_values; SELECT LOWER(my_varbinary_1000), my_varbinary_1000, id FROM t1_values -WHERE select_id = 181 OR select_id IS NULL; +WHERE select_id = 187 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varbinary_1000`) AS `LOWER(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 181 OR select_id IS NULL); +WHERE select_id = 187 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -407,13 +395,13 @@ CREATE VIEW v1 AS SELECT LOWER(my_binary_30), my_binary_30, id FROM t1_values; SELECT LOWER(my_binary_30), my_binary_30, id FROM t1_values -WHERE select_id = 180 OR select_id IS NULL; +WHERE select_id = 186 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_binary_30`) AS `LOWER(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 180 OR select_id IS NULL); +WHERE select_id = 186 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -421,13 +409,13 @@ CREATE VIEW v1 AS SELECT LOWER(my_varchar_1000), my_varchar_1000, id FROM t1_values; SELECT LOWER(my_varchar_1000), my_varchar_1000, id FROM t1_values -WHERE select_id = 179 OR select_id IS NULL; +WHERE select_id = 185 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varchar_1000`) AS `LOWER(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 179 OR select_id IS NULL); +WHERE select_id = 185 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -435,13 +423,13 @@ CREATE VIEW v1 AS SELECT LOWER(my_char_30), my_char_30, id FROM t1_values; SELECT LOWER(my_char_30), my_char_30, id FROM t1_values -WHERE select_id = 178 OR select_id IS NULL; +WHERE select_id = 184 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_char_30`) AS `LOWER(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 178 OR select_id IS NULL); +WHERE select_id = 184 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -449,13 +437,13 @@ CREATE VIEW v1 AS SELECT LOCATE('-', ' - -ABC', my_decimal), my_decimal, id FROM t1_values; SELECT LOCATE('-', ' - -ABC', my_decimal), my_decimal, id FROM t1_values -WHERE select_id = 177 OR select_id IS NULL; +WHERE select_id = 183 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',_latin1' - -ABC',`t1_values`.`my_decimal`) AS `LOCATE('-', ' - -ABC', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 177 OR select_id IS NULL); +WHERE select_id = 183 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -463,13 +451,13 @@ CREATE VIEW v1 AS SELECT LOCATE('-', ' - -ABC', my_double), my_double, id FROM t1_values; SELECT LOCATE('-', ' - -ABC', my_double), my_double, id FROM t1_values -WHERE select_id = 176 OR select_id IS NULL; +WHERE select_id = 182 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',_latin1' - -ABC',`t1_values`.`my_double`) AS `LOCATE('-', ' - -ABC', my_double)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 176 OR select_id IS NULL); +WHERE select_id = 182 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -477,13 +465,13 @@ CREATE VIEW v1 AS SELECT LOCATE('-', ' - -ABC', my_bigint), my_bigint, id FROM t1_values; SELECT LOCATE('-', ' - -ABC', my_bigint), my_bigint, id FROM t1_values -WHERE select_id = 175 OR select_id IS NULL; +WHERE select_id = 181 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',_latin1' - -ABC',`t1_values`.`my_bigint`) AS `LOCATE('-', ' - -ABC', my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 175 OR select_id IS NULL); +WHERE select_id = 181 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -491,13 +479,13 @@ CREATE VIEW v1 AS SELECT LOCATE('-', my_varbinary_1000, 3), my_varbinary_1000, id FROM t1_values; SELECT LOCATE('-', my_varbinary_1000, 3), my_varbinary_1000, id FROM t1_values -WHERE select_id = 174 OR select_id IS NULL; +WHERE select_id = 180 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',`t1_values`.`my_varbinary_1000`,3) AS `LOCATE('-', my_varbinary_1000, 3)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 174 OR select_id IS NULL); +WHERE select_id = 180 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -505,13 +493,13 @@ CREATE VIEW v1 AS SELECT LOCATE('-', my_binary_30, 3), my_binary_30, id FROM t1_values; SELECT LOCATE('-', my_binary_30, 3), my_binary_30, id FROM t1_values -WHERE select_id = 173 OR select_id IS NULL; +WHERE select_id = 179 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',`t1_values`.`my_binary_30`,3) AS `LOCATE('-', my_binary_30, 3)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 173 OR select_id IS NULL); +WHERE select_id = 179 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -519,13 +507,13 @@ CREATE VIEW v1 AS SELECT LOCATE('-', my_varchar_1000, 3), my_varchar_1000, id FROM t1_values; SELECT LOCATE('-', my_varchar_1000, 3), my_varchar_1000, id FROM t1_values -WHERE select_id = 172 OR select_id IS NULL; +WHERE select_id = 178 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',`t1_values`.`my_varchar_1000`,3) AS `LOCATE('-', my_varchar_1000, 3)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 172 OR select_id IS NULL); +WHERE select_id = 178 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -533,13 +521,13 @@ CREATE VIEW v1 AS SELECT LOCATE('-', my_char_30, 3), my_char_30, id FROM t1_values; SELECT LOCATE('-', my_char_30, 3), my_char_30, id FROM t1_values -WHERE select_id = 171 OR select_id IS NULL; +WHERE select_id = 177 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',`t1_values`.`my_char_30`,3) AS `LOCATE('-', my_char_30, 3)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 171 OR select_id IS NULL); +WHERE select_id = 177 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -547,13 +535,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_varbinary_1000, my_binary_30 ), my_varbinary_1000, my_binary_30 id FROM t1_values; SELECT LOCATE(my_varbinary_1000, my_binary_30 ), my_varbinary_1000, my_binary_30 id FROM t1_values -WHERE select_id = 170 OR select_id IS NULL; +WHERE select_id = 176 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_binary_30`) AS `LOCATE(my_varbinary_1000, my_binary_30 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_binary_30` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 170 OR select_id IS NULL); +WHERE select_id = 176 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -561,13 +549,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_varbinary_1000, my_varchar_1000 ), my_varbinary_1000, my_varchar_1000 id FROM t1_values; SELECT LOCATE(my_varbinary_1000, my_varchar_1000 ), my_varbinary_1000, my_varchar_1000 id FROM t1_values -WHERE select_id = 169 OR select_id IS NULL; +WHERE select_id = 175 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_varbinary_1000, my_varchar_1000 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 169 OR select_id IS NULL); +WHERE select_id = 175 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -575,13 +563,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_varbinary_1000, my_char_30 ), my_varbinary_1000, my_char_30 id FROM t1_values; SELECT LOCATE(my_varbinary_1000, my_char_30 ), my_varbinary_1000, my_char_30 id FROM t1_values -WHERE select_id = 168 OR select_id IS NULL; +WHERE select_id = 174 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_char_30`) AS `LOCATE(my_varbinary_1000, my_char_30 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_char_30` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 168 OR select_id IS NULL); +WHERE select_id = 174 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -589,13 +577,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_varbinary_1000, my_varbinary_1000 ), my_varbinary_1000, id FROM t1_values; SELECT LOCATE(my_varbinary_1000, my_varbinary_1000 ), my_varbinary_1000, id FROM t1_values -WHERE select_id = 167 OR select_id IS NULL; +WHERE select_id = 173 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_varbinary_1000, my_varbinary_1000 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 167 OR select_id IS NULL); +WHERE select_id = 173 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -603,13 +591,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_binary_30, my_varbinary_1000 ), my_binary_30, my_varbinary_1000 id FROM t1_values; SELECT LOCATE(my_binary_30, my_varbinary_1000 ), my_binary_30, my_varbinary_1000 id FROM t1_values -WHERE select_id = 166 OR select_id IS NULL; +WHERE select_id = 172 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_binary_30, my_varbinary_1000 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 166 OR select_id IS NULL); +WHERE select_id = 172 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -617,13 +605,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_binary_30, my_varchar_1000 ), my_binary_30, my_varchar_1000 id FROM t1_values; SELECT LOCATE(my_binary_30, my_varchar_1000 ), my_binary_30, my_varchar_1000 id FROM t1_values -WHERE select_id = 165 OR select_id IS NULL; +WHERE select_id = 171 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_binary_30, my_varchar_1000 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 165 OR select_id IS NULL); +WHERE select_id = 171 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -631,13 +619,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_binary_30, my_char_30 ), my_binary_30, my_char_30 id FROM t1_values; SELECT LOCATE(my_binary_30, my_char_30 ), my_binary_30, my_char_30 id FROM t1_values -WHERE select_id = 164 OR select_id IS NULL; +WHERE select_id = 170 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_char_30`) AS `LOCATE(my_binary_30, my_char_30 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_char_30` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 164 OR select_id IS NULL); +WHERE select_id = 170 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -645,13 +633,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_binary_30, my_binary_30 ), my_binary_30, id FROM t1_values; SELECT LOCATE(my_binary_30, my_binary_30 ), my_binary_30, id FROM t1_values -WHERE select_id = 163 OR select_id IS NULL; +WHERE select_id = 169 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_binary_30`) AS `LOCATE(my_binary_30, my_binary_30 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 163 OR select_id IS NULL); +WHERE select_id = 169 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -659,13 +647,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_varchar_1000, my_varbinary_1000 ), my_varchar_1000, my_varbinary_1000 id FROM t1_values; SELECT LOCATE(my_varchar_1000, my_varbinary_1000 ), my_varchar_1000, my_varbinary_1000 id FROM t1_values -WHERE select_id = 162 OR select_id IS NULL; +WHERE select_id = 168 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_varchar_1000, my_varbinary_1000 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 162 OR select_id IS NULL); +WHERE select_id = 168 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -673,13 +661,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_varchar_1000, my_binary_30 ), my_varchar_1000, my_binary_30 id FROM t1_values; SELECT LOCATE(my_varchar_1000, my_binary_30 ), my_varchar_1000, my_binary_30 id FROM t1_values -WHERE select_id = 161 OR select_id IS NULL; +WHERE select_id = 167 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_binary_30`) AS `LOCATE(my_varchar_1000, my_binary_30 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_binary_30` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 161 OR select_id IS NULL); +WHERE select_id = 167 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -687,13 +675,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_varchar_1000, my_char_30 ), my_varchar_1000, my_char_30 id FROM t1_values; SELECT LOCATE(my_varchar_1000, my_char_30 ), my_varchar_1000, my_char_30 id FROM t1_values -WHERE select_id = 160 OR select_id IS NULL; +WHERE select_id = 166 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_char_30`) AS `LOCATE(my_varchar_1000, my_char_30 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_char_30` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 160 OR select_id IS NULL); +WHERE select_id = 166 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -701,13 +689,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_varchar_1000, my_varchar_1000 ), my_varchar_1000, id FROM t1_values; SELECT LOCATE(my_varchar_1000, my_varchar_1000 ), my_varchar_1000, id FROM t1_values -WHERE select_id = 159 OR select_id IS NULL; +WHERE select_id = 165 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_varchar_1000, my_varchar_1000 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 159 OR select_id IS NULL); +WHERE select_id = 165 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -715,13 +703,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_char_30, my_varbinary_1000 ), my_char_30, my_varbinary_1000 id FROM t1_values; SELECT LOCATE(my_char_30, my_varbinary_1000 ), my_char_30, my_varbinary_1000 id FROM t1_values -WHERE select_id = 158 OR select_id IS NULL; +WHERE select_id = 164 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_char_30, my_varbinary_1000 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 158 OR select_id IS NULL); +WHERE select_id = 164 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -729,13 +717,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_char_30, my_binary_30 ), my_char_30, my_binary_30 id FROM t1_values; SELECT LOCATE(my_char_30, my_binary_30 ), my_char_30, my_binary_30 id FROM t1_values -WHERE select_id = 157 OR select_id IS NULL; +WHERE select_id = 163 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_binary_30`) AS `LOCATE(my_char_30, my_binary_30 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_binary_30` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 157 OR select_id IS NULL); +WHERE select_id = 163 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -743,13 +731,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_char_30, my_varchar_1000 ), my_char_30, my_varchar_1000 id FROM t1_values; SELECT LOCATE(my_char_30, my_varchar_1000 ), my_char_30, my_varchar_1000 id FROM t1_values -WHERE select_id = 156 OR select_id IS NULL; +WHERE select_id = 162 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_char_30, my_varchar_1000 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 156 OR select_id IS NULL); +WHERE select_id = 162 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -757,13 +745,13 @@ CREATE VIEW v1 AS SELECT LOCATE(my_char_30, my_char_30 ), my_char_30, id FROM t1_values; SELECT LOCATE(my_char_30, my_char_30 ), my_char_30, id FROM t1_values -WHERE select_id = 155 OR select_id IS NULL; +WHERE select_id = 161 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_char_30`) AS `LOCATE(my_char_30, my_char_30 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 155 OR select_id IS NULL); +WHERE select_id = 161 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -771,13 +759,13 @@ CREATE VIEW v1 AS SELECT LOCATE('char', my_varbinary_1000), my_varbinary_1000, id FROM t1_values; SELECT LOCATE('char', my_varbinary_1000), my_varbinary_1000, id FROM t1_values -WHERE select_id = 154 OR select_id IS NULL; +WHERE select_id = 160 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'char',`t1_values`.`my_varbinary_1000`) AS `LOCATE('char', my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 154 OR select_id IS NULL); +WHERE select_id = 160 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -785,13 +773,13 @@ CREATE VIEW v1 AS SELECT LOCATE('char', my_binary_30), my_binary_30, id FROM t1_values; SELECT LOCATE('char', my_binary_30), my_binary_30, id FROM t1_values -WHERE select_id = 153 OR select_id IS NULL; +WHERE select_id = 159 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'char',`t1_values`.`my_binary_30`) AS `LOCATE('char', my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 153 OR select_id IS NULL); +WHERE select_id = 159 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -799,13 +787,13 @@ CREATE VIEW v1 AS SELECT LOCATE('char', my_varchar_1000), my_varchar_1000, id FROM t1_values; SELECT LOCATE('char', my_varchar_1000), my_varchar_1000, id FROM t1_values -WHERE select_id = 152 OR select_id IS NULL; +WHERE select_id = 158 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'char',`t1_values`.`my_varchar_1000`) AS `LOCATE('char', my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 152 OR select_id IS NULL); +WHERE select_id = 158 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -813,46 +801,50 @@ CREATE VIEW v1 AS SELECT LOCATE('char', my_char_30), my_char_30, id FROM t1_values; SELECT LOCATE('char', my_char_30), my_char_30, id FROM t1_values -WHERE select_id = 151 OR select_id IS NULL; +WHERE select_id = 157 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'char',`t1_values`.`my_char_30`) AS `LOCATE('char', my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 151 OR select_id IS NULL); +WHERE select_id = 157 OR select_id IS NULL) order by id; DROP VIEW v1; -CREATE VIEW v1 AS SELECT LOAD_FILE('../log/current_test'), id FROM t1_values; -SELECT LOAD_FILE('../log/current_test'), id FROM t1_values -WHERE select_id = 150 OR select_id IS NULL; -LOAD_FILE('../log/current_test') id -CURRENT_TEST: myisam_func_view +CREATE VIEW v1 AS SELECT LOAD_FILE('<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/load_file.txt') + AS my_col, + id FROM t1_values; +SELECT LOAD_FILE('<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/load_file.txt') + AS my_col, + id FROM t1_values +WHERE select_id = 156 OR select_id IS NULL order by id; +my_col id +Here is content from load_file 1 -CURRENT_TEST: myisam_func_view +Here is content from load_file 2 -CURRENT_TEST: myisam_func_view +Here is content from load_file 3 -CURRENT_TEST: myisam_func_view +Here is content from load_file 4 -CURRENT_TEST: myisam_func_view +Here is content from load_file 5 SHOW CREATE VIEW v1; View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select load_file(_latin1'../log/current_test') AS `LOAD_FILE('../log/current_test')`,`t1_values`.`id` AS `id` from `t1_values` +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select load_file(_latin1'<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/load_file.txt') AS `my_col`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 150 OR select_id IS NULL); -LOAD_FILE('../log/current_test') id -CURRENT_TEST: myisam_func_view +WHERE select_id = 156 OR select_id IS NULL) order by id; +my_col id +Here is content from load_file 1 -CURRENT_TEST: myisam_func_view +Here is content from load_file 2 -CURRENT_TEST: myisam_func_view +Here is content from load_file 3 -CURRENT_TEST: myisam_func_view +Here is content from load_file 4 -CURRENT_TEST: myisam_func_view +Here is content from load_file 5 DROP VIEW v1; @@ -861,13 +853,13 @@ CREATE VIEW v1 AS SELECT LENGTH(my_varbinary_1000), my_varbinary_1000, id FROM t1_values; SELECT LENGTH(my_varbinary_1000), my_varbinary_1000, id FROM t1_values -WHERE select_id = 149 OR select_id IS NULL; +WHERE select_id = 155 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_varbinary_1000`) AS `LENGTH(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 149 OR select_id IS NULL); +WHERE select_id = 155 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -875,13 +867,13 @@ CREATE VIEW v1 AS SELECT LENGTH(my_binary_30), my_binary_30, id FROM t1_values; SELECT LENGTH(my_binary_30), my_binary_30, id FROM t1_values -WHERE select_id = 148 OR select_id IS NULL; +WHERE select_id = 154 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_binary_30`) AS `LENGTH(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 148 OR select_id IS NULL); +WHERE select_id = 154 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -889,13 +881,13 @@ CREATE VIEW v1 AS SELECT LENGTH(my_varchar_1000), my_varchar_1000, id FROM t1_values; SELECT LENGTH(my_varchar_1000), my_varchar_1000, id FROM t1_values -WHERE select_id = 147 OR select_id IS NULL; +WHERE select_id = 153 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_varchar_1000`) AS `LENGTH(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 147 OR select_id IS NULL); +WHERE select_id = 153 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -903,19 +895,49 @@ CREATE VIEW v1 AS SELECT LENGTH(my_char_30), my_char_30, id FROM t1_values; SELECT LENGTH(my_char_30), my_char_30, id FROM t1_values -WHERE select_id = 146 OR select_id IS NULL; +WHERE select_id = 152 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_char_30`) AS `LENGTH(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 146 OR select_id IS NULL); +WHERE select_id = 152 OR select_id IS NULL) order by id; +DROP VIEW v1; + + +CREATE VIEW v1 AS SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double), my_double, id FROM t1_values; +SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double), my_double, id FROM t1_values +WHERE select_id = 151 OR select_id IS NULL order by id; +LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double) my_double id +NULL NULL 1 + -1.7976931348623e+308 2 +AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 1.7976931348623e+308 3 + 0 4 + -1 5 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' +Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' +SHOW CREATE VIEW v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(_latin1'AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_double`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +SELECT v1.* FROM v1 +WHERE v1.id IN (SELECT id FROM t1_values +WHERE select_id = 151 OR select_id IS NULL) order by id; +LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double) my_double id +NULL NULL 1 + -1.7976931348623e+308 2 +AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 1.7976931348623e+308 3 + 0 4 + -1 5 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' +Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' DROP VIEW v1; CREATE VIEW v1 AS SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal), my_decimal, id FROM t1_values; SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal), my_decimal, id FROM t1_values -WHERE select_id = 145 OR select_id IS NULL; +WHERE select_id = 150 OR select_id IS NULL order by id; LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal) my_decimal id NULL NULL 1 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -930,7 +952,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(_latin1'AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_decimal`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 145 OR select_id IS NULL); +WHERE select_id = 150 OR select_id IS NULL) order by id; LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal) my_decimal id NULL NULL 1 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -943,9 +965,33 @@ Error 1292 Truncated incorrect DECIMAL value: '' DROP VIEW v1; +CREATE VIEW v1 AS SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint), my_bigint, id FROM t1_values; +SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint), my_bigint, id FROM t1_values +WHERE select_id = 149 OR select_id IS NULL order by id; +LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint) my_bigint id +NULL NULL 1 + -9223372036854775808 2 +AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9223372036854775807 3 + 0 4 + -1 5 +SHOW CREATE VIEW v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(_latin1'AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_bigint`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` +SELECT v1.* FROM v1 +WHERE v1.id IN (SELECT id FROM t1_values +WHERE select_id = 149 OR select_id IS NULL) order by id; +LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint) my_bigint id +NULL NULL 1 + -9223372036854775808 2 +AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9223372036854775807 3 + 0 4 + -1 5 +DROP VIEW v1; + + CREATE VIEW v1 AS SELECT LEFT(my_varbinary_1000, 2), my_varbinary_1000, id FROM t1_values; SELECT LEFT(my_varbinary_1000, 2), my_varbinary_1000, id FROM t1_values -WHERE select_id = 144 OR select_id IS NULL; +WHERE select_id = 148 OR select_id IS NULL order by id; LEFT(my_varbinary_1000, 2) my_varbinary_1000 id NULL NULL 1 2 @@ -957,7 +1003,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_varbinary_1000`,2) AS `LEFT(my_varbinary_1000, 2)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 144 OR select_id IS NULL); +WHERE select_id = 148 OR select_id IS NULL) order by id; LEFT(my_varbinary_1000, 2) my_varbinary_1000 id NULL NULL 1 2 @@ -969,19 +1015,19 @@ DROP VIEW v1; CREATE VIEW v1 AS SELECT LEFT(my_binary_30, 2), my_binary_30, id FROM t1_values; SELECT LEFT(my_binary_30, 2), my_binary_30, id FROM t1_values -WHERE select_id = 143 OR select_id IS NULL; +WHERE select_id = 147 OR select_id IS NULL order by id; LEFT(my_binary_30, 2) my_binary_30 id NULL NULL 1 - + 2 <- <--------30 characters-------> 3 - - ---äÖüß@µ*$-- --1 -1 + - ---äÖüß@µ*$-- 4 +-1 -1 5 SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_binary_30`,2) AS `LEFT(my_binary_30, 2)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 143 OR select_id IS NULL); +WHERE select_id = 147 OR select_id IS NULL) order by id; LEFT(my_binary_30, 2) my_binary_30 id NULL NULL 1 @@ -993,7 +1039,7 @@ DROP VIEW v1; CREATE VIEW v1 AS SELECT LEFT(my_varchar_1000, 2), my_varchar_1000, id FROM t1_values; SELECT LEFT(my_varchar_1000, 2), my_varchar_1000, id FROM t1_values -WHERE select_id = 142 OR select_id IS NULL; +WHERE select_id = 146 OR select_id IS NULL order by id; LEFT(my_varchar_1000, 2) my_varchar_1000 id NULL NULL 1 2 @@ -1005,7 +1051,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_varchar_1000`,2) AS `LEFT(my_varchar_1000, 2)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 142 OR select_id IS NULL); +WHERE select_id = 146 OR select_id IS NULL) order by id; LEFT(my_varchar_1000, 2) my_varchar_1000 id NULL NULL 1 2 @@ -1017,7 +1063,7 @@ DROP VIEW v1; CREATE VIEW v1 AS SELECT LEFT(my_char_30, 2), my_char_30, id FROM t1_values; SELECT LEFT(my_char_30, 2), my_char_30, id FROM t1_values -WHERE select_id = 141 OR select_id IS NULL; +WHERE select_id = 145 OR select_id IS NULL order by id; LEFT(my_char_30, 2) my_char_30 id NULL NULL 1 2 @@ -1029,7 +1075,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_char_30`,2) AS `LEFT(my_char_30, 2)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 141 OR select_id IS NULL); +WHERE select_id = 145 OR select_id IS NULL) order by id; LEFT(my_char_30, 2) my_char_30 id NULL NULL 1 2 @@ -1043,13 +1089,13 @@ CREATE VIEW v1 AS SELECT LCASE(my_varchar_1000), my_varchar_1000, id FROM t1_values; SELECT LCASE(my_varchar_1000), my_varchar_1000, id FROM t1_values -WHERE select_id = 140 OR select_id IS NULL; +WHERE select_id = 144 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varchar_1000`) AS `LCASE(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 140 OR select_id IS NULL); +WHERE select_id = 144 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -1057,13 +1103,13 @@ CREATE VIEW v1 AS SELECT INSTR(my_char_30, 'char'), my_char_30, id FROM t1_values; SELECT INSTR(my_char_30, 'char'), my_char_30, id FROM t1_values -WHERE select_id = 139 OR select_id IS NULL; +WHERE select_id = 143 OR select_id IS NULL order by id; SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'char',`t1_values`.`my_char_30`) AS `INSTR(my_char_30, 'char')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 139 OR select_id IS NULL); +WHERE select_id = 143 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -1071,7 +1117,7 @@ CREATE VIEW v1 AS SELECT BIT_LENGTH(my_varbinary_1000), my_varbinary_1000, id FROM t1_values; SELECT BIT_LENGTH(my_varbinary_1000), my_varbinary_1000, id FROM t1_values -WHERE select_id = 138 OR select_id IS NULL; +WHERE select_id = 142 OR select_id IS NULL order by id; BIT_LENGTH(my_varbinary_1000) my_varbinary_1000 id NULL NULL 1 0 2 @@ -1083,7 +1129,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_varbinary_1000`) AS `BIT_LENGTH(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 138 OR select_id IS NULL); +WHERE select_id = 142 OR select_id IS NULL) order by id; BIT_LENGTH(my_varbinary_1000) my_varbinary_1000 id NULL NULL 1 0 2 @@ -1097,19 +1143,19 @@ CREATE VIEW v1 AS SELECT BIT_LENGTH(my_binary_30), my_binary_30, id FROM t1_values; SELECT BIT_LENGTH(my_binary_30), my_binary_30, id FROM t1_values -WHERE select_id = 137 OR select_id IS NULL; +WHERE select_id = 141 OR select_id IS NULL order by id; BIT_LENGTH(my_binary_30) my_binary_30 id NULL NULL 1 -240 +240 2 240 <--------30 characters-------> 3 -240 ---äÖüß@µ*$-- -240 -1 +240 ---äÖüß@µ*$-- 4 +240 -1 5 SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_binary_30`) AS `BIT_LENGTH(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 137 OR select_id IS NULL); +WHERE select_id = 141 OR select_id IS NULL) order by id; BIT_LENGTH(my_binary_30) my_binary_30 id NULL NULL 1 240 @@ -1123,7 +1169,7 @@ CREATE VIEW v1 AS SELECT BIT_LENGTH(my_varchar_1000), my_varchar_1000, id FROM t1_values; SELECT BIT_LENGTH(my_varchar_1000), my_varchar_1000, id FROM t1_values -WHERE select_id = 136 OR select_id IS NULL; +WHERE select_id = 140 OR select_id IS NULL order by id; BIT_LENGTH(my_varchar_1000) my_varchar_1000 id NULL NULL 1 0 2 @@ -1135,7 +1181,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_varchar_1000`) AS `BIT_LENGTH(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 136 OR select_id IS NULL); +WHERE select_id = 140 OR select_id IS NULL) order by id; BIT_LENGTH(my_varchar_1000) my_varchar_1000 id NULL NULL 1 0 2 @@ -1149,7 +1195,7 @@ CREATE VIEW v1 AS SELECT BIT_LENGTH(my_char_30), my_char_30, id FROM t1_values; SELECT BIT_LENGTH(my_char_30), my_char_30, id FROM t1_values -WHERE select_id = 135 OR select_id IS NULL; +WHERE select_id = 139 OR select_id IS NULL order by id; BIT_LENGTH(my_char_30) my_char_30 id NULL NULL 1 0 2 @@ -1161,7 +1207,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_char_30`) AS `BIT_LENGTH(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 135 OR select_id IS NULL); +WHERE select_id = 139 OR select_id IS NULL) order by id; BIT_LENGTH(my_char_30) my_char_30 id NULL NULL 1 0 2 @@ -1175,7 +1221,7 @@ CREATE VIEW v1 AS SELECT IFNULL(my_year,'IS_NULL'), my_year, id FROM t1_values; SELECT IFNULL(my_year,'IS_NULL'), my_year, id FROM t1_values -WHERE select_id = 134 OR select_id IS NULL; +WHERE select_id = 138 OR select_id IS NULL order by id; IFNULL(my_year,'IS_NULL') my_year id IS_NULL NULL 1 1901 1901 2 @@ -1187,7 +1233,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_year`,_latin1'IS_NULL') AS `IFNULL(my_year,'IS_NULL')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 134 OR select_id IS NULL); +WHERE select_id = 138 OR select_id IS NULL) order by id; IFNULL(my_year,'IS_NULL') my_year id IS_NULL NULL 1 1901 1901 2 @@ -1201,7 +1247,7 @@ CREATE VIEW v1 AS SELECT IFNULL(my_time,'IS_NULL'), my_time, id FROM t1_values; SELECT IFNULL(my_time,'IS_NULL'), my_time, id FROM t1_values -WHERE select_id = 133 OR select_id IS NULL; +WHERE select_id = 137 OR select_id IS NULL order by id; IFNULL(my_time,'IS_NULL') my_time id IS_NULL NULL 1 -838:59:59 -838:59:59 2 @@ -1213,7 +1259,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_time`,_latin1'IS_NULL') AS `IFNULL(my_time,'IS_NULL')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 133 OR select_id IS NULL); +WHERE select_id = 137 OR select_id IS NULL) order by id; IFNULL(my_time,'IS_NULL') my_time id IS_NULL NULL 1 -838:59:59 -838:59:59 2 @@ -1227,7 +1273,7 @@ CREATE VIEW v1 AS SELECT IFNULL(my_timestamp,'IS_NULL'), my_timestamp, id FROM t1_values; SELECT IFNULL(my_timestamp,'IS_NULL'), my_timestamp, id FROM t1_values -WHERE select_id = 132 OR select_id IS NULL; +WHERE select_id = 136 OR select_id IS NULL order by id; IFNULL(my_timestamp,'IS_NULL') my_timestamp id 0000-00-00 00:00:00 0000-00-00 00:00:00 1 1970-01-01 03:00:01 1970-01-01 03:00:01 2 @@ -1239,7 +1285,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_timestamp`,_latin1'IS_NULL') AS `IFNULL(my_timestamp,'IS_NULL')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 132 OR select_id IS NULL); +WHERE select_id = 136 OR select_id IS NULL) order by id; IFNULL(my_timestamp,'IS_NULL') my_timestamp id 0000-00-00 00:00:00 0000-00-00 00:00:00 1 1970-01-01 03:00:01 1970-01-01 03:00:01 2 @@ -1253,7 +1299,7 @@ CREATE VIEW v1 AS SELECT IFNULL(my_date,'IS_NULL'), my_date, id FROM t1_values; SELECT IFNULL(my_date,'IS_NULL'), my_date, id FROM t1_values -WHERE select_id = 131 OR select_id IS NULL; +WHERE select_id = 135 OR select_id IS NULL order by id; IFNULL(my_date,'IS_NULL') my_date id IS_NULL NULL 1 0001-01-01 0001-01-01 2 @@ -1265,7 +1311,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_date`,_latin1'IS_NULL') AS `IFNULL(my_date,'IS_NULL')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 131 OR select_id IS NULL); +WHERE select_id = 135 OR select_id IS NULL) order by id; IFNULL(my_date,'IS_NULL') my_date id IS_NULL NULL 1 0001-01-01 0001-01-01 2 @@ -1279,7 +1325,7 @@ CREATE VIEW v1 AS SELECT IFNULL(my_datetime,'IS_NULL'), my_datetime, id FROM t1_values; SELECT IFNULL(my_datetime,'IS_NULL'), my_datetime, id FROM t1_values -WHERE select_id = 130 OR select_id IS NULL; +WHERE select_id = 134 OR select_id IS NULL order by id; IFNULL(my_datetime,'IS_NULL') my_datetime id IS_NULL NULL 1 0001-01-01 00:00:00 0001-01-01 00:00:00 2 @@ -1291,7 +1337,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_datetime`,_latin1'IS_NULL') AS `IFNULL(my_datetime,'IS_NULL')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 130 OR select_id IS NULL); +WHERE select_id = 134 OR select_id IS NULL) order by id; IFNULL(my_datetime,'IS_NULL') my_datetime id IS_NULL NULL 1 0001-01-01 00:00:00 0001-01-01 00:00:00 2 @@ -1305,7 +1351,7 @@ CREATE VIEW v1 AS SELECT IFNULL(my_double,'IS_NULL'), my_double, id FROM t1_values; SELECT IFNULL(my_double,'IS_NULL'), my_double, id FROM t1_values -WHERE select_id = 129 OR select_id IS NULL; +WHERE select_id = 133 OR select_id IS NULL order by id; IFNULL(my_double,'IS_NULL') my_double id IS_NULL NULL 1 -1.7976931348623e+308 -1.7976931348623e+308 2 @@ -1317,7 +1363,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_double`,_latin1'IS_NULL') AS `IFNULL(my_double,'IS_NULL')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 129 OR select_id IS NULL); +WHERE select_id = 133 OR select_id IS NULL) order by id; IFNULL(my_double,'IS_NULL') my_double id IS_NULL NULL 1 -1.7976931348623e+308 -1.7976931348623e+308 2 @@ -1331,7 +1377,7 @@ CREATE VIEW v1 AS SELECT IFNULL(my_decimal,'IS_NULL'), my_decimal, id FROM t1_values; SELECT IFNULL(my_decimal,'IS_NULL'), my_decimal, id FROM t1_values -WHERE select_id = 128 OR select_id IS NULL; +WHERE select_id = 132 OR select_id IS NULL order by id; IFNULL(my_decimal,'IS_NULL') my_decimal id IS_NULL NULL 1 -9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -1343,7 +1389,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_decimal`,_latin1'IS_NULL') AS `IFNULL(my_decimal,'IS_NULL')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 128 OR select_id IS NULL); +WHERE select_id = 132 OR select_id IS NULL) order by id; IFNULL(my_decimal,'IS_NULL') my_decimal id IS_NULL NULL 1 -9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -1357,7 +1403,7 @@ CREATE VIEW v1 AS SELECT IFNULL(my_bigint,'IS_NULL'), my_bigint, id FROM t1_values; SELECT IFNULL(my_bigint,'IS_NULL'), my_bigint, id FROM t1_values -WHERE select_id = 127 OR select_id IS NULL; +WHERE select_id = 131 OR select_id IS NULL order by id; IFNULL(my_bigint,'IS_NULL') my_bigint id IS_NULL NULL 1 -9223372036854775808 -9223372036854775808 2 @@ -1369,7 +1415,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_bigint`,_latin1'IS_NULL') AS `IFNULL(my_bigint,'IS_NULL')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 127 OR select_id IS NULL); +WHERE select_id = 131 OR select_id IS NULL) order by id; IFNULL(my_bigint,'IS_NULL') my_bigint id IS_NULL NULL 1 -9223372036854775808 -9223372036854775808 2 @@ -1383,7 +1429,7 @@ CREATE VIEW v1 AS SELECT IFNULL(my_varbinary_1000,'IS_NULL'), my_varbinary_1000, id FROM t1_values; SELECT IFNULL(my_varbinary_1000,'IS_NULL'), my_varbinary_1000, id FROM t1_values -WHERE select_id = 126 OR select_id IS NULL; +WHERE select_id = 130 OR select_id IS NULL order by id; IFNULL(my_varbinary_1000,'IS_NULL') my_varbinary_1000 id IS_NULL NULL 1 2 @@ -1395,7 +1441,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_varbinary_1000`,_latin1'IS_NULL') AS `IFNULL(my_varbinary_1000,'IS_NULL')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 126 OR select_id IS NULL); +WHERE select_id = 130 OR select_id IS NULL) order by id; IFNULL(my_varbinary_1000,'IS_NULL') my_varbinary_1000 id IS_NULL NULL 1 2 @@ -1409,19 +1455,19 @@ CREATE VIEW v1 AS SELECT IFNULL(my_binary_30,'IS_NULL'), my_binary_30, id FROM t1_values; SELECT IFNULL(my_binary_30,'IS_NULL'), my_binary_30, id FROM t1_values -WHERE select_id = 125 OR select_id IS NULL; +WHERE select_id = 129 OR select_id IS NULL order by id; IFNULL(my_binary_30,'IS_NULL') my_binary_30 id IS_NULL NULL 1 - + 2 <--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- --1 + ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 +-1 -1 5 SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_binary_30`,_latin1'IS_NULL') AS `IFNULL(my_binary_30,'IS_NULL')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 125 OR select_id IS NULL); +WHERE select_id = 129 OR select_id IS NULL) order by id; IFNULL(my_binary_30,'IS_NULL') my_binary_30 id IS_NULL NULL 1 @@ -1435,7 +1481,7 @@ CREATE VIEW v1 AS SELECT IFNULL(my_varchar_1000,'IS_NULL'), my_varchar_1000, id FROM t1_values; SELECT IFNULL(my_varchar_1000,'IS_NULL'), my_varchar_1000, id FROM t1_values -WHERE select_id = 124 OR select_id IS NULL; +WHERE select_id = 128 OR select_id IS NULL order by id; IFNULL(my_varchar_1000,'IS_NULL') my_varchar_1000 id IS_NULL NULL 1 2 @@ -1447,7 +1493,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_varchar_1000`,_latin1'IS_NULL') AS `IFNULL(my_varchar_1000,'IS_NULL')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 124 OR select_id IS NULL); +WHERE select_id = 128 OR select_id IS NULL) order by id; IFNULL(my_varchar_1000,'IS_NULL') my_varchar_1000 id IS_NULL NULL 1 2 @@ -1461,7 +1507,7 @@ CREATE VIEW v1 AS SELECT IFNULL(my_char_30,'IS_NULL'), my_char_30, id FROM t1_values; SELECT IFNULL(my_char_30,'IS_NULL'), my_char_30, id FROM t1_values -WHERE select_id = 123 OR select_id IS NULL; +WHERE select_id = 127 OR select_id IS NULL order by id; IFNULL(my_char_30,'IS_NULL') my_char_30 id IS_NULL NULL 1 2 @@ -1473,7 +1519,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_char_30`,_latin1'IS_NULL') AS `IFNULL(my_char_30,'IS_NULL')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 123 OR select_id IS NULL); +WHERE select_id = 127 OR select_id IS NULL) order by id; IFNULL(my_char_30,'IS_NULL') my_char_30 id IS_NULL NULL 1 2 @@ -1487,7 +1533,7 @@ CREATE VIEW v1 AS SELECT IF(my_year IS NULL, 'IS NULL', 'IS NOT NULL'), my_year, id FROM t1_values; SELECT IF(my_year IS NULL, 'IS NULL', 'IS NOT NULL'), my_year, id FROM t1_values -WHERE select_id = 122 OR select_id IS NULL; +WHERE select_id = 126 OR select_id IS NULL order by id; IF(my_year IS NULL, 'IS NULL', 'IS NOT NULL') my_year id IS NULL NULL 1 @@ -1501,7 +1547,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI 'IS NOT NULL')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 122 OR select_id IS NULL); +WHERE select_id = 126 OR select_id IS NULL) order by id; IF(my_year IS NULL, 'IS NULL', 'IS NOT NULL') my_year id IS NULL NULL 1 @@ -1516,7 +1562,7 @@ CREATE VIEW v1 AS SELECT IF(my_time IS NULL, 'IS NULL', 'IS NOT NULL'), my_time, id FROM t1_values; SELECT IF(my_time IS NULL, 'IS NULL', 'IS NOT NULL'), my_time, id FROM t1_values -WHERE select_id = 121 OR select_id IS NULL; +WHERE select_id = 125 OR select_id IS NULL order by id; IF(my_time IS NULL, 'IS NULL', 'IS NOT NULL') my_time id IS NULL NULL 1 @@ -1530,7 +1576,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI 'IS NOT NULL')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 121 OR select_id IS NULL); +WHERE select_id = 125 OR select_id IS NULL) order by id; IF(my_time IS NULL, 'IS NULL', 'IS NOT NULL') my_time id IS NULL NULL 1 @@ -1545,7 +1591,7 @@ CREATE VIEW v1 AS SELECT IF(my_timestamp IS NULL, 'IS NULL', 'IS NOT NULL'), my_timestamp, id FROM t1_values; SELECT IF(my_timestamp IS NULL, 'IS NULL', 'IS NOT NULL'), my_timestamp, id FROM t1_values -WHERE select_id = 120 OR select_id IS NULL; +WHERE select_id = 124 OR select_id IS NULL order by id; IF(my_timestamp IS NULL, 'IS NULL', 'IS NOT NULL') my_timestamp id IS NOT NULL 0000-00-00 00:00:00 1 @@ -1559,7 +1605,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI 'IS NOT NULL')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 120 OR select_id IS NULL); +WHERE select_id = 124 OR select_id IS NULL) order by id; IF(my_timestamp IS NULL, 'IS NULL', 'IS NOT NULL') my_timestamp id IS NOT NULL 0000-00-00 00:00:00 1 @@ -1574,7 +1620,7 @@ CREATE VIEW v1 AS SELECT IF(my_date IS NULL, 'IS NULL', 'IS NOT NULL'), my_date, id FROM t1_values; SELECT IF(my_date IS NULL, 'IS NULL', 'IS NOT NULL'), my_date, id FROM t1_values -WHERE select_id = 119 OR select_id IS NULL; +WHERE select_id = 123 OR select_id IS NULL order by id; IF(my_date IS NULL, 'IS NULL', 'IS NOT NULL') my_date id IS NULL NULL 1 @@ -1588,7 +1634,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI 'IS NOT NULL')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 119 OR select_id IS NULL); +WHERE select_id = 123 OR select_id IS NULL) order by id; IF(my_date IS NULL, 'IS NULL', 'IS NOT NULL') my_date id IS NULL NULL 1 @@ -1603,7 +1649,7 @@ CREATE VIEW v1 AS SELECT IF(my_datetime IS NULL, 'IS NULL', 'IS NOT NULL'), my_datetime, id FROM t1_values; SELECT IF(my_datetime IS NULL, 'IS NULL', 'IS NOT NULL'), my_datetime, id FROM t1_values -WHERE select_id = 118 OR select_id IS NULL; +WHERE select_id = 122 OR select_id IS NULL order by id; IF(my_datetime IS NULL, 'IS NULL', 'IS NOT NULL') my_datetime id IS NULL NULL 1 @@ -1617,7 +1663,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI 'IS NOT NULL')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 118 OR select_id IS NULL); +WHERE select_id = 122 OR select_id IS NULL) order by id; IF(my_datetime IS NULL, 'IS NULL', 'IS NOT NULL') my_datetime id IS NULL NULL 1 @@ -1632,7 +1678,7 @@ CREATE VIEW v1 AS SELECT IF(my_double IS NULL, 'IS NULL', 'IS NOT NULL'), my_double, id FROM t1_values; SELECT IF(my_double IS NULL, 'IS NULL', 'IS NOT NULL'), my_double, id FROM t1_values -WHERE select_id = 117 OR select_id IS NULL; +WHERE select_id = 121 OR select_id IS NULL order by id; IF(my_double IS NULL, 'IS NULL', 'IS NOT NULL') my_double id IS NULL NULL 1 @@ -1646,7 +1692,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI 'IS NOT NULL')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 117 OR select_id IS NULL); +WHERE select_id = 121 OR select_id IS NULL) order by id; IF(my_double IS NULL, 'IS NULL', 'IS NOT NULL') my_double id IS NULL NULL 1 @@ -1661,7 +1707,7 @@ CREATE VIEW v1 AS SELECT IF(my_decimal IS NULL, 'IS NULL', 'IS NOT NULL'), my_decimal, id FROM t1_values; SELECT IF(my_decimal IS NULL, 'IS NULL', 'IS NOT NULL'), my_decimal, id FROM t1_values -WHERE select_id = 116 OR select_id IS NULL; +WHERE select_id = 120 OR select_id IS NULL order by id; IF(my_decimal IS NULL, 'IS NULL', 'IS NOT NULL') my_decimal id IS NULL NULL 1 @@ -1675,7 +1721,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI 'IS NOT NULL')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 116 OR select_id IS NULL); +WHERE select_id = 120 OR select_id IS NULL) order by id; IF(my_decimal IS NULL, 'IS NULL', 'IS NOT NULL') my_decimal id IS NULL NULL 1 @@ -1690,7 +1736,7 @@ CREATE VIEW v1 AS SELECT IF(my_bigint IS NULL, 'IS NULL', 'IS NOT NULL'), my_bigint, id FROM t1_values; SELECT IF(my_bigint IS NULL, 'IS NULL', 'IS NOT NULL'), my_bigint, id FROM t1_values -WHERE select_id = 115 OR select_id IS NULL; +WHERE select_id = 119 OR select_id IS NULL order by id; IF(my_bigint IS NULL, 'IS NULL', 'IS NOT NULL') my_bigint id IS NULL NULL 1 @@ -1704,7 +1750,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI 'IS NOT NULL')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 115 OR select_id IS NULL); +WHERE select_id = 119 OR select_id IS NULL) order by id; IF(my_bigint IS NULL, 'IS NULL', 'IS NOT NULL') my_bigint id IS NULL NULL 1 @@ -1719,7 +1765,7 @@ CREATE VIEW v1 AS SELECT IF(my_varbinary_1000 IS NULL, 'IS NULL', 'IS NOT NULL'), my_varbinary_1000, id FROM t1_values; SELECT IF(my_varbinary_1000 IS NULL, 'IS NULL', 'IS NOT NULL'), my_varbinary_1000, id FROM t1_values -WHERE select_id = 114 OR select_id IS NULL; +WHERE select_id = 118 OR select_id IS NULL order by id; IF(my_varbinary_1000 IS NULL, 'IS NULL', 'IS NOT NULL') my_varbinary_1000 id IS NULL NULL 1 @@ -1733,7 +1779,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI 'IS NOT NULL')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 114 OR select_id IS NULL); +WHERE select_id = 118 OR select_id IS NULL) order by id; IF(my_varbinary_1000 IS NULL, 'IS NULL', 'IS NOT NULL') my_varbinary_1000 id IS NULL NULL 1 @@ -1748,21 +1794,21 @@ CREATE VIEW v1 AS SELECT IF(my_binary_30 IS NULL, 'IS NULL', 'IS NOT NULL'), my_binary_30, id FROM t1_values; SELECT IF(my_binary_30 IS NULL, 'IS NULL', 'IS NOT NULL'), my_binary_30, id FROM t1_values -WHERE select_id = 113 OR select_id IS NULL; +WHERE select_id = 117 OR select_id IS NULL order by id; IF(my_binary_30 IS NULL, 'IS NULL', 'IS NOT NULL') my_binary_30 id IS NULL NULL 1 -IS NOT NULL +IS NOT NULL 2 IS NOT NULL <--------30 characters-------> 3 -IS NOT NULL ---äÖüß@µ*$-- -IS NOT NULL -1 +IS NOT NULL ---äÖüß@µ*$-- 4 +IS NOT NULL -1 5 SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_binary_30`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_binary_30 IS NULL, 'IS NULL', 'IS NOT NULL')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 113 OR select_id IS NULL); +WHERE select_id = 117 OR select_id IS NULL) order by id; IF(my_binary_30 IS NULL, 'IS NULL', 'IS NOT NULL') my_binary_30 id IS NULL NULL 1 @@ -1777,7 +1823,7 @@ CREATE VIEW v1 AS SELECT IF(my_varchar_1000 IS NULL, 'IS NULL', 'IS NOT NULL'), my_varchar_1000, id FROM t1_values; SELECT IF(my_varchar_1000 IS NULL, 'IS NULL', 'IS NOT NULL'), my_varchar_1000, id FROM t1_values -WHERE select_id = 112 OR select_id IS NULL; +WHERE select_id = 116 OR select_id IS NULL order by id; IF(my_varchar_1000 IS NULL, 'IS NULL', 'IS NOT NULL') my_varchar_1000 id IS NULL NULL 1 @@ -1791,7 +1837,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI 'IS NOT NULL')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 112 OR select_id IS NULL); +WHERE select_id = 116 OR select_id IS NULL) order by id; IF(my_varchar_1000 IS NULL, 'IS NULL', 'IS NOT NULL') my_varchar_1000 id IS NULL NULL 1 @@ -1806,7 +1852,7 @@ CREATE VIEW v1 AS SELECT IF(my_char_30 IS NULL, 'IS NULL', 'IS NOT NULL'), my_char_30, id FROM t1_values; SELECT IF(my_char_30 IS NULL, 'IS NULL', 'IS NOT NULL'), my_char_30, id FROM t1_values -WHERE select_id = 111 OR select_id IS NULL; +WHERE select_id = 115 OR select_id IS NULL order by id; IF(my_char_30 IS NULL, 'IS NULL', 'IS NOT NULL') my_char_30 id IS NULL NULL 1 @@ -1820,7 +1866,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI 'IS NOT NULL')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 111 OR select_id IS NULL); +WHERE select_id = 115 OR select_id IS NULL) order by id; IF(my_char_30 IS NULL, 'IS NULL', 'IS NOT NULL') my_char_30 id IS NULL NULL 1 @@ -1835,7 +1881,7 @@ CREATE VIEW v1 AS SELECT IF(my_year, 'IS TRUE', 'IS NOT TRUE'), my_year, id FROM t1_values; SELECT IF(my_year, 'IS TRUE', 'IS NOT TRUE'), my_year, id FROM t1_values -WHERE select_id = 110 OR select_id IS NULL; +WHERE select_id = 114 OR select_id IS NULL order by id; IF(my_year, 'IS TRUE', 'IS NOT TRUE') my_year id IS NOT TRUE NULL 1 IS TRUE 1901 2 @@ -1847,7 +1893,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_year`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_year, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 110 OR select_id IS NULL); +WHERE select_id = 114 OR select_id IS NULL) order by id; IF(my_year, 'IS TRUE', 'IS NOT TRUE') my_year id IS NOT TRUE NULL 1 IS TRUE 1901 2 @@ -1861,7 +1907,7 @@ CREATE VIEW v1 AS SELECT IF(my_time, 'IS TRUE', 'IS NOT TRUE'), my_time, id FROM t1_values; SELECT IF(my_time, 'IS TRUE', 'IS NOT TRUE'), my_time, id FROM t1_values -WHERE select_id = 109 OR select_id IS NULL; +WHERE select_id = 113 OR select_id IS NULL order by id; IF(my_time, 'IS TRUE', 'IS NOT TRUE') my_time id IS NOT TRUE NULL 1 IS TRUE -838:59:59 2 @@ -1873,7 +1919,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_time`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_time, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 109 OR select_id IS NULL); +WHERE select_id = 113 OR select_id IS NULL) order by id; IF(my_time, 'IS TRUE', 'IS NOT TRUE') my_time id IS NOT TRUE NULL 1 IS TRUE -838:59:59 2 @@ -1887,7 +1933,7 @@ CREATE VIEW v1 AS SELECT IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE'), my_timestamp, id FROM t1_values; SELECT IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE'), my_timestamp, id FROM t1_values -WHERE select_id = 108 OR select_id IS NULL; +WHERE select_id = 112 OR select_id IS NULL order by id; IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE') my_timestamp id IS NOT TRUE 0000-00-00 00:00:00 1 IS TRUE 1970-01-01 03:00:01 2 @@ -1899,7 +1945,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_timestamp`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 108 OR select_id IS NULL); +WHERE select_id = 112 OR select_id IS NULL) order by id; IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE') my_timestamp id IS NOT TRUE 0000-00-00 00:00:00 1 IS TRUE 1970-01-01 03:00:01 2 @@ -1913,7 +1959,7 @@ CREATE VIEW v1 AS SELECT IF(my_date, 'IS TRUE', 'IS NOT TRUE'), my_date, id FROM t1_values; SELECT IF(my_date, 'IS TRUE', 'IS NOT TRUE'), my_date, id FROM t1_values -WHERE select_id = 107 OR select_id IS NULL; +WHERE select_id = 111 OR select_id IS NULL order by id; IF(my_date, 'IS TRUE', 'IS NOT TRUE') my_date id IS NOT TRUE NULL 1 IS TRUE 0001-01-01 2 @@ -1925,7 +1971,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_date`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_date, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 107 OR select_id IS NULL); +WHERE select_id = 111 OR select_id IS NULL) order by id; IF(my_date, 'IS TRUE', 'IS NOT TRUE') my_date id IS NOT TRUE NULL 1 IS TRUE 0001-01-01 2 @@ -1939,7 +1985,7 @@ CREATE VIEW v1 AS SELECT IF(my_datetime, 'IS TRUE', 'IS NOT TRUE'), my_datetime, id FROM t1_values; SELECT IF(my_datetime, 'IS TRUE', 'IS NOT TRUE'), my_datetime, id FROM t1_values -WHERE select_id = 106 OR select_id IS NULL; +WHERE select_id = 110 OR select_id IS NULL order by id; IF(my_datetime, 'IS TRUE', 'IS NOT TRUE') my_datetime id IS NOT TRUE NULL 1 IS TRUE 0001-01-01 00:00:00 2 @@ -1951,7 +1997,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_datetime`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_datetime, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 106 OR select_id IS NULL); +WHERE select_id = 110 OR select_id IS NULL) order by id; IF(my_datetime, 'IS TRUE', 'IS NOT TRUE') my_datetime id IS NOT TRUE NULL 1 IS TRUE 0001-01-01 00:00:00 2 @@ -1965,7 +2011,7 @@ CREATE VIEW v1 AS SELECT IF(my_double, 'IS TRUE', 'IS NOT TRUE'), my_double, id FROM t1_values; SELECT IF(my_double, 'IS TRUE', 'IS NOT TRUE'), my_double, id FROM t1_values -WHERE select_id = 105 OR select_id IS NULL; +WHERE select_id = 109 OR select_id IS NULL order by id; IF(my_double, 'IS TRUE', 'IS NOT TRUE') my_double id IS NOT TRUE NULL 1 IS TRUE -1.7976931348623e+308 2 @@ -1977,7 +2023,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_double`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_double, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 105 OR select_id IS NULL); +WHERE select_id = 109 OR select_id IS NULL) order by id; IF(my_double, 'IS TRUE', 'IS NOT TRUE') my_double id IS NOT TRUE NULL 1 IS TRUE -1.7976931348623e+308 2 @@ -1991,7 +2037,7 @@ CREATE VIEW v1 AS SELECT IF(my_decimal, 'IS TRUE', 'IS NOT TRUE'), my_decimal, id FROM t1_values; SELECT IF(my_decimal, 'IS TRUE', 'IS NOT TRUE'), my_decimal, id FROM t1_values -WHERE select_id = 104 OR select_id IS NULL; +WHERE select_id = 108 OR select_id IS NULL order by id; IF(my_decimal, 'IS TRUE', 'IS NOT TRUE') my_decimal id IS NOT TRUE NULL 1 IS TRUE -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -2003,7 +2049,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_decimal`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_decimal, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 104 OR select_id IS NULL); +WHERE select_id = 108 OR select_id IS NULL) order by id; IF(my_decimal, 'IS TRUE', 'IS NOT TRUE') my_decimal id IS NOT TRUE NULL 1 IS TRUE -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -2017,7 +2063,7 @@ CREATE VIEW v1 AS SELECT IF(my_bigint, 'IS TRUE', 'IS NOT TRUE'), my_bigint, id FROM t1_values; SELECT IF(my_bigint, 'IS TRUE', 'IS NOT TRUE'), my_bigint, id FROM t1_values -WHERE select_id = 103 OR select_id IS NULL; +WHERE select_id = 107 OR select_id IS NULL order by id; IF(my_bigint, 'IS TRUE', 'IS NOT TRUE') my_bigint id IS NOT TRUE NULL 1 IS TRUE -9223372036854775808 2 @@ -2029,7 +2075,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_bigint`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_bigint, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 103 OR select_id IS NULL); +WHERE select_id = 107 OR select_id IS NULL) order by id; IF(my_bigint, 'IS TRUE', 'IS NOT TRUE') my_bigint id IS NOT TRUE NULL 1 IS TRUE -9223372036854775808 2 @@ -2043,7 +2089,7 @@ CREATE VIEW v1 AS SELECT IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE'), my_varbinary_1000, id FROM t1_values; SELECT IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE'), my_varbinary_1000, id FROM t1_values -WHERE select_id = 102 OR select_id IS NULL; +WHERE select_id = 106 OR select_id IS NULL order by id; IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE') my_varbinary_1000 id IS NOT TRUE NULL 1 IS NOT TRUE 2 @@ -2055,7 +2101,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_varbinary_1000`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 102 OR select_id IS NULL); +WHERE select_id = 106 OR select_id IS NULL) order by id; IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE') my_varbinary_1000 id IS NOT TRUE NULL 1 IS NOT TRUE 2 @@ -2069,13 +2115,13 @@ CREATE VIEW v1 AS SELECT IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE'), my_binary_30, id FROM t1_values; SELECT IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE'), my_binary_30, id FROM t1_values -WHERE select_id = 101 OR select_id IS NULL; +WHERE select_id = 105 OR select_id IS NULL order by id; IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE') my_binary_30 id IS NOT TRUE NULL 1 -IS NOT TRUE +IS NOT TRUE 2 IS NOT TRUE <--------30 characters-------> 3 -IS NOT TRUE ---äÖüß@µ*$-- -IS TRUE -1 +IS NOT TRUE ---äÖüß@µ*$-- 4 +IS TRUE -1 5 Warnings: Warning 1292 Truncated incorrect DOUBLE value: '' Warning 1292 Truncated incorrect DOUBLE value: '<--------30 characters------->' @@ -2086,7 +2132,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_binary_30`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 101 OR select_id IS NULL); +WHERE select_id = 105 OR select_id IS NULL) order by id; IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE') my_binary_30 id IS NOT TRUE NULL 1 IS NOT TRUE @@ -2105,7 +2151,7 @@ CREATE VIEW v1 AS SELECT IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE'), my_varchar_1000, id FROM t1_values; SELECT IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE'), my_varchar_1000, id FROM t1_values -WHERE select_id = 100 OR select_id IS NULL; +WHERE select_id = 104 OR select_id IS NULL order by id; IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE') my_varchar_1000 id IS NOT TRUE NULL 1 IS NOT TRUE 2 @@ -2117,7 +2163,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_varchar_1000`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 100 OR select_id IS NULL); +WHERE select_id = 104 OR select_id IS NULL) order by id; IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE') my_varchar_1000 id IS NOT TRUE NULL 1 IS NOT TRUE 2 @@ -2131,7 +2177,7 @@ CREATE VIEW v1 AS SELECT IF(my_char_30, 'IS TRUE', 'IS NOT TRUE'), my_char_30, id FROM t1_values; SELECT IF(my_char_30, 'IS TRUE', 'IS NOT TRUE'), my_char_30, id FROM t1_values -WHERE select_id = 99 OR select_id IS NULL; +WHERE select_id = 103 OR select_id IS NULL order by id; IF(my_char_30, 'IS TRUE', 'IS NOT TRUE') my_char_30 id IS NOT TRUE NULL 1 IS NOT TRUE 2 @@ -2146,7 +2192,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_char_30`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_char_30, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 99 OR select_id IS NULL); +WHERE select_id = 103 OR select_id IS NULL) order by id; IF(my_char_30, 'IS TRUE', 'IS NOT TRUE') my_char_30 id IS NOT TRUE NULL 1 IS NOT TRUE 2 @@ -2159,11 +2205,11 @@ Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- ' DROP VIEW v1; -CREATE VIEW v1 AS SELECT CONVERT(my_varbinary_1000 USING koi8r), +CREATE VIEW v1 AS SELECT CONVERT(my_varbinary_1000 USING koi8r), my_varbinary_1000, id FROM t1_values; -SELECT CONVERT(my_varbinary_1000 USING koi8r), +SELECT CONVERT(my_varbinary_1000 USING koi8r), my_varbinary_1000, id FROM t1_values -WHERE select_id = 98 OR select_id IS NULL; +WHERE select_id = 102 OR select_id IS NULL order by id; CONVERT(my_varbinary_1000 USING koi8r) my_varbinary_1000 id NULL NULL 1 2 @@ -2175,7 +2221,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varbinary_1000` using koi8r) AS `CONVERT(my_varbinary_1000 USING koi8r)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 98 OR select_id IS NULL); +WHERE select_id = 102 OR select_id IS NULL) order by id; CONVERT(my_varbinary_1000 USING koi8r) my_varbinary_1000 id NULL NULL 1 2 @@ -2185,23 +2231,23 @@ NULL NULL 1 DROP VIEW v1; -CREATE VIEW v1 AS SELECT CONVERT(my_binary_30 USING koi8r), +CREATE VIEW v1 AS SELECT CONVERT(my_binary_30 USING koi8r), my_binary_30, id FROM t1_values; -SELECT CONVERT(my_binary_30 USING koi8r), +SELECT CONVERT(my_binary_30 USING koi8r), my_binary_30, id FROM t1_values -WHERE select_id = 97 OR select_id IS NULL; +WHERE select_id = 101 OR select_id IS NULL order by id; CONVERT(my_binary_30 USING koi8r) my_binary_30 id NULL NULL 1 - + 2 <--------30 characters-------> <--------30 characters-------> 3 - ---???????÷@??*$-- --1 + ---???????÷@??*$-- ---äÖüß@µ*$-- 4 +-1 -1 5 SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_binary_30` using koi8r) AS `CONVERT(my_binary_30 USING koi8r)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 97 OR select_id IS NULL); +WHERE select_id = 101 OR select_id IS NULL) order by id; CONVERT(my_binary_30 USING koi8r) my_binary_30 id NULL NULL 1 @@ -2211,11 +2257,11 @@ NULL NULL 1 DROP VIEW v1; -CREATE VIEW v1 AS SELECT CONVERT(my_varchar_1000 USING koi8r), +CREATE VIEW v1 AS SELECT CONVERT(my_varchar_1000 USING koi8r), my_varchar_1000, id FROM t1_values; -SELECT CONVERT(my_varchar_1000 USING koi8r), +SELECT CONVERT(my_varchar_1000 USING koi8r), my_varchar_1000, id FROM t1_values -WHERE select_id = 96 OR select_id IS NULL; +WHERE select_id = 100 OR select_id IS NULL order by id; CONVERT(my_varchar_1000 USING koi8r) my_varchar_1000 id NULL NULL 1 2 @@ -2227,7 +2273,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varchar_1000` using koi8r) AS `CONVERT(my_varchar_1000 USING koi8r)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 96 OR select_id IS NULL); +WHERE select_id = 100 OR select_id IS NULL) order by id; CONVERT(my_varchar_1000 USING koi8r) my_varchar_1000 id NULL NULL 1 2 @@ -2237,11 +2283,11 @@ NULL NULL 1 DROP VIEW v1; -CREATE VIEW v1 AS SELECT CONVERT(my_char_30 USING koi8r), +CREATE VIEW v1 AS SELECT CONVERT(my_char_30 USING koi8r), my_char_30, id FROM t1_values; -SELECT CONVERT(my_char_30 USING koi8r), +SELECT CONVERT(my_char_30 USING koi8r), my_char_30, id FROM t1_values -WHERE select_id = 95 OR select_id IS NULL; +WHERE select_id = 99 OR select_id IS NULL order by id; CONVERT(my_char_30 USING koi8r) my_char_30 id NULL NULL 1 2 @@ -2253,7 +2299,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_char_30` using koi8r) AS `CONVERT(my_char_30 USING koi8r)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 95 OR select_id IS NULL); +WHERE select_id = 99 OR select_id IS NULL) order by id; CONVERT(my_char_30 USING koi8r) my_char_30 id NULL NULL 1 2 @@ -2263,11 +2309,11 @@ NULL NULL 1 DROP VIEW v1; -CREATE VIEW v1 AS SELECT CONVERT(my_varbinary_1000 USING utf8), +CREATE VIEW v1 AS SELECT CONVERT(my_varbinary_1000 USING utf8), my_varbinary_1000, id FROM t1_values; -SELECT CONVERT(my_varbinary_1000 USING utf8), +SELECT CONVERT(my_varbinary_1000 USING utf8), my_varbinary_1000, id FROM t1_values -WHERE select_id = 94 OR select_id IS NULL; +WHERE select_id = 98 OR select_id IS NULL order by id; CONVERT(my_varbinary_1000 USING utf8) my_varbinary_1000 id NULL NULL 1 2 @@ -2279,7 +2325,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varbinary_1000` using utf8) AS `CONVERT(my_varbinary_1000 USING utf8)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 94 OR select_id IS NULL); +WHERE select_id = 98 OR select_id IS NULL) order by id; CONVERT(my_varbinary_1000 USING utf8) my_varbinary_1000 id NULL NULL 1 2 @@ -2289,23 +2335,23 @@ NULL NULL 1 DROP VIEW v1; -CREATE VIEW v1 AS SELECT CONVERT(my_binary_30 USING utf8), +CREATE VIEW v1 AS SELECT CONVERT(my_binary_30 USING utf8), my_binary_30, id FROM t1_values; -SELECT CONVERT(my_binary_30 USING utf8), +SELECT CONVERT(my_binary_30 USING utf8), my_binary_30, id FROM t1_values -WHERE select_id = 93 OR select_id IS NULL; +WHERE select_id = 97 OR select_id IS NULL order by id; CONVERT(my_binary_30 USING utf8) my_binary_30 id NULL NULL 1 - + 2 <--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- --1 + ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 +-1 -1 5 SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_binary_30` using utf8) AS `CONVERT(my_binary_30 USING utf8)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 93 OR select_id IS NULL); +WHERE select_id = 97 OR select_id IS NULL) order by id; CONVERT(my_binary_30 USING utf8) my_binary_30 id NULL NULL 1 @@ -2315,11 +2361,11 @@ NULL NULL 1 DROP VIEW v1; -CREATE VIEW v1 AS SELECT CONVERT(my_varchar_1000 USING utf8), +CREATE VIEW v1 AS SELECT CONVERT(my_varchar_1000 USING utf8), my_varchar_1000, id FROM t1_values; -SELECT CONVERT(my_varchar_1000 USING utf8), +SELECT CONVERT(my_varchar_1000 USING utf8), my_varchar_1000, id FROM t1_values -WHERE select_id = 92 OR select_id IS NULL; +WHERE select_id = 96 OR select_id IS NULL order by id; CONVERT(my_varchar_1000 USING utf8) my_varchar_1000 id NULL NULL 1 2 @@ -2331,7 +2377,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varchar_1000` using utf8) AS `CONVERT(my_varchar_1000 USING utf8)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 92 OR select_id IS NULL); +WHERE select_id = 96 OR select_id IS NULL) order by id; CONVERT(my_varchar_1000 USING utf8) my_varchar_1000 id NULL NULL 1 2 @@ -2341,11 +2387,11 @@ NULL NULL 1 DROP VIEW v1; -CREATE VIEW v1 AS SELECT CONVERT(my_char_30 USING utf8), +CREATE VIEW v1 AS SELECT CONVERT(my_char_30 USING utf8), my_char_30, id FROM t1_values; -SELECT CONVERT(my_char_30 USING utf8), +SELECT CONVERT(my_char_30 USING utf8), my_char_30, id FROM t1_values -WHERE select_id = 91 OR select_id IS NULL; +WHERE select_id = 95 OR select_id IS NULL order by id; CONVERT(my_char_30 USING utf8) my_char_30 id NULL NULL 1 2 @@ -2357,7 +2403,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_char_30` using utf8) AS `CONVERT(my_char_30 USING utf8)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 91 OR select_id IS NULL); +WHERE select_id = 95 OR select_id IS NULL) order by id; CONVERT(my_char_30 USING utf8) my_char_30 id NULL NULL 1 2 @@ -2371,7 +2417,7 @@ CREATE VIEW v1 AS SELECT CAST(my_year AS UNSIGNED INTEGER), my_year, id FROM t1_values; SELECT CAST(my_year AS UNSIGNED INTEGER), my_year, id FROM t1_values -WHERE select_id = 90 OR select_id IS NULL; +WHERE select_id = 94 OR select_id IS NULL order by id; CAST(my_year AS UNSIGNED INTEGER) my_year id NULL NULL 1 1901 1901 2 @@ -2383,7 +2429,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as unsigned) AS `CAST(my_year AS UNSIGNED INTEGER)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 90 OR select_id IS NULL); +WHERE select_id = 94 OR select_id IS NULL) order by id; CAST(my_year AS UNSIGNED INTEGER) my_year id NULL NULL 1 1901 1901 2 @@ -2397,7 +2443,7 @@ CREATE VIEW v1 AS SELECT CAST(my_time AS UNSIGNED INTEGER), my_time, id FROM t1_values; SELECT CAST(my_time AS UNSIGNED INTEGER), my_time, id FROM t1_values -WHERE select_id = 89 OR select_id IS NULL; +WHERE select_id = 93 OR select_id IS NULL order by id; CAST(my_time AS UNSIGNED INTEGER) my_time id NULL NULL 1 18446744073701165657 -838:59:59 2 @@ -2409,7 +2455,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as unsigned) AS `CAST(my_time AS UNSIGNED INTEGER)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 89 OR select_id IS NULL); +WHERE select_id = 93 OR select_id IS NULL) order by id; CAST(my_time AS UNSIGNED INTEGER) my_time id NULL NULL 1 18446744073701165657 -838:59:59 2 @@ -2423,7 +2469,7 @@ CREATE VIEW v1 AS SELECT CAST(my_timestamp AS UNSIGNED INTEGER), my_timestamp, id FROM t1_values; SELECT CAST(my_timestamp AS UNSIGNED INTEGER), my_timestamp, id FROM t1_values -WHERE select_id = 88 OR select_id IS NULL; +WHERE select_id = 92 OR select_id IS NULL order by id; CAST(my_timestamp AS UNSIGNED INTEGER) my_timestamp id 0 0000-00-00 00:00:00 1 19700101030001 1970-01-01 03:00:01 2 @@ -2435,7 +2481,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as unsigned) AS `CAST(my_timestamp AS UNSIGNED INTEGER)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 88 OR select_id IS NULL); +WHERE select_id = 92 OR select_id IS NULL) order by id; CAST(my_timestamp AS UNSIGNED INTEGER) my_timestamp id 0 0000-00-00 00:00:00 1 19700101030001 1970-01-01 03:00:01 2 @@ -2449,7 +2495,7 @@ CREATE VIEW v1 AS SELECT CAST(my_date AS UNSIGNED INTEGER), my_date, id FROM t1_values; SELECT CAST(my_date AS UNSIGNED INTEGER), my_date, id FROM t1_values -WHERE select_id = 87 OR select_id IS NULL; +WHERE select_id = 91 OR select_id IS NULL order by id; CAST(my_date AS UNSIGNED INTEGER) my_date id NULL NULL 1 10101 0001-01-01 2 @@ -2461,7 +2507,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as unsigned) AS `CAST(my_date AS UNSIGNED INTEGER)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 87 OR select_id IS NULL); +WHERE select_id = 91 OR select_id IS NULL) order by id; CAST(my_date AS UNSIGNED INTEGER) my_date id NULL NULL 1 10101 0001-01-01 2 @@ -2475,7 +2521,7 @@ CREATE VIEW v1 AS SELECT CAST(my_datetime AS UNSIGNED INTEGER), my_datetime, id FROM t1_values; SELECT CAST(my_datetime AS UNSIGNED INTEGER), my_datetime, id FROM t1_values -WHERE select_id = 86 OR select_id IS NULL; +WHERE select_id = 90 OR select_id IS NULL order by id; CAST(my_datetime AS UNSIGNED INTEGER) my_datetime id NULL NULL 1 10101000000 0001-01-01 00:00:00 2 @@ -2487,7 +2533,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as unsigned) AS `CAST(my_datetime AS UNSIGNED INTEGER)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 86 OR select_id IS NULL); +WHERE select_id = 90 OR select_id IS NULL) order by id; CAST(my_datetime AS UNSIGNED INTEGER) my_datetime id NULL NULL 1 10101000000 0001-01-01 00:00:00 2 @@ -2497,11 +2543,43 @@ NULL NULL 1 DROP VIEW v1; +CREATE VIEW v1 AS SELECT CAST(my_double AS UNSIGNED INTEGER), +my_double, id FROM t1_values; +SELECT CAST(my_double AS UNSIGNED INTEGER), +my_double, id FROM t1_values +WHERE select_id = 89 OR select_id IS NULL order by id; +CAST(my_double AS UNSIGNED INTEGER) my_double id +NULL NULL 1 +9223372036854775808 -1.7976931348623e+308 2 +9223372036854775807 1.7976931348623e+308 3 +0 0 4 +18446744073709551615 -1 5 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' +Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' +SHOW CREATE VIEW v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as unsigned) AS `CAST(my_double AS UNSIGNED INTEGER)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +SELECT v1.* FROM v1 +WHERE v1.id IN (SELECT id FROM t1_values +WHERE select_id = 89 OR select_id IS NULL) order by id; +CAST(my_double AS UNSIGNED INTEGER) my_double id +NULL NULL 1 +9223372036854775808 -1.7976931348623e+308 2 +9223372036854775807 1.7976931348623e+308 3 +0 0 4 +18446744073709551615 -1 5 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' +Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' +DROP VIEW v1; + + CREATE VIEW v1 AS SELECT CAST(my_decimal AS UNSIGNED INTEGER), my_decimal, id FROM t1_values; SELECT CAST(my_decimal AS UNSIGNED INTEGER), my_decimal, id FROM t1_values -WHERE select_id = 85 OR select_id IS NULL; +WHERE select_id = 88 OR select_id IS NULL order by id; CAST(my_decimal AS UNSIGNED INTEGER) my_decimal id NULL NULL 1 0 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -2517,7 +2595,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as unsigned) AS `CAST(my_decimal AS UNSIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 85 OR select_id IS NULL); +WHERE select_id = 88 OR select_id IS NULL) order by id; CAST(my_decimal AS UNSIGNED INTEGER) my_decimal id NULL NULL 1 0 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -2535,7 +2613,7 @@ CREATE VIEW v1 AS SELECT CAST(my_bigint AS UNSIGNED INTEGER), my_bigint, id FROM t1_values; SELECT CAST(my_bigint AS UNSIGNED INTEGER), my_bigint, id FROM t1_values -WHERE select_id = 84 OR select_id IS NULL; +WHERE select_id = 87 OR select_id IS NULL order by id; CAST(my_bigint AS UNSIGNED INTEGER) my_bigint id NULL NULL 1 9223372036854775808 -9223372036854775808 2 @@ -2547,7 +2625,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as unsigned) AS `CAST(my_bigint AS UNSIGNED INTEGER)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 84 OR select_id IS NULL); +WHERE select_id = 87 OR select_id IS NULL) order by id; CAST(my_bigint AS UNSIGNED INTEGER) my_bigint id NULL NULL 1 9223372036854775808 -9223372036854775808 2 @@ -2561,7 +2639,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS UNSIGNED INTEGER), my_varbinary_1000, id FROM t1_values; SELECT CAST(my_varbinary_1000 AS UNSIGNED INTEGER), my_varbinary_1000, id FROM t1_values -WHERE select_id = 83 OR select_id IS NULL; +WHERE select_id = 86 OR select_id IS NULL order by id; CAST(my_varbinary_1000 AS UNSIGNED INTEGER) my_varbinary_1000 id NULL NULL 1 0 2 @@ -2578,7 +2656,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as unsigned) AS `CAST(my_varbinary_1000 AS UNSIGNED INTEGER)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 83 OR select_id IS NULL); +WHERE select_id = 86 OR select_id IS NULL) order by id; CAST(my_varbinary_1000 AS UNSIGNED INTEGER) my_varbinary_1000 id NULL NULL 1 0 2 @@ -2597,13 +2675,13 @@ CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS UNSIGNED INTEGER), my_binary_30, id FROM t1_values; SELECT CAST(my_binary_30 AS UNSIGNED INTEGER), my_binary_30, id FROM t1_values -WHERE select_id = 82 OR select_id IS NULL; +WHERE select_id = 85 OR select_id IS NULL order by id; CAST(my_binary_30 AS UNSIGNED INTEGER) my_binary_30 id NULL NULL 1 -0 +0 2 0 <--------30 characters-------> 3 -0 ---äÖüß@µ*$-- -18446744073709551615 -1 +0 ---äÖüß@µ*$-- 4 +18446744073709551615 -1 5 Warnings: Warning 1292 Truncated incorrect INTEGER value: '' Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->' @@ -2615,7 +2693,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as unsigned) AS `CAST(my_binary_30 AS UNSIGNED INTEGER)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 82 OR select_id IS NULL); +WHERE select_id = 85 OR select_id IS NULL) order by id; CAST(my_binary_30 AS UNSIGNED INTEGER) my_binary_30 id NULL NULL 1 0 @@ -2635,7 +2713,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS UNSIGNED INTEGER), my_varchar_1000, id FROM t1_values; SELECT CAST(my_varchar_1000 AS UNSIGNED INTEGER), my_varchar_1000, id FROM t1_values -WHERE select_id = 81 OR select_id IS NULL; +WHERE select_id = 84 OR select_id IS NULL order by id; CAST(my_varchar_1000 AS UNSIGNED INTEGER) my_varchar_1000 id NULL NULL 1 0 2 @@ -2652,7 +2730,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as unsigned) AS `CAST(my_varchar_1000 AS UNSIGNED INTEGER)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 81 OR select_id IS NULL); +WHERE select_id = 84 OR select_id IS NULL) order by id; CAST(my_varchar_1000 AS UNSIGNED INTEGER) my_varchar_1000 id NULL NULL 1 0 2 @@ -2671,7 +2749,7 @@ CREATE VIEW v1 AS SELECT CAST(my_char_30 AS UNSIGNED INTEGER), my_char_30, id FROM t1_values; SELECT CAST(my_char_30 AS UNSIGNED INTEGER), my_char_30, id FROM t1_values -WHERE select_id = 80 OR select_id IS NULL; +WHERE select_id = 83 OR select_id IS NULL order by id; CAST(my_char_30 AS UNSIGNED INTEGER) my_char_30 id NULL NULL 1 0 2 @@ -2688,7 +2766,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as unsigned) AS `CAST(my_char_30 AS UNSIGNED INTEGER)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 80 OR select_id IS NULL); +WHERE select_id = 83 OR select_id IS NULL) order by id; CAST(my_char_30 AS UNSIGNED INTEGER) my_char_30 id NULL NULL 1 0 2 @@ -2707,7 +2785,7 @@ CREATE VIEW v1 AS SELECT CAST(my_year AS SIGNED INTEGER), my_year, id FROM t1_values; SELECT CAST(my_year AS SIGNED INTEGER), my_year, id FROM t1_values -WHERE select_id = 79 OR select_id IS NULL; +WHERE select_id = 82 OR select_id IS NULL order by id; CAST(my_year AS SIGNED INTEGER) my_year id NULL NULL 1 1901 1901 2 @@ -2719,7 +2797,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as signed) AS `CAST(my_year AS SIGNED INTEGER)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 79 OR select_id IS NULL); +WHERE select_id = 82 OR select_id IS NULL) order by id; CAST(my_year AS SIGNED INTEGER) my_year id NULL NULL 1 1901 1901 2 @@ -2733,7 +2811,7 @@ CREATE VIEW v1 AS SELECT CAST(my_time AS SIGNED INTEGER), my_time, id FROM t1_values; SELECT CAST(my_time AS SIGNED INTEGER), my_time, id FROM t1_values -WHERE select_id = 78 OR select_id IS NULL; +WHERE select_id = 81 OR select_id IS NULL order by id; CAST(my_time AS SIGNED INTEGER) my_time id NULL NULL 1 -8385959 -838:59:59 2 @@ -2745,7 +2823,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as signed) AS `CAST(my_time AS SIGNED INTEGER)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 78 OR select_id IS NULL); +WHERE select_id = 81 OR select_id IS NULL) order by id; CAST(my_time AS SIGNED INTEGER) my_time id NULL NULL 1 -8385959 -838:59:59 2 @@ -2759,7 +2837,7 @@ CREATE VIEW v1 AS SELECT CAST(my_timestamp AS SIGNED INTEGER), my_timestamp, id FROM t1_values; SELECT CAST(my_timestamp AS SIGNED INTEGER), my_timestamp, id FROM t1_values -WHERE select_id = 77 OR select_id IS NULL; +WHERE select_id = 80 OR select_id IS NULL order by id; CAST(my_timestamp AS SIGNED INTEGER) my_timestamp id 0 0000-00-00 00:00:00 1 19700101030001 1970-01-01 03:00:01 2 @@ -2771,7 +2849,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as signed) AS `CAST(my_timestamp AS SIGNED INTEGER)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 77 OR select_id IS NULL); +WHERE select_id = 80 OR select_id IS NULL) order by id; CAST(my_timestamp AS SIGNED INTEGER) my_timestamp id 0 0000-00-00 00:00:00 1 19700101030001 1970-01-01 03:00:01 2 @@ -2785,7 +2863,7 @@ CREATE VIEW v1 AS SELECT CAST(my_date AS SIGNED INTEGER), my_date, id FROM t1_values; SELECT CAST(my_date AS SIGNED INTEGER), my_date, id FROM t1_values -WHERE select_id = 76 OR select_id IS NULL; +WHERE select_id = 79 OR select_id IS NULL order by id; CAST(my_date AS SIGNED INTEGER) my_date id NULL NULL 1 10101 0001-01-01 2 @@ -2797,7 +2875,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as signed) AS `CAST(my_date AS SIGNED INTEGER)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 76 OR select_id IS NULL); +WHERE select_id = 79 OR select_id IS NULL) order by id; CAST(my_date AS SIGNED INTEGER) my_date id NULL NULL 1 10101 0001-01-01 2 @@ -2811,7 +2889,7 @@ CREATE VIEW v1 AS SELECT CAST(my_datetime AS SIGNED INTEGER), my_datetime, id FROM t1_values; SELECT CAST(my_datetime AS SIGNED INTEGER), my_datetime, id FROM t1_values -WHERE select_id = 75 OR select_id IS NULL; +WHERE select_id = 78 OR select_id IS NULL order by id; CAST(my_datetime AS SIGNED INTEGER) my_datetime id NULL NULL 1 10101000000 0001-01-01 00:00:00 2 @@ -2823,7 +2901,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as signed) AS `CAST(my_datetime AS SIGNED INTEGER)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 75 OR select_id IS NULL); +WHERE select_id = 78 OR select_id IS NULL) order by id; CAST(my_datetime AS SIGNED INTEGER) my_datetime id NULL NULL 1 10101000000 0001-01-01 00:00:00 2 @@ -2833,11 +2911,43 @@ NULL NULL 1 DROP VIEW v1; +CREATE VIEW v1 AS SELECT CAST(my_double AS SIGNED INTEGER), +my_double, id FROM t1_values; +SELECT CAST(my_double AS SIGNED INTEGER), +my_double, id FROM t1_values +WHERE select_id = 77 OR select_id IS NULL order by id; +CAST(my_double AS SIGNED INTEGER) my_double id +NULL NULL 1 +-9223372036854775808 -1.7976931348623e+308 2 +9223372036854775807 1.7976931348623e+308 3 +0 0 4 +-1 -1 5 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' +Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' +SHOW CREATE VIEW v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as signed) AS `CAST(my_double AS SIGNED INTEGER)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +SELECT v1.* FROM v1 +WHERE v1.id IN (SELECT id FROM t1_values +WHERE select_id = 77 OR select_id IS NULL) order by id; +CAST(my_double AS SIGNED INTEGER) my_double id +NULL NULL 1 +-9223372036854775808 -1.7976931348623e+308 2 +9223372036854775807 1.7976931348623e+308 3 +0 0 4 +-1 -1 5 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' +Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' +DROP VIEW v1; + + CREATE VIEW v1 AS SELECT CAST(my_decimal AS SIGNED INTEGER), my_decimal, id FROM t1_values; SELECT CAST(my_decimal AS SIGNED INTEGER), my_decimal, id FROM t1_values -WHERE select_id = 74 OR select_id IS NULL; +WHERE select_id = 76 OR select_id IS NULL order by id; CAST(my_decimal AS SIGNED INTEGER) my_decimal id NULL NULL 1 -9223372036854775808 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -2852,7 +2962,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as signed) AS `CAST(my_decimal AS SIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 74 OR select_id IS NULL); +WHERE select_id = 76 OR select_id IS NULL) order by id; CAST(my_decimal AS SIGNED INTEGER) my_decimal id NULL NULL 1 -9223372036854775808 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -2869,7 +2979,7 @@ CREATE VIEW v1 AS SELECT CAST(my_bigint AS SIGNED INTEGER), my_bigint, id FROM t1_values; SELECT CAST(my_bigint AS SIGNED INTEGER), my_bigint, id FROM t1_values -WHERE select_id = 73 OR select_id IS NULL; +WHERE select_id = 75 OR select_id IS NULL order by id; CAST(my_bigint AS SIGNED INTEGER) my_bigint id NULL NULL 1 -9223372036854775808 -9223372036854775808 2 @@ -2881,7 +2991,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as signed) AS `CAST(my_bigint AS SIGNED INTEGER)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 73 OR select_id IS NULL); +WHERE select_id = 75 OR select_id IS NULL) order by id; CAST(my_bigint AS SIGNED INTEGER) my_bigint id NULL NULL 1 -9223372036854775808 -9223372036854775808 2 @@ -2895,7 +3005,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS SIGNED INTEGER), my_varbinary_1000, id FROM t1_values; SELECT CAST(my_varbinary_1000 AS SIGNED INTEGER), my_varbinary_1000, id FROM t1_values -WHERE select_id = 72 OR select_id IS NULL; +WHERE select_id = 74 OR select_id IS NULL order by id; CAST(my_varbinary_1000 AS SIGNED INTEGER) my_varbinary_1000 id NULL NULL 1 0 2 @@ -2911,7 +3021,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as signed) AS `CAST(my_varbinary_1000 AS SIGNED INTEGER)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 72 OR select_id IS NULL); +WHERE select_id = 74 OR select_id IS NULL) order by id; CAST(my_varbinary_1000 AS SIGNED INTEGER) my_varbinary_1000 id NULL NULL 1 0 2 @@ -2929,13 +3039,13 @@ CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS SIGNED INTEGER), my_binary_30, id FROM t1_values; SELECT CAST(my_binary_30 AS SIGNED INTEGER), my_binary_30, id FROM t1_values -WHERE select_id = 71 OR select_id IS NULL; +WHERE select_id = 73 OR select_id IS NULL order by id; CAST(my_binary_30 AS SIGNED INTEGER) my_binary_30 id NULL NULL 1 -0 +0 2 0 <--------30 characters-------> 3 -0 ---äÖüß@µ*$-- --1 -1 +0 ---äÖüß@µ*$-- 4 +-1 -1 5 Warnings: Warning 1292 Truncated incorrect INTEGER value: '' Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->' @@ -2946,7 +3056,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as signed) AS `CAST(my_binary_30 AS SIGNED INTEGER)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 71 OR select_id IS NULL); +WHERE select_id = 73 OR select_id IS NULL) order by id; CAST(my_binary_30 AS SIGNED INTEGER) my_binary_30 id NULL NULL 1 0 @@ -2965,7 +3075,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS SIGNED INTEGER), my_varchar_1000, id FROM t1_values; SELECT CAST(my_varchar_1000 AS SIGNED INTEGER), my_varchar_1000, id FROM t1_values -WHERE select_id = 70 OR select_id IS NULL; +WHERE select_id = 72 OR select_id IS NULL order by id; CAST(my_varchar_1000 AS SIGNED INTEGER) my_varchar_1000 id NULL NULL 1 0 2 @@ -2981,7 +3091,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as signed) AS `CAST(my_varchar_1000 AS SIGNED INTEGER)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 70 OR select_id IS NULL); +WHERE select_id = 72 OR select_id IS NULL) order by id; CAST(my_varchar_1000 AS SIGNED INTEGER) my_varchar_1000 id NULL NULL 1 0 2 @@ -2999,7 +3109,7 @@ CREATE VIEW v1 AS SELECT CAST(my_char_30 AS SIGNED INTEGER), my_char_30, id FROM t1_values; SELECT CAST(my_char_30 AS SIGNED INTEGER), my_char_30, id FROM t1_values -WHERE select_id = 69 OR select_id IS NULL; +WHERE select_id = 71 OR select_id IS NULL order by id; CAST(my_char_30 AS SIGNED INTEGER) my_char_30 id NULL NULL 1 0 2 @@ -3015,7 +3125,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as signed) AS `CAST(my_char_30 AS SIGNED INTEGER)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 69 OR select_id IS NULL); +WHERE select_id = 71 OR select_id IS NULL) order by id; CAST(my_char_30 AS SIGNED INTEGER) my_char_30 id NULL NULL 1 0 2 @@ -3033,7 +3143,7 @@ CREATE VIEW v1 AS SELECT CAST(my_year AS DECIMAL(37,2)), my_year, id FROM t1_values; SELECT CAST(my_year AS DECIMAL(37,2)), my_year, id FROM t1_values -WHERE select_id = 68 OR select_id IS NULL; +WHERE select_id = 70 OR select_id IS NULL order by id; CAST(my_year AS DECIMAL(37,2)) my_year id NULL NULL 1 1901.00 1901 2 @@ -3045,7 +3155,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as decimal(37,2)) AS `CAST(my_year AS DECIMAL(37,2))`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 68 OR select_id IS NULL); +WHERE select_id = 70 OR select_id IS NULL) order by id; CAST(my_year AS DECIMAL(37,2)) my_year id NULL NULL 1 1901.00 1901 2 @@ -3059,7 +3169,7 @@ CREATE VIEW v1 AS SELECT CAST(my_time AS DECIMAL(37,2)), my_time, id FROM t1_values; SELECT CAST(my_time AS DECIMAL(37,2)), my_time, id FROM t1_values -WHERE select_id = 67 OR select_id IS NULL; +WHERE select_id = 69 OR select_id IS NULL order by id; CAST(my_time AS DECIMAL(37,2)) my_time id NULL NULL 1 -8385959.00 -838:59:59 2 @@ -3071,7 +3181,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as decimal(37,2)) AS `CAST(my_time AS DECIMAL(37,2))`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 67 OR select_id IS NULL); +WHERE select_id = 69 OR select_id IS NULL) order by id; CAST(my_time AS DECIMAL(37,2)) my_time id NULL NULL 1 -8385959.00 -838:59:59 2 @@ -3085,7 +3195,7 @@ CREATE VIEW v1 AS SELECT CAST(my_timestamp AS DECIMAL(37,2)), my_timestamp, id FROM t1_values; SELECT CAST(my_timestamp AS DECIMAL(37,2)), my_timestamp, id FROM t1_values -WHERE select_id = 66 OR select_id IS NULL; +WHERE select_id = 68 OR select_id IS NULL order by id; CAST(my_timestamp AS DECIMAL(37,2)) my_timestamp id 0.00 0000-00-00 00:00:00 1 19700101030001.00 1970-01-01 03:00:01 2 @@ -3097,7 +3207,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as decimal(37,2)) AS `CAST(my_timestamp AS DECIMAL(37,2))`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 66 OR select_id IS NULL); +WHERE select_id = 68 OR select_id IS NULL) order by id; CAST(my_timestamp AS DECIMAL(37,2)) my_timestamp id 0.00 0000-00-00 00:00:00 1 19700101030001.00 1970-01-01 03:00:01 2 @@ -3111,7 +3221,7 @@ CREATE VIEW v1 AS SELECT CAST(my_date AS DECIMAL(37,2)), my_date, id FROM t1_values; SELECT CAST(my_date AS DECIMAL(37,2)), my_date, id FROM t1_values -WHERE select_id = 65 OR select_id IS NULL; +WHERE select_id = 67 OR select_id IS NULL order by id; CAST(my_date AS DECIMAL(37,2)) my_date id NULL NULL 1 10101.00 0001-01-01 2 @@ -3123,7 +3233,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as decimal(37,2)) AS `CAST(my_date AS DECIMAL(37,2))`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 65 OR select_id IS NULL); +WHERE select_id = 67 OR select_id IS NULL) order by id; CAST(my_date AS DECIMAL(37,2)) my_date id NULL NULL 1 10101.00 0001-01-01 2 @@ -3137,7 +3247,7 @@ CREATE VIEW v1 AS SELECT CAST(my_datetime AS DECIMAL(37,2)), my_datetime, id FROM t1_values; SELECT CAST(my_datetime AS DECIMAL(37,2)), my_datetime, id FROM t1_values -WHERE select_id = 64 OR select_id IS NULL; +WHERE select_id = 66 OR select_id IS NULL order by id; CAST(my_datetime AS DECIMAL(37,2)) my_datetime id NULL NULL 1 10101000000.00 0001-01-01 00:00:00 2 @@ -3149,7 +3259,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as decimal(37,2)) AS `CAST(my_datetime AS DECIMAL(37,2))`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 64 OR select_id IS NULL); +WHERE select_id = 66 OR select_id IS NULL) order by id; CAST(my_datetime AS DECIMAL(37,2)) my_datetime id NULL NULL 1 10101000000.00 0001-01-01 00:00:00 2 @@ -3159,11 +3269,49 @@ NULL NULL 1 DROP VIEW v1; +CREATE VIEW v1 AS SELECT CAST(my_double AS DECIMAL(37,2)), +my_double, id FROM t1_values; +SELECT CAST(my_double AS DECIMAL(37,2)), +my_double, id FROM t1_values +WHERE select_id = 65 OR select_id IS NULL order by id; +CAST(my_double AS DECIMAL(37,2)) my_double id +NULL NULL 1 +-99999999999999999999999999999999999.99 -1.7976931348623e+308 2 +99999999999999999999999999999999999.99 1.7976931348623e+308 3 +0.00 0 4 +-1.00 -1 5 +-3333.33 -3333.3333 30 +Warnings: +Error 1292 Truncated incorrect DECIMAL value: '' +Error 1264 Out of range value adjusted for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Error 1292 Truncated incorrect DECIMAL value: '' +Error 1264 Out of range value adjusted for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +SHOW CREATE VIEW v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as decimal(37,2)) AS `CAST(my_double AS DECIMAL(37,2))`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +SELECT v1.* FROM v1 +WHERE v1.id IN (SELECT id FROM t1_values +WHERE select_id = 65 OR select_id IS NULL) order by id; +CAST(my_double AS DECIMAL(37,2)) my_double id +NULL NULL 1 +-99999999999999999999999999999999999.99 -1.7976931348623e+308 2 +99999999999999999999999999999999999.99 1.7976931348623e+308 3 +0.00 0 4 +-1.00 -1 5 +-3333.33 -3333.3333 30 +Warnings: +Error 1292 Truncated incorrect DECIMAL value: '' +Error 1264 Out of range value adjusted for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Error 1292 Truncated incorrect DECIMAL value: '' +Error 1264 Out of range value adjusted for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +DROP VIEW v1; + + CREATE VIEW v1 AS SELECT CAST(my_decimal AS DECIMAL(37,2)), my_decimal, id FROM t1_values; SELECT CAST(my_decimal AS DECIMAL(37,2)), my_decimal, id FROM t1_values -WHERE select_id = 63 OR select_id IS NULL; +WHERE select_id = 64 OR select_id IS NULL order by id; CAST(my_decimal AS DECIMAL(37,2)) my_decimal id NULL NULL 1 -10000000000000000000000000000000000.00 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -3175,7 +3323,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as decimal(37,2)) AS `CAST(my_decimal AS DECIMAL(37,2))`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 63 OR select_id IS NULL); +WHERE select_id = 64 OR select_id IS NULL) order by id; CAST(my_decimal AS DECIMAL(37,2)) my_decimal id NULL NULL 1 -10000000000000000000000000000000000.00 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -3189,7 +3337,7 @@ CREATE VIEW v1 AS SELECT CAST(my_bigint AS DECIMAL(37,2)), my_bigint, id FROM t1_values; SELECT CAST(my_bigint AS DECIMAL(37,2)), my_bigint, id FROM t1_values -WHERE select_id = 62 OR select_id IS NULL; +WHERE select_id = 63 OR select_id IS NULL order by id; CAST(my_bigint AS DECIMAL(37,2)) my_bigint id NULL NULL 1 -9223372036854775808.00 -9223372036854775808 2 @@ -3201,7 +3349,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as decimal(37,2)) AS `CAST(my_bigint AS DECIMAL(37,2))`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 62 OR select_id IS NULL); +WHERE select_id = 63 OR select_id IS NULL) order by id; CAST(my_bigint AS DECIMAL(37,2)) my_bigint id NULL NULL 1 -9223372036854775808.00 -9223372036854775808 2 @@ -3215,14 +3363,14 @@ CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS DECIMAL(37,2)), my_varbinary_1000, id FROM t1_values; SELECT CAST(my_varbinary_1000 AS DECIMAL(37,2)), my_varbinary_1000, id FROM t1_values -WHERE select_id = 61 OR select_id IS NULL; +WHERE select_id = 62 OR select_id IS NULL order by id; CAST(my_varbinary_1000 AS DECIMAL(37,2)) my_varbinary_1000 id NULL NULL 1 0.00 2 0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 0.00 ---äÖüß@µ*$-- 4 -1.00 -1 5 --3333.33 -3333.3333 28 +-3333.33 -3333.3333 29 Warnings: Error 1366 Incorrect decimal value: '' for column '' at row -1 Error 1366 Incorrect decimal value: '' for column '' at row -1 @@ -3232,14 +3380,14 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as decimal(37,2)) AS `CAST(my_varbinary_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 61 OR select_id IS NULL); +WHERE select_id = 62 OR select_id IS NULL) order by id; CAST(my_varbinary_1000 AS DECIMAL(37,2)) my_varbinary_1000 id NULL NULL 1 0.00 2 0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 0.00 ---äÖüß@µ*$-- 4 -1.00 -1 5 --3333.33 -3333.3333 28 +-3333.33 -3333.3333 29 Warnings: Error 1366 Incorrect decimal value: '' for column '' at row -1 Error 1366 Incorrect decimal value: '' for column '' at row -1 @@ -3251,14 +3399,14 @@ CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS DECIMAL(37,2)), my_binary_30, id FROM t1_values; SELECT CAST(my_binary_30 AS DECIMAL(37,2)), my_binary_30, id FROM t1_values -WHERE select_id = 60 OR select_id IS NULL; +WHERE select_id = 61 OR select_id IS NULL order by id; CAST(my_binary_30 AS DECIMAL(37,2)) my_binary_30 id NULL NULL 1 -0.00 +0.00 2 0.00 <--------30 characters-------> 3 -0.00 ---äÖüß@µ*$-- --1.00 -1 --3333.33 -3333.3333 +0.00 ---äÖüß@µ*$-- 4 +-1.00 -1 5 +-3333.33 -3333.3333 28 Warnings: Error 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '' @@ -3273,14 +3421,14 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as decimal(37,2)) AS `CAST(my_binary_30 AS DECIMAL(37,2))`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 60 OR select_id IS NULL); +WHERE select_id = 61 OR select_id IS NULL) order by id; CAST(my_binary_30 AS DECIMAL(37,2)) my_binary_30 id NULL NULL 1 0.00 0.00 <--------30 characters-------> 3 0.00 ---äÖüß@µ*$-- -1.00 -1 --3333.33 -3333.3333 +-3333.33 -3333.3333 Warnings: Error 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '' @@ -3297,14 +3445,14 @@ CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS DECIMAL(37,2)), my_varchar_1000, id FROM t1_values; SELECT CAST(my_varchar_1000 AS DECIMAL(37,2)), my_varchar_1000, id FROM t1_values -WHERE select_id = 59 OR select_id IS NULL; +WHERE select_id = 60 OR select_id IS NULL order by id; CAST(my_varchar_1000 AS DECIMAL(37,2)) my_varchar_1000 id NULL NULL 1 0.00 2 0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 0.00 ---äÖüß@µ*$-- 4 -1.00 -1 5 --3333.33 -3333.3333 26 +-3333.33 -3333.3333 27 Warnings: Error 1366 Incorrect decimal value: '' for column '' at row -1 Error 1366 Incorrect decimal value: '' for column '' at row -1 @@ -3314,14 +3462,14 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as decimal(37,2)) AS `CAST(my_varchar_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 59 OR select_id IS NULL); +WHERE select_id = 60 OR select_id IS NULL) order by id; CAST(my_varchar_1000 AS DECIMAL(37,2)) my_varchar_1000 id NULL NULL 1 0.00 2 0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 0.00 ---äÖüß@µ*$-- 4 -1.00 -1 5 --3333.33 -3333.3333 26 +-3333.33 -3333.3333 27 Warnings: Error 1366 Incorrect decimal value: '' for column '' at row -1 Error 1366 Incorrect decimal value: '' for column '' at row -1 @@ -3333,14 +3481,14 @@ CREATE VIEW v1 AS SELECT CAST(my_char_30 AS DECIMAL(37,2)), my_char_30, id FROM t1_values; SELECT CAST(my_char_30 AS DECIMAL(37,2)), my_char_30, id FROM t1_values -WHERE select_id = 58 OR select_id IS NULL; +WHERE select_id = 59 OR select_id IS NULL order by id; CAST(my_char_30 AS DECIMAL(37,2)) my_char_30 id NULL NULL 1 0.00 2 0.00 <--------30 characters-------> 3 0.00 ---äÖüß@µ*$-- 4 -1.00 -1 5 --3333.33 -3333.3333 25 +-3333.33 -3333.3333 26 Warnings: Error 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ' @@ -3353,14 +3501,14 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as decimal(37,2)) AS `CAST(my_char_30 AS DECIMAL(37,2))`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 58 OR select_id IS NULL); +WHERE select_id = 59 OR select_id IS NULL) order by id; CAST(my_char_30 AS DECIMAL(37,2)) my_char_30 id NULL NULL 1 0.00 2 0.00 <--------30 characters-------> 3 0.00 ---äÖüß@µ*$-- 4 -1.00 -1 5 --3333.33 -3333.3333 25 +-3333.33 -3333.3333 26 Warnings: Error 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ' @@ -3375,7 +3523,7 @@ CREATE VIEW v1 AS SELECT CAST(my_year AS TIME), my_year, id FROM t1_values; SELECT CAST(my_year AS TIME), my_year, id FROM t1_values -WHERE select_id = 57 OR select_id IS NULL; +WHERE select_id = 58 OR select_id IS NULL order by id; CAST(my_year AS TIME) my_year id NULL NULL 1 00:19:01 1901 2 @@ -3387,7 +3535,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as time) AS `CAST(my_year AS TIME)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 57 OR select_id IS NULL); +WHERE select_id = 58 OR select_id IS NULL) order by id; CAST(my_year AS TIME) my_year id NULL NULL 1 00:19:01 1901 2 @@ -3401,7 +3549,7 @@ CREATE VIEW v1 AS SELECT CAST(my_time AS TIME), my_time, id FROM t1_values; SELECT CAST(my_time AS TIME), my_time, id FROM t1_values -WHERE select_id = 56 OR select_id IS NULL; +WHERE select_id = 57 OR select_id IS NULL order by id; CAST(my_time AS TIME) my_time id NULL NULL 1 -838:59:59 -838:59:59 2 @@ -3413,7 +3561,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as time) AS `CAST(my_time AS TIME)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 56 OR select_id IS NULL); +WHERE select_id = 57 OR select_id IS NULL) order by id; CAST(my_time AS TIME) my_time id NULL NULL 1 -838:59:59 -838:59:59 2 @@ -3427,7 +3575,7 @@ CREATE VIEW v1 AS SELECT CAST(my_timestamp AS TIME), my_timestamp, id FROM t1_values; SELECT CAST(my_timestamp AS TIME), my_timestamp, id FROM t1_values -WHERE select_id = 55 OR select_id IS NULL; +WHERE select_id = 56 OR select_id IS NULL order by id; CAST(my_timestamp AS TIME) my_timestamp id 00:00:00 0000-00-00 00:00:00 1 03:00:01 1970-01-01 03:00:01 2 @@ -3439,7 +3587,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as time) AS `CAST(my_timestamp AS TIME)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 55 OR select_id IS NULL); +WHERE select_id = 56 OR select_id IS NULL) order by id; CAST(my_timestamp AS TIME) my_timestamp id 00:00:00 0000-00-00 00:00:00 1 03:00:01 1970-01-01 03:00:01 2 @@ -3453,7 +3601,7 @@ CREATE VIEW v1 AS SELECT CAST(my_date AS TIME), my_date, id FROM t1_values; SELECT CAST(my_date AS TIME), my_date, id FROM t1_values -WHERE select_id = 54 OR select_id IS NULL; +WHERE select_id = 55 OR select_id IS NULL order by id; CAST(my_date AS TIME) my_date id NULL NULL 1 00:00:00 0001-01-01 2 @@ -3465,7 +3613,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as time) AS `CAST(my_date AS TIME)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 54 OR select_id IS NULL); +WHERE select_id = 55 OR select_id IS NULL) order by id; CAST(my_date AS TIME) my_date id NULL NULL 1 00:00:00 0001-01-01 2 @@ -3479,7 +3627,7 @@ CREATE VIEW v1 AS SELECT CAST(my_datetime AS TIME), my_datetime, id FROM t1_values; SELECT CAST(my_datetime AS TIME), my_datetime, id FROM t1_values -WHERE select_id = 53 OR select_id IS NULL; +WHERE select_id = 54 OR select_id IS NULL order by id; CAST(my_datetime AS TIME) my_datetime id NULL NULL 1 00:00:00 0001-01-01 00:00:00 2 @@ -3491,7 +3639,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as time) AS `CAST(my_datetime AS TIME)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 53 OR select_id IS NULL); +WHERE select_id = 54 OR select_id IS NULL) order by id; CAST(my_datetime AS TIME) my_datetime id NULL NULL 1 00:00:00 0001-01-01 00:00:00 2 @@ -3501,11 +3649,45 @@ NULL NULL 1 DROP VIEW v1; +CREATE VIEW v1 AS SELECT CAST(my_double AS TIME), +my_double, id FROM t1_values; +SELECT CAST(my_double AS TIME), +my_double, id FROM t1_values +WHERE select_id = 53 OR select_id IS NULL order by id; +CAST(my_double AS TIME) my_double id +NULL NULL 1 +NULL -1.7976931348623e+308 2 +NULL 1.7976931348623e+308 3 +00:00:00 0 4 +-00:00:01 -1 5 +00:17:58 1758 25 +Warnings: +Warning 1292 Truncated incorrect time value: '-1.7976931348623e+308' +Warning 1292 Truncated incorrect time value: '1.7976931348623e+308' +SHOW CREATE VIEW v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as time) AS `CAST(my_double AS TIME)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` +SELECT v1.* FROM v1 +WHERE v1.id IN (SELECT id FROM t1_values +WHERE select_id = 53 OR select_id IS NULL) order by id; +CAST(my_double AS TIME) my_double id +NULL NULL 1 +NULL -1.7976931348623e+308 2 +NULL 1.7976931348623e+308 3 +00:00:00 0 4 +-00:00:01 -1 5 +00:17:58 1758 25 +Warnings: +Warning 1292 Truncated incorrect time value: '-1.7976931348623e+308' +Warning 1292 Truncated incorrect time value: '1.7976931348623e+308' +DROP VIEW v1; + + CREATE VIEW v1 AS SELECT CAST(my_bigint AS TIME), my_bigint, id FROM t1_values; SELECT CAST(my_bigint AS TIME), my_bigint, id FROM t1_values -WHERE select_id = 52 OR select_id IS NULL; +WHERE select_id = 52 OR select_id IS NULL order by id; CAST(my_bigint AS TIME) my_bigint id NULL NULL 1 NULL -9223372036854775808 2 @@ -3521,7 +3703,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as time) AS `CAST(my_bigint AS TIME)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 52 OR select_id IS NULL); +WHERE select_id = 52 OR select_id IS NULL) order by id; CAST(my_bigint AS TIME) my_bigint id NULL NULL 1 NULL -9223372036854775808 2 @@ -3539,7 +3721,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS TIME), my_varbinary_1000, id FROM t1_values; SELECT CAST(my_varbinary_1000 AS TIME), my_varbinary_1000, id FROM t1_values -WHERE select_id = 51 OR select_id IS NULL; +WHERE select_id = 51 OR select_id IS NULL order by id; CAST(my_varbinary_1000 AS TIME) my_varbinary_1000 id NULL NULL 1 NULL 2 @@ -3556,7 +3738,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as time) AS `CAST(my_varbinary_1000 AS TIME)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 51 OR select_id IS NULL); +WHERE select_id = 51 OR select_id IS NULL) order by id; CAST(my_varbinary_1000 AS TIME) my_varbinary_1000 id NULL NULL 1 NULL 2 @@ -3575,14 +3757,14 @@ CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS TIME), my_binary_30, id FROM t1_values; SELECT CAST(my_binary_30 AS TIME), my_binary_30, id FROM t1_values -WHERE select_id = 50 OR select_id IS NULL; +WHERE select_id = 50 OR select_id IS NULL order by id; CAST(my_binary_30 AS TIME) my_binary_30 id NULL NULL 1 -00:00:00 +00:00:00 2 00:00:00 <--------30 characters-------> 3 --00:00:00 ---äÖüß@µ*$-- -NULL -1 -41:58:00 1 17:58 +-00:00:00 ---äÖüß@µ*$-- 4 +NULL -1 5 +41:58:00 1 17:58 22 Warnings: Warning 1292 Truncated incorrect time value: '' Warning 1292 Truncated incorrect time value: '<--------30 characters------->' @@ -3594,7 +3776,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as time) AS `CAST(my_binary_30 AS TIME)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 50 OR select_id IS NULL); +WHERE select_id = 50 OR select_id IS NULL) order by id; CAST(my_binary_30 AS TIME) my_binary_30 id NULL NULL 1 00:00:00 @@ -3615,7 +3797,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS TIME), my_varchar_1000, id FROM t1_values; SELECT CAST(my_varchar_1000 AS TIME), my_varchar_1000, id FROM t1_values -WHERE select_id = 49 OR select_id IS NULL; +WHERE select_id = 49 OR select_id IS NULL order by id; CAST(my_varchar_1000 AS TIME) my_varchar_1000 id NULL NULL 1 NULL 2 @@ -3632,7 +3814,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as time) AS `CAST(my_varchar_1000 AS TIME)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 49 OR select_id IS NULL); +WHERE select_id = 49 OR select_id IS NULL) order by id; CAST(my_varchar_1000 AS TIME) my_varchar_1000 id NULL NULL 1 NULL 2 @@ -3651,7 +3833,7 @@ CREATE VIEW v1 AS SELECT CAST(my_char_30 AS TIME), my_char_30, id FROM t1_values; SELECT CAST(my_char_30 AS TIME), my_char_30, id FROM t1_values -WHERE select_id = 48 OR select_id IS NULL; +WHERE select_id = 48 OR select_id IS NULL order by id; CAST(my_char_30 AS TIME) my_char_30 id NULL NULL 1 NULL 2 @@ -3668,7 +3850,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as time) AS `CAST(my_char_30 AS TIME)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 48 OR select_id IS NULL); +WHERE select_id = 48 OR select_id IS NULL) order by id; CAST(my_char_30 AS TIME) my_char_30 id NULL NULL 1 NULL 2 @@ -3687,7 +3869,7 @@ CREATE VIEW v1 AS SELECT CAST(my_year AS DATETIME), my_year, id FROM t1_values; SELECT CAST(my_year AS DATETIME), my_year, id FROM t1_values -WHERE select_id = 47 OR select_id IS NULL; +WHERE select_id = 47 OR select_id IS NULL order by id; CAST(my_year AS DATETIME) my_year id NULL NULL 1 NULL 1901 2 @@ -3704,7 +3886,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as datetime) AS `CAST(my_year AS DATETIME)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 47 OR select_id IS NULL); +WHERE select_id = 47 OR select_id IS NULL) order by id; CAST(my_year AS DATETIME) my_year id NULL NULL 1 NULL 1901 2 @@ -3723,7 +3905,7 @@ CREATE VIEW v1 AS SELECT CAST(my_time AS DATETIME), my_time, id FROM t1_values; SELECT CAST(my_time AS DATETIME), my_time, id FROM t1_values -WHERE select_id = 46 OR select_id IS NULL; +WHERE select_id = 46 OR select_id IS NULL order by id; CAST(my_time AS DATETIME) my_time id NULL NULL 1 0000-00-00 00:00:00 -838:59:59 2 @@ -3738,7 +3920,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as datetime) AS `CAST(my_time AS DATETIME)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 46 OR select_id IS NULL); +WHERE select_id = 46 OR select_id IS NULL) order by id; CAST(my_time AS DATETIME) my_time id NULL NULL 1 0000-00-00 00:00:00 -838:59:59 2 @@ -3755,7 +3937,7 @@ CREATE VIEW v1 AS SELECT CAST(my_timestamp AS DATETIME), my_timestamp, id FROM t1_values; SELECT CAST(my_timestamp AS DATETIME), my_timestamp, id FROM t1_values -WHERE select_id = 45 OR select_id IS NULL; +WHERE select_id = 45 OR select_id IS NULL order by id; CAST(my_timestamp AS DATETIME) my_timestamp id 0000-00-00 00:00:00 0000-00-00 00:00:00 1 1970-01-01 03:00:01 1970-01-01 03:00:01 2 @@ -3767,7 +3949,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as datetime) AS `CAST(my_timestamp AS DATETIME)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 45 OR select_id IS NULL); +WHERE select_id = 45 OR select_id IS NULL) order by id; CAST(my_timestamp AS DATETIME) my_timestamp id 0000-00-00 00:00:00 0000-00-00 00:00:00 1 1970-01-01 03:00:01 1970-01-01 03:00:01 2 @@ -3781,7 +3963,7 @@ CREATE VIEW v1 AS SELECT CAST(my_date AS DATETIME), my_date, id FROM t1_values; SELECT CAST(my_date AS DATETIME), my_date, id FROM t1_values -WHERE select_id = 44 OR select_id IS NULL; +WHERE select_id = 44 OR select_id IS NULL order by id; CAST(my_date AS DATETIME) my_date id NULL NULL 1 0001-01-01 00:00:00 0001-01-01 2 @@ -3793,7 +3975,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as datetime) AS `CAST(my_date AS DATETIME)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 44 OR select_id IS NULL); +WHERE select_id = 44 OR select_id IS NULL) order by id; CAST(my_date AS DATETIME) my_date id NULL NULL 1 0001-01-01 00:00:00 0001-01-01 2 @@ -3807,7 +3989,7 @@ CREATE VIEW v1 AS SELECT CAST(my_datetime AS DATETIME), my_datetime, id FROM t1_values; SELECT CAST(my_datetime AS DATETIME), my_datetime, id FROM t1_values -WHERE select_id = 43 OR select_id IS NULL; +WHERE select_id = 43 OR select_id IS NULL order by id; CAST(my_datetime AS DATETIME) my_datetime id NULL NULL 1 0001-01-01 00:00:00 0001-01-01 00:00:00 2 @@ -3819,7 +4001,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as datetime) AS `CAST(my_datetime AS DATETIME)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 43 OR select_id IS NULL); +WHERE select_id = 43 OR select_id IS NULL) order by id; CAST(my_datetime AS DATETIME) my_datetime id NULL NULL 1 0001-01-01 00:00:00 0001-01-01 00:00:00 2 @@ -3833,7 +4015,7 @@ CREATE VIEW v1 AS SELECT CAST(my_double AS DATETIME), my_double, id FROM t1_values; SELECT CAST(my_double AS DATETIME), my_double, id FROM t1_values -WHERE select_id = 42 OR select_id IS NULL; +WHERE select_id = 42 OR select_id IS NULL order by id; CAST(my_double AS DATETIME) my_double id NULL NULL 1 NULL -1.7976931348623e+308 2 @@ -3852,7 +4034,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as datetime) AS `CAST(my_double AS DATETIME)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 42 OR select_id IS NULL); +WHERE select_id = 42 OR select_id IS NULL) order by id; CAST(my_double AS DATETIME) my_double id NULL NULL 1 NULL -1.7976931348623e+308 2 @@ -3873,7 +4055,7 @@ CREATE VIEW v1 AS SELECT CAST(my_bigint AS DATETIME), my_bigint, id FROM t1_values; SELECT CAST(my_bigint AS DATETIME), my_bigint, id FROM t1_values -WHERE select_id = 41 OR select_id IS NULL; +WHERE select_id = 41 OR select_id IS NULL order by id; CAST(my_bigint AS DATETIME) my_bigint id NULL NULL 1 NULL -9223372036854775808 2 @@ -3892,7 +4074,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as datetime) AS `CAST(my_bigint AS DATETIME)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 41 OR select_id IS NULL); +WHERE select_id = 41 OR select_id IS NULL) order by id; CAST(my_bigint AS DATETIME) my_bigint id NULL NULL 1 NULL -9223372036854775808 2 @@ -3913,7 +4095,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS DATETIME), my_varbinary_1000, id FROM t1_values; SELECT CAST(my_varbinary_1000 AS DATETIME), my_varbinary_1000, id FROM t1_values -WHERE select_id = 40 OR select_id IS NULL; +WHERE select_id = 40 OR select_id IS NULL order by id; CAST(my_varbinary_1000 AS DATETIME) my_varbinary_1000 id NULL NULL 1 NULL 2 @@ -3931,7 +4113,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as datetime) AS `CAST(my_varbinary_1000 AS DATETIME)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 40 OR select_id IS NULL); +WHERE select_id = 40 OR select_id IS NULL) order by id; CAST(my_varbinary_1000 AS DATETIME) my_varbinary_1000 id NULL NULL 1 NULL 2 @@ -3951,14 +4133,14 @@ CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS DATETIME), my_binary_30, id FROM t1_values; SELECT CAST(my_binary_30 AS DATETIME), my_binary_30, id FROM t1_values -WHERE select_id = 39 OR select_id IS NULL; +WHERE select_id = 39 OR select_id IS NULL order by id; CAST(my_binary_30 AS DATETIME) my_binary_30 id NULL NULL 1 -NULL +NULL 2 NULL <--------30 characters-------> 3 -NULL ---äÖüß@µ*$-- -NULL -1 -2005-06-27 17:58:00 2005-06-27 17:58 +NULL ---äÖüß@µ*$-- 4 +NULL -1 5 +2005-06-27 17:58:00 2005-06-27 17:58 16 Warnings: Warning 1292 Truncated incorrect datetime value: '' Warning 1292 Truncated incorrect datetime value: '<--------30 characters------->' @@ -3970,7 +4152,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as datetime) AS `CAST(my_binary_30 AS DATETIME)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 39 OR select_id IS NULL); +WHERE select_id = 39 OR select_id IS NULL) order by id; CAST(my_binary_30 AS DATETIME) my_binary_30 id NULL NULL 1 NULL @@ -3991,7 +4173,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS DATETIME), my_varchar_1000, id FROM t1_values; SELECT CAST(my_varchar_1000 AS DATETIME), my_varchar_1000, id FROM t1_values -WHERE select_id = 38 OR select_id IS NULL; +WHERE select_id = 38 OR select_id IS NULL order by id; CAST(my_varchar_1000 AS DATETIME) my_varchar_1000 id NULL NULL 1 NULL 2 @@ -4009,7 +4191,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as datetime) AS `CAST(my_varchar_1000 AS DATETIME)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 38 OR select_id IS NULL); +WHERE select_id = 38 OR select_id IS NULL) order by id; CAST(my_varchar_1000 AS DATETIME) my_varchar_1000 id NULL NULL 1 NULL 2 @@ -4029,7 +4211,7 @@ CREATE VIEW v1 AS SELECT CAST(my_char_30 AS DATETIME), my_char_30, id FROM t1_values; SELECT CAST(my_char_30 AS DATETIME), my_char_30, id FROM t1_values -WHERE select_id = 37 OR select_id IS NULL; +WHERE select_id = 37 OR select_id IS NULL order by id; CAST(my_char_30 AS DATETIME) my_char_30 id NULL NULL 1 NULL 2 @@ -4047,7 +4229,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as datetime) AS `CAST(my_char_30 AS DATETIME)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 37 OR select_id IS NULL); +WHERE select_id = 37 OR select_id IS NULL) order by id; CAST(my_char_30 AS DATETIME) my_char_30 id NULL NULL 1 NULL 2 @@ -4067,7 +4249,7 @@ CREATE VIEW v1 AS SELECT CAST(my_year AS DATE), my_year, id FROM t1_values; SELECT CAST(my_year AS DATE), my_year, id FROM t1_values -WHERE select_id = 36 OR select_id IS NULL; +WHERE select_id = 36 OR select_id IS NULL order by id; CAST(my_year AS DATE) my_year id NULL NULL 1 NULL 1901 2 @@ -4084,7 +4266,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as date) AS `CAST(my_year AS DATE)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 36 OR select_id IS NULL); +WHERE select_id = 36 OR select_id IS NULL) order by id; CAST(my_year AS DATE) my_year id NULL NULL 1 NULL 1901 2 @@ -4103,7 +4285,7 @@ CREATE VIEW v1 AS SELECT CAST(my_time AS DATE), my_time, id FROM t1_values; SELECT CAST(my_time AS DATE), my_time, id FROM t1_values -WHERE select_id = 35 OR select_id IS NULL; +WHERE select_id = 35 OR select_id IS NULL order by id; CAST(my_time AS DATE) my_time id NULL NULL 1 0000-00-00 -838:59:59 2 @@ -4115,7 +4297,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as date) AS `CAST(my_time AS DATE)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 35 OR select_id IS NULL); +WHERE select_id = 35 OR select_id IS NULL) order by id; CAST(my_time AS DATE) my_time id NULL NULL 1 0000-00-00 -838:59:59 2 @@ -4129,7 +4311,7 @@ CREATE VIEW v1 AS SELECT CAST(my_timestamp AS DATE), my_timestamp, id FROM t1_values; SELECT CAST(my_timestamp AS DATE), my_timestamp, id FROM t1_values -WHERE select_id = 34 OR select_id IS NULL; +WHERE select_id = 34 OR select_id IS NULL order by id; CAST(my_timestamp AS DATE) my_timestamp id 0000-00-00 0000-00-00 00:00:00 1 1970-01-01 1970-01-01 03:00:01 2 @@ -4141,7 +4323,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as date) AS `CAST(my_timestamp AS DATE)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 34 OR select_id IS NULL); +WHERE select_id = 34 OR select_id IS NULL) order by id; CAST(my_timestamp AS DATE) my_timestamp id 0000-00-00 0000-00-00 00:00:00 1 1970-01-01 1970-01-01 03:00:01 2 @@ -4155,7 +4337,7 @@ CREATE VIEW v1 AS SELECT CAST(my_date AS DATE), my_date, id FROM t1_values; SELECT CAST(my_date AS DATE), my_date, id FROM t1_values -WHERE select_id = 33 OR select_id IS NULL; +WHERE select_id = 33 OR select_id IS NULL order by id; CAST(my_date AS DATE) my_date id NULL NULL 1 0001-01-01 0001-01-01 2 @@ -4167,7 +4349,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as date) AS `CAST(my_date AS DATE)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 33 OR select_id IS NULL); +WHERE select_id = 33 OR select_id IS NULL) order by id; CAST(my_date AS DATE) my_date id NULL NULL 1 0001-01-01 0001-01-01 2 @@ -4181,7 +4363,7 @@ CREATE VIEW v1 AS SELECT CAST(my_datetime AS DATE), my_datetime, id FROM t1_values; SELECT CAST(my_datetime AS DATE), my_datetime, id FROM t1_values -WHERE select_id = 32 OR select_id IS NULL; +WHERE select_id = 32 OR select_id IS NULL order by id; CAST(my_datetime AS DATE) my_datetime id NULL NULL 1 0001-01-01 0001-01-01 00:00:00 2 @@ -4193,7 +4375,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as date) AS `CAST(my_datetime AS DATE)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 32 OR select_id IS NULL); +WHERE select_id = 32 OR select_id IS NULL) order by id; CAST(my_datetime AS DATE) my_datetime id NULL NULL 1 0001-01-01 0001-01-01 00:00:00 2 @@ -4207,7 +4389,7 @@ CREATE VIEW v1 AS SELECT CAST(my_double AS DATE), my_double, id FROM t1_values; SELECT CAST(my_double AS DATE), my_double, id FROM t1_values -WHERE select_id = 31 OR select_id IS NULL; +WHERE select_id = 31 OR select_id IS NULL order by id; CAST(my_double AS DATE) my_double id NULL NULL 1 NULL -1.7976931348623e+308 2 @@ -4225,7 +4407,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as date) AS `CAST(my_double AS DATE)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 31 OR select_id IS NULL); +WHERE select_id = 31 OR select_id IS NULL) order by id; CAST(my_double AS DATE) my_double id NULL NULL 1 NULL -1.7976931348623e+308 2 @@ -4245,7 +4427,7 @@ CREATE VIEW v1 AS SELECT CAST(my_bigint AS DATE), my_bigint, id FROM t1_values; SELECT CAST(my_bigint AS DATE), my_bigint, id FROM t1_values -WHERE select_id = 30 OR select_id IS NULL; +WHERE select_id = 30 OR select_id IS NULL order by id; CAST(my_bigint AS DATE) my_bigint id NULL NULL 1 NULL -9223372036854775808 2 @@ -4263,7 +4445,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as date) AS `CAST(my_bigint AS DATE)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 30 OR select_id IS NULL); +WHERE select_id = 30 OR select_id IS NULL) order by id; CAST(my_bigint AS DATE) my_bigint id NULL NULL 1 NULL -9223372036854775808 2 @@ -4283,7 +4465,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS DATE), my_varbinary_1000, id FROM t1_values; SELECT CAST(my_varbinary_1000 AS DATE), my_varbinary_1000, id FROM t1_values -WHERE select_id = 29 OR select_id IS NULL; +WHERE select_id = 29 OR select_id IS NULL order by id; CAST(my_varbinary_1000 AS DATE) my_varbinary_1000 id NULL NULL 1 NULL 2 @@ -4301,7 +4483,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as date) AS `CAST(my_varbinary_1000 AS DATE)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 29 OR select_id IS NULL); +WHERE select_id = 29 OR select_id IS NULL) order by id; CAST(my_varbinary_1000 AS DATE) my_varbinary_1000 id NULL NULL 1 NULL 2 @@ -4321,14 +4503,14 @@ CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS DATE), my_binary_30, id FROM t1_values; SELECT CAST(my_binary_30 AS DATE), my_binary_30, id FROM t1_values -WHERE select_id = 28 OR select_id IS NULL; +WHERE select_id = 28 OR select_id IS NULL order by id; CAST(my_binary_30 AS DATE) my_binary_30 id NULL NULL 1 -NULL +NULL 2 NULL <--------30 characters-------> 3 -NULL ---äÖüß@µ*$-- -NULL -1 -2005-06-27 2005-06-27 +NULL ---äÖüß@µ*$-- 4 +NULL -1 5 +2005-06-27 2005-06-27 10 Warnings: Warning 1292 Truncated incorrect datetime value: '' Warning 1292 Truncated incorrect datetime value: '<--------30 characters------->' @@ -4340,7 +4522,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as date) AS `CAST(my_binary_30 AS DATE)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 28 OR select_id IS NULL); +WHERE select_id = 28 OR select_id IS NULL) order by id; CAST(my_binary_30 AS DATE) my_binary_30 id NULL NULL 1 NULL @@ -4361,7 +4543,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS DATE), my_varchar_1000, id FROM t1_values; SELECT CAST(my_varchar_1000 AS DATE), my_varchar_1000, id FROM t1_values -WHERE select_id = 27 OR select_id IS NULL; +WHERE select_id = 27 OR select_id IS NULL order by id; CAST(my_varchar_1000 AS DATE) my_varchar_1000 id NULL NULL 1 NULL 2 @@ -4379,7 +4561,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as date) AS `CAST(my_varchar_1000 AS DATE)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 27 OR select_id IS NULL); +WHERE select_id = 27 OR select_id IS NULL) order by id; CAST(my_varchar_1000 AS DATE) my_varchar_1000 id NULL NULL 1 NULL 2 @@ -4399,7 +4581,7 @@ CREATE VIEW v1 AS SELECT CAST(my_char_30 AS DATE), my_char_30, id FROM t1_values; SELECT CAST(my_char_30 AS DATE), my_char_30, id FROM t1_values -WHERE select_id = 26 OR select_id IS NULL; +WHERE select_id = 26 OR select_id IS NULL order by id; CAST(my_char_30 AS DATE) my_char_30 id NULL NULL 1 NULL 2 @@ -4417,7 +4599,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as date) AS `CAST(my_char_30 AS DATE)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 26 OR select_id IS NULL); +WHERE select_id = 26 OR select_id IS NULL) order by id; CAST(my_char_30 AS DATE) my_char_30 id NULL NULL 1 NULL 2 @@ -4437,7 +4619,7 @@ CREATE VIEW v1 AS SELECT CAST(my_year AS CHAR), my_year, id FROM t1_values; SELECT CAST(my_year AS CHAR), my_year, id FROM t1_values -WHERE select_id = 25 OR select_id IS NULL; +WHERE select_id = 25 OR select_id IS NULL order by id; CAST(my_year AS CHAR) my_year id NULL NULL 1 1901 1901 2 @@ -4449,7 +4631,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as char charset latin1) AS `CAST(my_year AS CHAR)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 25 OR select_id IS NULL); +WHERE select_id = 25 OR select_id IS NULL) order by id; CAST(my_year AS CHAR) my_year id NULL NULL 1 1901 1901 2 @@ -4463,7 +4645,7 @@ CREATE VIEW v1 AS SELECT CAST(my_time AS CHAR), my_time, id FROM t1_values; SELECT CAST(my_time AS CHAR), my_time, id FROM t1_values -WHERE select_id = 24 OR select_id IS NULL; +WHERE select_id = 24 OR select_id IS NULL order by id; CAST(my_time AS CHAR) my_time id NULL NULL 1 -838:59:59 -838:59:59 2 @@ -4475,7 +4657,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as char charset latin1) AS `CAST(my_time AS CHAR)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 24 OR select_id IS NULL); +WHERE select_id = 24 OR select_id IS NULL) order by id; CAST(my_time AS CHAR) my_time id NULL NULL 1 -838:59:59 -838:59:59 2 @@ -4489,7 +4671,7 @@ CREATE VIEW v1 AS SELECT CAST(my_timestamp AS CHAR), my_timestamp, id FROM t1_values; SELECT CAST(my_timestamp AS CHAR), my_timestamp, id FROM t1_values -WHERE select_id = 23 OR select_id IS NULL; +WHERE select_id = 23 OR select_id IS NULL order by id; CAST(my_timestamp AS CHAR) my_timestamp id 0000-00-00 00:00:00 0000-00-00 00:00:00 1 1970-01-01 03:00:01 1970-01-01 03:00:01 2 @@ -4501,7 +4683,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as char charset latin1) AS `CAST(my_timestamp AS CHAR)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 23 OR select_id IS NULL); +WHERE select_id = 23 OR select_id IS NULL) order by id; CAST(my_timestamp AS CHAR) my_timestamp id 0000-00-00 00:00:00 0000-00-00 00:00:00 1 1970-01-01 03:00:01 1970-01-01 03:00:01 2 @@ -4515,7 +4697,7 @@ CREATE VIEW v1 AS SELECT CAST(my_date AS CHAR), my_date, id FROM t1_values; SELECT CAST(my_date AS CHAR), my_date, id FROM t1_values -WHERE select_id = 22 OR select_id IS NULL; +WHERE select_id = 22 OR select_id IS NULL order by id; CAST(my_date AS CHAR) my_date id NULL NULL 1 0001-01-01 0001-01-01 2 @@ -4527,7 +4709,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as char charset latin1) AS `CAST(my_date AS CHAR)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 22 OR select_id IS NULL); +WHERE select_id = 22 OR select_id IS NULL) order by id; CAST(my_date AS CHAR) my_date id NULL NULL 1 0001-01-01 0001-01-01 2 @@ -4541,7 +4723,7 @@ CREATE VIEW v1 AS SELECT CAST(my_datetime AS CHAR), my_datetime, id FROM t1_values; SELECT CAST(my_datetime AS CHAR), my_datetime, id FROM t1_values -WHERE select_id = 21 OR select_id IS NULL; +WHERE select_id = 21 OR select_id IS NULL order by id; CAST(my_datetime AS CHAR) my_datetime id NULL NULL 1 0001-01-01 00:00:00 0001-01-01 00:00:00 2 @@ -4553,7 +4735,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as char charset latin1) AS `CAST(my_datetime AS CHAR)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 21 OR select_id IS NULL); +WHERE select_id = 21 OR select_id IS NULL) order by id; CAST(my_datetime AS CHAR) my_datetime id NULL NULL 1 0001-01-01 00:00:00 0001-01-01 00:00:00 2 @@ -4567,7 +4749,7 @@ CREATE VIEW v1 AS SELECT CAST(my_double AS CHAR), my_double, id FROM t1_values; SELECT CAST(my_double AS CHAR), my_double, id FROM t1_values -WHERE select_id = 20 OR select_id IS NULL; +WHERE select_id = 20 OR select_id IS NULL order by id; CAST(my_double AS CHAR) my_double id NULL NULL 1 -1.7976931348623e+308 -1.7976931348623e+308 2 @@ -4579,7 +4761,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as char charset latin1) AS `CAST(my_double AS CHAR)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 20 OR select_id IS NULL); +WHERE select_id = 20 OR select_id IS NULL) order by id; CAST(my_double AS CHAR) my_double id NULL NULL 1 -1.7976931348623e+308 -1.7976931348623e+308 2 @@ -4593,7 +4775,7 @@ CREATE VIEW v1 AS SELECT CAST(my_decimal AS CHAR), my_decimal, id FROM t1_values; SELECT CAST(my_decimal AS CHAR), my_decimal, id FROM t1_values -WHERE select_id = 19 OR select_id IS NULL; +WHERE select_id = 19 OR select_id IS NULL order by id; CAST(my_decimal AS CHAR) my_decimal id NULL NULL 1 -9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -4605,7 +4787,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as char charset latin1) AS `CAST(my_decimal AS CHAR)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 19 OR select_id IS NULL); +WHERE select_id = 19 OR select_id IS NULL) order by id; CAST(my_decimal AS CHAR) my_decimal id NULL NULL 1 -9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -4619,7 +4801,7 @@ CREATE VIEW v1 AS SELECT CAST(my_bigint AS CHAR), my_bigint, id FROM t1_values; SELECT CAST(my_bigint AS CHAR), my_bigint, id FROM t1_values -WHERE select_id = 18 OR select_id IS NULL; +WHERE select_id = 18 OR select_id IS NULL order by id; CAST(my_bigint AS CHAR) my_bigint id NULL NULL 1 -9223372036854775808 -9223372036854775808 2 @@ -4631,7 +4813,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as char charset latin1) AS `CAST(my_bigint AS CHAR)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 18 OR select_id IS NULL); +WHERE select_id = 18 OR select_id IS NULL) order by id; CAST(my_bigint AS CHAR) my_bigint id NULL NULL 1 -9223372036854775808 -9223372036854775808 2 @@ -4645,7 +4827,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS CHAR), my_varbinary_1000, id FROM t1_values; SELECT CAST(my_varbinary_1000 AS CHAR), my_varbinary_1000, id FROM t1_values -WHERE select_id = 17 OR select_id IS NULL; +WHERE select_id = 17 OR select_id IS NULL order by id; CAST(my_varbinary_1000 AS CHAR) my_varbinary_1000 id NULL NULL 1 2 @@ -4657,7 +4839,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as char charset latin1) AS `CAST(my_varbinary_1000 AS CHAR)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 17 OR select_id IS NULL); +WHERE select_id = 17 OR select_id IS NULL) order by id; CAST(my_varbinary_1000 AS CHAR) my_varbinary_1000 id NULL NULL 1 2 @@ -4671,19 +4853,19 @@ CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS CHAR), my_binary_30, id FROM t1_values; SELECT CAST(my_binary_30 AS CHAR), my_binary_30, id FROM t1_values -WHERE select_id = 16 OR select_id IS NULL; +WHERE select_id = 16 OR select_id IS NULL order by id; CAST(my_binary_30 AS CHAR) my_binary_30 id NULL NULL 1 - + 2 <--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- --1 + ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 +-1 -1 5 SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as char charset latin1) AS `CAST(my_binary_30 AS CHAR)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 16 OR select_id IS NULL); +WHERE select_id = 16 OR select_id IS NULL) order by id; CAST(my_binary_30 AS CHAR) my_binary_30 id NULL NULL 1 @@ -4697,7 +4879,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS CHAR), my_varchar_1000, id FROM t1_values; SELECT CAST(my_varchar_1000 AS CHAR), my_varchar_1000, id FROM t1_values -WHERE select_id = 15 OR select_id IS NULL; +WHERE select_id = 15 OR select_id IS NULL order by id; CAST(my_varchar_1000 AS CHAR) my_varchar_1000 id NULL NULL 1 2 @@ -4709,7 +4891,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as char charset latin1) AS `CAST(my_varchar_1000 AS CHAR)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 15 OR select_id IS NULL); +WHERE select_id = 15 OR select_id IS NULL) order by id; CAST(my_varchar_1000 AS CHAR) my_varchar_1000 id NULL NULL 1 2 @@ -4723,7 +4905,7 @@ CREATE VIEW v1 AS SELECT CAST(my_char_30 AS CHAR), my_char_30, id FROM t1_values; SELECT CAST(my_char_30 AS CHAR), my_char_30, id FROM t1_values -WHERE select_id = 14 OR select_id IS NULL; +WHERE select_id = 14 OR select_id IS NULL order by id; CAST(my_char_30 AS CHAR) my_char_30 id NULL NULL 1 2 @@ -4735,7 +4917,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as char charset latin1) AS `CAST(my_char_30 AS CHAR)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 14 OR select_id IS NULL); +WHERE select_id = 14 OR select_id IS NULL) order by id; CAST(my_char_30 AS CHAR) my_char_30 id NULL NULL 1 2 @@ -4749,7 +4931,7 @@ CREATE VIEW v1 AS SELECT CAST(my_year AS BINARY), my_year, id FROM t1_values; SELECT CAST(my_year AS BINARY), my_year, id FROM t1_values -WHERE select_id = 13 OR select_id IS NULL; +WHERE select_id = 13 OR select_id IS NULL order by id; CAST(my_year AS BINARY) my_year id NULL NULL 1 1901 1901 2 @@ -4761,7 +4943,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as char charset binary) AS `CAST(my_year AS BINARY)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 13 OR select_id IS NULL); +WHERE select_id = 13 OR select_id IS NULL) order by id; CAST(my_year AS BINARY) my_year id NULL NULL 1 1901 1901 2 @@ -4775,7 +4957,7 @@ CREATE VIEW v1 AS SELECT CAST(my_time AS BINARY), my_time, id FROM t1_values; SELECT CAST(my_time AS BINARY), my_time, id FROM t1_values -WHERE select_id = 12 OR select_id IS NULL; +WHERE select_id = 12 OR select_id IS NULL order by id; CAST(my_time AS BINARY) my_time id NULL NULL 1 -838:59:59 -838:59:59 2 @@ -4787,7 +4969,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as char charset binary) AS `CAST(my_time AS BINARY)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 12 OR select_id IS NULL); +WHERE select_id = 12 OR select_id IS NULL) order by id; CAST(my_time AS BINARY) my_time id NULL NULL 1 -838:59:59 -838:59:59 2 @@ -4801,7 +4983,7 @@ CREATE VIEW v1 AS SELECT CAST(my_timestamp AS BINARY), my_timestamp, id FROM t1_values; SELECT CAST(my_timestamp AS BINARY), my_timestamp, id FROM t1_values -WHERE select_id = 11 OR select_id IS NULL; +WHERE select_id = 11 OR select_id IS NULL order by id; CAST(my_timestamp AS BINARY) my_timestamp id 0000-00-00 00:00:00 0000-00-00 00:00:00 1 1970-01-01 03:00:01 1970-01-01 03:00:01 2 @@ -4813,7 +4995,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as char charset binary) AS `CAST(my_timestamp AS BINARY)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 11 OR select_id IS NULL); +WHERE select_id = 11 OR select_id IS NULL) order by id; CAST(my_timestamp AS BINARY) my_timestamp id 0000-00-00 00:00:00 0000-00-00 00:00:00 1 1970-01-01 03:00:01 1970-01-01 03:00:01 2 @@ -4827,7 +5009,7 @@ CREATE VIEW v1 AS SELECT CAST(my_date AS BINARY), my_date, id FROM t1_values; SELECT CAST(my_date AS BINARY), my_date, id FROM t1_values -WHERE select_id = 10 OR select_id IS NULL; +WHERE select_id = 10 OR select_id IS NULL order by id; CAST(my_date AS BINARY) my_date id NULL NULL 1 0001-01-01 0001-01-01 2 @@ -4839,7 +5021,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as char charset binary) AS `CAST(my_date AS BINARY)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 10 OR select_id IS NULL); +WHERE select_id = 10 OR select_id IS NULL) order by id; CAST(my_date AS BINARY) my_date id NULL NULL 1 0001-01-01 0001-01-01 2 @@ -4853,7 +5035,7 @@ CREATE VIEW v1 AS SELECT CAST(my_datetime AS BINARY), my_datetime, id FROM t1_values; SELECT CAST(my_datetime AS BINARY), my_datetime, id FROM t1_values -WHERE select_id = 9 OR select_id IS NULL; +WHERE select_id = 9 OR select_id IS NULL order by id; CAST(my_datetime AS BINARY) my_datetime id NULL NULL 1 0001-01-01 00:00:00 0001-01-01 00:00:00 2 @@ -4865,7 +5047,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as char charset binary) AS `CAST(my_datetime AS BINARY)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 9 OR select_id IS NULL); +WHERE select_id = 9 OR select_id IS NULL) order by id; CAST(my_datetime AS BINARY) my_datetime id NULL NULL 1 0001-01-01 00:00:00 0001-01-01 00:00:00 2 @@ -4879,7 +5061,7 @@ CREATE VIEW v1 AS SELECT CAST(my_double AS BINARY), my_double, id FROM t1_values; SELECT CAST(my_double AS BINARY), my_double, id FROM t1_values -WHERE select_id = 8 OR select_id IS NULL; +WHERE select_id = 8 OR select_id IS NULL order by id; CAST(my_double AS BINARY) my_double id NULL NULL 1 -1.7976931348623e+308 -1.7976931348623e+308 2 @@ -4891,7 +5073,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as char charset binary) AS `CAST(my_double AS BINARY)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 8 OR select_id IS NULL); +WHERE select_id = 8 OR select_id IS NULL) order by id; CAST(my_double AS BINARY) my_double id NULL NULL 1 -1.7976931348623e+308 -1.7976931348623e+308 2 @@ -4905,7 +5087,7 @@ CREATE VIEW v1 AS SELECT CAST(my_decimal AS BINARY), my_decimal, id FROM t1_values; SELECT CAST(my_decimal AS BINARY), my_decimal, id FROM t1_values -WHERE select_id = 7 OR select_id IS NULL; +WHERE select_id = 7 OR select_id IS NULL order by id; CAST(my_decimal AS BINARY) my_decimal id NULL NULL 1 -9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -4917,7 +5099,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as char charset binary) AS `CAST(my_decimal AS BINARY)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 7 OR select_id IS NULL); +WHERE select_id = 7 OR select_id IS NULL) order by id; CAST(my_decimal AS BINARY) my_decimal id NULL NULL 1 -9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2 @@ -4931,7 +5113,7 @@ CREATE VIEW v1 AS SELECT CAST(my_bigint AS BINARY), my_bigint, id FROM t1_values; SELECT CAST(my_bigint AS BINARY), my_bigint, id FROM t1_values -WHERE select_id = 6 OR select_id IS NULL; +WHERE select_id = 6 OR select_id IS NULL order by id; CAST(my_bigint AS BINARY) my_bigint id NULL NULL 1 -9223372036854775808 -9223372036854775808 2 @@ -4943,7 +5125,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as char charset binary) AS `CAST(my_bigint AS BINARY)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 6 OR select_id IS NULL); +WHERE select_id = 6 OR select_id IS NULL) order by id; CAST(my_bigint AS BINARY) my_bigint id NULL NULL 1 -9223372036854775808 -9223372036854775808 2 @@ -4957,7 +5139,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS BINARY), my_varbinary_1000, id FROM t1_values; SELECT CAST(my_varbinary_1000 AS BINARY), my_varbinary_1000, id FROM t1_values -WHERE select_id = 5 OR select_id IS NULL; +WHERE select_id = 5 OR select_id IS NULL order by id; CAST(my_varbinary_1000 AS BINARY) my_varbinary_1000 id NULL NULL 1 2 @@ -4969,7 +5151,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as char charset binary) AS `CAST(my_varbinary_1000 AS BINARY)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 5 OR select_id IS NULL); +WHERE select_id = 5 OR select_id IS NULL) order by id; CAST(my_varbinary_1000 AS BINARY) my_varbinary_1000 id NULL NULL 1 2 @@ -4983,19 +5165,19 @@ CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS BINARY), my_binary_30, id FROM t1_values; SELECT CAST(my_binary_30 AS BINARY), my_binary_30, id FROM t1_values -WHERE select_id = 4 OR select_id IS NULL; +WHERE select_id = 4 OR select_id IS NULL order by id; CAST(my_binary_30 AS BINARY) my_binary_30 id NULL NULL 1 - + 2 <--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- --1 + ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 +-1 -1 5 SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as char charset binary) AS `CAST(my_binary_30 AS BINARY)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 4 OR select_id IS NULL); +WHERE select_id = 4 OR select_id IS NULL) order by id; CAST(my_binary_30 AS BINARY) my_binary_30 id NULL NULL 1 @@ -5009,7 +5191,7 @@ CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS BINARY), my_varchar_1000, id FROM t1_values; SELECT CAST(my_varchar_1000 AS BINARY), my_varchar_1000, id FROM t1_values -WHERE select_id = 3 OR select_id IS NULL; +WHERE select_id = 3 OR select_id IS NULL order by id; CAST(my_varchar_1000 AS BINARY) my_varchar_1000 id NULL NULL 1 2 @@ -5021,7 +5203,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as char charset binary) AS `CAST(my_varchar_1000 AS BINARY)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 3 OR select_id IS NULL); +WHERE select_id = 3 OR select_id IS NULL) order by id; CAST(my_varchar_1000 AS BINARY) my_varchar_1000 id NULL NULL 1 2 @@ -5035,7 +5217,7 @@ CREATE VIEW v1 AS SELECT CAST(my_char_30 AS BINARY), my_char_30, id FROM t1_values; SELECT CAST(my_char_30 AS BINARY), my_char_30, id FROM t1_values -WHERE select_id = 2 OR select_id IS NULL; +WHERE select_id = 2 OR select_id IS NULL order by id; CAST(my_char_30 AS BINARY) my_char_30 id NULL NULL 1 2 @@ -5047,7 +5229,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as char charset binary) AS `CAST(my_char_30 AS BINARY)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 2 OR select_id IS NULL); +WHERE select_id = 2 OR select_id IS NULL) order by id; CAST(my_char_30 AS BINARY) my_char_30 id NULL NULL 1 2 @@ -5059,7 +5241,7 @@ DROP VIEW v1; CREATE VIEW v1 AS SELECT sqrt(my_bigint), my_bigint, id FROM t1_values; SELECT sqrt(my_bigint), my_bigint, id FROM t1_values -WHERE select_id = 1 OR select_id IS NULL; +WHERE select_id = 1 OR select_id IS NULL order by id; sqrt(my_bigint) my_bigint id NULL NULL 1 NULL -9223372036854775808 2 @@ -5073,7 +5255,7 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select sqrt(`t1_values`.`my_bigint`) AS `sqrt(my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 1 OR select_id IS NULL); +WHERE select_id = 1 OR select_id IS NULL) order by id; sqrt(my_bigint) my_bigint id NULL NULL 1 NULL -9223372036854775808 2 diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc_02.result b/mysql-test/suite/funcs_1/r/myisam_storedproc_02.result index aff27fbabc4..6ba95c9fa63 100644 --- a/mysql-test/suite/funcs_1/r/myisam_storedproc_02.result +++ b/mysql-test/suite/funcs_1/r/myisam_storedproc_02.result @@ -9,20 +9,25 @@ 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 = myisam; -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 = myisam; -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 = myisam; -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 = myisam; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4; +create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1; +create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2; +create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3; +create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 = myisam; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6; +create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6; USE db_storedproc; -create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = myisam; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7; +create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -34,8 +39,9 @@ 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 = myisam; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8; +create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -47,12 +53,14 @@ 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 = myisam; -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 = myisam; -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 = myisam; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11; +create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9; +create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10; +create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t11; Section 3.1.2 - Syntax checks for the stored procedure-specific programming statements BEGIN/END, DECLARE, SET, SELECT/INTO, OPEN, FETCH, CLOSE: @@ -164,7 +172,7 @@ declare y integer default 1; set @x = x; set @y = y; set @z = 234; -SELECT f1, f2 into @x, @y from t2 limit 1; +SELECT f1, f2 into @x, @y from t2 where f1='a`' and f2='a`' limit 1; SELECT @x, @y, @z, invar; BEGIN set @x = 2; @@ -207,7 +215,7 @@ BEGIN declare x integer; declare y integer; set @x=x; set @y=y; -SELECT f4, f3 into @x, @y from t2 limit 1; +SELECT f4, f3 into @x, @y from t2 where f4=-5000 and f3='1000-01-01' limit 1; SELECT @x, @y; END// CALL sp1(); @@ -695,7 +703,7 @@ Testcase 3.1.2.54: ------------------ Ensure that a handler with a condition defined with an SQLSTATE that begins with -“01“ is always exactly equivalent in action to a handler with an SQLWARNING +“01“ is always exactly equivalent in action to a handler with an SQLWARNING condition. -------------------------------------------------------------------------------- DROP PROCEDURE IF EXISTS sp0; @@ -794,7 +802,7 @@ Testcase 3.1.2.56: ------------------ Ensure that a handler with a condition defined with an SQLSTATE that begins with -“02“ is always exactly equivalent in action to a handler with a NOT FOUND +“02“ is always exactly equivalent in action to a handler with a NOT FOUND condition. -------------------------------------------------------------------------------- DROP PROCEDURE IF EXISTS sp0; @@ -902,7 +910,7 @@ Testcase 3.1.2.58: ------------------ Ensure that a handler with a condition defined with an SQLSTATE that begins with -anything other that “01“ or “02“ is always exactly equivalent in action to a +anything other that “01“ or “02“ is always exactly equivalent in action to a handler with an SQLEXCEPTION condition. -------------------------------------------------------------------------------- DROP PROCEDURE IF EXISTS sp0; @@ -1082,7 +1090,8 @@ declare f2_value char(20); declare f5_value char(20); declare f4_value integer; declare f6_value integer; -declare cur1 cursor for SELECT f1, f2, f4, f5, f6 from t2 limit 3; +declare cur1 cursor for SELECT f1, f2, f4, f5, f6 from t2 +where f4 >=-5000 order by f4 limit 3; open cur1; while proceed do SELECT count AS 'loop'; @@ -1165,7 +1174,7 @@ of a compound statement ends. DROP TABLE IF EXISTS temp1; DROP PROCEDURE IF EXISTS sp1; create table temp1( f0 char(20), f1 char(20), f2 char(20), f3 int, f4 char(20) ); -SELECT f1, f2, f4, f5 from t2; +SELECT f1, f2, f4, f5 from t2 order by f4; f1 f2 f4 f5 a` a` -5000 a` aaa aaa -4999 aaa @@ -1185,8 +1194,8 @@ declare newf1 char(20); declare newf2 char(20); declare newf5 char(20); declare newf4 integer; -declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 limit 5; -declare cur2 cursor for SELECT f1, f2, f4, f5 from t2 limit 5; +declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 where f4 >= -5000 order by f4 limit 5; +declare cur2 cursor for SELECT f1, f2, f4, f5 from t2 where f4 >= -5000 order by f4 limit 5; open cur1; open cur2; BEGIN @@ -1268,8 +1277,10 @@ declare i_newf11 char(20); declare i_newf12 char(20); declare i_newf13 date; declare i_newf14 integer; -declare cur1 cursor for SELECT f1, f2, f3, f4 from t2 limit 4; -declare cur2 cursor for SELECT f1, f2, f3, f4 from t2 limit 3; +declare cur1 cursor for SELECT f1, f2, f3, f4 from t2 +where f4>=-5000 order by f4 limit 4; +declare cur2 cursor for SELECT f1, f2, f3, f4 from t2 +where f4>=-5000 order by f4 limit 3; declare continue handler for sqlstate '02000' set proceed=0; open cur1; open cur2; @@ -1300,8 +1311,10 @@ DECLARE o_newf11 CHAR(20); DECLARE o_newf12 CHAR(20); DECLARE o_newf13 DATE; DECLARE o_newf14 INTEGER; -DECLARE cur1 CURSOR FOR SELECT f1, f2, f3, f4 FROM t2 LIMIT 5; -DECLARE cur2 CURSOR FOR SELECT f1, f2, f3, f4 FROM t2 LIMIT 5; +DECLARE cur1 CURSOR FOR SELECT f1, f2, f3, f4 FROM t2 +WHERE f4>=-5000 ORDER BY f4 LIMIT 5; +DECLARE cur2 CURSOR FOR SELECT f1, f2, f3, f4 FROM t2 +WHERE f4>=-5000 ORDER BY f4 LIMIT 5; DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET proceed=0; OPEN cur1; OPEN cur2; diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc_03.result b/mysql-test/suite/funcs_1/r/myisam_storedproc_03.result index 0057b7ef229..53e25441e2e 100644 --- a/mysql-test/suite/funcs_1/r/myisam_storedproc_03.result +++ b/mysql-test/suite/funcs_1/r/myisam_storedproc_03.result @@ -9,20 +9,25 @@ 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 = myisam; -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 = myisam; -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 = myisam; -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 = myisam; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4; +create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1; +create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2; +create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3; +create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 = myisam; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6; +create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6; USE db_storedproc; -create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = myisam; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7; +create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -34,8 +39,9 @@ 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 = myisam; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8; +create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -47,12 +53,14 @@ 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 = myisam; -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 = myisam; -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 = myisam; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11; +create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9; +create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10; +create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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: diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc_06.result b/mysql-test/suite/funcs_1/r/myisam_storedproc_06.result index a85c4347962..88bddf68e24 100644 --- a/mysql-test/suite/funcs_1/r/myisam_storedproc_06.result +++ b/mysql-test/suite/funcs_1/r/myisam_storedproc_06.result @@ -9,20 +9,25 @@ 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 = myisam; -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 = myisam; -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 = myisam; -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 = myisam; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4; +create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1; +create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2; +create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3; +create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 = myisam; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6; +create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6; USE db_storedproc; -create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = myisam; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7; +create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -34,8 +39,9 @@ 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 = myisam; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8; +create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -47,12 +53,14 @@ 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 = myisam; -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 = myisam; -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 = myisam; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11; +create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9; +create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10; +create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t11; Section 3.1.6 - Privilege Checks: -------------------------------------------------------------------------------- @@ -79,6 +87,7 @@ 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' +USE db_storedproc_1; root@localhost db_storedproc_1 GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost'; @@ -90,6 +99,7 @@ CREATE PROCEDURE sp1(v1 char(20)) BEGIN SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz'; END// +USE db_storedproc_1; root@localhost db_storedproc_1 DROP USER 'user_1'@'localhost'; @@ -115,6 +125,7 @@ CREATE FUNCTION fn1(v1 int) returns int BEGIN return v1; END// +USE db_storedproc_1; root@localhost db_storedproc_1 drop user 'user_1'@'localhost'; diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc_07.result b/mysql-test/suite/funcs_1/r/myisam_storedproc_07.result index 0865d77e4f0..cbe0a18435a 100644 --- a/mysql-test/suite/funcs_1/r/myisam_storedproc_07.result +++ b/mysql-test/suite/funcs_1/r/myisam_storedproc_07.result @@ -9,20 +9,25 @@ 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 = myisam; -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 = myisam; -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 = myisam; -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 = myisam; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4; +create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1; +create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2; +create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3; +create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 = myisam; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6; +create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6; USE db_storedproc; -create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = myisam; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7; +create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -34,8 +39,9 @@ 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 = myisam; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8; +create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -47,12 +53,14 @@ 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 = myisam; -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 = myisam; -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 = myisam; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11; +create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9; +create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10; +create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t11; Section 3.1.7 - SQL mode checks: -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc_08.result b/mysql-test/suite/funcs_1/r/myisam_storedproc_08.result index 3e612817200..40ebc1e51e4 100644 --- a/mysql-test/suite/funcs_1/r/myisam_storedproc_08.result +++ b/mysql-test/suite/funcs_1/r/myisam_storedproc_08.result @@ -9,20 +9,25 @@ 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 = myisam; -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 = myisam; -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 = myisam; -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 = myisam; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4; +create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1; +create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2; +create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3; +create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 = myisam; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6; +create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6; USE db_storedproc; -create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = myisam; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7; +create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -34,8 +39,9 @@ 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 = myisam; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8; +create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -47,12 +53,14 @@ 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 = myisam; -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 = myisam; -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 = myisam; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11; +create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9; +create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10; +create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t11; Section 3.1.8 - SHOW statement checks: -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc_10.result b/mysql-test/suite/funcs_1/r/myisam_storedproc_10.result index b24e222fc4b..163bae36bed 100644 --- a/mysql-test/suite/funcs_1/r/myisam_storedproc_10.result +++ b/mysql-test/suite/funcs_1/r/myisam_storedproc_10.result @@ -9,20 +9,25 @@ 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 = myisam; -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 = myisam; -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 = myisam; -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 = myisam; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4; +create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1; +create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2; +create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3; +create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 = myisam; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6; +create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6; USE db_storedproc; -create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = myisam; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7; +create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -34,8 +39,9 @@ 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 = myisam; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8; +create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/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 @@ -47,12 +53,14 @@ 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 = myisam; -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 = myisam; -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 = myisam; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11; +create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9; +create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10; +create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = <engine_to_be_tested>; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t11; Section 3.1.10 - CALL checks: -------------------------------------------------------------------------------- @@ -78,7 +86,7 @@ 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 LIMIT 1; +SELECT * FROM db_storedproc.t1 WHERE f4=-5000 LIMIT 1; END// CREATE FUNCTION fn31105(n INT) RETURNS INT BEGIN @@ -93,6 +101,8 @@ 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' +connection default; +USE db_storedproc; root@localhost db_storedproc CALL sp31102(); @@ -112,6 +122,8 @@ a` a` 1000-01-01 -5000 a` -5000 SELECT fn31105( 9 ); fn31105( 9 ) 81 +connection default; +USE db_storedproc; root@localhost db_storedproc REVOKE EXECUTE ON db_storedproc.* FROM 'user_2'@'localhost'; @@ -129,6 +141,7 @@ 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' +USE db_storedproc; root@localhost db_storedproc DROP PROCEDURE sp31102; @@ -176,6 +189,8 @@ 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; +DROP PROCEDURE IF EXISTS sp_del; +DROP PROCEDURE IF EXISTS sp_with_rowcount; 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() @@ -203,49 +218,72 @@ 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// +CREATE PROCEDURE sp_del() +BEGIN +DELETE FROM temp WHERE temp.f1 ='qwe' OR temp.f1 = 'updated_2'; +END// +CREATE PROCEDURE sp_with_rowcount() +BEGIN +BEGIN +INSERT INTO temp VALUES ('qwe', 'abc', '1989-11-09', 100, 'uvw', 1000), +('qwe', 'xyz', '1998-03-26', 100, 'uvw', 1000), +('qwe', 'abc', '2000-11-09', 100, 'uvw', 1000), +('qwe', 'xyz', '2005-11-07', 100, 'uvw', 1000); +END; +SELECT row_count() AS 'row_count() after insert'; +SELECT row_count() AS 'row_count() after select row_count()'; +SELECT f1,f2,f3 FROM temp ORDER BY f1,f2,f3; +UPDATE temp SET temp.f1 = 'updated_2' WHERE temp.f2 = 'abc'; +SELECT row_count() AS 'row_count() after update'; +SELECT f1,f2,f3 FROM temp ORDER BY f1,f2,f3; +DELETE FROM temp WHERE temp.f1 = 'updated_2'; +SELECT row_count() AS 'row_count() after delete'; +END// CALL sp_ins_1(); SELECT row_count(); row_count() 1 SELECT * FROM temp; f1 f2 f3 f4 f5 f6 +a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992 +a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991 a` a` 1000-01-01 -5000 a` -5000 aaa aaa 1000-01-02 -4999 aaa -4999 abaa abaa 1000-01-03 -4998 abaa -4998 +abc abc 2005-10-03 100 uvw 1000 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; f1 f2 f3 f4 f5 f6 +a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992 +a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991 a` a` 1000-01-01 -5000 a` -5000 aaa aaa 1000-01-02 -4999 aaa -4999 abaa abaa 1000-01-03 -4998 abaa -4998 +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 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; f1 f2 f3 f4 f5 f6 +a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992 +a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991 a` a` 1000-01-01 -5000 a` -5000 aaa aaa 1000-01-02 -4999 aaa -4999 abaa abaa 1000-01-03 -4998 abaa -4998 @@ -254,8 +292,6 @@ 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 @@ -279,6 +315,8 @@ row_count() 3 SELECT * FROM temp; f1 f2 f3 f4 f5 f6 +a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992 +a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991 a` a` 1000-01-01 -5000 a` -5000 aaa aaa 1000-01-02 -4999 aaa -4999 abaa abaa 1000-01-03 -4998 abaa -4998 @@ -287,26 +325,73 @@ 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 +qwe xyz 1998-03-26 100 uvw 1000 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 +CALL sp_del(); +SELECT row_count(); +row_count() +4 +SELECT * FROM temp; +f1 f2 f3 f4 f5 f6 +a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992 +a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991 +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 +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 +DELETE FROM temp; +CALL sp_with_rowcount(); +row_count() after insert +4 +row_count() after select row_count() +-1 +f1 f2 f3 +qwe abc 1989-11-09 +qwe abc 2000-11-09 +qwe xyz 1998-03-26 +qwe xyz 2005-11-07 +row_count() after update +2 +f1 f2 f3 +qwe xyz 1998-03-26 +qwe xyz 2005-11-07 +updated_2 abc 1989-11-09 +updated_2 abc 2000-11-09 +row_count() after delete +2 +SELECT row_count(); +row_count() +-1 +SELECT * FROM temp; +f1 f2 f3 f4 f5 f6 +qwe xyz 1998-03-26 100 uvw 1000 +qwe xyz 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 PROCEDURE sp_del; +DROP PROCEDURE sp_with_rowcount; DROP TABLE temp; Testcase 3.1.10.8: ------------------ -Ensure that the mysql_affected_rows() C API function always returns the correct +Ensure that the mysql_affected_rows() C API function always returns the correct number of rows affected by the execution of a stored procedure. -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_0102.result b/mysql-test/suite/funcs_1/r/myisam_trig_0102.result index 08ad956b167..b49fe114791 100644 --- a/mysql-test/suite/funcs_1/r/myisam_trig_0102.result +++ b/mysql-test/suite/funcs_1/r/myisam_trig_0102.result @@ -1,96 +1,97 @@ 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) +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; 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/myisam_tb3.txt' into table tb3 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb3.txt' +into table tb3; Testcase: 3.5.1.1: ------------------ use test; -Create trigger trg1_1 BEFORE INSERT +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 +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, +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 +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 +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 +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) +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 @@ -103,9 +104,9 @@ 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 +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 @@ -113,7 +114,7 @@ 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) +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; @@ -141,7 +142,7 @@ delete from tb3 where f121='Test 3.5.1.1'; Testcase: 3.5.1.2: ------------------ -Create trigger trg_1 after insert +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; @@ -194,7 +195,7 @@ drop table if exists t1; Warnings: Note 1051 Unknown table 't1' create table t1 (f1 int, f2 char(25),f3 int) engine=myisam; -CREATE TRIGGER trg5_1 BEFORE INSERT on test.t1 +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'; @@ -206,7 +207,7 @@ 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; +select trigger_name from information_schema.triggers order by trigger_name; trigger_name trg5_1 trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX @@ -226,7 +227,7 @@ 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 +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; @@ -234,11 +235,11 @@ create database trig_db; use trig_db; create table t1 (f1 integer) engine = myisam; use test; -CREATE TRIGGER trig_db.trg6_2 AFTER INSERT on tb3 +CREATE TRIGGER trig_db.trg6_2 AFTER INSERT on tb3 for each row set @ret_trg6_2 = 5; ERROR 42S02: Table 'trig_db.tb3' doesn't exist use trig_db; -CREATE TRIGGER trg6_3 AFTER INSERT on test.tb3 +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; @@ -262,9 +263,9 @@ drop table if exists t1; drop table if exists t2; create table t1 (f1 char(50), f2 integer) engine = myisam; create table t2 (f1 char(50), f2 integer) engine = myisam; -create trigger trig before insert on t1 +create trigger trig before insert on t1 for each row set new.f1 ='trig t1'; -create trigger trig before update on t2 +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); @@ -294,15 +295,15 @@ create database trig_db2; create database trig_db3; use trig_db1; create table t1 (f1 char(50), f2 integer) engine = myisam; -create trigger trig before insert on t1 +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 = myisam; -create trigger trig before insert on t2 +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 = myisam; -create trigger trig before insert on t1 +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; @@ -313,7 +314,7 @@ 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; +select * from t1 order by f2; f1 f2 trig1 1 trig1 2 @@ -323,7 +324,7 @@ trig2 3 select * from trig_db3.t1; f1 f2 trig3 4 -select * from t1; +select * from t1 order by f2; f1 f2 trig1 1 trig1 2 @@ -341,17 +342,17 @@ create database trig_db2; use trig_db1; create table t1 (f1 char(50), f2 integer) engine = myisam; create table trig_db2.t1 (f1 char(50), f2 integer) engine = myisam; -create trigger trig1_b before insert on t1 +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 +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 +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; +from information_schema.triggers order by trigger_name; trigger_schema trigger_name event_object_table -trig_db1 trig1_b t1 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); diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_03.result b/mysql-test/suite/funcs_1/r/myisam_trig_03.result index 42e984245e3..ae003721cb4 100644 --- a/mysql-test/suite/funcs_1/r/myisam_trig_03.result +++ b/mysql-test/suite/funcs_1/r/myisam_trig_03.result @@ -1,70 +1,71 @@ 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) +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; 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/myisam_tb3.txt' into table tb3 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb3.txt' +into table tb3; Testcase 3.5.3: --------------- @@ -106,7 +107,7 @@ set new.f1 = 'trig 3.5.3.2_1-no'; ERROR 42000: Access denied; you need the SUPER privilege for this operation use priv_db; insert into t1 (f1) values ('insert 3.5.3.2-no'); -select f1 from t1; +select f1 from t1 order by f1; f1 insert 3.5.3.2-no select current_user; @@ -121,15 +122,12 @@ 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; +select f1 from t1 order by f1; f1 insert 3.5.3.2-no grant UPDATE on priv_db.t1 to test_yesprivs@localhost; - -note: once 15166 is fixed a similar case for SELECT needs to be added ---------------------------------------------------------------------- insert into t1 (f1) values ('insert 3.5.3.2-yes'); -select f1 from t1; +select f1 from t1 order by f1; f1 insert 3.5.3.2-no trig 3.5.3.2_2-yes @@ -141,7 +139,7 @@ drop trigger trg1_2; ERROR 42000: Access denied; you need the SUPER privilege for this operation use priv_db; insert into t1 (f1) values ('insert 3.5.3.6-yes'); -select f1 from t1; +select f1 from t1 order by f1; f1 insert 3.5.3.2-no trig 3.5.3.2_2-yes @@ -150,12 +148,12 @@ 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; +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 -insert 3.5.3.6-no drop trigger trg1_2; Testcase 3.5.3.7a: @@ -180,23 +178,22 @@ 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 ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -select f1 from t1; +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 -insert 3.5.3.6-no - -Trigger create disabled - should fail - Bug 8884 ------------------------------------------------- +create trigger trg4a_1 before INSERT on t1 for each row +set new.f1 = 'trig 3.5.3.7-1a'; insert into t1 (f1) values ('insert 3.5.3.7-1a'); -select f1 from t1; +ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' +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 -insert 3.5.3.6-no -insert 3.5.3.7-1a drop trigger trg4a_1; use priv_db; select current_user; @@ -207,18 +204,13 @@ Grants for test_yesprivs@localhost GRANT UPDATE, SUPER 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'; - -SELECT priv added to bypass bug 15166 -------------------------------------- -grant SELECT on *.* to test_yesprivs@localhost; insert into t1 (f1) values ('insert 3.5.3.7-2b'); -select f1 from t1; +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 -insert 3.5.3.6-no -insert 3.5.3.7-1a trig 3.5.3.7-2a drop trigger trg4a_2; @@ -245,30 +237,29 @@ 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 ON `priv_db`.* TO 'test_noprivs'@'localhost' use priv_db; - -Trigger create disabled - should fail - Bug 8884 ------------------------------------------------- +create trigger trg4b_1 before UPDATE on t1 for each row +set new.f1 = 'trig 3.5.3.7-1b'; +ERROR 42000: Access denied; you need the SUPER privilege for this operation insert into t1 (f1) values ('insert 3.5.3.7-1b'); -select f1 from t1; +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-1b trig 3.5.3.2_2-yes trig 3.5.3.2_2-yes -insert 3.5.3.6-no -insert 3.5.3.7-1a trig 3.5.3.7-2a -insert 3.5.3.7-1b update t1 set f1 = 'update 3.5.3.7-1b' where f1 = 'insert 3.5.3.7-1b'; -select f1 from t1; +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 -insert 3.5.3.6-no -insert 3.5.3.7-1a trig 3.5.3.7-2a update 3.5.3.7-1b drop trigger trg4b_1; +ERROR HY000: Trigger does not exist show grants; Grants for test_yesprivs@localhost GRANT SUPER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' @@ -276,32 +267,26 @@ 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'; - -SELECT priv added to bypass bug 15166 -------------------------------------- -grant SELECT on priv_db.* to test_yesprivs@localhost; insert into t1 (f1) values ('insert 3.5.3.7-2b'); -select f1 from t1; +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-2b trig 3.5.3.2_2-yes trig 3.5.3.2_2-yes -insert 3.5.3.6-no -insert 3.5.3.7-1a trig 3.5.3.7-2a update 3.5.3.7-1b -insert 3.5.3.7-2b update t1 set f1 = 'update 3.5.3.7-2b' where f1 = 'insert 3.5.3.7-2b'; -select f1 from t1; +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 -insert 3.5.3.6-no -insert 3.5.3.7-1a trig 3.5.3.7-2a -update 3.5.3.7-1b trig 3.5.3.7-2b +update 3.5.3.7-1b drop trigger trg4b_2; Testcase 3.5.3.7c @@ -327,21 +312,19 @@ Grants for test_noprivs@localhost GRANT SUPER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' use priv_db; - -Trigger create disabled - should fail - Bug 8884 ------------------------------------------------- +create trigger trg4c_1 before INSERT on t1 for each row +set new.f1 = 'trig 3.5.3.7-1c'; insert into t1 (f1) values ('insert 3.5.3.7-1c'); -select f1 from t1; +ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' +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 -insert 3.5.3.6-no -insert 3.5.3.7-1a trig 3.5.3.7-2a -update 3.5.3.7-1b trig 3.5.3.7-2b -insert 3.5.3.7-1c +update 3.5.3.7-1b drop trigger trg4c_1; show grants; Grants for test_yesprivs@localhost @@ -350,23 +333,17 @@ 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'; - -SELECT priv added to bypass bug 15166 -------------------------------------- -grant SELECT on priv_db.t1 to test_yesprivs@localhost; insert into t1 (f1) values ('insert 3.5.3.7-2c'); -select f1 from t1; +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 -insert 3.5.3.6-no -insert 3.5.3.7-1a trig 3.5.3.7-2a -update 3.5.3.7-1b trig 3.5.3.7-2b -insert 3.5.3.7-1c trig 3.5.3.7-2c +update 3.5.3.7-1b drop trigger trg4c_2; Testcase 3.5.3.7d: @@ -390,23 +367,20 @@ Grants for test_noprivs@localhost GRANT SUPER 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 ------------------------------------------------- +create trigger trg4d_1 before INSERT on t1 for each row +set new.f1 = 'trig 3.5.3.7-1d'; insert into t1 (f1) values ('insert 3.5.3.7-1d'); -select f1 from t1; +ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' +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 -insert 3.5.3.6-no -insert 3.5.3.7-1a trig 3.5.3.7-2a -update 3.5.3.7-1b trig 3.5.3.7-2b -insert 3.5.3.7-1c trig 3.5.3.7-2c -insert 3.5.3.7-1d +update 3.5.3.7-1b drop trigger trg4d_1; show grants; Grants for test_yesprivs@localhost @@ -415,25 +389,18 @@ 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'; - -SELECT priv added to bypass bug 15166 -------------------------------------- -grant SELECT (f1) on priv_db.t1 to test_yesprivs@localhost; insert into t1 (f1) values ('insert 3.5.3.7-2d'); -select f1 from t1; +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 -insert 3.5.3.6-no -insert 3.5.3.7-1a trig 3.5.3.7-2a -update 3.5.3.7-1b trig 3.5.3.7-2b -insert 3.5.3.7-1c trig 3.5.3.7-2c -insert 3.5.3.7-1d trig 3.5.3.7-2d +update 3.5.3.7-1b drop trigger trg4d_2; Testcase 3.5.3.8a: @@ -458,14 +425,14 @@ 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 ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' - -Trigger create disabled - should fail - Bug 8887 ------------------------------------------------- +create trigger trg5a_1 before INSERT on t1 for each row +set @test_var = new.f1; 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'); +ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' select @test_var; @test_var before trig 3.5.3.8-1a @@ -483,10 +450,6 @@ set @test_var= 'before trig 3.5.3.8-2a'; select @test_var; @test_var before trig 3.5.3.8-2a - -UPDATE priv added to bypass bug 15166 -------------------------------------- -grant UPDATE on *.* to test_yesprivs@localhost; insert into t1 (f1) values ('insert 3.5.3.8-2a'); select @test_var; @test_var @@ -517,15 +480,15 @@ Grants for test_noprivs@localhost GRANT SUPER 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 ON `priv_db`.* TO 'test_noprivs'@'localhost' use priv_db; - -Trigger create disabled - should fail - Bug 8887 ------------------------------------------------- +create trigger trg5b_1 before UPDATE on t1 for each row +set @test_var= new.f1; 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'; +ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' select @test_var; @test_var before trig 3.5.3.8-1b @@ -542,10 +505,6 @@ insert into t1 (f1) values ('insert 3.5.3.8-2b'); select @test_var; @test_var before trig 3.5.3.8-2b - -UPDATE priv added to bypass bug 15166 -------------------------------------- -grant UPDATE on priv_db.* to test_yesprivs@localhost; update t1 set f1= 'update 3.5.3.8-2b' where f1 = 'insert 3.5.3.8-2b'; select @test_var; @test_var @@ -576,11 +535,11 @@ Grants for test_noprivs@localhost GRANT SUPER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' use priv_db; - -Trigger create disabled - should fail - Bug 8887 ------------------------------------------------- +create trigger trg5c_1 before INSERT on t1 for each row +set @test_var= new.f1; set @test_var= 'before trig 3.5.3.8-1c'; insert into t1 (f1) values ('insert 3.5.3.8-1c'); +ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' select @test_var; @test_var before trig 3.5.3.8-1c @@ -593,10 +552,6 @@ 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'; - -UPDATE priv added to bypass bug 15166 -------------------------------------- -grant UPDATE on priv_db.t1 to test_yesprivs@localhost; insert into t1 (f1) values ('insert 3.5.3.8-2c'); select @test_var; @test_var @@ -626,11 +581,11 @@ Grants for test_noprivs@localhost GRANT SUPER 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 ------------------------------------------------- +create trigger trg5d_1 before INSERT on t1 for each row +set @test_var= new.f1; set @test_var='before trig 3.5.3.8-1d'; insert into t1 (f1) values ('insert 3.5.3.8-1d'); +ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' select @test_var; @test_var before trig 3.5.3.8-1d @@ -643,10 +598,6 @@ 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'; - -UPDATE priv added to bypass bug 15166 -------------------------------------- -grant UPDATE (f1) on priv_db.t1 to test_yesprivs@localhost; insert into t1 (f1) values ('insert 3.5.3.8-2d'); select @test_var; @test_var @@ -682,10 +633,10 @@ ERROR 42000: INSERT command denied to user 'test_yesprivs'@'localhost' for table 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; +select f1 from t1 order by f1; f1 4 -select f2 from t2; +select f2 from t2 order by f2; f2 4 use priv_db; @@ -698,11 +649,11 @@ ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for table 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; +select f1 from t1 order by f1; f1 -4 2 -select f2 from t2; +4 +select f2 from t2 order by f2; f2 1 use priv_db; @@ -715,12 +666,12 @@ ERROR 42000: SELECT command denied to user 'test_yesprivs'@'localhost' for table 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; +select f1 from t1 order by f1; f1 -4 -2 1 -select f2 from t2; +2 +4 +select f2 from t2 order by f2; f2 1 select @aaa; @@ -736,13 +687,13 @@ ERROR 42000: DELETE command denied to user 'test_yesprivs'@'localhost' for table 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; +select f1 from t1 order by f1; f1 -4 -2 1 1 -select f2 from t2; +2 +4 +select f2 from t2 order by f2; f2 drop database if exists priv_db; drop user test_yesprivs@localhost; diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_0407.result b/mysql-test/suite/funcs_1/r/myisam_trig_0407.result index 4e578888fe5..ade033fa852 100644 --- a/mysql-test/suite/funcs_1/r/myisam_trig_0407.result +++ b/mysql-test/suite/funcs_1/r/myisam_trig_0407.result @@ -1,70 +1,71 @@ 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) +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; 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/myisam_tb3.txt' into table tb3 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb3.txt' +into table tb3; Testcase: 3.5: -------------- @@ -88,22 +89,22 @@ Use db_drop; create table t1 (f1 char(30)) engine=myisam; grant INSERT, SELECT on db_drop.t1 to test_general; Use db_drop; -Create trigger trg1 BEFORE INSERT on t1 +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; +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; +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; +Select * from t1 order by f1; f1 -Trigger 3.5.4.1 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'; @@ -127,7 +128,7 @@ drop table if exists t1_433 ; drop table if exists t1_433a ; create table t1_433 (f1 char (30)) engine=myisam; create table t1_433a (f1a char (5)) engine=myisam; -CREATE TRIGGER trg3 BEFORE INSERT on t1_433 for each row +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 @@ -148,7 +149,7 @@ create database db_drop4; Use db_drop4; create table t1 (f1 char(30)) engine=myisam; grant INSERT, SELECT on db_drop4.t1 to test_general; -Create trigger trg4 BEFORE INSERT on t1 +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'); @@ -184,7 +185,7 @@ create database db_drop5; Use db_drop5; create table t1 (f1 char(50)) engine=myisam; grant INSERT, SELECT on t1 to test_general; -Create trigger trg5 BEFORE INSERT on t1 +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'); @@ -221,7 +222,7 @@ 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 +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; @@ -229,7 +230,7 @@ drop table t1_temp; Testcase 3.5.5.3: ----------------- Create view vw3 as select f118 from tb3; -Create trigger trg3 before INSERT +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; @@ -257,7 +258,7 @@ 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; +Select * from dbtest_two.t2 order by f1; f1 1st Insert 3.5. 2nd Insert 3.5. @@ -310,9 +311,9 @@ drop trigger tb3.trg4_2; Testcase 3.5.7.5 / 3.5.7.6: --------------------------- -Create trigger trg5_1 BEFORE INSERT +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 +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'); @@ -330,9 +331,9 @@ 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 +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 +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; @@ -358,9 +359,9 @@ delete from tb3 where f121='Test 3.5.7.7/8'; Testcase 3.5.7.9/10: -------------------- -Create trigger trg7_1 BEFORE UPDATE +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 +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'); @@ -378,9 +379,9 @@ 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 +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 +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; @@ -408,9 +409,9 @@ 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 +Create trigger trg9_1 BEFORE DELETE on tb3 for each row set @test_var=@test_var+1; -Create trigger trg9_2 BEFORE DELETE +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; @@ -440,12 +441,12 @@ 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 +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 +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 +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; diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_08.result b/mysql-test/suite/funcs_1/r/myisam_trig_08.result index bab8d0f2ddd..dcfa0aa7ddf 100644 --- a/mysql-test/suite/funcs_1/r/myisam_trig_08.result +++ b/mysql-test/suite/funcs_1/r/myisam_trig_08.result @@ -1,70 +1,71 @@ 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) +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; 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/myisam_tb3.txt' into table tb3 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb3.txt' +into table tb3; Testcase: 3.5: -------------- @@ -89,17 +90,17 @@ 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 ( +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=myisam; -create table t1_u ( +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=myisam; -create table t1_d ( +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, @@ -122,18 +123,18 @@ Insert into t1_d values ('f',222,99999,999.99); use test; Create trigger trg1 AFTER INSERT on tb3 for each row BEGIN -insert into db_test.t1_i +insert into db_test.t1_i values (new.f120, new.f136, new.f144, new.f163); -update db_test.t1_u +update db_test.t1_u set u144=new.f144, u163=new.f163 -where u136=new.f136; +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; +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) +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 @@ -161,14 +162,22 @@ select @test_var; 3.5.8.4 - single SQL - insert ----------------------------- Create trigger trg2 BEFORE UPDATE on tb3 for each row -insert into db_test.t1_i +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; +select * from db_test.t1_i order by i120; i120 i136 i144 i163 1 00222 0000023456 1.050000000000000000000000000000 I 00222 0000023456 1.050000000000000000000000000000 @@ -177,7 +186,7 @@ I 00222 0000023456 1.050000000000000000000000000000 ----------------------------- drop trigger trg2; Create trigger trg3 BEFORE UPDATE on tb3 for each row -update db_test.t1_u +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' @@ -185,27 +194,27 @@ update tb3 set f120='U', 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 U Test 3.5.8.4-Single Update 00222 0000023456 1.050000000000000000000000000000 -select * from db_test.t1_u; +select * from db_test.t1_u order by u120; u120 u136 u144 u163 a 00111 0000099999 999.990000000000000000000000000000 -U 00222 0000023456 1.050000000000000000000000000000 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 -f 00333 0000099999 999.990000000000000000000000000000 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, +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; +select * from db_test.t1_d order by d120; d120 d136 d144 d163 a 00111 0000099999 999.990000000000000000000000000000 c 00333 0000099999 999.990000000000000000000000000000 @@ -214,10 +223,10 @@ c 00333 0000099999 999.990000000000000000000000000000 ------------------------------- 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 +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, +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%'; @@ -245,36 +254,36 @@ 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 +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'; +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'; +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'; +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 -d Test 3.5.8.5-if 00010 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'; +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 00010 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 @@ -289,7 +298,7 @@ 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 +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 @@ -331,60 +340,60 @@ ELSE set @test_var=CONCAT(new.f120, '*', new.f144); END case; END// set @test_var='Empty'; -Insert into tb3 (f120, f122, f136, f144) +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'; +select f120, f122, f136, f144, @test_var +from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; f120 f122 f136 f144 @test_var A Test 3.5.8.5-case 00125 0000000007 A*seven -Insert into tb3 (f120, f122, f136, f144) +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'; +select f120, f122, f136, f144, @test_var +from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; 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) +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'; +select f120, f122, f136, f144, @test_var +from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; 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) +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'; +select f120, f122, f136, f144, @test_var +from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; 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 -1 Test 3.5.8.5-case 00152 0000099999 1*0000099999 -Insert into tb3 (f120, f122, f136, f144) +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'; +select f120, f122, f136, f144, @test_var +from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; 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 -1 Test 3.5.8.5-case 00152 0000099999 1=eight -1 Test 3.5.8.5-case 00200 0000000008 1=eight -Insert into tb3 (f120, f122, f136, f144) +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'; +select f120, f122, f136, f144, @test_var +from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; 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 -1 Test 3.5.8.5-case 00152 0000099999 1=eight -1 Test 3.5.8.5-case 00200 0000000008 1=eight create trigger trg3a before update on tb3 for each row BEGIN CASE @@ -398,40 +407,40 @@ 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 +BEGIN set @counter=0, @flag='Initial'; -Label1: loop +Label1: loop if new.f136<new.f144 then set @counter='Nothing to loop'; -leave Label1; +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; +end if; +end if; +iterate label1; set @flag='Final'; -END loop Label1; +END loop Label1; END// -Insert into tb3 (f122, f136, f144) +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) +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 +BEGIN +Label1: loop set @counter=@counter+1; -END; +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 '; +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; @@ -441,23 +450,23 @@ Testcase 3.5.8.5-repeat: ------------------------ Create trigger trg6 after insert on tb3 for each row BEGIN -rp_label: REPEAT -SET @counter1 = @counter1 + 1; +rp_label: REPEAT +SET @counter1 = @counter1 + 1; IF (@counter1 MOD 2 = 0) THEN ITERATE rp_label; END IF; -SET @counter2 = @counter2 + 1; +SET @counter2 = @counter2 + 1; UNTIL @counter1> new.f136 END REPEAT rp_label; END// set @counter1= 0, @counter2= 0; -Insert into tb3 (f122, f136) +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; +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; @@ -466,33 +475,62 @@ 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; +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; +SET @counter2 = @counter2 + 1; END WHILE wl_label// set @counter1= 0, @counter2= 0; -Insert into tb3 (f122, f136) +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; +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; +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) ------------------------------------ +CREATE PROCEDURE sp_01 () BEGIN set @v1=1; END// +CREATE TRIGGER trg8_1 BEFORE UPDATE ON tb3 FOR EACH ROW +BEGIN +CALL sp_01 (); +END// +Insert into tb3 (f120, f122, f136) values ('6', 'Test 3.5.8.6-insert', 101); +update tb3 set f120='S', f136=111, +f122='Test 3.5.8.6-tr8_1' + where f122='Test 3.5.8.6-insert'; +select f120, f122 +from tb3 where f122 like 'Test 3.5.8.6%' order by f120; +f120 f122 +S Test 3.5.8.6-tr8_1 +DROP TRIGGER trg8_1; +DROP PROCEDURE sp_01; -Testcase 3.5.8.7: (Disabled as a result of bug _____) ------------------------------------------------------ +Testcase 3.5.8.7 +---------------- +Create trigger trg9_1 before update on tb3 for each row +BEGIN +Start transaction; +Set new.f120='U'; +Commit; +END// +ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger. +Create trigger trg9_2 before delete on tb3 for each row +BEGIN +Start transaction; +Set @var2=old.f120; +Rollback; +END// +ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger. drop user test_general@localhost; drop user test_general; drop user test_super@localhost; diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_09.result b/mysql-test/suite/funcs_1/r/myisam_trig_09.result index 7cbcd8a6862..3d89bc6d3c5 100644 --- a/mysql-test/suite/funcs_1/r/myisam_trig_09.result +++ b/mysql-test/suite/funcs_1/r/myisam_trig_09.result @@ -1,74 +1,75 @@ 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) +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; 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/myisam_tb3.txt' into table tb3 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb3.txt' +into table tb3; Testcase 3.5.9.1/2: ------------------- -Create trigger trg1 BEFORE UPDATE on tb3 for each row +Create trigger trg1 BEFORE UPDATE on tb3 for each row set new.f142 = 94087, @counter=@counter+1; TotalRows 10 @@ -80,15 +81,15 @@ NewValuew 0 set @counter=0; Update tb3 Set f142='1' where f130<100; -select count(*) as ExpectedChanged, @counter as TrigCounter +select count(*) as ExpectedChanged, @counter as TrigCounter from tb3 where f142=94087; ExpectedChanged TrigCounter 8 8 -select count(*) as ExpectedNotChange from tb3 +select count(*) as ExpectedNotChange from tb3 where f130<100 and f142<>94087; ExpectedNotChange 0 -select count(*) as NonExpectedChanged from tb3 +select count(*) as NonExpectedChanged from tb3 where f130>=130 and f142=94087; NonExpectedChanged 0 @@ -116,17 +117,17 @@ set @tr_var_af_118=old.f118, @tr_var_af_121=old.f121, 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) +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'; +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, +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, +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 @@ -135,13 +136,13 @@ a NULL Test 3.5.9.3 7 123.170000000000000000000000000000 @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'; +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, +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, +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 @@ -172,17 +173,17 @@ set @tr_var_af_118=new.f118, @tr_var_af_121=new.f121, 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) +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%'; +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, +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, +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 @@ -194,15 +195,15 @@ 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'; +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, +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, +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 @@ -240,6 +241,7 @@ 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 trg5a; drop trigger trg5b; Testcase 3.5.9.10: (implied in previous tests) diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_1011ext.result b/mysql-test/suite/funcs_1/r/myisam_trig_1011ext.result index c991fb67ec1..fe8fdd29446 100644 --- a/mysql-test/suite/funcs_1/r/myisam_trig_1011ext.result +++ b/mysql-test/suite/funcs_1/r/myisam_trig_1011ext.result @@ -1,70 +1,71 @@ 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) +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; 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/myisam_tb3.txt' into table tb3 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb3.txt' +into table tb3; Testcase 3.5.10.1/2/3: ---------------------- @@ -86,7 +87,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%'; +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 @@ -100,7 +101,7 @@ 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%'; +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 @@ -114,7 +115,7 @@ 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%'; +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; @@ -141,11 +142,11 @@ 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; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table tb_load; select @counter as 'Rows Loaded After'; Rows Loaded After 10 -Select * from tb_load limit 10; +Select * from tb_load order by f1 limit 10; f1 f2 f3 -5000 a` 1000 -4999 aaa 999 @@ -240,7 +241,7 @@ 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; +select * from t3 order by f1; f1 12 102 @@ -275,17 +276,17 @@ 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; +select * from t1 order by f1; f1 0 1 -select * from t2; +select * from t2 order by f2; f2 2 -select * from t3; +select * from t3 order by f3; f3 3 -select * from t4; +select * from t4 order by f4; f4 4 drop trigger tr1; @@ -297,8 +298,8 @@ drop table t2; drop table t3; drop table t4; -Testcase y.y.y.4: Recursive trigger/SP references (disabled bug 11889) ----------------------------------------------------------------------- +Testcase y.y.y.4: Recursive trigger/SP references +------------------------------------------------- set @sql_mode='traditional'; create table t1_sp ( count integer, @@ -386,14 +387,14 @@ start transaction; insert into t1 values (1); ERROR 22003: Out of range value adjusted for column 'f4' at row 1 commit; -select * from t1; +select * from t1 order by f1; f1 1 1 -select * from t2; +select * from t2 order by f2; f2 2 -select * from t3; +select * from t3 order by f3; f3 3 drop trigger tr1; diff --git a/mysql-test/suite/funcs_1/r/myisam_views.result b/mysql-test/suite/funcs_1/r/myisam_views.result index a9c4d4c7f43..bde591c13bf 100644 --- a/mysql-test/suite/funcs_1/r/myisam_views.result +++ b/mysql-test/suite/funcs_1/r/myisam_views.result @@ -1,133 +1,135 @@ USE test; drop table if exists tb2 ; 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", +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 +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; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb2.txt' into table tb2 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb2.txt' +into table tb2; DROP DATABASE IF EXISTS test1; CREATE DATABASE test1; USE test1; drop table if exists tb2 ; 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", +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 +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; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb2.txt' into table tb2 ; +load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb2.txt' +into table tb2; USE test; Attention: The nesting level @max_level in Testcase 3.3.1.A6 diff --git a/mysql-test/suite/funcs_1/storedproc/cleanup_sp_tb.inc b/mysql-test/suite/funcs_1/storedproc/cleanup_sp_tb.inc index 493c4373d20..bd41f2dcb16 100644 --- a/mysql-test/suite/funcs_1/storedproc/cleanup_sp_tb.inc +++ b/mysql-test/suite/funcs_1/storedproc/cleanup_sp_tb.inc @@ -1,5 +1,6 @@ -let $message= --source suite/funcs_1/storedproc/cleanup_sp_tb.inc; ---source include/show_msg80.inc +--echo +--echo --source suite/funcs_1/storedproc/cleanup_sp_tb.inc +--echo -------------------------------------------------------------------------------- # called both to cleanup possibly existing data before and after the SP tests diff --git a/mysql-test/suite/funcs_1/storedproc/load_sp_tb.inc b/mysql-test/suite/funcs_1/storedproc/load_sp_tb.inc index b7f7b2cae02..5224860925c 100644 --- a/mysql-test/suite/funcs_1/storedproc/load_sp_tb.inc +++ b/mysql-test/suite/funcs_1/storedproc/load_sp_tb.inc @@ -1,11 +1,12 @@ -let $message= --source suite/funcs_1/storedproc/load_sp_tb.inc; ---source include/show_msg80.inc +--echo +--echo --source suite/funcs_1/storedproc/load_sp_tb.inc +--echo -------------------------------------------------------------------------------- # ============================================================================== # -# this load script can be called multiple times inside a test script because it +# This load script can be called multiple times inside a test script because it # first cleans up all objects that will be created. -# therefore the same script is used as it will be used at the end of a test. +# Therefore the same script is used as it will be used at the end of a test. # # ============================================================================== @@ -20,46 +21,84 @@ CREATE DATABASE db_storedproc_1; USE db_storedproc; -eval create table t1(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; - -eval create table t2(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 t2; - -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; - -eval create table t4(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 t4; +--replace_result $engine_type <engine_to_be_tested> +eval +create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = $engine_type; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/t4.txt' into table t1; + +--replace_result $engine_type <engine_to_be_tested> +eval +create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = $engine_type; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/t4.txt' into table t2; + +--replace_result $engine_type <engine_to_be_tested> +eval +create table t3(f1 char(20),f2 char(20),f3 integer) engine = $engine_type; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/t3.txt' into table t3; + +--replace_result $engine_type <engine_to_be_tested> +eval +create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = $engine_type; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/t4.txt' into table t4; USE db_storedproc_1; -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; +--replace_result $engine_type <engine_to_be_tested> +eval +create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = $engine_type; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/t4.txt' into table t6; USE db_storedproc; -eval create table t7 (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; - -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 t8; - -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; - -eval create table t10(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 t10; - -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 t11; +--replace_result $engine_type <engine_to_be_tested> +eval +create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) +engine = $engine_type; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/t7.txt' into table t7; + +--replace_result $engine_type <engine_to_be_tested> +eval +create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) +engine = $engine_type; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/t7.txt' into table t8; + +--replace_result $engine_type <engine_to_be_tested> +eval +create table t9(f1 int, f2 char(25), f3 int) engine = $engine_type; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/t9.txt' into table t9; + +--replace_result $engine_type <engine_to_be_tested> +eval +create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = $engine_type; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/t4.txt' into table t10; + +--replace_result $engine_type <engine_to_be_tested> +eval +create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +engine = $engine_type; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/t4.txt' into table t11; diff --git a/mysql-test/suite/funcs_1/storedproc/storedproc_02.inc b/mysql-test/suite/funcs_1/storedproc/storedproc_02.inc index a8d52fee0b5..0f62a559985 100644 --- a/mysql-test/suite/funcs_1/storedproc/storedproc_02.inc +++ b/mysql-test/suite/funcs_1/storedproc/storedproc_02.inc @@ -5,85 +5,192 @@ # ============================================================================== # (numbering from requirement document TP v1.0, Last updated: 25 Jan 2005 01:00) # -# 3.1.2 Syntax checks for the stored procedure-specific programming statements BEGIN/END, DECLARE, SET, SELECT/INTO, OPEN, FETCH, CLOSE: +# 3.1.2 Syntax checks for the stored procedure-specific programming statements +# BEGIN/END, DECLARE, SET, SELECT/INTO, OPEN, FETCH, CLOSE: # #- 1. Ensure that all subclauses that should be supported are supported. -#- 2. Ensure that all subclauses that should not be supported are disallowed with an appropriate error message. -#- 3. Ensure that all supported subclauses are supported only in the correct order. -#- 4. Ensure that an appropriate error message is returned if a subclause is out-of-order in a stored procedure definition. -#- 5. Ensure that all subclauses that are defined to be mandatory are indeed required to be mandatory by the MySQL server and tools. -#- 6. Ensure that any subclauses that are defined to be optional are indeed treated as optional by the MySQL server and tools. -#- 7. Ensure that every BEGIN statement is coupled with a terminating END statement. -## 8. Ensure that the scope of each BEGIN/END compound statement within a stored procedure definition is properly applied. -#- 9. Ensure that the labels enclosing each BEGIN/END compound statement must match. -#- 10. Ensure that it is possible to put a beginning label at the start of a BEGIN/END compound statement without also requiring an ending label at the end of the same statement. -#- 11. Ensure that it is not possible to put an ending label at the end of a BEGIN/END compound statement without also requiring a matching beginning label at the start of the same statement. +#- 2. Ensure that all subclauses that should not be supported are disallowed +# with an appropriate error message. +#- 3. Ensure that all supported subclauses are supported only in the +# correct order. +#- 4. Ensure that an appropriate error message is returned if a subclause is +# out-of-order in a stored procedure definition. +#- 5. Ensure that all subclauses that are defined to be mandatory are indeed +# required to be mandatory by the MySQL server and tools. +#- 6. Ensure that any subclauses that are defined to be optional are indeed +# treated as optional by the MySQL server and tools. +#- 7. Ensure that every BEGIN statement is coupled with a terminating +# END statement. +## 8. Ensure that the scope of each BEGIN/END compound statement within a +# stored procedure definition is properly applied. +#- 9. Ensure that the labels enclosing each BEGIN/END compound statement +# must match. +#- 10. Ensure that it is possible to put a beginning label at the start of +# a BEGIN/END compound statement without also requiring an ending label +# at the end of the same statement. +#- 11. Ensure that it is not possible to put an ending label at the end of +# a BEGIN/END compound statement without also requiring a matching +# beginning label at the start of the same statement. #- 12. Ensure that every beginning label must end with a colon (:). #- 13. Ensure that every beginning label with the same scope must be unique. -#- 14. Ensure that the variables, cursors, conditions, and handlers declared for a stored procedure (with the DECLARE statement) may only be properly defined. -#- 15. Ensure that the variables, cursors, conditions, and handlers declared for a stored procedure (with the DECLARE statement) may only be defined in the correct order. -#- 16. Ensure that every possible type of variable -- utilizing every data type definition supported by the MySQL server in combination with both no DEFAULT subclause and with DEFAULT subclauses that set the variable’s default value to a range of appropriate values -- may be declared for a stored procedure. -#- 17. Ensure that the DECLARE statement can declare multiple variables both separately and all at once from a variable list. -#- 18. Ensure that invalid variable declarations are rejected, with an appropriate error message. -#- 19. Ensure that every possible type of cursor may be declared for a stored procedure. -#- 20. Ensure that invalid cursor declarations are rejected, with an appropriate error message. -#- 21. Ensure that every possible type of condition may be declared for a stored procedure. -# -22. Ensure that invalid condition declarations are rejected, with an appropriate error message. -#- 23. Ensure that every possible type of handler may be declared for a stored procedure. -#- 24. Ensure that invalid handler declarations are rejected, with an appropriate error message. -#- 25. Ensure that the scope of every variable, cursor, condition, and handler declared for a stored procedure (with the DECLARE statement) is properly applied. -## 26. Ensure that the initial value of every variable declared for a stored procedure is either NULL or its DEFAULT value, as appropriate. -#- 27. Ensure that the SET statement can assign a value to every local variable declared within a stored procedure’s definition, as well as to every appropriate global server variable. -#- 28. Ensure that the SET statement can assign values to variables either separately or to multiple variables in a list. -#- 29. Ensure that the SET statement may assign only those values to a variable that are appropriate for that variable’s data type definition. -## 30. Ensure that, when a stored procedure is called/executed, every variable always uses the correct value: either the value with which it is initialized or the value to which it is subsequently SET or otherwise assigned, as appropriate. -## 31. Ensure that the SELECT ... INTO statement properly assigns values to the variables in its variable list. -## 32. Ensure that a SELECT ... INTO statement that retrieves multiple rows is rejected, with an appropriate error message. -## 33. Ensure that a SELECT ... INTO statement that retrieves too many columns for the number of variables in its variable list is rejected, with an appropriate error message. -## 34. Ensure that a SELECT ... INTO statement that retrieves too few columns for the number of variables in its variable list is rejected, with an appropriate error message. -#- 35. Ensure that a SELECT ... INTO statement that retrieves column values with inappropriate data types for the matching variables in its variable list is rejected, with an appropriate error message. -#- 36. Ensure that the DECLARE ... CONDITION FOR statement can declare a properly-named condition for every possible SQLSTATE and MySQL-specific error code. -#- 37. Ensure that no two conditions declared with the same scope may have the same condition name. +#- 14. Ensure that the variables, cursors, conditions, and handlers declared +# for a stored procedure (with the DECLARE statement) may only be +# properly defined. +#- 15. Ensure that the variables, cursors, conditions, and handlers declared for +# a stored procedure (with the DECLARE statement) may only be defined in +# the correct order. +#- 16. Ensure that every possible type of variable -- utilizing every data type +# definition supported by the MySQL server in combination with both no +# DEFAULT subclause and with DEFAULT subclauses that set the variableÂ’s +# default value to a range of appropriate values -- may be declared for +# a stored procedure. +#- 17. Ensure that the DECLARE statement can declare multiple variables both +# separately and all at once from a variable list. +#- 18. Ensure that invalid variable declarations are rejected, with an +# appropriate error message. +#- 19. Ensure that every possible type of cursor may be declared for a +# stored procedure. +#- 20. Ensure that invalid cursor declarations are rejected, with an appropriate +# error message. +#- 21. Ensure that every possible type of condition may be declared for +# a stored procedure. +# -22. Ensure that invalid condition declarations are rejected, with an +# appropriate error message. +#- 23. Ensure that every possible type of handler may be declared for a +# stored procedure. +#- 24. Ensure that invalid handler declarations are rejected, with an +# appropriate error message. +#- 25. Ensure that the scope of every variable, cursor, condition, and handler +# declared for a stored procedure (with the DECLARE statement) is +# properly applied. +## 26. Ensure that the initial value of every variable declared for a stored +# procedure is either NULL or its DEFAULT value, as appropriate. +#- 27. Ensure that the SET statement can assign a value to every local variable +# declared within a stored procedureÂ’s definition, as well as to every +# appropriate global server variable. +#- 28. Ensure that the SET statement can assign values to variables either +# separately or to multiple variables in a list. +#- 29. Ensure that the SET statement may assign only those values to a variable +# that are appropriate for that variableÂ’s data type definition. +## 30. Ensure that, when a stored procedure is called/executed, every variable +# always uses the correct value: either the value with which it is +# initialized or the value to which it is subsequently SET or otherwise +# assigned, as appropriate. +## 31. Ensure that the SELECT ... INTO statement properly assigns values to the +# variables in its variable list. +## 32. Ensure that a SELECT ... INTO statement that retrieves multiple rows is +# rejected, with an appropriate error message. +## 33. Ensure that a SELECT ... INTO statement that retrieves too many columns +# for the number of variables in its variable list is rejected, with an +# appropriate error message. +## 34. Ensure that a SELECT ... INTO statement that retrieves too few columns +# for the number of variables in its variable list is rejected, with an +# appropriate error message. +#- 35. Ensure that a SELECT ... INTO statement that retrieves column values +# with inappropriate data types for the matching variables in its variable +# list is rejected, with an appropriate error message. +#- 36. Ensure that the DECLARE ... CONDITION FOR statement can declare a +# properly-named condition for every possible SQLSTATE and MySQL-specific +# error code. +#- 37. Ensure that no two conditions declared with the same scope may have the +# same condition name. ## 38. Ensure that the scope of every condition declared is properly applied. -#- 39. Ensure that every SQLSTATE value declared with a DECLARE ... CONDITION FOR statement is a character string that is 5 characters long. -#- 40. Ensure that the DECLARE ... CONDITION FOR statement cannot declare a condition for an invalid SQLSTATE. -#- 41. Ensure that the DECLARE ... CONDITION FOR statement cannot declare a condition for the “successful completion SQLSTATE: “00000“. -#- 42. Ensure that the DECLARE ... HANDLER FOR statement can declare a CONTINUE, EXIT, and UNDO handler for every condition declared (with a DECLARE ... CONDITION FOR statement), within the scope of the handler, for a stored procedure, as well as for every possible SQLSTATE and MySQL-specific error code, as well as for the predefined conditions SQLWARNING, NOT FOUND, and SQLEXCEPTION. -## 43. Ensure that the DECLARE ... HANDLER FOR statement can not declare any handler for a condition declared outside of the scope of the handler. -## 44. Ensure that the DECLARE ... HANDLER FOR statement cannot declare a handler for any invalid, or undeclared, condition. +#- 39. Ensure that every SQLSTATE value declared with a DECLARE ... CONDITION +# FOR statement is a character string that is 5 characters long. +#- 40. Ensure that the DECLARE ... CONDITION FOR statement cannot declare a +# condition for an invalid SQLSTATE. +#- 41. Ensure that the DECLARE ... CONDITION FOR statement cannot declare a +# condition for the “successful completion SQLSTATE: “00000“. +#- 42. Ensure that the DECLARE ... HANDLER FOR statement can declare a CONTINUE, +# EXIT, and UNDO handler for every condition declared (with a DECLARE ... +# CONDITION FOR statement), within the scope of the handler, for a stored +# procedure, as well as for every possible SQLSTATE and MySQL-specific +# error code, as well as for the predefined conditions SQLWARNING, +# NOT FOUND, and SQLEXCEPTION. +## 43. Ensure that the DECLARE ... HANDLER FOR statement can not declare any +# handler for a condition declared outside of the scope of the handler. +## 44. Ensure that the DECLARE ... HANDLER FOR statement cannot declare a +# handler for any invalid, or undeclared, condition. ## 45. Ensure that the scope of every handler declared is properly applied. -#- 46. Ensure that, within the same scope, no two handlers may be declared for the same condition. -#- 47. Ensure that every SQLSTATE value declared with a DECLARE ... HANDLER FOR statement is a character string that is 5 characters long. -#- 48. Ensure that the DECLARE ... HANDLER FOR statement cannot declare a condition for an invalid SQLSTATE. -#- 49. Ensure that the DECLARE ... HANDLER FOR statement cannot declare a condition for the “successful completion SQLSTATE: “00000“. -## 50. Ensure that a CONTINUE handler allows the execution of the stored procedure to continue once the handler statement has completed its own execution (that is, once the handler action statement has been executed). -## 51. Ensure that an EXIT handler causes the execution of the stored procedure to terminate, within its scope, once the handler action statement has been executed. -## 52. Ensure that an EXIT handler does not cause the execution of the stored procedure to terminate outside of its scope. -#- 53. Ensure that a handler condition of SQLWARNING takes the same action as a handler condition defined with an SQLSTATE that begins with “01“. -## 54. Ensure that a handler with a condition defined with an SQLSTATE that begins with “01“ is always exactly equivalent in action to a handler with an SQLWARNING condition. -#- 55. Ensure that a handler condition of NOT FOUND takes the same action as a handler condition defined with an SQLSTATE that begins with “02“. -## 56. Ensure that a handler with a condition defined with an SQLSTATE that begins with “02“ is always exactly equivalent in action to a handler with a NOT FOUND condition. -#- 57. Ensure that a handler condition of SQLEXCEPTION takes the same action as a handler condition defined with an SQLSTATE that begins with anything other that “01“ or “02“. -## 58. Ensure that a handler with a condition defined with an SQLSTATE that begins with anything other that “01“ or “02“ is always exactly equivalent in action to a handler with an SQLEXCEPTION condition. +#- 46. Ensure that, within the same scope, no two handlers may be declared for +# the same condition. +#- 47. Ensure that every SQLSTATE value declared with a DECLARE ... HANDLER FOR +# statement is a character string that is 5 characters long. +#- 48. Ensure that the DECLARE ... HANDLER FOR statement cannot declare a +# condition for an invalid SQLSTATE. +#- 49. Ensure that the DECLARE ... HANDLER FOR statement cannot declare a +# condition for the “successful completion SQLSTATE: “00000“. +## 50. Ensure that a CONTINUE handler allows the execution of the stored +# procedure to continue once the handler statement has completed its +# own execution (that is, once the handler action statement has been +# executed). +## 51. Ensure that an EXIT handler causes the execution of the stored procedure +# to terminate, within its scope, once the handler action statement has +# been executed. +## 52. Ensure that an EXIT handler does not cause the execution of the stored +# procedure to terminate outside of its scope. +#- 53. Ensure that a handler condition of SQLWARNING takes the same action as +# a handler condition defined with an SQLSTATE that begins with “01“. +## 54. Ensure that a handler with a condition defined with an SQLSTATE that +# begins with “01“ is always exactly equivalent in action to a +# handler with an SQLWARNING condition. +#- 55. Ensure that a handler condition of NOT FOUND takes the same action as a +# handler condition defined with an SQLSTATE that begins with “02“. +## 56. Ensure that a handler with a condition defined with an SQLSTATE that +# begins with “02“ is always exactly equivalent in action to a +# handler with a NOT FOUND condition. +#- 57. Ensure that a handler condition of SQLEXCEPTION takes the same action +# as a handler condition defined with an SQLSTATE that begins with +# anything other that “01“ or “02“. +## 58. Ensure that a handler with a condition defined with an SQLSTATE that +# begins with anything other that “01“ or “02“ is always +# exactly equivalent in action to a handler with an SQLEXCEPTION condition. #- 59. Ensure that no two cursors in a stored procedure can have the same name. -#- 60. Ensure that a cursor declaration may not include a SELECT ... INTO statement. -#- 61. Ensure that a cursor declaration that includes an ORDER BY clause may not be an updatable cursor. -#- 62. Ensure that OPEN <cursor name> fails unless a cursor with the same name has already been declared. -#- 63. Ensure that OPEN <cursor name> fails if the same cursor is currently already open. -#- 64. Ensure that FETCH <cursor name> fails unless a cursor with the same name is already open. -## 65. Ensure that FETCH <cursor name> returns the first row of the cursor’s result set the first time FETCH is executed, that it returns each subsequent row of the cursor’s result set each of the subsequent times FETCH is executed, and that it returns a NOT FOUND warning if it is executed after the last row of the cursor’s result set has already been fetched. -#- 66. Ensure that FETCH <cursor name> fails with an appropriate error message if it is executed before the cursor has been opened. -#- 67. Ensure that FETCH <cursor name> fails with an appropriate error message if it is executed after the cursor has been closed. -## 68. Ensure that FETCH <cursor name> fails with an appropriate error message if the number of columns to be fetched does not match the number of variables specified by the FETCH statement. -#- 69. Ensure that FETCH <cursor name> fails with an appropriate error message if the data type of the column values being fetched are not appropriate for the matching FETCH variables to which the data is being assigned. -#- 70. Ensure that CLOSE <cursor name> fails unless a cursor with the same name is already open. -#- 71. Ensure that all cursors are closed when a transaction terminates with a COMMIT statement. -#- 72. Ensure that all cursors are closed when a transaction terminates with a ROLLBACK statement. -#- 73. Ensure that the result set of a cursor that has been closed is not longer available to the FETCH statement. -#- 74. Ensure that every cursor declared within a compound statement is closed when that compound statement ends. -## 75. Ensure that, for nested compound statements, a cursor that was declared and opened during an outer level of the statement is not closed when an inner level of a compound statement ends. -## 76. Ensure that all cursors operate asensitively, so that there is no concurrency conflict between cursors operating on the same, or similar, sets of results during execution of one or more stored procedures. -# 77. Ensure that multiple cursors, nested within multiple compound statements within a stored procedure, always act correctly and return the expected result. +#- 60. Ensure that a cursor declaration may not include a SELECT ... INTO +# statement. +#- 61. Ensure that a cursor declaration that includes an ORDER BY clause may +# not be an updatable cursor. +#- 62. Ensure that OPEN <cursor name> fails unless a cursor with the same name +# has already been declared. +#- 63. Ensure that OPEN <cursor name> fails if the same cursor is currently +# already open. +#- 64. Ensure that FETCH <cursor name> fails unless a cursor with the same name +# is already open. +## 65. Ensure that FETCH <cursor name> returns the first row of the cursorÂ’s +# result set the first time FETCH is executed, that it returns each +# subsequent row of the cursorÂ’s result set each of the subsequent +# times FETCH is executed, and that it returns a NOT FOUND warning if it +# is executed after the last row of the cursorÂ’s result set has already +# been fetched. +#- 66. Ensure that FETCH <cursor name> fails with an appropriate error message +# if it is executed before the cursor has been opened. +#- 67. Ensure that FETCH <cursor name> fails with an appropriate error message +# if it is executed after the cursor has been closed. +## 68. Ensure that FETCH <cursor name> fails with an appropriate error message +# if the number of columns to be fetched does not match the number of +# variables specified by the FETCH statement. +#- 69. Ensure that FETCH <cursor name> fails with an appropriate error message +# if the data type of the column values being fetched are not appropriate +# for the matching FETCH variables to which the data is being assigned. +#- 70. Ensure that CLOSE <cursor name> fails unless a cursor with the same name +# is already open. +#- 71. Ensure that all cursors are closed when a transaction terminates with +# a COMMIT statement. +#- 72. Ensure that all cursors are closed when a transaction terminates with +# a ROLLBACK statement. +#- 73. Ensure that the result set of a cursor that has been closed is not +# longer available to the FETCH statement. +#- 74. Ensure that every cursor declared within a compound statement is closed +# when that compound statement ends. +## 75. Ensure that, for nested compound statements, a cursor that was declared +# and opened during an outer level of the statement is not closed when an +# inner level of a compound statement ends. +## 76. Ensure that all cursors operate asensitively, so that there is no +# concurrency conflict between cursors operating on the same, or similar, +# sets of results during execution of one or more stored procedures. +# 77. Ensure that multiple cursors, nested within multiple compound statements +# within a stored procedure, always act correctly and return the +# expected result. # # ============================================================================== let $message= Section 3.1.2 - Syntax checks for the stored procedure-specific @@ -209,7 +316,7 @@ BEGIN set @x = x; set @y = y; set @z = 234; - SELECT f1, f2 into @x, @y from t2 limit 1; + SELECT f1, f2 into @x, @y from t2 where f1='a`' and f2='a`' limit 1; SELECT @x, @y, @z, invar; BEGIN set @x = 2; @@ -257,7 +364,7 @@ BEGIN declare x integer; declare y integer; set @x=x; set @y=y; - SELECT f4, f3 into @x, @y from t2 limit 1; + SELECT f4, f3 into @x, @y from t2 where f4=-5000 and f3='1000-01-01' limit 1; SELECT @x, @y; END// delimiter ;// @@ -290,8 +397,9 @@ BEGIN END// delimiter ;// -#Error: 1172 SQLSTATE: 42000 (ER_TOO_MANY_ROWS) Message: Result consisted of more than one row ---error 1172 +# Error: SQLSTATE: 42000 (ER_TOO_MANY_ROWS) +# Message: Result consisted of more than one row +--error ER_TOO_MANY_ROWS CALL sp1(); # cleanup 3.1.2.32 @@ -321,7 +429,7 @@ BEGIN END// delimiter ;// ---error 1222 +--error ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT CALL sp1(); # cleanup 3.1.2.33 @@ -352,7 +460,7 @@ BEGIN END// delimiter ;// ---error 1222 +--error ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT CALL sp1(); # cleanup 3.1.2.34 @@ -375,8 +483,10 @@ create table res_t1(w char unique, x char); insert into res_t1 values('a', 'b'); -# Error: 1339 SQLSTATE: 20000 (ER_SP_CASE_NOT_FOUND) Message: Case not found for CASE statement -# Error: 1022 SQLSTATE: 23000 (ER_DUP_KEY) Message: Can't write; duplicate key in table '%s' +# Error: SQLSTATE: 20000 (ER_SP_CASE_NOT_FOUND) +# Message: Case not found for CASE statement +# Error: SQLSTATE: 23000 (ER_DUP_KEY) +# Message: Can't write; duplicate key in table '%s' delimiter //; CREATE PROCEDURE h1 () @@ -472,7 +582,7 @@ create table res_t1(w char unique, x char); insert into res_t1 values ('a', 'b'); delimiter //; ---error 1319 +--error ER_SP_COND_MISMATCH CREATE PROCEDURE h1 () BEGIN declare x1, x2, x3, x4, x5, x6 int default 0; @@ -561,8 +671,9 @@ DROP PROCEDURE IF EXISTS h1; --enable_warnings delimiter //; -#Error: 1319 SQLSTATE: 42000 (ER_SP_COND_MISMATCH) Message: Undefined CONDITION: %s ---error 1319 +# Error: SQLSTATE: 42000 (ER_SP_COND_MISMATCH) +# Message: Undefined CONDITION: %s +--error ER_SP_COND_MISMATCH CREATE PROCEDURE h1 () BEGIN declare x1, x2, x3, x4, x5, x6 int default 0; @@ -582,8 +693,9 @@ BEGIN END; END// -#Error: 1064 SQLSTATE: 42000 (ER_PARSE_ERROR) Message: %s near '%s' at line %d ---error 1064 +# Error: SQLSTATE: 42000 (ER_PARSE_ERROR) +# Message: %s near '%s' at line %d +--error ER_PARSE_ERROR CREATE PROCEDURE h1 () BEGIN DECLARE x1 INT DEFAULT 0; @@ -593,8 +705,9 @@ BEGIN DECLARE CONTINUE HANDLER FOR condname1 SET x1 = 1; END// -#Error: 1407 SQLSTATE: 42000 (ER_SP_BAD_SQLSTATE) Message: Bad SQLSTATE: '%s' ---error 1407 +# Error: SQLSTATE: 42000 (ER_SP_BAD_SQLSTATE) +# Message: Bad SQLSTATE: '%s' +--error ER_SP_BAD_SQLSTATE CREATE PROCEDURE h1 () BEGIN DECLARE x1 INT DEFAULT 0; @@ -632,7 +745,7 @@ drop table IF EXISTS res_t1; --echo ==> 'UNDO' is still not supported. delimiter //; ---error 1064 +--error ER_PARSE_ERROR create procedure p1undo () begin declare undo handler for sqlexception select '1'; @@ -723,7 +836,7 @@ DROP TABLE res_t1; let $message= Testcase 3.1.2.50:; --source include/show_msg.inc -# testcase: ensure that a continue handler allows the execution of the stored procedure +# Testcase: Ensure that a continue handler allows the execution of the stored procedure # to continue once the handler statement has completed its own execution # (that is, once the handler action statement has been executed). @@ -794,8 +907,9 @@ BEGIN END// delimiter ;// -# Error: 1318 SQLSTATE: 42000 (ER_SP_WRONG_NO_OF_ARGS) Message: Incorrect number of arguments for %s %s; expected %u, got %u ---error 1318 +# Error: SQLSTATE: 42000 (ER_SP_WRONG_NO_OF_ARGS) +# Message: Incorrect number of arguments for %s %s; expected %u, got %u +--error ER_SP_WRONG_NO_OF_ARGS CALL sp1(1); CALL sp2(); SELECT '-3-', @x2, @x; @@ -858,7 +972,7 @@ let $message= Testcase 3.1.2.54:; --source include/show_msg.inc let $message= Ensure that a handler with a condition defined with an SQLSTATE that begins with -“01“ is always exactly equivalent in action to a handler with an SQLWARNING +“01“ is always exactly equivalent in action to a handler with an SQLWARNING condition.; --source include/show_msg80.inc @@ -959,7 +1073,7 @@ let $message= Testcase 3.1.2.56:; --source include/show_msg.inc let $message= Ensure that a handler with a condition defined with an SQLSTATE that begins with -“02“ is always exactly equivalent in action to a handler with a NOT FOUND +“02“ is always exactly equivalent in action to a handler with a NOT FOUND condition.; --source include/show_msg80.inc @@ -1052,7 +1166,7 @@ BEGIN END// delimiter ;// ---error 1329 +--error ER_SP_FETCH_NO_DATA CALL sp0(); SELECT @done, @x; @@ -1081,13 +1195,16 @@ let $message= Testcase 3.1.2.58:; --source include/show_msg.inc let $message= Ensure that a handler with a condition defined with an SQLSTATE that begins with -anything other that “01“ or “02“ is always exactly equivalent in action to a +anything other that “01“ or “02“ is always exactly equivalent in action to a handler with an SQLEXCEPTION condition.; --source include/show_msg80.inc -# Error: 1339 SQLSTATE: 20000 (ER_SP_CASE_NOT_FOUND) Message: Case not found for CASE statement -# Error: 1222 SQLSTATE: 21000 (ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT) Message: The used SELECT statements have a different number of columns -# Error: 1326 SQLSTATE: 24000 (ER_SP_CURSOR_NOT_OPEN) Message: Cursor is not open +# Error: SQLSTATE: 20000 (ER_SP_CASE_NOT_FOUND) +# Message: Case not found for CASE statement +# Error: SQLSTATE: 21000 (ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT) +# Message: The used SELECT statements have a different number of columns +# Error: SQLSTATE: 24000 (ER_SP_CURSOR_NOT_OPEN) +# Message: Cursor is not open --disable_warnings DROP PROCEDURE IF EXISTS sp0; @@ -1271,7 +1388,8 @@ BEGIN declare f5_value char(20); declare f4_value integer; declare f6_value integer; - declare cur1 cursor for SELECT f1, f2, f4, f5, f6 from t2 limit 3; + declare cur1 cursor for SELECT f1, f2, f4, f5, f6 from t2 + where f4 >=-5000 order by f4 limit 3; open cur1; while proceed do SELECT count AS 'loop'; @@ -1282,7 +1400,7 @@ BEGIN END// delimiter ;// ---error 1329 +--error ER_SP_FETCH_NO_DATA CALL sp1(); SELECT * FROM temp; @@ -1338,11 +1456,11 @@ END// delimiter ;// --echo --> not enough columns in FETCH statement ---error 1328 +--error ER_SP_WRONG_NO_OF_FETCH_ARGS CALL sp1(); --echo --> too many columns in FETCH statement ---error 1328 +--error ER_SP_WRONG_NO_OF_FETCH_ARGS CALL sp2(); # cleanup 3.1.2.68 @@ -1366,9 +1484,10 @@ DROP PROCEDURE IF EXISTS sp1; create table temp1( f0 char(20), f1 char(20), f2 char(20), f3 int, f4 char(20) ); -#Error: 1329 SQLSTATE: 02000 (ER_SP_FETCH_NO_DATA) Message: No data to FETCH +# Error: SQLSTATE: 02000 (ER_SP_FETCH_NO_DATA) +# Message: No data to FETCH -SELECT f1, f2, f4, f5 from t2; +SELECT f1, f2, f4, f5 from t2 order by f4; delimiter //; CREATE PROCEDURE sp1( ) @@ -1379,8 +1498,8 @@ BEGIN declare newf2 char(20); declare newf5 char(20); declare newf4 integer; - declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 limit 5; - declare cur2 cursor for SELECT f1, f2, f4, f5 from t2 limit 5; + declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 where f4 >= -5000 order by f4 limit 5; + declare cur2 cursor for SELECT f1, f2, f4, f5 from t2 where f4 >= -5000 order by f4 limit 5; open cur1; open cur2; BEGIN @@ -1453,8 +1572,10 @@ BEGIN declare i_newf12 char(20); declare i_newf13 date; declare i_newf14 integer; - declare cur1 cursor for SELECT f1, f2, f3, f4 from t2 limit 4; - declare cur2 cursor for SELECT f1, f2, f3, f4 from t2 limit 3; + declare cur1 cursor for SELECT f1, f2, f3, f4 from t2 + where f4>=-5000 order by f4 limit 4; + declare cur2 cursor for SELECT f1, f2, f3, f4 from t2 + where f4>=-5000 order by f4 limit 3; declare continue handler for sqlstate '02000' set proceed=0; open cur1; open cur2; @@ -1486,8 +1607,10 @@ BEGIN DECLARE o_newf12 CHAR(20); DECLARE o_newf13 DATE; DECLARE o_newf14 INTEGER; - DECLARE cur1 CURSOR FOR SELECT f1, f2, f3, f4 FROM t2 LIMIT 5; - DECLARE cur2 CURSOR FOR SELECT f1, f2, f3, f4 FROM t2 LIMIT 5; + DECLARE cur1 CURSOR FOR SELECT f1, f2, f3, f4 FROM t2 + WHERE f4>=-5000 ORDER BY f4 LIMIT 5; + DECLARE cur2 CURSOR FOR SELECT f1, f2, f3, f4 FROM t2 + WHERE f4>=-5000 ORDER BY f4 LIMIT 5; DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET proceed=0; OPEN cur1; OPEN cur2; @@ -1526,6 +1649,7 @@ DROP TABLE temp2; --source suite/funcs_1/storedproc/cleanup_sp_tb.inc # ============================================================================== -let $message= . +++ END OF SCRIPT +++; ---source include/show_msg80.inc +--echo +--echo . +++ END OF SCRIPT +++ +--echo -------------------------------------------------------------------------------- # ============================================================================== diff --git a/mysql-test/suite/funcs_1/storedproc/storedproc_03.inc b/mysql-test/suite/funcs_1/storedproc/storedproc_03.inc index 9ffa7d7f66c..01810390a92 100644 --- a/mysql-test/suite/funcs_1/storedproc/storedproc_03.inc +++ b/mysql-test/suite/funcs_1/storedproc/storedproc_03.inc @@ -5,38 +5,67 @@ # ============================================================================== # (numbering from requirement document TP v1.0, Last updated: 25 Jan 2005 01:00) # -# 3.1.3 Syntax checks for the stored procedure-specific flow control statements IF, CASE, LOOP, LEAVE, ITERATE, REPEAT, WHILE: +# 3.1.3 Syntax checks for the stored procedure-specific flow control statements +# IF, CASE, LOOP, LEAVE, ITERATE, REPEAT, WHILE: # #- 1. Ensure that all subclauses that should be supported are supported. -#- 2. Ensure that all subclauses that should not be supported are disallowed with an appropriate error message. -#- 3. Ensure that all supported subclauses are supported only in the correct order. -#- 4. Ensure that an appropriate error message is returned if a subclause is out-of-order in a stored procedure definition. -#- 5. Ensure that all subclauses that are defined to be mandatory are indeed required to be mandatory by the MySQL server and tools. -#- 6. Ensure that any subclauses that are defined to be optional are indeed treated as optional by the MySQL server and tools. -## 7. Ensure that the IF statement acts correctly for all variants, including cases where statements are nested. -## 8. Ensure that the CASE statement acts correctly for all variants, including cases where statements are nested. -## 9. Ensure that the LOOP statement acts correctly for all variants, including cases where statements are nested. +#- 2. Ensure that all subclauses that should not be supported are disallowed +# with an appropriate error message. +#- 3. Ensure that all supported subclauses are supported only in the +# correct order. +#- 4. Ensure that an appropriate error message is returned if a subclause is +# out-of-order in a stored procedure definition. +#- 5. Ensure that all subclauses that are defined to be mandatory are indeed +# required to be mandatory by the MySQL server and tools. +#- 6. Ensure that any subclauses that are defined to be optional are indeed +# treated as optional by the MySQL server and tools. +## 7. Ensure that the IF statement acts correctly for all variants, including +# cases where statements are nested. +## 8. Ensure that the CASE statement acts correctly for all variants, +# including cases where statements are nested. +## 9. Ensure that the LOOP statement acts correctly for all variants, +# including cases where statements are nested. #- 10. Ensure that the labels enclosing each LOOP statement must match. -#- 11. Ensure that it is possible to put a beginning label at the start of a LOOP statement without also requiring an ending label at the end of the same statement. -#- 12. Ensure that it is not possible to put an ending label at the end of a LOOP statement without also requiring a matching beginning label at the start of the same statement. +#- 11. Ensure that it is possible to put a beginning label at the start of +# a LOOP statement without also requiring an ending label at the end of +# the same statement. +#- 12. Ensure that it is not possible to put an ending label at the end of +# a LOOP statement without also requiring a matching beginning label +# at the start of the same statement. #- 13. Ensure that every beginning label must end with a colon (:). #- 14. Ensure that every beginning label with the same scope must be unique. -## 15. Ensure that the LEAVE statement acts correctly for all variants, including cases where statements are nested. -## 16. Ensure that the ITERATE statement acts correctly for all variants, including cases where statements are nested. -#- 17. Ensure that the ITERATE statement fails, with an appropriate error message, if it appears in any context other than within LOOP, REPEAT, or WHILE statements. -## 18. Ensure that the REPEAT 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. +## 16. Ensure that the ITERATE statement acts correctly for all variants, +# including cases where statements are nested. +#- 17. Ensure that the ITERATE statement fails, with an appropriate error +# message, if it appears in any context other than within LOOP, REPEAT, +# or WHILE statements. +## 18. Ensure that the REPEAT statement acts correctly for all variants, +# including cases where statements are nested. #- 19. Ensure that the labels enclosing each REPEAT statement must match. -#- 20. Ensure that it is possible to put a beginning label at the start of a REPEAT statement without also requiring an ending label at the end of the same statement. -#- 21. Ensure that it is not possible to put an ending label at the end of a REPEAT statement without also requiring a matching beginning label at the start of the same statement. +#- 20. Ensure that it is possible to put a beginning label at the start of +# a REPEAT statement without also requiring an ending label at the end +# of the same statement. +#- 21. Ensure that it is not possible to put an ending label at the end of +# a REPEAT statement without also requiring a matching beginning label +# at the start of the same statement. #- 22. Ensure that every beginning label must end with a colon (:). #- 23. Ensure that every beginning label with the same scope must be unique. -## 24. Ensure that the WHILE statement acts correctly for all variants, including cases where statements are nested. +## 24. Ensure that the WHILE statement acts correctly for all variants, +# including cases where statements are nested. #- 25. Ensure that the labels enclosing each WHILE statement must match. -#- 26. Ensure that it is possible to put a beginning label at the start of a WHILE statement without also requiring an ending label at the end of the same statement. -#- 27. Ensure that it is not possible to put an ending label at the end of a WHILE statement without also requiring a matching beginning label at the start of the same statement. +#- 26. Ensure that it is possible to put a beginning label at the start of +# a WHILE statement without also requiring an ending label at the end +# of the same statement. +#- 27. Ensure that it is not possible to put an ending label at the end of +# a WHILE statement without also requiring a matching beginning label +# at the start of the same statement. #- 28. Ensure that every beginning label must end with a colon (:). #- 29. Ensure that every beginning label with the same scope must be unique. -## 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. +## 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. # # ============================================================================== let $message= Section 3.1.3 - Syntax checks for the stored procedure-specific flow @@ -237,8 +266,9 @@ DROP PROCEDURE IF EXISTS sp31316; delimiter //; # wrong label at iterate -#Error: 1308 SQLSTATE: 42000 (ER_SP_LILABEL_MISMATCH) Message: %s with no matching label: %s ---error 1308 +# Error: SQLSTATE: 42000 (ER_SP_LILABEL_MISMATCH) +# Message: %s with no matching label: %s +--error ER_SP_LILABEL_MISMATCH CREATE PROCEDURE sp31316( ) BEGIN declare count1 integer default 1; @@ -436,8 +466,9 @@ BEGIN END// delimiter ;// -#Error: 1318 SQLSTATE: 42000 (ER_SP_WRONG_NO_OF_ARGS) Message: Incorrect number of arguments for %s %s; expected %u, got %u ---error 1318 +# Error: SQLSTATE: 42000 (ER_SP_WRONG_NO_OF_ARGS) +# Message: Incorrect number of arguments for %s %s; expected %u, got %u +--error ER_SP_WRONG_NO_OF_ARGS CALL sp31330(); CALL sp31330(1); @@ -459,6 +490,7 @@ drop table res_tbl; --source suite/funcs_1/storedproc/cleanup_sp_tb.inc # ============================================================================== -let $message= . +++ END OF SCRIPT +++; ---source include/show_msg80.inc +--echo +--echo . +++ END OF SCRIPT +++ +--echo -------------------------------------------------------------------------------- # ============================================================================== diff --git a/mysql-test/suite/funcs_1/storedproc/storedproc_06.inc b/mysql-test/suite/funcs_1/storedproc/storedproc_06.inc index e2b9e846b97..1a4dd9ff327 100644 --- a/mysql-test/suite/funcs_1/storedproc/storedproc_06.inc +++ b/mysql-test/suite/funcs_1/storedproc/storedproc_06.inc @@ -7,20 +7,29 @@ # # 3.1.6 Privilege checks: # -# 1. Ensure that no user may create a stored procedure without the GRANT CREATE ROUTINE privilege. +# 1. Ensure that no user may create a stored procedure without the +# GRANT CREATE ROUTINE privilege. # 2. Ensure that root always has the GRANT CREATE ROUTINE privilege. -# 3. Ensure that a user with the GRANT CREATE ROUTINE privilege can always create both a procedure and a function, on any appropriate database. -# 4. Ensure that the default security provision of a stored procedure is SQL SECURITY DEFINER. -# 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. -# 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. +# 3. Ensure that a user with the GRANT CREATE ROUTINE privilege can always +# create both a procedure and a function, on any appropriate database. +# 4. Ensure that the default security provision of a stored procedure is +# SQL SECURITY DEFINER. +# 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. +# 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. # # ============================================================================== let $message= Section 3.1.6 - Privilege Checks:; --source include/show_msg80.inc -USE db_storedproc_1; connection default; +USE db_storedproc_1; --source suite/funcs_1/include/show_connection.inc # ------------------------------------------------------------------------------ @@ -47,7 +56,7 @@ connect (user1a, localhost, user_1, , db_storedproc_1); USE db_storedproc_1; delimiter //; ---error 1044 +--error ER_DBACCESS_DENIED_ERROR CREATE PROCEDURE sp1(v1 char(20)) BEGIN SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz'; @@ -58,6 +67,7 @@ disconnect user1a; # add privilege again and check connection default; +USE db_storedproc_1; --source suite/funcs_1/include/show_connection.inc GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost'; @@ -77,6 +87,7 @@ disconnect user1b; # cleanup connection default; +USE db_storedproc_1; --source suite/funcs_1/include/show_connection.inc DROP USER 'user_1'@'localhost'; @@ -132,6 +143,7 @@ disconnect user2; # cleanup connection default; +USE db_storedproc_1; --source suite/funcs_1/include/show_connection.inc drop user 'user_1'@'localhost'; @@ -242,33 +254,33 @@ disconnect user5_1; connect (user5_2, localhost, user_2, , db_storedproc_1); --source suite/funcs_1/include/show_connection.inc ---error 1142 +--error ER_TABLEACCESS_DENIED_ERROR CALL sp5_s_i(); ---error 1142 +--error ER_TABLEACCESS_DENIED_ERROR CALL sp5_ins(); ---error 1142 +--error ER_TABLEACCESS_DENIED_ERROR CALL sp5_sel(); # now 'add' INSERT to DEFINER connection default; --source suite/funcs_1/include/show_connection.inc ---error 1142 +--error ER_TABLEACCESS_DENIED_ERROR CALL sp5_sel(); grant insert on db_storedproc_1.* to 'user_1'@'localhost'; flush privileges; connection user5_2; --source suite/funcs_1/include/show_connection.inc ---error 1142 +--error ER_TABLEACCESS_DENIED_ERROR CALL sp5_s_i(); CALL sp5_ins(); ---error 1142 +--error ER_TABLEACCESS_DENIED_ERROR CALL sp5_sel(); # now 'add' SELECT to DEFINER connection default; --source suite/funcs_1/include/show_connection.inc ---error 1142 +--error ER_TABLEACCESS_DENIED_ERROR CALL sp5_sel(); grant SELECT on db_storedproc_1.* to 'user_1'@'localhost'; #grant execute on db_storedproc_1.* to 'user_2'@'localhost'; @@ -288,9 +300,9 @@ flush privileges; connection user5_2; --source suite/funcs_1/include/show_connection.inc ---error 1142 +--error ER_TABLEACCESS_DENIED_ERROR CALL sp5_s_i(); ---error 1142 +--error ER_TABLEACCESS_DENIED_ERROR CALL sp5_ins(); CALL sp5_sel(); @@ -302,11 +314,11 @@ flush privileges; connection user5_2; --source suite/funcs_1/include/show_connection.inc ---error 1142 +--error ER_TABLEACCESS_DENIED_ERROR CALL sp5_s_i(); ---error 1142 +--error ER_TABLEACCESS_DENIED_ERROR CALL sp5_ins(); ---error 1142 +--error ER_TABLEACCESS_DENIED_ERROR CALL sp5_sel(); # cleanup @@ -373,9 +385,9 @@ disconnect user6_1; connect (user6_2, localhost, user_2, , db_storedproc_1); --source suite/funcs_1/include/show_connection.inc ---error 1142 +--error ER_TABLEACCESS_DENIED_ERROR CALL sp3166_s_i(); ---error 1142 +--error ER_TABLEACCESS_DENIED_ERROR CALL sp3166_ins(); CALL sp3166_sel(); @@ -405,10 +417,10 @@ FLUSH PRIVILEGES; --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK connect (user6_4, localhost, user_2, , db_storedproc_1); --source suite/funcs_1/include/show_connection.inc ---error 1142 +--error ER_TABLEACCESS_DENIED_ERROR CALL sp3166_s_i(); CALL sp3166_ins(); ---error 1142 +--error ER_TABLEACCESS_DENIED_ERROR CALL sp3166_sel(); disconnect user6_4; @@ -422,11 +434,11 @@ FLUSH PRIVILEGES; --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK connect (user6_5, localhost, user_2, , db_storedproc_1); --source suite/funcs_1/include/show_connection.inc ---error 1370 +--error ER_PROCACCESS_DENIED_ERROR CALL sp3166_s_i(); ---error 1370 +--error ER_PROCACCESS_DENIED_ERROR CALL sp3166_ins(); ---error 1370 +--error ER_PROCACCESS_DENIED_ERROR CALL sp3166_sel(); disconnect user6_5; @@ -447,6 +459,7 @@ DROP USER 'user_2'@'localhost'; --source suite/funcs_1/storedproc/cleanup_sp_tb.inc # ============================================================================== -let $message= . +++ END OF SCRIPT +++; ---source include/show_msg80.inc +--echo +--echo . +++ END OF SCRIPT +++ +--echo -------------------------------------------------------------------------------- # ============================================================================== diff --git a/mysql-test/suite/funcs_1/storedproc/storedproc_10.inc b/mysql-test/suite/funcs_1/storedproc/storedproc_10.inc index d7b0a370a82..8e32a43e18f 100644 --- a/mysql-test/suite/funcs_1/storedproc/storedproc_10.inc +++ b/mysql-test/suite/funcs_1/storedproc/storedproc_10.inc @@ -7,14 +7,21 @@ # # 3.1.10 CALL checks: # -## 1. Ensure that a properly defined procedure can always be called, assuming the appropriate privileges exist. -#- 2. Ensure that a procedure cannot be called if the appropriate privileges do not exist. +## 1. Ensure that a properly defined procedure can always be called, assuming +# the appropriate privileges exist. +#- 2. Ensure that a procedure cannot be called if the appropriate privileges +# do not exist. ## 3. Ensure that a function can never be called. -## 4. Ensure that a properly defined function can always be executed, assuming the appropriate privileges exist. -#- 5. Ensure that a function cannot be executed if the appropriate privileges do not exist. +## 4. Ensure that a properly defined function can always be executed, assuming +# the appropriate privileges exist. +#- 5. Ensure that a function cannot be executed if the appropriate privileges +# do not exist. ## 6. Ensure that a procedure can never be executed. -## 7. Ensure that the ROW_COUNT() SQL function always returns the correct number of rows affected by the execution of a stored procedure. -## 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. +## 7. Ensure that the ROW_COUNT() SQL function always returns the correct +# number of rows affected by the execution of a stored procedure. +## 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. # # ============================================================================== let $message= Section 3.1.10 - CALL checks:; @@ -54,7 +61,7 @@ connect (user2_1, localhost, user_1, , db_storedproc); delimiter //; CREATE PROCEDURE sp31102 () SQL SECURITY INVOKER BEGIN - SELECT * FROM db_storedproc.t1 LIMIT 1; + SELECT * FROM db_storedproc.t1 WHERE f4=-5000 LIMIT 1; END// delimiter ;// @@ -74,12 +81,14 @@ connect (user2_2, localhost, user_2, , db_storedproc); --source suite/funcs_1/include/show_connection.inc # no privileges exist ---error 1370 +--error ER_PROCACCESS_DENIED_ERROR CALL sp31102(); SELECT fn31105( 9 ); # now 'add' EXECUTE to INVOKER +--echo connection default; connection default; +USE db_storedproc; --source suite/funcs_1/include/show_connection.inc # root can execute ... CALL sp31102(); @@ -97,7 +106,9 @@ SELECT fn31105( 9 ); disconnect user2_3; # now 'remove' SELECT from INVOKER +--echo connection default; connection default; +USE db_storedproc; --source suite/funcs_1/include/show_connection.inc REVOKE EXECUTE ON db_storedproc.* FROM 'user_2'@'localhost'; FLUSH PRIVILEGES; @@ -115,6 +126,7 @@ disconnect user2_4; # cleanup connection default; +USE db_storedproc; --source suite/funcs_1/include/show_connection.inc DROP PROCEDURE sp31102; @@ -142,7 +154,7 @@ BEGIN END// delimiter ;// ---error 1305 +--error ER_SP_DOES_NOT_EXIST CALL fn1(); # cleanup @@ -168,7 +180,7 @@ BEGIN END// delimiter ;// ---error 1305 +--error ER_SP_DOES_NOT_EXIST SELECT sp1(); # cleanup @@ -182,26 +194,32 @@ let $message= Ensure that the ROW_COUNT() SQL function always returns the correct number of rows affected by the execution of a stored procedure.; --source include/show_msg80.inc +# Note(mleich): Information taken from a comments in +# Bug#21818 Return value of ROW_COUNT() is incorrect for +# ALTER TABLE, LOAD DATA +# ROW_COUNT() is -1 following any statement which is not DELETE, INSERT +# or UPDATE. +# Also, after a CALL statement, ROW_COUNT() will return the value of the +# last statement in the stored procedure. --disable_warnings 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; +DROP PROCEDURE IF EXISTS sp_del; +DROP PROCEDURE IF EXISTS sp_with_rowcount; --enable_warnings CREATE TABLE temp(f1 CHAR(20),f2 CHAR(25),f3 DATE,f4 INT,f5 CHAR(25),f6 INT); INSERT INTO temp SELECT * FROM t10; delimiter //; -#FIXME: add to proc: SELECT row_count() 'ins'; CREATE PROCEDURE sp_ins_1() BEGIN INSERT INTO temp VALUES ('abc', 'abc', '20051003', 100, 'uvw', 1000); END// - -#FIXME: add to proc: SELECT row_count() 'ins_3'; CREATE PROCEDURE sp_ins_3() BEGIN INSERT INTO temp VALUES ('abc', 'xyz', '19490523', 100, 'uvw', 1000); @@ -209,26 +227,11 @@ BEGIN INSERT INTO temp VALUES ('abc', 'xyz', '2005-10-24', 100, 'uvw', 1000); END// -# FIXME: add to proc: SELECT row_count() AS 'updated'; CREATE PROCEDURE sp_upd() BEGIN UPDATE temp SET temp.f1 = 'updated' WHERE temp.f1 ='abc'; END// -# FIXME: use commented proc -# 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 row_count() AS 'insert "qwe"'; -# SELECT COUNT( f1 ), f1 FROM temp GROUP BY f1; -# UPDATE temp SET temp.f1 = 'updated_2' WHERE temp.f1 ='qwe' AND temp.f2 = 'abc'; -# SELECT row_count() AS 'update "qwe" AND "abc"'; -# END// CREATE PROCEDURE sp_ins_upd() BEGIN BEGIN @@ -240,31 +243,70 @@ BEGIN 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// + +CREATE PROCEDURE sp_del() +BEGIN + DELETE FROM temp WHERE temp.f1 ='qwe' OR temp.f1 = 'updated_2'; +END// + +CREATE PROCEDURE sp_with_rowcount() +BEGIN + BEGIN + INSERT INTO temp VALUES ('qwe', 'abc', '1989-11-09', 100, 'uvw', 1000), + ('qwe', 'xyz', '1998-03-26', 100, 'uvw', 1000), + ('qwe', 'abc', '2000-11-09', 100, 'uvw', 1000), + ('qwe', 'xyz', '2005-11-07', 100, 'uvw', 1000); + END; + SELECT row_count() AS 'row_count() after insert'; + SELECT row_count() AS 'row_count() after select row_count()'; + SELECT f1,f2,f3 FROM temp ORDER BY f1,f2,f3; + UPDATE temp SET temp.f1 = 'updated_2' WHERE temp.f2 = 'abc'; + SELECT row_count() AS 'row_count() after update'; + SELECT f1,f2,f3 FROM temp ORDER BY f1,f2,f3; + DELETE FROM temp WHERE temp.f1 = 'updated_2'; + SELECT row_count() AS 'row_count() after delete'; +END// delimiter ;// CALL sp_ins_1(); SELECT row_count(); +--sorted_result SELECT * FROM temp; CALL sp_ins_3(); -#FIXME: check is 1 correct here? I expect 3 for 3 inserted rows inside the procedure SELECT row_count(); +--sorted_result SELECT * FROM temp; CALL sp_upd(); SELECT row_count(); +--sorted_result SELECT * FROM temp; -#FIXME: check is 3 correct here? I expect 7 for 4 inserted and then 3 updated rows inside the procedure CALL sp_ins_upd(); SELECT row_count(); +--sorted_result +SELECT * FROM temp; + +CALL sp_del(); +SELECT row_count(); +--sorted_result SELECT * FROM temp; +DELETE FROM temp; +CALL sp_with_rowcount(); +SELECT row_count(); +--sorted_result +SELECT * FROM temp; + + # cleanup DROP PROCEDURE sp_ins_1; DROP PROCEDURE sp_ins_3; DROP PROCEDURE sp_upd; DROP PROCEDURE sp_ins_upd; +DROP PROCEDURE sp_del; +DROP PROCEDURE sp_with_rowcount; DROP TABLE temp; @@ -272,7 +314,7 @@ DROP TABLE temp; let $message= Testcase 3.1.10.8:; --source include/show_msg.inc let $message= -Ensure that the mysql_affected_rows() C API function always returns the correct +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 include/show_msg80.inc @@ -283,6 +325,7 @@ number of rows affected by the execution of a stored procedure.; --source suite/funcs_1/storedproc/cleanup_sp_tb.inc # ============================================================================== -let $message= . +++ END OF SCRIPT +++; ---source include/show_msg80.inc +--echo +--echo . +++ END OF SCRIPT +++ +--echo -------------------------------------------------------------------------------- # ============================================================================== diff --git a/mysql-test/suite/funcs_1/t/innodb_trig_0407.test b/mysql-test/suite/funcs_1/t/innodb_trig_0407.test index d6b7d4a9942..1a0689847b1 100644 --- a/mysql-test/suite/funcs_1/t/innodb_trig_0407.test +++ b/mysql-test/suite/funcs_1/t/innodb_trig_0407.test @@ -10,7 +10,7 @@ let $engine_type= innodb; # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/innodb_tb3.inc - + --source suite/funcs_1/triggers/triggers_0407.inc DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/t/is_basics_mixed.test b/mysql-test/suite/funcs_1/t/is_basics_mixed.test index 8097c3ab3b1..30aeba12915 100644 --- a/mysql-test/suite/funcs_1/t/is_basics_mixed.test +++ b/mysql-test/suite/funcs_1/t/is_basics_mixed.test @@ -174,7 +174,7 @@ WHERE table_schema = 'db_datadict' ORDER BY table_name LIMIT 1; SELECT @table_name,@table_schema; # # SELECT INTO OUTFILE -let $OUTFILE = $MYSQL_TMP_DIR/datadict.out; +let $OUTFILE = $MYSQLTEST_VARDIR/tmp/datadict.out; --error 0,1 remove_file $OUTFILE; --replace_result $OUTFILE <OUTFILE> diff --git a/mysql-test/suite/funcs_1/t/memory_storedproc_02.test b/mysql-test/suite/funcs_1/t/memory_storedproc_02.test index f92657ee665..5b5e0b52932 100644 --- a/mysql-test/suite/funcs_1/t/memory_storedproc_02.test +++ b/mysql-test/suite/funcs_1/t/memory_storedproc_02.test @@ -1,6 +1,6 @@ #### suite/funcs_1/t/memory_storedproc_02.test # - + let $engine_type= memory; - + --source suite/funcs_1/storedproc/storedproc_02.inc diff --git a/mysql-test/suite/funcs_1/t/memory_storedproc_03.test b/mysql-test/suite/funcs_1/t/memory_storedproc_03.test index 8a839b255e1..61a601c8c66 100644 --- a/mysql-test/suite/funcs_1/t/memory_storedproc_03.test +++ b/mysql-test/suite/funcs_1/t/memory_storedproc_03.test @@ -1,6 +1,6 @@ #### suite/funcs_1/t/memory_storedproc_03.test # - + let $engine_type= memory; - + --source suite/funcs_1/storedproc/storedproc_03.inc diff --git a/mysql-test/suite/funcs_1/t/memory_storedproc_06.test b/mysql-test/suite/funcs_1/t/memory_storedproc_06.test index 059528590b9..ac4b1173553 100644 --- a/mysql-test/suite/funcs_1/t/memory_storedproc_06.test +++ b/mysql-test/suite/funcs_1/t/memory_storedproc_06.test @@ -1,6 +1,6 @@ #### suite/funcs_1/t/memory_storedproc_06.test # - + let $engine_type= memory; - + --source suite/funcs_1/storedproc/storedproc_06.inc diff --git a/mysql-test/suite/funcs_1/t/memory_storedproc_07.test b/mysql-test/suite/funcs_1/t/memory_storedproc_07.test index 1d7cee3dbd6..be74d5c9c38 100644 --- a/mysql-test/suite/funcs_1/t/memory_storedproc_07.test +++ b/mysql-test/suite/funcs_1/t/memory_storedproc_07.test @@ -1,6 +1,6 @@ #### suite/funcs_1/t/memory_storedproc_07.test # - + let $engine_type= memory; - + --source suite/funcs_1/storedproc/storedproc_07.inc diff --git a/mysql-test/suite/funcs_1/t/memory_storedproc_08.test b/mysql-test/suite/funcs_1/t/memory_storedproc_08.test index 304be8c477a..d898f288f29 100644 --- a/mysql-test/suite/funcs_1/t/memory_storedproc_08.test +++ b/mysql-test/suite/funcs_1/t/memory_storedproc_08.test @@ -1,6 +1,6 @@ #### suite/funcs_1/t/memory_storedproc_08.test # - + let $engine_type= memory; - + --source suite/funcs_1/storedproc/storedproc_08.inc diff --git a/mysql-test/suite/funcs_1/t/memory_storedproc_10.test b/mysql-test/suite/funcs_1/t/memory_storedproc_10.test index 13fbe99fabf..753e5d0bfc7 100644 --- a/mysql-test/suite/funcs_1/t/memory_storedproc_10.test +++ b/mysql-test/suite/funcs_1/t/memory_storedproc_10.test @@ -1,6 +1,6 @@ #### suite/funcs_1/t/memory_storedproc_10.test # - + let $engine_type= memory; - + --source suite/funcs_1/storedproc/storedproc_10.inc diff --git a/mysql-test/suite/funcs_1/t/myisam_storedproc_02.test b/mysql-test/suite/funcs_1/t/myisam_storedproc_02.test index 108b0fe5611..be3e0e9685f 100644 --- a/mysql-test/suite/funcs_1/t/myisam_storedproc_02.test +++ b/mysql-test/suite/funcs_1/t/myisam_storedproc_02.test @@ -1,6 +1,6 @@ #### suite/funcs_1/t/myisam_storedproc_02.test # - + let $engine_type= myisam; - + --source suite/funcs_1/storedproc/storedproc_02.inc diff --git a/mysql-test/suite/funcs_1/t/myisam_storedproc_03.test b/mysql-test/suite/funcs_1/t/myisam_storedproc_03.test index b181e3ce7ab..740db774552 100644 --- a/mysql-test/suite/funcs_1/t/myisam_storedproc_03.test +++ b/mysql-test/suite/funcs_1/t/myisam_storedproc_03.test @@ -1,6 +1,6 @@ #### suite/funcs_1/t/myisam_storedproc_03.test # - + let $engine_type= myisam; - + --source suite/funcs_1/storedproc/storedproc_03.inc diff --git a/mysql-test/suite/funcs_1/t/myisam_storedproc_06.test b/mysql-test/suite/funcs_1/t/myisam_storedproc_06.test index 81d3d24a01f..1038a40b57d 100644 --- a/mysql-test/suite/funcs_1/t/myisam_storedproc_06.test +++ b/mysql-test/suite/funcs_1/t/myisam_storedproc_06.test @@ -1,6 +1,6 @@ #### suite/funcs_1/t/myisam_storedproc_06.test # - + let $engine_type= myisam; - + --source suite/funcs_1/storedproc/storedproc_06.inc diff --git a/mysql-test/suite/funcs_1/t/myisam_storedproc_07.test b/mysql-test/suite/funcs_1/t/myisam_storedproc_07.test index a02f2f544ee..674c3ef3fb6 100644 --- a/mysql-test/suite/funcs_1/t/myisam_storedproc_07.test +++ b/mysql-test/suite/funcs_1/t/myisam_storedproc_07.test @@ -1,6 +1,6 @@ #### suite/funcs_1/t/myisam_storedproc_07.test # - + let $engine_type= myisam; - + --source suite/funcs_1/storedproc/storedproc_07.inc diff --git a/mysql-test/suite/funcs_1/t/myisam_storedproc_08.test b/mysql-test/suite/funcs_1/t/myisam_storedproc_08.test index 24e574fa9e2..a27d593bd92 100644 --- a/mysql-test/suite/funcs_1/t/myisam_storedproc_08.test +++ b/mysql-test/suite/funcs_1/t/myisam_storedproc_08.test @@ -1,6 +1,6 @@ #### suite/funcs_1/t/myisam_storedproc_08.test # - + let $engine_type= myisam; - + --source suite/funcs_1/storedproc/storedproc_08.inc diff --git a/mysql-test/suite/funcs_1/t/myisam_storedproc_10.test b/mysql-test/suite/funcs_1/t/myisam_storedproc_10.test index 6b4f6c21b62..bfa83c01a57 100644 --- a/mysql-test/suite/funcs_1/t/myisam_storedproc_10.test +++ b/mysql-test/suite/funcs_1/t/myisam_storedproc_10.test @@ -1,6 +1,6 @@ #### suite/funcs_1/t/myisam_storedproc_10.test # - + let $engine_type= myisam; - + --source suite/funcs_1/storedproc/storedproc_10.inc diff --git a/mysql-test/suite/funcs_1/triggers/trig_frkey2.inc b/mysql-test/suite/funcs_1/triggers/trig_frkey2.inc index 51cc2a81d18..c3de88a28f7 100644 --- a/mysql-test/suite/funcs_1/triggers/trig_frkey2.inc +++ b/mysql-test/suite/funcs_1/triggers/trig_frkey2.inc @@ -1,17 +1,17 @@ ################################################################# -# This file inclde tests that address the foreign key cases of -# the following requirements since they are specific to innodb. -# Other test cases for these requirements are included in the +# This file inclde tests that address the foreign key cases of +# the following requirements since they are specific to innodb. +# Other test cases for these requirements are included in the # triggers_master.test file. ################################################################# --disable_abort_on_error # OBN - The following tests are disabled until triggers are supported with forign -# keys in innodb (foreign keys tests dispabled - bug 11472) +# keys in innodb (foreign keys tests dispabled - bug 11472) ################################################################################# #Section x.x.x.3 -# Test case: Similar to 3.5.10.5 but with ten tables to see if multiple triggers +# Test case: Similar to 3.5.10.5 but with ten tables to see if multiple triggers # can be executed at once let $message= Testcase x.x.x.3:; --source include/show_msg.inc @@ -21,58 +21,58 @@ let $message= Testcase x.x.x.3:; --enable_warnings eval CREATE TABLE t0 (col1 char(50)) ENGINE=$engine_type; - eval CREATE TABLE t1 (id INT NOT NULL, col1 char(50), + eval CREATE TABLE t1 (id INT NOT NULL, col1 char(50), PRIMARY KEY (id)) ENGINE=$engine_type; - eval 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) + eval 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=$engine_type; - eval CREATE TABLE t3 (id INT PRIMARY KEY, f_id INT, INDEX par_ind - (f_id), col1 char(50), FOREIGN KEY (f_id) REFERENCES t1(id) + eval CREATE TABLE t3 (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 ON UPDATE CASCADE) ENGINE=$engine_type; - eval CREATE TABLE t4 (id INT PRIMARY KEY, f_id INT, INDEX par_ind - (f_id), col1 char(50), FOREIGN KEY (f_id) REFERENCES t1(id) + eval CREATE TABLE t4 (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 ON UPDATE CASCADE) ENGINE=$engine_type; - eval CREATE TABLE t5 (id INT PRIMARY KEY, f_id INT, INDEX par_ind - (f_id), col1 char(50), FOREIGN KEY (f_id) REFERENCES t1(id) + eval CREATE TABLE t5 (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 ON UPDATE CASCADE) ENGINE=$engine_type; - eval CREATE TABLE t6 (id INT PRIMARY KEY, f_id INT, INDEX par_ind - (f_id), col1 char(50), FOREIGN KEY (f_id) REFERENCES t1(id) + eval CREATE TABLE t6 (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 ON UPDATE CASCADE) ENGINE=$engine_type; - eval CREATE TABLE t7 (id INT PRIMARY KEY, f_id INT, INDEX par_ind - (f_id), col1 char(50), FOREIGN KEY (f_id) REFERENCES t1(id) + eval CREATE TABLE t7 (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 ON UPDATE CASCADE) ENGINE=$engine_type; - eval CREATE TABLE t8 (id INT PRIMARY KEY, f_id INT, INDEX par_ind - (f_id), col1 char(50), FOREIGN KEY (f_id) REFERENCES t1(id) + eval CREATE TABLE t8 (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 ON UPDATE CASCADE) ENGINE=$engine_type; - eval CREATE TABLE t9 (id INT PRIMARY KEY, f_id INT, INDEX par_ind - (f_id), col1 char(50), FOREIGN KEY (f_id) REFERENCES t1(id) + eval CREATE TABLE t9 (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 ON UPDATE CASCADE) ENGINE=$engine_type; - eval CREATE TABLE t10(id INT PRIMARY KEY, f_id INT, INDEX par_ind - (f_id), col1 char(50), FOREIGN KEY (f_id) REFERENCES t1(id) + eval CREATE TABLE t10(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 ON UPDATE CASCADE) ENGINE=$engine_type; - eval CREATE TABLE t11(id INT PRIMARY KEY, f_id INT, INDEX par_ind - (f_id), col1 char(50), FOREIGN KEY (f_id) REFERENCES t1(id) + eval CREATE TABLE t11(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 ON UPDATE CASCADE) ENGINE=$engine_type; - create trigger tr1 after update on t2 for each row + create trigger tr1 after update on t2 for each row insert into t0 values ('tr_t2'); - create trigger tr2 after update on t3 for each row + create trigger tr2 after update on t3 for each row insert into t0 values ('tr_t3'); - create trigger tr3 after update on t4 for each row + create trigger tr3 after update on t4 for each row insert into t0 values ('tr_t4'); - create trigger tr3 after update on t5 for each row + create trigger tr3 after update on t5 for each row insert into t0 values ('tr_t5'); - create trigger tr4 after update on t6 for each row + create trigger tr4 after update on t6 for each row insert into t0 values ('tr_t6'); - create trigger tr5 after update on t7 for each row + create trigger tr5 after update on t7 for each row insert into t0 values ('tr_t7'); - create trigger tr5 after update on t8 for each row + create trigger tr5 after update on t8 for each row insert into t0 values ('tr_t8'); - create trigger tr6 after update on t9 for each row + create trigger tr6 after update on t9 for each row insert into t0 values ('tr_t9'); - create trigger tr7 after update on t10 for each row + create trigger tr7 after update on t10 for each row insert into t0 values ('tr_t10'); - create trigger tr8 after update on t11 for each row + create trigger tr8 after update on t11 for each row insert into t0 values ('tr_t11'); insert into t1 values (1,'Department A'); @@ -134,10 +134,10 @@ let $message= Testcase x.x.x.3:; #Section 3.5.10.5 -# Test case: Ensure that every trigger that should be activated by every possible -# type of implicit update of its subject table (e.g. a FOREIGN KEY SET -# DEFAULT action or an UPDATE of a view based on the subject table) -# is indeed activated correctly. +# Test case: Ensure that every trigger that should be activated by every possible +# type of implicit update of its subject table (e.g. a FOREIGN KEY SET +# DEFAULT action or an UPDATE of a view based on the subject table) +# is indeed activated correctly. let $message= Testcase 3.5.10.5 (foreign keys):; --source include/show_msg.inc @@ -146,11 +146,11 @@ let $message= Testcase 3.5.10.5 (foreign keys):; DROP TABLE IF EXISTS t1, t2; --enable_warnings - eval CREATE TABLE t1 (id INT NOT NULL, col1 char(50), + eval CREATE TABLE t1 (id INT NOT NULL, col1 char(50), PRIMARY KEY (id)) ENGINE=$engine_type; - eval 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) + eval 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 ON UPDATE CASCADE) ENGINE=$engine_type; create trigger tr_t2 after update on t2 for each row set @counter=@counter+1; @@ -191,9 +191,9 @@ let $message= Testcase 3.5.10.5 (foreign keys):; #Section 3.5.10.6 -# Test case: Ensure that every trigger that should be activated by every possible -# type of implicit deletion from its subject table (e.g. a FOREIGN KEY -# CASCADE action or a DELETE from a view based on the subject table) +# Test case: Ensure that every trigger that should be activated by every possible +# type of implicit deletion from its subject table (e.g. a FOREIGN KEY +# CASCADE action or a DELETE from a view based on the subject table) # is indeed activated correctly. let $message= Testcase 3.5.10.6 (foreign keys):; --source include/show_msg.inc @@ -202,11 +202,11 @@ let $message= Testcase 3.5.10.6 (foreign keys):; DROP TABLE IF EXISTS t1, t2; --enable_warnings - eval CREATE TABLE t1 (id INT NOT NULL, col1 char(50), + eval CREATE TABLE t1 (id INT NOT NULL, col1 char(50), PRIMARY KEY (id)) ENGINE=$engine_type; - eval 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) + eval 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 CASCADE) ENGINE=$engine_type; create trigger tr_t2 before delete on t2 diff --git a/mysql-test/suite/funcs_1/triggers/triggers_0102.inc b/mysql-test/suite/funcs_1/triggers/triggers_0102.inc index b11455c07d3..cadfb9ec9be 100644 --- a/mysql-test/suite/funcs_1/triggers/triggers_0102.inc +++ b/mysql-test/suite/funcs_1/triggers/triggers_0102.inc @@ -1,7 +1,7 @@ #====================================================================== # -# Trigger Tests -# (test case numbering refer to requirement document TP v1.1) +# Trigger Tests +# (test case numbering refer to requirement document TP v1.1) #====================================================================== # OBM - ToDo @@ -20,37 +20,37 @@ # Testcase: Ensure that all clauses that should be supported are supported. let $message= Testcase: 3.5.1.1:; --source include/show_msg.inc -# OBN - This test case tests basic trigger definition and execution +# OBN - This test case tests basic trigger definition and execution # of INSERT/UPDATE/DELETE actions and BEFORE/AFTER timings. -# As such it covers the equirements in sections 3.5.6.1, 3.5.6.2, +# As such it covers the equirements in sections 3.5.6.1, 3.5.6.2, # 3.5.6.4, 3.5.6.5, 3.5.7.1, 3.5.7.2, 3.5.7.3, 3.5.7.17 below. -# - Note currently as a result of limitations with locking tables in +# - Note currently as a result of limitations with locking tables in # triggers, a specifc lockingof the tables is done. # Once fixed, the locking and alias referances should be removed use test; # Trigger Definition - Create trigger trg1_1 BEFORE INSERT + 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 + 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, + 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 + 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 + 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 + 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'; # Trigger Execution Insert (before and after) set @test_before = 1; set @test_after = 5; select @test_before, @test_after; - Insert into tb3 (f121, f122, f142, f144, f134) + 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'; select @test_before, @test_after; @@ -59,15 +59,15 @@ use test; set @test_before = 18; set @test_after = 8; select @test_before, @test_after; - Update tb3 set tb3.f122 = 'Update', - tb3.f142 = @test_before, - tb3.f144 = @test_after + 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'; select @test_before, @test_after; # Trigger Execution Delete (before and after) - Insert into tb3 (f121, f122, f142, f144, f134) + 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; @@ -79,35 +79,35 @@ use test; #Cleanup --disable_warnings - --error 0, 1360 + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trg1_1; - --error 0, 1360 + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trg1_2; - --error 0, 1360 + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trg1_3; - --error 0, 1360 + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trg1_4; - --error 0, 1360 + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trg1_5; - --error 0, 1360 + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trg1_6; --enable_warnings delete from tb3 where f121='Test 3.5.1.1'; --enable_warnings #Section 3.5.1.2 -# Testcase: Ensure that all clauses that should not be supported are disallowed -# with an appropriate error message. +# Testcase: Ensure that all clauses that should not be supported are disallowed +# with an appropriate error message. let $message= Testcase: 3.5.1.2:; --source include/show_msg.inc - --error 1064 - Create trigger trg_1 after insert + --error ER_PARSE_ERROR + Create trigger trg_1 after insert on tb3 for each statement set @x= 1; -#Cleanup - --disable_warnings - --error 0, 1360 +#Cleanup + --disable_warnings + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trg_1; --enable_warnings @@ -116,66 +116,66 @@ let $message= Testcase: 3.5.1.2:; # Testcase: Ensure that all supported clauses are supported only in the correct order. let $message= Testcase 3.5.1.3:; --source include/show_msg.inc - --error 1064 + --error ER_PARSE_ERROR CREATE TRIGGER trg3_1 on tb3 BEFORE INSERT for each row set new.f120 = 't'; - --error 1064 + --error ER_PARSE_ERROR CREATE trg3_2 TRIGGER AFTER INSERT on tb3 for each row set new.f120 = 's'; - --error 1064 + --error ER_PARSE_ERROR CREATE TRIGGER trg3_3 Before DELETE on tb3 set @ret1 = 'test' for each row; - --error 1064 + --error ER_PARSE_ERROR CREATE TRIGGER trg3_4 DELETE AFTER on tb3 set @ret1 = 'test' for each row; - --error 1064 - CREATE for each row TRIGGER trg3_5 AFTER UPDATE on tb3 set @ret1 = 'test'; + --error ER_PARSE_ERROR + CREATE for each row TRIGGER trg3_5 AFTER UPDATE on tb3 set @ret1 = 'test'; #Cleanup # OBN - Although none of the above should have been created we should do a cleanup # since if they have been created, not dropping them will affect following # tests. --disable_warnings - --error 0, 1360 + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trg3_1; - --error 0, 1360 + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trg3_2; - --error 0, 1360 + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trg3_3; - --error 0, 1360 + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trg3_4; - --error 0, 1360 + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trg3_5; --enable_warnings #Section 3.5.1.4 -# Testcase: Ensure that an appropriate error message is returned if a clause +# Testcase: Ensure that an appropriate error message is returned if a clause # is out-of-order in an SQL statement. # OBN - FIXME - Missing 3.5.1.4 need to add #Section 3.5.1.5 -# Testcase: Ensure that all clauses that are defined to be mandatory are indeed +# Testcase: Ensure that all clauses that are defined to be mandatory are indeed # required to be mandatory by the MySQL server and tools let $message= Testcase: 3.5.1.5:; --source include/show_msg.inc - --error 1064 + --error ER_PARSE_ERROR CREATE TRIGGER trg4_1 AFTER on tb3 for each row set new.f120 = 'e'; - --error 1064 + --error ER_PARSE_ERROR CREATE TRIGGER trg4_2 INSERT on tb3 for each set row new.f120 = 'f'; - --error 1064 + --error ER_PARSE_ERROR CREATE TRIGGER trg4_3 BEFORE INSERT tb3 for each row set new.f120 = 'g'; - --error 1064 + --error ER_PARSE_ERROR CREATE TRIGGER trg4_4 AFTER UPDATE on tb3 for each set new.f120 = 'g'; - --error 1064 + --error ER_PARSE_ERROR CREATE trg4_5 AFTER DELETE on tb3 for each set new.f120 = 'g'; - --error 1064 + --error ER_PARSE_ERROR CREATE TRIGGER trg4_6 BEFORE DELETE for each row set new.f120 = 'g'; #Cleanup @@ -183,19 +183,19 @@ let $message= Testcase: 3.5.1.5:; # since if they have been created, not dropping them will affect following # tests. --disable_warnings - --error 0, 1360 + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trg4_1; - --error 0, 1360 + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trg4_2; - --error 0, 1360 + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trg4_3; - --error 0, 1360 + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trg4_4; - --error 0, 1360 + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trg4_5; - --error 0, 1360 + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trg4_6; - --enable_warnings + --enable_warnings #Section 3.5.1.6 # Testcase: Ensure that any clauses that are defined to be optional are indeed @@ -204,15 +204,15 @@ let $message= Testcase 3.5.1.6: - Need to fix; --source include/show_msg.inc # OBN - FIXME - Missing 3.5.1.6 need to add -#Section 3.5.1.7 -# Testcase: Ensure that all valid, fully-qualified, and non-qualified, +#Section 3.5.1.7 +# Testcase: Ensure that all valid, fully-qualified, and non-qualified, # trigger names are accepted, at creation time. let $message= Testcase 3.5.1.7: - need to fix; --source include/show_msg.inc drop table if exists t1; eval create table t1 (f1 int, f2 char(25),f3 int) engine=$engine_type; - CREATE TRIGGER trg5_1 BEFORE INSERT on test.t1 + 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'; @@ -221,39 +221,39 @@ let $message= Testcase 3.5.1.7: - need to fix; select * from t1; update t1 set f2='update 3.5.1.7'; select * from t1; - select trigger_name from information_schema.triggers; + select trigger_name from information_schema.triggers order by trigger_name; #Cleanup - --disable_warnings - --error 0, 1360 + --disable_warnings + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trg5_1; # The above trigger should be dropped since the name was trimmed. drop trigger trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ; drop table t1; #Section 3.5.1.8 -# Testcase: Ensure that any invalid trigger name is never accepted, and that an +# Testcase: Ensure that any invalid trigger name is never accepted, and that an # appropriate error message is returned when the name is rejected. let $message= Testcase 3.5.1.8:; --source include/show_msg.inc - --error 1064 + --error ER_PARSE_ERROR CREATE TRIGGER trg12* before insert on tb3 for each row set new.f120 = 't'; - --error 1064 + --error ER_PARSE_ERROR CREATE TRIGGER trigger before insert on tb3 for each row set new.f120 = 't'; - --error 1064 + --error ER_PARSE_ERROR CREATE TRIGGER 100 before insert on tb3 for each row set new.f120 = 't'; - --error 1064 + --error ER_PARSE_ERROR CREATE TRIGGER @@view before insert on tb3 for each row set new.f120 = 't'; - --error 1064 + --error ER_PARSE_ERROR CREATE TRIGGER @name before insert on tb3 for each row set new.f120 = 't'; - --error 1435 - CREATE TRIGGER tb3.trg6_1 BEFORE INSERT on test.tb3 + --error ER_TRG_IN_WRONG_SCHEMA + CREATE TRIGGER tb3.trg6_1 BEFORE INSERT on test.tb3 for each row set new.f120 ='X'; --disable_warnings @@ -265,29 +265,29 @@ let $message= Testcase 3.5.1.8:; # Can't create a trigger in a different database use test; - --error 1146 - CREATE TRIGGER trig_db.trg6_2 AFTER INSERT on tb3 + --error ER_NO_SUCH_TABLE + CREATE TRIGGER trig_db.trg6_2 AFTER INSERT on tb3 for each row set @ret_trg6_2 = 5; # Can't create a trigger refrencing a table in a different db use trig_db; - --error 1435 - CREATE TRIGGER trg6_3 AFTER INSERT on test.tb3 + --error ER_TRG_IN_WRONG_SCHEMA + CREATE TRIGGER trg6_3 AFTER INSERT on test.tb3 for each row set @ret_trg6_3 = 18; use test; #Cleanup - --disable_warnings + --disable_warnings drop database trig_db; # OBN - Although none of the above should have been created we should do a cleanup # since if they have been created, not dropping them will affect following # tests. - --error 0, 1360 + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trg6_1; - --error 0, 1360 + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trg6_3; - --enable_warnings + --enable_warnings #Section 3.5.1.9 #Testcase: Ensure that a reference to a non-existent trigger is rejected with @@ -297,41 +297,41 @@ let $message= Testcase 3.5.1.9:(cannot be inplemented at this point); #Section 3.5.1.10 -#Testcase: Ensure that it is not possible to create two triggers with the same name on +#Testcase: Ensure that it is not possible to create two triggers with the same name on # the same table let $message= Testcase 3.5.1.10:; --source include/show_msg.inc CREATE TRIGGER trg7_1 BEFORE UPDATE on tb3 for each row set new.f120 ='X'; - --error 1359 + --error ER_TRG_ALREADY_EXISTS CREATE TRIGGER trg7_1 AFTER INSERT on tb3 for each row set @x ='Y'; #Cleanup - --disable_warnings - --error 0, 1360 + --disable_warnings + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trg7_1; --enable_warnings -#Section 3.5.1.? -# Testcase: Ensure that it is not possible to create two or more triggers with +#Section 3.5.1.? +# Testcase: Ensure that it is not possible to create two or more triggers with # the same name, provided each is associated with a different table. let $message= Testcase 3.5.1.?:; --source include/show_msg.inc - --disable_warnings + --disable_warnings drop table if exists t1; drop table if exists t2; --enable_warnings eval create table t1 (f1 char(50), f2 integer) engine = $engine_type; eval create table t2 (f1 char(50), f2 integer) engine = $engine_type; - create trigger trig before insert on t1 + create trigger trig before insert on t1 for each row set new.f1 ='trig t1'; - --error 1359 - create trigger trig before update on t2 + --error ER_TRG_ALREADY_EXISTS + create trigger trig before update on t2 for each row set new.f1 ='trig t2'; insert into t1 value ('insert to t1',1); @@ -343,16 +343,16 @@ let $message= Testcase 3.5.1.?:; select * from t2; #Cleanup - --disable_warnings + --disable_warnings drop table t1; drop table t2; - --error 0, 1360 + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trig; --enable_warnings -#Section 3.5.1.11 -# Testcase: Ensure that it is possible to create two or more triggers with +#Section 3.5.1.11 +# Testcase: Ensure that it is possible to create two or more triggers with # the same name, provided each resides in a different database let $message= Testcase 3.5.1.11:; --source include/show_msg.inc @@ -367,15 +367,15 @@ let $message= Testcase 3.5.1.11:; create database trig_db3; use trig_db1; eval create table t1 (f1 char(50), f2 integer) engine = $engine_type; - create trigger trig before insert on t1 + create trigger trig before insert on t1 for each row set new.f1 ='trig1', @test_var1='trig1'; use trig_db2; eval create table t2 (f1 char(50), f2 integer) engine = $engine_type; - create trigger trig before insert on t2 + create trigger trig before insert on t2 for each row set new.f1 ='trig2', @test_var2='trig2'; use trig_db3; eval create table t1 (f1 char(50), f2 integer) engine = $engine_type; - create trigger trig before insert on t1 + create trigger trig before insert on t1 for each row set new.f1 ='trig3', @test_var3='trig3'; set @test_var1= '', @test_var2= '', @test_var3= ''; @@ -385,14 +385,14 @@ let $message= Testcase 3.5.1.11:; 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; - select * from t1; + select * from t1 order by f2; select * from trig_db2.t2; select * from trig_db3.t1; - select * from t1; + select * from t1 order by f2; use test; #Cleanup - --disable_warnings + --disable_warnings drop database trig_db1; drop database trig_db2; drop database trig_db3; @@ -403,16 +403,16 @@ let $message= Testcase 3.5.1.11:; # Check for the global nature of Triggers # ########################################### -#Section 3.5.2.1 -# Test case: Ensure that if a trigger created without a qualifying database +#Section 3.5.2.1 +# Test case: Ensure that if a trigger created without a qualifying database # name belongs to the database in use at creation time. -#Section 3.5.2.2 -# Test case: Ensure that if a trigger created with a qualifying database name +#Section 3.5.2.2 +# Test case: Ensure that if a trigger created with a qualifying database name # belongs to the database specified. -#Section 3.5.2.3 -# Test case: Ensure that if a trigger created with a qualifying database name -# does not belong to the database in use at creation time unless -# the qualifying database name identifies the database that is +#Section 3.5.2.3 +# Test case: Ensure that if a trigger created with a qualifying database name +# does not belong to the database in use at creation time unless +# the qualifying database name identifies the database that is # also in use at creation time. let $message= Testcase 3.5.2.1/2/3:; --source include/show_msg.inc @@ -427,14 +427,14 @@ let $message= Testcase 3.5.2.1/2/3:; use trig_db1; eval create table t1 (f1 char(50), f2 integer) engine = $engine_type; eval create table trig_db2.t1 (f1 char(50), f2 integer) engine = $engine_type; - create trigger trig1_b before insert on t1 + 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 + 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 + 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; + from information_schema.triggers order by trigger_name; set @test_var1= '', @test_var2= '', @test_var3= ''; insert into t1 (f1,f2) values ('insert to db1 t1 from db1',352); @@ -442,6 +442,6 @@ let $message= Testcase 3.5.2.1/2/3:; select @test_var1, @test_var2, @test_var3; #Cleanup - --disable_warnings + --disable_warnings drop database trig_db1; drop database trig_db2; diff --git a/mysql-test/suite/funcs_1/triggers/triggers_03.inc b/mysql-test/suite/funcs_1/triggers/triggers_03.inc index 764fccec734..ac76dc83062 100644 --- a/mysql-test/suite/funcs_1/triggers/triggers_03.inc +++ b/mysql-test/suite/funcs_1/triggers/triggers_03.inc @@ -63,14 +63,14 @@ let $message= Testcase 3.5.3.2:; select current_user; use priv_db; - --error 1227 + --error ER_SPECIFIC_ACCESS_DENIED_ERROR create trigger trg1_1 before INSERT on t1 for each row set new.f1 = 'trig 3.5.3.2_1-no'; connection default; use priv_db; insert into t1 (f1) values ('insert 3.5.3.2-no'); - select f1 from t1; + select f1 from t1 order by f1; connection yes_privs; select current_user; @@ -83,29 +83,27 @@ let $message= Testcase 3.5.3.2:; select current_user; use priv_db; - # Added following the fix to bug 5861 - --error 1143 + --error ER_COLUMNACCESS_DENIED_ERROR insert into t1 (f1) values ('insert 3.5.3.2-yes'); - select f1 from t1; - grant UPDATE on priv_db.t1 to test_yesprivs@localhost; -let $message= note: once 15166 is fixed a similar case for SELECT needs to be added; ---source include/show_msg.inc + select f1 from t1 order by f1; + + 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; - insert into t1 (f1) values ('insert 3.5.3.2-yes'); - select f1 from t1; let $message= Testcase 3.5.3.6:; --source include/show_msg.inc connection no_privs; use priv_db; - --error 1227 + --error ER_SPECIFIC_ACCESS_DENIED_ERROR drop trigger trg1_2; connection default; use priv_db; insert into t1 (f1) values ('insert 3.5.3.6-yes'); - select f1 from t1; + select f1 from t1 order by f1; connection yes_privs; use priv_db; @@ -115,12 +113,12 @@ let $message= Testcase 3.5.3.6:; connection default; use priv_db; insert into t1 (f1) values ('insert 3.5.3.6-no'); - select f1 from t1; + select f1 from t1 order by f1; # Cleanup --disable_warnings connection default; - --error 0, 1360 + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trg1_2; disconnect no_privs; disconnect yes_privs; @@ -131,8 +129,6 @@ let $message= Testcase 3.5.3.6:; # Test case: Ensure that use of the construct "SET NEW. <column name> = <value>" # fails at CREATE TRIGGER time, if the current user does not have the # UPDATE privilege on the column specified -# Note: As a result of bug 8884 the triggers are actually created. -# Disabled because of bug 8884 # --- 3.5.3.7a - Privs set on a global level let $message=Testcase 3.5.3.7a:; @@ -156,18 +152,15 @@ let $message=Testcase 3.5.3.7a:; select current_user; use priv_db; show grants; - select f1 from t1; + select f1 from t1 order by f1; -let $message= Trigger create disabled - should fail - Bug 8884; ---source include/show_msg.inc -# --error 1227 -# create trigger trg4a_1 before INSERT on t1 for each row -# set new.f1 = 'trig 3.5.3.7-1a'; + create trigger trg4a_1 before INSERT on t1 for each row + set new.f1 = 'trig 3.5.3.7-1a'; connection default; + --error ER_COLUMNACCESS_DENIED_ERROR insert into t1 (f1) values ('insert 3.5.3.7-1a'); - select f1 from t1; - --error 0, 1360 + select f1 from t1 order by f1; drop trigger trg4a_1; connection yes_privs_424a; @@ -179,14 +172,8 @@ let $message= Trigger create disabled - should fail - Bug 8884; connection default; - - # Added to bypass bug 15166 -let $message= SELECT priv added to bypass bug 15166; ---source include/show_msg.inc - grant SELECT on *.* to test_yesprivs@localhost; - insert into t1 (f1) values ('insert 3.5.3.7-2b'); - select f1 from t1; + select f1 from t1 order by f1; # Cleanup --disable_warnings @@ -220,18 +207,14 @@ let $message= Testcase 3.5.3.7b:; show grants; use priv_db; -let $message= Trigger create disabled - should fail - Bug 8884; ---source include/show_msg.inc -# --error 1227 -# create trigger trg4b_1 before UPDATE on t1 for each row -# set new.f1 = 'trig 3.5.3.7-1b'; + create trigger trg4b_1 before UPDATE on t1 for each row + set new.f1 = 'trig 3.5.3.7-1b'; connection default; insert into t1 (f1) values ('insert 3.5.3.7-1b'); - select f1 from t1; + select f1 from t1 order by f1; update t1 set f1 = 'update 3.5.3.7-1b' where f1 = 'insert 3.5.3.7-1b'; - select f1 from t1; - --error 0, 1360 + select f1 from t1 order by f1; drop trigger trg4b_1; connection yes_privs_424b; @@ -242,15 +225,10 @@ let $message= Trigger create disabled - should fail - Bug 8884; connection default; - # Added to bypass bug 15166 -let $message= SELECT priv added to bypass bug 15166; ---source include/show_msg.inc - grant SELECT on priv_db.* to test_yesprivs@localhost; - insert into t1 (f1) values ('insert 3.5.3.7-2b'); - select f1 from t1; + select f1 from t1 order by f1; update t1 set f1 = 'update 3.5.3.7-2b' where f1 = 'insert 3.5.3.7-2b'; - select f1 from t1; + select f1 from t1 order by f1; # Cleanup --disable_warnings drop trigger trg4b_2; @@ -283,16 +261,12 @@ let $message= Testcase 3.5.3.7c; show grants; use priv_db; -let $message= Trigger create disabled - should fail - Bug 8884; ---source include/show_msg.inc -# --error 1227 -# create trigger trg4c_1 before INSERT on t1 for each row -# set new.f1 = 'trig 3.5.3.7-1c'; + create trigger trg4c_1 before INSERT on t1 for each row + set new.f1 = 'trig 3.5.3.7-1c'; connection default; insert into t1 (f1) values ('insert 3.5.3.7-1c'); - select f1 from t1; - --error 0, 1360 + select f1 from t1 order by f1; drop trigger trg4c_1; connection yes_privs_424c; @@ -303,13 +277,8 @@ let $message= Trigger create disabled - should fail - Bug 8884; connection default; - # Added to bypass bug 15166 -let $message= SELECT priv added to bypass bug 15166; ---source include/show_msg.inc - grant SELECT on priv_db.t1 to test_yesprivs@localhost; - insert into t1 (f1) values ('insert 3.5.3.7-2c'); - select f1 from t1; + select f1 from t1 order by f1; # Cleanup --disable_warnings @@ -344,16 +313,12 @@ let $message= Testcase 3.5.3.7d:; connection no_privs_424d; show grants; use priv_db; -let $message= Trigger create disabled - should fail - Bug 8884; ---source include/show_msg.inc -# --error 1227 -# create trigger trg4d_1 before INSERT on t1 for each row -# set new.f1 = 'trig 3.5.3.7-1d'; + create trigger trg4d_1 before INSERT on t1 for each row + set new.f1 = 'trig 3.5.3.7-1d'; connection default; insert into t1 (f1) values ('insert 3.5.3.7-1d'); - select f1 from t1; - --error 0, 1360 + select f1 from t1 order by f1; drop trigger trg4d_1; connection yes_privs_424d; @@ -364,13 +329,8 @@ let $message= Trigger create disabled - should fail - Bug 8884; connection default; - # Added to bypass bug 15166 -let $message= SELECT priv added to bypass bug 15166; ---source include/show_msg.inc - grant SELECT (f1) on priv_db.t1 to test_yesprivs@localhost; - insert into t1 (f1) values ('insert 3.5.3.7-2d'); - select f1 from t1; + select f1 from t1 order by f1; # Cleanup --disable_warnings @@ -408,18 +368,14 @@ let $message= Testcase 3.5.3.8a:; use priv_db; show grants; -let $message= Trigger create disabled - should fail - Bug 8887; ---source include/show_msg.inc -# --error 1227 -# create trigger trg5a_1 before INSERT on t1 for each row -# set @test_var = new.f1; + create trigger trg5a_1 before INSERT on t1 for each row + set @test_var = new.f1; connection default; set @test_var = 'before trig 3.5.3.8-1a'; select @test_var; insert into t1 (f1) values ('insert 3.5.3.8-1a'); select @test_var; - --error 0, 1360 drop trigger trg5a_1; connection yes_privs_425a; @@ -433,11 +389,6 @@ let $message= Trigger create disabled - should fail - Bug 8887; set @test_var= 'before trig 3.5.3.8-2a'; select @test_var; - # Added to bypass bug 15166 -let $message= UPDATE priv added to bypass bug 15166; ---source include/show_msg.inc - grant UPDATE on *.* to test_yesprivs@localhost; - insert into t1 (f1) values ('insert 3.5.3.8-2a'); select @test_var; @@ -473,11 +424,8 @@ let $message= Testcase: 3.5.3.8b; show grants; use priv_db; -let $message= Trigger create disabled - should fail - Bug 8887; ---source include/show_msg.inc -# --error 1227 -# create trigger trg5b_1 before UPDATE on t1 for each row -# set @test_var= new.f1; + create trigger trg5b_1 before UPDATE on t1 for each row + set @test_var= new.f1; connection default; set @test_var= 'before trig 3.5.3.8-1b'; @@ -485,7 +433,6 @@ let $message= Trigger create disabled - should fail - Bug 8887; select @test_var; update t1 set f1= 'update 3.5.3.8-1b' where f1 = 'insert 3.5.3.8-1b'; select @test_var; - --error 0, 1360 drop trigger trg5b_1; connection yes_privs_425b; @@ -499,11 +446,6 @@ let $message= Trigger create disabled - should fail - Bug 8887; insert into t1 (f1) values ('insert 3.5.3.8-2b'); select @test_var; - # Added to bypass bug 15166 -let $message= UPDATE priv added to bypass bug 15166; ---source include/show_msg.inc - grant UPDATE on priv_db.* to test_yesprivs@localhost; - update t1 set f1= 'update 3.5.3.8-2b' where f1 = 'insert 3.5.3.8-2b'; select @test_var; # Cleanup @@ -538,17 +480,13 @@ let $message= Testcase 3.5.3.8c:; show grants; use priv_db; -let $message= Trigger create disabled - should fail - Bug 8887; ---source include/show_msg.inc -# --error 1227 -# create trigger trg5c_1 before INSERT on t1 for each row -# set @test_var= new.f1; + create trigger trg5c_1 before INSERT on t1 for each row + set @test_var= new.f1; connection default; set @test_var= 'before trig 3.5.3.8-1c'; insert into t1 (f1) values ('insert 3.5.3.8-1c'); select @test_var; - --error 0, 1360 drop trigger trg5c_1; connection yes_privs_425c; @@ -560,11 +498,6 @@ let $message= Trigger create disabled - should fail - Bug 8887; connection default; set @test_var='before trig 3.5.3.8-2c'; - # Added to bypass bug 15166 -let $message= UPDATE priv added to bypass bug 15166; ---source include/show_msg.inc - grant UPDATE on priv_db.t1 to test_yesprivs@localhost; - insert into t1 (f1) values ('insert 3.5.3.8-2c'); select @test_var; # Cleanup @@ -598,17 +531,13 @@ let $message=Testcase: 3.5.3.8d:; connection no_privs_425d; show grants; use priv_db; -let $message= Trigger create disabled - should fail - Bug 8887; ---source include/show_msg.inc -# --error 1227 -# create trigger trg5d_1 before INSERT on t1 for each row -# set @test_var= new.f1; + create trigger trg5d_1 before INSERT on t1 for each row + set @test_var= new.f1; connection default; set @test_var='before trig 3.5.3.8-1d'; insert into t1 (f1) values ('insert 3.5.3.8-1d'); select @test_var; - --error 0, 1360 drop trigger trg5d_1; connection yes_privs_425d; @@ -620,11 +549,6 @@ let $message= Trigger create disabled - should fail - Bug 8887; connection default; set @test_var='before trig 3.5.3.8-2d'; - # Added to bypass bug 15166 -let $message= UPDATE priv added to bypass bug 15166; ---source include/show_msg.inc - grant UPDATE (f1) on priv_db.t1 to test_yesprivs@localhost; - insert into t1 (f1) values ('insert 3.5.3.8-2d'); select @test_var; @@ -633,8 +557,7 @@ let $message= UPDATE priv added to bypass bug 15166; drop trigger trg5d_2; --enable_warnings -# --- 3.5.3.x - additional tests following the fix to bug 5861 / WL 2818 -# to test for trigger definer privs in the case of trigger +# --- 3.5.3.x to test for trigger definer privs in the case of trigger # actions (insert/update/delete/select) performed on other # tables. let $message=Testcase: 3.5.3.x:; @@ -671,8 +594,8 @@ let $message=Testcase: 3.5.3.x:; 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; - select f2 from t2; + select f1 from t1 order by f1; + select f2 from t2 order by f2; connection yes_353x; use priv_db; @@ -687,8 +610,8 @@ let $message=Testcase: 3.5.3.x:; 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; - select f2 from t2; + select f1 from t1 order by f1; + select f2 from t2 order by f2; connection yes_353x; use priv_db; @@ -703,8 +626,8 @@ let $message=Testcase: 3.5.3.x:; 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; - select f2 from t2; + select f1 from t1 order by f1; + select f2 from t2 order by f2; select @aaa; connection yes_353x; @@ -720,8 +643,8 @@ let $message=Testcase: 3.5.3.x:; 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; - select f2 from t2; + select f1 from t1 order by f1; + select f2 from t2 order by f2; diff --git a/mysql-test/suite/funcs_1/triggers/triggers_0407.inc b/mysql-test/suite/funcs_1/triggers/triggers_0407.inc index 15c94ada975..a05bdb45bac 100644 --- a/mysql-test/suite/funcs_1/triggers/triggers_0407.inc +++ b/mysql-test/suite/funcs_1/triggers/triggers_0407.inc @@ -1,7 +1,7 @@ #====================================================================== # -# Trigger Tests -# (test case numbering refer to requirement document TP v1.1) +# Trigger Tests +# (test case numbering refer to requirement document TP v1.1) #====================================================================== --disable_abort_on_error @@ -46,32 +46,32 @@ let $message= Testcase 3.5.4.1:; eval create table t1 (f1 char(30)) engine=$engine_type; grant INSERT, SELECT on db_drop.t1 to test_general; Use db_drop; - Create trigger trg1 BEFORE INSERT on t1 + Create trigger trg1 BEFORE INSERT on t1 for each row set new.f1='Trigger 3.5.4.1'; connection con1_general; Use db_drop; Insert into t1 values ('Insert error 3.5.4.1'); - Select * from t1; + Select * from t1 order by f1; connection con1_super; drop trigger trg1; select trigger_schema, trigger_name, event_object_table - from information_schema.triggers; + from information_schema.triggers order by trigger_name; connection con1_general; Insert into t1 values ('Insert no trigger 3.5.4.1'); - Select * from t1; + Select * from t1 order by f1; #Cleanup - --disable_warnings + --disable_warnings connection con1_super; --disable_warnings - --error 0,1360 - drop trigger trg1; + --error 0,ER_TRG_DOES_NOT_EXIST + drop trigger trg1; drop database if exists db_drop; revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost'; --enable_warnings #Section 3.5.4.2 -# Test case: Ensure that DROP TRIGGER <trigger name> fails, with an appropriate error +# Test case: Ensure that DROP TRIGGER <trigger name> fails, with an appropriate error # message, if the trigger name does not exist. let $message= Testcase 3.5.4.2:; --source include/show_msg.inc @@ -83,16 +83,16 @@ let $message= Testcase 3.5.4.2:; drop table if exists t1_432 ; --enable_warnings eval create table t1_432 (f1 char (30)) engine=$engine_type; - --error 1360 + --error ER_TRG_DOES_NOT_EXIST Drop trigger tr_does_not_exit; -#cleanup +#cleanup --disable_warnings drop table if exists t1_432 ; drop database if exists db_drop2; --enable_warnings #Section 3.5.4.3 -# Test case: Ensure that DROP TRIGGER <trigger name> fails, with an appropriate +# Test case: Ensure that DROP TRIGGER <trigger name> fails, with an appropriate # error message, if <trigger name> is not a qualified name. let $message= Testcase 3.5.4.3:; --source include/show_msg.inc @@ -107,33 +107,33 @@ let $message= Testcase 3.5.4.3:; eval create table t1_433 (f1 char (30)) engine=$engine_type; eval create table t1_433a (f1a char (5)) engine=$engine_type; - CREATE TRIGGER trg3 BEFORE INSERT on t1_433 for each row + CREATE TRIGGER trg3 BEFORE INSERT on t1_433 for each row set new.f1 = 'Trigger 3.5.4.3'; -# Using table - --error 1064 +# Using table + --error ER_PARSE_ERROR Drop trigger t1.433.trg3; -# Using database.table - --error 1064 +# Using database.table + --error ER_PARSE_ERROR Drop trigger db_drop3.t1.433.trg3; # wrong database - --error 1360 + --error ER_TRG_DOES_NOT_EXIST Drop trigger mysql.trg3; # database does not exist - --error 1360 + --error ER_TRG_DOES_NOT_EXIST Drop trigger tbx.trg3; -#cleanup +#cleanup Drop trigger db_drop3.trg3; drop table if exists t1_433; drop table if exists t1_433a; drop database if exists db_drop3; #Section 3.5.4.4 -# Test case: Ensure that when a database is dropped, all triggers created within +# Test case: Ensure that when a database is dropped, all triggers created within # that database are also cleanly dropped. let $message= Testcase 3.5.4.4:; --source include/show_msg.inc @@ -143,7 +143,7 @@ let $message= Testcase 3.5.4.4:; Use db_drop4; eval create table t1 (f1 char(30)) engine=$engine_type; grant INSERT, SELECT on db_drop4.t1 to test_general; - Create trigger trg4 BEFORE INSERT on t1 + Create trigger trg4 BEFORE INSERT on t1 for each row set new.f1='Trigger 3.5.4.4'; connection con1_general; Use db_drop4; @@ -166,14 +166,14 @@ let $message= Testcase 3.5.4.4:; #Cleanup connection con1_super; --disable_warnings - --error 1360 - drop trigger trg4; + --error ER_TRG_DOES_NOT_EXIST + drop trigger trg4; drop database if exists db_drop4; --enable_warnings revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost'; #Section 3.5.4.5 -# Test case: Ensure that when a table is dropped, all triggers for which it is the +# Test case: Ensure that when a table is dropped, all triggers for which it is the # subject table are also cleanly dropped. let $message= Testcase 3.5.4.5:; --source include/show_msg.inc @@ -183,7 +183,7 @@ let $message= Testcase 3.5.4.5:; Use db_drop5; eval create table t1 (f1 char(50)) engine=$engine_type; grant INSERT, SELECT on t1 to test_general; - Create trigger trg5 BEFORE INSERT on t1 + Create trigger trg5 BEFORE INSERT on t1 for each row set new.f1='Trigger 3.5.4.5'; connection con1_general; Use db_drop5; @@ -204,8 +204,8 @@ let $message= Testcase 3.5.4.5:; #Cleanup connection con1_super; --disable_warnings - --error 1360 - drop trigger trg5; + --error ER_TRG_DOES_NOT_EXIST + drop trigger trg5; drop database if exists db_drop5; --enable_warnings revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost'; @@ -223,55 +223,55 @@ let $message= Testcase 3.5.5:; use test; #Section 3.5.5.1 -# Test case: Ensure that, if CREATE TRIGGER is executed with a non-existent +# Test case: Ensure that, if CREATE TRIGGER is executed with a non-existent # subject table, the statement fails with an appropriate error message. let $message= Testcase 3.5.5.1:; --source include/show_msg.inc - --error 1146 + --error ER_NO_SUCH_TABLE Create trigger trg1 before INSERT on t100 for each row set new.f2=1000; #Section 3.5.5.2 -# Test case: Ensure that, if CREATE TRIGGER is executed with a temporary table +# Test case: Ensure that, if CREATE TRIGGER is executed with a temporary table # as the subject table, the statement fails with an appropriate error message. let $message= Testcase 3.5.5.2:; --source include/show_msg.inc Create temporary table t1_temp (f1 bigint signed, f2 bigint unsigned); - --error 1361 - Create trigger trg2 before INSERT + --error ER_TRG_ON_VIEW_OR_TEMP_TABLE + Create trigger trg2 before INSERT on t1_temp for each row set new.f2=9999; #Cleanup - --disable_warnings + --disable_warnings drop table t1_temp; --enable_warnings #Section 3.5.5.3 -# Test case: Ensure that, if CREATE TRIGGER is executed with a view as the subject +# Test case: Ensure that, if CREATE TRIGGER is executed with a view as the subject # table, the statement fails with an appropriate error message. let $message= Testcase 3.5.5.3:; --source include/show_msg.inc Create view vw3 as select f118 from tb3; -# OBN Not sure why the server is returning error 1347 - --error 1347 - Create trigger trg3 before INSERT +# OBN Not sure why the server is returning error ER_WRONG_OBJECT + --error ER_WRONG_OBJECT + Create trigger trg3 before INSERT on vw3 for each row set new.f118='s'; #Cleanup - --disable_warnings + --disable_warnings drop view vw3; --enable_warnings #Section 3.5.5.4 -# Test case: Ensure that, if CREATE TRIGGER is executed with a table that resides -# in a different database than in which the trigger will reside, the +# Test case: Ensure that, if CREATE TRIGGER is executed with a table that resides +# in a different database than in which the trigger will reside, the # statement fails with an appropriate error message; that is, ensure that # the trigger and its subject table must reside in the same database. let $message= Testcase 3.5.5.4:; @@ -283,7 +283,7 @@ let $message= Testcase 3.5.5.4:; use dbtest_two; eval create table t2 (f1 char(15)) engine=$engine_type; use dbtest_one; - --error 1435 + --error ER_TRG_IN_WRONG_SCHEMA create trigger trg4 before INSERT on dbtest_two.t2 for each row set new.f1='trig 3.5.5.4'; grant INSERT, SELECT on dbtest_two.t2 to test_general; @@ -294,11 +294,11 @@ let $message= Testcase 3.5.5.4:; Select * from t2; use dbtest_one; Insert into dbtest_two.t2 values ('2nd Insert 3.5.5.4'); - Select * from dbtest_two.t2; + Select * from dbtest_two.t2 order by f1; #Cleanup connection con1_super; - --disable_warnings + --disable_warnings revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost'; DROP DATABASE if exists dbtest_one; drop database if EXISTS dbtest_two; @@ -316,7 +316,7 @@ let $message= Testcase 3.5.6:; use test; #Section 3.5.6.1 -# Test case: Ensure that a trigger definition can specify a trigger action time of BEFORE. +# Test case: Ensure that a trigger definition can specify a trigger action time of BEFORE. # See section 3.5.1.1 let $message= Testcase 3.5.6.1 (see Testcase 3.5.1.1); --source include/show_msg.inc @@ -328,37 +328,37 @@ let $message= Testcase 3.5.6.2 (see Testcase 3.5.1.1); --source include/show_msg.inc #Section 3.5.6.3 -# Test case: Ensure that a trigger definition that specifies a trigger action -# time that is not either BEFORE or AFTER fails, with an appropriate +# Test case: Ensure that a trigger definition that specifies a trigger action +# time that is not either BEFORE or AFTER fails, with an appropriate # error message, at CREATE TRIGGER time. let $message= Testcase 3.5.6.3:; --source include/show_msg.inc - --error 1064 + --error ER_PARSE_ERROR Create trigger trg3_1 DURING UPDATE on tb3 for each row set new.f132=25; - --error 1064 + --error ER_PARSE_ERROR Create trigger trg3_2 TIME INSERT on tb3 for each row set new.f132=15; -#Cleanup +#Cleanup # OBN - Although none of the above should have been created we should do a cleanup # since if they have been created, not dropping them will affect following # tests. --disable_warnings - --error 0, 1360 + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger tb3.trg3_1; - --error 0, 1360 + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger tb3.trg3_2; --enable_warnings #Section 3.5.6.4 -# Test case: Ensure that a trigger defined with a trigger action time of BEFORE -# always executes its triggered action immediately before the trigger event. +# Test case: Ensure that a trigger defined with a trigger action time of BEFORE +# always executes its triggered action immediately before the trigger event. # See section 3.5.1.1 let $message= Testcase 3.5.6.4 (see Testcase 3.5.1.1); --source include/show_msg.inc #Section 3.5.6.5 -# Test case: Ensure that a trigger defined with a trigger action time of AFTER +# Test case: Ensure that a trigger defined with a trigger action time of AFTER # always executes its triggered action immediately after the trigger event. let $message= Testcase 3.5.6.5 (see Testcase 3.5.1.1); --source include/show_msg.inc @@ -384,40 +384,40 @@ let $message= Testcase 3.5.7.3 (see Testcase 3.5.1.1); --source include/show_msg.inc #Section 3.5.7.4 -# Test case: Ensure that a trigger definition that specifies a trigger event that -# is not either INSERT, UPDATE or DELETE fails, with an appropriate error +# Test case: Ensure that a trigger definition that specifies a trigger event that +# is not either INSERT, UPDATE or DELETE fails, with an appropriate error # message, at CREATE TRIGGER time. let $message= Testcase 3.5.7.4:; --source include/show_msg.inc - --error 1064 + --error ER_PARSE_ERROR Create trigger trg4_1 BEFORE SELECT on tb3 for each row set new.f132=5; - --error 1064 + --error ER_PARSE_ERROR Create trigger trg4_2 AFTER VALUE on tb3 for each row set new.f132=1; -#Cleanup +#Cleanup # OBN - Although none of the above should have been created we should do a cleanup # since if they have been created, not dropping them will affect following # tests. --disable_warnings - --error 0, 1360 + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger tb3.trg4_1; - --error 0, 1360 + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger tb3.trg4_2; --enable_warnings -#Section 3.5.7.5 / 3.5.7.6 -# Test case: Ensure that it is not possible to create multiple BEFORE INSERT triggers +#Section 3.5.7.5 / 3.5.7.6 +# Test case: Ensure that it is not possible to create multiple BEFORE INSERT triggers # on the same table, even if the triggers have different names / different # triggered actions. let $message= Testcase 3.5.7.5 / 3.5.7.6:; --source include/show_msg.inc - Create trigger trg5_1 BEFORE INSERT + Create trigger trg5_1 BEFORE INSERT on tb3 for each row set new.f122='Trigger1 3.5.7.5/6'; - --error ER_NOT_SUPPORTED_YET - Create trigger trg5_2 BEFORE INSERT + --error ER_NOT_SUPPORTED_YET + Create trigger trg5_2 BEFORE INSERT on tb3 for each row set new.f122='Trigger2 3.5.7.5'; Insert into tb3 (f121,f122) values ('Test 3.5.7.5/6','Insert 3.5.7.5'); @@ -426,27 +426,27 @@ let $message= Testcase 3.5.7.5 / 3.5.7.6:; Select f121,f122 from tb3 where f121='Test 3.5.7.5/6'; #Cleanup - --disable_warnings + --disable_warnings drop trigger trg5_1; - --error 0, 1360 + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trg5_2; delete from tb3 where f121='Test 3.5.7.5/6'; --enable_warnings -#Section 3.5.7.7 / 3.5.7.8 -# Test case: Ensure that it is not possible to create multiple AFTER INSERT triggers +#Section 3.5.7.7 / 3.5.7.8 +# Test case: Ensure that it is not possible to create multiple AFTER INSERT triggers # on the same table, even if the triggers have different names / different # triggered actions. let $message= Testcase 3.5.7.7 / 3.5.7.8:; --source include/show_msg.inc set @test_var='Before trig 3.5.7.7'; - Create trigger trg6_1 AFTER INSERT + Create trigger trg6_1 AFTER INSERT on tb3 for each row set @test_var='Trigger1 3.5.7.7/8'; - --error ER_NOT_SUPPORTED_YET - Create trigger trg6_2 AFTER INSERT + --error ER_NOT_SUPPORTED_YET + Create trigger trg6_2 AFTER INSERT on tb3 for each row set @test_var='Trigger2 3.5.7.7'; select @test_var; @@ -458,26 +458,26 @@ let $message= Testcase 3.5.7.7 / 3.5.7.8:; select @test_var; #Cleanup - --disable_warnings + --disable_warnings drop trigger trg6_1; - --error 0, 1360 + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trg6_2; delete from tb3 where f121='Test 3.5.7.7/8'; --enable_warnings #Section 3.5.7.9 / 3.5.7.10 -# Test case: Ensure that it is not possible to create multiple BEFORE UPDATE triggers -# on the same table, even if the triggers have different names / different +# Test case: Ensure that it is not possible to create multiple BEFORE UPDATE triggers +# on the same table, even if the triggers have different names / different # triggered actions. let $message= Testcase 3.5.7.9/10:; --source include/show_msg.inc - Create trigger trg7_1 BEFORE UPDATE + Create trigger trg7_1 BEFORE UPDATE on tb3 for each row set new.f122='Trigger1 3.5.7.9/10'; - --error ER_NOT_SUPPORTED_YET - Create trigger trg7_2 BEFORE UPDATE + --error ER_NOT_SUPPORTED_YET + Create trigger trg7_2 BEFORE UPDATE on tb3 for each row set new.f122='Trigger2 3.5.7.9'; Insert into tb3 (f121,f122) values ('Test 3.5.7.9/10','Insert 3.5.7.9'); @@ -486,25 +486,25 @@ let $message= Testcase 3.5.7.9/10:; Select f121,f122 from tb3 where f121='Test 3.5.7.9/10'; #Cleanup - --disable_warnings + --disable_warnings drop trigger trg7_1; - --error 0, 1360 + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trg7_2; delete from tb3 where f121='Test 3.5.7.9/10'; #Section 3.5.7.11 / 3.5.7.12 -# Test case: Ensure that it is not possible to create multiple AFTER UPDATE triggers +# Test case: Ensure that it is not possible to create multiple AFTER UPDATE triggers # on the same table, even if the triggers have different names / different -# triggered actions. +# triggered actions. let $message= Testcase 3.5.7.11/12:; --source include/show_msg.inc set @test_var='Before trig 3.5.7.11'; - Create trigger trg8_1 AFTER UPDATE + Create trigger trg8_1 AFTER UPDATE on tb3 for each row set @test_var='Trigger 3.5.7.11/12'; - --error ER_NOT_SUPPORTED_YET - Create trigger trg8_2 AFTER UPDATE + --error ER_NOT_SUPPORTED_YET + Create trigger trg8_2 AFTER UPDATE on tb3 for each row set @test_var='Trigger2 3.5.7.11'; @@ -518,25 +518,25 @@ let $message= Testcase 3.5.7.11/12:; delete from tb3 where f121='Test 3.5.7.11/12'; #Cleanup - --disable_warnings + --disable_warnings drop trigger trg8_1; - --error 0, 1360 + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trg8_2; delete from tb3 where f121='Test 3.5.7.11/12'; #Section 3.5.7.13 / 3.5.7.14 -# Test case: Ensure that it is not possible to create multiple BEFORE DELETE triggers +# Test case: Ensure that it is not possible to create multiple BEFORE DELETE triggers # on the same table, even if the triggers have different names / different # triggered actions. let $message= Testcase 3.5.7.13/14:; --source include/show_msg.inc set @test_var=1; - Create trigger trg9_1 BEFORE DELETE + Create trigger trg9_1 BEFORE DELETE on tb3 for each row set @test_var=@test_var+1; - --error ER_NOT_SUPPORTED_YET - Create trigger trg9_2 BEFORE DELETE + --error ER_NOT_SUPPORTED_YET + Create trigger trg9_2 BEFORE DELETE on tb3 for each row set @test_var=@test_var+10; select @test_var; @@ -550,29 +550,29 @@ let $message= Testcase 3.5.7.13/14:; select @test_var; #Cleanup - --disable_warnings + --disable_warnings drop trigger trg9_1; - --error 0, 1360 + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trg9_2; delete from tb3 where f121='Test 3.5.7.13/14'; #Section 3.5.7.15 / 3.5.7.16 -# Test case: Ensure that it is not possible to create multiple AFTER DELETE triggers -# on the same table, even if the triggers have different names / different +# Test case: Ensure that it is not possible to create multiple AFTER DELETE triggers +# on the same table, even if the triggers have different names / different # triggered actions. let $message= Testcase 3.5.7.15/16:; --source include/show_msg.inc set @test_var=1; - Create trigger trg_3_406010_1 AFTER DELETE + Create trigger trg_3_406010_1 AFTER DELETE on tb3 for each row set @test_var=@test_var+5; - --error ER_NOT_SUPPORTED_YET - Create trigger trg_3_406010_2 AFTER DELETE + --error ER_NOT_SUPPORTED_YET + Create trigger trg_3_406010_2 AFTER DELETE on tb3 for each row set @test_var=@test_var+50; - --error 1359 - Create trigger trg_3_406010_1 AFTER INSERT + --error ER_TRG_ALREADY_EXISTS + Create trigger trg_3_406010_1 AFTER INSERT on tb3 for each row set @test_var=@test_var+1; select @test_var; @@ -586,18 +586,18 @@ let $message= Testcase 3.5.7.15/16:; select @test_var; #Cleanup - --disable_warnings + --disable_warnings drop trigger trg_3_406010_1; - --error 0, 1360 + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trg_3_406010_2; delete from tb3 where f121='Test 3.5.7.15/16'; --enable_warnings #Section 3.5.7.17 -# Test case: Ensure that it is possible to have a BEFORE INSERT, an AFTER INSERT, -# a BEFORE UPDATE, an AFTER UPDATE, a BEFORE DELETE, and an AFTER DELETE -# trigger on the same table; that is, ensure that every persistent base +# Test case: Ensure that it is possible to have a BEFORE INSERT, an AFTER INSERT, +# a BEFORE UPDATE, an AFTER UPDATE, a BEFORE DELETE, and an AFTER DELETE +# trigger on the same table; that is, ensure that every persistent base # table may be the subject table for exactly six triggers let $message= Testcase 3.5.7.17 (see Testcase 3.5.1.1); --source include/show_msg.inc diff --git a/mysql-test/suite/funcs_1/triggers/triggers_08.inc b/mysql-test/suite/funcs_1/triggers/triggers_08.inc index 300080e455d..48db2cbf566 100644 --- a/mysql-test/suite/funcs_1/triggers/triggers_08.inc +++ b/mysql-test/suite/funcs_1/triggers/triggers_08.inc @@ -1,7 +1,7 @@ #====================================================================== # -# Trigger Tests -# (test case numbering refer to requirement document TP v1.1) +# Trigger Tests +# (test case numbering refer to requirement document TP v1.1) #====================================================================== # General setup for Trigger tests @@ -29,22 +29,20 @@ let $message= Testcase: 3.5:; ################################# #Section 3.5.8.1 -# Testcase: Ensure that the triggered action of every trigger always executes +# Testcase: Ensure that the triggered action of every trigger always executes # correctly and the results in all expected changes made to the database let $message= Testcase 3.5.8.1: (implied in previous tests); --source include/show_msg.inc -# OBN - FIXME - Missing 3.5.8.1 need to add - #Section 3.5.8.2 -# Testcase: Ensure that the triggered actions of every trigger never results +# Testcase: Ensure that the triggered actions of every trigger never results # in an unexpected change made to the database. let $message= Testcase 3.5.8.2: (implied in previous tests); --source include/show_msg.inc #Section 3.5.8.3 / 3.5.8.4 -#Test case: Ensure that the triggered action can any valid SQL statement / set +#Test case: Ensure that the triggered action can any valid SQL statement / set # of valid SQL statements, provided the statements are written within # a BEGIN/END compound statement construct # OBN - At this point the tests focuses on the the INSERT/UPDATE/DELETE SQL statements @@ -58,17 +56,17 @@ let $message= Testcase 3.5.8.3/4:; grant SELECT, INSERT, UPDATE, DELETE on db_test.* to test_general; grant LOCK TABLES on db_test.* to test_general; Use db_test; - eval create table t1_i ( + eval 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=$engine_type; - eval create table t1_u ( + eval 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=$engine_type; - eval create table t1_d ( + eval 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, @@ -93,26 +91,29 @@ let $message= 3.5.8.4 - multiple SQL; delimiter //; Create trigger trg1 AFTER INSERT on tb3 for each row BEGIN - insert into db_test.t1_i + insert into db_test.t1_i values (new.f120, new.f136, new.f144, new.f163); - update db_test.t1_u + update db_test.t1_u set u144=new.f144, u163=new.f163 - where u136=new.f136; + 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// + select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u + where u136= new.f136; + END// delimiter ;// # Test trigger execution - multiple SQL connection con2_general; Use test; set @test_var=0; - Insert into tb3 (f120, f122, f136, f144, f163) + 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'; + --sorted_result select * from db_test.t1_i; + --sorted_result select * from db_test.t1_u; + --sorted_result select * from db_test.t1_d; select @test_var; @@ -121,16 +122,22 @@ let $message= 3.5.8.4 - single SQL - insert; --source include/show_msg.inc # Trigger definition - single SQL Insert connection con2_super; + delimiter //; Create trigger trg2 BEFORE UPDATE on tb3 for each row - insert into db_test.t1_i + BEGIN + insert into db_test.t1_i values (new.f120, new.f136, new.f144, new.f163); + END// + delimiter ;// # Trigger exeution - single SQL Insert connection con2_general; + Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%'; + select * from db_test.t1_i order by i120; 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%'; - select * from db_test.t1_i; + select * from db_test.t1_i order by i120; let $message= 3.5.8.4 - single SQL - update; @@ -139,16 +146,16 @@ let $message= 3.5.8.4 - single SQL - update; connection con2_super; drop trigger trg2; Create trigger trg3 BEFORE UPDATE on tb3 for each row - update db_test.t1_u + update db_test.t1_u set u120=new.f120 - where u136=new.f136; + where u136=new.f136; # Trigger exeution - single SQL - update; connection con2_general; 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%'; - select * from db_test.t1_u; + select * from db_test.t1_u order by u120; let $message= 3.5.8.3/4 - single SQL - delete; @@ -162,12 +169,12 @@ let $message= 3.5.8.3/4 - single SQL - delete; # Trigger exeution - single SQL delete connection con2_general; #lock tables tb3 write, db_test.t1_i write, db_test.t1_u write, db_test.t1_d write; - update tb3 set f120='D', f136=444, + update tb3 set f120='D', f136=444, f122='Test 3.5.8.4-Single Delete' where f122='Test 3.5.8.4-Single Update'; #unlock tables; Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%'; - select * from db_test.t1_d; + select * from db_test.t1_d order by d120; let $message= 3.5.8.3/4 - single SQL - select; @@ -176,13 +183,13 @@ let $message= 3.5.8.3/4 - single SQL - select; connection con2_super; 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; + select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u + where u136= new.f136; # Trigger exeution - single SQL select connection con2_general; set @test_var=0; - update tb3 set f120='S', f136=111, + 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%'; @@ -190,7 +197,7 @@ let $message= 3.5.8.3/4 - single SQL - select; #Cleanup connection default; - --disable_warnings + --disable_warnings drop trigger trg1; drop trigger trg5; drop database if exists db_test; @@ -200,8 +207,8 @@ let $message= 3.5.8.3/4 - single SQL - select; #Section 3.5.8.5 (IF) -# Test case: Ensure that the stored procedure-specific flow control statement like IF -# works correctly when it is a part of the triggered action portion of a +# Test case: Ensure that the stored procedure-specific flow control statement like IF +# works correctly when it is a part of the triggered action portion of a # trigger definition. let $message= Testcase 3.5.8.5 (IF):; --source include/show_msg.inc @@ -219,7 +226,7 @@ let $message= Testcase 3.5.8.5 (IF):; IF (new.f120='4') and (new.f136=10) then set @test_var2='2nd if', new.f120='d'; - ELSE + ELSE set @test_var2='2nd else', new.f120='D'; END IF; END// @@ -227,50 +234,50 @@ let $message= Testcase 3.5.8.5 (IF):; 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'; + select f120, f122, f136, @test_var, @test_var2 + from tb3 where f122 = 'Test 3.5.8.5-if' order by f136; 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'; + select f120, f122, f136, @test_var, @test_var2 + from tb3 where f122 = 'Test 3.5.8.5-if' order by f136; 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'; + select f120, f122, f136, @test_var, @test_var2 + from tb3 where f122 = 'Test 3.5.8.5-if' order by f136; 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'; + select f120, f122, f136, @test_var, @test_var2 + from tb3 where f122 = 'Test 3.5.8.5-if' order by f136; delimiter //; - --error 1064 + --error ER_PARSE_ERROR create trigger trg3 before update on tb3 for each row BEGIN ELSEIF new.f120='2' then END IF; END// - --error 0, 1360 + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trg3// - --error 1064 + --error ER_PARSE_ERROR 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 + ELSE set @test_var2='2nd else', new.f120='D'; END// delimiter ;// - --error 0, 1360 + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trg4; #Cleanup - --disable_warnings + --disable_warnings drop trigger trg2; delete from tb3 where f121='Test 3.5.8.5-if'; --enable_warnings #Section 3.5.8.5 (CASE) -# Test case: Ensure that the stored procedure-specific flow control statement -# like CASE works correctly when it is a part of the triggered action +# Test case: Ensure that the stored procedure-specific flow control statement +# like CASE works correctly when it is a part of the triggered action # portion of a trigger definition. let $message= Testcase 3.5.8.5-case:; --source include/show_msg.inc @@ -310,34 +317,34 @@ let $message= Testcase 3.5.8.5-case:; delimiter ;// set @test_var='Empty'; - Insert into tb3 (f120, f122, f136, f144) + 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'; - Insert into tb3 (f120, f122, f136, f144) + select f120, f122, f136, f144, @test_var + from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; + 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'; - Insert into tb3 (f120, f122, f136, f144) + select f120, f122, f136, f144, @test_var + from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; + 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'; - Insert into tb3 (f120, f122, f136) + select f120, f122, f136, f144, @test_var + from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; + Insert into tb3 (f120, f122, f136) values ('d', 'Test 3.5.8.5-case', 152); - select f120, f122, f136, f144, @test_var - from tb3 where f122 = 'Test 3.5.8.5-case'; - Insert into tb3 (f120, f122, f136, f144) + select f120, f122, f136, f144, @test_var + from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; + Insert into tb3 (f120, f122, f136, f144) values ('e', 'Test 3.5.8.5-case', 200, 8); - select f120, f122, f136, f144, @test_var - from tb3 where f122 = 'Test 3.5.8.5-case'; - --error 0, 1339 - Insert into tb3 (f120, f122, f136, f144) + select f120, f122, f136, f144, @test_var + from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; + --error 0, ER_SP_CASE_NOT_FOUND + 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'; + select f120, f122, f136, f144, @test_var + from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; delimiter //; - --error 1064 + --error ER_PARSE_ERROR create trigger trg3a before update on tb3 for each row BEGIN CASE @@ -345,11 +352,11 @@ let $message= Testcase 3.5.8.5-case:; END// delimiter ;// - --error 0, 1360 + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trg3a; #Cleanup - --disable_warnings + --disable_warnings drop trigger trg3; delete from tb3 where f121='Test 3.5.8.5-case'; --enable_warnings @@ -363,53 +370,53 @@ let $message= Testcase 3.5.8.5-loop/leave:; delimiter //; Create trigger trg4 after insert on tb3 for each row - BEGIN + BEGIN set @counter=0, @flag='Initial'; - Label1: loop + Label1: loop if new.f136<new.f144 then set @counter='Nothing to loop'; - leave Label1; + 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; + end if; + end if; + iterate label1; set @flag='Final'; - END loop Label1; + END loop Label1; END// delimiter ;// - Insert into tb3 (f122, f136, f144) + Insert into tb3 (f122, f136, f144) values ('Test 3.5.8.5-loop', 2, 8); select @counter, @flag; - Insert into tb3 (f122, f136, f144) + Insert into tb3 (f122, f136, f144) values ('Test 3.5.8.5-loop', 11, 8); select @counter, @flag; delimiter //; - --error 1064 + --error ER_PARSE_ERROR Create trigger trg4_2 after update on tb3 for each row - BEGIN - Label1: loop + BEGIN + Label1: loop set @counter=@counter+1; - END; + END; END// delimiter ;// - --error 0, 1360 + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trg4_2; #Cleanup - --disable_warnings + --disable_warnings drop trigger trg4; delete from tb3 where f122='Test 3.5.8.5-loop'; --enable_warnings #Section 3.5.8.5 (REPEAT ITERATE) -#Testcase: Ensure that the stored procedure-specific flow control statements +#Testcase: Ensure that the stored procedure-specific flow control statements # like REPEAT work correctly when they are part of the triggered action # portion of a trigger definition. let $message= Testcase 3.5.8.5-repeat:; @@ -418,108 +425,122 @@ let $message= Testcase 3.5.8.5-repeat:; delimiter //; Create trigger trg6 after insert on tb3 for each row BEGIN - rp_label: REPEAT - SET @counter1 = @counter1 + 1; + rp_label: REPEAT + SET @counter1 = @counter1 + 1; IF (@counter1 MOD 2 = 0) THEN ITERATE rp_label; END IF; - SET @counter2 = @counter2 + 1; + SET @counter2 = @counter2 + 1; UNTIL @counter1> new.f136 END REPEAT rp_label; END// delimiter ;// set @counter1= 0, @counter2= 0; - Insert into tb3 (f122, f136) + Insert into tb3 (f122, f136) values ('Test 3.5.8.5-repeat', 13); select @counter1, @counter2; delimiter //; - --error 1064 + --error ER_PARSE_ERROR Create trigger trg6_2 after update on tb3 for each row BEGIN - REPEAT - SET @counter2 = @counter2 + 1; + REPEAT + SET @counter2 = @counter2 + 1; END// delimiter ;// #Cleanup - --disable_warnings + --disable_warnings drop trigger trg6; delete from tb3 where f122='Test 3.5.8.5-repeat'; --enable_warnings #Section 3.5.8.5 (WHILE) -# Test case: Ensure that the stored procedure-specific flow control -# statements WHILE, work correctly when they are part of +# Test case: Ensure that the stored procedure-specific flow control +# statements WHILE, work correctly when they are part of # the triggered action portion of a trigger definition. let $message= Testcase 3.5.8.5-while:; --source include/show_msg.inc delimiter //; Create trigger trg7 after insert on tb3 for each row - wl_label: WHILE @counter1 < new.f136 DO - SET @counter1 = @counter1 + 1; + 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; + SET @counter2 = @counter2 + 1; END WHILE wl_label// delimiter ;// set @counter1= 0, @counter2= 0; - Insert into tb3 (f122, f136) + Insert into tb3 (f122, f136) values ('Test 3.5.8.5-while', 7); select @counter1, @counter2; delimiter //; - --error 1064 + --error ER_PARSE_ERROR Create trigger trg7_2 after update on tb3 for each row BEGIN - WHILE @counter1 < new.f136 - SET @counter1 = @counter1 + 1; + WHILE @counter1 < new.f136 + SET @counter1 = @counter1 + 1; END// delimiter ;// #Cleanup - --disable_warnings + --disable_warnings delete from tb3 where f122='Test 3.5.8.5-while'; drop trigger trg7; --enable_warnings #Section 3.5.8.6 -# Test case: Ensure that a trigger definition that includes a CALL to a stored -# procedure fails, at CREATE TRIGGER time, with an appropriate error -# message -# OBN - requirement void since allowed -# Fails due to Bug 9909 the bug allows the trigger to be created -# and fails in execution time +# Test case: Ensure that a trigger definition that includes a CALL to a stored +# procedure fails, at CREATE TRIGGER time, with an appropriate error +# message. Not more valid requirement. let $message= Testcase 3.5.8.6: (requirement void); --source include/show_msg.inc + delimiter //; + CREATE PROCEDURE sp_01 () BEGIN set @v1=1; END// + + CREATE TRIGGER trg8_1 BEFORE UPDATE ON tb3 FOR EACH ROW + BEGIN + CALL sp_01 (); + END// + delimiter ;// + Insert into tb3 (f120, f122, f136) values ('6', 'Test 3.5.8.6-insert', 101); + update tb3 set f120='S', f136=111, + f122='Test 3.5.8.6-tr8_1' + where f122='Test 3.5.8.6-insert'; + select f120, f122 + from tb3 where f122 like 'Test 3.5.8.6%' order by f120; + DROP TRIGGER trg8_1; + DROP PROCEDURE sp_01; #Section 3.5.8.7 -# Test case: Ensure that a trigger definition that includes a -# transaction-delimiting statement (e.g. COMMIT, -# ROLLBACK, START TRANSACTION) fails, at CREATE TRIGGER +# Test case: Ensure that a trigger definition that includes a +# transaction-delimiting statement (e.g. COMMIT, +# ROLLBACK, START TRANSACTION) fails, at CREATE TRIGGER # time, with an appropriate error message. -# OBN - Fails due to Bug ____ -let $message= Testcase 3.5.8.7: (Disabled as a result of bug _____); +let $message= Testcase 3.5.8.7; --source include/show_msg.inc + + delimiter //; + --error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG + Create trigger trg9_1 before update on tb3 for each row + BEGIN + Start transaction; + Set new.f120='U'; + Commit; + END// -# --error 1314 -# Create trigger trg9_1 before update on tb3 for each row -# BEGIN -# Start transaction; -# Set new.f120='U'; -# Commit; -# END; - -# --error 1314 -# Create trigger trg9_2 before delete on tb3 for each row -# BEGIN -# Start transaction; -# Set @var2=old.f120; -# Rollback; -# END; + --error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG + Create trigger trg9_2 before delete on tb3 for each row + BEGIN + Start transaction; + Set @var2=old.f120; + Rollback; + END// + delimiter ;// # Cleanup section 3.5 diff --git a/mysql-test/suite/funcs_1/triggers/triggers_09.inc b/mysql-test/suite/funcs_1/triggers/triggers_09.inc index 4eaaf3e35e2..c84b89fa457 100644 --- a/mysql-test/suite/funcs_1/triggers/triggers_09.inc +++ b/mysql-test/suite/funcs_1/triggers/triggers_09.inc @@ -1,7 +1,7 @@ #====================================================================== # -# Trigger Tests -# (test case numbering refer to requirement document TP v1.1) +# Trigger Tests +# (test case numbering refer to requirement document TP v1.1) #====================================================================== @@ -11,15 +11,15 @@ ################################# #Section 3.5.9.1 -#Test case: Ensure that every trigger executes its triggered action on each row +#Test case: Ensure that every trigger executes its triggered action on each row # that meets the conditions stated in the trigger definition. #Section 3.5.9.2 -#Testcase: Ensure that a trigger never executes its triggered action on any row +#Testcase: Ensure that a trigger never executes its triggered action on any row # that doesn't meet the conditions stated in the trigger definition. let $message= Testcase 3.5.9.1/2:; --source include/show_msg.inc - Create trigger trg1 BEFORE UPDATE on tb3 for each row + Create trigger trg1 BEFORE UPDATE on tb3 for each row set new.f142 = 94087, @counter=@counter+1; --disable_query_log select count(*) as TotalRows from tb3; @@ -29,22 +29,22 @@ let $message= Testcase 3.5.9.1/2:; --enable_query_log set @counter=0; Update tb3 Set f142='1' where f130<100; - select count(*) as ExpectedChanged, @counter as TrigCounter + select count(*) as ExpectedChanged, @counter as TrigCounter from tb3 where f142=94087; - select count(*) as ExpectedNotChange from tb3 + select count(*) as ExpectedNotChange from tb3 where f130<100 and f142<>94087; - select count(*) as NonExpectedChanged from tb3 + select count(*) as NonExpectedChanged from tb3 where f130>=130 and f142=94087; #Cleanup - --disable_warnings + --disable_warnings drop trigger trg1; --enable_warnings #Section 3.5.9.3 -#Test case: Ensure that a reference to OLD.<column name> always correctly refers -# to the values of the specified column of the subject table before a +#Test case: Ensure that a reference to OLD.<column name> always correctly refers +# to the values of the specified column of the subject table before a # data row is updated or deleted. let $message= Testcase 3.5.9.3:; --source include/show_msg.inc @@ -71,46 +71,46 @@ let $message= Testcase 3.5.9.3:; --disable_query_log - set @tr_var_b4_118=0, @tr_var_b4_121=0, @tr_var_b4_122=0, + set @tr_var_b4_118=0, @tr_var_b4_121=0, @tr_var_b4_122=0, @tr_var_b4_136=0, @tr_var_b4_163=0; - set @tr_var_af_118=0, @tr_var_af_121=0, @tr_var_af_122=0, + set @tr_var_af_118=0, @tr_var_af_121=0, @tr_var_af_122=0, @tr_var_af_136=0, @tr_var_af_163=0; - select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, + select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, @tr_var_b4_136, @tr_var_b4_163; - select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, + select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, @tr_var_af_136, @tr_var_af_163; --enable_query_log - Insert into tb3 (f122, f136, f163) + 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'; - select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, + select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3' order by f136; + select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, @tr_var_b4_136, @tr_var_b4_163; - select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, + select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, @tr_var_af_136, @tr_var_af_163; --disable_query_log - set @tr_var_b4_118=0, @tr_var_b4_121=0, @tr_var_b4_122=0, + set @tr_var_b4_118=0, @tr_var_b4_121=0, @tr_var_b4_122=0, @tr_var_b4_136=0, @tr_var_b4_163=0; - set @tr_var_af_118=0, @tr_var_af_121=0, @tr_var_af_122=0, + set @tr_var_af_118=0, @tr_var_af_121=0, @tr_var_af_122=0, @tr_var_af_136=0, @tr_var_af_163=0; - select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, + select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, @tr_var_b4_136, @tr_var_b4_163; - select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, + select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, @tr_var_af_136, @tr_var_af_163; --enable_query_log 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'; - select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, + select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3' order by f136; + select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, @tr_var_b4_136, @tr_var_b4_163; - select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, + select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, @tr_var_af_136, @tr_var_af_163; #Cleanup - --disable_warnings + --disable_warnings drop trigger trg2_a; drop trigger trg2_b; drop trigger trg2_c; @@ -118,8 +118,8 @@ let $message= Testcase 3.5.9.3:; --enable_warnings #Section 3.5.9.4 -#Test case: Ensure that a reference to NEW.<column name> always correctly refers -# to the values of the specified column of the subject table after an +#Test case: Ensure that a reference to NEW.<column name> always correctly refers +# to the values of the specified column of the subject table after an # existing data row has been updated or a new data row has been inserted. let $message= Testcase 3.5.9.4:; --source include/show_msg.inc @@ -145,48 +145,48 @@ let $message= Testcase 3.5.9.4:; @tr_var_af_151=new.f151, @tr_var_af_163=new.f163; --disable_query_log - set @tr_var_b4_118=0, @tr_var_b4_121=0, @tr_var_b4_122=0, + set @tr_var_b4_118=0, @tr_var_b4_121=0, @tr_var_b4_122=0, @tr_var_b4_136=0, @tr_var_b4_151=0, @tr_var_b4_163=0; - set @tr_var_af_118=0, @tr_var_af_121=0, @tr_var_af_122=0, + set @tr_var_af_118=0, @tr_var_af_121=0, @tr_var_af_122=0, @tr_var_af_136=0, @tr_var_af_151=0, @tr_var_af_163=0; - select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, + 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; - select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, + 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; --enable_query_log - Insert into tb3 (f122, f136, f151, f163) + 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%'; - select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, + select f118, f121, f122, f136, f151, f163 from tb3 + where f122 like 'Test 3.5.9.4%' order by f163; + 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; - select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, + 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; --disable_query_log - set @tr_var_b4_118=0, @tr_var_b4_121=0, @tr_var_b4_122=0, + set @tr_var_b4_118=0, @tr_var_b4_121=0, @tr_var_b4_122=0, @tr_var_b4_136=0, @tr_var_b4_151=0, @tr_var_b4_163=0; - set @tr_var_af_118=0, @tr_var_af_121=0, @tr_var_af_122=0, + set @tr_var_af_118=0, @tr_var_af_121=0, @tr_var_af_122=0, @tr_var_af_136=0, @tr_var_af_151=0, @tr_var_af_163=0; - select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, + 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; - select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, + 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; --enable_query_log Update tb3 Set f122='Test 3.5.9.4-trig', f136=NULL, f151=DEFAULT, f163=NULL where f122='Test 3.5.9.4'; - select f118, f121, f122, f136, f151, f163 from tb3 - where f122 like 'Test 3.5.9.4-trig'; - select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, + select f118, f121, f122, f136, f151, f163 from tb3 + where f122 like 'Test 3.5.9.4-trig' order by f163; + 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; - select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, + 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; #Cleanup - --disable_warnings + --disable_warnings drop trigger trg3_a; drop trigger trg3_b; drop trigger trg3_c; @@ -196,121 +196,119 @@ let $message= Testcase 3.5.9.4:; #Section 3.5.9.5 -# Test case: Ensure that the definition of an INSERT trigger can include a +# Test case: Ensure that the definition of an INSERT trigger can include a # reference to NEW. <Column name>. let $message= Testcase 3.5.9.5: (implied in previous tests); --source include/show_msg.inc #Section 3.5.9.6 -# Test case: Ensure that the definition of an INSERT trigger cannot include +# Test case: Ensure that the definition of an INSERT trigger cannot include # a reference to OLD. <Column name>. let $message= Testcase 3.5.9.6:; --source include/show_msg.inc - --error 1363 + --error ER_TRG_NO_SUCH_ROW_IN_TRG create trigger trg4a before insert on tb3 for each row set @temp1= old.f120; - --error 1362 + --error ER_TRG_CANT_CHANGE_ROW create trigger trg4b after insert on tb3 for each row set old.f120= 'test'; #Cleanup - --disable_warnings - --error 0, 1360 + --disable_warnings + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trg4a; - --error 0, 1360 + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trg4b; --enable_warnings #Section 3.5.9.7 -# Test case: Ensure that the definition of an UPDATE trigger can include a +# Test case: Ensure that the definition of an UPDATE trigger can include a # reference to NEW. <Column name>. let $message= Testcase 3.5.9.7: (implied in previous tests); --source include/show_msg.inc #Section 3.5.9.8 -# Test case: Ensure that the definition of an UPDATE trigger cannot include a +# Test case: Ensure that the definition of an UPDATE trigger cannot include a # reference to OLD. <Column name>. let $message= Testcase 3.5.9.8: (implied in previous tests); --source include/show_msg.inc #Section 3.5.9.9 -# Test case: Ensure that the definition of a DELETE trigger cannot include a +# Test case: Ensure that the definition of a DELETE trigger cannot include a # reference to NEW.<column name>. let $message= Testcase 3.5.9.9:; --source include/show_msg.inc - --error 1363 + --error ER_TRG_NO_SUCH_ROW_IN_TRG create trigger trg5a before DELETE on tb3 for each row set @temp1=new.f122; - --error 1363 + --error ER_TRG_NO_SUCH_ROW_IN_TRG create trigger trg5b after DELETE on tb3 for each row set new.f122='test'; -let $message= The above returns the wrong error, should be error 1362 (Bug 11648) ---source include/show_msg.inc #Cleanup - --disable_warnings - --error 0, 1360 + --disable_warnings + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trg5a; - --error 0, 1360 + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trg5b; --enable_warnings #Section 3.5.9.10 -# Test case: Ensure that the definition of a DELETE trigger can include a reference +# Test case: Ensure that the definition of a DELETE trigger can include a reference # to OLD.<column name>. let $message= Testcase 3.5.9.10: (implied in previous tests); --source include/show_msg.inc #Section 3.5.9.11 -# Testcase: Ensure that trigger definition that includes a referance to -# NEW.<colunm name> fails with an appropriate error message, +# Testcase: Ensure that trigger definition that includes a referance to +# NEW.<colunm name> fails with an appropriate error message, # at CREATE TRIGGER time, if the trigger event in not INSERT or UPDATE let $message= Testcase 3.5.9.11: covered by 3.5.9.9; --source include/show_msg.inc #Section 3.5.9.12 -# Testcase: Ensure that trigger definition that includes a referance to -# OLD.<column name> fails with an appropriate error message, at +# Testcase: Ensure that trigger definition that includes a referance to +# OLD.<column name> fails with an appropriate error message, at # CREATE TRIGGER time, if the trigger event is not DELETE or UPDATE let $message= Testcase 3.5.9.12: covered by 3.5.9.6; --source include/show_msg.inc #Section 3.5.9.13 -# Test case: Ensure that all references to OLD. <Column name> are read-only, +# Test case: Ensure that all references to OLD. <Column name> are read-only, # that is, that they cannot be used to modify a data row. let $message= Testcase 3.5.9.13:; --source include/show_msg.inc - --error 1362 + --error ER_TRG_CANT_CHANGE_ROW create trigger trg6a before UPDATE on tb3 for each row set old.f118='C', new.f118='U'; - --error 1362 + --error ER_TRG_CANT_CHANGE_ROW create trigger trg6b after INSERT on tb3 for each row set old.f136=163, new.f118='U'; - --error 1362 + --error ER_TRG_CANT_CHANGE_ROW create trigger trg6c after UPDATE on tb3 for each row set old.f136=NULL; #Cleanup - --disable_warnings - --error 0, 1360 + --disable_warnings + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trg6a; - --error 0, 1360 + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trg6b; - --error 0, 1360 + --error 0, ER_TRG_DOES_NOT_EXIST drop trigger trg6c; --enable_warnings #Section 3.5.9.14 -# Test case: Ensure that all references to NEW. <Column name> may be used both to +# Test case: Ensure that all references to NEW. <Column name> may be used both to # read a data row and to modify a data row let $message= Testcase 3.5.9.14: (implied in previous tests); --source include/show_msg.inc diff --git a/mysql-test/suite/funcs_1/triggers/triggers_1011ext.inc b/mysql-test/suite/funcs_1/triggers/triggers_1011ext.inc index 534c4efaa86..b568fc422e4 100644 --- a/mysql-test/suite/funcs_1/triggers/triggers_1011ext.inc +++ b/mysql-test/suite/funcs_1/triggers/triggers_1011ext.inc @@ -48,7 +48,7 @@ let $message= Testcase 3.5.10.1/2/3:; 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%'; + from tb3 where f122 like 'Test 3.5.10.1/2/3%' order by f151; select f121, f122, f151, f163 from vw11; select f121, f122, f151, f163 from tb3 where f122 like 'Not in View'; @@ -56,7 +56,7 @@ let $message= Testcase 3.5.10.1/2/3:; #Section 3.5.10.2 Update vw11 set f163=1; select f121, f122, f151, f163 from tb3 - where f122 like 'Test 3.5.10.1/2/3%'; + where f122 like 'Test 3.5.10.1/2/3%' order by f151; select f121, f122, f151, f163 from vw11; #Section 3.5.10.3 @@ -64,7 +64,7 @@ let $message= Testcase 3.5.10.1/2/3:; Select @test_var as 'before delete'; delete from vw11 where f151=1; select f121, f122, f151, f163 from tb3 - where f122 like 'Test 3.5.10.1/2/3%'; + where f122 like 'Test 3.5.10.1/2/3%' order by f151; select f121, f122, f151, f163 from vw11; Select @test_var as 'after delete'; @@ -94,11 +94,11 @@ let $message= Testcase 3.5.10.4:; set @counter= 0; select @counter as 'Rows Loaded Before'; - --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR - eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table tb_load; + --replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> + eval load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/t9.txt' into table tb_load; select @counter as 'Rows Loaded After'; - Select * from tb_load limit 10; + Select * from tb_load order by f1 limit 10; #Cleanup --disable_warnings @@ -157,7 +157,7 @@ let $message= Testcase 3.5.10.extra:; set @counter=0; select @counter; - --error 1329 + --error ER_SP_FETCH_NO_DATA call trig_sp(); select @counter; select count(*) from tb3; @@ -233,7 +233,7 @@ let $message= Testcase y.y.y.2: Check for triggers starting triggers; #lock tables t1 write, t2_1 write, t2_2 write, t2_3 write, t2_4 write, t3 write; insert into t1 values (1); #unlock tables; - select * from t3; + select * from t3 order by f1; #Cleanup --disable_warnings @@ -271,13 +271,13 @@ let $message= Testcase y.y.y.3: Circular trigger reference; create trigger tr4 after insert on t4 for each row insert into t1 (f1) values (new.f4+1); - # OBN See bug 11896 - --error 1442 + # Bug#11896 Partial locking in case of recursive trigger definittions + --error ER_CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG insert into t1 values (1); - select * from t1; - select * from t2; - select * from t3; - select * from t4; + select * from t1 order by f1; + select * from t2 order by f2; + select * from t3 order by f3; + select * from t4 order by f4; #Cleanup --disable_warnings @@ -294,7 +294,7 @@ let $message= Testcase y.y.y.3: Circular trigger reference; #Section y.y.y.4 # Testcase: create recursive trigger/storedprocedures conditions -let $message= Testcase y.y.y.4: Recursive trigger/SP references (disabled bug 11889); +let $message= Testcase y.y.y.4: Recursive trigger/SP references; --source include/show_msg.inc set @sql_mode='traditional'; @@ -327,7 +327,7 @@ set @sql_mode='traditional'; set @counter=0; select @counter; - --error 1456 + --error ER_SP_RECURSION_LIMIT call trig_sp(); select @counter; select count(*) from tb3; @@ -337,7 +337,7 @@ set @sql_mode='traditional'; set @@max_sp_recursion_depth= 10; set @counter=0; select @counter; - --error 1442 + --error ER_CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG call trig_sp(); select @counter; select count(*) from tb3; @@ -381,12 +381,12 @@ let $message= Testcase y.y.y.5: Roleback of nested trigger references; set autocommit=0; start transaction; - --error 1264 + --error ER_WARN_DATA_OUT_OF_RANGE insert into t1 values (1); commit; - select * from t1; - select * from t2; - select * from t3; + select * from t1 order by f1; + select * from t2 order by f2; + select * from t3 order by f3; #unlock tables; #Cleanup --disable_warnings diff --git a/mysql-test/suite/funcs_1/triggers/triggers_master.test b/mysql-test/suite/funcs_1/triggers/triggers_master.test deleted file mode 100644 index 0f6d4ff555f..00000000000 --- a/mysql-test/suite/funcs_1/triggers/triggers_master.test +++ /dev/null @@ -1,2818 +0,0 @@ -#====================================================================== -# -# Trigger Tests -# (test case numbering refer to requirement document TP v1.1) -#====================================================================== - -# OBM - ToDo -############ -# 1. Information Schema Trigger Table -# 2. Performace -############################################### - -# General setup for Trigger tests -let $message= Testcase: 3.5:; ---source include/show_msg.inc - ---disable_abort_on_error - - 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; - --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK - connect (con_general,localhost,test_general,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); - --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK - connect (con_super,localhost,test_super,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); - connection default; - - -##################################################### -################# Section 3.5.1 ##################### -# Syntax checks for CREATE TRIGGER and DROP TRIGGER # -##################################################### - -#Section 3.5.1.1 -# Testcase: Ensure that all clauses that should be supported are supported. -let $message= Testcase: 3.5.1.1:; ---source include/show_msg.inc -# OBN - This test case tests basic trigger definition and execution -# of INSERT/UPDATE/DELETE actions and BEFORE/AFTER timings. -# As such it covers the equirements in sections 3.5.6.1, 3.5.6.2, -# 3.5.6.4, 3.5.6.5, 3.5.7.1, 3.5.7.2, 3.5.7.3, 3.5.7.17 below. -# - Note currently as a result of limitations with locking tables in -# triggers, a specifc lockingof the tables is done. -# Once fixed, the locking and alias referances should be removed - -use test; -# Trigger Definition - 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'; -# Trigger Execution Insert (before and after) - set @test_before = 1; - set @test_after = 5; - select @test_before, @test_after; - 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'; - select @test_before, @test_after; - -# Trigger Execution Update (before and after) - set @test_before = 18; - set @test_after = 8; - select @test_before, @test_after; - 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'; - select @test_before, @test_after; - -# Trigger Execution Delete (before and after) - 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'; - select @test_before, @test_after; - 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'; - select @test_before, @test_after; - -#Cleanup - --disable_warnings - --error 0, 1360 - drop trigger trg1_1; - --error 0, 1360 - drop trigger trg1_2; - --error 0, 1360 - drop trigger trg1_3; - --error 0, 1360 - drop trigger trg1_4; - --error 0, 1360 - drop trigger trg1_5; - --error 0, 1360 - drop trigger trg1_6; - --enable_warnings - delete from tb3 where f121='Test 3.5.1.1'; - --enable_warnings - -#Section 3.5.1.2 -# Testcase: Ensure that all clauses that should not be supported are disallowed -# with an appropriate error message. -let $message= Testcase: 3.5.1.2:; ---source include/show_msg.inc - - --error 1064 - Create trigger trg_1 after insert - on tb3 for each statement set @x= 1; - -#Cleanup - --disable_warnings - --error 0, 1360 - drop trigger trg_1; - --enable_warnings - - -#Section 3.5.1.3 -# Testcase: Ensure that all supported clauses are supported only in the correct order. -let $message= Testcase 3.5.1.3:; ---source include/show_msg.inc - --error 1064 - CREATE TRIGGER trg3_1 on tb3 BEFORE INSERT for each row set new.f120 = 't'; - - --error 1064 - CREATE trg3_2 TRIGGER AFTER INSERT on tb3 for each row set new.f120 = 's'; - - --error 1064 - CREATE TRIGGER trg3_3 Before DELETE on tb3 set @ret1 = 'test' for each row; - - --error 1064 - CREATE TRIGGER trg3_4 DELETE AFTER on tb3 set @ret1 = 'test' for each row; - - --error 1064 - CREATE for each row TRIGGER trg3_5 AFTER UPDATE on tb3 set @ret1 = 'test'; - -#Cleanup -# OBN - Although none of the above should have been created we should do a cleanup -# since if they have been created, not dropping them will affect following -# tests. - --disable_warnings - --error 0, 1360 - drop trigger trg3_1; - --error 0, 1360 - drop trigger trg3_2; - --error 0, 1360 - drop trigger trg3_3; - --error 0, 1360 - drop trigger trg3_4; - --error 0, 1360 - drop trigger trg3_5; - --enable_warnings - - -#Section 3.5.1.4 -# Testcase: Ensure that an appropriate error message is returned if a clause -# is out-of-order in an SQL statement. -# OBN - FIXME - Missing 3.5.1.4 need to add - -#Section 3.5.1.5 -# Testcase: Ensure that all clauses that are defined to be mandatory are indeed -# required to be mandatory by the MySQL server and tools -let $message= Testcase: 3.5.1.5:; ---source include/show_msg.inc - - --error 1064 - CREATE TRIGGER trg4_1 AFTER on tb3 for each row set new.f120 = 'e'; - - --error 1064 - CREATE TRIGGER trg4_2 INSERT on tb3 for each set row new.f120 = 'f'; - - --error 1064 - CREATE TRIGGER trg4_3 BEFORE INSERT tb3 for each row set new.f120 = 'g'; - - --error 1064 - CREATE TRIGGER trg4_4 AFTER UPDATE on tb3 for each set new.f120 = 'g'; - - --error 1064 - CREATE trg4_5 AFTER DELETE on tb3 for each set new.f120 = 'g'; - - --error 1064 - CREATE TRIGGER trg4_6 BEFORE DELETE for each row set new.f120 = 'g'; - -#Cleanup -# OBN - Although none of the above should have been created we should do a cleanup -# since if they have been created, not dropping them will affect following -# tests. - --disable_warnings - --error 0, 1360 - drop trigger trg4_1; - --error 0, 1360 - drop trigger trg4_2; - --error 0, 1360 - drop trigger trg4_3; - --error 0, 1360 - drop trigger trg4_4; - --error 0, 1360 - drop trigger trg4_5; - --error 0, 1360 - drop trigger trg4_6; - --enable_warnings - -#Section 3.5.1.6 -# Testcase: Ensure that any clauses that are defined to be optional are indeed -# trated as optional by MySQL server and tools -let $message= Testcase 3.5.1.6: - Need to fix; ---source include/show_msg.inc -# OBN - FIXME - Missing 3.5.1.6 need to add - -#Section 3.5.1.7 -# Testcase: Ensure that all valid, fully-qualified, and non-qualified, -# trigger names are accepted, at creation time. -let $message= Testcase 3.5.1.7: - need to fix; ---source include/show_msg.inc - - drop table if exists t1; - eval create table t1 (f1 int, f2 char(25),f3 int) engine=$engine_type; - 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; - update t1 set f2='update 3.5.1.7'; - select * from t1; - select trigger_name from information_schema.triggers; - -#Cleanup - --disable_warnings - --error 0, 1360 - drop trigger trg5_1; - # The above trigger should be dropped since the name was trimmed. - drop trigger trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ; - drop table t1; - -#Section 3.5.1.8 -# Testcase: Ensure that any invalid trigger name is never accepted, and that an -# appropriate error message is returned when the name is rejected. -let $message= Testcase 3.5.1.8:; ---source include/show_msg.inc - - --error 1064 - CREATE TRIGGER trg12* before insert on tb3 for each row set new.f120 = 't'; - - --error 1064 - CREATE TRIGGER trigger before insert on tb3 for each row set new.f120 = 't'; - - --error 1064 - CREATE TRIGGER 100 before insert on tb3 for each row set new.f120 = 't'; - - --error 1064 - CREATE TRIGGER @@view before insert on tb3 for each row set new.f120 = 't'; - - --error 1064 - CREATE TRIGGER @name before insert on tb3 for each row set new.f120 = 't'; - - --error 1435 - CREATE TRIGGER tb3.trg6_1 BEFORE INSERT on test.tb3 - for each row set new.f120 ='X'; - - --disable_warnings - drop database if exists trig_db; - --enable_warnings - create database trig_db; - use trig_db; - eval create table t1 (f1 integer) engine = $engine_type; - - # Can't create a trigger in a different database - use test; - --error 1435 - CREATE TRIGGER trig_db.trg6_2 AFTER INSERT on tb3 - for each row set @ret_trg6_2 = 5; - - # Can't create a trigger refrencing a table in a different db - use trig_db; - --error 1435 - CREATE TRIGGER trg6_3 AFTER INSERT on test.tb3 - for each row set @ret_trg6_3 = 18; - - use test; - -#Cleanup - --disable_warnings - drop database trig_db; -# OBN - Although none of the above should have been created we should do a cleanup -# since if they have been created, not dropping them will affect following -# tests. - --error 0, 1360 - drop trigger trg6_1; - --error 0, 1360 - drop trigger trg6_3; - --enable_warnings - -#Section 3.5.1.9 -#Testcase: Ensure that a reference to a non-existent trigger is rejected with -# an appropriate error message. -let $message= Testcase 3.5.1.9:(cannot be inplemented at this point); ---source include/show_msg.inc - - -#Section 3.5.1.10 -#Testcase: Ensure that it is not possible to create two triggers with the same name on -# the same table -let $message= Testcase 3.5.1.10:; ---source include/show_msg.inc - - CREATE TRIGGER trg7_1 BEFORE UPDATE on tb3 for each row set new.f120 ='X'; - - --error 1359 - CREATE TRIGGER trg7_1 AFTER INSERT on tb3 for each row set @x ='Y'; - -#Cleanup - --disable_warnings - --error 0, 1360 - drop trigger trg7_1; - --enable_warnings - - -#Section 3.5.1.? -# Testcase: Ensure that it is not possible to create two or more triggers with -# the same name, provided each is associated with a different table. -let $message= Testcase 3.5.1.?:; ---source include/show_msg.inc - - --disable_warnings - drop table if exists t1; - drop table if exists t2; - --enable_warnings - eval create table t1 (f1 char(50), f2 integer) engine = $engine_type; - eval create table t2 (f1 char(50), f2 integer) engine = $engine_type; - - create trigger trig before insert on t1 - for each row set new.f1 ='trig t1'; - - --error 1359 - create trigger trig before update on t2 - for each row set new.f1 ='trig t2'; - - insert into t1 value ('insert to t1',1); - select * from t1; - update t1 set f1='update to t1'; - select * from t1; - insert into t2 value ('insert to t2',2); - update t2 set f1='update to t1'; - select * from t2; - -#Cleanup - --disable_warnings - drop table t1; - drop table t2; - --error 0, 1360 - drop trigger trig; - --enable_warnings - - -#Section 3.5.1.11 -# Testcase: Ensure that it is possible to create two or more triggers with -# the same name, provided each resides in a different database -let $message= Testcase 3.5.1.11:; ---source include/show_msg.inc - - --disable_warnings - drop database if exists trig_db1; - drop database if exists trig_db2; - drop database if exists trig_db3; - --enable_warnings - create database trig_db1; - create database trig_db2; - create database trig_db3; - use trig_db1; - eval create table t1 (f1 char(50), f2 integer) engine = $engine_type; - create trigger trig before insert on t1 - for each row set new.f1 ='trig1', @test_var1='trig1'; - use trig_db2; - eval create table t2 (f1 char(50), f2 integer) engine = $engine_type; - create trigger trig before insert on t2 - for each row set new.f1 ='trig2', @test_var2='trig2'; - use trig_db3; - eval create table t1 (f1 char(50), f2 integer) engine = $engine_type; - 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; - select * from t1; - select * from trig_db2.t2; - select * from trig_db3.t1; - select * from t1; - use test; - -#Cleanup - --disable_warnings - drop database trig_db1; - drop database trig_db2; - drop database trig_db3; - --enable_warnings - -########################################### -################ Section 3.5.2 ############ -# Check for the global nature of Triggers # -########################################### - -#Section 3.5.2.1 -# Test case: Ensure that if a trigger created without a qualifying database -# name belongs to the database in use at creation time. -#Section 3.5.2.2 -# Test case: Ensure that if a trigger created with a qualifying database name -# belongs to the database specified. -#Section 3.5.2.3 -# Test case: Ensure that if a trigger created with a qualifying database name -# does not belong to the database in use at creation time unless -# the qualifying database name identifies the database that is -# also in use at creation time. -let $message= Testcase 3.5.2.1/2/3:; ---source include/show_msg.inc - - - --disable_warnings - drop database if exists trig_db1; - drop database if exists trig_db2; - --enable_warnings - create database trig_db1; - create database trig_db2; - use trig_db1; - eval create table t1 (f1 char(50), f2 integer) engine = $engine_type; - eval create table trig_db2.t1 (f1 char(50), f2 integer) engine = $engine_type; - 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; - - 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; - -#Cleanup - --disable_warnings - drop database trig_db1; - drop database trig_db2; - -########################################### -################ Section 3.5.3 ############ -# Check for the global nature of Triggers # -########################################### - -# General setup to be used in all testcases of 3.5.3 -let $message= Testcase 3.5.3:; ---source include/show_msg.inc - - --disable_warnings - drop database if exists priv_db; - --enable_warnings - create database priv_db; - use priv_db; - create table t1 (f1 char(20)); - - 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'); - -#Section 3.5.3.1 / 3.5.3.2 -# Test case: Ensure SUPER privilege is required to create a trigger -#Section 3.5.3.3 / 3.5.3.4 -# Test case: Ensure that root always has the SUPER privilege. -# OMR - No need to test this since SUPER priv is an existing one and not related -# or added for triggers (TP 2005-06-06) -#Section 3.5.3.5 / 3.5.3.6 -# Test case: Ensure that the SUPER privilege is required to drop a trigger. -let $message= Testcase 3.5.3.2/6:; ---source include/show_msg.inc - - revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; - grant ALL on *.* to test_noprivs@localhost; - revoke SUPER on *.* from test_noprivs@localhost; - show grants for test_noprivs@localhost; - - revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; - grant SUPER on *.* to test_yesprivs@localhost; -# Adding the minimal priv to be able to set to the db - grant SELECT on priv_db.t1 to test_yesprivs@localhost; - show grants for test_yesprivs@localhost; - - --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK - connect (no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); - --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK - connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); - connection default; - -let $message= Testcase 3.5.3.2:; ---source include/show_msg.inc - - connection no_privs; - select current_user; - use priv_db; - - --error 1227 - create trigger trg1_1 before INSERT on t1 for each row - set new.f1 = 'trig 3.5.3.2_1-no'; - - connection default; - use priv_db; - insert into t1 (f1) values ('insert 3.5.3.2-no'); - select f1 from t1; - - connection yes_privs; - select current_user; - use priv_db; - - create trigger trg1_2 before INSERT on t1 for each row - set new.f1 = 'trig 3.5.3.2_2-yes'; - - connection default; - use priv_db; - insert into t1 (f1) values ('insert 3.5.3.2-yes'); - select f1 from t1; - -let $message= Testcase 3.5.3.6:; ---source include/show_msg.inc - - connection no_privs; - use priv_db; - - --error 1227 - drop trigger trg1_2; - - connection default; - use priv_db; - insert into t1 (f1) values ('insert 3.5.3.6-yes'); - select f1 from t1; - - connection yes_privs; - use priv_db; - - drop trigger trg1_2; - - connection default; - use priv_db; - insert into t1 (f1) values ('insert 3.5.3.6-no'); - select f1 from t1; - -# Cleanup - --disable_warnings - connection default; - --error 0, 1360 - drop trigger trg1_2; - disconnect no_privs; - disconnect yes_privs; - --enable_warnings - - -#Section 3.5.3.7 -# Test case: Ensure that use of the construct "SET NEW. <column name> = <value>" -# fails at CREATE TRIGGER time, if the current user does not have the -# UPDATE privilege on the column specified -# Note: As a result of bug 8884 the triggers are actually created. -# Disabled because of bug 8884 - -# --- 3.5.3.7a - Privs set on a global level -let $message=Testcase 3.5.3.7a:; ---source include/show_msg.inc - - 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; - - revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; - grant SUPER, UPDATE on *.* to test_yesprivs@localhost; - show grants for test_yesprivs@localhost; - - --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK - connect (no_privs_424a,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); - --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK - connect (yes_privs_424a,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); - - connection no_privs_424a; - select current_user; - use priv_db; - show grants; - select f1 from t1; - -let $message= Trigger create disabled - should fail - Bug 8884; ---source include/show_msg.inc -# --error 1227 -# create trigger trg4a_1 before INSERT on t1 for each row -# set new.f1 = 'trig 3.5.3.7-1a'; - - connection default; - insert into t1 (f1) values ('insert 3.5.3.7-1a'); - select f1 from t1; - --error 0, 1360 - drop trigger trg4a_1; - - connection yes_privs_424a; - use priv_db; - select current_user; - show grants; - create trigger trg4a_2 before INSERT on t1 for each row - set new.f1 = 'trig 3.5.3.7-2a'; - - connection default; - insert into t1 (f1) values ('insert 3.5.3.7-2b'); - select f1 from t1; - -# Cleanup - --disable_warnings - drop trigger trg4a_2; - disconnect no_privs_424a; - disconnect yes_privs_424a; - --enable_warnings - -# --- 3.5.3.7b - Privs set on a database level -let $message= Testcase 3.5.3.7b:; ---source include/show_msg.inc - - revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; - grant SUPER 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; - - revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; - grant SUPER on *.* to test_yesprivs@localhost; - grant UPDATE on priv_db.* to test_yesprivs@localhost; - show grants for test_yesprivs@localhost; - - --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK - connect (no_privs_424b,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); - --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK - connect (yes_privs_424b,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); - connection default; - - connection no_privs_424b; - show grants; - use priv_db; - -let $message= Trigger create disabled - should fail - Bug 8884; ---source include/show_msg.inc -# --error 1227 -# create trigger trg4b_1 before UPDATE on t1 for each row -# set new.f1 = 'trig 3.5.3.7-1b'; - - connection default; - insert into t1 (f1) values ('insert 3.5.3.7-1b'); - select f1 from t1; - update t1 set f1 = 'update 3.5.3.7-1b' where f1 = 'insert 3.5.3.7-1b'; - select f1 from t1; - --error 0, 1360 - drop trigger trg4b_1; - - connection yes_privs_424b; - show grants; - use priv_db; - create trigger trg4b_2 before UPDATE on t1 for each row - set new.f1 = 'trig 3.5.3.7-2b'; - - connection default; - insert into t1 (f1) values ('insert 3.5.3.7-2b'); - select f1 from t1; - update t1 set f1 = 'update 3.5.3.7-2b' where f1 = 'insert 3.5.3.7-2b'; - select f1 from t1; -# Cleanup - --disable_warnings - drop trigger trg4b_2; - disconnect no_privs_424b; - disconnect yes_privs_424b; - --enable_warnings - -# --- 3.5.3.7c - Privs set on a table level -let $message= Testcase 3.5.3.7c; ---source include/show_msg.inc - - revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; - grant SUPER 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; - - revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; - grant SUPER on *.* to test_yesprivs@localhost; - grant UPDATE on priv_db.t1 to test_yesprivs@localhost; - show grants for test_yesprivs@localhost; - - --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK - connect (no_privs_424c,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); - --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK - connect (yes_privs_424c,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); - connection default; - - connection no_privs_424c; - show grants; - use priv_db; - -let $message= Trigger create disabled - should fail - Bug 8884; ---source include/show_msg.inc -# --error 1227 -# create trigger trg4c_1 before INSERT on t1 for each row -# set new.f1 = 'trig 3.5.3.7-1c'; - - connection default; - insert into t1 (f1) values ('insert 3.5.3.7-1c'); - select f1 from t1; - --error 0, 1360 - drop trigger trg4c_1; - - connection yes_privs_424c; - show grants; - use priv_db; - create trigger trg4c_2 before INSERT on t1 for each row - set new.f1 = 'trig 3.5.3.7-2c'; - - connection default; - insert into t1 (f1) values ('insert 3.5.3.7-2c'); - select f1 from t1; - -# Cleanup - --disable_warnings - drop trigger trg4c_2; - disconnect no_privs_424c; - disconnect yes_privs_424c; - --enable_warnings - -# --- 3.5.3.7d - Privs set on a column level ---disable_query_log -let $message= Testcase 3.5.3.7d:; ---enable_query_log ---source include/show_msg.inc - - revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; - grant SUPER on *.* to test_noprivs@localhost; -# There is no ALL privs on the column level - grant SELECT (f1), INSERT (f1) on priv_db.t1 to test_noprivs@localhost; - show grants for test_noprivs; - - revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; - grant SUPER on *.* to test_yesprivs@localhost; - grant UPDATE (f1) on priv_db.t1 to test_yesprivs@localhost; - show grants for test_noprivs; - - --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK - connect (no_privs_424d,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); - --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK - connect (yes_privs_424d,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); - connection default; - - connection no_privs_424d; - show grants; - use priv_db; -let $message= Trigger create disabled - should fail - Bug 8884; ---source include/show_msg.inc -# --error 1227 -# create trigger trg4d_1 before INSERT on t1 for each row -# set new.f1 = 'trig 3.5.3.7-1d'; - - connection default; - insert into t1 (f1) values ('insert 3.5.3.7-1d'); - select f1 from t1; - --error 0, 1360 - drop trigger trg4d_1; - - connection yes_privs_424d; - show grants; - use priv_db; - create trigger trg4d_2 before INSERT on t1 for each row - set new.f1 = 'trig 3.5.3.7-2d'; - - connection default; - insert into t1 (f1) values ('insert 3.5.3.7-2d'); - select f1 from t1; - -# Cleanup - --disable_warnings - drop trigger trg4d_2; - disconnect no_privs_424d; - disconnect yes_privs_424d; - --enable_warnings - -#Section 3.5.3.8 -# Test case: Ensure that use of the construct "SET <target> = NEW. <Column name>" fails -# at CREATE TRIGGER time, if the current user does not have the SELECT privilege -# on the column specified. - -# --- 3.5.3.8a - Privs set on a global level -let $message= Testcase 3.5.3.8a:; ---source include/show_msg.inc - - 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; - - revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; - grant SUPER, SELECT on *.* to test_yesprivs@localhost; - show grants for test_yesprivs@localhost; - - --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK - connect (no_privs_425a,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); - --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK - connect (yes_privs_425a,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); - connection default; - - connection no_privs_425a; - select current_user; - use priv_db; - show grants; - -let $message= Trigger create disabled - should fail - Bug 8887; ---source include/show_msg.inc -# --error 1227 -# create trigger trg5a_1 before INSERT on t1 for each row -# set @test_var = new.f1; - - connection default; - set @test_var = 'before trig 3.5.3.8-1a'; - select @test_var; - insert into t1 (f1) values ('insert 3.5.3.8-1a'); - select @test_var; - --error 0, 1360 - drop trigger trg5a_1; - - connection yes_privs_425a; - use priv_db; - select current_user; - show grants; - create trigger trg5a_2 before INSERT on t1 for each row - set @test_var= new.f1; - - connection default; - set @test_var= 'before trig 3.5.3.8-2a'; - select @test_var; - insert into t1 (f1) values ('insert 3.5.3.8-2a'); - select @test_var; - -# Cleanup - --disable_warnings - drop trigger trg5a_2; - disconnect no_privs_425a; - disconnect yes_privs_425a; - --enable_warnings - -# --- 3.5.3.8b - Privs set on a database level -let $message= Testcase: 3.5.3.8b; ---source include/show_msg.inc - - revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; - grant SUPER 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; - - revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; - grant SUPER on *.* to test_yesprivs@localhost; - grant SELECT on priv_db.* to test_yesprivs@localhost; - show grants for test_yesprivs@localhost; - - --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK - connect (no_privs_425b,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); - --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK - connect (yes_privs_425b,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); - connection default; - - connection no_privs_425b; - show grants; - use priv_db; - -let $message= Trigger create disabled - should fail - Bug 8887; ---source include/show_msg.inc -# --error 1227 -# create trigger trg5b_1 before UPDATE on t1 for each row -# set @test_var= new.f1; - - connection default; - set @test_var= 'before trig 3.5.3.8-1b'; - insert into t1 (f1) values ('insert 3.5.3.8-1b'); - select @test_var; - update t1 set f1= 'update 3.5.3.8-1b' where f1 = 'insert 3.5.3.8-1b'; - select @test_var; - --error 0, 1360 - drop trigger trg5b_1; - - connection yes_privs_425b; - show grants; - use priv_db; - create trigger trg5b_2 before UPDATE on t1 for each row - set @test_var= new.f1; - - connection default; - set @test_var= 'before trig 3.5.3.8-2b'; - insert into t1 (f1) values ('insert 3.5.3.8-2b'); - select @test_var; - update t1 set f1= 'update 3.5.3.8-2b' where f1 = 'insert 3.5.3.8-2b'; - select @test_var; -# Cleanup - --disable_warnings - drop trigger trg5b_2; - disconnect no_privs_425b; - disconnect yes_privs_425b; - --enable_warnings - -# --- 3.5.3.8c - Privs set on a table level -let $message= Testcase 3.5.3.8c:; ---source include/show_msg.inc - - revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; - grant SUPER 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; - - revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; - grant SUPER on *.* to test_yesprivs@localhost; - grant SELECT on priv_db.t1 to test_yesprivs@localhost; - show grants for test_yesprivs@localhost; - - --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK - connect (no_privs_425c,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); - --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK - connect (yes_privs_425c,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); - connection default; - - connection no_privs_425c; - show grants; - use priv_db; - -let $message= Trigger create disabled - should fail - Bug 8887; ---source include/show_msg.inc -# --error 1227 -# create trigger trg5c_1 before INSERT on t1 for each row -# set @test_var= new.f1; - - connection default; - set @test_var= 'before trig 3.5.3.8-1c'; - insert into t1 (f1) values ('insert 3.5.3.8-1c'); - select @test_var; - --error 0, 1360 - drop trigger trg5c_1; - - connection yes_privs_425c; - show grants; - use priv_db; - create trigger trg5c_2 before INSERT on t1 for each row - set @test_var= new.f1; - - connection default; - set @test_var='before trig 3.5.3.8-2c'; - insert into t1 (f1) values ('insert 3.5.3.8-2c'); - select @test_var; -# Cleanup - --disable_warnings - drop trigger trg5c_2; - disconnect no_privs_425c; - disconnect yes_privs_425c; - --enable_warnings - -# --- 3.5.3.8d - Privs set on a column level -let $message=Testcase: 3.5.3.8d:; ---source include/show_msg.inc - - revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; - grant SUPER on *.* to test_noprivs@localhost; -# There is no ALL prov on the column level - grant UPDATE (f1), INSERT (f1) on priv_db.t1 to test_noprivs@localhost; - show grants for test_noprivs@localhost; - - revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; - grant SUPER on *.* to test_yesprivs@localhost; - grant SELECT (f1) on priv_db.t1 to test_yesprivs@localhost; - show grants for test_noprivs@localhost; - - --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK - connect (no_privs_425d,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); - --replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK - connect (yes_privs_425d,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); - connection default; - - connection no_privs_425d; - show grants; - use priv_db; -let $message= Trigger create disabled - should fail - Bug 8887; ---source include/show_msg.inc -# --error 1227 -# create trigger trg5d_1 before INSERT on t1 for each row -# set @test_var= new.f1; - - connection default; - set @test_var='before trig 3.5.3.8-1d'; - insert into t1 (f1) values ('insert 3.5.3.8-1d'); - select @test_var; - --error 0, 1360 - drop trigger trg5d_1; - - connection yes_privs_425d; - show grants; - use priv_db; - create trigger trg5d_2 before INSERT on t1 for each row - set @test_var= new.f1; - - connection default; - set @test_var='before trig 3.5.3.8-2d'; - insert into t1 (f1) values ('insert 3.5.3.8-2d'); - select @test_var; - -# Cleanup 3.5.3.8 - --disable_warnings - drop trigger trg5d_2; - --enable_warnings - -# Cleanup 3.5.3 - --disable_warnings - drop database if exists priv_db; - drop user test_yesprivs@localhost; - drop user test_noprivs@localhost; - drop user test_noprivs; - --enable_warnings - -#################################### -############ Section 3.5.4 ######### -# Drop Trigger Checkes: # -#################################### -let $message= Testcase 3.5.4:; ---source include/show_msg.inc - - connection default; - use test; - -#Section 3.5.4.1 -# Testcase: Ensure that the DROP TRIGGER statement cleanly drops its target trigger. -let $message= Testcase 3.5.4.1:; ---source include/show_msg.inc - - connection con_super; - create database db_drop; - Use db_drop; - eval create table t1 (f1 char(30)) engine=$engine_type; - 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'; - connection con_general; - Use db_drop; - Insert into t1 values ('Insert error 3.5.4.1'); - Select * from t1; - connection con_super; - drop trigger trg1; - select trigger_schema, trigger_name, event_object_table - from information_schema.triggers; - connection con_general; - Insert into t1 values ('Insert no trigger 3.5.4.1'); - Select * from t1; - -#Cleanup - --disable_warnings - connection con_super; - --disable_warnings - --error 0,1360 - drop trigger trg1; - drop database if exists db_drop; - revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost'; - --enable_warnings - -#Section 3.5.4.2 -# Test case: Ensure that DROP TRIGGER <trigger name> fails, with an appropriate error -# message, if the trigger name does not exist. -let $message= Testcase 3.5.4.2:; ---source include/show_msg.inc - - connection con_super; - create database db_drop2; - Use db_drop2; - --disable_warnings - drop table if exists t1_432 ; - --enable_warnings - eval create table t1_432 (f1 char (30)) engine=$engine_type; - --error 1360 - Drop trigger tr_does_not_exit; -#cleanup - --disable_warnings - drop table if exists t1_432 ; - drop database if exists db_drop2; - --enable_warnings - -#Section 3.5.4.3 -# Test case: Ensure that DROP TRIGGER <trigger name> fails, with an appropriate -# error message, if <trigger name> is not a qualified name. -let $message= Testcase 3.5.4.3:; ---source include/show_msg.inc - - connection con_super; - create database db_drop3; - Use db_drop3; - --disable_warnings - drop table if exists t1_433 ; - drop table if exists t1_433a ; - --enable_warnings - eval create table t1_433 (f1 char (30)) engine=$engine_type; - eval create table t1_433a (f1a char (5)) engine=$engine_type; - - CREATE TRIGGER trg3 BEFORE INSERT on t1_433 for each row - set new.f1 = 'Trigger 3.5.4.3'; - -# Using table - --error 1064 - Drop trigger t1.433.trg3; - -# Using database.table - --error 1064 - Drop trigger db_drop3.t1.433.trg3; - -# wrong database - --error 1360 - Drop trigger mysql.trg3; - -# database does not exist - --error 1360 - Drop trigger tbx.trg3; - -#cleanup - Drop trigger db_drop3.trg3; - drop table if exists t1_433; - drop table if exists t1_433a; - drop database if exists db_drop3; - -#Section 3.5.4.4 -# Test case: Ensure that when a database is dropped, all triggers created within -# that database are also cleanly dropped. -let $message= Testcase 3.5.4.4:; ---source include/show_msg.inc - - connection con_super; - create database db_drop4; - Use db_drop4; - eval create table t1 (f1 char(30)) engine=$engine_type; - 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'; - connection con_general; - Use db_drop4; - Insert into t1 values ('Insert 3.5.4.4'); - Select * from t1; - connection con_super; - Drop database db_drop4; - Show databases; - select trigger_schema, trigger_name, event_object_table - from information_schema.triggers - where information_schema.triggers.trigger_name='trg4'; - create database db_drop4; - Use db_drop4; - eval create table t1 (f1 char(30)) engine=$engine_type; - grant INSERT, SELECT on db_drop4.t1 to test_general; - connection con_general; - Insert into t1 values ('2nd Insert 3.5.4.4'); - Select * from t1; - -#Cleanup - connection con_super; - --disable_warnings - --error 1360 - drop trigger trg4; - drop database if exists db_drop4; - --enable_warnings - revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost'; - -#Section 3.5.4.5 -# Test case: Ensure that when a table is dropped, all triggers for which it is the -# subject table are also cleanly dropped. -let $message= Testcase 3.5.4.5:; ---source include/show_msg.inc - - connection con_super; - create database db_drop5; - Use db_drop5; - eval create table t1 (f1 char(50)) engine=$engine_type; - 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'; - connection con_general; - Use db_drop5; - Insert into t1 values ('Insert 3.5.4.5'); - Select * from t1; - connection con_super; - Drop table t1; - Show tables; - select trigger_schema, trigger_name, event_object_table - from information_schema.triggers - where information_schema.triggers.trigger_name='trg5'; - eval create table t1 (f1 char(50)) engine=$engine_type; - grant INSERT, SELECT on t1 to test_general; - connection con_general; - Insert into t1 values ('2nd Insert 3.5.4.5'); - Select * from t1; - -#Cleanup - connection con_super; - --disable_warnings - --error 1360 - drop trigger trg5; - drop database if exists db_drop5; - --enable_warnings - revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost'; - - -################################## -######### Section 3.5.5 ########## -# Checks on the Subject Table # -################################## - -let $message= Testcase 3.5.5:; ---source include/show_msg.inc - - connection default; - use test; - -#Section 3.5.5.1 -# Test case: Ensure that, if CREATE TRIGGER is executed with a non-existent -# subject table, the statement fails with an appropriate error message. -let $message= Testcase 3.5.5.1:; ---source include/show_msg.inc - - --error 1146 - Create trigger trg1 before INSERT on t100 for each row set new.f2=1000; - - -#Section 3.5.5.2 -# Test case: Ensure that, if CREATE TRIGGER is executed with a temporary table -# as the subject table, the statement fails with an appropriate error message. -let $message= Testcase 3.5.5.2:; ---source include/show_msg.inc - - Create temporary table t1_temp (f1 bigint signed, f2 bigint unsigned); - - --error 1361 - Create trigger trg2 before INSERT - on t1_temp for each row set new.f2=9999; - -#Cleanup - --disable_warnings - drop table t1_temp; - --enable_warnings - - -#Section 3.5.5.3 -# Test case: Ensure that, if CREATE TRIGGER is executed with a view as the subject -# table, the statement fails with an appropriate error message. -let $message= Testcase 3.5.5.3:; ---source include/show_msg.inc - - Create view vw3 as select f118 from tb3; - -# OBN Not sure why the server is returning error 1347 - --error 1347 - Create trigger trg3 before INSERT - on vw3 for each row set new.f118='s'; - -#Cleanup - --disable_warnings - drop view vw3; - --enable_warnings - - -#Section 3.5.5.4 -# Test case: Ensure that, if CREATE TRIGGER is executed with a table that resides -# in a different database than in which the trigger will reside, the -# statement fails with an appropriate error message; that is, ensure that -# the trigger and its subject table must reside in the same database. -let $message= Testcase 3.5.5.4:; ---source include/show_msg.inc - - connection con_super; - create database dbtest_one; - create database dbtest_two; - use dbtest_two; - create table t2 (f1 char(15)); - use dbtest_one; - --error 1435 - create trigger trg4 before INSERT - on dbtest_two.t2 for each row set new.f1='trig 3.5.5.4'; - grant INSERT, SELECT on dbtest_two.t2 to test_general; - grant SELECT on dbtest_one.* to test_general; - connection con_general; - use dbtest_two; - Insert into t2 values ('1st Insert 3.5.5.4'); - Select * from t2; - use dbtest_one; - Insert into dbtest_two.t2 values ('2nd Insert 3.5.5.4'); - Select * from dbtest_two.t2; - -#Cleanup - connection con_super; - --disable_warnings - revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost'; - DROP DATABASE if exists dbtest_one; - drop database if EXISTS dbtest_two; - --enable_warnings - -##################################### -########### Section 3.5.6 ########### -# Check on the Trigger Action Time # -##################################### - -let $message= Testcase 3.5.6:; ---source include/show_msg.inc - - connection default; - use test; - -#Section 3.5.6.1 -# Test case: Ensure that a trigger definition can specify a trigger action time of BEFORE. -# See section 3.5.1.1 -let $message= Testcase 3.5.6.1 (see Testcase 3.5.1.1); ---source include/show_msg.inc - -#Section 3.5.6.2 -# Test case: Ensure that a trigger definition can specify a trigger action time of AFTER. -# See section 3.5.1.1 -let $message= Testcase 3.5.6.2 (see Testcase 3.5.1.1); ---source include/show_msg.inc - -#Section 3.5.6.3 -# Test case: Ensure that a trigger definition that specifies a trigger action -# time that is not either BEFORE or AFTER fails, with an appropriate -# error message, at CREATE TRIGGER time. -let $message= Testcase 3.5.6.3:; ---source include/show_msg.inc - - --error 1064 - Create trigger trg3_1 DURING UPDATE on tb3 for each row set new.f132=25; - --error 1064 - Create trigger trg3_2 TIME INSERT on tb3 for each row set new.f132=15; - -#Cleanup -# OBN - Although none of the above should have been created we should do a cleanup -# since if they have been created, not dropping them will affect following -# tests. - --disable_warnings - --error 0, 1360 - drop trigger tb3.trg3_1; - --error 0, 1360 - drop trigger tb3.trg3_2; - --enable_warnings - -#Section 3.5.6.4 -# Test case: Ensure that a trigger defined with a trigger action time of BEFORE -# always executes its triggered action immediately before the trigger event. -# See section 3.5.1.1 -let $message= Testcase 3.5.6.4 (see Testcase 3.5.1.1); ---source include/show_msg.inc - -#Section 3.5.6.5 -# Test case: Ensure that a trigger defined with a trigger action time of AFTER -# always executes its triggered action immediately after the trigger event. -let $message= Testcase 3.5.6.5 (see Testcase 3.5.1.1); ---source include/show_msg.inc - -############################# -####### Section 3.5.7 ####### -# Check on Trigger Event # -############################# - -#Section 3.5.7.1 -#Test case: Ensure that a trigger definition can specify a trigger event of INSERT. -let $message= Testcase 3.5.7.1 (see Testcase 3.5.1.1); ---source include/show_msg.inc - -#Section 3.5.7.2 -# Test case: Ensure that a trigger definition can specify a trigger event of UPDATE. -let $message= Testcase 3.5.7.2 (see Testcase 3.5.1.1); ---source include/show_msg.inc - -#Section 3.5.7.3 -# Test case: Ensure that a trigger definition can specify a trigger event of DELETE. -let $message= Testcase 3.5.7.3 (see Testcase 3.5.1.1); ---source include/show_msg.inc - -#Section 3.5.7.4 -# Test case: Ensure that a trigger definition that specifies a trigger event that -# is not either INSERT, UPDATE or DELETE fails, with an appropriate error -# message, at CREATE TRIGGER time. -let $message= Testcase 3.5.7.4:; ---source include/show_msg.inc - - --error 1064 - Create trigger trg4_1 BEFORE SELECT on tb3 for each row set new.f132=5; - --error 1064 - Create trigger trg4_2 AFTER VALUE on tb3 for each row set new.f132=1; - -#Cleanup -# OBN - Although none of the above should have been created we should do a cleanup -# since if they have been created, not dropping them will affect following -# tests. - --disable_warnings - --error 0, 1360 - drop trigger tb3.trg4_1; - --error 0, 1360 - drop trigger tb3.trg4_2; - --enable_warnings - -#Section 3.5.7.5 / 3.5.7.6 -# Test case: Ensure that it is not possible to create multiple BEFORE INSERT triggers -# on the same table, even if the triggers have different names / different -# triggered actions. -let $message= Testcase 3.5.7.5 / 3.5.7.6:; ---source include/show_msg.inc - - Create trigger trg5_1 BEFORE INSERT - on tb3 for each row set new.f122='Trigger1 3.5.7.5/6'; - - --error 1359 - Create trigger trg5_2 BEFORE INSERT - on tb3 for each row set new.f122='Trigger2 3.5.7.5'; - - 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'; - 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'; - -#Cleanup - --disable_warnings - drop trigger trg5_1; - --error 0, 1360 - drop trigger trg5_2; - delete from tb3 where f121='Test 3.5.7.5/6'; - --enable_warnings - - -#Section 3.5.7.7 / 3.5.7.8 -# Test case: Ensure that it is not possible to create multiple AFTER INSERT triggers -# on the same table, even if the triggers have different names / different -# triggered actions. -let $message= Testcase 3.5.7.7 / 3.5.7.8:; ---source include/show_msg.inc - - 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'; - - --error 1359 - Create trigger trg6_2 AFTER INSERT - on tb3 for each row set @test_var='Trigger2 3.5.7.7'; - - select @test_var; - 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'; - select @test_var; - 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'; - select @test_var; - -#Cleanup - --disable_warnings - drop trigger trg6_1; - --error 0, 1360 - drop trigger trg6_2; - delete from tb3 where f121='Test 3.5.7.7/8'; - --enable_warnings - - -#Section 3.5.7.9 / 3.5.7.10 -# Test case: Ensure that it is not possible to create multiple BEFORE UPDATE triggers -# on the same table, even if the triggers have different names / different -# triggered actions. -let $message= Testcase 3.5.7.9/10:; ---source include/show_msg.inc - - Create trigger trg7_1 BEFORE UPDATE - on tb3 for each row set new.f122='Trigger1 3.5.7.9/10'; - - --error 1359 - Create trigger trg7_2 BEFORE UPDATE - on tb3 for each row set new.f122='Trigger2 3.5.7.9'; - - 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'; - 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'; - -#Cleanup - --disable_warnings - drop trigger trg7_1; - --error 0, 1360 - drop trigger trg7_2; - delete from tb3 where f121='Test 3.5.7.9/10'; - -#Section 3.5.7.11 / 3.5.7.12 -# Test case: Ensure that it is not possible to create multiple AFTER UPDATE triggers -# on the same table, even if the triggers have different names / different -# triggered actions. -let $message= Testcase 3.5.7.11/12:; ---source include/show_msg.inc - - 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'; - - --error 1359 - Create trigger trg8_2 AFTER UPDATE - on tb3 for each row set @test_var='Trigger2 3.5.7.11'; - - - select @test_var; - Insert into tb3 (f121,f122) values ('Test 3.5.7.11/12','Insert 3.5.7.11/12'); - select @test_var; - Select f121,f122 from tb3 where f121='Test 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'; - select @test_var; - delete from tb3 where f121='Test 3.5.7.11/12'; - -#Cleanup - --disable_warnings - drop trigger trg8_1; - --error 0, 1360 - drop trigger trg8_2; - delete from tb3 where f121='Test 3.5.7.11/12'; - -#Section 3.5.7.13 / 3.5.7.14 -# Test case: Ensure that it is not possible to create multiple BEFORE DELETE triggers -# on the same table, even if the triggers have different names / different -# triggered actions. -let $message= Testcase 3.5.7.13/14:; ---source include/show_msg.inc - - set @test_var=1; - Create trigger trg9_1 BEFORE DELETE - on tb3 for each row set @test_var=@test_var+1; - - --error 1359 - Create trigger trg9_2 BEFORE DELETE - on tb3 for each row set @test_var=@test_var+10; - - select @test_var; - 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'; - select @test_var; - delete from tb3 where f121='Test 3.5.7.13/14'; - Select f121,f122 from tb3 where f121='Test 3.5.7.13/14'; - select @test_var; - delete from tb3 where f121='Test 3.5.7.13/14'; - select @test_var; - -#Cleanup - --disable_warnings - drop trigger trg9_1; - --error 0, 1360 - drop trigger trg9_2; - delete from tb3 where f121='Test 3.5.7.13/14'; - -#Section 3.5.7.15 / 3.5.7.16 -# Test case: Ensure that it is not possible to create multiple AFTER DELETE triggers -# on the same table, even if the triggers have different names / different -# triggered actions. -let $message= Testcase 3.5.7.15/16:; ---source include/show_msg.inc - - set @test_var=1; - Create trigger trg_3_406010_1 AFTER DELETE - on tb3 for each row set @test_var=@test_var+5; - - --error 1359 - Create trigger trg_3_406010_2 AFTER DELETE - on tb3 for each row set @test_var=@test_var+50; - - --error 1359 - Create trigger trg_3_406010_1 AFTER INSERT - on tb3 for each row set @test_var=@test_var+1; - - select @test_var; - 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'; - select @test_var; - delete from tb3 where f121='Test 3.5.7.15/16'; - Select f121,f122 from tb3 where f121='Test 3.5.7.15/16'; - select @test_var; - delete from tb3 where f121='Test 3.5.7.15/16'; - select @test_var; - -#Cleanup - --disable_warnings - drop trigger trg_3_406010_1; - --error 0, 1360 - drop trigger trg_3_406010_2; - delete from tb3 where f121='Test 3.5.7.15/16'; - --enable_warnings - - -#Section 3.5.7.17 -# Test case: Ensure that it is possible to have a BEFORE INSERT, an AFTER INSERT, -# a BEFORE UPDATE, an AFTER UPDATE, a BEFORE DELETE, and an AFTER DELETE -# trigger on the same table; that is, ensure that every persistent base -# table may be the subject table for exactly six triggers -let $message= Testcase 3.5.7.17 (see Testcase 3.5.1.1); ---source include/show_msg.inc - - -################################# -####### Section 3.5.8 ########### -# Checks on Triggered Actions # -################################# - -#Section 3.5.8.1 -# Testcase: Ensure that the triggered action of every trigger always executes -# correctly and the results in all expected changes made to the database -let $message= Testcase 3.5.8.1: (implied in previous tests); ---source include/show_msg.inc -# OBN - FIXME - Missing 3.5.8.1 need to add - -#Section 3.5.8.2 -# Testcase: Ensure that the triggered actions of every trigger never results -# in an unexpected change made to the database. -let $message= Testcase 3.5.8.2: (implied in previous tests); ---source include/show_msg.inc - - -#Section 3.5.8.3 / 3.5.8.4 -#Test case: Ensure that the triggered action can any valid SQL statement / set -# of valid SQL statements, provided the statements are written within -# a BEGIN/END compound statement construct -# OBN - At this point the tests focuses on the the INSERT/UPDATE/DELETE SQL statements -# as there are the most likely to be used in triggers -let $message= Testcase 3.5.8.3/4:; ---source include/show_msg.inc - -# creating test tables to perform the trigger SQL on - connection con_super; - 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; - eval 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=$engine_type; - eval 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=$engine_type; - eval 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=$engine_type; - 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); - -let $message= 3.5.8.4 - multiple SQL; ---source include/show_msg.inc -# Trigger definition - multiple SQL - use test; - delimiter //; - 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// - delimiter ;// - -# Test trigger execution - multiple SQL - connection con_general; - 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'; - select * from db_test.t1_i; - select * from db_test.t1_u; - select * from db_test.t1_d; - select @test_var; - - -let $message= 3.5.8.4 - single SQL - insert; ---source include/show_msg.inc -# Trigger definition - single SQL Insert - connection con_super; - Create trigger trg2 BEFORE UPDATE on tb3 for each row - insert into db_test.t1_i - values (new.f120, new.f136, new.f144, new.f163); - -# Trigger exeution - single SQL Insert - connection con_general; - 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%'; - select * from db_test.t1_i; - - -let $message= 3.5.8.4 - single SQL - update; ---source include/show_msg.inc -# Trigger definition - single SQL update - connection con_super; - 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; - -# Trigger exeution - single SQL - update; - connection con_general; - 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%'; - select * from db_test.t1_u; - - -let $message= 3.5.8.3/4 - single SQL - delete; ---source include/show_msg.inc -# Trigger definition - single SQL delete - connection con_super; - drop trigger trg3; - Create trigger trg4 AFTER UPDATE on tb3 for each row - delete from db_test.t1_d where d136= new.f136; - -# Trigger exeution - single SQL delete - connection con_general; -#lock tables tb3 write, db_test.t1_i write, db_test.t1_u write, db_test.t1_d write; - update tb3 set f120='D', f136=444, - f122='Test 3.5.8.4-Single Delete' - where f122='Test 3.5.8.4-Single Update'; -#unlock tables; - Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%'; - select * from db_test.t1_d; - - -let $message= 3.5.8.3/4 - single SQL - select; ---source include/show_msg.inc -# Trigger definition - single SQL select - connection con_super; - 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; - -# Trigger exeution - single SQL select - connection con_general; - 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%'; - select @test_var; - -#Cleanup - connection default; - --disable_warnings - 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'; - --enable_warnings - - -#Section 3.5.8.5 (IF) -# Test case: Ensure that the stored procedure-specific flow control statement like IF -# works correctly when it is a part of the triggered action portion of a -# trigger definition. -let $message= Testcase 3.5.8.5 (IF):; ---source include/show_msg.inc - - delimiter //; - 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// - delimiter ;// - - 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'; - 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'; - 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'; - 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'; - - delimiter //; - --error 1064 - create trigger trg3 before update on tb3 for each row - BEGIN - ELSEIF new.f120='2' then - END IF; - END// - --error 0, 1360 - drop trigger trg3// - - --error 1064 - 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// - delimiter ;// - --error 0, 1360 - drop trigger trg4; - -#Cleanup - --disable_warnings - drop trigger trg2; - delete from tb3 where f121='Test 3.5.8.5-if'; - --enable_warnings - - -#Section 3.5.8.5 (CASE) -# Test case: Ensure that the stored procedure-specific flow control statement -# like CASE works correctly when it is a part of the triggered action -# portion of a trigger definition. -let $message= Testcase 3.5.8.5-case:; ---source include/show_msg.inc - - delimiter //; - 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// - delimiter ;// - - 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'; - 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'; - 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'; - Insert into tb3 (f120, f122, f136) - values ('d', 'Test 3.5.8.5-case', 152); - select f120, f122, f136, f144, @test_var - from tb3 where f122 = 'Test 3.5.8.5-case'; - Insert into tb3 (f120, f122, f136, f144) - values ('e', 'Test 3.5.8.5-case', 200, 8); - select f120, f122, f136, f144, @test_var - from tb3 where f122 = 'Test 3.5.8.5-case'; - --error 0, 1339 - 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'; - - delimiter //; - --error 1064 - create trigger trg3a before update on tb3 for each row - BEGIN - CASE - when new.f136<100 then set new.f120='p'; - END// - delimiter ;// - - --error 0, 1360 - drop trigger trg3a; - -#Cleanup - --disable_warnings - drop trigger trg3; - delete from tb3 where f121='Test 3.5.8.5-case'; - --enable_warnings - -#Section 3.5.8.5 (LOOP) -# Test case: Ensure that the stored procedure-specific flow control -# statement like LOOP / LEAVE work correctly when they are -# part of the triggered action portion of a trigger definition. -let $message= Testcase 3.5.8.5-loop/leave:; ---source include/show_msg.inc - - delimiter //; - 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// - delimiter ;// - Insert into tb3 (f122, f136, f144) - values ('Test 3.5.8.5-loop', 2, 8); - select @counter, @flag; - Insert into tb3 (f122, f136, f144) - values ('Test 3.5.8.5-loop', 11, 8); - select @counter, @flag; - - - delimiter //; - - --error 1064 - Create trigger trg4_2 after update on tb3 for each row - BEGIN - Label1: loop - set @counter=@counter+1; - END; - END// - delimiter ;// - --error 0, 1360 - drop trigger trg4_2; - -#Cleanup - --disable_warnings - drop trigger trg4; - delete from tb3 where f122='Test 3.5.8.5-loop'; - --enable_warnings - -#Section 3.5.8.5 (REPEAT ITERATE) -#Testcase: Ensure that the stored procedure-specific flow control statements -# like REPEAT work correctly when they are part of the triggered action -# portion of a trigger definition. -let $message= Testcase 3.5.8.5-repeat:; ---source include/show_msg.inc - - delimiter //; - 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// - delimiter ;// - - set @counter1= 0, @counter2= 0; - Insert into tb3 (f122, f136) - values ('Test 3.5.8.5-repeat', 13); - select @counter1, @counter2; - - - delimiter //; - --error 1064 - Create trigger trg6_2 after update on tb3 for each row - BEGIN - REPEAT - SET @counter2 = @counter2 + 1; - END// - delimiter ;// - -#Cleanup - --disable_warnings - drop trigger trg6; - delete from tb3 where f122='Test 3.5.8.5-repeat'; - --enable_warnings - - -#Section 3.5.8.5 (WHILE) -# Test case: Ensure that the stored procedure-specific flow control -# statements WHILE, work correctly when they are part of -# the triggered action portion of a trigger definition. -let $message= Testcase 3.5.8.5-while:; ---source include/show_msg.inc - - delimiter //; - 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// - delimiter ;// - - set @counter1= 0, @counter2= 0; - Insert into tb3 (f122, f136) - values ('Test 3.5.8.5-while', 7); - select @counter1, @counter2; - delimiter //; - --error 1064 - Create trigger trg7_2 after update on tb3 for each row - BEGIN - WHILE @counter1 < new.f136 - SET @counter1 = @counter1 + 1; - END// - delimiter ;// - -#Cleanup - --disable_warnings - delete from tb3 where f122='Test 3.5.8.5-while'; - drop trigger trg7; - --enable_warnings - -#Section 3.5.8.6 -# Test case: Ensure that a trigger definition that includes a CALL to a stored -# procedure fails, at CREATE TRIGGER time, with an appropriate error -# message -# OBN - requirement void since allowed -# Fails due to Bug 9909 the bug allows the trigger to be created -# and fails in execution time -let $message= Testcase 3.5.8.6: (requirement void); ---source include/show_msg.inc - - -#Section 3.5.8.7 -# Test case: Ensure that a trigger definition that includes a -# transaction-delimiting statement (e.g. COMMIT, -# ROLLBACK, START TRANSACTION) fails, at CREATE TRIGGER -# time, with an appropriate error message. -# OBN - Fails due to Bug ____ -let $message= Testcase 3.5.8.7: (Disabled as a result of bug _____); ---source include/show_msg.inc - -# --error 1314 -# Create trigger trg9_1 before update on tb3 for each row -# BEGIN -# Start transaction; -# Set new.f120='U'; -# Commit; -# END; - -# --error 1314 -# Create trigger trg9_2 before delete on tb3 for each row -# BEGIN -# Start transaction; -# Set @var2=old.f120; -# Rollback; -# END; - -################################# -####### Section 3.5.9 ########### -# Checks on old and new rows # -################################# - -#Section 3.5.9.1 -#Test case: Ensure that every trigger executes its triggered action on each row -# that meets the conditions stated in the trigger definition. -#Section 3.5.9.2 -#Testcase: Ensure that a trigger never executes its triggered action on any row -# that doesn't meet the conditions stated in the trigger definition. -let $message= Testcase 3.5.9.1/2:; ---source include/show_msg.inc - - Create trigger trg1 BEFORE UPDATE on tb3 for each row - set new.f142 = 94087, @counter=@counter+1; ---disable_query_log - select count(*) as TotalRows from tb3; - select count(*) as Affected from tb3 where f130<100; - select count(*) as NotAffected from tb3 where f130>=100; - select count(*) as NewValuew from tb3 where f142=94087; ---enable_query_log - set @counter=0; - Update tb3 Set f142='1' where f130<100; - select count(*) as ExpectedChanged, @counter as TrigCounter - from tb3 where f142=94087; - select count(*) as ExpectedNotChange from tb3 - where f130<100 and f142<>94087; - select count(*) as NonExpectedChanged from tb3 - where f130>=130 and f142=94087; - -#Cleanup - --disable_warnings - drop trigger trg1; - --enable_warnings - - -#Section 3.5.9.3 -#Test case: Ensure that a reference to OLD.<column name> always correctly refers -# to the values of the specified column of the subject table before a -# data row is updated or deleted. -let $message= Testcase 3.5.9.3:; ---source include/show_msg.inc - - 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; - - ---disable_query_log - set @tr_var_b4_118=0, @tr_var_b4_121=0, @tr_var_b4_122=0, - @tr_var_b4_136=0, @tr_var_b4_163=0; - set @tr_var_af_118=0, @tr_var_af_121=0, @tr_var_af_122=0, - @tr_var_af_136=0, @tr_var_af_163=0; - select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, - @tr_var_b4_136, @tr_var_b4_163; - select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, - @tr_var_af_136, @tr_var_af_163; ---enable_query_log - - 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'; - select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, - @tr_var_b4_136, @tr_var_b4_163; - select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, - @tr_var_af_136, @tr_var_af_163; - ---disable_query_log - set @tr_var_b4_118=0, @tr_var_b4_121=0, @tr_var_b4_122=0, - @tr_var_b4_136=0, @tr_var_b4_163=0; - set @tr_var_af_118=0, @tr_var_af_121=0, @tr_var_af_122=0, - @tr_var_af_136=0, @tr_var_af_163=0; - select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, - @tr_var_b4_136, @tr_var_b4_163; - select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, - @tr_var_af_136, @tr_var_af_163; ---enable_query_log - - 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'; - select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, - @tr_var_b4_136, @tr_var_b4_163; - select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, - @tr_var_af_136, @tr_var_af_163; -#Cleanup - --disable_warnings - drop trigger trg2_a; - drop trigger trg2_b; - drop trigger trg2_c; - drop trigger trg2_d; - --enable_warnings - -#Section 3.5.9.4 -#Test case: Ensure that a reference to NEW.<column name> always correctly refers -# to the values of the specified column of the subject table after an -# existing data row has been updated or a new data row has been inserted. -let $message= Testcase 3.5.9.4:; ---source include/show_msg.inc - - 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; - ---disable_query_log - set @tr_var_b4_118=0, @tr_var_b4_121=0, @tr_var_b4_122=0, - @tr_var_b4_136=0, @tr_var_b4_151=0, @tr_var_b4_163=0; - set @tr_var_af_118=0, @tr_var_af_121=0, @tr_var_af_122=0, - @tr_var_af_136=0, @tr_var_af_151=0, @tr_var_af_163=0; - 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; - 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; ---enable_query_log - - 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%'; - 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; - 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; - ---disable_query_log - set @tr_var_b4_118=0, @tr_var_b4_121=0, @tr_var_b4_122=0, - @tr_var_b4_136=0, @tr_var_b4_151=0, @tr_var_b4_163=0; - set @tr_var_af_118=0, @tr_var_af_121=0, @tr_var_af_122=0, - @tr_var_af_136=0, @tr_var_af_151=0, @tr_var_af_163=0; - 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; - 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; ---enable_query_log - - Update tb3 Set f122='Test 3.5.9.4-trig', f136=NULL, f151=DEFAULT, f163=NULL - where f122='Test 3.5.9.4'; - - select f118, f121, f122, f136, f151, f163 from tb3 - where f122 like 'Test 3.5.9.4-trig'; - 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; - 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; -#Cleanup - --disable_warnings - 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'; - --enable_warnings - - -#Section 3.5.9.5 -# Test case: Ensure that the definition of an INSERT trigger can include a -# reference to NEW. <Column name>. -let $message= Testcase 3.5.9.5: (implied in previous tests); ---source include/show_msg.inc - -#Section 3.5.9.6 -# Test case: Ensure that the definition of an INSERT trigger cannot include -# a reference to OLD. <Column name>. -let $message= Testcase 3.5.9.6:; ---source include/show_msg.inc - - --error 1363 - create trigger trg4a before insert on tb3 for each row - set @temp1= old.f120; - --error 1362 - create trigger trg4b after insert on tb3 for each row - set old.f120= 'test'; - -#Cleanup - --disable_warnings - --error 0, 1360 - drop trigger trg4a; - --error 0, 1360 - drop trigger trg4b; - --enable_warnings - - -#Section 3.5.9.7 -# Test case: Ensure that the definition of an UPDATE trigger can include a -# reference to NEW. <Column name>. -let $message= Testcase 3.5.9.7: (implied in previous tests); ---source include/show_msg.inc - -#Section 3.5.9.8 -# Test case: Ensure that the definition of an UPDATE trigger cannot include a -# reference to OLD. <Column name>. -let $message= Testcase 3.5.9.8: (implied in previous tests); ---source include/show_msg.inc - -#Section 3.5.9.9 -# Test case: Ensure that the definition of a DELETE trigger cannot include a -# reference to NEW.<column name>. -let $message= Testcase 3.5.9.9:; ---source include/show_msg.inc - - --error 1363 - create trigger trg5a before DELETE on tb3 for each row - set @temp1=new.f122; - --error 1363 - create trigger trg5b after DELETE on tb3 for each row - set new.f122='test'; -let $message= The above returns the wrong error, should be error 1362 (Bug 11648) ---source include/show_msg.inc - -#Cleanup - --disable_warnings - --error 0, 1360 - drop trigger trg5a; - --error 0, 1360 - drop trigger trg5b; - --enable_warnings - - -#Section 3.5.9.10 -# Test case: Ensure that the definition of a DELETE trigger can include a reference -# to OLD.<column name>. -let $message= Testcase 3.5.9.10: (implied in previous tests); ---source include/show_msg.inc - - -#Section 3.5.9.11 -# Testcase: Ensure that trigger definition that includes a referance to -# NEW.<colunm name> fails with an appropriate error message, -# at CREATE TRIGGER time, if the trigger event in not INSERT or UPDATE -let $message= Testcase 3.5.9.11: covered by 3.5.9.9; ---source include/show_msg.inc - - -#Section 3.5.9.12 -# Testcase: Ensure that trigger definition that includes a referance to -# OLD.<column name> fails with an appropriate error message, at -# CREATE TRIGGER time, if the trigger event is not DELETE or UPDATE -let $message= Testcase 3.5.9.12: covered by 3.5.9.6; ---source include/show_msg.inc - - -#Section 3.5.9.13 -# Test case: Ensure that all references to OLD. <Column name> are read-only, -# that is, that they cannot be used to modify a data row. -let $message= Testcase 3.5.9.13:; ---source include/show_msg.inc - - --error 1362 - create trigger trg6a before UPDATE on tb3 for each row - set old.f118='C', new.f118='U'; - --error 1362 - create trigger trg6b after INSERT on tb3 for each row - set old.f136=163, new.f118='U'; - --error 1362 - create trigger trg6c after UPDATE on tb3 for each row - set old.f136=NULL; - -#Cleanup - --disable_warnings - --error 0, 1360 - drop trigger trg6a; - --error 0, 1360 - drop trigger trg6b; - --error 0, 1360 - drop trigger trg6c; - --enable_warnings - - -#Section 3.5.9.14 -# Test case: Ensure that all references to NEW. <Column name> may be used both to -# read a data row and to modify a data row -let $message= Testcase 3.5.9.14: (implied in previous tests); ---source include/show_msg.inc - - -############################################## -################ Section 3.5.10 ################# -# Check on Trigger Activation -############################################## -#Section 3.5.10.1 -# Test case: Ensure that every trigger that should be activated by -# every possible type of implicit insertion into its subject -# table (INSERT into a view based on the subject table) is -# indeed activated correctly -#Section 3.5.10.2 -# Test case: Ensure that every trigger that should be activated by every -# possible type of implicit insertion into its subject table -# (UPDATE into a view based on the subject table) is indeed -# activated correctly -#Section 3.5.10.3 -# Test case: Ensure that every trigger that should be activated by every -# possible type of implicit insertion into its subject table -# (DELETE from a view based on the subject table) is indeed -# activated correctly -let $message= Testcase 3.5.10.1/2/3:; ---source include/show_msg.inc - - 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; - -#Section 3.5.10.1 - 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%'; - select f121, f122, f151, f163 from vw11; - select f121, f122, f151, f163 - from tb3 where f122 like 'Not in View'; - -#Section 3.5.10.2 - Update vw11 set f163=1; - select f121, f122, f151, f163 from tb3 - where f122 like 'Test 3.5.10.1/2/3%'; - select f121, f122, f151, f163 from vw11; - -#Section 3.5.10.3 - set @test_var=0; - Select @test_var as 'before delete'; - delete from vw11 where f151=1; - select f121, f122, f151, f163 from tb3 - where f122 like 'Test 3.5.10.1/2/3%'; - select f121, f122, f151, f163 from vw11; - Select @test_var as 'after delete'; - -#Cleanup - --disable_warnings - 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%'; - --enable_warnings - - -#Section 3.5.10.4 -# Test case: Ensure that every trigger that should be activated by every -# possible type of implicit insertion into its subject table -# (LOAD into the subject table) is indeed activated correctly -let $message= Testcase 3.5.10.4:; ---source include/show_msg.inc - - eval create table tb_load (f1 int, f2 char(25),f3 int) engine=$engine_type; - 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'; - --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR - eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table tb_load; - - select @counter as 'Rows Loaded After'; - Select * from tb_load limit 10; - -#Cleanup - --disable_warnings - drop trigger trg4; - drop table tb_load; - --enable_warnings - - -#Section 3.5.10.5 -# Testcase: Ensure that every trigger that should be activated by every possible -# type of implicit update of its subject table (e.g.a FOREIGN KEY SET -# DEFAULT action or an UPDATE of a view based on the subject table) is -# indeed activated correctly -let $message= Testcase 3.5.10.5: (implemented in trig_frkey.test); ---source include/show_msg.inc - - -#Section 3.5.10.6 -# Testcase: Ensure that every trigger that should be activated by every possible -# type of implicit deletion from its subject table (e.g.a FOREIGN KEY -# CASCADE action or a DELETE from a view based on the subject table) is -# indeed activated correctly -let $message= Testcase 3.5.10.6: (implemented in trig_frkey.test); ---source include/show_msg.inc - -#Section 3.5.10.extra -# Testcase: Ensure that every trigger that should be activated by every possible -# type of implicit deletion from its subject table (e.g. an action performed -# on the subject table from a stored procedure is indeed activated correctly -let $message= Testcase 3.5.10.extra:; ---source include/show_msg.inc - - eval create table t1_sp (var136 tinyint, var151 decimal) engine=$engine_type; - - create trigger trg before insert on t1_sp - for each row set @counter=@counter+1; - # declare continue handler for sqlstate '01000' set done = 1; - - delimiter //; - 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// - delimiter ;// - - set @counter=0; - select @counter; - --error 1329 - call trig_sp(); - select @counter; - select count(*) from tb3; - select count(*) from t1_sp; - -#Cleanup - --disable_warnings - drop procedure trig_sp; - drop trigger trg; - drop table t1_sp; - --enable_warnings - -################################## -########## Section 3.5.11 ######## -# Check on Trigger Performance # -################################## -#Section 3.5.11.1 -# Testcase: Ensure that a set of complicated, interlocking triggers that are activated -# by multiple trigger events on no fewer than 50 different tables with at least -# 500,000 rows each, all work correctly, return the correct results, and have -# the correct effects on the database. It is expected that the Services Provider -# will use its own skills and experience in database testing to devise tables and -# triggers that fulfill this requirement. -let $message= Testcase 3.5.11.1 (implemented in trig_perf.test); ---source include/show_msg.inc - -# Cleanup section 3.5 - connection default; - drop user test_general@localhost; - drop user test_general; - drop user test_super@localhost; - -########################################## -# Other Scenasrios (not in requirements) # -########################################## -# Testcase: y.y.y.2: -# Checking for triggers starting triggers (no direct requirement) -let $message= Testcase y.y.y.2: Check for triggers starting triggers; ---source include/show_msg.inc - - use test; - --disable_warnings - 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; - --enable_warnings - - create table t1 (f1 integer); - create table t2_1 (f1 integer); - create table t2_2 (f1 integer); - create table t2_3 (f1 integer); - create table t2_4 (f1 integer); - create table t3 (f1 integer); - - insert into t1 values (1); - delimiter //; - 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// - delimiter ;// - - 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); - -#lock tables t1 write, t2_1 write, t2_2 write, t2_3 write, t2_4 write, t3 write; - insert into t1 values (1); -#unlock tables; - select * from t3; - -#Cleanup - --disable_warnings - 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; - --enable_warnings - -# Testcase: y.y.y.3: -# Checking for circular trigger definitions -let $message= Testcase y.y.y.3: Circular trigger reference; ---source include/show_msg.inc - use test; - --disable_warnings - drop table if exists t1; - drop table if exists t2; - drop table if exists t3; - drop table if exists t4; - --enable_warnings - eval create table t1 (f1 integer) engine = $engine_type; - eval create table t2 (f2 integer) engine = $engine_type; - eval create table t3 (f3 integer) engine = $engine_type; - eval create table t4 (f4 integer) engine = $engine_type; - - 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); - - # OBN See bug 11896 - --error 1442 - insert into t1 values (1); - select * from t1; - select * from t2; - select * from t3; - select * from t4; - -#Cleanup - --disable_warnings - drop trigger tr1; - drop trigger tr2; - drop trigger tr3; - drop trigger tr4; - drop table t1; - drop table t2; - drop table t3; - drop table t4; - --enable_warnings - - -#Section y.y.y.4 -# Testcase: create recursive trigger/storedprocedures conditions -let $message= Testcase y.y.y.4: Recursive trigger/SP references (disabled bug 11889); ---source include/show_msg.inc - -set @sql_mode='traditional'; - eval create table t1_sp ( - count integer, - var136 tinyint, - var151 decimal) engine=$engine_type; - - delimiter //; - 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// - delimiter ;// - - create trigger trg before insert on t1_sp - for each row call trig_sp(); - - set @counter=0; - select @counter; - --error 1424 - call trig_sp(); - select @counter; - select count(*) from tb3; - select count(*) from t1_sp; - -#Cleanup - --disable_warnings - drop procedure trig_sp; - drop trigger trg; - drop table t1_sp; - --enable_warnings - - -# Testcase: y.y.y.5: -# Checking rollback of nested trigger definitions -let $message= Testcase y.y.y.5: Roleback of nested trigger references; ---source include/show_msg.inc - - set @@sql_mode='traditional'; - use test; - --disable_warnings - drop table if exists t1; - drop table if exists t2; - drop table if exists t3; - drop table if exists t4; - --enable_warnings - eval create table t1 (f1 integer) engine = $engine_type; - eval create table t2 (f2 integer) engine = $engine_type; - eval create table t3 (f3 integer) engine = $engine_type; - eval create table t4 (f4 tinyint) engine = $engine_type; - show create table t1; - 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); - -#lock tables t1 write, t2 write, t3 write, t4 write; - - set autocommit=0; - start transaction; - --error 1264 - insert into t1 values (1); - commit; - select * from t1; - select * from t2; - select * from t3; -#unlock tables; -#Cleanup - --disable_warnings - drop trigger tr1; - drop trigger tr2; - drop trigger tr3; - drop table t1; - drop table t2; - drop table t3; - drop table t4; - --enable_warnings - diff --git a/mysql-test/suite/funcs_1/views/func_view.inc b/mysql-test/suite/funcs_1/views/func_view.inc index c477eafc610..fee9fe190b2 100644 --- a/mysql-test/suite/funcs_1/views/func_view.inc +++ b/mysql-test/suite/funcs_1/views/func_view.inc @@ -3,11 +3,8 @@ # Functions within VIEWs # # # ################################################### -# 14.09.2005 ML +# Created 2005-09-14 mleich -let $message= ! Attention: The file with the expected results suffers from -Bug#10713: mysqldump includes database in create view and referenced tables; ---source include/show_msg80.inc # # 0. Some notes about this test: # ################################################################# @@ -15,9 +12,9 @@ Bug#10713: mysqldump includes database in create view and referenced tables; # 0.1 This test is unfinished and incomplete, but already useful. # ----------------------------------------------------------------- # 0.1.1 There will be architectural changes in future. -# The long sequences with +# The long sequences with # let $col_type= <column to use>; -# --source suite/funcs_1/views/<file containing the +# --source suite/funcs_1/views/<file containing the # select with function> # per every column type do not look very smart. # @@ -42,20 +39,13 @@ Bug#10713: mysqldump includes database in create view and referenced tables; # which was valid during VIEW creation time. This means some variations # of the SQL mode are needed. # 0.1.3 There are much more functions to be tested. -# 0.1.4 There are problems with the option "--ps-protocol". -# Double values with 15 digit mantissa are printed with 14 digit -# mantissa (Bug#11589). -# I altered the Minimum/Maximum double values to 14 digit mantissa -# to avoid these problems. But there are some other unsolved problems -# with "--ps-protocol". ---disable_ps_protocol -# 0.1.5 The result sets of some CAST sub testcases with ugly function parameter +# 0.1.4 The result sets of some CAST sub testcases with ugly function parameter # column data type combinations must be discussed. # # # 0.2 How to valuate the test results: # --------------------------------------------------------------------------- -# Due to the extreme "greedy bug hunting" architecture (combinatorics +# Due to the extreme "greedy bug hunting" architecture (combinatorics # + heavy use of sourced scripts) of the following tests, there will be # - no abort of the test execution, when one statements gets an return # code != 0 (The sub testcases are independend.) @@ -68,13 +58,13 @@ Bug#10713: mysqldump includes database in create view and referenced tables; # But there will be a special messages within the protocol files. # Example: # "Attention: CAST --> SIGNED INTEGER -# The file with expected results suffers from Bug 5083 5913 9809"; +# The file with expected results suffers from Bug 5913"; # means, the file with expected results contains result sets which # are known to be wrong. -# "Attention: The last <whatever> failed" +# "Attention: The last <whatever> failed" # means, a statement which should be successful (bugfree MySQL) # failed. -# +# # "Passed" : The behaviour of your MySQL version does not differ from the # version used to generate the files with expected results. # Known bugs affecting these tests could be retrieved by @@ -96,7 +86,7 @@ Bug#10713: mysqldump includes database in create view and referenced tables; # with the suspicious result set or server response. # Now all t1_values records are preloaded. # 2. Start the server without the initial cleanup of databases etc. -# This preserves the content of the table t1_values, which +# This preserves the content of the table t1_values, which # might be needed for replaying the situation. # Example: # ./mysql-test-run.pl --socket=var/tmp/master.sock --start-dirty @@ -157,7 +147,7 @@ Bug#10713: mysqldump includes database in create view and referenced tables; # The script will work with the VIEWs, but omit the simple selects. # The "reject" file contains the view select result sets. # 3. Compare the "reject" files of 1. and 2. within a graphical diff tool. -# +# # --disable_warnings @@ -187,6 +177,7 @@ CREATE TABLE t1_modes --enable_query_log # The table to be used in the FROM parts of the SELECTs +--replace_result $type <engine_to_be_tested> eval CREATE TABLE t1_values ( id BIGINT AUTO_INCREMENT, @@ -197,7 +188,7 @@ eval CREATE TABLE t1_values ##### BEGIN Basic preparations ####################################### # # 1. Extend t1_values with the columns you need -# - the column name must show the data type +# - the column name must show the data type # - do not add NOT NULL columns # - do not worry if the intended column data type is not # available for some storage engines @@ -229,7 +220,7 @@ ALTER TABLE t1_values ADD my_decimal DECIMAL(64,30); # we do not want to start with "illegal/unexpected/..." values. # Such experiments should be done in other testcases. # Please be careful -# - modifying column values of predefined rows they might change many +# - modifying column values of predefined rows they might change many # result sets # - additional predefined rows should be really useful for the majority of # all sub testcases, since they blow up all result sets. @@ -255,20 +246,18 @@ INSERT INTO t1_values SET my_bigint = -9223372036854775808, my_decimal = -9999999999999999999999999999999999.999999999999999999999999999999 , my_double = -1.7976931348623E+308; -# Note(ML): Values like -# - my_timestamp = '19700101030000' do not work -# - my_double = -1.7976931348623157E+308 cause problems with -# --ps-protocol (Bug#11589) +# shortened due to bug#32285 +# my_double = -1.7976931348623157E+308; # # 2.3 record -- everything to "maximum" # numbers, date/time types -> maximum of range # strings, blobs, binaries -> '<- full length of used data type>' # FIXME enum, set ?? INSERT INTO t1_values SET - my_char_30 = '<--------30 characters------->', + my_char_30 = '<--------30 characters------->', my_varchar_1000 = CONCAT('<---------1000 characters', RPAD('',965,'-'),'--------->'), - my_binary_30 = '<--------30 characters------->', + my_binary_30 = '<--------30 characters------->', my_varbinary_1000 = CONCAT('<---------1000 characters', RPAD('',965,'-'),'--------->'), my_datetime = '9999-12-31 23:59:59', @@ -279,10 +268,8 @@ INSERT INTO t1_values SET my_bigint = 9223372036854775807, my_decimal = +9999999999999999999999999999999999.999999999999999999999999999999 , my_double = 1.7976931348623E+308; -# Note(ML): Values like -# - my_timestamp = '20380101030000' do not work -# - my_double = 1.7976931348623157E+308 cause problems with -# --ps-protocol (Bug#11589) +# shortened due to bug#32285 +# my_double = -1.7976931348623157E+308; # # 2.4 record -- everything to "magic" value if available or # other interesting value @@ -291,28 +278,28 @@ INSERT INTO t1_values SET # characters and preceeding and trailing spaces # FIXME enum, set ?? INSERT INTO t1_values SET - my_char_30 = ' ---äÖüß@µ*$-- ', - my_varchar_1000 = ' ---äÖüß@µ*$-- ', - my_binary_30 = ' ---äÖüß@µ*$-- ', - my_varbinary_1000 = ' ---äÖüß@µ*$-- ', + my_char_30 = ' ---äÖüß@µ*$-- ', + my_varchar_1000 = ' ---äÖüß@µ*$-- ', + my_binary_30 = ' ---äÖüß@µ*$-- ', + my_varbinary_1000 = ' ---äÖüß@µ*$-- ', my_datetime = '2004-02-29 23:59:59', my_date = '2004-02-29', my_timestamp = '2004-02-29 23:59:59', my_time = '13:00:00', my_year = 2000, - my_bigint = 0, + my_bigint = 0, my_decimal = 0.0, my_double = 0; # # 2.5 record -- everything to "harmless" value if available # numbers -> -1 (logical) -# strings, blobs, binaries -> '-1' useful for numeric functions +# strings, blobs, binaries -> '-1' useful for numeric functions # FIXME enum, set ?? INSERT INTO t1_values SET - my_char_30 = '-1', - my_varchar_1000 = '-1', - my_binary_30 = '-1', - my_varbinary_1000 = '-1', + my_char_30 = '-1', + my_varchar_1000 = '-1', + my_binary_30 = '-1', + my_varbinary_1000 = '-1', my_datetime = '2005-06-28 10:00:00', my_date = '2005-06-28', my_timestamp = '2005-06-28 10:00:00', @@ -330,11 +317,11 @@ INSERT INTO t1_values SET # records which should be used dedicated to the SELECT above # - Please avoid WHERE clauses # - Include the PRIMARY KEY ("id") of the base table t1_values into the -# select column list -# - Include the base table column used as function parameter into the -# select column list, because it is much easier to check the results +# select column list +# - Include the base table column used as function parameter into the +# select column list, because it is much easier to check the results # - Do not forget to escape single quotes -# Example: +# Example: # SET @my_select = 'SELECT sqrt(my_bigint), my_bigint, id FROM t1_values' # SET @my_select = 'SELECT CONCAT(\'A\',my_char_30), id FROM t1_values'; # - Statements, which reveal open crashing bugs MUST be disabled. @@ -347,10 +334,10 @@ INSERT INTO t1_values SET # most preferred function. # This method avoids that we forget a function and gives a better # overview. -# +# # If you have the time to check the result sets do the insert of the # SELECT with function via: -# eval SET @my_select = +# eval SET @my_select = # '<your SELECT>'; # --source suite/funcs_1/views/fv1.inc # fv1.inc sets t1_selects.disable_result to 'No' and the effect will be, @@ -358,7 +345,7 @@ INSERT INTO t1_values SET # # If you do have the time to check the result sets do the insert of the # SELECT with function via: -# eval SET @my_select = +# eval SET @my_select = # '<your SELECT>'; # --source suite/funcs_1/views/fv2.inc # fv2.inc sets t1_selects.disable_result to 'Yes' and the effect will be, @@ -384,7 +371,7 @@ INSERT INTO t1_values SET # # Example: # The function to be tested is "sqrt". -# The minimum, maximum, default and NULL value are covered by the +# The minimum, maximum, default and NULL value are covered by the # predefined rows. # A value where sqrt(<value>) = <integer value> in strict mathematics # would be of interest. @@ -416,11 +403,11 @@ eval INSERT INTO t1_values SET select_id = @select_id, $col_type = -25; # SELECT * FROM t1_values; -# 1. Cast Functions and Operators -# 1.1. CAST +# 1. Cast Functions and Operators +# 1.1 CAST # # Note(ML): I guess the CAST routines are used in many other functions. -# Therefore check also nearly all "ugly" variants like +# Therefore check also nearly all "ugly" variants like # CAST(<string composed of non digits> AS DECIMAL) here. # # suite/funcs_1/views/fv_cast.inc contains @@ -428,6 +415,7 @@ eval INSERT INTO t1_values SET select_id = @select_id, # # # 1.1.1. CAST --> BINARY +--echo ##### 1.1.1. CAST --> BINARY let $target_type= BINARY; # let $col_type= my_char_30; @@ -457,6 +445,7 @@ let $col_type= my_year; # 1.1.2. CAST --> CHAR +--echo ##### 1.1.2. CAST --> CHAR let $target_type= CHAR; # let $col_type= my_char_30; @@ -486,6 +475,7 @@ let $col_type= my_year; # 1.1.3. CAST --> DATE +--echo ##### 1.1.3. CAST --> DATE let $target_type= DATE; # let $col_type= my_char_30; @@ -525,6 +515,7 @@ let $col_type= my_year; # 1.1.4. CAST --> DATETIME +--echo ##### 1.1.4. CAST --> DATETIME let $target_type= DATETIME; # let $col_type= my_char_30; @@ -564,6 +555,7 @@ let $col_type= my_year; # 1.1.5. CAST --> TIME +--echo ##### 1.1.5. CAST --> TIME let $target_type= TIME; # let $col_type= my_char_30; @@ -587,15 +579,10 @@ let $col_type= my_bigint; eval INSERT INTO t1_values SET select_id = @select_id, $col_type = 1758; let $col_type= my_double; -let $message= some statements disabled because of -Bug#12440: CAST(data type DOUBLE AS TIME) strange results; ---source include/show_msg80.inc -if (0) -{ +# Bug#12440: CAST(data type DOUBLE AS TIME) strange results; --source suite/funcs_1/views/fv_cast.inc eval INSERT INTO t1_values SET select_id = @select_id, $col_type = +1.758E+3; -} let $col_type= my_datetime; --source suite/funcs_1/views/fv_cast.inc let $col_type= my_date; @@ -609,6 +596,7 @@ let $col_type= my_year; # 1.1.6. CAST --> DECIMAL +--echo ##### 1.1.6. CAST --> DECIMAL # Set the following to (37,2) since the default was changed to (10,0) - OBN let $target_type= DECIMAL(37,2); # @@ -632,16 +620,11 @@ let $col_type= my_bigint; --source suite/funcs_1/views/fv_cast.inc let $col_type= my_decimal; --source suite/funcs_1/views/fv_cast.inc -let $message= some statements disabled because of -Bug#13349: CAST(1.0E+300 TO DECIMAL) returns wrong result + diff little/big endian; ---source include/show_msg80.inc -if (0) -{ +# Bug#13349: CAST(1.0E+300 TO DECIMAL) returns wrong result + diff little/big endian; let $col_type= my_double; --source suite/funcs_1/views/fv_cast.inc eval INSERT INTO t1_values SET select_id = @select_id, $col_type = -0.33333333E+4; -} let $col_type= my_datetime; --source suite/funcs_1/views/fv_cast.inc let $col_type= my_date; @@ -655,15 +638,13 @@ let $col_type= my_year; # 1.1.7. CAST --> SIGNED INTEGER +--echo ##### 1.1.7. CAST --> SIGNED INTEGER let $target_type= SIGNED INTEGER; # -let $message= +let $message= "Attention: CAST --> SIGNED INTEGER - The file with expected results suffers from - Bug#5083 Big integer values are inserted as negative into - decimal/string columns Bug#5913 Traditional mode: BIGINT range not correctly delimited - Both have the status: To be fixed later"; + Status: To be fixed later"; --source include/show_msg80.inc let $col_type= my_char_30; --source suite/funcs_1/views/fv_cast.inc @@ -677,14 +658,9 @@ let $col_type= my_bigint; --source suite/funcs_1/views/fv_cast.inc let $col_type= my_decimal; --source suite/funcs_1/views/fv_cast.inc -let $message= some statements disabled because of -Bug #13344: CAST(1E+300 TO signed int) on little endian CPU, wrong result; ---source include/show_msg80.inc -if (0) -{ +# Bug #13344: CAST(1E+300 TO signed int) on little endian CPU, wrong result; let $col_type= my_double; --source suite/funcs_1/views/fv_cast.inc -} let $col_type= my_datetime; --source suite/funcs_1/views/fv_cast.inc let $col_type= my_date; @@ -698,11 +674,12 @@ let $col_type= my_year; # 1.1.8. CAST --> UNSIGNED INTEGER +--echo ##### 1.1.8. CAST --> UNSIGNED INTEGER let $target_type= UNSIGNED INTEGER; # -let $message= +let $message= "Attention: CAST --> UNSIGNED INTEGER - The file with expected results suffers from Bug 5083 5913 9809"; + The file with expected results suffers from Bug 5913"; --source include/show_msg80.inc let $col_type= my_char_30; --source suite/funcs_1/views/fv_cast.inc @@ -717,13 +694,11 @@ let $col_type= my_bigint; let $col_type= my_decimal; --source suite/funcs_1/views/fv_cast.inc let $message= some statements disabled because of -Bugs#8663: cant use bgint unsigned as input to cast; +Bug#5913 Traditional mode: BIGINT range not correctly delimited; --source include/show_msg80.inc -if (0) -{ +# Bug#8663 cant use bgint unsigned as input to cast let $col_type= my_double; --source suite/funcs_1/views/fv_cast.inc -} let $col_type= my_datetime; --source suite/funcs_1/views/fv_cast.inc let $col_type= my_date; @@ -748,38 +723,38 @@ let $col_type= my_year; let $target_charset= utf8; # let $col_type= my_char_30; -eval SET @my_select = 'SELECT CONVERT($col_type USING $target_charset), +eval SET @my_select = 'SELECT CONVERT($col_type USING $target_charset), $col_type, id FROM t1_values'; --source suite/funcs_1/views/fv1.inc let $col_type= my_varchar_1000; -eval SET @my_select = 'SELECT CONVERT($col_type USING $target_charset), +eval SET @my_select = 'SELECT CONVERT($col_type USING $target_charset), $col_type, id FROM t1_values'; --source suite/funcs_1/views/fv1.inc let $col_type= my_binary_30; -eval SET @my_select = 'SELECT CONVERT($col_type USING $target_charset), +eval SET @my_select = 'SELECT CONVERT($col_type USING $target_charset), $col_type, id FROM t1_values'; --source suite/funcs_1/views/fv1.inc let $col_type= my_varbinary_1000; -eval SET @my_select = 'SELECT CONVERT($col_type USING $target_charset), +eval SET @my_select = 'SELECT CONVERT($col_type USING $target_charset), $col_type, id FROM t1_values'; --source suite/funcs_1/views/fv1.inc # # 1.3.2 CONVERT(expr USING koi8r) let $target_charset= koi8r; let $col_type= my_char_30; -eval SET @my_select = 'SELECT CONVERT($col_type USING $target_charset), +eval SET @my_select = 'SELECT CONVERT($col_type USING $target_charset), $col_type, id FROM t1_values'; --source suite/funcs_1/views/fv1.inc let $col_type= my_varchar_1000; -eval SET @my_select = 'SELECT CONVERT($col_type USING $target_charset), +eval SET @my_select = 'SELECT CONVERT($col_type USING $target_charset), $col_type, id FROM t1_values'; --source suite/funcs_1/views/fv1.inc let $col_type= my_binary_30; -eval SET @my_select = 'SELECT CONVERT($col_type USING $target_charset), +eval SET @my_select = 'SELECT CONVERT($col_type USING $target_charset), $col_type, id FROM t1_values'; --source suite/funcs_1/views/fv1.inc let $col_type= my_varbinary_1000; -eval SET @my_select = 'SELECT CONVERT($col_type USING $target_charset), +eval SET @my_select = 'SELECT CONVERT($col_type USING $target_charset), $col_type, id FROM t1_values'; --source suite/funcs_1/views/fv1.inc @@ -787,7 +762,7 @@ $col_type, id FROM t1_values'; # 2. Control Flow Functions # 2.1. CASE value WHEN [compare-value] THEN result [WHEN ...] [ELSE result] # END or -# CASE WHEN [condition] THEN result [WHEN ...] [ELSE result] END +# CASE WHEN [condition] THEN result [WHEN ...] [ELSE result] END # # FIXME: to be implemented # @@ -848,11 +823,6 @@ let $col_type= my_year; # select if(isnull(`test`.`t1`.`f1`),_latin1'IS NULL', # _latin1'IS NOT NULL'),... # -let $message= -"Attention: IF($col_type IS NULL, ... - The file with expected results suffers from - Bug#11689. successful CREATE VIEW but SELECT on view fails."; ---source include/show_msg80.inc # Bug#11689 success on Create view .. IF(col1 IS NULL,...), col2 ; but SELECT fails let $col_type= my_char_30; --source suite/funcs_1/views/fv_if2.inc @@ -891,7 +861,7 @@ let $col_type= my_year; --source suite/funcs_1/views/fv_if2.inc -# 2.3. IFNULL(expr1,expr2) +# 2.3. IFNULL(expr1,expr2) # If expr1 is not NULL, IFNULL() returns expr1, else it returns expr2. # # suite/funcs_1/views/fv_ifnull.inc contains @@ -942,7 +912,7 @@ let $col_type= my_year; # 2.4. NULLIF(expr1,expr2) # Returns NULL if expr1 = expr2 is true, else returns expr1. -# This is the same as +# This is the same as # CASE WHEN expr1 = expr2 THEN NULL ELSE expr1 END. # # FIXME: to be implemented @@ -979,11 +949,11 @@ $col_type, id FROM t1_values'; # 3.5. CHAR_LENGTH(str) # 3.6 CHARACTER_LENGTH(str) # CHARACTER_LENGTH() is a synonym for CHAR_LENGTH(). -# 3.7. COMPRESS(string_to_compress) +# 3.7. COMPRESS(string_to_compress) # 3.8. CONCAT(str1,str2,...) # 3.9. CONCAT_WS(separator,str1,str2,...) # 3.10. CONV(N,from_base,to_base) -# 3.11. ELT(N,str1,str2,str3,...) +# 3.11. ELT(N,str1,str2,str3,...) # 3.12. EXPORT_SET(bits,on,off[,separator[,number_of_bits]]) # 3.13. FIELD(str,str1,str2,str3,...) # 3.14. FIND_IN_SET(str,strlist) @@ -1011,55 +981,38 @@ $col_type, id FROM t1_values'; # 3.19. LEFT(str,len) -# Returns the leftmost len characters from the string str. +# Returns the leftmost len characters from the string str. let $col_type= my_char_30; -eval SET @my_select = +eval SET @my_select = 'SELECT LEFT($col_type, 2), $col_type, id FROM t1_values'; --source suite/funcs_1/views/fv1.inc let $col_type= my_varchar_1000; -eval SET @my_select = +eval SET @my_select = 'SELECT LEFT($col_type, 2), $col_type, id FROM t1_values'; --source suite/funcs_1/views/fv1.inc let $col_type= my_binary_30; -eval SET @my_select = +eval SET @my_select = 'SELECT LEFT($col_type, 2), $col_type, id FROM t1_values'; --source suite/funcs_1/views/fv1.inc let $col_type= my_varbinary_1000; -eval SET @my_select = +eval SET @my_select = 'SELECT LEFT($col_type, 2), $col_type, id FROM t1_values'; --source suite/funcs_1/views/fv1.inc -# -let $message= -"Attention: LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', <numeric column>) - The file with expected results suffers from Bug 10963 11728" - and the testcases with length = BIGINT or DOUBLE column are deactivated, - because there are 32/64 Bit differences; ---source include/show_msg80.inc # Bug#11728 string function LEFT, strange undocumented behaviour, strict mode # Bug#10963 LEFT string function returns wrong result with large length let $col_type= my_bigint; -if (0) -{ -# Bug#10963 LEFT string function returns wrong result with large length -eval SET @my_select = +eval SET @my_select = 'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', $col_type), $col_type, id FROM t1_values'; --source suite/funcs_1/views/fv1.inc -} -# let $col_type= my_decimal; eval SET @my_select = 'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', $col_type), $col_type, id FROM t1_values'; --source suite/funcs_1/views/fv1.inc -# -if (0) -{ # Bug#10963 LEFT string function returns wrong result with large length let $col_type= my_double; eval SET @my_select = 'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', $col_type), $col_type, id FROM t1_values'; --source suite/funcs_1/views/fv1.inc -} - # 3.20. LENGTH(str) let $col_type= my_char_30; @@ -1085,8 +1038,11 @@ $col_type, id FROM t1_values'; # If the file doesn't exist or cannot be read ... , # the function returns NULL. # SELECT LOADFILE -eval SET @my_select = -'SELECT LOAD_FILE(''../log/current_test''), id FROM t1_values'; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval SET @my_select = +'SELECT LOAD_FILE(''$MYSQLTEST_VARDIR/std_data_ln/funcs_1/load_file.txt'') + AS my_col, + id FROM t1_values'; --source suite/funcs_1/views/fv1.inc @@ -1253,8 +1209,8 @@ $col_type, id FROM t1_values'; --source suite/funcs_1/views/fv2.inc -# 3.26. MAKE_SET(bits,str1,str2,...) -# ..... +# 3.26. MAKE_SET(bits,str1,str2,...) +# ..... # FIXME: to be implemented ################################################################################ @@ -1278,6 +1234,7 @@ SET sql_mode = ''; # let $message= "# The basic preparations end and the main test starts here"; --source include/show_msg80.inc +--disable_ps_protocol ##### The tests start here ##################################################### @@ -1306,18 +1263,18 @@ while ($select_id) if ($view_select_result) { # Create the VIEW + --replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> eval CREATE VIEW v1 AS $my_select; --disable_query_log eval set @got_errno= $mysql_errno ; let $run0= `SELECT @got_errno = 0`; - let $print_warning= `SELECT @got_errno`; - if ($print_warning) + --enable_query_log + if (!$run0) { - SELECT 'Attention: The last CREATE VIEW failed ' AS "" - UNION - SELECT '' ; + --echo + --echo Attention: The last CREATE VIEW failed + --echo } - --enable_query_log } # FIXME The loop over the modes will start here. @@ -1325,27 +1282,24 @@ while ($select_id) if ($simple_select_result) { # Simple SELECT on the base table of the VIEW for comparison - + if ($run_no_result) { --disable_result_log } + --replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> eval $my_select - WHERE select_id = $select_id OR select_id IS NULL; + WHERE select_id = $select_id OR select_id IS NULL order by id; if ($run_no_result) { --enable_result_log } - --disable_query_log - eval set @got_errno= $mysql_errno ; - let $print_warning= `SELECT @got_errno`; - if ($print_warning) + if ($mysql_errno) { - SELECT 'Attention: The last SELECT on the base table failed' AS "" - UNION - SELECT '' ; + --echo + --echo Attention: The last SELECT on the base table failed + --echo } - --enable_query_log } # $run0 is 1, if CREATE VIEW was successful. @@ -1353,17 +1307,14 @@ while ($select_id) if ($run0) { # Check the CREATE VIEW statement + --replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> SHOW CREATE VIEW v1; - --disable_query_log - eval set @got_errno= $mysql_errno ; - let $print_warning= `SELECT @got_errno`; - if ($print_warning) + if ($mysql_errno) { - SELECT 'Attention: The last SHOW CREATE VIEW failed' AS "" - UNION - SELECT '' ; + --echo + --echo Attention: The last SHOW CREATE VIEW failed + --echo } - --enable_query_log # Maybe a Join is faster if ($run_no_result) @@ -1372,21 +1323,17 @@ while ($select_id) } eval SELECT v1.* FROM v1 WHERE v1.id IN (SELECT id FROM t1_values - WHERE select_id = $select_id OR select_id IS NULL); + WHERE select_id = $select_id OR select_id IS NULL) order by id; if ($run_no_result) { --enable_result_log } - --disable_query_log - eval set @got_errno= $mysql_errno ; - let $print_warning= `SELECT @got_errno`; - if ($print_warning) + if ($mysql_errno) { - SELECT 'Attention: The last SELECT from VIEW failed' AS "" - UNION - SELECT '' ; + --echo + --echo Attention: The last SELECT from VIEW failed + --echo } - --enable_query_log DROP VIEW v1; } @@ -1395,11 +1342,12 @@ while ($select_id) # Produce two empty lines as separator between different SELECTS # to be tested. - --disable_query_log - SELECT '' AS ""; - --enable_query_log + --echo + --echo dec $select_id ; } +--enable_ps_protocol + DROP TABLE t1_selects, t1_modes, t1_values; diff --git a/mysql-test/suite/funcs_1/views/views_master.inc b/mysql-test/suite/funcs_1/views/views_master.inc index f08082676ed..b6628070705 100644 --- a/mysql-test/suite/funcs_1/views/views_master.inc +++ b/mysql-test/suite/funcs_1/views/views_master.inc @@ -4,7 +4,7 @@ # 2007-10-05 mleich # 1. Fix for Bug#31237 Test "ndb_views" fails because of differing order ... # 2. Cleanup of test -# 2007-11-15 hhunger WL#4084: Review and fix all disabled tests ... +# 2007-11-15 hhunger WL#4084: Review and fix all disabled tests ... let $message= ! Attention: The file with the expected results is not | thoroughly checked. @@ -19,7 +19,7 @@ let $message= ! Attention: The file with the expected results is not # If this bug is fixed, please # 1. set the following variable to 0 # 2. check, if the test passes -# 3. remove the workarounds +# 3. remove the workarounds let $have_bug_32285= 1; if ($have_bug_32285) { @@ -2004,7 +2004,7 @@ let $message= Testcase 3.3.1.49A ; # The annoying redundant # eval INSERT INTO t1_results VALUES (@v3_to_v1_options,@statement, # @v3_to_v1_violation,$mysql_errno); -# could not be put into a file to be sourced because of the closed +# could not be put into a file to be sourced because of the closed # Bug#10267 mysqltest, wrong number of loops when a script is sourced # within a loop # To be implemented later. |