Bug 76638 - Patch retrieve_grants.patch.1 fails in mysqlcppconn on OSSX
Summary: Patch retrieve_grants.patch.1 fails in mysqlcppconn on OSSX
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
4.3.0.0.alpha0+ Master
Hardware: x86-64 (AMD64) macOS (All)
: medium normal
Assignee: Julien Nabet
URL:
Whiteboard: target:4.3.0
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-26 14:01 UTC by Alex Thurgood
Modified: 2014-03-30 10:39 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Thurgood 2014-03-26 14:01:07 UTC
See bug 76620 comment 17

> Hmmm,
> 
> Now it fails at:
> 
> [build PAT] mysqlcppconn
> [build CFG] mysql
> 1 out of 2 hunks FAILED -- saving rejects to file
> driver/mysql_metadata.cpp.rej
> Patch FAILED:
> /Volumes/HD1/Shared/Repos/LO/core/external/mysqlcppconn/patches/
> retrieve_grants.patch.1
> make[1]: ***
> [/Volumes/HD1/Shared/Repos/LO/core/workdir/UnpackedTarball/mysqlcppconn.
> done] Error 1
> make[1]: *** Waiting for unfinished jobs....

mysql_metadata.cpp.rej


***************
*** 3633,3644 ****
- 	sql::SQLString strAllPrivs("ALTER, DELETE, DROP, INDEX, INSERT, LOCK TABLES, SELECT, UPDATE");
  
  	sql::SQLString cQuote(getIdentifierQuoteString());
  
  	while (rs->next() ) {
  		sql::SQLString aGrant = rs->getString(1);
  		aGrant = aGrant.replace(0, 6, "");
  
  		size_t pos = aGrant.find("ALL PRIVILEGES");
  
  		if (pos != sql::SQLString::npos) {
  			aGrant = aGrant.replace(pos, sizeof("ALL PRIVILEGES") - 1, strAllPrivs);
--- 3633,3646 ----
+ 	sql::SQLString strAllPrivs("SELECT, INSERT, UPDATE, DELETE, CREATE, DROPT, GRANT, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER");
  
  	sql::SQLString cQuote(getIdentifierQuoteString());
+ 	size_t posIsGrantable = sql::SQLString::npos;
  
  	while (rs->next() ) {
  		sql::SQLString aGrant = rs->getString(1);
  		aGrant = aGrant.replace(0, 6, "");
  
  		size_t pos = aGrant.find("ALL PRIVILEGES");
+ 		posIsGrantable = aGrant.find("WITH GRANT OPTION");
  
  		if (pos != sql::SQLString::npos) {
  			aGrant = aGrant.replace(pos, sizeof("ALL PRIVILEGES") - 1, strAllPrivs);
Comment 1 Commit Notification 2014-03-26 18:01:35 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b26f2645d30de5ef86eaeb91ef5346135cfe256d

Resolves: fdo#76638 Patch retrieve_grants.patch.1 fails



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 2 Julien Nabet 2014-03-26 18:03:47 UTC
Hmm, I just should have revert the patch instead of patch to remove this!

Anyway, could you give a new try Alex after having updated?
Comment 3 Julien Nabet 2014-03-26 18:06:23 UTC
For the record, I got this in my autogen.input:
--enable-ext-mariadb-connector
--with-system-mariadb
--enable-bundle-mariadb
Comment 4 Julien Nabet 2014-03-27 18:34:45 UTC
Ok I built from scratch and it was OK.

I put it as FIXED.
Alex, don't hesitate to reopen the tracker if you still reproduce the problem.
Comment 5 Alex Thurgood 2014-03-30 09:34:56 UTC
Hi Julien,

Yep, thanks, that fiexd it.

Alex