summaryrefslogtreecommitdiff
path: root/mysql-test/r/loaddata.result
Commit message (Collapse)AuthorAgeFilesLines
* Create 'main' test directory and move 't' and 'r' thereMichael Widenius2018-03-291-637/+0
|
* MDEV-15597 Add class Load_data_outvar and avoid using Item::STRING_ITEM for ↵Alexander Barkov2018-03-201-0/+21
| | | | Item_user_var_as_out_param detection
* MDEV-15497 Wrong empty value in a GEOMETRY column on LOAD DATAAlexander Barkov2018-03-071-0/+34
| | | | | | | | | | | | | | - Adding a new virtual method Field::load_data_set_no_data(). - Overriding Field_timestamp::load_data_set_no_data() and moving the TIMESTAMP specific code there. - Overriding Field_geom::load_data_set_no_data() and implementing GEOMETRY specific behavior, to prevent writing empty strings when the loaded file ends unexpectedly. This fixes the bug. - Adding a new test gis-loaddaata.test. - The test in loaddata.test for CHAR was added simply to record behavior. The CHAR data type did not change its behaviour (only GEOMRYRY did). - Additionally, moving duplicate code into a new method Field::load_data_set_value() and reusing it in three places.
* Merge branch '10.1' into 10.2Sergei Golubchik2017-05-091-1/+1
|\ | | | | | | | | Revert commit db0917f68f, because the fix for MDEV-12696 is coming from 5.5 and 10.1 in this merge.
| * Merge branch '10.0' 10.1Sergei Golubchik2017-04-281-1/+1
| |\
| | * Merge branch '5.5' into 10.0Sergei Golubchik2017-04-211-1/+1
| | |\
| | | * Merge remote-tracking branch 'mysql/5.5' into 5.5mariadb-5.5.55Sergei Golubchik2017-04-111-1/+1
| | | |\
| | | | * Bug #24595937: INCORRECT BEHAVIOR WHEN LOADING DATA TO VIEWSreeharsha Ramanavarapu2016-12-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue: ------ While using the LOAD statement to insert data into an updateable view, the check to verify whether a column is actually updatable is missing. Solution for 5.5 and 5.6: ------------------------- For a view whose column-list in specified in the LOAD command, this check is not performed. This fix adds the check. This is a partial backport of Bug#21097485. Solution for 5.7 and trunk: --------------------------- For a view whose column-list is specified in the LOAD command, this check is already performed. This fix adds the same check when no column-list is specified.
* | | | | Merge branch 'bb-10.2-serg-merge' into 10.2Sergei Golubchik2017-02-111-30/+17
|\ \ \ \ \
| * \ \ \ \ Merge branch '10.1' into 10.2Sergei Golubchik2017-02-101-30/+17
| |\ \ \ \ \ | | |/ / / /
| | * | | | Merge branch '10.0' into 10.1Vicențiu Ciorbaru2017-01-161-24/+17
| | |\ \ \ \ | | | |/ / /
| | | * | | Merge remote-tracking branch 'origin/5.5' into 10.0Vicențiu Ciorbaru2017-01-101-0/+18
| | | |\ \ \ | | | | |/ /
| | | | * | Adding LOAD DATA tests for MDEV-11079 and MDEV-11631Alexander Barkov2017-01-091-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c3cf7f47f0f4a1ec314001aaf0c3d9c1c1f62097 reverted the patch for BUG#24487120. After merging the reverting patch from MySQL to MariaDB the problems described in MDEV-11079 and MDEV-11631 disappeared. Adding test cases only.
| | | * | | Merge remote-tracking branch 'origin/5.5' into 10.0vicentiu2017-01-061-26/+1
| | | |\ \ \ | | | | |/ /
| | | | * | Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2016-12-221-25/+1
| | | | |\ \ | | | | | |/
| | | | | * BUG#24487120 - SLAVE'S SLAVE_SQL_RUNNING IS STOPPED DURINGThayumanavar S2016-10-281-25/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LOAD DATA AT MASTER. Revert "BUG#23080148 - BACKPORT BUG 14653594 AND BUG 20683959 TO" This reverts commit 1d31f5b3090d129382b50b95512f2f79305715a1. The commit causes replication incompatibility between minor revisions and based on discussion with Srinivasarao, the patch is reverted.
| | * | | | Merge branch '10.0' into 10.1Sergei Golubchik2016-12-111-1/+2
| | |\ \ \ \ | | | |/ / /
| | | * | | MDEV-11343 LOAD DATA INFILE fails to load data with an escape character ↵Alexander Barkov2016-11-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | followed by a multi-byte character Partially backporting MDEV-9874 from 10.2 to 10.0 READ_INFO::read_field() raised the ER_INVALID_CHARACTER_STRING error when reading an escape character followed by a multi-byte character. Raising wellformedness errors in READ_INFO::read_field() was wrong, because the main goal of READ_INFO::read_field() is to *unescape* the data which was presumably escaped using mysql_real_escape_string(), using the same character set with the one specified in "LOAD DATA INFILE ... CHARACTER SET ..." (or assumed by default). During LOAD DATA, multi-byte characters are not always scanned as a single entity! In case of escaped data, parts of a multi-byte character can be scanned on different loop iterations. So the old code erroneously tested welformedness in the middle of a multi-byte character. Moreover, the data after unescaping can go into a BLOB field, not a text field. Wellformedness tests are meaningless in this case. Ater this patch, wellformedness is only checked later, during Field::store(str,length,cs) time. The loop that scans bytes only makes sure to revert the changes made by mysql_real_escape_string(). Note, in some cases users can supply data which did not really go through mysql_real_escape_string() and was escaped by some other means, or was not escaped at all. The file reported in this MDEV contains the string "\ä", which is an example of such improperly escaped data, as - either there should be two backslashes: "\\ä" - or there should be no backslashes at all: "ä" mysql_real_escape_string() could not generate "\ä".
* | | | | | MDEV-7635: Update tests to adapt to the new default sql_modeNirbhay Choubey2017-02-101-4/+4
|/ / / / /
* | | | | Merge branch '10.1' into 10.2Sergei Golubchik2016-09-091-1/+32
|\ \ \ \ \ | |/ / / /
| * | | | Merge branch '10.0' into 10.1Sergei Golubchik2016-08-251-1/+25
| |\ \ \ \ | | |/ / /
| | * | | Merge branch '5.5' into 10.0Sergei Golubchik2016-08-101-1/+25
| | |\ \ \ | | | |/ /
| | | * | Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2016-08-031-1/+25
| | | |\ \ | | | | |/ | | | | | | | | | | without a fix for Bug#12818255 (MDEV-6581)
| | | | * BUG#23080148 - BACKPORT BUG 14653594 AND BUG 20683959 TOThayumanavar S2016-06-201-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MYSQL-5.5 The bug asks for a backport of bug#1463594 and bug#20682959. This is required because of the fact that if replication is enabled, master transaction can commit whereas slave can't commit due to not exact 'enviroment'. This manifestation is seen in bug#22024200.
| | | | * Bug#11759519 - INFINITE HANG WITH 100% CPU USAGE WITH LOAD DATAPraveenkumar Hulakund2014-03-191-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LOCAL AND IMPORT ERRORS Description: ----------- This bug happens due to the fact that current algorithm is designed that in the case of LOCAL load of data, in case of the error, the remaining part of the file is read in order to return the proper error message to the client side. But, the problem with current implementation is that data stream for the client side is cleared only in the case where line delimiters exist, which is not a case with, for example fixed width fields. Fix: ---- Ported patch provided by Sinisa Milivojevic n bug report for this issue to 5.5+ versions. As part of this patch code is changed to clear the data stream by calling new member function "READ_INFO::skip_data_till_eof".
| | | | * Description:Akhila Maddukuri2012-09-271-31/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ----------- After compiling from source, during make test I got the following error: test main.loaddata failed with error CURRENT_TEST: main.loaddata mysqltest: At line 592: query 'LOAD DATA INFILE 'tmpp.txt' INTO TABLE t1 CHARACTER SET ucs2 (@b) SET a=REVERSE(@b)' failed: 1115: Unknown character set: 'ucs2' I noticed other tests are skipped because of no ucs2 main.mix2_myisam_ucs2 [ skipped ] Test requires:' have_ucs2' Should main.loaddata be skipped if there is no ucs2 How To Repeat: ------------- Run make test on compiled source that doesn't have ucs2 Suggested fix: ------------- the failing piece of the test should be moved from mysql-test/t/loaddata.test to mysql-test/t/ctype_ucs.test.
| | | | * Description:Akhila Maddukuri2012-09-261-0/+2
| | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ----------- After compiling from source, during make test I got the following error: test main.loaddata failed with error CURRENT_TEST: main.loaddata mysqltest: At line 592: query 'LOAD DATA INFILE 'tmpp.txt' INTO TABLE t1 CHARACTER SET ucs2 (@b) SET a=REVERSE(@b)' failed: 1115: Unknown character set: 'ucs2' I noticed other tests are skipped because of no ucs2 main.mix2_myisam_ucs2 [ skipped ] Test requires:' have_ucs2' Should main.loaddata be skipped if there is no ucs2 How To Repeat: ------------- Run make test on compiled source that doesn't have ucs2 Suggested fix: ------------- the failing piece of the test should be moved from mysql-test/t/loaddata.test to mysql-test/t/ctype_ucs.test.
| | | | | * Description:Akhila Maddukuri2012-09-261-29/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ----------- After compiling from source, during make test I got the following error: test main.loaddata failed with error CURRENT_TEST: main.loaddata mysqltest: At line 592: query 'LOAD DATA INFILE 'tmpp.txt' INTO TABLE t1 CHARACTER SET ucs2 (@b) SET a=REVERSE(@b)' failed: 1115: Unknown character set: 'ucs2' I noticed other tests are skipped because of no ucs2 main.mix2_myisam_ucs2 [ skipped ] Test requires:' have_ucs2' Should main.loaddata be skipped if there is no ucs2 How To Repeat: ------------- Run make test on compiled source that doesn't have ucs2 Suggested fix: ------------- the failing piece of the test should be moved from mysql-test/t/loaddata.test to mysql-test/t/ctype_ucs.test.
| | | | * | merge from 5.1Guilhem Bichot2011-04-261-0/+9
| | | | |\ \ | | | | | |/
| | | | | * Fix for Bug#11765141 - "58072: LOAD DATA INFILE: LEAKS IO CACHE MEMORY WHEN ↵Guilhem Bichot2011-04-071-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | ERROR OCCURS"
| | | | * | 5.1 -> 5.5 mergeSergey Glukhov2011-04-151-0/+7
| | | | |\ \ | | | | | |/
| | | | | * Bug#11765139 58069: LOAD DATA INFILE: VALGRIND REPORTS INVALID MEMORY READS ↵Sergey Glukhov2011-04-151-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AND WRITES WITH U Some multibyte sequences could be considered by my_mbcharlen() functions as multibyte character but more exact my_ismbchar() does not think so. In such a case this multibyte sequences is pushed into 'stack' buffer which is too small to accommodate the sequence. The fix is to allocate stack buffer in compliance with max character length.
| | | | * | mergeGeorgi Kodinov2010-07-141-0/+29
| | | | |\ \ | | | | | |/
| | | | | * Bug #51876: crash/memory underrun when loading data with ucs2Georgi Kodinov2010-07-141-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and reverse() function 3 problems fixed : 1. The reported problem : caused by incorrect parsing of the file as ucs data resulting in wrong length of the parsed string. Fixed by truncating the invalid trailing bytes (non-complete multibyte characters) when reading from the file 2. LOAD DATA when reading from a proper UCS2 file wasn't recognizing the new line characters. Fixed by first looking if a byte is a new line (or any other special) character before reading it as a part of a multibyte character. 3. When using user variables to hold the column data in LOAD DATA the character set of the user variable was set incorrectly to the database charset. Fixed by setting it to the charset specified by LOAD DATA (if any).
| | | | * | mergeGeorgi Kodinov2010-06-091-0/+7
| | | | |\ \ | | | | | |/
| | | | | * MergeGeorgi Kodinov2010-06-091-0/+7
| | | | | |\
| | | | | | * Bug #52512: Assertion `! is_set()' in Diagnostics_area::set_ok_status Georgi Kodinov2010-04-071-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | on LOAD DATA Two problems : 1. LOAD DATA was not checking for SQL errors and was sending an OK packet even when there were errors reported already. Fixed to check for SQL errors in addition to the error conditions already detected. 2. There was an over-ambitious assert() on the server to check if the protocol is always followed by the client. This can cause crashes on debug servers by clients not completing the protocol exchange for some reason (e.g. --send command in mysqltest). Fixed by keeping the assert only on client side, since the server always completes the protocol exchange.
| | | | * | | Manual merge of mysql-5.1-bugteam to mysql-trunk-merge.Alexey Kopytov2010-05-071-6/+0
| | | | |\ \ \ | | | | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Text conflict in mysql-test/r/explain.result Text conflict in mysql-test/t/explain.test Text conflict in sql/net_serv.cc Text conflict in sql/sp_head.cc Text conflict in sql/sql_priv.h
| | | | | * | Bug#50373 --secure-file-priv=""Kristofer Pettersson2010-05-031-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Iterative patch improvement. Previously committed patch caused wrong result on Windows. The previous patch also broke secure_file_priv for symlinks since not all file paths which must be compared against this variable are normalized using the same norm. The server variable opt_secure_file_priv wasn't normalized properly and caused the operations LOAD DATA INFILE .. INTO TABLE .. and SELECT load_file(..) to do different interpretations of the --secure-file-priv option. The patch moves code to the server initialization routines so that the path always is normalized once and only once. It was also intended that setting the option to an empty string should be equal to lifting all previously set restrictions. This is also fixed by this patch.
| | | | * | | Manual merge of mysql-5.1-bugteam to mysql-trunk-merge.Alexey Kopytov2010-04-301-2/+2
| | | | |\ \ \ | | | | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Text conflict in configure.in Text conflict in dbug/dbug.c Text conflict in mysql-test/r/ps.result Text conflict in mysql-test/t/ps.test Text conflict in sql/CMakeLists.txt Text conflict in sql/ha_ndbcluster.cc Text conflict in sql/mysqld.cc Text conflict in sql/sql_plugin.cc Text conflict in sql/sql_table.cc
| | | | | * | Bug#50373 --secure-file-priv=""Kristofer Pettersson2010-04-201-2/+2
| | | | | |/ | | | | | | | | | | | | Correcting a patch misstake. The converted file path is placed in 'buff' not in opt_secure_file_priv.
| | | | * | Manual merge of mysql-5.1-bugteam into mysql-trunk-merge.Alexey Kopytov2010-04-031-0/+7
| | | | |\ \ | | | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Text conflict in mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result Text conflict in sql/log.cc Text conflict in sql/set_var.cc Text conflict in sql/sql_class.cc
| | | | | * mergeGeorgi Kodinov2010-03-301-7/+7
| | | | | |\
| | | | | | * Bug #51893: crash with certain characters given to load_file Georgi Kodinov2010-03-301-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function on windows When making sure that the directory path ends up with a slash/backslash we need to check for the correct length of the buffer and trim at the appropriate location so we don't write past the end of the buffer.
| | | | | * | Bug #51893: crash with certain characters given to load_file Georgi Kodinov2010-03-231-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function on windows When making sure that the directory path ends up with a slash/backslash we need to check for the correct length of the buffer and trim at the appropriate location so we don't write past the end of the buffer.
| | | | * | | Automerge.Alexey Kopytov2010-04-021-0/+11
| | | | |\ \ \ | | | | | |/ /
| | | | | * | Bug #51850: crash/memory overlap when using load data infile and setGeorgi Kodinov2010-03-231-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | col equal to itself! There's no need to copy the value of a field into itself. While generally harmless (except for some performance penalties) it may be dangerous when the copy code doesn't expect this. Fixed by checking if the source field is the same as the destination field before copying the data. Note that we must preserve the order of assignment of the null flags (hence the null_value assignment addition).
| | | | * | | Backport of WL #2934: Make/find library for doing float/double Alexey Kopytov2009-12-221-3/+3
| | | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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"
| | | | * | Merging 5.1 main into 5.1-rplMats Kindahl2008-10-231-0/+121
| | | | |\ \
| | | | | * \ manual mergeTatiana A. Nurnberg2008-09-181-1/+3
| | | | | |\ \ | | | | | | |/