~ubuntu-branches/ubuntu/trusty/mysql-5.6/trusty

« back to all changes in this revision

Viewing changes to mysql-test/suite/rpl_ndb/t/check_conversions.inc

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-02-12 11:54:27 UTC
  • Revision ID: package-import@ubuntu.com-20140212115427-oq6tfsqxl1wuwehi
Tags: upstream-5.6.15
ImportĀ upstreamĀ versionĀ 5.6.15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--echo **** Checking result of conversions ****
 
2
disable_query_log;
 
3
# Create a temporary table containing all conversions
 
4
# that didn't work as expected, the table should
 
5
# normally not contain any rows
 
6
CREATE TEMPORARY TABLE failed_type_conversions ENGINE = 'MyISAM' AS
 
7
  SELECT RPAD(Source, 15, ' ') AS Source_Type,
 
8
         RPAD(Target, 15, ' ') AS Target_Type,
 
9
         RPAD(Flags, 25, ' ') AS All_Type_Conversion_Flags,
 
10
         IF(Compare IS NULL AND Error IS NOT NULL, '<Correct error>',
 
11
            IF(Compare, '<Correct value>',
 
12
               CONCAT("'", On_Slave, "' != '", Expected, "'")))
 
13
           AS Value_On_Slave
 
14
  FROM type_conversions
 
15
  WHERE Compare != 1 OR (Compare IS NULL AND Error IS NULL);
 
16
enable_query_log;
 
17
 
 
18
if (`SELECT COUNT(*) FROM failed_type_conversions`)
 
19
{
 
20
  echo Some type conversions failed, see below:;
 
21
  SELECT * FROM failed_type_conversions;
 
22
  die Type conversion failure;
 
23
}
 
24
 
 
25
 
 
26