|
1495 | 1495 | "user.user"
|
1496 | 1496 | ]
|
1497 | 1497 | }
|
| 1498 | + }, |
| 1499 | + { |
| 1500 | + "comment": "Select literals from table union Select literals from table", |
| 1501 | + "query": "SELECT 1 from user UNION SELECT 2 from user", |
| 1502 | + "plan": { |
| 1503 | + "QueryType": "SELECT", |
| 1504 | + "Original": "SELECT 1 from user UNION SELECT 2 from user", |
| 1505 | + "Instructions": { |
| 1506 | + "OperatorType": "Distinct", |
| 1507 | + "Collations": [ |
| 1508 | + "0" |
| 1509 | + ], |
| 1510 | + "Inputs": [ |
| 1511 | + { |
| 1512 | + "OperatorType": "Route", |
| 1513 | + "Variant": "Scatter", |
| 1514 | + "Keyspace": { |
| 1515 | + "Name": "user", |
| 1516 | + "Sharded": true |
| 1517 | + }, |
| 1518 | + "FieldQuery": "select 1 from `user` where 1 != 1 union select 2 from `user` where 1 != 1", |
| 1519 | + "Query": "select 1 from `user` union select 2 from `user`", |
| 1520 | + "Table": "`user`" |
| 1521 | + } |
| 1522 | + ] |
| 1523 | + }, |
| 1524 | + "TablesUsed": [ |
| 1525 | + "user.user" |
| 1526 | + ] |
| 1527 | + } |
| 1528 | + }, |
| 1529 | + { |
| 1530 | + "comment": "Select column from table union Select literals from table", |
| 1531 | + "query": "select col1 from user union select 3 from user", |
| 1532 | + "plan": { |
| 1533 | + "QueryType": "SELECT", |
| 1534 | + "Original": "select col1 from user union select 3 from user", |
| 1535 | + "Instructions": { |
| 1536 | + "OperatorType": "Distinct", |
| 1537 | + "Collations": [ |
| 1538 | + "(0:1)" |
| 1539 | + ], |
| 1540 | + "ResultColumns": 1, |
| 1541 | + "Inputs": [ |
| 1542 | + { |
| 1543 | + "OperatorType": "Route", |
| 1544 | + "Variant": "Scatter", |
| 1545 | + "Keyspace": { |
| 1546 | + "Name": "user", |
| 1547 | + "Sharded": true |
| 1548 | + }, |
| 1549 | + "FieldQuery": "select col1, weight_string(col1) from (select col1 from `user` where 1 != 1 union select 3 from `user` where 1 != 1) as dt where 1 != 1", |
| 1550 | + "Query": "select col1, weight_string(col1) from (select col1 from `user` union select 3 from `user`) as dt", |
| 1551 | + "Table": "`user`" |
| 1552 | + } |
| 1553 | + ] |
| 1554 | + }, |
| 1555 | + "TablesUsed": [ |
| 1556 | + "user.user" |
| 1557 | + ] |
| 1558 | + } |
| 1559 | + }, |
| 1560 | + { |
| 1561 | + "comment": "Select literals from table union Select column from table", |
| 1562 | + "query": "select 3 from user union select col1 from user", |
| 1563 | + "plan": { |
| 1564 | + "QueryType": "SELECT", |
| 1565 | + "Original": "select 3 from user union select col1 from user", |
| 1566 | + "Instructions": { |
| 1567 | + "OperatorType": "Distinct", |
| 1568 | + "Collations": [ |
| 1569 | + "(0:1)" |
| 1570 | + ], |
| 1571 | + "ResultColumns": 1, |
| 1572 | + "Inputs": [ |
| 1573 | + { |
| 1574 | + "OperatorType": "Route", |
| 1575 | + "Variant": "Scatter", |
| 1576 | + "Keyspace": { |
| 1577 | + "Name": "user", |
| 1578 | + "Sharded": true |
| 1579 | + }, |
| 1580 | + "FieldQuery": "select `3`, weight_string(`3`) from (select 3 from `user` where 1 != 1 union select col1 from `user` where 1 != 1) as dt where 1 != 1", |
| 1581 | + "Query": "select `3`, weight_string(`3`) from (select 3 from `user` union select col1 from `user`) as dt", |
| 1582 | + "Table": "`user`" |
| 1583 | + } |
| 1584 | + ] |
| 1585 | + }, |
| 1586 | + "TablesUsed": [ |
| 1587 | + "user.user" |
| 1588 | + ] |
| 1589 | + } |
| 1590 | + }, |
| 1591 | + { |
| 1592 | + "comment": "Select literals from table union Select now() from table", |
| 1593 | + "query": "select 3 from user union select now() from user", |
| 1594 | + "plan": { |
| 1595 | + "QueryType": "SELECT", |
| 1596 | + "Original": "select 3 from user union select now() from user", |
| 1597 | + "Instructions": { |
| 1598 | + "OperatorType": "Distinct", |
| 1599 | + "Collations": [ |
| 1600 | + "(0:1)" |
| 1601 | + ], |
| 1602 | + "ResultColumns": 1, |
| 1603 | + "Inputs": [ |
| 1604 | + { |
| 1605 | + "OperatorType": "Route", |
| 1606 | + "Variant": "Scatter", |
| 1607 | + "Keyspace": { |
| 1608 | + "Name": "user", |
| 1609 | + "Sharded": true |
| 1610 | + }, |
| 1611 | + "FieldQuery": "select `3`, weight_string(`3`) from (select 3 from `user` where 1 != 1 union select now() from `user` where 1 != 1) as dt where 1 != 1", |
| 1612 | + "Query": "select `3`, weight_string(`3`) from (select 3 from `user` union select now() from `user`) as dt", |
| 1613 | + "Table": "`user`" |
| 1614 | + } |
| 1615 | + ] |
| 1616 | + }, |
| 1617 | + "TablesUsed": [ |
| 1618 | + "user.user" |
| 1619 | + ] |
| 1620 | + } |
| 1621 | + }, |
| 1622 | + { |
| 1623 | + "comment": "Select now() from table union Select literals from table", |
| 1624 | + "query": "select now() from user union select 3 from user", |
| 1625 | + "plan": { |
| 1626 | + "QueryType": "SELECT", |
| 1627 | + "Original": "select now() from user union select 3 from user", |
| 1628 | + "Instructions": { |
| 1629 | + "OperatorType": "Distinct", |
| 1630 | + "Collations": [ |
| 1631 | + "(0:1)" |
| 1632 | + ], |
| 1633 | + "ResultColumns": 1, |
| 1634 | + "Inputs": [ |
| 1635 | + { |
| 1636 | + "OperatorType": "Route", |
| 1637 | + "Variant": "Scatter", |
| 1638 | + "Keyspace": { |
| 1639 | + "Name": "user", |
| 1640 | + "Sharded": true |
| 1641 | + }, |
| 1642 | + "FieldQuery": "select `now()`, weight_string(`now()`) from (select now() from `user` where 1 != 1 union select 3 from `user` where 1 != 1) as dt where 1 != 1", |
| 1643 | + "Query": "select `now()`, weight_string(`now()`) from (select now() from `user` union select 3 from `user`) as dt", |
| 1644 | + "Table": "`user`" |
| 1645 | + } |
| 1646 | + ] |
| 1647 | + }, |
| 1648 | + "TablesUsed": [ |
| 1649 | + "user.user" |
| 1650 | + ] |
| 1651 | + } |
| 1652 | + }, |
| 1653 | + { |
| 1654 | + "comment": "Select now() from table union Select column from table", |
| 1655 | + "query": "select now() from user union select id from user", |
| 1656 | + "plan": { |
| 1657 | + "QueryType": "SELECT", |
| 1658 | + "Original": "select now() from user union select id from user", |
| 1659 | + "Instructions": { |
| 1660 | + "OperatorType": "Distinct", |
| 1661 | + "Collations": [ |
| 1662 | + "(0:1)" |
| 1663 | + ], |
| 1664 | + "ResultColumns": 1, |
| 1665 | + "Inputs": [ |
| 1666 | + { |
| 1667 | + "OperatorType": "Route", |
| 1668 | + "Variant": "Scatter", |
| 1669 | + "Keyspace": { |
| 1670 | + "Name": "user", |
| 1671 | + "Sharded": true |
| 1672 | + }, |
| 1673 | + "FieldQuery": "select `now()`, weight_string(`now()`) from (select now() from `user` where 1 != 1 union select id from `user` where 1 != 1) as dt where 1 != 1", |
| 1674 | + "Query": "select `now()`, weight_string(`now()`) from (select now() from `user` union select id from `user`) as dt", |
| 1675 | + "Table": "`user`" |
| 1676 | + } |
| 1677 | + ] |
| 1678 | + }, |
| 1679 | + "TablesUsed": [ |
| 1680 | + "user.user" |
| 1681 | + ] |
| 1682 | + } |
1498 | 1683 | }
|
1499 | 1684 | ]
|
0 commit comments