Commit graph

147 commits

Author SHA1 Message Date
holyfoot@hf-ibm.(none)
2c8e9df232 A lot of fixes to Precision math
Mostly about precision/decimals of the results of the operations
2005-05-05 20:06:49 +05:00
serg@serg.mylan
52770e8682 XID SQL syntax
minor cleanups
XA tests
2005-04-04 00:50:05 +02:00
serg@serg.mylan
d6bedfa8e0 merged 2005-03-23 09:42:24 +01:00
jimw@mysql.com
4c67678f15 Fix Windows compile warnings, declarations of walk functions 2005-03-22 00:00:24 +01:00
konstantin@mysql.com
371850a459 Cleanup of Item_func_group_concat 2005-03-18 00:41:03 +03:00
konstantin@mysql.com
6a2ef5577c WL#926 "AVG(DISTINCT) and other distincts", part 2 (out of 3): clean up
Item_sum_count_distinct, and
deploy Unique for use with COUNT(DISTINCT) if there is no blob
column in the list of DISTINCT arguments.
2005-03-15 03:46:19 +03:00
konstantin@mysql.com
983c75f05e WL#926 "SUM(DISTINCT) and AVG(DISTINCT)": improvement of SUM(DISTINCT) and
implementation of AVG(DISTINCT) which utilizes the approach with Fields.
The patch implemented in October is portede to the up-to-date tree 
containing DECIMAL type.
Tests for AVG(DISTINCT) (although there is not much to test provided
that SUM(DISTINCT) works), cleanups for COUNT(DISTINCT) and GROUP_CONCAT()
will follow in another changeset.
2005-03-13 23:50:43 +03:00
pem@mysql.comhem.se
6a15e01393 Fixed BUG#8937: Stored Procedure: AVG() works as SUM() in SELECT ... INTO statement 2005-03-07 18:09:53 +01:00
jani@ua141d10.elisa.omakaista.fi
111e1cb29d Fix for Bug#5615 and merge from 4.1 2005-03-01 22:19:19 +02:00
svoj@mysql.com
af026ef164 Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/svoj/devel/mysql/stddev-mysql-5.0
2005-02-27 13:33:20 +04:00
svoj@mysql.com
800aaae1fb BUG#3190 fix (request for STDDEV_SAMP, VAR_SAMP).
This bug is also known as WL#1639.
2005-02-25 22:19:04 +04:00
monty@mysql.com
0a6b7aedb2 Remove compiler warnings and remove not used variables
(Found during build process)
2005-02-25 16:53:22 +02:00
monty@mysql.com
ee8c7a3eb5 After merge fixes 2005-02-22 18:30:40 +02:00
monty@mysql.com
e2ea35ec67 Merge with 4.1 2005-02-22 15:47:00 +02:00
monty@mysql.com
e2dc9b4099 Backport my_strntod() from 5.0
Change string->float conversion to delay division as long as possible.
This gives us more exact integer->float conversion for numbers of type '123.45E+02' (Bug #7740)
2005-02-22 12:51:23 +02:00
monty@mysql.com
218e00ac68 Fixed BUILD script to use --with-berkeley-db instead of --with-bdb
Lots of small fixes to multi-precision-math path
Give Note for '123.4e'
Added helper functions type 'val_string_from_real()
Don't give warnings for end space for string2decimal()
Changed storage of values for SP so that we can detect length of argument without strlen()
Changed interface for str2dec() so that we must supple the pointer to the last character in the buffer
2005-02-19 18:58:27 +02:00
hf@deer.(none)
b94a482ee9 Precision Math implementation 2005-02-09 02:50:45 +04:00
monty@mysql.com
8d616390e9 After merge fixes
Fix for BIT(X) field as string
2005-01-15 17:38:43 +02:00
monty@mysql.com
0a1076a25f Merge with 4.1 2005-01-15 14:09:45 +02:00
igor@rurik.mysql.com
cd577f2590 func_gconcat.result, func_gconcat.test:
Added a test case for bug #7769.
item_sum.h:
  Fixed bug #7769: a crash for queries with group_concat and
  having when the query table was empty.
  The bug was due an unsafe dereferencing.
2005-01-15 01:05:00 -08:00
monty@mysql.com
2299e1eca4 Better handling of ensuring that setup_tables() are not called twice
This fixed a bug in prepared statements when used with outher joins
Fixed a bug in SUM(DISTINCT) when used with prepared statements.
Some safety fixes in test scripts to ensure that previous test failures shouldn't affect other tests
2005-01-03 21:04:33 +02:00
monty@mishka.local
4f4bbfc279 Merge with 4.1 2004-12-22 13:54:39 +02:00
bell@sanja.is.com.ua
acbca25dd2 postreview fix 2004-12-07 21:18:15 +02:00
bell@sanja.is.com.ua
b218560604 merge 2004-12-07 09:07:37 +02:00
tomas@poseidon.ndb.mysql.com
538a3f7a53 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.0
2004-11-25 13:33:31 +00:00
ram@gw.mysql.r18.ru
511eb626bf Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into gw.mysql.r18.ru:/usr/home/ram/work/4.1.b6441
2004-11-25 16:18:46 +04:00
serg@serg.mylan
2d3dd65cc1 merged 2004-11-20 18:36:41 +01:00
bar@mysql.com
770c9be8c2 Bug #6658 MAX(column) returns incorrect coercibility
Also, Item_sum_hybrid->charset was removed as redundant,
and switched to use collation.collation instead.
2004-11-19 19:35:36 +04:00
bell@sanja.is.com.ua
f5e253dc2f reporting empty result added in case of max/min optimisation of ALL/ANY/SOME subqueries
fixed null processing in NOT operation used in ALL subquery (Bug #6247)
2004-11-18 18:10:07 +02:00
konstantin@mysql.com
e5f4c7a0bd Rename: Item::val -> Item::val_real(). 2004-11-11 21:39:35 +03:00
ram@gw.mysql.r18.ru
167c9489fa A fix (bug #6441: Aggregate UDF in multi-table query crashes MySQL when returning multiple rows). 2004-11-06 09:37:30 +04:00
monty@mysql.com
afbe601302 merge with 4.1 2004-10-29 19:26:52 +03:00
monty@mysql.com
6fbc869d18 A lot of fixes for prepared statements (PS):
New mysqltest that can run mysqltest with PS
Added support for ZEROFILL in PS
Fixed crash when one called mysql_stmt_store_result() without a preceding mysql_stmt_bind_result()
Updated test cases to support --ps-protocol
(Some tests are still run using old protocol)
Fixed crash in PS when using SELECT * FROM t1 NATURAL JOIN t2...
Fixed crash in PS when using sub queries
Create table didn't signal when table was created. This could cause a "DROP TABLE created_table" in another thread to wait "forever"
Fixed wrong permissions check in PS and multi-table updates (one could get permission denied for legal quries)
Fix for PS and SELECT ... PROCEDURE
Reset all warnings when executing a new PS query
group_concat(...ORDER BY) didn't work with PS
Fixed problem with test suite when not using innodb
2004-10-26 19:30:01 +03:00
bell@sanja.is.com.ua
b2d9799b54 args_copy and cleunup() removed from Item_sum
registration changing ITEM_SUM arguments added
2004-10-09 01:01:19 +03:00
monty@mysql.com
31122efde7 Merge with 4.1
(Includes merge of arena code in 4.1 and 5.0)
2004-09-06 15:14:10 +03:00
konstantin@mysql.com
568c6e8526 Fix for bug#4912 "mysqld crashs in case a statement is executed
a second time". The bug was caused by incompatibility of
negations elimination algorithm and PS: during first statement 
execute a subtree with negation was replaced with equivalent 
subtree without NOTs.
The problem was that although this transformation was permanent, 
items of the new subtree were created in execute-local memory.
The patch adds means to check if it is the first execute of a
prepared statement, and if this is the case, to allocate items
in memory of the prepared statement.
The implementation:
- backports Item_arena from 5.0
- adds Item_arena::is_stmt_prepare(), 
  Item_arena::is_first_stmt_execute().
- deletes THD::allocate_temporary_pool_for_ps_preparing(),
  THD::free_temporary_pool_for_ps_preparing(); they
  were redundant.
and adds a few invariants:
- thd->free_list never contains junk (= freed items)
- thd->current_arena is never null. If there is no
  prepared statement, it points at the thd. 
The rest of the patch contains mainly mechanical changes and
cleanups.
2004-08-21 02:02:46 +04:00
serg@serg.mylan
e1237cbc53 manually merged 2004-08-18 19:57:55 +02:00
serg@serg.mylan
22ca5582d0 BUG#4393, BUG#4356 - incorrect decimals in fix_length_and_dec() in some functions 2004-07-31 22:39:10 +02:00
monty@mysql.com
1e31199995 Merge with 4.1.3-beta 2004-07-07 11:29:39 +03:00
ram@gw.mysql.r18.ru
5647996784 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into gw.mysql.r18.ru:/usr/home/ram/work/4.1.b4035
2004-06-15 16:03:16 +05:00
bell@sanja.is.com.ua
ba82b9e7d5 cleunup() of count() and max()/min() added (BUG#2687) 2004-06-10 10:59:55 +03:00
ram@gw.mysql.r18.ru
71eee450e0 a fix
(Bug #4035 GROUP_CONCAT with HAVING clause truncates field                       
Bug #4057 LEFT() function in HAVING clause truncates query result).
2004-06-08 18:01:15 +05:00
pem@mysql.com
71eddc362e Merging 4.1 to 5.0. 2004-05-26 17:04:45 +02:00
bell@sanja.is.com.ua
c7396f8d20 PS and SP made compatible in mechanism used for preparing query for rexecutions (Bug #2266) 2004-05-20 02:02:49 +03:00
bell@sanja.is.com.ua
d2fa79b291 keep old engine & JOIN if we changed subquery Item (Bug #3646) 2004-05-07 23:06:11 +03:00
pem@mysql.com
bf45960eef Merge 4.1 -> 5.0 2004-05-07 18:52:06 +02:00
monty@mysql.com
939ea71ecd Portability fixes
Change strtoll -> my_strtoll10()
Fixed bug in my_strntoul() and my_strntol() where we got different values on 32 and 64 bit systems (Bug #3472)
2004-05-07 01:43:17 +03:00
ram@gw.mysql.r18.ru
949c01bfa2 a fix (Bug #3435: STDDEV|VARIANCE(constant) returns constant if no rows) 2004-05-05 16:06:01 +05:00
monty@mishka.local
21fd1d270e Merge with 4.0 2004-04-26 15:53:31 +03:00
ram@gw.mysql.r18.ru
c8937dbcb7 A fix. (Bug #3376: AVG(constant) returns constant if no rows in result set) 2004-04-09 19:07:39 +05:00