Skip to content
Permalink
Browse files
Merge branch '10.5' into 10.6
  • Loading branch information
vuvova committed Oct 2, 2022
2 parents 2ab52cc + 3a21162 commit 900d7bf
Show file tree
Hide file tree
Showing 245 changed files with 9,722 additions and 2,457 deletions.
@@ -506,7 +506,7 @@ list_dbs(MYSQL *mysql,const char *wild)
MYSQL_RES *tresult = mysql_list_tables(mysql,(char*)NULL);
if (mysql_affected_rows(mysql) > 0)
{
sprintf(tables,"%6lu",(ulong) mysql_affected_rows(mysql));
snprintf(tables, sizeof(tables), "%6lu",(ulong) mysql_affected_rows(mysql));
rowcount = 0;
if (opt_verbose > 1)
{
@@ -527,13 +527,13 @@ list_dbs(MYSQL *mysql,const char *wild)
}
}
}
sprintf(rows,"%12lu",rowcount);
snprintf(rows, sizeof(rows), "%12lu", rowcount);
}
}
else
{
sprintf(tables,"%6d",0);
sprintf(rows,"%12d",0);
snprintf(tables, sizeof(tables), "%6d" ,0);
snprintf(rows, sizeof(rows), "%12d", 0);
}
mysql_free_result(tresult);
}
@@ -651,7 +651,7 @@ list_tables(MYSQL *mysql,const char *db,const char *table)
}
else
{
sprintf(fields,"%8u",(uint) mysql_num_fields(rresult));
snprintf(fields, sizeof(fields), "%8u", (uint) mysql_num_fields(rresult));
mysql_free_result(rresult);

if (opt_verbose > 1)
@@ -667,10 +667,10 @@ list_tables(MYSQL *mysql,const char *db,const char *table)
rowcount += (unsigned long) strtoull(rrow[0], (char**) 0, 10);
mysql_free_result(rresult);
}
sprintf(rows,"%10lu",rowcount);
snprintf(rows, sizeof(rows), "%10lu", rowcount);
}
else
sprintf(rows,"%10d",0);
snprintf(rows, sizeof(rows), "%10d", 0);
}
}
}
@@ -956,6 +956,17 @@ extern ulonglong my_getcputime(void);
#define hrtime_sec_part(X) ((ulong)((X).val % HRTIME_RESOLUTION))
#define my_time(X) hrtime_to_time(my_hrtime_coarse())

/**
Make high resolution time from two parts.
*/

static inline my_hrtime_t make_hr_time(my_time_t time, ulong time_sec_part)
{
my_hrtime_t res= {((ulonglong) time)*1000000 + time_sec_part};
return res;
}


#if STACK_DIRECTION < 0
#define available_stack_size(CUR,END) (long) ((char*)(CUR) - (char*)(END))
#else
@@ -11,11 +11,11 @@ CREATE USER u1@localhost;
grant ALL on db.v1 to u1@localhost;
connect con1,localhost,u1,,;
select * from db.t1;
ERROR 42000: SELECT command denied to user 'u1'@'localhost' for table 't1'
ERROR 42000: SELECT command denied to user 'u1'@'localhost' for table `db`.`t1`
explain select * from db.t1;
ERROR 42000: SELECT command denied to user 'u1'@'localhost' for table 't1'
ERROR 42000: SELECT command denied to user 'u1'@'localhost' for table `db`.`t1`
analyze select * from db.t1;
ERROR 42000: SELECT command denied to user 'u1'@'localhost' for table 't1'
ERROR 42000: SELECT command denied to user 'u1'@'localhost' for table `db`.`t1`
select * from db.v1;
i c
2 bar

Large diffs are not rendered by default.

@@ -8,7 +8,7 @@ drop table if exists t1;

# Add the datadir to the bootstrap command
let $MYSQLD_DATADIR= `select @@datadir`;
let $MYSQLD_BOOTSTRAP_CMD= $MYSQLD_BOOTSTRAP_CMD --datadir=$MYSQLD_DATADIR --default-storage-engine=MyISAM --loose-skip-innodb --plugin-maturity=unknown;
let $MYSQLD_BOOTSTRAP_CMD= $MYSQLD_BOOTSTRAP_CMD --datadir=$MYSQLD_DATADIR --tmpdir=$MYSQL_TMP_DIR --default-storage-engine=MyISAM --loose-skip-innodb --plugin-maturity=unknown;
#
# Check that --bootstrap reads from stdin
#
@@ -19,7 +19,7 @@ rollback to savepoint s1;
insert t1 values (5);
commit;
EOF
exec $MYSQLD_BOOTSTRAP_CMD --datadir=$datadir --innodb < $MYSQLTEST_VARDIR/tmp/bootstrap_test.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1;
exec $MYSQLD_BOOTSTRAP_CMD --datadir=$datadir --tmpdir=$MYSQL_TMP_DIR --innodb < $MYSQLTEST_VARDIR/tmp/bootstrap_test.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1;
remove_file $MYSQLTEST_VARDIR/tmp/bootstrap_test.sql;

source include/start_mysqld.inc;
@@ -32,7 +32,7 @@ CREATE OR REPLACE DATABASE db2;
ERROR 42000: Access denied for user 'mysqltest_1'@'localhost' to database 'db2'
USE db1;
CREATE OR REPLACE TABLE t1(id INT);
ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table 't1'
ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table `db1`.`t1`
CREATE OR REPLACE PROCEDURE proc1 (OUT cnt INT) BEGIN END;
ERROR 42000: alter routine command denied to user 'mysqltest_1'@'localhost' for routine 'db1.proc1'
CREATE OR REPLACE FUNCTION lookup RETURNS STRING SONAME "UDF_EXAMPLE_LIB";
@@ -51,7 +51,7 @@ c
select d from mysqltest.v2;
ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for column 'd' in table 'v2'
select * from mysqltest.v3;
ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'v3'
ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table `mysqltest`.`v3`
connection root;
grant select on mysqltest.v3 to mysqltest_1@localhost;
connection user1;
@@ -116,7 +116,7 @@ revoke SELECT on db.t1 from foo@localhost;
connection con1;
with cte as (select * from t1 where i < 4)
select * from cte;
ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 't1'
ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table `db`.`t1`
disconnect con1;
connection default;
drop database db;
@@ -39,7 +39,7 @@ cte3 AS
cte4 AS
(SELECT cte2.a FROM t2,cte2 WHERE cte2.a = t2.a)
SELECT * FROM cte4 as r;
ERROR 42000: SELECT command denied to user 'u1'@'localhost' for table 't2'
ERROR 42000: SELECT command denied to user 'u1'@'localhost' for table `db`.`t2`
disconnect u1;
connection default;
DROP USER 'u1'@'localhost';

0 comments on commit 900d7bf

Please sign in to comment.