Commit graph

28 commits

Author SHA1 Message Date
Sergey Glukhov
d9d71d0f50 Bug#46184 Crash, SELECT ... FROM derived table procedure analyze
The crash happens because select_union object is used as result set
for queries which have derived tables.
select_union use temporary table as data storage and if
fields count exceeds 10(count of values for procedure ANALYSE())
then we get a crash on fill_record() function.
2009-08-27 15:22:19 +05:00
gkodinov/kgeorge@magare.gmz
a5b04a3ba9 Bug #28492: subselect returns LONG in >5.0.24a and LONGLONG in <=5.0.24a
Integer values with 10 digits may or may not fit into an int column 
(e.g. 2147483647 vs 6147483647).
Thus when creating a temp table column for such an int we must
use bigint instead.
Fixed to use bigint.
Also subsituted a "magic number" with a named constant.
2007-05-30 09:55:38 +03:00
iggy@rolltop.ignatz42.dyndns.org
d36444a9ec Merge rolltop.ignatz42.dyndns.org:/mnt/storeage/bug20305/my41-bug20305
into  rolltop.ignatz42.dyndns.org:/mnt/storeage/bug20305/my50-bug20305
2006-09-28 14:32:30 -04:00
iggy@rolltop.ignatz42.dyndns.org
f063bee3b2 Bug#20305: PROCEDURE ANALYSE() returns wrong M for FLOAT(M, D) and DOUBLE(M, D) 2006-09-28 14:30:20 -04:00
igor@olga.mysql.com
f608064083 Fixed bug #19714.
DESCRIBE returned the type BIGINT for a column of a view if the column
was specified by an expression over values of the type INT.
    
E.g. for the view defined as follows:
  CREATE VIEW v1 SELECT COALESCE(f1,f2) FROM t1
DESCRIBE returned type BIGINT for the only column of the view if f1,f2 are
columns of the INT type.
At the same time DESCRIBE returned type INT for the only column of the table
defined by the statement:
  CREATE TABLE t2 SELECT COALESCE(f1,f2) FROM t1.
    
This inconsistency was removed by the patch.

Now the code chooses between INT/BIGINT depending on the
precision of the aggregated column type.
 
Thus both DESCRIBE commands above returns type INT for v1 and t2.
2006-07-13 20:48:26 -07:00
hf@deer.(none)
f3502cd983 Additional fix for bug #14445 (analyse.test fails) 2005-11-01 16:14:26 +04:00
hf@deer.(none)
b98c93e0a8 Fix for bug #14445 (analyse.test fails) 2005-11-01 13:08:14 +04:00
evgen@moonbone.local
ddea0b44e3 Manually merged 2005-10-28 23:17:51 +04:00
evgen@moonbone.local
cc5d7c0715 Fix bug #14138 ROLLUP and PROCEDURE ANALYSE() hang server
Procedure analyse() redefines select's fields_list. setup_copy_fields() assumes
that fields_list is a part of all_fields_list. Because select have only 
3 columns and analyse() redefines it to have 10 columns, int overrun in
setup_copy_fields() occurs and server goes to almost infinite loop.

Because fields_list used not only to send data ad fields types, it's wrong 
to allow procedure redefine it. This patch separates select's fileds_list 
and procedure's one. Now if procedure is present, copy of fields_list is 
created in procedure_fields_list and it is used for sending data and fields.
2005-10-28 15:24:46 +04:00
jani@a193-229-222-105.elisa-laajakaista.fi
afb613bd8e Merged from 4.1 2005-09-11 22:10:04 +03:00
jani@a193-229-222-105.elisa-laajakaista.fi
ac95c9096b Fixed Bug#10716, Procedure Analyse results in wrong values for optimal field type
Added test case.
2005-09-09 20:02:13 +03:00
hf@deer.(none)
803ed1a116 Tests modified to coved decimal-related code 2005-02-21 19:20:05 +04:00
bar@mysql.com
05204a9b3c After-merge clean-up 2005-01-18 22:12:33 +04:00
bar@mysql.com
8cfe729678 1. Item now uses my_charset_bin by default,
not default_charset_into. It fixes the
problem that in some cases numbers where
treated as CHAR(N), not as BINARY(N), e.g.
wrong 'charsetnr' when sent to the client side.
2. IFNULL didn't aggregate argument charsets
and collations, so IFNULL(1,'a') produced
a CHAR(N). Now produces a BINARY(N).
3. SELECT PROCEDURE ANALIZE now returns
BINARY columns, which is much better than it worked
previously: CHAR with the default character set.
But in the future it's worth to fix the fields
'Field_name' and 'Optimal_fieldtype' to use UTF8,
and 'Min_value' and 'Max_value' to inherit their charsets
from the original items. But it is not important,
and BINARY(N) is OK for now.
4. Tests were fixed accordingly. No new tests were
made, as the old onces cover everything.
2005-01-18 17:41:06 +04:00
joreland@mysql.com
953df8f48d Merge mysql.com:/home/jonas/src/mysql-4.1
into mysql.com:/home/jonas/src/mysql-5.0
2005-01-12 11:24:46 +01:00
jani@ua141d10.elisa.omakaista.fi
fd79354273 Fixed Bug#2813, "analyse does not quot string values in enams from string". 2005-01-11 19:40:33 +02:00
monty@mysql.com
563500994a Update results for new varchar handling
Fixed compiler warnings
String results in CREATE ... SELECT are now created as CHAR(0), VARCHAR(X) or TEXT() depending on item->max_length
2004-12-07 15:47:00 +02:00
monty@mysql.com
59ddd8c738 Fix to handle unsigned data in prepared statements (Bug #3447)
Fixed security problem that password was temporarly reset when someone changed GRANT for a user. (Bug #3404)
Fixed problem with PROCEDURE analyse() and impossible WHERE (Bug #2238)
Don't auto-repair tables in mysqlcheck if table type doesn't support 'check' command.
2004-05-04 15:02:38 +03:00
monty@narttu.mysql.fi
23145cfed7 Added SQLSTATE to client/server protocol
bmove_allign -> bmove_align
Added OLAP function ROLLUP
Split mysql_fix_privilege_tables to a script and a .sql data file
Added new (MEMROOT*) functions to avoid calling current_thd() when creating some common objects.
Added table_alias_charset, for easier --lower-case-table-name handling
Better SQL_MODE handling (Setting complex options also sets sub options)
New (faster) assembler string functions for x86
2003-06-04 18:28:51 +03:00
monty@narttu.mysql.fi
e7288f279e After merge fixes
Don't create temporary objects with no table name
2003-03-17 15:05:04 +02:00
serg@serg.mysql.com
335f013161 select count(*) from t1 procedure analyse(); bug fixed 2003-01-27 15:37:05 +01:00
Sinisa@sinisa.nasamreza.org
3772d5ff60 Fixex for some crashing bug 2003-01-10 17:36:59 +02:00
bell@sanja.is.com.ua
fccf8e74f1 fixed test result 2002-12-15 10:23:55 +02:00
Sinisa@sinisa.nasamreza.org
a918a6a7a9 derived tables with UNION's ...
Scrum task !!!!!
2002-12-12 16:09:06 +02:00
Sinisa@sinisa.nasamreza.org
a072ff3f9c small error in result 2002-12-05 22:57:22 +02:00
Sinisa@sinisa.nasamreza.org
df07c4d8ea Fix for few PROCEDURE bugs ... 2002-12-05 21:51:22 +02:00
sasha@mysql.sashanet.com
bb66c80aeb client/mysqlmanagerc.c
added support for quiet
    increased line buffer size
client/mysqltest.c
    fixed memory leak
    added query logging to result file
    added error message logging to result file
    added enable_query_log/disable_query_log
mysql-test/mysql-test-run.sh
    converted tests to use mysqlmanager

Updated test results
2001-09-27 23:05:54 -06:00
monty@donna.mysql.com
c0f40d14cc Added support for hex strings to mysqlimport
A lot of new tests to mysqltest
Fixed bug with BDB tables and autocommit
2000-12-28 03:56:38 +02:00