Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 620000 - dev-db/mysql-workbench-6.3.9: error ‘MYSQL_TYPE_JSON’ was not declared in this scope
Summary: dev-db/mysql-workbench-6.3.9: error ‘MYSQL_TYPE_JSON’ was not declared in thi...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Hans de Graaff
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-28 11:53 UTC by Fabio Rossi
Modified: 2017-06-11 06:28 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
/tmp/emerge-info.txt.gz (emerge-info.txt.gz,8.29 KB, application/gzip)
2017-05-28 11:56 UTC, Fabio Rossi
Details
mysql-workbench-6.3.9:20170527-133812.log.gz (mysql-workbench-6.3.9:20170527-133812.log.gz,91.88 KB, application/gzip)
2017-05-28 11:59 UTC, Fabio Rossi
Details
mysql-workbench-6.3.9-mariadb-json.patch (mysql-workbench-6.3.9-mariadb-json.patch,2.27 KB, patch)
2017-06-10 07:49 UTC, PhobosK
Details | Diff
mysql-workbench-6.3.9-mariadb-json.patch.ebuild-files.patch (mysql-workbench-6.3.9-mariadb-json.patch.ebuild-files.patch,2.35 KB, patch)
2017-06-10 07:57 UTC, PhobosK
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fabio Rossi 2017-05-28 11:53:55 UTC
I get the following errors during compilation of latest mysql-workbench version:

/mnt/tmp/portage/dev-db/mysql-workbench-6.3.9/work/mysql-workbench-community-6.3.9-src/plugins/migration/copytable/copytable.cpp:113:10: error: ‘MYSQL_TYPE_JSON’ was not declared in this scope
     case MYSQL_TYPE_JSON:
          ^
/mnt/tmp/portage/dev-db/mysql-workbench-6.3.9/work/mysql-workbench-community-6.3.9-src/plugins/migration/copytable/copytable.cpp: In constructor ‘RowBuffer::RowBuffer(std::shared_ptr<std::vector<ColumnInfo> >, std::function<void(int, const char*, long unsigned int)>, size_t)’:
/mnt/tmp/portage/dev-db/mysql-workbench-6.3.9/work/mysql-workbench-community-6.3.9-src/plugins/migration/copytable/copytable.cpp:301:12: error: ‘MYSQL_TYPE_JSON’ was not declared in this scope
       case MYSQL_TYPE_JSON:
            ^
/mnt/tmp/portage/dev-db/mysql-workbench-6.3.9/work/mysql-workbench-community-6.3.9-src/plugins/migration/copytable/copytable.cpp: In member function ‘virtual bool MySQLCopyDataSource::fetch_row(RowBuffer&)’:
/mnt/tmp/portage/dev-db/mysql-workbench-6.3.9/work/mysql-workbench-community-6.3.9-src/plugins/migration/copytable/copytable.cpp:1401:50: error: ‘MYSQL_TYPE_JSON’ was not declared in this scope
               || rowbuffer[index].buffer_type == MYSQL_TYPE_JSON
                                                  ^
/mnt/tmp/portage/dev-db/mysql-workbench-6.3.9/work/mysql-workbench-community-6.3.9-src/plugins/migration/copytable/copytable.cpp: In member function ‘bool MySQLCopyDataTarget::append_bulk_column(size_t)’:
/mnt/tmp/portage/dev-db/mysql-workbench-6.3.9/work/mysql-workbench-community-6.3.9-src/plugins/migration/copytable/copytable.cpp:2174:12: error: ‘MYSQL_TYPE_JSON’ was not declared in this scope
       case MYSQL_TYPE_JSON:
            ^
make[2]: *** [plugins/migration/CMakeFiles/wbcopytables-bin.dir/build.make:63: plugins/migration/CMakeFiles/wbcopytables-bin.dir/copytable/copytable.cpp.o] Error 1
make[2]: Leaving directory '/mnt/tmp/portage/dev-db/mysql-workbench-6.3.9/work/mysql-workbench-6.3.9_build'
make[1]: *** [CMakeFiles/Makefile2:2624: plugins/migration/CMakeFiles/wbcopytables-bin.dir/all] Error 2
make[1]: Leaving directory '/mnt/tmp/portage/dev-db/mysql-workbench-6.3.9/work/mysql-workbench-6.3.9_build'
make: *** [Makefile:128: all] Error 2
 * ERROR: dev-db/mysql-workbench-6.3.9::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=dev-db/mysql-workbench-6.3.9::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-db/mysql-workbench-6.3.9::gentoo'`.
 * The complete build log is located at '/var/log/portage/build/dev-db/mysql-workbench-6.3.9:20170527-133812.log.gz'.
 * For convenience, a symlink to the build log is located at '/mnt/tmp/portage/dev-db/mysql-workbench-6.3.9/temp/build.log.gz'.
 * The ebuild environment file is located at '/mnt/tmp/portage/dev-db/mysql-workbench-6.3.9/temp/environment'.
 * Working directory: '/mnt/tmp/portage/dev-db/mysql-workbench-6.3.9/work/mysql-workbench-6.3.9_build'
 * S: '/mnt/tmp/portage/dev-db/mysql-workbench-6.3.9/work/mysql-workbench-community-6.3.9-src'
Comment 1 Fabio Rossi 2017-05-28 11:56:34 UTC
Created attachment 474566 [details]
/tmp/emerge-info.txt.gz
Comment 2 Fabio Rossi 2017-05-28 11:59:55 UTC
Created attachment 474568 [details]
mysql-workbench-6.3.9:20170527-133812.log.gz
Comment 3 Fabio Rossi 2017-05-28 12:09:11 UTC
Does this happen because building against mysql-5.6 API? See this upstream bug for reference: https://bugs.mysql.com/bug.php?id=80539
Comment 4 Hans de Graaff gentoo-dev Security 2017-05-29 04:30:09 UTC
Which virtual/mysql provider are you using?
Comment 5 Fabio Rossi 2017-05-29 10:02:45 UTC
I am using dev-db/mysql-5.6.35 as provider for virtual/mysql
Comment 6 Ivo Steinmann 2017-06-05 22:57:20 UTC
Same problem here with
dev-db/mysql-5.6.36
virtual/mysql-5.6-r9
Comment 7 Fabio Rossi 2017-06-06 07:43:09 UTC
(In reply to Fabio Rossi from comment #5)
> I am using dev-db/mysql-5.6.35 as provider for virtual/mysql

to be precise, I'm using virtual/mysql-5.6-r6
Comment 8 Ivo Steinmann 2017-06-06 09:00:36 UTC
Looks like MYSQL_TYPE_JSON is introduced by mysql 5.7.8 or higher.

https://dev.mysql.com/doc/relnotes/connector-cpp/en/news-1-1-7.html
Comment 9 Ivo Steinmann 2017-06-06 23:32:02 UTC
Switching from mysql-5.6 to dev-db/mariadb-10.1.24 is a possible workaround.
Comment 10 PhobosK 2017-06-10 07:49:33 UTC
Created attachment 475808 [details, diff]
mysql-workbench-6.3.9-mariadb-json.patch

As @Ivo Steinmann noted in his comment #8 this bug will appear to all dev-db/mysql < 5.7.8, because of the missing MYSQL_TYPE_JSON support....
Since dev-db/mysql at portage now is still 5.6.36... the bug will hit everyone that uses mysql and not mariadb in virtual/mysql


Anyway the solution is to refine the patch in the ebuild "files" folder: mysql-workbench-6.3.9-mariadb-json.patch

This is the full modified patch that I am uploading... 

It works OK and =dev-db/mysql-workbench-6.3.9 (with =dev-db/mysql-5.6.36) builds ok, so a change in portage tree is next...
Comment 11 PhobosK 2017-06-10 07:57:40 UTC
Created attachment 475810 [details, diff]
mysql-workbench-6.3.9-mariadb-json.patch.ebuild-files.patch

This is a patch file to the patch mysql-workbench-6.3.9-mariadb-json.patch in the files folder of the ebuild...

Doesn't make much sense if you ask me... but once a Gentoo Dev here wrote a post in one of my bugs that he needed such patches, so he can see exactly what's altered... So this is for those that need it ;)

(the original patch in files folder has some extra spaces at some line ends... so they were removed too in my proposed patch uploaded in my previous post...)
Comment 12 Hans de Graaff gentoo-dev Security 2017-06-11 06:28:40 UTC
(In reply to PhobosK from comment #10)
> Created attachment 475808 [details, diff] [details, diff]
> mysql-workbench-6.3.9-mariadb-json.patch
> 
> As @Ivo Steinmann noted in his comment #8 this bug will appear to all
> dev-db/mysql < 5.7.8, because of the missing MYSQL_TYPE_JSON support....
> Since dev-db/mysql at portage now is still 5.6.36... the bug will hit
> everyone that uses mysql and not mariadb in virtual/mysql

Thanks for updating and testing the patch.

> It works OK and =dev-db/mysql-workbench-6.3.9 (with =dev-db/mysql-5.6.36)
> builds ok, so a change in portage tree is next...

Confirmed to work the mariadb as well, so I've updated the patch in the tree (no revision bump).