From 5ab93737be716721e7b5a9a87206dbdc52b7a649 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vicen=C8=9Biu=20Ciorbaru?= Date: Mon, 13 Feb 2017 03:15:33 +0200 Subject: MDEV-11170: MariaDB 10.2 cannot start on MySQL 5.7 datadir PART 1 of the fix requires a bit of refactoring to not use hard-coded field indices any more. Create classes that express the grant tables structure, without exposing the underlying field indices. Most of the code is converted to use these classes, except parts which are not directly affected by the MDEV-11170. These however are TODO items for subsequent refactoring. --- sql/structs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/structs.h') diff --git a/sql/structs.h b/sql/structs.h index 144e12ca06c..ea47d6255de 100644 --- a/sql/structs.h +++ b/sql/structs.h @@ -205,7 +205,7 @@ typedef int *(*update_var)(THD *, struct st_mysql_show_var *); typedef struct st_lex_user { LEX_STRING user, host, plugin, auth; LEX_STRING pwtext, pwhash; - bool is_role() { return user.str[0] && !host.str[0]; } + bool is_role() const { return user.str[0] && !host.str[0]; } void set_lex_string(LEX_STRING *l, char *buf) { if (is_role()) -- cgit v1.2.1