mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
A fix for a bug #8830, which occured when binary data from blob was
dumped with --hex-blob and --skip-extended-insert options.
This commit is contained in:
parent
41e45ab16a
commit
79ac22e324
4 changed files with 58 additions and 1 deletions
|
@ -1052,3 +1052,4 @@ ndb/tools/ndb_drop_index.dsp
|
|||
ndb/tools/ndb_show_tables.dsp
|
||||
ndb/tools/ndb_select_all.dsp
|
||||
ndb/tools/ndb_select_count.dsp
|
||||
support-files/ndb-config-2-node.ini
|
||||
|
|
|
@ -1790,7 +1790,7 @@ static void dumpTable(uint numFields, char *table)
|
|||
char *ptr= row[i], *end= ptr+ lengths[i];
|
||||
fputs("0x", md_result_file);
|
||||
for (; ptr < end ; ptr++)
|
||||
fprintf(md_result_file, "%02X", *ptr);
|
||||
fprintf(md_result_file, "%02X", *((uchar *)ptr));
|
||||
}
|
||||
else
|
||||
unescape(md_result_file, row[i], lengths[i]);
|
||||
|
|
|
@ -549,3 +549,49 @@ UNLOCK TABLES;
|
|||
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
CREATE TABLE t1 (`b` blob);
|
||||
INSERT INTO `t1` VALUES (0x602010000280100005E71A);
|
||||
-- MySQL dump 10.9
|
||||
--
|
||||
-- Host: localhost Database: test
|
||||
-- ------------------------------------------------------
|
||||
-- Server version 4.1.11-debug-log
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8 */;
|
||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
|
||||
--
|
||||
-- Table structure for table `t1`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `t1`;
|
||||
CREATE TABLE `t1` (
|
||||
`b` blob
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
--
|
||||
-- Dumping data for table `t1`
|
||||
--
|
||||
|
||||
|
||||
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
|
||||
LOCK TABLES `t1` WRITE;
|
||||
INSERT INTO `t1` VALUES (0x602010000280100005E71A);
|
||||
UNLOCK TABLES;
|
||||
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
|
|
@ -165,3 +165,13 @@ INSERT INTO t2 VALUES (4),(5),(6);
|
|||
--exec $MYSQL_DUMP --skip-comments --ignore-table=test.t1 test
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
|
||||
#
|
||||
# Bug #8830
|
||||
#
|
||||
|
||||
CREATE TABLE t1 (`b` blob);
|
||||
INSERT INTO `t1` VALUES (0x602010000280100005E71A);
|
||||
--exec $MYSQL_DUMP --skip-extended-insert --hex-blob test t1
|
||||
DROP TABLE t1;
|
||||
|
||||
|
|
Loading…
Reference in a new issue