summaryrefslogtreecommitdiff
path: root/sql/sql_sequence.h
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2017-05-02 19:23:00 +0300
committerMonty <monty@mariadb.org>2017-05-08 02:33:34 +0300
commit276b0c8ef03046cc210e4eeab7231cb8d9f16bac (patch)
treed17df40168443e461b10c8e4f9b101a11270e183 /sql/sql_sequence.h
parentc619fbeafe8d5019e37fcb7ba5e1a6ce2d431270 (diff)
downloadmariadb-git-276b0c8ef03046cc210e4eeab7231cb8d9f16bac.tar.gz
Fixed crash with SEQUENCE when using REPAIR
Diffstat (limited to 'sql/sql_sequence.h')
-rw-r--r--sql/sql_sequence.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_sequence.h b/sql/sql_sequence.h
index f5534d55d9b..1409f86649f 100644
--- a/sql/sql_sequence.h
+++ b/sql/sql_sequence.h
@@ -66,6 +66,7 @@ public:
class SEQUENCE :public sequence_definition
{
public:
+ enum seq_init { SEQ_UNINTIALIZED, SEQ_IN_PREPARE, SEQ_READY_TO_USE };
SEQUENCE();
~SEQUENCE();
int read_initial_values(TABLE *table);
@@ -87,8 +88,9 @@ public:
}
longlong next_value(TABLE *table, bool second_round, int *error);
- bool initialized; // If row has been read
bool all_values_used;
+ seq_init initialized;
+
private:
TABLE *table;
mysql_mutex_t mutex;