Commit graph

898 commits

Author SHA1 Message Date
monty@mysql.com
e43cbebc59 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0
2005-06-06 16:54:56 +03:00
bar@mysql.com
2df945d87b Bug#8610: The ucs2_turkish_ci collation fails with upper('i')
UPPER/LOWER now can return a string with different length.

mi_test1.c:
  Adding new arguments.
Many files:
  Changeing caseup/casedn to return a result with different
  length than argument.
sql_string.h:
  Removing unused method,
mysql_priv.h:
  Removing unused method
2005-06-06 16:54:15 +05:00
monty@mysql.com
4b7882dc73 merge 2005-06-05 17:19:50 +03:00
monty@mysql.com
25a2c4a71e Cleanup during review
Simple optimization for 2 argument usage to function of variable arguments
Fix stack overrun when using 1+1+1+1+1+1+1+....
Update crash-me results for 5.0
Don't call post_open if pre_open() fails (optimization)
2005-06-05 17:01:20 +03:00
ingo@mysql.com
0a1e38b7ed Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
Manual merge from 4.1.
2005-06-01 11:15:21 +02:00
ingo@mysql.com
c420599581 Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
Hand merged from 4.0.
2005-05-31 19:37:24 +02:00
pem@mysql.com
53abbdc39b Merge mysql.com:/usr/local/bk/mysql-5.0
into mysql.com:/home/pem/work/mysql-5.0
2005-05-31 12:07:16 +02:00
pem@mysql.comhem.se
063896a6e7 Post-review fixes of BUG#9937: Crash on call to stored procedure. 2005-05-31 12:06:15 +02:00
ingo@mysql.com
51d80960ea Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
1.) Added a new option to mysql_lock_tables() for ignoring FLUSH TABLES.
Used the new option in create_table_from_items().
It is necessary to prevent the SELECT table from being reopend.
It would get new storage assigned for its fields, while the
SELECT part of the command would still use the old (freed) storage.
2.) Protected the CREATE TABLE and CREATE TABLE ... SELECT commands
against a global read lock. This prevents a deadlock in
CREATE TABLE ... SELECT in conjunction with FLUSH TABLES WITH READ LOCK
and avoids the creation of new tables during a global read lock.
3.) Replaced set_protect_against_global_read_lock() and
unset_protect_against_global_read_lock() by
wait_if_global_read_lock() and start_waiting_global_read_lock()
in the INSERT DELAYED handling.
2005-05-31 11:08:14 +02:00
konstantin@mysql.com
e315f903d0 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/opt/local/work/mysql-5.0-7306-new
2005-05-30 20:56:11 +04:00
konstantin@mysql.com
2d6a70c42a Preparatory (and the most problematic) patch for Bug#7306
"the server side preparedStatement error for LIMIT placeholder",
which moves all uses of LIMIT clause from PREPARE to OPTIMIZE
and later steps.
After-review fixes.
2005-05-30 20:54:37 +04:00
pem@mysql.com
e496b24304 Merge mysql.com:/usr/local/bk/mysql-5.0
into mysql.com:/home/pem/work/mysql-5.0
2005-05-30 11:06:31 +02:00
msvensson@neptunus.(none)
a07d8b1951 Merge neptunus.(none):/home/msvensson/mysql/bug9993
into neptunus.(none):/home/msvensson/mysql/mysql-5.0
2005-05-27 17:22:19 +02:00
pem@mysql.com
605af1e7dc Merge mysql.com:/usr/local/bk/mysql-5.0
into mysql.com:/home/pem/work/mysql-5.0
2005-05-27 11:28:03 +02:00
sergefp@mysql.com
59db44382b Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/psergey/mysql-5.0-conf-fixes-2
2005-05-26 21:01:53 +02:00
pem@mysql.comhem.se
3eca4bf22e Fixed BUG#9937: Crash on call to stored procedure.
This only showed up on two known platforms, both ia64 (one HP-UX and one Linux wich icc).
For some reason, they only get half the stack size they are supposed to have, which
makes deep SP recursion overrun the stack before check_stack_overrun() is triggered.
Also made som minor fixes in the check_stack_overrun() definition, supporting variable
margins.
No test case added, but the reason for the bug report was a failed existing test case
on these machines, which now works.
2005-05-26 20:36:14 +02:00
msvensson@neptunus.(none)
8401cd5d79 BUG#9993 2 unexpected warnings when dropping a routine and --skip-grant-tables
- Dont perform automatic privilege handling for stored procedures when server is started --skip-grant-tables
 - Renamed view_skip_grants to skip_grants and added test cases for this
2005-05-26 16:44:46 +02:00
dlenev@mysql.com
1449d44e1c Manual merge of patch fixing several trigger related bugs with main tree. 2005-05-24 22:35:41 +04:00
dlenev@brandersnatch.localdomain
007a205918 Fix for bugs:
#5860 "Multi-table UPDATE does not activate update triggers"
 #6812 "Triggers are not activated for INSERT ... SELECT"
 #8755 "Trigger is not activated by LOAD DATA".
This patch also implements proper handling of triggers for special forms
of insert like REPLACE or INSERT ... ON DUPLICATE KEY UPDATE. 
Also now we don't call after trigger in case when we have failed to
inserted/update or delete row. Trigger failure should stop statement
execution.

I have not properly tested handling of errors which happen inside of
triggers in this patch, since it is simplier to do this once we will be
able to access tables from triggers.
2005-05-24 22:19:33 +04:00
ramil@mysql.com
b06181bccd hf's fix for bug #9060 (FORMAT returns incorrect result)
we need proper rounding there
2005-05-20 01:04:08 +05:00
monty@mysql.com
db40af2a6f Fix warnings from icc
Added BUILD scripts for icc
Fixed (one time) memory leak in grant handling
2005-05-18 19:00:21 +03:00
sergefp@mysql.com
b6179919f3 Change Last_query_cost status variable from global to thread-local. 2005-05-18 05:39:10 +02:00
acurtis@xiphis.org
8df5887ad5 Bug#10246 - Parser: bad syntax for GRANT EXECUTE
Rename some functions
  more fine-grained sp privileges
  make grant/revoke sp grammar less ambigious
2005-05-17 19:54:20 +01:00
jimw@mysql.com
cde9f56b45 Merge 2005-05-09 11:28:57 -07:00
antony@ltantony.mysql.com
cc3bfc6ff1 Bug#8733 - server accepts malformed query (multiply mentioned distinct)
Detect conflicting options in SELECT
2005-05-09 14:31:46 +01:00
monty@mishka.local
015cd1cd21 merge 2005-05-06 13:51:58 +03:00
monty@mishka.local
a9f6aab4c9 Fixes while reviewing new code
Added option --count to mysqlshow (to show number of rows)
Fixed possible core dump in information schema
2005-05-06 11:39:30 +03:00
gbichot@quadita2.mysql.com
b72ae4fe57 Approximative fixes for BUG#2610,2611,9100 i.e. WL#2146 binlogging/replication of routines (stored procs and functions).
Approximative, because it's using our binlogging way (what we call "query"-level) and this is not as good as record-level binlog (5.1) would be. It imposes several
  limitations to routines, and has caveats (which I'll document, and for which the server will try to issue errors but that is not always possible).
  Reason I don't propagate caller info to the binlog as planned is that on master and slave
  users may be different; even with that some caveats would remain.
2005-05-05 14:20:53 +02:00
ingo@mysql.com
731c8da030 Bug#7823 - FLUSH TABLES WITH READ LOCK + INSERT DELAYED = deadlock
After merge fix.
2005-04-27 22:58:11 +02:00
ingo@mysql.com
235d2295da Merge from 4.0 needs fixes 2005-04-27 18:59:31 +02:00
ingo@mysql.com
0998abc831 Bug#7823 - FLUSH TABLES WITH READ LOCK + INSERT DELAYED = deadlock
Added protection against global read lock while creating and
initializing a delayed insert handler.
Allowed to ignore a global read lock when locking the table
inside the delayed insert handler.
Added some minor improvements.
2005-04-27 12:40:37 +02:00
ingo@mysql.com
792b816b1b Bug#7806 - insert on duplicate key and auto-update of timestamp
Modified the check for the timestamp field so that the flags for
the automatic for inserts and updates are cleared independently.
2005-04-19 15:12:32 +02:00
acurtis@xiphis.org
f638e5cb8f Bug#9102 - Stored proccedures: function which returns blob causes crash
Initialization of fields for sp return type was not complete.
2005-04-19 09:09:25 +01:00
monty@mysql.com
780202f130 Moved some old test and added a new test to only be run with mysql-test-run --big
Fixed warnings by valgrind for sum_distinct.test
Enable buffered-record-reads after filesort for InnoDB tables with short primary key
Enabled sort-with-data for MyISAM temporary files
2005-04-07 19:24:14 +03:00
serg@serg.mylan
c796ea598c Merge 2005-04-05 13:23:11 +02:00
serg@serg.mylan
810b2c3d40 remove the rest of isam/merge references
fix a race condition in TC_LOG_BINLOG::unlog
2005-04-05 13:17:49 +02:00
monty@mysql.com
04f8e164fb Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0
2005-04-04 16:45:23 +03:00
monty@mysql.com
201ee3eb78 Invalid DEFAULT values for CREATE TABLE now generates errors. (Bug #5902)
CAST() now produces warnings when casting a wrong INTEGER or CHAR values. This also applies to implicite string to number casts. (Bug #5912)
ALTER TABLE now fails in STRICT mode if it generates warnings.
Inserting a zero date in a DATE, DATETIME or TIMESTAMP column during TRADITIONAL mode now produces an error. (Bug #5933)
2005-04-01 15:04:50 +03:00
dlenev@brandersnatch.localdomain
d4b20f4a86 Fix for bugs #5859 "DROP TABLE does not drop triggers" and
#6559 "DROP DATABASE forgets to drop triggers".

If we drop table we should also drop all triggers associated with it.
To do this we have to check for existence of .TRG file when we are 
dropping table and delete it too.
2005-03-27 16:15:21 +04:00
brian@zim.(none)
7b81a9fd4c Merging support for blackhole up to 5.0. 2005-03-25 10:36:58 -08:00
brian@zim.(none)
cfcedd85cd Additional storage engine called "blackhole". Customer request, and for that matter a Zawodny request. With this you can alter table to a type of table that would never store data. Its a /dev/null for a database. 2005-03-22 16:10:39 -08:00
gbichot@production.mysql.com
56495a3691 Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-5.0
into production.mysql.com:/nfstmp1/guilhem/mysql-5.0-prod
2005-03-22 00:28:33 +01:00
gbichot@production.mysql.com
c766efdc5d Last part of WL#1062: better replication of timezones: no more use
of SET ONE_SHOT; storing tz info directly in event (if this info is needed),
it's now allowed to have different global tz on master and slave.
2005-03-22 00:26:12 +01:00
jimw@mysql.com
ee2b4ec959 Eliminate warnings noticed by VC7. This includes fixing my_mmap() on
Windows to call CreateFileMapping() with correct arguments, and
propogating the introduction of query_id_t to everywhere query ids are
passed around. (Bug #8826)
2005-03-18 16:12:25 -08:00
serg@serg.mylan
41997cf263 Merge bk-internal:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0
2005-03-17 08:46:48 +01:00
monty@mysql.com
f42941073d Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0
2005-03-16 22:59:06 +02:00
monty@mysql.com
594ef41b2d Cleanup during reviews
Removed some optional arguments
Fixed portability problem in federated tests
2005-03-16 16:11:01 +02:00
dlenev@brandersnatch.localdomain
3da06a5500 Fixed behavior of LOAD DATA with subqueries in SET clause.
The idea is to use TABLE_LIST::lock_type for passing type of lock for
target table to mysql_load() instead of using LEX::lock_option 
(which were rewritten by first subselect in SET clause).

This should also fix potential problem with LOAD DATA in SP
(it is important for them to have right lock_type in the table
 list by the end of statement parsing).
2005-03-16 12:13:35 +03:00
serg@serg.mylan
d7b2d4c541 global read lock code now uses a dedicated mutex
(otherwise a deadlock when ALTER writes to
binlog holding LOCK_open, it causes binlog rotation,
binlog waits for prepared transactions to commit, and commit
needs LOCK_open to check for global read lock)
2005-03-16 08:40:19 +01:00
dlenev@brandersnatch.localdomain
f169114042 WL#874 "Extended LOAD DATA".
Now one can use user variables as target for data loaded from file
(besides table's columns). Also LOAD DATA got new SET-clause in which
one can specify values for table columns as expressions.

For example the following is possible:
LOAD DATA INFILE 'words.dat' INTO TABLE t1 (a, @b) SET c = @b + 1;

This patch also implements new way of replicating LOAD DATA.
Now we do it similarly to other queries.
We store LOAD DATA query in new Execute_load_query event
(which is last in the sequence of events representing LOAD DATA).
When we are executing this event we simply rewrite part of query which
holds name of file (we use name of temporary file) and then execute it
as usual query. In the beggining of this sequence we use Begin_load_query
event which is almost identical to Append_file event
2005-03-16 04:32:47 +03:00