1067 lines
33 KiB
JSON
1067 lines
33 KiB
JSON
[
|
|
{
|
|
"Name": "TestPlanCacheWithDifferentVariableTypes",
|
|
"Cases": [
|
|
{
|
|
"PrepareStmt": "prepare stmt from \"select ?, ?\"",
|
|
"Executes": [
|
|
{
|
|
"SQL": "execute stmt using @v1, @v2",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "1"
|
|
},
|
|
{
|
|
"Name": "v2",
|
|
"Value": "2"
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root 1->Column#1, 2->Column#2",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "0",
|
|
"Result": [
|
|
"1 2"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1, @v2",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "1"
|
|
},
|
|
{
|
|
"Name": "v2",
|
|
"Value": "\"abc\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root 1->Column#1, abc->Column#2",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "0",
|
|
"Result": [
|
|
"1 abc"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1, @v2",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "10"
|
|
},
|
|
{
|
|
"Name": "v2",
|
|
"Value": "\"cba\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root 10->Column#1, cba->Column#2",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"10 cba"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"PrepareStmt": "prepare stmt from \"select a from t1 where t1.b = ?\"",
|
|
"Executes": [
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "3"
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_4 10.00 root test.t1.a",
|
|
"└─IndexReader_6 10.00 root index:IndexRangeScan_5",
|
|
" └─IndexRangeScan_5 10.00 cop[tikv] table:t1, index:b(b, a) range:[3,3], keep order:false, stats:pseudo"
|
|
],
|
|
"LastPlanUseCache": "0",
|
|
"Result": [
|
|
"3"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "2"
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_4 10.00 root test.t1.a",
|
|
"└─IndexReader_6 10.00 root index:IndexRangeScan_5",
|
|
" └─IndexRangeScan_5 10.00 cop[tikv] table:t1, index:b(b, a) range:[2,2], keep order:false, stats:pseudo"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"2"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "-200"
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_4 10.00 root test.t1.a",
|
|
"└─IndexReader_6 10.00 root index:IndexRangeScan_5",
|
|
" └─IndexRangeScan_5 10.00 cop[tikv] table:t1, index:b(b, a) range:[-200,-200], keep order:false, stats:pseudo"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": null
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"abc\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_4 8000.00 root test.t1.a",
|
|
"└─IndexReader_10 8000.00 root index:Selection_9",
|
|
" └─Selection_9 8000.00 cop[tikv] eq(cast(test.t1.b, double BINARY), 0)",
|
|
" └─IndexFullScan_8 10000.00 cop[tikv] table:t1, index:b(b, a) keep order:false, stats:pseudo"
|
|
],
|
|
"LastPlanUseCache": "0",
|
|
"Result": null
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"PrepareStmt": "prepare stmt from \"select t1.c, t2.c from t1 join t2 on t1.b = t2.b and t1.a = t2.a where t1.b = ?\"",
|
|
"Executes": [
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "1"
|
|
}
|
|
],
|
|
"Plan": [
|
|
"HashJoin_38 6387.21 root inner join, equal:[eq(test.t1.b, test.t2.b) eq(test.t1.a, test.t2.a)]",
|
|
"├─IndexLookUp_63(Build) 99.80 root ",
|
|
"│ ├─Selection_62(Build) 99.80 cop[tikv] not(isnull(test.t2.b))",
|
|
"│ │ └─IndexRangeScan_60 99.90 cop[tikv] table:t2, index:b(b, a) range:[1 -inf,1 +inf], keep order:false, stats:pseudo",
|
|
"│ └─TableRowIDScan_61(Probe) 99.80 cop[tikv] table:t2 keep order:false, stats:pseudo",
|
|
"└─IndexLookUp_56(Probe) 99.80 root ",
|
|
" ├─Selection_55(Build) 99.80 cop[tikv] not(isnull(test.t1.b))",
|
|
" │ └─IndexRangeScan_53 99.90 cop[tikv] table:t1, index:b(b, a) range:[1 -inf,1 +inf], keep order:false, stats:pseudo",
|
|
" └─TableRowIDScan_54(Probe) 99.80 cop[tikv] table:t1 keep order:false, stats:pseudo"
|
|
],
|
|
"LastPlanUseCache": "0",
|
|
"Result": null
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "2"
|
|
}
|
|
],
|
|
"Plan": [
|
|
"HashJoin_38 6387.21 root inner join, equal:[eq(test.t1.b, test.t2.b) eq(test.t1.a, test.t2.a)]",
|
|
"├─IndexLookUp_63(Build) 99.80 root ",
|
|
"│ ├─Selection_62(Build) 99.80 cop[tikv] not(isnull(test.t2.b))",
|
|
"│ │ └─IndexRangeScan_60 99.90 cop[tikv] table:t2, index:b(b, a) range:[2 -inf,2 +inf], keep order:false, stats:pseudo",
|
|
"│ └─TableRowIDScan_61(Probe) 99.80 cop[tikv] table:t2 keep order:false, stats:pseudo",
|
|
"└─IndexLookUp_56(Probe) 99.80 root ",
|
|
" ├─Selection_55(Build) 99.80 cop[tikv] not(isnull(test.t1.b))",
|
|
" │ └─IndexRangeScan_53 99.90 cop[tikv] table:t1, index:b(b, a) range:[2 -inf,2 +inf], keep order:false, stats:pseudo",
|
|
" └─TableRowIDScan_54(Probe) 99.80 cop[tikv] table:t1 keep order:false, stats:pseudo"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"222 222"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"abc\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"HashJoin_38 63744383.74 root inner join, equal:[eq(test.t1.b, test.t2.b) eq(test.t1.a, test.t2.a)]",
|
|
"├─TableReader_59(Build) 7984.01 root data:Selection_58",
|
|
"│ └─Selection_58 7984.01 cop[tikv] eq(cast(test.t2.b, double BINARY), 0), not(isnull(test.t2.a)), not(isnull(test.t2.b))",
|
|
"│ └─TableFullScan_57 10000.00 cop[tikv] table:t2 keep order:false, stats:pseudo",
|
|
"└─TableReader_52(Probe) 7984.01 root data:Selection_51",
|
|
" └─Selection_51 7984.01 cop[tikv] eq(cast(test.t1.b, double BINARY), 0), not(isnull(test.t1.a)), not(isnull(test.t1.b))",
|
|
" └─TableFullScan_50 10000.00 cop[tikv] table:t1 keep order:false, stats:pseudo"
|
|
],
|
|
"LastPlanUseCache": "0",
|
|
"Result": null
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"PrepareStmt": "prepare stmt from \"select cast(? as decimal)\"",
|
|
"Executes": [
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"123456789.0123456789012345678901234567890123456789\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(123456789.0123456789012345678901234567890123456789, decimal(len:78)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "0",
|
|
"Result": [
|
|
"123456789"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"1234567.1234567\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(1234567.1234567, decimal(10,0) BINARY)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"1234567"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"0.99999\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(0.99999, decimal(10,0) BINARY)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"1"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"99999.0\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(99999.0, decimal(10,0) BINARY)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"99999"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"-123456789.0123456789012345678901234567890123456789\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(-123456789.0123456789012345678901234567890123456789, decima(len:79)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"-123456789"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"-1234567.1234567\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(-1234567.1234567, decimal(10,0) BINARY)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"-1234567"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"-0.99999\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(-0.99999, decimal(10,0) BINARY)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"-1"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"-99999.0\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(-99999.0, decimal(10,0) BINARY)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"-99999"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"PrepareStmt": "prepare stmt from \"select cast(? as decimal(10,0))\"",
|
|
"Executes": [
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"123456789.0123456789012345678901234567890123456789\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(123456789.0123456789012345678901234567890123456789, decimal(len:78)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "0",
|
|
"Result": [
|
|
"123456789"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"1234567.1234567\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(1234567.1234567, decimal(10,0) BINARY)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"1234567"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"0.99999\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(0.99999, decimal(10,0) BINARY)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"1"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"99999.0\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(99999.0, decimal(10,0) BINARY)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"99999"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"-123456789.0123456789012345678901234567890123456789\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(-123456789.0123456789012345678901234567890123456789, decima(len:79)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"-123456789"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"-1234567.1234567\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(-1234567.1234567, decimal(10,0) BINARY)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"-1234567"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"-0.99999\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(-0.99999, decimal(10,0) BINARY)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"-1"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"-99999.0\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(-99999.0, decimal(10,0) BINARY)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"-99999"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"PrepareStmt": "prepare stmt from \"select cast(? as decimal(5,4))\"",
|
|
"Executes": [
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"123456789.0123456789012345678901234567890123456789\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(123456789.0123456789012345678901234567890123456789, decimal(len:77)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "0",
|
|
"Result": [
|
|
"9.9999"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"1234567.1234567\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(1234567.1234567, decimal(5,4) BINARY)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"9.9999"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"0.99999\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(0.99999, decimal(5,4) BINARY)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"1.0000"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"99999.0\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(99999.0, decimal(5,4) BINARY)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"9.9999"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"-123456789.0123456789012345678901234567890123456789\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(-123456789.0123456789012345678901234567890123456789, decima(len:78)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"-9.9999"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"-1234567.1234567\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(-1234567.1234567, decimal(5,4) BINARY)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"-9.9999"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"-0.99999\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(-0.99999, decimal(5,4) BINARY)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"-1.0000"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"-99999.0\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(-99999.0, decimal(5,4) BINARY)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"-9.9999"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"PrepareStmt": "prepare stmt from \"select cast(? as decimal(64, 30))\"",
|
|
"Executes": [
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"123456789.0123456789012345678901234567890123456789\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(123456789.0123456789012345678901234567890123456789, decimal(len:79)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "0",
|
|
"Result": [
|
|
"123456789.012345678901234567890123456789"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"1234567.1234567\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(1234567.1234567, decimal(64,30) BINARY)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"1234567.123456700000000000000000000000"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"0.99999\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(0.99999, decimal(64,30) BINARY)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"0.999990000000000000000000000000"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"99999.0\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(99999.0, decimal(64,30) BINARY)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"99999.000000000000000000000000000000"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"-123456789.0123456789012345678901234567890123456789\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(-123456789.0123456789012345678901234567890123456789, decima(len:80)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"-123456789.012345678901234567890123456789"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"-1234567.1234567\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(-1234567.1234567, decimal(64,30) BINARY)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"-1234567.123456700000000000000000000000"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"-0.99999\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(-0.99999, decimal(64,30) BINARY)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"-0.999990000000000000000000000000"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"-99999.0\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(-99999.0, decimal(64,30) BINARY)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"-99999.000000000000000000000000000000"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"PrepareStmt": "prepare stmt from \"select cast(? as decimal(15,5))\"",
|
|
"Executes": [
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"123456789.0123456789012345678901234567890123456789\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(123456789.0123456789012345678901234567890123456789, decimal(len:78)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "0",
|
|
"Result": [
|
|
"123456789.01235"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"1234567.1234567\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(1234567.1234567, decimal(15,5) BINARY)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"1234567.12346"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"0.99999\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(0.99999, decimal(15,5) BINARY)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"0.99999"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"99999.0\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(99999.0, decimal(15,5) BINARY)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"99999.00000"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"-123456789.0123456789012345678901234567890123456789\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(-123456789.0123456789012345678901234567890123456789, decima(len:79)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"-123456789.01235"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"-1234567.1234567\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(-1234567.1234567, decimal(15,5) BINARY)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"-1234567.12346"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"-0.99999\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(-0.99999, decimal(15,5) BINARY)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"-0.99999"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"-99999.0\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(-99999.0, decimal(15,5) BINARY)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"-99999.00000"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"PrepareStmt": "prepare stmt from \"select cast(? as decimal(5,5))\"",
|
|
"Executes": [
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"123456789.0123456789012345678901234567890123456789\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(123456789.0123456789012345678901234567890123456789, decimal(len:77)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "0",
|
|
"Result": [
|
|
"0.99999"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"1234567.1234567\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(1234567.1234567, decimal(5,5) BINARY)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"0.99999"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"0.99999\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(0.99999, decimal(5,5) BINARY)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"0.99999"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"99999.0\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(99999.0, decimal(5,5) BINARY)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"0.99999"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"-123456789.0123456789012345678901234567890123456789\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(-123456789.0123456789012345678901234567890123456789, decima(len:78)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"-0.99999"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"-1234567.1234567\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(-1234567.1234567, decimal(5,5) BINARY)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"-0.99999"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"-0.99999\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(-0.99999, decimal(5,5) BINARY)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"-0.99999"
|
|
]
|
|
},
|
|
{
|
|
"SQL": "execute stmt using @v1",
|
|
"Vars": [
|
|
{
|
|
"Name": "v1",
|
|
"Value": "\"-99999.0\""
|
|
}
|
|
],
|
|
"Plan": [
|
|
"Projection_3 1.00 root cast(-99999.0, decimal(5,5) BINARY)->Column#1",
|
|
"└─TableDual_4 1.00 root rows:1"
|
|
],
|
|
"LastPlanUseCache": "1",
|
|
"Result": [
|
|
"-0.99999"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|