|
95 | 95 |
|
96 | 96 | for my $key (qw/testdb testhost testuser testpassword testsocket testport
|
97 | 97 | cflags libs nocatchstderr nofoundrows
|
98 |
| - ps-protocol bind-type-guessing /) |
| 98 | + ps-protocol bind-type-guessing version/) |
99 | 99 | {
|
100 | 100 | Configure($opt, $source, $key);
|
101 | 101 | }
|
@@ -374,7 +374,6 @@ it can be found):
|
374 | 374 |
|
375 | 375 | mysql_config --cflags
|
376 | 376 | mysql_config --libs
|
377 |
| - mysql_config --testdb |
378 | 377 |
|
379 | 378 | and so on. See DBD::mysql::INSTALL for details.
|
380 | 379 | USAGE
|
@@ -446,13 +445,12 @@ sub Configure {
|
446 | 445 | $source->{ldflags} = "mysql_config";
|
447 | 446 | }
|
448 | 447 |
|
449 |
| - if ($command =~ /10.[34]/) { |
450 |
| - # MariaDB's mysql_config/mariadb_config reports the compile time |
451 |
| - # locations, not the install location. This results in issues for |
452 |
| - # dbdeployer etc. where these are not the same. |
453 |
| - my $installdir = substr(dirname($opt->{'mysql_config'}), 1, -4); |
454 |
| - $str =~ s#usr/local/mysql#$installdir#g; |
| 448 | + if ($param eq 'version') { |
| 449 | + if ($str !~ /^8\./) { |
| 450 | + die "DBD::mysql requires MySQL 8.x for building. Version reported by $command: $str"; |
| 451 | + } |
455 | 452 | }
|
| 453 | + |
456 | 454 | $opt->{$param} = $str;
|
457 | 455 | $source->{$param} = "mysql_config";
|
458 | 456 | return;
|
@@ -572,38 +570,6 @@ sub SearchFor2 {
|
572 | 570 | }
|
573 | 571 | }
|
574 | 572 |
|
575 |
| - |
576 |
| -sub check_include_version { |
577 |
| - |
578 |
| - my ($dir, $ver) = @_; |
579 |
| - |
580 |
| - my $headerfile; |
581 |
| - |
582 |
| - $dir =~ s/-I//; |
583 |
| - $dir =~ s/'//g; |
584 |
| - $dir =~ s/\s.*//g; |
585 |
| - |
586 |
| - open(HEADERFILE ,"<${dir}/mysql_version.h") or |
587 |
| - (print "Unable to open header file ${dir}/mysql_version.h" && exit(0)); |
588 |
| - { |
589 |
| - local undef $/; |
590 |
| - $headerfile = <HEADERFILE>; |
591 |
| - } |
592 |
| - close(HEADERFILE); |
593 |
| - |
594 |
| - my ($version_id) = ($headerfile =~ /MYSQL_VERSION_ID[\t\s]+(\d+)[\n\r]/); |
595 |
| - |
596 |
| - if ($version_id < $ver) |
597 |
| - { |
598 |
| - print <<"MSG"; |
599 |
| -
|
600 |
| -Version of MySQL include files in $dir - $1 |
601 |
| -MSG |
602 |
| - return 0; |
603 |
| - } |
604 |
| - return 1; |
605 |
| -} |
606 |
| - |
607 | 573 | sub replace
|
608 | 574 | {
|
609 | 575 | my ($str, $ref)=@_;
|
|
0 commit comments