mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
fix misplaced and non-working if() in the grammar
few small post-merge fixes
This commit is contained in:
@ -733,6 +733,9 @@ The following options may be given as the first argument:
|
|||||||
Synchronously flush relay log info to disk after every
|
Synchronously flush relay log info to disk after every
|
||||||
#th transaction. Use 0 (default) to disable synchronous
|
#th transaction. Use 0 (default) to disable synchronous
|
||||||
flushing
|
flushing
|
||||||
|
--sync-sys Enable system sync calls. Disable only when running tests
|
||||||
|
or debugging!
|
||||||
|
(Defaults to on; use --skip-sync-sys to disable.)
|
||||||
--sysdate-is-now Non-default option to alias SYSDATE() to NOW() to make it
|
--sysdate-is-now Non-default option to alias SYSDATE() to NOW() to make it
|
||||||
safe-replicable. Since 5.0, SYSDATE() returns a `dynamic'
|
safe-replicable. Since 5.0, SYSDATE() returns a `dynamic'
|
||||||
value different for different invocations, even within
|
value different for different invocations, even within
|
||||||
@ -1005,6 +1008,7 @@ sync-frm FALSE
|
|||||||
sync-master-info 0
|
sync-master-info 0
|
||||||
sync-relay-log 0
|
sync-relay-log 0
|
||||||
sync-relay-log-info 0
|
sync-relay-log-info 0
|
||||||
|
sync-sys TRUE
|
||||||
sysdate-is-now FALSE
|
sysdate-is-now FALSE
|
||||||
table-cache 400
|
table-cache 400
|
||||||
table-definition-cache 400
|
table-definition-cache 400
|
||||||
|
@ -29,8 +29,7 @@ user()
|
|||||||
plug_user@localhost
|
plug_user@localhost
|
||||||
Tables_in_test_user_db
|
Tables_in_test_user_db
|
||||||
t1
|
t1
|
||||||
REVOKE ALL PRIVILEGES ON test_user_db.* FROM 'plug_user'
|
REVOKE ALL PRIVILEGES ON test_user_db.* FROM 'plug_user';
|
||||||
IDENTIFIED WITH test_plugin_server AS 'plug_dest';
|
|
||||||
2)
|
2)
|
||||||
current_user()
|
current_user()
|
||||||
plug_dest@%
|
plug_dest@%
|
||||||
@ -55,8 +54,7 @@ user()
|
|||||||
plug_user@localhost
|
plug_user@localhost
|
||||||
Tables_in_test_user_db
|
Tables_in_test_user_db
|
||||||
t1
|
t1
|
||||||
REVOKE ALL PRIVILEGES ON test_user_db.* FROM 'plug_user'
|
REVOKE ALL PRIVILEGES ON test_user_db.* FROM 'plug_user';
|
||||||
IDENTIFIED WITH test_plugin_server AS 'plug_dest';
|
|
||||||
DROP USER plug_user,plug_dest;
|
DROP USER plug_user,plug_dest;
|
||||||
========== test 1.2 ========================================
|
========== test 1.2 ========================================
|
||||||
GRANT ALL PRIVILEGES ON test_user_db.* TO plug_user
|
GRANT ALL PRIVILEGES ON test_user_db.* TO plug_user
|
||||||
|
@ -55,8 +55,7 @@ my_col
|
|||||||
execute s_t9 ;
|
execute s_t9 ;
|
||||||
ERROR 42S02: Table 'mysqltest.t9' doesn't exist
|
ERROR 42S02: Table 'mysqltest.t9' doesn't exist
|
||||||
deallocate prepare s_t9;
|
deallocate prepare s_t9;
|
||||||
revoke all privileges on mysqltest.t1 from second_user@localhost
|
revoke all privileges on mysqltest.t1 from second_user@localhost;
|
||||||
identified by 'looser' ;
|
|
||||||
show grants for second_user@localhost ;
|
show grants for second_user@localhost ;
|
||||||
Grants for second_user@localhost
|
Grants for second_user@localhost
|
||||||
GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3'
|
GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3'
|
||||||
|
@ -14,6 +14,5 @@ show warnings;
|
|||||||
Level Code Message
|
Level Code Message
|
||||||
Warning 1280 Cannot Create Index with name 'GEN_CLUST_INDEX'. The name is reserved for the system default primary index.
|
Warning 1280 Cannot Create Index with name 'GEN_CLUST_INDEX'. The name is reserved for the system default primary index.
|
||||||
Error 1280 Incorrect index name 'GEN_CLUST_INDEX'
|
Error 1280 Incorrect index name 'GEN_CLUST_INDEX'
|
||||||
Error 1030 Got error -1 from storage engine
|
|
||||||
create index idx on bug46000(id);
|
create index idx on bug46000(id);
|
||||||
drop table bug46000;
|
drop table bug46000;
|
||||||
|
@ -9,7 +9,6 @@ SHOW WARNINGS;
|
|||||||
Level Code Message
|
Level Code Message
|
||||||
Error 139 Too big row
|
Error 139 Too big row
|
||||||
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. You have to change some columns to TEXT or BLOBs
|
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. You have to change some columns to TEXT or BLOBs
|
||||||
Error 1030 Got error 139 from storage engine
|
|
||||||
DROP TABLE bug53591;
|
DROP TABLE bug53591;
|
||||||
SET GLOBAL innodb_file_format=Antelope;
|
SET GLOBAL innodb_file_format=Antelope;
|
||||||
SET GLOBAL innodb_file_format_max=Antelope;
|
SET GLOBAL innodb_file_format_max=Antelope;
|
||||||
|
@ -32,8 +32,7 @@ SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
|||||||
--echo 1)
|
--echo 1)
|
||||||
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
|
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
|
||||||
--exec $MYSQL -S $MASTER_MYSOCK -u plug_user --password=plug_dest -e "SELECT current_user();SELECT user();USE test_user_db;CREATE TABLE t1(a int);SHOW TABLES;DROP TABLE t1;" 2>&1
|
--exec $MYSQL -S $MASTER_MYSOCK -u plug_user --password=plug_dest -e "SELECT current_user();SELECT user();USE test_user_db;CREATE TABLE t1(a int);SHOW TABLES;DROP TABLE t1;" 2>&1
|
||||||
REVOKE ALL PRIVILEGES ON test_user_db.* FROM 'plug_user'
|
REVOKE ALL PRIVILEGES ON test_user_db.* FROM 'plug_user';
|
||||||
IDENTIFIED WITH test_plugin_server AS 'plug_dest';
|
|
||||||
--echo 2)
|
--echo 2)
|
||||||
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
|
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
|
||||||
--exec $MYSQL -S $MASTER_MYSOCK -u plug_user --password=plug_dest -e "SELECT current_user();SELECT user();USE test_user_db;CREATE TABLE t1(a int);SHOW TABLES;DROP TABLE t1;" 2>&1
|
--exec $MYSQL -S $MASTER_MYSOCK -u plug_user --password=plug_dest -e "SELECT current_user();SELECT user();USE test_user_db;CREATE TABLE t1(a int);SHOW TABLES;DROP TABLE t1;" 2>&1
|
||||||
@ -54,10 +53,8 @@ GRANT PROXY ON plug_dest TO plug_user;
|
|||||||
--echo 2)
|
--echo 2)
|
||||||
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
|
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
|
||||||
--exec $MYSQL -S $MASTER_MYSOCK -u plug_user --password=plug_dest -e "SELECT current_user();SELECT user();USE test_user_db;CREATE TABLE t1(a int);SHOW TABLES;DROP TABLE t1;" 2>&1
|
--exec $MYSQL -S $MASTER_MYSOCK -u plug_user --password=plug_dest -e "SELECT current_user();SELECT user();USE test_user_db;CREATE TABLE t1(a int);SHOW TABLES;DROP TABLE t1;" 2>&1
|
||||||
REVOKE ALL PRIVILEGES ON test_user_db.* FROM 'plug_user'
|
REVOKE ALL PRIVILEGES ON test_user_db.* FROM 'plug_user';
|
||||||
IDENTIFIED WITH test_plugin_server AS 'plug_dest';
|
#REVOKE ALL PRIVILEGES ON test_user_db.* FROM 'plug_dest'';
|
||||||
#REVOKE ALL PRIVILEGES ON test_user_db.* FROM 'plug_dest'
|
|
||||||
# IDENTIFIED BY 'plug_dest_passwd';
|
|
||||||
DROP USER plug_user,plug_dest;
|
DROP USER plug_user,plug_dest;
|
||||||
|
|
||||||
--echo ========== test 1.2 ========================================
|
--echo ========== test 1.2 ========================================
|
||||||
|
@ -85,8 +85,7 @@ deallocate prepare s_t9;
|
|||||||
#### revoke the access rights to t1
|
#### revoke the access rights to t1
|
||||||
## switch back to the first session
|
## switch back to the first session
|
||||||
connection default;
|
connection default;
|
||||||
revoke all privileges on mysqltest.t1 from second_user@localhost
|
revoke all privileges on mysqltest.t1 from second_user@localhost;
|
||||||
identified by 'looser' ;
|
|
||||||
show grants for second_user@localhost ;
|
show grants for second_user@localhost ;
|
||||||
|
|
||||||
#### check the access as new user
|
#### check the access as new user
|
||||||
|
15
sql/item.cc
15
sql/item.cc
@ -1886,21 +1886,6 @@ bool agg_item_set_converter(DTCollation &coll, const char *fname,
|
|||||||
|
|
||||||
if (!(conv= (*arg)->safe_charset_converter(coll.collation)) &&
|
if (!(conv= (*arg)->safe_charset_converter(coll.collation)) &&
|
||||||
((*arg)->collation.repertoire == MY_REPERTOIRE_ASCII))
|
((*arg)->collation.repertoire == MY_REPERTOIRE_ASCII))
|
||||||
#if 0
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
We should disable const subselect item evaluation because
|
|
||||||
subselect transformation does not happen in view_prepare_mode
|
|
||||||
and thus val_...() methods can not be called for const items.
|
|
||||||
*/
|
|
||||||
bool resolve_const= (((*arg)->type() == Item::SUBSELECT_ITEM ||
|
|
||||||
((*arg)->get_cached_item() &&
|
|
||||||
(*arg)->get_cached_item()->type() ==
|
|
||||||
Item::SUBSELECT_ITEM)) &&
|
|
||||||
thd->lex->view_prepare_mode) ? FALSE : TRUE;
|
|
||||||
conv= new Item_func_conv_charset(*arg, coll.collation, resolve_const);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
conv= new Item_func_conv_charset(*arg, coll.collation, 1);
|
conv= new Item_func_conv_charset(*arg, coll.collation, 1);
|
||||||
|
|
||||||
if (!conv)
|
if (!conv)
|
||||||
|
@ -6181,8 +6181,7 @@ struct my_option my_long_options[]=
|
|||||||
*/
|
*/
|
||||||
IF_VALGRIND(0,1), 0, 0, 0, 0, 0},
|
IF_VALGRIND(0,1), 0, 0, 0, 0, 0},
|
||||||
{"sync_sys", 0,
|
{"sync_sys", 0,
|
||||||
"Enable/disable system sync calls. Should only be turned off when running "
|
"Enable system sync calls. Disable only when running tests or debugging!",
|
||||||
"tests or debugging!!",
|
|
||||||
&opt_sync, &opt_sync, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
&opt_sync, &opt_sync, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||||
{"sysdate-is-now", 0,
|
{"sysdate-is-now", 0,
|
||||||
"Non-default option to alias SYSDATE() to NOW() to make it safe-replicable. "
|
"Non-default option to alias SYSDATE() to NOW() to make it safe-replicable. "
|
||||||
|
@ -6598,10 +6598,8 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
|
|||||||
if ((error= table->file->add_index(table, key_info, index_add_count,
|
if ((error= table->file->add_index(table, key_info, index_add_count,
|
||||||
&add)))
|
&add)))
|
||||||
{
|
{
|
||||||
#ifdef MERGE_MONTY_ADDITION_THAT_BREAKS_5_5_TESTS
|
|
||||||
/* Only report error if handler has not already reported an error */
|
/* Only report error if handler has not already reported an error */
|
||||||
if (!thd->main_da.is_error())
|
if (!thd->is_error())
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
Exchange the key_info for the error message. If we exchange
|
Exchange the key_info for the error message. If we exchange
|
||||||
|
@ -13563,13 +13563,13 @@ revoke:
|
|||||||
;
|
;
|
||||||
|
|
||||||
revoke_command:
|
revoke_command:
|
||||||
grant_privileges ON opt_table grant_ident FROM grant_list
|
grant_privileges ON opt_table grant_ident FROM user_list
|
||||||
{
|
{
|
||||||
LEX *lex= Lex;
|
LEX *lex= Lex;
|
||||||
lex->sql_command= SQLCOM_REVOKE;
|
lex->sql_command= SQLCOM_REVOKE;
|
||||||
lex->type= 0;
|
lex->type= 0;
|
||||||
}
|
}
|
||||||
| grant_privileges ON FUNCTION_SYM grant_ident FROM grant_list
|
| grant_privileges ON FUNCTION_SYM grant_ident FROM user_list
|
||||||
{
|
{
|
||||||
LEX *lex= Lex;
|
LEX *lex= Lex;
|
||||||
if (lex->columns.elements)
|
if (lex->columns.elements)
|
||||||
@ -13580,7 +13580,7 @@ revoke_command:
|
|||||||
lex->sql_command= SQLCOM_REVOKE;
|
lex->sql_command= SQLCOM_REVOKE;
|
||||||
lex->type= TYPE_ENUM_FUNCTION;
|
lex->type= TYPE_ENUM_FUNCTION;
|
||||||
}
|
}
|
||||||
| grant_privileges ON PROCEDURE_SYM grant_ident FROM grant_list
|
| grant_privileges ON PROCEDURE_SYM grant_ident FROM user_list
|
||||||
{
|
{
|
||||||
LEX *lex= Lex;
|
LEX *lex= Lex;
|
||||||
if (lex->columns.elements)
|
if (lex->columns.elements)
|
||||||
@ -13591,11 +13591,11 @@ revoke_command:
|
|||||||
lex->sql_command= SQLCOM_REVOKE;
|
lex->sql_command= SQLCOM_REVOKE;
|
||||||
lex->type= TYPE_ENUM_PROCEDURE;
|
lex->type= TYPE_ENUM_PROCEDURE;
|
||||||
}
|
}
|
||||||
| ALL opt_privileges ',' GRANT OPTION FROM grant_list
|
| ALL opt_privileges ',' GRANT OPTION FROM user_list
|
||||||
{
|
{
|
||||||
Lex->sql_command = SQLCOM_REVOKE_ALL;
|
Lex->sql_command = SQLCOM_REVOKE_ALL;
|
||||||
}
|
}
|
||||||
| PROXY_SYM ON user FROM grant_list
|
| PROXY_SYM ON user FROM user_list
|
||||||
{
|
{
|
||||||
LEX *lex= Lex;
|
LEX *lex= Lex;
|
||||||
lex->users_list.push_front ($3);
|
lex->users_list.push_front ($3);
|
||||||
@ -13844,8 +13844,6 @@ grant_user:
|
|||||||
user IDENTIFIED_SYM BY TEXT_STRING
|
user IDENTIFIED_SYM BY TEXT_STRING
|
||||||
{
|
{
|
||||||
$$=$1; $1->password=$4;
|
$$=$1; $1->password=$4;
|
||||||
if (Lex->sql_command == SQLCOM_REVOKE)
|
|
||||||
MYSQL_YYABORT;
|
|
||||||
if ($4.length)
|
if ($4.length)
|
||||||
{
|
{
|
||||||
if (YYTHD->variables.old_passwords)
|
if (YYTHD->variables.old_passwords)
|
||||||
@ -13872,23 +13870,17 @@ grant_user:
|
|||||||
}
|
}
|
||||||
| user IDENTIFIED_SYM BY PASSWORD TEXT_STRING
|
| user IDENTIFIED_SYM BY PASSWORD TEXT_STRING
|
||||||
{
|
{
|
||||||
if (Lex->sql_command == SQLCOM_REVOKE)
|
|
||||||
MYSQL_YYABORT;
|
|
||||||
$$= $1;
|
$$= $1;
|
||||||
$1->password= $5;
|
$1->password= $5;
|
||||||
}
|
}
|
||||||
| user IDENTIFIED_SYM via_or_with ident_or_text
|
| user IDENTIFIED_SYM via_or_with ident_or_text
|
||||||
{
|
{
|
||||||
if (Lex->sql_command == SQLCOM_REVOKE)
|
|
||||||
MYSQL_YYABORT;
|
|
||||||
$$= $1;
|
$$= $1;
|
||||||
$1->plugin= $4;
|
$1->plugin= $4;
|
||||||
$1->auth= empty_lex_str;
|
$1->auth= empty_lex_str;
|
||||||
}
|
}
|
||||||
| user IDENTIFIED_SYM via_or_with ident_or_text using_or_as TEXT_STRING_sys
|
| user IDENTIFIED_SYM via_or_with ident_or_text using_or_as TEXT_STRING_sys
|
||||||
{
|
{
|
||||||
if (Lex->sql_command == SQLCOM_REVOKE)
|
|
||||||
MYSQL_YYABORT;
|
|
||||||
$$= $1;
|
$$= $1;
|
||||||
$1->plugin= $4;
|
$1->plugin= $4;
|
||||||
$1->auth= $6;
|
$1->auth= $6;
|
||||||
|
Reference in New Issue
Block a user