Commit graph

101 commits

Author SHA1 Message Date
Mats Kindahl
e409d6f69c WL#5030: Split and remove mysql_priv.h
This patch:

- Moves all definitions from the mysql_priv.h file into
  header files for the component where the variable is
  defined
- Creates header files if the component lacks one
- Eliminates all include directives from mysql_priv.h
- Eliminates all circular include cycles
- Rename time.cc to sql_time.cc
- Rename mysql_priv.h to sql_priv.h
2010-03-31 16:05:33 +02:00
Mattias Jonsson
e23222c6e1 merge 2010-02-10 11:08:39 +01:00
Mattias Jonsson
84c205f9ee Bug#50201: Server crashes in explain_filename on an InnoDB partitioned table
Problem was that in mysql-trunk the ER() macro is now dependent on current_thd
and the innodb monitor thread has no binding to that thd object. This cause 
the crash because of bad derefencing.

Solution was to add a new macro which take the thd as an argument (which the innodb
thread uses for the call).

(Updated according to reviewers comments, i.e. added ER_THD_OR_DEFAULT and
moved test to suite parts.)
2010-02-10 10:47:14 +01:00
Sergey Glukhov
8b36b965c5 backported:
-WL#2822 INFORMATION_SCHEMA.ROUTINES: Add missing columns
-WL#2003 INFORMATION_SCHEMA: PARAMETERS view
-addon for 'I_S optimization' WL
2010-01-15 15:42:15 +04:00
Alexey Kopytov
85d5a08b51 Manual merge of WL#4738 from mysql-next-mr:
- backported code that handles %f/%g arguments in 
my_vsnprintf.c from 6.0 
- backported %f/%g tests in unittest/mysys/my_vsnprintf-t.c 
from 6.0 
- replaced snprintf("%g") in sql/set_var.cc with my_gcvt() 
- removed unnecessary "--replace-result"s for Windows in 
mysql-test/suite/sys_vars/t/long_query_time_basic.test 
- some test results adjustments
2009-12-28 15:54:16 +03:00
Alexey Kopytov
f02525be83 Backport of WL #2934: Make/find library for doing float/double
to string conversions and vice versa" 
Initial import of the dtoa.c code and custom wrappers around it 
to allow its usage from the server code. 
 
Conversion of FLOAT/DOUBLE values to DECIMAL ones or strings 
and vice versa has been significantly reworked. As the new 
algoritms are more precise than the older ones, results of such 
conversions may not always match those obtained from older 
server versions. This in turn may break compatibility for some 
applications. 
 
This patch also fixes the following bugs: 
- bug #12860 "Difference in zero padding of exponent between 
Unix and Windows" 
- bug #21497 "DOUBLE truncated to unusable value" 
- bug #26788 "mysqld (debug) aborts when inserting specific 
numbers into char fields" 
- bug #24541 "Data truncated..." on decimal type columns 
without any good reason"
2009-12-22 19:23:13 +03:00
Sergei Golubchik
ae2768ce9c WL#4738 streamline/simplify @@variable creation process
Bug#16565 mysqld --help --verbose does not order variablesBug#20413 sql_slave_skip_counter is not shown in show variables
Bug#20415 Output of mysqld --help --verbose is incomplete
Bug#25430 variable not found in SELECT @@global.ft_max_word_len;
Bug#32902 plugin variables don't know their names
Bug#34599 MySQLD Option and Variable Reference need to be consistent in formatting!
Bug#34829 No default value for variable and setting default does not raise error
Bug#34834 ? Is accepted as a valid sql mode
Bug#34878 Few variables have default value according to documentation but error occurs  
Bug#34883 ft_boolean_syntax cant be assigned from user variable to global var.
Bug#37187 `INFORMATION_SCHEMA`.`GLOBAL_VARIABLES`: inconsistent status
Bug#40988 log_output_basic.test succeeded though syntactically false.
Bug#41010 enum-style command-line options are not honoured (maria.maria-recover fails)
Bug#42103 Setting key_buffer_size to a negative value may lead to very large allocations 
Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled
Bug#44797 plugins w/o command-line options have no disabling option in --help
Bug#46314 string system variables don't support expressions
Bug#46470 sys_vars.max_binlog_cache_size_basic_32 is broken
Bug#46586 When using the plugin interface the type "set" for options caused a crash.
Bug#47212 Crash in DBUG_PRINT in mysqltest.cc when trying to print octal number
Bug#48758 mysqltest crashes on sys_vars.collation_server_basic in gcov builds
Bug#49417 some complaints about mysqld --help --verbose output
Bug#49540 DEFAULT value of binlog_format isn't the default value
Bug#49640 ambiguous option '--skip-skip-myisam' (double skip prefix)
Bug#49644 init_connect and \0
Bug#49645 init_slave and multi-byte characters
Bug#49646 mysql --show-warnings crashes when server dies
2009-12-22 10:35:56 +01:00
Konstantin Osipov
7edfae4e86 Backport of:
-------------------------------------------------------------
revno: 2877
committer: Davi Arnaut <Davi.Arnaut@Sun.COM>
branch nick: 35164-6.0
timestamp: Wed 2008-10-15 19:53:18 -0300
message:
Bug#35164: Large number of invalid pthread_attr_setschedparam calls
Bug#37536: Thread scheduling causes performance degradation at low thread count
Bug#12702: Long queries take 100% of CPU and freeze other applications under Windows

The problem is that although having threads with different priorities
yields marginal improvements [1] in some platforms [2], relying on some
statically defined priorities (QUERY_PRIOR and WAIT_PRIOR) to play well
(or to work at all) with different scheduling practices and disciplines
is, at best, a shot in the dark as the meaning of priority values may
change depending on the scheduling policy set for the process.

Another problem is that increasing priorities can hurt other concurrent
(running on the same hardware) applications (such as AMP) by causing
starvation problems as MySQL threads will successively preempt lower
priority processes. This can be evidenced by Bug#12702.

The solution is to not change the threads priorities and rely on the
system scheduler to perform its job. This also enables a system admin
to increase or decrease the scheduling priority of the MySQL process,
if intended.

Furthermore, the internal wrappers and code for changing the priority
of threads is being removed as they are now unused and ancient.

1. Due to unintentional side effects. On Solaris this could artificially
help benchmarks as calling the priority changing syscall millions of
times is more beneficial than the actual setting of the priority.

2. Where it actually works. It has never worked on Linux as the default
scheduling policy SCHED_OTHER only accepts the static priority 0.
2009-11-23 19:57:31 +03:00
Luis Soares
58e2fde011 manual merge: mysql-5.1-rep+2-delivery1 --> mysql-5.1-rpl-merge
Conflicts
=========

Text conflict in .bzr-mysql/default.conf
Text conflict in libmysqld/CMakeLists.txt
Text conflict in libmysqld/Makefile.am
Text conflict in mysql-test/collections/default.experimental
Text conflict in mysql-test/extra/rpl_tests/rpl_row_sp006.test
Text conflict in mysql-test/suite/binlog/r/binlog_tmp_table.result
Text conflict in mysql-test/suite/rpl/r/rpl_loaddata.result
Text conflict in mysql-test/suite/rpl/r/rpl_loaddata_fatal.result
Text conflict in mysql-test/suite/rpl/r/rpl_row_create_table.result
Text conflict in mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result
Text conflict in mysql-test/suite/rpl/r/rpl_stm_log.result
Text conflict in mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result
Text conflict in mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result
Text conflict in mysql-test/t/mysqlbinlog.test
Text conflict in sql/CMakeLists.txt
Text conflict in sql/Makefile.am
Text conflict in sql/log_event_old.cc
Text conflict in sql/rpl_rli.cc
Text conflict in sql/slave.cc
Text conflict in sql/sql_binlog.cc
Text conflict in sql/sql_lex.h
21 conflicts encountered.

NOTE
====
 mysql-5.1-rpl-merge has been made a mirror of mysql-next-mr:
 - "mysql-5.1-rpl-merge$ bzr pull ../mysql-next-mr"

 This is the first cset (merge/...) committed after pulling 
 from mysql-next-mr.
2009-10-22 23:30:28 +01:00
Sergey Glukhov
7741d9b50d WL#751 Error message construction, backport 2009-10-15 17:23:43 +05:00
Mats Kindahl
4ad8ef0602 WL#5016: Fix header file include guards
Adding header include file guards to files that are missing such.
2009-09-23 23:32:31 +02:00
Ignacio Galarza
8ef28b4962 Auto-merge 2009-07-31 15:28:15 -04:00
Ignacio Galarza
6df2af22ce Bug#17270 - mysql client tool could not find ../share/charsets folder and fails.
- Define and pass compile time path variables as pre-processor definitions to 
  mimic the makefile build.
- Set new CMake version and policy requirements explicitly.
- Changed DATADIR to MYSQL_DATADIR to avoid conflicting definition in 
  Platform SDK header ObjIdl.h which also defines DATADIR.
2009-07-31 15:22:02 -04:00
Sergey Glukhov
515de310f0 Bug#37428 Potential security issue with UDFs - linux shellcode execution.
plugin_dir option backported from 5.1
2008-08-25 17:11:59 +05:00
cmiller@zippy.cornsilk.net
59fc28cfc4 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug15776/my51-bug15776
into  zippy.cornsilk.net:/home/cmiller/work/mysql/bug15776-encore/my51-bug15776-encore
2008-04-09 18:24:50 -04:00
cmiller@zippy.cornsilk.net
cc2f6266c3 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug15776/my50-bug15776
into  zippy.cornsilk.net:/home/cmiller/work/mysql/bug15776/my51-bug15776
2008-04-09 18:09:42 -04:00
cmiller@zippy.cornsilk.net
b506166a0c Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug15776/my50-bug15776
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-build
2008-04-09 12:27:51 -04:00
cmiller@zippy.cornsilk.net
3e2457b71a Follow-up to B-g#15776, test failures on 64-bit linux.
Make maximum blob size to be 2**32-1, regardless of word size.

Fix failure of timestamp with size of 2**31-1.  The method of
rounding up to the nearest even number would overflow.
2008-04-09 12:27:30 -04:00
cmiller@zippy.cornsilk.net
c83c18c058 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug15776/my50-bug15776
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-build
2008-04-02 10:56:49 -04:00
cmiller@zippy.cornsilk.net
a878c1b9c1 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug15776/my50-bug15776
into  zippy.cornsilk.net:/home/cmiller/work/mysql/bug15776/my51-bug15776
2008-03-31 14:32:56 -04:00
joerg@trift2.
e784898959 Merge trift2.:/MySQL/M51/mysql-5.1
into  trift2.:/MySQL/M51/push-5.1
2008-03-14 14:41:08 +01:00
jperkin/jonathan@chorlton.adsl.perkin.org.uk
2ebdd5ea2f Merge bk-internal.mysql.com:/home/bk/mysql-5.1-build
into  chorlton.adsl.perkin.org.uk:/Users/jonathan/mysql/bk/build/5.1
2008-03-06 15:13:14 +00:00
kaa@kaamos.(none)
58240614f7 Merge kaamos.(none):/data/src/opt/bug31236/my51-bug31236
into  kaamos.(none):/data/src/opt/mysql-5.1-opt
2008-02-20 00:37:51 +03:00
kaa@kaamos.(none)
8d222210c7 Fix for bug #31236: Inconsistent division by zero behavior for
floating point numbers

Some math functions did not check if the result is a valid number
(i.e. neither of +-inf or nan).

Fixed by validating the result where necessary and returning NULL in
case of invalid result.
2008-02-20 00:33:43 +03:00
jperkin/jonathan@chorlton.adsl.perkin.org.uk
f988a7e600 Add new pkgplugindir handling to seperate plugins from libraries,
and allow override for binary distributions.  Extend mysql_config
to print compiled-in plugin location for third-party plugins to
use.  Resolves bug#31736.
2007-12-19 13:24:43 +00:00
cmiller@zippy.cornsilk.net
5a19f077b3 Doxygenize comments. 2007-10-16 16:11:50 -04:00
cmiller@zippy.cornsilk.net
3185f0046d Bug#15776: 32-bit signed int used for length of blob
Based on contributed patch from Martin Friebe, CLA from 2007-02-24.

The parser lacked support for field sizes after signed long,
when it should extend to 2**32-1.

Now, we correct that limitation, and also make the error handling
consistent for casts.
2007-08-31 15:24:43 -04:00
joerg@trift2.
20ce606797 Merge trift2.:/MySQL/M51/target-5.1.22
into  trift2.:/MySQL/M51/push-5.1

Includes manual merges.
2007-08-22 16:08:55 +02:00
gshchepa/uchum@gleb.loc
db6ec3f71f Merge gleb.loc:/home/uchum/work/bk/5.1
into  gleb.loc:/home/uchum/work/bk/5.1-opt
2007-08-11 02:00:51 +05:00
gluh@mysql.com/eagle.(none)
926cbe7bf9 fill_schema_table_from_frm() function uses get_table_share() function
which is faster than open_table_def() func.
This patch fixes the porblem with information_schema test timeout.
2007-08-09 19:57:14 +05:00
gluh@mysql.com/eagle.(none)
27ab885525 WL#3732 Information schema optimization 2007-08-03 03:14:05 +05:00
gshchepa/uchum@gleb.loc
d933b0b4a0 Merge gleb.loc:/home/uchum/work/bk/5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.1-opt
2007-08-03 02:15:21 +05:00
gshchepa/uchum@gleb.loc
b63f8f8985 Fixed bug #27352.
The SELECT query with more than 31 nested dependent SELECT queries returned
wrong result.

New error message has been added: ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT.
It will be reported as: "Too high level of nesting for select".
2007-08-03 01:58:21 +05:00
ramil/ram@ramil.myoffice.izhnet.ru
ede22768a9 Merge mysql.com:/home/ram/work/b28808/b28808.5.0
into  mysql.com:/home/ram/work/b28808/b28808.5.1
2007-07-09 10:20:45 +05:00
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
fca06fbc68 Fix for bug #28808: log_queries_not_using_indexes variable dynamic change is ignored
Problem: logging queries not using indexes we check a special flag which 
is set only at the server startup and is not changing with a corresponding
server variable together.

Fix: check the variable value instead of the flag.
2007-07-05 15:34:12 +05:00
malff/marcsql@weblab.(none)
7b55e8b88e Merge weblab.(none):/home/marcsql/TREE/mysql-5.0-runtime
into  weblab.(none):/home/marcsql/TREE/mysql-5.1-rt-merge50
2007-06-11 10:49:26 -06:00
anozdrin/alik@ibm.
bacc6ee071 Fix for BUG#27592: stack overrun when storing datetime value
using prepared statements.
2007-06-07 13:50:22 +04:00
kent@kent-amd64.(none)
58763e383e Merge mysql.com:/home/kent/bk/main/mysql-5.0
into  mysql.com:/home/kent/bk/main/mysql-5.1
2006-12-31 01:32:21 +01:00
kent@mysql.com/kent-amd64.(none)
6523aca729 my_strtoll10-x86.s:
Corrected spelling in copyright text
Makefile.am:
  Don't update the files from BitKeeper
Many files:
  Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header
  Adjusted year(s) in copyright header 
Many files:
  Added GPL copyright text
Removed files:
  Docs/Support/colspec-fix.pl
  Docs/Support/docbook-fixup.pl
  Docs/Support/docbook-prefix.pl
  Docs/Support/docbook-split
  Docs/Support/make-docbook
  Docs/Support/make-makefile
  Docs/Support/test-make-manual
  Docs/Support/test-make-manual-de
  Docs/Support/xwf
2006-12-31 01:02:27 +01:00
kent@kent-amd64.(none)
be15e3bc15 Merge mysql.com:/home/kent/bk/main/mysql-5.0
into  mysql.com:/home/kent/bk/main/mysql-5.1
2006-12-23 20:20:40 +01:00
kent@mysql.com/kent-amd64.(none)
226a5c833f Many files:
Changed header to GPL version 2 only
2006-12-23 20:17:15 +01:00
evgen@sunlight.local
0d6996010c Merge sunlight.local:/local_work/leak_fix_orig
into  sunlight.local:/local_work/leak_fix-5.1-mysql
2006-08-09 02:49:29 +04:00
evgen@sunlight.local
1250b06ac9 sql_base.cc, unireg.h, sql_lex.h, table.cc, sql_view.h, sql_view.cc:
Correct memory leak fix
2006-08-09 00:05:42 +04:00
ingo@mysql.com
b5005d4171 Merge mysql.com:/home/mydev/mysql-5.0-bug10932
into  mysql.com:/home/mydev/mysql-5.1-bug10932
2005-12-06 08:31:38 +01:00
ingo@mysql.com
a588622a66 Merge mysql.com:/home/mydev/mysql-5.0
into  mysql.com:/home/mydev/mysql-5.0-bug10932
2005-12-06 08:19:23 +01:00
ingo@mysql.com
6b18dbef31 Bug#10932 - Building server with key limit of 128, makes test cases fail
Allow for configuration of the maximum number of indexes per table.
Added and used a configure.in macro.
Replaced fixed limits by the configurable limit.
Limited MyISAM indexes to its hard limit.
Fixed a bug in opt_range.cc for many indexes with InnoDB.

Tested for 2, 63, 64, 65, 127, 128, 129, 255, 256, and 257 indexes.
Testing this part of the bugfix requires rebuilding of the server 
with different options. This cannot be done with our test suite. 
Therefore I added the necessary test files to the bug report.
If you repeat the tests, please note that the ps_* tests fail for
everything but 64 indexes. This is because of differences in the 
meta data, namely field lengths for index names etc.
2005-12-02 16:27:18 +01:00
jimw@mysql.com
01ac5172dd Merge mysql.com:/home/jimw/my/mysql-5.0-clean
into  mysql.com:/home/jimw/my/mysql-5.1-clean
2005-12-01 15:14:51 -08:00
jimw@mysql.com
e86048ce59 Enable key lengths of up to 3K on 32-bit platforms. 2005-12-01 11:11:03 -08:00
monty@mysql.com
a3436bd7de Merge mysql.com:/home/my/mysql-5.1
into  mysql.com:/home/my/mysql-5.1-TDC
2005-11-24 04:08:07 +02:00
monty@mysql.com
aa37b75768 Merge mysql.com:/home/my/mysql-5.0
into  mysql.com:/home/my/mysql-5.1
2005-11-24 02:56:12 +02:00