Vicențiu Ciorbaru
960b221c0b
Convert ntile to work with expressions as parameters.
2016-04-04 22:04:18 +03:00
Vicențiu Ciorbaru
be3902fceb
Implement ntile window function.
...
The current implementation does not allow for a dynamic expression
within the sum function's parameter.
2016-04-04 22:04:18 +03:00
Sergei Petrunia
2bd4dc38e0
Merge branch '10.2' into bb-10.2-mdev9543
2016-03-28 22:18:38 +03:00
Igor Babaev
82cb35be11
Changed the base class for Item_window_func from Item_result_field to
...
Item_func_or_sum.
Implemented method update_used_tables for class Item_findow_func.
Added the flag Item::with_window_func.
Made sure that window functions could be used only in SELECT list
and ORDER BY clause.
Added test cases that checked different illegal placements of
window functions.
2016-03-23 16:09:58 -07:00
Igor Babaev
1fc2c63fb1
Manual merge of branch 'bb-10.2-mdev8789' into 10.2
2016-03-21 11:46:03 -07:00
Vicențiu Ciorbaru
9c6fd420c1
[MDEV-7978] Post review fixes and cleanups.
...
* Maintain coding style in sql_yacc.yy in regards to optional clauses.
* Remove unused variable from sql_acl.cc.
* Update test case
2016-03-08 16:55:17 +02:00
Vicențiu Ciorbaru
5e873141a5
[MDEV-7978] Added show create user implementation.
2016-03-08 16:55:17 +02:00
Vicențiu Ciorbaru
b4fcd1a408
[MDEV-7978] Updated syntax for SHOW CREATE USER
2016-03-08 16:55:17 +02:00
Vicențiu Ciorbaru
b45c3d0b08
[MDEV-7978] Implement alter user and tested create user
...
Implemented the alter user syntax. Also tested that create user
creates users accordingly.
2016-03-08 16:55:17 +02:00
Vicențiu Ciorbaru
90b717b3cd
[MDEV-7978] Update grammar for new syntax
...
Extend the syntax accepted by the grammar to account for the new create user
and alter user syntax.
2016-03-08 16:55:17 +02:00
Sergei Golubchik
00d1db7a38
Merge branch '10.1' into 10.2
2016-02-25 18:19:55 +01:00
Sergei Golubchik
a5679af1b1
Merge branch '10.0' into 10.1
2016-02-23 21:35:05 +01:00
Sergei Golubchik
9214d043fd
disable SHOW I_S_table for built-in I_S tables
...
This fixes
MDEV-9538 Server crashes in check_show_access on SHOW STATISTICS
MDEV-9539 Server crashes in make_columns_old_format on SHOW GEOMETRY_COLUMNS
MDEV-9540 SHOW SPATIAL_REF_SYS and SHOW SYSTEM_VARIABLES return empty results with numerous warnings
2016-02-23 10:54:34 +01:00
Igor Babaev
0c6d753708
Fixed a problems in the parser.
...
Resolved window names.
Checked some constraints for window frames.
Added test cases for window name resolution.
2016-02-19 23:20:09 -08:00
Igor Babaev
f340aaeb52
Addressed the issues raised in the review for the main patch
...
of mdev-8789.
Fixed a bug in TABLE_LIST::print.
Fixed another bug for the case when the definition of a
WITH table contained column list while the join in the main
query used two instances of this table.
2016-02-17 14:30:25 -08:00
Sergei Golubchik
271fed4106
Merge branch '5.5' into 10.0
2016-02-15 22:50:59 +01:00
Igor Babaev
9d9c60fb12
Initial patch for the implementation of window functions (MDEV-6115):
...
- All parsing problems look like resolved
- Stub performing name resolution of window functions
in simplest queries has been added.
2016-02-12 20:33:56 -08:00
Monty
b2f8d7b410
Merge branch '10.1' into 10.2
...
Conflicts:
VERSION
cmake/plugin.cmake
config.h.cmake
configure.cmake
plugin/server_audit/server_audit.c
sql/sql_yacc.yy
2016-02-06 18:14:54 +02:00
Oleksandr Byelkin
41021c0254
MDEV-9462: Out of memory using explain on 2 empty tables
...
Fixed adding derived tables items to outer one.
2016-02-06 13:36:17 +01:00
Monty
11c2d3c3e2
Merge branch '10.0' into 10.1
...
Conflicts:
configure.cmake
2016-02-02 13:07:53 +02:00
Oleksandr Byelkin
07e9762940
MDEV-8615: Assertion `m_cpp_buf <= begin_ptr && begin_ptr <= m_cpp_buf + m_buf_length' failed in Lex_input_stream::body_utf8_start
...
Nothing should be done before any keyword recognized.
2016-01-27 21:17:23 +01:00
Alexey Botchkov
a4ff37e912
MDEV-6421 SQL_ERROR_LOG doesn't log comments in Events.
...
Change parser so it saves all the query line to the ';' in the
sp_instr::m_query.
2016-01-26 22:33:25 +04:00
Sergei Golubchik
c37107380a
cleanup: LEX_USER::pwtext and LEX_USER::pwhash
...
Was:
* LEX_USER::password was storing sometimes
plaintext password and sometimes password hash
* LEX_USER::auth was storing sometimes password hash and
sometimes plugin authentication string
Now:
* LEX_USER::pwtext stores the password in plain-text
* LEX_USER::pwhash stores the password hash
* LEX_USER::auth stores the plugin authentication string
2016-01-25 17:04:15 +01:00
Sergei Golubchik
1fea7e785f
cleanup: create LEX_USER::reset_auth()
...
as this is used quite often
2016-01-25 17:04:14 +01:00
Alexander Barkov
2ba7ed77aa
Merge remote-tracking branch 'origin/10.1' into 10.2
2015-12-29 19:37:11 +04:00
Igor Babaev
6dbdb433cb
Fixed compile errors of the merge of the patch for mdev-8789 with 10.2.
2015-12-21 12:13:39 -08:00
Vicențiu Ciorbaru
afc2fb1bf8
MDEV-8627: SHOW GRANTS does not work for a replicated role
...
The bug was caused by accessing uninitialized fields within the LEX related to
ssl by mysql_show_grants() -> get_current_user() -> has_auth() function.
2015-12-21 13:42:19 +02:00
Galina Shalygina
dfc4772f83
MDEV-8789 Implement non-recursive common table expressions
...
Initial implementation
2015-12-18 10:01:42 -08:00
Alexander Barkov
cc8e863390
Removing sp_variable::type, as it was always set to the same value with
...
sp_variable::field_def.type, so there was data redundancy.
2015-11-26 15:04:55 +04:00
Alexander Barkov
b50fa6dab2
Removing the unused "field_type" parameter in
...
sp_head::fill_field_definition().
2015-11-26 14:40:40 +04:00
Sergey Vojtovich
54689e1d5c
MDEV-8715 - Obsolete sql_alloc() in favor of THD::alloc() and thd_alloc()
...
The following left in semi-improved state to keep patch size reasonable:
- Field operator new: left thd_alloc(current_thd)
- Sql_alloc operator new: left thd_alloc(thd_get_current_thd())
- Item_args constructors: left thd_alloc(thd)
- Item_func_interval::fix_length_and_dec(): no THD arg, have to call current_thd
- Item_func_dyncol_exists::val_int(): same
- Item_dyncol_get::val_str(): same
- Item_dyncol_get::val_int(): same
- Item_dyncol_get::val_real(): same
- Item_dyncol_get::val_decimal(): same
- Item_singlerow_subselect::fix_length_and_dec(): same
2015-11-26 11:34:17 +04:00
Sergey Vojtovich
0746a07708
MDEV-8718 - Obsolete sql_strmake() in favor of THD::strmake() and thd_strmake()
2015-11-26 11:34:16 +04:00
Sergey Vojtovich
13af8650a8
MDEV-8719 - Obsolete sql_memdup() in favor of THD::memdup() and thd_memdup()
2015-11-26 11:34:15 +04:00
Alexander Barkov
55e67c3e34
MDEV-8095 Split Create_field
...
Part2: moving a few other fields from Column_definition to Create_field.
sizeof(sp_variable) is now 200 bytes (vs 248 bytes in 10.1)
2015-11-25 11:57:20 +04:00
Alexander Barkov
00ed55c71a
A joint patch for:
...
- MDEV-8093 sql_yacc.yy: add %type create_field for field_spec and column_def
and partially:
- MDEV-8095 Split Create_field
2015-11-25 11:22:10 +04:00
Sergei Golubchik
13989b36c1
cleanup: remove useless internal fied flag
2015-11-24 22:21:42 +01:00
Alexander Barkov
80ca997faa
Changing %type of opt_place from <NONE> to <const_simple_string>.
...
A prerequisite change for:
- MDEV-8093 sql_yacc.yy: add %type create_field for field_spec and column_def
- MDEV-8094 sql_yacc.yy: get rid of the rules "opt_if_not_exists_table_element"
and "opt_if_exists_table_element"
- MDEV-8095 Split Create_field
2015-11-24 12:44:35 +04:00
Alexander Barkov
d73cf394a5
MDEV-9170 Get rid of LEX::length and LEX::dec
...
A preparatory task for:
MDEV-4912 Add a plugin to field types (column types)
2015-11-23 18:55:01 +04:00
Alexander Barkov
b7e9bf9122
MDEV-9169 BINLOG_SYM in keywords_sp causes shift/reduce conflicts
2015-11-23 17:52:09 +04:00
Alexander Barkov
6b97b0c5e0
MDEV-9166 Wrong error message and shift/reduce conflicts in the RETURNS clause
2015-11-23 14:49:23 +04:00
Sergei Golubchik
beded7d9c9
Merge branch '10.0' into 10.1
2015-11-19 15:52:14 +01:00
Sergei Golubchik
ab476a8d10
Merge branch '5.5' into 10.0
2015-11-18 22:03:02 +01:00
Sergei Golubchik
2e0ac16827
remove obsolete workaround
...
The workaround is not needed anymore - mariadb requires bison 2.x.
And removing all __attribute__ in sql_yacc.yy breaks
new DBUG_ENTER.
2015-11-16 07:55:55 +01:00
Oleksandr Byelkin
7e4da9b370
DEV-8632 Segmentation fault on INSERT
...
View/derived fields should be taken into account when we build ref_pointer_array constructed.
DBUG_ASSERTs added to avoid memory overrun.
2015-11-09 16:08:06 +01:00
Sergei Golubchik
fb8713385f
remove unneded #include's that had a dubious explanation
2015-10-24 19:58:34 +02:00
Sergei Golubchik
956e92d908
MDEV-8609 Server crashes in is_invalid_role_name on reloading ACL with a blank role name
...
strip endspaces from the role name in the parser
because they'll be lost anyway when the name is stored
in the mysql.user.user column (of type CHAR)
2015-10-22 11:58:54 +02:00
Sergei Golubchik
dfb74dea30
Merge branch '10.0' into 10.1
2015-10-12 00:37:58 +02:00
Sergei Golubchik
cfeedbfd3e
Merge branch '5.5' into 10.0
2015-10-09 17:12:26 +02:00
Sergei Golubchik
82e9f6d948
Merge remote-tracking branch 'mysql/5.5' into 5.5
2015-10-08 22:54:24 +02:00
Oleksandr Byelkin
bed4e84795
MDEV-8380: Subquery parse error
...
backport mysql parser fixes
0034963fbf199696792491bcb79d5f0731c98804
5948561812bc691bd0c13cf518a3fe77d9daf920
2015-10-06 22:11:39 +02:00