/ Check-in [bee2859b]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add a new requirement mark for CAST expressions.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:bee2859b953c935c413de2917588159d03c672d9
User & Date: drh 2016-11-22 20:29:05
Context
2016-11-23
14:19
Correctly display the names of SQL functions in the VDBE_PROFILE output. check-in: 161192f1 user: drh tags: trunk
2016-11-22
22:23
Merge bug fixes and enhancements from trunk. Closed-Leaf check-in: e2c4bdf5 user: drh tags: serializable-snapshot
20:29
Add a new requirement mark for CAST expressions. check-in: bee2859b user: drh tags: trunk
19:15
Update requirement marks to reflect changes in wording in the documentation. No changes to code. check-in: f5ac98ef user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/e_expr.test.

1433
1434
1435
1436
1437
1438
1439







1440
1441
1442
1443
1444
1445
1446
# result of the CAST expression is also NULL.
#
do_expr_test e_expr-27.2.1 { CAST(NULL AS integer) } null {}
do_expr_test e_expr-27.2.2 { CAST(NULL AS text) }    null {}
do_expr_test e_expr-27.2.3 { CAST(NULL AS blob) }    null {}
do_expr_test e_expr-27.2.4 { CAST(NULL AS number) }  null {}








# EVIDENCE-OF: R-43522-35548 Casting a value to a type-name with no
# affinity causes the value to be converted into a BLOB.
#
do_expr_test e_expr-27.3.1 { CAST('abc' AS blob)       } blob abc
do_expr_test e_expr-27.3.2 { CAST('def' AS shobblob_x) } blob def
do_expr_test e_expr-27.3.3 { CAST('ghi' AS abbLOb10)   } blob ghi








>
>
>
>
>
>
>







1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
# result of the CAST expression is also NULL.
#
do_expr_test e_expr-27.2.1 { CAST(NULL AS integer) } null {}
do_expr_test e_expr-27.2.2 { CAST(NULL AS text) }    null {}
do_expr_test e_expr-27.2.3 { CAST(NULL AS blob) }    null {}
do_expr_test e_expr-27.2.4 { CAST(NULL AS number) }  null {}

# EVIDENCE-OF: R-29283-15561 Otherwise, the storage class of the result
# is determined by applying the rules for determining column affinity to
# the type-name.
#
# The R-29283-15561 requirement above is demonstrated by all of the 
# subsequent e_expr-26 tests.
#
# EVIDENCE-OF: R-43522-35548 Casting a value to a type-name with no
# affinity causes the value to be converted into a BLOB.
#
do_expr_test e_expr-27.3.1 { CAST('abc' AS blob)       } blob abc
do_expr_test e_expr-27.3.2 { CAST('def' AS shobblob_x) } blob def
do_expr_test e_expr-27.3.3 { CAST('ghi' AS abbLOb10)   } blob ghi