summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2011-07-12 17:41:13 +0200
committerSergei Golubchik <sergii@pisem.net>2011-07-12 17:41:13 +0200
commitaac3a1eac9f6aa347311e7cce7547e269bed5ea0 (patch)
treed590f7970da02af511071dfc28fe264484e0638e
parentc97f938bcf53d7c3b65e7ac8020857cae5813b6f (diff)
downloadmariadb-git-aac3a1eac9f6aa347311e7cce7547e269bed5ea0.tar.gz
fix misplaced and non-working if() in the grammar
few small post-merge fixes
-rw-r--r--mysql-test/r/mysqld--help-notwin.result4
-rw-r--r--mysql-test/r/plugin_auth_qa_1.result6
-rw-r--r--mysql-test/r/ps_grant.result3
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug46000.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug53591.result1
-rw-r--r--mysql-test/t/plugin_auth_qa_1.test9
-rw-r--r--mysql-test/t/ps_grant.test3
-rw-r--r--sql/item.cc15
-rw-r--r--sql/mysqld.cc3
-rw-r--r--sql/sql_table.cc4
-rw-r--r--sql/sql_yacc.yy18
11 files changed, 18 insertions, 49 deletions
diff --git a/mysql-test/r/mysqld--help-notwin.result b/mysql-test/r/mysqld--help-notwin.result
index 665d9ba1257..ce0c4375fa5 100644
--- a/mysql-test/r/mysqld--help-notwin.result
+++ b/mysql-test/r/mysqld--help-notwin.result
@@ -733,6 +733,9 @@ The following options may be given as the first argument:
Synchronously flush relay log info to disk after every
#th transaction. Use 0 (default) to disable synchronous
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
safe-replicable. Since 5.0, SYSDATE() returns a `dynamic'
value different for different invocations, even within
@@ -1005,6 +1008,7 @@ sync-frm FALSE
sync-master-info 0
sync-relay-log 0
sync-relay-log-info 0
+sync-sys TRUE
sysdate-is-now FALSE
table-cache 400
table-definition-cache 400
diff --git a/mysql-test/r/plugin_auth_qa_1.result b/mysql-test/r/plugin_auth_qa_1.result
index 00ee47b56b3..d700be36ac0 100644
--- a/mysql-test/r/plugin_auth_qa_1.result
+++ b/mysql-test/r/plugin_auth_qa_1.result
@@ -29,8 +29,7 @@ user()
plug_user@localhost
Tables_in_test_user_db
t1
-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_user';
2)
current_user()
plug_dest@%
@@ -55,8 +54,7 @@ user()
plug_user@localhost
Tables_in_test_user_db
t1
-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_user';
DROP USER plug_user,plug_dest;
========== test 1.2 ========================================
GRANT ALL PRIVILEGES ON test_user_db.* TO plug_user
diff --git a/mysql-test/r/ps_grant.result b/mysql-test/r/ps_grant.result
index 672db74d9c0..388f6aa7c91 100644
--- a/mysql-test/r/ps_grant.result
+++ b/mysql-test/r/ps_grant.result
@@ -55,8 +55,7 @@ my_col
execute s_t9 ;
ERROR 42S02: Table 'mysqltest.t9' doesn't exist
deallocate prepare s_t9;
-revoke all privileges on mysqltest.t1 from second_user@localhost
-identified by 'looser' ;
+revoke all privileges on mysqltest.t1 from second_user@localhost;
show grants for second_user@localhost ;
Grants for second_user@localhost
GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3'
diff --git a/mysql-test/suite/innodb/r/innodb_bug46000.result b/mysql-test/suite/innodb/r/innodb_bug46000.result
index c8e3db8d641..b27b3d7443b 100644
--- a/mysql-test/suite/innodb/r/innodb_bug46000.result
+++ b/mysql-test/suite/innodb/r/innodb_bug46000.result
@@ -14,6 +14,5 @@ show warnings;
Level Code Message
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 1030 Got error -1 from storage engine
create index idx on bug46000(id);
drop table bug46000;
diff --git a/mysql-test/suite/innodb/r/innodb_bug53591.result b/mysql-test/suite/innodb/r/innodb_bug53591.result
index d3f8dfeafc2..9d296ffdb83 100644
--- a/mysql-test/suite/innodb/r/innodb_bug53591.result
+++ b/mysql-test/suite/innodb/r/innodb_bug53591.result
@@ -9,7 +9,6 @@ SHOW WARNINGS;
Level Code Message
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 1030 Got error 139 from storage engine
DROP TABLE bug53591;
SET GLOBAL innodb_file_format=Antelope;
SET GLOBAL innodb_file_format_max=Antelope;
diff --git a/mysql-test/t/plugin_auth_qa_1.test b/mysql-test/t/plugin_auth_qa_1.test
index e5d7e5cad02..93e471da25d 100644
--- a/mysql-test/t/plugin_auth_qa_1.test
+++ b/mysql-test/t/plugin_auth_qa_1.test
@@ -32,8 +32,7 @@ SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
--echo 1)
--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
-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_user';
--echo 2)
--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
@@ -54,10 +53,8 @@ GRANT PROXY ON plug_dest TO plug_user;
--echo 2)
--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
-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'
-# IDENTIFIED BY 'plug_dest_passwd';
+REVOKE ALL PRIVILEGES ON test_user_db.* FROM 'plug_user';
+#REVOKE ALL PRIVILEGES ON test_user_db.* FROM 'plug_dest'';
DROP USER plug_user,plug_dest;
--echo ========== test 1.2 ========================================
diff --git a/mysql-test/t/ps_grant.test b/mysql-test/t/ps_grant.test
index b25facdb418..3d59cc36de0 100644
--- a/mysql-test/t/ps_grant.test
+++ b/mysql-test/t/ps_grant.test
@@ -85,8 +85,7 @@ deallocate prepare s_t9;
#### revoke the access rights to t1
## switch back to the first session
connection default;
-revoke all privileges on mysqltest.t1 from second_user@localhost
-identified by 'looser' ;
+revoke all privileges on mysqltest.t1 from second_user@localhost;
show grants for second_user@localhost ;
#### check the access as new user
diff --git a/sql/item.cc b/sql/item.cc
index 41228e532d5..48449f9033d 100644
--- a/sql/item.cc
+++ b/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)) &&
((*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);
if (!conv)
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index e1b52a300f1..709d8aae9ac 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -6181,8 +6181,7 @@ struct my_option my_long_options[]=
*/
IF_VALGRIND(0,1), 0, 0, 0, 0, 0},
{"sync_sys", 0,
- "Enable/disable system sync calls. Should only be turned off when running "
- "tests or debugging!!",
+ "Enable system sync calls. Disable only when running tests or debugging!",
&opt_sync, &opt_sync, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
{"sysdate-is-now", 0,
"Non-default option to alias SYSDATE() to NOW() to make it safe-replicable. "
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 73e9734280f..c23a956fad6 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -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,
&add)))
{
-#ifdef MERGE_MONTY_ADDITION_THAT_BREAKS_5_5_TESTS
/* Only report error if handler has not already reported an error */
- if (!thd->main_da.is_error())
-#endif
+ if (!thd->is_error())
{
/*
Exchange the key_info for the error message. If we exchange
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index aa0e85d646a..e6246b42e18 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -13563,13 +13563,13 @@ revoke:
;
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->sql_command= SQLCOM_REVOKE;
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;
if (lex->columns.elements)
@@ -13580,7 +13580,7 @@ revoke_command:
lex->sql_command= SQLCOM_REVOKE;
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;
if (lex->columns.elements)
@@ -13591,11 +13591,11 @@ revoke_command:
lex->sql_command= SQLCOM_REVOKE;
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;
}
- | PROXY_SYM ON user FROM grant_list
+ | PROXY_SYM ON user FROM user_list
{
LEX *lex= Lex;
lex->users_list.push_front ($3);
@@ -13844,8 +13844,6 @@ grant_user:
user IDENTIFIED_SYM BY TEXT_STRING
{
$$=$1; $1->password=$4;
- if (Lex->sql_command == SQLCOM_REVOKE)
- MYSQL_YYABORT;
if ($4.length)
{
if (YYTHD->variables.old_passwords)
@@ -13872,23 +13870,17 @@ grant_user:
}
| user IDENTIFIED_SYM BY PASSWORD TEXT_STRING
{
- if (Lex->sql_command == SQLCOM_REVOKE)
- MYSQL_YYABORT;
$$= $1;
$1->password= $5;
}
| user IDENTIFIED_SYM via_or_with ident_or_text
{
- if (Lex->sql_command == SQLCOM_REVOKE)
- MYSQL_YYABORT;
$$= $1;
$1->plugin= $4;
$1->auth= empty_lex_str;
}
| 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->plugin= $4;
$1->auth= $6;