fix_fields() was not called for "order by" variables if the type was a
"constant integer", and thus interpreted as a column index.
However, a local variable is an expression and should not be interpreted
as a column index. Instead it behaves just like when using a user variable
for instance (i.e. it will not affect the ordering).
mysql-test/r/sp.result:
Updated results for new test case (BUG#16474).
mysql-test/t/sp.test:
New test case for BUG#16474.
sql/sql_select.cc:
When processing order list,
into mysql.com:/home/alik/Documents/AllProgs/MySQL/devel/5.0-rt
mysql-test/r/sp.result:
Auto merged
sql/sql_trigger.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/r/skip_grants.result:
Merge 5.0 and 5.0-runtime.
mysql-test/t/skip_grants.test:
Merge 5.0 and 5.0-runtime.
- Use tmp sh file both in system and popen
client/mysqltest.c:
Introduce common functions to handle unix emulation on windows using a temporary sh file.
Use it both in my_popen and my_system.
mysql-test/r/mysqltest.result:
Update test result
mysql-test/t/mysqltest.test:
Fix "windows paths" in three places that doesn't automatically get fixed
Uset the output file mysqltest.sql instead of con.sql as con is not an allowed filename on Windows
Use system for util functions
Use system inestad of exec
mysql-test/t/trigger-grant.test:
Use "system" instead of exec for system admin tasks
No need to use "egrep", changing to "grep"
Check if the host of table hash record exactly matches host from GRANT command
mysql-test/r/grant.result:
Fix for bug#14385 GRANT and mapping to correct user account problems
test case
mysql-test/t/grant.test:
Fix for bug#14385 GRANT and mapping to correct user account problems
test case
into mysql.com:/home/timka/mysql/src/5.0-bug-15229
mysql-test/r/join.result:
Auto merged
mysql-test/t/join.test:
Auto merged
sql/table.cc:
Auto merged
sql/table.h:
Auto merged
sql/sql_base.cc:
SCCS merged
calculate Item_func_format::max_length using charset->mbmaxlen
mysql-test/r/func_math.result:
Fix for bug#16678 FORMAT gives wrong result if client run with default-character-set=utf8
test case
mysql-test/t/func_math.test:
Fix for bug#16678 FORMAT gives wrong result if client run with default-character-set=utf8
test case
qualified subject table" which was introduced during work on bug #13525
"Rename table does not keep info of triggers".
The bug was caused by the fact that during reconstruction of CREATE TRIGGER
statement stored in .TRG file which happened during RENAME TABLE we damaged
trigger definition in case when it contained fully qualified name of subject
table (see comment for sql_yacc.yy for more info).
mysql-test/r/trigger.result:
Added test for bug #17866 "Problem with renaming table with triggers with fully
qualified subject table".
mysql-test/t/trigger.test:
Added test for bug #17866 "Problem with renaming table with triggers with fully
qualified subject table".
sql/sql_trigger.cc:
Table_triggers_list::change_table_name_in_triggers():
Instead of trying to use pointer to the end of subject table identifier
we use pointer to the beginning of FOR lexeme now, so during reconstruction
of CREATE TRIGGER statement in this function we need to add extra space
before part which begins with FOR to get nice trigger definition.
sql/sql_yacc.yy:
trigger_tail:
In this rule we can't rely on using remember_end token after table_ident token,
since value returned depends on whether table name is fully qualified or not.
So instead of trying to get pointer to the end of table identifier we use
pointer to the beginning of FOR lexeme.
client will now substitute spaces for NULs, so that the grid isn't messed up
due to silently consumed NULs and that the full field is shown.
client/mysql.cc:
For non-numbers, print each character at a time, instead of using the
fprintf() facility, which interprets an array of chars as a C string, which
is necessarily NUL terminated. We mustn't terminate on NULs, and since we
know the length of the data, we needn't.
mysql-test/r/mysql.result:
Add a test.
mysql-test/t/mysql.test:
Add a test.
removed unnecessary calculation of cache value
otherwise Join::preapre tries to calculate
undefined values(filed values)
mysql-test/r/type_decimal.result:
Fix for bug#17826 'type_decimal' fails with ps-protocol
test case, this test case reproduce the same bug but without PS protocol
mysql-test/t/type_decimal.test:
Fix for bug#17826 'type_decimal' fails with ps-protocol
test case, this test case reproduce the same bug but without PS protocol
(ASCII space). For Bug#16857.
sql/field_conv.cc:
Bug#16857: Do not expand BINARY fields as if they are strings (which
presumably /should/ be filled with spaces). Instead, fill BINARY fields
with 0x00 bytes.
(ASCII space). For Bug#16857.
sql/field_conv.cc:
Bug#16857: Do not expand BINARY fields as if they are strings (which
presumably /should/ be filled with spaces). Instead, fill BINARY fields
with 0x00 bytes.
client/mysqltest.c:
Prepend the command to execute by system with "sh" to make it executed by cygwin's bash
mysql-test/t/mysqldump.test:
Change from " to ' to avoid bash's filename expanding. I.e to avoid that "[mysqltest1]" will be llok for any dirs in mysql-test/* that are named m, y, s, q etc. And ther is actually one dir called t, so we will get a match and thus echo "t" to the file.
time per connection
Removed const_string() method from Item_string (it was only used in one
place, in a bad way). Defer possible SP variable, and access data directly
instead, in date_format item.
mysql-test/r/sp.result:
Updated results for new test (BUG#17476).
mysql-test/t/sp.test:
New test case (BUG#17476)
sql/item.h:
Removed const_string() from Item_string.
It was only used in one place, and we can just use str_value in Item directly.
sql/item_timefunc.cc:
Must defer a (possible) local SP variable to use max_length and str_value
in Item_func_date_format::fix_length_and_dec(), and refer to str_value
directly without the const_string() method (now removed); the cast didn't
work in all cases anyway.
Basically, this fix contains a test case and removing of a workaround
for replication. This fix became possible after pushing WL#2897
(Complete definer support in stored routines).
mysql-test/r/sp-security.result:
Updated the result file to contain results of test for BUG#13198.
mysql-test/t/sp-security.test:
Added a test case for BUG#13198.
sql/sp_head.cc:
Removed the workaround for replication, since WL#2897 is pushed and
now definer attribute/clause is fully supported in stored routines.
The idea is to add DEFINER-clause in CREATE PROCEDURE and CREATE FUNCTION
statements. Almost all support of definer in stored routines had been already
done before this patch.
NOTE: this patch changes behaviour of dumping stored routines in mysqldump.
Before this patch, mysqldump did not dump DEFINER-clause for stored routines
and this was documented behaviour. In order to get full information about stored
routines, one should have dumped mysql.proc table. This patch changes this
behaviour, so that DEFINER-clause is dumped.
Since DEFINER-clause is not supported in CREATE PROCEDURE | FUNCTION statements
before this patch, the clause is covered by additional version-specific comments.
client/mysqldump.c:
Updated the code for dumping stored routines: cover DEFINER-clause
into version-specific comment.
mysql-test/r/gis.result:
Updated result file after adding DEFINER-clause.
mysql-test/r/information_schema.result:
Updated result file after adding DEFINER-clause.
mysql-test/r/mysqldump.result:
Updated result file after adding DEFINER-clause.
mysql-test/r/rpl_ddl.result:
Updated result file after adding DEFINER-clause.
mysql-test/r/rpl_sp.result:
Updated result file after adding DEFINER-clause.
mysql-test/r/rpl_trigger.result:
Updated result file after adding DEFINER-clause.
mysql-test/r/sp-security.result:
Updated result file after adding DEFINER-clause.
mysql-test/r/sp.result:
Updated result file after adding DEFINER-clause.
mysql-test/r/sql_mode.result:
Updated result file after adding DEFINER-clause.
mysql-test/t/sp-security.test:
Updated result file after adding DEFINER-clause.
sql/sp.cc:
Added DEFINER-clause.
sql/sp_head.cc:
Added a new convenient variant of set_definer() operation.
sql/sp_head.h:
Updated result file after adding DEFINER-clause.
sql/sql_lex.h:
Renamed trigger_definition_begin into stmt_definition_begin to be used for
triggers and stored routines.
sql/sql_parse.cc:
Check DEFINER-clause.
sql/sql_trigger.cc:
Renamed trigger_definition_begin into stmt_definition_begin to be used for
triggers and stored routines.
sql/sql_yacc.yy:
Added DEFINER-clause.
if --skip-grant-tables specified.
The problem is that there is a check that prevents creating a definer
with empty host name.
In --skip-grant-tables mode this check prevents the user from creating a
trigger/view without explicitly specifying its definer. This happens, because
in --skip-grant-tables mode CURRENT_USER is ''@''. According to Sanja this
check was implemented intentionally.
However, according to the MySQL manual it is possible to specify empty host
name (as well as empty user name). Moreover, the behaviour for stored routines
is different in this aspect -- we allow them to be created with implicit
definer.
Based on this, we believe it is OK to change the behaviour for views to be
similar with the behaviour for stored routines.
mysql-test/r/skip_grants.result:
Added a test case for BUG#16777.
mysql-test/t/skip_grants.test:
Added a test case for BUG#16777.
sql/mysql_priv.h:
Do not check that strlen(host) > 0 in get_default_definer().
sql/sql_parse.cc:
Do not check that strlen(host) > 0 in get_default_definer().
sql/sql_view.cc:
Do not check that strlen(host) > 0 in get_default_definer().
database
- Fix test case for systems with "lowercase names"
mysql-test/r/grant2.result:
Fix for system with "lowercase names", allow error 1007 to be returned
mysql-test/t/grant2.test:
Fix for system with "lowercase names", allow error 1007 to be returned
The cause of this bug was a design flaw due to which the list of natural
join columns was incorrectly computed and stored for nested joins that
are not natural joins, but are operands (possibly indirect) of nested joins.
The patch corrects the flaw in a such a way, that the result columns of a
table reference are materialized only if it is a leaf table (that is, only
if it is a view, stored table, or natural/using join).
mysql-test/r/join.result:
Added test for BUG#15229 and uncommented failing test cases of
BUG#15357 (now fixed by this patch).
mysql-test/t/join.test:
Added test for BUG#15229 and uncommented failing test cases of
BUG#15357 (now fixed by this patch).
sql/sql_base.cc:
- Do not materialize the result columns of regular nested joins
(that are not natural/using joins).
- Moved most of the code that creates/adds new natural join column
references to the method 'get_or_create_column_ref', and simplified
'mark_common_columns'.
- Replaced a call to 'get_or_create_column_ref' with 'get_natural_column_ref'
where it is for sure all columns are alredy created.
sql/table.cc:
- Modified the method 'get_or_create_column_ref' so that it adds itself
the newly created natural join columns to the respective table reference.
sql/table.h:
- Modified the method 'get_or_create_column_ref' so that it adds itself
the newly created natural join columns to the respective table reference.