Traceflag 427 disables the fix for CR 560331 and will turn on eager evaluation of expression virtual VARs that have TXTPTRs as inputs.
CR 560331: "Queries that contain an expression in the select-list that has a column value with a LOB datatype (TEXT, IMAGE, UNITEXT) as an input parameter may generate an access violation/segmentation fault with the function, LeAlignedDataRow::readRow, in the calling stack. This failure can occur if the query plan contains a blocking operator (i.e. HASH JOIN, MERGE JOIN, STORE or SORT OPERATOR in showplan output) above the SCAN OPERATOR that reads in the LOB column value."
An example of "an expression in the select-list that has a column value with a LOB datatype (TEXT, IMAGE, UNITEXT) as an input parameter" is
select xmlextract('/', mytable.textcolumn returns text) from mytable
Example of the full stacktrace that might be seen when the traceflag is active:
kernel SQL Server system exception (0xc0000005) generated by a storage access violation.
kernel Symbolic stack trace information is successfully loaded
kernel pc: 0x0100E163 LeAlignedDataRow::readRow+ 0x6ae (0x228C2030, 0x24693FCC, 0x00000004,
kernel pc: 0x0100E163 LeAlignedDataRow::readRow+ 0x6ae (0x0242E848, 0x00000001, 0x24694F27
kernel pc: 0x010AE012 LeCacheRow::freeReadBuf+ 0x38 (0x24698208, 0x24693CC8, 0x221EB630,
kernel pc: 0x010ADC72 LeCacheRow::writeRow+ 0x40 (0x01EB2D54, 0x24693D68, 0x22950000,
kernel pc: 0x010AB68C LeFifoCache::LeCacheInsert+ 0x2b (0x00000002, 0x00000001, 0x24695604,
kernel pc: 0x0109B0A1 LeMJOp::isMatchingKeys+ 0x271 (0x22950C61, 0x24692C34, 0x24693D54,
kernel pc: 0x0109AB99 LeMJOp::getQualifyingRow+ 0x4c9 (0x01EB2D54, 0x221EB630, 0x22950CFC,
kernel pc: 0x01097967 LeMJOp::_LeOpNext+ 0x5c7 (0x00000000, 0x00000000, 0x00000000, 0x00000000)
kernel pc: 0x0105D516 LeEmittOp::_LeOpNext+ 0x1107 (0x2294E000, 0x221EB630, 0x220CAFE4
kernel pc: 0x00FFF88B LePlanNext+ 0x364 (0x0242F478, 0x0242FB68, 0x019E89F0, 0x00000000)
kernel [Handler pc: 0x00E9810F le_execerr installed by the following function:-]
kernel [Handler pc: 0x00936DCA aritherr installed by the following function:-]
kernel pc: 0x00E97A2C exec_lava+ 0x661 (0x00610066, 0x006C0075, 0x00200074, 0x006F0073)
kernel pc: 0x00942820 s_execute+ 0x5760 (0x22950800, 0x0045B935, 0x0242FB68, 0x019E89F0)
kernel [Handler pc: 0x00969AED s_handle installed by the following function:-]
kernel pc: 0x00964AC9 sequencer+ 0x1c39 (0x00000000, 0x00000000, 0x00000000, 0x00000000)
kernel pc: 0x00455E67 tdsrecv_language+ 0x552 (0x00000003, 0x00000000, 0x00000000, 0x22609ED4)
kernel [Handler pc: 0x007FD4F0 ut_handle installed by the following function:-]
kernel pc: 0x00420FA4 conn_hdlr+ 0x3c56 (0x22609ED4, 0x00000000, 0x00000000, 0x22609ED4)
kernel pc: 0x013B1547 kpntwrapper+ 0x84 (0x013B14C3, 0x22609ED4, 0x00000000, 0x000000C8)
kernel pc: 0x7C80B683 GetModuleFileNameA+ 0x1b4 (0x00000000, 0x00000000, 0x00000000,
kernel end of stack trace, spid 16, kpid 1703962, suid 4
Traceflag 427 might be used because performance of this kind of query is somewhat slower under the fix for 560331.