summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge from mysql-5.5-bugteam to mysql-5.5-runtimeJon Olav Hauglid2010-11-171-3/+3
|\ | | | | | | No conflicts
| * Merge of mysql-5.1-bugteam into mysql-5.5-bugteam.Davi Arnaut2010-11-161-3/+3
| |\
| | * Bug#58057: 5.1 libmysql/libmysql.c unused variable/compile failureDavi Arnaut2010-11-101-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug#57995: Compiler flag change build error on OSX 10.4: my_getncpus.c Bug#57996: Compiler flag change build error on OSX 10.5 : bind.c Bug#57994: Compiler flag change build error : my_redel.c Bug#57993: Compiler flag change build error on FreeBsd 7.0 : regexec.c Bug#57992: Compiler flag change build error on FreeBsd : mf_keycache.c Bug#57997: Compiler flag change build error on OSX 10.6: debug_sync.cc Fix assorted compiler generated warnings.
* | | Merge from mysql-5.5-bugteam to mysql-5.5-runtimeJon Olav Hauglid2010-11-161-0/+250
|\ \ \ | |/ / | | | | | | No conflicts
| * | Fix for Bug#56934 (mysql_stmt_fetch() incorrectly fills MYSQL_TIMEAlexander Nozdrin2010-11-131-0/+250
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | structure buffer). This is a follow-up for WL#4435. The bug actually existed not only MYSQL_TYPE_DATETIME type. The problem was that Item_param::set_value() was written in an assumption that it's working with expressions, i.e. with basic data types. There are two different quick fixes here: a) Change Item_param::make_field() -- remove setting of Send_field::length, Send_field::charsetnr, Send_field::flags and Send_field::type. That would lead to marshalling all data using basic types to the client (MYSQL_TYPE_LONGLONG, MYSQL_TYPE_DOUBLE, MYSQL_TYPE_STRING and MYSQL_TYPE_NEWDECIMAL). In particular, that means, DATETIME would be sent as MYSQL_TYPE_STRING, TINYINT -- as MYSQL_TYPE_LONGLONG, etc. That could be Ok for the client, because the client library does reverse conversion automatically (the client program would see DATETIME as MYSQL_TIME object). However, there is a problem with metadata -- the metadata would be wrong (misleading): it would say that DATETIME is marshaled as MYSQL_TYPE_DATETIME, not as MYSQL_TYPE_STRING. b) Set Item_param::param_type properly to actual underlying field type. That would lead to double conversion inside the server: for example, MYSQL_TIME-object would be converted into STRING-object (in Item_param::set_value()), and then converted back to MYSQL_TIME-object (in Item_param::send()). The data however would be marshalled more properly, and also metadata would be correct. This patch implements b). There is also a possibility to avoid double conversion either by clonning the data field, or by storing a reference to it and using it on Item::send() time. That requires more work and might be done later.
* | | Implement a fix for Bug#57058 -- send SERVER_QUERY_WAS_SLOW overKonstantin Osipov2010-11-121-1/+41
|/ / | | | | | | | | | | | | | | | | | | | | network when a query was slow. When a query is slow, sent a special flag to the client indicating this fact. Add a test case. Implement review comments.
* | mergeGeorgi Kodinov2010-10-041-0/+102
|\ \
| * \ Auto-merge from mysql-5.1-bugteam.Dmitry Shulga2010-09-071-0/+102
| |\ \ | | |/
| | * Fixed bug #47485 - mysql_store_result returns a not NULL result setDmitry Shulga2010-09-071-0/+102
| | | | | | | | | for a prepared statement.
* | | merge of mysql-5.5 into mysql-5.5-wl1054Georgi Kodinov2010-09-201-10/+39
|\ \ \ | |/ /
| * | Auto-merge from mysql-5.5.Alexander Nozdrin2010-08-161-2/+2
| |\ \
| * \ \ Auto-merge from mysql-5.5.Alexander Nozdrin2010-08-042-223/+14
| |\ \ \
| * \ \ \ Merge of mysql-5.1-bugteam into mysql-trunk-merge.Davi Arnaut2010-07-301-10/+39
| |\ \ \ \ | | | |_|/ | | |/| |
| | * | | Bug#54041: MySQL 5.0.92 fails when tests from Connector/C suite runDavi Arnaut2010-07-301-10/+39
| | | | | | | | | | | | | | | | | | | | | | | | | Fix a regression (due to a typo) which caused spurious incorrect argument errors for long data stream parameters if all forms of logging were disabled (binary, general and slow logs).
* | | | | merged mysql-5.5 into WL1054-5.5Georgi Kodinov2010-08-161-2/+2
|\ \ \ \ \ | | |_|_|/ | |/| | |
| * | | | Patch for Bug#55854 (MySQL AB should not be AUTHOR, copyright incorrect).Alexander Nozdrin2010-08-121-2/+2
| | |_|/ | |/| | | | | | Fixing copyright text.
* | | | WL#1054: Pluggable authentication supportGeorgi Kodinov2010-08-091-0/+1
|/ / / | | | | | | | | | Merged the implementation to a new base tree.
* | | Bug#42733: Type-punning warnings when compiling MySQLDavi Arnaut2010-07-241-14/+14
| | | | | | | | | | | | Post-merge fix: remove remaining casts which are now unnecessary and are actually causing warnings.
* | | WL#5498: Remove dead and unused source codeDavi Arnaut2010-07-231-209/+0
|/ / | | | | Remove code that has been disabled for a long time.
* | Merge of mysql-trunk-bugfixing into mysql-trunk-merge.Davi Arnaut2010-07-152-3/+3
|\ \
| * | Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabledDavi Arnaut2010-07-082-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Essentially, the problem is that safemalloc is excruciatingly slow as it checks all allocated blocks for overrun at each memory management primitive, yielding a almost exponential slowdown for the memory management functions (malloc, realloc, free). The overrun check basically consists of verifying some bytes of a block for certain magic keys, which catches some simple forms of overrun. Another minor problem is violation of aliasing rules and that its own internal list of blocks is prone to corruption. Another issue with safemalloc is rather the maintenance cost as the tool has a significant impact on the server code. Given the magnitude of memory debuggers available nowadays, especially those that are provided with the platform malloc implementation, maintenance of a in-house and largely obsolete memory debugger becomes a burden that is not worth the effort due to its slowness and lack of support for detecting more common forms of heap corruption. Since there are third-party tools that can provide the same functionality at a lower or comparable performance cost, the solution is to simply remove safemalloc. Third-party tools can provide the same functionality at a lower or comparable performance cost. The removal of safemalloc also allows a simplification of the malloc wrappers, removing quite a bit of kludge: redefinition of my_malloc, my_free and the removal of the unused second argument of my_free. Since free() always check whether the supplied pointer is null, redudant checks are also removed. Also, this patch adds unit testing for my_malloc and moves my_realloc implementation into the same file as the other memory allocation primitives.
* | | Merge of mysql-5.1-bugteam into mysql-trunk-merge.Davi Arnaut2010-07-091-13/+13
|\ \ \ | | |/ | |/|
| * | Bug#45288: pb2 returns a lot of compilation warnings on linuxDavi Arnaut2010-07-091-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | Although the C standard mandates that sprintf return the number of bytes written, some very ancient systems (i.e. SunOS 4) returned a pointer to the buffer instead. Since these systems are not supported anymore and are hopefully long dead by now, simply remove the portability wrapper that dealt with this discrepancy. The autoconf check was causing trouble with GCC.
| * | Bug#53445: Build with -Wall and fix warnings that it generatesDavi Arnaut2010-07-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apart strict-aliasing warnings, fix the remaining warnings generated by GCC 4.4.4 -Wall and -Wextra flags. One major source of warnings was the in-house function my_bcmp which (unconventionally) took pointers to unsigned characters as the byte sequences to be compared. Since my_bcmp and bcmp are deprecated functions whose only difference with memcmp is the return value, every use of the function is replaced with memcmp as the special return value wasn't actually being used by any caller. There were also various other warnings, mostly due to type mismatches, missing return values, missing prototypes, dead code (unreachable) and ignored return values.
* | | Unset the execute bit where it's not needed.Davi Arnaut2010-07-031-0/+0
| | |
* | | Merge of mysql-5.1-bugteam into mysql-trunk-merge.Davi Arnaut2010-06-281-0/+58
|\ \ \ | |/ / | | / | |/ |/|
| * Merge of mysql-5.0-bugteam into mysql-5.1-bugteam.Davi Arnaut2010-06-281-0/+58
| |\
| | * Bug#54041: MySQL 5.0.92 fails when tests from Connector/C suite runDavi Arnaut2010-06-281-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was that a user could supply supply data in chunks via the COM_STMT_SEND_LONG_DATA command to prepared statement parameter other than of type TEXT or BLOB. This posed a problem since other parameter types aren't setup to handle long data, which would lead to a crash when attempting to use the supplied data. Given that long data can be supplied at any stage of a prepared statement, coupled with the fact that the type of a parameter marker might change between consecutive executions, the solution is to validate at execution time each parameter marker for which a data stream was provided. If the parameter type is not TEXT or BLOB (that is, if the type is not able to handle a data stream), a error is returned.
* | | mergeDaniel Fischer2010-06-181-1/+1
|\ \ \
| * \ \ MergeDaniel Fischer2010-04-213-3/+169
| |\ \ \
| * | | | Fix a couple fo things replated to MSIVladislav Vaintroub2010-02-161-1/+1
| | | | |
* | | | | Merge of mysql-5.1-bugteam into mysql-trunk-merge.Davi Arnaut2010-06-101-17/+16
|\ \ \ \ \ | | |_|/ / | |/| | |
| * | | | Bug#42733: Type-punning warnings when compiling MySQL --Davi Arnaut2010-06-101-17/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | strict aliasing violations. Essentially, the problem is that large parts of the server were developed in simpler times (last decades, pre C99 standard) when strict aliasing and compilers supporting such optimizations were rare to non-existent. Thus, when compiling the server with a modern compiler that uses strict aliasing rules to perform optimizations, there are several places in the code that might trigger undefined behavior. As evinced by some recent bugs, GCC does a somewhat good of job misoptimizing such code, but on the other hand also gives warnings about suspicious code. One problem is that the warnings aren't always accurate, yet we can't afford to just shut them off as we might miss real cases. False-positive cases are aggravated mostly by casts that are likely to trigger undefined behavior. The solution is to start a cleanup process focused on fixing and reducing the amount of strict-aliasing related warnings produced by GCC and others compilers. A good deal of noise reduction can be achieved by just removing useless casts that are product of historical cruft and are likely to trigger undefined behavior if dereferenced.
| * | | | Manual merge.Ramil Kalimullin2010-05-251-0/+38
| |\ \ \ \ | | | |_|/ | | |/| |
| | * | | Fix for bug #53907: Table dump command can be abused to dump arbitrary tables.Ramil Kalimullin2010-05-251-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: one with SELECT privilege on some table may dump other table performing COM_TABLE_DUMP command due to missed check of the table name. Fix: check the table name.
* | | | | Manual merge from mysql-trunk.Alexander Nozdrin2010-05-201-3/+0
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: - mysql-test/r/partition.result - mysql-test/r/variables_debug.result - mysql-test/t/partition.test - mysql-test/t/variables_debug.test
| * | | | | Another incarnation of the patch for Bug#30708Alexander Nozdrin2010-05-191-3/+0
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (make relies GNU extentions). The patch was partially backport from 6.0. Original comment: bug#30708: make relies GNU extensions. Now that we no longer use BitKeeper we can safely remove the SCCS handling with no loss of functionality.
* | | | | Manual merge from mysql-5.1-bugteam to mysql-trunk-merge.Alexey Kopytov2010-05-111-0/+82
|\ \ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | | | | | | Conflicts: Text conflict in tests/mysql_client_test.c
| * | | | Using an initial command with mysql_options(..., MYSQL_INIT_COMMAND, ...)Jim Winstead2010-05-091-0/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that generated multiple result sets (such as a stored procedure or a multi-statement command) would leave the connection unusable. (Bug #42373) A side-effect of this bug fix is to make MYSQL_INIT_COMMAND settings ignored when connecting from within the server, but none of the existing mechanisms for connecting from within the server use or need to set the initial command.
* | | | | Manual merge of mysql-5.1-bugteam to mysql-trunk-merge.Alexey Kopytov2010-05-091-0/+45
|\ \ \ \ \ | |/ / / / | | / / / | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | Conflicts: Text conflict in mysql-test/r/grant.result Text conflict in mysql-test/t/grant.test Text conflict in mysys/mf_loadpath.c Text conflict in sql/slave.cc Text conflict in sql/sql_priv.h
| * | | Bug #53371: COM_FIELD_LIST can be abused to bypass table level grants.Georgi Kodinov2010-05-041-0/+45
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the 5.1 merge and extension of the fix. The server was happily accepting paths in table name in all places a table name is accepted (e.g. a SELECT). This allowed all users that have some privilege over some database to read all tables in all databases in all mysql server instances that the server file system has access to. Fixed by : 1. making sure no path elements are allowed in quoted table name when constructing the path (note that the path symbols are still valid in table names when they're properly escaped by the server). 2. checking the #mysql50# prefixed names the same way they're checked for path elements in mysql-5.0.
| | * | Bug #53371: COM_FIELD_LIST can be abused to bypass table level grants.Georgi Kodinov2010-05-031-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The server was not checking the supplied to COM_FIELD_LIST table name for validity and compliance to acceptable table names standards. Fixed by checking the table name for compliance similar to how it's normally checked by the parser and returning an error message if it's not compliant.
* | | | A fix for Bug#49972 "Crash in prepared statements": Konstantin Osipov2010-03-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is introduced by WL#4435 "Support OUT-parameters in prepared statements". When a statement that has out parameters was reprepared, the reprepare request error was ignored, and an attempt to send out parameters to the client was made. Since the out parameter list was not initialized in case of an error, this attempt led to a crash. Don't try to send out parameters to the client if an error occurred in statement execution.
* | | | A follow-up on WL#5154 and WL#5182: remove forgotten options.Alexander Nozdrin2010-03-033-3/+3
| | | |
* | | | mergeVladislav Vaintroub2010-02-161-0/+166
|\ \ \ \ | |_|_|/ |/| | |
| * | | Merge next-mr -> next-4284.Konstantin Osipov2010-02-041-1/+1
| |\ \ \
| * \ \ \ Merge next-mr -> next-4284.Konstantin Osipov2010-02-031-3/+3
| |\ \ \ \
| * \ \ \ \ Merge next-mr -> next-4284. Konstantin Osipov2010-02-021-1/+1
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix Bug#50555 "handler commands crash server in my_hash_first()" as a post-merge fix (the new handler tests are not passing otherwise). - in hash.c, don't call calc_hash if ! my_hash_inited(). - add tests and results for the test case for Bug#50555
| * \ \ \ \ \ Merge next-mr -> next-4284.Konstantin Osipov2010-02-021-2/+0
| |\ \ \ \ \ \
| * | | | | | | Disable test case for Bug#49972.Alexander Nozdrin2009-12-291-1/+1
| | | | | | | |