Commit 0379a691 authored by Otto Kekäläinen's avatar Otto Kekäläinen
Browse files

Update upstream source from tag 'upstream/5.5.64'

Update to upstream version '5.5.64'
with Debian dir b7957bbeb847da5eea7ad7ce27dbb476ae08d867
parents cbc39f88 b9a9fe5c
......@@ -1208,6 +1208,9 @@ int mysql_multi_update_prepare(THD *thd)
List<Item> *fields= &lex->select_lex.item_list;
table_map tables_for_update;
bool update_view= 0;
DML_prelocking_strategy prelocking_strategy;
bool has_prelocking_list= thd->lex->requires_prelocking();
/*
if this multi-update was converted from usual update, here is table
counter else junk will be assigned here, but then replaced with real
......@@ -1228,10 +1231,10 @@ int mysql_multi_update_prepare(THD *thd)
keep prepare of multi-UPDATE compatible with concurrent LOCK TABLES WRITE
and global read lock.
*/
if ((original_multiupdate &&
open_tables(thd, &table_list, &table_count,
(thd->stmt_arena->is_stmt_prepare() ?
MYSQL_OPEN_FORCE_SHARED_MDL : 0))) ||
if ((original_multiupdate && open_tables(thd, &table_list, &table_count,
thd->stmt_arena->is_stmt_prepare()
? MYSQL_OPEN_FORCE_SHARED_MDL : 0,
&prelocking_strategy)) ||
mysql_handle_derived(lex, DT_INIT))
DBUG_RETURN(TRUE);
/*
......@@ -1278,6 +1281,9 @@ int mysql_multi_update_prepare(THD *thd)
if (unsafe_key_update(lex->select_lex.leaf_tables, tables_for_update))
DBUG_RETURN(true);
TABLE_LIST **new_tables= lex->query_tables_last;
DBUG_ASSERT(*new_tables== NULL);
/*
Setup timestamp handling and locking mode
*/
......@@ -1305,6 +1311,11 @@ int mysql_multi_update_prepare(THD *thd)
If table will be updated we should not downgrade lock for it and
leave it as is.
*/
tl->updating= 1;
if (tl->belong_to_view)
tl->belong_to_view->updating= 1;
if (extend_table_list(thd, tl, &prelocking_strategy, has_prelocking_list))
DBUG_RETURN(TRUE);
}
else
{
......@@ -1323,9 +1334,21 @@ int mysql_multi_update_prepare(THD *thd)
tl->lock_type= read_lock_type_for_table(thd, lex, tl);
else
tl->set_lock_type(thd, read_lock_type_for_table(thd, lex, tl));
tl->updating= 0;
}
}
uint addon_table_count= 0;
if (*new_tables)
{
Sroutine_hash_entry **new_routines= thd->lex->sroutines_list.next;
DBUG_ASSERT(*new_routines == NULL);
if (open_tables(thd, new_tables, &addon_table_count, new_routines,
thd->stmt_arena->is_stmt_prepare()
? MYSQL_OPEN_FORCE_SHARED_MDL : 0,
&prelocking_strategy))
DBUG_RETURN(TRUE);
}
for (tl= table_list; tl; tl= tl->next_local)
{
/* Check access privileges for table */
......@@ -1358,7 +1381,7 @@ int mysql_multi_update_prepare(THD *thd)
/* now lock and fill tables */
if (!thd->stmt_arena->is_stmt_prepare() &&
lock_tables(thd, table_list, table_count, 0))
lock_tables(thd, table_list, table_count + addon_table_count, 0))
{
DBUG_RETURN(TRUE);
}
......
......@@ -1511,6 +1511,7 @@ bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table,
tbl->lock_type= table->lock_type;
tbl->mdl_request.set_type((tbl->lock_type >= TL_WRITE_ALLOW_WRITE) ?
MDL_SHARED_WRITE : MDL_SHARED_READ);
tbl->updating= table->updating;
}
/*
If the view is mergeable, we might want to
......
......@@ -2715,33 +2715,33 @@ static const yytype_uint16 yyrline[] =
13494, 13498, 13539, 13557, 13568, 13585, 13598, 13613, 13632, 13658,
13671, 13697, 13740, 13754, 13755, 13756, 13757, 13761, 13762, 13771,
13783, 13784, 13785, 13791, 13797, 13809, 13808, 13824, 13825, 13829,
13830, 13834, 13849, 13850, 13851, 13856, 13857, 13862, 13861, 13881,
13893, 13906, 13905, 13939, 13940, 13944, 13945, 13949, 13950, 13951,
13952, 13954, 13953, 13966, 13967, 13968, 13969, 13970, 13976, 13981,
13987, 13998, 14009, 14013, 14023, 14028, 14035, 14047, 14059, 14068,
14070, 14074, 14075, 14082, 14084, 14088, 14089, 14094, 14093, 14097,
14096, 14100, 14099, 14103, 14102, 14105, 14106, 14107, 14108, 14109,
14110, 14111, 14112, 14113, 14114, 14115, 14116, 14117, 14118, 14119,
14120, 14121, 14122, 14123, 14124, 14125, 14126, 14127, 14128, 14129,
14130, 14134, 14135, 14139, 14140, 14144, 14154, 14164, 14177, 14192,
14205, 14218, 14230, 14235, 14243, 14248, 14255, 14255, 14256, 14256,
14259, 14286, 14291, 14297, 14303, 14309, 14313, 14317, 14318, 14322,
14349, 14351, 14355, 14359, 14363, 14370, 14371, 14375, 14376, 14380,
14381, 14385, 14386, 14392, 14398, 14404, 14414, 14413, 14423, 14424,
14429, 14430, 14431, 14436, 14437, 14438, 14442, 14443, 14447, 14459,
14468, 14478, 14487, 14501, 14502, 14507, 14506, 14522, 14523, 14524,
14528, 14529, 14533, 14533, 14555, 14556, 14560, 14561, 14562, 14566,
14570, 14577, 14580, 14578, 14594, 14601, 14622, 14648, 14650, 14654,
14655, 14659, 14660, 14668, 14669, 14670, 14671, 14677, 14683, 14693,
14695, 14697, 14702, 14703, 14704, 14705, 14706, 14710, 14711, 14712,
14713, 14714, 14715, 14725, 14726, 14731, 14744, 14757, 14759, 14761,
14766, 14771, 14773, 14775, 14781, 14782, 14784, 14790, 14789, 14806,
14807, 14811, 14816, 14824, 14824, 14848, 14849, 14854, 14855, 14857,
14859, 14877, 14883, 14888, 14870, 14949, 14966, 14990, 15021, 15025,
15034, 15057, 14986, 15120, 15144, 15153, 15160, 15119, 15180, 15184,
15188, 15192, 15196, 15200, 15207, 15214, 15221, 15231, 15232, 15236,
15237, 15238, 15242, 15243, 15248, 15250, 15249, 15255, 15256, 15260,
15267, 15277, 15283, 15294
13830, 13834, 13852, 13853, 13854, 13859, 13860, 13865, 13864, 13884,
13896, 13909, 13908, 13942, 13943, 13947, 13948, 13952, 13953, 13954,
13955, 13957, 13956, 13969, 13970, 13971, 13972, 13973, 13979, 13984,
13990, 14001, 14012, 14016, 14026, 14031, 14038, 14050, 14062, 14071,
14073, 14077, 14078, 14085, 14087, 14091, 14092, 14097, 14096, 14100,
14099, 14103, 14102, 14106, 14105, 14108, 14109, 14110, 14111, 14112,
14113, 14114, 14115, 14116, 14117, 14118, 14119, 14120, 14121, 14122,
14123, 14124, 14125, 14126, 14127, 14128, 14129, 14130, 14131, 14132,
14133, 14137, 14138, 14142, 14143, 14147, 14157, 14167, 14180, 14195,
14208, 14221, 14233, 14238, 14246, 14251, 14258, 14258, 14259, 14259,
14262, 14289, 14294, 14300, 14306, 14312, 14316, 14320, 14321, 14325,
14352, 14354, 14358, 14362, 14366, 14373, 14374, 14378, 14379, 14383,
14384, 14388, 14389, 14395, 14401, 14407, 14417, 14416, 14426, 14427,
14432, 14433, 14434, 14439, 14440, 14441, 14445, 14446, 14450, 14462,
14471, 14481, 14490, 14504, 14505, 14510, 14509, 14525, 14526, 14527,
14531, 14532, 14536, 14536, 14558, 14559, 14563, 14564, 14565, 14569,
14573, 14580, 14583, 14581, 14597, 14604, 14625, 14651, 14653, 14657,
14658, 14662, 14663, 14671, 14672, 14673, 14674, 14680, 14686, 14696,
14698, 14700, 14705, 14706, 14707, 14708, 14709, 14713, 14714, 14715,
14716, 14717, 14718, 14728, 14729, 14734, 14747, 14760, 14762, 14764,
14769, 14774, 14776, 14778, 14784, 14785, 14787, 14793, 14792, 14809,
14810, 14814, 14819, 14827, 14827, 14851, 14852, 14857, 14858, 14860,
14862, 14880, 14886, 14891, 14873, 14952, 14969, 14993, 15024, 15028,
15037, 15060, 14989, 15123, 15147, 15156, 15163, 15122, 15183, 15187,
15191, 15195, 15199, 15203, 15210, 15217, 15224, 15234, 15235, 15239,
15240, 15241, 15245, 15246, 15251, 15253, 15252, 15258, 15259, 15263,
15270, 15280, 15286, 15297
};
#endif
 
......@@ -25155,7 +25155,7 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
#line 7677 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
lex->current_select->set_lock_for_tables(TL_WRITE);
lex->current_select->set_lock_for_tables(TL_WRITE, false);
lex->safe_to_cache_query=0;
}
#line 25162 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
......@@ -25166,7 +25166,7 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
{
LEX *lex=Lex;
lex->current_select->
set_lock_for_tables(TL_READ_WITH_SHARED_LOCKS);
set_lock_for_tables(TL_READ_WITH_SHARED_LOCKS, false);
lex->safe_to_cache_query=0;
}
#line 25173 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
......@@ -29826,7 +29826,7 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
case 1621:
#line 10968 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Select->set_lock_for_tables((yyvsp[-2].lock_type));
Select->set_lock_for_tables((yyvsp[-2].lock_type), true);
Lex->current_select= &Lex->select_lex;
}
#line 29833 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
......@@ -29852,7 +29852,7 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
case 1624:
#line 10985 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Select->set_lock_for_tables((yyvsp[-1].lock_type));
Select->set_lock_for_tables((yyvsp[-1].lock_type), true);
Lex->current_select= &Lex->select_lex;
}
#line 29859 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
......@@ -30133,14 +30133,14 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
case 1669:
#line 11161 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
if (lex->select_lex.table_list.elements > 1)
lex->sql_command= SQLCOM_UPDATE_MULTI;
else if (lex->select_lex.get_table_list()->derived)
SELECT_LEX *slex= &Lex->select_lex;
if (slex->table_list.elements > 1)
Lex->sql_command= SQLCOM_UPDATE_MULTI;
else if (slex->get_table_list()->derived)
{
/* it is single table update and it is update of derived table */
my_error(ER_NON_UPDATABLE_TABLE, MYF(0),
lex->select_lex.get_table_list()->alias, "UPDATE");
slex->get_table_list()->alias, "UPDATE");
MYSQL_YYABORT;
}
/*
......@@ -30148,7 +30148,7 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
be too pessimistic. We will decrease lock level if possible in
mysql_multi_update().
*/
Select->set_lock_for_tables((yyvsp[-4].lock_type));
slex->set_lock_for_tables((yyvsp[-4].lock_type), slex->table_list.elements == 1);
}
#line 30154 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
......@@ -35505,52 +35505,55 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
#line 13835 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
thr_lock_type lock_type= (thr_lock_type) (yyvsp[0].num);
bool lock_for_write= (lock_type >= TL_WRITE_ALLOW_WRITE);
if (!Select->add_table_to_list(thd, (yyvsp[-2].table), (yyvsp[-1].lex_str_ptr), 0, lock_type,
(lock_for_write ?
lock_type == TL_WRITE_CONCURRENT_INSERT ?
MDL_SHARED_WRITE :
MDL_SHARED_NO_READ_WRITE :
MDL_SHARED_READ)))
bool lock_for_write= lock_type >= TL_WRITE_ALLOW_WRITE;
ulong table_options= lock_for_write ? TL_OPTION_UPDATING : 0;
enum_mdl_type mdl_type= !lock_for_write
? MDL_SHARED_READ
: lock_type == TL_WRITE_CONCURRENT_INSERT
? MDL_SHARED_WRITE
: MDL_SHARED_NO_READ_WRITE;
if (!Select->add_table_to_list(thd, (yyvsp[-2].table), (yyvsp[-1].lex_str_ptr), table_options,
lock_type, mdl_type))
MYSQL_YYABORT;
}
#line 35518 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35521 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2382:
#line 13849 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 13852 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.num)= TL_READ_NO_INSERT; }
#line 35524 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35527 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2383:
#line 13850 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 13853 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.num)= TL_WRITE_DEFAULT; }
#line 35530 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35533 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2384:
#line 13852 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 13855 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
(yyval.num)= (Lex->sphead ? TL_WRITE_DEFAULT : TL_WRITE_CONCURRENT_INSERT);
}
#line 35538 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35541 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2385:
#line 13856 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 13859 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.num)= TL_WRITE_LOW_PRIORITY; }
#line 35544 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35547 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2386:
#line 13857 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 13860 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.num)= TL_READ; }
#line 35550 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35553 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2387:
#line 13862 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 13865 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
 
......@@ -35561,17 +35564,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
}
lex->sql_command= SQLCOM_UNLOCK_TABLES;
}
#line 35565 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35568 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2388:
#line 13873 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 13876 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
#line 35571 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35574 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2389:
#line 13882 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 13885 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
if (lex->sphead)
......@@ -35583,11 +35586,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
if (!lex->current_select->add_table_to_list(lex->thd, (yyvsp[-2].table), (yyvsp[0].lex_str_ptr), 0))
MYSQL_YYABORT;
}
#line 35587 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35590 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2390:
#line 13894 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 13897 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
if (lex->sphead)
......@@ -35599,11 +35602,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
if (!lex->current_select->add_table_to_list(lex->thd, (yyvsp[-1].table), 0, 0))
MYSQL_YYABORT;
}
#line 35603 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35606 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2391:
#line 13906 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 13909 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
if (lex->sphead)
......@@ -35623,11 +35626,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
if (!lex->current_select->add_table_to_list(lex->thd, (yyvsp[-1].table), 0, 0))
MYSQL_YYABORT;
}
#line 35627 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35630 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2392:
#line 13926 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 13929 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->expr_allows_subselect= TRUE;
/* Stored functions are not supported for HANDLER READ. */
......@@ -35638,59 +35641,59 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
MYSQL_YYABORT;
}
}
#line 35642 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35645 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2393:
#line 13939 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 13942 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->ident= null_lex_str; }
#line 35648 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35651 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2394:
#line 13940 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 13943 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->ident= (yyvsp[-1].lex_str); }
#line 35654 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35657 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2395:
#line 13944 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 13947 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->ha_read_mode = RFIRST; }
#line 35660 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35663 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2396:
#line 13945 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 13948 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->ha_read_mode = RNEXT; }
#line 35666 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35669 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2397:
#line 13949 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 13952 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->ha_read_mode = RFIRST; }
#line 35672 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35675 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2398:
#line 13950 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 13953 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->ha_read_mode = RNEXT; }
#line 35678 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35681 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2399:
#line 13951 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 13954 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->ha_read_mode = RPREV; }
#line 35684 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35687 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2400:
#line 13952 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 13955 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->ha_read_mode = RLAST; }
#line 35690 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35693 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2401:
#line 13954 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 13957 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
lex->ha_read_mode = RKEY;
......@@ -35698,63 +35701,63 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
if (!(lex->insert_list = new List_item))
MYSQL_YYABORT;
}
#line 35702 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35705 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2402:
#line 13962 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 13965 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
#line 35708 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35711 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2403:
#line 13966 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 13969 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.ha_rkey_mode)=HA_READ_KEY_EXACT; }
#line 35714 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35717 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2404:
#line 13967 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 13970 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.ha_rkey_mode)=HA_READ_KEY_OR_NEXT; }
#line 35720 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35723 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2405:
#line 13968 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 13971 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.ha_rkey_mode)=HA_READ_KEY_OR_PREV; }
#line 35726 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35729 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2406:
#line 13969 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 13972 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.ha_rkey_mode)=HA_READ_AFTER_KEY; }
#line 35732 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35735 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2407:
#line 13970 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 13973 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.ha_rkey_mode)=HA_READ_BEFORE_KEY; }
#line 35738 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35741 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2408:
#line 13977 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 13980 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
#line 35744 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35747 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2409:
#line 13982 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 13985 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_REVOKE;
lex->type= 0;
}
#line 35754 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35757 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2410:
#line 13988 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 13991 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
if (lex->columns.elements)
......@@ -35765,11 +35768,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
lex->sql_command= SQLCOM_REVOKE;
lex->type= TYPE_ENUM_FUNCTION;
}
#line 35769 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35772 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2411:
#line 13999 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14002 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
if (lex->columns.elements)
......@@ -35780,46 +35783,46 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
lex->sql_command= SQLCOM_REVOKE;
lex->type= TYPE_ENUM_PROCEDURE;
}
#line 35784 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35787 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2412:
#line 14010 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14013 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->sql_command = SQLCOM_REVOKE_ALL;
}
#line 35792 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35795 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2413:
#line 14014 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14017 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
lex->users_list.push_front ((yyvsp[-2].lex_user));
lex->sql_command= SQLCOM_REVOKE;
lex->type= TYPE_ENUM_PROXY;
}
#line 35803 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35806 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2414:
#line 14024 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14027 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
#line 35809 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35812 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2415:
#line 14030 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14033 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_GRANT;
lex->type= 0;
}
#line 35819 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35822 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2416:
#line 14037 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14040 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
if (lex->columns.elements)
......@@ -35830,11 +35833,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
lex->sql_command= SQLCOM_GRANT;
lex->type= TYPE_ENUM_FUNCTION;
}
#line 35834 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35837 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2417:
#line 14049 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14052 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
if (lex->columns.elements)
......@@ -35845,253 +35848,253 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
lex->sql_command= SQLCOM_GRANT;
lex->type= TYPE_ENUM_PROCEDURE;
}
#line 35849 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35852 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2418:
#line 14060 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14063 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
lex->users_list.push_front ((yyvsp[-3].lex_user));
lex->sql_command= SQLCOM_GRANT;
lex->type= TYPE_ENUM_PROXY;
}
#line 35860 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35863 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2421:
#line 14074 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14077 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
#line 35866 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35869 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2422:
#line 14076 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14079 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->all_privileges= 1;
Lex->grant= GLOBAL_ACLS;
}
#line 35875 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35878 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2427:
#line 14094 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14097 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->which_columns = SELECT_ACL;}
#line 35881 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35884 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2428:
#line 14095 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14098 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
#line 35887 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35890 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2429:
#line 14097 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14100 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->which_columns = INSERT_ACL;}
#line 35893 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35896 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2430:
#line 14098 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14101 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
#line 35899 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35902 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2431:
#line 14100 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14103 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->which_columns = UPDATE_ACL; }
#line 35905 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35908 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2432:
#line 14101 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14104 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
#line 35911 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35914 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2433:
#line 14103 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14106 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->which_columns = REFERENCES_ACL;}
#line 35917 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35920 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2434:
#line 14104 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14107 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
#line 35923 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35926 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2435:
#line 14105 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14108 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= DELETE_ACL;}
#line 35929 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35932 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2436:
#line 14106 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14109 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
#line 35935 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35938 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2437:
#line 14107 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14110 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= INDEX_ACL;}
#line 35941 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35944 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2438:
#line 14108 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14111 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= ALTER_ACL;}
#line 35947 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35950 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2439:
#line 14109 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14112 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= CREATE_ACL;}
#line 35953 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35956 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2440:
#line 14110 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14113 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= DROP_ACL;}
#line 35959 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35962 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2441:
#line 14111 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14114 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= EXECUTE_ACL;}
#line 35965 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35968 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2442:
#line 14112 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14115 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= RELOAD_ACL;}
#line 35971 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35974 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2443:
#line 14113 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14116 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= SHUTDOWN_ACL;}
#line 35977 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35980 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2444:
#line 14114 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14117 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= PROCESS_ACL;}
#line 35983 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35986 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2445:
#line 14115 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14118 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= FILE_ACL;}
#line 35989 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35992 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2446:
#line 14116 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14119 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= GRANT_ACL;}
#line 35995 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 35998 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2447:
#line 14117 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14120 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= SHOW_DB_ACL;}
#line 36001 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36004 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2448:
#line 14118 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14121 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= SUPER_ACL;}
#line 36007 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36010 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2449:
#line 14119 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14122 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= CREATE_TMP_ACL;}
#line 36013 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36016 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2450:
#line 14120 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14123 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= LOCK_TABLES_ACL; }
#line 36019 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36022 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2451:
#line 14121 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14124 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= REPL_SLAVE_ACL; }
#line 36025 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36028 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2452:
#line 14122 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14125 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= REPL_CLIENT_ACL; }
#line 36031 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36034 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2453:
#line 14123 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14126 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= CREATE_VIEW_ACL; }
#line 36037 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36040 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2454:
#line 14124 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14127 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= SHOW_VIEW_ACL; }
#line 36043 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36046 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2455:
#line 14125 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14128 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= CREATE_PROC_ACL; }
#line 36049 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36052 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2456:
#line 14126 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14129 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= ALTER_PROC_ACL; }
#line 36055 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36058 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2457:
#line 14127 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14130 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= CREATE_USER_ACL; }
#line 36061 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36064 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2458:
#line 14128 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14131 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= EVENT_ACL;}
#line 36067 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36070 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2459:
#line 14129 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14132 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= TRIGGER_ACL; }
#line 36073 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36076 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2460:
#line 14130 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14133 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= CREATE_TABLESPACE_ACL; }
#line 36079 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36082 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2461:
#line 14134 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14137 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
#line 36085 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36088 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2462:
#line 14135 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14138 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
#line 36091 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36094 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2465:
#line 14145 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14148 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
if (lex->x509_subject)
......@@ -36101,11 +36104,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
}
lex->x509_subject=(yyvsp[0].lex_str).str;
}
#line 36105 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36108 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2466:
#line 14155 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14158 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
if (lex->x509_issuer)
......@@ -36115,11 +36118,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
}
lex->x509_issuer=(yyvsp[0].lex_str).str;
}
#line 36119 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36122 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2467:
#line 14165 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14168 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
if (lex->ssl_cipher)
......@@ -36129,11 +36132,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
}
lex->ssl_cipher=(yyvsp[0].lex_str).str;
}
#line 36133 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36136 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2468:
#line 14178 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14181 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
size_t dummy;
......@@ -36148,11 +36151,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
MYSQL_YYABORT;
}
}
#line 36152 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36155 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2469:
#line 14193 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14196 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
lex->current_select->db = (yyvsp[-2].lex_str).str;
......@@ -36165,11 +36168,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
MYSQL_YYABORT;
}
}
#line 36169 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36172 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2470:
#line 14206 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14209 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
lex->current_select->db = NULL;
......@@ -36182,11 +36185,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
MYSQL_YYABORT;
}
}
#line 36186 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36189 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2471:
#line 14219 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14222 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
if (!lex->current_select->add_table_to_list(lex->thd, (yyvsp[0].table),NULL,
......@@ -36195,47 +36198,47 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
if (lex->grant == GLOBAL_ACLS)
lex->grant = TABLE_ACLS & ~GRANT_ACL;
}
#line 36199 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36202 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2472:
#line 14231 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14234 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (Lex->users_list.push_back((yyvsp[0].lex_user)))
MYSQL_YYABORT;
}
#line 36208 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36211 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2473:
#line 14236 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14239 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (Lex->users_list.push_back((yyvsp[0].lex_user)))
MYSQL_YYABORT;
}
#line 36217 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36220 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2474:
#line 14244 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14247 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (Lex->users_list.push_back((yyvsp[0].lex_user)))
MYSQL_YYABORT;
}
#line 36226 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36229 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2475:
#line 14249 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14252 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (Lex->users_list.push_back((yyvsp[0].lex_user)))
MYSQL_YYABORT;
}
#line 36235 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36238 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2480:
#line 14260 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14263 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
(yyval.lex_user)=(yyvsp[-3].lex_user); (yyvsp[-3].lex_user)->password=(yyvsp[0].lex_str);
if ((yyvsp[0].lex_str).length)
......@@ -36262,55 +36265,55 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
}
}
}
#line 36266 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36269 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2481:
#line 14287 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14290 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
(yyval.lex_user)= (yyvsp[-4].lex_user);
(yyvsp[-4].lex_user)->password= (yyvsp[0].lex_str);
}
#line 36275 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36278 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2482:
#line 14292 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14295 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
(yyval.lex_user)= (yyvsp[-3].lex_user);
(yyvsp[-3].lex_user)->plugin= (yyvsp[0].lex_str);
(yyvsp[-3].lex_user)->auth= empty_lex_str;
}
#line 36285 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36288 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2483:
#line 14298 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14301 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
(yyval.lex_user)= (yyvsp[-5].lex_user);
(yyvsp[-5].lex_user)->plugin= (yyvsp[-2].lex_str);
(yyvsp[-5].lex_user)->auth= (yyvsp[0].lex_str);
}
#line 36295 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36298 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2484:
#line 14304 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14307 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.lex_user)= (yyvsp[0].lex_user); (yyvsp[0].lex_user)->password= null_lex_str; }
#line 36301 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36304 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2485:
#line 14309 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14312 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
lex->grant |= lex->which_columns;
}
#line 36310 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36313 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2489:
#line 14323 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14326 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
String *new_str = new (thd->mem_root) String((const char*) (yyvsp[0].lex_str).str,(yyvsp[0].lex_str).length,system_charset_info);
if (new_str == NULL)
......@@ -36335,195 +36338,195 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
lex->columns.push_back(col);
}
}
#line 36339 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36342 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2491:
#line 14352 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14355 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->ssl_type=SSL_TYPE_SPECIFIED;
}
#line 36347 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36350 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2492:
#line 14356 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14359 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->ssl_type=SSL_TYPE_ANY;
}
#line 36355 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36358 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2493:
#line 14360 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14363 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->ssl_type=SSL_TYPE_X509;
}
#line 36363 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36366 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2494:
#line 14364 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14367 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->ssl_type=SSL_TYPE_NONE;
}
#line 36371 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36374 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2495:
#line 14370 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14373 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
#line 36377 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36380 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2497:
#line 14375 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14378 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
#line 36383 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36386 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2498:
#line 14376 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14379 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= GRANT_ACL;}
#line 36389 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36392 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2499:
#line 14380 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14383 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
#line 36395 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36398 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2500:
#line 14381 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14384 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
#line 36401 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36404 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2501:
#line 14385 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14388 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= GRANT_ACL;}
#line 36407 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36410 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2502:
#line 14387 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14390 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
lex->mqh.questions=(yyvsp[0].ulong_num);
lex->mqh.specified_limits|= USER_RESOURCES::QUERIES_PER_HOUR;
}
#line 36417 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36420 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2503:
#line 14393 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14396 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
lex->mqh.updates=(yyvsp[0].ulong_num);
lex->mqh.specified_limits|= USER_RESOURCES::UPDATES_PER_HOUR;
}
#line 36427 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36430 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2504:
#line 14399 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14402 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
lex->mqh.conn_per_hour= (yyvsp[0].ulong_num);
lex->mqh.specified_limits|= USER_RESOURCES::CONNECTIONS_PER_HOUR;
}
#line 36437 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36440 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2505:
#line 14405 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14408 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
lex->mqh.user_conn= (yyvsp[0].num);
lex->mqh.specified_limits|= USER_RESOURCES::USER_CONNECTIONS;
}
#line 36447 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36450 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2506:
#line 14414 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14417 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
lex->sql_command = SQLCOM_BEGIN;
lex->start_transaction_opt= 0;
}
#line 36457 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36460 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2507:
#line 14419 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14422 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
#line 36463 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36466 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2508:
#line 14423 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14426 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
#line 36469 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36472 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2509:
#line 14424 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14427 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
#line 36475 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36478 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2510:
#line 14429 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14432 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.m_yes_no_unk)= TVL_UNKNOWN; }
#line 36481 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36484 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2511:
#line 14430 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14433 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.m_yes_no_unk)= TVL_NO; }
#line 36487 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36490 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2512:
#line 14431 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14434 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.m_yes_no_unk)= TVL_YES; }
#line 36493 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36496 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2513:
#line 14436 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14439 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.m_yes_no_unk)= TVL_UNKNOWN; }
#line 36499 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36502 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2514:
#line 14437 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14440 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.m_yes_no_unk)= TVL_YES; }
#line 36505 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36508 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2515:
#line 14438 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14441 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.m_yes_no_unk)= TVL_NO; }
#line 36511 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36514 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2516:
#line 14442 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14445 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
#line 36517 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36520 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2517:
#line 14443 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14446 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
#line 36523 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36526 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2518:
#line 14448 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14451 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_COMMIT;
......@@ -36532,11 +36535,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
lex->tx_chain= (yyvsp[-1].m_yes_no_unk);
lex->tx_release= (yyvsp[0].m_yes_no_unk);
}
#line 36536 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36539 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2519:
#line 14460 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14463 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_ROLLBACK;
......@@ -36545,56 +36548,56 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
lex->tx_chain= (yyvsp[-1].m_yes_no_unk);
lex->tx_release= (yyvsp[0].m_yes_no_unk);
}
#line 36549 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36552 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2520:
#line 14470 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14473 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_ROLLBACK_TO_SAVEPOINT;
lex->ident= (yyvsp[0].lex_str);
}
#line 36559 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36562 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2521:
#line 14479 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14482 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_SAVEPOINT;
lex->ident= (yyvsp[0].lex_str);
}
#line 36569 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36572 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2522:
#line 14488 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14491 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_RELEASE_SAVEPOINT;
lex->ident= (yyvsp[0].lex_str);
}
#line 36579 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36582 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2523:
#line 14501 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14504 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
#line 36585 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36588 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2525:
#line 14507 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14510 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (add_select_to_union_list(Lex, (bool)(yyvsp[0].num), TRUE))
MYSQL_YYABORT;
}
#line 36594 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36597 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2526:
#line 14512 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14515 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
/*
Remove from the name resolution context stack the context of the
......@@ -36602,41 +36605,41 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
*/
Lex->pop_context();
}
#line 36606 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36609 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2527:
#line 14522 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14525 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.num)= 0; }
#line 36612 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36615 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2528:
#line 14523 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14526 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.num)= 1; }
#line 36618 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36621 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2529:
#line 14524 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14527 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.num)= 1; }
#line 36624 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36627 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2530:
#line 14528 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14531 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.is_not_empty)= false; }
#line 36630 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36633 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2531:
#line 14529 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14532 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.is_not_empty)= true; }
#line 36636 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36639 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2532:
#line 14533 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14536 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= thd->lex;
DBUG_ASSERT(lex->current_select->linkage != GLOBAL_OPTIONS_TYPE);
......@@ -36651,80 +36654,80 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
}
thd->where= "global ORDER clause";
}
#line 36655 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36658 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2533:
#line 14548 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14551 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
thd->lex->current_select->no_table_names_allowed= 0;
thd->where= "";
}
#line 36664 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36667 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2536:
#line 14560 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14563 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.num)=1; }
#line 36670 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36673 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2537:
#line 14561 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14564 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.num)=1; }
#line 36676 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36679 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2538:
#line 14562 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14565 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.num)=0; }
#line 36682 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36685 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2539:
#line 14567 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14570 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
(yyval.select_lex)= Lex->current_select->master_unit()->first_select();
}
#line 36690 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36693 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2540:
#line 14571 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14574 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
(yyval.select_lex)= Lex->current_select->master_unit()->first_select();
}
#line 36698 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36701 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2542:
#line 14580 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14583 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (add_select_to_union_list(Lex, (bool)(yyvsp[0].num), FALSE))
MYSQL_YYABORT;
}
#line 36707 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36710 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2543:
#line 14586 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14589 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->pop_context();
(yyval.select_lex)= (yyvsp[-5].select_lex);
}
#line 36716 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36719 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2544:
#line 14595 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14598 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
(yyval.select_lex)= (yyvsp[-1].select_lex);
}
#line 36724 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36727 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2545:
#line 14601 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14604 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
if (!lex->expr_allows_subselect ||
......@@ -36743,11 +36746,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
if (mysql_new_select(Lex, 1))
MYSQL_YYABORT;
}
#line 36747 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36750 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2546:
#line 14622 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14625 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
 
......@@ -36772,17 +36775,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
temp->select_n_having_items;
}
}
#line 36776 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36779 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2551:
#line 14659 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14662 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Select->options|= SELECT_STRAIGHT_JOIN; }
#line 36782 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36785 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2552:
#line 14661 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14664 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (check_simple_select())
MYSQL_YYABORT;
......@@ -36790,73 +36793,73 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
YYPS->m_mdl_type= MDL_SHARED_READ;
Select->options|= SELECT_HIGH_PRIORITY;
}
#line 36794 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36797 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2553:
#line 14668 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14671 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Select->options|= SELECT_DISTINCT; }
#line 36800 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36803 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2554:
#line 14669 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14672 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Select->options|= SELECT_SMALL_RESULT; }
#line 36806 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36809 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2555:
#line 14670 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14673 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Select->options|= SELECT_BIG_RESULT; }
#line 36812 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36815 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2556:
#line 14672 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14675 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (check_simple_select())
MYSQL_YYABORT;
Select->options|= OPTION_BUFFER_RESULT;
}
#line 36822 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36825 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2557:
#line 14678 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14681 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (check_simple_select())
MYSQL_YYABORT;
Select->options|= OPTION_FOUND_ROWS;
}
#line 36832 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36835 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2558:
#line 14683 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14686 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Select->options|= SELECT_ALL; }
#line 36838 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36841 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2559:
#line 14694 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14697 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
#line 36844 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36847 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2560:
#line 14696 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14699 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
#line 36850 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36853 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2561:
#line 14698 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14701 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
#line 36856 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36859 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2575:
#line 14731 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14734 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
/*
We have to distinguish missing DEFINER-clause from case when
......@@ -36867,79 +36870,79 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
*/
thd->lex->definer= 0;
}
#line 36871 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36874 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2576:
#line 14745 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14748 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
thd->lex->definer= get_current_user(thd, (yyvsp[0].lex_user));
}
#line 36879 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36882 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2577:
#line 14758 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14761 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
#line 36885 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36888 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2578:
#line 14760 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14763 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
#line 36891 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36894 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2579:
#line 14762 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14765 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
#line 36897 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36900 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2580:
#line 14767 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14770 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->create_view_mode= VIEW_CREATE_OR_REPLACE; }
#line 36903 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36906 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2581:
#line 14772 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14775 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->create_view_algorithm= DTYPE_ALGORITHM_UNDEFINED; }
#line 36909 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36912 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2582:
#line 14774 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14777 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->create_view_algorithm= VIEW_ALGORITHM_MERGE; }
#line 36915 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36918 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2583:
#line 14776 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14779 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->create_view_algorithm= VIEW_ALGORITHM_TMPTABLE; }
#line 36921 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36924 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2584:
#line 14781 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14784 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->create_view_suid= VIEW_SUID_DEFAULT; }
#line 36927 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36930 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2585:
#line 14783 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14786 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->create_view_suid= VIEW_SUID_DEFINER; }
#line 36933 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36936 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2586:
#line 14785 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14788 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->create_view_suid= VIEW_SUID_INVOKER; }
#line 36939 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36942 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2587:
#line 14790 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14793 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= thd->lex;
lex->sql_command= SQLCOM_CREATE_VIEW;
......@@ -36951,35 +36954,35 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
MYSQL_YYABORT;
lex->query_tables->open_strategy= TABLE_LIST::OPEN_STUB;
}
#line 36955 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36958 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2589:
#line 14806 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14809 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
#line 36961 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36964 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2591:
#line 14812 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14815 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->view_list.push_back((LEX_STRING*)
sql_memdup(&(yyvsp[0].lex_str), sizeof(LEX_STRING)));
}
#line 36970 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36973 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2592:
#line 14817 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14820 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->view_list.push_back((LEX_STRING*)
sql_memdup(&(yyvsp[0].lex_str), sizeof(LEX_STRING)));
}
#line 36979 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36982 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2593:
#line 14824 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14827 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
lex->parsing_options.allows_variable= FALSE;
......@@ -36988,11 +36991,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
lex->parsing_options.allows_derived= FALSE;
lex->create_view_select.str= (char *) YYLIP->get_cpp_ptr();
}
#line 36992 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 36995 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2594:
#line 14833 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14836 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
uint len= YYLIP->get_cpp_ptr() - lex->create_view_select.str;
......@@ -37005,51 +37008,51 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
lex->parsing_options.allows_select_procedure= TRUE;
lex->parsing_options.allows_derived= TRUE;
}
#line 37009 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37012 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2597:
#line 14854 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14857 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->create_view_check= VIEW_CHECK_NONE; }
#line 37015 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37018 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2598:
#line 14856 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14859 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->create_view_check= VIEW_CHECK_CASCADED; }
#line 37021 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37024 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2599:
#line 14858 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14861 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->create_view_check= VIEW_CHECK_CASCADED; }
#line 37027 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37030 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2600:
#line 14860 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14863 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->create_view_check= VIEW_CHECK_LOCAL; }
#line 37033 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37036 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2601:
#line 14877 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14880 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ /* $8 */
Lex->raw_trg_on_table_name_begin= YYLIP->get_tok_start();
}
#line 37041 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37044 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2602:
#line 14883 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14886 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ /* $12 */
Lex->raw_trg_on_table_name_end= YYLIP->get_tok_start();
}
#line 37049 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37052 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2603:
#line 14888 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14891 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ /* $15 */
LEX *lex= thd->lex;
Lex_input_stream *lip= YYLIP;
......@@ -37078,11 +37081,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
lex->sphead->m_chistics= &lex->sp_chistics;
lex->sphead->set_body_start(thd, lip->get_cpp_ptr());
}
#line 37082 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37085 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2604:
#line 14917 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14920 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ /* $17 */
LEX *lex= Lex;
sp_head *sp= lex->sphead;
......@@ -37106,11 +37109,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
MDL_SHARED_NO_WRITE))
MYSQL_YYABORT;
}
#line 37110 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37113 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2605:
#line 14951 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14954 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= thd->lex;
if (is_native_function(thd, & (yyvsp[-4].lex_str)))
......@@ -37126,11 +37129,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
lex->udf.returns=(Item_result) (yyvsp[-2].num);
lex->udf.dl=(yyvsp[0].lex_str).str;
}
#line 37130 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37133 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2606:
#line 14968 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14971 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= thd->lex;
if (is_native_function(thd, & (yyvsp[-4].lex_str)))
......@@ -37146,11 +37149,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
lex->udf.returns=(Item_result) (yyvsp[-2].num);
lex->udf.dl=(yyvsp[0].lex_str).str;
}
#line 37150 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37153 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2607:
#line 14990 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 14993 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ /* $5 */
LEX *lex= thd->lex;
Lex_input_stream *lip= YYLIP;
......@@ -37180,19 +37183,19 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
tmp_param_begin++;
lex->sphead->m_param_begin= tmp_param_begin;
}
#line 37184 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37187 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2608:
#line 15021 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 15024 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ /* $8 */
Lex->sphead->m_param_end= YYLIP->get_cpp_tok_start();
}
#line 37192 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37195 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2609:
#line 15025 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 15028 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ /* $10 */
LEX *lex= Lex;
lex->charset= NULL;
......@@ -37201,11 +37204,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
lex->type= 0;
lex->vcol_info= 0;
}
#line 37205 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37208 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2610:
#line 15034 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 15037 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ /* $12 */
LEX *lex= Lex;
sp_head *sp= lex->sphead;
......@@ -37228,11 +37231,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
 
bzero((char *)&lex->sp_chistics, sizeof(st_sp_chistics));
}
#line 37232 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37235 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2611:
#line 15057 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 15060 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ /* $14 */
LEX *lex= thd->lex;
Lex_input_stream *lip= YYLIP;
......@@ -37240,11 +37243,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
lex->sphead->m_chistics= &lex->sp_chistics;
lex->sphead->set_body_start(thd, lip->get_cpp_tok_start());
}
#line 37244 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37247 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2612:
#line 15065 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 15068 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= thd->lex;
sp_head *sp= lex->sphead;
......@@ -37296,11 +37299,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
}
sp->restore_thd_mem_root(thd);
}
#line 37300 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37303 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2613:
#line 15120 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 15123 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
sp_head *sp;
......@@ -37324,11 +37327,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
 
lex->sphead= sp;
}
#line 37328 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37331 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2614:
#line 15144 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 15147 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
const char* tmp_param_begin;
 
......@@ -37336,33 +37339,33 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
tmp_param_begin++;
Lex->sphead->m_param_begin= tmp_param_begin;
}
#line 37340 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37343 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2615:
#line 15153 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 15156 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= thd->lex;
 
lex->sphead->m_param_end= YYLIP->get_cpp_tok_start();
bzero((char *)&lex->sp_chistics, sizeof(st_sp_chistics));
}
#line 37351 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37354 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2616:
#line 15160 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 15163 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= thd->lex;
 
lex->sphead->m_chistics= &lex->sp_chistics;
lex->sphead->set_body_start(thd, YYLIP->get_cpp_tok_start());
}
#line 37362 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37365 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2617:
#line 15167 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 15170 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
sp_head *sp= lex->sphead;
......@@ -37371,209 +37374,209 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
lex->sql_command= SQLCOM_CREATE_PROCEDURE;
sp->restore_thd_mem_root(thd);
}
#line 37375 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37378 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2618:
#line 15181 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 15184 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->sql_command = SQLCOM_XA_START;
}
#line 37383 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37386 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2619:
#line 15185 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 15188 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->sql_command = SQLCOM_XA_END;
}
#line 37391 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37394 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2620:
#line 15189 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 15192 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->sql_command = SQLCOM_XA_PREPARE;
}
#line 37399 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37402 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2621:
#line 15193 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 15196 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->sql_command = SQLCOM_XA_COMMIT;
}
#line 37407 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37410 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2622:
#line 15197 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 15200 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->sql_command = SQLCOM_XA_ROLLBACK;
}
#line 37415 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37418 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2623:
#line 15201 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 15204 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->sql_command = SQLCOM_XA_RECOVER;
}
#line 37423 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37426 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2624:
#line 15208 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 15211 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
MYSQL_YYABORT_UNLESS((yyvsp[0].string)->length() <= MAXGTRIDSIZE);
if (!(Lex->xid=(XID *)thd->alloc(sizeof(XID))))
MYSQL_YYABORT;
Lex->xid->set(1L, (yyvsp[0].string)->ptr(), (yyvsp[0].string)->length(), 0, 0);
}
#line 37434 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37437 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2625:
#line 15215 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 15218 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
MYSQL_YYABORT_UNLESS((yyvsp[-2].string)->length() <= MAXGTRIDSIZE && (yyvsp[0].string)->length() <= MAXBQUALSIZE);
if (!(Lex->xid=(XID *)thd->alloc(sizeof(XID))))
MYSQL_YYABORT;
Lex->xid->set(1L, (yyvsp[-2].string)->ptr(), (yyvsp[-2].string)->length(), (yyvsp[0].string)->ptr(), (yyvsp[0].string)->length());
}
#line 37445 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37448 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2626:
#line 15222 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 15225 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
MYSQL_YYABORT_UNLESS((yyvsp[-4].string)->length() <= MAXGTRIDSIZE && (yyvsp[-2].string)->length() <= MAXBQUALSIZE);
if (!(Lex->xid=(XID *)thd->alloc(sizeof(XID))))
MYSQL_YYABORT;
Lex->xid->set((yyvsp[0].ulong_num), (yyvsp[-4].string)->ptr(), (yyvsp[-4].string)->length(), (yyvsp[-2].string)->ptr(), (yyvsp[-2].string)->length());
}
#line 37456 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37459 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2627:
#line 15231 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 15234 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
#line 37462 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37465 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2628:
#line 15232 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 15235 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
#line 37468 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37471 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2629:
#line 15236 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 15239 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->xa_opt=XA_NONE; }
#line 37474 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37477 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2630:
#line 15237 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 15240 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->xa_opt=XA_JOIN; }
#line 37480 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37483 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2631:
#line 15238 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 15241 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->xa_opt=XA_RESUME; }
#line 37486 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37489 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2632:
#line 15242 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 15245 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->xa_opt=XA_NONE; }
#line 37492 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37495 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2633:
#line 15243 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 15246 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->xa_opt=XA_ONE_PHASE; }
#line 37498 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37501 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2634:
#line 15248 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 15251 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->xa_opt=XA_NONE; }
#line 37504 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37507 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2635:
#line 15250 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 15253 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->xa_opt=XA_SUSPEND; }
#line 37510 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37513 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2637:
#line 15255 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 15258 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
#line 37516 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37519 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2638:
#line 15256 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 15259 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->xa_opt=XA_FOR_MIGRATE; }
#line 37522 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37525 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2639:
#line 15261 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 15264 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_INSTALL_PLUGIN;
lex->comment= (yyvsp[-2].lex_str);
lex->ident= (yyvsp[0].lex_str);
}
#line 37533 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37536 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2640:
#line 15268 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 15271 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_INSTALL_PLUGIN;
lex->comment= null_lex_str;
lex->ident= (yyvsp[0].lex_str);
}
#line 37544 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37547 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2641:
#line 15278 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 15281 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_UNINSTALL_PLUGIN;
lex->comment= (yyvsp[0].lex_str);
}
#line 37554 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37557 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2642:
#line 15284 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 15287 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_UNINSTALL_PLUGIN;
lex->comment= null_lex_str;
lex->ident= (yyvsp[0].lex_str);
}
#line 37565 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37568 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
case 2643:
#line 15295 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
#line 15298 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
YYERROR;
}
#line 37573 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37576 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
 
 
#line 37577 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
#line 37580 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
......@@ -7676,14 +7676,14 @@ select_lock_type:
| FOR_SYM UPDATE_SYM
{
LEX *lex=Lex;
lex->current_select->set_lock_for_tables(TL_WRITE);
lex->current_select->set_lock_for_tables(TL_WRITE, false);
lex->safe_to_cache_query=0;
}
| LOCK_SYM IN_SYM SHARE_SYM MODE_SYM
{
LEX *lex=Lex;
lex->current_select->
set_lock_for_tables(TL_READ_WITH_SHARED_LOCKS);
set_lock_for_tables(TL_READ_WITH_SHARED_LOCKS, false);
lex->safe_to_cache_query=0;
}
;
......@@ -10966,7 +10966,7 @@ insert:
insert_lock_option
opt_ignore insert2
{
Select->set_lock_for_tables($3);
Select->set_lock_for_tables($3, true);
Lex->current_select= &Lex->select_lex;
}
insert_field_spec opt_insert_update
......@@ -10983,7 +10983,7 @@ replace:
}
replace_lock_option insert2
{
Select->set_lock_for_tables($3);
Select->set_lock_for_tables($3, true);
Lex->current_select= &Lex->select_lex;
}
insert_field_spec
......@@ -11159,14 +11159,14 @@ update:
opt_low_priority opt_ignore join_table_list
SET update_list
{
LEX *lex= Lex;
if (lex->select_lex.table_list.elements > 1)
lex->sql_command= SQLCOM_UPDATE_MULTI;
else if (lex->select_lex.get_table_list()->derived)
SELECT_LEX *slex= &Lex->select_lex;
if (slex->table_list.elements > 1)
Lex->sql_command= SQLCOM_UPDATE_MULTI;
else if (slex->get_table_list()->derived)
{
/* it is single table update and it is update of derived table */
my_error(ER_NON_UPDATABLE_TABLE, MYF(0),
lex->select_lex.get_table_list()->alias, "UPDATE");
slex->get_table_list()->alias, "UPDATE");
MYSQL_YYABORT;
}
/*
......@@ -11174,7 +11174,7 @@ update:
be too pessimistic. We will decrease lock level if possible in
mysql_multi_update().
*/
Select->set_lock_for_tables($3);
slex->set_lock_for_tables($3, slex->table_list.elements == 1);
}
where_clause opt_order_clause delete_limit_clause {}
;
......@@ -13834,13 +13834,16 @@ table_lock:
table_ident opt_table_alias lock_option
{
thr_lock_type lock_type= (thr_lock_type) $3;
bool lock_for_write= (lock_type >= TL_WRITE_ALLOW_WRITE);
if (!Select->add_table_to_list(thd, $1, $2, 0, lock_type,
(lock_for_write ?
lock_type == TL_WRITE_CONCURRENT_INSERT ?
MDL_SHARED_WRITE :
MDL_SHARED_NO_READ_WRITE :
MDL_SHARED_READ)))
bool lock_for_write= lock_type >= TL_WRITE_ALLOW_WRITE;
ulong table_options= lock_for_write ? TL_OPTION_UPDATING : 0;
enum_mdl_type mdl_type= !lock_for_write
? MDL_SHARED_READ
: lock_type == TL_WRITE_CONCURRENT_INSERT
? MDL_SHARED_WRITE
: MDL_SHARED_NO_READ_WRITE;
if (!Select->add_table_to_list(thd, $1, $2, table_options,
lock_type, mdl_type))
MYSQL_YYABORT;
}
;
......
......@@ -5373,7 +5373,8 @@ const char *Field_iterator_table_ref::get_table_name()
return natural_join_it.column_ref()->table_name();
DBUG_ASSERT(!strcmp(table_ref->table_name,
table_ref->table->s->table_name.str));
table_ref->table->s->table_name.str) ||
table_ref->schema_table);
return table_ref->table_name;
}
......
/*****************************************************************************
Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
......@@ -3787,6 +3788,9 @@ dict_create_foreign_constraints_low(
}
goto loop;
} else {
strncpy(create_name, name, sizeof create_name);
create_name[(sizeof create_name) - 1] = '\0';
}
if (table == NULL) {
......@@ -3811,11 +3815,20 @@ dict_create_foreign_constraints_low(
goto loop;
}
ptr = dict_accept(cs, ptr, "TABLE", &success);
if (!success) {
goto loop;
orig = ptr;
for (;;) {
ptr = dict_accept(cs, ptr, "TABLE", &success);
if (success) {
break;
}
ptr = dict_accept(cs, ptr, "ONLINE", &success);
if (success) {
continue;
}
ptr = dict_accept(cs, ptr, "IGNORE", &success);
if (!success) {
goto loop;
}
}
/* We are doing an ALTER TABLE: scan the table name we are altering */
......
/*****************************************************************************
Copyright (c) 1996, 2011, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
......@@ -353,10 +354,13 @@ trx_is_active(
}
trx = trx_get_on_id(trx_id);
if (trx && (trx->conc_state == TRX_ACTIVE
|| trx->conc_state == TRX_PREPARED)) {
return(TRUE);
if (trx) {
switch (trx->conc_state) {
case TRX_ACTIVE:
case TRX_PREPARED:
case TRX_PREPARED_RECOVERED:
return(TRUE);
}
}
return(FALSE);
......
/*****************************************************************************
Copyright (c) 1996, 2010, Innobase Oy. All Rights Reserved.
Copyright (c) 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
......@@ -741,6 +742,8 @@ struct trx_struct{
#define TRX_ACTIVE 1
#define TRX_COMMITTED_IN_MEMORY 2
#define TRX_PREPARED 3 /* Support for 2PC/XA */
#define TRX_PREPARED_RECOVERED 4 /* XA PREPARE transaction that
was returned to ha_recover() */
/* Transaction execution states when trx->conc_state == TRX_ACTIVE */
#define TRX_QUE_RUNNING 0 /* transaction is running */
......
/*****************************************************************************
Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
......@@ -4782,6 +4783,22 @@ lock_print_info_all_transactions(
}
#ifdef UNIV_DEBUG
/** Validate the state of a transaction that holds locks */
static void lock_trx_state_validate(const trx_t* trx)
{
switch (trx->conc_state) {
case TRX_NOT_STARTED:
break;
case TRX_ACTIVE:
case TRX_PREPARED:
case TRX_PREPARED_RECOVERED:
case TRX_COMMITTED_IN_MEMORY:
return;
}
ut_ad(!"wrong state");
}
/*********************************************************************//**
Validates the lock queue on a table.
@return TRUE if ok */
......@@ -4798,9 +4815,7 @@ lock_table_queue_validate(
lock = UT_LIST_GET_FIRST(table->locks);
while (lock) {
ut_a(((lock->trx)->conc_state == TRX_ACTIVE)
|| ((lock->trx)->conc_state == TRX_PREPARED)
|| ((lock->trx)->conc_state == TRX_COMMITTED_IN_MEMORY));
ut_d(lock_trx_state_validate(lock->trx));
if (!lock_get_wait(lock)) {
......@@ -4848,15 +4863,7 @@ lock_rec_queue_validate(
lock = lock_rec_get_first(block, heap_no);
while (lock) {
switch(lock->trx->conc_state) {
case TRX_ACTIVE:
case TRX_PREPARED:
case TRX_COMMITTED_IN_MEMORY:
break;
default:
ut_error;
}
ut_d(lock_trx_state_validate(lock->trx));
ut_a(trx_in_trx_list(lock->trx));
if (lock_get_wait(lock)) {
......@@ -4935,9 +4942,7 @@ lock_rec_queue_validate(
lock = lock_rec_get_first(block, heap_no);
while (lock) {
ut_a(lock->trx->conc_state == TRX_ACTIVE
|| lock->trx->conc_state == TRX_PREPARED
|| lock->trx->conc_state == TRX_COMMITTED_IN_MEMORY);
ut_d(lock_trx_state_validate(lock->trx));
ut_a(trx_in_trx_list(lock->trx));
if (index) {
......@@ -5014,10 +5019,8 @@ lock_rec_validate_page(
}
}
ut_d(lock_trx_state_validate(lock->trx));
ut_a(trx_in_trx_list(lock->trx));
ut_a(lock->trx->conc_state == TRX_ACTIVE
|| lock->trx->conc_state == TRX_PREPARED
|| lock->trx->conc_state == TRX_COMMITTED_IN_MEMORY);
# ifdef UNIV_SYNC_DEBUG
/* Only validate the record queues when this thread is not
......
......@@ -10,8 +10,8 @@
-INSERT INTO t1 (a) VALUES (1),(2);
-INSERT INTO t1 (a,b) VALUES (3,3),(4,4);
-Warnings:
-Warning 1906 The value specified for computed column 'b' in table 't1' ignored
-Warning 1906 The value specified for computed column 'b' in table 't1' ignored
-Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
-Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
-SELECT a,b FROM t1;
-a b
-1 2
......@@ -27,8 +27,8 @@
-INSERT INTO t1 (a) VALUES (1),(2);
-INSERT INTO t1 (a,b) VALUES (3,3),(4,4);
-Warnings:
-Warning 1906 The value specified for computed column 'b' in table 't1' ignored
-Warning 1906 The value specified for computed column 'b' in table 't1' ignored
-Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
-Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
-SELECT a,b FROM t1;
-a b
-1 2
......@@ -44,8 +44,8 @@
-INSERT INTO t1 (a) VALUES (1),(2);
-INSERT INTO t1 (a,b) VALUES (3,3),(4,4);
-Warnings:
-Warning 1906 The value specified for computed column 'b' in table 't1' ignored
-Warning 1906 The value specified for computed column 'b' in table 't1' ignored
-Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
-Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
-SELECT a,b FROM t1;
-a b
-1 2
......@@ -61,8 +61,8 @@
-INSERT INTO t1 (a) VALUES (1),(2);
-INSERT INTO t1 (a,b) VALUES (3,3),(4,4);
-Warnings:
-Warning 1906 The value specified for computed column 'b' in table 't1' ignored
-Warning 1906 The value specified for computed column 'b' in table 't1' ignored
-Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
-Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
-SELECT a,b FROM t1;
-a b
-1 2
......
/*****************************************************************************
Copyright (c) 1997, 2009, Innobase Oy. All Rights Reserved.
Copyright (c) 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
......@@ -272,15 +273,19 @@ read_view_open_now(
view->low_limit_id = view->low_limit_no;
n = 0;
trx = UT_LIST_GET_FIRST(trx_sys->trx_list);
/* No active transaction should be visible, except cr_trx */
while (trx) {
if (trx->id != cr_trx_id
&& (trx->conc_state == TRX_ACTIVE
|| trx->conc_state == TRX_PREPARED)) {
for (trx = UT_LIST_GET_FIRST(trx_sys->trx_list); trx;
trx = UT_LIST_GET_NEXT(trx_list, trx)) {
if (trx->id == cr_trx_id) {
continue;
}
switch (trx->conc_state) {
case TRX_ACTIVE:
case TRX_PREPARED:
case TRX_PREPARED_RECOVERED:
read_view_set_nth_trx_id(view, n, trx->id);
n++;
......@@ -296,8 +301,6 @@ read_view_open_now(
view->low_limit_no = trx->no;
}
}
trx = UT_LIST_GET_NEXT(trx_list, trx);
}
view->n_trx_ids = n;
......@@ -437,18 +440,15 @@ read_cursor_view_create_for_mysql(
view->low_limit_id = view->low_limit_no;
n = 0;
trx = UT_LIST_GET_FIRST(trx_sys->trx_list);
/* No active transaction should be visible */
while (trx) {
if (trx->conc_state == TRX_ACTIVE
|| trx->conc_state == TRX_PREPARED) {
read_view_set_nth_trx_id(view, n, trx->id);
n++;
for (trx = UT_LIST_GET_FIRST(trx_sys->trx_list); trx;
trx = UT_LIST_GET_NEXT(trx_list, trx)) {
switch (trx->conc_state) {
case TRX_ACTIVE:
case TRX_PREPARED:
case TRX_PREPARED_RECOVERED:
read_view_set_nth_trx_id(view, n++, trx->id);
/* NOTE that a transaction whose trx number is <
trx_sys->max_trx_id can still be active, if it is
......@@ -461,8 +461,6 @@ read_cursor_view_create_for_mysql(
view->low_limit_no = trx->no;
}
}
trx = UT_LIST_GET_NEXT(trx_list, trx);
}
view->n_trx_ids = n;
......
/*****************************************************************************
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
......@@ -572,8 +573,7 @@ row_mysql_handle_errors(
switch (err) {
case DB_LOCK_WAIT_TIMEOUT:
if (row_rollback_on_timeout) {
trx_general_rollback_for_mysql(trx, NULL);
break;
goto rollback;
}
/* fall through */
case DB_DUPLICATE_KEY:
......@@ -586,6 +586,7 @@ row_mysql_handle_errors(
case DB_TOO_MANY_CONCURRENT_TRXS:
case DB_OUT_OF_FILE_SPACE:
case DB_INTERRUPTED:
rollback_to_savept:
if (savept) {
/* Roll back the latest, possibly incomplete
insertion or update */
......@@ -609,6 +610,7 @@ row_mysql_handle_errors(
case DB_DEADLOCK:
case DB_LOCK_TABLE_FULL:
rollback:
/* Roll back the whole transaction; this resolution was added
to version 3.23.43 */
......@@ -638,14 +640,14 @@ row_mysql_handle_errors(
"InnoDB: you dump the tables, look at\n"
"InnoDB: " REFMAN "forcing-innodb-recovery.html"
" for help.\n", stderr);
break;
goto rollback_to_savept;
case DB_FOREIGN_EXCEED_MAX_CASCADE:
fprintf(stderr, "InnoDB: Cannot delete/update rows with"
" cascading foreign key constraints that exceed max"
" depth of %lu\n"
"Please drop excessive foreign constraints"
" and try again\n", (ulong) DICT_FK_MAX_RECURSIVE_LOAD);
break;
goto rollback_to_savept;
default:
fprintf(stderr, "InnoDB: unknown error code %lu\n",
(ulong) err);
......
......@@ -2,6 +2,7 @@
Copyright (c) 1996, 2009, Innobase Oy. All Rights Reserved.
Copyright (c) 2017, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
......@@ -564,6 +565,7 @@ trx_rollback_or_clean_recovered(
switch (trx->conc_state) {
case TRX_NOT_STARTED:
case TRX_PREPARED:
case TRX_PREPARED_RECOVERED:
continue;
case TRX_COMMITTED_IN_MEMORY:
......
/*****************************************************************************
Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
......@@ -1031,7 +1032,7 @@ trx_sys_init_at_db_start(void)
trx = UT_LIST_GET_FIRST(trx_sys->trx_list);
for (;;) {
ut_ad(trx->conc_state != TRX_PREPARED_RECOVERED);
if (trx->conc_state != TRX_PREPARED) {
rows_to_undo += trx->undo_no;
}
......
/*****************************************************************************
Copyright (c) 1996, 2011, Innobase Oy. All Rights Reserved.
Copyright (c) 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
......@@ -348,7 +349,8 @@ trx_free_prepared(
trx_t* trx) /*!< in, own: trx object */
{
ut_ad(mutex_own(&kernel_mutex));
ut_a(trx->conc_state == TRX_PREPARED);
ut_a(trx->conc_state == TRX_PREPARED
|| trx->conc_state == TRX_PREPARED_RECOVERED);
ut_a(trx->magic_n == TRX_MAGIC_N);
/* Prepared transactions are sort of active; they allow
......@@ -932,10 +934,11 @@ trx_commit_off_kernel(
lsn = 0;
}
ut_ad(trx->conc_state == TRX_ACTIVE || trx->conc_state == TRX_PREPARED);
ut_ad(trx->conc_state == TRX_ACTIVE || trx->conc_state == TRX_PREPARED
|| trx->conc_state == TRX_PREPARED_RECOVERED);
ut_ad(mutex_own(&kernel_mutex));
if (UNIV_UNLIKELY(trx->conc_state == TRX_PREPARED)) {
if (UNIV_UNLIKELY(trx->conc_state != TRX_ACTIVE)) {
ut_a(trx_n_prepared > 0);
trx_n_prepared--;
}
......@@ -2072,6 +2075,7 @@ trx_recover_for_mysql(
while (trx) {
if (trx->conc_state == TRX_PREPARED) {
trx->conc_state = TRX_PREPARED_RECOVERED;
xid_list[count] = trx->xid;
if (count == 0) {
......@@ -2096,13 +2100,25 @@ trx_recover_for_mysql(
count++;
if (count == len) {
break;
goto partial;
}
}
trx = UT_LIST_GET_NEXT(trx_list, trx);
}
/* After returning the full list, reset the state, because
init_server_components() wants to recover the collection of
transactions twice, by first calling tc_log->open() and then
ha_recover() directly. */
for (trx = UT_LIST_GET_FIRST(trx_sys->trx_list); trx;
trx = UT_LIST_GET_NEXT(trx_list, trx)) {
if (trx->conc_state == TRX_PREPARED_RECOVERED) {
trx->conc_state = TRX_PREPARED;
}
}
partial:
mutex_exit(&kernel_mutex);
if (count > 0){
......@@ -2144,7 +2160,8 @@ trx_get_trx_by_xid(
the same */
if (trx->is_recovered
&& trx->conc_state == TRX_PREPARED
&& (trx->conc_state == TRX_PREPARED
|| trx->conc_state == TRX_PREPARED_RECOVERED)
&& xid->gtrid_length == trx->xid.gtrid_length
&& xid->bqual_length == trx->xid.bqual_length
&& memcmp(xid->data, trx->xid.data,
......
......@@ -10,8 +10,8 @@
-INSERT INTO t1 (a) VALUES (1),(2);
-INSERT INTO t1 (a,b) VALUES (3,3),(4,4);
-Warnings:
-Warning 1906 The value specified for computed column 'b' in table 't1' ignored
-Warning 1906 The value specified for computed column 'b' in table 't1' ignored
-Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
-Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
-SELECT a,b FROM t1;
-a b
-1 2
......@@ -27,8 +27,8 @@
-INSERT INTO t1 (a) VALUES (1),(2);
-INSERT INTO t1 (a,b) VALUES (3,3),(4,4);
-Warnings:
-Warning 1906 The value specified for computed column 'b' in table 't1' ignored
-Warning 1906 The value specified for computed column 'b' in table 't1' ignored
-Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
-Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
-SELECT a,b FROM t1;
-a b
-1 2
......@@ -44,8 +44,8 @@
-INSERT INTO t1 (a) VALUES (1),(2);
-INSERT INTO t1 (a,b) VALUES (3,3),(4,4);
-Warnings:
-Warning 1906 The value specified for computed column 'b' in table 't1' ignored
-Warning 1906 The value specified for computed column 'b' in table 't1' ignored
-Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
-Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
-SELECT a,b FROM t1;
-a b
-1 2
......@@ -61,8 +61,8 @@
-INSERT INTO t1 (a) VALUES (1),(2);
-INSERT INTO t1 (a,b) VALUES (3,3),(4,4);
-Warnings:
-Warning 1906 The value specified for computed column 'b' in table 't1' ignored
-Warning 1906 The value specified for computed column 'b' in table 't1' ignored
-Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
-Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
-SELECT a,b FROM t1;
-a b
-1 2
......
/*****************************************************************************
Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
......@@ -3921,6 +3922,9 @@ dict_create_foreign_constraints_low(
}
goto loop;
} else {
strncpy(create_name, name, sizeof create_name);
create_name[(sizeof create_name) - 1] = '\0';
}
if (table == NULL) {
......@@ -3945,11 +3949,20 @@ dict_create_foreign_constraints_low(
goto loop;
}
ptr = dict_accept(cs, ptr, "TABLE", &success);
if (!success) {
goto loop;
orig = ptr;
for (;;) {
ptr = dict_accept(cs, ptr, "TABLE", &success);
if (success) {
break;
}
ptr = dict_accept(cs, ptr, "ONLINE", &success);
if (success) {
continue;
}
ptr = dict_accept(cs, ptr, "IGNORE", &success);
if (!success) {
goto loop;
}
}
/* We are doing an ALTER TABLE: scan the table name we are altering */
......
/*****************************************************************************
Copyright (c) 1996, 2010, Innobase Oy. All Rights Reserved.
Copyright (c) 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
......@@ -802,6 +803,8 @@ struct trx_struct{
#define TRX_ACTIVE 1
#define TRX_COMMITTED_IN_MEMORY 2
#define TRX_PREPARED 3 /* Support for 2PC/XA */
#define TRX_PREPARED_RECOVERED 4 /* XA PREPARE transaction that
was returned to ha_recover() */
/* Transaction execution states when trx->conc_state == TRX_ACTIVE */
#define TRX_QUE_RUNNING 0 /* transaction is running */
......
/*****************************************************************************
Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
......@@ -4811,6 +4812,22 @@ lock_print_info_all_transactions(
}
#ifdef UNIV_DEBUG
/** Validate the state of a transaction that holds locks */
static void lock_trx_state_validate(const trx_t* trx)
{
switch (trx->state) {
case TRX_NOT_STARTED:
break;
case TRX_ACTIVE:
case TRX_PREPARED:
case TRX_PREPARED_RECOVERED:
case TRX_COMMITTED_IN_MEMORY:
return;
}
ut_ad(!"wrong state");
}
/*********************************************************************//**
Validates the lock queue on a table.
@return TRUE if ok */
......@@ -4827,9 +4844,7 @@ lock_table_queue_validate(
lock = UT_LIST_GET_FIRST(table->locks);
while (lock) {
ut_a(((lock->trx)->state == TRX_ACTIVE)
|| ((lock->trx)->state == TRX_PREPARED)
|| ((lock->trx)->state == TRX_COMMITTED_IN_MEMORY));
ut_d(lock_trx_state_validate(lock->trx));
if (!lock_get_wait(lock)) {
......@@ -4877,15 +4892,7 @@ lock_rec_queue_validate(
lock = lock_rec_get_first(block, heap_no);
while (lock) {
switch(lock->trx->state) {
case TRX_ACTIVE:
case TRX_PREPARED:
case TRX_COMMITTED_IN_MEMORY:
break;
default:
ut_error;
}
ut_d(lock_trx_state_validate(lock->trx));
ut_a(trx_in_trx_list(lock->trx));
if (lock_get_wait(lock)) {
......@@ -4964,9 +4971,7 @@ lock_rec_queue_validate(
lock = lock_rec_get_first(block, heap_no);
while (lock) {
ut_a(lock->trx->state == TRX_ACTIVE
|| lock->trx->state == TRX_PREPARED
|| lock->trx->state == TRX_COMMITTED_IN_MEMORY);
ut_d(lock_trx_state_validate(lock->trx));
ut_a(trx_in_trx_list(lock->trx));
if (index) {
......@@ -5043,10 +5048,8 @@ lock_rec_validate_page(
}
}
ut_d(lock_trx_state_validate(lock->trx));
ut_a(trx_in_trx_list(lock->trx));
ut_a(lock->trx->state == TRX_ACTIVE
|| lock->trx->state == TRX_PREPARED
|| lock->trx->state == TRX_COMMITTED_IN_MEMORY);
# ifdef UNIV_SYNC_DEBUG
/* Only validate the record queues when this thread is not
......
/*****************************************************************************
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
......@@ -574,8 +575,7 @@ row_mysql_handle_errors(
switch (err) {
case DB_LOCK_WAIT_TIMEOUT:
if (row_rollback_on_timeout) {
trx_general_rollback_for_mysql(trx, NULL);
break;
goto rollback;
}
/* fall through */
case DB_DUPLICATE_KEY:
......@@ -588,6 +588,7 @@ row_mysql_handle_errors(
case DB_TOO_MANY_CONCURRENT_TRXS:
case DB_OUT_OF_FILE_SPACE:
case DB_INTERRUPTED:
rollback_to_savept:
if (savept) {
/* Roll back the latest, possibly incomplete
insertion or update */
......@@ -611,6 +612,7 @@ row_mysql_handle_errors(
case DB_DEADLOCK:
case DB_LOCK_TABLE_FULL:
rollback:
/* Roll back the whole transaction; this resolution was added
to version 3.23.43 */
......@@ -640,14 +642,14 @@ row_mysql_handle_errors(
"InnoDB: you dump the tables, look at\n"
"InnoDB: " REFMAN "forcing-innodb-recovery.html"
" for help.\n", stderr);
break;
goto rollback_to_savept;
case DB_FOREIGN_EXCEED_MAX_CASCADE:
fprintf(stderr, "InnoDB: Cannot delete/update rows with"
" cascading foreign key constraints that exceed max"
" depth of %lu\n"
"Please drop excessive foreign constraints"
" and try again\n", (ulong) DICT_FK_MAX_RECURSIVE_LOAD);
break;
goto rollback_to_savept;
default:
fprintf(stderr, "InnoDB: unknown error code %lu\n",
(ulong) err);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment