diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-06-30 16:39:20 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-06-30 16:39:20 +0200 |
commit | 36e59752e7fc70bc5179a3d730b5ce3ee58e4e30 (patch) | |
tree | 0d3e30ce973b2e1f044931c0eb1846d7192becda /sql/sql_class.h | |
parent | 7c0779da7c37f6ef6eff2f79dda6f1b0c57e3869 (diff) | |
parent | 1dd3c8f8ba49ec06e550d7376d27ff05ce024bec (diff) | |
download | mariadb-git-36e59752e7fc70bc5179a3d730b5ce3ee58e4e30.tar.gz |
Merge branch '10.2' into 10.3
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r-- | sql/sql_class.h | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h index 7a854e0c217..359d5f93a1f 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -3211,6 +3211,7 @@ public: query_id_t first_query_id; } binlog_evt_union; + mysql_cond_t COND_wsrep_thd; /** Internal parser state. Note that since the parser is not re-entrant, we keep only one parser @@ -4179,18 +4180,33 @@ public: { if (db.str == NULL) { - my_message(ER_NO_DB_ERROR, ER(ER_NO_DB_ERROR), MYF(0)); - return TRUE; + /* + No default database is set. In this case if it's guaranteed that + no CTE can be used in the statement then we can throw an error right + now at the parser stage. Otherwise the decision about throwing such + a message must be postponed until a post-parser stage when we are able + to resolve all CTE names as we don't need this message to be thrown + for any CTE references. + */ + if (!lex->with_clauses_list) + { + my_message(ER_NO_DB_ERROR, ER(ER_NO_DB_ERROR), MYF(0)); + return TRUE; + } + /* This will allow to throw an error later for non-CTE references */ + to->str= NULL; + to->length= 0; + return FALSE; } + to->str= strmake(db.str, db.length); to->length= db.length; return to->str == NULL; /* True on error */ } /* Get db name or "". Use for printing current db */ const char *get_db() - { - return db.str ? db.str : ""; - } + { return safe_str(db.str); } + thd_scheduler event_scheduler; public: @@ -4557,7 +4573,13 @@ public: The GTID assigned to the last commit. If no GTID was assigned to any commit so far, this is indicated by last_commit_gtid.seq_no == 0. */ - rpl_gtid last_commit_gtid; +private: + rpl_gtid m_last_commit_gtid; + +public: + rpl_gtid get_last_commit_gtid() { return m_last_commit_gtid; } + void set_last_commit_gtid(rpl_gtid >id); + LF_PINS *tdc_hash_pins; LF_PINS *xid_hash_pins; @@ -6353,8 +6375,6 @@ inline int handler::ha_ft_read(uchar *buf) inline int handler::ha_rnd_pos_by_record(uchar *buf) { int error= rnd_pos_by_record(buf); - if (!error) - update_rows_read(); table->status=error ? STATUS_NOT_FOUND: 0; return error; } |