Commit graph

1738 commits

Author SHA1 Message Date
monty@narttu.mysql.fi
693b906f6e Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/home/my/mysql-5.1
2006-11-30 23:27:16 +02:00
monty@mysql.com/narttu.mysql.fi
3a35c30027 Fixed compiler warnings (Mostly VC++):
- Removed not used variables
- Changed some ulong parameters/variables to ulonglong (possible serious bug)
- Added casts to get rid of safe assignment from longlong to long (and similar)
- Added casts to function parameters
- Fixed signed/unsigned compares
- Added some constructores to structures
- Removed some not portable constructs

Better fix for bug Bug #21428 "skipped 9 bytes from file: socket (3)" on "mysqladmin shutdown"
(Added new parameter to net_clear() to define when we want the communication buffer to be emptied)
2006-11-30 03:40:42 +02:00
kostja@bodhi.local
9fa2b75804 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
2006-11-30 02:36:18 +03:00
kostja@bodhi.local
74e3aa3143 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
2006-11-30 01:40:49 +03:00
kostja@bodhi.local
966c569b94 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
2006-11-29 23:36:26 +03:00
kroki/tomash@moonlight.intranet
3881fa9e66 Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug20637
2006-11-29 18:54:01 +03:00
kroki/tomash@moonlight.intranet
e149e6af5d Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug20637
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-bug20637
2006-11-29 18:51:28 +03:00
kroki/tomash@moonlight.intranet
50e3b32170 BUG#20637: "load data concurrent infile" locks the table
Note that we ignore CONCURRENT if LOAD DATA CONCURRENT is used from
inside a stored routine and MySQL is compiled with Query Cache support
(this is not in the manual).

The problem was that the condition test of "we are inside stored routine"
was reversed, thus CONCURRENT _worked only_ from stored routine.  The
solution is to use proper condition test.

No test case is provided because the test case would require a large
amount of input, and it's hard to tell is SELECT is really blocked or
just slow (subject to race).
2006-11-29 15:51:53 +03:00
kostja@bodhi.local
2525e16c73 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
2006-11-29 11:44:37 +03:00
kostja@bodhi.local
5fea0724bc Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.local:/opt/local/work/mysql-5.0-runtime
2006-11-29 02:44:12 +03:00
gkodinov@dl145s.mysql.com
32c9e11df9 Merge bk-internal:/home/bk/mysql-5.1
into  dl145s.mysql.com:/data0/bk/team_tree_merge/MERGE/mysql-5.1-opt
2006-11-28 17:14:16 +01:00
gkodinov/kgeorge@macbook.gmz
2c82b5a97a 5.0-opt -> 5.1-opt merge fixed. 2006-11-20 12:46:47 +02:00
holyfoot/hf@mysql.com/deer.(none)
40b22f3910 merging 2006-11-18 21:49:59 +04:00
holyfoot/hf@deer.(none)
7d190dd6b1 Merge bk@192.168.21.1:mysql-5.1-opt
into  mysql.com:/home/hf/work/mysql-5.1-mrg
2006-11-17 19:01:35 +04:00
holyfoot/hf@mysql.com/deer.(none)
e95e23b0f3 Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/mysql-5.0-0mrg
2006-11-17 10:30:16 +04:00
jani@ua141d10.elisa.omakaista.fi
596f64d91a Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1-marvel
into  ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.1-lex-string
2006-11-16 14:38:45 +02:00
malff/marcsql@weblab.(none)
2afbcdf46f Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  weblab.(none):/home/marcsql/TREE/mysql-5.1-18239
2006-11-15 11:24:57 -07:00
malff/marcsql@weblab.(none)
6e29099d43 Bug#18239 (Possible to overload internal functions with stored functions)
Bug#21025 (misleading error message when creating functions named 'x', or 'y')
Bug#22619 (Spaces considered harmful)

This change contains a fix to report warnings or errors, and multiple tests
cases.

Before this fix, name collisions between:
- Native functions
- User Defined Functions
- Stored Functions
were not systematically reported, leading to confusing behavior.

I) Native / User Defined Function

Before this fix, is was possible to create a UDF named "foo", with the same
name as a native function "foo", but it was impossible to invoke the UDF,
since the syntax "foo()" always refer to the native function.
After this fix, creating a UDF fails with an error if there is a name
collision with a native function.

II) Native / Stored Function

Before this fix, is was possible to create a SF named "db.foo", with the same
name as a native function "foo", but this was confusing since the syntax
"foo()" would refer to the native function. To refer to the Stored Function,
the user had to use the "db.foo()" syntax.
After this fix, creating a Stored Function reports a warning if there is a
name collision with a native function.

III) User Defined Function / Stored Function

Before this fix, creating a User Defined Function "foo" and a Stored Function
"db.foo" are mutually exclusive operations. Whenever the second function is
created, an error is reported. However, the test suite did not cover this
behavior.
After this fix, the  behavior is unchanged, and is now covered by test cases.

Note that the code change in this patch depends on the fix for Bug 21114.
2006-11-14 19:34:16 -07:00
malff/marcsql@weblab.(none)
429b0e6c0f Bug#23703 (DROP TRIGGER needs an IF EXISTS)
This change set implements the DROP TRIGGER IF EXISTS functionality.

This fix is considered a bug and not a feature, because without it,
there is no known method to write a database creation script that can create
a trigger without failing, when executed on a database that may or may not
contain already a trigger of the same name.

Implementing this functionality closes an orthogonality gap between triggers
and stored procedures / stored functions (which do support the DROP IF
EXISTS syntax).

In sql_trigger.cc, in mysql_create_or_drop_trigger,
the code has been reordered to:
- perform the tests that do not depend on the file system (access()),
- get the locks (wait_if_global_read_lock, LOCK_open)
- call access()
- perform the operation
- write to the binlog
- unlock (LOCK_open, start_waiting_global_read_lock)

This is to ensure that all the code that depends on the presence of the
trigger file is executed in the same critical section,
and prevents race conditions similar to the case fixed by Bug 14262 :

- thread 1 executes DROP TRIGGER IF EXISTS, access() returns a failure
- thread 2 executes CREATE TRIGGER
- thread 2 logs CREATE TRIGGER
- thread 1 logs DROP TRIGGER IF EXISTS

The patch itself is based on code contributed by the MySQL community,
under the terms of the Contributor License Agreement (See Bug 18161).
2006-11-13 15:40:22 -07:00
holyfoot/hf@deer.(none)
938ba3e11e Merge mysql.com:/home/hf/work/mysql-5.0.clean
into  mysql.com:/home/hf/work/mysql-5.1.clean
2006-11-08 19:09:39 +04:00
anozdrin/alik@alik.
ee15c11b7c Merge alik.:/mnt/raid/alik/MySQL/devel/5.1
into  alik.:/mnt/raid/alik/MySQL/devel/5.1-rt-merged-2
2006-11-07 16:24:35 +03:00
cmiller@zippy.cornsilk.net
b074e13483 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
2006-11-02 17:51:59 -05:00
malff/marcsql@weblab.(none)
48a87f8ae0 Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  weblab.(none):/home/marcsql/TREE/mysql-5.1-21114_b
2006-11-02 11:13:04 -07:00
malff/marcsql@weblab.(none)
62c242cc75 Bug#21114 (Foreign key creation fails to table with name format)
Due to the complexity of this change, everything is documented in WL#3565

This patch is the third iteration, it takes into account the comments
received to date.
2006-11-02 11:01:53 -07:00
andrey@example.com
63f7ca0662 Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  example.com:/work/mysql-5.1-runtime-bug22830-new
2006-11-02 13:59:44 +01:00
andrey@example.com
c27a88ca2d Better fix for bug#22830
Events: crash with procedure which alters events with function

Post-review CS

This fix also changes the handling of KILL command combined with
subquery. It changes the error message given back to "not supported",
from parse error. The error for CREATE|ALTER EVENT has also been changed
to generate "not supported yet" instead of parse error.
In case of a SP call, the error is "not supported yet". This change
cleans the parser from code which should not belong to there. Still
LEX::expr_allows_subselect is existant because it simplifies the handling
 of SQLCOM_HA_READ which forbids subselects.
2006-11-02 13:51:43 +01:00
kostja@bodhi.local
965669d1f9 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
2006-11-02 03:24:11 +03:00
joerg@trift2.
0d27df6f1a Merge trift2.:/MySQL/M51/clone-5.1
into  trift2.:/MySQL/M51/push-5.1
2006-11-01 13:26:03 +01:00
msvensson@shellback.(none)
631c82d2ea Bug#18888 Trying to overwrite sql/lex_hash.h during build
- As a sideeffect of the patch to generate lex_hash.h only once
on the machine where the source dist was produced, a problem
was found when compiling a mysqld without partition support - it 
would crash when looking up the lex symbols due to mismatch between
lex.h and the generated lex_hash.h

 - Remove the ifdef for partition in lex.h 
 - Fix minor problem with"EXPLAIN PARTITION" when not compiled with
   partition(existed also without the above patch)
 - Add test case that will be run when we don't have partition
   support compiled into mysqld
 - Return error ER_FEATURE_DISABLED if user tries to use PARTITION
   when there is no support for it.
2006-10-26 19:11:09 +02:00
gkodinov/kgeorge@macbook.gmz
932d86bbb9 Bug #21809: Error 1356 while selecting from view with grouping though underlying
select OK.
The SQL parser was using Item::name to transfer user defined function attributes
to the user defined function (udf). It was not distinguishing between user defined 
function call arguments and stored procedure call arguments. Setting Item::name 
was causing Item_ref::print() method to print the argument as quoted identifiers 
and caused views that reference aggregate functions as udf call arguments (and 
rely on Item::print() for the text of the view to store) to throw an undefined 
identifier error.
Overloaded Item_ref::print to print aggregate functions as such when printing
the references to aggregate functions taken out of context by split_sum_func2()
Fixed the parser to properly detect using AS clause in stored procedure arguments
as an error.
Fixed printing the arguments of udf call to print properly the udf attribute.
2006-10-24 15:26:41 +03:00
kostja@bodhi.local
2fecf79536 Merge bodhi.local:/opt/local/work/mysql-5.0-runtime
into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
2006-10-23 12:35:56 +04:00
kostja@bodhi.local
4cb57ac048 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
2006-10-23 12:06:59 +04:00
andrey@example.com
bef920e08e Fix small glitch during parsing of ALTER EVENT xyz
with only COMMENT clause. Strangely it has manifestated itself
only on two platforms. This is a fix for bug#23423 
"Syntax error for "ALTER EVENT ... COMMENT ..." on just two platforms"
2006-10-19 15:56:37 +02:00
jani@ua141d10.elisa.omakaista.fi
8dd0b2d0ae Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1
into  ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.1-lex-string
2006-10-17 19:54:44 +03:00
mikael/pappa@dator5.(none)
4a7cd3a1cb Merge dator5.(none):/home/pappa/clean-mysql-5.1
into  dator5.(none):/home/pappa/bug18198
2006-10-16 15:40:40 -04:00
jani@ua141d10.elisa.omakaista.fi
02f29377fd Changed several char* to LEX_STRING*. 2006-10-16 19:57:33 +03:00
kroki/tomash@moonlight.intranet
9e942999d6 Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug20953
2006-10-12 18:33:07 +04:00
kroki/tomash@moonlight.intranet
813431e9c9 Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug20953
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-bug20953
2006-10-12 18:06:26 +04:00
kroki/tomash@moonlight.intranet
591c06d4b7 BUG#20953: create proc with a create view that uses local vars/params
should fail to create

The problem was that this type of errors was checked during view
creation, which doesn't happen when CREATE VIEW is a statement of
a created stored routine.

The solution is to perform the checks at parse time.  The idea of the
fix is that the parser checks if a construction just parsed is allowed
in current circumstances by testing certain flags, and this flags are
reset for VIEWs.

The side effect of this change is that if the user already have
such bogus routines, it will now get a error when trying to do

  SHOW CREATE PROCEDURE proc;

(and some other) and when trying to execute such routine he will get

  ERROR 1457 (HY000): Failed to load routine test.p5. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)

However there should be very few such users (if any), and they may
(and should) drop these bogus routines.
2006-10-12 18:02:57 +04:00
malff/marcsql@weblab.(none)
6e809b249e Bug#21462 (Stored procedures with no arguments require parenthesis)
The syntax of the CALL statement, to invoke a stored procedure, has been
changed to make the use of parenthesis optional in the argument list.
With this change, "CALL p;" is equivalent to "CALL p();".

While the SQL spec does not explicitely mandate this syntax, supporting it
is needed for practical reasons, for integration with JDBC / ODBC connectors.

Also, warnings in the sql/sql_yacc.yy file, which were not reported by Bison 2.1
but are now reported by Bison 2.2, have been fixed.

The warning found were:
bison -y -p MYSQL  -d --debug --verbose sql_yacc.yy
sql_yacc.yy:653.9-18: warning: symbol UNLOCK_SYM redeclared
sql_yacc.yy:656.9-17: warning: symbol UNTIL_SYM redeclared
sql_yacc.yy:658.9-18: warning: symbol UPDATE_SYM redeclared
sql_yacc.yy:5169.11-5174.11: warning: unused value: $2
sql_yacc.yy:5208.11-5220.11: warning: unused value: $5
sql_yacc.yy:5221.11-5234.11: warning: unused value: $5
conflicts: 249 shift/reduce

"unused value: $2" correspond to the $$=$1 assignment in the 1st {} block
in table_ref -> join_table {} {},
which does not procude a result ($$) for the rule but an intermediate $2
value for the action instead.
"unused value: $5" are similar, with $$ assignments in {} actions blocks
which are not for the final reduce.
2006-10-09 09:59:02 -07:00
tsmith/tim@siva.hindu.god
44f0e55ca4 Merge siva.hindu.god:/usr/home/tim/m/bk/50
into  siva.hindu.god:/usr/home/tim/m/bk/mrg/51
2006-09-29 18:04:34 -06:00
tsmith/tim@siva.hindu.god
ca1f99bdb8 Merge siva.hindu.god:/usr/home/tim/m/bk/g51
into  siva.hindu.god:/usr/home/tim/m/bk/mrg/51
2006-09-29 17:01:16 -06:00
gluh@gluh.(none)
b7e59b7085 Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into  mysql.com:/home/gluh/MySQL/Merge/5.1
2006-09-28 14:09:31 +05:00
gkodinov@dl145s.mysql.com
b0167d265f Merge dl145s.mysql.com:/data/bk/team_tree_merge/mysql-5.0
into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt
2006-09-28 10:36:04 +02:00
gluh@mysql.com/gluh.(none)
4aaf7e34ff additional 'after merge' fix 2006-09-27 20:11:11 +05:00
mikael/pappa@dator5.(none)
6be97e4e43 Final step of Take 7 on review fixes of this
fairly complex bug
2006-09-26 16:30:39 -04:00
mikael/pappa@dator5.(none)
de9001d3c4 Merge dator5.(none):/home/pappa/clean-mysql-5.1
into  dator5.(none):/home/pappa/bug18198
2006-09-26 01:49:14 -04:00
igor@rurik.mysql.com
a661bdda19 Fixed bug #21646.
Presence of a subquery in the ON expression of a join 
should not block merging the view that contains this join.
Before this patch the such views were converted into 
into temporary table views.
2006-09-25 06:15:14 -07:00
cmiller@zippy.cornsilk.net
161fea4ac4 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
2006-09-23 09:51:20 -04:00
msvensson@shellback.(none)
fe0cfacf35 Merge shellback.(none):/home/msvensson/mysql/mysql-5.1
into  shellback.(none):/home/msvensson/mysql/mysql-5.1-maint
2006-09-21 20:31:35 +02:00