Commit 21e75cb0 authored by unknown's avatar unknown
Browse files

Manual merge 5.0->5.1. Post-merge fixes.


client/mysqldump.c:
  A post-merge fix - 'sock' was renamed to 'mysql'
mysql-test/r/events_bugs.result:
  A post merge fix: now we strip rear comments from the query before
  it gets into the log.
mysql-test/r/func_group.result:
  A post merge fix: default clause is now printed uppercase.
mysql-test/r/im_life_cycle.result:
  Fix my mistake in manual resolve.
mysql-test/r/mysqlcheck.result:
  use test; - after we drop client_test_db there is no current database.
  This cleanup is present in 5.1 only, but the test that was added in 
  5.0 assumes there is a current database, test.
mysql-test/r/mysqldump.result:
  Ignore results of execution of mysqldump: we can't rely on 
  MASTER_LOG_POS in test results, it's different for statement
  and row level logging.
mysql-test/r/mysqlshow.result:
  A post-merge fix: information schema contains a few more tables
  in 5.1
mysql-test/r/mysqltest.result:
  A post merge fix: add 5.1 test end separator.
mysql-test/r/ndb_basic.result:
  A post-merge fix: add test end separators.
mysql-test/r/rpl_switch_stm_row_mixed.result:
  A post merge fix: length of varbinary column is now 3 times less.
  Assuming a side effect of some other change. Length of any
  field is not relevant in this test.
mysql-test/r/rpl_view.result:
  Add an end of test marker.
mysql-test/r/show_check.result:
  Remove duplicate results. Add results from a merged test case.
mysql-test/r/sp-error.result:
  Add test end separators.
mysql-test/r/sp-security.result:
  Post-merge fix: use test after the current database is dropped.
mysql-test/r/sp.result:
  Remove a duplicate result (bad merge that left a copy of
  the test case for Bug#19862 in the test suite).
mysql-test/r/strict.result:
  An after-merge fix for a new test case: in 5.1 we issue a more accurate
  error message: "Incorrect value" instead of "Truncated value". I reason
  it so that in case of an error nothing is truncated, really.
  Also found similar changes in other test cases.
mysql-test/r/type_datetime.result:
  Fix the text of an error.
mysql-test/r/union.result:
  A post-merge fix: CHARACTER SET is now uppercase.
mysql-test/t/mysqlcheck.test:
  A post-merge fix: use test, after current database is dropped, there
  is no current database.
mysql-test/t/mysqldump.test:
  Disable result log: it's dependent on binlog position.
mysql-test/t/sp-security.test:
  use test
sql/item_sum.cc:
  Adjust the call to the constructor after the merge.
sql/sp_head.cc:
  Add a missing DBUG_VOID_RETURN, move security checks out of
  execute_trigger to Table_triggers_list: in 5.1 we check for
  TRIGGER privilege, not SUPER privilege to execute triggers, so these
  checks lack table context inside execute_trigger and have to be
  performed when we have table object on hand.
sql/sql_db.cc:
  A post-merge fix: adjust load_db_opt_by_name and check_db_dir_existence
  (new functions added in 5.0) to be tablename-to-filename encoding 
  friendly.
sql/sql_lex.cc:
  A post-merge fix: make skip_rear_comments operate on const uchar *s.
sql/sql_lex.h:
  A post-merge fix.
sql/sql_show.cc:
  A post-merge fix: fix a bad merge, rename orig_sql_command -> sql_command.
sql/sql_trigger.cc:
  A post-merge fix: move security checks to process_triggers
  from execute_trigger.
sql/sql_view.cc:
  Adjust to the new signature of skip_rear_comments.
sql/sql_yacc.yy:
  Adjust to the new signature of init_strings.
parent f68085c4
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -1333,7 +1333,7 @@ static uint dump_events_for_db(char *db)
  DBUG_ENTER("dump_events_for_db");
  DBUG_PRINT("enter", ("db: '%s'", db));

  mysql_real_escape_string(sock, db_name_buff, db, strlen(db));
  mysql_real_escape_string(mysql, db_name_buff, db, strlen(db));

  /* nice comments */
  if (opt_comments)
@@ -1344,9 +1344,9 @@ static uint dump_events_for_db(char *db)
    enough privileges to lock mysql.events.
  */
  if (lock_tables)
    mysql_query(sock, "LOCK TABLES mysql.event READ");
    mysql_query(mysql, "LOCK TABLES mysql.event READ");

  if (mysql_query_with_error_report(sock, &event_list_res, "show events"))
  if (mysql_query_with_error_report(mysql, &event_list_res, "show events"))
  {
    safe_exit(EX_MYSQLERR);
    DBUG_RETURN(0);
@@ -1362,7 +1362,7 @@ static uint dump_events_for_db(char *db)
      my_snprintf(query_buff, sizeof(query_buff), "SHOW CREATE EVENT %s", 
          event_name);

      if (mysql_query_with_error_report(sock, &event_res, query_buff))
      if (mysql_query_with_error_report(mysql, &event_res, query_buff))
        DBUG_RETURN(1);

      while ((row= mysql_fetch_row(event_res)) != NULL)
@@ -1395,7 +1395,7 @@ static uint dump_events_for_db(char *db)
  mysql_free_result(event_list_res);

  if (lock_tables)
    VOID(mysql_query_with_error_report(sock, 0, "UNLOCK TABLES"));
    VOID(mysql_query_with_error_report(mysql, 0, "UNLOCK TABLES"));
  DBUG_RETURN(0);
}

@@ -2738,7 +2738,7 @@ static int dump_all_tablespaces()
  char buf[FN_REFLEN];
  int first;

  if (mysql_query_with_error_report(sock, &tableres,
  if (mysql_query_with_error_report(mysql, &tableres,
                                    "SELECT DISTINCT"
                                    " LOGFILE_GROUP_NAME,"
                                    " FILE_NAME,"
@@ -2792,7 +2792,7 @@ static int dump_all_tablespaces()
    }
  }

  if (mysql_query_with_error_report(sock, &tableres,
  if (mysql_query_with_error_report(mysql, &tableres,
                                    "SELECT DISTINCT"
                                    " TABLESPACE_NAME,"
                                    " FILE_NAME,"
@@ -3035,7 +3035,7 @@ static int dump_all_tables_in_db(char *database)
    }
  }
  if (opt_events && !opt_xml &&
      mysql_get_server_version(sock) >= 50106)
      mysql_get_server_version(mysql) >= 50106)
  {
    DBUG_PRINT("info", ("Dumping events for database %s", database));
    dump_events_for_db(database);
@@ -3251,7 +3251,7 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
      get_view_structure(*pos, db);
  }
  if (opt_events && !opt_xml &&
      mysql_get_server_version(sock) >= 50106)
      mysql_get_server_version(mysql) >= 50106)
  {
    DBUG_PRINT("info", ("Dumping events for database %s", db));
    dump_events_for_db(db);
+5 −5
Original line number Diff line number Diff line
@@ -106,9 +106,9 @@ set global event_scheduler= 1;
select /*2*/ user, host, db, command, state, info from information_schema.processlist where info is null or info not like '%processlist%' order by info;
user	host	db	command	state	info
event_scheduler	localhost	NULL	Connect	Sleeping	NULL
root	localhost	events_test	Connect	User lock	select get_lock('ee_16407_2', 60) /*ee_16407_2*/
root	localhost	events_test	Connect	User lock	select get_lock('ee_16407_2', 60) /*ee_16407_3*/
root	localhost	events_test	Connect	User lock	select get_lock('ee_16407_2', 60) /*ee_16407_4*/
root	localhost	events_test	Connect	User lock	select get_lock('ee_16407_2', 60)
root	localhost	events_test	Connect	User lock	select get_lock('ee_16407_2', 60)
root	localhost	events_test	Connect	User lock	select get_lock('ee_16407_2', 60)
select release_lock('ee_16407_2');
release_lock('ee_16407_2')
1
@@ -154,8 +154,8 @@ set global event_scheduler= 1;
select /*4*/ user, host, db, command, state, info from information_schema.processlist where info is null or info not like '%processlist%' order by info;
user	host	db	command	state	info
event_scheduler	localhost	NULL	Connect	Sleeping	NULL
root	localhost	events_test	Connect	User lock	select get_lock('ee_16407_5', 60) /*ee_16407_5*/
root	localhost	events_test	Connect	User lock	select get_lock('ee_16407_5', 60) /*ee_16407_6*/
root	localhost	events_test	Connect	User lock	select get_lock('ee_16407_5', 60)
root	localhost	events_test	Connect	User lock	select get_lock('ee_16407_5', 60)
select release_lock('ee_16407_5');
release_lock('ee_16407_5')
1
+2 −2
Original line number Diff line number Diff line
@@ -994,13 +994,13 @@ create table t1 select variance(0);
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `variance(0)` double(8,4) default NULL
  `variance(0)` double(8,4) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 select stddev(0);
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `stddev(0)` double(8,4) default NULL
  `stddev(0)` double(8,4) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
+3 −8
Original line number Diff line number Diff line

--------------------------------------------------------------------
-- 1.1.1.
--------------------------------------------------------------------
Success: the process has been started.
SHOW VARIABLES LIKE 'server_id';
Variable_name	Value
server_id	1
SHOW INSTANCES;
instance_name	state
mysqld1	online
@@ -40,10 +39,6 @@ ERROR HY000: Bad instance name. Check that the instance with such a name exists
--------------------------------------------------------------------
-- 1.1.6.
--------------------------------------------------------------------
SHOW INSTANCES;
instance_name	state
mysqld1	online
mysqld2	offline
Killing the process...
Sleeping...
Success: the process was restarted.
+1 −0
Original line number Diff line number Diff line
drop database if exists client_test_db;
DROP SCHEMA test;
CREATE SCHEMA test;
use test;
cluster.binlog_index                               OK
mysql.columns_priv                                 OK
mysql.db                                           OK
Loading