From: "Gleb" <dmarc-noreply@freelists.org> (Redacted sender "gleb-skiba" for DMARC) To: tarantool-patches@freelists.org Subject: [tarantool-patches] [PATCH] sql: remove support of partial indexes Date: Wed, 4 Apr 2018 11:37:44 +0300 [thread overview] Message-ID: <1522831064-12135-1-git-send-email-gleb-skiba@mail.ru> (raw) Remove support partial indexes. Add test which check inaccessibility of partial index syntax. Comment tests which use partial index. They can be enabled after #2626. Fixes #2165 --- Issue from https://github.com/tarantool/tarantool/issues/2165. Source from https://github.com/tarantool/tarantool/tree/gh-2165-remove-support-partial-indexes. src/box/sql/parse.c | 918 +++++++++++---------- src/box/sql/parse.y | 4 +- test/sql-tap/analyze9.test.lua | 144 ++-- test/sql-tap/autoindex4.test.lua | 35 +- test/sql-tap/fkey1.test.lua | 64 +- ...gh-2165-remove-support-partial-indexes.test.lua | 17 + test/sql-tap/index7.test.lua | 80 +- test/sql-tap/suite.ini | 1 + 8 files changed, 642 insertions(+), 621 deletions(-) create mode 100755 test/sql-tap/gh-2165-remove-support-partial-indexes.test.lua diff --git a/src/box/sql/parse.c b/src/box/sql/parse.c index 0019b77..8af15f1 100644 --- a/src/box/sql/parse.c +++ b/src/box/sql/parse.c @@ -315,16 +315,16 @@ typedef union { #define sqlite3ParserARG_FETCH Parse *pParse = yypParser->pParse #define sqlite3ParserARG_STORE yypParser->pParse = pParse #define YYFALLBACK 1 -#define YYNSTATE 412 +#define YYNSTATE 411 #define YYNRULE 300 -#define YY_MAX_SHIFT 411 -#define YY_MIN_SHIFTREDUCE 608 -#define YY_MAX_SHIFTREDUCE 907 -#define YY_MIN_REDUCE 908 -#define YY_MAX_REDUCE 1207 -#define YY_ERROR_ACTION 1208 -#define YY_ACCEPT_ACTION 1209 -#define YY_NO_ACTION 1210 +#define YY_MAX_SHIFT 410 +#define YY_MIN_SHIFTREDUCE 607 +#define YY_MAX_SHIFTREDUCE 906 +#define YY_MIN_REDUCE 907 +#define YY_MAX_REDUCE 1206 +#define YY_ERROR_ACTION 1207 +#define YY_ACCEPT_ACTION 1208 +#define YY_NO_ACTION 1209 /************* End control #defines *******************************************/ /* Define the yytestcase() macro to be a no-op if is not already defined @@ -396,149 +396,151 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (1406) +#define YY_ACTTAB_COUNT (1430) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 91, 92, 287, 82, 775, 775, 787, 790, 779, 779, - /* 10 */ 89, 89, 90, 90, 90, 90, 309, 88, 88, 88, - /* 20 */ 88, 87, 87, 86, 86, 86, 85, 309, 90, 90, + /* 0 */ 91, 92, 286, 82, 774, 774, 786, 789, 778, 778, + /* 10 */ 89, 89, 90, 90, 90, 90, 308, 88, 88, 88, + /* 20 */ 88, 87, 87, 86, 86, 86, 85, 308, 90, 90, /* 30 */ 90, 90, 83, 88, 88, 88, 88, 87, 87, 86, - /* 40 */ 86, 86, 85, 309, 210, 122, 892, 90, 90, 90, - /* 50 */ 90, 634, 88, 88, 88, 88, 87, 87, 86, 86, - /* 60 */ 86, 85, 309, 87, 87, 86, 86, 86, 85, 309, - /* 70 */ 892, 86, 86, 86, 85, 309, 91, 92, 287, 82, - /* 80 */ 775, 775, 787, 790, 779, 779, 89, 89, 90, 90, - /* 90 */ 90, 90, 637, 88, 88, 88, 88, 87, 87, 86, - /* 100 */ 86, 86, 85, 309, 91, 92, 287, 82, 775, 775, - /* 110 */ 787, 790, 779, 779, 89, 89, 90, 90, 90, 90, - /* 120 */ 724, 88, 88, 88, 88, 87, 87, 86, 86, 86, - /* 130 */ 85, 309, 636, 91, 92, 287, 82, 775, 775, 787, - /* 140 */ 790, 779, 779, 89, 89, 90, 90, 90, 90, 67, + /* 40 */ 86, 86, 85, 308, 210, 122, 891, 90, 90, 90, + /* 50 */ 90, 633, 88, 88, 88, 88, 87, 87, 86, 86, + /* 60 */ 86, 85, 308, 87, 87, 86, 86, 86, 85, 308, + /* 70 */ 891, 86, 86, 86, 85, 308, 91, 92, 286, 82, + /* 80 */ 774, 774, 786, 789, 778, 778, 89, 89, 90, 90, + /* 90 */ 90, 90, 636, 88, 88, 88, 88, 87, 87, 86, + /* 100 */ 86, 86, 85, 308, 91, 92, 286, 82, 774, 774, + /* 110 */ 786, 789, 778, 778, 89, 89, 90, 90, 90, 90, + /* 120 */ 723, 88, 88, 88, 88, 87, 87, 86, 86, 86, + /* 130 */ 85, 308, 635, 91, 92, 286, 82, 774, 774, 786, + /* 140 */ 789, 778, 778, 89, 89, 90, 90, 90, 90, 67, /* 150 */ 88, 88, 88, 88, 87, 87, 86, 86, 86, 85, - /* 160 */ 309, 776, 776, 788, 791, 320, 93, 84, 81, 176, - /* 170 */ 307, 306, 1209, 411, 3, 723, 245, 609, 312, 725, - /* 180 */ 726, 376, 91, 92, 287, 82, 775, 775, 787, 790, - /* 190 */ 779, 779, 89, 89, 90, 90, 90, 90, 884, 88, - /* 200 */ 88, 88, 88, 87, 87, 86, 86, 86, 85, 309, + /* 160 */ 308, 775, 775, 787, 790, 319, 93, 84, 81, 176, + /* 170 */ 306, 305, 1208, 410, 3, 722, 244, 608, 311, 724, + /* 180 */ 725, 375, 91, 92, 286, 82, 774, 774, 786, 789, + /* 190 */ 778, 778, 89, 89, 90, 90, 90, 90, 883, 88, + /* 200 */ 88, 88, 88, 87, 87, 86, 86, 86, 85, 308, /* 210 */ 88, 88, 88, 88, 87, 87, 86, 86, 86, 85, - /* 220 */ 309, 122, 84, 81, 176, 642, 377, 1160, 1160, 828, - /* 230 */ 780, 91, 92, 287, 82, 775, 775, 787, 790, 779, - /* 240 */ 779, 89, 89, 90, 90, 90, 90, 364, 88, 88, - /* 250 */ 88, 88, 87, 87, 86, 86, 86, 85, 309, 903, - /* 260 */ 747, 903, 122, 410, 410, 172, 653, 710, 765, 220, - /* 270 */ 758, 119, 877, 753, 635, 683, 238, 333, 237, 652, - /* 280 */ 91, 92, 287, 82, 775, 775, 787, 790, 779, 779, - /* 290 */ 89, 89, 90, 90, 90, 90, 877, 88, 88, 88, - /* 300 */ 88, 87, 87, 86, 86, 86, 85, 309, 22, 747, - /* 310 */ 757, 757, 759, 201, 693, 651, 359, 356, 355, 692, - /* 320 */ 165, 710, 703, 766, 122, 238, 333, 237, 354, 91, - /* 330 */ 92, 287, 82, 775, 775, 787, 790, 779, 779, 89, - /* 340 */ 89, 90, 90, 90, 90, 747, 88, 88, 88, 88, - /* 350 */ 87, 87, 86, 86, 86, 85, 309, 696, 84, 81, - /* 360 */ 176, 238, 323, 226, 405, 405, 405, 670, 649, 84, - /* 370 */ 81, 176, 752, 122, 218, 369, 670, 340, 91, 92, - /* 380 */ 287, 82, 775, 775, 787, 790, 779, 779, 89, 89, + /* 220 */ 308, 122, 84, 81, 176, 641, 376, 1159, 1159, 827, + /* 230 */ 779, 91, 92, 286, 82, 774, 774, 786, 789, 778, + /* 240 */ 778, 89, 89, 90, 90, 90, 90, 363, 88, 88, + /* 250 */ 88, 88, 87, 87, 86, 86, 86, 85, 308, 902, + /* 260 */ 746, 902, 122, 409, 409, 172, 652, 709, 764, 220, + /* 270 */ 757, 119, 876, 752, 634, 682, 238, 332, 237, 651, + /* 280 */ 91, 92, 286, 82, 774, 774, 786, 789, 778, 778, + /* 290 */ 89, 89, 90, 90, 90, 90, 876, 88, 88, 88, + /* 300 */ 88, 87, 87, 86, 86, 86, 85, 308, 22, 746, + /* 310 */ 756, 756, 758, 201, 692, 650, 358, 355, 354, 691, + /* 320 */ 165, 709, 702, 765, 122, 238, 332, 237, 353, 91, + /* 330 */ 92, 286, 82, 774, 774, 786, 789, 778, 778, 89, + /* 340 */ 89, 90, 90, 90, 90, 746, 88, 88, 88, 88, + /* 350 */ 87, 87, 86, 86, 86, 85, 308, 695, 84, 81, + /* 360 */ 176, 238, 322, 226, 404, 404, 404, 669, 648, 84, + /* 370 */ 81, 176, 751, 122, 218, 368, 669, 339, 91, 92, + /* 380 */ 286, 82, 774, 774, 786, 789, 778, 778, 89, 89, /* 390 */ 90, 90, 90, 90, 209, 88, 88, 88, 88, 87, - /* 400 */ 87, 86, 86, 86, 85, 309, 91, 92, 287, 82, - /* 410 */ 775, 775, 787, 790, 779, 779, 89, 89, 90, 90, - /* 420 */ 90, 90, 341, 88, 88, 88, 88, 87, 87, 86, - /* 430 */ 86, 86, 85, 309, 91, 92, 287, 82, 775, 775, - /* 440 */ 787, 790, 779, 779, 89, 89, 90, 90, 90, 90, - /* 450 */ 379, 88, 88, 88, 88, 87, 87, 86, 86, 86, - /* 460 */ 85, 309, 91, 92, 287, 82, 775, 775, 787, 790, - /* 470 */ 779, 779, 89, 89, 90, 90, 90, 90, 145, 88, - /* 480 */ 88, 88, 88, 87, 87, 86, 86, 86, 85, 309, - /* 490 */ 308, 308, 308, 85, 309, 70, 92, 287, 82, 775, - /* 500 */ 775, 787, 790, 779, 779, 89, 89, 90, 90, 90, + /* 400 */ 87, 86, 86, 86, 85, 308, 91, 92, 286, 82, + /* 410 */ 774, 774, 786, 789, 778, 778, 89, 89, 90, 90, + /* 420 */ 90, 90, 340, 88, 88, 88, 88, 87, 87, 86, + /* 430 */ 86, 86, 85, 308, 91, 92, 286, 82, 774, 774, + /* 440 */ 786, 789, 778, 778, 89, 89, 90, 90, 90, 90, + /* 450 */ 378, 88, 88, 88, 88, 87, 87, 86, 86, 86, + /* 460 */ 85, 308, 91, 92, 286, 82, 774, 774, 786, 789, + /* 470 */ 778, 778, 89, 89, 90, 90, 90, 90, 145, 88, + /* 480 */ 88, 88, 88, 87, 87, 86, 86, 86, 85, 308, + /* 490 */ 307, 307, 307, 85, 308, 70, 92, 286, 82, 774, + /* 500 */ 774, 786, 789, 778, 778, 89, 89, 90, 90, 90, /* 510 */ 90, 164, 88, 88, 88, 88, 87, 87, 86, 86, - /* 520 */ 86, 85, 309, 73, 628, 628, 834, 834, 328, 91, - /* 530 */ 80, 287, 82, 775, 775, 787, 790, 779, 779, 89, - /* 540 */ 89, 90, 90, 90, 90, 390, 88, 88, 88, 88, - /* 550 */ 87, 87, 86, 86, 86, 85, 309, 287, 82, 775, - /* 560 */ 775, 787, 790, 779, 779, 89, 89, 90, 90, 90, + /* 520 */ 86, 85, 308, 73, 627, 627, 833, 833, 327, 91, + /* 530 */ 80, 286, 82, 774, 774, 786, 789, 778, 778, 89, + /* 540 */ 89, 90, 90, 90, 90, 389, 88, 88, 88, 88, + /* 550 */ 87, 87, 86, 86, 86, 85, 308, 286, 82, 774, + /* 560 */ 774, 786, 789, 778, 778, 89, 89, 90, 90, 90, /* 570 */ 90, 78, 88, 88, 88, 88, 87, 87, 86, 86, - /* 580 */ 86, 85, 309, 218, 369, 698, 141, 374, 301, 141, - /* 590 */ 75, 76, 275, 628, 628, 283, 282, 77, 286, 280, - /* 600 */ 279, 278, 222, 276, 850, 78, 622, 143, 628, 628, - /* 610 */ 403, 2, 1104, 298, 318, 310, 310, 202, 851, 202, - /* 620 */ 109, 342, 880, 407, 75, 76, 852, 676, 318, 317, - /* 630 */ 644, 77, 392, 182, 677, 162, 174, 765, 336, 758, - /* 640 */ 48, 48, 753, 347, 403, 2, 344, 407, 137, 310, - /* 650 */ 310, 407, 628, 628, 288, 386, 266, 219, 155, 255, - /* 660 */ 362, 250, 361, 205, 48, 48, 392, 755, 48, 48, - /* 670 */ 248, 765, 709, 758, 407, 302, 753, 675, 675, 757, - /* 680 */ 757, 759, 760, 406, 18, 673, 673, 184, 109, 847, - /* 690 */ 318, 48, 48, 180, 315, 122, 336, 122, 751, 385, - /* 700 */ 387, 755, 185, 385, 370, 190, 373, 307, 306, 78, - /* 710 */ 314, 628, 628, 757, 757, 759, 760, 406, 18, 210, - /* 720 */ 407, 892, 109, 9, 9, 331, 385, 375, 75, 76, - /* 730 */ 697, 122, 628, 628, 167, 77, 201, 48, 48, 359, - /* 740 */ 356, 355, 401, 78, 685, 892, 334, 267, 403, 2, - /* 750 */ 20, 354, 266, 310, 310, 372, 898, 744, 902, 23, - /* 760 */ 191, 327, 75, 76, 332, 900, 342, 901, 407, 77, - /* 770 */ 392, 267, 385, 384, 217, 765, 407, 758, 850, 296, - /* 780 */ 753, 19, 403, 2, 54, 10, 10, 310, 310, 407, - /* 790 */ 109, 338, 851, 48, 48, 407, 903, 366, 903, 295, - /* 800 */ 852, 391, 709, 305, 392, 755, 30, 30, 831, 765, - /* 810 */ 830, 758, 10, 10, 753, 407, 326, 757, 757, 759, - /* 820 */ 760, 406, 18, 177, 177, 407, 297, 407, 385, 365, - /* 830 */ 109, 407, 10, 10, 709, 372, 157, 156, 397, 755, - /* 840 */ 225, 367, 48, 48, 10, 10, 200, 68, 47, 47, - /* 850 */ 236, 757, 757, 759, 760, 406, 18, 95, 382, 231, - /* 860 */ 319, 638, 638, 847, 243, 656, 75, 76, 351, 756, - /* 870 */ 203, 360, 186, 77, 820, 822, 657, 380, 177, 177, - /* 880 */ 893, 893, 146, 765, 709, 758, 403, 2, 753, 203, - /* 890 */ 372, 310, 310, 5, 299, 210, 109, 892, 257, 893, - /* 900 */ 893, 810, 265, 709, 321, 74, 407, 72, 392, 230, - /* 910 */ 827, 407, 827, 765, 242, 758, 709, 407, 753, 254, - /* 920 */ 334, 892, 187, 34, 34, 757, 757, 759, 35, 35, - /* 930 */ 253, 407, 894, 712, 36, 36, 820, 110, 343, 149, - /* 940 */ 229, 853, 228, 755, 407, 289, 709, 234, 37, 37, - /* 950 */ 248, 894, 711, 259, 324, 757, 757, 759, 760, 406, - /* 960 */ 18, 38, 38, 407, 289, 407, 161, 160, 159, 407, - /* 970 */ 709, 407, 7, 407, 138, 407, 261, 407, 628, 628, - /* 980 */ 26, 26, 27, 27, 682, 407, 29, 29, 39, 39, - /* 990 */ 40, 40, 41, 41, 11, 11, 407, 709, 407, 693, - /* 1000 */ 407, 163, 42, 42, 692, 407, 342, 407, 678, 407, - /* 1010 */ 264, 407, 710, 97, 97, 43, 43, 44, 44, 407, - /* 1020 */ 751, 407, 31, 31, 45, 45, 46, 46, 32, 32, - /* 1030 */ 407, 1183, 407, 665, 407, 233, 112, 112, 113, 113, - /* 1040 */ 407, 751, 859, 407, 751, 407, 845, 114, 114, 52, - /* 1050 */ 52, 33, 33, 407, 858, 407, 681, 98, 98, 407, - /* 1060 */ 49, 49, 99, 99, 407, 165, 710, 407, 751, 407, - /* 1070 */ 100, 100, 96, 96, 169, 407, 111, 111, 407, 109, - /* 1080 */ 407, 108, 108, 292, 104, 104, 103, 103, 407, 109, - /* 1090 */ 193, 407, 101, 101, 407, 102, 102, 51, 51, 407, - /* 1100 */ 368, 626, 688, 688, 293, 53, 53, 294, 50, 50, - /* 1110 */ 24, 25, 25, 662, 628, 628, 28, 28, 1, 394, - /* 1120 */ 107, 398, 628, 628, 632, 627, 290, 402, 404, 290, - /* 1130 */ 66, 303, 175, 174, 109, 725, 726, 64, 891, 749, - /* 1140 */ 335, 208, 208, 337, 239, 208, 66, 352, 632, 214, - /* 1150 */ 856, 246, 109, 66, 109, 645, 645, 178, 655, 654, - /* 1160 */ 109, 316, 690, 647, 69, 824, 719, 663, 208, 291, - /* 1170 */ 817, 817, 813, 826, 214, 826, 630, 739, 106, 322, - /* 1180 */ 761, 761, 227, 818, 168, 235, 844, 842, 339, 841, - /* 1190 */ 153, 345, 346, 241, 621, 244, 357, 666, 650, 649, - /* 1200 */ 158, 252, 249, 717, 750, 263, 393, 699, 815, 268, - /* 1210 */ 814, 928, 269, 274, 873, 154, 135, 633, 619, 618, - /* 1220 */ 124, 620, 870, 117, 64, 736, 325, 55, 330, 829, - /* 1230 */ 126, 350, 232, 189, 196, 144, 128, 129, 197, 147, - /* 1240 */ 363, 198, 130, 300, 647, 131, 669, 139, 348, 746, - /* 1250 */ 378, 668, 284, 6, 63, 795, 846, 71, 211, 667, - /* 1260 */ 304, 94, 383, 285, 660, 640, 21, 641, 65, 251, - /* 1270 */ 639, 809, 659, 381, 882, 871, 224, 611, 614, 221, - /* 1280 */ 311, 396, 223, 408, 409, 616, 179, 615, 612, 281, - /* 1290 */ 115, 313, 400, 123, 181, 823, 821, 183, 745, 125, - /* 1300 */ 116, 120, 127, 679, 188, 832, 105, 204, 208, 132, - /* 1310 */ 133, 840, 329, 707, 905, 136, 256, 134, 56, 708, - /* 1320 */ 258, 273, 271, 689, 706, 260, 270, 705, 262, 272, - /* 1330 */ 57, 58, 59, 121, 843, 192, 839, 194, 8, 212, - /* 1340 */ 12, 240, 253, 195, 213, 148, 624, 349, 199, 353, - /* 1350 */ 140, 358, 60, 13, 206, 247, 14, 118, 61, 687, - /* 1360 */ 764, 763, 658, 170, 713, 793, 15, 4, 62, 691, - /* 1370 */ 207, 171, 371, 173, 142, 16, 718, 17, 69, 66, - /* 1380 */ 808, 794, 792, 797, 849, 216, 848, 389, 166, 215, - /* 1390 */ 863, 150, 395, 608, 864, 151, 399, 796, 152, 1165, - /* 1400 */ 762, 388, 631, 79, 277, 625, + /* 580 */ 86, 85, 308, 218, 368, 697, 141, 373, 300, 141, + /* 590 */ 75, 76, 274, 627, 627, 282, 281, 77, 285, 279, + /* 600 */ 278, 277, 222, 275, 849, 78, 621, 143, 627, 627, + /* 610 */ 402, 2, 1103, 297, 317, 309, 309, 202, 850, 202, + /* 620 */ 109, 341, 879, 406, 75, 76, 851, 675, 317, 316, + /* 630 */ 643, 77, 391, 182, 676, 162, 174, 764, 335, 757, + /* 640 */ 48, 48, 752, 346, 402, 2, 343, 406, 137, 309, + /* 650 */ 309, 406, 627, 627, 287, 385, 265, 219, 155, 254, + /* 660 */ 361, 249, 360, 205, 48, 48, 391, 754, 48, 48, + /* 670 */ 247, 764, 708, 757, 406, 301, 752, 674, 674, 756, + /* 680 */ 756, 758, 759, 405, 18, 672, 672, 184, 109, 846, + /* 690 */ 317, 48, 48, 180, 314, 122, 335, 122, 750, 384, + /* 700 */ 386, 754, 185, 384, 369, 190, 372, 306, 305, 78, + /* 710 */ 313, 627, 627, 756, 756, 758, 759, 405, 18, 210, + /* 720 */ 406, 891, 109, 9, 9, 330, 384, 374, 75, 76, + /* 730 */ 696, 122, 627, 627, 167, 77, 201, 48, 48, 358, + /* 740 */ 355, 354, 400, 78, 684, 891, 333, 266, 402, 2, + /* 750 */ 20, 353, 265, 309, 309, 371, 897, 743, 901, 23, + /* 760 */ 191, 326, 75, 76, 331, 899, 341, 900, 406, 77, + /* 770 */ 391, 266, 384, 383, 217, 764, 406, 757, 849, 295, + /* 780 */ 752, 19, 402, 2, 54, 10, 10, 309, 309, 406, + /* 790 */ 109, 337, 850, 48, 48, 406, 902, 365, 902, 294, + /* 800 */ 851, 390, 708, 304, 391, 754, 30, 30, 830, 764, + /* 810 */ 829, 757, 10, 10, 752, 406, 325, 756, 756, 758, + /* 820 */ 759, 405, 18, 177, 177, 406, 296, 406, 384, 364, + /* 830 */ 109, 406, 10, 10, 708, 371, 157, 156, 396, 754, + /* 840 */ 225, 366, 48, 48, 10, 10, 200, 68, 47, 47, + /* 850 */ 236, 756, 756, 758, 759, 405, 18, 95, 381, 231, + /* 860 */ 318, 637, 637, 846, 242, 655, 75, 76, 350, 755, + /* 870 */ 203, 359, 186, 77, 819, 821, 656, 379, 177, 177, + /* 880 */ 892, 892, 146, 764, 708, 757, 402, 2, 752, 203, + /* 890 */ 371, 309, 309, 5, 298, 210, 109, 891, 256, 892, + /* 900 */ 892, 809, 264, 708, 320, 74, 406, 72, 391, 230, + /* 910 */ 826, 406, 826, 764, 241, 757, 708, 406, 752, 253, + /* 920 */ 333, 891, 187, 34, 34, 756, 756, 758, 35, 35, + /* 930 */ 252, 406, 893, 711, 36, 36, 819, 110, 342, 149, + /* 940 */ 229, 852, 228, 754, 406, 288, 708, 234, 37, 37, + /* 950 */ 247, 893, 710, 258, 323, 756, 756, 758, 759, 405, + /* 960 */ 18, 38, 38, 406, 288, 406, 161, 160, 159, 406, + /* 970 */ 708, 406, 7, 406, 138, 406, 260, 406, 627, 627, + /* 980 */ 26, 26, 27, 27, 681, 406, 29, 29, 39, 39, + /* 990 */ 40, 40, 41, 41, 11, 11, 406, 708, 406, 692, + /* 1000 */ 406, 163, 42, 42, 691, 406, 341, 406, 677, 406, + /* 1010 */ 263, 406, 709, 97, 97, 43, 43, 44, 44, 406, + /* 1020 */ 750, 406, 31, 31, 45, 45, 46, 46, 32, 32, + /* 1030 */ 406, 1182, 406, 664, 406, 233, 112, 112, 113, 113, + /* 1040 */ 406, 750, 858, 406, 750, 406, 844, 114, 114, 52, + /* 1050 */ 52, 33, 33, 406, 857, 406, 680, 98, 98, 406, + /* 1060 */ 49, 49, 99, 99, 406, 165, 709, 406, 750, 406, + /* 1070 */ 100, 100, 96, 96, 169, 406, 111, 111, 406, 109, + /* 1080 */ 406, 108, 108, 291, 104, 104, 103, 103, 406, 109, + /* 1090 */ 193, 406, 101, 101, 406, 102, 102, 51, 51, 406, + /* 1100 */ 367, 625, 687, 687, 292, 53, 53, 293, 50, 50, + /* 1110 */ 24, 25, 25, 661, 627, 627, 28, 28, 1, 393, + /* 1120 */ 107, 397, 627, 627, 631, 626, 289, 401, 403, 289, + /* 1130 */ 66, 302, 175, 174, 109, 724, 725, 64, 890, 748, + /* 1140 */ 334, 208, 208, 336, 808, 208, 66, 351, 631, 214, + /* 1150 */ 855, 245, 109, 66, 109, 644, 644, 178, 654, 653, + /* 1160 */ 109, 315, 689, 646, 69, 823, 718, 662, 208, 290, + /* 1170 */ 816, 816, 812, 825, 214, 825, 629, 738, 106, 321, + /* 1180 */ 760, 760, 227, 817, 168, 235, 843, 841, 338, 840, + /* 1190 */ 153, 344, 345, 240, 620, 243, 356, 665, 649, 648, + /* 1200 */ 158, 251, 248, 716, 749, 262, 392, 698, 814, 267, + /* 1210 */ 813, 927, 268, 273, 872, 154, 135, 632, 618, 617, + /* 1220 */ 124, 619, 869, 117, 64, 735, 324, 55, 329, 828, + /* 1230 */ 126, 349, 232, 189, 196, 144, 128, 129, 197, 147, + /* 1240 */ 362, 198, 130, 299, 668, 131, 667, 139, 347, 745, + /* 1250 */ 646, 666, 283, 377, 63, 6, 845, 71, 211, 303, + /* 1260 */ 640, 94, 284, 65, 659, 639, 382, 250, 380, 638, + /* 1270 */ 881, 21, 658, 870, 224, 610, 613, 221, 223, 310, + /* 1280 */ 408, 407, 615, 614, 611, 280, 179, 312, 395, 123, + /* 1290 */ 181, 822, 399, 820, 183, 744, 115, 125, 120, 127, + /* 1300 */ 188, 116, 678, 831, 208, 132, 133, 904, 328, 839, + /* 1310 */ 56, 105, 204, 706, 134, 255, 136, 707, 257, 57, + /* 1320 */ 705, 704, 269, 259, 261, 688, 270, 271, 272, 58, + /* 1330 */ 59, 842, 194, 192, 838, 794, 121, 12, 8, 195, + /* 1340 */ 148, 239, 623, 212, 213, 348, 252, 199, 140, 352, + /* 1350 */ 246, 357, 60, 13, 14, 206, 686, 61, 118, 763, + /* 1360 */ 762, 170, 712, 657, 792, 62, 15, 370, 690, 4, + /* 1370 */ 717, 171, 173, 207, 142, 69, 66, 16, 17, 807, + /* 1380 */ 793, 796, 791, 848, 607, 847, 388, 166, 394, 862, + /* 1390 */ 276, 150, 215, 863, 151, 398, 387, 795, 152, 1164, + /* 1400 */ 761, 630, 79, 909, 624, 909, 909, 909, 909, 909, + /* 1410 */ 909, 909, 909, 909, 909, 909, 909, 909, 909, 909, + /* 1420 */ 909, 909, 909, 909, 909, 909, 909, 909, 909, 216, }; static const YYCODETYPE yy_lookahead[] = { /* 0 */ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, @@ -665,26 +667,28 @@ static const YYCODETYPE yy_lookahead[] = { /* 1210 */ 163, 101, 143, 188, 146, 186, 47, 143, 143, 143, /* 1220 */ 209, 143, 143, 5, 113, 189, 45, 121, 128, 225, /* 1230 */ 177, 45, 224, 148, 148, 47, 180, 180, 148, 209, - /* 1240 */ 84, 148, 180, 63, 83, 180, 162, 177, 165, 177, - /* 1250 */ 106, 162, 165, 47, 84, 213, 189, 121, 215, 162, - /* 1260 */ 32, 112, 107, 165, 170, 164, 50, 162, 111, 162, - /* 1270 */ 162, 189, 170, 110, 162, 40, 35, 4, 36, 144, - /* 1280 */ 3, 165, 144, 150, 142, 142, 42, 142, 142, 141, - /* 1290 */ 153, 72, 165, 43, 84, 48, 48, 101, 99, 114, - /* 1300 */ 153, 88, 102, 46, 84, 127, 166, 166, 50, 127, - /* 1310 */ 84, 1, 129, 204, 130, 114, 203, 102, 16, 204, - /* 1320 */ 203, 189, 191, 193, 204, 203, 192, 204, 203, 190, - /* 1330 */ 16, 16, 16, 88, 52, 105, 1, 101, 34, 218, - /* 1340 */ 47, 124, 89, 84, 218, 49, 46, 7, 82, 66, - /* 1350 */ 47, 66, 47, 47, 66, 48, 47, 60, 47, 95, - /* 1360 */ 48, 48, 54, 101, 104, 48, 47, 47, 50, 48, - /* 1370 */ 105, 48, 50, 48, 47, 105, 52, 105, 50, 50, - /* 1380 */ 48, 48, 48, 38, 48, 101, 48, 50, 47, 50, - /* 1390 */ 48, 47, 49, 1, 48, 47, 49, 48, 47, 0, - /* 1400 */ 48, 75, 48, 47, 42, 48, + /* 1240 */ 84, 148, 180, 63, 162, 180, 162, 177, 165, 177, + /* 1250 */ 83, 162, 165, 106, 84, 47, 189, 121, 215, 32, + /* 1260 */ 162, 112, 165, 111, 170, 164, 107, 162, 110, 162, + /* 1270 */ 162, 50, 170, 40, 35, 4, 36, 144, 144, 3, + /* 1280 */ 142, 150, 142, 142, 142, 141, 42, 72, 165, 43, + /* 1290 */ 84, 48, 165, 48, 101, 99, 153, 114, 88, 102, + /* 1300 */ 84, 153, 46, 127, 50, 127, 84, 130, 129, 1, + /* 1310 */ 16, 166, 166, 204, 102, 203, 114, 204, 203, 16, + /* 1320 */ 204, 204, 192, 203, 203, 193, 191, 190, 189, 16, + /* 1330 */ 16, 52, 101, 105, 1, 213, 88, 47, 34, 84, + /* 1340 */ 49, 124, 46, 218, 218, 7, 89, 82, 47, 66, + /* 1350 */ 48, 66, 47, 47, 47, 66, 95, 47, 60, 48, + /* 1360 */ 48, 101, 104, 54, 48, 50, 47, 50, 48, 47, + /* 1370 */ 52, 48, 48, 105, 47, 50, 50, 105, 105, 48, + /* 1380 */ 48, 38, 48, 48, 1, 48, 50, 47, 49, 48, + /* 1390 */ 42, 47, 50, 48, 47, 49, 75, 48, 47, 0, + /* 1400 */ 48, 48, 47, 230, 48, 230, 230, 230, 230, 230, + /* 1410 */ 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + /* 1420 */ 230, 230, 230, 230, 230, 230, 230, 230, 230, 101, }; -#define YY_SHIFT_USE_DFLT (1406) -#define YY_SHIFT_COUNT (411) +#define YY_SHIFT_USE_DFLT (1430) +#define YY_SHIFT_COUNT (410) #define YY_SHIFT_MIN (-88) #define YY_SHIFT_MAX (1399) static const short yy_shift_ofst[] = { @@ -699,11 +703,11 @@ static const short yy_shift_ofst[] = { /* 80 */ 736, 736, 840, 736, 736, 736, 736, 736, 736, 736, /* 90 */ 736, 736, 736, 736, 736, 736, 11, 30, 30, 30, /* 100 */ 30, 30, 188, 37, 43, 861, 144, 144, 462, 485, - /* 110 */ 542, -16, 1406, 1406, 1406, 581, 581, 565, 565, 821, + /* 110 */ 542, -16, 1430, 1430, 1430, 581, 581, 565, 565, 821, /* 120 */ 601, 601, 473, 542, 88, 542, 542, 542, 542, 542, /* 130 */ 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, /* 140 */ 542, 221, 542, 542, 542, 221, 485, -88, -88, -88, - /* 150 */ -88, -88, -88, 1406, 1406, 810, 195, 195, 237, 806, + /* 150 */ -88, -88, -88, 1430, 1430, 810, 195, 195, 237, 806, /* 160 */ 806, 806, 217, 846, 829, 848, 739, 441, 752, 927, /* 170 */ 557, 670, 670, 670, 1063, 962, 1071, 1006, 219, 542, /* 180 */ 542, 542, 542, 542, 542, 1024, 174, 174, 542, 542, @@ -711,28 +715,28 @@ static const short yy_shift_ofst[] = { /* 200 */ 1080, 542, 983, 542, 880, 542, 1027, 542, 542, 174, /* 210 */ 542, 784, 1027, 1027, 542, 542, 542, 1088, 904, 542, /* 220 */ 890, 542, 542, 542, 542, 1169, 1218, 1111, 1181, 1181, - /* 230 */ 1181, 1181, 1106, 1100, 1186, 1111, 1169, 1218, 1218, 1111, - /* 240 */ 1186, 1188, 1186, 1186, 1188, 1156, 1156, 1156, 1180, 1188, - /* 250 */ 1156, 1161, 1156, 1180, 1156, 1156, 1144, 1170, 1144, 1170, - /* 260 */ 1144, 1170, 1144, 1170, 1206, 1136, 1188, 1228, 1228, 1188, - /* 270 */ 1149, 1155, 1157, 1163, 1111, 1216, 1235, 1235, 1241, 1241, - /* 280 */ 1241, 1241, 1242, 1406, 1406, 1406, 1406, 152, 816, 881, - /* 290 */ 1073, 734, 1091, 1092, 1095, 1096, 1099, 1103, 1104, 1081, - /* 300 */ 1077, 841, 1114, 1118, 1119, 1124, 795, 1058, 1128, 1129, - /* 310 */ 1110, 1273, 1277, 1244, 1219, 1250, 1210, 1247, 1248, 1196, - /* 320 */ 1199, 1185, 1213, 1200, 1220, 1257, 1178, 1258, 1182, 1184, - /* 330 */ 1183, 1226, 1310, 1215, 1201, 1302, 1314, 1315, 1316, 1245, - /* 340 */ 1282, 1230, 1236, 1335, 1304, 1293, 1259, 1217, 1296, 1300, - /* 350 */ 1340, 1253, 1266, 1303, 1283, 1305, 1306, 1307, 1309, 1285, - /* 360 */ 1308, 1311, 1288, 1297, 1312, 1313, 1317, 1318, 1264, 1319, - /* 370 */ 1321, 1320, 1322, 1262, 1323, 1325, 1324, 1265, 1327, 1260, - /* 380 */ 1328, 1270, 1329, 1272, 1332, 1328, 1333, 1334, 1336, 1326, - /* 390 */ 1337, 1338, 1341, 1345, 1342, 1344, 1343, 1339, 1346, 1348, - /* 400 */ 1347, 1339, 1349, 1351, 1352, 1354, 1356, 1284, 1357, 1362, - /* 410 */ 1392, 1399, + /* 230 */ 1181, 1181, 1106, 1100, 1186, 1111, 1169, 1218, 1218, 1186, + /* 240 */ 1188, 1186, 1186, 1188, 1156, 1156, 1156, 1180, 1188, 1156, + /* 250 */ 1167, 1156, 1180, 1156, 1156, 1147, 1170, 1147, 1170, 1147, + /* 260 */ 1170, 1147, 1170, 1208, 1136, 1188, 1227, 1227, 1188, 1149, + /* 270 */ 1159, 1152, 1158, 1111, 1221, 1233, 1233, 1239, 1239, 1239, + /* 280 */ 1239, 1240, 1430, 1430, 1430, 1430, 152, 816, 881, 1073, + /* 290 */ 734, 1091, 1092, 1095, 1096, 1099, 1103, 1104, 1081, 1077, + /* 300 */ 841, 1114, 1118, 1119, 1124, 795, 1058, 1128, 1129, 1110, + /* 310 */ 1271, 1276, 1244, 1215, 1246, 1206, 1243, 1245, 1193, 1196, + /* 320 */ 1183, 1210, 1197, 1216, 1256, 1176, 1254, 1178, 1177, 1179, + /* 330 */ 1222, 1308, 1212, 1202, 1294, 1303, 1313, 1314, 1248, 1279, + /* 340 */ 1228, 1231, 1333, 1304, 1290, 1255, 1217, 1291, 1296, 1338, + /* 350 */ 1257, 1265, 1301, 1283, 1305, 1306, 1302, 1307, 1285, 1309, + /* 360 */ 1310, 1289, 1298, 1311, 1312, 1316, 1315, 1261, 1319, 1320, + /* 370 */ 1322, 1317, 1260, 1323, 1324, 1318, 1268, 1327, 1258, 1325, + /* 380 */ 1272, 1326, 1273, 1331, 1325, 1332, 1334, 1335, 1321, 1336, + /* 390 */ 1337, 1340, 1343, 1341, 1344, 1339, 1342, 1345, 1347, 1346, + /* 400 */ 1342, 1349, 1351, 1352, 1353, 1355, 1328, 1356, 1348, 1383, + /* 410 */ 1399, }; #define YY_REDUCE_USE_DFLT (-110) -#define YY_REDUCE_COUNT (286) +#define YY_REDUCE_COUNT (285) #define YY_REDUCE_MIN (-109) #define YY_REDUCE_MAX (1148) static const short yy_reduce_ofst[] = { @@ -759,56 +763,56 @@ static const short yy_reduce_ofst[] = { /* 200 */ 1032, 1054, 1028, 1055, 1031, 1059, 1038, 1060, 1061, 1003, /* 210 */ 1064, 990, 1045, 1047, 1066, 1069, 726, 1025, 1029, 1074, /* 220 */ 1068, 1075, 1076, 1078, 1079, 1011, 1053, 1036, 1056, 1057, - /* 230 */ 1062, 1065, 1004, 1008, 1085, 1067, 1030, 1070, 1072, 1082, - /* 240 */ 1086, 1083, 1090, 1093, 1087, 1084, 1089, 1097, 1094, 1098, - /* 250 */ 1105, 1101, 1107, 1102, 1108, 1112, 1109, 1113, 1115, 1117, - /* 260 */ 1120, 1122, 1123, 1125, 1042, 1043, 1116, 1121, 1126, 1127, - /* 270 */ 1130, 1134, 1131, 1139, 1132, 1133, 1135, 1138, 1142, 1143, - /* 280 */ 1145, 1146, 1148, 1137, 1140, 1141, 1147, + /* 230 */ 1062, 1065, 1004, 1008, 1085, 1067, 1030, 1070, 1072, 1086, + /* 240 */ 1083, 1090, 1093, 1087, 1082, 1084, 1089, 1094, 1097, 1098, + /* 250 */ 1101, 1105, 1102, 1107, 1108, 1109, 1112, 1113, 1115, 1116, + /* 260 */ 1120, 1117, 1121, 1122, 1043, 1123, 1125, 1126, 1127, 1132, + /* 270 */ 1130, 1135, 1137, 1139, 1131, 1133, 1134, 1138, 1140, 1141, + /* 280 */ 1142, 1144, 1143, 1145, 1146, 1148, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 1166, 1160, 1160, 1160, 1104, 1104, 1104, 1104, 1160, 1000, - /* 10 */ 1027, 1027, 1208, 1208, 1208, 1208, 1208, 1208, 1103, 1208, - /* 20 */ 1208, 1208, 1208, 1160, 1004, 1033, 1208, 1208, 1208, 1105, - /* 30 */ 1106, 1208, 1208, 1208, 1138, 1043, 1042, 1041, 1040, 1014, - /* 40 */ 1038, 1031, 1035, 1105, 1099, 1100, 1098, 1102, 1106, 1208, - /* 50 */ 1034, 1068, 1083, 1067, 1208, 1208, 1208, 1208, 1208, 1208, - /* 60 */ 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, - /* 70 */ 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, - /* 80 */ 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, - /* 90 */ 1208, 1208, 1208, 1208, 1208, 1208, 1077, 1082, 1089, 1081, - /* 100 */ 1078, 1070, 1069, 1071, 1072, 971, 1208, 1208, 1073, 1208, - /* 110 */ 1208, 1074, 1086, 1085, 1084, 1175, 1174, 1208, 1208, 1111, - /* 120 */ 1208, 1208, 1208, 1208, 1160, 1208, 1208, 1208, 1208, 1208, - /* 130 */ 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, - /* 140 */ 1208, 929, 1208, 1208, 1208, 929, 1208, 1160, 1160, 1160, - /* 150 */ 1160, 1160, 1160, 1004, 995, 1208, 1208, 1208, 1208, 1208, - /* 160 */ 1208, 1208, 1208, 1000, 1208, 1208, 1208, 1208, 1133, 1208, - /* 170 */ 1208, 1000, 1000, 1000, 1208, 1002, 1208, 984, 994, 1208, - /* 180 */ 1157, 1208, 1154, 1208, 1125, 1037, 1016, 1016, 1208, 1208, - /* 190 */ 1207, 1037, 1208, 1207, 1208, 1208, 1208, 1208, 1208, 1208, - /* 200 */ 946, 1208, 1186, 1208, 943, 1208, 1027, 1208, 1208, 1016, - /* 210 */ 1208, 1101, 1027, 1027, 1208, 1208, 1208, 1001, 994, 1208, - /* 220 */ 1208, 1208, 1208, 1208, 1169, 1048, 974, 1037, 980, 980, - /* 230 */ 980, 980, 1137, 1204, 923, 1037, 1048, 974, 974, 1037, - /* 240 */ 923, 1112, 923, 923, 1112, 972, 972, 972, 961, 1112, - /* 250 */ 972, 946, 972, 961, 972, 972, 1020, 1015, 1020, 1015, - /* 260 */ 1020, 1015, 1020, 1015, 1107, 1208, 1112, 1116, 1116, 1112, - /* 270 */ 1032, 1021, 1030, 1028, 1037, 964, 1172, 1172, 1168, 1168, - /* 280 */ 1168, 1168, 913, 1181, 948, 948, 1181, 1208, 1208, 1208, - /* 290 */ 1176, 1119, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, - /* 300 */ 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, - /* 310 */ 1054, 1208, 910, 1208, 1208, 1208, 1155, 1208, 1208, 1199, - /* 320 */ 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1136, 1135, 1208, - /* 330 */ 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, - /* 340 */ 1208, 1208, 1206, 1208, 1208, 1208, 1208, 1208, 1208, 1208, - /* 350 */ 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, - /* 360 */ 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 986, 1208, - /* 370 */ 1208, 1208, 1190, 1208, 1208, 1208, 1208, 1208, 1208, 1208, - /* 380 */ 1029, 1208, 1022, 1208, 1208, 1196, 1208, 1208, 1208, 1208, - /* 390 */ 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1162, 1208, 1208, - /* 400 */ 1208, 1161, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 917, - /* 410 */ 1208, 1208, + /* 0 */ 1165, 1159, 1159, 1159, 1103, 1103, 1103, 1103, 1159, 999, + /* 10 */ 1026, 1026, 1207, 1207, 1207, 1207, 1207, 1207, 1102, 1207, + /* 20 */ 1207, 1207, 1207, 1159, 1003, 1032, 1207, 1207, 1207, 1104, + /* 30 */ 1105, 1207, 1207, 1207, 1137, 1042, 1041, 1040, 1039, 1013, + /* 40 */ 1037, 1030, 1034, 1104, 1098, 1099, 1097, 1101, 1105, 1207, + /* 50 */ 1033, 1067, 1082, 1066, 1207, 1207, 1207, 1207, 1207, 1207, + /* 60 */ 1207, 1207, 1207, 1207, 1207, 1207, 1207, 1207, 1207, 1207, + /* 70 */ 1207, 1207, 1207, 1207, 1207, 1207, 1207, 1207, 1207, 1207, + /* 80 */ 1207, 1207, 1207, 1207, 1207, 1207, 1207, 1207, 1207, 1207, + /* 90 */ 1207, 1207, 1207, 1207, 1207, 1207, 1076, 1081, 1088, 1080, + /* 100 */ 1077, 1069, 1068, 1070, 1071, 970, 1207, 1207, 1072, 1207, + /* 110 */ 1207, 1073, 1085, 1084, 1083, 1174, 1173, 1207, 1207, 1110, + /* 120 */ 1207, 1207, 1207, 1207, 1159, 1207, 1207, 1207, 1207, 1207, + /* 130 */ 1207, 1207, 1207, 1207, 1207, 1207, 1207, 1207, 1207, 1207, + /* 140 */ 1207, 928, 1207, 1207, 1207, 928, 1207, 1159, 1159, 1159, + /* 150 */ 1159, 1159, 1159, 1003, 994, 1207, 1207, 1207, 1207, 1207, + /* 160 */ 1207, 1207, 1207, 999, 1207, 1207, 1207, 1207, 1132, 1207, + /* 170 */ 1207, 999, 999, 999, 1207, 1001, 1207, 983, 993, 1207, + /* 180 */ 1156, 1207, 1153, 1207, 1124, 1036, 1015, 1015, 1207, 1207, + /* 190 */ 1206, 1036, 1207, 1206, 1207, 1207, 1207, 1207, 1207, 1207, + /* 200 */ 945, 1207, 1185, 1207, 942, 1207, 1026, 1207, 1207, 1015, + /* 210 */ 1207, 1100, 1026, 1026, 1207, 1207, 1207, 1000, 993, 1207, + /* 220 */ 1207, 1207, 1207, 1207, 1168, 1047, 973, 1036, 979, 979, + /* 230 */ 979, 979, 1136, 1203, 922, 1036, 1047, 973, 973, 922, + /* 240 */ 1111, 922, 922, 1111, 971, 971, 971, 960, 1111, 971, + /* 250 */ 945, 971, 960, 971, 971, 1019, 1014, 1019, 1014, 1019, + /* 260 */ 1014, 1019, 1014, 1106, 1207, 1111, 1115, 1115, 1111, 1031, + /* 270 */ 1020, 1029, 1027, 1036, 963, 1171, 1171, 1167, 1167, 1167, + /* 280 */ 1167, 912, 1180, 947, 947, 1180, 1207, 1207, 1207, 1175, + /* 290 */ 1118, 1207, 1207, 1207, 1207, 1207, 1207, 1207, 1207, 1207, + /* 300 */ 1207, 1207, 1207, 1207, 1207, 1207, 1207, 1207, 1207, 1053, + /* 310 */ 1207, 909, 1207, 1207, 1207, 1154, 1207, 1207, 1198, 1207, + /* 320 */ 1207, 1207, 1207, 1207, 1207, 1207, 1135, 1134, 1207, 1207, + /* 330 */ 1207, 1207, 1207, 1207, 1207, 1207, 1207, 1207, 1207, 1207, + /* 340 */ 1207, 1205, 1207, 1207, 1207, 1207, 1207, 1207, 1207, 1207, + /* 350 */ 1207, 1207, 1207, 1207, 1207, 1207, 1207, 1207, 1207, 1207, + /* 360 */ 1207, 1207, 1207, 1207, 1207, 1207, 1207, 985, 1207, 1207, + /* 370 */ 1207, 1189, 1207, 1207, 1207, 1207, 1207, 1207, 1207, 1028, + /* 380 */ 1207, 1021, 1207, 1207, 1195, 1207, 1207, 1207, 1207, 1207, + /* 390 */ 1207, 1207, 1207, 1207, 1207, 1207, 1161, 1207, 1207, 1207, + /* 400 */ 1160, 1207, 1207, 1207, 1207, 1207, 1207, 1207, 916, 1207, + /* 410 */ 1207, }; /********** End of lemon-generated parsing tables *****************************/ @@ -1254,7 +1258,7 @@ static const char *const yyRuleName[] = { /* 198 */ "nexprlist ::= expr", /* 199 */ "paren_exprlist ::=", /* 200 */ "paren_exprlist ::= LP exprlist RP", - /* 201 */ "cmd ::= createkw uniqueflag INDEX ifnotexists nm ON nm LP sortlist RP where_opt", + /* 201 */ "cmd ::= createkw uniqueflag INDEX ifnotexists nm ON nm LP sortlist RP", /* 202 */ "uniqueflag ::= UNIQUE", /* 203 */ "uniqueflag ::=", /* 204 */ "eidlist_opt ::=", @@ -1470,7 +1474,7 @@ static void yy_destructor( { #line 386 "parse.y" sqlite3SelectDelete(pParse->db, (yypminor->yy279)); -#line 1474 "parse.c" +#line 1478 "parse.c" } break; case 160: /* term */ @@ -1478,7 +1482,7 @@ sqlite3SelectDelete(pParse->db, (yypminor->yy279)); { #line 829 "parse.y" sqlite3ExprDelete(pParse->db, (yypminor->yy162).pExpr); -#line 1482 "parse.c" +#line 1486 "parse.c" } break; case 165: /* eidlist_opt */ @@ -1496,7 +1500,7 @@ sqlite3ExprDelete(pParse->db, (yypminor->yy162).pExpr); { #line 1261 "parse.y" sqlite3ExprListDelete(pParse->db, (yypminor->yy382)); -#line 1500 "parse.c" +#line 1504 "parse.c" } break; case 181: /* fullname */ @@ -1506,7 +1510,7 @@ sqlite3ExprListDelete(pParse->db, (yypminor->yy382)); { #line 613 "parse.y" sqlite3SrcListDelete(pParse->db, (yypminor->yy387)); -#line 1510 "parse.c" +#line 1514 "parse.c" } break; case 184: /* with */ @@ -1514,7 +1518,7 @@ sqlite3SrcListDelete(pParse->db, (yypminor->yy387)); { #line 1510 "parse.y" sqlite3WithDelete(pParse->db, (yypminor->yy151)); -#line 1518 "parse.c" +#line 1522 "parse.c" } break; case 189: /* where_opt */ @@ -1526,7 +1530,7 @@ sqlite3WithDelete(pParse->db, (yypminor->yy151)); { #line 738 "parse.y" sqlite3ExprDelete(pParse->db, (yypminor->yy362)); -#line 1530 "parse.c" +#line 1534 "parse.c" } break; case 204: /* using_opt */ @@ -1535,7 +1539,7 @@ sqlite3ExprDelete(pParse->db, (yypminor->yy362)); { #line 650 "parse.y" sqlite3IdListDelete(pParse->db, (yypminor->yy40)); -#line 1539 "parse.c" +#line 1543 "parse.c" } break; case 221: /* trigger_cmd_list */ @@ -1543,14 +1547,14 @@ sqlite3IdListDelete(pParse->db, (yypminor->yy40)); { #line 1384 "parse.y" sqlite3DeleteTriggerStep(pParse->db, (yypminor->yy427)); -#line 1547 "parse.c" +#line 1551 "parse.c" } break; case 223: /* trigger_event */ { #line 1370 "parse.y" sqlite3IdListDelete(pParse->db, (yypminor->yy10).b); -#line 1554 "parse.c" +#line 1558 "parse.c" } break; /********* End destructor definitions *****************************************/ @@ -1725,7 +1729,7 @@ static void yyStackOverflow(yyParser *yypParser){ #line 41 "parse.y" sqlite3ErrorMsg(pParse, "parser stack overflow"); -#line 1729 "parse.c" +#line 1733 "parse.c" /******** End %stack_overflow code ********************************************/ sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument var */ } @@ -2000,7 +2004,7 @@ static const struct { { 195, 1 }, { 213, 0 }, { 213, 3 }, - { 140, 11 }, + { 140, 10 }, { 217, 1 }, { 217, 0 }, { 165, 0 }, @@ -2165,83 +2169,83 @@ static void yy_reduce( case 0: /* ecmd ::= explain cmdx SEMI */ #line 111 "parse.y" { sqlite3FinishCoding(pParse); } -#line 2169 "parse.c" +#line 2173 "parse.c" break; case 1: /* ecmd ::= SEMI */ #line 112 "parse.y" { sqlite3ErrorMsg(pParse, "syntax error: empty request"); } -#line 2176 "parse.c" +#line 2180 "parse.c" break; case 2: /* explain ::= EXPLAIN */ #line 117 "parse.y" { pParse->explain = 1; } -#line 2181 "parse.c" +#line 2185 "parse.c" break; case 3: /* explain ::= EXPLAIN QUERY PLAN */ #line 118 "parse.y" { pParse->explain = 2; } -#line 2186 "parse.c" +#line 2190 "parse.c" break; case 4: /* cmd ::= BEGIN transtype trans_opt */ #line 150 "parse.y" {sqlite3BeginTransaction(pParse, yymsp[-1].minor.yy52);} -#line 2191 "parse.c" +#line 2195 "parse.c" break; case 5: /* transtype ::= */ #line 155 "parse.y" {yymsp[1].minor.yy52 = TK_DEFERRED;} -#line 2196 "parse.c" +#line 2200 "parse.c" break; case 6: /* transtype ::= DEFERRED */ #line 156 "parse.y" {yymsp[0].minor.yy52 = yymsp[0].major; /*A-overwrites-X*/} -#line 2201 "parse.c" +#line 2205 "parse.c" break; case 7: /* cmd ::= COMMIT trans_opt */ case 8: /* cmd ::= END trans_opt */ yytestcase(yyruleno==8); #line 157 "parse.y" {sqlite3CommitTransaction(pParse);} -#line 2207 "parse.c" +#line 2211 "parse.c" break; case 9: /* cmd ::= ROLLBACK trans_opt */ #line 159 "parse.y" {sqlite3RollbackTransaction(pParse);} -#line 2212 "parse.c" +#line 2216 "parse.c" break; case 10: /* cmd ::= SAVEPOINT nm */ #line 163 "parse.y" { sqlite3Savepoint(pParse, SAVEPOINT_BEGIN, &yymsp[0].minor.yy0); } -#line 2219 "parse.c" +#line 2223 "parse.c" break; case 11: /* cmd ::= RELEASE savepoint_opt nm */ #line 166 "parse.y" { sqlite3Savepoint(pParse, SAVEPOINT_RELEASE, &yymsp[0].minor.yy0); } -#line 2226 "parse.c" +#line 2230 "parse.c" break; case 12: /* cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */ #line 169 "parse.y" { sqlite3Savepoint(pParse, SAVEPOINT_ROLLBACK, &yymsp[0].minor.yy0); } -#line 2233 "parse.c" +#line 2237 "parse.c" break; case 13: /* create_table ::= createkw TABLE ifnotexists nm */ #line 176 "parse.y" { sqlite3StartTable(pParse,&yymsp[0].minor.yy0,yymsp[-1].minor.yy52); } -#line 2240 "parse.c" +#line 2244 "parse.c" break; case 14: /* createkw ::= CREATE */ #line 179 "parse.y" {disableLookaside(pParse);} -#line 2245 "parse.c" +#line 2249 "parse.c" break; case 15: /* ifnotexists ::= */ case 38: /* autoinc ::= */ yytestcase(yyruleno==38); @@ -2252,19 +2256,19 @@ static void yy_reduce( case 208: /* collate ::= */ yytestcase(yyruleno==208); #line 182 "parse.y" {yymsp[1].minor.yy52 = 0;} -#line 2256 "parse.c" +#line 2260 "parse.c" break; case 16: /* ifnotexists ::= IF NOT EXISTS */ #line 183 "parse.y" {yymsp[-2].minor.yy52 = 1;} -#line 2261 "parse.c" +#line 2265 "parse.c" break; case 17: /* create_table_args ::= LP columnlist conslist_opt RP */ #line 185 "parse.y" { sqlite3EndTable(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,0,0); } -#line 2268 "parse.c" +#line 2272 "parse.c" break; case 18: /* create_table_args ::= AS select */ #line 188 "parse.y" @@ -2272,12 +2276,12 @@ static void yy_reduce( sqlite3EndTable(pParse,0,0,0,yymsp[0].minor.yy279); sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy279); } -#line 2276 "parse.c" +#line 2280 "parse.c" break; case 19: /* columnname ::= nm typetoken */ #line 194 "parse.y" {sqlite3AddColumn(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0);} -#line 2281 "parse.c" +#line 2285 "parse.c" break; case 20: /* nm ::= ID|INDEXED */ #line 225 "parse.y" @@ -2286,50 +2290,50 @@ static void yy_reduce( sqlite3ErrorMsg(pParse, "keyword \"%T\" is reserved", &yymsp[0].minor.yy0); } } -#line 2290 "parse.c" +#line 2294 "parse.c" break; case 21: /* typetoken ::= */ case 56: /* conslist_opt ::= */ yytestcase(yyruleno==56); case 92: /* as ::= */ yytestcase(yyruleno==92); #line 236 "parse.y" {yymsp[1].minor.yy0.n = 0; yymsp[1].minor.yy0.z = 0;} -#line 2297 "parse.c" +#line 2301 "parse.c" break; case 22: /* typetoken ::= typename LP signed RP */ #line 238 "parse.y" { yymsp[-3].minor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-3].minor.yy0.z); } -#line 2304 "parse.c" +#line 2308 "parse.c" break; case 23: /* typetoken ::= typename LP signed COMMA signed RP */ #line 241 "parse.y" { yymsp[-5].minor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-5].minor.yy0.z); } -#line 2311 "parse.c" +#line 2315 "parse.c" break; case 24: /* typename ::= typename ID|STRING */ #line 246 "parse.y" {yymsp[-1].minor.yy0.n=yymsp[0].minor.yy0.n+(int)(yymsp[0].minor.yy0.z-yymsp[-1].minor.yy0.z);} -#line 2316 "parse.c" +#line 2320 "parse.c" break; case 25: /* ccons ::= CONSTRAINT nm */ case 58: /* tcons ::= CONSTRAINT nm */ yytestcase(yyruleno==58); #line 255 "parse.y" {pParse->constraintName = yymsp[0].minor.yy0;} -#line 2322 "parse.c" +#line 2326 "parse.c" break; case 26: /* ccons ::= DEFAULT term */ case 28: /* ccons ::= DEFAULT PLUS term */ yytestcase(yyruleno==28); #line 256 "parse.y" {sqlite3AddDefaultValue(pParse,&yymsp[0].minor.yy162);} -#line 2328 "parse.c" +#line 2332 "parse.c" break; case 27: /* ccons ::= DEFAULT LP expr RP */ #line 257 "parse.y" {sqlite3AddDefaultValue(pParse,&yymsp[-1].minor.yy162);} -#line 2333 "parse.c" +#line 2337 "parse.c" break; case 29: /* ccons ::= DEFAULT MINUS term */ #line 259 "parse.y" @@ -2340,7 +2344,7 @@ static void yy_reduce( v.zEnd = yymsp[0].minor.yy162.zEnd; sqlite3AddDefaultValue(pParse,&v); } -#line 2344 "parse.c" +#line 2348 "parse.c" break; case 30: /* ccons ::= DEFAULT ID|INDEXED */ #line 266 "parse.y" @@ -2349,115 +2353,115 @@ static void yy_reduce( spanExpr(&v, pParse, TK_STRING, yymsp[0].minor.yy0); sqlite3AddDefaultValue(pParse,&v); } -#line 2353 "parse.c" +#line 2357 "parse.c" break; case 31: /* ccons ::= NOT NULL onconf */ #line 276 "parse.y" {sqlite3AddNotNull(pParse, yymsp[0].minor.yy52);} -#line 2358 "parse.c" +#line 2362 "parse.c" break; case 32: /* ccons ::= PRIMARY KEY sortorder onconf autoinc */ #line 278 "parse.y" {sqlite3AddPrimaryKey(pParse,0,yymsp[-1].minor.yy52,yymsp[0].minor.yy52,yymsp[-2].minor.yy52);} -#line 2363 "parse.c" +#line 2367 "parse.c" break; case 33: /* ccons ::= UNIQUE onconf */ #line 279 "parse.y" {sqlite3CreateIndex(pParse,0,0,0,yymsp[0].minor.yy52,0,0,0,0, SQLITE_IDXTYPE_UNIQUE);} -#line 2369 "parse.c" +#line 2373 "parse.c" break; case 34: /* ccons ::= CHECK LP expr RP */ #line 281 "parse.y" {sqlite3AddCheckConstraint(pParse,yymsp[-1].minor.yy162.pExpr);} -#line 2374 "parse.c" +#line 2378 "parse.c" break; case 35: /* ccons ::= REFERENCES nm eidlist_opt refargs */ #line 283 "parse.y" {sqlite3CreateForeignKey(pParse,0,&yymsp[-2].minor.yy0,yymsp[-1].minor.yy382,yymsp[0].minor.yy52);} -#line 2379 "parse.c" +#line 2383 "parse.c" break; case 36: /* ccons ::= defer_subclause */ #line 284 "parse.y" {sqlite3DeferForeignKey(pParse,yymsp[0].minor.yy52);} -#line 2384 "parse.c" +#line 2388 "parse.c" break; case 37: /* ccons ::= COLLATE ID|INDEXED */ #line 285 "parse.y" {sqlite3AddCollateType(pParse, &yymsp[0].minor.yy0);} -#line 2389 "parse.c" +#line 2393 "parse.c" break; case 39: /* autoinc ::= AUTOINCR */ #line 290 "parse.y" {yymsp[0].minor.yy52 = 1;} -#line 2394 "parse.c" +#line 2398 "parse.c" break; case 40: /* refargs ::= */ #line 298 "parse.y" { yymsp[1].minor.yy52 = ON_CONFLICT_ACTION_NONE*0x0101; /* EV: R-19803-45884 */} -#line 2399 "parse.c" +#line 2403 "parse.c" break; case 41: /* refargs ::= refargs refarg */ #line 299 "parse.y" { yymsp[-1].minor.yy52 = (yymsp[-1].minor.yy52 & ~yymsp[0].minor.yy107.mask) | yymsp[0].minor.yy107.value; } -#line 2404 "parse.c" +#line 2408 "parse.c" break; case 42: /* refarg ::= MATCH nm */ #line 301 "parse.y" { yymsp[-1].minor.yy107.value = 0; yymsp[-1].minor.yy107.mask = 0x000000; } -#line 2409 "parse.c" +#line 2413 "parse.c" break; case 43: /* refarg ::= ON INSERT refact */ #line 302 "parse.y" { yymsp[-2].minor.yy107.value = 0; yymsp[-2].minor.yy107.mask = 0x000000; } -#line 2414 "parse.c" +#line 2418 "parse.c" break; case 44: /* refarg ::= ON DELETE refact */ #line 303 "parse.y" { yymsp[-2].minor.yy107.value = yymsp[0].minor.yy52; yymsp[-2].minor.yy107.mask = 0x0000ff; } -#line 2419 "parse.c" +#line 2423 "parse.c" break; case 45: /* refarg ::= ON UPDATE refact */ #line 304 "parse.y" { yymsp[-2].minor.yy107.value = yymsp[0].minor.yy52<<8; yymsp[-2].minor.yy107.mask = 0x00ff00; } -#line 2424 "parse.c" +#line 2428 "parse.c" break; case 46: /* refact ::= SET NULL */ #line 306 "parse.y" { yymsp[-1].minor.yy52 = OE_SetNull; /* EV: R-33326-45252 */} -#line 2429 "parse.c" +#line 2433 "parse.c" break; case 47: /* refact ::= SET DEFAULT */ #line 307 "parse.y" { yymsp[-1].minor.yy52 = OE_SetDflt; /* EV: R-33326-45252 */} -#line 2434 "parse.c" +#line 2438 "parse.c" break; case 48: /* refact ::= CASCADE */ #line 308 "parse.y" { yymsp[0].minor.yy52 = OE_Cascade; /* EV: R-33326-45252 */} -#line 2439 "parse.c" +#line 2443 "parse.c" break; case 49: /* refact ::= RESTRICT */ #line 309 "parse.y" { yymsp[0].minor.yy52 = OE_Restrict; /* EV: R-33326-45252 */} -#line 2444 "parse.c" +#line 2448 "parse.c" break; case 50: /* refact ::= NO ACTION */ #line 310 "parse.y" { yymsp[-1].minor.yy52 = ON_CONFLICT_ACTION_NONE; /* EV: R-33326-45252 */} -#line 2449 "parse.c" +#line 2453 "parse.c" break; case 51: /* defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */ #line 312 "parse.y" {yymsp[-2].minor.yy52 = 0;} -#line 2454 "parse.c" +#line 2458 "parse.c" break; case 52: /* defer_subclause ::= DEFERRABLE init_deferred_pred_opt */ case 67: /* orconf ::= OR resolvetype */ yytestcase(yyruleno==67); case 138: /* insert_cmd ::= INSERT orconf */ yytestcase(yyruleno==138); #line 313 "parse.y" {yymsp[-1].minor.yy52 = yymsp[0].minor.yy52;} -#line 2461 "parse.c" +#line 2465 "parse.c" break; case 54: /* init_deferred_pred_opt ::= INITIALLY DEFERRED */ case 71: /* ifexists ::= IF EXISTS */ yytestcase(yyruleno==71); @@ -2466,33 +2470,33 @@ static void yy_reduce( case 209: /* collate ::= COLLATE ID|INDEXED */ yytestcase(yyruleno==209); #line 316 "parse.y" {yymsp[-1].minor.yy52 = 1;} -#line 2470 "parse.c" +#line 2474 "parse.c" break; case 55: /* init_deferred_pred_opt ::= INITIALLY IMMEDIATE */ #line 317 "parse.y" {yymsp[-1].minor.yy52 = 0;} -#line 2475 "parse.c" +#line 2479 "parse.c" break; case 57: /* tconscomma ::= COMMA */ #line 323 "parse.y" {pParse->constraintName.n = 0;} -#line 2480 "parse.c" +#line 2484 "parse.c" break; case 59: /* tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */ #line 327 "parse.y" {sqlite3AddPrimaryKey(pParse,yymsp[-3].minor.yy382,yymsp[0].minor.yy52,yymsp[-2].minor.yy52,0);} -#line 2485 "parse.c" +#line 2489 "parse.c" break; case 60: /* tcons ::= UNIQUE LP sortlist RP onconf */ #line 329 "parse.y" {sqlite3CreateIndex(pParse,0,0,yymsp[-2].minor.yy382,yymsp[0].minor.yy52,0,0,0,0, SQLITE_IDXTYPE_UNIQUE);} -#line 2491 "parse.c" +#line 2495 "parse.c" break; case 61: /* tcons ::= CHECK LP expr RP onconf */ #line 332 "parse.y" {sqlite3AddCheckConstraint(pParse,yymsp[-2].minor.yy162.pExpr);} -#line 2496 "parse.c" +#line 2500 "parse.c" break; case 62: /* tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */ #line 334 "parse.y" @@ -2500,50 +2504,50 @@ static void yy_reduce( sqlite3CreateForeignKey(pParse, yymsp[-6].minor.yy382, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy382, yymsp[-1].minor.yy52); sqlite3DeferForeignKey(pParse, yymsp[0].minor.yy52); } -#line 2504 "parse.c" +#line 2508 "parse.c" break; case 64: /* onconf ::= */ case 66: /* orconf ::= */ yytestcase(yyruleno==66); #line 348 "parse.y" {yymsp[1].minor.yy52 = ON_CONFLICT_ACTION_DEFAULT;} -#line 2510 "parse.c" +#line 2514 "parse.c" break; case 65: /* onconf ::= ON CONFLICT resolvetype */ #line 349 "parse.y" {yymsp[-2].minor.yy52 = yymsp[0].minor.yy52;} -#line 2515 "parse.c" +#line 2519 "parse.c" break; case 68: /* resolvetype ::= IGNORE */ #line 353 "parse.y" {yymsp[0].minor.yy52 = ON_CONFLICT_ACTION_IGNORE;} -#line 2520 "parse.c" +#line 2524 "parse.c" break; case 69: /* resolvetype ::= REPLACE */ case 139: /* insert_cmd ::= REPLACE */ yytestcase(yyruleno==139); #line 354 "parse.y" {yymsp[0].minor.yy52 = ON_CONFLICT_ACTION_REPLACE;} -#line 2526 "parse.c" +#line 2530 "parse.c" break; case 70: /* cmd ::= DROP TABLE ifexists fullname */ #line 358 "parse.y" { sqlite3DropTable(pParse, yymsp[0].minor.yy387, 0, yymsp[-1].minor.yy52); } -#line 2533 "parse.c" +#line 2537 "parse.c" break; case 73: /* cmd ::= createkw VIEW ifnotexists nm eidlist_opt AS select */ #line 369 "parse.y" { sqlite3CreateView(pParse, &yymsp[-6].minor.yy0, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy382, yymsp[0].minor.yy279, yymsp[-4].minor.yy52); } -#line 2540 "parse.c" +#line 2544 "parse.c" break; case 74: /* cmd ::= DROP VIEW ifexists fullname */ #line 372 "parse.y" { sqlite3DropTable(pParse, yymsp[0].minor.yy387, 1, yymsp[-1].minor.yy52); } -#line 2547 "parse.c" +#line 2551 "parse.c" break; case 75: /* cmd ::= select */ #line 379 "parse.y" @@ -2552,7 +2556,7 @@ static void yy_reduce( sqlite3Select(pParse, yymsp[0].minor.yy279, &dest); sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy279); } -#line 2556 "parse.c" +#line 2560 "parse.c" break; case 76: /* select ::= with selectnowith */ #line 416 "parse.y" @@ -2566,7 +2570,7 @@ static void yy_reduce( } yymsp[-1].minor.yy279 = p; /*A-overwrites-W*/ } -#line 2570 "parse.c" +#line 2574 "parse.c" break; case 77: /* selectnowith ::= selectnowith multiselect_op oneselect */ #line 429 "parse.y" @@ -2592,18 +2596,18 @@ static void yy_reduce( } yymsp[-2].minor.yy279 = pRhs; } -#line 2596 "parse.c" +#line 2600 "parse.c" break; case 78: /* multiselect_op ::= UNION */ case 80: /* multiselect_op ::= EXCEPT|INTERSECT */ yytestcase(yyruleno==80); #line 452 "parse.y" {yymsp[0].minor.yy52 = yymsp[0].major; /*A-overwrites-OP*/} -#line 2602 "parse.c" +#line 2606 "parse.c" break; case 79: /* multiselect_op ::= UNION ALL */ #line 453 "parse.y" {yymsp[-1].minor.yy52 = TK_ALL;} -#line 2607 "parse.c" +#line 2611 "parse.c" break; case 81: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */ #line 457 "parse.y" @@ -2637,14 +2641,14 @@ static void yy_reduce( } #endif /* SELECTRACE_ENABLED */ } -#line 2641 "parse.c" +#line 2645 "parse.c" break; case 82: /* values ::= VALUES LP nexprlist RP */ #line 491 "parse.y" { yymsp[-3].minor.yy279 = sqlite3SelectNew(pParse,yymsp[-1].minor.yy382,0,0,0,0,0,SF_Values,0,0); } -#line 2648 "parse.c" +#line 2652 "parse.c" break; case 83: /* values ::= values COMMA LP exprlist RP */ #line 494 "parse.y" @@ -2660,17 +2664,17 @@ static void yy_reduce( yymsp[-4].minor.yy279 = pLeft; } } -#line 2664 "parse.c" +#line 2668 "parse.c" break; case 84: /* distinct ::= DISTINCT */ #line 511 "parse.y" {yymsp[0].minor.yy52 = SF_Distinct;} -#line 2669 "parse.c" +#line 2673 "parse.c" break; case 85: /* distinct ::= ALL */ #line 512 "parse.y" {yymsp[0].minor.yy52 = SF_All;} -#line 2674 "parse.c" +#line 2678 "parse.c" break; case 87: /* sclp ::= */ case 113: /* orderby_opt ::= */ yytestcase(yyruleno==113); @@ -2680,7 +2684,7 @@ static void yy_reduce( case 204: /* eidlist_opt ::= */ yytestcase(yyruleno==204); #line 525 "parse.y" {yymsp[1].minor.yy382 = 0;} -#line 2684 "parse.c" +#line 2688 "parse.c" break; case 88: /* selcollist ::= sclp expr as */ #line 526 "parse.y" @@ -2689,7 +2693,7 @@ static void yy_reduce( if( yymsp[0].minor.yy0.n>0 ) sqlite3ExprListSetName(pParse, yymsp[-2].minor.yy382, &yymsp[0].minor.yy0, 1); sqlite3ExprListSetSpan(pParse,yymsp[-2].minor.yy382,&yymsp[-1].minor.yy162); } -#line 2693 "parse.c" +#line 2697 "parse.c" break; case 89: /* selcollist ::= sclp STAR */ #line 531 "parse.y" @@ -2697,7 +2701,7 @@ static void yy_reduce( Expr *p = sqlite3Expr(pParse->db, TK_ASTERISK, 0); yymsp[-1].minor.yy382 = sqlite3ExprListAppend(pParse, yymsp[-1].minor.yy382, p); } -#line 2701 "parse.c" +#line 2705 "parse.c" break; case 90: /* selcollist ::= sclp nm DOT STAR */ #line 535 "parse.y" @@ -2707,19 +2711,19 @@ static void yy_reduce( Expr *pDot = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight); yymsp[-3].minor.yy382 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy382, pDot); } -#line 2711 "parse.c" +#line 2715 "parse.c" break; case 91: /* as ::= AS nm */ case 218: /* plus_num ::= PLUS INTEGER|FLOAT */ yytestcase(yyruleno==218); case 219: /* minus_num ::= MINUS INTEGER|FLOAT */ yytestcase(yyruleno==219); #line 546 "parse.y" {yymsp[-1].minor.yy0 = yymsp[0].minor.yy0;} -#line 2718 "parse.c" +#line 2722 "parse.c" break; case 93: /* from ::= */ #line 560 "parse.y" {yymsp[1].minor.yy387 = sqlite3DbMallocZero(pParse->db, sizeof(*yymsp[1].minor.yy387));} -#line 2723 "parse.c" +#line 2727 "parse.c" break; case 94: /* from ::= FROM seltablist */ #line 561 "parse.y" @@ -2727,19 +2731,19 @@ static void yy_reduce( yymsp[-1].minor.yy387 = yymsp[0].minor.yy387; sqlite3SrcListShiftJoinType(yymsp[-1].minor.yy387); } -#line 2731 "parse.c" +#line 2735 "parse.c" break; case 95: /* stl_prefix ::= seltablist joinop */ #line 569 "parse.y" { if( ALWAYS(yymsp[-1].minor.yy387 && yymsp[-1].minor.yy387->nSrc>0) ) yymsp[-1].minor.yy387->a[yymsp[-1].minor.yy387->nSrc-1].fg.jointype = (u8)yymsp[0].minor.yy52; } -#line 2738 "parse.c" +#line 2742 "parse.c" break; case 96: /* stl_prefix ::= */ #line 572 "parse.y" {yymsp[1].minor.yy387 = 0;} -#line 2743 "parse.c" +#line 2747 "parse.c" break; case 97: /* seltablist ::= stl_prefix nm as indexed_opt on_opt using_opt */ #line 574 "parse.y" @@ -2747,7 +2751,7 @@ static void yy_reduce( yymsp[-5].minor.yy387 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-5].minor.yy387,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,0,yymsp[-1].minor.yy362,yymsp[0].minor.yy40); sqlite3SrcListIndexedBy(pParse, yymsp[-5].minor.yy387, &yymsp[-2].minor.yy0); } -#line 2751 "parse.c" +#line 2755 "parse.c" break; case 98: /* seltablist ::= stl_prefix nm LP exprlist RP as on_opt using_opt */ #line 579 "parse.y" @@ -2755,14 +2759,14 @@ static void yy_reduce( yymsp[-7].minor.yy387 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-7].minor.yy387,&yymsp[-6].minor.yy0,&yymsp[-2].minor.yy0,0,yymsp[-1].minor.yy362,yymsp[0].minor.yy40); sqlite3SrcListFuncArgs(pParse, yymsp[-7].minor.yy387, yymsp[-4].minor.yy382); } -#line 2759 "parse.c" +#line 2763 "parse.c" break; case 99: /* seltablist ::= stl_prefix LP select RP as on_opt using_opt */ #line 585 "parse.y" { yymsp[-6].minor.yy387 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy387,0,&yymsp[-2].minor.yy0,yymsp[-4].minor.yy279,yymsp[-1].minor.yy362,yymsp[0].minor.yy40); } -#line 2766 "parse.c" +#line 2770 "parse.c" break; case 100: /* seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */ #line 589 "parse.y" @@ -2787,32 +2791,32 @@ static void yy_reduce( yymsp[-6].minor.yy387 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy387,0,&yymsp[-2].minor.yy0,pSubquery,yymsp[-1].minor.yy362,yymsp[0].minor.yy40); } } -#line 2791 "parse.c" +#line 2795 "parse.c" break; case 101: /* fullname ::= nm */ #line 615 "parse.y" {yymsp[0].minor.yy387 = sqlite3SrcListAppend(pParse->db,0,&yymsp[0].minor.yy0); /*A-overwrites-X*/} -#line 2796 "parse.c" +#line 2800 "parse.c" break; case 102: /* joinop ::= COMMA|JOIN */ #line 621 "parse.y" { yymsp[0].minor.yy52 = JT_INNER; } -#line 2801 "parse.c" +#line 2805 "parse.c" break; case 103: /* joinop ::= JOIN_KW JOIN */ #line 623 "parse.y" {yymsp[-1].minor.yy52 = sqlite3JoinType(pParse,&yymsp[-1].minor.yy0,0,0); /*X-overwrites-A*/} -#line 2806 "parse.c" +#line 2810 "parse.c" break; case 104: /* joinop ::= JOIN_KW join_nm JOIN */ #line 625 "parse.y" {yymsp[-2].minor.yy52 = sqlite3JoinType(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,0); /*X-overwrites-A*/} -#line 2811 "parse.c" +#line 2815 "parse.c" break; case 105: /* joinop ::= JOIN_KW join_nm join_nm JOIN */ #line 627 "parse.y" {yymsp[-3].minor.yy52 = sqlite3JoinType(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0);/*X-overwrites-A*/} -#line 2816 "parse.c" +#line 2820 "parse.c" break; case 106: /* on_opt ::= ON expr */ case 123: /* having_opt ::= HAVING expr */ yytestcase(yyruleno==123); @@ -2820,7 +2824,7 @@ static void yy_reduce( case 192: /* case_else ::= ELSE expr */ yytestcase(yyruleno==192); #line 631 "parse.y" {yymsp[-1].minor.yy362 = yymsp[0].minor.yy162.pExpr;} -#line 2824 "parse.c" +#line 2828 "parse.c" break; case 107: /* on_opt ::= */ case 122: /* having_opt ::= */ yytestcase(yyruleno==122); @@ -2829,39 +2833,39 @@ static void yy_reduce( case 195: /* case_operand ::= */ yytestcase(yyruleno==195); #line 632 "parse.y" {yymsp[1].minor.yy362 = 0;} -#line 2833 "parse.c" +#line 2837 "parse.c" break; case 108: /* indexed_opt ::= */ #line 645 "parse.y" {yymsp[1].minor.yy0.z=0; yymsp[1].minor.yy0.n=0;} -#line 2838 "parse.c" +#line 2842 "parse.c" break; case 109: /* indexed_opt ::= INDEXED BY nm */ #line 646 "parse.y" {yymsp[-2].minor.yy0 = yymsp[0].minor.yy0;} -#line 2843 "parse.c" +#line 2847 "parse.c" break; case 110: /* indexed_opt ::= NOT INDEXED */ #line 647 "parse.y" {yymsp[-1].minor.yy0.z=0; yymsp[-1].minor.yy0.n=1;} -#line 2848 "parse.c" +#line 2852 "parse.c" break; case 111: /* using_opt ::= USING LP idlist RP */ #line 651 "parse.y" {yymsp[-3].minor.yy40 = yymsp[-1].minor.yy40;} -#line 2853 "parse.c" +#line 2857 "parse.c" break; case 112: /* using_opt ::= */ case 140: /* idlist_opt ::= */ yytestcase(yyruleno==140); #line 652 "parse.y" {yymsp[1].minor.yy40 = 0;} -#line 2859 "parse.c" +#line 2863 "parse.c" break; case 114: /* orderby_opt ::= ORDER BY sortlist */ case 121: /* groupby_opt ::= GROUP BY nexprlist */ yytestcase(yyruleno==121); #line 666 "parse.y" {yymsp[-2].minor.yy382 = yymsp[0].minor.yy382;} -#line 2865 "parse.c" +#line 2869 "parse.c" break; case 115: /* sortlist ::= sortlist COMMA expr sortorder */ #line 667 "parse.y" @@ -2869,7 +2873,7 @@ static void yy_reduce( yymsp[-3].minor.yy382 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy382,yymsp[-1].minor.yy162.pExpr); sqlite3ExprListSetSortOrder(yymsp[-3].minor.yy382,yymsp[0].minor.yy52); } -#line 2873 "parse.c" +#line 2877 "parse.c" break; case 116: /* sortlist ::= expr sortorder */ #line 671 "parse.y" @@ -2877,42 +2881,42 @@ static void yy_reduce( yymsp[-1].minor.yy382 = sqlite3ExprListAppend(pParse,0,yymsp[-1].minor.yy162.pExpr); /*A-overwrites-Y*/ sqlite3ExprListSetSortOrder(yymsp[-1].minor.yy382,yymsp[0].minor.yy52); } -#line 2881 "parse.c" +#line 2885 "parse.c" break; case 117: /* sortorder ::= ASC */ #line 678 "parse.y" {yymsp[0].minor.yy52 = SQLITE_SO_ASC;} -#line 2886 "parse.c" +#line 2890 "parse.c" break; case 118: /* sortorder ::= DESC */ #line 679 "parse.y" {yymsp[0].minor.yy52 = SQLITE_SO_DESC;} -#line 2891 "parse.c" +#line 2895 "parse.c" break; case 119: /* sortorder ::= */ #line 680 "parse.y" {yymsp[1].minor.yy52 = SQLITE_SO_UNDEFINED;} -#line 2896 "parse.c" +#line 2900 "parse.c" break; case 124: /* limit_opt ::= */ #line 705 "parse.y" {yymsp[1].minor.yy384.pLimit = 0; yymsp[1].minor.yy384.pOffset = 0;} -#line 2901 "parse.c" +#line 2905 "parse.c" break; case 125: /* limit_opt ::= LIMIT expr */ #line 706 "parse.y" {yymsp[-1].minor.yy384.pLimit = yymsp[0].minor.yy162.pExpr; yymsp[-1].minor.yy384.pOffset = 0;} -#line 2906 "parse.c" +#line 2910 "parse.c" break; case 126: /* limit_opt ::= LIMIT expr OFFSET expr */ #line 708 "parse.y" {yymsp[-3].minor.yy384.pLimit = yymsp[-2].minor.yy162.pExpr; yymsp[-3].minor.yy384.pOffset = yymsp[0].minor.yy162.pExpr;} -#line 2911 "parse.c" +#line 2915 "parse.c" break; case 127: /* limit_opt ::= LIMIT expr COMMA expr */ #line 710 "parse.y" {yymsp[-3].minor.yy384.pOffset = yymsp[-2].minor.yy162.pExpr; yymsp[-3].minor.yy384.pLimit = yymsp[0].minor.yy162.pExpr;} -#line 2916 "parse.c" +#line 2920 "parse.c" break; case 128: /* cmd ::= with DELETE FROM fullname indexed_opt where_opt */ #line 727 "parse.y" @@ -2924,7 +2928,7 @@ static void yy_reduce( pParse->initiateTTrans = true; sqlite3DeleteFrom(pParse,yymsp[-2].minor.yy387,yymsp[0].minor.yy362); } -#line 2928 "parse.c" +#line 2932 "parse.c" break; case 131: /* cmd ::= with UPDATE orconf fullname indexed_opt SET setlist where_opt */ #line 760 "parse.y" @@ -2937,7 +2941,7 @@ static void yy_reduce( pParse->initiateTTrans = true; sqlite3Update(pParse,yymsp[-4].minor.yy387,yymsp[-1].minor.yy382,yymsp[0].minor.yy362,yymsp[-5].minor.yy52); } -#line 2941 "parse.c" +#line 2945 "parse.c" break; case 132: /* setlist ::= setlist COMMA nm EQ expr */ #line 774 "parse.y" @@ -2945,14 +2949,14 @@ static void yy_reduce( yymsp[-4].minor.yy382 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy382, yymsp[0].minor.yy162.pExpr); sqlite3ExprListSetName(pParse, yymsp[-4].minor.yy382, &yymsp[-2].minor.yy0, 1); } -#line 2949 "parse.c" +#line 2953 "parse.c" break; case 133: /* setlist ::= setlist COMMA LP idlist RP EQ expr */ #line 778 "parse.y" { yymsp[-6].minor.yy382 = sqlite3ExprListAppendVector(pParse, yymsp[-6].minor.yy382, yymsp[-3].minor.yy40, yymsp[0].minor.yy162.pExpr); } -#line 2956 "parse.c" +#line 2960 "parse.c" break; case 134: /* setlist ::= nm EQ expr */ #line 781 "parse.y" @@ -2960,7 +2964,7 @@ static void yy_reduce( yylhsminor.yy382 = sqlite3ExprListAppend(pParse, 0, yymsp[0].minor.yy162.pExpr); sqlite3ExprListSetName(pParse, yylhsminor.yy382, &yymsp[-2].minor.yy0, 1); } -#line 2964 "parse.c" +#line 2968 "parse.c" yymsp[-2].minor.yy382 = yylhsminor.yy382; break; case 135: /* setlist ::= LP idlist RP EQ expr */ @@ -2968,7 +2972,7 @@ static void yy_reduce( { yymsp[-4].minor.yy382 = sqlite3ExprListAppendVector(pParse, 0, yymsp[-3].minor.yy40, yymsp[0].minor.yy162.pExpr); } -#line 2972 "parse.c" +#line 2976 "parse.c" break; case 136: /* cmd ::= with insert_cmd INTO fullname idlist_opt select */ #line 791 "parse.y" @@ -2979,7 +2983,7 @@ static void yy_reduce( pParse->initiateTTrans = true; sqlite3Insert(pParse, yymsp[-2].minor.yy387, yymsp[0].minor.yy279, yymsp[-1].minor.yy40, yymsp[-4].minor.yy52); } -#line 2983 "parse.c" +#line 2987 "parse.c" break; case 137: /* cmd ::= with insert_cmd INTO fullname idlist_opt DEFAULT VALUES */ #line 799 "parse.y" @@ -2990,40 +2994,40 @@ static void yy_reduce( pParse->initiateTTrans = true; sqlite3Insert(pParse, yymsp[-3].minor.yy387, 0, yymsp[-2].minor.yy40, yymsp[-5].minor.yy52); } -#line 2994 "parse.c" +#line 2998 "parse.c" break; case 141: /* idlist_opt ::= LP idlist RP */ #line 817 "parse.y" {yymsp[-2].minor.yy40 = yymsp[-1].minor.yy40;} -#line 2999 "parse.c" +#line 3003 "parse.c" break; case 142: /* idlist ::= idlist COMMA nm */ #line 819 "parse.y" {yymsp[-2].minor.yy40 = sqlite3IdListAppend(pParse->db,yymsp[-2].minor.yy40,&yymsp[0].minor.yy0);} -#line 3004 "parse.c" +#line 3008 "parse.c" break; case 143: /* idlist ::= nm */ #line 821 "parse.y" {yymsp[0].minor.yy40 = sqlite3IdListAppend(pParse->db,0,&yymsp[0].minor.yy0); /*A-overwrites-Y*/} -#line 3009 "parse.c" +#line 3013 "parse.c" break; case 144: /* expr ::= LP expr RP */ #line 870 "parse.y" {spanSet(&yymsp[-2].minor.yy162,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0); /*A-overwrites-B*/ yymsp[-2].minor.yy162.pExpr = yymsp[-1].minor.yy162.pExpr;} -#line 3014 "parse.c" +#line 3018 "parse.c" break; case 145: /* term ::= NULL */ case 149: /* term ::= FLOAT|BLOB */ yytestcase(yyruleno==149); case 150: /* term ::= STRING */ yytestcase(yyruleno==150); #line 871 "parse.y" {spanExpr(&yymsp[0].minor.yy162,pParse,yymsp[0].major,yymsp[0].minor.yy0);/*A-overwrites-X*/} -#line 3021 "parse.c" +#line 3025 "parse.c" break; case 146: /* expr ::= ID|INDEXED */ case 147: /* expr ::= JOIN_KW */ yytestcase(yyruleno==147); #line 872 "parse.y" {spanExpr(&yymsp[0].minor.yy162,pParse,TK_ID,yymsp[0].minor.yy0); /*A-overwrites-X*/} -#line 3027 "parse.c" +#line 3031 "parse.c" break; case 148: /* expr ::= nm DOT nm */ #line 874 "parse.y" @@ -3033,7 +3037,7 @@ static void yy_reduce( spanSet(&yymsp[-2].minor.yy162,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0); /*A-overwrites-X*/ yymsp[-2].minor.yy162.pExpr = sqlite3PExpr(pParse, TK_DOT, temp1, temp2); } -#line 3037 "parse.c" +#line 3041 "parse.c" break; case 151: /* term ::= INTEGER */ #line 882 "parse.y" @@ -3043,7 +3047,7 @@ static void yy_reduce( yylhsminor.yy162.zEnd = yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n; if( yylhsminor.yy162.pExpr ) yylhsminor.yy162.pExpr->flags |= EP_Leaf; } -#line 3047 "parse.c" +#line 3051 "parse.c" yymsp[0].minor.yy162 = yylhsminor.yy162; break; case 152: /* expr ::= VARIABLE */ @@ -3069,7 +3073,7 @@ static void yy_reduce( } } } -#line 3073 "parse.c" +#line 3077 "parse.c" break; case 153: /* expr ::= expr COLLATE ID|INDEXED */ #line 909 "parse.y" @@ -3077,7 +3081,7 @@ static void yy_reduce( yymsp[-2].minor.yy162.pExpr = sqlite3ExprAddCollateToken(pParse, yymsp[-2].minor.yy162.pExpr, &yymsp[0].minor.yy0, 1); yymsp[-2].minor.yy162.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; } -#line 3081 "parse.c" +#line 3085 "parse.c" break; case 154: /* expr ::= CAST LP expr AS typetoken RP */ #line 914 "parse.y" @@ -3086,7 +3090,7 @@ static void yy_reduce( yymsp[-5].minor.yy162.pExpr = sqlite3ExprAlloc(pParse->db, TK_CAST, &yymsp[-1].minor.yy0, 1); sqlite3ExprAttachSubtrees(pParse->db, yymsp[-5].minor.yy162.pExpr, yymsp[-3].minor.yy162.pExpr, 0); } -#line 3090 "parse.c" +#line 3094 "parse.c" break; case 155: /* expr ::= ID|INDEXED LP distinct exprlist RP */ #line 920 "parse.y" @@ -3100,7 +3104,7 @@ static void yy_reduce( yylhsminor.yy162.pExpr->flags |= EP_Distinct; } } -#line 3104 "parse.c" +#line 3108 "parse.c" yymsp[-4].minor.yy162 = yylhsminor.yy162; break; case 156: /* expr ::= ID|INDEXED LP STAR RP */ @@ -3109,7 +3113,7 @@ static void yy_reduce( yylhsminor.yy162.pExpr = sqlite3ExprFunction(pParse, 0, &yymsp[-3].minor.yy0); spanSet(&yylhsminor.yy162,&yymsp[-3].minor.yy0,&yymsp[0].minor.yy0); } -#line 3113 "parse.c" +#line 3117 "parse.c" yymsp[-3].minor.yy162 = yylhsminor.yy162; break; case 157: /* term ::= CTIME_KW */ @@ -3118,7 +3122,7 @@ static void yy_reduce( yylhsminor.yy162.pExpr = sqlite3ExprFunction(pParse, 0, &yymsp[0].minor.yy0); spanSet(&yylhsminor.yy162, &yymsp[0].minor.yy0, &yymsp[0].minor.yy0); } -#line 3122 "parse.c" +#line 3126 "parse.c" yymsp[0].minor.yy162 = yylhsminor.yy162; break; case 158: /* expr ::= LP nexprlist COMMA expr RP */ @@ -3133,7 +3137,7 @@ static void yy_reduce( sqlite3ExprListDelete(pParse->db, pList); } } -#line 3137 "parse.c" +#line 3141 "parse.c" yymsp[-4].minor.yy162 = yylhsminor.yy162; break; case 159: /* expr ::= expr AND expr */ @@ -3146,17 +3150,17 @@ static void yy_reduce( case 166: /* expr ::= expr CONCAT expr */ yytestcase(yyruleno==166); #line 974 "parse.y" {spanBinaryExpr(pParse,yymsp[-1].major,&yymsp[-2].minor.yy162,&yymsp[0].minor.yy162);} -#line 3150 "parse.c" +#line 3154 "parse.c" break; case 167: /* likeop ::= LIKE_KW|MATCH */ #line 987 "parse.y" {yymsp[0].minor.yy0=yymsp[0].minor.yy0;/*A-overwrites-X*/} -#line 3155 "parse.c" +#line 3159 "parse.c" break; case 168: /* likeop ::= NOT LIKE_KW|MATCH */ #line 988 "parse.y" {yymsp[-1].minor.yy0=yymsp[0].minor.yy0; yymsp[-1].minor.yy0.n|=0x80000000; /*yymsp[-1].minor.yy0-overwrite-yymsp[0].minor.yy0*/} -#line 3160 "parse.c" +#line 3164 "parse.c" break; case 169: /* expr ::= expr likeop expr */ #line 989 "parse.y" @@ -3171,7 +3175,7 @@ static void yy_reduce( yymsp[-2].minor.yy162.zEnd = yymsp[0].minor.yy162.zEnd; if( yymsp[-2].minor.yy162.pExpr ) yymsp[-2].minor.yy162.pExpr->flags |= EP_InfixFunc; } -#line 3175 "parse.c" +#line 3179 "parse.c" break; case 170: /* expr ::= expr likeop expr ESCAPE expr */ #line 1000 "parse.y" @@ -3187,17 +3191,17 @@ static void yy_reduce( yymsp[-4].minor.yy162.zEnd = yymsp[0].minor.yy162.zEnd; if( yymsp[-4].minor.yy162.pExpr ) yymsp[-4].minor.yy162.pExpr->flags |= EP_InfixFunc; } -#line 3191 "parse.c" +#line 3195 "parse.c" break; case 171: /* expr ::= expr ISNULL|NOTNULL */ #line 1027 "parse.y" {spanUnaryPostfix(pParse,yymsp[0].major,&yymsp[-1].minor.yy162,&yymsp[0].minor.yy0);} -#line 3196 "parse.c" +#line 3200 "parse.c" break; case 172: /* expr ::= expr NOT NULL */ #line 1028 "parse.y" {spanUnaryPostfix(pParse,TK_NOTNULL,&yymsp[-2].minor.yy162,&yymsp[0].minor.yy0);} -#line 3201 "parse.c" +#line 3205 "parse.c" break; case 173: /* expr ::= expr IS expr */ #line 1049 "parse.y" @@ -3205,7 +3209,7 @@ static void yy_reduce( spanBinaryExpr(pParse,TK_IS,&yymsp[-2].minor.yy162,&yymsp[0].minor.yy162); binaryToUnaryIfNull(pParse, yymsp[0].minor.yy162.pExpr, yymsp[-2].minor.yy162.pExpr, TK_ISNULL); } -#line 3209 "parse.c" +#line 3213 "parse.c" break; case 174: /* expr ::= expr IS NOT expr */ #line 1053 "parse.y" @@ -3213,29 +3217,29 @@ static void yy_reduce( spanBinaryExpr(pParse,TK_ISNOT,&yymsp[-3].minor.yy162,&yymsp[0].minor.yy162); binaryToUnaryIfNull(pParse, yymsp[0].minor.yy162.pExpr, yymsp[-3].minor.yy162.pExpr, TK_NOTNULL); } -#line 3217 "parse.c" +#line 3221 "parse.c" break; case 175: /* expr ::= NOT expr */ case 176: /* expr ::= BITNOT expr */ yytestcase(yyruleno==176); #line 1077 "parse.y" {spanUnaryPrefix(&yymsp[-1].minor.yy162,pParse,yymsp[-1].major,&yymsp[0].minor.yy162,&yymsp[-1].minor.yy0);/*A-overwrites-B*/} -#line 3223 "parse.c" +#line 3227 "parse.c" break; case 177: /* expr ::= MINUS expr */ #line 1081 "parse.y" {spanUnaryPrefix(&yymsp[-1].minor.yy162,pParse,TK_UMINUS,&yymsp[0].minor.yy162,&yymsp[-1].minor.yy0);/*A-overwrites-B*/} -#line 3228 "parse.c" +#line 3232 "parse.c" break; case 178: /* expr ::= PLUS expr */ #line 1083 "parse.y" {spanUnaryPrefix(&yymsp[-1].minor.yy162,pParse,TK_UPLUS,&yymsp[0].minor.yy162,&yymsp[-1].minor.yy0);/*A-overwrites-B*/} -#line 3233 "parse.c" +#line 3237 "parse.c" break; case 179: /* between_op ::= BETWEEN */ case 182: /* in_op ::= IN */ yytestcase(yyruleno==182); #line 1086 "parse.y" {yymsp[0].minor.yy52 = 0;} -#line 3239 "parse.c" +#line 3243 "parse.c" break; case 181: /* expr ::= expr between_op expr AND expr */ #line 1088 "parse.y" @@ -3251,7 +3255,7 @@ static void yy_reduce( exprNot(pParse, yymsp[-3].minor.yy52, &yymsp[-4].minor.yy162); yymsp[-4].minor.yy162.zEnd = yymsp[0].minor.yy162.zEnd; } -#line 3255 "parse.c" +#line 3259 "parse.c" break; case 184: /* expr ::= expr in_op LP exprlist RP */ #line 1104 "parse.y" @@ -3306,7 +3310,7 @@ static void yy_reduce( } yymsp[-4].minor.yy162.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; } -#line 3310 "parse.c" +#line 3314 "parse.c" break; case 185: /* expr ::= LP select RP */ #line 1155 "parse.y" @@ -3315,7 +3319,7 @@ static void yy_reduce( yymsp[-2].minor.yy162.pExpr = sqlite3PExpr(pParse, TK_SELECT, 0, 0); sqlite3PExprAddSelect(pParse, yymsp[-2].minor.yy162.pExpr, yymsp[-1].minor.yy279); } -#line 3319 "parse.c" +#line 3323 "parse.c" break; case 186: /* expr ::= expr in_op LP select RP */ #line 1160 "parse.y" @@ -3325,7 +3329,7 @@ static void yy_reduce( exprNot(pParse, yymsp[-3].minor.yy52, &yymsp[-4].minor.yy162); yymsp[-4].minor.yy162.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n]; } -#line 3329 "parse.c" +#line 3333 "parse.c" break; case 187: /* expr ::= expr in_op nm paren_exprlist */ #line 1166 "parse.y" @@ -3338,7 +3342,7 @@ static void yy_reduce( exprNot(pParse, yymsp[-2].minor.yy52, &yymsp[-3].minor.yy162); yymsp[-3].minor.yy162.zEnd = &yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]; } -#line 3342 "parse.c" +#line 3346 "parse.c" break; case 188: /* expr ::= EXISTS LP select RP */ #line 1175 "parse.y" @@ -3348,7 +3352,7 @@ static void yy_reduce( p = yymsp[-3].minor.yy162.pExpr = sqlite3PExpr(pParse, TK_EXISTS, 0, 0); sqlite3PExprAddSelect(pParse, p, yymsp[-1].minor.yy279); } -#line 3352 "parse.c" +#line 3356 "parse.c" break; case 189: /* expr ::= CASE case_operand case_exprlist case_else END */ #line 1184 "parse.y" @@ -3363,7 +3367,7 @@ static void yy_reduce( sqlite3ExprDelete(pParse->db, yymsp[-1].minor.yy362); } } -#line 3367 "parse.c" +#line 3371 "parse.c" break; case 190: /* case_exprlist ::= case_exprlist WHEN expr THEN expr */ #line 1197 "parse.y" @@ -3371,7 +3375,7 @@ static void yy_reduce( yymsp[-4].minor.yy382 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy382, yymsp[-2].minor.yy162.pExpr); yymsp[-4].minor.yy382 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy382, yymsp[0].minor.yy162.pExpr); } -#line 3375 "parse.c" +#line 3379 "parse.c" break; case 191: /* case_exprlist ::= WHEN expr THEN expr */ #line 1201 "parse.y" @@ -3379,118 +3383,118 @@ static void yy_reduce( yymsp[-3].minor.yy382 = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy162.pExpr); yymsp[-3].minor.yy382 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy382, yymsp[0].minor.yy162.pExpr); } -#line 3383 "parse.c" +#line 3387 "parse.c" break; case 194: /* case_operand ::= expr */ #line 1211 "parse.y" {yymsp[0].minor.yy362 = yymsp[0].minor.yy162.pExpr; /*A-overwrites-X*/} -#line 3388 "parse.c" +#line 3392 "parse.c" break; case 197: /* nexprlist ::= nexprlist COMMA expr */ #line 1222 "parse.y" {yymsp[-2].minor.yy382 = sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy382,yymsp[0].minor.yy162.pExpr);} -#line 3393 "parse.c" +#line 3397 "parse.c" break; case 198: /* nexprlist ::= expr */ #line 1224 "parse.y" {yymsp[0].minor.yy382 = sqlite3ExprListAppend(pParse,0,yymsp[0].minor.yy162.pExpr); /*A-overwrites-Y*/} -#line 3398 "parse.c" +#line 3402 "parse.c" break; case 200: /* paren_exprlist ::= LP exprlist RP */ case 205: /* eidlist_opt ::= LP eidlist RP */ yytestcase(yyruleno==205); #line 1232 "parse.y" {yymsp[-2].minor.yy382 = yymsp[-1].minor.yy382;} -#line 3404 "parse.c" +#line 3408 "parse.c" break; - case 201: /* cmd ::= createkw uniqueflag INDEX ifnotexists nm ON nm LP sortlist RP where_opt */ + case 201: /* cmd ::= createkw uniqueflag INDEX ifnotexists nm ON nm LP sortlist RP */ #line 1239 "parse.y" { - sqlite3CreateIndex(pParse, &yymsp[-6].minor.yy0, - sqlite3SrcListAppend(pParse->db,0,&yymsp[-4].minor.yy0), yymsp[-2].minor.yy382, yymsp[-9].minor.yy52, - &yymsp[-10].minor.yy0, yymsp[0].minor.yy362, SQLITE_SO_ASC, yymsp[-7].minor.yy52, SQLITE_IDXTYPE_APPDEF); + sqlite3CreateIndex(pParse, &yymsp[-5].minor.yy0, + sqlite3SrcListAppend(pParse->db,0,&yymsp[-3].minor.yy0), yymsp[-1].minor.yy382, yymsp[-8].minor.yy52, + &yymsp[-9].minor.yy0, 0, SQLITE_SO_ASC, yymsp[-6].minor.yy52, SQLITE_IDXTYPE_APPDEF); } -#line 3413 "parse.c" +#line 3417 "parse.c" break; case 202: /* uniqueflag ::= UNIQUE */ case 243: /* raisetype ::= ABORT */ yytestcase(yyruleno==243); #line 1246 "parse.y" {yymsp[0].minor.yy52 = ON_CONFLICT_ACTION_ABORT;} -#line 3419 "parse.c" +#line 3423 "parse.c" break; case 203: /* uniqueflag ::= */ #line 1247 "parse.y" {yymsp[1].minor.yy52 = ON_CONFLICT_ACTION_NONE;} -#line 3424 "parse.c" +#line 3428 "parse.c" break; case 206: /* eidlist ::= eidlist COMMA nm collate sortorder */ #line 1290 "parse.y" { yymsp[-4].minor.yy382 = parserAddExprIdListTerm(pParse, yymsp[-4].minor.yy382, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy52, yymsp[0].minor.yy52); } -#line 3431 "parse.c" +#line 3435 "parse.c" break; case 207: /* eidlist ::= nm collate sortorder */ #line 1293 "parse.y" { yymsp[-2].minor.yy382 = parserAddExprIdListTerm(pParse, 0, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy52, yymsp[0].minor.yy52); /*A-overwrites-Y*/ } -#line 3438 "parse.c" +#line 3442 "parse.c" break; case 210: /* cmd ::= DROP INDEX ifexists fullname ON nm */ #line 1304 "parse.y" { sqlite3DropIndex(pParse, yymsp[-2].minor.yy387, &yymsp[0].minor.yy0, yymsp[-3].minor.yy52); } -#line 3445 "parse.c" +#line 3449 "parse.c" break; case 211: /* cmd ::= PRAGMA nm */ #line 1311 "parse.y" { sqlite3Pragma(pParse,&yymsp[0].minor.yy0,0,0,0,0); } -#line 3452 "parse.c" +#line 3456 "parse.c" break; case 212: /* cmd ::= PRAGMA nm EQ nmnum */ #line 1314 "parse.y" { sqlite3Pragma(pParse,&yymsp[-2].minor.yy0,0,&yymsp[0].minor.yy0,0,0); } -#line 3459 "parse.c" +#line 3463 "parse.c" break; case 213: /* cmd ::= PRAGMA nm LP nmnum RP */ #line 1317 "parse.y" { sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,0,&yymsp[-1].minor.yy0,0,0); } -#line 3466 "parse.c" +#line 3470 "parse.c" break; case 214: /* cmd ::= PRAGMA nm EQ minus_num */ #line 1320 "parse.y" { sqlite3Pragma(pParse,&yymsp[-2].minor.yy0,0,&yymsp[0].minor.yy0,0,1); } -#line 3473 "parse.c" +#line 3477 "parse.c" break; case 215: /* cmd ::= PRAGMA nm LP minus_num RP */ #line 1323 "parse.y" { sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,0,&yymsp[-1].minor.yy0,0,1); } -#line 3480 "parse.c" +#line 3484 "parse.c" break; case 216: /* cmd ::= PRAGMA nm EQ nm DOT nm */ #line 1326 "parse.y" { sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,0,&yymsp[0].minor.yy0,&yymsp[-2].minor.yy0,0); } -#line 3487 "parse.c" +#line 3491 "parse.c" break; case 217: /* cmd ::= PRAGMA */ #line 1329 "parse.y" { sqlite3Pragma(pParse, 0,0,0,0,0); } -#line 3494 "parse.c" +#line 3498 "parse.c" break; case 220: /* cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */ #line 1349 "parse.y" @@ -3500,7 +3504,7 @@ static void yy_reduce( all.n = (int)(yymsp[0].minor.yy0.z - yymsp[-3].minor.yy0.z) + yymsp[0].minor.yy0.n; sqlite3FinishTrigger(pParse, yymsp[-1].minor.yy427, &all); } -#line 3504 "parse.c" +#line 3508 "parse.c" break; case 221: /* trigger_decl ::= TRIGGER ifnotexists nm trigger_time trigger_event ON fullname foreach_clause when_clause */ #line 1358 "parse.y" @@ -3508,48 +3512,48 @@ static void yy_reduce( sqlite3BeginTrigger(pParse, &yymsp[-6].minor.yy0, yymsp[-5].minor.yy52, yymsp[-4].minor.yy10.a, yymsp[-4].minor.yy10.b, yymsp[-2].minor.yy387, yymsp[0].minor.yy362, yymsp[-7].minor.yy52); yymsp[-8].minor.yy0 = yymsp[-6].minor.yy0; /*yymsp[-8].minor.yy0-overwrites-T*/ } -#line 3512 "parse.c" +#line 3516 "parse.c" break; case 222: /* trigger_time ::= BEFORE */ #line 1364 "parse.y" { yymsp[0].minor.yy52 = TK_BEFORE; } -#line 3517 "parse.c" +#line 3521 "parse.c" break; case 223: /* trigger_time ::= AFTER */ #line 1365 "parse.y" { yymsp[0].minor.yy52 = TK_AFTER; } -#line 3522 "parse.c" +#line 3526 "parse.c" break; case 224: /* trigger_time ::= INSTEAD OF */ #line 1366 "parse.y" { yymsp[-1].minor.yy52 = TK_INSTEAD;} -#line 3527 "parse.c" +#line 3531 "parse.c" break; case 225: /* trigger_time ::= */ #line 1367 "parse.y" { yymsp[1].minor.yy52 = TK_BEFORE; } -#line 3532 "parse.c" +#line 3536 "parse.c" break; case 226: /* trigger_event ::= DELETE|INSERT */ case 227: /* trigger_event ::= UPDATE */ yytestcase(yyruleno==227); #line 1371 "parse.y" {yymsp[0].minor.yy10.a = yymsp[0].major; /*A-overwrites-X*/ yymsp[0].minor.yy10.b = 0;} -#line 3538 "parse.c" +#line 3542 "parse.c" break; case 228: /* trigger_event ::= UPDATE OF idlist */ #line 1373 "parse.y" {yymsp[-2].minor.yy10.a = TK_UPDATE; yymsp[-2].minor.yy10.b = yymsp[0].minor.yy40;} -#line 3543 "parse.c" +#line 3547 "parse.c" break; case 229: /* when_clause ::= */ #line 1380 "parse.y" { yymsp[1].minor.yy362 = 0; } -#line 3548 "parse.c" +#line 3552 "parse.c" break; case 230: /* when_clause ::= WHEN expr */ #line 1381 "parse.y" { yymsp[-1].minor.yy362 = yymsp[0].minor.yy162.pExpr; } -#line 3553 "parse.c" +#line 3557 "parse.c" break; case 231: /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */ #line 1385 "parse.y" @@ -3558,7 +3562,7 @@ static void yy_reduce( yymsp[-2].minor.yy427->pLast->pNext = yymsp[-1].minor.yy427; yymsp[-2].minor.yy427->pLast = yymsp[-1].minor.yy427; } -#line 3562 "parse.c" +#line 3566 "parse.c" break; case 232: /* trigger_cmd_list ::= trigger_cmd SEMI */ #line 1390 "parse.y" @@ -3566,7 +3570,7 @@ static void yy_reduce( assert( yymsp[-1].minor.yy427!=0 ); yymsp[-1].minor.yy427->pLast = yymsp[-1].minor.yy427; } -#line 3570 "parse.c" +#line 3574 "parse.c" break; case 233: /* trnm ::= nm DOT nm */ #line 1401 "parse.y" @@ -3576,7 +3580,7 @@ static void yy_reduce( "qualified table names are not allowed on INSERT, UPDATE, and DELETE " "statements within triggers"); } -#line 3580 "parse.c" +#line 3584 "parse.c" break; case 234: /* tridxby ::= INDEXED BY nm */ #line 1413 "parse.y" @@ -3585,7 +3589,7 @@ static void yy_reduce( "the INDEXED BY clause is not allowed on UPDATE or DELETE statements " "within triggers"); } -#line 3589 "parse.c" +#line 3593 "parse.c" break; case 235: /* tridxby ::= NOT INDEXED */ #line 1418 "parse.y" @@ -3594,27 +3598,27 @@ static void yy_reduce( "the NOT INDEXED clause is not allowed on UPDATE or DELETE statements " "within triggers"); } -#line 3598 "parse.c" +#line 3602 "parse.c" break; case 236: /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt */ #line 1431 "parse.y" {yymsp[-6].minor.yy427 = sqlite3TriggerUpdateStep(pParse->db, &yymsp[-4].minor.yy0, yymsp[-1].minor.yy382, yymsp[0].minor.yy362, yymsp[-5].minor.yy52);} -#line 3603 "parse.c" +#line 3607 "parse.c" break; case 237: /* trigger_cmd ::= insert_cmd INTO trnm idlist_opt select */ #line 1435 "parse.y" {yymsp[-4].minor.yy427 = sqlite3TriggerInsertStep(pParse->db, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy40, yymsp[0].minor.yy279, yymsp[-4].minor.yy52);/*A-overwrites-R*/} -#line 3608 "parse.c" +#line 3612 "parse.c" break; case 238: /* trigger_cmd ::= DELETE FROM trnm tridxby where_opt */ #line 1439 "parse.y" {yymsp[-4].minor.yy427 = sqlite3TriggerDeleteStep(pParse->db, &yymsp[-2].minor.yy0, yymsp[0].minor.yy362);} -#line 3613 "parse.c" +#line 3617 "parse.c" break; case 239: /* trigger_cmd ::= select */ #line 1443 "parse.y" {yymsp[0].minor.yy427 = sqlite3TriggerSelectStep(pParse->db, yymsp[0].minor.yy279); /*A-overwrites-X*/} -#line 3618 "parse.c" +#line 3622 "parse.c" break; case 240: /* expr ::= RAISE LP IGNORE RP */ #line 1446 "parse.y" @@ -3625,7 +3629,7 @@ static void yy_reduce( yymsp[-3].minor.yy162.pExpr->affinity = ON_CONFLICT_ACTION_IGNORE; } } -#line 3629 "parse.c" +#line 3633 "parse.c" break; case 241: /* expr ::= RAISE LP raisetype COMMA STRING RP */ #line 1453 "parse.y" @@ -3636,85 +3640,85 @@ static void yy_reduce( yymsp[-5].minor.yy162.pExpr->affinity = (char)yymsp[-3].minor.yy52; } } -#line 3640 "parse.c" +#line 3644 "parse.c" break; case 242: /* raisetype ::= ROLLBACK */ #line 1463 "parse.y" {yymsp[0].minor.yy52 = ON_CONFLICT_ACTION_ROLLBACK;} -#line 3645 "parse.c" +#line 3649 "parse.c" break; case 244: /* raisetype ::= FAIL */ #line 1465 "parse.y" {yymsp[0].minor.yy52 = ON_CONFLICT_ACTION_FAIL;} -#line 3650 "parse.c" +#line 3654 "parse.c" break; case 245: /* cmd ::= DROP TRIGGER ifexists fullname */ #line 1470 "parse.y" { sqlite3DropTrigger(pParse,yymsp[0].minor.yy387,yymsp[-1].minor.yy52); } -#line 3657 "parse.c" +#line 3661 "parse.c" break; case 246: /* cmd ::= REINDEX */ #line 1477 "parse.y" {sqlite3Reindex(pParse, 0, 0);} -#line 3662 "parse.c" +#line 3666 "parse.c" break; case 247: /* cmd ::= REINDEX nm */ #line 1478 "parse.y" {sqlite3Reindex(pParse, &yymsp[0].minor.yy0, 0);} -#line 3667 "parse.c" +#line 3671 "parse.c" break; case 248: /* cmd ::= REINDEX nm ON nm */ #line 1479 "parse.y" {sqlite3Reindex(pParse, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);} -#line 3672 "parse.c" +#line 3676 "parse.c" break; case 249: /* cmd ::= ANALYZE */ #line 1484 "parse.y" {sqlite3Analyze(pParse, 0);} -#line 3677 "parse.c" +#line 3681 "parse.c" break; case 250: /* cmd ::= ANALYZE nm */ #line 1485 "parse.y" {sqlite3Analyze(pParse, &yymsp[0].minor.yy0);} -#line 3682 "parse.c" +#line 3686 "parse.c" break; case 251: /* cmd ::= ALTER TABLE fullname RENAME TO nm */ #line 1490 "parse.y" { sqlite3AlterRenameTable(pParse,yymsp[-3].minor.yy387,&yymsp[0].minor.yy0); } -#line 3689 "parse.c" +#line 3693 "parse.c" break; case 252: /* with ::= */ #line 1513 "parse.y" {yymsp[1].minor.yy151 = 0;} -#line 3694 "parse.c" +#line 3698 "parse.c" break; case 253: /* with ::= WITH wqlist */ #line 1515 "parse.y" { yymsp[-1].minor.yy151 = yymsp[0].minor.yy151; } -#line 3699 "parse.c" +#line 3703 "parse.c" break; case 254: /* with ::= WITH RECURSIVE wqlist */ #line 1516 "parse.y" { yymsp[-2].minor.yy151 = yymsp[0].minor.yy151; } -#line 3704 "parse.c" +#line 3708 "parse.c" break; case 255: /* wqlist ::= nm eidlist_opt AS LP select RP */ #line 1518 "parse.y" { yymsp[-5].minor.yy151 = sqlite3WithAdd(pParse, 0, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy382, yymsp[-1].minor.yy279); /*A-overwrites-X*/ } -#line 3711 "parse.c" +#line 3715 "parse.c" break; case 256: /* wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP */ #line 1521 "parse.y" { yymsp[-7].minor.yy151 = sqlite3WithAdd(pParse, yymsp[-7].minor.yy151, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy382, yymsp[-1].minor.yy279); } -#line 3718 "parse.c" +#line 3722 "parse.c" break; default: /* (257) input ::= ecmd */ yytestcase(yyruleno==257); @@ -3825,7 +3829,7 @@ static void yy_syntax_error( } else { sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &TOKEN); } -#line 3829 "parse.c" +#line 3833 "parse.c" /************ End %syntax_error code ******************************************/ sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument variable */ } diff --git a/src/box/sql/parse.y b/src/box/sql/parse.y index 914fc53..5fb2c89 100644 --- a/src/box/sql/parse.y +++ b/src/box/sql/parse.y @@ -1236,10 +1236,10 @@ paren_exprlist(A) ::= LP exprlist(X) RP. {A = X;} ///////////////////////////// The CREATE INDEX command /////////////////////// // cmd ::= createkw(S) uniqueflag(U) INDEX ifnotexists(NE) nm(X) - ON nm(Y) LP sortlist(Z) RP where_opt(W). { + ON nm(Y) LP sortlist(Z) RP. { sqlite3CreateIndex(pParse, &X, sqlite3SrcListAppend(pParse->db,0,&Y), Z, U, - &S, W, SQLITE_SO_ASC, NE, SQLITE_IDXTYPE_APPDEF); + &S, 0, SQLITE_SO_ASC, NE, SQLITE_IDXTYPE_APPDEF); } %type uniqueflag {int} diff --git a/test/sql-tap/analyze9.test.lua b/test/sql-tap/analyze9.test.lua index 4ce575e..8470239 100755 --- a/test/sql-tap/analyze9.test.lua +++ b/test/sql-tap/analyze9.test.lua @@ -1,6 +1,6 @@ #!/usr/bin/env tarantool test = require("sqltester") -test:plan(124) +test:plan(118) testprefix = "analyze9" @@ -1105,82 +1105,82 @@ test:do_execsql_test( --------------------------------------------------------------------------- -- Test that stat4 data may be used with partial indexes. -- -test:do_test( - 17.1, - function() - test:execsql([[ - DROP TABLE IF EXISTS t1; - CREATE TABLE t1(id INTEGER PRIMARY KEY AUTOINCREMENT, a, b, c, d); - CREATE INDEX i1 ON t1(a, b) WHERE d IS NOT NULL; - INSERT INTO t1 VALUES(null, -1, -1, -1, NULL); - INSERT INTO t1 SELECT null, 2*a,2*b,2*c,d FROM t1; - INSERT INTO t1 SELECT null, 2*a,2*b,2*c,d FROM t1; - INSERT INTO t1 SELECT null, 2*a,2*b,2*c,d FROM t1; - INSERT INTO t1 SELECT null, 2*a,2*b,2*c,d FROM t1; - INSERT INTO t1 SELECT null, 2*a,2*b,2*c,d FROM t1; - INSERT INTO t1 SELECT null, 2*a,2*b,2*c,d FROM t1; - ]]) - local b = 0 - for i = 0, 31 do - if (i < 8) then - b = 0 - else - b = i - end - test:execsql(string.format(" INSERT INTO t1 VALUES(null, %s%%2, %s, %s/2, 'abc') ", i, b, i)) - end - return test:execsql("ANALYZE") - end, { - -- <17.1> - -- </17.1> - }) +--test:do_test( +-- 17.1, +-- function() +-- test:execsql([[ +-- DROP TABLE IF EXISTS t1; +-- CREATE TABLE t1(id INTEGER PRIMARY KEY AUTOINCREMENT, a, b, c, d); +-- CREATE INDEX i1 ON t1(a, b) WHERE d IS NOT NULL; +-- INSERT INTO t1 VALUES(null, -1, -1, -1, NULL); +-- INSERT INTO t1 SELECT null, 2*a,2*b,2*c,d FROM t1; +-- INSERT INTO t1 SELECT null, 2*a,2*b,2*c,d FROM t1; +-- INSERT INTO t1 SELECT null, 2*a,2*b,2*c,d FROM t1; +-- INSERT INTO t1 SELECT null, 2*a,2*b,2*c,d FROM t1; +-- INSERT INTO t1 SELECT null, 2*a,2*b,2*c,d FROM t1; +-- INSERT INTO t1 SELECT null, 2*a,2*b,2*c,d FROM t1; +-- ]]) +-- local b = 0 +-- for i = 0, 31 do +-- if (i < 8) then +-- b = 0 +-- else +-- b = i +-- end +-- test:execsql(string.format(" INSERT INTO t1 VALUES(null, %s%%2, %s, %s/2, 'abc') ", i, b, i)) +-- end +-- return test:execsql("ANALYZE") +-- end, { +-- -- <17.1> +-- -- </17.1> +-- }) -test:do_execsql_test( - 17.2, - [[ - EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE d IS NOT NULL AND a=0 AND b=10 AND c=10; - ]], { - -- <17.2> - 0, 0, 0, 'SEARCH TABLE T1 USING COVERING INDEX I1 (A=? AND B=?)' - -- </17.2> - }) +--test:do_execsql_test( +-- 17.2, +-- [[ +-- EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE d IS NOT NULL AND a=0 AND b=10 AND c=10; +-- ]], { +-- -- <17.2> +-- 0, 0, 0, 'SEARCH TABLE T1 USING COVERING INDEX I1 (A=? AND B=?)' +-- -- </17.2> +-- }) -test:do_execsql_test( - 17.3, - [[ - EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE d IS NOT NULL AND a=0 AND b=0 AND c=10; - ]], { - -- <17.3> - 0, 0, 0, "SEARCH TABLE T1 USING COVERING INDEX I1 (A=? AND B=?)" - -- </17.3> - }) +--test:do_execsql_test( +-- 17.3, +-- [[ +-- EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE d IS NOT NULL AND a=0 AND b=0 AND c=10; +-- ]], { +-- -- <17.3> +-- 0, 0, 0, "SEARCH TABLE T1 USING COVERING INDEX I1 (A=? AND B=?)" +-- -- </17.3> +-- }) -test:do_execsql_test( - 17.4, - [[ - CREATE INDEX i2 ON t1(c, d); - ANALYZE; - ]]) +--test:do_execsql_test( +-- 17.4, +-- [[ +-- CREATE INDEX i2 ON t1(c, d); +-- ANALYZE; +-- ]]) -test:do_execsql_test( - 17.5, - [[ - EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE d IS NOT NULL AND a=0 AND b=10 AND c=10; - ]], { - -- <17.5> - 0, 0, 0, "SEARCH TABLE T1 USING COVERING INDEX I2 (C=? AND D>?)" - -- </17.5> - }) +--test:do_execsql_test( +-- 17.5, +-- [[ +-- EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE d IS NOT NULL AND a=0 AND b=10 AND c=10; +-- ]], { +-- -- <17.5> +-- 0, 0, 0, "SEARCH TABLE T1 USING COVERING INDEX I2 (C=? AND D>?)" +-- -- </17.5> +-- }) -test:do_execsql_test( - 17.6, - [[ - EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE d IS NOT NULL AND a=0 AND b=0 AND c=10; - ]], { - -- <17.6> - 0, 0, 0, "SEARCH TABLE T1 USING COVERING INDEX I2 (C=? AND D>?)" - -- </17.6> - }) +--test:do_execsql_test( +-- 17.6, +-- [[ +-- EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE d IS NOT NULL AND a=0 AND b=0 AND c=10; +-- ]], { +-- -- <17.6> +-- 0, 0, 0, "SEARCH TABLE T1 USING COVERING INDEX I2 (C=? AND D>?)" +-- -- </17.6> +-- }) --------------------------------------------------------------------------- diff --git a/test/sql-tap/autoindex4.test.lua b/test/sql-tap/autoindex4.test.lua index 45bae48..c19639a 100755 --- a/test/sql-tap/autoindex4.test.lua +++ b/test/sql-tap/autoindex4.test.lua @@ -1,6 +1,6 @@ #!/usr/bin/env tarantool test = require("sqltester") -test:plan(7) +test:plan(6) --!./tcltestrunner.lua -- 2014-10-24 @@ -108,22 +108,21 @@ test:do_execsql_test( -- </autoindex4-3.0> }) -test:do_execsql_test( - "autoindex4-3.1", - [[ - CREATE INDEX Items_x1 ON Items(ItemName,Name) WHERE ItemName = 'dummy'; - - SELECT Items.ItemName - FROM Items - LEFT JOIN A ON (A.Name = Items.ItemName and Items.ItemName = 'dummy') - LEFT JOIN B ON (B.Name = Items.ItemName) - WHERE Items.Name = 'Parent' - ORDER BY Items.ItemName; - ]], { - -- <autoindex4-3.1> - "Item1", "Item2" - -- </autoindex4-3.1> - }) +--test:do_execsql_test( +-- "autoindex4-3.1", +-- [[ +-- CREATE INDEX Items_x1 ON Items(ItemName,Name) WHERE ItemName = 'dummy'; +-- +-- SELECT Items.ItemName +-- FROM Items +-- LEFT JOIN A ON (A.Name = Items.ItemName and Items.ItemName = 'dummy') +-- LEFT JOIN B ON (B.Name = Items.ItemName) +-- WHERE Items.Name = 'Parent' +-- ORDER BY Items.ItemName; +-- ]], { +-- -- <autoindex4-3.1> +-- "Item1", "Item2" +-- -- </autoindex4-3.1> +-- }) test:finish_test() - diff --git a/test/sql-tap/fkey1.test.lua b/test/sql-tap/fkey1.test.lua index 8749e1f..fb84968 100755 --- a/test/sql-tap/fkey1.test.lua +++ b/test/sql-tap/fkey1.test.lua @@ -1,6 +1,6 @@ #!/usr/bin/env tarantool test = require("sqltester") -test:plan(19) +test:plan(16) -- This file implements regression tests for foreign keys. @@ -208,36 +208,36 @@ test:do_execsql_test( -- </fkey1-5.6> }) -test:do_execsql_test( - "fkey1-6.1", - [[ - CREATE TABLE p1(id PRIMARY KEY, x, y); - CREATE UNIQUE INDEX p1x ON p1(x) WHERE y<2; - INSERT INTO p1 VALUES(1, 1, 1); - CREATE TABLE c1(a PRIMARY KEY REFERENCES p1(x)); - ]], { - -- <fkey1-6.1> - -- </fkey1-6.1> - }) - -test:do_catchsql_test( - "fkey1-6.2", - [[ - INSERT INTO c1 VALUES(1); - ]], { - -- <fkey1-6.2> - 1, "foreign key mismatch - \"C1\" referencing \"P1\"" - -- </fkey1-6.2> - }) - -test:do_execsql_test( - "fkey1-6.3", - [[ - CREATE UNIQUE INDEX p1x2 ON p1(x); - INSERT INTO c1 VALUES(1); - ]], { - -- <fkey1-6.3> - -- </fkey1-6.3> - }) +--test:do_execsql_test( +-- "fkey1-6.1", +-- [[ +-- CREATE TABLE p1(id PRIMARY KEY, x, y); +-- CREATE UNIQUE INDEX p1x ON p1(x) WHERE y<2; +-- INSERT INTO p1 VALUES(1, 1, 1); +-- CREATE TABLE c1(a PRIMARY KEY REFERENCES p1(x)); +-- ]], { +-- -- <fkey1-6.1> +-- -- </fkey1-6.1> +-- }) + +--test:do_catchsql_test( +-- "fkey1-6.2", +-- [[ +-- INSERT INTO c1 VALUES(1); +-- ]], { +-- -- <fkey1-6.2> +-- 1, "foreign key mismatch - \"C1\" referencing \"P1\"" +-- -- </fkey1-6.2> +-- }) + +--test:do_execsql_test( +-- "fkey1-6.3", +-- [[ +-- CREATE UNIQUE INDEX p1x2 ON p1(x); +-- INSERT INTO c1 VALUES(1); +-- ]], { +-- -- <fkey1-6.3> +-- -- </fkey1-6.3> +-- }) test:finish_test() diff --git a/test/sql-tap/gh-2165-remove-support-partial-indexes.test.lua b/test/sql-tap/gh-2165-remove-support-partial-indexes.test.lua new file mode 100755 index 0000000..d8210fc --- /dev/null +++ b/test/sql-tap/gh-2165-remove-support-partial-indexes.test.lua @@ -0,0 +1,17 @@ +#!/usr/bin/env tarantool +test = require("sqltester") + +test:plan(1) + + +test:do_catchsql_test( + "partial-index-1", + [[ + CREATE TABLE t1 (a INTEGER PRIMARY KEY, b INTEGER) + CREATE UNIQUE INDEX i ON t1 (a) WHERE a = 3; + ]], { + 1, "keyword \"CREATE\" is reserved" + }) + +--This test intended to be deleted in #2626 +test:finish_test() diff --git a/test/sql-tap/index7.test.lua b/test/sql-tap/index7.test.lua index c8f56eb..c294732 100755 --- a/test/sql-tap/index7.test.lua +++ b/test/sql-tap/index7.test.lua @@ -1,6 +1,6 @@ #!/usr/bin/env tarantool test = require("sqltester") -test:plan(5) +test:plan(1) --!./tcltestrunner.lua -- 2013-11-04 @@ -258,47 +258,47 @@ test:do_execsql_test( -- </index7-6.1> }) -test:do_execsql_test( - "index7-6.2", - [[ - CREATE INDEX i4 ON t4(c) WHERE d='xyz'; - SELECT a,b,c,d FROM (SELECT a,b FROM t5 WHERE a=1 AND b='xyz'), t4 WHERE c='abc'; - ]], { - -- <index7-6.2> - 1, "xyz", "abc", "not xyz" - -- </index7-6.2> - }) +--test:do_execsql_test( +-- "index7-6.2", +-- [[ +-- CREATE INDEX i4 ON t4(c) WHERE d='xyz'; +-- SELECT a,b,c,d FROM (SELECT a,b FROM t5 WHERE a=1 AND b='xyz'), t4 WHERE c='abc'; +-- ]], { +-- -- <index7-6.2> +-- 1, "xyz", "abc", "not xyz" +-- -- </index7-6.2> +-- }) -test:do_execsql_test( - "index7-6.3", - [[ - CREATE VIEW v4 AS SELECT c,d FROM t4; - INSERT INTO t4 VALUES(2, 'def', 'xyz'); - SELECT * FROM v4 WHERE d='xyz' AND c='def' - ]], { - -- <index7-6.3> - "def", "xyz" - -- </index7-6.3> - }) +--test:do_execsql_test( +-- "index7-6.3", +-- [[ +-- CREATE VIEW v4 AS SELECT c,d FROM t4; +-- INSERT INTO t4 VALUES(2, 'def', 'xyz'); +-- SELECT * FROM v4 WHERE d='xyz' AND c='def' +-- ]], { +-- -- <index7-6.3> +-- "def", "xyz" +-- -- </index7-6.3> +-- }) -test:do_eqp_test( - "index7-6.4", - [[ - SELECT * FROM v4 WHERE d='xyz' AND c='def' - ]], { - -- <index7-6.4> - {0, 0, 0, "SEARCH TABLE T4 USING COVERING INDEX I4 (C=?)"} - -- </index7-6.4> - }) +--test:do_eqp_test( +-- "index7-6.4", +-- [[ +-- SELECT * FROM v4 WHERE d='xyz' AND c='def' +-- ]], { +-- -- <index7-6.4> +-- {0, 0, 0, "SEARCH TABLE T4 USING COVERING INDEX I4 (C=?)"} +-- -- </index7-6.4> +-- }) -test:do_catchsql_test( - "index7-6.5", - [[ - CREATE INDEX t5a ON t5(a) WHERE a=#1; - ]], { - -- <index7-6.5> - 1, [[near "#1": syntax error]] - -- </index7-6.5> - }) +--test:do_catchsql_test( +-- "index7-6.5", +-- [[ +-- CREATE INDEX t5a ON t5(a) WHERE a=#1; +-- ]], { +-- -- <index7-6.5> +-- 1, [[near "#1": syntax error]] +-- -- </index7-6.5> +-- }) test:finish_test() diff --git a/test/sql-tap/suite.ini b/test/sql-tap/suite.ini index 0bc9e83..d29c1b0 100644 --- a/test/sql-tap/suite.ini +++ b/test/sql-tap/suite.ini @@ -3,3 +3,4 @@ core = app description = Database tests with #! using TAP lua_libs = lua/sqltester.lua ../sql/lua/sql_tokenizer.lua ../box/lua/identifier.lua is_parallel = True +disabled = index6.test.lua ; to be enabled after #2626 -- 2.7.4
next reply other threads:[~2018-04-04 8:37 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-04-04 8:37 Gleb [this message] -- strict thread matches above, loose matches on Subject: below -- 2018-04-03 11:42 Gleb 2018-03-29 10:58 Gleb
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1522831064-12135-1-git-send-email-gleb-skiba@mail.ru \ --to=dmarc-noreply@freelists.org \ --cc=tarantool-patches@freelists.org \ --subject='Re: [tarantool-patches] [PATCH] sql: remove support of partial indexes' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox