Commit graph

7789 commits

Author SHA1 Message Date
unknown
fb36d923ce Fixed BUG#16474: SP crashed MySQL
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,
2006-03-10 14:04:56 +01:00
unknown
99515a3ac8 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
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.
2006-03-07 14:28:09 +03:00
unknown
e08efc1528 Merge bk-internal:/home/bk/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0
2006-03-07 07:42:51 +01:00
unknown
b267660646 after merge
mysql-test/mysql-test-run.sh:
  tests depend on umask
2006-03-06 23:43:47 +01:00
unknown
4a311f0a50 Win fixes
- 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
2006-03-06 22:05:39 +01:00
unknown
57839602ac Use grep instead of egrep
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"
2006-03-06 21:45:13 +01:00
unknown
cf4c785c62 merged
mysql-test/t/kill.test:
  Auto merged
2006-03-06 20:53:14 +01:00
unknown
19a1f488a8 merged 2006-03-06 18:34:38 +01:00
unknown
a127344a6c kill (subquery) - three years old bugfix that never worked 2006-03-06 18:26:39 +01:00
unknown
a581ed72db Merge bk-internal:/home/bk/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0
2006-03-06 14:01:15 +01:00
unknown
d82eebcb75 Merge bk-internal:/home/bk/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0
2006-03-06 13:45:53 +01:00
unknown
13407f2eca Merge mysql.com:/usr/home/bar/mysql-4.1.b15949
into  mysql.com:/usr/home/bar/mysql-5.0


mysql-test/r/union.result:
  Auto merged
mysql-test/t/union.test:
  Auto merged
sql/item.cc:
  Auto merged
2006-03-06 16:20:15 +04:00
unknown
89378fe8f6 Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/gluh/MySQL/Merge/5.0
2006-03-06 15:58:16 +04:00
unknown
9251e7f710 Merge bk-internal:/home/bk/mysql-5.0
into  devsrv-b.mysql.com:/space/magnus/bug17377/my50-bug17377
2006-03-06 12:28:30 +01:00
unknown
5b8d8c919e Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/gluh/MySQL/Merge/5.0
2006-03-06 15:15:23 +04:00
unknown
84168ebac2 Merge devsrv-b.mysql.com:/space/magnus/mysql-5.0
into  devsrv-b.mysql.com:/space/magnus/bug17377/my50-bug17377
2006-03-06 12:04:54 +01:00
unknown
9281bdd47c Merge bk-internal:/home/bk/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0


client/mysqltest.c:
  SCCS merged
2006-03-06 12:00:51 +01:00
unknown
d86a66d483 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b15949
2006-03-06 14:50:34 +04:00
unknown
7d24c7d445 4.1 -> 5.0 merge
mysql-test/t/grant.test:
  Auto merged
mysql-test/r/grant.result:
  manual merge
sql/sql_acl.cc:
  manual merge
2006-03-06 14:38:31 +04:00
unknown
3ecf9f040a Fix for bug#14385 GRANT and mapping to correct user account problems
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
2006-03-06 14:03:40 +04:00
unknown
cda64c11d7 Merge mysql.com:/home/timka/mysql/src/5.0-virgin
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
2006-03-06 11:41:19 +02:00
unknown
bb453729b8 Fix for bug#16678 FORMAT gives wrong result if client run with default-character-set=utf8
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
2006-03-06 12:52:38 +04:00
unknown
fc969bbcf0 Merge mysql.com:/home/dlenev/src/mysql-5.0-bg17866-2
into  mysql.com:/home/dlenev/src/mysql-5.0-merges


mysql-test/r/sp.result:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2006-03-04 23:58:48 +03:00
unknown
2fe8095662 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/opt/local/work/mysql-4.1-root


mysql-test/r/heap.result:
  Auto merged
mysql-test/t/heap.test:
  Auto merged
2006-03-04 22:33:19 +03:00
unknown
350475fae4 Fix for bug #17866 "Problem with renaming table with triggers with fully
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.
2006-03-04 16:55:06 +03:00
unknown
40f38a2d3e Merge mysqldev@production.mysql.com:my/mysql-5.0-release
into  zippy.(none):/home/cmiller/work/mysql/mysql-5.0.19-tbr
2006-03-03 16:27:43 -05:00
unknown
21d6e172f5 Bug#16859 involves truncating column data at NUL characters. Instead, the
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.
2006-03-03 16:26:38 -05:00
unknown
942ba22ee3 Merge mysql.com:/extern/mysql/5.0/bug16887/mysql-5.0-runtime
into  mysql.com:/extern/mysql/5.0/bug16887/mysql-5.0


sql/sql_yacc.yy:
  Auto merged
mysql-test/r/sp.result:
  Manual merge.
mysql-test/t/sp.test:
  Manual merge.
2006-03-03 19:18:17 +01:00
unknown
12e04a4c30 Merge mysql.com:/extern/mysql/5.0/bug16887/mysql-5.0-runtime
into  mysql.com:/extern/mysql/5.0/bug16887/mysql-5.0-release


sql/sql_yacc.yy:
  Auto merged
mysql-test/r/sp.result:
  SCCS merged
mysql-test/t/sp.test:
  SCCS merged
2006-03-03 18:51:13 +01:00
unknown
e6b31aced6 Merge bk-internal:/home/bk/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0
2006-03-03 15:44:38 +01:00
unknown
88d4005b8a Merge joerg@trift2:/M50/patch-17595 into debian.(none):/M50/clone-5.0 2006-03-03 12:50:15 +01:00
unknown
3443a37dea Merge mysql.com:/home/gluh/MySQL/Merge/mysql-5.0-release
into mysql.com:/home/gluh/MySQL/Merge/5.0


mysql-test/r/binary.result:
  Auto merged
mysql-test/t/binary.test:
  Auto merged
sql/field_conv.cc:
  Auto merged
2006-03-03 15:39:38 +04:00
unknown
500d6b851c Fix for bug#17826 'type_decimal' fails with ps-protocol
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
2006-03-03 15:29:39 +04:00
unknown
d95921376c Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/usr/home/ram/work/5.0.b17615


mysql-test/r/sp.result:
  merging
mysql-test/t/sp.test:
  merging
2006-03-03 09:35:25 +04:00
unknown
25b3bb8bd7 Expanding a binary field should result in 0x00-filled positions, not 0x20
(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.
2006-03-02 20:49:10 -05:00
unknown
e2ba74b825 Expanding a binary field should result in 0x00-filled positions, not 0x20
(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.
2006-03-02 19:59:49 -05:00
unknown
aa7b2261e9 Merge bk-internal:/home/bk/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0
2006-03-02 20:46:37 +01:00
unknown
44c175b7ef Merge svlasenko@bk-internal.mysql.com:/home/bk/mysql-5.0
into  selena.:H:/MYSQL/src/#17595-mysql-5.0
2006-03-02 20:52:58 +03:00
unknown
b4c5906011 Merge bk-internal:/home/bk/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0
2006-03-02 17:53:38 +01:00
unknown
326acd57c1 Make the "system" command become executed in a bash shell in cygwin.
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.
2006-03-02 16:28:45 +01:00
unknown
7865ce6188 Fixed BUG#17476: Stored procedure not returning data when it is called first
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.
2006-03-02 14:54:04 +01:00
unknown
3dd927cf1c Fix for BUG#13198: SP executes if definer does not exist.
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.
2006-03-02 16:23:42 +03:00
unknown
9a1fed13ee Implementation of WL#2897: Complete definer support in the 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.
2006-03-02 15:18:49 +03:00
unknown
fad27ebf57 Fix for BUG#16777: Can not create trigger nor view w/o definer
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().
2006-03-02 14:17:13 +03:00
unknown
6ea2c3cd57 Fix for bug #17615: invalid handling of function results in UPDATE...SET statement.
sql/item_func.cc:
  Fix for bug #17615: invalid handling of function results in UPDATE...SET statement.
  - set proper collation
2006-03-02 15:05:55 +04:00
unknown
d5a27fd86f Bug#17279 user with no global privs and with create priv in db can create
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
2006-03-02 11:01:58 +01:00
unknown
de1e87bbcd Fix for BUG#15229.
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.
2006-03-02 11:50:15 +02:00
unknown
306621137a Merge bk@192.168.21.1:mysql-5.0
into mysql.com:/home/hf/work/mysql-5.0.9088
2006-03-02 12:34:05 +04:00
unknown
5af68d301d Merge lsmy3.wdf.sap.corp:/data/users/tkatchaounov/mysql/src/5.0-virgin
into  lsmy3.wdf.sap.corp:/data/users/tkatchaounov/mysql/src/5.0-bug-17523
2006-03-01 17:27:39 +01:00
unknown
65225c3ea9 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  shellback.(none):/home/msvensson/mysql/mysql-5.0
2006-03-01 15:43:57 +01:00